react-native-navigation 7.43.0 → 8.0.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.
Files changed (67) hide show
  1. package/lib/Mock/Components/ComponentScreen.tsx +29 -15
  2. package/lib/Mock/Components/LayoutComponent.tsx +2 -2
  3. package/lib/Mock/index.js +2 -2
  4. package/lib/android/app/build.gradle +1 -0
  5. package/lib/android/app/src/main/java/com/reactnativenavigation/FeatureToggles.kt +60 -0
  6. package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java +20 -4
  7. package/lib/android/app/src/main/java/com/reactnativenavigation/options/ValueAnimationOptions.kt +3 -3
  8. package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java +3 -3
  9. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalHostLayout.kt +1 -1
  10. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java +3 -2
  11. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactViewGroup.kt +4 -2
  12. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/StubAnimationListener.kt +19 -0
  13. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt +16 -10
  14. package/lib/android/app/src/main/java/com/reactnativenavigation/utils/ViewUtils.java +6 -4
  15. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAnimator.kt +2 -2
  16. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildController.java +7 -14
  17. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +37 -13
  18. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java +24 -11
  19. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java +13 -10
  20. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarController.kt +9 -0
  21. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarPresenter.kt +9 -0
  22. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/{TopBarAnimator.kt → TopBarAppearanceAnimator.kt} +4 -2
  23. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarCollapseBehavior.kt +1 -1
  24. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt +122 -27
  25. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/LayoutDirectionApplier.kt +8 -4
  26. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +79 -6
  27. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +1 -1
  28. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java +5 -0
  29. package/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/{BaseViewAnimator.kt → BaseViewAppearanceAnimator.kt} +4 -4
  30. package/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/ColorAnimator.kt +22 -0
  31. package/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/DefaultViewAnimatorCreator.kt +8 -8
  32. package/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/ViewAnimatorCreator.kt +2 -2
  33. package/lib/android/app/src/main/java/com/reactnativenavigation/views/animations/ViewBkgColorProperty.kt +17 -0
  34. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorAnimator.kt +6 -4
  35. package/lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorEvaluator.kt +4 -2
  36. package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +6 -6
  37. package/lib/dist/Mock/Application.d.ts +4 -6
  38. package/lib/dist/Mock/Components/BottomTabs.d.ts +9 -13
  39. package/lib/dist/Mock/Components/ComponentScreen.d.ts +5 -7
  40. package/lib/dist/Mock/Components/ComponentScreen.js +10 -3
  41. package/lib/dist/Mock/Components/LayoutComponent.d.ts +9 -13
  42. package/lib/dist/Mock/Components/Modals.d.ts +9 -13
  43. package/lib/dist/Mock/Components/NavigationButton.d.ts +11 -15
  44. package/lib/dist/Mock/Components/Overlays.d.ts +9 -13
  45. package/lib/dist/Mock/Components/Stack.d.ts +9 -13
  46. package/lib/dist/Mock/Components/TopBar.d.ts +7 -9
  47. package/lib/dist/Mock/connect.js +2 -1
  48. package/lib/dist/Mock/index.js +2 -2
  49. package/lib/dist/src/adapters/NativeEventsReceiver.js +1 -1
  50. package/lib/dist/src/adapters/TouchablePreview.d.ts +2 -2
  51. package/lib/dist/src/commands/LayoutType.js +1 -1
  52. package/lib/dist/src/commands/OptionsProcessor.js +8 -1
  53. package/lib/dist/src/components/Modal.d.ts +1 -1
  54. package/lib/dist/src/interfaces/CommandName.js +1 -1
  55. package/lib/dist/src/interfaces/Options.d.ts +33 -3
  56. package/lib/dist/src/interfaces/Options.js +2 -2
  57. package/lib/dist/src/types.d.ts +1 -0
  58. package/lib/ios/BottomTabsBasePresenter.m +3 -2
  59. package/lib/ios/RNNAppDelegate.mm +1 -2
  60. package/lib/ios/RNNConvert.h +2 -0
  61. package/lib/ios/RNNConvert.m +4 -0
  62. package/lib/ios/RNNStackPresenter.m +3 -2
  63. package/lib/src/adapters/NativeEventsReceiver.ts +3 -3
  64. package/lib/src/adapters/TouchablePreview.tsx +3 -3
  65. package/lib/src/commands/OptionsProcessor.ts +13 -2
  66. package/lib/src/interfaces/Options.ts +38 -3
  67. package/package.json +37 -31
