react-native-navigation 7.24.1 → 7.24.2-snapshot.474

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.
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Button, View, Text } from 'react-native';
3
- import { Navigation } from '../../src';
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 '../../src';
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 { Navigation, OptionsTopBarButton } from '../../src';
4
- import { OptionsTopBar, OptionsTopBarBackButton } from '../../src/interfaces/Options';
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';
@@ -78,6 +78,7 @@ public class ComponentViewController extends ChildController<ComponentLayout> {
78
78
  if (view != null)
79
79
  view.sendComponentWillStart();
80
80
  super.onViewDidAppear();
81
+ view.requestApplyInsets();
81
82
  if (view != null && lastVisibilityState == VisibilityState.Disappear) view.sendComponentStart();
82
83
  lastVisibilityState = VisibilityState.Appear;
83
84
  }
@@ -127,6 +127,13 @@ public class ComponentViewControllerTest extends BaseTest {
127
127
  Mockito.verify(view, Mockito.times(2)).sendComponentStart();
128
128
  }
129
129
 
130
+ @Test
131
+ public void shouldCallApplyWindowInsetsWhenViewFullyAppeared(){
132
+ uut.ensureViewIsCreated();
133
+ uut.onViewDidAppear();
134
+ Mockito.verify(view).requestApplyInsets();
135
+ }
136
+
130
137
  @Test
131
138
  public void isViewShownOnlyIfComponentViewIsReady() {
132
139
  Java6Assertions.assertThat(uut.isViewShown()).isFalse();
@@ -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 src_1 = require("../../src");
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 = src_1.Navigation.mock.store.getWrappedComponent(this.props.layoutNode.data.name);
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 },
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { OptionsTopBarButton } from '../../src';
2
+ import { OptionsTopBarButton } from 'react-native-navigation';
3
3
  interface ButtonProps {
4
4
  button: OptionsTopBarButton;
5
5
  componentId: string;
@@ -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 src_1 = require("../../src");
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 = src_1.Navigation.mock.store.getComponentClassForName(button.component.name)();
27
- const props = src_1.Navigation.mock.store.getPropsForId(buttonComponentId);
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 '../../src';
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 src_1 = require("../../src");
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 = src_1.Navigation.mock.store.getComponentClassForName(name)();
58
- const props = src_1.Navigation.mock.store.getPropsForId(id);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.24.1",
3
+ "version": "7.24.2-snapshot.474",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,