diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000..a62ca711c
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "printWidth": 180,
+ "singleQuote": true,
+ "semi": true,
+ "bracketSpacing": true,
+ "trailingComma": "all"
+}
diff --git a/Example/.babelrc b/Example/.babelrc
index 91e4606a6..1f757e4c9 100644
--- a/Example/.babelrc
+++ b/Example/.babelrc
@@ -1,6 +1,6 @@
{
"presets": [
- "react-native"
+ "react-native",
],
"plugins": [
"transform-decorators-legacy"
diff --git a/Example/.gitignore b/Example/.gitignore
index 10be19751..05e924485 100644
--- a/Example/.gitignore
+++ b/Example/.gitignore
@@ -51,3 +51,4 @@ buck-out/
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
+node_modules/
\ No newline at end of file
diff --git a/Example/Example.js b/Example/Example.js
index 1fb051110..695f25167 100644
--- a/Example/Example.js
+++ b/Example/Example.js
@@ -5,20 +5,8 @@ import Register from './components/Register';
import Login from './components/Login';
import Login2 from './components/Login2';
import Login3 from './components/Login3';
-import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator';
-import {
- Scene,
- Router,
- Actions,
- Reducer,
- ActionConst,
- Overlay,
- Tabs,
- Modal,
- Drawer,
- Stack,
- Lightbox,
-} from 'react-native-router-flux';
+import CardStackStyleInterpolator from 'react-navigation/src/views/StackView/StackViewStyleInterpolator';
+import { Scene, Router, Actions, Reducer, ActionConst, Overlay, Tabs, Modal, Drawer, Stack, Lightbox } from 'react-native-router-flux';
import Home from './components/Home';
import DrawerContent from './components/drawer/DrawerContent';
import TabView from './components/TabView';
@@ -28,13 +16,15 @@ import MessageBar from './components/MessageBar';
import ErrorModal from './components/modal/ErrorModal';
import DemoLightbox from './components/lightbox/DemoLightbox';
import MenuIcon from './images/menu_burger.png';
-import CustomNavBarView from "./components/CustomNavBarView";
-import CustomNavBar from "./components/CustomNavBar";
-import CustomNavBar2 from "./components/CustomNavBar2";
+import CustomNavBarView from './components/CustomNavBarView';
+import CustomNavBar from './components/CustomNavBar';
+import CustomNavBar2 from './components/CustomNavBar2';
const styles = StyleSheet.create({
container: {
- flex: 1, backgroundColor: 'transparent', justifyContent: 'center',
+ flex: 1,
+ backgroundColor: 'transparent',
+ justifyContent: 'center',
alignItems: 'center',
},
tabBarStyle: {
@@ -61,193 +51,70 @@ const getSceneStyle = () => ({
// on Android, the URI prefix typically contains a host in addition to scheme
const prefix = Platform.OS === 'android' ? 'mychat://mychat/' : 'mychat://';
-
+const Example2 = () => (
+
+
+ alert('Right button')} rightTitle="Right" />
+
+
+);
const Example = () => (
-
-
-
- ({ screenInterpolator: CardStackStyleInterpolator.forFadeFromBottomAndroid })}
- >
-
-
- navigation.state.key} />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/*
+
+
+ navigation.state.key} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/*
Wrapper Scene needed to fix a bug where the tabs would
reload as a modal ontop of itself
*/}
-
-
-
- alert('Right button')}
- rightTitle="Right"
-
- />
-
-
-
-
-
- Right}
- />
- alert('onBack button!')}
- hideDrawerButton
- backTitle="Back!"
- panHandlers={null}
- />
-
+
+
+
+ alert('Right button')} rightTitle="Right" />
-
- { }}
- />
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
- console.log('onExit')}
- leftTitle="Cancel"
- onLeft={Actions.pop}
- />
-
-
-
-
+
+ Right} />
+ alert('onBack button!')} hideDrawerButton backTitle="Back!" panHandlers={null} />
+
-
-
+
+ {}} />
+
+
+
+
+
+
+
+
+
);
diff --git a/Example/components/TabView.js b/Example/components/TabView.js
index 3126ab7fa..e666889c6 100644
--- a/Example/components/TabView.js
+++ b/Example/components/TabView.js
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { StyleSheet, Text, View, ViewPropTypes } from "react-native";
+import { StyleSheet, Text, View, ViewPropTypes } from 'react-native';
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
@@ -22,33 +22,71 @@ const styles = StyleSheet.create({
});
class TabView extends React.Component {
- state = { hideNavBar: false }
+ state = { hideNavBar: false };
toggleNavBar = () => {
- this.setState({ hideNavBar: !this.state.hideNavBar }, () =>
- Actions.refresh({ hideNavBar: this.state.hideNavBar })
- );
- }
+ this.setState({ hideNavBar: !this.state.hideNavBar }, () => Actions.refresh({ hideNavBar: this.state.hideNavBar }));
+ };
render() {
return (
- Tab title:{this.props.title} name:{this.props.name}
+
+ Tab title:{this.props.title} name:{this.props.name}
+
Tab data:{this.props.data}
- {this.props.name === 'tab_1_1' &&
-
- }
- {this.props.name === 'tab_2_1' &&
-
- }
+ {this.props.name === 'tab_1_1' && }
+ {this.props.name === 'tab_2_1' && }
-
-
-
-
-
-
-
+
+
+
+
+
+
+
);
}
diff --git a/Example/components/drawer/DrawerContent.js b/Example/components/drawer/DrawerContent.js
index c5fdf1f64..fa90c1291 100644
--- a/Example/components/drawer/DrawerContent.js
+++ b/Example/components/drawer/DrawerContent.js
@@ -20,11 +20,11 @@ class DrawerContent extends React.Component {
name: PropTypes.string,
sceneStyle: ViewPropTypes.style,
title: PropTypes.string,
- }
+ };
static contextTypes = {
drawer: PropTypes.object,
- }
+ };
render() {
return (
@@ -32,20 +32,22 @@ class DrawerContent extends React.Component {
{/* Drawer Content
*/}
Title: {this.props.title}
- {this.props.name === 'tab_1_1' &&
-
- }
- {this.props.name === 'tab_2_1' &&
-
- }
+ {this.props.name === 'tab_1_1' && }
+ {this.props.name === 'tab_2_1' && }
-
-
+
+
-
+
);
}
}
diff --git a/Example/package.json b/Example/package.json
index dbde5dc09..cab2244fb 100644
--- a/Example/package.json
+++ b/Example/package.json
@@ -16,8 +16,8 @@
"react-native": "0.55.4",
"react-native-button": "^2.0.0",
"react-native-message-bar": "^1.6.0",
- "react-native-router-flux": "4.0.0-beta.32",
- "react-navigation": "1.5.8"
+ "react-native-router-flux": "github:aksonov/react-native-router-flux#1fafbc5fc0b69d672b24b79aa5e8c0787ac2dfff",
+ "react-navigation": "^2.8.0"
},
"devDependencies": {
"babel-jest": "20.1.0-echo.1",
diff --git a/Example/yarn.lock b/Example/yarn.lock
index 294f444ba..fc320a138 100644
--- a/Example/yarn.lock
+++ b/Example/yarn.lock
@@ -2,430 +2,434 @@
# yarn lockfile v1
-"@babel/code-frame@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.46.tgz#e0d002100805daab1461c0fcb32a07e304f3a4f4"
+"@babel/code-frame@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead"
dependencies:
- "@babel/highlight" "7.0.0-beta.46"
+ "@babel/highlight" "7.0.0-beta.54"
"@babel/core@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.46.tgz#dbe2189bcdef9a2c84becb1ec624878d31a95689"
- dependencies:
- "@babel/code-frame" "7.0.0-beta.46"
- "@babel/generator" "7.0.0-beta.46"
- "@babel/helpers" "7.0.0-beta.46"
- "@babel/template" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- babylon "7.0.0-beta.46"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.54.tgz#253c54d0095403a5cfa764e7d9b458194692d02b"
+ dependencies:
+ "@babel/code-frame" "7.0.0-beta.54"
+ "@babel/generator" "7.0.0-beta.54"
+ "@babel/helpers" "7.0.0-beta.54"
+ "@babel/parser" "7.0.0-beta.54"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
convert-source-map "^1.1.0"
debug "^3.1.0"
json5 "^0.5.0"
- lodash "^4.2.0"
- micromatch "^2.3.11"
+ lodash "^4.17.5"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
-"@babel/generator@7.0.0-beta.46", "@babel/generator@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.46.tgz#6f57159bcc28bf8c3ed6b549789355cebfa3faa7"
+"@babel/generator@7.0.0-beta.54", "@babel/generator@^7.0.0-beta":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.54.tgz#c043c7eebeebfd7e665d95c281a4aafc83d4e1c9"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
jsesc "^2.5.1"
- lodash "^4.2.0"
+ lodash "^4.17.5"
source-map "^0.5.0"
trim-right "^1.0.1"
-"@babel/helper-annotate-as-pure@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.46.tgz#4cd76d5c93409ea01d31be66395a3b98a372792e"
+"@babel/helper-annotate-as-pure@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.54.tgz#1626126a3f9fc4ed280ac942372c7d39653d7121"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-beta.46.tgz#b6c8de48693b66bf90239e99856be4c2257e43ba"
+"@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-beta.54.tgz#d0a1967635b9eebcafdba80491917ee4981c12fa"
dependencies:
- "@babel/helper-explode-assignable-expression" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/helper-explode-assignable-expression" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-builder-react-jsx@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0-beta.46.tgz#d399c1892f48bbe68ce6ccca14b127b00cbc656f"
+"@babel/helper-builder-react-jsx@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0-beta.54.tgz#cad582ab1cb831f4dc34e9bcb4c4fa2f1fb6c986"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
esutils "^2.0.0"
-"@babel/helper-call-delegate@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.46.tgz#a9e8b46cece47726308f015ce979293ef3d36ab7"
+"@babel/helper-call-delegate@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.54.tgz#f6b72cfd832fb26eb2a806e18de05f88d3a8f302"
dependencies:
- "@babel/helper-hoist-variables" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/helper-hoist-variables" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-define-map@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0-beta.46.tgz#994219751ef48bf1ec32604b43935f2b24d617fa"
+"@babel/helper-define-map@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0-beta.54.tgz#2036d7c49365987f091db9702ce2f3b55f677730"
dependencies:
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- lodash "^4.2.0"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+ lodash "^4.17.5"
-"@babel/helper-explode-assignable-expression@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-beta.46.tgz#6a34a7533761b97ce4f7bf6fc586dcfb204ffa11"
+"@babel/helper-explode-assignable-expression@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-beta.54.tgz#cf067f3330965c2048bf087ea06f62c76d94a792"
dependencies:
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-function-name@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.46.tgz#d0c4eed2e220e180f91b02e008dcc4594afe1d39"
+"@babel/helper-function-name@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.54.tgz#307875507a1eda2482a09a9a4df6a25632ffb34b"
dependencies:
- "@babel/helper-get-function-arity" "7.0.0-beta.46"
- "@babel/template" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/helper-get-function-arity" "7.0.0-beta.54"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-get-function-arity@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.46.tgz#7161bfe449b4183dbe25d1fe5579338b7429e5f2"
+"@babel/helper-get-function-arity@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.54.tgz#757bd189b077074a004028cfde5f083c306cc6c4"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-hoist-variables@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.46.tgz#2d656215bea3f044ff1ee391fc51d55fce46ddf5"
+"@babel/helper-hoist-variables@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.54.tgz#8635be8095135ff73f753ed189e449f68b4f43cb"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-member-expression-to-functions@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-beta.46.tgz#736344c1d68fb2c4b75cbe62370eb610c0578427"
+"@babel/helper-member-expression-to-functions@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-beta.54.tgz#bce9ddc484317b13d2615bafe2b524d0d56d99df"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-module-imports@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.46.tgz#8bd2e1fcfae883d28149a350e31ce606aa24eda6"
+"@babel/helper-module-imports@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.54.tgz#c2d8e14ff034225bf431356db77ef467b8d35aac"
dependencies:
- "@babel/types" "7.0.0-beta.46"
- lodash "^4.2.0"
+ "@babel/types" "7.0.0-beta.54"
+ lodash "^4.17.5"
-"@babel/helper-module-transforms@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.46.tgz#90ad981f3a0020d9a8e526296555a5dd7e87cf5e"
+"@babel/helper-module-transforms@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.54.tgz#8cc57eb0db5f0945d866524d555abd084e30cc35"
dependencies:
- "@babel/helper-module-imports" "7.0.0-beta.46"
- "@babel/helper-simple-access" "7.0.0-beta.46"
- "@babel/helper-split-export-declaration" "7.0.0-beta.46"
- "@babel/template" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- lodash "^4.2.0"
+ "@babel/helper-module-imports" "7.0.0-beta.54"
+ "@babel/helper-simple-access" "7.0.0-beta.54"
+ "@babel/helper-split-export-declaration" "7.0.0-beta.54"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+ lodash "^4.17.5"
-"@babel/helper-optimise-call-expression@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-beta.46.tgz#50f060b4e4af01c73b40986fa593ae7958422e89"
+"@babel/helper-optimise-call-expression@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-beta.54.tgz#4af8dd4ff90dbd29b3bcf85fff43952e2ae1016e"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-plugin-utils@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.46.tgz#f630adbd9d645d0ba2e43f4955b4ad61f44ccdf4"
+"@babel/helper-plugin-utils@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4"
"@babel/helper-remap-async-to-generator@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-beta.46.tgz#275d455dbced4c807543f001302a40303a3f0914"
- dependencies:
- "@babel/helper-annotate-as-pure" "7.0.0-beta.46"
- "@babel/helper-wrap-function" "7.0.0-beta.46"
- "@babel/template" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
-
-"@babel/helper-replace-supers@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-beta.46.tgz#921c0f25d875026a8fb12feda1b72323595ea156"
- dependencies:
- "@babel/helper-member-expression-to-functions" "7.0.0-beta.46"
- "@babel/helper-optimise-call-expression" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
-
-"@babel/helper-simple-access@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.46.tgz#8eb0edf978c85915d11b6a7aa8591434e158170d"
- dependencies:
- "@babel/template" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- lodash "^4.2.0"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-beta.54.tgz#39a50052aadd74d40c73b7c58eb963b90fac56d3"
+ dependencies:
+ "@babel/helper-annotate-as-pure" "7.0.0-beta.54"
+ "@babel/helper-wrap-function" "7.0.0-beta.54"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+
+"@babel/helper-replace-supers@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-beta.54.tgz#901f5a1493a410799fd3ab3e0c0d29d18071c89f"
+ dependencies:
+ "@babel/helper-member-expression-to-functions" "7.0.0-beta.54"
+ "@babel/helper-optimise-call-expression" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+
+"@babel/helper-simple-access@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.54.tgz#5f760a19589a9b6f07e80a65ef4bcbd4fba8c253"
+ dependencies:
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+ lodash "^4.17.5"
-"@babel/helper-split-export-declaration@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.46.tgz#6903893c72bb2a3d54ed20b5ff2aa8a28e8d2ea1"
+"@babel/helper-split-export-declaration@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.54.tgz#89cd8833c95481a0827ac6a1bfccddb92b75a109"
dependencies:
- "@babel/types" "7.0.0-beta.46"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helper-wrap-function@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.46.tgz#d0fb836516d8a38ab80df1b434e4b76015be9035"
+"@babel/helper-wrap-function@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.54.tgz#dc1b7a483a3074a3531b36523e03156d910a3a2a"
dependencies:
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/template" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/helpers@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.46.tgz#b5f988dfd77f4f713792cf7818b687050736ee52"
+"@babel/helpers@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.54.tgz#b86a99a80efd81668caef307610b961197446a74"
dependencies:
- "@babel/template" "7.0.0-beta.46"
- "@babel/traverse" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
+ "@babel/template" "7.0.0-beta.54"
+ "@babel/traverse" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
-"@babel/highlight@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.46.tgz#c553c51e65f572bdedd6eff66fc0bb563016645e"
+"@babel/highlight@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.54.tgz#155d507358329b8e7068970017c3fd74a9b08584"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"
+"@babel/parser@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.54.tgz#c01aa63b57c9c8dce8744796c81d9df121f20db4"
+
"@babel/plugin-external-helpers@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.0.0-beta.46.tgz#293c1ed7a5257eb50dfc93e468f1129a7802a3cf"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.0.0-beta.54.tgz#14b1eae9a5b491acad878e5fbba59a81ed3ac4ce"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-proposal-class-properties@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0-beta.46.tgz#1c505f8df3a312beb41c88d74209d5b6d537fa3d"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0-beta.54.tgz#5953f0499c1e69e732d33a550bce8799aa6b76f3"
dependencies:
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/helper-replace-supers" "7.0.0-beta.46"
- "@babel/plugin-syntax-class-properties" "7.0.0-beta.46"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/helper-member-expression-to-functions" "7.0.0-beta.54"
+ "@babel/helper-optimise-call-expression" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/helper-replace-supers" "7.0.0-beta.54"
+ "@babel/plugin-syntax-class-properties" "7.0.0-beta.54"
"@babel/plugin-proposal-object-rest-spread@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-beta.46.tgz#fb3979488a52c1246cdced4a438ace0f47ac985b"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-beta.54.tgz#5481269a020dd0d38715a8094fed015d30ef4c2a"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/plugin-syntax-object-rest-spread" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/plugin-syntax-object-rest-spread" "7.0.0-beta.54"
-"@babel/plugin-syntax-class-properties@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0-beta.46.tgz#dad4df6c31b65ba359fec3b02fb8413896e75efc"
+"@babel/plugin-syntax-class-properties@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0-beta.54.tgz#5e70f22dc3628c1d35402b63ff1a8f8e005bd871"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-syntax-dynamic-import@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0-beta.46.tgz#651459c419d5ec0609a518370a417b8b47c52583"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0-beta.54.tgz#c962627f4e1a15da6d0842306d421e7b1e52f587"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
-"@babel/plugin-syntax-flow@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0-beta.46.tgz#f9940274770945cc758a947944949e70ea530e7f"
+"@babel/plugin-syntax-flow@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0-beta.54.tgz#8d38fffa6da16e2d327f5fee4f90913b14d43d14"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
-"@babel/plugin-syntax-jsx@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0-beta.46.tgz#ed2e8a43716e7904ae33dca71d5f2b436f0f25e8"
+"@babel/plugin-syntax-jsx@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0-beta.54.tgz#71171aee902b94ccf2e22a810d1426b5165b8d84"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
-"@babel/plugin-syntax-object-rest-spread@7.0.0-beta.46":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-beta.46.tgz#03d46637f549757b2d6877b6449901698059d7d8"
+"@babel/plugin-syntax-object-rest-spread@7.0.0-beta.54":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-beta.54.tgz#e0f445612081ab573e2535adbabc7b710d17940c"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-arrow-functions@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-beta.46.tgz#130e79b1d4508767c47e5febb809f8dca80c05f5"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-beta.54.tgz#44a977b8e61e4efcc7658bbbe260f204ca1bcf72"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-block-scoping@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-beta.46.tgz#da42dd17fbed675c72233988dbad9ace5ab9e4a7"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-beta.54.tgz#bcae1c2ffae4cc3b7b3e5455f0a98daecc09a3c6"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- lodash "^4.2.0"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ lodash "^4.17.5"
"@babel/plugin-transform-classes@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.46.tgz#00c856feda2ee756c4cc6ef8c97d17d070acebf7"
- dependencies:
- "@babel/helper-annotate-as-pure" "7.0.0-beta.46"
- "@babel/helper-define-map" "7.0.0-beta.46"
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/helper-optimise-call-expression" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/helper-replace-supers" "7.0.0-beta.46"
- "@babel/helper-split-export-declaration" "7.0.0-beta.46"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.54.tgz#b15781d2e499ce25438e73fea2fa5a09858568ff"
+ dependencies:
+ "@babel/helper-annotate-as-pure" "7.0.0-beta.54"
+ "@babel/helper-define-map" "7.0.0-beta.54"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/helper-optimise-call-expression" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/helper-replace-supers" "7.0.0-beta.54"
+ "@babel/helper-split-export-declaration" "7.0.0-beta.54"
globals "^11.1.0"
"@babel/plugin-transform-computed-properties@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-beta.46.tgz#ca1ece27615f7324345713fb6a93dd288788e891"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-beta.54.tgz#b28494942b94fb86d01994763d2b5c43bdd986af"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-destructuring@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.46.tgz#6e6a097da31063f545f7818afe48ef09165ce5ff"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.54.tgz#81f649a3e4fcb62c2b2ad497f783a800b994472f"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-exponentiation-operator@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-beta.46.tgz#95ae2e03456e417d2f5eace6d05a8fccb7af1bcc"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-beta.54.tgz#1017096366fb43ebca8ed8d8d0cdd1ebd64febb2"
dependencies:
- "@babel/helper-builder-binary-assignment-operator-visitor" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-builder-binary-assignment-operator-visitor" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-flow-strip-types@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0-beta.46.tgz#3c26def3c4027d5c0c3f98c3b6f161c715ab7fff"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0-beta.54.tgz#3612fa3935e60df6eaae66a33d24fc31b58cc919"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/plugin-syntax-flow" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/plugin-syntax-flow" "7.0.0-beta.54"
"@babel/plugin-transform-for-of@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-beta.46.tgz#ce643487384c96d1bd1f57a112b2ccba6c34da5c"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-beta.54.tgz#261d2992058a9e09234b9ff67820054ffc55f79c"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-function-name@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.46.tgz#2479f5188de9ab1f99396bce83b3b9d39bc13bdb"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.54.tgz#cc722f9973931337def3d1e6c55138581edd371e"
dependencies:
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-literals@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.46.tgz#84f5bcfe914b9fd4385c0ddf469f9ed403ee68bd"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.54.tgz#70f07ecc2f3b7bc9f542a578e82eec18a5504098"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-modules-commonjs@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.46.tgz#9dcb42e1282b281c1a2075f98b4a850533acfd9c"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.54.tgz#07d912a7a24dad2d9bf5d44ce322ddc457a8db37"
dependencies:
- "@babel/helper-module-transforms" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/helper-simple-access" "7.0.0-beta.46"
+ "@babel/helper-module-transforms" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/helper-simple-access" "7.0.0-beta.54"
"@babel/plugin-transform-object-assign@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.0.0-beta.46.tgz#1c790649542994e1b5261e3fec70ecadb14b0bb5"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.0.0-beta.54.tgz#cdb70b4219981fb22ca64014a232135918a415be"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-parameters@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.46.tgz#33bbd2e3bd499d99016034dcaf8c6b72c2a69ec3"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.54.tgz#76306f19b9acac6cf13721af15ecb9f382864ff7"
dependencies:
- "@babel/helper-call-delegate" "7.0.0-beta.46"
- "@babel/helper-get-function-arity" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-call-delegate" "7.0.0-beta.54"
+ "@babel/helper-get-function-arity" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-react-display-name@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0-beta.46.tgz#2ad4a6c63ff67cb90f3199ff41061bcd7b6f5e7c"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0-beta.54.tgz#87cb6a2bbc25db16fad7f6ec86a10787f482118c"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-react-jsx-source@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0-beta.46.tgz#5777f7bbfb6a13417896c5294d64aa5fc593f586"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0-beta.54.tgz#1d6eee65ff772fb002b995e538c0c9615ed6a3f7"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/plugin-syntax-jsx" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/plugin-syntax-jsx" "7.0.0-beta.54"
"@babel/plugin-transform-react-jsx@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0-beta.46.tgz#9aa0c491ced30a0d1a8414da2d45462c66912d1e"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0-beta.54.tgz#7e9b6a624b6406d438b44a8fad23d437a7613b66"
dependencies:
- "@babel/helper-builder-react-jsx" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
- "@babel/plugin-syntax-jsx" "7.0.0-beta.46"
+ "@babel/helper-builder-react-jsx" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
+ "@babel/plugin-syntax-jsx" "7.0.0-beta.54"
"@babel/plugin-transform-regenerator@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-beta.46.tgz#875ceb5b37ec0e898c23b60af760715d9d462b4f"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-beta.54.tgz#8b46e192f3bfe096bbbf86e27764e7662e5f9a0f"
dependencies:
- regenerator-transform "^0.12.3"
+ regenerator-transform "^0.13.3"
"@babel/plugin-transform-shorthand-properties@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.46.tgz#aa21512b0fef7b916fc5cbc87df717465c25515c"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.54.tgz#50e73c2afc5898b1055510ddf60ee13a6301517f"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-spread@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.46.tgz#48eabb219f1e0c16e9b0a6166072ae9d4c7cd397"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.54.tgz#4f0852df0f4b1db2426c40facd8fe5f028a3dbc9"
dependencies:
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/plugin-transform-template-literals@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-beta.46.tgz#e8bcc798dece29807893e8ee27ccf3176f658c62"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-beta.54.tgz#cb1f6303cafb8442a6c6c69a0dfbb60699f327bc"
dependencies:
- "@babel/helper-annotate-as-pure" "7.0.0-beta.46"
- "@babel/helper-plugin-utils" "7.0.0-beta.46"
+ "@babel/helper-annotate-as-pure" "7.0.0-beta.54"
+ "@babel/helper-plugin-utils" "7.0.0-beta.54"
"@babel/register@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0-beta.46.tgz#695629b28902b832be02b418c96e17e6b099e9d5"
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0-beta.54.tgz#108284ab394788cb86687087871ad8e949abefb8"
dependencies:
- core-js "^2.5.3"
+ core-js "^2.5.7"
find-cache-dir "^1.0.0"
home-or-tmp "^3.0.0"
- lodash "^4.2.0"
+ lodash "^4.17.5"
mkdirp "^0.5.1"
- pirates "^3.0.1"
+ pirates "^4.0.0"
source-map-support "^0.4.2"
-"@babel/template@7.0.0-beta.46", "@babel/template@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.46.tgz#8b23982411d5b5dbfa479437bfe414adb1411bb9"
- dependencies:
- "@babel/code-frame" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- babylon "7.0.0-beta.46"
- lodash "^4.2.0"
-
-"@babel/traverse@7.0.0-beta.46", "@babel/traverse@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.46.tgz#29a0c0395b3642f0297e6f8e475bde89f9343755"
- dependencies:
- "@babel/code-frame" "7.0.0-beta.46"
- "@babel/generator" "7.0.0-beta.46"
- "@babel/helper-function-name" "7.0.0-beta.46"
- "@babel/helper-split-export-declaration" "7.0.0-beta.46"
- "@babel/types" "7.0.0-beta.46"
- babylon "7.0.0-beta.46"
+"@babel/template@7.0.0-beta.54", "@babel/template@^7.0.0-beta":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.54.tgz#d5b0d2d2d55c0e78b048c61a058f36cfd7d91af3"
+ dependencies:
+ "@babel/code-frame" "7.0.0-beta.54"
+ "@babel/parser" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
+ lodash "^4.17.5"
+
+"@babel/traverse@7.0.0-beta.54", "@babel/traverse@^7.0.0-beta":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.54.tgz#2c17f98dcdbf19aa918fde128f0e1a0bc089e05a"
+ dependencies:
+ "@babel/code-frame" "7.0.0-beta.54"
+ "@babel/generator" "7.0.0-beta.54"
+ "@babel/helper-function-name" "7.0.0-beta.54"
+ "@babel/helper-split-export-declaration" "7.0.0-beta.54"
+ "@babel/parser" "7.0.0-beta.54"
+ "@babel/types" "7.0.0-beta.54"
debug "^3.1.0"
globals "^11.1.0"
- invariant "^2.2.0"
- lodash "^4.2.0"
+ lodash "^4.17.5"
-"@babel/types@7.0.0-beta.46", "@babel/types@^7.0.0-beta":
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.46.tgz#eb84399a699af9fcb244440cce78e1acbeb40e0c"
+"@babel/types@7.0.0-beta.54", "@babel/types@^7.0.0-beta":
+ version "7.0.0-beta.54"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.54.tgz#025ad68492fed542c13f14c579a44c848e531063"
dependencies:
esutils "^2.0.2"
- lodash "^4.2.0"
+ lodash "^4.17.5"
to-fast-properties "^2.0.0"
abab@^1.0.3:
@@ -558,8 +562,8 @@ aproba@^1.0.3:
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
arch@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.0.tgz#3613aa46149064b3c1f0607919bf1d4786e82889"
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e"
are-we-there-yet@~1.1.2:
version "1.1.4"
@@ -1430,14 +1434,14 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26
lodash "^4.17.4"
to-fast-properties "^1.0.3"
-babylon@7.0.0-beta.46, babylon@^7.0.0-beta:
- version "7.0.0-beta.46"
- resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.46.tgz#b6ddaba81bbb130313932757ff9c195d527088b6"
-
babylon@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+babylon@^7.0.0-beta:
+ version "7.0.0-beta.47"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.47.tgz#6d1fa44f0abec41ab7c780481e62fd9aafbdea80"
+
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
@@ -1798,10 +1802,14 @@ core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
-core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.3:
+core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0:
version "2.5.6"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d"
+core-js@^2.5.7:
+ version "2.5.7"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
+
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -1814,6 +1822,13 @@ create-react-class@^15.6.3:
loose-envify "^1.3.1"
object-assign "^4.1.1"
+create-react-context@^0.2.1:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
+ dependencies:
+ fbjs "^0.8.0"
+ gud "^1.0.0"
+
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -2198,6 +2213,18 @@ fbjs-scripts@^0.8.1:
semver "^5.1.0"
through2 "^2.0.0"
+fbjs@^0.8.0:
+ version "0.8.17"
+ resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
+ dependencies:
+ core-js "^1.0.0"
+ isomorphic-fetch "^2.1.1"
+ loose-envify "^1.0.0"
+ object-assign "^4.1.0"
+ promise "^7.1.1"
+ setimmediate "^1.0.5"
+ ua-parser-js "^0.7.18"
+
fbjs@^0.8.14, fbjs@^0.8.16, fbjs@^0.8.9:
version "0.8.16"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
@@ -2424,6 +2451,10 @@ growly@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
+gud@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
+
handlebars@^4.0.3:
version "4.0.11"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
@@ -2507,6 +2538,10 @@ hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
+hoist-non-react-statics@^2.5.0:
+ version "2.5.5"
+ resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
+
home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -2621,7 +2656,7 @@ inquirer@^3.0.6:
strip-ansi "^4.0.0"
through "^2.3.6"
-invariant@^2.2.0, invariant@^2.2.2:
+invariant@^2.2.2:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
dependencies:
@@ -3365,7 +3400,7 @@ lodash@^3.5.0:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
+lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@@ -3676,13 +3711,13 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"
-mobx-react@^4.2.1, mobx-react@^4.3.4:
+mobx-react@^4.2.1:
version "4.4.3"
resolved "https://registry.yarnpkg.com/mobx-react/-/mobx-react-4.4.3.tgz#baa9ec41165ee35ae7b9df19bca10190f36f117e"
dependencies:
hoist-non-react-statics "^2.3.1"
-mobx@^3.2.1, mobx@^3.3.1:
+mobx@^3.2.1:
version "3.6.2"
resolved "https://registry.yarnpkg.com/mobx/-/mobx-3.6.2.tgz#fb9f5ff5090539a1ad54e75dc4c098b602693320"
@@ -4109,9 +4144,9 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
-pirates@^3.0.1:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/pirates/-/pirates-3.0.2.tgz#7e6f85413fd9161ab4e12b539b06010d85954bb9"
+pirates@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.0.tgz#850b18781b4ac6ec58a43c9ed9ec5fe6796addbd"
dependencies:
node-modules-regexp "^1.0.0"
@@ -4197,6 +4232,13 @@ prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0:
loose-envify "^1.3.1"
object-assign "^4.1.1"
+prop-types@^15.6.1:
+ version "15.6.2"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
+ dependencies:
+ loose-envify "^1.3.1"
+ object-assign "^4.1.1"
+
prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
@@ -4213,6 +4255,13 @@ qs@~6.5.1:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+query-string@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
+ dependencies:
+ decode-uri-component "^0.2.0"
+ strict-uri-encode "^2.0.0"
+
randomatic@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923"
@@ -4253,9 +4302,9 @@ react-is@^16.3.2:
version "16.3.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22"
-react-lifecycles-compat@^1.0.2:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-1.1.4.tgz#fc005c72849b7ed364de20a0f64ff58ebdc2009a"
+react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
react-native-button@^2.0.0:
version "2.3.0"
@@ -4283,17 +4332,15 @@ 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@4.0.0-beta.31:
- version "4.0.0-beta.31"
- resolved "https://registry.yarnpkg.com/react-native-router-flux/-/react-native-router-flux-4.0.0-beta.31.tgz#edea28cbac705fbb324ae8f5eb136dc0bef1e1e8"
+"react-native-router-flux@github:aksonov/react-native-router-flux#1fafbc5fc0b69d672b24b79aa5e8c0787ac2dfff":
+ version "4.0.0-beta.32"
+ resolved "https://codeload.github.com/aksonov/react-native-router-flux/tar.gz/1fafbc5fc0b69d672b24b79aa5e8c0787ac2dfff"
dependencies:
lodash.isequal "^4.5.0"
- mobx "^3.3.1"
- mobx-react "^4.3.4"
opencollective "^1.0.3"
path-to-regexp "^2.1.0"
prop-types "^15.6.0"
- react-navigation "1.5.8"
+ react-navigation "^2.8.0"
react-native-safe-area-view@^0.7.0:
version "0.7.0"
@@ -4301,12 +4348,24 @@ react-native-safe-area-view@^0.7.0:
dependencies:
hoist-non-react-statics "^2.3.1"
-"react-native-tab-view@github:react-navigation/react-native-tab-view":
- version "0.0.74"
- resolved "https://codeload.github.com/react-navigation/react-native-tab-view/tar.gz/36ebd834d78b841fc19778c966465d02fd1213bb"
+react-native-safe-area-view@^0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.8.0.tgz#22d78cb8e8658d04a10cd53c1546e0bc86cb7aea"
+ dependencies:
+ hoist-non-react-statics "^2.3.1"
+
+react-native-tab-view@^0.0.77:
+ version "0.0.77"
+ resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
dependencies:
prop-types "^15.6.0"
+react-native-tab-view@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.0.2.tgz#66e0bc6d38a227ed2b212e3a256b7902f6ce02ed"
+ dependencies:
+ prop-types "^15.6.1"
+
react-native@0.55.4:
version "0.55.4"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.55.4.tgz#eecffada3750a928e2ddd07cf11d857ae9751c30"
@@ -4371,18 +4430,42 @@ react-native@0.55.4:
xmldoc "^0.4.0"
yargs "^9.0.0"
-react-navigation@1.5.8:
- version "1.5.8"
- resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-1.5.8.tgz#f04bec1a39af8cfcf651337d351e8d0a144f1b6d"
+react-navigation-deprecated-tab-navigator@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7"
+ dependencies:
+ react-native-tab-view "^0.0.77"
+
+react-navigation-drawer@0.4.3:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.4.3.tgz#c04c94e2429b7e724801af05bd0a93a79cb27f71"
+ dependencies:
+ react-native-drawer-layout-polyfill "^1.3.2"
+
+react-navigation-tabs@0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.5.1.tgz#ed33bce3a3e21b92646700de25bd94b8fc570371"
+ dependencies:
+ hoist-non-react-statics "^2.5.0"
+ prop-types "^15.6.1"
+ react-lifecycles-compat "^3.0.4"
+ react-native-safe-area-view "^0.7.0"
+ react-native-tab-view "^1.0.0"
+
+react-navigation@^2.8.0:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.8.0.tgz#c7f07a8d97ac99fa872e655783ad0a71563a9094"
dependencies:
clamp "^1.0.1"
+ create-react-context "^0.2.1"
hoist-non-react-statics "^2.2.0"
path-to-regexp "^1.7.0"
- prop-types "^15.5.10"
- react-lifecycles-compat "^1.0.2"
- react-native-drawer-layout-polyfill "^1.3.2"
- react-native-safe-area-view "^0.7.0"
- react-native-tab-view "github:react-navigation/react-native-tab-view"
+ query-string "^6.1.0"
+ react-lifecycles-compat "^3"
+ react-native-safe-area-view "^0.8.0"
+ react-navigation-deprecated-tab-navigator "1.3.0"
+ react-navigation-drawer "0.4.3"
+ react-navigation-tabs "0.5.1"
react-proxy@^1.1.7:
version "1.1.8"
@@ -4482,9 +4565,9 @@ regenerator-transform@^0.10.0:
babel-types "^6.19.0"
private "^0.1.6"
-regenerator-transform@^0.12.3:
- version "0.12.3"
- resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.12.3.tgz#459adfb64f6a27164ab991b7873f45ab969eca8b"
+regenerator-transform@^0.13.3:
+ version "0.13.3"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb"
dependencies:
private "^0.1.6"
@@ -4930,6 +5013,10 @@ stream-buffers@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
+strict-uri-encode@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
+
string-length@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac"
@@ -5137,7 +5224,7 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-ua-parser-js@^0.7.9:
+ua-parser-js@^0.7.18, ua-parser-js@^0.7.9:
version "0.7.18"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed"
@@ -5284,12 +5371,18 @@ which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
-which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0:
+which@^1.2.12, which@^1.2.9, which@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
isexe "^2.0.0"
+which@^1.2.14:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ dependencies:
+ isexe "^2.0.0"
+
wide-align@^1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
diff --git a/dist/LightboxNavigator.js b/dist/LightboxNavigator.js
index 7739ad870..c10c88395 100644
--- a/dist/LightboxNavigator.js
+++ b/dist/LightboxNavigator.js
@@ -5,39 +5,55 @@ var _reactNavigation=require('react-navigation');
var _reactNative=require('react-native');
var _navigationStore=require('./navigationStore');var _navigationStore2=_interopRequireDefault(_navigationStore);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
-var LightboxNavigator=function LightboxNavigator(
-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
+var NavigationView=function NavigationView(_ref){var navigation=_ref.navigation,screenProps=_ref.screenProps,navigationConfig=_ref.navigationConfig,descriptors=_ref.descriptors;var
state=navigation.state,dispatch=navigation.dispatch;var
routes=state.routes,index=state.index;
+console.log('DATA:',JSON.stringify(navigationConfig));
+return _react2.default.createElement(_reactNative.View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:13}});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-var Component=routeConfigs[tabsConfig.initialRouteName].screen;
-var initialIndex=0;
-for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:{};
+var router=(0,_reactNavigation.TabRouter)(routeConfigs,tabsConfig);
+
+return(0,_reactNavigation.createNavigator)(NavigationView,router,tabsConfig);
};exports.default=
LightboxNavigator;
\ No newline at end of file
diff --git a/dist/NavBar.js b/dist/NavBar.js
index 5801506e5..4ada505cf 100644
--- a/dist/NavBar.js
+++ b/dist/NavBar.js
@@ -5,14 +5,6 @@ Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.ass
-
-
-
-
-
-
-
-
BackButton=BackButton;exports.
@@ -34,37 +26,6 @@ BackButton=BackButton;exports.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -135,25 +96,7 @@ LeftButton=LeftButton;exports.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-RightButton=RightButton;var _react=require('react');var _react2=_interopRequireDefault(_react);var _reactNavigation=require('react-navigation');var _reactNative=require('react-native');var _navigationStore=require('./navigationStore');var _navigationStore2=_interopRequireDefault(_navigationStore);var _back_chevron=require('../images/back_chevron.png');var _back_chevron2=_interopRequireDefault(_back_chevron);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var hitSlop={top:15,bottom:15,left:15,right:15};function BackButton(state){var textButtonStyle=[styles.barBackButtonText,state.backButtonTextStyle];var style=[styles.backButton,state.leftButtonStyle];var buttonImage=state.backButtonImage||_back_chevron2.default;var tintColor=getValue(state.backButtonTintColor,state)||state.tintColor||state.navBarButtonColor||state.headerTintColor;var onPress=state.onBack;if(onPress){onPress=onPress.bind(null,state);}else{onPress=_navigationStore2.default.pop;}if(!state.backButtonImage){return _react2.default.createElement(_reactNavigation.HeaderBackButton,{onPress:onPress,title:state.backTitle,titleStyle:textButtonStyle,tintColor:tintColor,truncatedTitle:state.truncatedTitle,__source:{fileName:_jsxFileName,lineNumber:38}});}var text=state.backTitle?_react2.default.createElement(_reactNative.Text,{style:textButtonStyle,__source:{fileName:_jsxFileName,lineNumber:49}},state.backTitle):null;return _react2.default.createElement(_reactNative.TouchableOpacity,{testID:'backNavButton',style:styles.backButtonContainer,onPress:onPress,__source:{fileName:_jsxFileName,lineNumber:55}},_react2.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:60}},buttonImage&&!state.hideBackImage&&_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[styles.backButtonImage,state.barButtonIconStyle,state.leftButtonIconStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:61}}),text));}function LeftButton(state){var onPress=state.onLeft;var buttonImage=getValue(state.leftButtonImage,state);var menuIcon=getValue(state.drawerIcon,state);var style=[styles.leftButton,state.leftButtonStyle];var leftButtonTextStyle=getValue(state.leftButtonTextStyle,state);var leftButtonIconStyle=getValue(state.leftButtonIconStyle,state);var leftButtonStyle=[styles.defaultImageStyle,leftButtonIconStyle];var leftTitle=state.getLeftTitle?state.getLeftTitle(state):getValue(state.leftTitle,state);var textColor=getValue(state.leftButtonTintColor,state);var tintColor=textColor||state.tintColor||state.navBarButtonColor||state.headerTintColor;var textStyle=[styles.barLeftButtonText,tintColor&&{color:tintColor},leftButtonTextStyle,textColor&&{color:textColor}];if(state.leftButton||state.left){var Button=state.leftButton||state.left;return _react2.default.createElement(Button,_extends({},state,{key:'leftNavBarBtn',testID:'leftNavButton',style:[].concat(style,leftButtonStyle),textStyle:textStyle,__source:{fileName:_jsxFileName,lineNumber:93}}));}if(!onPress&&!state.hideDrawerButton&&(state.drawerImage||menuIcon)&&state.drawerPosition!=='right'){buttonImage=state.drawerImage;if(buttonImage||menuIcon){onPress=_navigationStore2.default.drawerOpen;}if(!menuIcon){menuIcon=_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[state.leftButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:110}});}}if(onPress&&(leftTitle||buttonImage||menuIcon)){onPress=onPress.bind(null,state);return _react2.default.createElement(_reactNative.TouchableOpacity,{key:'leftNavBarBtn',testID:'leftNavButton',style:style,onPress:onPress,hitSlop:state.hitSlop||hitSlop,__source:{fileName:_jsxFileName,lineNumber:121}},leftTitle&&_react2.default.createElement(_reactNative.Text,{style:textStyle,__source:{fileName:_jsxFileName,lineNumber:128}},leftTitle),!leftTitle&&(menuIcon||buttonImage)&&_react2.default.createElement(_reactNative.View,{style:{flex:1,justifyContent:'center',alignItems:'flex-start'},__source:{fileName:_jsxFileName,lineNumber:132}},menuIcon||_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[state.leftButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:133}})));}if(!!state.onLeft^!!(leftTitle||buttonImage||menuIcon)){console.warn('Both onLeft and leftTitle/leftButtonImage\n must be specified for the scene: '+state.name);}return null;}function getValue(value,params){return value instanceof Function?value(params):value;}function RightButton(state){
+RightButton=RightButton;var _react=require('react');var _react2=_interopRequireDefault(_react);var _reactNavigation=require('react-navigation');var _reactNative=require('react-native');var _navigationStore=require('./navigationStore');var _navigationStore2=_interopRequireDefault(_navigationStore);var _back_chevron=require('../images/back_chevron.png');var _back_chevron2=_interopRequireDefault(_back_chevron);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var hitSlop={top:15,bottom:15,left:15,right:15};function BackButton(state){var textButtonStyle=[styles.barBackButtonText,state.backButtonTextStyle];var style=[styles.backButton,state.leftButtonStyle];var buttonImage=state.backButtonImage||_back_chevron2.default;var tintColor=getValue(state.backButtonTintColor,state)||state.tintColor||state.navBarButtonColor||state.headerTintColor;var onPress=state.onBack;if(onPress){onPress=onPress.bind(null,state);}else{onPress=_navigationStore2.default.pop;}if(!state.backButtonImage){return _react2.default.createElement(_reactNavigation.HeaderBackButton,{onPress:onPress,title:state.backTitle,titleStyle:textButtonStyle,tintColor:tintColor,truncatedTitle:state.truncatedTitle,__source:{fileName:_jsxFileName,lineNumber:23}});}var text=state.backTitle?_react2.default.createElement(_reactNative.Text,{style:textButtonStyle,__source:{fileName:_jsxFileName,lineNumber:26}},state.backTitle):null;return _react2.default.createElement(_reactNative.TouchableOpacity,{testID:'backNavButton',style:styles.backButtonContainer,onPress:onPress,__source:{fileName:_jsxFileName,lineNumber:29}},_react2.default.createElement(_reactNative.View,{style:style,__source:{fileName:_jsxFileName,lineNumber:30}},buttonImage&&!state.hideBackImage&&_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[styles.backButtonImage,state.barButtonIconStyle,state.leftButtonIconStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:31}}),text));}function LeftButton(state){var onPress=state.onLeft;var buttonImage=getValue(state.leftButtonImage,state);var menuIcon=getValue(state.drawerIcon,state);var style=[styles.leftButton,state.leftButtonStyle];var leftButtonTextStyle=getValue(state.leftButtonTextStyle,state);var leftButtonIconStyle=getValue(state.leftButtonIconStyle,state);var leftButtonStyle=[styles.defaultImageStyle,leftButtonIconStyle];var leftTitle=state.getLeftTitle?state.getLeftTitle(state):getValue(state.leftTitle,state);var textColor=getValue(state.leftButtonTintColor,state);var tintColor=textColor||state.tintColor||state.navBarButtonColor||state.headerTintColor;var textStyle=[styles.barLeftButtonText,tintColor&&{color:tintColor},leftButtonTextStyle,textColor&&{color:textColor}];if(state.leftButton||state.left){var Button=state.leftButton||state.left;return _react2.default.createElement(Button,_extends({},state,{key:'leftNavBarBtn',testID:'leftNavButton',style:[].concat(style,leftButtonStyle),textStyle:textStyle,__source:{fileName:_jsxFileName,lineNumber:53}}));}if(!onPress&&!state.hideDrawerButton&&(state.drawerImage||menuIcon)&&state.drawerPosition!=='right'){buttonImage=state.drawerImage;if(buttonImage||menuIcon){onPress=_navigationStore2.default.drawerOpen;}if(!menuIcon){menuIcon=_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[state.leftButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:62}});}}if(onPress&&(leftTitle||buttonImage||menuIcon)){onPress=onPress.bind(null,state);return _react2.default.createElement(_reactNative.TouchableOpacity,{key:'leftNavBarBtn',testID:'leftNavButton',style:style,onPress:onPress,hitSlop:state.hitSlop||hitSlop,__source:{fileName:_jsxFileName,lineNumber:69}},leftTitle&&_react2.default.createElement(_reactNative.Text,{style:textStyle,__source:{fileName:_jsxFileName,lineNumber:70}},leftTitle),!leftTitle&&(menuIcon||buttonImage)&&_react2.default.createElement(_reactNative.View,{style:{flex:1,justifyContent:'center',alignItems:'flex-start'},__source:{fileName:_jsxFileName,lineNumber:73}},menuIcon||_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[state.leftButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:80}})));}if(!!state.onLeft^!!(leftTitle||buttonImage||menuIcon)){console.warn('Both onLeft and leftTitle/leftButtonImage\n must be specified for the scene: '+state.name);}return null;}function getValue(value,params){return value instanceof Function?value(params):value;}function RightButton(state){
if(!state){
return null;
}
@@ -172,15 +115,7 @@ var textStyle=[styles.barRightButtonText,tintColor&&{color:tintColor},rightButto
if(state.rightButton||state.right){
var Button=state.rightButton||state.right;
-return(
-_react2.default.createElement(Button,_extends({},
-state,{
-key:'rightNavBarBtn',
-testID:'rightNavButton',
-style:style,
-textButtonStyle:textStyle,__source:{fileName:_jsxFileName,lineNumber:176}})));
-
-
+return _react2.default.createElement(Button,_extends({},state,{key:'rightNavBarBtn',testID:'rightNavButton',style:style,textButtonStyle:textStyle,__source:{fileName:_jsxFileName,lineNumber:118}}));
}
if(!onPress&&!state.hideDrawerButton&&state.drawerImage&&state.drawerPosition==='right'){
@@ -189,42 +124,31 @@ if(buttonImage||menuIcon){
onPress=_navigationStore2.default.drawerOpen;
}
if(!menuIcon){
-menuIcon=
-_react2.default.createElement(_reactNative.Image,{
-source:buttonImage,
-style:[rightButtonStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:193}});
-
-
+menuIcon=_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[rightButtonStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:127}});
}
}
if(onPress&&(rightTitle||buttonImage)){
onPress=onPress.bind(null,state);
return(
-_react2.default.createElement(_reactNative.TouchableOpacity,{
-key:'rightNavBarBtn',
-testID:'rightNavButton',
-style:style,
-onPress:onPress,
-hitSlop:state.hitSlop||hitSlop,__source:{fileName:_jsxFileName,lineNumber:204}},
-
-rightTitle&&_react2.default.createElement(_reactNative.Text,{style:textStyle,__source:{fileName:_jsxFileName,lineNumber:211}},
-rightTitle),
-
-
-!rightTitle&&buttonImage&&_react2.default.createElement(_reactNative.View,{style:{flex:1,justifyContent:'center',alignItems:'flex-end'},__source:{fileName:_jsxFileName,lineNumber:215}},
-menuIcon||_react2.default.createElement(_reactNative.Image,{
-source:buttonImage,
-style:[state.rightButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:216}}))));
+_react2.default.createElement(_reactNative.TouchableOpacity,{key:'rightNavBarBtn',testID:'rightNavButton',style:style,onPress:onPress,hitSlop:state.hitSlop||hitSlop,__source:{fileName:_jsxFileName,lineNumber:134}},
+rightTitle&&_react2.default.createElement(_reactNative.Text,{style:textStyle,__source:{fileName:_jsxFileName,lineNumber:135}},rightTitle),
+!rightTitle&&
+buttonImage&&
+_react2.default.createElement(_reactNative.View,{
+style:{
+flex:1,
+justifyContent:'center',
+alignItems:'flex-end'},__source:{fileName:_jsxFileName,lineNumber:138}},
+menuIcon||_react2.default.createElement(_reactNative.Image,{source:buttonImage,style:[state.rightButtonIconStyle||styles.defaultImageStyle,{tintColor:tintColor}],__source:{fileName:_jsxFileName,lineNumber:145}}))));
}
-if(!!state.onRight^!!(typeof rightTitle!=='undefined'||
-typeof buttonImage!=='undefined')){
+if(!!state.onRight^!!(typeof rightTitle!=='undefined'||typeof buttonImage!=='undefined')){
console.warn('Both onRight and rightTitle/rightButtonImage\n must be specified for the scene: '+
state.routeName);
@@ -245,8 +169,7 @@ width:180,
alignSelf:'center'},
titleWrapper:_extends({
-marginTop:10,
-position:'absolute'},
+marginTop:10},
_reactNative.Platform.select({
ios:{
top:20},
@@ -255,16 +178,13 @@ android:{
top:5},
windows:{
-top:5}}),{
+top:5}})),
-left:0,
-right:0}),
header:_extends({
backgroundColor:'#EFEFF2',
-paddingTop:0,
-top:0},
+paddingTop:0},
_reactNative.Platform.select({
ios:{
height:64},
@@ -276,14 +196,10 @@ windows:{
height:54}}),{
-right:0,
-left:0,
borderBottomWidth:0.5,
-borderBottomColor:'#828287',
-position:'absolute'}),
+borderBottomColor:'#828287'}),
-backButton:_extends({
-position:'absolute'},
+backButton:_extends({},
_reactNative.Platform.select({
ios:{
top:12},
@@ -300,37 +216,13 @@ paddingLeft:8,
flexDirection:'row',
transform:[{scaleX:_reactNative.I18nManager.isRTL?-1:1}]}),
-rightButton:_extends({},
-_reactNative.Platform.select({
-ios:{
-position:'absolute',
-top:12},
-
-android:{
-top:0},
-
-windows:{
-top:8}}),{
-
-
+rightButton:{
right:2,
-paddingRight:8}),
-
-leftButton:_extends({},
-_reactNative.Platform.select({
-ios:{
-position:'absolute',
-top:12},
-
-android:{
-top:0},
-
-windows:{
-top:8}}),{
-
+paddingRight:8},
+leftButton:{
left:2,
-paddingLeft:8}),
+paddingLeft:8},
barRightButtonText:{
color:'rgb(0, 122, 255)',
@@ -348,16 +240,9 @@ color:'rgb(0, 122, 255)',
textAlign:'left',
fontSize:17},
-backButtonContainer:_extends({},
-_reactNative.Platform.select({
-ios:{
-position:'absolute',
-top:0,
-left:0}}),{
-
-
+backButtonContainer:{
height:50,
-width:70}),
+width:70},
backButtonImage:_extends({},
_reactNative.Platform.select({
diff --git a/dist/Reducer.js b/dist/Reducer.js
index 0c98eca15..fed1ea685 100644
--- a/dist/Reducer.js
+++ b/dist/Reducer.js
@@ -75,6 +75,9 @@ reducer=reducer;exports.default=
-createReducer;var _lodash=require('lodash.isequal');var _lodash2=_interopRequireDefault(_lodash);var _navigationStore=require('./navigationStore');var _navigationStore2=_interopRequireDefault(_navigationStore);var _ActionConst=require('./ActionConst');var ActionConst=_interopRequireWildcard(_ActionConst);var _reactNavigation=require('react-navigation');var _State=require('./State');function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj.default=obj;return newObj;}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var supportedActions=exports.supportedActions=(_supportedActions={},_defineProperty(_supportedActions,ActionConst.PUSH,_reactNavigation.NavigationActions.NAVIGATE),_defineProperty(_supportedActions,ActionConst.BACK,_reactNavigation.NavigationActions.BACK),_defineProperty(_supportedActions,ActionConst.REFRESH,_reactNavigation.NavigationActions.BACK),_defineProperty(_supportedActions,ActionConst.RESET,_reactNavigation.NavigationActions.RESET),_supportedActions);var createAction=function createAction(type){return function(){var payload=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return _extends({type:type},payload);};};function reducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_navigationStore2.default.state;var action=arguments[1];var type=action.type;var routeName=action.routeName;if(supportedActions[type]){var newState=_navigationStore2.default.router.getStateForAction(createAction(supportedActions[type])({routeName:routeName,params:action.params}),state);return newState||state;}if(type===ActionConst.JUMP){var _newState=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:routeName,params:action.params}),state);var activeState=(0,_State.getActiveState)(state);if(activeState.routeName==='DrawerOpen'){activeState=(0,_State.getActiveStateExceptDrawer)(state);if((0,_State.isActiveRoute)(state,routeName)){return _navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:'DrawerClose'}),state);}}if((0,_State.isActiveRoute)(state,routeName)){return state;}var key=(0,_State.getActiveState)(_newState).key;return _navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.setParams({key:key,params:action.params}),_newState);}else if(type===ActionConst.POP_TO){var nextScene='';var _newState2=state;var currentState=state;var initialState=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.popToTop(),currentState);while(_newState2&&nextScene!==routeName){_newState2=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.back(),currentState);if(_newState2){nextScene=(0,_State.getActiveState)(_newState2).routeName;if(nextScene!==routeName){currentState=_newState2;}if((0,_lodash2.default)(currentState,initialState)){break;}}}return nextScene===routeName?_newState2:state;}else if(type===ActionConst.REPLACE){var _newState3=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:routeName,params:action.params}),state);return(0,_State.popPrevious)(_newState3);}return _navigationStore2.default.router.getStateForAction(action,state)||state;}function createReducer(){
+
+
+
+createReducer;var _lodash=require('lodash.isequal');var _lodash2=_interopRequireDefault(_lodash);var _navigationStore=require('./navigationStore');var _navigationStore2=_interopRequireDefault(_navigationStore);var _ActionConst=require('./ActionConst');var ActionConst=_interopRequireWildcard(_ActionConst);var _reactNavigation=require('react-navigation');var _State=require('./State');function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj.default=obj;return newObj;}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}var supportedActions=exports.supportedActions=(_supportedActions={},_defineProperty(_supportedActions,ActionConst.PUSH,_reactNavigation.NavigationActions.NAVIGATE),_defineProperty(_supportedActions,ActionConst.BACK,_reactNavigation.NavigationActions.BACK),_defineProperty(_supportedActions,ActionConst.REFRESH,_reactNavigation.NavigationActions.BACK),_defineProperty(_supportedActions,ActionConst.RESET,_reactNavigation.NavigationActions.RESET),_supportedActions);var createAction=function createAction(type){return function(){var payload=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return _extends({type:type},payload);};};function reducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_navigationStore2.default.state;var action=arguments[1];var type=action.type;var routeName=action.routeName;if(supportedActions[type]){var newState=_navigationStore2.default.router.getStateForAction(createAction(supportedActions[type])({routeName:routeName,params:action.params}),state);return newState||state;}if(type===ActionConst.JUMP){var _newState=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:routeName,params:action.params}),state);var activeState=(0,_State.getActiveState)(state);if(activeState.routeName==='DrawerOpen'){activeState=(0,_State.getActiveStateExceptDrawer)(state);if((0,_State.isActiveRoute)(state,routeName)){return _navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:'DrawerClose'}),state);}}if((0,_State.isActiveRoute)(state,routeName)){return state;}var key=(0,_State.getActiveState)(_newState).key;return _navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.setParams({key:key,params:action.params}),_newState);}else if(type===ActionConst.POP_TO){var nextScene='';var _newState2=state;var currentState=state;var initialState=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.popToTop(),currentState);while(_newState2&&nextScene!==routeName){_newState2=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.back(),currentState);if(_newState2){nextScene=(0,_State.getActiveState)(_newState2).routeName;if(nextScene!==routeName){currentState=_newState2;}if((0,_lodash2.default)(currentState,initialState)){console.warn('popTo called with an unknown routeName: '+routeName);break;}}}return nextScene===routeName?_newState2:state;}else if(type===ActionConst.REPLACE){var _newState3=_navigationStore2.default.router.getStateForAction(_reactNavigation.NavigationActions.navigate({routeName:routeName,params:action.params}),state);return(0,_State.popPrevious)(_newState3);}return _navigationStore2.default.router.getStateForAction(action,state)||state;}function createReducer(){
return reducer;
}
\ No newline at end of file
diff --git a/dist/Router.js b/dist/Router.js
index c0e455d4e..d2ae56167 100644
--- a/dist/Router.js
+++ b/dist/Router.js
@@ -1,13 +1,10 @@
-Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var
-
-App=(0,_native.observer)(_class=(_temp2=_class2=function(_React$Component){_inherits(App,_React$Component);function App(){var _ref;var _temp,_this,_ret;_classCallCheck(this,App);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,(_ref=App.__proto__||Object.getPrototypeOf(App)).call.apply(_ref,[this].concat(args))),_this),_this.
+App=(_temp2=_class=function(_React$Component){_inherits(App,_React$Component);function App(){var _ref;var _temp,_this,_ret;_classCallCheck(this,App);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return _ret=(_temp=(_this=_possibleConstructorReturn(this,(_ref=App.__proto__||Object.getPrototypeOf(App)).call.apply(_ref,[this].concat(args))),_this),_this.
@@ -35,19 +32,27 @@ handleDeepURL=function(e){return _this.parseDeepURL(e.url);},_this.
parseDeepURL=function(url){
-if(!url){return;}
+if(!url){
+return;
+}
var cleanUrl=_this.props.uriPrefix?url.split(_this.props.uriPrefix)[1]:url;
-if(!cleanUrl){return;}
+if(!cleanUrl){
+return;
+}
-var allPaths=Object.values(_navigationStore2.default.states).map(function(obj){return obj.path;}).filter(function(path){return path;});
+var allPaths=Object.values(_navigationStore2.default.states).
+map(function(obj){return obj.path;}).
+filter(function(path){return path;});
var parsedPath=(0,_pathParser2.default)(cleanUrl,allPaths);
-if(!parsedPath){return;}var
+if(!parsedPath){
+return;
+}var
path=parsedPath.path,params=parsedPath.params;
@@ -68,10 +73,16 @@ _navigationStore2.default[actionKey](params);
{
var AppNavigator=this.props.navigator;
+console.log('NAVIGATOR:',AppNavigator);
return(
-_react2.default.createElement(AppNavigator,{navigation:(0,_reactNavigation.addNavigationHelpers)({dispatch:_navigationStore2.default.dispatch,state:_navigationStore2.default.state,addListener:_navigationStore2.default.addListener}),__source:{fileName:_jsxFileName,lineNumber:72}}));
+_react2.default.createElement(AppNavigator,{
+onNavigationStateChange:_navigationStore2.default.onNavigationStateChange,
+ref:function ref(navigatorRef){
+_navigationStore2.default.setTopLevelNavigator(navigatorRef);
+},__source:{fileName:_jsxFileName,lineNumber:78}}));
-}}]);return App;}(_react2.default.Component),_class2.propTypes={navigator:_propTypes2.default.func,backAndroidHandler:_propTypes2.default.func,uriPrefix:_propTypes2.default.string,onDeepLink:_propTypes2.default.func},_temp2))||_class;
+
+}}]);return App;}(_react2.default.Component),_class.propTypes={navigator:_propTypes2.default.func,backAndroidHandler:_propTypes2.default.func,uriPrefix:_propTypes2.default.string,onDeepLink:_propTypes2.default.func},_temp2);
var Router=function Router(_ref6){var createReducer=_ref6.createReducer,sceneStyle=_ref6.sceneStyle,scenes=_ref6.scenes,uriPrefix=_ref6.uriPrefix,navigator=_ref6.navigator,getSceneStyle=_ref6.getSceneStyle,children=_ref6.children,state=_ref6.state,dispatch=_ref6.dispatch,onDeepLink=_ref6.onDeepLink,_ref6$wrapBy=_ref6.wrapBy,wrapBy=_ref6$wrapBy===undefined?function(props){return props;}:_ref6$wrapBy,props=_objectWithoutProperties(_ref6,['createReducer','sceneStyle','scenes','uriPrefix','navigator','getSceneStyle','children','state','dispatch','onDeepLink','wrapBy']);
@@ -83,14 +94,7 @@ if(sceneStyle){
data.cardStyle=sceneStyle;
}
var AppNavigator=scenes||navigator||_navigationStore2.default.create(children,data,wrapBy);
-_navigationStore2.default.reducer=createReducer&&createReducer(props);
-if(dispatch&&state){
-
-_navigationStore2.default.setState(state);
-_navigationStore2.default.dispatch=dispatch;
-return _react2.default.createElement(AppNavigator,{navigation:(0,_reactNavigation.addNavigationHelpers)({dispatch:dispatch,state:state,addListener:_navigationStore2.default.addListener}),uriPrefix:uriPrefix,__source:{fileName:_jsxFileName,lineNumber:91}});
-}
-return _react2.default.createElement(App,_extends({},props,{onDeepLink:onDeepLink,navigator:AppNavigator,uriPrefix:uriPrefix,__source:{fileName:_jsxFileName,lineNumber:93}}));
+return _react2.default.createElement(App,_extends({},props,{onDeepLink:onDeepLink,navigator:AppNavigator,uriPrefix:uriPrefix,__source:{fileName:_jsxFileName,lineNumber:97}}));
};
Router.propTypes={
createReducer:_propTypes2.default.func,
diff --git a/dist/navigationStore.js b/dist/navigationStore.js
index 842435a06..712e0f0cf 100644
--- a/dist/navigationStore.js
+++ b/dist/navigationStore.js
@@ -1,23 +1,15 @@
-Object.defineProperty(exports,"__esModule",{value:true});exports.actionMap=undefined;var _createClass=function(){function defineProperties(target,props){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:{};var wrapBy=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(props){return props;};
-(0,_Util.assert)(
-!Array.isArray(scene),
-'Router should contain only one scene, please wrap your scenes with root Scene ');
-
+(0,_Util.assert)(!Array.isArray(scene),'Router should contain only one scene, please wrap your scenes with root Scene ');
RightNavBarButton=wrapBy(_NavBar.RightButton);
LeftNavBarButton=wrapBy(_NavBar.LeftButton);
BackNavBarButton=wrapBy(_NavBar.BackButton);
var AppNavigator=_this2.processScene(scene,params,[],wrapBy);
-_this2.router=AppNavigator.router;
-_this2.dispatch(_reactNavigation.NavigationActions.init());
return AppNavigator;
};this.
@@ -623,25 +513,8 @@ return null;
}
var res={};
var order=[];var _scene$props=
-
-
-
-
-
-
-
-
scene.props,navigator=_scene$props.navigator,contentComponent=_scene$props.contentComponent,drawerWidth=_scene$props.drawerWidth,drawerLockMode=_scene$props.drawerLockMode,lazy=_scene$props.lazy,duration=_scene$props.duration,parentProps=_objectWithoutProperties(_scene$props,['navigator','contentComponent','drawerWidth','drawerLockMode','lazy','duration']);var
-
-tabs=
-
-
-
-
-
-
-
-parentProps.tabs,modal=parentProps.modal,lightbox=parentProps.lightbox,overlay=parentProps.overlay,tabBarPosition=parentProps.tabBarPosition,drawer=parentProps.drawer,tabBarComponent=parentProps.tabBarComponent,transitionConfig=parentProps.transitionConfig;
+tabs=parentProps.tabs,modal=parentProps.modal,lightbox=parentProps.lightbox,overlay=parentProps.overlay,tabBarPosition=parentProps.tabBarPosition,drawer=parentProps.drawer,tabBarComponent=parentProps.tabBarComponent,transitionConfig=parentProps.transitionConfig;
if(scene.type===_Modal2.default){
modal=true;
}else if(scene.type===_Drawer2.default){
@@ -669,10 +542,7 @@ delete commonProps.children;
delete commonProps.component;
for(var _iterator4=Object.keys(commonProps),_isArray4=Array.isArray(_iterator4),_i5=0,_iterator4=_isArray4?_iterator4:_iterator4[typeof Symbol==='function'?typeof Symbol==='function'?typeof Symbol==='function'?Symbol.iterator:'@@iterator':'@@iterator':'@@iterator']();;){var _ref8;if(_isArray4){if(_i5>=_iterator4.length)break;_ref8=_iterator4[_i5++];}else{_i5=_iterator4.next();if(_i5.done)break;_ref8=_i5.value;}var pkey=_ref8;
-if(
-dontInheritKeys.includes(pkey)&&(
-pkey==='type'||pkey==='hideNavBar'||!parentProps[pkey]))
-{
+if(dontInheritKeys.includes(pkey)&&(pkey==='type'||pkey==='hideNavBar'||!parentProps[pkey])){
delete commonProps[pkey];
}
}
@@ -681,9 +551,7 @@ if(drawer){
commonProps.drawerImage=commonProps.drawerImage||_menu_burger2.default;
}
-var children=!Array.isArray(parentProps.children)?
-[parentProps.children]:
-[].concat.apply([],parentProps.children);
+var children=!Array.isArray(parentProps.children)?[parentProps.children]:[].concat.apply([],parentProps.children);
if(!drawer&&!tabs&&!overlay){
children.push.apply(children,_toConsumableArray(clones));
@@ -701,31 +569,13 @@ var initialRouteParams=void 0;var _loop2=function _loop2(
_child){
var key=_child.key||'key'+counter++;
var init=key===children[0].key;
-(0,_Util.assert)(
-reservedKeys.indexOf(key)===-1,'Scene name cannot be reserved word: '+
-_child.key);var _child$props=
-
-
-
-
-
-
-
-
-
-
-
-
-
+(0,_Util.assert)(reservedKeys.indexOf(key)===-1,'Scene name cannot be reserved word: '+_child.key);var _child$props=
_child.props,component=_child$props.component,_child$props$type=_child$props.type,type=_child$props$type===undefined?tabs||drawer?'jump':'push':_child$props$type,path=_child$props.path,onEnter=_child$props.onEnter,onExit=_child$props.onExit,on=_child$props.on,failure=_child$props.failure,success=_child$props.success,wrap=_child$props.wrap,_child$props$initial=_child$props.initial,initial=_child$props$initial===undefined?false:_child$props$initial,props=_objectWithoutProperties(_child$props,['component','type','path','onEnter','onExit','on','failure','success','wrap','initial']);
if(!_this2.states[key]){
_this2.states[key]={};
}
for(var _iterator7=Object.keys(props),_isArray7=Array.isArray(_iterator7),_i8=0,_iterator7=_isArray7?_iterator7:_iterator7[typeof Symbol==='function'?typeof Symbol==='function'?typeof Symbol==='function'?Symbol.iterator:'@@iterator':'@@iterator':'@@iterator']();;){var _ref11;if(_isArray7){if(_i8>=_iterator7.length)break;_ref11=_iterator7[_i8++];}else{_i8=_iterator7.next();if(_i8.done)break;_ref11=_i8.value;}var transition=_ref11;
-if(
-reservedKeys.indexOf(transition)===-1&&
-props[transition]instanceof Function)
-{
+if(reservedKeys.indexOf(transition)===-1&&props[transition]instanceof Function){
_this2.states[key][transition]=props[transition];
}
}
@@ -753,10 +603,7 @@ _this2.states[key].path=path;
}
var screen={
-screen:
-createWrapper(component,wrapBy,_this2)||
-_this2.processScene(_child,commonProps,clones)||
-lightbox&&function(){return null;},
+screen:createWrapper(component,wrapBy,_this2)||_this2.processScene(_child,commonProps,clones)||lightbox&&function(){return null;},
navigationOptions:createNavigationOptions(_extends({},
commonProps,{
hideNavBar:parentProps.hideNavBar},
@@ -805,17 +652,13 @@ _this2[key]=new Function(
'actions',
'props',
'type','return function '+
-key.replace(
-/\W/g,
-'_')+'(params){ actions.execute(type, \''+
+
+key.replace(/\W/g,'_')+'(params){ actions.execute(type, \''+
key+'\', props, params)}')(_this2,_extends({},
commonProps,props),type);
}
-if(
-(onEnter||on||component&&component.onEnter)&&
-!_this2[key+_Util.OnEnter])
-{
+if((onEnter||on||component&&component.onEnter)&&!_this2[key+_Util.OnEnter]){
_this2[key+_Util.OnEnter]=onEnter||on||component.onEnter;
}
@@ -851,15 +694,12 @@ navigationOptions:createNavigationOptions(commonProps)}));
}else if(tabs){
if(!tabBarComponent){
-tabBarComponent=
-tabBarPosition==='top'?
-function(props){return _react2.default.createElement(_reactNavigation.TabBarTop,_extends({},props,commonProps,{__source:{fileName:_jsxFileName,lineNumber:856}}));}:
-function(props){return _react2.default.createElement(_reactNavigation.TabBarBottom,_extends({},props,commonProps,{__source:{fileName:_jsxFileName,lineNumber:857}}));};
+tabBarComponent=tabBarPosition==='top'?function(props){return _react2.default.createElement(_reactNavigation.TabBarTop,_extends({},props,commonProps,{__source:{fileName:_jsxFileName,lineNumber:697}}));}:function(props){return _react2.default.createElement(_reactNavigation.TabBarBottom,_extends({},props,commonProps,{__source:{fileName:_jsxFileName,lineNumber:697}}));};
}
if(!tabBarPosition){
tabBarPosition=_reactNative.Platform.OS==='android'?'top':'bottom';
}
-return(0,_reactNavigation.TabNavigator)(res,_extends({
+return(0,_reactNavigation.createTabNavigator)(res,_extends({
lazy:lazy,
tabBarComponent:tabBarComponent,
tabBarPosition:tabBarPosition,
@@ -886,7 +726,7 @@ config.drawerWidth=drawerWidth;
if(drawerLockMode){
config.drawerLockMode=drawerLockMode;
}
-return(0,_reactNavigation.DrawerNavigator)(res,config);
+return(0,_reactNavigation.createDrawerNavigator)(res,config);
}else if(overlay){
return(0,_OverlayNavigator2.default)(res,_extends({
lazy:lazy,
@@ -899,7 +739,7 @@ tabBarOptions:createTabBarOptions(commonProps),
navigationOptions:createNavigationOptions(commonProps)}));
}
-return(0,_reactNavigation.StackNavigator)(res,_extends({
+return(0,_reactNavigation.createStackNavigator)(res,_extends({
mode:mode,
initialRouteParams:initialRouteParams,
initialRouteName:initialRouteName},
@@ -909,87 +749,10 @@ navigationOptions:createNavigationOptions(commonProps)}));
};this.
-nextState=function(state,cmd){return(
-_this2.reducer?_this2.reducer(state,cmd):(0,_Reducer.reducer)(state,cmd));};this.
-
-dispatch=function(cmd){
-_this2.setState(_this2.nextState(_this2.state,cmd));
+dispatch=function(action){
+console.log('DISPATCH:',JSON.stringify(action));
+_this2._navigator.dispatch(action);
};this.
-addListener=function(){return(
-{
-remove:function remove(){}});};_initDefineProp(this,'setState',_descriptor4,this);this.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
execute=function(actionType,routeName){for(var _len=arguments.length,params=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){params[_key-2]=arguments[_key];}
var res=uniteParams(routeName,params);
@@ -1004,30 +767,33 @@ _this2[type](routeName,res);
push=function(routeName,data){
var params=filterParam(data);
-_this2.dispatch({type:ActionConst.PUSH,routeName:routeName,params:params});
+_this2.dispatch({type:_reactNavigation.NavigationActions.NAVIGATE,routeName:routeName,params:params});
};this.
jump=function(routeName,data){
var params=filterParam(data);
-_this2.dispatch({type:ActionConst.JUMP,routeName:routeName,params:params});
+_this2.dispatch({type:_reactNavigation.NavigationActions.NAVIGATE,routeName:routeName,params:params});
};this.
drawerOpen=function(){
-_this2.dispatch(_reactNavigation.NavigationActions.navigate({routeName:'DrawerOpen'}));
+_this2.dispatch(_reactNavigation.DrawerActions.openDrawer());
};this.
drawerClose=function(){
-_this2.dispatch(_reactNavigation.NavigationActions.navigate({routeName:'DrawerClose'}));
+_this2.dispatch(_reactNavigation.DrawerActions.closeDrawer());
+};this.
+
+drawerToggle=function(){
+_this2.dispatch(_reactNavigation.DrawerActions.toggleDrawer());
};this.
refresh=function(data){
-var key=(0,_State.getActiveState)(_this2._state).key;
var params=filterParam(data);
+var key=(0,_State.getActiveState)(_this2.state).key;
_this2.dispatch(_reactNavigation.NavigationActions.setParams({key:key,params:params}));
};this.
pop=function(){var _ref12=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},timeout=_ref12.timeout,params=_objectWithoutProperties(_ref12,['timeout']);
-var previous=(0,_State.getActiveState)(_this2.state);
var res=filterParam(params);
if(timeout){
setTimeout(function(){return _this2.pop(params);},timeout);
@@ -1037,7 +803,7 @@ if(res.refresh){
_this2.refresh(res.refresh);
}
}
-return!(0,_lodash2.default)(previous,(0,_State.getActiveState)(_this2.state));
+return true;
};this.
popTo=function(routeName,data){
@@ -1069,7 +835,7 @@ params:params})]}));
-};}_createClass(NavigationStore,[{key:'state',get:function get(){var scene=this.currentScene;var params=this.currentParams;return this._state;}}]);return NavigationStore;}(),(_descriptor=_applyDecoratedDescriptor(_class2.prototype,'currentScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor2=_applyDecoratedDescriptor(_class2.prototype,'prevScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor3=_applyDecoratedDescriptor(_class2.prototype,'currentParams',[_mobx.observable],{enumerable:true,initializer:null}),_descriptor4=_applyDecoratedDescriptor(_class2.prototype,'setState',[_mobx.action],{enumerable:true,initializer:function initializer(){var _this3=this;return function _callee(newState){var state,currentScene,exitHandler,res,handler,_success,_failure,params,_res;return regeneratorRuntime.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(newState){_context.next=2;break;}return _context.abrupt('return');case 2:state=(0,_State.getActiveState)(newState);if(!((0,_lodash2.default)(state.params,_this3._currentParams)&&state.routeName===_this3.currentScene)){_context.next=5;break;}return _context.abrupt('return');case 5:currentScene=_this3.currentScene;_this3._state=newState;_this3.currentScene=state.routeName;_this3.prevScene=currentScene;_this3.currentParams=state.params;_this3._currentParams=state.params;if(!(currentScene!==_this3.currentScene&&_this3.currentScene!=='DrawerOpen'&&_this3.currentScene!=='DrawerClose')){_context.next=32;break;}_this3.dispatch({type:ActionConst.BLUR,routeName:currentScene});exitHandler=_this3[currentScene+_Util.OnExit];if(exitHandler){try{res=exitHandler();if(res instanceof Promise){res.then(defaultSuccess,defaultFailure);}}catch(e){console.error('Error during onExit handler:',e);}}_this3.dispatch({type:ActionConst.FOCUS,routeName:_this3.currentScene,params:_this3._currentParams});if(!_this3.states[_this3.currentScene]){_context.next=32;break;}handler=_this3[_this3.currentScene+_Util.OnEnter];_success=_this3.states[_this3.currentScene].success||defaultSuccess;_failure=_this3.states[_this3.currentScene].failure||defaultFailure;if(!handler){_context.next=32;break;}_context.prev=21;params=(0,_State.getActiveState)(_this3._state).params;_context.next=25;return regeneratorRuntime.awrap(handler(params));case 25:_res=_context.sent;if(_res){_success(_res);}else{_failure();}_context.next=32;break;case 29:_context.prev=29;_context.t0=_context['catch'](21);_failure({error:_context.t0.message});case 32:case'end':return _context.stop();}}},null,_this3,[[21,29]]);};}})),_class2);exports.default=
+};}_createClass(NavigationStore,[{key:'currentScene',get:function get(){return(0,_State.getActiveState)(this.state);}},{key:'prevScene',get:function get(){return(0,_State.getActiveState)(this.prevState);}}]);return NavigationStore;}(),(_descriptor=_applyDecoratedDescriptor(_class2.prototype,'state',[_mobx.observable],{enumerable:true,initializer:null}),_descriptor2=_applyDecoratedDescriptor(_class2.prototype,'prevState',[_mobx.observable],{enumerable:true,initializer:null}),_descriptor3=_applyDecoratedDescriptor(_class2.prototype,'currentParams',[_mobx.observable],{enumerable:true,initializer:null}),_applyDecoratedDescriptor(_class2.prototype,'currentScene',[_mobx.computed],Object.getOwnPropertyDescriptor(_class2.prototype,'currentScene'),_class2.prototype),_applyDecoratedDescriptor(_class2.prototype,'prevScene',[_mobx.computed],Object.getOwnPropertyDescriptor(_class2.prototype,'prevScene'),_class2.prototype)),_class2);exports.default=
new NavigationStore();
\ No newline at end of file
diff --git a/package.json b/package.json
index 0c8e8b0d3..316052a58 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"opencollective": "^1.0.3",
"path-to-regexp": "^2.1.0",
"prop-types": "^15.6.0",
- "react-navigation": "1.5.8"
+ "react-navigation": "^2.8.0"
},
"devDependencies": {
"@types/react": "^16.0.20",
diff --git a/src/.watchmanconfig b/src/.watchmanconfig
new file mode 100644
index 000000000..3801452d4
--- /dev/null
+++ b/src/.watchmanconfig
@@ -0,0 +1,3 @@
+{
+ "ignore_dirs": []
+}
diff --git a/src/LightboxNavigator.js b/src/LightboxNavigator.js
index ca69f538a..9d1a974f4 100644
--- a/src/LightboxNavigator.js
+++ b/src/LightboxNavigator.js
@@ -5,39 +5,55 @@ import { addNavigationHelpers, createNavigationContainer, createNavigator, TabRo
import { View } from 'react-native';
import navigationStore from './navigationStore';
-const LightboxNavigator = (
- routeConfigs,
- tabsConfig = {}
-) => {
+const NavigationView = ({ navigation, screenProps, navigationConfig, descriptors }) => {
+ const { state, dispatch } = navigation;
+ const { routes, index } = state;
+
+ console.log('DATA:', JSON.stringify(navigationConfig));
+ return ;
+
+ // // Figure out what to render based on the navigation state and the router:
+ // const Component = descriptors[
+ // navigationConfig.initialRouteName
+ // ].getComponent();
+ // let initialIndex = 0;
+ // for (let i = 0; i < routes.length; i++) {
+ // const route = routes[i];
+ // if (route.routeName === tabsConfig.initialRouteName) {
+ // initialIndex = i;
+ // }
+ // }
+ // const Popup =
+ // index !== initialIndex
+ // ? routeConfigs[routes[index].routeName].screen
+ // : null;
+
+ // return (
+ //
+ //
+ // {Popup && (
+ //
+ // )}
+ //
+ // );
+};
+
+const LightboxNavigator = (routeConfigs, tabsConfig = {}) => {
const router = TabRouter(routeConfigs, tabsConfig);
- const navigator = createNavigator(
- router,
- routeConfigs,
- tabsConfig,
- 'react-navigation/STACK'
- )(({ navigation }) => {
- const { state, dispatch } = navigation;
- const { routes, index } = state;
-
- // Figure out what to render based on the navigation state and the router:
- const Component = routeConfigs[tabsConfig.initialRouteName].screen;
- let initialIndex = 0;
- for (let i = 0; i < routes.length; i++) {
- const route = routes[i];
- if (route.routeName === tabsConfig.initialRouteName) {
- initialIndex = i;
- }
- }
- const Popup = index !== initialIndex ? routeConfigs[routes[index].routeName].screen : null;
-
- return (
-
- {Popup && }
- );
- });
-
- return createNavigationContainer(navigator, tabsConfig.containerOptions);
+ return createNavigator(NavigationView, router, tabsConfig);
};
export default LightboxNavigator;
diff --git a/src/NavBar.js b/src/NavBar.js
index 3a45019ff..34a514d1f 100644
--- a/src/NavBar.js
+++ b/src/NavBar.js
@@ -1,27 +1,13 @@
import React from 'react';
import { HeaderBackButton } from 'react-navigation';
-import {
- Platform,
- I18nManager,
- Image,
- StyleSheet,
- Text,
- TouchableOpacity,
- View,
-} from 'react-native';
+import { Platform, I18nManager, Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Actions from './navigationStore';
import _backButtonImage from '../images/back_chevron.png';
const hitSlop = { top: 15, bottom: 15, left: 15, right: 15 };
export function BackButton(state) {
- const textButtonStyle = [
- styles.barBackButtonText,
- state.backButtonTextStyle,
- ];
- const style = [
- styles.backButton,
- state.leftButtonStyle,
- ];
+ const textButtonStyle = [styles.barBackButtonText, state.backButtonTextStyle];
+ const style = [styles.backButton, state.leftButtonStyle];
const buttonImage = state.backButtonImage || _backButtonImage;
const tintColor = getValue(state.backButtonTintColor, state) || state.tintColor || state.navBarButtonColor || state.headerTintColor;
let onPress = state.onBack;
@@ -34,41 +20,16 @@ export function BackButton(state) {
// returning react-navigation's back button well styled for ios and android if rnrf4-supported customization
// is not required
if (!state.backButtonImage) {
- return (
-
- );
+ return ;
}
- const text = state.backTitle ?
- (
- {state.backTitle}
- )
- : null;
+ const text = state.backTitle ? {state.backTitle} : null;
return (
-
+
- {buttonImage && !state.hideBackImage &&
- }
- {text}
+ {buttonImage && !state.hideBackImage && }
+ {text}
);
@@ -89,15 +50,7 @@ export function LeftButton(state) {
if (state.leftButton || state.left) {
const Button = state.leftButton || state.left;
- return (
-
- );
+ return ;
}
if (!onPress && !state.hideDrawerButton && (state.drawerImage || menuIcon) && state.drawerPosition !== 'right') {
@@ -106,44 +59,34 @@ export function LeftButton(state) {
onPress = Actions.drawerOpen;
}
if (!menuIcon) {
- menuIcon = (
-
- );
+ menuIcon = ;
}
}
if (onPress && (leftTitle || buttonImage || menuIcon)) {
onPress = onPress.bind(null, state);
return (
-
- {leftTitle &&
- {leftTitle}
-
- }
- {!leftTitle && (menuIcon || buttonImage) &&
- {menuIcon ||
- }
-
- }
+
+ {leftTitle && {leftTitle}}
+ {!leftTitle &&
+ (menuIcon || buttonImage) && (
+
+ {menuIcon || }
+
+ )}
);
}
- if ((!!state.onLeft ^ !!(leftTitle || buttonImage || menuIcon))) {
+ if (!!state.onLeft ^ !!(leftTitle || buttonImage || menuIcon)) {
console.warn(
`Both onLeft and leftTitle/leftButtonImage
- must be specified for the scene: ${state.name}`,
+ must be specified for the scene: ${state.name}`
);
}
return null;
@@ -172,15 +115,7 @@ export function RightButton(state) {
if (state.rightButton || state.right) {
const Button = state.rightButton || state.right;
- return (
-
- );
+ return ;
}
if (!onPress && !state.hideDrawerButton && state.drawerImage && state.drawerPosition === 'right') {
@@ -189,45 +124,34 @@ export function RightButton(state) {
onPress = Actions.drawerOpen;
}
if (!menuIcon) {
- menuIcon = (
-
- );
+ menuIcon = ;
}
}
if (onPress && (rightTitle || buttonImage)) {
onPress = onPress.bind(null, state);
return (
-
- {rightTitle &&
- {rightTitle}
-
- }
- {!rightTitle && buttonImage &&
- {menuIcon ||
- }
-
- }
+
+ {rightTitle && {rightTitle}}
+ {!rightTitle &&
+ buttonImage && (
+
+ {menuIcon || }
+
+ )}
);
}
- if ((!!state.onRight ^ !!(typeof (rightTitle) !== 'undefined'
- || typeof (buttonImage) !== 'undefined'))) {
+ if (!!state.onRight ^ !!(typeof rightTitle !== 'undefined' || typeof buttonImage !== 'undefined')) {
console.warn(
`Both onRight and rightTitle/rightButtonImage
- must be specified for the scene: ${state.routeName}`,
+ must be specified for the scene: ${state.routeName}`
);
}
return null;
@@ -246,7 +170,6 @@ const styles = StyleSheet.create({
},
titleWrapper: {
marginTop: 10,
- position: 'absolute',
...Platform.select({
ios: {
top: 20,
@@ -258,13 +181,10 @@ const styles = StyleSheet.create({
top: 5,
},
}),
- left: 0,
- right: 0,
},
header: {
backgroundColor: '#EFEFF2',
paddingTop: 0,
- top: 0,
...Platform.select({
ios: {
height: 64,
@@ -276,14 +196,10 @@ const styles = StyleSheet.create({
height: 54,
},
}),
- right: 0,
- left: 0,
borderBottomWidth: 0.5,
borderBottomColor: '#828287',
- position: 'absolute',
},
backButton: {
- position: 'absolute',
...Platform.select({
ios: {
top: 12,
@@ -301,34 +217,10 @@ const styles = StyleSheet.create({
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
},
rightButton: {
- ...Platform.select({
- ios: {
- position: 'absolute',
- top: 12,
- },
- android: {
- top: 0,
- },
- windows: {
- top: 8,
- },
- }),
right: 2,
paddingRight: 8,
},
leftButton: {
- ...Platform.select({
- ios: {
- position: 'absolute',
- top: 12,
- },
- android: {
- top: 0,
- },
- windows: {
- top: 8,
- },
- }),
left: 2,
paddingLeft: 8,
},
@@ -349,13 +241,6 @@ const styles = StyleSheet.create({
fontSize: 17,
},
backButtonContainer: {
- ...Platform.select({
- ios: {
- position: 'absolute',
- top: 0,
- left: 0,
- },
- }),
height: 50,
width: 70,
},
diff --git a/src/Router.js b/src/Router.js
index a4cd89721..b25662b97 100644
--- a/src/Router.js
+++ b/src/Router.js
@@ -1,12 +1,9 @@
import React from 'react';
-import { observer } from 'mobx-react/native';
-import { ViewPropTypes, BackHandler, Linking } from 'react-native';
+import { ViewPropTypes, BackHandler, Linking, View } from 'react-native';
import PropTypes from 'prop-types';
-import { addNavigationHelpers } from 'react-navigation';
import navigationStore from './navigationStore';
import pathParser from './pathParser';
-@observer
class App extends React.Component {
static propTypes = {
navigator: PropTypes.func,
@@ -19,7 +16,7 @@ class App extends React.Component {
BackHandler.addEventListener('hardwareBackPress', this.props.backAndroidHandler || this.onBackPress);
// If the app was "woken up" by an external route.
- Linking.getInitialURL().then((url) => this.parseDeepURL(url));
+ Linking.getInitialURL().then(url => this.parseDeepURL(url));
// Add an event listener for further deep linking.
Linking.addEventListener('url', this.handleDeepURL);
}
@@ -31,23 +28,31 @@ class App extends React.Component {
onBackPress = () => navigationStore.pop();
- handleDeepURL = (e) => this.parseDeepURL(e.url);
+ handleDeepURL = e => this.parseDeepURL(e.url);
- parseDeepURL = (url) => {
+ parseDeepURL = url => {
// If there is no url, then return.
- if (!url) { return; }
+ if (!url) {
+ return;
+ }
// Clean the url with the given prefix.
const cleanUrl = this.props.uriPrefix ? url.split(this.props.uriPrefix)[1] : url;
// Skip for uriPrefix which not registered
- if (!cleanUrl) { return; }
+ if (!cleanUrl) {
+ return;
+ }
// Build an array of paths for every scene.
- const allPaths = Object.values(navigationStore.states).map(obj => obj.path).filter(path => path);
+ const allPaths = Object.values(navigationStore.states)
+ .map(obj => obj.path)
+ .filter(path => path);
// Try to match the url against the set of paths and parse the url parameters.
const parsedPath = pathParser(cleanUrl, allPaths);
// If the url could not be matched, then return.
- if (!parsedPath) { return; }
+ if (!parsedPath) {
+ return;
+ }
// Destructure the matched path and the parsed url parameters.
const { path, params } = parsedPath;
@@ -68,8 +73,14 @@ class App extends React.Component {
render() {
const AppNavigator = this.props.navigator;
+ console.log('NAVIGATOR:', AppNavigator);
return (
-
+ {
+ navigationStore.setTopLevelNavigator(navigatorRef);
+ }}
+ />
);
}
}
@@ -83,13 +94,6 @@ const Router = ({ createReducer, sceneStyle, scenes, uriPrefix, navigator, getSc
data.cardStyle = sceneStyle;
}
const AppNavigator = scenes || navigator || navigationStore.create(children, data, wrapBy);
- navigationStore.reducer = createReducer && createReducer(props);
- if (dispatch && state) {
- // set external state and dispatch
- navigationStore.setState(state);
- navigationStore.dispatch = dispatch;
- return ;
- }
return ;
};
Router.propTypes = {
diff --git a/src/navigationStore.js b/src/navigationStore.js
index 1b4dd69d4..faa4b28bc 100644
--- a/src/navigationStore.js
+++ b/src/navigationStore.js
@@ -1,23 +1,15 @@
import React from 'react';
-import { observable, action } from 'mobx';
import * as ActionConst from './ActionConst';
import { OnEnter, OnExit, assert } from './Util';
import { Image, Animated, Easing, Platform } from 'react-native';
-import {
- TabNavigator,
- DrawerNavigator,
- StackNavigator,
- NavigationActions,
- TabBarTop,
- TabBarBottom,
-} from 'react-navigation';
+import { createTabNavigator, createDrawerNavigator, createStackNavigator, NavigationActions, DrawerActions, TabBarTop, TabBarBottom } from 'react-navigation';
+import { observable, computed } from 'mobx';
import { LeftButton, RightButton, BackButton } from './NavBar';
import LightboxNavigator from './LightboxNavigator';
import _drawerImage from '../images/menu_burger.png';
import Scene from './Scene';
import PropTypes from 'prop-types';
import { getActiveState } from './State';
-import { reducer } from './Reducer';
import isEqual from 'lodash.isequal';
import Modal from './Modal';
import Lightbox from './Lightbox';
@@ -114,17 +106,7 @@ function getProperties(component = {}) {
delete res.children;
return res;
}
-function createTabBarOptions({
- tabBarStyle,
- activeTintColor,
- inactiveTintColor,
- activeBackgroundColor,
- inactiveBackgroundColor,
- showLabel,
- labelStyle,
- tabStyle,
- ...props,
-}) {
+function createTabBarOptions({ tabBarStyle, activeTintColor, inactiveTintColor, activeBackgroundColor, inactiveBackgroundColor, showLabel, labelStyle, tabStyle, ...props }) {
return {
...props,
style: tabBarStyle,
@@ -182,13 +164,14 @@ function createNavigationOptions(params) {
drawerIcon,
drawerImage,
drawerPosition,
- ...props,
+ ...props
} = params;
const NavBar = renderNavigationBar || navBar;
if (component && component.navigationOptions) {
return component.navigationOptions;
}
return ({ navigation, screenProps }) => {
+ console.log('PARAMS', screenProps);
const navigationParams = navigation.state.params || {};
const state = {
navigation,
@@ -198,48 +181,24 @@ function createNavigationOptions(params) {
};
const res = {
...props,
- headerTintColor:
- navBarButtonColor ||
- props.tintColor ||
- navigationParams.tintColor ||
- navigationParams.headerTintColor,
+ headerTintColor: navBarButtonColor || props.tintColor || navigationParams.tintColor || navigationParams.headerTintColor,
headerTitleStyle: headerTitleStyle || titleStyle,
title: getValue(navigationParams.title || title || getTitle, state),
headerBackTitle: getValue(navigationParams.backTitle || backTitle, state),
- headerRight: getValue(
- navigationParams.right ||
- right ||
- rightButton ||
- params.renderRightButton,
- state
- ),
- headerLeft: getValue(
- navigationParams.left || left || leftButton || params.renderLeftButton,
- state
- ),
- headerTitle: getValue(
- navigationParams.renderTitle || renderTitle || params.renderTitle,
- state
- ),
- headerStyle: getValue(
- navigationParams.headerStyle || headerStyle || navigationBarStyle,
- state
- ),
+ headerRight: getValue(navigationParams.right || right || rightButton || params.renderRightButton, state),
+ headerLeft: getValue(navigationParams.left || left || leftButton || params.renderLeftButton, state),
+ headerTitle: getValue(navigationParams.renderTitle || renderTitle || params.renderTitle, state),
+ headerStyle: getValue(navigationParams.headerStyle || headerStyle || navigationBarStyle, state),
headerBackImage: navigationParams.backButtonImage || backButtonImage,
};
- const NavBarFromParams =
- navigationParams.renderNavigationBar || navigationParams.navBar;
+ const NavBarFromParams = navigationParams.renderNavigationBar || navigationParams.navBar;
if (NavBarFromParams != null) {
if (NavBarFromParams) {
- res.header = data => (
-
- );
+ res.header = data => ;
}
} else if (NavBar) {
- res.header = data => (
-
- );
+ res.header = data => ;
}
if (typeof navigationParams.panHandlers !== 'undefined') {
@@ -251,12 +210,7 @@ function createNavigationOptions(params) {
}
if (navigationBarTitleImage) {
- res.headerTitle = (
-
- );
+ res.headerTitle = ;
}
if (tabBarLabel) {
@@ -301,21 +255,10 @@ function createNavigationOptions(params) {
navigationParams.rightTitle ||
navigationParams.rightButtonImage ||
rightButtonTextStyle ||
- ((drawerImage || drawerIcon) &&
- !hideDrawerButton &&
- drawerPosition === 'right')
+ ((drawerImage || drawerIcon) && !hideDrawerButton && drawerPosition === 'right')
) {
- res.headerRight = getValue(
- navigationParams.right ||
- navigationParams.rightButton ||
- params.renderRightButton,
- { ...navigationParams, ...screenProps }
- ) || (
-
+ res.headerRight = getValue(navigationParams.right || navigationParams.rightButton || params.renderRightButton, { ...navigationParams, ...screenProps }) || (
+
);
}
@@ -334,54 +277,23 @@ function createNavigationOptions(params) {
navigationParams.leftButtonImage ||
navigationParams.backButtonImage ||
navigationParams.backTitle ||
- ((drawerImage || drawerIcon) &&
- !hideDrawerButton &&
- drawerPosition !== 'right')
+ ((drawerImage || drawerIcon) && !hideDrawerButton && drawerPosition !== 'right')
) {
res.headerLeft =
- getValue(
- navigationParams.left ||
- navigationParams.leftButton ||
- params.renderLeftButton,
- { ...params, ...navigationParams, ...screenProps }
- ) ||
- (((onLeft &&
- (leftTitle ||
- navigationParams.leftTitle ||
- leftButtonImage ||
- navigationParams.leftButtonImage)) ||
- drawerImage ||
- drawerIcon) && (
-
+ getValue(navigationParams.left || navigationParams.leftButton || params.renderLeftButton, { ...params, ...navigationParams, ...screenProps }) ||
+ (((onLeft && (leftTitle || navigationParams.leftTitle || leftButtonImage || navigationParams.leftButtonImage)) || drawerImage || drawerIcon) && (
+
)) ||
res.headerLeft ||
- (init
- ? null
- : (renderBackButton && renderBackButton(state)) || (
-
- ));
+ (init ? null : (renderBackButton && renderBackButton(state)) || );
}
if (back) {
- res.headerLeft = (renderBackButton && renderBackButton(state)) || (
-
- );
+ res.headerLeft = (renderBackButton && renderBackButton(state)) || ;
}
- if (
- typeof navigationParams.left !== 'undefined' ||
- typeof navigationParams.leftButton !== 'undefined' ||
- typeof navigationParams.renderLeftButton !== 'undefined'
- ) {
- if (
- navigationParams.left === null ||
- navigationParams.leftButton === null ||
- navigationParams.renderLeftButton === null
- ) {
+ if (typeof navigationParams.left !== 'undefined' || typeof navigationParams.leftButton !== 'undefined' || typeof navigationParams.renderLeftButton !== 'undefined') {
+ if (navigationParams.left === null || navigationParams.leftButton === null || navigationParams.renderLeftButton === null) {
res.headerLeft = null;
}
}
@@ -396,6 +308,8 @@ function createNavigationOptions(params) {
res.tabBarVisible = false;
}
+ console.log('NAVIGATION PARAMS:', JSON.stringify(navigationParams));
+
if (navigationParams.hideNavBar != null) {
if (navigationParams.hideNavBar) {
res.header = null;
@@ -406,12 +320,8 @@ function createNavigationOptions(params) {
if (navTransparent) {
res.headerStyle = {
- position: 'absolute',
backgroundColor: 'transparent',
zIndex: 100,
- top: 0,
- left: 0,
- right: 0,
borderBottomWidth: 0,
elevation: 1,
};
@@ -486,12 +396,7 @@ function createWrapper(Component, wrapBy, store: NavigationStore) {
}
componentDidMount() {
const navigation = this.props.navigation;
- if (
- this.ref &&
- navigation &&
- navigation.state &&
- navigation.state.routeName
- ) {
+ if (this.ref && navigation && navigation.state && navigation.state.routeName) {
store.addRef(originalRouteName(navigation.state.routeName), this.ref);
}
if (this.ref && this.ref.onEnter) {
@@ -500,12 +405,7 @@ function createWrapper(Component, wrapBy, store: NavigationStore) {
}
componentWillUnmount() {
const navigation = this.props.navigation;
- if (
- this.ref &&
- navigation &&
- navigation.state &&
- navigation.state.routeName
- ) {
+ if (this.ref && navigation && navigation.state && navigation.state.routeName) {
store.deleteRef(originalRouteName(navigation.state.routeName));
}
if (this.ref && this.ref.onExit) {
@@ -521,14 +421,7 @@ function createWrapper(Component, wrapBy, store: NavigationStore) {
if (!navigation || !navigation.state) {
return ;
}
- return (
-
- );
+ return ;
}
}
return wrapper(Wrapped);
@@ -536,14 +429,7 @@ function createWrapper(Component, wrapBy, store: NavigationStore) {
// if component is statless function, ref is not supported
function StatelessWrapped({ navigation, ...props }) {
- return (
-
- );
+ return ;
}
StatelessWrapped.propTypes = {
navigation: PropTypes.object,
@@ -578,22 +464,31 @@ const defaultSuccess = () => {};
const defaultFailure = () => {};
class NavigationStore {
+ _navigator = null;
refs = {};
states = {};
- reducer = null;
- router;
- _state;
- _currentParams;
- @observable currentScene = '';
- @observable prevScene = '';
+ @observable state;
+ @observable prevState;
@observable currentParams;
-
- get state() {
- const scene = this.currentScene; // eslint-disable-line no-unused-vars
- const params = this.currentParams; // eslint-disable-line no-unused-vars
- return this._state;
+ @computed
+ get currentScene() {
+ return getActiveState(this.state);
+ }
+ @computed
+ get prevScene() {
+ return getActiveState(this.prevState);
}
+ onNavigationStateChange = (prevState, currentState, action) => {
+ this.state = currentState;
+ this.prevState = prevState;
+ this.currentParams = action.params;
+ };
+
+ setTopLevelNavigator = navigatorRef => {
+ this._navigator = navigatorRef;
+ };
+
addRef = (name, ref) => {
this.refs[name] = ref;
};
@@ -603,16 +498,11 @@ class NavigationStore {
};
create = (scene: Scene, params = {}, wrapBy = props => props) => {
- assert(
- !Array.isArray(scene),
- 'Router should contain only one scene, please wrap your scenes with root Scene '
- );
+ assert(!Array.isArray(scene), 'Router should contain only one scene, please wrap your scenes with root Scene ');
RightNavBarButton = wrapBy(RightButton);
LeftNavBarButton = wrapBy(LeftButton);
BackNavBarButton = wrapBy(BackButton);
const AppNavigator = this.processScene(scene, params, [], wrapBy);
- this.router = AppNavigator.router;
- this.dispatch(NavigationActions.init());
return AppNavigator;
};
@@ -623,25 +513,8 @@ class NavigationStore {
}
const res = {};
const order = [];
- const {
- navigator,
- contentComponent,
- drawerWidth,
- drawerLockMode,
- lazy,
- duration,
- ...parentProps,
- } = scene.props;
- let {
- tabs,
- modal,
- lightbox,
- overlay,
- tabBarPosition,
- drawer,
- tabBarComponent,
- transitionConfig,
- } = parentProps;
+ const { navigator, contentComponent, drawerWidth, drawerLockMode, lazy, duration, ...parentProps } = scene.props;
+ let { tabs, modal, lightbox, overlay, tabBarPosition, drawer, tabBarComponent, transitionConfig } = parentProps;
if (scene.type === Modal) {
modal = true;
} else if (scene.type === Drawer) {
@@ -669,10 +542,7 @@ class NavigationStore {
delete commonProps.component;
// add inherit props
for (const pkey of Object.keys(commonProps)) {
- if (
- dontInheritKeys.includes(pkey) &&
- (pkey === 'type' || pkey === 'hideNavBar' || !parentProps[pkey])
- ) {
+ if (dontInheritKeys.includes(pkey) && (pkey === 'type' || pkey === 'hideNavBar' || !parentProps[pkey])) {
delete commonProps[pkey];
}
}
@@ -681,9 +551,7 @@ class NavigationStore {
commonProps.drawerImage = commonProps.drawerImage || _drawerImage;
}
- const children = !Array.isArray(parentProps.children)
- ? [parentProps.children]
- : [].concat.apply([], parentProps.children);
+ const children = !Array.isArray(parentProps.children) ? [parentProps.children] : [].concat.apply([], parentProps.children);
// add clone scenes
if (!drawer && !tabs && !overlay) {
children.push(...clones);
@@ -701,31 +569,13 @@ class NavigationStore {
for (const child of children) {
const key = child.key || `key${counter++}`;
const init = key === children[0].key;
- assert(
- reservedKeys.indexOf(key) === -1,
- `Scene name cannot be reserved word: ${child.key}`
- );
- const {
- component,
- type = tabs || drawer ? 'jump' : 'push',
- path,
- onEnter,
- onExit,
- on,
- failure,
- success,
- wrap,
- initial = false,
- ...props,
- } = child.props;
+ assert(reservedKeys.indexOf(key) === -1, `Scene name cannot be reserved word: ${child.key}`);
+ const { component, type = tabs || drawer ? 'jump' : 'push', path, onEnter, onExit, on, failure, success, wrap, initial = false, ...props } = child.props;
if (!this.states[key]) {
this.states[key] = {};
}
for (const transition of Object.keys(props)) {
- if (
- reservedKeys.indexOf(transition) === -1 &&
- props[transition] instanceof Function
- ) {
+ if (reservedKeys.indexOf(transition) === -1 && props[transition] instanceof Function) {
this.states[key][transition] = props[transition];
}
}
@@ -735,28 +585,25 @@ class NavigationStore {
success instanceof Function
? success
: args => {
- console.log(`Transition to state=${success}`);
- this[success](args);
- };
+ console.log(`Transition to state=${success}`);
+ this[success](args);
+ };
}
if (failure) {
this.states[key].failure =
failure instanceof Function
? failure
: args => {
- console.log(`Transition to state=${failure}`);
- this[failure](args);
- };
+ console.log(`Transition to state=${failure}`);
+ this[failure](args);
+ };
}
if (path) {
this.states[key].path = path;
}
// console.log(`KEY ${key} PATH ${path} DRAWER ${drawer} TABS ${tabs} WRAP ${wrap}`, JSON.stringify(commonProps));
const screen = {
- screen:
- createWrapper(component, wrapBy, this) ||
- this.processScene(child, commonProps, clones) ||
- (lightbox && (() => null)),
+ screen: createWrapper(component, wrapBy, this) || this.processScene(child, commonProps, clones) || (lightbox && (() => null)),
navigationOptions: createNavigationOptions({
...commonProps,
hideNavBar: parentProps.hideNavBar,
@@ -786,7 +633,7 @@ class NavigationStore {
},
commonProps,
clones,
- wrapBy
+ wrapBy,
),
navigationOptions: createNavigationOptions({
...commonProps,
@@ -801,21 +648,17 @@ class NavigationStore {
// a bit of magic, create all 'actions'-shortcuts inside navigationStore
props.init = true;
if (!this[key]) {
- this[key] = new Function( // eslint-disable-line no-new-func
+ this[key] = new Function(
'actions',
'props',
'type',
- `return function ${key.replace(
- /\W/g,
- '_'
- )}(params){ actions.execute(type, '${key}', props, params)}`
+ `return function ${
+ key.replace(/\W/g, '_') // eslint-disable-line no-new-func
+ }(params){ actions.execute(type, '${key}', props, params)}`,
)(this, { ...commonProps, ...props }, type);
}
- if (
- (onEnter || on || (component && component.onEnter)) &&
- !this[key + OnEnter]
- ) {
+ if ((onEnter || on || (component && component.onEnter)) && !this[key + OnEnter]) {
this[key + OnEnter] = onEnter || on || component.onEnter;
}
@@ -851,15 +694,12 @@ class NavigationStore {
});
} else if (tabs) {
if (!tabBarComponent) {
- tabBarComponent =
- tabBarPosition === 'top'
- ? props =>
- : props => ;
+ tabBarComponent = tabBarPosition === 'top' ? props => : props => ;
}
if (!tabBarPosition) {
tabBarPosition = Platform.OS === 'android' ? 'top' : 'bottom';
}
- return TabNavigator(res, {
+ return createTabNavigator(res, {
lazy,
tabBarComponent,
tabBarPosition,
@@ -886,7 +726,7 @@ class NavigationStore {
if (drawerLockMode) {
config.drawerLockMode = drawerLockMode;
}
- return DrawerNavigator(res, config);
+ return createDrawerNavigator(res, config);
} else if (overlay) {
return OverlayNavigator(res, {
lazy,
@@ -899,7 +739,7 @@ class NavigationStore {
navigationOptions: createNavigationOptions(commonProps),
});
}
- return StackNavigator(res, {
+ return createStackNavigator(res, {
mode,
initialRouteParams,
initialRouteName,
@@ -909,86 +749,9 @@ class NavigationStore {
});
};
- nextState = (state, cmd) =>
- (this.reducer ? this.reducer(state, cmd) : reducer(state, cmd));
-
- dispatch = cmd => {
- this.setState(this.nextState(this.state, cmd));
- };
- addListener = () =>
- ({
- remove: () => {},
- });
-
- @action
- setState = async newState => {
- // don't allow null state
- if (!newState) {
- return;
- }
- const state = getActiveState(newState);
- // avoid double actions
- if (
- isEqual(state.params, this._currentParams) &&
- state.routeName === this.currentScene
- ) {
- return;
- }
- const currentScene = this.currentScene;
- this._state = newState;
- this.currentScene = state.routeName;
- this.prevScene = currentScene;
-
- this.currentParams = state.params;
- this._currentParams = state.params;
-
- if (
- currentScene !== this.currentScene &&
- this.currentScene !== 'DrawerOpen' &&
- this.currentScene !== 'DrawerClose'
- ) {
- this.dispatch({ type: ActionConst.BLUR, routeName: currentScene });
-
- // call onExit handler
- const exitHandler = this[currentScene + OnExit];
- if (exitHandler) {
- try {
- const res = exitHandler();
- if (res instanceof Promise) {
- res.then(defaultSuccess, defaultFailure);
- }
- } catch (e) {
- console.error('Error during onExit handler:', e);
- }
- }
-
- this.dispatch({
- type: ActionConst.FOCUS,
- routeName: this.currentScene,
- params: this._currentParams,
- });
- if (this.states[this.currentScene]) {
- const handler = this[this.currentScene + OnEnter];
- const success =
- this.states[this.currentScene].success || defaultSuccess;
- const failure =
- this.states[this.currentScene].failure || defaultFailure;
- // call onEnter handler
- if (handler) {
- try {
- const params = getActiveState(this._state).params;
- const res = await handler(params);
- if (res) {
- success(res);
- } else {
- failure();
- }
- } catch (e) {
- failure({ error: e.message });
- }
- }
- }
- }
+ dispatch = action => {
+ console.log('DISPATCH:', JSON.stringify(action));
+ this._navigator.dispatch(action);
};
execute = (actionType, routeName, ...params) => {
@@ -1004,30 +767,33 @@ class NavigationStore {
push = (routeName, data) => {
const params = filterParam(data);
- this.dispatch({ type: ActionConst.PUSH, routeName, params });
+ this.dispatch({ type: NavigationActions.NAVIGATE, routeName, params });
};
jump = (routeName, data) => {
const params = filterParam(data);
- this.dispatch({ type: ActionConst.JUMP, routeName, params });
+ this.dispatch({ type: NavigationActions.NAVIGATE, routeName, params });
};
drawerOpen = () => {
- this.dispatch(NavigationActions.navigate({ routeName: 'DrawerOpen' }));
+ this.dispatch(DrawerActions.openDrawer());
};
drawerClose = () => {
- this.dispatch(NavigationActions.navigate({ routeName: 'DrawerClose' }));
+ this.dispatch(DrawerActions.closeDrawer());
+ };
+
+ drawerToggle = () => {
+ this.dispatch(DrawerActions.toggleDrawer());
};
refresh = data => {
- const key = getActiveState(this._state).key;
const params = filterParam(data);
+ const key = getActiveState(this.state).key;
this.dispatch(NavigationActions.setParams({ key, params }));
};
pop = ({ timeout, ...params } = {}) => {
- const previous = getActiveState(this.state);
const res = filterParam(params);
if (timeout) {
setTimeout(() => this.pop(params), timeout);
@@ -1037,7 +803,7 @@ class NavigationStore {
this.refresh(res.refresh);
}
}
- return !isEqual(previous, getActiveState(this.state));
+ return true;
};
popTo = (routeName, data) => {
@@ -1067,7 +833,7 @@ class NavigationStore {
params,
}),
],
- })
+ }),
);
};
}