react-native-screens 4.11.0-beta.0 → 4.11.0-beta.2
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/RNScreens.podspec +3 -1
- package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +18 -12
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +48 -97
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +4 -124
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetDelegate.kt +2 -2
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetUtils.kt +23 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/anim/ScreensAnimation.kt +18 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/views/ChildDrawingOrderStrategyImpl.kt +48 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/views/ChildrenDrawingOrderStrategy.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/views/ScreensCoordinatorLayout.kt +99 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +1 -2
- package/ios/RNSConvert.mm +44 -47
- package/ios/RNSFullWindowOverlay.h +2 -0
- package/ios/RNSFullWindowOverlay.mm +32 -8
- package/ios/RNSScreen.mm +20 -34
- package/ios/RNSScreenStack.mm +6 -8
- package/ios/RNSScreenStackHeaderConfig.mm +120 -223
- package/ios/RNSScreenWindowTraits.mm +19 -37
- package/ios/RNSSearchBar.mm +15 -24
- package/lib/commonjs/components/FullWindowOverlay.js +2 -1
- package/lib/commonjs/components/FullWindowOverlay.js.map +1 -1
- package/lib/commonjs/components/ScreenContentWrapper.windows.js +10 -0
- package/lib/commonjs/components/ScreenContentWrapper.windows.js.map +1 -0
- package/lib/commonjs/components/ScreenFooter.windows.js +11 -0
- package/lib/commonjs/components/ScreenFooter.windows.js.map +1 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +1 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/components/FullWindowOverlay.js +2 -1
- package/lib/module/components/FullWindowOverlay.js.map +1 -1
- package/lib/module/components/ScreenContentWrapper.windows.js +4 -0
- package/lib/module/components/ScreenContentWrapper.windows.js.map +1 -0
- package/lib/module/components/ScreenFooter.windows.js +6 -0
- package/lib/module/components/ScreenFooter.windows.js.map +1 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +3 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/typescript/components/FullWindowOverlay.d.ts +4 -2
- package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -1
- package/lib/typescript/components/ScreenContentWrapper.windows.d.ts +4 -0
- package/lib/typescript/components/ScreenContentWrapper.windows.d.ts.map +1 -0
- package/lib/typescript/components/ScreenFooter.windows.d.ts +6 -0
- package/lib/typescript/components/ScreenFooter.windows.d.ts.map +1 -0
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +3 -1
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -1
- package/lib/typescript/types.d.ts +2 -2
- package/native-stack/README.md +2 -2
- package/package.json +1 -1
- package/src/components/FullWindowOverlay.tsx +14 -3
- package/src/components/ScreenContentWrapper.windows.tsx +5 -0
- package/src/components/ScreenFooter.windows.tsx +7 -0
- package/src/fabric/FullWindowOverlayNativeComponent.ts +5 -1
- package/src/native-stack/types.tsx +1 -1
- package/src/types.tsx +2 -2
- package/windows/RNScreens/ModalScreenViewManager.cpp +22 -0
- package/windows/RNScreens/ModalScreenViewManager.h +13 -0
- package/windows/RNScreens/RNScreens.vcxproj +11 -1
- package/windows/RNScreens/RNScreens.vcxproj.filters +10 -0
- package/windows/RNScreens/ReactPackageProvider.cpp +18 -0
- package/windows/RNScreens/Screen.cpp +128 -122
- package/windows/RNScreens/Screen.h +6 -2
- package/windows/RNScreens/ScreenStackHeaderConfig.cpp +25 -1
- package/windows/RNScreens/ScreenStackHeaderConfig.h +10 -1
- package/windows/RNScreens/ScreenStackHeaderConfigViewManager.cpp +42 -1
- package/windows/RNScreens/ScreenStackHeaderConfigViewManager.h +15 -0
- package/windows/RNScreens/ScreenStackHeaderSubview.cpp +43 -0
- package/windows/RNScreens/ScreenStackHeaderSubview.h +24 -0
- package/windows/RNScreens/ScreenStackHeaderSubviewViewManager.cpp +129 -0
- package/windows/RNScreens/ScreenStackHeaderSubviewViewManager.h +77 -0
- package/windows/RNScreens/ScreenViewManager.cpp +45 -16
- package/windows/RNScreens/ScreenViewManager.h +1 -1
- package/windows/RNScreens/SearchBar.cpp +19 -0
- package/windows/RNScreens/SearchBar.h +14 -0
- package/windows/RNScreens/SearchBarViewManager.cpp +88 -0
- package/windows/RNScreens/SearchBarViewManager.h +62 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","View","useWindowDimensions","FullWindowOverlayNativeComponent","NativeFullWindowOverlay","FullWindowOverlay","props","width","height","OS","console","warn","createElement","style","absoluteFill","children"],"sourceRoot":"../../../src","sources":["components/FullWindowOverlay.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAwC,OAAO;AAC3D,SACEC,QAAQ,EAERC,UAAU,EACVC,IAAI,EAEJC,mBAAmB,QACd,cAAc;;AAErB;AACA,OAAOC,gCAAgC,MAAM,4CAA4C;
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","View","useWindowDimensions","FullWindowOverlayNativeComponent","NativeFullWindowOverlay","FullWindowOverlay","props","width","height","OS","console","warn","createElement","style","absoluteFill","accessibilityContainerViewIsModal","unstable_accessibilityContainerViewIsModal","children"],"sourceRoot":"../../../src","sources":["components/FullWindowOverlay.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAwC,OAAO;AAC3D,SACEC,QAAQ,EAERC,UAAU,EACVC,IAAI,EAEJC,mBAAmB,QACd,cAAc;;AAErB;AACA,OAAOC,gCAAgC,MAAM,4CAA4C;AAGzF,MAAMC,uBAKL,GAAGD,gCAAuC;AAO3C,SAASE,iBAAiBA,CAACC,KAA6B,EAAE;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGN,mBAAmB,CAAC,CAAC;EAC/C,IAAIH,QAAQ,CAACU,EAAE,KAAK,KAAK,EAAE;IACzBC,OAAO,CAACC,IAAI,CAAC,uDAAuD,CAAC;IACrE,oBAAOb,KAAA,CAAAc,aAAA,CAACX,IAAI,EAAKK,KAAQ,CAAC;EAC5B;EACA,oBACER,KAAA,CAAAc,aAAA,CAACR,uBAAuB;IACtBS,KAAK,EAAE,CAACb,UAAU,CAACc,YAAY,EAAE;MAAEP,KAAK;MAAEC;IAAO,CAAC,CAAE;IACpDO,iCAAiC,EAC/BT,KAAK,CAACU;EACP,GACAV,KAAK,CAACW,QACgB,CAAC;AAE9B;AAEA,eAAeZ,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","ScreenContentWrapper"],"sourceRoot":"../../../src","sources":["components/ScreenContentWrapper.windows.tsx"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AAEnC,MAAMC,oBAAoB,GAAGD,IAAI;AAEjC,eAAeC,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","ScreenFooter","FooterComponent"],"sourceRoot":"../../../src","sources":["components/ScreenFooter.windows.tsx"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AAEnC,MAAMC,YAAY,GAAGD,IAAI;AACzB,MAAME,eAAe,GAAGF,IAAI;AAE5B,eAAeC,YAAY;AAC3B,SAASC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/FullWindowOverlayNativeComponent.ts"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,sBAAsB,MAAM,yDAAyD
|
|
1
|
+
{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../src","sources":["fabric/FullWindowOverlayNativeComponent.ts"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,sBAAsB,MAAM,yDAAyD;;AAI5F;;AAKA,eAAeA,sBAAsB,CAAc,sBAAsB,EAAE;EACzEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type FullWindowOverlayProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
|
|
4
|
+
unstable_accessibilityContainerViewIsModal?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function FullWindowOverlay(props: FullWindowOverlayProps): React.JSX.Element;
|
|
5
7
|
export default FullWindowOverlay;
|
|
6
8
|
//# sourceMappingURL=FullWindowOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullWindowOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FullWindowOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FullWindowOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FullWindowOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AAqB5D,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,0CAA0C,CAAC,EAAE,OAAO,CAAC;CACtD,CAAC;AAEF,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAevD;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenContentWrapper.windows.d.ts","sourceRoot":"","sources":["../../../src/components/ScreenContentWrapper.windows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,QAAA,MAAM,oBAAoB,aAAO,CAAC;AAElC,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenFooter.windows.d.ts","sourceRoot":"","sources":["../../../src/components/ScreenFooter.windows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,QAAA,MAAM,YAAY,aAAO,CAAC;AAC1B,QAAA,MAAM,eAAe,aAAO,CAAC;AAE7B,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react-native/types/modules/Codegen" />
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
|
-
|
|
3
|
+
import { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
accessibilityContainerViewIsModal?: WithDefault<boolean, true>;
|
|
4
6
|
}
|
|
5
7
|
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
6
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullWindowOverlayNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/FullWindowOverlayNativeComponent.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"FullWindowOverlayNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/FullWindowOverlayNativeComponent.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAGxE,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,iCAAiC,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;CAChE;;AAED,wBAEG"}
|
|
@@ -121,7 +121,7 @@ export type NativeStackNavigationOptions = {
|
|
|
121
121
|
*/
|
|
122
122
|
disableBackButtonMenu?: boolean;
|
|
123
123
|
/**
|
|
124
|
-
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu
|
|
124
|
+
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set.
|
|
125
125
|
* The following values are currently supported (they correspond to [UINavigationItemBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc)):
|
|
126
126
|
*
|
|
127
127
|
* - `default` – show given back button previous controller title, system generic or just icon based on available space
|
|
@@ -120,7 +120,7 @@ export interface ScreenProps extends ViewProps {
|
|
|
120
120
|
*
|
|
121
121
|
* @deprecated For all apps targeting Android SDK 35 or above this prop has no effect and is subject to removal in the future.
|
|
122
122
|
* For SDK below 35 this works only with specific app setup.
|
|
123
|
-
* This
|
|
123
|
+
* This prop is subject to removal in the future.
|
|
124
124
|
* See: https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)
|
|
125
125
|
*/
|
|
126
126
|
navigationBarColor?: ColorValue;
|
|
@@ -495,7 +495,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
|
|
495
495
|
*/
|
|
496
496
|
disableBackButtonMenu?: boolean;
|
|
497
497
|
/**
|
|
498
|
-
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu
|
|
498
|
+
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set.
|
|
499
499
|
* The following values are currently supported (they correspond to [UINavigationItemBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc)):
|
|
500
500
|
*
|
|
501
501
|
* - `default` – show given back button previous controller title, system generic or just icon based on available space
|
package/native-stack/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Boolean indicating whether to show the menu on longPress of iOS >= 14 back butto
|
|
|
82
82
|
|
|
83
83
|
#### `backButtonDisplayMode` (iOS only)
|
|
84
84
|
|
|
85
|
-
Enum value indicating display mode of back button. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu
|
|
85
|
+
Enum value indicating display mode of back button. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set. The `backTitleVisible` forces `backButtonDisplayMode: minimal` and omits other values. Read more [#2800](https://github.com/software-mansion/react-native-screens/pull/2800). The other props, under the hood, customize `backButtonItem` which overrides `backButtonDisplayMode`. Read more [#2123](https://github.com/software-mansion/react-native-screens/pull/2123).
|
|
86
86
|
|
|
87
87
|
Possible options:
|
|
88
88
|
|
|
@@ -349,7 +349,7 @@ How the screen should be presented. Possible values:
|
|
|
349
349
|
- `containedModal` – will use "UIModalPresentationCurrentContext" modal style on iOS and will fallback to `"modal"` on Android.
|
|
350
350
|
- `containedTransparentModal` – will use "UIModalPresentationOverCurrentContext" modal style on iOS and will fallback to `"transparentModal"` on Android.
|
|
351
351
|
- `fullScreenModal` – will use "UIModalPresentationFullScreen" modal style on iOS and will fallback to `"modal"` on Android.
|
|
352
|
-
- `formSheet` – will use "UIModalPresentationFormSheet" modal style on iOS and
|
|
352
|
+
- `formSheet` – will use "UIModalPresentationFormSheet" modal style on iOS and "BottomSheetBehavior" on Android.
|
|
353
353
|
- `pageSheet` – will use "UIModalPresentationPageSheet" modal style on iOS and will fallback to `"modal"` on Android.
|
|
354
354
|
|
|
355
355
|
Defaults to `push`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screens",
|
|
3
|
-
"version": "4.11.0-beta.
|
|
3
|
+
"version": "4.11.0-beta.2",
|
|
4
4
|
"description": "Native navigation primitives for your React Native app.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"submodules": "git submodule update --init --recursive && (cd react-navigation && yarn && yarn build && cd ../)",
|
|
@@ -10,13 +10,21 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// Native components
|
|
12
12
|
import FullWindowOverlayNativeComponent from '../fabric/FullWindowOverlayNativeComponent';
|
|
13
|
+
import type { NativeProps } from '../fabric/FullWindowOverlayNativeComponent';
|
|
14
|
+
|
|
13
15
|
const NativeFullWindowOverlay: React.ComponentType<
|
|
14
16
|
PropsWithChildren<{
|
|
15
17
|
style: StyleProp<ViewStyle>;
|
|
16
|
-
}>
|
|
18
|
+
}> &
|
|
19
|
+
NativeProps
|
|
17
20
|
> = FullWindowOverlayNativeComponent as any;
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
type FullWindowOverlayProps = {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
unstable_accessibilityContainerViewIsModal?: boolean;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function FullWindowOverlay(props: FullWindowOverlayProps) {
|
|
20
28
|
const { width, height } = useWindowDimensions();
|
|
21
29
|
if (Platform.OS !== 'ios') {
|
|
22
30
|
console.warn('Using FullWindowOverlay is only valid on iOS devices.');
|
|
@@ -24,7 +32,10 @@ function FullWindowOverlay(props: { children: ReactNode }) {
|
|
|
24
32
|
}
|
|
25
33
|
return (
|
|
26
34
|
<NativeFullWindowOverlay
|
|
27
|
-
style={[StyleSheet.absoluteFill, { width, height }]}
|
|
35
|
+
style={[StyleSheet.absoluteFill, { width, height }]}
|
|
36
|
+
accessibilityContainerViewIsModal={
|
|
37
|
+
props.unstable_accessibilityContainerViewIsModal
|
|
38
|
+
}>
|
|
28
39
|
{props.children}
|
|
29
40
|
</NativeFullWindowOverlay>
|
|
30
41
|
);
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
4
|
import type { ViewProps } from 'react-native';
|
|
5
|
+
import { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
// Internal export, not part of stable library API.
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
accessibilityContainerViewIsModal?: WithDefault<boolean, true>;
|
|
10
|
+
}
|
|
7
11
|
|
|
8
12
|
export default codegenNativeComponent<NativeProps>('RNSFullWindowOverlay', {
|
|
9
13
|
interfaceOnly: true,
|
|
@@ -140,7 +140,7 @@ export type NativeStackNavigationOptions = {
|
|
|
140
140
|
*/
|
|
141
141
|
disableBackButtonMenu?: boolean;
|
|
142
142
|
/**
|
|
143
|
-
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu
|
|
143
|
+
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set.
|
|
144
144
|
* The following values are currently supported (they correspond to [UINavigationItemBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc)):
|
|
145
145
|
*
|
|
146
146
|
* - `default` – show given back button previous controller title, system generic or just icon based on available space
|
package/src/types.tsx
CHANGED
|
@@ -188,7 +188,7 @@ export interface ScreenProps extends ViewProps {
|
|
|
188
188
|
*
|
|
189
189
|
* @deprecated For all apps targeting Android SDK 35 or above this prop has no effect and is subject to removal in the future.
|
|
190
190
|
* For SDK below 35 this works only with specific app setup.
|
|
191
|
-
* This
|
|
191
|
+
* This prop is subject to removal in the future.
|
|
192
192
|
* See: https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)
|
|
193
193
|
*/
|
|
194
194
|
navigationBarColor?: ColorValue;
|
|
@@ -576,7 +576,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
|
|
|
576
576
|
*/
|
|
577
577
|
disableBackButtonMenu?: boolean;
|
|
578
578
|
/**
|
|
579
|
-
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu
|
|
579
|
+
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set.
|
|
580
580
|
* The following values are currently supported (they correspond to [UINavigationItemBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc)):
|
|
581
581
|
*
|
|
582
582
|
* - `default` – show given back button previous controller title, system generic or just icon based on available space
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#include "pch.h"
|
|
2
|
+
#include "ModalScreenViewManager.h"
|
|
3
|
+
#include "JSValueXaml.h"
|
|
4
|
+
#include "NativeModules.h"
|
|
5
|
+
|
|
6
|
+
namespace winrt {
|
|
7
|
+
using namespace Microsoft::ReactNative;
|
|
8
|
+
using namespace Windows::Foundation;
|
|
9
|
+
using namespace Windows::Foundation::Collections;
|
|
10
|
+
using namespace Windows::UI;
|
|
11
|
+
using namespace Windows::UI::Xaml;
|
|
12
|
+
using namespace Windows::UI::Xaml::Controls;
|
|
13
|
+
} // namespace winrt
|
|
14
|
+
|
|
15
|
+
namespace winrt::RNScreens::implementation {
|
|
16
|
+
// IViewManager
|
|
17
|
+
winrt::hstring ModalScreenViewManager::Name() noexcept {
|
|
18
|
+
return L"RNSModalScreen";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
} // namespace winrt::RNScreens::implementation
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include "NativeModules.h"
|
|
3
|
+
#include "winrt/Microsoft.ReactNative.h"
|
|
4
|
+
#include "ScreenViewManager.h"
|
|
5
|
+
|
|
6
|
+
namespace winrt::RNScreens::implementation {
|
|
7
|
+
|
|
8
|
+
class ModalScreenViewManager : public ScreenViewManager {
|
|
9
|
+
public:
|
|
10
|
+
ModalScreenViewManager() = default;
|
|
11
|
+
winrt::hstring Name() noexcept;
|
|
12
|
+
};
|
|
13
|
+
} // namespace winrt::RNScreens::implementation
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
|
|
21
21
|
<PropertyGroup Label="Fallback Windows SDK Versions">
|
|
22
22
|
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
|
|
23
|
-
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.
|
|
23
|
+
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
24
24
|
</PropertyGroup>
|
|
25
25
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
26
26
|
<ItemGroup Label="ProjectConfigurations">
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
<ClInclude Include="ScreenContainerViewManager.h" />
|
|
123
123
|
<ClInclude Include="ScreenStack.h" />
|
|
124
124
|
<ClInclude Include="ScreenStackHeaderConfigViewManager.h" />
|
|
125
|
+
<ClInclude Include="ScreenStackHeaderSubviewViewManager.h" />
|
|
126
|
+
<ClInclude Include="SearchBarViewManager.h" />
|
|
127
|
+
<ClInclude Include="ModalScreenViewManager.h" />
|
|
125
128
|
<ClInclude Include="ScreenViewManager.h" />
|
|
126
129
|
<ClInclude Include="RNScreens.h">
|
|
127
130
|
<DependentUpon>RNScreens.idl</DependentUpon>
|
|
@@ -133,6 +136,8 @@
|
|
|
133
136
|
<DependentUpon>RNScreens.idl</DependentUpon>
|
|
134
137
|
</ClCompile>
|
|
135
138
|
<ClInclude Include="ScreenStackHeaderConfig.h" />
|
|
139
|
+
<ClInclude Include="ScreenStackHeaderSubview.h" />
|
|
140
|
+
<ClInclude Include="SearchBar.h" />
|
|
136
141
|
<ClInclude Include="ScreenStackViewManager.h" />
|
|
137
142
|
</ItemGroup>
|
|
138
143
|
<ItemGroup>
|
|
@@ -144,12 +149,17 @@
|
|
|
144
149
|
<ClCompile Include="ScreenContainerViewManager.cpp" />
|
|
145
150
|
<ClCompile Include="ScreenStack.cpp" />
|
|
146
151
|
<ClCompile Include="ScreenStackHeaderConfigViewManager.cpp" />
|
|
152
|
+
<ClCompile Include="ScreenStackHeaderSubviewViewManager.cpp" />
|
|
153
|
+
<ClCompile Include="SearchBarViewManager.cpp" />
|
|
154
|
+
<ClCompile Include="ModalScreenViewManager.cpp" />
|
|
147
155
|
<ClCompile Include="ScreenViewManager.cpp" />
|
|
148
156
|
<ClCompile Include="ReactPackageProvider.cpp">
|
|
149
157
|
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
|
150
158
|
</ClCompile>
|
|
151
159
|
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
|
152
160
|
<ClCompile Include="ScreenStackHeaderConfig.cpp" />
|
|
161
|
+
<ClCompile Include="ScreenStackHeaderSubview.cpp" />
|
|
162
|
+
<ClCompile Include="SearchBar.cpp" />
|
|
153
163
|
<ClCompile Include="ScreenStackViewManager.cpp" />
|
|
154
164
|
</ItemGroup>
|
|
155
165
|
<ItemGroup>
|
|
@@ -17,8 +17,13 @@
|
|
|
17
17
|
<ClCompile Include="RNScreens.cpp" />
|
|
18
18
|
<ClCompile Include="Screen.cpp" />
|
|
19
19
|
<ClCompile Include="ScreenStackHeaderConfigViewManager.cpp" />
|
|
20
|
+
<ClCompile Include="ScreenStackHeaderSubviewViewManager.cpp" />
|
|
21
|
+
<ClCompile Include="SearchBarViewManager.cpp" />
|
|
22
|
+
<ClCompile Include="ModalScreenViewManager.cpp" />
|
|
20
23
|
<ClCompile Include="ScreenViewManager.cpp" />
|
|
21
24
|
<ClCompile Include="ScreenStackHeaderConfig.cpp" />
|
|
25
|
+
<ClCompile Include="ScreenStackHeaderSubview.cpp" />
|
|
26
|
+
<ClCompile Include="SearchBar.cpp" />
|
|
22
27
|
<ClCompile Include="ScreenStackViewManager.cpp" />
|
|
23
28
|
<ClCompile Include="ScreenStack.cpp" />
|
|
24
29
|
<ClCompile Include="ScreenContainerViewManager.cpp" />
|
|
@@ -31,8 +36,13 @@
|
|
|
31
36
|
<ClInclude Include="RNScreens.h" />
|
|
32
37
|
<ClInclude Include="Screen.h" />
|
|
33
38
|
<ClInclude Include="ScreenStackHeaderConfigViewManager.h" />
|
|
39
|
+
<ClInclude Include="ScreenStackHeaderSubviewViewManager.h" />
|
|
40
|
+
<ClInclude Include="SearchBarViewManager.h" />
|
|
41
|
+
<ClInclude Include="ModalScreenViewManager.h" />
|
|
34
42
|
<ClInclude Include="ScreenViewManager.h" />
|
|
35
43
|
<ClInclude Include="ScreenStackHeaderConfig.h" />
|
|
44
|
+
<ClInclude Include="ScreenStackHeaderSubview.h" />
|
|
45
|
+
<ClInclude Include="SearchBar.h" />
|
|
36
46
|
<ClInclude Include="ScreenStackViewManager.h" />
|
|
37
47
|
<ClInclude Include="ScreenStack.h" />
|
|
38
48
|
<ClInclude Include="ScreenContainer.h" />
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
#include "ScreenStackHeaderConfigViewManager.h"
|
|
9
9
|
#include "ScreenStackViewManager.h"
|
|
10
10
|
#include "ScreenViewManager.h"
|
|
11
|
+
#include "ScreenStackHeaderSubviewViewManager.h"
|
|
12
|
+
#include "ModalScreenViewManager.h"
|
|
13
|
+
#include "SearchBarViewManager.h"
|
|
11
14
|
|
|
12
15
|
using namespace winrt::Microsoft::ReactNative;
|
|
13
16
|
|
|
@@ -17,14 +20,29 @@ void ReactPackageProvider::CreatePackage(
|
|
|
17
20
|
packageBuilder.AddViewManager(L"RNScreensViewManager", []() {
|
|
18
21
|
return winrt::make<ScreenViewManager>();
|
|
19
22
|
});
|
|
23
|
+
|
|
20
24
|
packageBuilder.AddViewManager(L"RNScreensStackHeaderConfigViewManager", []() {
|
|
21
25
|
return winrt::make<ScreenStackHeaderConfigViewManager>();
|
|
22
26
|
});
|
|
27
|
+
|
|
23
28
|
packageBuilder.AddViewManager(L"RNSScreenStackViewManager", []() {
|
|
24
29
|
return winrt::make<ScreenStackViewManager>();
|
|
25
30
|
});
|
|
31
|
+
|
|
26
32
|
packageBuilder.AddViewManager(L"RNSScreenContainerViewManager", []() {
|
|
27
33
|
return winrt::make<ScreenContainerViewManager>();
|
|
28
34
|
});
|
|
35
|
+
|
|
36
|
+
packageBuilder.AddViewManager(L"RNSScreenStackHeaderSubviewViewManager", [] () {
|
|
37
|
+
return winrt::make<ScreenStackHeaderSubviewViewManager>();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
packageBuilder.AddViewManager(L"RNSModalScreenViewManager", [] () {
|
|
41
|
+
return winrt::make<ModalScreenViewManager>();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
packageBuilder.AddViewManager(L"RNSSearchBar", [] () {
|
|
45
|
+
return winrt::make<SearchBarViewManager>();
|
|
46
|
+
});
|
|
29
47
|
}
|
|
30
48
|
} // namespace winrt::RNScreens::implementation
|