@@ -4,13 +4,11 @@ interface ApplicationProps {
4
4
  }
5
5
  export declare const Application: {
6
6
  new (props: ApplicationProps): {
7
- render(): JSX.Element;
8
- context: any;
7
+ render(): React.JSX.Element;
8
+ context: unknown;
9
9
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ApplicationProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
10
10
  forceUpdate(callback?: (() => void) | undefined): void;
11
- readonly props: Readonly<ApplicationProps> & Readonly<{
12
- children?: React.ReactNode;
13
- }>;
11
+ readonly props: Readonly<ApplicationProps>;
14
12
  state: Readonly<{}>;
15
13
  refs: {
16
14
  [key: string]: React.ReactInstance;
@@ -28,6 +26,6 @@ export declare const Application: {
28
26
  componentWillUpdate?(nextProps: Readonly<ApplicationProps>, nextState: Readonly<{}>, nextContext: any): void;
29
27
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ApplicationProps>, nextState: Readonly<{}>, nextContext: any): void;
30
28
  };
31
- contextType?: React.Context<any>;
29
+ contextType?: React.Context<any> | undefined;
32
30
  };
33
31
  export {};
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '../ComponentProps';
3
3
  export declare const BottomTabs: {
4
- new (props: Readonly<ComponentProps>): {
5
- render(): JSX.Element[];
6
- context: any;
4
+ new (props: ComponentProps): {
5
+ render(): React.JSX.Element[];
6
+ context: unknown;
7
7
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
8
8
  forceUpdate(callback?: (() => void) | undefined): void;
9
- readonly props: Readonly<ComponentProps> & Readonly<{
10
- children?: React.ReactNode;
11
- }>;
9
+ readonly props: Readonly<ComponentProps>;
12
10
  state: Readonly<{}>;
13
11
  refs: {
14
12
  [key: string]: React.ReactInstance;
@@ -26,14 +24,12 @@ export declare const BottomTabs: {
26
24
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
27
25
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
28
26
  };
29
- new (props: ComponentProps, context?: any): {
30
- render(): JSX.Element[];
31
- context: any;
27
+ new (props: ComponentProps, context: any): {
28
+ render(): React.JSX.Element[];
29
+ context: unknown;
32
30
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
33
31
  forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<ComponentProps> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
32
+ readonly props: Readonly<ComponentProps>;
37
33
  state: Readonly<{}>;
38
34
  refs: {
39
35
  [key: string]: React.ReactInstance;
@@ -51,5 +47,5 @@ export declare const BottomTabs: {
51
47
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
52
48
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
53
49
  };
54
- contextType?: React.Context<any>;
50
+ contextType?: React.Context<any> | undefined;
55
51
  };
@@ -4,14 +4,12 @@ export declare const ComponentScreen: {
4
4
  new (props: ComponentProps): {
5
5
  componentDidMount(): void;
6
6
  isVisible(): boolean;
7
- renderTabBar(): JSX.Element | null;
8
- render(): JSX.Element;
9
- context: any;
7
+ renderTabBar(): React.JSX.Element | null;
8
+ render(): React.JSX.Element;
9
+ context: unknown;
10
10
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
11
11
  forceUpdate(callback?: (() => void) | undefined): void;
12
- readonly props: Readonly<ComponentProps> & Readonly<{
13
- children?: React.ReactNode;
14
- }>;
12
+ readonly props: Readonly<ComponentProps>;
15
13
  state: Readonly<{}>;
16
14
  refs: {
17
15
  [key: string]: React.ReactInstance;
@@ -28,5 +26,5 @@ export declare const ComponentScreen: {
28
26
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
29
27
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
30
28
  };
31
- contextType?: React.Context<any>;
29
+ contextType?: React.Context<any> | undefined;
32
30
  };
@@ -34,7 +34,9 @@ exports.ComponentScreen = (0, connect_1.connect)(class extends react_1.Component
34
34
  return null;
35
35
  const buttons = bottomTabs.children.map((child, i) => {
36
36
  const bottomTabOptions = child.resolveOptions().bottomTab;
37
- const icon = bottomTabs.selectedIndex === i ? bottomTabOptions?.selectedIcon : bottomTabOptions?.icon;
37
+ const icon = bottomTabs.selectedIndex === i
38
+ ? bottomTabOptions?.selectedIcon
39
+ : bottomTabOptions?.icon;
38
40
  const iconURI = isURISource(icon) ? icon.uri : undefined;
39
41
  return (react_1.default.createElement(react_native_1.View, { key: `tab-${i}` },
40
42
  react_1.default.createElement(react_native_1.TouchableOpacity, { style: { padding: 10 }, testID: bottomTabOptions?.testID, onPress: () => {
@@ -46,10 +48,15 @@ exports.ComponentScreen = (0, connect_1.connect)(class extends react_1.Component
46
48
  } },
47
49
  react_1.default.createElement(react_native_1.View, { style: { justifyContent: 'center', alignItems: 'center' } },
48
50
  react_1.default.createElement(react_native_1.Text, null, bottomTabOptions?.badge),
49
- iconURI && react_1.default.createElement(react_native_1.Image, { style: { width: 18, height: 18, marginBottom: 5 }, source: { uri: iconURI } }),
51
+ iconURI && (react_1.default.createElement(react_native_1.Image, { style: { width: 18, height: 18, marginBottom: 5 }, source: { uri: iconURI } })),
50
52
  react_1.default.createElement(react_native_1.Text, { style: { fontSize: 12 } }, bottomTabOptions?.text || '')))));
51
53
  });
52
- return (react_1.default.createElement(react_native_1.View, { testID: bottomTabsOptions?.testID, style: { flexDirection: 'row', justifyContent: 'center', width: '100%', backgroundColor: '#F0F2F5' } }, buttons));
54
+ return (react_1.default.createElement(react_native_1.View, { testID: bottomTabsOptions?.testID, style: {
55
+ flexDirection: 'row',
56
+ justifyContent: 'center',
57
+ width: '100%',
58
+ backgroundColor: '#F0F2F5',
59
+ } }, buttons));
53
60
  }
54
61
  render() {
55
62
  const Component = react_native_navigation_1.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '../ComponentProps';
3
3
  export declare const LayoutComponent: {
4
- new (props: Readonly<ComponentProps>): {
5
- render(): JSX.Element;
4
+ new (props: ComponentProps): {
5
+ render(): React.JSX.Element;
6
6
  componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
7
- context: any;
7
+ context: unknown;
8
8
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
9
9
  forceUpdate(callback?: (() => void) | undefined): void;
10
- readonly props: Readonly<ComponentProps> & Readonly<{
11
- children?: React.ReactNode;
12
- }>;
10
+ readonly props: Readonly<ComponentProps>;
13
11
  state: Readonly<{}>;
14
12
  refs: {
15
13
  [key: string]: React.ReactInstance;
@@ -26,15 +24,13 @@ export declare const LayoutComponent: {
26
24
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
27
25
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
28
26
  };
29
- new (props: ComponentProps, context?: any): {
30
- render(): JSX.Element;
27
+ new (props: ComponentProps, context: any): {
28
+ render(): React.JSX.Element;
31
29
  componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
32
- context: any;
30
+ context: unknown;
33
31
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
34
32
  forceUpdate(callback?: (() => void) | undefined): void;
35
- readonly props: Readonly<ComponentProps> & Readonly<{
36
- children?: React.ReactNode;
37
- }>;
33
+ readonly props: Readonly<ComponentProps>;
38
34
  state: Readonly<{}>;
39
35
  refs: {
40
36
  [key: string]: React.ReactInstance;
@@ -51,5 +47,5 @@ export declare const LayoutComponent: {
51
47
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
52
48
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
53
49
  };
54
- contextType?: React.Context<any>;
50
+ contextType?: React.Context<any> | undefined;
55
51
  };
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '../ComponentProps';
3
3
  export declare const Modals: {
4
- new (props: Readonly<ComponentProps>): {
5
- render(): JSX.Element;
6
- context: any;
4
+ new (props: ComponentProps): {
5
+ render(): React.JSX.Element;
6
+ context: unknown;
7
7
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
8
8
  forceUpdate(callback?: (() => void) | undefined): void;
9
- readonly props: Readonly<ComponentProps> & Readonly<{
10
- children?: React.ReactNode;
11
- }>;
9
+ readonly props: Readonly<ComponentProps>;
12
10
  state: Readonly<{}>;
13
11
  refs: {
14
12
  [key: string]: React.ReactInstance;
@@ -26,14 +24,12 @@ export declare const Modals: {
26
24
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
27
25
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
28
26
  };
29
- new (props: ComponentProps, context?: any): {
30
- render(): JSX.Element;
31
- context: any;
27
+ new (props: ComponentProps, context: any): {
28
+ render(): React.JSX.Element;
29
+ context: unknown;
32
30
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
33
31
  forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<ComponentProps> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
32
+ readonly props: Readonly<ComponentProps>;
37
33
  state: Readonly<{}>;
38
34
  refs: {
39
35
  [key: string]: React.ReactInstance;
@@ -51,5 +47,5 @@ export declare const Modals: {
51
47
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
52
48
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
53
49
  };
54
- contextType?: React.Context<any>;
50
+ contextType?: React.Context<any> | undefined;
55
51
  };
@@ -5,17 +5,15 @@ interface ButtonProps {
5
5
  componentId: string;
6
6
  }
7
7
  export declare const NavigationButton: {
8
- new (props: Readonly<ButtonProps>): {
8
+ new (props: ButtonProps): {
9
9
  ref: undefined;
10
- render(): JSX.Element;
11
- renderButtonComponent(): JSX.Element;
10
+ render(): React.JSX.Element;
11
+ renderButtonComponent(): React.JSX.Element;
12
12
  invokeOnClick(stateNode: any): void;
13
- context: any;
13
+ context: unknown;
14
14
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ButtonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
15
15
  forceUpdate(callback?: (() => void) | undefined): void;
16
- readonly props: Readonly<ButtonProps> & Readonly<{
17
- children?: React.ReactNode;
18
- }>;
16
+ readonly props: Readonly<ButtonProps>;
19
17
  state: Readonly<{}>;
20
18
  refs: {
21
19
  [key: string]: React.ReactInstance;
@@ -33,17 +31,15 @@ export declare const NavigationButton: {
33
31
  componentWillUpdate?(nextProps: Readonly<ButtonProps>, nextState: Readonly<{}>, nextContext: any): void;
34
32
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ButtonProps>, nextState: Readonly<{}>, nextContext: any): void;
35
33
  };
36
- new (props: ButtonProps, context?: any): {
34
+ new (props: ButtonProps, context: any): {
37
35
  ref: undefined;
38
- render(): JSX.Element;
39
- renderButtonComponent(): JSX.Element;
36
+ render(): React.JSX.Element;
37
+ renderButtonComponent(): React.JSX.Element;
40
38
  invokeOnClick(stateNode: any): void;
41
- context: any;
39
+ context: unknown;
42
40
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ButtonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
43
41
  forceUpdate(callback?: (() => void) | undefined): void;
44
- readonly props: Readonly<ButtonProps> & Readonly<{
45
- children?: React.ReactNode;
46
- }>;
42
+ readonly props: Readonly<ButtonProps>;
47
43
  state: Readonly<{}>;
48
44
  refs: {
49
45
  [key: string]: React.ReactInstance;
@@ -61,6 +57,6 @@ export declare const NavigationButton: {
61
57
  componentWillUpdate?(nextProps: Readonly<ButtonProps>, nextState: Readonly<{}>, nextContext: any): void;
62
58
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ButtonProps>, nextState: Readonly<{}>, nextContext: any): void;
63
59
  };
64
- contextType?: React.Context<any>;
60
+ contextType?: React.Context<any> | undefined;
65
61
  };
66
62
  export {};
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '../ComponentProps';
3
3
  export declare const Overlays: {
4
- new (props: Readonly<ComponentProps>): {
5
- render(): JSX.Element;
6
- context: any;
4
+ new (props: ComponentProps): {
5
+ render(): React.JSX.Element;
6
+ context: unknown;
7
7
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
8
8
  forceUpdate(callback?: (() => void) | undefined): void;
9
- readonly props: Readonly<ComponentProps> & Readonly<{
10
- children?: React.ReactNode;
11
- }>;
9
+ readonly props: Readonly<ComponentProps>;
12
10
  state: Readonly<{}>;
13
11
  refs: {
14
12
  [key: string]: React.ReactInstance;
@@ -26,14 +24,12 @@ export declare const Overlays: {
26
24
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
27
25
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
28
26
  };
29
- new (props: ComponentProps, context?: any): {
30
- render(): JSX.Element;
31
- context: any;
27
+ new (props: ComponentProps, context: any): {
28
+ render(): React.JSX.Element;
29
+ context: unknown;
32
30
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
33
31
  forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<ComponentProps> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
32
+ readonly props: Readonly<ComponentProps>;
37
33
  state: Readonly<{}>;
38
34
  refs: {
39
35
  [key: string]: React.ReactInstance;
@@ -51,5 +47,5 @@ export declare const Overlays: {
51
47
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
52
48
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
53
49
  };
54
- contextType?: React.Context<any>;
50
+ contextType?: React.Context<any> | undefined;
55
51
  };
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ComponentProps } from '../ComponentProps';
3
3
  export declare const Stack: {
4
- new (props: Readonly<ComponentProps>): {
5
- render(): JSX.Element[];
6
- context: any;
4
+ new (props: ComponentProps): {
5
+ render(): React.JSX.Element[];
6
+ context: unknown;
7
7
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
8
8
  forceUpdate(callback?: (() => void) | undefined): void;
9
- readonly props: Readonly<ComponentProps> & Readonly<{
10
- children?: React.ReactNode;
11
- }>;
9
+ readonly props: Readonly<ComponentProps>;
12
10
  state: Readonly<{}>;
13
11
  refs: {
14
12
  [key: string]: React.ReactInstance;
@@ -26,14 +24,12 @@ export declare const Stack: {
26
24
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
27
25
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
28
26
  };
29
- new (props: ComponentProps, context?: any): {
30
- render(): JSX.Element[];
31
- context: any;
27
+ new (props: ComponentProps, context: any): {
28
+ render(): React.JSX.Element[];
29
+ context: unknown;
32
30
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ComponentProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
33
31
  forceUpdate(callback?: (() => void) | undefined): void;
34
- readonly props: Readonly<ComponentProps> & Readonly<{
35
- children?: React.ReactNode;
36
- }>;
32
+ readonly props: Readonly<ComponentProps>;
37
33
  state: Readonly<{}>;
38
34
  refs: {
39
35
  [key: string]: React.ReactInstance;
@@ -51,5 +47,5 @@ export declare const Stack: {
51
47
  componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
52
48
  UNSAFE_componentWillUpdate?(nextProps: Readonly<ComponentProps>, nextState: Readonly<{}>, nextContext: any): void;
53
49
  };
54
- contextType?: React.Context<any>;
50
+ contextType?: React.Context<any> | undefined;
55
51
  };
@@ -8,17 +8,15 @@ export interface TopBarProps {
8
8
  }
9
9
  export declare const TopBar: {
10
10
  new (props: TopBarProps): {
11
- render(): JSX.Element | null;
11
+ render(): React.JSX.Element | null;
12
12
  shouldRenderBackButton(layoutNode: ParentNode): boolean;
13
- renderButtons(buttons?: OptionsTopBarButton[]): JSX.Element[];
14
- renderBackButton(): JSX.Element;
15
- renderComponent(id: string, name: string, testID?: string): JSX.Element;
16
- context: any;
13
+ renderButtons(buttons?: OptionsTopBarButton[]): React.JSX.Element[];
14
+ renderBackButton(): React.JSX.Element;
15
+ renderComponent(id: string, name: string, testID?: string): React.JSX.Element;
16
+ context: unknown;
17
17
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TopBarProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
18
18
  forceUpdate(callback?: (() => void) | undefined): void;
19
- readonly props: Readonly<TopBarProps> & Readonly<{
20
- children?: React.ReactNode;
21
- }>;
19
+ readonly props: Readonly<TopBarProps>;
22
20
  state: Readonly<{}>;
23
21
  refs: {
24
22
  [key: string]: React.ReactInstance;
@@ -36,5 +34,5 @@ export declare const TopBar: {
36
34
  componentWillUpdate?(nextProps: Readonly<TopBarProps>, nextState: Readonly<{}>, nextContext: any): void;
37
35
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TopBarProps>, nextState: Readonly<{}>, nextContext: any): void;
38
36
  };
39
- contextType?: React.Context<any>;
37
+ contextType?: React.Context<any> | undefined;
40
38
  };
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.connect = connect;
3
+ exports.connect = void 0;
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;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationMock = void 0;
4
- exports.mockNativeComponents = mockNativeComponents;
3
+ exports.mockNativeComponents = exports.ApplicationMock = void 0;
5
4
  const tslib_1 = require("tslib");
6
5
  exports.ApplicationMock = require('./Application').Application;
7
6
  tslib_1.__exportStar(require("./constants"), exports);
@@ -12,3 +11,4 @@ function mockNativeComponents() {
12
11
  const { Navigation } = require('react-native-navigation');
13
12
  Navigation.mockNativeComponents(new NativeCommandsSender(), new NativeEventsReceiver(), new AppRegistryService());
14
13
  }
14
+ exports.mockNativeComponents = mockNativeComponents;
@@ -8,7 +8,7 @@ class NativeEventsReceiver {
8
8
  try {
9
9
  this.emitter = new react_native_1.NativeEventEmitter(react_native_1.NativeModules.RNNEventEmitter);
10
10
  }
11
- catch (e) {
11
+ catch {
12
12
  this.emitter = {
13
13
  addListener: () => {
14
14
  return {
@@ -8,7 +8,7 @@ interface GestureResponderEventWithForce extends NativeSyntheticEvent<NativeTouc
8
8
  }
9
9
  export interface Props {
10
10
  children?: React.ReactNode;
11
- touchableComponent?: TouchableHighlight | TouchableOpacity | TouchableNativeFeedback | TouchableWithoutFeedback | React.ReactNode;
11
+ touchableComponent?: typeof TouchableHighlight | typeof 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(): JSX.Element;
41
+ render(): React.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 || (exports.LayoutType = LayoutType = {}));
16
+ })(LayoutType = exports.LayoutType || (exports.LayoutType = {}));
@@ -68,7 +68,7 @@ class OptionsProcessor {
68
68
  return path;
69
69
  }
70
70
  processColor(key, value, options) {
71
- if ((0, isEqual_1.default)(key, 'color') || (0, endsWith_1.default)(key, 'Color')) {
71
+ if (((0, isEqual_1.default)(key, 'color') || (0, endsWith_1.default)(key, 'Color')) && !(0, isEqual_1.default)(key, 'bkgColor')) {
72
72
  if (react_native_1.Platform.OS === 'ios')
73
73
  this.processColorIOS(key, value, options);
74
74
  else
@@ -313,6 +313,13 @@ class OptionsProcessor {
313
313
  enter: animation.topBar,
314
314
  };
315
315
  }
316
+ if (animation.statusBar &&
317
+ !(0, has_1.default)(animation, 'statusBar.enter') &&
318
+ !(0, has_1.default)(animation, 'statusBar.exit')) {
319
+ parentOptions.push.statusBar = {
320
+ enter: animation.statusBar,
321
+ };
322
+ }
316
323
  if (animation.bottomTabs &&
317
324
  !(0, has_1.default)(animation, 'bottomTabs.enter') &&
318
325
  !(0, has_1.default)(animation, 'bottomTabs.exit')) {
@@ -15,6 +15,6 @@ export declare class Modal extends React.Component<RNNModalProps> {
15
15
  animationType: string;
16
16
  };
17
17
  constructor(props: RNNModalProps);
18
- render(): JSX.Element | null;
18
+ render(): React.JSX.Element | null;
19
19
  private proccessProps;
20
20
  }
@@ -19,4 +19,4 @@ var CommandName;
19
19
  CommandName["DismissOverlay"] = "dismissOverlay";
20
20
  CommandName["DismissAllOverlays"] = "dismissAllOverlays";
21
21
  CommandName["GetLaunchArgs"] = "getLaunchArgs";
22
- })(CommandName || (exports.CommandName = CommandName = {}));
22
+ })(CommandName = exports.CommandName || (exports.CommandName = {}));
@@ -1166,12 +1166,34 @@ export interface IconInsets {
1166
1166
  */
1167
1167
  right?: number;
1168
1168
  }
1169
+ export interface ColorAnimationOptions {
1170
+ /**
1171
+ * Color duration time; Default is as determined by the OS
1172
+ */
1173
+ duration?: number;
1174
+ }
1169
1175
  export interface ViewAnimationOptions extends ScreenAnimationOptions {
1170
1176
  /**
1171
1177
  * ID of the Top Bar we want to animate
1172
1178
  */
1173
1179
  id?: string;
1174
1180
  }
1181
+ export interface TopBarAnimationOptions extends ViewAnimationOptions {
1182
+ /**
1183
+ * Animation of the top-bar's background color, in case the top-bar background color
1184
+ * has been explicitly specified.
1185
+ *
1186
+ * Applicable only in transition of screens with color (non-component) backgrounds.
1187
+ */
1188
+ bkgColor?: ColorAnimationOptions;
1189
+ }
1190
+ export interface StatusBarAnimationOptions extends ViewAnimationOptions {
1191
+ /**
1192
+ * Animation of the status-bar's background color, in case its background color
1193
+ * has been explicitly specified.
1194
+ */
1195
+ bkgColor?: ColorAnimationOptions;
1196
+ }
1175
1197
  export interface EnterExitAnimationOptions {
1176
1198
  /**
1177
1199
  * Animate opening component
@@ -1226,9 +1248,17 @@ export interface StackAnimationOptions {
1226
1248
  /**
1227
1249
  * Configure animations for the top bar
1228
1250
  */
1229
- topBar?: ViewAnimationOptions | {
1230
- enter?: ViewAnimationOptions;
1231
- exit?: ViewAnimationOptions;
1251
+ topBar?: TopBarAnimationOptions | {
1252
+ enter?: TopBarAnimationOptions;
1253
+ exit?: TopBarAnimationOptions;
1254
+ };
1255
+ /**
1256
+ * Configure animations for the status bar (typically aligned
1257
+ * with the top-bar's)
1258
+ */
1259
+ statusBar?: StatusBarAnimationOptions | {
1260
+ enter?: StatusBarAnimationOptions;
1261
+ exit?: StatusBarAnimationOptions;
1232
1262
  };
1233
1263
  /**
1234
1264
  * Configure animations for the bottom tabs
@@ -11,11 +11,11 @@ var OptionsModalPresentationStyle;
11
11
  OptionsModalPresentationStyle["popover"] = "popover";
12
12
  OptionsModalPresentationStyle["fullScreen"] = "fullScreen";
13
13
  OptionsModalPresentationStyle["none"] = "none";
14
- })(OptionsModalPresentationStyle || (exports.OptionsModalPresentationStyle = OptionsModalPresentationStyle = {}));
14
+ })(OptionsModalPresentationStyle = exports.OptionsModalPresentationStyle || (exports.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 || (exports.OptionsModalTransitionStyle = OptionsModalTransitionStyle = {}));
21
+ })(OptionsModalTransitionStyle = exports.OptionsModalTransitionStyle || (exports.OptionsModalTransitionStyle = {}));
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare module 'react-lifecycles-compat' {
2
3
  import * as React from 'react';
3
4
  function polyfill(component: React.ComponentClass<any>): void;
@@ -1,5 +1,6 @@
1
1
  #import "BottomTabsBasePresenter.h"
2
2
  #import "RNNBottomTabsController.h"
3
+ #import "RNNConvert.h"
3
4
  #import "UIImage+utils.h"
4
5
 
5
6
  @implementation BottomTabsBasePresenter
@@ -29,7 +30,7 @@
29
30
  [self applyBackgroundColor:[withDefault.bottomTabs.backgroundColor withDefault:nil]
30
31
  translucent:[withDefault.bottomTabs.translucent withDefault:NO]];
31
32
  [bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow withDefault:NO]];
32
- [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle
33
+ [bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:[withDefault.bottomTabs.barStyle
33
34
  withDefault:@"default"]]];
34
35
  [self applyTabBarBorder:withDefault.bottomTabs];
35
36
  [self applyTabBarShadow:withDefault.bottomTabs.shadow];
@@ -60,7 +61,7 @@
60
61
  }
61
62
 
62
63
  if (mergeOptions.bottomTabs.barStyle.hasValue) {
63
- [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:mergeOptions.bottomTabs.barStyle.get]];
64
+ [bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:mergeOptions.bottomTabs.barStyle.get]];
64
65
  }
65
66
 
66
67
  if (mergeOptions.bottomTabs.translucent.hasValue) {
@@ -2,8 +2,7 @@
2
2
  #import <ReactNativeNavigation/ReactNativeNavigation.h>
3
3
 
4
4
  #if RCT_NEW_ARCH_ENABLED
5
- #import "RCTAppSetupUtils.h"
6
- #import "RCTLegacyInteropComponents.h"
5
+
7
6
  #import <React/CoreModulesPlugins.h>
8
7
  #import <React/RCTCxxBridgeDelegate.h>
9
8
  #import <React/RCTLegacyViewManagerInteropComponentView.h>
@@ -7,4 +7,6 @@
7
7
 
8
8
  + (UIModalTransitionStyle)UIModalTransitionStyle:(id)json;
9
9
 
10
+ + (UIBarStyle)UIBarStyle:(id)json;
11
+
10
12
  @end
@@ -32,4 +32,8 @@ RCT_ENUM_CONVERTER(UIModalPresentationStyle, (@{
32
32
  }),
33
33
  UIModalPresentationFullScreen, integerValue)
34
34
 
35
+ RCT_ENUM_CONVERTER(UIBarStyle,
36
+ (@{@"default" : @(UIBarStyleDefault), @"black" : @(UIBarStyleBlack)}),
37
+ UIBarStyleDefault, integerValue)
38
+
35
39
  @end