react-native-navigation 7.25.1 → 7.25.3
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/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/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/parsers/JSONParser.java +0 -2
- 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 +35 -11
- 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 +20 -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/TopBarController.kt +4 -2
- 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/RootPresenter.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java +12 -0
- 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 +25 -1
- package/lib/src/interfaces/Options.ts +27 -1
- package/package.json +1 -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;
|
|
@@ -850,6 +850,10 @@ export interface ImageSystemSource {
|
|
|
850
850
|
}
|
|
851
851
|
export declare type ImageResource = ImageSourcePropType | string | ImageSystemSource;
|
|
852
852
|
export interface OptionsBottomTab {
|
|
853
|
+
/**
|
|
854
|
+
* Unique id in order to be found in the view hierarchy
|
|
855
|
+
*/
|
|
856
|
+
id?: string;
|
|
853
857
|
dotIndicator?: DotIndicatorOptions;
|
|
854
858
|
/**
|
|
855
859
|
* Set the text to display below the icon
|
|
@@ -862,7 +866,7 @@ export interface OptionsBottomTab {
|
|
|
862
866
|
/**
|
|
863
867
|
* Set the background color of the badge that is overlayed over the component
|
|
864
868
|
*/
|
|
865
|
-
badgeColor?:
|
|
869
|
+
badgeColor?: Color;
|
|
866
870
|
/**
|
|
867
871
|
* Show the badge with the animation.
|
|
868
872
|
* #### (Android specific)
|
|
@@ -1015,6 +1019,26 @@ export interface OverlayOptions {
|
|
|
1015
1019
|
* Set this to true if your Overlay contains a TextInput.
|
|
1016
1020
|
*/
|
|
1017
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
|
+
};
|
|
1018
1042
|
}
|
|
1019
1043
|
export interface ModalOptions {
|
|
1020
1044
|
/**
|
|
@@ -932,6 +932,11 @@ export interface ImageSystemSource {
|
|
|
932
932
|
export type ImageResource = ImageSourcePropType | string | ImageSystemSource;
|
|
933
933
|
|
|
934
934
|
export interface OptionsBottomTab {
|
|
935
|
+
/**
|
|
936
|
+
* Unique id in order to be found in the view hierarchy
|
|
937
|
+
*/
|
|
938
|
+
id?: string;
|
|
939
|
+
|
|
935
940
|
dotIndicator?: DotIndicatorOptions;
|
|
936
941
|
|
|
937
942
|
/**
|
|
@@ -945,7 +950,7 @@ export interface OptionsBottomTab {
|
|
|
945
950
|
/**
|
|
946
951
|
* Set the background color of the badge that is overlayed over the component
|
|
947
952
|
*/
|
|
948
|
-
badgeColor?:
|
|
953
|
+
badgeColor?: Color;
|
|
949
954
|
/**
|
|
950
955
|
* Show the badge with the animation.
|
|
951
956
|
* #### (Android specific)
|
|
@@ -1101,6 +1106,27 @@ export interface OverlayOptions {
|
|
|
1101
1106
|
* Set this to true if your Overlay contains a TextInput.
|
|
1102
1107
|
*/
|
|
1103
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
|
+
};
|
|
1104
1130
|
}
|
|
1105
1131
|
|
|
1106
1132
|
export interface ModalOptions {
|