react-native-screens 3.18.2 → 3.19.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.
- package/README.md +30 -38
- package/android/build.gradle +1 -5
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +10 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +15 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +5 -0
- package/ios/RNSConvert.h +6 -0
- package/ios/RNSConvert.mm +26 -0
- package/ios/RNSEnums.h +6 -0
- package/ios/RNSFullWindowOverlay.mm +32 -0
- package/ios/RNSScreen.h +10 -2
- package/ios/RNSScreen.mm +133 -2
- package/ios/RNSScreenStackHeaderConfig.mm +17 -1
- package/lib/commonjs/TransitionProgressContext.js +2 -7
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/createNativeStackNavigator.js +29 -76
- package/lib/commonjs/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +2 -10
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +2 -10
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +0 -7
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/commonjs/index.js +21 -45
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.native.js +43 -103
- package/lib/commonjs/index.native.js.map +1 -1
- package/lib/commonjs/native-stack/index.js +6 -11
- package/lib/commonjs/native-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -25
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/types.js +4 -0
- package/lib/commonjs/native-stack/types.js.map +1 -1
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +2 -6
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +11 -19
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js +0 -7
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +7 -18
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js +2 -10
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +1 -6
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js +46 -50
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +32 -58
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +11 -21
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js +3 -10
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +3 -19
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +2 -7
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js +0 -3
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +2 -10
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js +2 -10
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/commonjs/utils.js +0 -4
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/TransitionProgressContext.js.map +1 -1
- package/lib/module/createNativeStackNavigator.js +29 -67
- package/lib/module/createNativeStackNavigator.js.map +1 -1
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -1
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js +0 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js +0 -1
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/module/index.js +13 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.native.js +45 -93
- package/lib/module/index.native.js.map +1 -1
- package/lib/module/native-stack/index.js +3 -2
- package/lib/module/native-stack/index.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +16 -16
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/types.js +1 -1
- package/lib/module/native-stack/types.js.map +1 -1
- package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js +8 -7
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js +0 -4
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/useBackPressSubscription.js +7 -8
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/module/native-stack/utils/useHeaderHeight.js +0 -2
- package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/views/FontProcessor.js +0 -3
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/native-stack/views/HeaderConfig.js +44 -39
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +32 -42
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +12 -9
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js +5 -4
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js +3 -14
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js +2 -1
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/module/reanimated/index.js.map +1 -1
- package/lib/module/reanimated/useReanimatedTransitionProgress.js +0 -2
- package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useTransitionProgress.js +0 -2
- package/lib/module/useTransitionProgress.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -0
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
- package/lib/typescript/types.d.ts +1 -0
- package/package.json +9 -1
- package/src/createNativeStackNavigator.tsx +4 -2
- package/src/fabric/ScreenNativeComponent.js +7 -0
- package/src/index.native.tsx +32 -16
- package/src/index.tsx +13 -8
- package/src/native-stack/types.tsx +4 -5
- package/src/native-stack/views/HeaderConfig.tsx +8 -10
- package/src/native-stack/views/NativeStackView.tsx +8 -4
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +5 -3
- package/src/reanimated/ReanimatedScreen.tsx +1 -1
package/README.md
CHANGED
|
@@ -18,31 +18,7 @@ To learn about how to use `react-native-screens` with Fabric architecture, head
|
|
|
18
18
|
|
|
19
19
|
### iOS
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
To make sure that there are no issues with screen orientation you should put following code in your `AppDelegate.m`:
|
|
23
|
-
|
|
24
|
-
```objective-c
|
|
25
|
-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
26
|
-
{
|
|
27
|
-
...
|
|
28
|
-
#if !TARGET_OS_TV
|
|
29
|
-
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
|
|
30
|
-
#endif // !TARGET_OS_TV
|
|
31
|
-
...
|
|
32
|
-
return YES:
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
- (void)applicationWillTerminate:(UIApplication *)application
|
|
36
|
-
{
|
|
37
|
-
#if !TARGET_OS_TV
|
|
38
|
-
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
|
|
39
|
-
#endif // !TARGET_OS_TV
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
You can see example of these changes being introduced in our [example applications](https://github.com/software-mansion/react-native-screens/blob/main/TestsExample/ios/TestsExample/AppDelegate.mm).
|
|
44
|
-
|
|
45
|
-
Other aspects of installation should be completely handled with auto-linking, just ensure you installed pods after adding this module.
|
|
21
|
+
Installation on iOS is completely handled with auto-linking, if you have ensured pods are installed after adding this module, no other actions are necessary.
|
|
46
22
|
|
|
47
23
|
### Android
|
|
48
24
|
|
|
@@ -51,13 +27,24 @@ On Android the View state is not persisted consistently across Activity restarts
|
|
|
51
27
|
For most people using an app built from the react-native template, that means editing `MainActivity.java`, likely located in `android/app/src/main/java/<your package name>/MainActivity.java`
|
|
52
28
|
|
|
53
29
|
You should add this code, which specifically discards any Activity state persisted during the Activity restart process, to avoid inconsistencies that lead to crashes.
|
|
30
|
+
Please note that the override code should not be placed inside `MainActivityDelegate`, but rather directly in `MainActivity`.
|
|
54
31
|
|
|
55
32
|
```java
|
|
56
33
|
import android.os.Bundle;
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
35
|
+
public class MainActivity extends ReactActivity {
|
|
36
|
+
|
|
37
|
+
//...code
|
|
38
|
+
|
|
39
|
+
//react-native-screens override
|
|
40
|
+
@Override
|
|
41
|
+
protected void onCreate(Bundle savedInstanceState) {
|
|
42
|
+
super.onCreate(null);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static class MainActivityDelegate extends ReactActivityDelegate {
|
|
46
|
+
//...code
|
|
47
|
+
}
|
|
61
48
|
}
|
|
62
49
|
```
|
|
63
50
|
|
|
@@ -81,6 +68,7 @@ buildscript {
|
|
|
81
68
|
```
|
|
82
69
|
|
|
83
70
|
**Disclaimer**: `react-native-screens` requires Kotlin `1.3.50` or higher.
|
|
71
|
+
|
|
84
72
|
</details>
|
|
85
73
|
|
|
86
74
|
### Windows
|
|
@@ -100,17 +88,17 @@ Screens are already integrated with the React Native's most popular navigation l
|
|
|
100
88
|
| 2.0.0+ | 0.60.0+ |
|
|
101
89
|
|
|
102
90
|
### Support for Fabric
|
|
103
|
-
[Fabric](https://reactnative.dev/architecture/fabric-renderer) is React Native's new rendering system.
|
|
104
91
|
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
[Fabric](https://reactnative.dev/architecture/fabric-renderer) is React Native's new rendering system.
|
|
93
|
+
|
|
94
|
+
- As of [version `3.18.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.18.0) of this project, Fabric is supported only for react-native 0.70+. Support for lower versions has been dropped.
|
|
95
|
+
- As of [version `3.14.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.14.0) of this project, Fabric is supported only for react-native 0.69+. Support for lower versions has been dropped.
|
|
107
96
|
|
|
108
97
|
| version | react-native version |
|
|
109
98
|
| ------- | -------------------- |
|
|
110
99
|
| 3.18.0+ | 0.70.0+ |
|
|
111
100
|
| 3.14.0+ | 0.69.0+ |
|
|
112
101
|
|
|
113
|
-
|
|
114
102
|
## Usage with [react-navigation](https://github.com/react-navigation/react-navigation)
|
|
115
103
|
|
|
116
104
|
Screens support is built into [react-navigation](https://github.com/react-navigation/react-navigation) starting from version [2.14.0](https://github.com/react-navigation/react-navigation/releases/tag/2.14.0) for all the different navigator types (stack, tab, drawer, etc).
|
|
@@ -167,6 +155,10 @@ To take advantage of the native stack navigator primitive for React Navigation t
|
|
|
167
155
|
- for React Navigation v5 to the [README in react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/main/native-stack)
|
|
168
156
|
- for older versions to the [README in react-native-screens/createNativeStackNavigator](https://github.com/software-mansion/react-native-screens/tree/main/createNativeStackNavigator)
|
|
169
157
|
|
|
158
|
+
## `FullWindowOverlay`
|
|
159
|
+
|
|
160
|
+
Native `iOS` component for rendering views straight under the `Window`. Based on `RCTPerfMonitor`. You should treat it as a wrapper, providing full-screen, transparent view which receives no props and should ideally render one child `View`, being the root of its view hierarchy. For the example usage, see https://github.com/software-mansion/react-native-screens/blob/main/TestsExample/src/Test1096.tsx
|
|
161
|
+
|
|
170
162
|
## Interop with [react-native-navigation](https://github.com/wix/react-native-navigation)
|
|
171
163
|
|
|
172
164
|
React-native-navigation library already uses native containers for rendering navigation scenes so wrapping these scenes with `<ScreenContainer>` or `<Screen>` component does not provide any benefits. Yet if you would like to build a component that uses screens primitives under the hood (for example a view pager component) it is safe to use `<ScreenContainer>` and `<Screen>` components for that as these work out of the box when rendered on react-native-navigation scenes.
|
|
@@ -194,12 +186,12 @@ Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a
|
|
|
194
186
|
|
|
195
187
|
### Other problems
|
|
196
188
|
|
|
197
|
-
| Problem
|
|
198
|
-
|
|
|
199
|
-
| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773)
|
|
200
|
-
| [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843)
|
|
201
|
-
| [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649)
|
|
202
|
-
| [`onScroll` and `onMomentumScrollEnd` of previous screen triggered in bottom tabs](https://github.com/software-mansion/react-native-screens/issues/1183)
|
|
189
|
+
| Problem | Solution |
|
|
190
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
191
|
+
| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | [related PRs](https://github.com/software-mansion/react-native-screens/issues/773#issuecomment-783469792) |
|
|
192
|
+
| [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) | [explanation](https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119) |
|
|
193
|
+
| [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) | [potential fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) |
|
|
194
|
+
| [`onScroll` and `onMomentumScrollEnd` of previous screen triggered in bottom tabs](https://github.com/software-mansion/react-native-screens/issues/1183) | [explanation](https://github.com/software-mansion/react-native-screens/issues/1183#issuecomment-949313111) |
|
|
203
195
|
|
|
204
196
|
## Contributing
|
|
205
197
|
|
package/android/build.gradle
CHANGED
|
@@ -103,11 +103,7 @@ repositories {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
dependencies {
|
|
106
|
-
|
|
107
|
-
implementation project(":ReactAndroid")
|
|
108
|
-
} else {
|
|
109
|
-
implementation 'com.facebook.react:react-native:+'
|
|
110
|
-
}
|
|
106
|
+
implementation 'com.facebook.react:react-native:+'
|
|
111
107
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
112
108
|
implementation 'androidx.fragment:fragment:1.2.1'
|
|
113
109
|
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
|
|
@@ -156,6 +156,16 @@ class ScreenViewManager : ViewGroupManager<Screen>(), RNSScreenManagerInterface<
|
|
|
156
156
|
|
|
157
157
|
override fun setSwipeDirection(view: Screen?, value: String?) = Unit
|
|
158
158
|
|
|
159
|
+
override fun setSheetAllowedDetents(view: Screen, value: String?) = Unit
|
|
160
|
+
|
|
161
|
+
override fun setSheetLargestUndimmedDetent(view: Screen, value: String?) = Unit
|
|
162
|
+
|
|
163
|
+
override fun setSheetGrabberVisible(view: Screen?, value: Boolean) = Unit
|
|
164
|
+
|
|
165
|
+
override fun setSheetCornerRadius(view: Screen?, value: Float) = Unit
|
|
166
|
+
|
|
167
|
+
override fun setSheetExpandsWhenScrolledToEdge(view: Screen?, value: Boolean) = Unit
|
|
168
|
+
|
|
159
169
|
override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any> {
|
|
160
170
|
return MapBuilder.of(
|
|
161
171
|
ScreenDismissedEvent.EVENT_NAME,
|
package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java
CHANGED
|
@@ -23,6 +23,21 @@ public class RNSScreenManagerDelegate<T extends View, U extends BaseViewManagerI
|
|
|
23
23
|
@Override
|
|
24
24
|
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
25
25
|
switch (propName) {
|
|
26
|
+
case "sheetAllowedDetents":
|
|
27
|
+
mViewManager.setSheetAllowedDetents(view, (String) value);
|
|
28
|
+
break;
|
|
29
|
+
case "sheetLargestUndimmedDetent":
|
|
30
|
+
mViewManager.setSheetLargestUndimmedDetent(view, (String) value);
|
|
31
|
+
break;
|
|
32
|
+
case "sheetGrabberVisible":
|
|
33
|
+
mViewManager.setSheetGrabberVisible(view, value == null ? false : (boolean) value);
|
|
34
|
+
break;
|
|
35
|
+
case "sheetCornerRadius":
|
|
36
|
+
mViewManager.setSheetCornerRadius(view, value == null ? -1f : ((Double) value).floatValue());
|
|
37
|
+
break;
|
|
38
|
+
case "sheetExpandsWhenScrolledToEdge":
|
|
39
|
+
mViewManager.setSheetExpandsWhenScrolledToEdge(view, value == null ? false : (boolean) value);
|
|
40
|
+
break;
|
|
26
41
|
case "customAnimationOnSwipe":
|
|
27
42
|
mViewManager.setCustomAnimationOnSwipe(view, value == null ? false : (boolean) value);
|
|
28
43
|
break;
|
package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java
CHANGED
|
@@ -14,6 +14,11 @@ import androidx.annotation.Nullable;
|
|
|
14
14
|
import com.facebook.react.bridge.ReadableMap;
|
|
15
15
|
|
|
16
16
|
public interface RNSScreenManagerInterface<T extends View> {
|
|
17
|
+
void setSheetAllowedDetents(T view, @Nullable String value);
|
|
18
|
+
void setSheetLargestUndimmedDetent(T view, @Nullable String value);
|
|
19
|
+
void setSheetGrabberVisible(T view, boolean value);
|
|
20
|
+
void setSheetCornerRadius(T view, float value);
|
|
21
|
+
void setSheetExpandsWhenScrolledToEdge(T view, boolean value);
|
|
17
22
|
void setCustomAnimationOnSwipe(T view, boolean value);
|
|
18
23
|
void setFullScreenSwipeEnabled(T view, boolean value);
|
|
19
24
|
void setHomeIndicatorHidden(T view, boolean value);
|
package/ios/RNSConvert.h
CHANGED
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
+ (RNSScreenSwipeDirection)RNSScreenSwipeDirectionFromCppEquivalent:
|
|
20
20
|
(facebook::react::RNSScreenSwipeDirection)swipeDirection;
|
|
21
21
|
|
|
22
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents:
|
|
23
|
+
(facebook::react::RNSScreenSheetAllowedDetents)allowedDetents;
|
|
24
|
+
|
|
25
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent:
|
|
26
|
+
(facebook::react::RNSScreenSheetLargestUndimmedDetent)detent;
|
|
27
|
+
|
|
22
28
|
+ (NSDictionary *)gestureResponseDistanceDictFromCppStruct:
|
|
23
29
|
(const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance;
|
|
24
30
|
|
package/ios/RNSConvert.mm
CHANGED
|
@@ -89,6 +89,32 @@
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromAllowedDetents:
|
|
93
|
+
(facebook::react::RNSScreenSheetAllowedDetents)allowedDetents
|
|
94
|
+
{
|
|
95
|
+
switch (allowedDetents) {
|
|
96
|
+
case facebook::react::RNSScreenSheetAllowedDetents::All:
|
|
97
|
+
return RNSScreenDetentTypeAll;
|
|
98
|
+
case facebook::react::RNSScreenSheetAllowedDetents::Large:
|
|
99
|
+
return RNSScreenDetentTypeLarge;
|
|
100
|
+
case facebook::react::RNSScreenSheetAllowedDetents::Medium:
|
|
101
|
+
return RNSScreenDetentTypeMedium;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
+ (RNSScreenDetentType)RNSScreenDetentTypeFromLargestUndimmedDetent:
|
|
106
|
+
(facebook::react::RNSScreenSheetLargestUndimmedDetent)detent
|
|
107
|
+
{
|
|
108
|
+
switch (detent) {
|
|
109
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::All:
|
|
110
|
+
return RNSScreenDetentTypeAll;
|
|
111
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::Large:
|
|
112
|
+
return RNSScreenDetentTypeLarge;
|
|
113
|
+
case facebook::react::RNSScreenSheetLargestUndimmedDetent::Medium:
|
|
114
|
+
return RNSScreenDetentTypeMedium;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
92
118
|
+ (NSDictionary *)gestureResponseDistanceDictFromCppStruct:
|
|
93
119
|
(const facebook::react::RNSScreenGestureResponseDistanceStruct &)gestureResponseDistance
|
|
94
120
|
{
|
package/ios/RNSEnums.h
CHANGED
|
@@ -57,3 +57,9 @@ typedef NS_ENUM(NSInteger, RNSScreenStackHeaderSubviewType) {
|
|
|
57
57
|
RNSScreenStackHeaderSubviewTypeCenter,
|
|
58
58
|
RNSScreenStackHeaderSubviewTypeSearchBar,
|
|
59
59
|
};
|
|
60
|
+
|
|
61
|
+
typedef NS_ENUM(NSInteger, RNSScreenDetentType) {
|
|
62
|
+
RNSScreenDetentTypeMedium,
|
|
63
|
+
RNSScreenDetentTypeLarge,
|
|
64
|
+
RNSScreenDetentTypeAll,
|
|
65
|
+
};
|
|
@@ -25,6 +25,38 @@
|
|
|
25
25
|
return NO;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
|
29
|
+
{
|
|
30
|
+
BOOL canReceiveTouchEvents = ([self isUserInteractionEnabled] && ![self isHidden]);
|
|
31
|
+
if (!canReceiveTouchEvents) {
|
|
32
|
+
return nil;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// `hitSubview` is the topmost subview which was hit. The hit point can
|
|
36
|
+
// be outside the bounds of `view` (e.g., if -clipsToBounds is NO).
|
|
37
|
+
UIView *hitSubview = nil;
|
|
38
|
+
BOOL isPointInside = [self pointInside:point withEvent:event];
|
|
39
|
+
if (![self clipsToBounds] || isPointInside) {
|
|
40
|
+
// Take z-index into account when calculating the touch target.
|
|
41
|
+
NSArray<UIView *> *sortedSubviews = [self reactZIndexSortedSubviews];
|
|
42
|
+
|
|
43
|
+
// The default behaviour of UIKit is that if a view does not contain a point,
|
|
44
|
+
// then no subviews will be returned from hit testing, even if they contain
|
|
45
|
+
// the hit point. By doing hit testing directly on the subviews, we bypass
|
|
46
|
+
// the strict containment policy (i.e., UIKit guarantees that every ancestor
|
|
47
|
+
// of the hit view will return YES from -pointInside:withEvent:). See:
|
|
48
|
+
// - https://developer.apple.com/library/ios/qa/qa2013/qa1812.html
|
|
49
|
+
for (UIView *subview in [sortedSubviews reverseObjectEnumerator]) {
|
|
50
|
+
CGPoint convertedPoint = [subview convertPoint:point fromView:self];
|
|
51
|
+
hitSubview = [subview hitTest:convertedPoint withEvent:event];
|
|
52
|
+
if (hitSubview != nil) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return hitSubview;
|
|
58
|
+
}
|
|
59
|
+
|
|
28
60
|
@end
|
|
29
61
|
|
|
30
62
|
@implementation RNSFullWindowOverlay {
|
package/ios/RNSScreen.h
CHANGED
|
@@ -58,6 +58,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
58
58
|
@property (nonatomic) RNSScreenStackPresentation stackPresentation;
|
|
59
59
|
@property (nonatomic) RNSScreenSwipeDirection swipeDirection;
|
|
60
60
|
@property (nonatomic) RNSScreenReplaceAnimation replaceAnimation;
|
|
61
|
+
|
|
61
62
|
@property (nonatomic, retain) NSNumber *transitionDuration;
|
|
62
63
|
@property (nonatomic, readonly) BOOL dismissed;
|
|
63
64
|
@property (nonatomic) BOOL hideKeyboardOnSwipe;
|
|
@@ -74,7 +75,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
74
75
|
@property (nonatomic) UIInterfaceOrientationMask screenOrientation;
|
|
75
76
|
@property (nonatomic) BOOL statusBarHidden;
|
|
76
77
|
@property (nonatomic) BOOL homeIndicatorHidden;
|
|
77
|
-
|
|
78
|
+
|
|
79
|
+
// Props controlling UISheetPresentationController
|
|
80
|
+
@property (nonatomic) RNSScreenDetentType sheetAllowedDetents;
|
|
81
|
+
@property (nonatomic) RNSScreenDetentType sheetLargestUndimmedDetent;
|
|
82
|
+
@property (nonatomic) BOOL sheetGrabberVisible;
|
|
83
|
+
@property (nonatomic) CGFloat sheetCornerRadius;
|
|
84
|
+
@property (nonatomic) BOOL sheetExpandsWhenScrolledToEdge;
|
|
85
|
+
#endif // !TARGET_OS_TV
|
|
78
86
|
|
|
79
87
|
#ifdef RN_FABRIC_ENABLED
|
|
80
88
|
// we recreate the behavior of `reactSetFrame` on new architecture
|
|
@@ -89,7 +97,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
89
97
|
@property (nonatomic, copy) RCTDirectEventBlock onWillDisappear;
|
|
90
98
|
@property (nonatomic, copy) RCTDirectEventBlock onNativeDismissCancelled;
|
|
91
99
|
@property (nonatomic, copy) RCTDirectEventBlock onTransitionProgress;
|
|
92
|
-
#endif
|
|
100
|
+
#endif // RN_FABRIC_ENABLED
|
|
93
101
|
|
|
94
102
|
- (void)notifyFinishTransitioning;
|
|
95
103
|
|
package/ios/RNSScreen.mm
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
return self;
|
|
59
59
|
}
|
|
60
|
-
#endif
|
|
60
|
+
#endif // RN_FABRIC_ENABLED
|
|
61
61
|
|
|
62
62
|
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
|
63
63
|
{
|
|
@@ -82,6 +82,9 @@
|
|
|
82
82
|
_hasStatusBarHiddenSet = NO;
|
|
83
83
|
_hasOrientationSet = NO;
|
|
84
84
|
_hasHomeIndicatorHiddenSet = NO;
|
|
85
|
+
#if !TARGET_OS_TV
|
|
86
|
+
_sheetExpandsWhenScrolledToEdge = YES;
|
|
87
|
+
#endif // !TARGET_OS_TV
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
- (UIViewController *)reactViewController
|
|
@@ -146,6 +149,7 @@
|
|
|
146
149
|
// ignored, we only need to keep in mind not to set presentation delegate
|
|
147
150
|
break;
|
|
148
151
|
}
|
|
152
|
+
|
|
149
153
|
// There is a bug in UIKit which causes retain loop when presentationController is accessed for a
|
|
150
154
|
// controller that is not going to be presented modally. We therefore need to avoid setting the
|
|
151
155
|
// delegate for screens presented using push. This also means that when controller is updated from
|
|
@@ -513,6 +517,60 @@
|
|
|
513
517
|
return self.stackPresentation != RNSScreenStackPresentationPush;
|
|
514
518
|
}
|
|
515
519
|
|
|
520
|
+
#if !TARGET_OS_TV
|
|
521
|
+
/**
|
|
522
|
+
* Updates settings for sheet presentation controller.
|
|
523
|
+
* Note that this method should not be called inside `stackPresentation` setter, because on Paper we don't have
|
|
524
|
+
* guarantee that values of all related props had been updated earlier.
|
|
525
|
+
*/
|
|
526
|
+
- (void)updatePresentationStyle
|
|
527
|
+
{
|
|
528
|
+
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_15_0) && \
|
|
529
|
+
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0
|
|
530
|
+
if (@available(iOS 15.0, *)) {
|
|
531
|
+
UISheetPresentationController *sheet = _controller.sheetPresentationController;
|
|
532
|
+
if (_stackPresentation == RNSScreenStackPresentationFormSheet && sheet != nil) {
|
|
533
|
+
sheet.prefersScrollingExpandsWhenScrolledToEdge = _sheetExpandsWhenScrolledToEdge;
|
|
534
|
+
sheet.prefersGrabberVisible = _sheetGrabberVisible;
|
|
535
|
+
sheet.preferredCornerRadius =
|
|
536
|
+
_sheetCornerRadius < 0 ? UISheetPresentationControllerAutomaticDimension : _sheetCornerRadius;
|
|
537
|
+
|
|
538
|
+
if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeMedium) {
|
|
539
|
+
sheet.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierMedium;
|
|
540
|
+
} else if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeLarge) {
|
|
541
|
+
sheet.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge;
|
|
542
|
+
} else if (_sheetLargestUndimmedDetent == RNSScreenDetentTypeAll) {
|
|
543
|
+
sheet.largestUndimmedDetentIdentifier = nil;
|
|
544
|
+
} else {
|
|
545
|
+
RCTLogError(@"Unhandled value of sheetLargestUndimmedDetent passed");
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (_sheetAllowedDetents == RNSScreenDetentTypeMedium) {
|
|
549
|
+
sheet.detents = @[ UISheetPresentationControllerDetent.mediumDetent ];
|
|
550
|
+
if (sheet.selectedDetentIdentifier != UISheetPresentationControllerDetentIdentifierMedium) {
|
|
551
|
+
[sheet animateChanges:^{
|
|
552
|
+
sheet.selectedDetentIdentifier = UISheetPresentationControllerDetentIdentifierMedium;
|
|
553
|
+
}];
|
|
554
|
+
}
|
|
555
|
+
} else if (_sheetAllowedDetents == RNSScreenDetentTypeLarge) {
|
|
556
|
+
sheet.detents = @[ UISheetPresentationControllerDetent.largeDetent ];
|
|
557
|
+
if (sheet.selectedDetentIdentifier != UISheetPresentationControllerDetentIdentifierLarge) {
|
|
558
|
+
[sheet animateChanges:^{
|
|
559
|
+
sheet.selectedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge;
|
|
560
|
+
}];
|
|
561
|
+
}
|
|
562
|
+
} else if (_sheetAllowedDetents == RNSScreenDetentTypeAll) {
|
|
563
|
+
sheet.detents =
|
|
564
|
+
@[ UISheetPresentationControllerDetent.mediumDetent, UISheetPresentationControllerDetent.largeDetent ];
|
|
565
|
+
} else {
|
|
566
|
+
RCTLogError(@"Unhandled value of sheetAllowedDetents passed");
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
#endif // Check for max allowed iOS version
|
|
571
|
+
}
|
|
572
|
+
#endif // !TARGET_OS_TV
|
|
573
|
+
|
|
516
574
|
#pragma mark - Fabric specific
|
|
517
575
|
#ifdef RN_FABRIC_ENABLED
|
|
518
576
|
|
|
@@ -612,7 +670,20 @@
|
|
|
612
670
|
if (newScreenProps.homeIndicatorHidden != oldScreenProps.homeIndicatorHidden) {
|
|
613
671
|
[self setHomeIndicatorHidden:newScreenProps.homeIndicatorHidden];
|
|
614
672
|
}
|
|
615
|
-
|
|
673
|
+
|
|
674
|
+
[self setSheetGrabberVisible:newScreenProps.sheetGrabberVisible];
|
|
675
|
+
[self setSheetCornerRadius:newScreenProps.sheetCornerRadius];
|
|
676
|
+
[self setSheetExpandsWhenScrolledToEdge:newScreenProps.sheetExpandsWhenScrolledToEdge];
|
|
677
|
+
|
|
678
|
+
if (newScreenProps.sheetAllowedDetents != oldScreenProps.sheetAllowedDetents) {
|
|
679
|
+
[self setSheetAllowedDetents:[RNSConvert RNSScreenDetentTypeFromAllowedDetents:newScreenProps.sheetAllowedDetents]];
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (newScreenProps.sheetLargestUndimmedDetent != oldScreenProps.sheetLargestUndimmedDetent) {
|
|
683
|
+
[self setSheetLargestUndimmedDetent:
|
|
684
|
+
[RNSConvert RNSScreenDetentTypeFromLargestUndimmedDetent:newScreenProps.sheetLargestUndimmedDetent]];
|
|
685
|
+
}
|
|
686
|
+
#endif // !TARGET_OS_TV
|
|
616
687
|
|
|
617
688
|
// Notice that we compare against _stackPresentation, not oldScreenProps.stackPresentation.
|
|
618
689
|
// See comment in prepareForRecycle method for explanation.
|
|
@@ -622,6 +693,11 @@
|
|
|
622
693
|
[self setStackPresentation:newStackPresentation];
|
|
623
694
|
}
|
|
624
695
|
|
|
696
|
+
#if !TARGET_OS_TV
|
|
697
|
+
// This must be called after setter for stackPresentation
|
|
698
|
+
[self updatePresentationStyle];
|
|
699
|
+
#endif // !TARGET_OS_TV
|
|
700
|
+
|
|
625
701
|
if (newScreenProps.stackAnimation != oldScreenProps.stackAnimation) {
|
|
626
702
|
[self setStackAnimation:[RNSConvert RNSScreenStackAnimationFromCppEquivalent:newScreenProps.stackAnimation]];
|
|
627
703
|
}
|
|
@@ -660,6 +736,14 @@
|
|
|
660
736
|
#pragma mark - Paper specific
|
|
661
737
|
#else
|
|
662
738
|
|
|
739
|
+
- (void)didSetProps:(NSArray<NSString *> *)changedProps
|
|
740
|
+
{
|
|
741
|
+
[super didSetProps:changedProps];
|
|
742
|
+
#if !TARGET_OS_TV
|
|
743
|
+
[self updatePresentationStyle];
|
|
744
|
+
#endif // !TARGET_OS_TV
|
|
745
|
+
}
|
|
746
|
+
|
|
663
747
|
- (void)setPointerEvents:(RCTPointerEvents)pointerEvents
|
|
664
748
|
{
|
|
665
749
|
// pointer events settings are managed by the parent screen container, we ignore
|
|
@@ -1196,13 +1280,50 @@ RCT_EXPORT_VIEW_PROPERTY(statusBarAnimation, UIStatusBarAnimation)
|
|
|
1196
1280
|
RCT_EXPORT_VIEW_PROPERTY(statusBarHidden, BOOL)
|
|
1197
1281
|
RCT_EXPORT_VIEW_PROPERTY(statusBarStyle, RNSStatusBarStyle)
|
|
1198
1282
|
RCT_EXPORT_VIEW_PROPERTY(homeIndicatorHidden, BOOL)
|
|
1283
|
+
|
|
1284
|
+
RCT_EXPORT_VIEW_PROPERTY(sheetAllowedDetents, RNSScreenDetentType);
|
|
1285
|
+
RCT_EXPORT_VIEW_PROPERTY(sheetLargestUndimmedDetent, RNSScreenDetentType);
|
|
1286
|
+
RCT_EXPORT_VIEW_PROPERTY(sheetGrabberVisible, BOOL);
|
|
1287
|
+
RCT_EXPORT_VIEW_PROPERTY(sheetCornerRadius, CGFloat);
|
|
1288
|
+
RCT_EXPORT_VIEW_PROPERTY(sheetExpandsWhenScrolledToEdge, BOOL);
|
|
1199
1289
|
#endif
|
|
1200
1290
|
|
|
1291
|
+
#if !TARGET_OS_TV
|
|
1292
|
+
// See:
|
|
1293
|
+
// 1. https://github.com/software-mansion/react-native-screens/pull/1543
|
|
1294
|
+
// 2. https://github.com/software-mansion/react-native-screens/pull/1596
|
|
1295
|
+
// This class is instatiated from React Native's internals during application startup
|
|
1296
|
+
- (instancetype)init
|
|
1297
|
+
{
|
|
1298
|
+
if (self = [super init]) {
|
|
1299
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
1300
|
+
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
return self;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
- (void)dealloc
|
|
1307
|
+
{
|
|
1308
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
1309
|
+
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
#endif // !TARGET_OS_TV
|
|
1313
|
+
|
|
1201
1314
|
- (UIView *)view
|
|
1202
1315
|
{
|
|
1203
1316
|
return [[RNSScreenView alloc] initWithBridge:self.bridge];
|
|
1204
1317
|
}
|
|
1205
1318
|
|
|
1319
|
+
+ (BOOL)requiresMainQueueSetup
|
|
1320
|
+
{
|
|
1321
|
+
// Returning NO here despite the fact some initialization in -init method dispatches tasks
|
|
1322
|
+
// on main queue, because the comments in RN source code states that modules which return YES
|
|
1323
|
+
// here will be constructed ahead-of-time -- and this is not required in our case.
|
|
1324
|
+
return NO;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1206
1327
|
@end
|
|
1207
1328
|
|
|
1208
1329
|
@implementation RCTConvert (RNSScreen)
|
|
@@ -1277,6 +1398,16 @@ RCT_ENUM_CONVERTER(
|
|
|
1277
1398
|
RNSStatusBarStyleAuto,
|
|
1278
1399
|
integerValue)
|
|
1279
1400
|
|
|
1401
|
+
RCT_ENUM_CONVERTER(
|
|
1402
|
+
RNSScreenDetentType,
|
|
1403
|
+
(@{
|
|
1404
|
+
@"large" : @(RNSScreenDetentTypeLarge),
|
|
1405
|
+
@"medium" : @(RNSScreenDetentTypeMedium),
|
|
1406
|
+
@"all" : @(RNSScreenDetentTypeAll),
|
|
1407
|
+
}),
|
|
1408
|
+
RNSScreenDetentTypeAll,
|
|
1409
|
+
integerValue)
|
|
1410
|
+
|
|
1280
1411
|
+ (UIInterfaceOrientationMask)UIInterfaceOrientationMask:(id)json
|
|
1281
1412
|
{
|
|
1282
1413
|
json = [self NSString:json];
|
|
@@ -460,7 +460,23 @@
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
#if !TARGET_OS_TV
|
|
463
|
-
|
|
463
|
+
// Fix for github.com/react-navigation/react-navigation/issues/11015
|
|
464
|
+
// It allows to hide back button title and use back button menu as normal.
|
|
465
|
+
// Back button display mode and back button menu are available since iOS 14.
|
|
466
|
+
if (@available(iOS 14.0, *)) {
|
|
467
|
+
// Make sure to set display mode to default.
|
|
468
|
+
// This line resets back button display mode - especially needed on the Fabric architecture.
|
|
469
|
+
navitem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeDefault;
|
|
470
|
+
|
|
471
|
+
NSString *trimmedBackTitle =
|
|
472
|
+
[config.backTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
|
473
|
+
|
|
474
|
+
// When an whitespace only back title is passed set back button mode to minimal.
|
|
475
|
+
if (config.backTitle != nil && [trimmedBackTitle length] == 0) {
|
|
476
|
+
navitem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeMinimal;
|
|
477
|
+
}
|
|
478
|
+
} else if (
|
|
479
|
+
config.backTitle != nil || config.backTitleFontFamily || config.backTitleFontSize ||
|
|
464
480
|
config.disableBackButtonMenu) {
|
|
465
481
|
RNSUIBarButtonItem *backBarButtonItem = [[RNSUIBarButtonItem alloc] initWithTitle:config.backTitle ?: prevItem.title
|
|
466
482
|
style:UIBarButtonItemStylePlain
|
|
@@ -4,14 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
10
|
var _default = /*#__PURE__*/React.createContext(undefined);
|
|
15
|
-
|
|
16
11
|
exports.default = _default;
|
|
17
12
|
//# sourceMappingURL=TransitionProgressContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","createContext","undefined"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext<TransitionProgressContextBody | undefined>(\n undefined\n);\n"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAShBA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV;AAAA"}
|