react-native-navigation 7.45.0 → 7.47.0
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 +2 -1
- package/lib/Mock/Components/LayoutComponent.tsx +9 -0
- package/lib/Mock/Components/SideMenu.tsx +27 -0
- package/lib/Mock/Layouts/BottomTabsNode.ts +4 -2
- package/lib/Mock/Layouts/LayoutNodeFactory.ts +14 -1
- package/lib/Mock/Layouts/ParentNode.ts +4 -0
- package/lib/Mock/Layouts/SideMenu.ts +87 -0
- package/lib/Mock/Stores/LayoutStore.ts +42 -10
- package/lib/Mock/actions/layoutActions.ts +11 -0
- package/lib/Mock/index.js +2 -2
- package/lib/Mock/mocks/NativeCommandsSender.tsx +1 -0
- package/lib/android/app/build.gradle +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java +3 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalHostLayout.kt +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java +2 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactViewGroup.kt +2 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewUtils.java +4 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/LayoutDirectionApplier.kt +4 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorAnimator.kt +4 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorEvaluator.kt +2 -4
- package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +6 -6
- package/lib/dist/Mock/Application.d.ts +6 -4
- package/lib/dist/Mock/Components/BottomTabs.d.ts +13 -9
- package/lib/dist/Mock/Components/ComponentScreen.d.ts +7 -5
- package/lib/dist/Mock/Components/ComponentScreen.js +2 -1
- package/lib/dist/Mock/Components/LayoutComponent.d.ts +13 -9
- package/lib/dist/Mock/Components/LayoutComponent.js +9 -0
- package/lib/dist/Mock/Components/Modals.d.ts +13 -9
- package/lib/dist/Mock/Components/NavigationButton.d.ts +15 -11
- package/lib/dist/Mock/Components/Overlays.d.ts +13 -9
- package/lib/dist/Mock/Components/SideMenu.d.ts +62 -0
- package/lib/dist/Mock/Components/SideMenu.js +25 -0
- package/lib/dist/Mock/Components/Stack.d.ts +13 -9
- package/lib/dist/Mock/Components/TopBar.d.ts +9 -7
- package/lib/dist/Mock/Layouts/BottomTabsNode.d.ts +1 -1
- package/lib/dist/Mock/Layouts/BottomTabsNode.js +3 -2
- package/lib/dist/Mock/Layouts/LayoutNodeFactory.d.ts +2 -1
- package/lib/dist/Mock/Layouts/LayoutNodeFactory.js +10 -1
- package/lib/dist/Mock/Layouts/ParentNode.d.ts +1 -0
- package/lib/dist/Mock/Layouts/ParentNode.js +3 -0
- package/lib/dist/Mock/Layouts/SideMenu.d.ts +31 -0
- package/lib/dist/Mock/Layouts/SideMenu.js +80 -0
- package/lib/dist/Mock/Stores/LayoutStore.js +38 -9
- package/lib/dist/Mock/actions/layoutActions.d.ts +3 -0
- package/lib/dist/Mock/actions/layoutActions.js +11 -1
- package/lib/dist/Mock/connect.js +1 -2
- package/lib/dist/Mock/index.js +2 -2
- package/lib/dist/Mock/mocks/NativeCommandsSender.js +1 -0
- package/lib/dist/src/adapters/NativeEventsReceiver.js +1 -1
- package/lib/dist/src/adapters/TouchablePreview.d.ts +2 -2
- package/lib/dist/src/commands/LayoutType.js +1 -1
- package/lib/dist/src/components/Modal.d.ts +1 -1
- package/lib/dist/src/interfaces/CommandName.js +1 -1
- package/lib/dist/src/interfaces/Options.js +2 -2
- package/lib/dist/src/types.d.ts +0 -1
- package/lib/ios/BottomTabsBasePresenter.m +2 -3
- package/lib/ios/RNNAppDelegate.mm +3 -2
- package/lib/ios/RNNConvert.h +0 -2
- package/lib/ios/RNNConvert.m +0 -4
- package/lib/ios/RNNStackPresenter.m +2 -2
- package/lib/src/adapters/NativeEventsReceiver.ts +3 -3
- package/lib/src/adapters/TouchablePreview.tsx +3 -3
- package/package.json +31 -37
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SideMenuCenterNode = exports.SideMenuRightNode = exports.SideMenuLeftNode = exports.SideMenuNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
|
|
6
|
+
const layoutActions = tslib_1.__importStar(require("../actions/layoutActions"));
|
|
7
|
+
const isCenterChild = (child) => child.type === 'SideMenuCenter';
|
|
8
|
+
const isLeftChild = (child) => child.type === 'SideMenuLeft';
|
|
9
|
+
const isRightChild = (child) => child.type === 'SideMenuRight';
|
|
10
|
+
class SideMenuRootNode extends ParentNode_1.default {
|
|
11
|
+
visibleChild;
|
|
12
|
+
constructor(layout, parentNode) {
|
|
13
|
+
super(layout, 'SideMenuRoot', parentNode);
|
|
14
|
+
this.visibleChild = this._getCenterChild();
|
|
15
|
+
if (!this.visibleChild) {
|
|
16
|
+
throw new Error('SideMenuRootNode must have a SideMenuCenter child');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
applyOptions(_options) {
|
|
20
|
+
super.applyOptions(_options);
|
|
21
|
+
this._updateVisibility(_options);
|
|
22
|
+
}
|
|
23
|
+
mergeOptions(options) {
|
|
24
|
+
super.mergeOptions(options);
|
|
25
|
+
this._updateVisibility(options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @override
|
|
29
|
+
*/
|
|
30
|
+
getVisibleLayout() {
|
|
31
|
+
return this.visibleChild.getVisibleLayout();
|
|
32
|
+
}
|
|
33
|
+
_updateVisibility(options) {
|
|
34
|
+
if (options.sideMenu) {
|
|
35
|
+
if (options.sideMenu.left?.visible) {
|
|
36
|
+
this.visibleChild = this._getLeftChild();
|
|
37
|
+
layoutActions.openSideMenu(this.visibleChild);
|
|
38
|
+
}
|
|
39
|
+
else if (options.sideMenu.right?.visible) {
|
|
40
|
+
this.visibleChild = this._getRightChild();
|
|
41
|
+
layoutActions.openSideMenu(this.visibleChild);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.visibleChild = this._getCenterChild();
|
|
45
|
+
layoutActions.closeSideMenu(this.visibleChild);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
_getCenterChild = () => this.children.find(isCenterChild);
|
|
50
|
+
_getLeftChild = () => this.children.find(isLeftChild);
|
|
51
|
+
_getRightChild = () => this.children.find(isRightChild);
|
|
52
|
+
}
|
|
53
|
+
exports.default = SideMenuRootNode;
|
|
54
|
+
class SideMenuNode extends ParentNode_1.default {
|
|
55
|
+
constructor(layout, type, parentNode) {
|
|
56
|
+
super(layout, type, parentNode);
|
|
57
|
+
}
|
|
58
|
+
getVisibleLayout() {
|
|
59
|
+
return this.children[0].getVisibleLayout();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.SideMenuNode = SideMenuNode;
|
|
63
|
+
class SideMenuLeftNode extends SideMenuNode {
|
|
64
|
+
constructor(layout, parentNode) {
|
|
65
|
+
super(layout, 'SideMenuLeft', parentNode);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.SideMenuLeftNode = SideMenuLeftNode;
|
|
69
|
+
class SideMenuRightNode extends SideMenuNode {
|
|
70
|
+
constructor(layout, parentNode) {
|
|
71
|
+
super(layout, 'SideMenuRight', parentNode);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.SideMenuRightNode = SideMenuRightNode;
|
|
75
|
+
class SideMenuCenterNode extends SideMenuNode {
|
|
76
|
+
constructor(layout, parentNode) {
|
|
77
|
+
super(layout, 'SideMenuCenter', parentNode);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.SideMenuCenterNode = SideMenuCenterNode;
|
|
@@ -9,6 +9,7 @@ const state = remx.state({
|
|
|
9
9
|
root: {},
|
|
10
10
|
modals: [],
|
|
11
11
|
overlays: [],
|
|
12
|
+
sideMenu: undefined,
|
|
12
13
|
});
|
|
13
14
|
const setters = remx.setters({
|
|
14
15
|
setRoot(layout) {
|
|
@@ -73,6 +74,23 @@ const setters = remx.setters({
|
|
|
73
74
|
selectTabIndex(layout, index) {
|
|
74
75
|
getters.getLayoutById(layout.nodeId).selectedIndex = index;
|
|
75
76
|
},
|
|
77
|
+
openSideMenu(layout) {
|
|
78
|
+
if (state.sideMenu) {
|
|
79
|
+
throw new Error('A side-menu is already open; Mocked-testing of multiple side-menu scenarios is not supported yet.' +
|
|
80
|
+
' You can submit a request in https://github.com/wix/react-native-navigation/issues/new/choose.');
|
|
81
|
+
}
|
|
82
|
+
state.sideMenu = layout;
|
|
83
|
+
},
|
|
84
|
+
closeSideMenu(_layout) {
|
|
85
|
+
state.sideMenu = undefined;
|
|
86
|
+
},
|
|
87
|
+
applyOptions(componentId, options) {
|
|
88
|
+
const layout = getters.getLayoutById(componentId);
|
|
89
|
+
if (layout)
|
|
90
|
+
layout.applyOptions(options);
|
|
91
|
+
else
|
|
92
|
+
console.warn(`[RNN error] Merge options failure: cannot find layout for: ${componentId}`);
|
|
93
|
+
},
|
|
76
94
|
mergeOptions(componentId, options) {
|
|
77
95
|
const layout = getters.getLayoutById(componentId);
|
|
78
96
|
if (layout)
|
|
@@ -86,14 +104,25 @@ const getters = remx.getters({
|
|
|
86
104
|
return state.root;
|
|
87
105
|
},
|
|
88
106
|
getVisibleLayout() {
|
|
107
|
+
let layout;
|
|
89
108
|
if (state.modals.length > 0) {
|
|
90
|
-
|
|
109
|
+
layout = lodash_1.default.last(state.modals);
|
|
110
|
+
}
|
|
111
|
+
else if (!lodash_1.default.isEqual(state.root, {})) {
|
|
112
|
+
layout = state.root;
|
|
113
|
+
}
|
|
114
|
+
// Note: While this logic should be fair for all use cases (i.e. even multiple side-menus across tabs),
|
|
115
|
+
// there is no current test case that justifies it. Nevertheless, it's required to pass the tests,
|
|
116
|
+
// because otherwise getVisibleLayout() would not be revisited whenever side-menus are opened/closed.
|
|
117
|
+
if (layout && state.sideMenu && findNode(state.sideMenu.nodeId, layout)) {
|
|
118
|
+
layout = state.sideMenu.parentNode;
|
|
91
119
|
}
|
|
92
|
-
|
|
93
|
-
return state.root.getVisibleLayout();
|
|
120
|
+
return layout?.getVisibleLayout();
|
|
94
121
|
},
|
|
95
122
|
isVisibleLayout(layout) {
|
|
96
|
-
|
|
123
|
+
const nodeId = layout.nodeId;
|
|
124
|
+
const visibleLayout = getters.getVisibleLayout();
|
|
125
|
+
return visibleLayout?.nodeId === nodeId;
|
|
97
126
|
},
|
|
98
127
|
getModals() {
|
|
99
128
|
return state.modals;
|
|
@@ -103,11 +132,11 @@ const getters = remx.getters({
|
|
|
103
132
|
},
|
|
104
133
|
getLayoutById(layoutId) {
|
|
105
134
|
if (getters.getModalById(layoutId))
|
|
106
|
-
return
|
|
107
|
-
return
|
|
135
|
+
return findNode(layoutId, getters.getModalById(layoutId));
|
|
136
|
+
return findNode(layoutId, state.root);
|
|
108
137
|
},
|
|
109
138
|
getModalById(layoutId) {
|
|
110
|
-
return lodash_1.default.find(state.modals, (layout) =>
|
|
139
|
+
return lodash_1.default.find(state.modals, (layout) => findNode(layoutId, layout));
|
|
111
140
|
},
|
|
112
141
|
getLayoutChildren(layoutId) {
|
|
113
142
|
return getters.getLayoutById(layoutId).children;
|
|
@@ -117,14 +146,14 @@ const getters = remx.getters({
|
|
|
117
146
|
lodash_1.default.find(state.modals, (layout) => findStack(layoutId, layout)));
|
|
118
147
|
},
|
|
119
148
|
});
|
|
120
|
-
function
|
|
149
|
+
function findNode(layoutId, layout) {
|
|
121
150
|
if (layoutId === layout.nodeId) {
|
|
122
151
|
return layout;
|
|
123
152
|
}
|
|
124
153
|
else if (layout.children) {
|
|
125
154
|
for (let i = 0; i < layout.children.length; i += 1) {
|
|
126
155
|
const child = layout.children[i];
|
|
127
|
-
const result =
|
|
156
|
+
const result = findNode(layoutId, child);
|
|
128
157
|
if (result !== false) {
|
|
129
158
|
return result;
|
|
130
159
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import ParentNode from '../Layouts/ParentNode';
|
|
2
|
+
import { SideMenuNode } from '../Layouts/SideMenu';
|
|
2
3
|
export declare const switchTabByIndex: (bottomTabs: ParentNode | undefined, index: number) => void;
|
|
4
|
+
export declare const openSideMenu: (sideMenu: SideMenuNode) => void;
|
|
5
|
+
export declare const closeSideMenu: (layout: SideMenuNode) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.switchTabByIndex = void 0;
|
|
3
|
+
exports.closeSideMenu = exports.openSideMenu = exports.switchTabByIndex = void 0;
|
|
4
4
|
const LayoutStore_1 = require("../Stores/LayoutStore");
|
|
5
5
|
const switchTabByIndex = (bottomTabs, index) => {
|
|
6
6
|
if (bottomTabs) {
|
|
@@ -10,3 +10,13 @@ const switchTabByIndex = (bottomTabs, index) => {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
exports.switchTabByIndex = switchTabByIndex;
|
|
13
|
+
const openSideMenu = (sideMenu) => {
|
|
14
|
+
LayoutStore_1.LayoutStore.openSideMenu(sideMenu);
|
|
15
|
+
LayoutStore_1.LayoutStore.getVisibleLayout().componentDidAppear();
|
|
16
|
+
};
|
|
17
|
+
exports.openSideMenu = openSideMenu;
|
|
18
|
+
const closeSideMenu = (layout) => {
|
|
19
|
+
LayoutStore_1.LayoutStore.getVisibleLayout().componentDidDisappear();
|
|
20
|
+
LayoutStore_1.LayoutStore.closeSideMenu(layout);
|
|
21
|
+
};
|
|
22
|
+
exports.closeSideMenu = closeSideMenu;
|
package/lib/dist/Mock/connect.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.connect =
|
|
3
|
+
exports.connect = connect;
|
|
4
4
|
const remx_1 = require("remx");
|
|
5
5
|
function connect(component) {
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
return (0, remx_1.connect)()(component);
|
|
8
8
|
}
|
|
9
|
-
exports.connect = connect;
|
package/lib/dist/Mock/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ApplicationMock = void 0;
|
|
4
|
+
exports.mockNativeComponents = mockNativeComponents;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
exports.ApplicationMock = require('./Application').Application;
|
|
6
7
|
tslib_1.__exportStar(require("./constants"), exports);
|
|
@@ -11,4 +12,3 @@ function mockNativeComponents() {
|
|
|
11
12
|
const { Navigation } = require('react-native-navigation');
|
|
12
13
|
Navigation.mockNativeComponents(new NativeCommandsSender(), new NativeEventsReceiver(), new AppRegistryService());
|
|
13
14
|
}
|
|
14
|
-
exports.mockNativeComponents = mockNativeComponents;
|
|
@@ -34,6 +34,7 @@ class NativeCommandsSender {
|
|
|
34
34
|
const layoutNode = LayoutNodeFactory_1.default.create(layout, stack);
|
|
35
35
|
stack.getVisibleLayout().componentDidDisappear();
|
|
36
36
|
LayoutStore_1.LayoutStore.push(layoutNode, stack);
|
|
37
|
+
LayoutStore_1.LayoutStore.applyOptions(layoutNode.nodeId, layoutNode.data.options);
|
|
37
38
|
stack.getVisibleLayout().componentDidAppear();
|
|
38
39
|
resolve(stack.getVisibleLayout().nodeId);
|
|
39
40
|
this.reportCommandCompletion(CommandName_1.CommandName.Push, commandId);
|
|
@@ -8,7 +8,7 @@ interface GestureResponderEventWithForce extends NativeSyntheticEvent<NativeTouc
|
|
|
8
8
|
}
|
|
9
9
|
export interface Props {
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
-
touchableComponent?:
|
|
11
|
+
touchableComponent?: TouchableHighlight | TouchableOpacity | TouchableNativeFeedback | TouchableWithoutFeedback | React.ReactNode;
|
|
12
12
|
onPress?: () => void;
|
|
13
13
|
onPressIn?: (payload: {
|
|
14
14
|
reactTag: number | null;
|
|
@@ -38,6 +38,6 @@ export declare class TouchablePreview extends React.PureComponent<Props> {
|
|
|
38
38
|
onTouchStart: (event: GestureResponderEvent) => void;
|
|
39
39
|
onTouchMove: (event: GestureResponderEventWithForce) => void;
|
|
40
40
|
onTouchEnd: () => void;
|
|
41
|
-
render():
|
|
41
|
+
render(): JSX.Element;
|
|
42
42
|
}
|
|
43
43
|
export {};
|
|
@@ -13,4 +13,4 @@ var LayoutType;
|
|
|
13
13
|
LayoutType["TopTabs"] = "TopTabs";
|
|
14
14
|
LayoutType["ExternalComponent"] = "ExternalComponent";
|
|
15
15
|
LayoutType["SplitView"] = "SplitView";
|
|
16
|
-
})(LayoutType
|
|
16
|
+
})(LayoutType || (exports.LayoutType = LayoutType = {}));
|
|
@@ -19,4 +19,4 @@ var CommandName;
|
|
|
19
19
|
CommandName["DismissOverlay"] = "dismissOverlay";
|
|
20
20
|
CommandName["DismissAllOverlays"] = "dismissAllOverlays";
|
|
21
21
|
CommandName["GetLaunchArgs"] = "getLaunchArgs";
|
|
22
|
-
})(CommandName
|
|
22
|
+
})(CommandName || (exports.CommandName = CommandName = {}));
|
|
@@ -11,11 +11,11 @@ var OptionsModalPresentationStyle;
|
|
|
11
11
|
OptionsModalPresentationStyle["popover"] = "popover";
|
|
12
12
|
OptionsModalPresentationStyle["fullScreen"] = "fullScreen";
|
|
13
13
|
OptionsModalPresentationStyle["none"] = "none";
|
|
14
|
-
})(OptionsModalPresentationStyle
|
|
14
|
+
})(OptionsModalPresentationStyle || (exports.OptionsModalPresentationStyle = OptionsModalPresentationStyle = {}));
|
|
15
15
|
var OptionsModalTransitionStyle;
|
|
16
16
|
(function (OptionsModalTransitionStyle) {
|
|
17
17
|
OptionsModalTransitionStyle["coverVertical"] = "coverVertical";
|
|
18
18
|
OptionsModalTransitionStyle["crossDissolve"] = "crossDissolve";
|
|
19
19
|
OptionsModalTransitionStyle["flipHorizontal"] = "flipHorizontal";
|
|
20
20
|
OptionsModalTransitionStyle["partialCurl"] = "partialCurl";
|
|
21
|
-
})(OptionsModalTransitionStyle
|
|
21
|
+
})(OptionsModalTransitionStyle || (exports.OptionsModalTransitionStyle = OptionsModalTransitionStyle = {}));
|
package/lib/dist/src/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#import "BottomTabsBasePresenter.h"
|
|
2
2
|
#import "RNNBottomTabsController.h"
|
|
3
|
-
#import "RNNConvert.h"
|
|
4
3
|
#import "UIImage+utils.h"
|
|
5
4
|
|
|
6
5
|
@implementation BottomTabsBasePresenter
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
[self applyBackgroundColor:[withDefault.bottomTabs.backgroundColor withDefault:nil]
|
|
31
30
|
translucent:[withDefault.bottomTabs.translucent withDefault:NO]];
|
|
32
31
|
[bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow withDefault:NO]];
|
|
33
|
-
[bottomTabs setTabBarStyle:[
|
|
32
|
+
[bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle
|
|
34
33
|
withDefault:@"default"]]];
|
|
35
34
|
[self applyTabBarBorder:withDefault.bottomTabs];
|
|
36
35
|
[self applyTabBarShadow:withDefault.bottomTabs.shadow];
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
if (mergeOptions.bottomTabs.barStyle.hasValue) {
|
|
64
|
-
[bottomTabs setTabBarStyle:[
|
|
63
|
+
[bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:mergeOptions.bottomTabs.barStyle.get]];
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
if (mergeOptions.bottomTabs.translucent.hasValue) {
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
#import <ReactNativeNavigation/ReactNativeNavigation.h>
|
|
3
3
|
|
|
4
4
|
#if RCT_NEW_ARCH_ENABLED
|
|
5
|
-
|
|
5
|
+
#import "RCTAppSetupUtils.h"
|
|
6
|
+
#import "RCTLegacyInteropComponents.h"
|
|
6
7
|
#import <React/CoreModulesPlugins.h>
|
|
7
8
|
#import <React/RCTCxxBridgeDelegate.h>
|
|
8
9
|
#import <React/RCTLegacyViewManagerInteropComponentView.h>
|
|
9
10
|
#import <React/RCTSurfacePresenter.h>
|
|
10
|
-
#import <React/RCTSurfacePresenterStub.h>
|
|
11
11
|
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
|
12
|
+
#import <React/RCTSurfacePresenterStub.h>
|
|
12
13
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
13
14
|
#import <react/config/ReactNativeConfig.h>
|
|
14
15
|
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
package/lib/ios/RNNConvert.h
CHANGED
package/lib/ios/RNNConvert.m
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
stack.interactivePopGestureRecognizer.delegate = _interactivePopGestureDelegate;
|
|
70
70
|
|
|
71
71
|
[stack
|
|
72
|
-
setBarStyle:[
|
|
72
|
+
setBarStyle:[RCTConvert UIBarStyle:[withDefault.topBar.barStyle withDefault:@"default"]]];
|
|
73
73
|
[stack setRootBackgroundImage:[withDefault.rootBackgroundImage withDefault:nil]];
|
|
74
74
|
[stack setNavigationBarTestId:[withDefault.topBar.testID withDefault:nil]];
|
|
75
75
|
[stack setNavigationBarVisible:[withDefault.topBar.visible withDefault:YES]
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
if (mergeOptions.topBar.barStyle.hasValue) {
|
|
130
|
-
[stack setBarStyle:[
|
|
130
|
+
[stack setBarStyle:[RCTConvert UIBarStyle:mergeOptions.topBar.barStyle.get]];
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
if (mergeOptions.topBar.background.clipToBounds.hasValue) {
|
|
@@ -23,14 +23,14 @@ export class NativeEventsReceiver {
|
|
|
23
23
|
constructor() {
|
|
24
24
|
try {
|
|
25
25
|
this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
|
|
26
|
-
} catch {
|
|
27
|
-
this.emitter = {
|
|
26
|
+
} catch (e) {
|
|
27
|
+
this.emitter = ({
|
|
28
28
|
addListener: () => {
|
|
29
29
|
return {
|
|
30
30
|
remove: () => undefined,
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
|
-
} as any as NativeEventEmitter;
|
|
33
|
+
} as any) as NativeEventEmitter;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -22,8 +22,8 @@ interface GestureResponderEventWithForce extends NativeSyntheticEvent<NativeTouc
|
|
|
22
22
|
export interface Props {
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
touchableComponent?:
|
|
25
|
-
|
|
|
26
|
-
|
|
|
25
|
+
| TouchableHighlight
|
|
26
|
+
| TouchableOpacity
|
|
27
27
|
| TouchableNativeFeedback
|
|
28
28
|
| TouchableWithoutFeedback
|
|
29
29
|
| React.ReactNode;
|
|
@@ -121,7 +121,7 @@ export class TouchablePreview extends React.PureComponent<Props> {
|
|
|
121
121
|
const Touchable =
|
|
122
122
|
Platform.OS === 'ios' && touchableComponent instanceof TouchableNativeFeedback
|
|
123
123
|
? TouchableWithoutFeedback
|
|
124
|
-
: (touchableComponent as React.Component);
|
|
124
|
+
: (touchableComponent as typeof React.Component);
|
|
125
125
|
|
|
126
126
|
// Wrap component with Touchable for handling platform touches
|
|
127
127
|
// and a single react View for detecting force and timing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.47.0",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -64,43 +64,40 @@
|
|
|
64
64
|
"hoist-non-react-statics": "3.x.x",
|
|
65
65
|
"lodash": "4.17.x",
|
|
66
66
|
"prop-types": "15.x.x",
|
|
67
|
-
"react-lifecycles-compat": "
|
|
67
|
+
"react-lifecycles-compat": "2.0.0",
|
|
68
68
|
"tslib": "1.9.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@babel/core": "
|
|
71
|
+
"@babel/core": "7.22.9",
|
|
72
72
|
"@babel/plugin-proposal-export-default-from": "7.10.1",
|
|
73
73
|
"@babel/plugin-proposal-export-namespace-from": "7.10.1",
|
|
74
|
-
"@babel/
|
|
75
|
-
"@babel/
|
|
76
|
-
"@babel/
|
|
77
|
-
"@react-native-
|
|
78
|
-
"@react-native
|
|
79
|
-
"@react-native
|
|
80
|
-
"@react-native-community/
|
|
81
|
-
"@react-native-community/
|
|
82
|
-
"@react-native-community/
|
|
83
|
-
"@react-native/
|
|
84
|
-
"@react-native/eslint-config": "0.76.6",
|
|
85
|
-
"@react-native/metro-config": "0.76.6",
|
|
86
|
-
"@react-native/typescript-config": "0.76.6",
|
|
74
|
+
"@babel/runtime": "7.22.6",
|
|
75
|
+
"@babel/types": "7.22.5",
|
|
76
|
+
"@babel/preset-env": "^7.22.9",
|
|
77
|
+
"@react-native/metro-config": "^0.73.2",
|
|
78
|
+
"@react-native/babel-preset": "^0.73.18",
|
|
79
|
+
"@react-native/typescript-config": "^0.73.1",
|
|
80
|
+
"@react-native-community/blur": "^4.4.1",
|
|
81
|
+
"@react-native-community/datetimepicker": "^3.4.7",
|
|
82
|
+
"@react-native-community/eslint-config": "2.0.0",
|
|
83
|
+
"@react-native-community/netinfo": "^5.9.4",
|
|
87
84
|
"@testing-library/jest-native": "^5.4.2",
|
|
88
|
-
"@testing-library/react-native": "^
|
|
89
|
-
"@types/hoist-non-react-statics": "^3.
|
|
85
|
+
"@testing-library/react-native": "^12.0.1",
|
|
86
|
+
"@types/hoist-non-react-statics": "^3.0.1",
|
|
90
87
|
"@types/jasmine": "3.5.10",
|
|
91
88
|
"@types/jest": "27.0.2",
|
|
92
89
|
"@types/lodash": "^4.14.149",
|
|
93
|
-
"@types/react": "
|
|
94
|
-
"@types/react-
|
|
95
|
-
"@
|
|
96
|
-
"@typescript-eslint/
|
|
90
|
+
"@types/react": "16.9.41",
|
|
91
|
+
"@types/react-native": "0.63.1",
|
|
92
|
+
"@types/react-test-renderer": "16.9.2",
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
94
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
97
95
|
"babel-jest": "^27.0.0",
|
|
98
96
|
"clang-format": "^1.4.0",
|
|
99
|
-
"detox": "20.
|
|
97
|
+
"detox": "20.19.5",
|
|
100
98
|
"detox-testing-library-rnn-adapter": "^2.0.3",
|
|
101
|
-
"eslint": "
|
|
99
|
+
"eslint": "7.32.0",
|
|
102
100
|
"eslint-config-prettier": "6.11.0",
|
|
103
|
-
"eslint-formatter-codeframe": "^7.32.1",
|
|
104
101
|
"eslint-plugin-prettier": "3.1.4",
|
|
105
102
|
"github-release-notes": "https://github.com/yogevbd/github-release-notes/tarball/e601b3dba72dcd6cba323c1286ea6dd0c0110b58",
|
|
106
103
|
"husky": "4.2.5",
|
|
@@ -110,22 +107,22 @@
|
|
|
110
107
|
"metro-react-native-babel-preset": "^0.76.2",
|
|
111
108
|
"pixelmatch": "^5.2.1",
|
|
112
109
|
"pngjs": "^6.0.0",
|
|
113
|
-
"prettier": "2.
|
|
114
|
-
"react": "18.
|
|
115
|
-
"react-native": "0.
|
|
110
|
+
"prettier": "2.1.2",
|
|
111
|
+
"react": "18.2.0",
|
|
112
|
+
"react-native": "0.73.3",
|
|
116
113
|
"react-native-fast-image": "^8.6.3",
|
|
117
|
-
"react-native-gesture-handler": "
|
|
118
|
-
"react-native-reanimated": "3.16.
|
|
114
|
+
"react-native-gesture-handler": "2.14.1",
|
|
115
|
+
"react-native-reanimated": "3.16.1",
|
|
119
116
|
"react-native-ui-lib": "7.3.6",
|
|
120
117
|
"react-redux": "5.x.x",
|
|
121
|
-
"react-test-renderer": "18.
|
|
118
|
+
"react-test-renderer": "18.2.0",
|
|
122
119
|
"redux": "3.x.x",
|
|
123
120
|
"remx": "3.x.x",
|
|
124
121
|
"semver": "5.x.x",
|
|
125
122
|
"shell-utils": "1.x.x",
|
|
126
123
|
"ts-mockito": "^2.3.1",
|
|
127
124
|
"typedoc": "0.x.x",
|
|
128
|
-
"typescript": "5.
|
|
125
|
+
"typescript": "5.5.4"
|
|
129
126
|
},
|
|
130
127
|
"husky": {
|
|
131
128
|
"hooks": {
|
|
@@ -171,7 +168,7 @@
|
|
|
171
168
|
"emulator": {
|
|
172
169
|
"type": "android.emulator",
|
|
173
170
|
"device": {
|
|
174
|
-
"avdName": "
|
|
171
|
+
"avdName": "Pixel_API_28"
|
|
175
172
|
}
|
|
176
173
|
}
|
|
177
174
|
},
|
|
@@ -191,10 +188,7 @@
|
|
|
191
188
|
"type": "android.apk",
|
|
192
189
|
"binaryPath": "playground/android/app/build/outputs/apk/debug/app-debug.apk",
|
|
193
190
|
"start": "npm start -- --e2e",
|
|
194
|
-
"build": "cd playground/android && ./gradlew app:assembleDebug app:assembleAndroidTest -DtestBuildType=debug"
|
|
195
|
-
"reversePorts": [
|
|
196
|
-
8081
|
|
197
|
-
]
|
|
191
|
+
"build": "cd playground/android && ./gradlew app:assembleDebug app:assembleAndroidTest -DtestBuildType=debug"
|
|
198
192
|
},
|
|
199
193
|
"android.release": {
|
|
200
194
|
"type": "android.apk",
|