react-native-navigation 7.24.1 → 7.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Mock/Components/ComponentScreen.tsx +1 -1
- package/lib/Mock/Components/NavigationButton.tsx +1 -1
- package/lib/Mock/Components/TopBar.tsx +6 -2
- package/lib/dist/Mock/Components/ComponentScreen.js +2 -2
- package/lib/dist/Mock/Components/NavigationButton.d.ts +1 -1
- package/lib/dist/Mock/Components/NavigationButton.js +3 -3
- package/lib/dist/Mock/Components/TopBar.d.ts +1 -2
- package/lib/dist/Mock/Components/TopBar.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { Button, View, Text } from 'react-native';
|
|
3
|
-
import { Navigation } from '
|
|
3
|
+
import { Navigation } from 'react-native-navigation';
|
|
4
4
|
import { ComponentProps } from '../ComponentProps';
|
|
5
5
|
import { VISIBLE_SCREEN_TEST_ID } from '../constants';
|
|
6
6
|
import { LayoutStore } from '../Stores/LayoutStore';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { Button, TouchableOpacity } from 'react-native';
|
|
3
|
-
import { Navigation, OptionsTopBarButton } from '
|
|
3
|
+
import { Navigation, OptionsTopBarButton } from 'react-native-navigation';
|
|
4
4
|
import { events } from '../Stores/EventsStore';
|
|
5
5
|
|
|
6
6
|
interface ButtonProps {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { Button, View, Text } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Navigation,
|
|
5
|
+
OptionsTopBar,
|
|
6
|
+
OptionsTopBarBackButton,
|
|
7
|
+
OptionsTopBarButton,
|
|
8
|
+
} from 'react-native-navigation';
|
|
5
9
|
import ParentNode from '../Layouts/ParentNode';
|
|
6
10
|
import { LayoutStore } from '../Stores/LayoutStore';
|
|
7
11
|
import { NavigationButton } from './NavigationButton';
|
|
@@ -4,7 +4,7 @@ exports.ComponentScreen = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const
|
|
7
|
+
const react_native_navigation_1 = require("react-native-navigation");
|
|
8
8
|
const constants_1 = require("../constants");
|
|
9
9
|
const LayoutStore_1 = require("../Stores/LayoutStore");
|
|
10
10
|
const connect_1 = require("../connect");
|
|
@@ -43,7 +43,7 @@ exports.ComponentScreen = (0, connect_1.connect)(class extends react_1.Component
|
|
|
43
43
|
return react_1.default.createElement(react_native_1.View, { testID: bottomTabsOptions?.testID }, buttons);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
const Component =
|
|
46
|
+
const Component = react_native_navigation_1.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
|
|
47
47
|
if (!Component)
|
|
48
48
|
throw new Error(`${this.props.layoutNode.data.name} has not been registered.`);
|
|
49
49
|
return (react_1.default.createElement(react_native_1.View, { testID: this.isVisible() ? constants_1.VISIBLE_SCREEN_TEST_ID : undefined },
|
|
@@ -4,7 +4,7 @@ exports.NavigationButton = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const
|
|
7
|
+
const react_native_navigation_1 = require("react-native-navigation");
|
|
8
8
|
const EventsStore_1 = require("../Stores/EventsStore");
|
|
9
9
|
const NavigationButton = class extends react_1.Component {
|
|
10
10
|
ref = undefined;
|
|
@@ -23,8 +23,8 @@ const NavigationButton = class extends react_1.Component {
|
|
|
23
23
|
//@ts-ignore
|
|
24
24
|
const buttonComponentId = button.component.componentId;
|
|
25
25
|
//@ts-ignore
|
|
26
|
-
const Component =
|
|
27
|
-
const props =
|
|
26
|
+
const Component = react_native_navigation_1.Navigation.mock.store.getComponentClassForName(button.component.name)();
|
|
27
|
+
const props = react_native_navigation_1.Navigation.mock.store.getPropsForId(buttonComponentId);
|
|
28
28
|
return (react_1.default.createElement(react_native_1.TouchableOpacity, { onPress: () => {
|
|
29
29
|
if (this.ref) {
|
|
30
30
|
// @ts-ignore
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { OptionsTopBarButton } from '
|
|
3
|
-
import { OptionsTopBar, OptionsTopBarBackButton } from '../../src/interfaces/Options';
|
|
2
|
+
import { OptionsTopBar, OptionsTopBarBackButton, OptionsTopBarButton } from 'react-native-navigation';
|
|
4
3
|
import ParentNode from '../Layouts/ParentNode';
|
|
5
4
|
export interface TopBarProps {
|
|
6
5
|
layoutNode: ParentNode;
|
|
@@ -4,7 +4,7 @@ exports.TopBar = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
|
-
const
|
|
7
|
+
const react_native_navigation_1 = require("react-native-navigation");
|
|
8
8
|
const LayoutStore_1 = require("../Stores/LayoutStore");
|
|
9
9
|
const NavigationButton_1 = require("./NavigationButton");
|
|
10
10
|
const EventsStore_1 = require("../Stores/EventsStore");
|
|
@@ -54,8 +54,8 @@ const TopBar = class extends react_1.Component {
|
|
|
54
54
|
} }));
|
|
55
55
|
}
|
|
56
56
|
renderComponent(id, name, testID) {
|
|
57
|
-
const Component =
|
|
58
|
-
const props =
|
|
57
|
+
const Component = react_native_navigation_1.Navigation.mock.store.getComponentClassForName(name)();
|
|
58
|
+
const props = react_native_navigation_1.Navigation.mock.store.getPropsForId(id);
|
|
59
59
|
return (react_1.default.createElement(react_native_1.View, { key: id, testID: testID },
|
|
60
60
|
react_1.default.createElement(Component, { ...props, componentId: id })));
|
|
61
61
|
}
|