hybrid-navigation 2.16.2-beta.1 → 2.16.2-beta.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/Navigation.d.ts +2 -17
- package/lib/index.d.ts +1 -2
- package/package.json +1 -1
- package/src/Navigation.ts +40 -39
- package/src/index.ts +1 -1
package/lib/Navigation.d.ts
CHANGED
|
@@ -17,30 +17,16 @@ export type NavigationSubscription = {
|
|
|
17
17
|
};
|
|
18
18
|
export type HOC = (WrappedComponent: React.ComponentType<any>) => React.ComponentType<any>;
|
|
19
19
|
export interface Navigation {
|
|
20
|
-
}
|
|
21
|
-
declare class NavigationImpl implements Navigation {
|
|
22
|
-
private dispatchHandler;
|
|
23
|
-
private resultHandler;
|
|
24
|
-
private buttonHandler;
|
|
25
|
-
private layoutHandler;
|
|
26
|
-
private visibilityHandler;
|
|
27
|
-
constructor();
|
|
28
|
-
private wrap?;
|
|
29
|
-
private hoc?;
|
|
30
|
-
private registerEnded;
|
|
31
20
|
startRegisterComponent(hoc?: HOC): void;
|
|
32
21
|
endRegisterComponent(): void;
|
|
33
22
|
registerComponent(appKey: string, getComponentFunc: ComponentProvider, routeConfig?: RouteConfig): void;
|
|
34
|
-
private _routeConfigs;
|
|
35
|
-
private registerRoute;
|
|
36
23
|
routeConfigs(): Map<string, RouteConfig>;
|
|
37
24
|
setNavigationComponentWrap(wrap: (moduleName: string) => HOC): void;
|
|
38
25
|
addGlobalVisibilityEventListener(listener: GlobalVisibilityEventListener): NavigationSubscription;
|
|
39
26
|
addVisibilityEventListener(sceneId: string, listener: VisibilityEventListener): NavigationSubscription;
|
|
40
27
|
dispatch(sceneId: string, action: string, params?: DispatchParams): Promise<boolean>;
|
|
41
|
-
private handleTabSwitch;
|
|
42
28
|
setInterceptor(interceptor: NavigationInterceptor): void;
|
|
43
|
-
setResult
|
|
29
|
+
setResult<T extends ResultType>(sceneId: string, resultCode: number, data?: T): void;
|
|
44
30
|
result<T extends ResultType>(sceneId: string, resultCode: number): Promise<[number, T]>;
|
|
45
31
|
unmount(sceneId: string): void;
|
|
46
32
|
setRoot(layout: BuildInLayout | Layout, sticky?: boolean): Promise<boolean>;
|
|
@@ -62,7 +48,6 @@ declare class NavigationImpl implements Navigation {
|
|
|
62
48
|
setTabItem(sceneId: string, item: TabItemInfo | TabItemInfo[]): void;
|
|
63
49
|
setMenuInteractive(sceneId: string, enabled: boolean): void;
|
|
64
50
|
setBarButtonClickEventListener(listener: BarButtonClickEventListener): void;
|
|
65
|
-
private bindBarButtonClickEvent;
|
|
66
51
|
}
|
|
67
|
-
declare const _default:
|
|
52
|
+
declare const _default: Navigation;
|
|
68
53
|
export default _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare const Navigation: typeof navigation;
|
|
1
|
+
declare const Navigation: import("./Navigation").Navigation;
|
|
3
2
|
export default Navigation;
|
|
4
3
|
export { RESULT_OK, RESULT_CANCEL } from './Navigation';
|
|
5
4
|
export { statusBarHeight, toolbarHeight, topBarHeight } from './GardenModule';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "2.16.2-beta.
|
|
4
|
+
"version": "2.16.2-beta.2",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|
package/src/Navigation.ts
CHANGED
|
@@ -43,44 +43,45 @@ export type NavigationSubscription = {
|
|
|
43
43
|
export type HOC = (WrappedComponent: React.ComponentType<any>) => React.ComponentType<any>
|
|
44
44
|
|
|
45
45
|
export interface Navigation {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
46
|
+
startRegisterComponent(hoc?: HOC): void
|
|
47
|
+
endRegisterComponent(): void
|
|
48
|
+
registerComponent(
|
|
49
|
+
appKey: string,
|
|
50
|
+
getComponentFunc: ComponentProvider,
|
|
51
|
+
routeConfig?: RouteConfig,
|
|
52
|
+
): void
|
|
53
|
+
|
|
54
|
+
routeConfigs(): Map<string, RouteConfig>
|
|
55
|
+
setNavigationComponentWrap(wrap: (moduleName: string) => HOC): void
|
|
56
|
+
addGlobalVisibilityEventListener(listener: GlobalVisibilityEventListener): NavigationSubscription
|
|
57
|
+
addVisibilityEventListener(
|
|
58
|
+
sceneId: string,
|
|
59
|
+
listener: VisibilityEventListener,
|
|
60
|
+
): NavigationSubscription
|
|
61
|
+
dispatch(sceneId: string, action: string, params?: DispatchParams): Promise<boolean>
|
|
62
|
+
setInterceptor(interceptor: NavigationInterceptor): void
|
|
63
|
+
setResult<T extends ResultType>(sceneId: string, resultCode: number, data?: T): void
|
|
64
|
+
result<T extends ResultType>(sceneId: string, resultCode: number): Promise<[number, T]>
|
|
65
|
+
unmount(sceneId: string): void
|
|
66
|
+
setRoot(layout: BuildInLayout | Layout, sticky?: boolean): Promise<boolean>
|
|
67
|
+
setRootLayoutUpdateListener(willSetRoot?: () => void, didSetRoot?: () => void): void
|
|
68
|
+
currentTab(sceneId: string): Promise<number>
|
|
69
|
+
findSceneIdByModuleName(moduleName: string): Promise<string | null>
|
|
70
|
+
isStackRoot(sceneId: string): Promise<boolean>
|
|
71
|
+
signalFirstRenderComplete(sceneId: string): void
|
|
72
|
+
currentRoute(): Promise<Route>
|
|
73
|
+
routeGraph(): Promise<RouteGraph[]>
|
|
74
|
+
setDefaultOptions(options: DefaultOptions): void
|
|
75
|
+
setLeftBarButtonItem(sceneId: string, buttonItem: Nullable<BarButtonItem> | null): void
|
|
76
|
+
setRightBarButtonItem(sceneId: string, buttonItem: Nullable<BarButtonItem> | null): void
|
|
77
|
+
setLeftBarButtonItems(sceneId: string, buttonItems: Array<Nullable<BarButtonItem>> | null): void
|
|
78
|
+
setRightBarButtonItems(sceneId: string, buttonItems: Array<Nullable<BarButtonItem>> | null): void
|
|
79
|
+
setTitleItem(sceneId: string, titleItem: TitleItem): void
|
|
80
|
+
updateOptions(sceneId: string, options: NavigationOption): void
|
|
81
|
+
updateTabBar(sceneId: string, options: TabBarStyle): void
|
|
82
|
+
setTabItem(sceneId: string, item: TabItemInfo | TabItemInfo[]): void
|
|
83
|
+
setMenuInteractive(sceneId: string, enabled: boolean): void
|
|
84
|
+
setBarButtonClickEventListener(listener: BarButtonClickEventListener): void
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
class NavigationImpl implements Navigation {
|
|
@@ -289,4 +290,4 @@ class NavigationImpl implements Navigation {
|
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
|
|
292
|
-
export default new NavigationImpl()
|
|
293
|
+
export default new NavigationImpl() as Navigation
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withNavigation } from './NavigationComponentWrap'
|
|
2
2
|
import navigation from './Navigation'
|
|
3
3
|
navigation.setNavigationComponentWrap(withNavigation)
|
|
4
|
-
const Navigation
|
|
4
|
+
const Navigation = navigation
|
|
5
5
|
export default Navigation
|
|
6
6
|
export { RESULT_OK, RESULT_CANCEL } from './Navigation'
|
|
7
7
|
export { statusBarHeight, toolbarHeight, topBarHeight } from './GardenModule'
|