|
@@ -1,191 +1,28 @@
|
1
|
1
|
import * as ContainerRegistry from './containers/ContainerRegistry';
|
2
|
2
|
import * as Commands from './commands/Commands';
|
3
|
3
|
|
4
|
|
-export function registerContainer(containerName, getContainerFunc) {
|
5
|
|
- ContainerRegistry.registerContainer(containerName, getContainerFunc);
|
6
|
|
-}
|
7
|
|
-
|
8
|
|
-export function startApp(params) {
|
9
|
|
- Commands.startApp(params);
|
10
|
|
-}
|
11
|
|
-
|
12
|
|
-export function push(params) {
|
13
|
|
- //
|
14
|
|
-}
|
15
|
|
-
|
16
|
|
-export function pop(params) {
|
17
|
|
- //
|
18
|
|
-}
|
19
|
|
-
|
20
|
|
-export function showModal(params) {
|
21
|
|
- //
|
22
|
|
-}
|
23
|
|
-
|
24
|
|
-export function dismissModal(params) {
|
25
|
|
- //
|
26
|
|
-}
|
27
|
|
-
|
28
|
|
-export function dismissAllModals(params) {
|
29
|
|
- //
|
30
|
|
-}
|
31
|
|
-
|
32
|
|
-export function showLightbox(params) {
|
33
|
|
- //
|
34
|
|
-}
|
|
4
|
+import NativeEventsReceiver from './adapters/NativeEventsReceiver';
|
35
|
5
|
|
36
|
|
-export function dismissLightbox(params) {
|
37
|
|
- //
|
38
|
|
-}
|
|
6
|
+class Navigation {
|
|
7
|
+ constructor() {
|
|
8
|
+ this.nativeEventsReceiver = new NativeEventsReceiver();
|
|
9
|
+ }
|
39
|
10
|
|
40
|
|
-export function showInAppNotification(params) {
|
41
|
|
- //
|
42
|
|
-}
|
|
11
|
+ registerContainer(containerName, getContainerFunc) {
|
|
12
|
+ ContainerRegistry.registerContainer(containerName, getContainerFunc);
|
|
13
|
+ }
|
43
|
14
|
|
44
|
|
-export function dismissInAppNotification(params) {
|
45
|
|
- //
|
46
|
|
-}
|
|
15
|
+ startApp(params) {
|
|
16
|
+ Commands.startApp(params);
|
|
17
|
+ }
|
47
|
18
|
|
48
|
|
-export function popToRoot(params) {
|
49
|
|
- //
|
50
|
|
-}
|
|
19
|
+ onAppLaunched(fn) {
|
|
20
|
+ this.nativeEventsReceiver.onAppLaunched(fn);
|
|
21
|
+ }
|
51
|
22
|
|
52
|
|
-export function newStack(params) {
|
53
|
|
- //
|
54
|
23
|
}
|
55
|
24
|
|
56
|
|
-// new work on src/Navigation:
|
57
|
|
-//+function startApp(layout) {
|
58
|
|
-// + return platformSpecific.startApp(layout);
|
59
|
|
-// +}
|
60
|
|
-//+
|
61
|
|
-//+ startSingleScreenApp: startSingleScreenApp,
|
62
|
|
-// + startApp: startApp
|
63
|
|
-
|
64
|
|
-// new work on src/newParams.json:
|
65
|
|
-//
|
66
|
|
-//{
|
67
|
|
-// "screen": {
|
68
|
|
-// "screen": "example.FirstTabScreen",
|
69
|
|
-// "title": "Navigation",
|
70
|
|
-// "navigatorStyle": {
|
71
|
|
-// "navBarBackgroundColor": "#4dbce9",
|
72
|
|
-// "navBarTextColor": "#ffff00",
|
73
|
|
-// "navBarSubtitleTextColor": "#ff0000",
|
74
|
|
-// "navBarButtonColor": "#ffffff",
|
75
|
|
-// "statusBarTextColorScheme": "light",
|
76
|
|
-// "tabBarBackgroundColor": "#4dbce9",
|
77
|
|
-// "tabBarButtonColor": "#ffffff",
|
78
|
|
-// "tabBarSelectedButtonColor": "#ffff00"
|
79
|
|
-// },
|
80
|
|
-// "navigatorID": "navigatorID1_nav",
|
81
|
|
-// "screenInstanceID": "screenInstanceID2",
|
82
|
|
-// "navigatorEventID": "screenInstanceID2_events",
|
83
|
|
-// "navigatorButtons": {
|
84
|
|
-// "leftButtons": [
|
85
|
|
-// {
|
86
|
|
-// "icon": "http://localhost:8081/assets/img/navicon_menu@2x.png?platform=ios&hash=940519e495eac2a6236034f2bf88ce90",
|
87
|
|
-// "id": "menu"
|
88
|
|
-// }
|
89
|
|
-// ],
|
90
|
|
-// "rightButtons": [
|
91
|
|
-// {
|
92
|
|
-// "title": "Edit",
|
93
|
|
-// "id": "edit",
|
94
|
|
-// "enabled": true
|
95
|
|
-// },
|
96
|
|
-// {
|
97
|
|
-// "icon": "http://localhost:8081/assets/img/navicon_add@2x.png?platform=ios&hash=667fefa47fb5daebbc3943669dc6eb26",
|
98
|
|
-// "id": "add",
|
99
|
|
-// "enabled": true
|
100
|
|
-// }
|
101
|
|
-// ]
|
102
|
|
-// },
|
103
|
|
-// "screenId": "example.FirstTabScreen",
|
104
|
|
-// "styleParams": {
|
105
|
|
-// "topBarColor": 4283284713,
|
106
|
|
-// "titleBarTitleColor": 4294967040,
|
107
|
|
-// "titleBarButtonColor": 4294967295,
|
108
|
|
-// "drawBelowTopBar": true,
|
109
|
|
-// "drawScreenAboveBottomTabs": true,
|
110
|
|
-// "bottomTabsColor": 4283284713,
|
111
|
|
-// "bottomTabsButtonColor": 4294967295,
|
112
|
|
-// "bottomTabsSelectedButtonColor": 4294967040
|
113
|
|
-// },
|
114
|
|
-// "navigationParams": {
|
115
|
|
-// "screenInstanceID": "screenInstanceID2",
|
116
|
|
-// "navigatorID": "navigatorID1_nav",
|
117
|
|
-// "navigatorEventID": "screenInstanceID2_events"
|
118
|
|
-// }
|
119
|
|
-//},
|
120
|
|
-// "drawer": {
|
121
|
|
-// "left": {
|
122
|
|
-// "screen": "example.SideMenu"
|
123
|
|
-// }
|
124
|
|
-//},
|
125
|
|
-// "appStyle": null,
|
126
|
|
-// "sideMenu": {
|
127
|
|
-// "left": {
|
128
|
|
-// "screenId": "example.SideMenu",
|
129
|
|
-// "navigatorID": "navigatorID3_nav",
|
130
|
|
-// "screenInstanceID": "screenInstanceID4",
|
131
|
|
-// "navigatorEventID": "screenInstanceID4_events",
|
132
|
|
-// "navigationParams": {
|
133
|
|
-// "screenInstanceID": "screenInstanceID4",
|
134
|
|
-// "navigatorID": "navigatorID3_nav",
|
135
|
|
-// "navigatorEventID": "screenInstanceID4_events"
|
136
|
|
-// }
|
137
|
|
-// },
|
138
|
|
-// "right": null
|
139
|
|
-//},
|
140
|
|
-// "animateShow": true
|
141
|
|
-//}
|
|
25
|
+const singleton = new Navigation();
|
142
|
26
|
|
143
|
|
-// new work on platformSpecificDeprecated.ios.js:
|
144
|
|
-//import Navigation from './../Navigation';
|
145
|
|
-//import Controllers, {Modal, Notification} from './controllers';
|
146
|
|
-//+import _ from 'lodash';
|
147
|
|
-//+import PropRegistry from '../PropRegistry';
|
148
|
|
-//+import * as newPlatformSpecific from './../platformSpecific';
|
149
|
|
-//+
|
150
|
|
-//const React = Controllers.hijackReact();
|
151
|
|
-//const {
|
152
|
|
-// ControllerRegistry,
|
153
|
|
-// TabBarControllerIOS,
|
154
|
|
-// NavigationControllerIOS,
|
155
|
|
-// DrawerControllerIOS
|
156
|
|
-//} = React;
|
157
|
|
-//-import _ from 'lodash';
|
158
|
|
-//
|
159
|
|
-//-import PropRegistry from '../PropRegistry';
|
160
|
|
-//+function startApp(layout) {
|
161
|
|
-// + newPlatformSpecific.startApp(layout);
|
162
|
|
-// +}
|
163
|
|
-//
|
164
|
|
-//function startTabBasedApp(params) {
|
165
|
|
-// if (!params.tabs) {
|
166
|
|
-// @@ -566,6 +571,7 @@ function dismissContextualMenu() {
|
167
|
|
-// }
|
168
|
|
-//
|
169
|
|
-// export default {
|
170
|
|
-// + startApp,
|
171
|
|
-// startTabBasedApp,
|
172
|
|
-// startSingleScreenApp,
|
173
|
|
-// navigatorPush,
|
|
27
|
+module.exports = singleton;
|
174
|
28
|
|
175
|
|
-//new work on platformSpecific.ios.js:
|
176
|
|
-//-module.exports = {};
|
177
|
|
-//+import React, {Component} from 'react';
|
178
|
|
-//+import {AppRegistry, NativeModules} from 'react-native';
|
179
|
|
-//+import _ from 'lodash';
|
180
|
|
-//+import PropRegistry from './PropRegistry';
|
181
|
|
-//+
|
182
|
|
-// +const NativeAppMAnager = NativeModules.RCCManager;
|
183
|
|
-//+
|
184
|
|
-// +function startApp(layout) {
|
185
|
|
-// +
|
186
|
|
-// + NativeAppMAnager.startApp(layout);
|
187
|
|
-// +}
|
188
|
|
-//+
|
189
|
|
-//+module.exports = {
|
190
|
|
-// + startApp
|
191
|
|
-// +};
|