react-native-navigation 7.24.3 → 7.25.0-snapshot.552
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/android/app/build.gradle +12 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java +7 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/BottomTabOptions.java +4 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/Options.java +2 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/OverlayOptions.java +3 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/OverlayOptions.kt +31 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutInsets.kt +44 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutOptions.kt +71 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/parsers/JSONParser.java +0 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/PrimitiveExt.kt +9 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java +2 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java +31 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/child/ChildController.java +6 -13
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +37 -12
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalStack.java +4 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +25 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/overlay/OverlayManager.kt +104 -33
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/parent/ParentController.java +86 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuController.java +12 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java +18 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java +51 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonController.kt +7 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +23 -7
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java +24 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabs.java +29 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainer.kt +1 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsLayout.java +10 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/component/ComponentLayout.java +10 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/overlay/AttachedOverlayContainer.kt +69 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/overlay/ViewTooltip.java +921 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/sidemenu/SideMenuRoot.java +9 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/StackLayout.java +14 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBar.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsStyleHelper.java +0 -1
- package/lib/dist/src/interfaces/Options.d.ts +34 -0
- package/lib/ios/RNNBasePresenter.m +17 -0
- package/lib/ios/RNNBottomTabsController.m +1 -0
- package/lib/ios/RNNBridgeManager.mm +5 -3
- package/lib/ios/RNNComponentViewController.m +5 -0
- package/lib/ios/RNNLayoutOptions.h +2 -1
- package/lib/ios/RNNLayoutOptions.m +4 -0
- package/lib/ios/RNNModalHostViewManagerHandler.h +11 -0
- package/lib/ios/RNNModalHostViewManagerHandler.m +40 -0
- package/lib/ios/RNNModalManager.h +2 -2
- package/lib/ios/RNNModalManager.m +0 -26
- package/lib/ios/RNNStackPresenter.m +1 -0
- package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +8 -0
- package/lib/src/interfaces/Options.ts +38 -0
- package/package.json +3 -1
- package/.buildkite/pipeline.yml +0 -59
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutOptions.java +0 -48
- package/lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java +0 -178
- package/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestActivity.java +0 -23
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/fakes/IconResolverFake.kt +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/BackDrawable.java +0 -30
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/ImageLoaderMock.kt +0 -49
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/Mocks.kt +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleComponentViewController.java +0 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleOverlay.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleViewController.java +0 -113
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java +0 -79
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentViewCreator.java +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestReactView.java +0 -71
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarButtonCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TopBarBackgroundViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TypefaceLoaderMock.kt +0 -21
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/LayoutNodeParserTest.java +0 -51
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OptionsTest.java +0 -315
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OrientationOptionsTest.java +0 -81
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TopBarButtonsTest.kt +0 -95
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TransitionAnimationOptionsTest.kt +0 -122
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/BoolParserTest.java +0 -28
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/ColorParseTest.java +0 -50
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/JSONParserTest.java +0 -64
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/PresenterTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/RenderCheckerTest.java +0 -59
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/SideMenuPresenterTest.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/NavigationModuleTest.java +0 -102
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/ReloadListenerTest.java +0 -24
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/AnimationHelper.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonPresenterTest.java +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonSpanTest.java +0 -57
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/CompatUtilsTest.java +0 -17
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/LayoutFactoryTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/MotionEventTest.kt +0 -47
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/NativeCommandListenerTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/OptionHelper.java +0 -16
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ReflectionUtilsTest.java +0 -26
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/StringUtilsTest.java +0 -19
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/SystemUiUtilsTest.kt +0 -27
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleAndButtonsMeasurerTest.kt +0 -357
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleBarHelper.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiThreadTest.java +0 -29
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiUtilsTest.java +0 -22
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ViewHelper.java +0 -9
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java +0 -149
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenterTest.java +0 -206
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAttacherTest.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsControllerTest.kt +0 -589
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsPresenterTest.kt +0 -173
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AfterInitialTabTest.java +0 -38
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java +0 -86
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/OnSwitchToTabTest.java +0 -31
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/TogetherTest.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/button/NavigationIconResolverTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java +0 -80
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewControllerTest.java +0 -216
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentViewControllerTest.java +0 -97
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/FragmentCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/SomeFragment.java +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/fakes/FakeParentController.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorMock.java +0 -40
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorTest.kt +0 -213
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java +0 -319
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalStackTest.java +0 -367
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java +0 -898
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/RootPresenterTest.kt +0 -254
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/overlay/OverlayManagerTest.java +0 -108
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/parent/ParentControllerTest.java +0 -299
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuControllerTest.java +0 -446
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/BackButtonHelperTest.java +0 -77
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/FloatingActionButtonTest.java +0 -154
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/IdStackTest.java +0 -114
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackAnimatorTest.kt +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.kt +0 -1165
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenterTest.kt +0 -1081
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarButtonControllerTest.java +0 -61
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarReactViewControllerTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarButtonControllerTest.java +0 -120
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarControllerTest.kt +0 -432
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsViewControllerTest.java +0 -249
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerTest.java +0 -337
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/YellowBoxDelegateTest.java +0 -68
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/OverlayTouchDelegateTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TitleAndButtonsContainerTest.kt +0 -477
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TopBarTest.java +0 -82
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/BaseViewAnimatorTest.kt +0 -109
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/DefaultViewAnimatorCreatorFake.kt +0 -36
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainerTest.kt +0 -101
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsTest.kt +0 -40
- package/lib/android/app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +0 -1
package/lib/android/app/src/main/java/com/reactnativenavigation/views/sidemenu/SideMenuRoot.java
CHANGED
|
@@ -12,6 +12,7 @@ import com.reactnativenavigation.options.SideMenuOptions;
|
|
|
12
12
|
import com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController;
|
|
13
13
|
import com.reactnativenavigation.views.BehaviourAdapter;
|
|
14
14
|
import com.reactnativenavigation.views.BehaviourDelegate;
|
|
15
|
+
import com.reactnativenavigation.views.overlay.AttachedOverlayContainer;
|
|
15
16
|
|
|
16
17
|
import androidx.annotation.RestrictTo;
|
|
17
18
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
@@ -23,9 +24,16 @@ import static com.reactnativenavigation.utils.CoordinatorLayoutUtils.matchParent
|
|
|
23
24
|
|
|
24
25
|
public class SideMenuRoot extends CoordinatorLayout {
|
|
25
26
|
private SideMenu sideMenu;
|
|
27
|
+
final private AttachedOverlayContainer attachedOverlayContainer ;
|
|
26
28
|
|
|
27
29
|
public SideMenuRoot(Context context) {
|
|
28
30
|
super(context);
|
|
31
|
+
attachedOverlayContainer = new AttachedOverlayContainer(context);
|
|
32
|
+
addView(attachedOverlayContainer,LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public AttachedOverlayContainer getAttachedOverlayContainer() {
|
|
36
|
+
return attachedOverlayContainer;
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
public void addSideMenu(SideMenu sideMenu, BehaviourAdapter behaviourAdapter) {
|
|
@@ -89,4 +97,4 @@ public class SideMenuRoot extends CoordinatorLayout {
|
|
|
89
97
|
public SideMenu getSideMenu() {
|
|
90
98
|
return sideMenu;
|
|
91
99
|
}
|
|
92
|
-
}
|
|
100
|
+
}
|
package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/StackLayout.java
CHANGED
|
@@ -9,6 +9,7 @@ import com.reactnativenavigation.viewcontrollers.stack.topbar.TopBarController;
|
|
|
9
9
|
import com.reactnativenavigation.views.component.Component;
|
|
10
10
|
import com.reactnativenavigation.views.component.Renderable;
|
|
11
11
|
import com.reactnativenavigation.views.stack.topbar.ScrollDIsabledBehavior;
|
|
12
|
+
import com.reactnativenavigation.views.overlay.AttachedOverlayContainer;
|
|
12
13
|
|
|
13
14
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
14
15
|
|
|
@@ -17,18 +18,27 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
|
17
18
|
@SuppressLint("ViewConstructor")
|
|
18
19
|
public class StackLayout extends CoordinatorLayout implements Component {
|
|
19
20
|
private String stackId;
|
|
21
|
+
final private AttachedOverlayContainer attachedOverlayContainer ;
|
|
20
22
|
|
|
21
23
|
public StackLayout(Context context, TopBarController topBarController, String stackId) {
|
|
22
24
|
super(context);
|
|
23
25
|
this.stackId = stackId;
|
|
26
|
+
attachedOverlayContainer = new AttachedOverlayContainer(getContext());
|
|
24
27
|
createLayout(topBarController);
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
public AttachedOverlayContainer getAttachedOverlayContainer() {
|
|
31
|
+
return attachedOverlayContainer;
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
private void createLayout(TopBarController topBarController) {
|
|
28
35
|
View topBar = topBarController.createView(getContext(), this);
|
|
36
|
+
|
|
29
37
|
CoordinatorLayout.LayoutParams lp = new LayoutParams(MATCH_PARENT, UiUtils.getTopBarHeight(getContext()));
|
|
30
38
|
lp.setBehavior(new ScrollDIsabledBehavior());
|
|
31
39
|
addView(topBar, lp);
|
|
40
|
+
addView(attachedOverlayContainer,LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
|
|
41
|
+
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
public String getStackId() {
|
|
@@ -37,8 +47,8 @@ public class StackLayout extends CoordinatorLayout implements Component {
|
|
|
37
47
|
|
|
38
48
|
@Override
|
|
39
49
|
public boolean isRendered() {
|
|
40
|
-
return getChildCount() >=
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
return getChildCount() >= 3 &&
|
|
51
|
+
getChildAt(2) instanceof Renderable &&
|
|
52
|
+
((Renderable) getChildAt(2)).isRendered();
|
|
43
53
|
}
|
|
44
|
-
}
|
|
54
|
+
}
|
package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBar.java
CHANGED
|
@@ -31,7 +31,6 @@ import com.reactnativenavigation.options.params.Number;
|
|
|
31
31
|
import com.reactnativenavigation.options.params.ThemeColour;
|
|
32
32
|
import com.reactnativenavigation.options.parsers.TypefaceLoader;
|
|
33
33
|
import com.reactnativenavigation.utils.CompatUtils;
|
|
34
|
-
import com.reactnativenavigation.utils.ContextKt;
|
|
35
34
|
import com.reactnativenavigation.utils.UiUtils;
|
|
36
35
|
import com.reactnativenavigation.viewcontrollers.stack.topbar.TopBarCollapseBehavior;
|
|
37
36
|
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonController;
|
|
@@ -5,7 +5,6 @@ import android.graphics.Typeface;
|
|
|
5
5
|
import android.view.ViewGroup;
|
|
6
6
|
import android.widget.TextView;
|
|
7
7
|
|
|
8
|
-
import com.reactnativenavigation.options.params.Colour;
|
|
9
8
|
import com.reactnativenavigation.options.params.Number;
|
|
10
9
|
import com.reactnativenavigation.options.params.ThemeColour;
|
|
11
10
|
import com.reactnativenavigation.utils.Functions.Func1;
|
|
@@ -133,6 +133,16 @@ export interface OptionsLayout {
|
|
|
133
133
|
* #### (iOS specific)
|
|
134
134
|
*/
|
|
135
135
|
autoHideHomeIndicator?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Add insets to the top layout
|
|
138
|
+
*/
|
|
139
|
+
insets?: Insets;
|
|
140
|
+
/**
|
|
141
|
+
* Resizes the layout when keyboard is visible
|
|
142
|
+
* @default true
|
|
143
|
+
* #### (Android specific)
|
|
144
|
+
*/
|
|
145
|
+
adjustResize?: boolean;
|
|
136
146
|
}
|
|
137
147
|
export declare enum OptionsModalPresentationStyle {
|
|
138
148
|
formSheet = "formSheet",
|
|
@@ -840,6 +850,10 @@ export interface ImageSystemSource {
|
|
|
840
850
|
}
|
|
841
851
|
export declare type ImageResource = ImageSourcePropType | string | ImageSystemSource;
|
|
842
852
|
export interface OptionsBottomTab {
|
|
853
|
+
/**
|
|
854
|
+
* Unique id in order to be found in the view hierarchy
|
|
855
|
+
*/
|
|
856
|
+
id?: string;
|
|
843
857
|
dotIndicator?: DotIndicatorOptions;
|
|
844
858
|
/**
|
|
845
859
|
* Set the text to display below the icon
|
|
@@ -1005,6 +1019,26 @@ export interface OverlayOptions {
|
|
|
1005
1019
|
* Set this to true if your Overlay contains a TextInput.
|
|
1006
1020
|
*/
|
|
1007
1021
|
handleKeyboardEvents?: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Attach overlay to anchor view in a certain layer of layout as a tooltip
|
|
1024
|
+
*/
|
|
1025
|
+
attach?: {
|
|
1026
|
+
/**
|
|
1027
|
+
* layout id to look for to add as a layer
|
|
1028
|
+
* which can be componentId or stackId or bottomTabsId.
|
|
1029
|
+
*/
|
|
1030
|
+
layoutId: string;
|
|
1031
|
+
anchor?: {
|
|
1032
|
+
/**
|
|
1033
|
+
* Anchor view id, TopBar Button, Title Component, BottomTab.
|
|
1034
|
+
*/
|
|
1035
|
+
id: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* The anchor view side that the tooltip will be displayed.
|
|
1038
|
+
*/
|
|
1039
|
+
gravity: 'top' | 'left' | 'right' | 'bottom';
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1008
1042
|
}
|
|
1009
1043
|
export interface ModalOptions {
|
|
1010
1044
|
/**
|
|
@@ -58,6 +58,15 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
- (void)applyOptions:(RNNNavigationOptions *)options {
|
|
61
|
+
UIViewController *viewController = self.boundViewController;
|
|
62
|
+
RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
|
|
63
|
+
if (withDefault.layout.insets.hasValue) {
|
|
64
|
+
viewController.topMostViewController.additionalSafeAreaInsets =
|
|
65
|
+
UIEdgeInsetsMake([withDefault.layout.insets.top withDefault:0],
|
|
66
|
+
[withDefault.layout.insets.left withDefault:0],
|
|
67
|
+
[withDefault.layout.insets.bottom withDefault:0],
|
|
68
|
+
[withDefault.layout.insets.right withDefault:0]);
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
|
|
63
72
|
- (void)mergeOptions:(RNNNavigationOptions *)mergeOptions
|
|
@@ -83,6 +92,14 @@
|
|
|
83
92
|
_prefersHomeIndicatorAutoHidden = mergeOptions.layout.autoHideHomeIndicator.get;
|
|
84
93
|
[self.boundViewController setNeedsUpdateOfHomeIndicatorAutoHidden];
|
|
85
94
|
}
|
|
95
|
+
|
|
96
|
+
if (mergeOptions.layout.insets.hasValue) {
|
|
97
|
+
self.boundViewController.topMostViewController.additionalSafeAreaInsets =
|
|
98
|
+
UIEdgeInsetsMake([withDefault.layout.insets.top withDefault:0],
|
|
99
|
+
[withDefault.layout.insets.left withDefault:0],
|
|
100
|
+
[withDefault.layout.insets.bottom withDefault:0],
|
|
101
|
+
[withDefault.layout.insets.right withDefault:0]);
|
|
102
|
+
}
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
- (void)renderComponents:(RNNNavigationOptions *)options
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
#import "RNNComponentViewCreator.h"
|
|
5
5
|
#import "RNNEventEmitter.h"
|
|
6
6
|
#import "RNNLayoutManager.h"
|
|
7
|
+
#import "RNNModalHostViewManagerHandler.h"
|
|
7
8
|
#import "RNNReactComponentRegistry.h"
|
|
8
9
|
#import "RNNReactRootViewCreator.h"
|
|
9
10
|
#import "RNNSplashScreen.h"
|
|
10
11
|
#import <React/RCTBridge.h>
|
|
11
|
-
#import <React/RCTModalHostViewManager.h>
|
|
12
12
|
#import <React/RCTUIManager.h>
|
|
13
13
|
|
|
14
14
|
@interface RNNBridgeManager ()
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
|
|
20
20
|
@property(nonatomic, strong, readonly) RNNOverlayManager *overlayManager;
|
|
21
21
|
@property(nonatomic, strong, readonly) RNNModalManager *modalManager;
|
|
22
|
+
@property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
|
|
22
23
|
|
|
23
24
|
@end
|
|
24
25
|
|
|
@@ -66,7 +67,8 @@
|
|
|
66
67
|
[[RNNModalManagerEventHandler alloc] initWithEventEmitter:eventEmitter];
|
|
67
68
|
_modalManager = [[RNNModalManager alloc] initWithBridge:bridge
|
|
68
69
|
eventHandler:modalManagerEventHandler];
|
|
69
|
-
|
|
70
|
+
_modalHostViewHandler =
|
|
71
|
+
[[RNNModalHostViewManagerHandler alloc] initWithModalManager:_modalManager];
|
|
70
72
|
_layoutManager = [[RNNLayoutManager alloc] init];
|
|
71
73
|
|
|
72
74
|
id<RNNComponentViewCreator> rootViewCreator =
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
|
|
106
108
|
- (void)onJavaScriptLoaded {
|
|
107
109
|
[_commandsHandler setReadyToReceiveCommands:true];
|
|
108
|
-
[
|
|
110
|
+
[_modalHostViewHandler
|
|
109
111
|
connectModalHostViewManager:[self.bridge moduleForClass:RCTModalHostViewManager.class]];
|
|
110
112
|
[[_bridge moduleForClass:[RNNEventEmitter class]] sendOnAppLaunched];
|
|
111
113
|
}
|
|
@@ -111,6 +111,11 @@
|
|
|
111
111
|
[self updateReactViewConstraints];
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
- (void)viewDidLayoutSubviews {
|
|
115
|
+
[super viewDidLayoutSubviews];
|
|
116
|
+
[self.presenter applyOptionsOnViewDidLayoutSubviews:self.resolveOptions];
|
|
117
|
+
}
|
|
118
|
+
|
|
114
119
|
- (void)updateReactViewConstraints {
|
|
115
120
|
if (self.isViewLoaded && self.reactView) {
|
|
116
121
|
[NSLayoutConstraint deactivateConstraints:_reactViewConstraints];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
#import "RNNInsetsOptions.h"
|
|
1
2
|
#import "RNNOptions.h"
|
|
2
|
-
|
|
3
3
|
@interface RNNLayoutOptions : RNNOptions
|
|
4
4
|
|
|
5
5
|
@property(nonatomic, strong) Color *backgroundColor;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@property(nonatomic, strong) Text *direction;
|
|
8
8
|
@property(nonatomic, strong) id orientation;
|
|
9
9
|
@property(nonatomic, strong) Bool *autoHideHomeIndicator;
|
|
10
|
+
@property(nonatomic, strong) RNNInsetsOptions *insets;
|
|
10
11
|
|
|
11
12
|
- (UIInterfaceOrientationMask)supportedOrientations;
|
|
12
13
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
self.direction = [TextParser parse:dict key:@"direction"];
|
|
12
12
|
self.orientation = dict[@"orientation"];
|
|
13
13
|
self.autoHideHomeIndicator = [BoolParser parse:dict key:@"autoHideHomeIndicator"];
|
|
14
|
+
self.insets = [[RNNInsetsOptions alloc] initWithDict:dict[@"insets"]];
|
|
14
15
|
return self;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
self.orientation = options.orientation;
|
|
26
27
|
if (options.autoHideHomeIndicator)
|
|
27
28
|
self.autoHideHomeIndicator = options.autoHideHomeIndicator;
|
|
29
|
+
if (options.insets.hasValue) {
|
|
30
|
+
self.insets = options.insets;
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
- (UIInterfaceOrientationMask)supportedOrientations {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#import "RNNModalManager.h"
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
#import <React/RCTModalHostViewManager.h>
|
|
4
|
+
|
|
5
|
+
@interface RNNModalHostViewManagerHandler : NSObject
|
|
6
|
+
|
|
7
|
+
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager;
|
|
8
|
+
|
|
9
|
+
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager;
|
|
10
|
+
|
|
11
|
+
@end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#import "RNNModalHostViewManagerHandler.h"
|
|
2
|
+
|
|
3
|
+
@implementation RNNModalHostViewManagerHandler {
|
|
4
|
+
RNNModalManager *_modalManager;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager {
|
|
8
|
+
self = [super init];
|
|
9
|
+
_modalManager = modalManager;
|
|
10
|
+
return self;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
14
|
+
modalHostViewManager.presentationBlock =
|
|
15
|
+
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
16
|
+
dispatch_block_t completionBlock) {
|
|
17
|
+
if (reactViewController.presentedViewController != viewController &&
|
|
18
|
+
[self->_modalManager topPresentedVC] != viewController) {
|
|
19
|
+
[self->_modalManager showModal:viewController
|
|
20
|
+
animated:animated
|
|
21
|
+
completion:^(NSString *_Nonnull componentId) {
|
|
22
|
+
if (completionBlock)
|
|
23
|
+
completionBlock();
|
|
24
|
+
}];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
modalHostViewManager.dismissalBlock =
|
|
29
|
+
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
30
|
+
dispatch_block_t completionBlock) {
|
|
31
|
+
[self->_modalManager dismissModal:viewController
|
|
32
|
+
animated:animated
|
|
33
|
+
completion:^{
|
|
34
|
+
if (completionBlock)
|
|
35
|
+
completionBlock();
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#import "RNNModalManagerEventHandler.h"
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
3
|
#import <React/RCTBridge.h>
|
|
4
|
-
#import <React/RCTModalHostViewManager.h>
|
|
5
4
|
#import <UIKit/UIKit.h>
|
|
6
5
|
|
|
7
6
|
typedef void (^RNNTransitionCompletionBlock)(void);
|
|
@@ -13,7 +12,6 @@ typedef void (^RNNTransitionRejectionBlock)(NSString *_Nonnull code, NSString *_
|
|
|
13
12
|
|
|
14
13
|
- (instancetype _Nonnull)initWithBridge:(RCTBridge *_Nonnull)bridge
|
|
15
14
|
eventHandler:(RNNModalManagerEventHandler *_Nonnull)eventHandler;
|
|
16
|
-
- (void)connectModalHostViewManager:(RCTModalHostViewManager *_Nonnull)modalHostViewManager;
|
|
17
15
|
|
|
18
16
|
- (void)showModal:(UIViewController *_Nonnull)viewController
|
|
19
17
|
animated:(BOOL)animated
|
|
@@ -25,4 +23,6 @@ typedef void (^RNNTransitionRejectionBlock)(NSString *_Nonnull code, NSString *_
|
|
|
25
23
|
|
|
26
24
|
- (void)reset;
|
|
27
25
|
|
|
26
|
+
- (UIViewController *)topPresentedVC;
|
|
27
|
+
|
|
28
28
|
@end
|
|
@@ -32,32 +32,6 @@
|
|
|
32
32
|
return self;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
36
|
-
modalHostViewManager.presentationBlock =
|
|
37
|
-
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
38
|
-
dispatch_block_t completionBlock) {
|
|
39
|
-
if (reactViewController.presentedViewController != viewController) {
|
|
40
|
-
[self showModal:viewController
|
|
41
|
-
animated:animated
|
|
42
|
-
completion:^(NSString *_Nonnull componentId) {
|
|
43
|
-
if (completionBlock)
|
|
44
|
-
completionBlock();
|
|
45
|
-
}];
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
modalHostViewManager.dismissalBlock =
|
|
50
|
-
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
51
|
-
dispatch_block_t completionBlock) {
|
|
52
|
-
[self dismissModal:viewController
|
|
53
|
-
animated:animated
|
|
54
|
-
completion:^{
|
|
55
|
-
if (completionBlock)
|
|
56
|
-
completionBlock();
|
|
57
|
-
}];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
35
|
- (void)showModal:(UIViewController<RNNLayoutProtocol> *)viewController
|
|
62
36
|
animated:(BOOL)animated
|
|
63
37
|
completion:(RNNTransitionWithComponentIdCompletionBlock)completion {
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
- (void)applyOptionsOnViewDidLayoutSubviews:(RNNNavigationOptions *)options {
|
|
91
|
+
[super applyOptionsOnViewDidLayoutSubviews:options];
|
|
91
92
|
RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
|
|
92
93
|
if (withDefault.topBar.background.component.name.hasValue) {
|
|
93
94
|
[self presentBackgroundComponent];
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */; };
|
|
52
52
|
500623A525B7003A0086AB39 /* RNNShadowOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 500623A325B7003A0086AB39 /* RNNShadowOptions.h */; };
|
|
53
53
|
500623A625B7003A0086AB39 /* RNNShadowOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 500623A425B7003A0086AB39 /* RNNShadowOptions.m */; };
|
|
54
|
+
5006E12C27974B8900D106A6 /* RNNModalHostViewManagerHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */; };
|
|
55
|
+
5006E12D27974B8900D106A6 /* RNNModalHostViewManagerHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */; };
|
|
54
56
|
5008641223856A2D00A55BE9 /* UITabBar+utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5008641023856A2C00A55BE9 /* UITabBar+utils.m */; };
|
|
55
57
|
501214C9217741A000435148 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 501214C8217741A000435148 /* libOCMock.a */; };
|
|
56
58
|
501223D72173590F000F5F98 /* RNNStackPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501223D52173590F000F5F98 /* RNNStackPresenter.h */; };
|
|
@@ -580,6 +582,8 @@
|
|
|
580
582
|
4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLargeTitleOptions.m; sourceTree = "<group>"; };
|
|
581
583
|
500623A325B7003A0086AB39 /* RNNShadowOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNShadowOptions.h; sourceTree = "<group>"; };
|
|
582
584
|
500623A425B7003A0086AB39 /* RNNShadowOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNShadowOptions.m; sourceTree = "<group>"; };
|
|
585
|
+
5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNModalHostViewManagerHandler.h; sourceTree = "<group>"; };
|
|
586
|
+
5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNModalHostViewManagerHandler.m; sourceTree = "<group>"; };
|
|
583
587
|
5008641023856A2C00A55BE9 /* UITabBar+utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBar+utils.m"; sourceTree = "<group>"; };
|
|
584
588
|
5008641123856A2D00A55BE9 /* UITabBar+utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITabBar+utils.h"; sourceTree = "<group>"; };
|
|
585
589
|
501214C8217741A000435148 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
|
|
@@ -1092,6 +1096,8 @@
|
|
|
1092
1096
|
390AD476200F499D00A8250D /* RNNSwizzles.m */,
|
|
1093
1097
|
506A2B1220973DFD00F43A95 /* RNNErrorHandler.h */,
|
|
1094
1098
|
506A2B1320973DFD00F43A95 /* RNNErrorHandler.m */,
|
|
1099
|
+
5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */,
|
|
1100
|
+
5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */,
|
|
1095
1101
|
50644A1E20E11A720026709C /* Constants.h */,
|
|
1096
1102
|
50644A1F20E11A720026709C /* Constants.m */,
|
|
1097
1103
|
50706E6B20CE7CA5003345C3 /* UIImage+utils.h */,
|
|
@@ -1818,6 +1824,7 @@
|
|
|
1818
1824
|
files = (
|
|
1819
1825
|
506BF6622600AE7600A22755 /* BoundsTransition.h in Headers */,
|
|
1820
1826
|
91CB34C9250ED50C000C132B /* RNNSearchBarOptions.h in Headers */,
|
|
1827
|
+
5006E12C27974B8900D106A6 /* RNNModalHostViewManagerHandler.h in Headers */,
|
|
1821
1828
|
5060DE73219DAD7E00D0C052 /* ReactNativeNavigation.h in Headers */,
|
|
1822
1829
|
506BF7CE26067B0500A22755 /* AnimatedUIImageView.h in Headers */,
|
|
1823
1830
|
5022EDBD2405237100852BA6 /* BottomTabPresenterCreator.h in Headers */,
|
|
@@ -2337,6 +2344,7 @@
|
|
|
2337
2344
|
5017D9EF239D2FAF00B74047 /* BottomTabsAfterInitialTabAttacher.m in Sources */,
|
|
2338
2345
|
5008641223856A2D00A55BE9 /* UITabBar+utils.m in Sources */,
|
|
2339
2346
|
9FDA2ABE24F2A42C005678CC /* RCTConvert+UIFontWeight.m in Sources */,
|
|
2347
|
+
5006E12D27974B8900D106A6 /* RNNModalHostViewManagerHandler.m in Sources */,
|
|
2340
2348
|
9FDA2AC024F2A43B005678CC /* RCTConvert+SideMenuOpenGestureMode.m in Sources */,
|
|
2341
2349
|
50BCB27223F1650800D6C8E5 /* SharedElementTransition.m in Sources */,
|
|
2342
2350
|
E5F6C3A822DB4D0F0093C2CE /* UIView+Utils.m in Sources */,
|
|
@@ -180,6 +180,18 @@ export interface OptionsLayout {
|
|
|
180
180
|
* #### (iOS specific)
|
|
181
181
|
*/
|
|
182
182
|
autoHideHomeIndicator?: boolean;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Add insets to the top layout
|
|
186
|
+
*/
|
|
187
|
+
insets?: Insets;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Resizes the layout when keyboard is visible
|
|
191
|
+
* @default true
|
|
192
|
+
* #### (Android specific)
|
|
193
|
+
*/
|
|
194
|
+
adjustResize?: boolean;
|
|
183
195
|
}
|
|
184
196
|
|
|
185
197
|
export enum OptionsModalPresentationStyle {
|
|
@@ -920,6 +932,11 @@ export interface ImageSystemSource {
|
|
|
920
932
|
export type ImageResource = ImageSourcePropType | string | ImageSystemSource;
|
|
921
933
|
|
|
922
934
|
export interface OptionsBottomTab {
|
|
935
|
+
/**
|
|
936
|
+
* Unique id in order to be found in the view hierarchy
|
|
937
|
+
*/
|
|
938
|
+
id?: string;
|
|
939
|
+
|
|
923
940
|
dotIndicator?: DotIndicatorOptions;
|
|
924
941
|
|
|
925
942
|
/**
|
|
@@ -1089,6 +1106,27 @@ export interface OverlayOptions {
|
|
|
1089
1106
|
* Set this to true if your Overlay contains a TextInput.
|
|
1090
1107
|
*/
|
|
1091
1108
|
handleKeyboardEvents?: boolean;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Attach overlay to anchor view in a certain layer of layout as a tooltip
|
|
1112
|
+
*/
|
|
1113
|
+
attach?: {
|
|
1114
|
+
/**
|
|
1115
|
+
* layout id to look for to add as a layer
|
|
1116
|
+
* which can be componentId or stackId or bottomTabsId.
|
|
1117
|
+
*/
|
|
1118
|
+
layoutId: string;
|
|
1119
|
+
anchor?: {
|
|
1120
|
+
/**
|
|
1121
|
+
* Anchor view id, TopBar Button, Title Component, BottomTab.
|
|
1122
|
+
*/
|
|
1123
|
+
id: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* The anchor view side that the tooltip will be displayed.
|
|
1126
|
+
*/
|
|
1127
|
+
gravity: 'top' | 'left' | 'right' | 'bottom';
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1092
1130
|
}
|
|
1093
1131
|
|
|
1094
1132
|
export interface ModalOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.25.0-snapshot.552",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
"tslib": "1.9.3"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
+
"pixelmatch": "^5.2.1",
|
|
70
|
+
"pngjs": "^6.0.0",
|
|
69
71
|
"@babel/plugin-proposal-export-default-from": "7.10.1",
|
|
70
72
|
"@babel/plugin-proposal-export-namespace-from": "7.10.1",
|
|
71
73
|
"@babel/types": "7.15.6",
|
package/.buildkite/pipeline.yml
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
- block: ":rocket: Release!"
|
|
3
|
-
prompt: "Fill out the details for release"
|
|
4
|
-
if: 'build.message =~ /^release\$/i'
|
|
5
|
-
fields:
|
|
6
|
-
- text: "VERSION"
|
|
7
|
-
key: "version"
|
|
8
|
-
- text: "NPM_TAG"
|
|
9
|
-
key: "npm-tag"
|
|
10
|
-
default: 'null'
|
|
11
|
-
required: false
|
|
12
|
-
- text: "BUILD_DOCUMENTATION_VERSION"
|
|
13
|
-
key: "build-documentation-version"
|
|
14
|
-
default: 'null'
|
|
15
|
-
hint: 'Leave NULL if no version is specified'
|
|
16
|
-
- text: "REMOVE_DOCUMENTATION_VERSION"
|
|
17
|
-
key: "remove-documentation-version"
|
|
18
|
-
default: 'null'
|
|
19
|
-
hint: 'Leave NULL if no version is specified'
|
|
20
|
-
|
|
21
|
-
- label: ":android: Android"
|
|
22
|
-
command:
|
|
23
|
-
- "nvm install"
|
|
24
|
-
- "npm install"
|
|
25
|
-
- "npm run test-js"
|
|
26
|
-
- "npm run test-unit-android -- --release"
|
|
27
|
-
- "npm run test-e2e-android-multi -- --release --headless --verbose --ci"
|
|
28
|
-
key: "android_build"
|
|
29
|
-
timeout_in_minutes: 90
|
|
30
|
-
|
|
31
|
-
- label: ":ios: iOS - Unit"
|
|
32
|
-
command:
|
|
33
|
-
- "nvm install"
|
|
34
|
-
- "npm install"
|
|
35
|
-
- "npm run test-unit-ios -- --release"
|
|
36
|
-
key: "ios_unit"
|
|
37
|
-
timeout_in_minutes: 90
|
|
38
|
-
|
|
39
|
-
- label: ":ios: iOS - E2E"
|
|
40
|
-
command:
|
|
41
|
-
- "nvm install"
|
|
42
|
-
- "npm install"
|
|
43
|
-
- "npm run test-snapshot-ios -- --release"
|
|
44
|
-
- "npm run test-e2e-ios -- --release --multi --ci"
|
|
45
|
-
key: "ios_e2e"
|
|
46
|
-
timeout_in_minutes: 90
|
|
47
|
-
|
|
48
|
-
- label: ":package: Publish"
|
|
49
|
-
env:
|
|
50
|
-
if: "build.pull_request.id == null"
|
|
51
|
-
command:
|
|
52
|
-
- "nvm install"
|
|
53
|
-
- "npm install"
|
|
54
|
-
- "npm run release"
|
|
55
|
-
depends_on:
|
|
56
|
-
- "android_build"
|
|
57
|
-
- "ios_unit"
|
|
58
|
-
- "ios_e2e"
|
|
59
|
-
timeout_in_minutes: 90
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.options;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
import com.reactnativenavigation.options.params.NullNumber;
|
|
6
|
-
import com.reactnativenavigation.options.params.Number;
|
|
7
|
-
import com.reactnativenavigation.options.params.ThemeColour;
|
|
8
|
-
import com.reactnativenavigation.options.params.NullThemeColour;
|
|
9
|
-
import com.reactnativenavigation.options.parsers.NumberParser;
|
|
10
|
-
|
|
11
|
-
import org.json.JSONObject;
|
|
12
|
-
|
|
13
|
-
public class LayoutOptions {
|
|
14
|
-
public static LayoutOptions parse(Context context, JSONObject json) {
|
|
15
|
-
LayoutOptions result = new LayoutOptions();
|
|
16
|
-
if (json == null) return result;
|
|
17
|
-
|
|
18
|
-
result.backgroundColor = ThemeColour.parse(context, json.optJSONObject("backgroundColor"));
|
|
19
|
-
result.componentBackgroundColor = ThemeColour.parse(context, json.optJSONObject("componentBackgroundColor"));
|
|
20
|
-
result.topMargin = NumberParser.parse(json, "topMargin");
|
|
21
|
-
result.orientation = OrientationOptions.parse(json);
|
|
22
|
-
result.direction = LayoutDirection.fromString(json.optString("direction", ""));
|
|
23
|
-
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public ThemeColour backgroundColor = new NullThemeColour();
|
|
28
|
-
public ThemeColour componentBackgroundColor = new NullThemeColour();
|
|
29
|
-
public Number topMargin = new NullNumber();
|
|
30
|
-
public OrientationOptions orientation = new OrientationOptions();
|
|
31
|
-
public LayoutDirection direction = LayoutDirection.DEFAULT;
|
|
32
|
-
|
|
33
|
-
public void mergeWith(LayoutOptions other) {
|
|
34
|
-
if (other.backgroundColor.hasValue()) backgroundColor = other.backgroundColor;
|
|
35
|
-
if (other.componentBackgroundColor.hasValue()) componentBackgroundColor = other.componentBackgroundColor;
|
|
36
|
-
if (other.topMargin.hasValue()) topMargin = other.topMargin;
|
|
37
|
-
if (other.orientation.hasValue()) orientation = other.orientation;
|
|
38
|
-
if (other.direction.hasValue()) direction = other.direction;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public void mergeWithDefault(LayoutOptions defaultOptions) {
|
|
42
|
-
if (!backgroundColor.hasValue()) backgroundColor = defaultOptions.backgroundColor;
|
|
43
|
-
if (!componentBackgroundColor.hasValue()) componentBackgroundColor = defaultOptions.componentBackgroundColor;
|
|
44
|
-
if (!topMargin.hasValue()) topMargin = defaultOptions.topMargin;
|
|
45
|
-
if (!orientation.hasValue()) orientation = defaultOptions.orientation;
|
|
46
|
-
if (!direction.hasValue()) direction = defaultOptions.direction;
|
|
47
|
-
}
|
|
48
|
-
}
|