From 7628767f972c0da5bad91641adff9976d0e4dc20 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 29 Feb 2024 16:57:34 +0100 Subject: [PATCH 001/589] feat: revert native stack to the state when PR was merged --- package-lock.json | 17 ++++++++ package.json | 1 + ...react-navigation+native-stack+6.9.17.patch | 39 +++++++++++++++++++ .../AppNavigator/ModalStackNavigators.tsx | 8 ++-- .../BaseCentralPaneNavigator.tsx | 4 +- .../Navigators/Overlay/index.native.tsx | 7 ++++ .../{Overlay.tsx => Overlay/index.tsx} | 0 .../Navigators/RightModalNavigator.tsx | 4 +- .../Navigation/AppNavigator/PublicScreens.tsx | 4 +- .../defaultScreenOptions/index.native.ts | 11 ++++++ .../defaultScreenOptions/index.ts | 12 ++++++ .../index.native.ts | 8 ++++ .../getRightModalNavigatorOptions/index.ts | 20 ++++++++++ .../getRootNavigatorScreenOptions.ts | 23 ++++------- .../index.native.ts | 8 ++++ .../modalStackNavigatorOptions/index.ts | 9 +++++ .../createPlatformStackNavigator.native.ts | 7 ++++ .../createPlatformStackNavigator.ts | 5 +++ 18 files changed, 162 insertions(+), 25 deletions(-) create mode 100644 patches/@react-navigation+native-stack+6.9.17.patch create mode 100644 src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx rename src/libs/Navigation/AppNavigator/Navigators/{Overlay.tsx => Overlay/index.tsx} (100%) create mode 100644 src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts create mode 100644 src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts create mode 100644 src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts create mode 100644 src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts create mode 100644 src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts create mode 100644 src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts diff --git a/package-lock.json b/package-lock.json index dc170b7a9572..0be13f3af786 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "@react-native-picker/picker": "2.5.1", "@react-navigation/material-top-tabs": "^6.6.3", "@react-navigation/native": "6.1.12", + "@react-navigation/native-stack": "^6.9.17", "@react-navigation/stack": "6.3.16", "@react-ng/bounds-observer": "^0.2.1", "@rnmapbox/maps": "^10.1.11", @@ -9310,6 +9311,22 @@ "react-native": "*" } }, + "node_modules/@react-navigation/native-stack": { + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.17.tgz", + "integrity": "sha512-X8p8aS7JptQq7uZZNFEvfEcPf6tlK4PyVwYDdryRbG98B4bh2wFQYMThxvqa+FGEN7USEuHdv2mF0GhFKfX0ew==", + "dependencies": { + "@react-navigation/elements": "^1.3.21", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + } + }, "node_modules/@react-navigation/routers": { "version": "6.1.9", "license": "MIT", diff --git a/package.json b/package.json index 26918ddc1ce3..fb174293063a 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "@react-native-picker/picker": "2.5.1", "@react-navigation/material-top-tabs": "^6.6.3", "@react-navigation/native": "6.1.12", + "@react-navigation/native-stack": "^6.9.17", "@react-navigation/stack": "6.3.16", "@react-ng/bounds-observer": "^0.2.1", "@rnmapbox/maps": "^10.1.11", diff --git a/patches/@react-navigation+native-stack+6.9.17.patch b/patches/@react-navigation+native-stack+6.9.17.patch new file mode 100644 index 000000000000..933ca6ce792e --- /dev/null +++ b/patches/@react-navigation+native-stack+6.9.17.patch @@ -0,0 +1,39 @@ +diff --git a/node_modules/@react-navigation/native-stack/src/types.tsx b/node_modules/@react-navigation/native-stack/src/types.tsx +index 206fb0b..7a34a8e 100644 +--- a/node_modules/@react-navigation/native-stack/src/types.tsx ++++ b/node_modules/@react-navigation/native-stack/src/types.tsx +@@ -490,6 +490,14 @@ export type NativeStackNavigationOptions = { + * Only supported on iOS and Android. + */ + freezeOnBlur?: boolean; ++ // partial changes from https://github.com/react-navigation/react-navigation/commit/90cfbf23bcc5259f3262691a9eec6c5b906e5262 ++ // patch can be removed when new version of `native-stack` will be released ++ /** ++ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`. ++ * ++ * Only supported on iOS ++ */ ++ keyboardHandlingEnabled?: boolean; + }; + + export type NativeStackNavigatorProps = DefaultNavigatorOptions< +diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +index a005c43..03d8b50 100644 +--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx ++++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +@@ -161,6 +161,7 @@ const SceneView = ({ + statusBarTranslucent, + statusBarColor, + freezeOnBlur, ++ keyboardHandlingEnabled, + } = options; + + let { +@@ -289,6 +290,7 @@ const SceneView = ({ + onNativeDismissCancelled={onNativeDismissCancelled} + // this prop is available since rn-screens 3.16 + freezeOnBlur={freezeOnBlur} ++ hideKeyboardOnSwipe={keyboardHandlingEnabled} + > + + diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index 1946c969cdad..f7ac892e40bc 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -1,8 +1,8 @@ import type {ParamListBase} from '@react-navigation/routers'; import type {StackNavigationOptions} from '@react-navigation/stack'; -import {CardStyleInterpolators, createStackNavigator} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type { AddPersonalBankAccountNavigatorParamList, DetailsNavigatorParamList, @@ -35,6 +35,7 @@ import type { import type {ThemeStyles} from '@styles/index'; import type {Screen} from '@src/SCREENS'; import SCREENS from '@src/SCREENS'; +import subRouteOptions from './modalStackNavigatorOptions'; type Screens = Partial React.ComponentType>>; @@ -45,16 +46,15 @@ type Screens = Partial React.ComponentType>>; * @param getScreenOptions optional function that returns the screen options, override the default options */ function createModalStackNavigator(screens: Screens, getScreenOptions?: (styles: ThemeStyles) => StackNavigationOptions): React.ComponentType { - const ModalStackNavigator = createStackNavigator(); + const ModalStackNavigator = createPlatformStackNavigator(); function ModalStack() { const styles = useThemeStyles(); const defaultSubRouteOptions = useMemo( (): StackNavigationOptions => ({ + ...subRouteOptions, cardStyle: styles.navigationScreenCardStyle, - headerShown: false, - cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, }), [styles], ); diff --git a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx index 16f403342a58..570f223142d1 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx @@ -1,12 +1,12 @@ -import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import ReportScreenWrapper from '@libs/Navigation/AppNavigator/ReportScreenWrapper'; import getCurrentUrl from '@libs/Navigation/currentUrl'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {CentralPaneNavigatorParamList} from '@navigation/types'; import SCREENS from '@src/SCREENS'; -const Stack = createStackNavigator(); +const Stack = createPlatformStackNavigator(); const url = getCurrentUrl(); const openOnAdminRoom = url ? new URL(url).searchParams.get('openOnAdminRoom') : undefined; diff --git a/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx b/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx new file mode 100644 index 000000000000..30651e32cbd6 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx @@ -0,0 +1,7 @@ +function Overlay() { + return null; +} + +Overlay.displayName = 'Overlay'; + +export default Overlay; diff --git a/src/libs/Navigation/AppNavigator/Navigators/Overlay.tsx b/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.tsx similarity index 100% rename from src/libs/Navigation/AppNavigator/Navigators/Overlay.tsx rename to src/libs/Navigation/AppNavigator/Navigators/Overlay/index.tsx diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index c421bdc82028..550fb947a4e6 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -1,5 +1,4 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import {createStackNavigator} from '@react-navigation/stack'; import React, {useMemo, useRef} from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; @@ -7,6 +6,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; @@ -14,7 +14,7 @@ import Overlay from './Overlay'; type RightModalNavigatorProps = StackScreenProps; -const Stack = createStackNavigator(); +const Stack = createPlatformStackNavigator(); function RightModalNavigator({navigation}: RightModalNavigatorProps) { const styles = useThemeStyles(); diff --git a/src/libs/Navigation/AppNavigator/PublicScreens.tsx b/src/libs/Navigation/AppNavigator/PublicScreens.tsx index 6b1557994627..792a538cfd39 100644 --- a/src/libs/Navigation/AppNavigator/PublicScreens.tsx +++ b/src/libs/Navigation/AppNavigator/PublicScreens.tsx @@ -1,5 +1,5 @@ -import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {PublicScreensParamList} from '@navigation/types'; import LogInWithShortLivedAuthTokenPage from '@pages/LogInWithShortLivedAuthTokenPage'; import AppleSignInDesktopPage from '@pages/signin/AppleSignInDesktopPage'; @@ -12,7 +12,7 @@ import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import defaultScreenOptions from './defaultScreenOptions'; -const RootStack = createStackNavigator(); +const RootStack = createPlatformStackNavigator(); function PublicScreens() { return ( diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts new file mode 100644 index 000000000000..17100bc71bda --- /dev/null +++ b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts @@ -0,0 +1,11 @@ +const defaultScreenOptions = { + contentStyle: { + overflow: 'visible', + flex: 1, + }, + headerShown: false, + animationTypeForReplace: 'push', + animation: 'slide_from_right', +}; + +export default defaultScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts new file mode 100644 index 000000000000..4015c43c679e --- /dev/null +++ b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts @@ -0,0 +1,12 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; + +const defaultScreenOptions: StackNavigationOptions = { + cardStyle: { + overflow: 'visible', + flex: 1, + }, + headerShown: false, + animationTypeForReplace: 'push', +}; + +export default defaultScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts new file mode 100644 index 000000000000..2b062fd2f2be --- /dev/null +++ b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts @@ -0,0 +1,8 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +const rightModalNavigatorOptions = (): NativeStackNavigationOptions => ({ + presentation: 'card', + animation: 'slide_from_right', +}); + +export default rightModalNavigatorOptions; diff --git a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts new file mode 100644 index 000000000000..935c0041b794 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts @@ -0,0 +1,20 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; +// eslint-disable-next-line no-restricted-imports +import getNavigationModalCardStyle from '@styles/utils/getNavigationModalCardStyles'; + +const rightModalNavigatorOptions = (isSmallScreenWidth: boolean): StackNavigationOptions => ({ + presentation: 'transparentModal', + + // We want pop in RHP since there are some flows that would work weird otherwise + animationTypeForReplace: 'pop', + cardStyle: { + ...getNavigationModalCardStyle(), + + // This is necessary to cover translated sidebar with overlay. + width: isSmallScreenWidth ? '100%' : '200%', + // Excess space should be on the left so we need to position from right. + right: 0, + }, +}); + +export default rightModalNavigatorOptions; diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 1dd9322e0b47..a8d512314b5e 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -4,6 +4,7 @@ import type {StyleUtilsType} from '@styles/utils'; import variables from '@styles/variables'; import CONFIG from '@src/CONFIG'; import createModalCardStyleInterpolator from './createModalCardStyleInterpolator'; +import getRightModalNavigatorOptions from './getRightModalNavigatorOptions'; type ScreenOptions = Record; @@ -23,23 +24,12 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr return { rightModalNavigator: { ...commonScreenOptions, + ...getRightModalNavigatorOptions(isSmallScreenWidth), cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), - presentation: 'transparentModal', - - // We want pop in RHP since there are some flows that would work weird otherwise - animationTypeForReplace: 'pop', - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - - // This is necessary to cover translated sidebar with overlay. - width: isSmallScreenWidth ? '100%' : '200%', - // Excess space should be on the left so we need to position from right. - right: 0, - }, }, leftModalNavigator: { ...commonScreenOptions, - cardStyleInterpolator: (props) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), presentation: 'transparentModal', gestureDirection: 'horizontal-inverted', @@ -58,8 +48,8 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr homeScreen: { title: CONFIG.SITE_TITLE, ...commonScreenOptions, + // Note: The card* properties won't be applied on mobile platforms, as they use the native defaults. cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), - cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, @@ -72,6 +62,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr fullScreen: { ...commonScreenOptions, + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, props), cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), @@ -86,7 +77,9 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, animationEnabled: isSmallScreenWidth, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, props), - + // temporary solution - better to hide a keyboard than see keyboard flickering + // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details + keyboardHandlingEnabled: true, cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), paddingRight: isSmallScreenWidth ? 0 : variables.sideBarWidth, diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts new file mode 100644 index 000000000000..ca9769fa9972 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts @@ -0,0 +1,8 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +const defaultSubRouteOptions: NativeStackNavigationOptions = { + headerShown: false, + animation: 'slide_from_right', +}; + +export default defaultSubRouteOptions; diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.ts new file mode 100644 index 000000000000..280a38b263b7 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.ts @@ -0,0 +1,9 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; +import {CardStyleInterpolators} from '@react-navigation/stack'; + +const defaultSubRouteOptions: StackNavigationOptions = { + headerShown: false, + cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, +}; + +export default defaultSubRouteOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts new file mode 100644 index 000000000000..ef44cefc13c9 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts @@ -0,0 +1,7 @@ +import {createNativeStackNavigator} from '@react-navigation/native-stack'; + +function createPlatformStackNavigator() { + return createNativeStackNavigator(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts new file mode 100644 index 000000000000..51228295572f --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts @@ -0,0 +1,5 @@ +import {createStackNavigator} from '@react-navigation/stack'; + +const createPlatformStackNavigator: typeof createStackNavigator = () => createStackNavigator(); + +export default createPlatformStackNavigator; From 349e3b03d2e1ffeb9a43b532abe34152226fa3ba Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 6 Mar 2024 15:27:27 +0100 Subject: [PATCH 002/589] fix: cross platform slide_from_left transition --- patches/react-native-screens+3.29.0.patch | 149 ++++++++++++++++++ .../Navigators/LeftModalNavigator.tsx | 3 +- .../index.native.tsx | 4 +- .../index.native.tsx | 4 +- .../getRootNavigatorScreenOptions.ts | 6 +- 5 files changed, 159 insertions(+), 7 deletions(-) create mode 100644 patches/react-native-screens+3.29.0.patch diff --git a/patches/react-native-screens+3.29.0.patch b/patches/react-native-screens+3.29.0.patch new file mode 100644 index 000000000000..d59c1d596cfd --- /dev/null +++ b/patches/react-native-screens+3.29.0.patch @@ -0,0 +1,149 @@ +diff --git a/node_modules/react-native-screens/ios/RNSEnums.h b/node_modules/react-native-screens/ios/RNSEnums.h +index 1895f44..d207517 100644 +--- a/node_modules/react-native-screens/ios/RNSEnums.h ++++ b/node_modules/react-native-screens/ios/RNSEnums.h +@@ -16,6 +16,7 @@ typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) { + RNSScreenStackAnimationFlip, + RNSScreenStackAnimationSlideFromBottom, + RNSScreenStackAnimationSimplePush, ++ RNSScreenStackAnimationSlideFromLeft + }; + + typedef NS_ENUM(NSInteger, RNSScreenReplaceAnimation) { +diff --git a/node_modules/react-native-screens/ios/RNSScreen.mm b/node_modules/react-native-screens/ios/RNSScreen.mm +index 4b24cff..c09cecb 100644 +--- a/node_modules/react-native-screens/ios/RNSScreen.mm ++++ b/node_modules/react-native-screens/ios/RNSScreen.mm +@@ -194,6 +194,7 @@ - (void)setStackAnimation:(RNSScreenStackAnimation)stackAnimation + case RNSScreenStackAnimationSimplePush: + case RNSScreenStackAnimationSlideFromBottom: + case RNSScreenStackAnimationFadeFromBottom: ++ case RNSScreenStackAnimationSlideFromLeft: + // Default + break; + } +@@ -1551,7 +1552,7 @@ @implementation RCTConvert (RNSScreen) + @"simple_push" : @(RNSScreenStackAnimationSimplePush), + @"slide_from_bottom" : @(RNSScreenStackAnimationSlideFromBottom), + @"slide_from_right" : @(RNSScreenStackAnimationDefault), +- @"slide_from_left" : @(RNSScreenStackAnimationDefault), ++ @"slide_from_left" : @(RNSScreenStackAnimationSlideFromLeft), + @"ios" : @(RNSScreenStackAnimationDefault), + }), + RNSScreenStackAnimationDefault, +diff --git a/node_modules/react-native-screens/ios/RNSScreenStack.mm b/node_modules/react-native-screens/ios/RNSScreenStack.mm +index 6c3afe6..13be741 100644 +--- a/node_modules/react-native-screens/ios/RNSScreenStack.mm ++++ b/node_modules/react-native-screens/ios/RNSScreenStack.mm +@@ -722,6 +722,8 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer + // of `UISemanticContentAttributeForceLeftToRight`, so we just check if it is RTL or not + BOOL isCorrectEdge = (_controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft && + ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || ++ (topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft && ++ ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || + (_controller.view.semanticContentAttribute != UISemanticContentAttributeForceRightToLeft && + ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeLeft); + if (isCorrectEdge) { +@@ -786,8 +788,10 @@ - (void)handleSwipe:(UIPanGestureRecognizer *)gestureRecognizer + velocity = -velocity; + } + } ++ bool isInverted = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft; + +- float transitionProgress = (translation / distance); ++ float transitionProgress = translation / distance; ++ transitionProgress = isInverted ? transitionProgress * -1 : transitionProgress; + + switch (gestureRecognizer.state) { + case UIGestureRecognizerStateBegan: { +@@ -809,7 +813,10 @@ - (void)handleSwipe:(UIPanGestureRecognizer *)gestureRecognizer + case UIGestureRecognizerStateEnded: { + // values taken from + // https://github.com/react-navigation/react-navigation/blob/54739828598d7072c1bf7b369659e3682db3edc5/packages/stack/src/views/Stack/Card.tsx#L316 +- BOOL shouldFinishTransition = (translation + velocity * 0.3) > (distance / 2); ++ float snapPoint = distance / 2; ++ float gestureDistance = translation + velocity * 0.3; ++ gestureDistance = isInverted ? gestureDistance * -1 : gestureDistance; ++ BOOL shouldFinishTransition = gestureDistance > snapPoint; + if (shouldFinishTransition) { + [_interactionController finishInteractiveTransition]; + } else { +diff --git a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm +index 6fc0542..e2f5b8f 100644 +--- a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm ++++ b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm +@@ -225,6 +225,64 @@ - (void)animateSlideFromBottomWithTransitionContext:(id)transitionContext ++ toVC:(UIViewController *)toViewController ++ fromVC:(UIViewController *)fromViewController ++{ ++ float containerWidth = transitionContext.containerView.bounds.size.width; ++ float belowViewWidth = containerWidth * 0.3; ++ ++ CGAffineTransform rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0); ++ CGAffineTransform leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0); ++ ++ if (toViewController.navigationController.view.semanticContentAttribute == ++ UISemanticContentAttributeForceRightToLeft) { ++ rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0); ++ leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0); ++ } ++ ++ if (_operation == UINavigationControllerOperationPush) { ++ toViewController.view.transform = rightTransform; ++ [[transitionContext containerView] addSubview:toViewController.view]; ++ [UIView animateWithDuration:[self transitionDuration:transitionContext] ++ animations:^{ ++ fromViewController.view.transform = leftTransform; ++ toViewController.view.transform = CGAffineTransformIdentity; ++ } ++ completion:^(BOOL finished) { ++ fromViewController.view.transform = CGAffineTransformIdentity; ++ toViewController.view.transform = CGAffineTransformIdentity; ++ [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; ++ }]; ++ } else if (_operation == UINavigationControllerOperationPop) { ++ toViewController.view.transform = leftTransform; ++ [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; ++ ++ void (^animationBlock)(void) = ^{ ++ toViewController.view.transform = CGAffineTransformIdentity; ++ fromViewController.view.transform = rightTransform; ++ }; ++ void (^completionBlock)(BOOL) = ^(BOOL finished) { ++ fromViewController.view.transform = CGAffineTransformIdentity; ++ toViewController.view.transform = CGAffineTransformIdentity; ++ [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; ++ }; ++ ++ if (!transitionContext.isInteractive) { ++ [UIView animateWithDuration:[self transitionDuration:transitionContext] ++ animations:animationBlock ++ completion:completionBlock]; ++ } else { ++ // we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option ++ [UIView animateWithDuration:[self transitionDuration:transitionContext] ++ delay:0.0 ++ options:UIViewAnimationOptionCurveLinear ++ animations:animationBlock ++ completion:completionBlock]; ++ } ++ } ++} ++ + - (void)animateFadeFromBottomWithTransitionContext:(id)transitionContext + toVC:(UIViewController *)toViewController + fromVC:(UIViewController *)fromViewController +@@ -309,6 +367,9 @@ - (void)animateTransitionWithStackAnimation:(RNSScreenStackAnimation)animation + } else if (animation == RNSScreenStackAnimationSlideFromBottom) { + [self animateSlideFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; ++ } else if (animation == RNSScreenStackAnimationSlideFromLeft) { ++ [self animateSlideFromLeftWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; ++ return; + } else if (animation == RNSScreenStackAnimationFadeFromBottom) { + [self animateFadeFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; + return; \ No newline at end of file diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index 8f76d8fbdd7b..c83b22fb95f2 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -10,11 +10,12 @@ import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackN import type {AuthScreensParamList, LeftModalNavigatorParamList} from '@libs/Navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import Overlay from './Overlay'; type LeftModalNavigatorProps = StackScreenProps; -const Stack = createStackNavigator(); +const Stack = createPlatformStackNavigator(); function LeftModalNavigator({navigation}: LeftModalNavigatorProps) { const styles = useThemeStyles(); diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 2f61f1519df0..633469c94e16 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -1,7 +1,7 @@ import type {ParamListBase, StackActionHelpers, StackNavigationState} from '@react-navigation/native'; import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import {StackView} from '@react-navigation/stack'; +import { NativeStackView } from '@react-navigation/native-stack'; import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; @@ -20,7 +20,7 @@ function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { return ( - - modalCardStyleInterpolator(isSmallScreenWidth, false, props), - presentation: 'transparentModal', - gestureDirection: 'horizontal-inverted', + // presentation: 'transparentModal', + // gestureDirection: 'horizontal-inverted', + animation: 'slide_from_left', + customAnimationOnGesture: true, // We want pop in LHP since there are some flows that would work weird otherwise animationTypeForReplace: 'pop', From afcb1235118a2658b6e4cdd9f3ef4ff1e160e424 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 7 Mar 2024 16:21:38 +0100 Subject: [PATCH 003/589] fix (#37257): use instead of transition --- .../AppNavigator/modalStackNavigatorOptions/index.native.ts | 3 ++- .../modalStackNavigatorOptions/transition.android.ts | 4 ++++ .../modalStackNavigatorOptions/transition.ios.ts | 5 +++++ .../AppNavigator/modalStackNavigatorOptions/transition.ts | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts create mode 100644 src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts create mode 100644 src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts index ca9769fa9972..3c88d478b199 100644 --- a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts @@ -1,8 +1,9 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import transition from './transition'; const defaultSubRouteOptions: NativeStackNavigationOptions = { headerShown: false, - animation: 'slide_from_right', + animation: transition, }; export default defaultSubRouteOptions; diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts new file mode 100644 index 000000000000..acceb1467441 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts @@ -0,0 +1,4 @@ +// `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS +const transition = 'slide_from_right'; + +export default transition; diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts new file mode 100644 index 000000000000..b118370760e2 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts @@ -0,0 +1,5 @@ +// default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 +// so we are using `simple_push` which is similar to default and not causing keyboard transition issues +const transition = 'simple_push'; + +export default transition; diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts new file mode 100644 index 000000000000..7e323f40db25 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts @@ -0,0 +1,3 @@ +const transition = 'default'; + +export default transition; From 90c03a714d3311643a80763d03fe9dd57ae75f9d Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 8 Mar 2024 13:46:49 +0100 Subject: [PATCH 004/589] fix: ts & eslint --- .../Navigators/LeftModalNavigator.tsx | 3 +-- .../index.native.tsx | 16 +++++++++------- .../createCustomFullScreenNavigator/types.ts | 4 +++- .../createCustomStackNavigator/index.native.tsx | 16 +++++++++------- .../createCustomStackNavigator/types.ts | 5 ++++- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index c83b22fb95f2..2741b0ee2140 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -1,5 +1,4 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import {createStackNavigator} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; @@ -7,10 +6,10 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {AuthScreensParamList, LeftModalNavigatorParamList} from '@libs/Navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; -import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import Overlay from './Overlay'; type LeftModalNavigatorProps = StackScreenProps; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 633469c94e16..cf37164bb2f1 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -1,17 +1,17 @@ import type {ParamListBase, StackActionHelpers, StackNavigationState} from '@react-navigation/native'; import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import { NativeStackView } from '@react-navigation/native-stack'; +import {NativeStackView} from '@react-navigation/native-stack'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import CustomFullScreenRouter from './CustomFullScreenRouter'; -import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; +import type {FullScreenNativeNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { +function CustomFullScreenNavigator(props: FullScreenNativeNavigatorProps) { const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< StackNavigationState, FullScreenNavigatorRouterOptions, StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap + NativeStackNavigationOptions, + NativeStackNavigationEventMap >(CustomFullScreenRouter, { children: props.children, screenOptions: props.screenOptions, @@ -33,4 +33,6 @@ function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; -export default createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof CustomFullScreenNavigator>(CustomFullScreenNavigator); +export default createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof CustomFullScreenNavigator>( + CustomFullScreenNavigator, +); diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts index 7e7808c003d7..c1e0634616b0 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts @@ -1,8 +1,10 @@ import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; type FullScreenNavigatorRouterOptions = StackRouterOptions; type FullScreenNavigatorProps = DefaultNavigatorOptions, StackNavigationOptions, StackNavigationEventMap>; +type FullScreenNativeNavigatorProps = DefaultNavigatorOptions, NativeStackNavigationOptions, NativeStackNavigationEventMap>; -export type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions}; +export type {FullScreenNavigatorProps, FullScreenNativeNavigatorProps, FullScreenNavigatorRouterOptions}; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx index 687ca8edd26d..81ffd6af815b 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx @@ -1,13 +1,13 @@ import type {ParamListBase, StackActionHelpers, StackNavigationState} from '@react-navigation/native'; import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import {NativeStackView} from '@react-navigation/native-stack'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import React, {useRef} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import { NativeStackView } from '@react-navigation/native-stack'; import CustomRouter from './CustomRouter'; -import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; +import type {ResponsiveNativeStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { +function ResponsiveStackNavigator(props: ResponsiveNativeStackNavigatorProps) { const {isSmallScreenWidth} = useWindowDimensions(); const isSmallScreenWidthRef = useRef(isSmallScreenWidth); @@ -18,8 +18,8 @@ function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { StackNavigationState, ResponsiveStackNavigatorRouterOptions, StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap + NativeStackNavigationOptions, + NativeStackNavigationEventMap >(CustomRouter, { children: props.children, screenOptions: props.screenOptions, @@ -41,4 +41,6 @@ function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; -export default createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof ResponsiveStackNavigator>(ResponsiveStackNavigator); +export default createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof ResponsiveStackNavigator>( + ResponsiveStackNavigator, +); diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts index 09d35e2a1680..f6b3efa843f6 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts @@ -1,4 +1,5 @@ import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; type ResponsiveStackNavigatorConfig = { @@ -9,5 +10,7 @@ type ResponsiveStackNavigatorRouterOptions = StackRouterOptions; type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, StackNavigationOptions, StackNavigationEventMap> & ResponsiveStackNavigatorConfig; +type ResponsiveNativeStackNavigatorProps = DefaultNavigatorOptions, NativeStackNavigationOptions, NativeStackNavigationEventMap> & + ResponsiveStackNavigatorConfig; -export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps, ResponsiveStackNavigatorConfig}; +export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps, ResponsiveStackNavigatorConfig, ResponsiveNativeStackNavigatorProps}; From 047ea38732d241f8409ad6147e99885acebeadf4 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 8 Mar 2024 15:36:05 +0100 Subject: [PATCH 005/589] fix: show profile picture from settings --- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 463dcfcd9e99..6949b97f5310 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -305,7 +305,6 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie name={SCREENS.PROFILE_AVATAR} options={{ headerShown: false, - presentation: 'transparentModal', }} getComponent={loadProfileAvatar} listeners={modalScreenListeners} From b5e5e7de5b4fef57248ae8be9089537e48e9b763 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 8 Mar 2024 15:55:48 +0100 Subject: [PATCH 006/589] fix: consistent transitions on Android for Settings/Profile screen --- .../Navigation/AppNavigator/getRootNavigatorScreenOptions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 4a0aa3cd4c10..7da2c776506b 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -72,6 +72,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr // This is necessary to cover whole screen. Including translated sidebar. marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, }, + animation: 'slide_from_right', }, centralPaneNavigator: { From 9664f2b2aedc9cb1c5c1cb83f5f814065532d790 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 8 Mar 2024 18:33:01 +0100 Subject: [PATCH 007/589] fix: Status screen, pronounce screen, start chat screen -> fixed keyboard handling (appearance from the bottom, blinks on hide gesture) --- .../AppNavigator/getRootNavigatorScreenOptions.ts | 12 +++++++++--- .../modalStackNavigatorOptions/index.native.ts | 2 +- .../index.android.ts} | 0 .../transition.ios.ts => transition/index.ios.ts} | 0 .../transition.ts => transition/index.ts} | 0 5 files changed, 10 insertions(+), 4 deletions(-) rename src/libs/Navigation/AppNavigator/{modalStackNavigatorOptions/transition.android.ts => transition/index.android.ts} (100%) rename src/libs/Navigation/AppNavigator/{modalStackNavigatorOptions/transition.ios.ts => transition/index.ios.ts} (100%) rename src/libs/Navigation/AppNavigator/{modalStackNavigatorOptions/transition.ts => transition/index.ts} (100%) diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 7da2c776506b..065478b0a192 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -5,6 +5,7 @@ import variables from '@styles/variables'; import CONFIG from '@src/CONFIG'; import createModalCardStyleInterpolator from './createModalCardStyleInterpolator'; import getRightModalNavigatorOptions from './getRightModalNavigatorOptions'; +import transition from './transition'; type ScreenOptions = Record; @@ -15,6 +16,11 @@ const commonScreenOptions: StackNavigationOptions = { cardOverlayEnabled: true, animationTypeForReplace: 'push', }; +const hideKeyboardOnSwipe = { + // temporary solution - better to hide a keyboard than see keyboard flickering + // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details + keyboardHandlingEnabled: true, +}; type GetRootNavigatorScreenOptions = (isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType) => ScreenOptions; @@ -26,6 +32,8 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, ...getRightModalNavigatorOptions(isSmallScreenWidth), cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), + animation: transition, + ...hideKeyboardOnSwipe, }, leftModalNavigator: { ...commonScreenOptions, @@ -80,9 +88,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, animationEnabled: isSmallScreenWidth, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, props), - // temporary solution - better to hide a keyboard than see keyboard flickering - // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details - keyboardHandlingEnabled: true, + ...hideKeyboardOnSwipe, cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), paddingRight: isSmallScreenWidth ? 0 : variables.sideBarWidth, diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts index 3c88d478b199..e145d881b450 100644 --- a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/index.native.ts @@ -1,5 +1,5 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import transition from './transition'; +import transition from '@libs/Navigation/AppNavigator/transition'; const defaultSubRouteOptions: NativeStackNavigationOptions = { headerShown: false, diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts b/src/libs/Navigation/AppNavigator/transition/index.android.ts similarity index 100% rename from src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.android.ts rename to src/libs/Navigation/AppNavigator/transition/index.android.ts diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts b/src/libs/Navigation/AppNavigator/transition/index.ios.ts similarity index 100% rename from src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ios.ts rename to src/libs/Navigation/AppNavigator/transition/index.ios.ts diff --git a/src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts b/src/libs/Navigation/AppNavigator/transition/index.ts similarity index 100% rename from src/libs/Navigation/AppNavigator/modalStackNavigatorOptions/transition.ts rename to src/libs/Navigation/AppNavigator/transition/index.ts From 8860266e50b2a31e78eb3073f507615c188a6e47 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 8 Mar 2024 19:02:42 +0100 Subject: [PATCH 008/589] fix: hide keyboard on swipe for Private notes --- .../AppNavigator/Navigators/RightModalNavigator.tsx | 2 ++ .../AppNavigator/getRootNavigatorScreenOptions.ts | 6 +----- src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts | 7 +++++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 550fb947a4e6..cd8425a871b6 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -7,6 +7,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; +import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; @@ -132,6 +133,7 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) { ; @@ -16,11 +17,6 @@ const commonScreenOptions: StackNavigationOptions = { cardOverlayEnabled: true, animationTypeForReplace: 'push', }; -const hideKeyboardOnSwipe = { - // temporary solution - better to hide a keyboard than see keyboard flickering - // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details - keyboardHandlingEnabled: true, -}; type GetRootNavigatorScreenOptions = (isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType) => ScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts b/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts new file mode 100644 index 000000000000..75a832555c1f --- /dev/null +++ b/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts @@ -0,0 +1,7 @@ +const hideKeyboardOnSwipe = { + // temporary solution - better to hide a keyboard than see keyboard flickering + // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details + keyboardHandlingEnabled: true, +}; + +export default hideKeyboardOnSwipe; From afde8de28b18d97d7c5ed08c77d52fe794e08f7f Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 11 Mar 2024 16:55:05 +0100 Subject: [PATCH 009/589] feat: added integration with InteractionManager --- ...dded-interaction-manager-integration.patch | 55 +++++++++++++++++++ ...ion+native-stack+6.9.17+001+initial.patch} | 0 2 files changed, 55 insertions(+) create mode 100644 patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch rename patches/{@react-navigation+native-stack+6.9.17.patch => @react-navigation+native-stack+6.9.17+001+initial.patch} (100%) diff --git a/patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch new file mode 100644 index 000000000000..edb89d594c49 --- /dev/null +++ b/patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch @@ -0,0 +1,55 @@ +diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +index 03d8b50..a6a54ba 100644 +--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx ++++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +@@ -17,7 +17,7 @@ import { + useTheme, + } from '@react-navigation/native'; + import * as React from 'react'; +-import { Platform, StyleSheet, View } from 'react-native'; ++import { InteractionManager, Platform, StyleSheet, View } from 'react-native'; + import { + useSafeAreaFrame, + useSafeAreaInsets, +@@ -121,7 +121,7 @@ type SceneViewProps = { + previousDescriptor?: NativeStackDescriptor; + nextDescriptor?: NativeStackDescriptor; + onWillDisappear: () => void; +- onAppear: () => void; ++ onAppear: ScreenProps['onAppear']; + onDisappear: () => void; + onDismissed: ScreenProps['onDismissed']; + onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; +@@ -234,6 +234,23 @@ const SceneView = ({ + statusBarHeight + ); + ++ const interactionHandleRef = React.useRef(); ++ ++ // this memo acts as a synchronous useEffect ++ React.useMemo(() => { ++ if (focused && interactionHandleRef.current === undefined) { ++ interactionHandleRef.current = InteractionManager.createInteractionHandle(); ++ } ++ }, [focused]); ++ const onAppearCallback: ScreenProps["onAppear"] = React.useCallback((e) => { ++ onAppear?.(e); ++ ++ if (interactionHandleRef.current !== undefined) { ++ InteractionManager.clearInteractionHandle(interactionHandleRef.current); ++ interactionHandleRef.current = undefined; ++ } ++ }, []); ++ + const [customHeaderHeight, setCustomHeaderHeight] = + React.useState(defaultHeaderHeight); + +@@ -279,7 +296,7 @@ const SceneView = ({ + swipeDirection={gestureDirectionOverride} + transitionDuration={animationDuration} + onWillDisappear={onWillDisappear} +- onAppear={onAppear} ++ onAppear={onAppearCallback} + onDisappear={onDisappear} + onDismissed={onDismissed} + isNativeStack diff --git a/patches/@react-navigation+native-stack+6.9.17.patch b/patches/@react-navigation+native-stack+6.9.17+001+initial.patch similarity index 100% rename from patches/@react-navigation+native-stack+6.9.17.patch rename to patches/@react-navigation+native-stack+6.9.17+001+initial.patch From 07fb94f745b20a6b94afcc202a4c0917261e83cf Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 11 Mar 2024 17:01:55 +0100 Subject: [PATCH 010/589] fix: prettier --- .../Navigation/AppNavigator/Navigators/RightModalNavigator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index cd8425a871b6..61ae43f423e3 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -4,10 +4,10 @@ import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; -import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; From 6b6690c8e4182043aeedc7d4e2684602fc975c8b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 11 Mar 2024 18:14:33 +0100 Subject: [PATCH 011/589] chore: rename patches to be more consistent wwith other changes --- ...on+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch} | 0 ...-stack+6.9.17+002+added-interaction-manager-integration.patch} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename patches/{@react-navigation+native-stack+6.9.17+001+initial.patch => @react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch} (100%) rename patches/{@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch => @react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch} (100%) diff --git a/patches/@react-navigation+native-stack+6.9.17+001+initial.patch b/patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch similarity index 100% rename from patches/@react-navigation+native-stack+6.9.17+001+initial.patch rename to patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch diff --git a/patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch similarity index 100% rename from patches/@react-navigation+native-stack+6.9.17+001+added-interaction-manager-integration.patch rename to patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch From b9d226225813471c1ad214fcbad9e5c60237aaab Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 11 Mar 2024 18:51:13 +0100 Subject: [PATCH 012/589] fix: new chat -> description (keyboard close on back swipe) --- src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index f7ac892e40bc..c3906d5611e0 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -35,6 +35,7 @@ import type { import type {ThemeStyles} from '@styles/index'; import type {Screen} from '@src/SCREENS'; import SCREENS from '@src/SCREENS'; +import hideKeyboardOnSwipe from './hideKeyboardOnSwipe'; import subRouteOptions from './modalStackNavigatorOptions'; type Screens = Partial React.ComponentType>>; @@ -54,6 +55,7 @@ function createModalStackNavigator(screens: const defaultSubRouteOptions = useMemo( (): StackNavigationOptions => ({ ...subRouteOptions, + ...hideKeyboardOnSwipe, cardStyle: styles.navigationScreenCardStyle, }), [styles], From 2aec5aff0f79f59bcf0a1a623586585164cdc7ca Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 12 Mar 2024 16:41:30 +0100 Subject: [PATCH 013/589] chore: added PRs references for patches --- ...+6.9.17+002+added-interaction-manager-integration.patch | 7 ++++--- patches/react-native-screens+3.29.0.patch | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch index edb89d594c49..fd528359030f 100644 --- a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch +++ b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -index 03d8b50..a6a54ba 100644 +index 03d8b50..8404566 100644 --- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx @@ -17,7 +17,7 @@ import { @@ -20,10 +20,11 @@ index 03d8b50..a6a54ba 100644 onDisappear: () => void; onDismissed: ScreenProps['onDismissed']; onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; -@@ -234,6 +234,23 @@ const SceneView = ({ +@@ -234,6 +234,24 @@ const SceneView = ({ statusBarHeight ); ++ // https://github.com/react-navigation/react-navigation/pull/11887 + const interactionHandleRef = React.useRef(); + + // this memo acts as a synchronous useEffect @@ -44,7 +45,7 @@ index 03d8b50..a6a54ba 100644 const [customHeaderHeight, setCustomHeaderHeight] = React.useState(defaultHeaderHeight); -@@ -279,7 +296,7 @@ const SceneView = ({ +@@ -279,7 +297,7 @@ const SceneView = ({ swipeDirection={gestureDirectionOverride} transitionDuration={animationDuration} onWillDisappear={onWillDisappear} diff --git a/patches/react-native-screens+3.29.0.patch b/patches/react-native-screens+3.29.0.patch index d59c1d596cfd..b8d210cd5aa1 100644 --- a/patches/react-native-screens+3.29.0.patch +++ b/patches/react-native-screens+3.29.0.patch @@ -1,11 +1,12 @@ diff --git a/node_modules/react-native-screens/ios/RNSEnums.h b/node_modules/react-native-screens/ios/RNSEnums.h -index 1895f44..d207517 100644 +index 1895f44..66195ca 100644 --- a/node_modules/react-native-screens/ios/RNSEnums.h +++ b/node_modules/react-native-screens/ios/RNSEnums.h -@@ -16,6 +16,7 @@ typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) { +@@ -16,6 +16,8 @@ typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) { RNSScreenStackAnimationFlip, RNSScreenStackAnimationSlideFromBottom, RNSScreenStackAnimationSimplePush, ++ // https://github.com/software-mansion/react-native-screens/pull/2057 + RNSScreenStackAnimationSlideFromLeft }; @@ -146,4 +147,4 @@ index 6fc0542..e2f5b8f 100644 + return; } else if (animation == RNSScreenStackAnimationFadeFromBottom) { [self animateFadeFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; - return; \ No newline at end of file + return; From 3bc82654c037268c774d7c950b024178b5d0b8f9 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 12 Mar 2024 17:30:14 +0100 Subject: [PATCH 014/589] fix: double back press from preferences causes buttons on settings screen to be disabled (when settings screen becomes shown again) --- ...dded-interaction-manager-integration.patch | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch index fd528359030f..da61ec6a25ba 100644 --- a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch +++ b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -index 03d8b50..8404566 100644 +index 03d8b50..acc0c34 100644 --- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx @@ -17,7 +17,7 @@ import { @@ -20,32 +20,39 @@ index 03d8b50..8404566 100644 onDisappear: () => void; onDismissed: ScreenProps['onDismissed']; onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; -@@ -234,6 +234,24 @@ const SceneView = ({ +@@ -234,6 +234,31 @@ const SceneView = ({ statusBarHeight ); + // https://github.com/react-navigation/react-navigation/pull/11887 + const interactionHandleRef = React.useRef(); + -+ // this memo acts as a synchronous useEffect ++ // this memo acts as a synchronous `useEffect` + React.useMemo(() => { + if (focused && interactionHandleRef.current === undefined) { + interactionHandleRef.current = InteractionManager.createInteractionHandle(); + } + }, [focused]); -+ const onAppearCallback: ScreenProps["onAppear"] = React.useCallback((e) => { -+ onAppear?.(e); -+ ++ const finishInteraction = React.useCallback(() => { + if (interactionHandleRef.current !== undefined) { + InteractionManager.clearInteractionHandle(interactionHandleRef.current); + interactionHandleRef.current = undefined; + } + }, []); ++ // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired ++ // so we clean up an interaction here ++ React.useEffect(() => finishInteraction, [finishInteraction]) ++ ++ const onAppearCallback: ScreenProps["onAppear"] = React.useCallback((e) => { ++ onAppear?.(e); ++ ++ finishInteraction(); ++ }, [onAppear, finishInteraction]); + const [customHeaderHeight, setCustomHeaderHeight] = React.useState(defaultHeaderHeight); -@@ -279,7 +297,7 @@ const SceneView = ({ +@@ -279,7 +304,7 @@ const SceneView = ({ swipeDirection={gestureDirectionOverride} transitionDuration={animationDuration} onWillDisappear={onWillDisappear} From f2c32e6596434c41a4c2d0ec15585351d17b4d8e Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 13 Mar 2024 13:13:44 +0100 Subject: [PATCH 015/589] chore: removed commented out code --- .../Navigation/AppNavigator/getRootNavigatorScreenOptions.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 2d373f01b0a2..705d0d855add 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -34,8 +34,6 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr leftModalNavigator: { ...commonScreenOptions, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), - // presentation: 'transparentModal', - // gestureDirection: 'horizontal-inverted', animation: 'slide_from_left', customAnimationOnGesture: true, From 2fff6cb4aa8a70df15c6ce30403188c1ac6d7c2c Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 15 Mar 2024 12:37:49 +0100 Subject: [PATCH 016/589] fix: leftModalStackNavigator platform specific options --- .../AppNavigator/getRootNavigatorScreenOptions.ts | 4 ++-- .../AppNavigator/leftModalNavigatorOptions/index.native.ts | 6 ++++++ .../AppNavigator/leftModalNavigatorOptions/index.ts | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts create mode 100644 src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 705d0d855add..f78a15617a98 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -6,6 +6,7 @@ import CONFIG from '@src/CONFIG'; import createModalCardStyleInterpolator from './createModalCardStyleInterpolator'; import getRightModalNavigatorOptions from './getRightModalNavigatorOptions'; import hideKeyboardOnSwipe from './hideKeyboardOnSwipe'; +import leftModalNavigatorOptions from './leftModalNavigatorOptions'; import transition from './transition'; type ScreenOptions = Record; @@ -33,9 +34,8 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr }, leftModalNavigator: { ...commonScreenOptions, + ...leftModalNavigatorOptions, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, props), - animation: 'slide_from_left', - customAnimationOnGesture: true, // We want pop in LHP since there are some flows that would work weird otherwise animationTypeForReplace: 'pop', diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts new file mode 100644 index 000000000000..a6710efdf4bb --- /dev/null +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts @@ -0,0 +1,6 @@ +const leftModalNavigatorOptions = { + animation: 'slide_from_left', + customAnimationOnGesture: true, +}; + +export default leftModalNavigatorOptions; diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts new file mode 100644 index 000000000000..3482844aa35a --- /dev/null +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts @@ -0,0 +1,6 @@ +const leftModalNavigatorOptions = { + presentation: 'transparentModal', + gestureDirection: 'horizontal-inverted', +}; + +export default leftModalNavigatorOptions; From ffa510b2947b71e569dc58c142a3ea4377ad055e Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 15 Mar 2024 12:54:40 +0100 Subject: [PATCH 017/589] fix: incorrect automatic types conversion --- .../AppNavigator/leftModalNavigatorOptions/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts index 3482844aa35a..e27d9d144479 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts @@ -1,4 +1,6 @@ -const leftModalNavigatorOptions = { +import type {StackNavigationOptions} from '@react-navigation/stack'; + +const leftModalNavigatorOptions: StackNavigationOptions = { presentation: 'transparentModal', gestureDirection: 'horizontal-inverted', }; From 651bbef5e1122c918b516f494a1c62515e4dc423 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 27 Mar 2024 12:48:54 +0100 Subject: [PATCH 018/589] chore: update RNS to latest version, remove patch --- ios/Podfile.lock | 4 +- package-lock.json | 7 +- package.json | 2 +- patches/react-native-screens+3.29.0.patch | 150 ---------------------- 4 files changed, 7 insertions(+), 156 deletions(-) delete mode 100644 patches/react-native-screens+3.29.0.patch diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 310003ee8adc..7e367c067d2f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1389,7 +1389,7 @@ PODS: - RCT-Folly (= 2022.05.16.00) - React-Core - ReactCommon/turbomodule/core - - RNScreens (3.29.0): + - RNScreens (3.30.1): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1910,7 +1910,7 @@ SPEC CHECKSUMS: RNPermissions: 9b086c8f05b2e2faa587fdc31f4c5ab4509728aa RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9 RNReanimated: 3850671fd0c67051ea8e1e648e8c3e86bf3a28eb - RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2 + RNScreens: 77fc79e66b726ee45b091486b348418ee1d792ab RNShare: 859ff710211285676b0bcedd156c12437ea1d564 RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852 RNSVG: ba3e7232f45e34b7b47e74472386cf4e1a676d0a diff --git a/package-lock.json b/package-lock.json index 0be13f3af786..3620ad5b50b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -108,7 +108,7 @@ "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", - "react-native-screens": "3.29.0", + "react-native-screens": "3.30.1", "react-native-share": "^10.0.2", "react-native-sound": "^0.11.2", "react-native-svg": "14.1.0", @@ -39587,8 +39587,9 @@ } }, "node_modules/react-native-screens": { - "version": "3.29.0", - "license": "MIT", + "version": "3.30.1", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.30.1.tgz", + "integrity": "sha512-/muEvjocCtFb+j5J3YmLvB25+f4rIU8hnnxgGTkXcAf2omPBY8uhPjJaaFUlvj64VEoEzJcRpugbXWsjfPPIFg==", "dependencies": { "react-freeze": "^1.0.0", "warn-once": "^0.1.0" diff --git a/package.json b/package.json index fb174293063a..279fbef36302 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", - "react-native-screens": "3.29.0", + "react-native-screens": "3.30.1", "react-native-share": "^10.0.2", "react-native-sound": "^0.11.2", "react-native-svg": "14.1.0", diff --git a/patches/react-native-screens+3.29.0.patch b/patches/react-native-screens+3.29.0.patch deleted file mode 100644 index b8d210cd5aa1..000000000000 --- a/patches/react-native-screens+3.29.0.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/node_modules/react-native-screens/ios/RNSEnums.h b/node_modules/react-native-screens/ios/RNSEnums.h -index 1895f44..66195ca 100644 ---- a/node_modules/react-native-screens/ios/RNSEnums.h -+++ b/node_modules/react-native-screens/ios/RNSEnums.h -@@ -16,6 +16,8 @@ typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) { - RNSScreenStackAnimationFlip, - RNSScreenStackAnimationSlideFromBottom, - RNSScreenStackAnimationSimplePush, -+ // https://github.com/software-mansion/react-native-screens/pull/2057 -+ RNSScreenStackAnimationSlideFromLeft - }; - - typedef NS_ENUM(NSInteger, RNSScreenReplaceAnimation) { -diff --git a/node_modules/react-native-screens/ios/RNSScreen.mm b/node_modules/react-native-screens/ios/RNSScreen.mm -index 4b24cff..c09cecb 100644 ---- a/node_modules/react-native-screens/ios/RNSScreen.mm -+++ b/node_modules/react-native-screens/ios/RNSScreen.mm -@@ -194,6 +194,7 @@ - (void)setStackAnimation:(RNSScreenStackAnimation)stackAnimation - case RNSScreenStackAnimationSimplePush: - case RNSScreenStackAnimationSlideFromBottom: - case RNSScreenStackAnimationFadeFromBottom: -+ case RNSScreenStackAnimationSlideFromLeft: - // Default - break; - } -@@ -1551,7 +1552,7 @@ @implementation RCTConvert (RNSScreen) - @"simple_push" : @(RNSScreenStackAnimationSimplePush), - @"slide_from_bottom" : @(RNSScreenStackAnimationSlideFromBottom), - @"slide_from_right" : @(RNSScreenStackAnimationDefault), -- @"slide_from_left" : @(RNSScreenStackAnimationDefault), -+ @"slide_from_left" : @(RNSScreenStackAnimationSlideFromLeft), - @"ios" : @(RNSScreenStackAnimationDefault), - }), - RNSScreenStackAnimationDefault, -diff --git a/node_modules/react-native-screens/ios/RNSScreenStack.mm b/node_modules/react-native-screens/ios/RNSScreenStack.mm -index 6c3afe6..13be741 100644 ---- a/node_modules/react-native-screens/ios/RNSScreenStack.mm -+++ b/node_modules/react-native-screens/ios/RNSScreenStack.mm -@@ -722,6 +722,8 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer - // of `UISemanticContentAttributeForceLeftToRight`, so we just check if it is RTL or not - BOOL isCorrectEdge = (_controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft && - ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || -+ (topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft && -+ ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || - (_controller.view.semanticContentAttribute != UISemanticContentAttributeForceRightToLeft && - ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeLeft); - if (isCorrectEdge) { -@@ -786,8 +788,10 @@ - (void)handleSwipe:(UIPanGestureRecognizer *)gestureRecognizer - velocity = -velocity; - } - } -+ bool isInverted = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft; - -- float transitionProgress = (translation / distance); -+ float transitionProgress = translation / distance; -+ transitionProgress = isInverted ? transitionProgress * -1 : transitionProgress; - - switch (gestureRecognizer.state) { - case UIGestureRecognizerStateBegan: { -@@ -809,7 +813,10 @@ - (void)handleSwipe:(UIPanGestureRecognizer *)gestureRecognizer - case UIGestureRecognizerStateEnded: { - // values taken from - // https://github.com/react-navigation/react-navigation/blob/54739828598d7072c1bf7b369659e3682db3edc5/packages/stack/src/views/Stack/Card.tsx#L316 -- BOOL shouldFinishTransition = (translation + velocity * 0.3) > (distance / 2); -+ float snapPoint = distance / 2; -+ float gestureDistance = translation + velocity * 0.3; -+ gestureDistance = isInverted ? gestureDistance * -1 : gestureDistance; -+ BOOL shouldFinishTransition = gestureDistance > snapPoint; - if (shouldFinishTransition) { - [_interactionController finishInteractiveTransition]; - } else { -diff --git a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm -index 6fc0542..e2f5b8f 100644 ---- a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm -+++ b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm -@@ -225,6 +225,64 @@ - (void)animateSlideFromBottomWithTransitionContext:(id)transitionContext -+ toVC:(UIViewController *)toViewController -+ fromVC:(UIViewController *)fromViewController -+{ -+ float containerWidth = transitionContext.containerView.bounds.size.width; -+ float belowViewWidth = containerWidth * 0.3; -+ -+ CGAffineTransform rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0); -+ CGAffineTransform leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0); -+ -+ if (toViewController.navigationController.view.semanticContentAttribute == -+ UISemanticContentAttributeForceRightToLeft) { -+ rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0); -+ leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0); -+ } -+ -+ if (_operation == UINavigationControllerOperationPush) { -+ toViewController.view.transform = rightTransform; -+ [[transitionContext containerView] addSubview:toViewController.view]; -+ [UIView animateWithDuration:[self transitionDuration:transitionContext] -+ animations:^{ -+ fromViewController.view.transform = leftTransform; -+ toViewController.view.transform = CGAffineTransformIdentity; -+ } -+ completion:^(BOOL finished) { -+ fromViewController.view.transform = CGAffineTransformIdentity; -+ toViewController.view.transform = CGAffineTransformIdentity; -+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; -+ }]; -+ } else if (_operation == UINavigationControllerOperationPop) { -+ toViewController.view.transform = leftTransform; -+ [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view]; -+ -+ void (^animationBlock)(void) = ^{ -+ toViewController.view.transform = CGAffineTransformIdentity; -+ fromViewController.view.transform = rightTransform; -+ }; -+ void (^completionBlock)(BOOL) = ^(BOOL finished) { -+ fromViewController.view.transform = CGAffineTransformIdentity; -+ toViewController.view.transform = CGAffineTransformIdentity; -+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]]; -+ }; -+ -+ if (!transitionContext.isInteractive) { -+ [UIView animateWithDuration:[self transitionDuration:transitionContext] -+ animations:animationBlock -+ completion:completionBlock]; -+ } else { -+ // we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option -+ [UIView animateWithDuration:[self transitionDuration:transitionContext] -+ delay:0.0 -+ options:UIViewAnimationOptionCurveLinear -+ animations:animationBlock -+ completion:completionBlock]; -+ } -+ } -+} -+ - - (void)animateFadeFromBottomWithTransitionContext:(id)transitionContext - toVC:(UIViewController *)toViewController - fromVC:(UIViewController *)fromViewController -@@ -309,6 +367,9 @@ - (void)animateTransitionWithStackAnimation:(RNSScreenStackAnimation)animation - } else if (animation == RNSScreenStackAnimationSlideFromBottom) { - [self animateSlideFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; - return; -+ } else if (animation == RNSScreenStackAnimationSlideFromLeft) { -+ [self animateSlideFromLeftWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; -+ return; - } else if (animation == RNSScreenStackAnimationFadeFromBottom) { - [self animateFadeFromBottomWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC]; - return; From 5ca73162194d6a9d790a3355f1c03fcc93a4603c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 12:58:18 +0200 Subject: [PATCH 019/589] update deps --- ios/Podfile.lock | 29 +++++++---------------------- package-lock.json | 2 +- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ac5f3fdd397e..0d4c88410995 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1818,7 +1818,7 @@ PODS: - RNGoogleSignin (10.0.1): - GoogleSignIn (~> 7.0) - React-Core - - RNLiveMarkdown (0.1.47): + - RNLiveMarkdown (0.1.49): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1836,9 +1836,9 @@ PODS: - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNLiveMarkdown/common (= 0.1.47) + - RNLiveMarkdown/common (= 0.1.49) - Yoga - - RNLiveMarkdown/common (0.1.47): + - RNLiveMarkdown/common (0.1.49): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -2032,24 +2032,9 @@ PODS: - SocketRocket (0.6.1) - Turf (2.7.0) - VisionCamera (4.0.0-beta.13): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Codegen + - React + - React-callinvoker - React-Core - - React-debug - - React-Fabric - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - Yoga (1.14.0) DEPENDENCIES: @@ -2547,7 +2532,7 @@ SPEC CHECKSUMS: RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 RNGestureHandler: 1190c218cdaaf029ee1437076a3fbbc3297d89fb RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0 - RNLiveMarkdown: f172c7199283dc9d21bccf7e21ea10741fd19e1d + RNLiveMarkdown: ecfb555a8332434115b2670d99d21fa1f3af0bdf RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 rnmapbox-maps: 3e273e0e867a079ec33df9ee33bb0482434b897d RNPermissions: 8990fc2c10da3640938e6db1647cb6416095b729 @@ -2563,7 +2548,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 - VisionCamera: 3033e0dd5272d46e97bcb406adea4ae0e6907abf + VisionCamera: 9f26224fce1233ffdad9fa4e56863e3de2190dc0 Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d diff --git a/package-lock.json b/package-lock.json index 2164ad510b55..c2ae99fb92d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@dotlottie/react-player": "^1.6.3", - "@expensify/react-native-live-markdown": "^0.1.49", + "@expensify/react-native-live-markdown": "0.1.49", "@expo/metro-runtime": "~3.1.1", "@formatjs/intl-datetimeformat": "^6.10.0", "@formatjs/intl-listformat": "^7.2.2", From a0be472481de679d29f2cc1d19c94bda595f2504 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 14:06:50 +0200 Subject: [PATCH 020/589] implement typed createPlatformStackNavigator --- .../createPlatformStackNavigator.native.ts | 7 ---- .../createPlatformStackNavigator.ts | 5 --- .../createCommonStackNavigator.tsx | 15 +++++++ .../index.native.ts | 15 +++++++ .../createPlatformStackNavigator/index.ts | 15 +++++++ .../createPlatformStackNavigator/types.tsx | 40 +++++++++++++++++++ 6 files changed, 85 insertions(+), 12 deletions(-) delete mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts delete mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx create mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.native.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/types.tsx diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts deleted file mode 100644 index ef44cefc13c9..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.native.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {createNativeStackNavigator} from '@react-navigation/native-stack'; - -function createPlatformStackNavigator() { - return createNativeStackNavigator(); -} - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts deleted file mode 100644 index 51228295572f..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.ts +++ /dev/null @@ -1,5 +0,0 @@ -import {createStackNavigator} from '@react-navigation/stack'; - -const createPlatformStackNavigator: typeof createStackNavigator = () => createStackNavigator(); - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx b/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx new file mode 100644 index 000000000000..cde146f049a7 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx @@ -0,0 +1,15 @@ +import type {ParamListBase} from '@react-navigation/native'; +import type {CommonNavigatorProps, CommonStack} from './types'; + +function createCommonStackNavigator(Stack: CommonStack) { + return ({screenOptions, initialRouteName, children}: CommonNavigatorProps): React.ReactElement => ( + + {children} + + ); +} + +export default createCommonStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.native.ts b/src/libs/Navigation/createPlatformStackNavigator/index.native.ts new file mode 100644 index 000000000000..45796c949cd8 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/index.native.ts @@ -0,0 +1,15 @@ +import {createNavigatorFactory} from '@react-navigation/native'; +import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import createCommonStackNavigator from './createCommonStackNavigator'; +import type {CommonNavigationEventMap, CommonNavigationOptions, CommonNavigator} from './types'; +import type CreatePlatformStackNavigatorResult from './types'; + +function createPlatformStackNavigator(): CreatePlatformStackNavigatorResult { + const NativeStack = createNativeStackNavigator(); + const CommonNavigator = createCommonStackNavigator(NativeStack); + + return createNavigatorFactory, CommonNavigationOptions, CommonNavigationEventMap, CommonNavigator>(CommonNavigator)(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.ts b/src/libs/Navigation/createPlatformStackNavigator/index.ts new file mode 100644 index 000000000000..390f75168d9d --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/index.ts @@ -0,0 +1,15 @@ +import {createNavigatorFactory} from '@react-navigation/native'; +import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import {createStackNavigator} from '@react-navigation/stack'; +import createCommonStackNavigator from './createCommonStackNavigator'; +import type {CommonNavigationEventMap, CommonNavigationOptions, CommonNavigator} from './types'; +import type CreatePlatformStackNavigatorResult from './types'; + +function createPlatformStackNavigator(): CreatePlatformStackNavigatorResult { + const Stack = createStackNavigator(); + const CommonNavigator = createCommonStackNavigator(Stack); + + return createNavigatorFactory, CommonNavigationOptions, CommonNavigationEventMap, CommonNavigator>(CommonNavigator)(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/types.tsx b/src/libs/Navigation/createPlatformStackNavigator/types.tsx new file mode 100644 index 000000000000..33ab180ea46e --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/types.tsx @@ -0,0 +1,40 @@ +import type {createNavigatorFactory} from '@react-navigation/core'; +import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {createNativeStackNavigator, NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import type {createStackNavigator, StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; + +type CommonNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; +type CommonNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; + +type CreateStackNavigatorResult = ReturnType>; +type CreateNativeStackNavigatorResult = ReturnType>; + +type CommonStack = CreateStackNavigatorResult | CreateNativeStackNavigatorResult; + +type CommonStackRouterOptions = Omit & { + initialRouteName: keyof TStackParams; +}; + +type CommonNavigatorProps = DefaultNavigatorOptions, CommonNavigationOptions, CommonNavigationEventMap> & + CommonStackRouterOptions & + StackNavigationConfig; + +// type PlatformStackNavigatorProps = { +// initialRouteName: keyof TStackParams; +// screenOptions?: CommonNavigatorOptions; +// }; + +type CommonNavigator = (props: CommonNavigatorProps) => React.ReactElement; + +type CreatePlatformNavigatorFactory = typeof createNavigatorFactory< + StackNavigationState, + CommonNavigationOptions, + CommonNavigationEventMap, + CommonNavigator +>; +type CreatePlatformNavigatorFactoryResult = ReturnType>; +type CreatePlatformStackNavigatorResult = ReturnType>; + +export default CreatePlatformStackNavigatorResult; +export type {CommonNavigationOptions, CommonNavigationEventMap, CommonStack, CommonNavigatorProps, CommonNavigator}; From 5282af183e353459e1e9e5f05ec4312b9d39357c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 14:33:01 +0200 Subject: [PATCH 021/589] simplify abstraction layer --- .../createCommonStackNavigator.tsx | 15 ------- .../index.native.ts | 15 ------- .../index.native.tsx | 24 +++++++++++ .../createPlatformStackNavigator/index.ts | 15 ------- .../createPlatformStackNavigator/index.tsx | 24 +++++++++++ .../createPlatformStackNavigator/types.tsx | 43 ++++++------------- 6 files changed, 62 insertions(+), 74 deletions(-) delete mode 100644 src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx delete mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.native.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.native.tsx delete mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/index.tsx diff --git a/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx b/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx deleted file mode 100644 index cde146f049a7..000000000000 --- a/src/libs/Navigation/createPlatformStackNavigator/createCommonStackNavigator.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import type {ParamListBase} from '@react-navigation/native'; -import type {CommonNavigatorProps, CommonStack} from './types'; - -function createCommonStackNavigator(Stack: CommonStack) { - return ({screenOptions, initialRouteName, children}: CommonNavigatorProps): React.ReactElement => ( - - {children} - - ); -} - -export default createCommonStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.native.ts b/src/libs/Navigation/createPlatformStackNavigator/index.native.ts deleted file mode 100644 index 45796c949cd8..000000000000 --- a/src/libs/Navigation/createPlatformStackNavigator/index.native.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; -import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import createCommonStackNavigator from './createCommonStackNavigator'; -import type {CommonNavigationEventMap, CommonNavigationOptions, CommonNavigator} from './types'; -import type CreatePlatformStackNavigatorResult from './types'; - -function createPlatformStackNavigator(): CreatePlatformStackNavigatorResult { - const NativeStack = createNativeStackNavigator(); - const CommonNavigator = createCommonStackNavigator(NativeStack); - - return createNavigatorFactory, CommonNavigationOptions, CommonNavigationEventMap, CommonNavigator>(CommonNavigator)(); -} - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx new file mode 100644 index 000000000000..3279937f1823 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx @@ -0,0 +1,24 @@ +import {createNavigatorFactory} from '@react-navigation/native'; +import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps} from './types'; + +function createPlatformStackNavigator() { + const NativeStack = createNativeStackNavigator(); + function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { + return ( + + {children} + + ); + } + + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigator>( + PlatformStackNavigator, + )(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.ts b/src/libs/Navigation/createPlatformStackNavigator/index.ts deleted file mode 100644 index 390f75168d9d..000000000000 --- a/src/libs/Navigation/createPlatformStackNavigator/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; -import {createStackNavigator} from '@react-navigation/stack'; -import createCommonStackNavigator from './createCommonStackNavigator'; -import type {CommonNavigationEventMap, CommonNavigationOptions, CommonNavigator} from './types'; -import type CreatePlatformStackNavigatorResult from './types'; - -function createPlatformStackNavigator(): CreatePlatformStackNavigatorResult { - const Stack = createStackNavigator(); - const CommonNavigator = createCommonStackNavigator(Stack); - - return createNavigatorFactory, CommonNavigationOptions, CommonNavigationEventMap, CommonNavigator>(CommonNavigator)(); -} - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/createPlatformStackNavigator/index.tsx new file mode 100644 index 000000000000..8db88be9e299 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/index.tsx @@ -0,0 +1,24 @@ +import {createNavigatorFactory} from '@react-navigation/native'; +import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import {createStackNavigator} from '@react-navigation/stack'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps} from './types'; + +function createPlatformStackNavigator() { + const Stack = createStackNavigator(); + function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { + return ( + + {children} + + ); + } + + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigator>( + PlatformStackNavigator, + )(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/createPlatformStackNavigator/types.tsx b/src/libs/Navigation/createPlatformStackNavigator/types.tsx index 33ab180ea46e..df421c1280bd 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/types.tsx +++ b/src/libs/Navigation/createPlatformStackNavigator/types.tsx @@ -1,40 +1,25 @@ -import type {createNavigatorFactory} from '@react-navigation/core'; import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; -import type {createNativeStackNavigator, NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import type {createStackNavigator, StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; type CommonNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; type CommonNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; -type CreateStackNavigatorResult = ReturnType>; -type CreateNativeStackNavigatorResult = ReturnType>; - -type CommonStack = CreateStackNavigatorResult | CreateNativeStackNavigatorResult; - -type CommonStackRouterOptions = Omit & { - initialRouteName: keyof TStackParams; +type PlatformStackNavigationOptions = CommonNavigationOptions & { + platformAnimation: 'slide_from_left' | 'slide_from_right'; }; +type PlatformStackNavigationEventMap = CommonNavigationEventMap; -type CommonNavigatorProps = DefaultNavigatorOptions, CommonNavigationOptions, CommonNavigationEventMap> & - CommonStackRouterOptions & +type PlatformStackNavigatorProps = DefaultNavigatorOptions< + TStackParams, + StackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap +> & + StackRouterOptions & StackNavigationConfig; -// type PlatformStackNavigatorProps = { -// initialRouteName: keyof TStackParams; -// screenOptions?: CommonNavigatorOptions; -// }; - -type CommonNavigator = (props: CommonNavigatorProps) => React.ReactElement; - -type CreatePlatformNavigatorFactory = typeof createNavigatorFactory< - StackNavigationState, - CommonNavigationOptions, - CommonNavigationEventMap, - CommonNavigator ->; -type CreatePlatformNavigatorFactoryResult = ReturnType>; -type CreatePlatformStackNavigatorResult = ReturnType>; +type PlatformStackNavigator = (props: PlatformStackNavigatorProps) => React.ReactElement; -export default CreatePlatformStackNavigatorResult; -export type {CommonNavigationOptions, CommonNavigationEventMap, CommonStack, CommonNavigatorProps, CommonNavigator}; +export type {PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigatorProps, PlatformStackNavigator}; From 3121e455b0927ac9ac3a28eec767f0b95769fef3 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 15:55:50 +0200 Subject: [PATCH 022/589] re-structure platform depdendent stack navigation options --- .../index.native.ts | 6 +-- .../modalStackNavigatorOptions/index.ts | 4 +- .../useModalScreenOptions.ts | 6 +-- .../AppNavigator/transition/index.android.ts | 4 -- .../AppNavigator/transition/index.ts | 3 -- .../native/slideFromLeft/index.android.ts | 7 +++ .../animation/native/slideFromLeft/index.ts} | 4 +- .../native/slideFromRight/index.android.ts | 6 +++ .../animation/native/slideFromRight/index.ts | 7 +++ .../index.native.tsx | 51 ++++++++++++++++++- .../createPlatformStackNavigator/index.tsx | 29 ++++++++++- .../createPlatformStackNavigator/types.tsx | 35 ++++++++++--- 12 files changed, 134 insertions(+), 28 deletions(-) delete mode 100644 src/libs/Navigation/AppNavigator/transition/index.android.ts delete mode 100644 src/libs/Navigation/AppNavigator/transition/index.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts rename src/libs/Navigation/{AppNavigator/transition/index.ios.ts => createPlatformStackNavigator/animation/native/slideFromLeft/index.ts} (60%) create mode 100644 src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts create mode 100644 src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts index e145d881b450..720f8d108824 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts @@ -1,9 +1,7 @@ -import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import transition from '@libs/Navigation/AppNavigator/transition'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; -const defaultSubRouteOptions: NativeStackNavigationOptions = { +const defaultSubRouteOptions: PlatformStackNavigationOptions = { headerShown: false, - animation: transition, }; export default defaultSubRouteOptions; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts index 280a38b263b7..bfc06d8cc556 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts @@ -1,7 +1,7 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; import {CardStyleInterpolators} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; -const defaultSubRouteOptions: StackNavigationOptions = { +const defaultSubRouteOptions: PlatformStackNavigationOptions = { headerShown: false, cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, }; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts index 2c8f18689b4b..492315cfcb3a 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts @@ -1,15 +1,15 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; import {useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; import type {ThemeStyles} from '@src/styles'; import subRouteOptions from './modalStackNavigatorOptions'; -function useModalScreenOptions(getScreenOptions?: (styles: ThemeStyles) => StackNavigationOptions) { +function useModalScreenOptions(getScreenOptions?: (styles: ThemeStyles) => PlatformStackNavigationOptions) { const styles = useThemeStyles(); const defaultSubRouteOptions = useMemo( - (): StackNavigationOptions => ({ + (): PlatformStackNavigationOptions => ({ ...subRouteOptions, ...hideKeyboardOnSwipe, cardStyle: styles.navigationScreenCardStyle, diff --git a/src/libs/Navigation/AppNavigator/transition/index.android.ts b/src/libs/Navigation/AppNavigator/transition/index.android.ts deleted file mode 100644 index acceb1467441..000000000000 --- a/src/libs/Navigation/AppNavigator/transition/index.android.ts +++ /dev/null @@ -1,4 +0,0 @@ -// `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS -const transition = 'slide_from_right'; - -export default transition; diff --git a/src/libs/Navigation/AppNavigator/transition/index.ts b/src/libs/Navigation/AppNavigator/transition/index.ts deleted file mode 100644 index 7e323f40db25..000000000000 --- a/src/libs/Navigation/AppNavigator/transition/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -const transition = 'default'; - -export default transition; diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts new file mode 100644 index 000000000000..23e2eed8c8b7 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts @@ -0,0 +1,7 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +// `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS +// const transition: NativeStackNavigationOptions['animation'] = 'slide_from_right'; +const transition: NativeStackNavigationOptions['animation'] = 'ios'; + +export default transition; diff --git a/src/libs/Navigation/AppNavigator/transition/index.ios.ts b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.ts similarity index 60% rename from src/libs/Navigation/AppNavigator/transition/index.ios.ts rename to src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.ts index b118370760e2..f3fbd3ecf619 100644 --- a/src/libs/Navigation/AppNavigator/transition/index.ios.ts +++ b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.ts @@ -1,5 +1,7 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + // default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 // so we are using `simple_push` which is similar to default and not causing keyboard transition issues -const transition = 'simple_push'; +const transition: NativeStackNavigationOptions['animation'] = 'simple_push'; export default transition; diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts new file mode 100644 index 000000000000..7bfb31558d39 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts @@ -0,0 +1,6 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +// `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS +const transition: NativeStackNavigationOptions['animation'] = 'slide_from_right'; + +export default transition; diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts new file mode 100644 index 000000000000..f3fbd3ecf619 --- /dev/null +++ b/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts @@ -0,0 +1,7 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +// default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 +// so we are using `simple_push` which is similar to default and not causing keyboard transition issues +const transition: NativeStackNavigationOptions['animation'] = 'simple_push'; + +export default transition; diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx index 3279937f1823..7fcdba9e422e 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx @@ -1,14 +1,61 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps} from './types'; +import slideFromLeftAnimation from './animation/native/slideFromLeft'; +import slideFromRightAnimation from './animation/native/slideFromRight'; +import {isRouteBasedScreenOptions} from './types'; +import type { + CommonStackNavigationOptions, + NavigationOptionsRouteProps, + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigator, + PlatformStackNavigatorProps, +} from './types'; + +const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + const commonScreenOptions = (({animation, ...rest}) => rest)(screenOptions) satisfies CommonStackNavigationOptions; + + let animation: NativeStackNavigationOptions['animation']; + switch (screenOptions.animation) { + case 'slide_from_right': + animation = slideFromRightAnimation; + break; + case 'slide_from_left': + animation = slideFromLeftAnimation; + break; + case 'modal': + animation = 'slide_from_bottom'; + break; + default: + animation = undefined; + } + + return { + ...commonScreenOptions, + animation, + }; +}; function createPlatformStackNavigator() { const NativeStack = createNativeStackNavigator(); + function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { + const nativeScreenOptions = isRouteBasedScreenOptions(screenOptions) + ? (props: NavigationOptionsRouteProps) => { + const routeBasedScreenOptions = screenOptions(props); + return withPolyfills(routeBasedScreenOptions); + } + : withPolyfills(screenOptions); + return ( {children} diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/createPlatformStackNavigator/index.tsx index 8db88be9e299..cc8286c6801c 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/createPlatformStackNavigator/index.tsx @@ -1,14 +1,39 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import type {StackNavigationOptions} from '@react-navigation/stack'; import {createStackNavigator} from '@react-navigation/stack'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps} from './types'; +import {isRouteBasedScreenOptions} from './types'; +import type { + CommonStackNavigationOptions, + NavigationOptionsRouteProps, + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigator, + PlatformStackNavigatorProps, +} from './types'; + +const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + const commonScreenOptions = (({animation, ...rest}) => rest)(screenOptions) satisfies CommonStackNavigationOptions; + + return commonScreenOptions; +}; function createPlatformStackNavigator() { const Stack = createStackNavigator(); function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { + const webScreenOptions = isRouteBasedScreenOptions(screenOptions) + ? (props: NavigationOptionsRouteProps) => { + const routeBasedScreenOptions = screenOptions(props); + return withPolyfills(routeBasedScreenOptions); + } + : withPolyfills(screenOptions); return ( {children} diff --git a/src/libs/Navigation/createPlatformStackNavigator/types.tsx b/src/libs/Navigation/createPlatformStackNavigator/types.tsx index df421c1280bd..4aea7bed058c 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/types.tsx +++ b/src/libs/Navigation/createPlatformStackNavigator/types.tsx @@ -1,15 +1,15 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {DefaultNavigatorOptions, ParamListBase, RouteProp, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; -type CommonNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; -type CommonNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; +type CommonStackNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; +type CommonStackNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; -type PlatformStackNavigationOptions = CommonNavigationOptions & { - platformAnimation: 'slide_from_left' | 'slide_from_right'; +type PlatformStackNavigationOptions = Omit & { + animation?: 'slide_from_left' | 'slide_from_right' | 'modal'; }; -type PlatformStackNavigationEventMap = CommonNavigationEventMap; +type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; type PlatformStackNavigatorProps = DefaultNavigatorOptions< TStackParams, @@ -22,4 +22,25 @@ type PlatformStackNavigatorProps = DefaultNa type PlatformStackNavigator = (props: PlatformStackNavigatorProps) => React.ReactElement; -export type {PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigatorProps, PlatformStackNavigator}; +type NavigationOptionsRouteProps = { + route: RouteProp; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + navigation: any; +}; + +function isRouteBasedScreenOptions( + screenOptions: PlatformStackNavigatorProps['screenOptions'], +): screenOptions is (props: NavigationOptionsRouteProps) => PlatformStackNavigationOptions { + return typeof screenOptions === 'function'; +} + +export {isRouteBasedScreenOptions}; +export type { + CommonStackNavigationOptions, + CommonStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + PlatformStackNavigatorProps, + PlatformStackNavigator, + NavigationOptionsRouteProps, +}; From 3b9b5b01fa55983462c2ab7e661479f19135b21e Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 15:59:09 +0200 Subject: [PATCH 023/589] move files --- .../modalStackNavigatorOptions/index.native.ts | 2 +- .../modalStackNavigatorOptions/index.ts | 2 +- .../ModalStackNavigators/useModalScreenOptions.ts | 2 +- .../animation/native/slideFromLeft/index.android.ts | 0 .../animation/native/slideFromLeft/index.ts | 0 .../animation/native/slideFromRight/index.android.ts | 0 .../animation/native/slideFromRight/index.ts | 0 .../createPlatformStackNavigator/index.native.tsx | 8 ++++---- .../createPlatformStackNavigator/index.tsx | 4 ++-- .../types.tsx | 0 10 files changed, 9 insertions(+), 9 deletions(-) rename src/libs/Navigation/{createPlatformStackNavigator => PlatformStackNavigation}/animation/native/slideFromLeft/index.android.ts (100%) rename src/libs/Navigation/{createPlatformStackNavigator => PlatformStackNavigation}/animation/native/slideFromLeft/index.ts (100%) rename src/libs/Navigation/{createPlatformStackNavigator => PlatformStackNavigation}/animation/native/slideFromRight/index.android.ts (100%) rename src/libs/Navigation/{createPlatformStackNavigator => PlatformStackNavigation}/animation/native/slideFromRight/index.ts (100%) rename src/libs/Navigation/{ => PlatformStackNavigation}/createPlatformStackNavigator/index.native.tsx (86%) rename src/libs/Navigation/{ => PlatformStackNavigation}/createPlatformStackNavigator/index.tsx (96%) rename src/libs/Navigation/{createPlatformStackNavigator => PlatformStackNavigation}/types.tsx (100%) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts index 720f8d108824..56f880bbdc64 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.native.ts @@ -1,4 +1,4 @@ -import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const defaultSubRouteOptions: PlatformStackNavigationOptions = { headerShown: false, diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts index bfc06d8cc556..c0093379046f 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts @@ -1,5 +1,5 @@ import {CardStyleInterpolators} from '@react-navigation/stack'; -import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const defaultSubRouteOptions: PlatformStackNavigationOptions = { headerShown: false, diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts index 492315cfcb3a..839ba1fc73b8 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts @@ -1,7 +1,7 @@ import {useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe'; -import type {PlatformStackNavigationOptions} from '@libs/Navigation/createPlatformStackNavigator/types'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ThemeStyles} from '@src/styles'; import subRouteOptions from './modalStackNavigatorOptions'; diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft/index.android.ts similarity index 100% rename from src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.android.ts rename to src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft/index.android.ts diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.ts b/src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft/index.ts similarity index 100% rename from src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromLeft/index.ts rename to src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft/index.ts diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight/index.android.ts similarity index 100% rename from src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.android.ts rename to src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight/index.android.ts diff --git a/src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts b/src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight/index.ts similarity index 100% rename from src/libs/Navigation/createPlatformStackNavigator/animation/native/slideFromRight/index.ts rename to src/libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight/index.ts diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx similarity index 86% rename from src/libs/Navigation/createPlatformStackNavigator/index.native.tsx rename to src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 7fcdba9e422e..cd4bc2039e57 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -2,9 +2,9 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import slideFromLeftAnimation from './animation/native/slideFromLeft'; -import slideFromRightAnimation from './animation/native/slideFromRight'; -import {isRouteBasedScreenOptions} from './types'; +import slideFromLeftAnimation from '@libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft'; +import slideFromRightAnimation from '@libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type { CommonStackNavigationOptions, NavigationOptionsRouteProps, @@ -12,7 +12,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps, -} from './types'; +} from '@libs/Navigation/PlatformStackNavigation/types'; const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { if (screenOptions === undefined) { diff --git a/src/libs/Navigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx similarity index 96% rename from src/libs/Navigation/createPlatformStackNavigator/index.tsx rename to src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index cc8286c6801c..4d776ec70006 100644 --- a/src/libs/Navigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -2,7 +2,7 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; import {createStackNavigator} from '@react-navigation/stack'; -import {isRouteBasedScreenOptions} from './types'; +import {isRouteBasedScreenOptions} from '../types'; import type { CommonStackNavigationOptions, NavigationOptionsRouteProps, @@ -10,7 +10,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigator, PlatformStackNavigatorProps, -} from './types'; +} from '../types'; const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { if (screenOptions === undefined) { diff --git a/src/libs/Navigation/createPlatformStackNavigator/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx similarity index 100% rename from src/libs/Navigation/createPlatformStackNavigator/types.tsx rename to src/libs/Navigation/PlatformStackNavigation/types.tsx From 57bfdd2ef68975f0a2d7fabb62a572942e701c86 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 18:00:06 +0200 Subject: [PATCH 024/589] simplify and improve createPlatformStackNavigator --- .../index.native.tsx | 3 +-- .../createPlatformStackNavigator/index.tsx | 8 ++++---- .../Navigation/PlatformStackNavigation/types.tsx | 16 ++++++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index cd4bc2039e57..ac2d63e8da36 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -10,7 +10,6 @@ import type { NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, - PlatformStackNavigator, PlatformStackNavigatorProps, } from '@libs/Navigation/PlatformStackNavigation/types'; @@ -63,7 +62,7 @@ function createPlatformStackNavigator() { ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); } diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 4d776ec70006..8bfe6425c5a8 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -2,15 +2,14 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; import {createStackNavigator} from '@react-navigation/stack'; -import {isRouteBasedScreenOptions} from '../types'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type { CommonStackNavigationOptions, NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, - PlatformStackNavigator, PlatformStackNavigatorProps, -} from '../types'; +} from '@libs/Navigation/PlatformStackNavigation/types'; const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { if (screenOptions === undefined) { @@ -24,6 +23,7 @@ const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): StackNav function createPlatformStackNavigator() { const Stack = createStackNavigator(); + function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { const webScreenOptions = isRouteBasedScreenOptions(screenOptions) ? (props: NavigationOptionsRouteProps) => { @@ -41,7 +41,7 @@ function createPlatformStackNavigator() { ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); } diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index 4aea7bed058c..f9543f3f7391 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -1,16 +1,22 @@ -import type {DefaultNavigatorOptions, ParamListBase, RouteProp, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {DefaultNavigatorOptions, NavigationProp, ParamListBase, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; type CommonStackNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; -type CommonStackNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; - type PlatformStackNavigationOptions = Omit & { animation?: 'slide_from_left' | 'slide_from_right' | 'modal'; }; + +type CommonStackNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; +type PlatformStackScreenProps = { + navigation: NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & + StackActionHelpers; + route: RouteProp; +}; + type PlatformStackNavigatorProps = DefaultNavigatorOptions< TStackParams, StackNavigationState, @@ -20,8 +26,6 @@ type PlatformStackNavigatorProps = DefaultNa StackRouterOptions & StackNavigationConfig; -type PlatformStackNavigator = (props: PlatformStackNavigatorProps) => React.ReactElement; - type NavigationOptionsRouteProps = { route: RouteProp; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -40,7 +44,7 @@ export type { CommonStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, + PlatformStackScreenProps, PlatformStackNavigatorProps, - PlatformStackNavigator, NavigationOptionsRouteProps, }; From a9dbb9e64eb1bd4b4bf69ea0c3c1729f2f081f2c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 18:02:05 +0200 Subject: [PATCH 025/589] fix: default animation --- .../createPlatformStackNavigator/index.native.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index ac2d63e8da36..613eb9d9315d 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -21,7 +21,7 @@ const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): NativeSt const commonScreenOptions = (({animation, ...rest}) => rest)(screenOptions) satisfies CommonStackNavigationOptions; let animation: NativeStackNavigationOptions['animation']; - switch (screenOptions.animation) { + switch (screenOptions.animation ?? 'slide_from_right') { case 'slide_from_right': animation = slideFromRightAnimation; break; From 85fc4bb86173bb5cdc909bd8de8b584e4494f738 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 17 Apr 2024 18:03:04 +0200 Subject: [PATCH 026/589] adapt pages --- .../Navigation/AppNavigator/ModalNavigatorScreenOptions.ts | 4 ++-- .../Navigation/AppNavigator/ModalStackNavigators/index.tsx | 4 ++-- src/libs/Navigation/AppNavigator/defaultScreenOptions.ts | 4 ++-- .../Navigation/AppNavigator/getRootNavigatorScreenOptions.ts | 2 -- src/pages/LogInWithShortLivedAuthTokenPage.tsx | 4 ++-- src/pages/UnlinkLoginPage.tsx | 4 ++-- src/pages/ValidateLoginPage/types.ts | 4 ++-- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts index e49a94bf4ed7..8b0b2cc581ba 100644 --- a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts @@ -1,5 +1,5 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; import {CardStyleInterpolators} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ThemeStyles} from '@styles/index'; /** @@ -7,7 +7,7 @@ import type {ThemeStyles} from '@styles/index'; * @param themeStyles - The styles object * @returns The screen options object */ -const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles): StackNavigationOptions => ({ +const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles): PlatformStackNavigationOptions => ({ headerShown: false, animationEnabled: true, gestureDirection: 'horizontal', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index 23fefdaea432..45d7905aafc5 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -1,7 +1,7 @@ import type {ParamListBase} from '@react-navigation/routers'; -import type {StackNavigationOptions} from '@react-navigation/stack'; import React from 'react'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type { AddPersonalBankAccountNavigatorParamList, DetailsNavigatorParamList, @@ -45,7 +45,7 @@ type Screens = Partial React.ComponentType>>; * @param screens key/value pairs where the key is the name of the screen and the value is a functon that returns the lazy-loaded component * @param getScreenOptions optional function that returns the screen options, override the default options */ -function createModalStackNavigator(screens: Screens, getScreenOptions?: (styles: ThemeStyles) => StackNavigationOptions): React.ComponentType { +function createModalStackNavigator(screens: Screens, getScreenOptions?: (styles: ThemeStyles) => PlatformStackNavigationOptions): React.ComponentType { const ModalStackNavigator = createPlatformStackNavigator(); function ModalStack() { diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts index 4015c43c679e..3104264263a6 100644 --- a/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts @@ -1,6 +1,6 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -const defaultScreenOptions: StackNavigationOptions = { +const defaultScreenOptions: PlatformStackNavigationOptions = { cardStyle: { overflow: 'visible', flex: 1, diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index dd0927492d70..3df1e79e3678 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -8,7 +8,6 @@ import createModalCardStyleInterpolator from './createModalCardStyleInterpolator import getRightModalNavigatorOptions from './getRightModalNavigatorOptions'; import hideKeyboardOnSwipe from './hideKeyboardOnSwipe'; import leftModalNavigatorOptions from './leftModalNavigatorOptions'; -import transition from './transition'; type GetOnboardingModalNavigatorOptions = (shouldUseNarrowLayout: boolean) => StackNavigationOptions; @@ -41,7 +40,6 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...getRightModalNavigatorOptions(isSmallScreenWidth), ...hideKeyboardOnSwipe, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), - animation: transition, ...hideKeyboardOnSwipe, }, onboardingModalNavigator: (shouldUseNarrowLayout: boolean) => ({ diff --git a/src/pages/LogInWithShortLivedAuthTokenPage.tsx b/src/pages/LogInWithShortLivedAuthTokenPage.tsx index 72425e0e2ca6..265f7666decc 100644 --- a/src/pages/LogInWithShortLivedAuthTokenPage.tsx +++ b/src/pages/LogInWithShortLivedAuthTokenPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {NativeModules, View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; @@ -28,7 +28,7 @@ type LogInWithShortLivedAuthTokenPageOnyxProps = { account: OnyxEntry; }; -type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & StackScreenProps; +type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & PlatformStackScreenProps; function LogInWithShortLivedAuthTokenPage({route, account}: LogInWithShortLivedAuthTokenPageProps) { const theme = useTheme(); diff --git a/src/pages/UnlinkLoginPage.tsx b/src/pages/UnlinkLoginPage.tsx index 326d09df3143..eaa60824ab6a 100644 --- a/src/pages/UnlinkLoginPage.tsx +++ b/src/pages/UnlinkLoginPage.tsx @@ -1,10 +1,10 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import usePrevious from '@hooks/usePrevious'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@navigation/types'; import * as Session from '@userActions/Session'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -16,7 +16,7 @@ type UnlinkLoginPageOnyxProps = { account: OnyxEntry; }; -type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & StackScreenProps; +type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & PlatformStackScreenProps; function UnlinkLoginPage({route, account}: UnlinkLoginPageProps) { const accountID = route.params.accountID ?? -1; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index d9d2873891cd..47208eee2ebb 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -1,5 +1,5 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import type {OnyxEntry} from 'react-native-onyx'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import type {Account, Credentials, Session} from '@src/types/onyx'; @@ -17,6 +17,6 @@ type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { credentials: OnyxEntry; }; -type ValidateLoginPageProps = OnyxProps & StackScreenProps; +type ValidateLoginPageProps = OnyxProps & PlatformStackScreenProps; export type {ValidateLoginPageOnyxNativeProps, ValidateLoginPageOnyxProps, ValidateLoginPageProps}; From 75b5cac9f1be209426bc02a6502cdb73e71c1516 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 11:58:58 +0200 Subject: [PATCH 027/589] add patch for additional (onyx) props --- patches/@react-navigation+core+6.4.11.patch | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 patches/@react-navigation+core+6.4.11.patch diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch new file mode 100644 index 000000000000..6ba3f2727f40 --- /dev/null +++ b/patches/@react-navigation+core+6.4.11.patch @@ -0,0 +1,40 @@ +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts +index fcd456b..13e005e 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts ++++ b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts +@@ -307,10 +307,11 @@ export type Descriptor = Partial<{ + [EventName in keyof (EventMap & EventMapCore)]: EventListenerCallback; + }>; +-type ScreenComponentType = React.ComponentType<{ ++type ScreenComponentType = Record> = React.ComponentType<{ + route: RouteProp; + navigation: any; +-}> | React.ComponentType<{}>; ++} & CustomProps> | React.ComponentType; + export type RouteConfigComponent = { + /** + * React component to render for this screen. +diff --git a/node_modules/@react-navigation/core/src/types.tsx b/node_modules/@react-navigation/core/src/types.tsx +index b691d75..8435eed 100644 +--- a/node_modules/@react-navigation/core/src/types.tsx ++++ b/node_modules/@react-navigation/core/src/types.tsx +@@ -442,13 +442,14 @@ export type ScreenListeners< + + type ScreenComponentType< + ParamList extends ParamListBase, +- RouteName extends keyof ParamList ++ RouteName extends keyof ParamList, ++ CustomProps extends Record = Record + > = + | React.ComponentType<{ + route: RouteProp; + navigation: any; +- }> +- | React.ComponentType<{}>; ++ } & CustomProps> ++ | React.ComponentType; + + export type RouteConfigComponent< + ParamList extends ParamListBase, From 1c60ee67a6fac9965daa8ce199cf605518c707ba Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 12:17:50 +0200 Subject: [PATCH 028/589] use PlatformStackScreenProps --- .../AppNavigator/Navigators/LeftModalNavigator.tsx | 4 ++-- .../AppNavigator/Navigators/RightModalNavigator.tsx | 4 ++-- src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx | 4 ++-- src/pages/ConciergePage.tsx | 4 ++-- src/pages/DetailsPage.tsx | 4 ++-- src/pages/EditSplitBillPage.tsx | 4 ++-- src/pages/FlagCommentPage.tsx | 4 ++-- src/pages/GetAssistancePage.tsx | 4 ++-- src/pages/GroupChatNameEditPage.tsx | 4 ++-- src/pages/LogOutPreviousUserPage.tsx | 4 ++-- src/pages/PrivateNotes/PrivateNotesEditPage.tsx | 4 ++-- src/pages/ProfilePage.tsx | 4 ++-- src/pages/ReferralDetailsPage.tsx | 4 ++-- src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx | 4 ++-- src/pages/ReportAvatar.tsx | 4 ++-- src/pages/ReportDescriptionPage.tsx | 4 ++-- src/pages/ReportDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantRoleSelectionPage.tsx | 4 ++-- src/pages/RoomInvitePage.tsx | 4 ++-- src/pages/RoomMembersPage.tsx | 4 ++-- src/pages/SearchPage/index.tsx | 4 ++-- src/pages/TransactionReceiptPage.tsx | 4 ++-- src/pages/home/ReportScreen.tsx | 4 ++-- src/pages/home/report/ReportAttachments.tsx | 4 ++-- .../home/report/withReportAndReportActionOrNotFound.tsx | 4 ++-- src/pages/iou/MoneyRequestWaypointPage.tsx | 4 ++-- src/pages/iou/SplitBillDetailsPage.tsx | 4 ++-- src/pages/settings/AboutPage/ShareLogPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx | 4 ++-- .../settings/Profile/Contacts/ContactMethodDetailsPage.tsx | 5 +++-- src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx | 4 ++-- .../settings/Profile/Contacts/NewContactMethodPage.tsx | 4 ++-- src/pages/settings/Profile/PersonalDetails/AddressPage.tsx | 4 ++-- .../Profile/PersonalDetails/CountrySelectionPage.tsx | 4 ++-- src/pages/settings/Profile/ProfileAvatar.tsx | 4 ++-- src/pages/settings/Report/NotificationPreferencePage.tsx | 4 ++-- src/pages/settings/Report/ReportSettingsPage.tsx | 4 ++-- src/pages/settings/Report/RoomNamePage.tsx | 4 ++-- src/pages/settings/Report/VisibilityPage.tsx | 4 ++-- src/pages/settings/Report/WriteCapabilityPage.tsx | 4 ++-- src/pages/settings/Security/CloseAccountPage.tsx | 4 ++-- src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx | 4 ++-- src/pages/settings/Wallet/ExpensifyCardPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportCardLostPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx | 4 ++-- src/pages/tasks/NewTaskDescriptionPage.tsx | 4 ++-- src/pages/tasks/NewTaskDetailsPage.tsx | 4 ++-- src/pages/tasks/NewTaskPage.tsx | 4 ++-- src/pages/tasks/NewTaskTitlePage.tsx | 4 ++-- src/pages/wallet/WalletStatementPage.tsx | 4 ++-- src/pages/workspace/WorkspaceAvatar.tsx | 4 ++-- src/pages/workspace/WorkspaceInitialPage.tsx | 6 ++++-- src/pages/workspace/WorkspaceInviteMessagePage.tsx | 4 ++-- src/pages/workspace/WorkspaceInvitePage.tsx | 4 ++-- src/pages/workspace/WorkspaceJoinUserPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMembersPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 4 ++-- src/pages/workspace/bills/WorkspaceBillsPage.tsx | 4 ++-- src/pages/workspace/card/WorkspaceCardPage.tsx | 4 ++-- src/pages/workspace/categories/CategorySettingsPage.tsx | 4 ++-- src/pages/workspace/categories/CreateCategoryPage.tsx | 4 ++-- src/pages/workspace/categories/EditCategoryPage.tsx | 4 ++-- src/pages/workspace/categories/WorkspaceCategoriesPage.tsx | 4 ++-- .../categories/WorkspaceCategoriesSettingsPage.tsx | 4 ++-- .../workspace/distanceRates/CreateDistanceRatePage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRateDetailsPage.tsx | 4 ++-- .../workspace/distanceRates/PolicyDistanceRateEditPage.tsx | 4 ++-- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRatesSettingsPage.tsx | 4 ++-- src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx | 4 ++-- src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeErrorPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeSuccessPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeWrapperPage.tsx | 4 ++-- src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx | 4 ++-- src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx | 4 ++-- src/pages/workspace/tags/EditTagPage.tsx | 4 ++-- src/pages/workspace/tags/TagSettingsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceCreateTagPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceEditTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx | 4 ++-- src/pages/workspace/taxes/NamePage.tsx | 4 ++-- src/pages/workspace/taxes/ValuePage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 4 ++-- .../workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx | 5 +++-- .../taxes/WorkspaceTaxesSettingsForeignCurrency.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx | 4 ++-- src/pages/workspace/travel/WorkspaceTravelPage.tsx | 4 ++-- .../workflows/WorkspaceAutoReportingFrequencyPage.tsx | 5 +++-- .../workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx | 4 ++-- .../workspace/workflows/WorkspaceWorkflowsApproverPage.tsx | 4 ++-- src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 4 ++-- .../workspace/workflows/WorkspaceWorkflowsPayerPage.tsx | 4 ++-- tests/perf-test/ReportScreen.perf-test.tsx | 4 ++-- tests/perf-test/SearchPage.perf-test.tsx | 4 ++-- 105 files changed, 215 insertions(+), 210 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index 2741b0ee2140..742cf28157e4 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; @@ -7,12 +6,13 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, LeftModalNavigatorParamList} from '@libs/Navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type LeftModalNavigatorProps = StackScreenProps; +type LeftModalNavigatorProps = PlatformStackScreenProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 61ae43f423e3..47f0532e7e86 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo, useRef} from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; @@ -8,12 +7,13 @@ import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwi import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type RightModalNavigatorProps = StackScreenProps; +type RightModalNavigatorProps = PlatformStackScreenProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx index 5d710afa69e9..9854ea136e8b 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx +++ b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx @@ -1,11 +1,11 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@navigation/types'; import ReportScreen from '@pages/home/ReportScreen'; import type SCREENS from '@src/SCREENS'; import ReportScreenIDSetter from './ReportScreenIDSetter'; -type ReportScreenWrapperProps = StackScreenProps; +type ReportScreenWrapperProps = PlatformStackScreenProps; function ReportScreenWrapper({route, navigation}: ReportScreenWrapperProps) { // The ReportScreen without the reportID set will display a skeleton diff --git a/src/pages/ConciergePage.tsx b/src/pages/ConciergePage.tsx index 10040a6c3146..c22aa867f3da 100644 --- a/src/pages/ConciergePage.tsx +++ b/src/pages/ConciergePage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useRef} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -9,6 +8,7 @@ import ReportHeaderSkeletonView from '@components/ReportHeaderSkeletonView'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as App from '@userActions/App'; import * as Report from '@userActions/Report'; @@ -21,7 +21,7 @@ type ConciergePageOnyxProps = { session: OnyxEntry; }; -type ConciergePageProps = ConciergePageOnyxProps & StackScreenProps; +type ConciergePageProps = ConciergePageOnyxProps & PlatformStackScreenProps; /* * This is a "utility page", that does this: diff --git a/src/pages/DetailsPage.tsx b/src/pages/DetailsPage.tsx index 49b3e856c65d..5310b051d342 100755 --- a/src/pages/DetailsPage.tsx +++ b/src/pages/DetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React from 'react'; import {View} from 'react-native'; @@ -20,6 +19,7 @@ import Text from '@components/Text'; import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -40,7 +40,7 @@ type DetailsPageOnyxProps = { session: OnyxEntry; }; -type DetailsPageProps = DetailsPageOnyxProps & StackScreenProps; +type DetailsPageProps = DetailsPageOnyxProps & PlatformStackScreenProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/EditSplitBillPage.tsx b/src/pages/EditSplitBillPage.tsx index 26e08d8347f7..7474ff672c34 100644 --- a/src/pages/EditSplitBillPage.tsx +++ b/src/pages/EditSplitBillPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {TransactionChanges} from '@libs/TransactionUtils'; @@ -32,7 +32,7 @@ type EditSplitBillOnyxProps = { draftTransaction: OnyxEntry; }; -type EditSplitBillProps = EditSplitBillOnyxProps & StackScreenProps; +type EditSplitBillProps = EditSplitBillOnyxProps & PlatformStackScreenProps; function EditSplitBillPage({route, transaction, draftTransaction, report}: EditSplitBillProps) { const {field: fieldToEdit, reportID, reportActionID, tagIndex} = route.params; diff --git a/src/pages/FlagCommentPage.tsx b/src/pages/FlagCommentPage.tsx index 53aac0ce2a8b..93c2da15d8db 100644 --- a/src/pages/FlagCommentPage.tsx +++ b/src/pages/FlagCommentPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as Report from '@userActions/Report'; @@ -30,7 +30,7 @@ type FlagCommentPageWithOnyxProps = { parentReportAction: OnyxEntry; }; -type FlagCommentPageNavigationProps = StackScreenProps; +type FlagCommentPageNavigationProps = PlatformStackScreenProps; type FlagCommentPageProps = FlagCommentPageNavigationProps & WithReportAndReportActionOrNotFoundProps & FlagCommentPageWithOnyxProps; diff --git a/src/pages/GetAssistancePage.tsx b/src/pages/GetAssistancePage.tsx index b543524fc68e..381a1716f59b 100644 --- a/src/pages/GetAssistancePage.tsx +++ b/src/pages/GetAssistancePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import * as Report from '@userActions/Report'; @@ -28,7 +28,7 @@ type GetAssistanceOnyxProps = { account: OnyxEntry; }; -type GetAssistancePageProps = GetAssistanceOnyxProps & StackScreenProps; +type GetAssistancePageProps = GetAssistanceOnyxProps & PlatformStackScreenProps; function GetAssistancePage({route, account}: GetAssistancePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/GroupChatNameEditPage.tsx b/src/pages/GroupChatNameEditPage.tsx index 05d179fa552a..7cdf59d1f18d 100644 --- a/src/pages/GroupChatNameEditPage.tsx +++ b/src/pages/GroupChatNameEditPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; import FormProvider from '@components/Form/FormProvider'; @@ -11,6 +10,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {NewChatNavigatorParamList} from '@navigation/types'; @@ -27,7 +27,7 @@ type GroupChatNameEditPageOnyxProps = { groupChatDraft: NewGroupChatDraft | null; }; -type GroupChatNameEditPageProps = StackScreenProps & GroupChatNameEditPageOnyxProps; +type GroupChatNameEditPageProps = PlatformStackScreenProps & GroupChatNameEditPageOnyxProps; function GroupChatNameEditPage({groupChatDraft, route}: GroupChatNameEditPageProps) { // If we have a reportID this means we are using this page to update an existing Group Chat name diff --git a/src/pages/LogOutPreviousUserPage.tsx b/src/pages/LogOutPreviousUserPage.tsx index c80b26bbb9e7..435efa8be6ce 100644 --- a/src/pages/LogOutPreviousUserPage.tsx +++ b/src/pages/LogOutPreviousUserPage.tsx @@ -1,10 +1,10 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useContext, useEffect} from 'react'; import {NativeModules} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import {InitialURLContext} from '@components/InitialURLContextProvider'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as SessionUtils from '@libs/SessionUtils'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; @@ -24,7 +24,7 @@ type LogOutPreviousUserPageOnyxProps = { isAccountLoading: boolean; }; -type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & StackScreenProps; +type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & PlatformStackScreenProps; // This page is responsible for handling transitions from OldDot. Specifically, it logs the current user // out if the transition is for another user. diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx index 7d0b8fff8e41..f4fb6f79aee1 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import Str from 'expensify-common/lib/str'; import lodashDebounce from 'lodash/debounce'; @@ -19,6 +18,7 @@ import useHtmlPaste from '@hooks/useHtmlPaste'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PrivateNotesNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -40,7 +40,7 @@ type PrivateNotesEditPageOnyxProps = { type PrivateNotesEditPageProps = WithReportAndPrivateNotesOrNotFoundProps & PrivateNotesEditPageOnyxProps & - StackScreenProps & { + PlatformStackScreenProps & { /** The report currently being looked at */ report: Report; }; diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index 6ad3860132d2..91efe6e01830 100755 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React, {useEffect, useMemo} from 'react'; import {View} from 'react-native'; @@ -22,6 +21,7 @@ import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -40,7 +40,7 @@ import type {PersonalDetails, Report} from '@src/types/onyx'; import type {EmptyObject} from '@src/types/utils/EmptyObject'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ProfilePageProps = StackScreenProps; +type ProfilePageProps = PlatformStackScreenProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/ReferralDetailsPage.tsx b/src/pages/ReferralDetailsPage.tsx index d8a27e171933..76dac1aca1a8 100644 --- a/src/pages/ReferralDetailsPage.tsx +++ b/src/pages/ReferralDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useRef} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; @@ -15,6 +14,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Clipboard from '@libs/Clipboard'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReferralDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; @@ -29,7 +29,7 @@ type ReferralDetailsPageOnyxProps = { account: OnyxEntry; }; -type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & StackScreenProps; +type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & PlatformStackScreenProps; function ReferralDetailsPage({route, account}: ReferralDetailsPageProps) { const theme = useTheme(); diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx index 04254bbe1559..03725fa18025 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx @@ -1,5 +1,4 @@ import type {RouteProp} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import lodashPick from 'lodash/pick'; import React, {useEffect, useRef, useState} from 'react'; @@ -19,6 +18,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import getPlaidOAuthReceivedRedirectURI from '@libs/getPlaidOAuthReceivedRedirectURI'; import BankAccount from '@libs/models/BankAccount'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReimbursementAccountNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import shouldReopenOnfido from '@libs/shouldReopenOnfido'; @@ -68,7 +68,7 @@ type ReimbursementAccountOnyxProps = { type ReimbursementAccountPageProps = WithPolicyOnyxProps & ReimbursementAccountOnyxProps & - StackScreenProps; + PlatformStackScreenProps; const ROUTE_NAMES = { COMPANY: 'company', diff --git a/src/pages/ReportAvatar.tsx b/src/pages/ReportAvatar.tsx index 121b238012bf..63c3d154e74c 100644 --- a/src/pages/ReportAvatar.tsx +++ b/src/pages/ReportAvatar.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -18,7 +18,7 @@ type ReportAvatarOnyxProps = { policies: OnyxCollection; }; -type ReportAvatarProps = ReportAvatarOnyxProps & StackScreenProps; +type ReportAvatarProps = ReportAvatarOnyxProps & PlatformStackScreenProps; function ReportAvatar({report = {} as Report, policies, isLoadingApp = true}: ReportAvatarProps) { const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID ?? '0'}`]; diff --git a/src/pages/ReportDescriptionPage.tsx b/src/pages/ReportDescriptionPage.tsx index 6062ef748f36..0aabe5ad5d58 100644 --- a/src/pages/ReportDescriptionPage.tsx +++ b/src/pages/ReportDescriptionPage.tsx @@ -1,5 +1,5 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportDescriptionNavigatorParamList} from '@navigation/types'; import type SCREENS from '@src/SCREENS'; @@ -8,7 +8,7 @@ import withReportOrNotFound from './home/report/withReportOrNotFound'; import RoomDescriptionPage from './RoomDescriptionPage'; import TaskDescriptionPage from './tasks/TaskDescriptionPage'; -type ReportDescriptionPageProps = WithReportOrNotFoundProps & StackScreenProps; +type ReportDescriptionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportDescriptionPage(props: ReportDescriptionPageProps) { const isTask = ReportUtils.isTaskReport(props.report); diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 0646f37f9b26..ad9117599f1f 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -1,5 +1,4 @@ import {useRoute} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useMemo} from 'react'; import {View} from 'react-native'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; @@ -24,6 +23,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -58,7 +58,7 @@ type ReportDetailsPageOnyxProps = { /** Session info for the currently logged in user. */ session: OnyxEntry; }; -type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & StackScreenProps; +type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportDetailsPage({policies, report, session, personalDetails}: ReportDetailsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/ReportParticipantDetailsPage.tsx b/src/pages/ReportParticipantDetailsPage.tsx index 2b1411641faa..56ebec0789d4 100644 --- a/src/pages/ReportParticipantDetailsPage.tsx +++ b/src/pages/ReportParticipantDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -17,6 +16,7 @@ import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; @@ -35,7 +35,7 @@ type ReportParticipantDetailsOnyxProps = { }; type ReportParticipantDetailsPageProps = WithReportOrNotFoundProps & - StackScreenProps & + PlatformStackScreenProps & ReportParticipantDetailsOnyxProps; function ReportParticipantDetails({personalDetails, report, route}: ReportParticipantDetailsPageProps) { diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 6d8c5d951064..1db4e878bcb7 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import type {ValueOf} from 'type-fest'; @@ -10,6 +9,7 @@ import type {ListItem} from '@components/SelectionList/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -19,7 +19,7 @@ import NotFoundPage from './ErrorPage/NotFoundPage'; import withReportOrNotFound from './home/report/withReportOrNotFound'; import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound'; -type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & StackScreenProps; +type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; type ListItemType = ListItem & { value: ValueOf; diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index 79198e81fc43..7db147c81564 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import type {SectionListData} from 'react-native'; @@ -18,6 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -34,7 +34,7 @@ import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound import withReportOrNotFound from './home/report/withReportOrNotFound'; import SearchInputManager from './workspace/SearchInputManager'; -type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & StackScreenProps; +type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & PlatformStackScreenProps; type Sections = Array>>; diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index 009eaaf15a3c..9d074e678957 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -1,5 +1,4 @@ import {useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -21,6 +20,7 @@ import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RoomMembersNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -45,7 +45,7 @@ type RoomMembersPageOnyxProps = { type RoomMembersPageProps = WithReportOrNotFoundProps & WithCurrentUserPersonalDetailsProps & RoomMembersPageOnyxProps & - StackScreenProps; + PlatformStackScreenProps; function RoomMembersPage({report, session, policies}: RoomMembersPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/SearchPage/index.tsx b/src/pages/SearchPage/index.tsx index d79c60ff4f45..aafad8ce800c 100644 --- a/src/pages/SearchPage/index.tsx +++ b/src/pages/SearchPage/index.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import isEmpty from 'lodash/isEmpty'; import React, {useEffect, useMemo, useState} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; @@ -15,6 +14,7 @@ import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import type {MaybePhraseKey} from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import Performance from '@libs/Performance'; @@ -35,7 +35,7 @@ type SearchPageOnyxProps = { isSearchingForReports: OnyxEntry; }; -type SearchPageProps = SearchPageOnyxProps & StackScreenProps; +type SearchPageProps = SearchPageOnyxProps & PlatformStackScreenProps; type SearchPageSectionItem = { data: OptionData[]; diff --git a/src/pages/TransactionReceiptPage.tsx b/src/pages/TransactionReceiptPage.tsx index 80bda8c0df1b..97ce2dd44cf5 100644 --- a/src/pages/TransactionReceiptPage.tsx +++ b/src/pages/TransactionReceiptPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReceiptUtils from '@libs/ReceiptUtils'; import * as ReportActionUtils from '@libs/ReportActionsUtils'; @@ -23,7 +23,7 @@ type TransactionReceiptOnyxProps = { reportMetadata: OnyxEntry; }; -type TransactionReceiptProps = TransactionReceiptOnyxProps & StackScreenProps; +type TransactionReceiptProps = TransactionReceiptOnyxProps & PlatformStackScreenProps; function TransactionReceipt({transaction, report, reportMetadata = {isLoadingInitialReportActions: true}, route}: TransactionReceiptProps) { const receiptURIs = ReceiptUtils.getThumbnailAndImageURIs(transaction); diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 1854afb961ed..61b8111078d2 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -1,5 +1,4 @@ import {useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import lodashIsEqual from 'lodash/isEqual'; import React, {memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react'; import type {FlatList, ViewStyle} from 'react-native'; @@ -29,6 +28,7 @@ import useViewportOffsetTop from '@hooks/useViewportOffsetTop'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Timing from '@libs/actions/Timing'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import clearReportNotifications from '@libs/Notification/clearReportNotifications'; import Performance from '@libs/Performance'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -88,7 +88,7 @@ type OnyxHOCProps = { markReadyForHydration?: () => void; }; -type ReportScreenNavigationProps = StackScreenProps; +type ReportScreenNavigationProps = PlatformStackScreenProps; type ReportScreenPropsWithoutParentReportAction = OnyxHOCProps & CurrentReportIDContextValue & ReportScreenOnyxPropsWithoutParentReportAction & ReportScreenNavigationProps; diff --git a/src/pages/home/report/ReportAttachments.tsx b/src/pages/home/report/ReportAttachments.tsx index 82b49d1e260c..7e33b7047cc5 100644 --- a/src/pages/home/report/ReportAttachments.tsx +++ b/src/pages/home/report/ReportAttachments.tsx @@ -1,15 +1,15 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import AttachmentModal from '@components/AttachmentModal'; import type {Attachment} from '@components/Attachments/types'; import ComposerFocusManager from '@libs/ComposerFocusManager'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type ReportAttachmentsProps = StackScreenProps; +type ReportAttachmentsProps = PlatformStackScreenProps; function ReportAttachments({route}: ReportAttachmentsProps) { const reportID = route.params.reportID; diff --git a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx index e5e203fb5030..59e8a30dbd77 100644 --- a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx +++ b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx @@ -1,5 +1,4 @@ /* eslint-disable rulesdir/no-negated-variables */ -import type {StackScreenProps} from '@react-navigation/stack'; import type {ComponentType, ForwardedRef, RefAttributes} from 'react'; import React, {useCallback, useEffect} from 'react'; import type {OnyxCollection, OnyxEntry, WithOnyxInstanceState} from 'react-native-onyx'; @@ -9,6 +8,7 @@ import withWindowDimensions from '@components/withWindowDimensions'; import type {WindowDimensionsProps} from '@components/withWindowDimensions/types'; import compose from '@libs/compose'; import getComponentDisplayName from '@libs/getComponentDisplayName'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList, SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -46,7 +46,7 @@ type OnyxProps = { type WithReportAndReportActionOrNotFoundProps = OnyxProps & WindowDimensionsProps & - StackScreenProps; + PlatformStackScreenProps; export default function ( WrappedComponent: ComponentType>, diff --git a/src/pages/iou/MoneyRequestWaypointPage.tsx b/src/pages/iou/MoneyRequestWaypointPage.tsx index 35778f37a9ef..f9b78d77b81e 100644 --- a/src/pages/iou/MoneyRequestWaypointPage.tsx +++ b/src/pages/iou/MoneyRequestWaypointPage.tsx @@ -1,6 +1,6 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {MoneyRequestNavigatorParamList} from '@libs/Navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -9,7 +9,7 @@ import IOURequestStepWaypoint from './request/step/IOURequestStepWaypoint'; type MoneyRequestWaypointPageOnyxProps = { transactionID: string | undefined; }; -type MoneyRequestWaypointPageProps = StackScreenProps & MoneyRequestWaypointPageOnyxProps; +type MoneyRequestWaypointPageProps = PlatformStackScreenProps & MoneyRequestWaypointPageOnyxProps; // This component is responsible for grabbing the transactionID from the IOU key // You can't use Onyx props in the withOnyx mapping, so we need to set up and access the transactionID here, and then pass it down so that WaypointEditor can subscribe to the transaction. diff --git a/src/pages/iou/SplitBillDetailsPage.tsx b/src/pages/iou/SplitBillDetailsPage.tsx index 91aa37dd01c2..ba8b8ce74b0a 100644 --- a/src/pages/iou/SplitBillDetailsPage.tsx +++ b/src/pages/iou/SplitBillDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -10,6 +9,7 @@ import MoneyRequestHeaderStatusBar from '@components/MoneyRequestHeaderStatusBar import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -51,7 +51,7 @@ type SplitBillDetailsPageOnyxProps = SplitBillDetailsPageTransactionOnyxProps & type SplitBillDetailsPageProps = WithReportAndReportActionOrNotFoundProps & SplitBillDetailsPageOnyxProps & - StackScreenProps; + PlatformStackScreenProps; function SplitBillDetailsPage({personalDetails, report, route, reportActions, transaction, draftTransaction, session}: SplitBillDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/AboutPage/ShareLogPage.tsx b/src/pages/settings/AboutPage/ShareLogPage.tsx index 8f0623f99d32..ad4006b06e03 100644 --- a/src/pages/settings/AboutPage/ShareLogPage.tsx +++ b/src/pages/settings/AboutPage/ShareLogPage.tsx @@ -1,10 +1,10 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import ShareLogList from './ShareLogList'; -type ShareLogPageProps = StackScreenProps; +type ShareLogPageProps = PlatformStackScreenProps; function ShareLogPage({route}: ShareLogPageProps) { return ; diff --git a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx index 672dbbb91069..81c95b243157 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect} from 'react'; import {NativeModules, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -13,6 +12,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import variables from '@styles/variables'; @@ -31,7 +31,7 @@ type ExitSurveyConfirmPageOnyxProps = { isLoading: OnyxEntry; }; -type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & StackScreenProps; +type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & PlatformStackScreenProps; function ExitSurveyConfirmPage({exitReason, isLoading, route, navigation}: ExitSurveyConfirmPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx index badbdeb86d14..8ade6b170395 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import FormProvider from '@components/Form/FormProvider'; @@ -17,6 +16,7 @@ import useSafeAreaInsets from '@hooks/useSafeAreaInsets'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import Navigation from '@navigation/Navigation'; @@ -35,7 +35,7 @@ type ExitSurveyResponsePageOnyxProps = { draftResponse: string; }; -type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & StackScreenProps; +type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & PlatformStackScreenProps; function ExitSurveyResponsePage({draftResponse, route, navigation}: ExitSurveyResponsePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index 8aaeb7151563..89574a39e68e 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -1,4 +1,4 @@ -import type {StackScreenProps} from '@react-navigation/stack'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Str from 'expensify-common/lib/str'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {InteractionManager, Keyboard, View} from 'react-native'; @@ -22,6 +22,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import * as User from '@userActions/User'; @@ -41,7 +42,7 @@ const policiesSelector = (policy: OnyxEntry): Pick; +type ContactMethodDetailsPageProps = PlatformStackScreenProps; function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { const [loginList, loginListResult] = useOnyx(ONYXKEYS.LOGIN_LIST); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx index 8970df59f856..5fec33ce4a15 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React, {useCallback} from 'react'; import {View} from 'react-native'; @@ -16,6 +15,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -32,7 +32,7 @@ type ContactMethodsPageOnyxProps = { session: OnyxEntry; }; -type ContactMethodsPageProps = ContactMethodsPageOnyxProps & StackScreenProps; +type ContactMethodsPageProps = ContactMethodsPageOnyxProps & PlatformStackScreenProps; function ContactMethodsPage({loginList, session, route}: ContactMethodsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index 20e12f71664e..8edcc669be86 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; @@ -17,6 +16,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as User from '@userActions/User'; import CONST from '@src/CONST'; @@ -32,7 +32,7 @@ type NewContactMethodPageOnyxProps = { loginList: OnyxEntry; }; -type NewContactMethodPageProps = NewContactMethodPageOnyxProps & StackScreenProps; +type NewContactMethodPageProps = NewContactMethodPageOnyxProps & PlatformStackScreenProps; const addNewContactMethod = (values: FormOnyxValues) => { const phoneLogin = LoginUtils.getPhoneLogin(values.phoneOrEmail); diff --git a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx index fcb018348b72..f40405d2e1a6 100644 --- a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; @@ -10,6 +9,7 @@ import useGeographicalStateFromRoute from '@hooks/useGeographicalStateFromRoute' import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PersonalDetails from '@userActions/PersonalDetails'; import type {FormOnyxValues} from '@src/components/Form/types'; @@ -27,7 +27,7 @@ type AddressPageOnyxProps = { isLoadingApp: OnyxEntry; }; -type AddressPageProps = StackScreenProps & AddressPageOnyxProps; +type AddressPageProps = PlatformStackScreenProps & AddressPageOnyxProps; /** * Submit form to update user's first and last legal name diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index c0d980083ddf..44e61bc7b318 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo, useState} from 'react'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -6,6 +5,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type {CountryData} from '@libs/searchCountryOptions'; import searchCountryOptions from '@libs/searchCountryOptions'; @@ -15,7 +15,7 @@ import type {TranslationPaths} from '@src/languages/types'; import type {Route} from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type CountrySelectionPageProps = StackScreenProps; +type CountrySelectionPageProps = PlatformStackScreenProps; function CountrySelectionPage({route, navigation}: CountrySelectionPageProps) { const [searchValue, setSearchValue] = useState(''); diff --git a/src/pages/settings/Profile/ProfileAvatar.tsx b/src/pages/settings/Profile/ProfileAvatar.tsx index 4925a6948fef..ebec25da7a63 100644 --- a/src/pages/settings/Profile/ProfileAvatar.tsx +++ b/src/pages/settings/Profile/ProfileAvatar.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -19,7 +19,7 @@ type ProfileAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type ProfileAvatarProps = ProfileAvatarOnyxProps & StackScreenProps; +type ProfileAvatarProps = ProfileAvatarOnyxProps & PlatformStackScreenProps; function ProfileAvatar({route, personalDetails, personalDetailsMetadata, isLoadingApp = true}: ProfileAvatarProps) { const personalDetail = personalDetails?.[route.params.accountID]; diff --git a/src/pages/settings/Report/NotificationPreferencePage.tsx b/src/pages/settings/Report/NotificationPreferencePage.tsx index af55ff994fcf..108b6576ad96 100644 --- a/src/pages/settings/Report/NotificationPreferencePage.tsx +++ b/src/pages/settings/Report/NotificationPreferencePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -6,6 +5,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -14,7 +14,7 @@ import * as ReportActions from '@userActions/Report'; import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; -type NotificationPreferencePageProps = WithReportOrNotFoundProps & StackScreenProps; +type NotificationPreferencePageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function NotificationPreferencePage({report}: NotificationPreferencePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Report/ReportSettingsPage.tsx b/src/pages/settings/Report/ReportSettingsPage.tsx index 7c765d3d5ca8..a17588b3c3dd 100644 --- a/src/pages/settings/Report/ReportSettingsPage.tsx +++ b/src/pages/settings/Report/ReportSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; @@ -12,6 +11,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -22,7 +22,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ReportSettingsPageProps = WithReportOrNotFoundProps & StackScreenProps; +type ReportSettingsPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportSettingsPage({report, policies}: ReportSettingsPageProps) { const reportID = report?.reportID ?? ''; diff --git a/src/pages/settings/Report/RoomNamePage.tsx b/src/pages/settings/Report/RoomNamePage.tsx index 5ba85961e5ba..f3ae524cc154 100644 --- a/src/pages/settings/Report/RoomNamePage.tsx +++ b/src/pages/settings/Report/RoomNamePage.tsx @@ -1,5 +1,4 @@ import {useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -16,6 +15,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; @@ -37,7 +37,7 @@ type RoomNamePageOnyxProps = { policy: OnyxEntry; }; -type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & StackScreenProps; +type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; function RoomNamePage({report, policy, reports}: RoomNamePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Report/VisibilityPage.tsx b/src/pages/settings/Report/VisibilityPage.tsx index d3b8b2656d50..b53d10b5a5e1 100644 --- a/src/pages/settings/Report/VisibilityPage.tsx +++ b/src/pages/settings/Report/VisibilityPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo, useState} from 'react'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import ConfirmModal from '@components/ConfirmModal'; @@ -7,6 +6,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportSettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {WithReportOrNotFoundProps} from '@pages/home/report/withReportOrNotFound'; @@ -16,7 +16,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import type {RoomVisibility} from '@src/types/onyx/Report'; -type VisibilityProps = WithReportOrNotFoundProps & StackScreenProps; +type VisibilityProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function VisibilityPage({report}: VisibilityProps) { const [showConfirmModal, setShowConfirmModal] = useState(false); diff --git a/src/pages/settings/Report/WriteCapabilityPage.tsx b/src/pages/settings/Report/WriteCapabilityPage.tsx index 1f991ef87c9a..6b3dd77a94e8 100644 --- a/src/pages/settings/Report/WriteCapabilityPage.tsx +++ b/src/pages/settings/Report/WriteCapabilityPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -9,6 +8,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -27,7 +27,7 @@ type WriteCapabilityPageOnyxProps = { type WriteCapabilityPageProps = WriteCapabilityPageOnyxProps & WithReportOrNotFoundProps & - StackScreenProps; + PlatformStackScreenProps; function WriteCapabilityPage({report, policy}: WriteCapabilityPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Security/CloseAccountPage.tsx b/src/pages/settings/Security/CloseAccountPage.tsx index bcf65ecfe837..dc67f04303d5 100644 --- a/src/pages/settings/Security/CloseAccountPage.tsx +++ b/src/pages/settings/Security/CloseAccountPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import Str from 'expensify-common/lib/str'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; @@ -15,6 +14,7 @@ import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import * as CloseAccount from '@userActions/CloseAccount'; @@ -30,7 +30,7 @@ type CloseAccountPageOnyxProps = { session: OnyxEntry; }; -type CloseAccountPageProps = CloseAccountPageOnyxProps & StackScreenProps; +type CloseAccountPageProps = CloseAccountPageOnyxProps & PlatformStackScreenProps; function CloseAccountPage({session}: CloseAccountPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx index a031cf6363f4..791a3054f3d8 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -19,6 +18,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as CardSettings from '@userActions/Card'; @@ -34,7 +34,7 @@ type ActivatePhysicalCardPageOnyxProps = { cardList: OnyxEntry>; }; -type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & StackScreenProps; +type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & PlatformStackScreenProps; const LAST_FOUR_DIGITS_LENGTH = 4; const MAGIC_INPUT_MIN_HEIGHT = 86; diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx index 5f3dbb3fa6c3..5636358dfe6f 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx @@ -1,10 +1,10 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import AddressForm from '@components/AddressForm'; import useLocalize from '@hooks/useLocalize'; import * as FormActions from '@libs/actions/FormActions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -18,7 +18,7 @@ type GetPhysicalCardAddressOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & StackScreenProps; +type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & PlatformStackScreenProps; function GetPhysicalCardAddress({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx index c6b4bc2272d1..9fcca69a611d 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -8,6 +7,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -34,7 +34,7 @@ type GetPhysicalCardConfirmOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & StackScreenProps; +type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & PlatformStackScreenProps; function GetPhysicalCardConfirm({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx index 1667aa8d36d3..f9a62195f81f 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -6,6 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -26,7 +26,7 @@ type GetPhysicalCardNameOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & StackScreenProps; +type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & PlatformStackScreenProps; function GetPhysicalCardName({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx index f709de4b51c3..d2eeb0d59c61 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -6,6 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import * as LoginUtils from '@libs/LoginUtils'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -24,7 +24,7 @@ type GetPhysicalCardPhoneOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & StackScreenProps; +type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & PlatformStackScreenProps; function GetPhysicalCardPhone({ route: { diff --git a/src/pages/settings/Wallet/ExpensifyCardPage.tsx b/src/pages/settings/Wallet/ExpensifyCardPage.tsx index d96574063ac7..4dac01544b23 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage.tsx +++ b/src/pages/settings/Wallet/ExpensifyCardPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -20,6 +19,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as GetPhysicalCardUtils from '@libs/GetPhysicalCardUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -49,7 +49,7 @@ type ExpensifyCardPageOnyxProps = { loginList: OnyxEntry; }; -type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & StackScreenProps; +type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & PlatformStackScreenProps; function ExpensifyCardPage({ cardList, diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 0c5c0a5c9ff2..8b9aaf96278c 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import usePrevious from '@hooks/usePrevious'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; +import {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -61,7 +61,7 @@ type ReportCardLostPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportCardLostPageProps = ReportCardLostPageOnyxProps & StackScreenProps; +type ReportCardLostPageProps = ReportCardLostPageOnyxProps & PlatformStackScreenProps; function ReportCardLostPage({ privatePersonalDetails = { diff --git a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx index 7a6460029a8e..1b8eb22ac649 100644 --- a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx +++ b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -13,6 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -31,7 +31,7 @@ type ReportVirtualCardFraudPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & StackScreenProps; +type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & PlatformStackScreenProps; function ReportVirtualCardFraudPage({ route: { diff --git a/src/pages/tasks/NewTaskDescriptionPage.tsx b/src/pages/tasks/NewTaskDescriptionPage.tsx index e33241c52f4a..8bef635dec64 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.tsx +++ b/src/pages/tasks/NewTaskDescriptionPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import React from 'react'; import {View} from 'react-native'; @@ -15,6 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import * as TaskActions from '@userActions/Task'; @@ -30,7 +30,7 @@ type NewTaskDescriptionPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & StackScreenProps; +type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskDetailsPage.tsx b/src/pages/tasks/NewTaskDetailsPage.tsx index 9e857b22c5c4..8c31015d1164 100644 --- a/src/pages/tasks/NewTaskDetailsPage.tsx +++ b/src/pages/tasks/NewTaskDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; @@ -15,6 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as TaskActions from '@userActions/Task'; import CONST from '@src/CONST'; @@ -29,7 +29,7 @@ type NewTaskDetailsPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & StackScreenProps; +type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index 44cb485c0b06..f0f12d4776c8 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -36,7 +36,7 @@ type NewTaskPageOnyxProps = { reports: OnyxCollection; }; -type NewTaskPageProps = NewTaskPageOnyxProps & StackScreenProps; +type NewTaskPageProps = NewTaskPageOnyxProps & PlatformStackScreenProps; function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/tasks/NewTaskTitlePage.tsx b/src/pages/tasks/NewTaskTitlePage.tsx index 582d2a5c6500..f71f20257fff 100644 --- a/src/pages/tasks/NewTaskTitlePage.tsx +++ b/src/pages/tasks/NewTaskTitlePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as TaskActions from '@userActions/Task'; import CONST from '@src/CONST'; @@ -27,7 +27,7 @@ type NewTaskTitlePageOnyxProps = { /** Task Creation Data */ task: OnyxEntry; }; -type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & StackScreenProps; +type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & PlatformStackScreenProps; function NewTaskTitlePage({task}: NewTaskTitlePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/wallet/WalletStatementPage.tsx b/src/pages/wallet/WalletStatementPage.tsx index ac1b6d428d52..915df16305fd 100644 --- a/src/pages/wallet/WalletStatementPage.tsx +++ b/src/pages/wallet/WalletStatementPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import {format, getMonth, getYear} from 'date-fns'; import Str from 'expensify-common/lib/str'; import React, {useEffect} from 'react'; @@ -15,6 +14,7 @@ import DateUtils from '@libs/DateUtils'; import fileDownload from '@libs/fileDownload'; import Growl from '@libs/Growl'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WalletStatementNavigatorParamList} from '@navigation/types'; import * as User from '@userActions/User'; import CONFIG from '@src/CONFIG'; @@ -27,7 +27,7 @@ type WalletStatementOnyxProps = { walletStatement: OnyxEntry; }; -type WalletStatementPageProps = WalletStatementOnyxProps & StackScreenProps; +type WalletStatementPageProps = WalletStatementOnyxProps & PlatformStackScreenProps; function WalletStatementPage({walletStatement, route}: WalletStatementPageProps) { const themePreference = useThemePreference(); diff --git a/src/pages/workspace/WorkspaceAvatar.tsx b/src/pages/workspace/WorkspaceAvatar.tsx index 9ab9d0af25d5..fff2b9c19ddb 100644 --- a/src/pages/workspace/WorkspaceAvatar.tsx +++ b/src/pages/workspace/WorkspaceAvatar.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -16,7 +16,7 @@ type WorkspaceAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & StackScreenProps; +type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & PlatformStackScreenProps; function WorkspaceAvatar({policy, isLoadingApp = true}: WorkspaceAvatarProps) { const avatarURL = policy?.avatar ?? '' ? policy?.avatar ?? '' : ReportUtils.getDefaultWorkspaceAvatar(policy?.name ?? ''); diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index c066319cd31e..94fd7363ebaa 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -1,5 +1,4 @@ import {useNavigationState} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -21,6 +20,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import getTopmostWorkspacesCentralPaneName from '@libs/Navigation/getTopmostWorkspacesCentralPaneName'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import {getDefaultWorkspaceAvatar} from '@libs/ReportUtils'; import type {FullScreenNavigatorParamList} from '@navigation/types'; @@ -54,7 +54,9 @@ type WorkspaceInitialPageOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceInitialPageProps = WithPolicyAndFullscreenLoadingProps & WorkspaceInitialPageOnyxProps & StackScreenProps; +type WorkspaceInitialPageProps = WithPolicyAndFullscreenLoadingProps & + WorkspaceInitialPageOnyxProps & + PlatformStackScreenProps; function dismissError(policyID: string) { PolicyUtils.goBackFromInvalidPolicy(); diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.tsx b/src/pages/workspace/WorkspaceInviteMessagePage.tsx index dd2ab151b658..c8e49f26bbc7 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx +++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import lodashDebounce from 'lodash/debounce'; import React, {useEffect, useMemo, useState} from 'react'; @@ -23,6 +22,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -54,7 +54,7 @@ type WorkspaceInviteMessagePageOnyxProps = { type WorkspaceInviteMessagePageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceInviteMessagePageOnyxProps & - StackScreenProps; + PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index 0310104590e5..dd513b621e47 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import type {SectionListData} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -19,6 +18,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {MemberForList} from '@libs/OptionsListUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -50,7 +50,7 @@ type WorkspaceInvitePageOnyxProps = { type WorkspaceInvitePageProps = WithPolicyAndFullscreenLoadingProps & WithNavigationTransitionEndProps & WorkspaceInvitePageOnyxProps & - StackScreenProps; + PlatformStackScreenProps; function WorkspaceInvitePage({route, betas, invitedEmailsToAccountIDsDraft, policy, isLoadingReportData = true}: WorkspaceInvitePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/WorkspaceJoinUserPage.tsx b/src/pages/workspace/WorkspaceJoinUserPage.tsx index 7cc8e63da2ee..9e62a8d66071 100644 --- a/src/pages/workspace/WorkspaceJoinUserPage.tsx +++ b/src/pages/workspace/WorkspaceJoinUserPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect, useRef} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -6,6 +5,7 @@ import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import navigateAfterJoinRequest from '@libs/navigateAfterJoinRequest'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; import * as PolicyAction from '@userActions/Policy'; @@ -20,7 +20,7 @@ type WorkspaceJoinUserPageOnyxProps = { policy: OnyxEntry; }; -type WorkspaceJoinUserPageRoute = {route: StackScreenProps['route']}; +type WorkspaceJoinUserPageRoute = {route: PlatformStackScreenProps['route']}; type WorkspaceJoinUserPageProps = WorkspaceJoinUserPageRoute & WorkspaceJoinUserPageOnyxProps; let isJoinLinkUsed = false; diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index 9c5631eff0aa..ffdd60fd6900 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -1,5 +1,4 @@ import {useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import lodashIsEqual from 'lodash/isEqual'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import type {TextInput} from 'react-native'; @@ -29,6 +28,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -56,7 +56,7 @@ type WorkspaceMembersPageOnyxProps = { type WorkspaceMembersPageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceMembersPageOnyxProps & - StackScreenProps; + PlatformStackScreenProps; /** * Inverts an object, equivalent of _.invert */ diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index f37921f07c36..fa8f0ae001bd 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -12,6 +11,7 @@ import useNetwork from '@hooks/useNetwork'; import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as Policy from '@userActions/Policy'; import type {TranslationPaths} from '@src/languages/types'; @@ -24,7 +24,7 @@ import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscree import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; import ToggleSettingOptionRow from './workflows/ToggleSettingsOptionRow'; -type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; type Item = { icon: IconAsset; diff --git a/src/pages/workspace/bills/WorkspaceBillsPage.tsx b/src/pages/workspace/bills/WorkspaceBillsPage.tsx index e2dbe398b49f..702f85152680 100644 --- a/src/pages/workspace/bills/WorkspaceBillsPage.tsx +++ b/src/pages/workspace/bills/WorkspaceBillsPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceBillsNoVBAView from './WorkspaceBillsNoVBAView'; import WorkspaceBillsVBAView from './WorkspaceBillsVBAView'; -type WorkspaceBillsPageProps = StackScreenProps; +type WorkspaceBillsPageProps = PlatformStackScreenProps; function WorkspaceBillsPage({route}: WorkspaceBillsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/card/WorkspaceCardPage.tsx b/src/pages/workspace/card/WorkspaceCardPage.tsx index 079c715bffd6..99f195a9d54b 100644 --- a/src/pages/workspace/card/WorkspaceCardPage.tsx +++ b/src/pages/workspace/card/WorkspaceCardPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -12,7 +12,7 @@ import WorkspaceCardNoVBAView from './WorkspaceCardNoVBAView'; import WorkspaceCardVBANoECardView from './WorkspaceCardVBANoECardView'; import WorkspaceCardVBAWithECardView from './WorkspaceCardVBAWithECardView'; -type WorkspaceCardPageProps = StackScreenProps; +type WorkspaceCardPageProps = PlatformStackScreenProps; function WorkspaceCardPage({route}: WorkspaceCardPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/categories/CategorySettingsPage.tsx b/src/pages/workspace/categories/CategorySettingsPage.tsx index 6e35c4e2d040..7a856f98332f 100644 --- a/src/pages/workspace/categories/CategorySettingsPage.tsx +++ b/src/pages/workspace/categories/CategorySettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -17,6 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceCategoryEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type CategorySettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type CategorySettingsPageProps = CategorySettingsPageOnyxProps & StackScreenProps; +type CategorySettingsPageProps = CategorySettingsPageOnyxProps & PlatformStackScreenProps; function CategorySettingsPage({route, policyCategories}: CategorySettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/CreateCategoryPage.tsx b/src/pages/workspace/categories/CreateCategoryPage.tsx index b31207e73208..9cb8f19cce13 100644 --- a/src/pages/workspace/categories/CreateCategoryPage.tsx +++ b/src/pages/workspace/categories/CreateCategoryPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -8,6 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -24,7 +24,7 @@ type WorkspaceCreateCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & StackScreenProps; +type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & PlatformStackScreenProps; function CreateCategoryPage({route, policyCategories}: CreateCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/EditCategoryPage.tsx b/src/pages/workspace/categories/EditCategoryPage.tsx index dbf7c8913515..2eeeea507065 100644 --- a/src/pages/workspace/categories/EditCategoryPage.tsx +++ b/src/pages/workspace/categories/EditCategoryPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -8,6 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ type WorkspaceEditCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & StackScreenProps; +type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & PlatformStackScreenProps; function EditCategoryPage({route, policyCategories}: EditCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 80394623dba8..94dc48be7498 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect, useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {ActivityIndicator, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -27,6 +26,7 @@ import {deleteWorkspaceCategories, setWorkspaceCategoryEnabled} from '@libs/acti import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -53,7 +53,7 @@ type WorkspaceCategoriesOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceCategoriesPageProps = WorkspaceCategoriesOnyxProps & StackScreenProps; +type WorkspaceCategoriesPageProps = WorkspaceCategoriesOnyxProps & PlatformStackScreenProps; function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCategoriesPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx index 0ebfcde6f97b..d59150500113 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -11,6 +10,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceRequiresCategory} from '@libs/actions/Policy'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -26,7 +26,7 @@ type WorkspaceCategoriesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & StackScreenProps; +type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & PlatformStackScreenProps; function WorkspaceCategoriesSettingsPage({route, policyCategories}: WorkspaceCategoriesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx index 1d01856992f9..3e7004f21e02 100644 --- a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx +++ b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; @@ -11,6 +10,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {getOptimisticRateName, validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -29,7 +29,7 @@ type CreateDistanceRatePageOnyxProps = { policy: OnyxEntry; }; -type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & StackScreenProps; +type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & PlatformStackScreenProps; function CreateDistanceRatePage({policy, route}: CreateDistanceRatePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx index a1716405da8b..6a10a6dc1039 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -17,6 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type PolicyDistanceRateDetailsPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & StackScreenProps; +type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRateDetailsPage({policy, route}: PolicyDistanceRateDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx index f44175f09e3f..22dd4e01af25 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -13,6 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type PolicyDistanceRateEditPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & StackScreenProps; +type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index ea35526bcdfa..54aa72d7814f 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect, useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {ActivityIndicator, View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -24,6 +23,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -44,7 +44,7 @@ type PolicyDistanceRatesPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & StackScreenProps; +type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRatesPage({policy, route}: PolicyDistanceRatesPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx index 0cf5c133e37f..9183b0860851 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -11,6 +10,7 @@ import type {UnitItemType} from '@components/UnitPicker'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -33,7 +33,7 @@ type PolicyDistanceRatesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & StackScreenProps; +type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRatesSettingsPage({policy, policyCategories, route}: PolicyDistanceRatesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index a00c4959cedb..71abf7ea7132 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView'; import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; -type WorkspaceInvoicesPageProps = StackScreenProps; +type WorkspaceInvoicesPageProps = PlatformStackScreenProps; function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index 32b43a230619..26fbdc5e59c7 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -18,6 +17,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -40,7 +40,7 @@ type WorkspacePolicyOnyxProps = { type WorkspaceMemberDetailsPageProps = Omit & WorkspacePolicyOnyxProps & - StackScreenProps; + PlatformStackScreenProps; function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceMemberDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx index 81c43f6ab818..5ac44bdcff7c 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import Button from '@components/Button'; @@ -11,6 +10,7 @@ import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = StackScreenProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; function WorkspaceOwnerChangeErrorPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx index 856a852037b4..935b2492a61a 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import ConfirmationPage from '@components/ConfirmationPage'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -6,6 +5,7 @@ import LottieAnimations from '@components/LottieAnimations'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -14,7 +14,7 @@ import * as PolicyActions from '@userActions/Policy'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = StackScreenProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; function WorkspaceOwnerChangeSuccessPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx index 9f9540327c53..7c34b82c3a95 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {View} from 'react-native'; import type {ValueOf} from 'type-fest'; @@ -7,6 +6,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceOwnerChangeCheck from './WorkspaceOwnerChangeCheck'; import WorkspaceOwnerPaymentCardForm from './WorkspaceOwnerPaymentCardForm'; -type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & StackScreenProps; +type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & PlatformStackScreenProps; function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWrapperPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx index 8fef5f4dc6f9..38f066876d8e 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {Keyboard, View} from 'react-native'; import FormProvider from '@components/Form/FormProvider'; @@ -12,6 +11,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import getPermittedDecimalSeparator from '@libs/getPermittedDecimalSeparator'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {Unit} from '@src/types/onyx/Policy'; -type WorkspaceRateAndUnitPageProps = WithPolicyProps & StackScreenProps; +type WorkspaceRateAndUnitPageProps = WithPolicyProps & PlatformStackScreenProps; type ValidationError = {rate?: TranslationPaths | undefined}; diff --git a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx index 222ece12d29d..084141ab368a 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx @@ -1,6 +1,6 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import useLocalize from '@hooks/useLocalize'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import withPolicy from '@pages/workspace/withPolicy'; @@ -9,7 +9,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import WorkspaceReimburseView from './WorkspaceReimburseView'; -type WorkspaceReimbursePageProps = WithPolicyProps & StackScreenProps; +type WorkspaceReimbursePageProps = WithPolicyProps & PlatformStackScreenProps; function WorkspaceReimbursePage({route, policy}: WorkspaceReimbursePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/tags/EditTagPage.tsx b/src/pages/workspace/tags/EditTagPage.tsx index fbde96eb2b91..26bf181dfb1c 100644 --- a/src/pages/workspace/tags/EditTagPage.tsx +++ b/src/pages/workspace/tags/EditTagPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -13,6 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -31,7 +31,7 @@ type EditTagPageOnyxProps = { policyTags: OnyxEntry; }; -type EditTagPageProps = EditTagPageOnyxProps & StackScreenProps; +type EditTagPageProps = EditTagPageOnyxProps & PlatformStackScreenProps; function EditTagPage({route, policyTags}: EditTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/TagSettingsPage.tsx b/src/pages/workspace/tags/TagSettingsPage.tsx index a643797eac1e..b2da751e6a75 100644 --- a/src/pages/workspace/tags/TagSettingsPage.tsx +++ b/src/pages/workspace/tags/TagSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -17,6 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceTagEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -35,7 +35,7 @@ type TagSettingsPageOnyxProps = { policyTags: OnyxEntry; }; -type TagSettingsPageProps = TagSettingsPageOnyxProps & StackScreenProps; +type TagSettingsPageProps = TagSettingsPageOnyxProps & PlatformStackScreenProps; function TagSettingsPage({route, policyTags}: TagSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx index 346d56891dd5..3c8d2e795397 100644 --- a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx +++ b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -32,7 +32,7 @@ type WorkspaceCreateTagPageOnyxProps = { policyTags: OnyxEntry; }; -type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & StackScreenProps; +type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & PlatformStackScreenProps; function CreateTagPage({route, policyTags}: CreateTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx index 0072d37ef631..ac39c781d587 100644 --- a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -14,6 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type WorkspaceEditTagsPageOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & StackScreenProps; +type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & PlatformStackScreenProps; const validateTagName = (values: FormOnyxValues) => { const errors: FormInputErrors = {}; diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index a46e32d5371e..a1fb67db067c 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect, useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import lodashSortBy from 'lodash/sortBy'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {ActivityIndicator, View} from 'react-native'; @@ -27,6 +26,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -60,7 +60,7 @@ type WorkspaceTagsOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & StackScreenProps; +type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & PlatformStackScreenProps; function WorkspaceTagsPage({policyTags, route}: WorkspaceTagsPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx index b421698b8f2f..6cfe9d2ef049 100644 --- a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -13,6 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -28,7 +28,7 @@ type WorkspaceTagsSettingsPageOnyxProps = { /** Collection of tags attached to a policy */ policyTags: OnyxEntry; }; -type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & StackScreenProps; +type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & PlatformStackScreenProps; function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index 5c77295a9664..a484e26b6ca4 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import React, {useCallback, useState} from 'react'; import {View} from 'react-native'; @@ -13,6 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {renamePolicyTax, validateTaxName} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxNameForm'; -type NamePageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type NamePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index c062b6a13f62..168cd23a53d7 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import AmountForm from '@components/AmountForm'; import FormProvider from '@components/Form/FormProvider'; @@ -12,6 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {updatePolicyTaxValue, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -26,7 +26,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxValueForm'; -type ValuePageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type ValuePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function ValuePage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index e76e57768963..c84cd9adb8b2 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import AmountPicker from '@components/AmountPicker'; @@ -13,6 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {createPolicyTax, getNextTaxCode, getTaxValueWithPercentage, validateTaxName, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceNewTaxForm'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceCreateTaxPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx index ec04b77df3ca..ae5c6c838669 100644 --- a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo, useState} from 'react'; import {View} from 'react-native'; import ConfirmModal from '@components/ConfirmModal'; @@ -16,6 +15,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {clearTaxRateFieldError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs/actions/TaxRate'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -28,7 +28,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceEditTaxPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index a61c8ae72734..3c763f3c154d 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect, useIsFocused} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {ActivityIndicator, View} from 'react-native'; import Button from '@components/Button'; @@ -25,6 +24,7 @@ import {clearTaxRateError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -37,7 +37,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceTaxesPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx index e9e359d9d059..ab15e94add6a 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import FormProvider from '@components/Form/FormProvider'; @@ -12,6 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setPolicyCustomTaxName} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -26,7 +26,8 @@ import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxCustomName'; import type {WorkspaceTaxCustomName} from '@src/types/form/WorkspaceTaxCustomName'; -type WorkspaceTaxesSettingsCustomTaxNameProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceTaxesSettingsCustomTaxNameProps = WithPolicyAndFullscreenLoadingProps & + PlatformStackScreenProps; function WorkspaceTaxesSettingsCustomTaxName({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx index 3081df55fe69..0670c5682cb6 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -8,6 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setForeignCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsForeignCurrencyProps = WithPolicyAndFullscreenLoadingProps & - StackScreenProps; + PlatformStackScreenProps; function WorkspaceTaxesSettingsForeignCurrency({ route: { params: {policyID}, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx index 8fbfa7b79292..ebc32b2f47f2 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -9,6 +8,7 @@ import ScrollView from '@components/ScrollView'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -19,7 +19,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & StackScreenProps; +type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceTaxesSettingsPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx index 630560f864b4..5e9b27ca7a53 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -8,6 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsWorkspaceCurrencyProps = WithPolicyAndFullscreenLoadingProps & - StackScreenProps; + PlatformStackScreenProps; function WorkspaceTaxesSettingsWorkspaceCurrency({ route: { diff --git a/src/pages/workspace/travel/WorkspaceTravelPage.tsx b/src/pages/workspace/travel/WorkspaceTravelPage.tsx index c03bcc7cfb9b..72bfb6cb924f 100644 --- a/src/pages/workspace/travel/WorkspaceTravelPage.tsx +++ b/src/pages/workspace/travel/WorkspaceTravelPage.tsx @@ -1,9 +1,9 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceTravelNoVBAView from './WorkspaceTravelNoVBAView'; import WorkspaceTravelVBAView from './WorkspaceTravelVBAView'; -type WorkspaceTravelPageProps = StackScreenProps; +type WorkspaceTravelPageProps = PlatformStackScreenProps; function WorkspaceTravelPage({route}: WorkspaceTravelPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx index 5d2297f47ddd..d80cf676953a 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useState} from 'react'; import {FlatList} from 'react-native-gesture-handler'; import type {ValueOf} from 'type-fest'; @@ -13,6 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as Localize from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -27,7 +27,8 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; type AutoReportingFrequencyKey = Exclude, 'instant'>; type Locale = ValueOf; -type WorkspaceAutoReportingFrequencyPageProps = WithPolicyOnyxProps & StackScreenProps; +type WorkspaceAutoReportingFrequencyPageProps = WithPolicyOnyxProps & + PlatformStackScreenProps; type WorkspaceAutoReportingFrequencyPageItem = { text: string; diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx index 0b44d6c565d1..26dfa84520f4 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useState} from 'react'; import type {ValueOf} from 'type-fest'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; @@ -8,6 +7,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -21,7 +21,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; const DAYS_OF_MONTH = 28; type WorkspaceAutoReportingMonthlyOffsetProps = WithPolicyOnyxProps & - StackScreenProps; + PlatformStackScreenProps; type AutoReportingOffsetKeys = ValueOf; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx index d32218616662..4637ed01727b 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo, useState} from 'react'; import type {SectionListData} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -16,6 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -37,7 +37,7 @@ type WorkspaceWorkflowsApproverPageOnyxProps = { type WorkspaceWorkflowsApproverPageProps = WorkspaceWorkflowsApproverPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - StackScreenProps; + PlatformStackScreenProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index 35412d768bcc..0efa55022cfe 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect} from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo, useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -16,6 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Permissions from '@libs/Permissions'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -40,7 +40,7 @@ type WorkspaceWorkflowsPageOnyxProps = { /** Beta features list */ betas: OnyxEntry; }; -type WorkspaceWorkflowsPageProps = WithPolicyProps & WorkspaceWorkflowsPageOnyxProps & StackScreenProps; +type WorkspaceWorkflowsPageProps = WithPolicyProps & WorkspaceWorkflowsPageOnyxProps & PlatformStackScreenProps; function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPageProps) { const {translate, preferredLocale} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx index da51b2c3e8e3..e16f9d4ea841 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React, {useCallback, useMemo, useState} from 'react'; import type {SectionListData} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; @@ -16,6 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -38,7 +38,7 @@ type WorkspaceWorkflowsPayerPageOnyxProps = { type WorkspaceWorkflowsPayerPageProps = WorkspaceWorkflowsPayerPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - StackScreenProps; + PlatformStackScreenProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/tests/perf-test/ReportScreen.perf-test.tsx b/tests/perf-test/ReportScreen.perf-test.tsx index c89b7fe54b5f..8dd728899e6f 100644 --- a/tests/perf-test/ReportScreen.perf-test.tsx +++ b/tests/perf-test/ReportScreen.perf-test.tsx @@ -1,4 +1,3 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import {fireEvent, screen, waitFor} from '@testing-library/react-native'; import type {ComponentType} from 'react'; import React from 'react'; @@ -7,6 +6,7 @@ import type Animated from 'react-native-reanimated'; import {measurePerformance} from 'reassure'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import ComposeProviders from '@src/components/ComposeProviders'; import DragAndDropProvider from '@src/components/DragAndDrop/Provider'; @@ -34,7 +34,7 @@ import * as TestHelper from '../utils/TestHelper'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -type ReportScreenWrapperProps = StackScreenProps; +type ReportScreenWrapperProps = PlatformStackScreenProps; jest.mock('react-native-reanimated', () => { const actualNav = jest.requireActual('react-native-reanimated/mock'); diff --git a/tests/perf-test/SearchPage.perf-test.tsx b/tests/perf-test/SearchPage.perf-test.tsx index 33ee900f8b6c..e0655b7e1ddb 100644 --- a/tests/perf-test/SearchPage.perf-test.tsx +++ b/tests/perf-test/SearchPage.perf-test.tsx @@ -1,5 +1,4 @@ import type * as NativeNavigation from '@react-navigation/native'; -import type {StackScreenProps} from '@react-navigation/stack'; import {fireEvent, screen, waitFor} from '@testing-library/react-native'; import type {TextMatch} from '@testing-library/react-native/build/matches'; import React, {useMemo} from 'react'; @@ -11,6 +10,7 @@ import {LocaleContextProvider} from '@components/LocaleContextProvider'; import OptionListContextProvider, {OptionsListContext} from '@components/OptionListContextProvider'; import {KeyboardStateProvider} from '@components/withKeyboardState'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import {createOptionList} from '@libs/OptionsListUtils'; import SearchPage from '@pages/SearchPage'; @@ -126,7 +126,7 @@ afterEach(() => { PusherHelper.teardown(); }); -type SearchPageProps = StackScreenProps & { +type SearchPageProps = PlatformStackScreenProps & { betas: OnyxEntry; reports: OnyxCollection; isSearchingForReports: OnyxEntry; From c5b5775f7bd22e49a860b75b2c85765bcec21e3d Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 12:29:16 +0200 Subject: [PATCH 029/589] fix: lint errors --- .../settings/Profile/Contacts/ContactMethodDetailsPage.tsx | 1 - src/pages/settings/Wallet/ReportCardLostPage.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index 89574a39e68e..58780d63f5d4 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -1,4 +1,3 @@ -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Str from 'expensify-common/lib/str'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {InteractionManager, Keyboard, View} from 'react-native'; diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 8b9aaf96278c..585518fd59f2 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -13,7 +13,7 @@ import usePrevious from '@hooks/usePrevious'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; -import {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; From 23b70c22f490d09319354284a1a10d451cb380af Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 13:09:19 +0200 Subject: [PATCH 030/589] fix: pass generic parameter --- patches/@react-navigation+core+6.4.11.patch | 40 ------------------- .../index.native.tsx | 2 +- .../createPlatformStackNavigator/index.tsx | 2 +- 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 patches/@react-navigation+core+6.4.11.patch diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch deleted file mode 100644 index 6ba3f2727f40..000000000000 --- a/patches/@react-navigation+core+6.4.11.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts -index fcd456b..13e005e 100644 ---- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts -+++ b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts -@@ -307,10 +307,11 @@ export type Descriptor = Partial<{ - [EventName in keyof (EventMap & EventMapCore)]: EventListenerCallback; - }>; --type ScreenComponentType = React.ComponentType<{ -+type ScreenComponentType = Record> = React.ComponentType<{ - route: RouteProp; - navigation: any; --}> | React.ComponentType<{}>; -+} & CustomProps> | React.ComponentType; - export type RouteConfigComponent = { - /** - * React component to render for this screen. -diff --git a/node_modules/@react-navigation/core/src/types.tsx b/node_modules/@react-navigation/core/src/types.tsx -index b691d75..8435eed 100644 ---- a/node_modules/@react-navigation/core/src/types.tsx -+++ b/node_modules/@react-navigation/core/src/types.tsx -@@ -442,13 +442,14 @@ export type ScreenListeners< - - type ScreenComponentType< - ParamList extends ParamListBase, -- RouteName extends keyof ParamList -+ RouteName extends keyof ParamList, -+ CustomProps extends Record = Record - > = - | React.ComponentType<{ - route: RouteProp; - navigation: any; -- }> -- | React.ComponentType<{}>; -+ } & CustomProps> -+ | React.ComponentType; - - export type RouteConfigComponent< - ParamList extends ParamListBase, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 613eb9d9315d..a9cc5fb11d41 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -64,7 +64,7 @@ function createPlatformStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, - )(); + )(); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 8bfe6425c5a8..a3674340dfd0 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -43,7 +43,7 @@ function createPlatformStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, - )(); + )(); } export default createPlatformStackNavigator; From a47a39818745877fa287b09c658661461d56e455 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 13:11:27 +0200 Subject: [PATCH 031/589] replace remaining stack navigators --- .../WorkspaceSettingsModalStackNavigator.tsx | 36 +++++++++---------- .../Navigators/OnboardingModalNavigator.tsx | 4 +-- .../Navigators/WelcomeVideoModalNavigator.tsx | 4 +-- .../OnboardingModalNavigatorScreenOptions.ts | 4 +-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/WorkspaceSettingsModalStackNavigator.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/WorkspaceSettingsModalStackNavigator.tsx index 172b62239131..5ab7d00adbc3 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/WorkspaceSettingsModalStackNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/WorkspaceSettingsModalStackNavigator.tsx @@ -1,88 +1,88 @@ -import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import SCREENS from '@src/SCREENS'; import useModalScreenOptions from './useModalScreenOptions'; -const StackNavigator = createStackNavigator(); +const Stack = createPlatformStackNavigator(); function WorkspaceSettingsModalStackNavigator() { const screenOptions = useModalScreenOptions((styles) => ({cardStyle: styles.navigationScreenCardStyle, headerShown: false})); return ( - - + require('@pages/workspace/WorkspaceProfilePage').default as React.ComponentType} /> - require('@pages/workspace/card/WorkspaceCardPage').default as React.ComponentType} /> - require('@pages/workspace/workflows/WorkspaceWorkflowsPage').default as React.ComponentType} /> - require('@pages/workspace/reimburse/WorkspaceReimbursePage').default as React.ComponentType} /> - require('@pages/workspace/bills/WorkspaceBillsPage').default as React.ComponentType} /> - require('@pages/workspace/invoices/WorkspaceInvoicesPage').default as React.ComponentType} /> - require('@pages/workspace/travel/WorkspaceTravelPage').default as React.ComponentType} /> - require('@pages/workspace/WorkspaceMembersPage').default as React.ComponentType} /> - require('@pages/workspace/accounting/PolicyAccountingPage').default as React.ComponentType} /> - require('@pages/workspace/categories/WorkspaceCategoriesPage').default as React.ComponentType} /> - require('@pages/workspace/WorkspaceMoreFeaturesPage').default as React.ComponentType} /> - require('@pages/workspace/tags/WorkspaceTagsPage').default as React.ComponentType} /> - require('@pages/workspace/taxes/WorkspaceTaxesPage').default as React.ComponentType} /> - require('@pages/workspace/distanceRates/PolicyDistanceRatesPage').default as React.ComponentType} /> - + ); } diff --git a/src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx index 6f4fbb08403b..25faf6acfd8f 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/OnboardingModalNavigator.tsx @@ -1,17 +1,17 @@ -import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; import useOnboardingLayout from '@hooks/useOnboardingLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import OnboardingModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {OnboardingModalNavigatorParamList} from '@libs/Navigation/types'; import OnboardingPersonalDetails from '@pages/OnboardingPersonalDetails'; import OnboardingPurpose from '@pages/OnboardingPurpose'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -const Stack = createStackNavigator(); +const Stack = createPlatformStackNavigator(); function OnboardingModalNavigator() { const styles = useThemeStyles(); diff --git a/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx index c788af3f8d2b..512597904076 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx @@ -1,12 +1,12 @@ -import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import NoDropZone from '@components/DragAndDrop/NoDropZone'; import OnboardingWelcomeVideo from '@components/OnboardingWelcomeVideo'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; import type {WelcomeVideoModalNavigatorParamList} from '@libs/Navigation/types'; import SCREENS from '@src/SCREENS'; -const Stack = createStackNavigator(); +const Stack = createPlatformStackNavigator(); function WelcomeVideoModalNavigator() { return ( diff --git a/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts index d4607a809f17..d15bc5b5a552 100644 --- a/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts @@ -1,11 +1,11 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; import {CardStyleInterpolators} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; /** * Modal stack navigator screen options generator function * @returns The screen options object */ -const OnboardingModalNavigatorScreenOptions = (): StackNavigationOptions => ({ +const OnboardingModalNavigatorScreenOptions = (): PlatformStackNavigationOptions => ({ headerShown: false, animationEnabled: true, gestureDirection: 'horizontal', From 289ba71639108033e9066c6449ce1fb9c793a20e Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 14:05:11 +0200 Subject: [PATCH 032/589] restructure styles --- .../defaultScreenOptions/index.ts | 4 +- .../getRightModalNavigatorOptions/index.ts | 4 +- .../getRootNavigatorScreenOptions.ts | 29 ++++++------ .../leftModalNavigatorOptions/index.native.ts | 4 +- .../leftModalNavigatorOptions/index.ts | 7 +-- .../index.native.tsx | 44 ++----------------- .../createPlatformStackNavigator/index.tsx | 24 ++-------- .../native/slideFromLeft/index.android.ts | 2 +- .../native/slideFromLeft/index.ts | 2 +- .../native/slideFromRight/index.android.ts | 2 +- .../native/slideFromRight/index.ts | 2 +- .../animationOptions/web/slideFromLeft.ts | 5 +++ .../animationOptions/web/slideFromRight.ts | 5 +++ .../animationOptions/withAnimation.ts | 29 ++++++++++++ .../platformOptions/utils.ts | 7 +++ .../platformOptions/withNativeOptions.ts | 19 ++++++++ .../platformOptions/withWebOptions.ts | 19 ++++++++ 17 files changed, 120 insertions(+), 88 deletions(-) rename src/libs/Navigation/PlatformStackNavigation/{animation => platformOptions/animationOptions}/native/slideFromLeft/index.android.ts (81%) rename src/libs/Navigation/PlatformStackNavigation/{animation => platformOptions/animationOptions}/native/slideFromLeft/index.ts (80%) rename src/libs/Navigation/PlatformStackNavigation/{animation => platformOptions/animationOptions}/native/slideFromRight/index.android.ts (72%) rename src/libs/Navigation/PlatformStackNavigation/{animation => platformOptions/animationOptions}/native/slideFromRight/index.ts (80%) create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromLeft.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromRight.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts index 4015c43c679e..3104264263a6 100644 --- a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts @@ -1,6 +1,6 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -const defaultScreenOptions: StackNavigationOptions = { +const defaultScreenOptions: PlatformStackNavigationOptions = { cardStyle: { overflow: 'visible', flex: 1, diff --git a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts index 935c0041b794..0eb2bc534e80 100644 --- a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts @@ -1,8 +1,8 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; // eslint-disable-next-line no-restricted-imports import getNavigationModalCardStyle from '@styles/utils/getNavigationModalCardStyles'; -const rightModalNavigatorOptions = (isSmallScreenWidth: boolean): StackNavigationOptions => ({ +const rightModalNavigatorOptions = (isSmallScreenWidth: boolean): PlatformStackNavigationOptions => ({ presentation: 'transparentModal', // We want pop in RHP since there are some flows that would work weird otherwise diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 3df1e79e3678..4e43d060ec6b 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -1,5 +1,6 @@ -import type {StackCardInterpolationProps, StackNavigationOptions} from '@react-navigation/stack'; +import type {StackCardInterpolationProps} from '@react-navigation/stack'; import type {ViewStyle} from 'react-native'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ThemeStyles} from '@styles/index'; import type {StyleUtilsType} from '@styles/utils'; import variables from '@styles/variables'; @@ -9,24 +10,21 @@ import getRightModalNavigatorOptions from './getRightModalNavigatorOptions'; import hideKeyboardOnSwipe from './hideKeyboardOnSwipe'; import leftModalNavigatorOptions from './leftModalNavigatorOptions'; -type GetOnboardingModalNavigatorOptions = (shouldUseNarrowLayout: boolean) => StackNavigationOptions; +type GetOnboardingModalNavigatorOptions = (shouldUseNarrowLayout: boolean) => PlatformStackNavigationOptions; type ScreenOptions = { - rightModalNavigator: StackNavigationOptions; + rightModalNavigator: PlatformStackNavigationOptions; onboardingModalNavigator: GetOnboardingModalNavigatorOptions; - leftModalNavigator: StackNavigationOptions; - homeScreen: StackNavigationOptions; - fullScreen: StackNavigationOptions; - centralPaneNavigator: StackNavigationOptions; - bottomTab: StackNavigationOptions; + leftModalNavigator: PlatformStackNavigationOptions; + homeScreen: PlatformStackNavigationOptions; + fullScreen: PlatformStackNavigationOptions; + centralPaneNavigator: PlatformStackNavigationOptions; + bottomTab: PlatformStackNavigationOptions; }; -const commonScreenOptions: StackNavigationOptions = { +const commonScreenOptions: PlatformStackNavigationOptions = { headerShown: false, - gestureDirection: 'horizontal', - animationEnabled: true, cardOverlayEnabled: true, - animationTypeForReplace: 'push', }; type GetRootNavigatorScreenOptions = (isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType) => ScreenOptions; @@ -40,7 +38,6 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...getRightModalNavigatorOptions(isSmallScreenWidth), ...hideKeyboardOnSwipe, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), - ...hideKeyboardOnSwipe, }, onboardingModalNavigator: (shouldUseNarrowLayout: boolean) => ({ cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, shouldUseNarrowLayout, props), @@ -76,8 +73,8 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr }, }, homeScreen: { - title: CONFIG.SITE_TITLE, ...commonScreenOptions, + title: CONFIG.SITE_TITLE, // Note: The card* properties won't be applied on mobile platforms, as they use the native defaults. cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), cardStyle: { @@ -103,11 +100,11 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr }, centralPaneNavigator: { - title: CONFIG.SITE_TITLE, ...commonScreenOptions, + ...hideKeyboardOnSwipe, + title: CONFIG.SITE_TITLE, animationEnabled: isSmallScreenWidth, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), - ...hideKeyboardOnSwipe, cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), paddingRight: isSmallScreenWidth ? 0 : variables.sideBarWidth, diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts index a6710efdf4bb..4d8219a32301 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts @@ -1,4 +1,6 @@ -const leftModalNavigatorOptions = { +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; + +const leftModalNavigatorOptions: PlatformStackNavigationOptions = { animation: 'slide_from_left', customAnimationOnGesture: true, }; diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts index e27d9d144479..71645e81908a 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts @@ -1,8 +1,9 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -const leftModalNavigatorOptions: StackNavigationOptions = { +const leftModalNavigatorOptions: PlatformStackNavigationOptions = { presentation: 'transparentModal', - gestureDirection: 'horizontal-inverted', + animation: 'slide_from_left', + customAnimationOnGesture: true, }; export default leftModalNavigatorOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index a9cc5fb11d41..af53b00eaacd 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -1,45 +1,9 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; -import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import slideFromLeftAnimation from '@libs/Navigation/PlatformStackNavigation/animation/native/slideFromLeft'; -import slideFromRightAnimation from '@libs/Navigation/PlatformStackNavigation/animation/native/slideFromRight'; +import withNativeOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type { - CommonStackNavigationOptions, - NavigationOptionsRouteProps, - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigatorProps, -} from '@libs/Navigation/PlatformStackNavigation/types'; - -const withPolyfills = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { - if (screenOptions === undefined) { - return {}; - } - - const commonScreenOptions = (({animation, ...rest}) => rest)(screenOptions) satisfies CommonStackNavigationOptions; - - let animation: NativeStackNavigationOptions['animation']; - switch (screenOptions.animation ?? 'slide_from_right') { - case 'slide_from_right': - animation = slideFromRightAnimation; - break; - case 'slide_from_left': - animation = slideFromLeftAnimation; - break; - case 'modal': - animation = 'slide_from_bottom'; - break; - default: - animation = undefined; - } - - return { - ...commonScreenOptions, - animation, - }; -}; +import type {NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { const NativeStack = createNativeStackNavigator(); @@ -48,9 +12,9 @@ function createPlatformStackNavigator() { const nativeScreenOptions = isRouteBasedScreenOptions(screenOptions) ? (props: NavigationOptionsRouteProps) => { const routeBasedScreenOptions = screenOptions(props); - return withPolyfills(routeBasedScreenOptions); + return withNativeOptions(routeBasedScreenOptions); } - : withPolyfills(screenOptions); + : withNativeOptions(screenOptions); return ( { - if (screenOptions === undefined) { - return {}; - } - - const commonScreenOptions = (({animation, ...rest}) => rest)(screenOptions) satisfies CommonStackNavigationOptions; - - return commonScreenOptions; -}; +import type {NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { const Stack = createStackNavigator(); @@ -28,9 +12,9 @@ function createPlatformStackNavigator() { const webScreenOptions = isRouteBasedScreenOptions(screenOptions) ? (props: NavigationOptionsRouteProps) => { const routeBasedScreenOptions = screenOptions(props); - return withPolyfills(routeBasedScreenOptions); + return withWebOptions(routeBasedScreenOptions); } - : withPolyfills(screenOptions); + : withWebOptions(screenOptions); return ( ( + screenOptions: PlatformStackNavigationOptions, + slideInFromLeft: PlatformOptions, + slideInFromRight: PlatformOptions, + slideInFromBottom: PlatformOptions, +) { + let animationOptions: PlatformOptions | undefined; + switch (screenOptions.animation ?? 'slide_from_right') { + case 'slide_from_left': + animationOptions = slideInFromLeft; + break; + case 'slide_from_right': + animationOptions = slideInFromRight; + break; + case 'modal': + animationOptions = slideInFromBottom; + break; + default: + animationOptions = undefined; + } + + return animationOptions; +} + +export default withAnimation; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts new file mode 100644 index 000000000000..2de2371fa096 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts @@ -0,0 +1,7 @@ +import type {CommonStackNavigationOptions, PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; + +function getCommonNavigationOptions(screenOptions: PlatformStackNavigationOptions): CommonStackNavigationOptions { + return (({animation, ...rest}) => rest)(screenOptions); +} + +export default getCommonNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts new file mode 100644 index 000000000000..36d31cb165b9 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts @@ -0,0 +1,19 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import slideFromLeftAnimation from './animationOptions/native/slideFromLeft'; +import slideFromRightAnimation from './animationOptions/native/slideFromRight'; +import withAnimation from './animationOptions/withAnimation'; +import getCommonNavigationOptions from './utils'; + +const withNativeOptions = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + return { + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), + ...getCommonNavigationOptions(screenOptions), + }; +}; + +export default withNativeOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts new file mode 100644 index 000000000000..e815b1c02c46 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts @@ -0,0 +1,19 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import slideFromLeftAnimation from './animationOptions/web/slideFromLeft'; +import slideFromRightAnimation from './animationOptions/web/slideFromRight'; +import withAnimation from './animationOptions/withAnimation'; +import getCommonNavigationOptions from './utils'; + +const withWebOptions = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + return { + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), + ...getCommonNavigationOptions(screenOptions), + }; +}; + +export default withWebOptions; From 18fc89309f4a3051fecc3acabcc97de1b4b46420 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 19:29:16 +0200 Subject: [PATCH 033/589] improve platform navigation --- .../index.native.tsx | 32 +++++++++---------- .../createPlatformStackNavigator/index.tsx | 27 ++++++++-------- .../native/slideFromRight/index.android.ts | 2 +- .../animationOptions/withAnimation.ts | 18 +++++------ .../withNativeNavigationOptions.ts | 30 +++++++++++++++++ .../platformOptions/withNativeOptions.ts | 19 ----------- .../withWebNavigationOptions.ts | 30 +++++++++++++++++ .../platformOptions/withWebOptions.ts | 19 ----------- .../PlatformStackNavigation/types.tsx | 22 ++++++++----- 9 files changed, 114 insertions(+), 85 deletions(-) create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts delete mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts delete mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index af53b00eaacd..427e6df16370 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -1,32 +1,32 @@ import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import type {ParamListBase} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import withNativeOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions'; -import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackNavigatorProps, +} from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { - const NativeStack = createNativeStackNavigator(); + const Stack = createNativeStackNavigator(); - function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { - const nativeScreenOptions = isRouteBasedScreenOptions(screenOptions) - ? (props: NavigationOptionsRouteProps) => { - const routeBasedScreenOptions = screenOptions(props); - return withNativeOptions(routeBasedScreenOptions); - } - : withNativeOptions(screenOptions); + function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); return ( - {children} - + ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); } diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 5f06a4b16a62..8554d19c1cc2 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -1,31 +1,32 @@ import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase, StackNavigationState} from '@react-navigation/native'; +import type {ParamListBase} from '@react-navigation/native'; import {createStackNavigator} from '@react-navigation/stack'; -import withWebOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions'; -import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationOptionsRouteProps, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackNavigatorProps, +} from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { const Stack = createStackNavigator(); - function PlatformStackNavigator({screenOptions, initialRouteName, children}: PlatformStackNavigatorProps) { - const webScreenOptions = isRouteBasedScreenOptions(screenOptions) - ? (props: NavigationOptionsRouteProps) => { - const routeBasedScreenOptions = screenOptions(props); - return withWebOptions(routeBasedScreenOptions); - } - : withWebOptions(screenOptions); + function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions); + return ( {children} ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); } diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts index beb1aaa01bb2..f79fb7a31c86 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts @@ -1,6 +1,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; // `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS -const transition: NativeStackNavigationOptions = {animation: 'slide_from_right'}; +const transition: NativeStackNavigationOptions = {animation: 'ios'}; export default transition; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts index e045fc294751..9389406e0c09 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts @@ -4,23 +4,23 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStac function withAnimation( screenOptions: PlatformStackNavigationOptions, - slideInFromLeft: PlatformOptions, - slideInFromRight: PlatformOptions, - slideInFromBottom: PlatformOptions, + slideFromLeft: PlatformOptions, + slideFromRight: PlatformOptions, + slideFromBottom: PlatformOptions, ) { - let animationOptions: PlatformOptions | undefined; - switch (screenOptions.animation ?? 'slide_from_right') { + let animationOptions: PlatformOptions; + switch (screenOptions.animation) { case 'slide_from_left': - animationOptions = slideInFromLeft; + animationOptions = slideFromLeft; break; case 'slide_from_right': - animationOptions = slideInFromRight; + animationOptions = slideFromRight; break; case 'modal': - animationOptions = slideInFromBottom; + animationOptions = slideFromBottom; break; default: - animationOptions = undefined; + animationOptions = slideFromRight; } return animationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts new file mode 100644 index 000000000000..18bb516d2c15 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -0,0 +1,30 @@ +import type {ParamListBase} from '@react-navigation/native'; +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import slideFromLeftAnimation from './animationOptions/native/slideFromLeft'; +import slideFromRightAnimation from './animationOptions/native/slideFromRight'; +import withAnimation from './animationOptions/withAnimation'; +import getCommonNavigationOptions from './utils'; + +const transformPlatformOptionsToNative = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + return { + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), + ...getCommonNavigationOptions(screenOptions), + }; +}; + +function withNativeNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { + return isRouteBasedScreenOptions(screenOptions) + ? (p: NavigationOptionsRouteProps) => { + const routeBasedScreenOptions = screenOptions(p); + return transformPlatformOptionsToNative(routeBasedScreenOptions); + } + : transformPlatformOptionsToNative(screenOptions); +} + +export default withNativeNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts deleted file mode 100644 index 36d31cb165b9..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeOptions.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import slideFromLeftAnimation from './animationOptions/native/slideFromLeft'; -import slideFromRightAnimation from './animationOptions/native/slideFromRight'; -import withAnimation from './animationOptions/withAnimation'; -import getCommonNavigationOptions from './utils'; - -const withNativeOptions = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { - if (screenOptions === undefined) { - return {}; - } - - return { - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), - ...getCommonNavigationOptions(screenOptions), - }; -}; - -export default withNativeOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts new file mode 100644 index 000000000000..dcf971af7516 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -0,0 +1,30 @@ +import type {ParamListBase} from '@react-navigation/native'; +import type {StackNavigationOptions} from '@react-navigation/stack'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import slideFromLeftAnimation from './animationOptions/web/slideFromLeft'; +import slideFromRightAnimation from './animationOptions/web/slideFromRight'; +import withAnimation from './animationOptions/withAnimation'; +import getCommonNavigationOptions from './utils'; + +const transformPlatformOptionsToWeb = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { + if (screenOptions === undefined) { + return {}; + } + + return { + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), + ...getCommonNavigationOptions(screenOptions), + }; +}; + +function withWebNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { + return isRouteBasedScreenOptions(screenOptions) + ? (p: NavigationOptionsRouteProps) => { + const routeBasedScreenOptions = screenOptions(p); + return transformPlatformOptionsToWeb(routeBasedScreenOptions); + } + : transformPlatformOptionsToWeb(screenOptions); +} + +export default withWebNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts deleted file mode 100644 index e815b1c02c46..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebOptions.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type {StackNavigationOptions} from '@react-navigation/stack'; -import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import slideFromLeftAnimation from './animationOptions/web/slideFromLeft'; -import slideFromRightAnimation from './animationOptions/web/slideFromRight'; -import withAnimation from './animationOptions/withAnimation'; -import getCommonNavigationOptions from './utils'; - -const withWebOptions = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { - if (screenOptions === undefined) { - return {}; - } - - return { - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), - ...getCommonNavigationOptions(screenOptions), - }; -}; - -export default withWebOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index f9543f3f7391..22d72a9e5126 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -3,6 +3,8 @@ import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from ' import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; +type PlatformStackNavigationState = StackNavigationState; + type CommonStackNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; type PlatformStackNavigationOptions = Omit & { animation?: 'slide_from_left' | 'slide_from_right' | 'modal'; @@ -11,19 +13,15 @@ type PlatformStackNavigationOptions = Omit = { - navigation: NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & - StackActionHelpers; - route: RouteProp; -}; +type PlatformStackNavigationRouterOptions = StackRouterOptions; -type PlatformStackNavigatorProps = DefaultNavigatorOptions< +type PlatformStackNavigatorProps = DefaultNavigatorOptions< TStackParams, - StackNavigationState, + PlatformStackNavigationState, PlatformStackNavigationOptions, PlatformStackNavigationEventMap > & - StackRouterOptions & + RouterOptions & StackNavigationConfig; type NavigationOptionsRouteProps = { @@ -32,6 +30,12 @@ type NavigationOptionsRouteProps = { navigation: any; }; +type PlatformStackScreenProps = { + navigation: NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & + StackActionHelpers; + route: RouteProp; +}; + function isRouteBasedScreenOptions( screenOptions: PlatformStackNavigatorProps['screenOptions'], ): screenOptions is (props: NavigationOptionsRouteProps) => PlatformStackNavigationOptions { @@ -42,8 +46,10 @@ export {isRouteBasedScreenOptions}; export type { CommonStackNavigationOptions, CommonStackNavigationEventMap, + PlatformStackNavigationState, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, + PlatformStackNavigationRouterOptions, PlatformStackScreenProps, PlatformStackNavigatorProps, NavigationOptionsRouteProps, From 3b40ab2edc7a7c6ae28451fc5bfb625cd8b99341 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 18 Apr 2024 19:29:27 +0200 Subject: [PATCH 034/589] update custom navigator factories --- .../ModalNavigatorScreenOptions.ts | 2 - .../Navigators/RightModalNavigator.tsx | 4 +- .../index.native.tsx | 82 +++++++++++++++++ .../createCustomBottomTabNavigator/index.tsx | 82 +++++++++-------- .../CustomFullScreenRouter.tsx | 16 ++-- .../createCustomFullScreenNavigator/index.tsx | 86 ++++++++++-------- .../createCustomFullScreenNavigator/types.ts | 15 ++-- .../createCustomStackNavigator/index.tsx | 89 +++++++++++-------- 8 files changed, 249 insertions(+), 127 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx diff --git a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts index 8b0b2cc581ba..9d3a6f267599 100644 --- a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts @@ -9,8 +9,6 @@ import type {ThemeStyles} from '@styles/index'; */ const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles): PlatformStackNavigationOptions => ({ headerShown: false, - animationEnabled: true, - gestureDirection: 'horizontal', cardStyle: themeStyles.navigationScreenCardStyle, cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, }); diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 47f0532e7e86..163bf4071c1c 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -15,7 +15,7 @@ import Overlay from './Overlay'; type RightModalNavigatorProps = PlatformStackScreenProps; -const Stack = createPlatformStackNavigator(); +const Stack = createPlatformStackNavigator('right'); function RightModalNavigator({navigation}: RightModalNavigatorProps) { const styles = useThemeStyles(); @@ -23,6 +23,8 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) { const screenOptions = useMemo(() => ModalNavigatorScreenOptions(styles), [styles]); const isExecutingRef = useRef(false); + console.log({right: screenOptions}); + return ( {!isSmallScreenWidth && ( diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx new file mode 100644 index 000000000000..9b2550228ff9 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -0,0 +1,82 @@ +import type {DefaultNavigatorOptions, ParamListBase, StackActionHelpers, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import {NativeStackView} from '@react-navigation/native-stack'; +import type {StackNavigationEventMap} from '@react-navigation/stack'; +import React from 'react'; +import {View} from 'react-native'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useThemeStyles from '@hooks/useThemeStyles'; +import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationStateRoute} from '@libs/Navigation/types'; +import SCREENS from '@src/SCREENS'; +import BottomTabBar from './BottomTabBar'; + +type CustomNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, StackNavigationEventMap> & { + initialRouteName: string; +}; + +function getStateToRender(state: StackNavigationState): StackNavigationState { + const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; + + // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. + // Currently this value will be switched only after the first HOME screen is rendered. + if (routesToRender[0].name !== SCREENS.HOME) { + const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); + if (routeToRender) { + routesToRender.unshift(routeToRender); + } + } + + return {...state, routes: routesToRender, index: routesToRender.length - 1}; +} + +function createCustomBottomTabNavigator() { + function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); + + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + StackRouterOptions, + StackActionHelpers, + NativeStackNavigationOptions, + NativeStackNavigationEventMap + >(StackRouter, { + children, + screenOptions: nativeScreenOptions, + initialRouteName, + }); + + const styles = useThemeStyles(); + const stateToRender = getStateToRender(state); + + return ( + + + + + + + + + ); + } + + CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; + + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + CustomBottomTabNavigator, + ); +} + +export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 8c53027cf713..171dee878fc9 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -6,11 +6,13 @@ import React from 'react'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; +import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationStateRoute} from '@libs/Navigation/types'; import SCREENS from '@src/SCREENS'; import BottomTabBar from './BottomTabBar'; -type CustomNavigatorProps = DefaultNavigatorOptions, StackNavigationOptions, StackNavigationEventMap> & { +type CustomNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, StackNavigationEventMap> & { initialRouteName: string; }; @@ -29,43 +31,51 @@ function getStateToRender(state: StackNavigationState): StackNavi return {...state, routes: routesToRender, index: routesToRender.length - 1}; } -function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomNavigatorProps) { - const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, - StackRouterOptions, - StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(StackRouter, { - children, - screenOptions, - initialRouteName, - }); +function createCustomBottomTabNavigator() { + function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions); - const styles = useThemeStyles(); - const stateToRender = getStateToRender(state); + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + StackRouterOptions, + StackActionHelpers, + StackNavigationOptions, + StackNavigationEventMap + >(StackRouter, { + children, + screenOptions: webScreenOptions, + initialRouteName, + }); - return ( - - - - - - - - + const styles = useThemeStyles(); + const stateToRender = getStateToRender(state); + + return ( + + + + + + + + + ); + } + + CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; + + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + CustomBottomTabNavigator, ); } -CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - -export default createNavigatorFactory(CustomBottomTabNavigator); +export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx index eb19f891ecd5..9369e1169961 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx @@ -1,14 +1,15 @@ -import type {ParamListBase, PartialState, RouterConfigOptions, StackNavigationState} from '@react-navigation/native'; +import type {ParamListBase, PartialState, Router, RouterConfigOptions} from '@react-navigation/native'; import {StackRouter} from '@react-navigation/native'; import getIsNarrowLayout from '@libs/getIsNarrowLayout'; +import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import SCREENS from '@src/SCREENS'; import type {FullScreenNavigatorRouterOptions} from './types'; -type StackState = StackNavigationState | PartialState>; +type StackState = PlatformStackNavigationState | PartialState>; -const isAtLeastOneInState = (state: StackState, screenName: string): boolean => state.routes.some((route) => route.name === screenName); +const isAtLeastOneInState = (state: StackState, screenName: string): boolean => state.routes.some((route) => route.name === screenName); -function adaptStateIfNecessary(state: StackState) { +function adaptStateIfNecessary(state: StackState) { const isNarrowLayout = getIsNarrowLayout(); const workspaceCentralPane = state.routes.at(-1); const topmostWorkspaceCentralPaneRoute = workspaceCentralPane?.state?.routes[0]; @@ -61,8 +62,9 @@ function adaptStateIfNecessary(state: StackState) { } } -function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { - const stackRouter = StackRouter(options); +function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const stackRouter = StackRouter(options) as Router, any>; return { ...stackRouter, @@ -77,7 +79,7 @@ function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { return initialState; }, - getRehydratedState(partialState: StackState, {routeNames, routeParamList, routeGetIdList}: RouterConfigOptions): StackNavigationState { + getRehydratedState(partialState: StackState, {routeNames, routeParamList, routeGetIdList}: RouterConfigOptions): PlatformStackNavigationState { adaptStateIfNecessary(partialState); const state = stackRouter.getRehydratedState(partialState, {routeNames, routeParamList, routeGetIdList}); return state; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index f35c609402b0..90603f62ef79 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -1,50 +1,60 @@ -import type {ParamListBase, StackActionHelpers, StackNavigationState} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; import navigationRef from '@libs/Navigation/navigationRef'; +import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(CustomFullScreenRouter, { - children: props.children, - screenOptions: props.screenOptions, - initialRouteName: props.initialRouteName, - }); - - const {isSmallScreenWidth} = useWindowDimensions(); - - useEffect(() => { - if (!navigationRef.isReady()) { - return; - } - // We need to separately reset state of this navigator to trigger getRehydratedState. - navigation.reset(navigation.getState()); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isSmallScreenWidth]); - - return ( - - - +function createCustomFullScreenNavigator() { + function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(props.screenOptions); + + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + FullScreenNavigatorRouterOptions, + StackActionHelpers, + StackNavigationOptions, + StackNavigationEventMap + >(CustomFullScreenRouter, { + children: props.children, + screenOptions: webScreenOptions, + initialRouteName: props.initialRouteName, + }); + + const {isSmallScreenWidth} = useWindowDimensions(); + + useEffect(() => { + if (!navigationRef.isReady()) { + return; + } + // We need to separately reset state of this navigator to trigger getRehydratedState. + navigation.reset(navigation.getState()); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isSmallScreenWidth]); + + return ( + + + + ); + } + + CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; + + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( + CustomFullScreenNavigator, ); } -CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - -export default createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof CustomFullScreenNavigator>(CustomFullScreenNavigator); +export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts index c1e0634616b0..fec04e582304 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts @@ -1,10 +1,13 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import type {DefaultNavigatorOptions, ParamListBase, StackRouterOptions} from '@react-navigation/native'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; type FullScreenNavigatorRouterOptions = StackRouterOptions; -type FullScreenNavigatorProps = DefaultNavigatorOptions, StackNavigationOptions, StackNavigationEventMap>; -type FullScreenNativeNavigatorProps = DefaultNavigatorOptions, NativeStackNavigationOptions, NativeStackNavigationEventMap>; +type FullScreenNavigatorProps = DefaultNavigatorOptions< + TStackParams, + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap +>; -export type {FullScreenNavigatorProps, FullScreenNativeNavigatorProps, FullScreenNavigatorRouterOptions}; +export type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions}; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx index 2a517c45eb0d..05c5b9ab4a57 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx @@ -8,6 +8,7 @@ import navigationRef from '@libs/Navigation/navigationRef'; import NAVIGATORS from '@src/NAVIGATORS'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; +import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; type Routes = StackNavigationState['routes']; function reduceReportRoutes(routes: Routes): Routes { @@ -30,51 +31,65 @@ function reduceReportRoutes(routes: Routes): Routes { return result.reverse(); } -function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { - const {isSmallScreenWidth} = useWindowDimensions(); +function createResponsiveStackNavigator(Stack: ReturnType>) { + function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { + const {isSmallScreenWidth} = useWindowDimensions(); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(CustomRouter, { - children: props.children, - screenOptions: props.screenOptions, - initialRouteName: props.initialRouteName, - }); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + StackNavigationState, + ResponsiveStackNavigatorRouterOptions, + StackActionHelpers, + StackNavigationOptions, + StackNavigationEventMap + >(CustomRouter, { + children: props.children, + screenOptions: props.screenOptions, + initialRouteName: props.initialRouteName, + }); - useEffect(() => { - if (!navigationRef.isReady()) { - return; - } - navigationRef.resetRoot(navigationRef.getRootState()); - }, [isSmallScreenWidth]); + useEffect(() => { + if (!navigationRef.isReady()) { + return; + } + navigationRef.resetRoot(navigationRef.getRootState()); + }, [isSmallScreenWidth]); + + const stateToRender = useMemo(() => { + const result = reduceReportRoutes(state.routes); - const stateToRender = useMemo(() => { - const result = reduceReportRoutes(state.routes); + return { + ...state, + index: result.length - 1, + routes: [...result], + }; + }, [state]); - return { - ...state, - index: result.length - 1, - routes: [...result], - }; - }, [state]); - return ( - - + // + // + - - ); + navigation={navigation} /> + ); + } + ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; } -ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; +function createCustomStackNavigator() { + const Stack = createPlatformStackNavigator(); + + return createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof ResponsiveStackNavigator>(createResponsiveStackNavigator(Stack)); +} -export default createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof ResponsiveStackNavigator>(ResponsiveStackNavigator); +export default createCustomStackNavigator From 0dbc9a7a2d6fcc200b84c4dc7cfe0f8aeb83e15b Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 09:31:58 +0200 Subject: [PATCH 035/589] adapt custom navigators --- .../index.native.tsx | 30 ++------ .../createCustomBottomTabNavigator/index.tsx | 29 ++------ .../createCustomBottomTabNavigator/types.ts | 8 +++ .../createCustomBottomTabNavigator/utils.ts | 21 ++++++ .../CustomFullScreenRouter.tsx | 12 ++-- .../index.native.tsx | 66 +++++++++-------- .../createCustomFullScreenNavigator/index.tsx | 8 +-- .../index.native.tsx | 70 ++++++++++--------- .../createCustomStackNavigator/index.tsx | 46 ++++++------ .../createCustomStackNavigator/types.ts | 11 ++- 10 files changed, 148 insertions(+), 153 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 9b2550228ff9..6cd6e1807990 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -1,39 +1,19 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackActionHelpers, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers, StackRouterOptions} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {NativeStackView} from '@react-navigation/native-stack'; -import type {StackNavigationEventMap} from '@react-navigation/stack'; import React from 'react'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationStateRoute} from '@libs/Navigation/types'; -import SCREENS from '@src/SCREENS'; import BottomTabBar from './BottomTabBar'; - -type CustomNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, StackNavigationEventMap> & { - initialRouteName: string; -}; - -function getStateToRender(state: StackNavigationState): StackNavigationState { - const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; - - // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. - // Currently this value will be switched only after the first HOME screen is rendered. - if (routesToRender[0].name !== SCREENS.HOME) { - const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); - if (routeToRender) { - routesToRender.unshift(routeToRender); - } - } - - return {...state, routes: routesToRender, index: routesToRender.length - 1}; -} +import type CustomBottomTabNavigatorProps from './types'; +import getStateToRender from './utils'; function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomNavigatorProps) { + function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< @@ -76,7 +56,7 @@ function createCustomBottomTabNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, - ); + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 171dee878fc9..7f928b292fad 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -1,4 +1,4 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackActionHelpers, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers, StackRouterOptions} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; @@ -8,31 +8,12 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationStateRoute} from '@libs/Navigation/types'; -import SCREENS from '@src/SCREENS'; import BottomTabBar from './BottomTabBar'; - -type CustomNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, StackNavigationEventMap> & { - initialRouteName: string; -}; - -function getStateToRender(state: StackNavigationState): StackNavigationState { - const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; - - // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. - // Currently this value will be switched only after the first HOME screen is rendered. - if (routesToRender[0].name !== SCREENS.HOME) { - const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); - if (routeToRender) { - routesToRender.unshift(routeToRender); - } - } - - return {...state, routes: routesToRender, index: routesToRender.length - 1}; -} +import type CustomBottomTabNavigatorProps from './types'; +import getStateToRender from './utils'; function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomNavigatorProps) { + function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< @@ -75,7 +56,7 @@ function createCustomBottomTabNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, - ); + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts new file mode 100644 index 000000000000..ebc3fb74a36b --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts @@ -0,0 +1,8 @@ +import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; + +type CustomBottomTabNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & { + initialRouteName: string; +}; + +export default CustomBottomTabNavigatorProps; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts new file mode 100644 index 000000000000..ea18eb58e496 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts @@ -0,0 +1,21 @@ +import type {ParamListBase} from '@react-navigation/native'; +import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationStateRoute} from '@libs/Navigation/types'; +import SCREENS from '@src/SCREENS'; + +function getStateToRender(state: PlatformStackNavigationState): PlatformStackNavigationState { + const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; + + // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. + // Currently this value will be switched only after the first HOME screen is rendered. + if (routesToRender[0].name !== SCREENS.HOME) { + const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); + if (routeToRender) { + routesToRender.unshift(routeToRender); + } + } + + return {...state, routes: routesToRender, index: routesToRender.length - 1}; +} + +export default getStateToRender; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx index 9369e1169961..4593c0b7688e 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx @@ -5,11 +5,11 @@ import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackN import SCREENS from '@src/SCREENS'; import type {FullScreenNavigatorRouterOptions} from './types'; -type StackState = PlatformStackNavigationState | PartialState>; +type StackState = PlatformStackNavigationState | PartialState>; -const isAtLeastOneInState = (state: StackState, screenName: string): boolean => state.routes.some((route) => route.name === screenName); +const isAtLeastOneInState = (state: StackState, screenName: string): boolean => state.routes.some((route) => route.name === screenName); -function adaptStateIfNecessary(state: StackState) { +function adaptStateIfNecessary(state: StackState) { const isNarrowLayout = getIsNarrowLayout(); const workspaceCentralPane = state.routes.at(-1); const topmostWorkspaceCentralPaneRoute = workspaceCentralPane?.state?.routes[0]; @@ -62,9 +62,9 @@ function adaptStateIfNecessary(state: StackS } } -function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { +function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { // eslint-disable-next-line @typescript-eslint/no-explicit-any - const stackRouter = StackRouter(options) as Router, any>; + const stackRouter = StackRouter(options) as Router, any>; return { ...stackRouter, @@ -79,7 +79,7 @@ function CustomFullScreenRouter(options: Ful return initialState; }, - getRehydratedState(partialState: StackState, {routeNames, routeParamList, routeGetIdList}: RouterConfigOptions): PlatformStackNavigationState { + getRehydratedState(partialState: StackState, {routeNames, routeParamList, routeGetIdList}: RouterConfigOptions): PlatformStackNavigationState { adaptStateIfNecessary(partialState); const state = stackRouter.getRehydratedState(partialState, {routeNames, routeParamList, routeGetIdList}); return state; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index cf37164bb2f1..dab3d337b5df 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -2,37 +2,45 @@ import type {ParamListBase, StackActionHelpers, StackNavigationState} from '@rea import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; +import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomFullScreenRouter from './CustomFullScreenRouter'; -import type {FullScreenNativeNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; +import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function CustomFullScreenNavigator(props: FullScreenNativeNavigatorProps) { - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - NativeStackNavigationOptions, - NativeStackNavigationEventMap - >(CustomFullScreenRouter, { - children: props.children, - screenOptions: props.screenOptions, - initialRouteName: props.initialRouteName, - }); +function createCustomFullScreenNavigator() { + function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); - return ( - - - - ); -} + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + FullScreenNavigatorRouterOptions, + StackActionHelpers, + NativeStackNavigationOptions, + NativeStackNavigationEventMap + >(CustomFullScreenRouter, { + children: props.children, + screenOptions: nativeScreenOptions, + initialRouteName: props.initialRouteName, + }); + + return ( + + + + ); + } -CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; + CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; + + return createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof CustomFullScreenNavigator>( + CustomFullScreenNavigator, + )(); +} -export default createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof CustomFullScreenNavigator>( - CustomFullScreenNavigator, -); +export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index 90603f62ef79..e1bf373474de 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -11,13 +11,13 @@ import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; function createCustomFullScreenNavigator() { - function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { + function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { const webScreenOptions = withWebNavigationOptions(props.screenOptions); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, + PlatformStackNavigationState, FullScreenNavigatorRouterOptions, - StackActionHelpers, + StackActionHelpers, StackNavigationOptions, StackNavigationEventMap >(CustomFullScreenRouter, { @@ -54,7 +54,7 @@ function createCustomFullScreenNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( CustomFullScreenNavigator, - ); + )(); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx index 81ffd6af815b..4d205afadc7c 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx @@ -4,43 +4,49 @@ import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import React, {useRef} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; +import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomRouter from './CustomRouter'; -import type {ResponsiveNativeStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; +import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -function ResponsiveStackNavigator(props: ResponsiveNativeStackNavigatorProps) { - const {isSmallScreenWidth} = useWindowDimensions(); +function createCustomStackNavigator() { + function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { + const {isSmallScreenWidth} = useWindowDimensions(); + const isSmallScreenWidthRef = useRef(isSmallScreenWidth); + isSmallScreenWidthRef.current = isSmallScreenWidth; - const isSmallScreenWidthRef = useRef(isSmallScreenWidth); + const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); - isSmallScreenWidthRef.current = isSmallScreenWidth; + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + ResponsiveStackNavigatorRouterOptions, + StackActionHelpers, + NativeStackNavigationOptions, + NativeStackNavigationEventMap + >(CustomRouter, { + children: props.children, + screenOptions: nativeScreenOptions, + initialRouteName: props.initialRouteName, + }); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - NativeStackNavigationOptions, - NativeStackNavigationEventMap - >(CustomRouter, { - children: props.children, - screenOptions: props.screenOptions, - initialRouteName: props.initialRouteName, - }); + return ( + + + + ); + } - return ( - - - - ); -} + ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; -ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; + return createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof ResponsiveStackNavigator>( + ResponsiveStackNavigator, + )(); +} -export default createNavigatorFactory, NativeStackNavigationOptions, NativeStackNavigationEventMap, typeof ResponsiveStackNavigator>( - ResponsiveStackNavigator, -); +export default createCustomStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx index 05c5b9ab4a57..dbe33c0b26c2 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx @@ -5,10 +5,11 @@ import {StackView} from '@react-navigation/stack'; import React, {useEffect, useMemo} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; import navigationRef from '@libs/Navigation/navigationRef'; +import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import NAVIGATORS from '@src/NAVIGATORS'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; type Routes = StackNavigationState['routes']; function reduceReportRoutes(routes: Routes): Routes { @@ -31,19 +32,21 @@ function reduceReportRoutes(routes: Routes): Routes { return result.reverse(); } -function createResponsiveStackNavigator(Stack: ReturnType>) { +function createCustomStackNavigator() { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const {isSmallScreenWidth} = useWindowDimensions(); + const webScreenOptions = withWebNavigationOptions(props.screenOptions); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - StackNavigationState, + PlatformStackNavigationState, ResponsiveStackNavigatorRouterOptions, StackActionHelpers, StackNavigationOptions, StackNavigationEventMap >(CustomRouter, { children: props.children, - screenOptions: props.screenOptions, + screenOptions: webScreenOptions, initialRouteName: props.initialRouteName, }); @@ -64,32 +67,23 @@ function createResponsiveStackNavigator(Stac }; }, [state]); - - return ( - // - // - // - + + + ); } ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; -} - -function createCustomStackNavigator() { - const Stack = createPlatformStackNavigator(); - return createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof ResponsiveStackNavigator>(createResponsiveStackNavigator(Stack)); + return createNavigatorFactory, StackNavigationOptions, StackNavigationEventMap, typeof ResponsiveStackNavigator>( + ResponsiveStackNavigator, + )(); } -export default createCustomStackNavigator +export default createCustomStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts index f6b3efa843f6..6ddae12f6764 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts @@ -1,6 +1,5 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import type {DefaultNavigatorOptions, ParamListBase, StackRouterOptions} from '@react-navigation/native'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; type ResponsiveStackNavigatorConfig = { isSmallScreenWidth: boolean; @@ -8,9 +7,7 @@ type ResponsiveStackNavigatorConfig = { type ResponsiveStackNavigatorRouterOptions = StackRouterOptions; -type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, StackNavigationOptions, StackNavigationEventMap> & - ResponsiveStackNavigatorConfig; -type ResponsiveNativeStackNavigatorProps = DefaultNavigatorOptions, NativeStackNavigationOptions, NativeStackNavigationEventMap> & +type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & ResponsiveStackNavigatorConfig; -export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps, ResponsiveStackNavigatorConfig, ResponsiveNativeStackNavigatorProps}; +export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps, ResponsiveStackNavigatorConfig}; From b3ec7ef8927c2b045c166c49472bd85826a6e6a3 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 09:32:03 +0200 Subject: [PATCH 036/589] remove log --- .../AppNavigator/Navigators/RightModalNavigator.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 163bf4071c1c..47f0532e7e86 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -15,7 +15,7 @@ import Overlay from './Overlay'; type RightModalNavigatorProps = PlatformStackScreenProps; -const Stack = createPlatformStackNavigator('right'); +const Stack = createPlatformStackNavigator(); function RightModalNavigator({navigation}: RightModalNavigatorProps) { const styles = useThemeStyles(); @@ -23,8 +23,6 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) { const screenOptions = useMemo(() => ModalNavigatorScreenOptions(styles), [styles]); const isExecutingRef = useRef(false); - console.log({right: screenOptions}); - return ( {!isSmallScreenWidth && ( From 8c4df3af095363e486589d416f1762bfc66d6e4a Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:14:40 +0200 Subject: [PATCH 037/589] remove remaining references to native stack and stack directly --- src/components/ScreenWrapper.tsx | 6 +++--- src/components/withNavigationTransitionEnd.tsx | 4 ++-- .../AppNavigator/Navigators/BottomTabNavigator.tsx | 4 ++-- .../getRightModalNavigatorOptions/index.native.ts | 4 ++-- .../Navigation/PlatformStackNavigation/types.tsx | 14 +++++++++++--- src/pages/Search/SearchPage.tsx | 4 ++-- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index e53823860ce0..0f446d37c833 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -1,5 +1,4 @@ import {useNavigation} from '@react-navigation/native'; -import type {StackNavigationProp} from '@react-navigation/stack'; import type {ForwardedRef, ReactNode} from 'react'; import React, {createContext, forwardRef, useEffect, useMemo, useRef, useState} from 'react'; import type {DimensionValue, StyleProp, ViewStyle} from 'react-native'; @@ -14,6 +13,7 @@ import useTackInputFocus from '@hooks/useTackInputFocus'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import * as Browser from '@libs/Browser'; +import type {PlatformStackNavigationProp} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList, RootStackParamList} from '@libs/Navigation/types'; import toggleTestToolsModal from '@userActions/TestTool'; import CONST from '@src/CONST'; @@ -93,7 +93,7 @@ type ScreenWrapperProps = { * * This is required because transitionEnd event doesn't trigger in the testing environment. */ - navigation?: StackNavigationProp | StackNavigationProp; + navigation?: PlatformStackNavigationProp | PlatformStackNavigationProp; /** Whether to show offline indicator on wide screens */ shouldShowOfflineIndicatorInWideScreen?: boolean; @@ -132,7 +132,7 @@ function ScreenWrapper( * so in other places where ScreenWrapper is used, we need to * fallback to useNavigation. */ - const navigationFallback = useNavigation>(); + const navigationFallback = useNavigation>(); const navigation = navigationProp ?? navigationFallback; const {windowHeight, isSmallScreenWidth} = useWindowDimensions(shouldUseCachedViewportHeight); const {initialHeight} = useInitialDimensions(); diff --git a/src/components/withNavigationTransitionEnd.tsx b/src/components/withNavigationTransitionEnd.tsx index 417d8828c1e4..b8bbdc6a0bb0 100644 --- a/src/components/withNavigationTransitionEnd.tsx +++ b/src/components/withNavigationTransitionEnd.tsx @@ -1,8 +1,8 @@ import {useNavigation} from '@react-navigation/native'; -import type {StackNavigationProp} from '@react-navigation/stack'; import type {ComponentType, ForwardedRef, RefAttributes} from 'react'; import React, {useEffect, useState} from 'react'; import getComponentDisplayName from '@libs/getComponentDisplayName'; +import type {PlatformStackNavigationProp} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; type WithNavigationTransitionEndProps = {didScreenTransitionEnd: boolean}; @@ -10,7 +10,7 @@ type WithNavigationTransitionEndProps = {didScreenTransitionEnd: boolean}; export default function (WrappedComponent: ComponentType>): React.ComponentType> { function WithNavigationTransitionEnd(props: TProps, ref: ForwardedRef) { const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false); - const navigation = useNavigation>(); + const navigation = useNavigation>(); useEffect(() => { const unsubscribeTransitionEnd = navigation.addListener('transitionEnd', () => { diff --git a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx index 6680ea302441..91865db4e83a 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx @@ -1,8 +1,8 @@ import {useNavigationState} from '@react-navigation/native'; -import type {StackNavigationOptions} from '@react-navigation/stack'; import React from 'react'; import createCustomBottomTabNavigator from '@libs/Navigation/AppNavigator/createCustomBottomTabNavigator'; import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {BottomTabNavigatorParamList} from '@libs/Navigation/types'; import SidebarScreen from '@pages/home/sidebar/SidebarScreen'; import SearchPageBottomTab from '@pages/Search/SearchPageBottomTab'; @@ -13,7 +13,7 @@ const loadInitialSettingsPage = () => require('../../../../pages/settings/Initia const Tab = createCustomBottomTabNavigator(); -const screenOptions: StackNavigationOptions = { +const screenOptions: PlatformStackNavigationOptions = { headerShown: false, animationEnabled: false, }; diff --git a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts index 2b062fd2f2be..9feb0a3f3a47 100644 --- a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.native.ts @@ -1,6 +1,6 @@ -import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -const rightModalNavigatorOptions = (): NativeStackNavigationOptions => ({ +const rightModalNavigatorOptions = (): PlatformStackNavigationOptions => ({ presentation: 'card', animation: 'slide_from_right', }); diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index 22d72a9e5126..e28f2a383f76 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -30,10 +30,16 @@ type NavigationOptionsRouteProps = { navigation: any; }; +type PlatformStackNavigationProp< + TStackParams extends ParamListBase, + RouteName extends keyof TStackParams = keyof TStackParams, + NavigatorID extends string | undefined = undefined, +> = NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; +type PlatformStackRouteProp = RouteProp; + type PlatformStackScreenProps = { - navigation: NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & - StackActionHelpers; - route: RouteProp; + navigation: PlatformStackNavigationProp & StackActionHelpers; + route: PlatformStackRouteProp; }; function isRouteBasedScreenOptions( @@ -50,6 +56,8 @@ export type { PlatformStackNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigationRouterOptions, + PlatformStackNavigationProp, + PlatformStackRouteProp, PlatformStackScreenProps, PlatformStackNavigatorProps, NavigationOptionsRouteProps, diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index 3f69371841ce..7f3667d09737 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -1,12 +1,12 @@ -import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import ScreenWrapper from '@components/ScreenWrapper'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import SearchResults from './SearchResults'; import useCustomBackHandler from './useCustomBackHandler'; -type SearchPageProps = StackScreenProps; +type SearchPageProps = PlatformStackScreenProps; function SearchPage({route}: SearchPageProps) { useCustomBackHandler(); From f33eba6d6ca641e28973daa29494ae9985f850dd Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:14:44 +0200 Subject: [PATCH 038/589] update pods --- ios/Podfile.lock | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d8d9c84faf44..40ad3b9366b7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2049,9 +2049,24 @@ PODS: - SocketRocket (0.6.1) - Turf (2.7.0) - VisionCamera (4.0.0-beta.13): - - React - - React-callinvoker + - glog + - hermes-engine + - RCT-Folly (= 2022.05.16.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - Yoga (1.14.0) DEPENDENCIES: @@ -2566,7 +2581,7 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 VisionCamera: 3033e0dd5272d46e97bcb406adea4ae0e6907abf - Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 + Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d From 884627bbb542bfb2349909968dad1f886adcd9a7 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:25:25 +0200 Subject: [PATCH 039/589] fix: order of animations --- .../animationOptions/withAnimation.ts | 4 ++-- .../platformOptions/utils.ts | 6 +++++- .../platformOptions/withNativeNavigationOptions.ts | 14 ++++---------- .../platformOptions/withWebNavigationOptions.ts | 14 ++++---------- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts index 9389406e0c09..fc4b15c90ac3 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts @@ -3,13 +3,13 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; function withAnimation( - screenOptions: PlatformStackNavigationOptions, + screenOptions: PlatformStackNavigationOptions | undefined, slideFromLeft: PlatformOptions, slideFromRight: PlatformOptions, slideFromBottom: PlatformOptions, ) { let animationOptions: PlatformOptions; - switch (screenOptions.animation) { + switch (screenOptions?.animation) { case 'slide_from_left': animationOptions = slideFromLeft; break; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts index 2de2371fa096..5b45c296cd3c 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts @@ -1,6 +1,10 @@ import type {CommonStackNavigationOptions, PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -function getCommonNavigationOptions(screenOptions: PlatformStackNavigationOptions): CommonStackNavigationOptions { +function getCommonNavigationOptions(screenOptions: PlatformStackNavigationOptions | undefined): CommonStackNavigationOptions { + if (screenOptions === undefined) { + return {}; + } + return (({animation, ...rest}) => rest)(screenOptions); } diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 18bb516d2c15..5a20d02ff958 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -7,16 +7,10 @@ import slideFromRightAnimation from './animationOptions/native/slideFromRight'; import withAnimation from './animationOptions/withAnimation'; import getCommonNavigationOptions from './utils'; -const transformPlatformOptionsToNative = (screenOptions?: PlatformStackNavigationOptions): NativeStackNavigationOptions => { - if (screenOptions === undefined) { - return {}; - } - - return { - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), - ...getCommonNavigationOptions(screenOptions), - }; -}; +const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigationOptions | undefined): NativeStackNavigationOptions => ({ + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), + ...getCommonNavigationOptions(screenOptions), +}); function withNativeNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { return isRouteBasedScreenOptions(screenOptions) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index dcf971af7516..762bef6ffd9e 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -7,16 +7,10 @@ import slideFromRightAnimation from './animationOptions/web/slideFromRight'; import withAnimation from './animationOptions/withAnimation'; import getCommonNavigationOptions from './utils'; -const transformPlatformOptionsToWeb = (screenOptions?: PlatformStackNavigationOptions): StackNavigationOptions => { - if (screenOptions === undefined) { - return {}; - } - - return { - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), - ...getCommonNavigationOptions(screenOptions), - }; -}; +const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOptions | undefined): StackNavigationOptions => ({ + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), + ...getCommonNavigationOptions(screenOptions), +}); function withWebNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { return isRouteBasedScreenOptions(screenOptions) From 568cf4a113ddfa5606005421f989a2235daac334 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:26:45 +0200 Subject: [PATCH 040/589] move files --- .../native/slideFromLeft/index.android.ts | 0 .../native/slideFromLeft/index.ts | 0 .../native/slideFromRight/index.android.ts | 0 .../native/slideFromRight/index.ts | 0 .../{animationOptions => animation}/web/slideFromLeft.ts | 0 .../{animationOptions => animation}/web/slideFromRight.ts | 0 .../{animationOptions => animation}/withAnimation.ts | 0 .../platformOptions/withNativeNavigationOptions.ts | 6 +++--- .../platformOptions/withWebNavigationOptions.ts | 6 +++--- 9 files changed, 6 insertions(+), 6 deletions(-) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/native/slideFromLeft/index.android.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/native/slideFromLeft/index.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/native/slideFromRight/index.android.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/native/slideFromRight/index.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/web/slideFromLeft.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/web/slideFromRight.ts (100%) rename src/libs/Navigation/PlatformStackNavigation/platformOptions/{animationOptions => animation}/withAnimation.ts (100%) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromLeft/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromLeft/index.android.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromLeft/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromLeft/index.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.android.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/native/slideFromRight/index.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromLeft.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromLeft.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromRight.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/web/slideFromRight.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts similarity index 100% rename from src/libs/Navigation/PlatformStackNavigation/platformOptions/animationOptions/withAnimation.ts rename to src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 5a20d02ff958..83c1579484bb 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -2,9 +2,9 @@ import type {ParamListBase} from '@react-navigation/native'; import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; -import slideFromLeftAnimation from './animationOptions/native/slideFromLeft'; -import slideFromRightAnimation from './animationOptions/native/slideFromRight'; -import withAnimation from './animationOptions/withAnimation'; +import slideFromLeftAnimation from './animation/native/slideFromLeft'; +import slideFromRightAnimation from './animation/native/slideFromRight'; +import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigationOptions | undefined): NativeStackNavigationOptions => ({ diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 762bef6ffd9e..64b6da6b93b2 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -2,9 +2,9 @@ import type {ParamListBase} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; -import slideFromLeftAnimation from './animationOptions/web/slideFromLeft'; -import slideFromRightAnimation from './animationOptions/web/slideFromRight'; -import withAnimation from './animationOptions/withAnimation'; +import slideFromLeftAnimation from './animation/web/slideFromLeft'; +import slideFromRightAnimation from './animation/web/slideFromRight'; +import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOptions | undefined): StackNavigationOptions => ({ From eda54ab5171ec8bde51106649996370f86b3b0de Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:52:37 +0200 Subject: [PATCH 041/589] remove Podfile changes --- ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 40ad3b9366b7..f564bfd931e4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2581,7 +2581,7 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 VisionCamera: 3033e0dd5272d46e97bcb406adea4ae0e6907abf - Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 + Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d From de68a31b8665d873793be79bc47e1461cc1f8567 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 10:57:02 +0200 Subject: [PATCH 042/589] remove unused defaultScreenOptions --- .../defaultScreenOptions/index.native.ts | 11 ----------- .../AppNavigator/defaultScreenOptions/index.ts | 12 ------------ 2 files changed, 23 deletions(-) delete mode 100644 src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts delete mode 100644 src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts deleted file mode 100644 index 17100bc71bda..000000000000 --- a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.native.ts +++ /dev/null @@ -1,11 +0,0 @@ -const defaultScreenOptions = { - contentStyle: { - overflow: 'visible', - flex: 1, - }, - headerShown: false, - animationTypeForReplace: 'push', - animation: 'slide_from_right', -}; - -export default defaultScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts deleted file mode 100644 index 3104264263a6..000000000000 --- a/src/libs/Navigation/AppNavigator/defaultScreenOptions/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; - -const defaultScreenOptions: PlatformStackNavigationOptions = { - cardStyle: { - overflow: 'visible', - flex: 1, - }, - headerShown: false, - animationTypeForReplace: 'push', -}; - -export default defaultScreenOptions; From f8dc036706d92e63f6744921f83492e6bc2fdc15 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 12:45:10 +0200 Subject: [PATCH 043/589] update animations --- .../platformOptions/animation/native/none.ts | 5 +++++ .../platformOptions/animation/native/slideFromBottom.ts | 5 +++++ .../animation/native/slideFromLeft/index.android.ts | 4 ++-- .../platformOptions/animation/native/slideFromLeft/index.ts | 4 ++-- .../platformOptions/animation/web/none.ts | 5 +++++ .../platformOptions/animation/web/slideFromBottom.ts | 5 +++++ .../platformOptions/animation/web/slideFromLeft.ts | 4 ++-- .../platformOptions/animation/web/slideFromRight.ts | 4 ++-- .../platformOptions/animation/withAnimation.ts | 4 ++++ 9 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/none.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromBottom.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/none.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/none.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/none.ts new file mode 100644 index 000000000000..ced2ecbaac2b --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/none.ts @@ -0,0 +1,5 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +const none: NativeStackNavigationOptions = {animation: 'none'}; + +export default none; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromBottom.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromBottom.ts new file mode 100644 index 000000000000..7e36c811fe42 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromBottom.ts @@ -0,0 +1,5 @@ +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; + +const slideFromBottom: NativeStackNavigationOptions = {animation: 'slide_from_bottom'}; + +export default slideFromBottom; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts index 1868261250fe..576cdc31a090 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS // const transition: NativeStackNavigationOptions['animation'] = 'slide_from_right'; -const transition: NativeStackNavigationOptions = {animation: 'ios'}; +const slideFromLeft: NativeStackNavigationOptions = {animation: 'ios'}; -export default transition; +export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts index 4f482b5024aa..1e1305ce54eb 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 // so we are using `simple_push` which is similar to default and not causing keyboard transition issues -const transition: NativeStackNavigationOptions = {animation: 'simple_push'}; +const slideFromLeft: NativeStackNavigationOptions = {animation: 'simple_push'}; -export default transition; +export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/none.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/none.ts new file mode 100644 index 000000000000..99103cac8eb9 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/none.ts @@ -0,0 +1,5 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; + +const none: StackNavigationOptions = {animationEnabled: false}; + +export default none; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts new file mode 100644 index 000000000000..61279046a5c6 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts @@ -0,0 +1,5 @@ +import type {StackNavigationOptions} from '@react-navigation/stack'; + +const slideFromBottom: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'vertical'}; + +export default slideFromBottom; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts index 8b1558f8e356..467456481221 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts @@ -1,5 +1,5 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; -const transition: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal-inverted'}; +const slideFromLeft: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal-inverted'}; -export default transition; +export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts index d958bf5209f2..31528d7fb7a4 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts @@ -1,5 +1,5 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; -const transition: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal'}; +const slideFromRight: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal'}; -export default transition; +export default slideFromRight; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts index fc4b15c90ac3..f55a94bbf361 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/withAnimation.ts @@ -7,6 +7,7 @@ function withAnimation Date: Fri, 19 Apr 2024 12:47:09 +0200 Subject: [PATCH 044/589] add more animations --- .../platformOptions/withNativeNavigationOptions.ts | 4 +++- .../platformOptions/withWebNavigationOptions.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 83c1579484bb..f4f2b0cbe5b8 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -2,13 +2,15 @@ import type {ParamListBase} from '@react-navigation/native'; import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import noAnimation from './animation/native/none'; +import slideFromBottomAnimation from './animation/native/slideFromBottom'; import slideFromLeftAnimation from './animation/native/slideFromLeft'; import slideFromRightAnimation from './animation/native/slideFromRight'; import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigationOptions | undefined): NativeStackNavigationOptions => ({ - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {animation: 'slide_from_bottom'}), + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), }); diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 64b6da6b93b2..31bd59b3693d 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -2,13 +2,15 @@ import type {ParamListBase} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import noAnimation from './animation/web/none'; +import slideFromBottomAnimation from './animation/web/slideFromBottom'; import slideFromLeftAnimation from './animation/web/slideFromLeft'; import slideFromRightAnimation from './animation/web/slideFromRight'; import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOptions | undefined): StackNavigationOptions => ({ - ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, {}), + ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), }); From 86a3af759822e749cd3f011c042f3c294f7f1d76 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 12:48:35 +0200 Subject: [PATCH 045/589] fix: remove animations from bottom tab navigator --- .../Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx | 1 - .../AppNavigator/createCustomBottomTabNavigator/index.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx index 91865db4e83a..ff1a3021a5dc 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx @@ -15,7 +15,6 @@ const Tab = createCustomBottomTabNavigator(); const screenOptions: PlatformStackNavigationOptions = { headerShown: false, - animationEnabled: false, }; function BottomTabNavigator() { diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 7f928b292fad..c9eaa30494e3 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -14,7 +14,7 @@ import getStateToRender from './utils'; function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions); + const webScreenOptions = withWebNavigationOptions({...screenOptions, animation: undefined}); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, From 69a534c147908f9b59883e32465090402584681f Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 12:53:17 +0200 Subject: [PATCH 046/589] keyboardHandlingEnabled prop only on stack --- src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts | 4 +++- .../PlatformStackNavigation/platformOptions/utils.ts | 9 ++------- .../platformOptions/withWebNavigationOptions.ts | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts b/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts index 75a832555c1f..261d2fcb460e 100644 --- a/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts +++ b/src/libs/Navigation/AppNavigator/hideKeyboardOnSwipe.ts @@ -1,4 +1,6 @@ -const hideKeyboardOnSwipe = { +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; + +const hideKeyboardOnSwipe: PlatformStackNavigationOptions = { // temporary solution - better to hide a keyboard than see keyboard flickering // see https://github.com/software-mansion/react-native-screens/issues/2021 for more details keyboardHandlingEnabled: true, diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts index 5b45c296cd3c..9a647bcd26be 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts @@ -1,11 +1,6 @@ import type {CommonStackNavigationOptions, PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -function getCommonNavigationOptions(screenOptions: PlatformStackNavigationOptions | undefined): CommonStackNavigationOptions { - if (screenOptions === undefined) { - return {}; - } - - return (({animation, ...rest}) => rest)(screenOptions); -} +const getCommonNavigationOptions = (screenOptions: PlatformStackNavigationOptions | undefined): CommonStackNavigationOptions => + screenOptions === undefined ? {} : (({animation, keyboardHandlingEnabled, ...rest}: PlatformStackNavigationOptions) => rest)(screenOptions); export default getCommonNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 31bd59b3693d..a87456be29f3 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -10,6 +10,7 @@ import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOptions | undefined): StackNavigationOptions => ({ + keyboardHandlingEnabled: screenOptions?.keyboardHandlingEnabled, ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), }); From 92962374d3b5184b47957c87e61a6e8b176d9a4b Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 12:57:57 +0200 Subject: [PATCH 047/589] add default screen options prop --- .../createCustomBottomTabNavigator/index.native.tsx | 4 ++-- .../createCustomBottomTabNavigator/index.tsx | 4 ++-- .../AppNavigator/createCustomBottomTabNavigator/utils.ts | 8 ++++++-- .../platformOptions/withNativeNavigationOptions.ts | 9 ++++++--- .../platformOptions/withWebNavigationOptions.ts | 9 ++++++--- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 6cd6e1807990..5a2c91ea1b82 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -10,11 +10,11 @@ import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigatio import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; -import getStateToRender from './utils'; +import {defaultScreenOptions, getStateToRender} from './utils'; function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); + const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index c9eaa30494e3..28b3fd480bd9 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -10,11 +10,11 @@ import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/p import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; -import getStateToRender from './utils'; +import {defaultScreenOptions, getStateToRender} from './utils'; function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { - const webScreenOptions = withWebNavigationOptions({...screenOptions, animation: undefined}); + const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts index ea18eb58e496..f7fad09f2526 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts @@ -1,8 +1,12 @@ import type {ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationStateRoute} from '@libs/Navigation/types'; import SCREENS from '@src/SCREENS'; +const defaultScreenOptions: PlatformStackNavigationOptions = { + animation: 'none', +}; + function getStateToRender(state: PlatformStackNavigationState): PlatformStackNavigationState { const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; @@ -18,4 +22,4 @@ function getStateToRender(state: PlatformStackNavigationState): P return {...state, routes: routesToRender, index: routesToRender.length - 1}; } -export default getStateToRender; +export {defaultScreenOptions, getStateToRender}; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index f4f2b0cbe5b8..6098db217ca4 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -14,13 +14,16 @@ const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigation ...getCommonNavigationOptions(screenOptions), }); -function withNativeNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { +function withNativeNavigationOptions( + screenOptions: PlatformStackNavigatorProps['screenOptions'], + defaultScreenOptions?: PlatformStackNavigationOptions, +) { return isRouteBasedScreenOptions(screenOptions) ? (p: NavigationOptionsRouteProps) => { const routeBasedScreenOptions = screenOptions(p); - return transformPlatformOptionsToNative(routeBasedScreenOptions); + return transformPlatformOptionsToNative({...defaultScreenOptions, ...routeBasedScreenOptions}); } - : transformPlatformOptionsToNative(screenOptions); + : transformPlatformOptionsToNative({...defaultScreenOptions, ...screenOptions}); } export default withNativeNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index a87456be29f3..2d832684fffb 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -15,13 +15,16 @@ const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOpt ...getCommonNavigationOptions(screenOptions), }); -function withWebNavigationOptions(screenOptions: PlatformStackNavigatorProps['screenOptions']) { +function withWebNavigationOptions( + screenOptions: PlatformStackNavigatorProps['screenOptions'], + defaultScreenOptions?: PlatformStackNavigationOptions, +) { return isRouteBasedScreenOptions(screenOptions) ? (p: NavigationOptionsRouteProps) => { const routeBasedScreenOptions = screenOptions(p); - return transformPlatformOptionsToWeb(routeBasedScreenOptions); + return transformPlatformOptionsToWeb({...defaultScreenOptions, ...routeBasedScreenOptions}); } - : transformPlatformOptionsToWeb(screenOptions); + : transformPlatformOptionsToWeb({...defaultScreenOptions, ...screenOptions}); } export default withWebNavigationOptions; From 346f4e673d62ebd620534b08735b285f9f4cde57 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 13:01:23 +0200 Subject: [PATCH 048/589] remove stack animation props --- .../AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx | 2 +- .../AppNavigator/OnboardingModalNavigatorScreenOptions.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx index 512597904076..e2f2a1fe4946 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/WelcomeVideoModalNavigator.tsx @@ -12,7 +12,7 @@ function WelcomeVideoModalNavigator() { return ( - + ({ headerShown: false, - animationEnabled: true, gestureDirection: 'horizontal', cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, presentation: 'transparentModal', From 8744c4b59dbfcf3b9729f3ee54c7742d3b1cafcc Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 14:47:30 +0200 Subject: [PATCH 049/589] add react import --- .../createPlatformStackNavigator/index.native.tsx | 1 + .../createPlatformStackNavigator/index.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 427e6df16370..d9eb5131e756 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -1,6 +1,7 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import React from 'react'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; import type { PlatformStackNavigationEventMap, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 8554d19c1cc2..06854c5c34da 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -1,6 +1,7 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase} from '@react-navigation/native'; import {createStackNavigator} from '@react-navigation/stack'; +import React from 'react'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; import type { PlatformStackNavigationEventMap, From 210a95fe0b1928f121fc35bce6c7b62240bb2194 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 14:56:36 +0200 Subject: [PATCH 050/589] fix: bottom tab not working --- .../index.native.tsx | 16 ++++++++++------ .../createCustomBottomTabNavigator/index.tsx | 11 ++++++++--- .../createCustomFullScreenNavigator/types.ts | 11 ++++++++--- .../createCustomStackNavigator/types.ts | 11 ++++++++--- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 5a2c91ea1b82..e49cb1cd0819 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -1,4 +1,4 @@ -import type {ParamListBase, StackActionHelpers, StackRouterOptions} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {NativeStackView} from '@react-navigation/native-stack'; @@ -7,10 +7,15 @@ import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, + PlatformStackNavigationState, +} from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; -import {defaultScreenOptions, getStateToRender} from './utils'; +import {defaultScreenOptions} from './utils'; function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { @@ -18,7 +23,7 @@ function createCustomBottomTabNavigator() { const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, - StackRouterOptions, + PlatformStackNavigationRouterOptions, StackActionHelpers, NativeStackNavigationOptions, NativeStackNavigationEventMap @@ -29,7 +34,6 @@ function createCustomBottomTabNavigator() { }); const styles = useThemeStyles(); - const stateToRender = getStateToRender(state); return ( () { diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 28b3fd480bd9..6582873d0e64 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -1,4 +1,4 @@ -import type {ParamListBase, StackActionHelpers, StackRouterOptions} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; @@ -7,7 +7,12 @@ import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, + PlatformStackNavigationState, +} from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions, getStateToRender} from './utils'; @@ -18,7 +23,7 @@ function createCustomBottomTabNavigator() { const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, - StackRouterOptions, + PlatformStackNavigationRouterOptions, StackActionHelpers, StackNavigationOptions, StackNavigationEventMap diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts index fec04e582304..1fe8429a4f61 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts @@ -1,7 +1,12 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackRouterOptions} from '@react-navigation/native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, + PlatformStackNavigationState, +} from '@libs/Navigation/PlatformStackNavigation/types'; -type FullScreenNavigatorRouterOptions = StackRouterOptions; +type FullScreenNavigatorRouterOptions = PlatformStackNavigationRouterOptions; type FullScreenNavigatorProps = DefaultNavigatorOptions< TStackParams, diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts index 6ddae12f6764..3f188eaf8b1e 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts @@ -1,11 +1,16 @@ -import type {DefaultNavigatorOptions, ParamListBase, StackRouterOptions} from '@react-navigation/native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, + PlatformStackNavigationState, +} from '@libs/Navigation/PlatformStackNavigation/types'; type ResponsiveStackNavigatorConfig = { isSmallScreenWidth: boolean; }; -type ResponsiveStackNavigatorRouterOptions = StackRouterOptions; +type ResponsiveStackNavigatorRouterOptions = PlatformStackNavigationRouterOptions; type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & ResponsiveStackNavigatorConfig; From 96cd8746deee9619abf7b478b150e0a3e5bd9df7 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 15:57:19 +0200 Subject: [PATCH 051/589] add more types --- .../CentralPaneNavigator/BaseCentralPaneNavigator.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx index edb17ba20491..1d71e689d7c2 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx @@ -3,6 +3,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import ReportScreenWrapper from '@libs/Navigation/AppNavigator/ReportScreenWrapper'; import getCurrentUrl from '@libs/Navigation/currentUrl'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@navigation/types'; import SearchPage from '@pages/Search/SearchPage'; import SCREENS from '@src/SCREENS'; @@ -27,10 +28,10 @@ const settingsScreens = { function BaseCentralPaneNavigator() { const styles = useThemeStyles(); - const options = { + const options: PlatformStackNavigationOptions = { headerShown: false, title: 'New Expensify', - + animation: 'slide_from_left', // Prevent unnecessary scrolling cardStyle: styles.cardStyleNavigator, }; From b4f3248214767508e980d11bdbefe3e31c5badfc Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 15:58:46 +0200 Subject: [PATCH 052/589] add transformScreenOptions function --- patches/@react-navigation+core+6.4.11.patch | 587 ++++++++++++++++++++ 1 file changed, 587 insertions(+) create mode 100644 patches/@react-navigation+core+6.4.11.patch diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch new file mode 100644 index 000000000000..c444da8bb66b --- /dev/null +++ b/patches/@react-navigation+core+6.4.11.patch @@ -0,0 +1,587 @@ +diff --git a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js +index e73a338..d34ed47 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js ++++ b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js +@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = createNavigatorFactory; ++var React = _interopRequireWildcard(require("react")); + var _Group = _interopRequireDefault(require("./Group")); + var _Screen = _interopRequireDefault(require("./Screen")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } ++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); } ++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; } ++function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + /** + * Higher order component to create a `Navigator` and `Screen` pair. + * Custom navigators should wrap the navigator component in `createNavigator` before exporting. +@@ -14,15 +18,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +-function createNavigatorFactory(Navigator) { ++function createNavigatorFactory(Navigator, transformScreenOptions) { + return function () { + if (arguments[0] !== undefined) { + throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); + } ++ const TransformedScreen = transformScreenOptions === undefined ? _Screen.default : _ref => { ++ let { ++ options, ++ ...props ++ } = _ref; ++ return /*#__PURE__*/React.createElement(_Screen.default, _extends({ ++ options: transformScreenOptions(options) ++ }, props)); ++ }; + return { + Navigator, + Group: _Group.default, +- Screen: _Screen.default ++ Screen: TransformedScreen + }; + }; + } +diff --git a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map +index e5c26f6..d7156c8 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map ++++ b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map +@@ -1 +1 @@ +-{"version":3,"names":["createNavigatorFactory","Navigator","arguments","undefined","Error","Group","Screen"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;;;;;AAGA;AACA;AAA8B;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTI,KAAK,EAALA,cAAK;MACLC,MAAM,EAANA;IACF,CAAC;EACH,CAAC;AACH"} +\ No newline at end of file ++{"version":3,"names":["createNavigatorFactory","Navigator","transformScreenOptions","arguments","undefined","Error","TransformedScreen","Screen","options","props","Group"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;;;;;AACA;AAEA;AACA;AAA8B;AAAA;AAAA;AAAA;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,sBAAsB,CAO5CC,SAA6B,EAC7BC,sBAA6E,EAC7E;EACA,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,MAAMC,iBAAiB,GACrBJ,sBAAsB,KAAKE,SAAS,GAChCG,eAAM,GACN,QASM;MAAA,IAT8B;QAClCC,OAAO;QACP,GAAGC;MAOL,CAAC;MACC,oBACE,oBAAC,eAAM;QACL,OAAO,EAAEP,sBAAsB,CAC7BM,OAAO;MACP,GACEC,KAAK,EACT;IAEN,CAAC;IAEP,OAAO;MACLR,SAAS;MACTS,KAAK,EAALA,cAAK;MACLH,MAAM,EAAED;IACV,CAAC;EACH,CAAC;AACH"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js +index f6f02ca..0836dfb 100644 +--- a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js ++++ b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js +@@ -1,3 +1,5 @@ ++function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } ++import * as React from 'react'; + import Group from './Group'; + import Screen from './Screen'; + /** +@@ -7,15 +9,24 @@ import Screen from './Screen'; + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +-export default function createNavigatorFactory(Navigator) { ++export default function createNavigatorFactory(Navigator, transformScreenOptions) { + return function () { + if (arguments[0] !== undefined) { + throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); + } ++ const TransformedScreen = transformScreenOptions === undefined ? Screen : _ref => { ++ let { ++ options, ++ ...props ++ } = _ref; ++ return /*#__PURE__*/React.createElement(Screen, _extends({ ++ options: transformScreenOptions(options) ++ }, props)); ++ }; + return { + Navigator, + Group, +- Screen ++ Screen: TransformedScreen + }; + }; + } +diff --git a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map +index 0054bc4..954b923 100644 +--- a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map ++++ b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map +@@ -1 +1 @@ +-{"version":3,"names":["Group","Screen","createNavigatorFactory","Navigator","arguments","undefined","Error"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":"AAGA,OAAOA,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAG7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTH,KAAK;MACLC;IACF,CAAC;EACH,CAAC;AACH"} +\ No newline at end of file ++{"version":3,"names":["React","Group","Screen","createNavigatorFactory","Navigator","transformScreenOptions","arguments","undefined","Error","TransformedScreen","options","props"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAG7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,CAO5CC,SAA6B,EAC7BC,sBAA6E,EAC7E;EACA,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,MAAMC,iBAAiB,GACrBJ,sBAAsB,KAAKE,SAAS,GAChCL,MAAM,GACN,QASM;MAAA,IAT8B;QAClCQ,OAAO;QACP,GAAGC;MAOL,CAAC;MACC,oBACE,oBAAC,MAAM;QACL,OAAO,EAAEN,sBAAsB,CAC7BK,OAAO;MACP,GACEC,KAAK,EACT;IAEN,CAAC;IAEP,OAAO;MACLP,SAAS;MACTH,KAAK;MACLC,MAAM,EAAEO;IACV,CAAC;EACH,CAAC;AACH"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts +new file mode 100644 +index 0000000..d22cbd4 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=BaseNavigationContainer.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts.map +new file mode 100644 +index 0000000..6334965 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"BaseNavigationContainer.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/BaseNavigationContainer.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts +new file mode 100644 +index 0000000..433d407 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=StaticContainer.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts.map +new file mode 100644 +index 0000000..34bb501 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/StaticContainer.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"StaticContainer.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/StaticContainer.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts +new file mode 100644 +index 0000000..7e2c7c6 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts +@@ -0,0 +1,25 @@ ++import { CommonNavigationAction, DefaultRouterOptions, Router } from '@react-navigation/routers'; ++export type MockActions = CommonNavigationAction | { ++ type: 'NOOP' | 'UPDATE'; ++}; ++export declare const MockRouterKey: { ++ current: number; ++}; ++export default function MockRouter(options: DefaultRouterOptions): Router & Readonly<{ ++ params?: Readonly; ++ }> & { ++ state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; ++ })[]; ++ type: string; ++ stale: false; ++}>, MockActions>; ++//# sourceMappingURL=MockRouter.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts.map +new file mode 100644 +index 0000000..4ff520f +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/__fixtures__/MockRouter.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"MockRouter.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/__fixtures__/MockRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,oBAAoB,EAGpB,MAAM,EACP,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,WAAW,GAAG,sBAAsB,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAC;AAE/E,eAAO,MAAM,aAAa;;CAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,OAAO,EAAE,oBAAoB;;;;;;;;;;;;;;;;iBA+I/D"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts +new file mode 100644 +index 0000000..1fa4c05 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=checkSerializable.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts.map +new file mode 100644 +index 0000000..7134153 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/checkSerializable.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"checkSerializable.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/checkSerializable.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts +new file mode 100644 +index 0000000..600781b +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=createNavigationContainerRef.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts.map +new file mode 100644 +index 0000000..c92c69c +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigationContainerRef.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"createNavigationContainerRef.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/createNavigationContainerRef.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts +new file mode 100644 +index 0000000..3dcc160 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=createNavigatorFactory.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts.map +new file mode 100644 +index 0000000..8f35188 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/createNavigatorFactory.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"createNavigatorFactory.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/createNavigatorFactory.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts +new file mode 100644 +index 0000000..df51c94 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=getActionFromState.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts.map +new file mode 100644 +index 0000000..e3191ac +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getActionFromState.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"getActionFromState.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/getActionFromState.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts +new file mode 100644 +index 0000000..ae3812b +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=getFocusedRouteNameFromRoute.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts.map +new file mode 100644 +index 0000000..be64b01 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getFocusedRouteNameFromRoute.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"getFocusedRouteNameFromRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/getFocusedRouteNameFromRoute.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts +new file mode 100644 +index 0000000..7625849 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=getPathFromState.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts.map +new file mode 100644 +index 0000000..b119f20 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getPathFromState.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"getPathFromState.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/getPathFromState.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts +new file mode 100644 +index 0000000..2ebde5a +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=getStateFromPath.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts.map +new file mode 100644 +index 0000000..cd928df +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/getStateFromPath.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"getStateFromPath.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/getStateFromPath.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts +new file mode 100644 +index 0000000..121d59b +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=index.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts.map +new file mode 100644 +index 0000000..7b9421a +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/index.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/index.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts +new file mode 100644 +index 0000000..98b6561 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useDescriptors.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts.map +new file mode 100644 +index 0000000..666ac88 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useDescriptors.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useDescriptors.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useDescriptors.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts +new file mode 100644 +index 0000000..86ccf20 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useEventEmitter.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts.map +new file mode 100644 +index 0000000..0c223bb +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useEventEmitter.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useEventEmitter.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useEventEmitter.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts +new file mode 100644 +index 0000000..88a0334 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useFocusEffect.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts.map +new file mode 100644 +index 0000000..14fd128 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useFocusEffect.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useFocusEffect.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useFocusEffect.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts +new file mode 100644 +index 0000000..5ace84d +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useIsFocused.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts.map +new file mode 100644 +index 0000000..eb4a60a +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useIsFocused.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useIsFocused.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useIsFocused.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts +new file mode 100644 +index 0000000..49943be +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useNavigation.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts.map +new file mode 100644 +index 0000000..0d5f05d +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigation.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useNavigation.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useNavigation.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts +new file mode 100644 +index 0000000..c4bdd73 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useNavigationCache.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts.map +new file mode 100644 +index 0000000..45d5eec +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationCache.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useNavigationCache.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useNavigationCache.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts +new file mode 100644 +index 0000000..3f3e1e8 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useNavigationState.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts.map +new file mode 100644 +index 0000000..7f87ce2 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useNavigationState.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useNavigationState.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useNavigationState.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts +new file mode 100644 +index 0000000..a2d09c2 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useOnAction.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts.map +new file mode 100644 +index 0000000..f1b8ce2 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useOnAction.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useOnAction.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useOnAction.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts +new file mode 100644 +index 0000000..8f19ec2 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=usePreventRemove.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts.map +new file mode 100644 +index 0000000..6c812fd +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/usePreventRemove.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"usePreventRemove.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/usePreventRemove.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts +new file mode 100644 +index 0000000..2fc7bc3 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=useRoute.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts.map +new file mode 100644 +index 0000000..0f1e440 +--- /dev/null ++++ b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/useRoute.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"useRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useRoute.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts +index 55a87da..89ab338 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts ++++ b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts +@@ -1,5 +1,5 @@ + import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +-import type * as React from 'react'; ++import * as React from 'react'; + import type { EventMapBase, TypedNavigator } from './types'; + /** + * Higher order component to create a `Navigator` and `Screen` pair. +@@ -8,5 +8,5 @@ import type { EventMapBase, TypedNavigator } from './types'; + * @param Navigator The navigtor component to wrap. + * @returns Factory method to create a `Navigator` and `Screen` pair. + */ +-export default function createNavigatorFactory>(Navigator: NavigatorComponent): () => TypedNavigator; ++export default function createNavigatorFactory, TransformedScreenOptions extends {} = ScreenOptions>(Navigator: NavigatorComponent, transformScreenOptions?: (options: ScreenOptions) => TransformedScreenOptions): () => TypedNavigator; + //# sourceMappingURL=createNavigatorFactory.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map +index 27faf3e..a0f9a20 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map ++++ b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"createNavigatorFactory.d.ts","sourceRoot":"","sources":["../../../src/createNavigatorFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,kBAAkB,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EACnD,SAAS,EAAE,kBAAkB,wHAoB9B"} +\ No newline at end of file ++{"version":3,"file":"createNavigatorFactory.d.ts","sourceRoot":"","sources":["../../../src/createNavigatorFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,kBAAkB,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EACnD,wBAAwB,SAAS,EAAE,GAAG,aAAa,EAEnD,SAAS,EAAE,kBAAkB,EAC7B,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,wBAAwB,wHA4C9E"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx b/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx +index e367956..50ce1c9 100644 +--- a/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx ++++ b/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx +@@ -1,9 +1,9 @@ + import type { NavigationState, ParamListBase } from '@react-navigation/routers'; +-import type * as React from 'react'; ++import * as React from 'react'; + + import Group from './Group'; + import Screen from './Screen'; +-import type { EventMapBase, TypedNavigator } from './types'; ++import type { EventMapBase, RouteConfig, TypedNavigator } from './types'; + + /** + * Higher order component to create a `Navigator` and `Screen` pair. +@@ -16,8 +16,12 @@ export default function createNavigatorFactory< + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends EventMapBase, +- NavigatorComponent extends React.ComponentType +->(Navigator: NavigatorComponent) { ++ NavigatorComponent extends React.ComponentType, ++ TransformedScreenOptions extends {} = ScreenOptions, ++>( ++ Navigator: NavigatorComponent, ++ transformScreenOptions?: (options: ScreenOptions) => TransformedScreenOptions ++) { + return function (): TypedNavigator< + ParamList, + State, +@@ -31,10 +35,33 @@ export default function createNavigatorFactory< + ); + } + ++ const TransformedScreen = ++ transformScreenOptions === undefined ++ ? Screen ++ : ({ ++ options, ++ ...props ++ }: RouteConfig< ++ ParamList, ++ RouteName, ++ State, ++ ScreenOptions, ++ EventMap ++ >) => { ++ return ( ++ ++ ) as unknown as null; ++ }; ++ + return { + Navigator, + Group, +- Screen, ++ Screen: TransformedScreen, + }; + }; + } +diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +index b1971ba..8e688db 100644 +--- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx ++++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +@@ -49,7 +49,7 @@ import useScheduleUpdate from './useScheduleUpdate'; + // eslint-disable-next-line babel/no-unused-expressions + PrivateValueStore; + +-type NavigationBuilderOptions = { ++export type NavigationBuilderOptions = { + /** + * Default options specified by the navigator. + * It receives the custom options in the arguments if a function is specified. From 5e453ba6f3ebb54a68fb40f1029c81f886c15452 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 17:03:25 +0200 Subject: [PATCH 053/589] adapt platform stack navigation --- .../index.native.tsx | 16 ++- .../createCustomBottomTabNavigator/index.tsx | 15 ++- .../index.native.tsx | 21 ++- .../createCustomFullScreenNavigator/index.tsx | 21 ++- .../index.native.tsx | 21 ++- .../createCustomStackNavigator/index.tsx | 21 ++- .../index.native.tsx | 15 ++- .../createPlatformStackNavigator/index.tsx | 15 ++- .../withNativeNavigationOptions.ts | 12 +- .../withWebNavigationOptions.ts | 12 +- .../PlatformStackNavigation/types.tsx | 126 ++++++++++++++---- 11 files changed, 230 insertions(+), 65 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index e49cb1cd0819..dd4f2b0b568b 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -2,6 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {NativeStackView} from '@react-navigation/native-stack'; +import type {NativeStackNavigationConfig} from '@react-navigation/native-stack/lib/typescript/src/types'; import React from 'react'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -12,6 +13,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationRouterOptions, PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; @@ -55,12 +57,18 @@ function createCustomBottomTabNavigator() { ); } - CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( - CustomBottomTabNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof CustomBottomTabNavigator, + NativeStackNavigationConfig + >(CustomBottomTabNavigator)(transformScreenProps); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 6582873d0e64..8d4ddb37a44e 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -12,6 +12,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationRouterOptions, PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; @@ -56,12 +57,18 @@ function createCustomBottomTabNavigator() { ); } - CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( - CustomBottomTabNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof CustomBottomTabNavigator, + StackNavigationOptions + >(CustomBottomTabNavigator)(transformScreenProps); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index a6732d2552fa..7d04893b5ebe 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -3,7 +3,12 @@ import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/na import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; @@ -35,12 +40,18 @@ function createCustomFullScreenNavigator() { ); } - CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( - CustomFullScreenNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof CustomFullScreenNavigator, + NativeStackNavigationOptions + >(CustomFullScreenNavigator)(transformScreenProps); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index e1bf373474de..c08ff9e88334 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -6,7 +6,12 @@ import React, {useEffect} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; import navigationRef from '@libs/Navigation/navigationRef'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; @@ -49,12 +54,18 @@ function createCustomFullScreenNavigator() { ); } - CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( - CustomFullScreenNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof CustomFullScreenNavigator, + StackNavigationOptions + >(CustomFullScreenNavigator)(transformScreenProps); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx index ce38fbf05631..088780da0314 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx @@ -6,7 +6,12 @@ import React from 'react'; import {View} from 'react-native'; import useThemeStyles from '@hooks/useThemeStyles'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useCommonLogic from './useCommonLogic'; @@ -44,12 +49,18 @@ function createCustomStackNavigator() { ); } - ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( - ResponsiveStackNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof ResponsiveStackNavigator, + NativeStackNavigationOptions + >(ResponsiveStackNavigator)(transformScreenProps); } export default createCustomStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx index 4e8d8dc558a7..3ca17e15c3f8 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx @@ -6,7 +6,12 @@ import React from 'react'; import {View} from 'react-native'; import useThemeStyles from '@hooks/useThemeStyles'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useCommonLogic from './useCommonLogic'; @@ -44,12 +49,18 @@ function createCustomStackNavigator() { ); } - ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( - ResponsiveStackNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof ResponsiveStackNavigator, + StackNavigationOptions + >(ResponsiveStackNavigator)(transformScreenProps); } export default createCustomStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index d9eb5131e756..708c0d8f149a 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -1,5 +1,6 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase} from '@react-navigation/native'; +import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import React from 'react'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; @@ -8,6 +9,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackNavigatorProps, + PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { @@ -27,9 +29,16 @@ function createPlatformStackNavigator() { ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( - PlatformStackNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof PlatformStackNavigator, + NativeStackNavigationOptions + >(PlatformStackNavigator)(transformScreenProps); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 06854c5c34da..132a380b1af5 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -1,5 +1,6 @@ import {createNavigatorFactory} from '@react-navigation/native'; import type {ParamListBase} from '@react-navigation/native'; +import type {StackNavigationOptions} from '@react-navigation/stack'; import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; @@ -8,6 +9,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackNavigatorProps, + PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { @@ -27,9 +29,16 @@ function createPlatformStackNavigator() { ); } - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( - PlatformStackNavigator, - )(); + const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(screenOptions); + + return createNavigatorFactory< + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap, + typeof PlatformStackNavigator, + StackNavigationOptions + >(PlatformStackNavigator)(transformScreenProps); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 6098db217ca4..3911b8a1c0cd 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -1,7 +1,11 @@ import type {ParamListBase} from '@react-navigation/native'; import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationOptions, + PlatformStackScreenOptionsPropsWithoutNavigation, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import noAnimation from './animation/native/none'; import slideFromBottomAnimation from './animation/native/slideFromBottom'; import slideFromLeftAnimation from './animation/native/slideFromLeft'; @@ -14,12 +18,12 @@ const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigation ...getCommonNavigationOptions(screenOptions), }); -function withNativeNavigationOptions( - screenOptions: PlatformStackNavigatorProps['screenOptions'], +function withNativeNavigationOptions( + screenOptions: PlatformStackScreenOptionsWithoutNavigation, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: NavigationOptionsRouteProps) => { + ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToNative({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 2d832684fffb..d6f094bdb706 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -1,7 +1,11 @@ import type {ParamListBase} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationOptionsRouteProps, PlatformStackNavigationOptions, PlatformStackNavigatorProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type { + PlatformStackNavigationOptions, + PlatformStackScreenOptionsPropsWithoutNavigation, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; import noAnimation from './animation/web/none'; import slideFromBottomAnimation from './animation/web/slideFromBottom'; import slideFromLeftAnimation from './animation/web/slideFromLeft'; @@ -15,12 +19,12 @@ const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOpt ...getCommonNavigationOptions(screenOptions), }); -function withWebNavigationOptions( - screenOptions: PlatformStackNavigatorProps['screenOptions'], +function withWebNavigationOptions( + screenOptions: PlatformStackScreenOptionsWithoutNavigation, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: NavigationOptionsRouteProps) => { + ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToWeb({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index e28f2a383f76..a2aa0e187f5d 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -1,35 +1,118 @@ -import type {DefaultNavigatorOptions, NavigationProp, ParamListBase, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type {DefaultNavigatorOptions, NavigationProp, ParamListBase, RouteProp, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; type PlatformStackNavigationState = StackNavigationState; -type CommonStackNavigationOptions = StackNavigationOptions & NativeStackNavigationOptions; -type PlatformStackNavigationOptions = Omit & { - animation?: 'slide_from_left' | 'slide_from_right' | 'modal'; +type OmitNever> = { + [K in keyof T as T[K] extends never ? never : K]: T[K]; }; +type CommonProperties = OmitNever>; -type CommonStackNavigationEventMap = StackNavigationEventMap & NativeStackNavigationEventMap; +type CommonStackNavigationOptions = CommonProperties; + +type GeneralPlatformStackNavigationOptions = { + keyboardHandlingEnabled?: boolean; + + // Stack + // animationEnabled?: boolean; + // animationTypeForReplace?: 'push' | 'pop'; + // Native stack + // animation?: ScreenProps['stackAnimation']; // The animation used for transitions + // animationDuration?: number; + animation?: 'slide_from_left' | 'slide_from_right' | 'modal' | 'none'; + + // Native stack + // headerBackImageSource?: ImageSourcePropType; + // headerBackTitleStyle?: StyleProp<{ fontFamily?: string; fontSize?: number; }>; + // headerBackVisible?: boolean; + // headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect']; + // headerLargeStyle?: StyleProp<{ backgroundColor?: string; }>; + // headerLargeTitle?: boolean; + // headerLargeTitleShadowVisible?: boolean; + // headerLargeTitleStyle?: StyleProp<{ fontFamily?: string; fontSize?: number; fontWeight?: string; color?: string; }>; + // headerShadowVisible?: boolean; + // headerTitleAlign?: 'left' | 'center'; + // headerBackButtonMenuEnabled?: boolean; + header?: unknown; + + // Native stack + // statusBarAnimation?: ScreenProps['statusBarAnimation']; + // statusBarColor?: string; + // statusBarHidden?: boolean; + // statusBarStyle?: ScreenProps['statusBarStyle']; + // statusBarTranslucent?: boolean; + statusBar?: unknown; + + // Stack + // presentation?: 'card' | 'modal' | 'transparentModal'; + // Native stack + // presentation?: Exclude | 'card'; + presentation?: 'card' | 'modal' | 'transparentModal'; + + // Native stack + // gestureEnabled?: boolean; + // gestureResponseDistance?: number; + // gestureVelocityImpact?: number; + // gestureDirection?: ScreenProps['swipeDirection']; + gesture?: unknown; + + // // Unique to StackNavigationOptions + // cardOverlay?: (props: { style: Animated.WithAnimatedValue> }) => React.ReactNode; + // cardOverlayEnabled?: boolean; + // cardShadowEnabled?: boolean; + // cardStyle?: StyleProp; + // detachPreviousScreen?: boolean; + // keyboardHandlingEnabled?: boolean; + // freezeOnBlur?: boolean; + + // // Unique to NativeStackNavigationOptions + // autoHideHomeIndicator?: boolean; + // contentStyle?: StyleProp; + // customAnimationOnGesture?: boolean; + // fullScreenGestureEnabled?: boolean; + // navigationBarColor?: string; + // navigationBarHidden?: boolean; + // orientation?: ScreenProps['screenOrientation']; +}; + +type PlatformStackNavigationOptions = CommonStackNavigationOptions & GeneralPlatformStackNavigationOptions; + +type CommonStackNavigationEventMap = CommonProperties; type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; type PlatformStackNavigationRouterOptions = StackRouterOptions; -type PlatformStackNavigatorProps = DefaultNavigatorOptions< - TStackParams, - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap -> & +type PlatformStackNavigatorProps< + TStackParams extends ParamListBase, + RouteName extends keyof TStackParams = keyof TStackParams, + RouterOptions extends PlatformStackNavigationRouterOptions = PlatformStackNavigationRouterOptions, +> = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & RouterOptions & StackNavigationConfig; -type NavigationOptionsRouteProps = { - route: RouteProp; +type PlatformStackScreenOptionsProps = { + route: PlatformStackRouteProp; + navigation: PlatformStackNavigationProp; +}; + +type PlatformStackScreenOptionsPropsWithoutNavigation = { + route: PlatformStackRouteProp; // eslint-disable-next-line @typescript-eslint/no-explicit-any navigation: any; }; +type PlatformStackScreenOptions = PlatformStackNavigatorProps< + TStackParams, + RouteName +>['screenOptions']; + +type PlatformStackScreenOptionsWithoutNavigation = + | PlatformStackNavigationOptions + | ((props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions) + | undefined; + type PlatformStackNavigationProp< TStackParams extends ParamListBase, RouteName extends keyof TStackParams = keyof TStackParams, @@ -37,14 +120,9 @@ type PlatformStackNavigationProp< > = NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; type PlatformStackRouteProp = RouteProp; -type PlatformStackScreenProps = { - navigation: PlatformStackNavigationProp & StackActionHelpers; - route: PlatformStackRouteProp; -}; - -function isRouteBasedScreenOptions( - screenOptions: PlatformStackNavigatorProps['screenOptions'], -): screenOptions is (props: NavigationOptionsRouteProps) => PlatformStackNavigationOptions { +function isRouteBasedScreenOptions( + screenOptions: PlatformStackScreenOptions, +): screenOptions is (props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions { return typeof screenOptions === 'function'; } @@ -58,7 +136,9 @@ export type { PlatformStackNavigationRouterOptions, PlatformStackNavigationProp, PlatformStackRouteProp, - PlatformStackScreenProps, + PlatformStackScreenOptions, + PlatformStackScreenOptionsWithoutNavigation, + PlatformStackScreenOptionsProps, + PlatformStackScreenOptionsPropsWithoutNavigation, PlatformStackNavigatorProps, - NavigationOptionsRouteProps, }; From 6e8a07d44d2825e7bcae4924ffcc12f13dedf82c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 17:03:59 +0200 Subject: [PATCH 054/589] rename types --- .../AppNavigator/Navigators/LeftModalNavigator.tsx | 4 ++-- .../AppNavigator/Navigators/RightModalNavigator.tsx | 4 ++-- src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx | 4 ++-- src/pages/ChatFinderPage/index.tsx | 4 ++-- src/pages/ConciergePage.tsx | 4 ++-- src/pages/DetailsPage.tsx | 4 ++-- src/pages/EditSplitBillPage.tsx | 4 ++-- src/pages/FlagCommentPage.tsx | 4 ++-- src/pages/GetAssistancePage.tsx | 4 ++-- src/pages/GroupChatNameEditPage.tsx | 4 ++-- src/pages/LogInWithShortLivedAuthTokenPage.tsx | 4 ++-- src/pages/LogOutPreviousUserPage.tsx | 4 ++-- src/pages/PrivateNotes/PrivateNotesEditPage.tsx | 4 ++-- src/pages/ProfilePage.tsx | 4 ++-- src/pages/ReferralDetailsPage.tsx | 4 ++-- src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx | 4 ++-- src/pages/ReportAvatar.tsx | 4 ++-- src/pages/ReportDescriptionPage.tsx | 4 ++-- src/pages/ReportDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantRoleSelectionPage.tsx | 4 ++-- src/pages/RoomInvitePage.tsx | 4 ++-- src/pages/RoomMembersPage.tsx | 4 ++-- src/pages/Search/SearchPage.tsx | 4 ++-- src/pages/TransactionReceiptPage.tsx | 4 ++-- src/pages/UnlinkLoginPage.tsx | 4 ++-- src/pages/ValidateLoginPage/types.ts | 4 ++-- src/pages/home/ReportScreen.tsx | 4 ++-- src/pages/home/report/ReportAttachments.tsx | 4 ++-- .../home/report/withReportAndReportActionOrNotFound.tsx | 4 ++-- src/pages/iou/MoneyRequestWaypointPage.tsx | 4 ++-- src/pages/iou/SplitBillDetailsPage.tsx | 4 ++-- src/pages/settings/AboutPage/ShareLogPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx | 4 ++-- .../settings/Profile/Contacts/ContactMethodDetailsPage.tsx | 4 ++-- src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx | 4 ++-- .../settings/Profile/Contacts/NewContactMethodPage.tsx | 4 ++-- src/pages/settings/Profile/PersonalDetails/AddressPage.tsx | 4 ++-- .../Profile/PersonalDetails/CountrySelectionPage.tsx | 4 ++-- src/pages/settings/Profile/ProfileAvatar.tsx | 4 ++-- src/pages/settings/Report/NotificationPreferencePage.tsx | 4 ++-- src/pages/settings/Report/ReportSettingsPage.tsx | 4 ++-- src/pages/settings/Report/RoomNamePage.tsx | 4 ++-- src/pages/settings/Report/VisibilityPage.tsx | 4 ++-- src/pages/settings/Report/WriteCapabilityPage.tsx | 4 ++-- src/pages/settings/Security/CloseAccountPage.tsx | 4 ++-- src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx | 4 ++-- src/pages/settings/Wallet/ExpensifyCardPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportCardLostPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx | 4 ++-- src/pages/tasks/NewTaskDescriptionPage.tsx | 4 ++-- src/pages/tasks/NewTaskDetailsPage.tsx | 4 ++-- src/pages/tasks/NewTaskPage.tsx | 4 ++-- src/pages/tasks/NewTaskTitlePage.tsx | 4 ++-- src/pages/wallet/WalletStatementPage.tsx | 4 ++-- src/pages/workspace/WorkspaceAvatar.tsx | 4 ++-- src/pages/workspace/WorkspaceInitialPage.tsx | 4 ++-- src/pages/workspace/WorkspaceInviteMessagePage.tsx | 4 ++-- src/pages/workspace/WorkspaceInvitePage.tsx | 4 ++-- src/pages/workspace/WorkspaceJoinUserPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMembersPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 4 ++-- src/pages/workspace/bills/WorkspaceBillsPage.tsx | 4 ++-- src/pages/workspace/card/WorkspaceCardPage.tsx | 4 ++-- src/pages/workspace/categories/CategorySettingsPage.tsx | 4 ++-- src/pages/workspace/categories/CreateCategoryPage.tsx | 4 ++-- src/pages/workspace/categories/EditCategoryPage.tsx | 4 ++-- src/pages/workspace/categories/WorkspaceCategoriesPage.tsx | 4 ++-- .../categories/WorkspaceCategoriesSettingsPage.tsx | 4 ++-- .../workspace/distanceRates/CreateDistanceRatePage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRateDetailsPage.tsx | 4 ++-- .../workspace/distanceRates/PolicyDistanceRateEditPage.tsx | 4 ++-- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRatesSettingsPage.tsx | 5 +++-- src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx | 4 ++-- src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeErrorPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeSuccessPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeWrapperPage.tsx | 4 ++-- src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx | 4 ++-- src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx | 4 ++-- src/pages/workspace/tags/EditTagPage.tsx | 4 ++-- src/pages/workspace/tags/TagSettingsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceCreateTagPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceEditTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx | 4 ++-- src/pages/workspace/taxes/NamePage.tsx | 4 ++-- src/pages/workspace/taxes/ValuePage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 4 ++-- .../workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsForeignCurrency.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx | 4 ++-- src/pages/workspace/travel/WorkspaceTravelPage.tsx | 4 ++-- .../workflows/WorkspaceAutoReportingFrequencyPage.tsx | 4 ++-- .../workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx | 4 ++-- .../workspace/workflows/WorkspaceWorkflowsApproverPage.tsx | 4 ++-- src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 6 ++++-- .../workspace/workflows/WorkspaceWorkflowsPayerPage.tsx | 4 ++-- tests/perf-test/ReportScreen.perf-test.tsx | 4 ++-- tests/perf-test/SearchPage.perf-test.tsx | 4 ++-- 109 files changed, 221 insertions(+), 218 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index 5cf8754d0961..c42b67f75c08 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -6,13 +6,13 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, LeftModalNavigatorParamList} from '@libs/Navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type LeftModalNavigatorProps = PlatformStackScreenProps; +type LeftModalNavigatorProps = PlatformStackScreenOptionsProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 47f0532e7e86..37f9db76f3a8 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -7,13 +7,13 @@ import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwi import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type RightModalNavigatorProps = PlatformStackScreenProps; +type RightModalNavigatorProps = PlatformStackScreenOptionsProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx index 9854ea136e8b..f265a5566e2b 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx +++ b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@navigation/types'; import ReportScreen from '@pages/home/ReportScreen'; import type SCREENS from '@src/SCREENS'; import ReportScreenIDSetter from './ReportScreenIDSetter'; -type ReportScreenWrapperProps = PlatformStackScreenProps; +type ReportScreenWrapperProps = PlatformStackScreenOptionsProps; function ReportScreenWrapper({route, navigation}: ReportScreenWrapperProps) { // The ReportScreen without the reportID set will display a skeleton diff --git a/src/pages/ChatFinderPage/index.tsx b/src/pages/ChatFinderPage/index.tsx index 0c364f4538c2..55f2a2bf282d 100644 --- a/src/pages/ChatFinderPage/index.tsx +++ b/src/pages/ChatFinderPage/index.tsx @@ -14,7 +14,7 @@ import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import type {MaybePhraseKey} from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import Performance from '@libs/Performance'; @@ -35,7 +35,7 @@ type ChatFinderPageOnyxProps = { isSearchingForReports: OnyxEntry; }; -type ChatFinderPageProps = ChatFinderPageOnyxProps & PlatformStackScreenProps; +type ChatFinderPageProps = ChatFinderPageOnyxProps & PlatformStackScreenOptionsProps; type ChatFinderPageSectionItem = { data: OptionData[]; diff --git a/src/pages/ConciergePage.tsx b/src/pages/ConciergePage.tsx index c22aa867f3da..cc3b2334e9e4 100644 --- a/src/pages/ConciergePage.tsx +++ b/src/pages/ConciergePage.tsx @@ -8,7 +8,7 @@ import ReportHeaderSkeletonView from '@components/ReportHeaderSkeletonView'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as App from '@userActions/App'; import * as Report from '@userActions/Report'; @@ -21,7 +21,7 @@ type ConciergePageOnyxProps = { session: OnyxEntry; }; -type ConciergePageProps = ConciergePageOnyxProps & PlatformStackScreenProps; +type ConciergePageProps = ConciergePageOnyxProps & PlatformStackScreenOptionsProps; /* * This is a "utility page", that does this: diff --git a/src/pages/DetailsPage.tsx b/src/pages/DetailsPage.tsx index 5310b051d342..d464f003c4eb 100755 --- a/src/pages/DetailsPage.tsx +++ b/src/pages/DetailsPage.tsx @@ -19,7 +19,7 @@ import Text from '@components/Text'; import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -40,7 +40,7 @@ type DetailsPageOnyxProps = { session: OnyxEntry; }; -type DetailsPageProps = DetailsPageOnyxProps & PlatformStackScreenProps; +type DetailsPageProps = DetailsPageOnyxProps & PlatformStackScreenOptionsProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/EditSplitBillPage.tsx b/src/pages/EditSplitBillPage.tsx index 7474ff672c34..d9969ecf9d8c 100644 --- a/src/pages/EditSplitBillPage.tsx +++ b/src/pages/EditSplitBillPage.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {TransactionChanges} from '@libs/TransactionUtils'; @@ -32,7 +32,7 @@ type EditSplitBillOnyxProps = { draftTransaction: OnyxEntry; }; -type EditSplitBillProps = EditSplitBillOnyxProps & PlatformStackScreenProps; +type EditSplitBillProps = EditSplitBillOnyxProps & PlatformStackScreenOptionsProps; function EditSplitBillPage({route, transaction, draftTransaction, report}: EditSplitBillProps) { const {field: fieldToEdit, reportID, reportActionID, tagIndex} = route.params; diff --git a/src/pages/FlagCommentPage.tsx b/src/pages/FlagCommentPage.tsx index 93c2da15d8db..d499ac534bc5 100644 --- a/src/pages/FlagCommentPage.tsx +++ b/src/pages/FlagCommentPage.tsx @@ -13,7 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as Report from '@userActions/Report'; @@ -30,7 +30,7 @@ type FlagCommentPageWithOnyxProps = { parentReportAction: OnyxEntry; }; -type FlagCommentPageNavigationProps = PlatformStackScreenProps; +type FlagCommentPageNavigationProps = PlatformStackScreenOptionsProps; type FlagCommentPageProps = FlagCommentPageNavigationProps & WithReportAndReportActionOrNotFoundProps & FlagCommentPageWithOnyxProps; diff --git a/src/pages/GetAssistancePage.tsx b/src/pages/GetAssistancePage.tsx index 381a1716f59b..5b2047b2580b 100644 --- a/src/pages/GetAssistancePage.tsx +++ b/src/pages/GetAssistancePage.tsx @@ -13,7 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import * as Report from '@userActions/Report'; @@ -28,7 +28,7 @@ type GetAssistanceOnyxProps = { account: OnyxEntry; }; -type GetAssistancePageProps = GetAssistanceOnyxProps & PlatformStackScreenProps; +type GetAssistancePageProps = GetAssistanceOnyxProps & PlatformStackScreenOptionsProps; function GetAssistancePage({route, account}: GetAssistancePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/GroupChatNameEditPage.tsx b/src/pages/GroupChatNameEditPage.tsx index 7cdf59d1f18d..d91017448175 100644 --- a/src/pages/GroupChatNameEditPage.tsx +++ b/src/pages/GroupChatNameEditPage.tsx @@ -10,7 +10,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {NewChatNavigatorParamList} from '@navigation/types'; @@ -27,7 +27,7 @@ type GroupChatNameEditPageOnyxProps = { groupChatDraft: NewGroupChatDraft | null; }; -type GroupChatNameEditPageProps = PlatformStackScreenProps & GroupChatNameEditPageOnyxProps; +type GroupChatNameEditPageProps = PlatformStackScreenOptionsProps & GroupChatNameEditPageOnyxProps; function GroupChatNameEditPage({groupChatDraft, route}: GroupChatNameEditPageProps) { // If we have a reportID this means we are using this page to update an existing Group Chat name diff --git a/src/pages/LogInWithShortLivedAuthTokenPage.tsx b/src/pages/LogInWithShortLivedAuthTokenPage.tsx index 265f7666decc..b52e45e50bea 100644 --- a/src/pages/LogInWithShortLivedAuthTokenPage.tsx +++ b/src/pages/LogInWithShortLivedAuthTokenPage.tsx @@ -13,7 +13,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; @@ -28,7 +28,7 @@ type LogInWithShortLivedAuthTokenPageOnyxProps = { account: OnyxEntry; }; -type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & PlatformStackScreenProps; +type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & PlatformStackScreenOptionsProps; function LogInWithShortLivedAuthTokenPage({route, account}: LogInWithShortLivedAuthTokenPageProps) { const theme = useTheme(); diff --git a/src/pages/LogOutPreviousUserPage.tsx b/src/pages/LogOutPreviousUserPage.tsx index 435efa8be6ce..f2204c691bd2 100644 --- a/src/pages/LogOutPreviousUserPage.tsx +++ b/src/pages/LogOutPreviousUserPage.tsx @@ -4,7 +4,7 @@ import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import {InitialURLContext} from '@components/InitialURLContextProvider'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as SessionUtils from '@libs/SessionUtils'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; @@ -24,7 +24,7 @@ type LogOutPreviousUserPageOnyxProps = { isAccountLoading: boolean; }; -type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & PlatformStackScreenProps; +type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & PlatformStackScreenOptionsProps; // This page is responsible for handling transitions from OldDot. Specifically, it logs the current user // out if the transition is for another user. diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx index f4fb6f79aee1..bbf5500aaf03 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx @@ -18,7 +18,7 @@ import useHtmlPaste from '@hooks/useHtmlPaste'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PrivateNotesNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -40,7 +40,7 @@ type PrivateNotesEditPageOnyxProps = { type PrivateNotesEditPageProps = WithReportAndPrivateNotesOrNotFoundProps & PrivateNotesEditPageOnyxProps & - PlatformStackScreenProps & { + PlatformStackScreenOptionsProps & { /** The report currently being looked at */ report: Report; }; diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index 91efe6e01830..8e53fac55553 100755 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -21,7 +21,7 @@ import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -40,7 +40,7 @@ import type {PersonalDetails, Report} from '@src/types/onyx'; import type {EmptyObject} from '@src/types/utils/EmptyObject'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ProfilePageProps = PlatformStackScreenProps; +type ProfilePageProps = PlatformStackScreenOptionsProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/ReferralDetailsPage.tsx b/src/pages/ReferralDetailsPage.tsx index 76dac1aca1a8..b903caa3a7a4 100644 --- a/src/pages/ReferralDetailsPage.tsx +++ b/src/pages/ReferralDetailsPage.tsx @@ -14,7 +14,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Clipboard from '@libs/Clipboard'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReferralDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; @@ -29,7 +29,7 @@ type ReferralDetailsPageOnyxProps = { account: OnyxEntry; }; -type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & PlatformStackScreenProps; +type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & PlatformStackScreenOptionsProps; function ReferralDetailsPage({route, account}: ReferralDetailsPageProps) { const theme = useTheme(); diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx index aaff6241008a..154340dc16f7 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx @@ -18,7 +18,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import getPlaidOAuthReceivedRedirectURI from '@libs/getPlaidOAuthReceivedRedirectURI'; import BankAccount from '@libs/models/BankAccount'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReimbursementAccountNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import shouldReopenOnfido from '@libs/shouldReopenOnfido'; @@ -68,7 +68,7 @@ type ReimbursementAccountOnyxProps = { type ReimbursementAccountPageProps = WithPolicyOnyxProps & ReimbursementAccountOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; const ROUTE_NAMES = { COMPANY: 'company', diff --git a/src/pages/ReportAvatar.tsx b/src/pages/ReportAvatar.tsx index 63c3d154e74c..c8171639980f 100644 --- a/src/pages/ReportAvatar.tsx +++ b/src/pages/ReportAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -18,7 +18,7 @@ type ReportAvatarOnyxProps = { policies: OnyxCollection; }; -type ReportAvatarProps = ReportAvatarOnyxProps & PlatformStackScreenProps; +type ReportAvatarProps = ReportAvatarOnyxProps & PlatformStackScreenOptionsProps; function ReportAvatar({report = {} as Report, policies, isLoadingApp = true}: ReportAvatarProps) { const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID ?? '0'}`]; diff --git a/src/pages/ReportDescriptionPage.tsx b/src/pages/ReportDescriptionPage.tsx index 0aabe5ad5d58..4fda961662a7 100644 --- a/src/pages/ReportDescriptionPage.tsx +++ b/src/pages/ReportDescriptionPage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportDescriptionNavigatorParamList} from '@navigation/types'; import type SCREENS from '@src/SCREENS'; @@ -8,7 +8,7 @@ import withReportOrNotFound from './home/report/withReportOrNotFound'; import RoomDescriptionPage from './RoomDescriptionPage'; import TaskDescriptionPage from './tasks/TaskDescriptionPage'; -type ReportDescriptionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; +type ReportDescriptionPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function ReportDescriptionPage(props: ReportDescriptionPageProps) { const isTask = ReportUtils.isTaskReport(props.report); diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index f3402bccffea..dbae6eef504e 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -23,7 +23,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -58,7 +58,7 @@ type ReportDetailsPageOnyxProps = { /** Session info for the currently logged in user. */ session: OnyxEntry; }; -type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; +type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function ReportDetailsPage({policies, report, session, personalDetails}: ReportDetailsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/ReportParticipantDetailsPage.tsx b/src/pages/ReportParticipantDetailsPage.tsx index 56ebec0789d4..225cea09189b 100644 --- a/src/pages/ReportParticipantDetailsPage.tsx +++ b/src/pages/ReportParticipantDetailsPage.tsx @@ -16,7 +16,7 @@ import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; @@ -35,7 +35,7 @@ type ReportParticipantDetailsOnyxProps = { }; type ReportParticipantDetailsPageProps = WithReportOrNotFoundProps & - PlatformStackScreenProps & + PlatformStackScreenOptionsProps & ReportParticipantDetailsOnyxProps; function ReportParticipantDetails({personalDetails, report, route}: ReportParticipantDetailsPageProps) { diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 1db4e878bcb7..5c62d130cc0c 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -9,7 +9,7 @@ import type {ListItem} from '@components/SelectionList/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -19,7 +19,7 @@ import NotFoundPage from './ErrorPage/NotFoundPage'; import withReportOrNotFound from './home/report/withReportOrNotFound'; import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound'; -type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; +type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; type ListItemType = ListItem & { value: ValueOf; diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index 7db147c81564..f81cff2aa468 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -17,7 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -34,7 +34,7 @@ import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound import withReportOrNotFound from './home/report/withReportOrNotFound'; import SearchInputManager from './workspace/SearchInputManager'; -type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & PlatformStackScreenProps; +type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & PlatformStackScreenOptionsProps; type Sections = Array>>; diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index 9d074e678957..737a46ae042a 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -20,7 +20,7 @@ import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RoomMembersNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -45,7 +45,7 @@ type RoomMembersPageOnyxProps = { type RoomMembersPageProps = WithReportOrNotFoundProps & WithCurrentUserPersonalDetailsProps & RoomMembersPageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function RoomMembersPage({report, session, policies}: RoomMembersPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index 7f3667d09737..d783439160fa 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -1,12 +1,12 @@ import React from 'react'; import ScreenWrapper from '@components/ScreenWrapper'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import SearchResults from './SearchResults'; import useCustomBackHandler from './useCustomBackHandler'; -type SearchPageProps = PlatformStackScreenProps; +type SearchPageProps = PlatformStackScreenOptionsProps; function SearchPage({route}: SearchPageProps) { useCustomBackHandler(); diff --git a/src/pages/TransactionReceiptPage.tsx b/src/pages/TransactionReceiptPage.tsx index 97ce2dd44cf5..4c44acee226b 100644 --- a/src/pages/TransactionReceiptPage.tsx +++ b/src/pages/TransactionReceiptPage.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReceiptUtils from '@libs/ReceiptUtils'; import * as ReportActionUtils from '@libs/ReportActionsUtils'; @@ -23,7 +23,7 @@ type TransactionReceiptOnyxProps = { reportMetadata: OnyxEntry; }; -type TransactionReceiptProps = TransactionReceiptOnyxProps & PlatformStackScreenProps; +type TransactionReceiptProps = TransactionReceiptOnyxProps & PlatformStackScreenOptionsProps; function TransactionReceipt({transaction, report, reportMetadata = {isLoadingInitialReportActions: true}, route}: TransactionReceiptProps) { const receiptURIs = ReceiptUtils.getThumbnailAndImageURIs(transaction); diff --git a/src/pages/UnlinkLoginPage.tsx b/src/pages/UnlinkLoginPage.tsx index eaa60824ab6a..aa9b0b387225 100644 --- a/src/pages/UnlinkLoginPage.tsx +++ b/src/pages/UnlinkLoginPage.tsx @@ -4,7 +4,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import usePrevious from '@hooks/usePrevious'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@navigation/types'; import * as Session from '@userActions/Session'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -16,7 +16,7 @@ type UnlinkLoginPageOnyxProps = { account: OnyxEntry; }; -type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & PlatformStackScreenProps; +type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & PlatformStackScreenOptionsProps; function UnlinkLoginPage({route, account}: UnlinkLoginPageProps) { const accountID = route.params.accountID ?? -1; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index 47208eee2ebb..044de8146a46 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -1,5 +1,5 @@ import type {OnyxEntry} from 'react-native-onyx'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import type {Account, Credentials, Session} from '@src/types/onyx'; @@ -17,6 +17,6 @@ type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { credentials: OnyxEntry; }; -type ValidateLoginPageProps = OnyxProps & PlatformStackScreenProps; +type ValidateLoginPageProps = OnyxProps & PlatformStackScreenOptionsProps; export type {ValidateLoginPageOnyxNativeProps, ValidateLoginPageOnyxProps, ValidateLoginPageProps}; diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index b930e1b92fa4..069a31643706 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -29,7 +29,7 @@ import useViewportOffsetTop from '@hooks/useViewportOffsetTop'; import useWindowDimensions from '@hooks/useWindowDimensions'; import Timing from '@libs/actions/Timing'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import clearReportNotifications from '@libs/Notification/clearReportNotifications'; import Performance from '@libs/Performance'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -89,7 +89,7 @@ type OnyxHOCProps = { markReadyForHydration?: () => void; }; -type ReportScreenNavigationProps = PlatformStackScreenProps; +type ReportScreenNavigationProps = PlatformStackScreenOptionsProps; type ReportScreenPropsWithoutParentReportAction = OnyxHOCProps & CurrentReportIDContextValue & ReportScreenOnyxPropsWithoutParentReportAction & ReportScreenNavigationProps; diff --git a/src/pages/home/report/ReportAttachments.tsx b/src/pages/home/report/ReportAttachments.tsx index 7e33b7047cc5..23f1eff87926 100644 --- a/src/pages/home/report/ReportAttachments.tsx +++ b/src/pages/home/report/ReportAttachments.tsx @@ -3,13 +3,13 @@ import AttachmentModal from '@components/AttachmentModal'; import type {Attachment} from '@components/Attachments/types'; import ComposerFocusManager from '@libs/ComposerFocusManager'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type ReportAttachmentsProps = PlatformStackScreenProps; +type ReportAttachmentsProps = PlatformStackScreenOptionsProps; function ReportAttachments({route}: ReportAttachmentsProps) { const reportID = route.params.reportID; diff --git a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx index 59e8a30dbd77..7a845ecddcce 100644 --- a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx +++ b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx @@ -8,7 +8,7 @@ import withWindowDimensions from '@components/withWindowDimensions'; import type {WindowDimensionsProps} from '@components/withWindowDimensions/types'; import compose from '@libs/compose'; import getComponentDisplayName from '@libs/getComponentDisplayName'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList, SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -46,7 +46,7 @@ type OnyxProps = { type WithReportAndReportActionOrNotFoundProps = OnyxProps & WindowDimensionsProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; export default function ( WrappedComponent: ComponentType>, diff --git a/src/pages/iou/MoneyRequestWaypointPage.tsx b/src/pages/iou/MoneyRequestWaypointPage.tsx index f9b78d77b81e..e742a9c5d4c1 100644 --- a/src/pages/iou/MoneyRequestWaypointPage.tsx +++ b/src/pages/iou/MoneyRequestWaypointPage.tsx @@ -1,6 +1,6 @@ import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {MoneyRequestNavigatorParamList} from '@libs/Navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -9,7 +9,7 @@ import IOURequestStepWaypoint from './request/step/IOURequestStepWaypoint'; type MoneyRequestWaypointPageOnyxProps = { transactionID: string | undefined; }; -type MoneyRequestWaypointPageProps = PlatformStackScreenProps & MoneyRequestWaypointPageOnyxProps; +type MoneyRequestWaypointPageProps = PlatformStackScreenOptionsProps & MoneyRequestWaypointPageOnyxProps; // This component is responsible for grabbing the transactionID from the IOU key // You can't use Onyx props in the withOnyx mapping, so we need to set up and access the transactionID here, and then pass it down so that WaypointEditor can subscribe to the transaction. diff --git a/src/pages/iou/SplitBillDetailsPage.tsx b/src/pages/iou/SplitBillDetailsPage.tsx index 1275452ebd05..9946068e11bc 100644 --- a/src/pages/iou/SplitBillDetailsPage.tsx +++ b/src/pages/iou/SplitBillDetailsPage.tsx @@ -9,7 +9,7 @@ import MoneyRequestHeaderStatusBar from '@components/MoneyRequestHeaderStatusBar import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -51,7 +51,7 @@ type SplitBillDetailsPageOnyxProps = SplitBillDetailsPageTransactionOnyxProps & type SplitBillDetailsPageProps = WithReportAndReportActionOrNotFoundProps & SplitBillDetailsPageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function SplitBillDetailsPage({personalDetails, report, route, reportActions, transaction, draftTransaction, session}: SplitBillDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/AboutPage/ShareLogPage.tsx b/src/pages/settings/AboutPage/ShareLogPage.tsx index ad4006b06e03..64fca1496422 100644 --- a/src/pages/settings/AboutPage/ShareLogPage.tsx +++ b/src/pages/settings/AboutPage/ShareLogPage.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import ShareLogList from './ShareLogList'; -type ShareLogPageProps = PlatformStackScreenProps; +type ShareLogPageProps = PlatformStackScreenOptionsProps; function ShareLogPage({route}: ShareLogPageProps) { return ; diff --git a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx index 81c95b243157..7172f6064950 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx @@ -12,7 +12,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import variables from '@styles/variables'; @@ -31,7 +31,7 @@ type ExitSurveyConfirmPageOnyxProps = { isLoading: OnyxEntry; }; -type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & PlatformStackScreenProps; +type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & PlatformStackScreenOptionsProps; function ExitSurveyConfirmPage({exitReason, isLoading, route, navigation}: ExitSurveyConfirmPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx index 8ade6b170395..9f28445e89c0 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx @@ -16,7 +16,7 @@ import useSafeAreaInsets from '@hooks/useSafeAreaInsets'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import Navigation from '@navigation/Navigation'; @@ -35,7 +35,7 @@ type ExitSurveyResponsePageOnyxProps = { draftResponse: string; }; -type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & PlatformStackScreenProps; +type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & PlatformStackScreenOptionsProps; function ExitSurveyResponsePage({draftResponse, route, navigation}: ExitSurveyResponsePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index 58780d63f5d4..4ce9f8b58351 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -21,7 +21,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import * as User from '@userActions/User'; @@ -41,7 +41,7 @@ const policiesSelector = (policy: OnyxEntry): Pick; +type ContactMethodDetailsPageProps = PlatformStackScreenOptionsProps; function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { const [loginList, loginListResult] = useOnyx(ONYXKEYS.LOGIN_LIST); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx index 5fec33ce4a15..79aee2186fd0 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx @@ -15,7 +15,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -32,7 +32,7 @@ type ContactMethodsPageOnyxProps = { session: OnyxEntry; }; -type ContactMethodsPageProps = ContactMethodsPageOnyxProps & PlatformStackScreenProps; +type ContactMethodsPageProps = ContactMethodsPageOnyxProps & PlatformStackScreenOptionsProps; function ContactMethodsPage({loginList, session, route}: ContactMethodsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index 8edcc669be86..a57e42fb37ce 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -16,7 +16,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as User from '@userActions/User'; import CONST from '@src/CONST'; @@ -32,7 +32,7 @@ type NewContactMethodPageOnyxProps = { loginList: OnyxEntry; }; -type NewContactMethodPageProps = NewContactMethodPageOnyxProps & PlatformStackScreenProps; +type NewContactMethodPageProps = NewContactMethodPageOnyxProps & PlatformStackScreenOptionsProps; const addNewContactMethod = (values: FormOnyxValues) => { const phoneLogin = LoginUtils.getPhoneLogin(values.phoneOrEmail); diff --git a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx index f40405d2e1a6..a48b13e6fc46 100644 --- a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx @@ -9,7 +9,7 @@ import useGeographicalStateFromRoute from '@hooks/useGeographicalStateFromRoute' import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PersonalDetails from '@userActions/PersonalDetails'; import type {FormOnyxValues} from '@src/components/Form/types'; @@ -27,7 +27,7 @@ type AddressPageOnyxProps = { isLoadingApp: OnyxEntry; }; -type AddressPageProps = PlatformStackScreenProps & AddressPageOnyxProps; +type AddressPageProps = PlatformStackScreenOptionsProps & AddressPageOnyxProps; /** * Submit form to update user's first and last legal name diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index 44e61bc7b318..fc8a250ca144 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -5,7 +5,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type {CountryData} from '@libs/searchCountryOptions'; import searchCountryOptions from '@libs/searchCountryOptions'; @@ -15,7 +15,7 @@ import type {TranslationPaths} from '@src/languages/types'; import type {Route} from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type CountrySelectionPageProps = PlatformStackScreenProps; +type CountrySelectionPageProps = PlatformStackScreenOptionsProps; function CountrySelectionPage({route, navigation}: CountrySelectionPageProps) { const [searchValue, setSearchValue] = useState(''); diff --git a/src/pages/settings/Profile/ProfileAvatar.tsx b/src/pages/settings/Profile/ProfileAvatar.tsx index ebec25da7a63..0601c427a30e 100644 --- a/src/pages/settings/Profile/ProfileAvatar.tsx +++ b/src/pages/settings/Profile/ProfileAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -19,7 +19,7 @@ type ProfileAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type ProfileAvatarProps = ProfileAvatarOnyxProps & PlatformStackScreenProps; +type ProfileAvatarProps = ProfileAvatarOnyxProps & PlatformStackScreenOptionsProps; function ProfileAvatar({route, personalDetails, personalDetailsMetadata, isLoadingApp = true}: ProfileAvatarProps) { const personalDetail = personalDetails?.[route.params.accountID]; diff --git a/src/pages/settings/Report/NotificationPreferencePage.tsx b/src/pages/settings/Report/NotificationPreferencePage.tsx index 108b6576ad96..2200c616dafb 100644 --- a/src/pages/settings/Report/NotificationPreferencePage.tsx +++ b/src/pages/settings/Report/NotificationPreferencePage.tsx @@ -5,7 +5,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -14,7 +14,7 @@ import * as ReportActions from '@userActions/Report'; import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; -type NotificationPreferencePageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; +type NotificationPreferencePageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function NotificationPreferencePage({report}: NotificationPreferencePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Report/ReportSettingsPage.tsx b/src/pages/settings/Report/ReportSettingsPage.tsx index 824868792124..2b1c99200443 100644 --- a/src/pages/settings/Report/ReportSettingsPage.tsx +++ b/src/pages/settings/Report/ReportSettingsPage.tsx @@ -11,7 +11,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -22,7 +22,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ReportSettingsPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; +type ReportSettingsPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function ReportSettingsPage({report, policies}: ReportSettingsPageProps) { const reportID = report?.reportID ?? ''; diff --git a/src/pages/settings/Report/RoomNamePage.tsx b/src/pages/settings/Report/RoomNamePage.tsx index f3ae524cc154..922432e7366d 100644 --- a/src/pages/settings/Report/RoomNamePage.tsx +++ b/src/pages/settings/Report/RoomNamePage.tsx @@ -15,7 +15,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; @@ -37,7 +37,7 @@ type RoomNamePageOnyxProps = { policy: OnyxEntry; }; -type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; +type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function RoomNamePage({report, policy, reports}: RoomNamePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Report/VisibilityPage.tsx b/src/pages/settings/Report/VisibilityPage.tsx index b53d10b5a5e1..c05d82398fe1 100644 --- a/src/pages/settings/Report/VisibilityPage.tsx +++ b/src/pages/settings/Report/VisibilityPage.tsx @@ -6,7 +6,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportSettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {WithReportOrNotFoundProps} from '@pages/home/report/withReportOrNotFound'; @@ -16,7 +16,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import type {RoomVisibility} from '@src/types/onyx/Report'; -type VisibilityProps = WithReportOrNotFoundProps & PlatformStackScreenProps; +type VisibilityProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; function VisibilityPage({report}: VisibilityProps) { const [showConfirmModal, setShowConfirmModal] = useState(false); diff --git a/src/pages/settings/Report/WriteCapabilityPage.tsx b/src/pages/settings/Report/WriteCapabilityPage.tsx index 6b3dd77a94e8..38a2f0ab48f4 100644 --- a/src/pages/settings/Report/WriteCapabilityPage.tsx +++ b/src/pages/settings/Report/WriteCapabilityPage.tsx @@ -8,7 +8,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -27,7 +27,7 @@ type WriteCapabilityPageOnyxProps = { type WriteCapabilityPageProps = WriteCapabilityPageOnyxProps & WithReportOrNotFoundProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WriteCapabilityPage({report, policy}: WriteCapabilityPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Security/CloseAccountPage.tsx b/src/pages/settings/Security/CloseAccountPage.tsx index dc67f04303d5..4516f53cfee6 100644 --- a/src/pages/settings/Security/CloseAccountPage.tsx +++ b/src/pages/settings/Security/CloseAccountPage.tsx @@ -14,7 +14,7 @@ import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import * as CloseAccount from '@userActions/CloseAccount'; @@ -30,7 +30,7 @@ type CloseAccountPageOnyxProps = { session: OnyxEntry; }; -type CloseAccountPageProps = CloseAccountPageOnyxProps & PlatformStackScreenProps; +type CloseAccountPageProps = CloseAccountPageOnyxProps & PlatformStackScreenOptionsProps; function CloseAccountPage({session}: CloseAccountPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx index 791a3054f3d8..4638add5c6b9 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx @@ -18,7 +18,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as CardSettings from '@userActions/Card'; @@ -34,7 +34,7 @@ type ActivatePhysicalCardPageOnyxProps = { cardList: OnyxEntry>; }; -type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & PlatformStackScreenProps; +type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & PlatformStackScreenOptionsProps; const LAST_FOUR_DIGITS_LENGTH = 4; const MAGIC_INPUT_MIN_HEIGHT = 86; diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx index 5636358dfe6f..102ad35f2474 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx @@ -4,7 +4,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import AddressForm from '@components/AddressForm'; import useLocalize from '@hooks/useLocalize'; import * as FormActions from '@libs/actions/FormActions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -18,7 +18,7 @@ type GetPhysicalCardAddressOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & PlatformStackScreenProps; +type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & PlatformStackScreenOptionsProps; function GetPhysicalCardAddress({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx index 9fcca69a611d..ed8801628fd3 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx @@ -7,7 +7,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -34,7 +34,7 @@ type GetPhysicalCardConfirmOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & PlatformStackScreenProps; +type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & PlatformStackScreenOptionsProps; function GetPhysicalCardConfirm({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx index f9a62195f81f..780709c578df 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx @@ -5,7 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -26,7 +26,7 @@ type GetPhysicalCardNameOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & PlatformStackScreenProps; +type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & PlatformStackScreenOptionsProps; function GetPhysicalCardName({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx index d2eeb0d59c61..e2b6e7b4b726 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx @@ -5,7 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import * as LoginUtils from '@libs/LoginUtils'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -24,7 +24,7 @@ type GetPhysicalCardPhoneOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & PlatformStackScreenProps; +type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & PlatformStackScreenOptionsProps; function GetPhysicalCardPhone({ route: { diff --git a/src/pages/settings/Wallet/ExpensifyCardPage.tsx b/src/pages/settings/Wallet/ExpensifyCardPage.tsx index 4dac01544b23..63d7cf6cbddc 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage.tsx +++ b/src/pages/settings/Wallet/ExpensifyCardPage.tsx @@ -19,7 +19,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as GetPhysicalCardUtils from '@libs/GetPhysicalCardUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -49,7 +49,7 @@ type ExpensifyCardPageOnyxProps = { loginList: OnyxEntry; }; -type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & PlatformStackScreenProps; +type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & PlatformStackScreenOptionsProps; function ExpensifyCardPage({ cardList, diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 585518fd59f2..9258506a1223 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -13,7 +13,7 @@ import usePrevious from '@hooks/usePrevious'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -61,7 +61,7 @@ type ReportCardLostPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportCardLostPageProps = ReportCardLostPageOnyxProps & PlatformStackScreenProps; +type ReportCardLostPageProps = ReportCardLostPageOnyxProps & PlatformStackScreenOptionsProps; function ReportCardLostPage({ privatePersonalDetails = { diff --git a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx index 1b8eb22ac649..3170a20085da 100644 --- a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx +++ b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx @@ -12,7 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -31,7 +31,7 @@ type ReportVirtualCardFraudPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & PlatformStackScreenProps; +type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & PlatformStackScreenOptionsProps; function ReportVirtualCardFraudPage({ route: { diff --git a/src/pages/tasks/NewTaskDescriptionPage.tsx b/src/pages/tasks/NewTaskDescriptionPage.tsx index 8bef635dec64..c901021acd9e 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.tsx +++ b/src/pages/tasks/NewTaskDescriptionPage.tsx @@ -14,7 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import * as TaskActions from '@userActions/Task'; @@ -30,7 +30,7 @@ type NewTaskDescriptionPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & PlatformStackScreenProps; +type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & PlatformStackScreenOptionsProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskDetailsPage.tsx b/src/pages/tasks/NewTaskDetailsPage.tsx index 50fb856103bc..f15b566642e7 100644 --- a/src/pages/tasks/NewTaskDetailsPage.tsx +++ b/src/pages/tasks/NewTaskDetailsPage.tsx @@ -14,7 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import playSound, {SOUNDS} from '@libs/Sound'; import * as TaskActions from '@userActions/Task'; @@ -30,7 +30,7 @@ type NewTaskDetailsPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & PlatformStackScreenProps; +type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & PlatformStackScreenOptionsProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index f0f12d4776c8..5498efb5a77e 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -36,7 +36,7 @@ type NewTaskPageOnyxProps = { reports: OnyxCollection; }; -type NewTaskPageProps = NewTaskPageOnyxProps & PlatformStackScreenProps; +type NewTaskPageProps = NewTaskPageOnyxProps & PlatformStackScreenOptionsProps; function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/tasks/NewTaskTitlePage.tsx b/src/pages/tasks/NewTaskTitlePage.tsx index f71f20257fff..b5562a978be5 100644 --- a/src/pages/tasks/NewTaskTitlePage.tsx +++ b/src/pages/tasks/NewTaskTitlePage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as TaskActions from '@userActions/Task'; import CONST from '@src/CONST'; @@ -27,7 +27,7 @@ type NewTaskTitlePageOnyxProps = { /** Task Creation Data */ task: OnyxEntry; }; -type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & PlatformStackScreenProps; +type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & PlatformStackScreenOptionsProps; function NewTaskTitlePage({task}: NewTaskTitlePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/wallet/WalletStatementPage.tsx b/src/pages/wallet/WalletStatementPage.tsx index 915df16305fd..0cbe411c565f 100644 --- a/src/pages/wallet/WalletStatementPage.tsx +++ b/src/pages/wallet/WalletStatementPage.tsx @@ -14,7 +14,7 @@ import DateUtils from '@libs/DateUtils'; import fileDownload from '@libs/fileDownload'; import Growl from '@libs/Growl'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WalletStatementNavigatorParamList} from '@navigation/types'; import * as User from '@userActions/User'; import CONFIG from '@src/CONFIG'; @@ -27,7 +27,7 @@ type WalletStatementOnyxProps = { walletStatement: OnyxEntry; }; -type WalletStatementPageProps = WalletStatementOnyxProps & PlatformStackScreenProps; +type WalletStatementPageProps = WalletStatementOnyxProps & PlatformStackScreenOptionsProps; function WalletStatementPage({walletStatement, route}: WalletStatementPageProps) { const themePreference = useThemePreference(); diff --git a/src/pages/workspace/WorkspaceAvatar.tsx b/src/pages/workspace/WorkspaceAvatar.tsx index fff2b9c19ddb..adafbf1ca5b3 100644 --- a/src/pages/workspace/WorkspaceAvatar.tsx +++ b/src/pages/workspace/WorkspaceAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -16,7 +16,7 @@ type WorkspaceAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & PlatformStackScreenProps; +type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceAvatar({policy, isLoadingApp = true}: WorkspaceAvatarProps) { const avatarURL = policy?.avatar ?? '' ? policy?.avatar ?? '' : ReportUtils.getDefaultWorkspaceAvatar(policy?.name ?? ''); diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 0dc95b072b36..c5e8f6a9520c 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -20,7 +20,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import getTopmostWorkspacesCentralPaneName from '@libs/Navigation/getTopmostWorkspacesCentralPaneName'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import {getDefaultWorkspaceAvatar} from '@libs/ReportUtils'; import type {FullScreenNavigatorParamList} from '@navigation/types'; @@ -71,7 +71,7 @@ type WorkspaceInitialPageOnyxProps = { type WorkspaceInitialPageProps = WithPolicyAndFullscreenLoadingProps & WorkspaceInitialPageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function dismissError(policyID: string) { PolicyUtils.goBackFromInvalidPolicy(); diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.tsx b/src/pages/workspace/WorkspaceInviteMessagePage.tsx index 6a955419908f..3a9391528eba 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx +++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx @@ -22,7 +22,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -54,7 +54,7 @@ type WorkspaceInviteMessagePageOnyxProps = { type WorkspaceInviteMessagePageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceInviteMessagePageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index dd513b621e47..72cf706d29fd 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -18,7 +18,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {MemberForList} from '@libs/OptionsListUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -50,7 +50,7 @@ type WorkspaceInvitePageOnyxProps = { type WorkspaceInvitePageProps = WithPolicyAndFullscreenLoadingProps & WithNavigationTransitionEndProps & WorkspaceInvitePageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WorkspaceInvitePage({route, betas, invitedEmailsToAccountIDsDraft, policy, isLoadingReportData = true}: WorkspaceInvitePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/WorkspaceJoinUserPage.tsx b/src/pages/workspace/WorkspaceJoinUserPage.tsx index 9e62a8d66071..b67192f907dd 100644 --- a/src/pages/workspace/WorkspaceJoinUserPage.tsx +++ b/src/pages/workspace/WorkspaceJoinUserPage.tsx @@ -5,7 +5,7 @@ import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import navigateAfterJoinRequest from '@libs/navigateAfterJoinRequest'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; import * as PolicyAction from '@userActions/Policy'; @@ -20,7 +20,7 @@ type WorkspaceJoinUserPageOnyxProps = { policy: OnyxEntry; }; -type WorkspaceJoinUserPageRoute = {route: PlatformStackScreenProps['route']}; +type WorkspaceJoinUserPageRoute = {route: PlatformStackScreenOptionsProps['route']}; type WorkspaceJoinUserPageProps = WorkspaceJoinUserPageRoute & WorkspaceJoinUserPageOnyxProps; let isJoinLinkUsed = false; diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index e60bebbcca05..260c7b0a4170 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -31,7 +31,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -58,7 +58,7 @@ type WorkspaceMembersPageOnyxProps = { type WorkspaceMembersPageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceMembersPageOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; /** * Inverts an object, equivalent of _.invert diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 5a4910f5c340..386908c75578 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -11,7 +11,7 @@ import useNetwork from '@hooks/useNetwork'; import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as Policy from '@userActions/Policy'; import type {TranslationPaths} from '@src/languages/types'; @@ -24,7 +24,7 @@ import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscree import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; import ToggleSettingOptionRow from './workflows/ToggleSettingsOptionRow'; -type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; type Item = { icon: IconAsset; diff --git a/src/pages/workspace/bills/WorkspaceBillsPage.tsx b/src/pages/workspace/bills/WorkspaceBillsPage.tsx index 702f85152680..cfcc3ec576be 100644 --- a/src/pages/workspace/bills/WorkspaceBillsPage.tsx +++ b/src/pages/workspace/bills/WorkspaceBillsPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceBillsNoVBAView from './WorkspaceBillsNoVBAView'; import WorkspaceBillsVBAView from './WorkspaceBillsVBAView'; -type WorkspaceBillsPageProps = PlatformStackScreenProps; +type WorkspaceBillsPageProps = PlatformStackScreenOptionsProps; function WorkspaceBillsPage({route}: WorkspaceBillsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/card/WorkspaceCardPage.tsx b/src/pages/workspace/card/WorkspaceCardPage.tsx index 99f195a9d54b..50e93096ee7e 100644 --- a/src/pages/workspace/card/WorkspaceCardPage.tsx +++ b/src/pages/workspace/card/WorkspaceCardPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -12,7 +12,7 @@ import WorkspaceCardNoVBAView from './WorkspaceCardNoVBAView'; import WorkspaceCardVBANoECardView from './WorkspaceCardVBANoECardView'; import WorkspaceCardVBAWithECardView from './WorkspaceCardVBAWithECardView'; -type WorkspaceCardPageProps = PlatformStackScreenProps; +type WorkspaceCardPageProps = PlatformStackScreenOptionsProps; function WorkspaceCardPage({route}: WorkspaceCardPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/categories/CategorySettingsPage.tsx b/src/pages/workspace/categories/CategorySettingsPage.tsx index 7a856f98332f..4743f5e70720 100644 --- a/src/pages/workspace/categories/CategorySettingsPage.tsx +++ b/src/pages/workspace/categories/CategorySettingsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceCategoryEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type CategorySettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type CategorySettingsPageProps = CategorySettingsPageOnyxProps & PlatformStackScreenProps; +type CategorySettingsPageProps = CategorySettingsPageOnyxProps & PlatformStackScreenOptionsProps; function CategorySettingsPage({route, policyCategories}: CategorySettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/CreateCategoryPage.tsx b/src/pages/workspace/categories/CreateCategoryPage.tsx index 9cb8f19cce13..57078a4f98b3 100644 --- a/src/pages/workspace/categories/CreateCategoryPage.tsx +++ b/src/pages/workspace/categories/CreateCategoryPage.tsx @@ -7,7 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -24,7 +24,7 @@ type WorkspaceCreateCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & PlatformStackScreenProps; +type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & PlatformStackScreenOptionsProps; function CreateCategoryPage({route, policyCategories}: CreateCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/EditCategoryPage.tsx b/src/pages/workspace/categories/EditCategoryPage.tsx index 2eeeea507065..3a5df14c07b7 100644 --- a/src/pages/workspace/categories/EditCategoryPage.tsx +++ b/src/pages/workspace/categories/EditCategoryPage.tsx @@ -7,7 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ type WorkspaceEditCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & PlatformStackScreenProps; +type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & PlatformStackScreenOptionsProps; function EditCategoryPage({route, policyCategories}: EditCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 94dc48be7498..eaf8fd1513b3 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -26,7 +26,7 @@ import {deleteWorkspaceCategories, setWorkspaceCategoryEnabled} from '@libs/acti import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -53,7 +53,7 @@ type WorkspaceCategoriesOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceCategoriesPageProps = WorkspaceCategoriesOnyxProps & PlatformStackScreenProps; +type WorkspaceCategoriesPageProps = WorkspaceCategoriesOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCategoriesPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx index d59150500113..64c520cbf8b1 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx @@ -10,7 +10,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceRequiresCategory} from '@libs/actions/Policy'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -26,7 +26,7 @@ type WorkspaceCategoriesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & PlatformStackScreenProps; +type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceCategoriesSettingsPage({route, policyCategories}: WorkspaceCategoriesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx index 3e7004f21e02..3d17086736ad 100644 --- a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx +++ b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx @@ -10,7 +10,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {getOptimisticRateName, validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -29,7 +29,7 @@ type CreateDistanceRatePageOnyxProps = { policy: OnyxEntry; }; -type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & PlatformStackScreenProps; +type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & PlatformStackScreenOptionsProps; function CreateDistanceRatePage({policy, route}: CreateDistanceRatePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx index 6a10a6dc1039..7ec6f3fe4ce3 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type PolicyDistanceRateDetailsPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & PlatformStackScreenProps; +type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & PlatformStackScreenOptionsProps; function PolicyDistanceRateDetailsPage({policy, route}: PolicyDistanceRateDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx index 22dd4e01af25..8ffbafa02ce7 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx @@ -12,7 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type PolicyDistanceRateEditPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & PlatformStackScreenProps; +type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & PlatformStackScreenOptionsProps; function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 54aa72d7814f..10b851383ed7 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -23,7 +23,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -44,7 +44,7 @@ type PolicyDistanceRatesPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & PlatformStackScreenProps; +type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & PlatformStackScreenOptionsProps; function PolicyDistanceRatesPage({policy, route}: PolicyDistanceRatesPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx index 9183b0860851..8ef68569873f 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx @@ -10,7 +10,7 @@ import type {UnitItemType} from '@components/UnitPicker'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -33,7 +33,8 @@ type PolicyDistanceRatesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & PlatformStackScreenProps; +type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & + PlatformStackScreenOptionsProps; function PolicyDistanceRatesSettingsPage({policy, policyCategories, route}: PolicyDistanceRatesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index 71abf7ea7132..bf2101ca0901 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView'; import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; -type WorkspaceInvoicesPageProps = PlatformStackScreenProps; +type WorkspaceInvoicesPageProps = PlatformStackScreenOptionsProps; function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index 26fbdc5e59c7..7b78c4d920d2 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -17,7 +17,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -40,7 +40,7 @@ type WorkspacePolicyOnyxProps = { type WorkspaceMemberDetailsPageProps = Omit & WorkspacePolicyOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceMemberDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx index 41b718792e9d..70ab6d5ef9d3 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx @@ -10,7 +10,7 @@ import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenOptionsProps; function WorkspaceOwnerChangeErrorPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx index 3b201a8920e7..cf1cd9596a26 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx @@ -5,7 +5,7 @@ import LottieAnimations from '@components/LottieAnimations'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -14,7 +14,7 @@ import * as PolicyActions from '@userActions/Policy'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenOptionsProps; function WorkspaceOwnerChangeSuccessPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx index a264cd0e2592..9a5f1e6f4d64 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx @@ -6,7 +6,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceOwnerChangeCheck from './WorkspaceOwnerChangeCheck'; import WorkspaceOwnerPaymentCardForm from './WorkspaceOwnerPaymentCardForm'; -type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & PlatformStackScreenProps; +type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWrapperPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx index 38f066876d8e..69c31619f1cc 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx @@ -11,7 +11,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import getPermittedDecimalSeparator from '@libs/getPermittedDecimalSeparator'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {Unit} from '@src/types/onyx/Policy'; -type WorkspaceRateAndUnitPageProps = WithPolicyProps & PlatformStackScreenProps; +type WorkspaceRateAndUnitPageProps = WithPolicyProps & PlatformStackScreenOptionsProps; type ValidationError = {rate?: TranslationPaths | undefined}; diff --git a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx index 084141ab368a..8e7e6f5a9f46 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx @@ -1,6 +1,6 @@ import React from 'react'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import withPolicy from '@pages/workspace/withPolicy'; @@ -9,7 +9,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import WorkspaceReimburseView from './WorkspaceReimburseView'; -type WorkspaceReimbursePageProps = WithPolicyProps & PlatformStackScreenProps; +type WorkspaceReimbursePageProps = WithPolicyProps & PlatformStackScreenOptionsProps; function WorkspaceReimbursePage({route, policy}: WorkspaceReimbursePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/tags/EditTagPage.tsx b/src/pages/workspace/tags/EditTagPage.tsx index 03a1c81719a5..3b52e5c22cc5 100644 --- a/src/pages/workspace/tags/EditTagPage.tsx +++ b/src/pages/workspace/tags/EditTagPage.tsx @@ -12,7 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -31,7 +31,7 @@ type EditTagPageOnyxProps = { policyTags: OnyxEntry; }; -type EditTagPageProps = EditTagPageOnyxProps & PlatformStackScreenProps; +type EditTagPageProps = EditTagPageOnyxProps & PlatformStackScreenOptionsProps; function EditTagPage({route, policyTags}: EditTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/TagSettingsPage.tsx b/src/pages/workspace/tags/TagSettingsPage.tsx index c0f8ceefb49a..c9c01b9bf465 100644 --- a/src/pages/workspace/tags/TagSettingsPage.tsx +++ b/src/pages/workspace/tags/TagSettingsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceTagEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -35,7 +35,7 @@ type TagSettingsPageOnyxProps = { policyTags: OnyxEntry; }; -type TagSettingsPageProps = TagSettingsPageOnyxProps & PlatformStackScreenProps; +type TagSettingsPageProps = TagSettingsPageOnyxProps & PlatformStackScreenOptionsProps; function TagSettingsPage({route, policyTags}: TagSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx index 3c8d2e795397..5e35a699af53 100644 --- a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx +++ b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -32,7 +32,7 @@ type WorkspaceCreateTagPageOnyxProps = { policyTags: OnyxEntry; }; -type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & PlatformStackScreenProps; +type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & PlatformStackScreenOptionsProps; function CreateTagPage({route, policyTags}: CreateTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx index efb13e710fbd..ebbb79875905 100644 --- a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type WorkspaceEditTagsPageOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & PlatformStackScreenProps; +type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & PlatformStackScreenOptionsProps; const validateTagName = (values: FormOnyxValues) => { const errors: FormInputErrors = {}; diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 877da930fd9e..bfd71f4b59ea 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -26,7 +26,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -60,7 +60,7 @@ type WorkspaceTagsOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & PlatformStackScreenProps; +type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceTagsPage({policyTags, route}: WorkspaceTagsPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx index 6cfe9d2ef049..cc9a8bbf6e0b 100644 --- a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -28,7 +28,7 @@ type WorkspaceTagsSettingsPageOnyxProps = { /** Collection of tags attached to a policy */ policyTags: OnyxEntry; }; -type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & PlatformStackScreenProps; +type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & PlatformStackScreenOptionsProps; function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index a484e26b6ca4..48202d250872 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {renamePolicyTax, validateTaxName} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxNameForm'; -type NamePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type NamePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index 168cd23a53d7..6a2e19264746 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -11,7 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {updatePolicyTaxValue, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -26,7 +26,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxValueForm'; -type ValuePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type ValuePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; function ValuePage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index c84cd9adb8b2..1d5cfcb25b52 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {createPolicyTax, getNextTaxCode, getTaxValueWithPercentage, validateTaxName, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceNewTaxForm'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; function WorkspaceCreateTaxPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx index ae5c6c838669..fb61822759d7 100644 --- a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx @@ -15,7 +15,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {clearTaxRateFieldError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs/actions/TaxRate'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -28,7 +28,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; function WorkspaceEditTaxPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index 3c763f3c154d..104694cfbc63 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -24,7 +24,7 @@ import {clearTaxRateError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -37,7 +37,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; function WorkspaceTaxesPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx index ab15e94add6a..89b3fc71dc56 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx @@ -11,7 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setPolicyCustomTaxName} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -27,7 +27,7 @@ import INPUT_IDS from '@src/types/form/WorkspaceTaxCustomName'; import type {WorkspaceTaxCustomName} from '@src/types/form/WorkspaceTaxCustomName'; type WorkspaceTaxesSettingsCustomTaxNameProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WorkspaceTaxesSettingsCustomTaxName({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx index 0670c5682cb6..be899ce2eabf 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx @@ -7,7 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setForeignCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsForeignCurrencyProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WorkspaceTaxesSettingsForeignCurrency({ route: { params: {policyID}, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx index ebc32b2f47f2..a1500e5c64f2 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx @@ -8,7 +8,7 @@ import ScrollView from '@components/ScrollView'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -19,7 +19,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; +type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; function WorkspaceTaxesSettingsPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx index 5e9b27ca7a53..e40d7fbcae9c 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx @@ -7,7 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsWorkspaceCurrencyProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; function WorkspaceTaxesSettingsWorkspaceCurrency({ route: { diff --git a/src/pages/workspace/travel/WorkspaceTravelPage.tsx b/src/pages/workspace/travel/WorkspaceTravelPage.tsx index 72bfb6cb924f..a5cbf9aae516 100644 --- a/src/pages/workspace/travel/WorkspaceTravelPage.tsx +++ b/src/pages/workspace/travel/WorkspaceTravelPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceTravelNoVBAView from './WorkspaceTravelNoVBAView'; import WorkspaceTravelVBAView from './WorkspaceTravelVBAView'; -type WorkspaceTravelPageProps = PlatformStackScreenProps; +type WorkspaceTravelPageProps = PlatformStackScreenOptionsProps; function WorkspaceTravelPage({route}: WorkspaceTravelPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx index d80cf676953a..10ce8353eef3 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx @@ -12,7 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as Localize from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -28,7 +28,7 @@ type AutoReportingFrequencyKey = Exclude; type WorkspaceAutoReportingFrequencyPageProps = WithPolicyOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; type WorkspaceAutoReportingFrequencyPageItem = { text: string; diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx index 26dfa84520f4..09787ce3ccb3 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx @@ -7,7 +7,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -21,7 +21,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; const DAYS_OF_MONTH = 28; type WorkspaceAutoReportingMonthlyOffsetProps = WithPolicyOnyxProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; type AutoReportingOffsetKeys = ValueOf; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx index 4637ed01727b..890801b3f80a 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx @@ -15,7 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -37,7 +37,7 @@ type WorkspaceWorkflowsApproverPageOnyxProps = { type WorkspaceWorkflowsApproverPageProps = WorkspaceWorkflowsApproverPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index 0efa55022cfe..ae477c424423 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -15,7 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Permissions from '@libs/Permissions'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -40,7 +40,9 @@ type WorkspaceWorkflowsPageOnyxProps = { /** Beta features list */ betas: OnyxEntry; }; -type WorkspaceWorkflowsPageProps = WithPolicyProps & WorkspaceWorkflowsPageOnyxProps & PlatformStackScreenProps; +type WorkspaceWorkflowsPageProps = WithPolicyProps & + WorkspaceWorkflowsPageOnyxProps & + PlatformStackScreenOptionsProps; function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPageProps) { const {translate, preferredLocale} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx index e16f9d4ea841..52d3a9c76eb4 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx @@ -15,7 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -38,7 +38,7 @@ type WorkspaceWorkflowsPayerPageOnyxProps = { type WorkspaceWorkflowsPayerPageProps = WorkspaceWorkflowsPayerPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenProps; + PlatformStackScreenOptionsProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/tests/perf-test/ReportScreen.perf-test.tsx b/tests/perf-test/ReportScreen.perf-test.tsx index 8dd728899e6f..8833ff80f96e 100644 --- a/tests/perf-test/ReportScreen.perf-test.tsx +++ b/tests/perf-test/ReportScreen.perf-test.tsx @@ -6,7 +6,7 @@ import type Animated from 'react-native-reanimated'; import {measurePerformance} from 'reassure'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import ComposeProviders from '@src/components/ComposeProviders'; import DragAndDropProvider from '@src/components/DragAndDrop/Provider'; @@ -34,7 +34,7 @@ import * as TestHelper from '../utils/TestHelper'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -type ReportScreenWrapperProps = PlatformStackScreenProps; +type ReportScreenWrapperProps = PlatformStackScreenOptionsProps; jest.mock('react-native-reanimated', () => { const actualNav = jest.requireActual('react-native-reanimated/mock'); diff --git a/tests/perf-test/SearchPage.perf-test.tsx b/tests/perf-test/SearchPage.perf-test.tsx index 9b67f234c030..ddf324eb8d1d 100644 --- a/tests/perf-test/SearchPage.perf-test.tsx +++ b/tests/perf-test/SearchPage.perf-test.tsx @@ -10,7 +10,7 @@ import {LocaleContextProvider} from '@components/LocaleContextProvider'; import OptionListContextProvider, {OptionsListContext} from '@components/OptionListContextProvider'; import {KeyboardStateProvider} from '@components/withKeyboardState'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import {createOptionList} from '@libs/OptionsListUtils'; import ChatFinderPage from '@pages/ChatFinderPage'; @@ -126,7 +126,7 @@ afterEach(() => { PusherHelper.teardown(); }); -type ChatFinderPageProps = PlatformStackScreenProps & { +type ChatFinderPageProps = PlatformStackScreenOptionsProps & { betas: OnyxEntry; reports: OnyxCollection; isSearchingForReports: OnyxEntry; From 57a325052467147ced8c609b8cda2f138b12a521 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 19 Apr 2024 17:04:08 +0200 Subject: [PATCH 055/589] play around with animations --- .../Navigation/AppNavigator/ModalNavigatorScreenOptions.ts | 1 + .../Navigation/AppNavigator/getRootNavigatorScreenOptions.ts | 4 ++-- .../AppNavigator/leftModalNavigatorOptions/index.native.ts | 1 + .../AppNavigator/leftModalNavigatorOptions/index.ts | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts index 9d3a6f267599..423c1b482302 100644 --- a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts @@ -10,6 +10,7 @@ import type {ThemeStyles} from '@styles/index'; const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles): PlatformStackNavigationOptions => ({ headerShown: false, cardStyle: themeStyles.navigationScreenCardStyle, + animation: 'slide_from_left', cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, }); diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 4e43d060ec6b..6a0d89f2fad5 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -103,7 +103,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, ...hideKeyboardOnSwipe, title: CONFIG.SITE_TITLE, - animationEnabled: isSmallScreenWidth, + animation: isSmallScreenWidth ? 'none' : undefined, cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), @@ -124,7 +124,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...(isSmallScreenWidth ? {} : themeStyles.borderRight), }, }, - }; + } satisfies ScreenOptions; }; export default getRootNavigatorScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts index 4d8219a32301..71645e81908a 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts @@ -1,6 +1,7 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const leftModalNavigatorOptions: PlatformStackNavigationOptions = { + presentation: 'transparentModal', animation: 'slide_from_left', customAnimationOnGesture: true, }; diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts index 71645e81908a..7a06b0a216e7 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.ts @@ -3,7 +3,7 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStac const leftModalNavigatorOptions: PlatformStackNavigationOptions = { presentation: 'transparentModal', animation: 'slide_from_left', - customAnimationOnGesture: true, + // customAnimationOnGesture: true, }; export default leftModalNavigatorOptions; From 5acaa451ed67e09bc9b85324c7659559e38d587b Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 10:42:46 +0200 Subject: [PATCH 056/589] update patch --- patches/@react-navigation+core+6.4.11.patch | 478 ++++++++++++-------- 1 file changed, 290 insertions(+), 188 deletions(-) diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch index c444da8bb66b..e5236306cbf4 100644 --- a/patches/@react-navigation+core+6.4.11.patch +++ b/patches/@react-navigation+core+6.4.11.patch @@ -1,102 +1,132 @@ -diff --git a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js -index e73a338..d34ed47 100644 ---- a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js -+++ b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js -@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = createNavigatorFactory; -+var React = _interopRequireWildcard(require("react")); - var _Group = _interopRequireDefault(require("./Group")); - var _Screen = _interopRequireDefault(require("./Screen")); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -+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); } -+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; } -+function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - /** - * Higher order component to create a `Navigator` and `Screen` pair. - * Custom navigators should wrap the navigator component in `createNavigator` before exporting. -@@ -14,15 +18,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * @param Navigator The navigtor component to wrap. - * @returns Factory method to create a `Navigator` and `Screen` pair. +diff --git a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js +index 14338b9..ce42362 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js ++++ b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js +@@ -43,7 +43,7 @@ const isValidKey = key => key === undefined || typeof key === 'string' && key != + * + * @param children React Elements to extract the config from. */ --function createNavigatorFactory(Navigator) { -+function createNavigatorFactory(Navigator, transformScreenOptions) { - return function () { - if (arguments[0] !== undefined) { - throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); +-const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { ++const getRouteConfigsFromChildren = (children, groupKey, groupOptions, transformScreenOptions) => { + const configs = React.Children.toArray(children).reduce((acc, child) => { + var _child$type, _child$props; + if ( /*#__PURE__*/React.isValidElement(child)) { +@@ -54,10 +54,14 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the screen '${child.props.name}'. It must be a non-empty string or 'undefined'.`); + } ++ const props = transformScreenOptions === undefined ? child.props : { ++ ...child.props, ++ options: transformScreenOptions(child.props.options) ++ }; + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, +- props: child.props ++ props: props + }); + return acc; + } +@@ -68,7 +72,7 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens +- acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== _Group.default ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions])); ++ acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== _Group.default ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions], transformScreenOptions)); + return acc; + } } -+ const TransformedScreen = transformScreenOptions === undefined ? _Screen.default : _ref => { -+ let { -+ options, -+ ...props -+ } = _ref; -+ return /*#__PURE__*/React.createElement(_Screen.default, _extends({ -+ options: transformScreenOptions(options) -+ }, props)); -+ }; - return { - Navigator, - Group: _Group.default, -- Screen: _Screen.default -+ Screen: TransformedScreen - }; - }; - } -diff --git a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map -index e5c26f6..d7156c8 100644 ---- a/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map -+++ b/node_modules/@react-navigation/core/lib/commonjs/createNavigatorFactory.js.map +@@ -129,7 +133,7 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +-function useNavigationBuilder(createRouter, options) { ++function useNavigationBuilder(createRouter, options, transformScreenOptions) { + const navigatorKey = (0, _useRegisterNavigator.default)(); + const route = React.useContext(_NavigationRouteContext.default); + const { +@@ -145,7 +149,7 @@ function useNavigationBuilder(createRouter, options) { + initialRouteName: route.params.screen + } : null) + })); +- const routeConfigs = getRouteConfigsFromChildren(children); ++ const routeConfigs = getRouteConfigsFromChildren(children, undefined, undefined, transformScreenOptions); + const screens = routeConfigs.reduce((acc, config) => { + if (config.props.name in acc) { + throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); +diff --git a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map +index 55b77ca..179519a 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map ++++ b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map @@ -1 +1 @@ --{"version":3,"names":["createNavigatorFactory","Navigator","arguments","undefined","Error","Group","Screen"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;;;;;AAGA;AACA;AAA8B;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTI,KAAK,EAALA,cAAK;MACLC,MAAM,EAANA;IACF,CAAC;EACH,CAAC;AACH"} -\ No newline at end of file -+{"version":3,"names":["createNavigatorFactory","Navigator","transformScreenOptions","arguments","undefined","Error","TransformedScreen","Screen","options","props","Group"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";;;;;;AACA;AAEA;AACA;AAA8B;AAAA;AAAA;AAAA;AAG9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,sBAAsB,CAO5CC,SAA6B,EAC7BC,sBAA6E,EAC7E;EACA,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,MAAMC,iBAAiB,GACrBJ,sBAAsB,KAAKE,SAAS,GAChCG,eAAM,GACN,QASM;MAAA,IAT8B;QAClCC,OAAO;QACP,GAAGC;MAOL,CAAC;MACC,oBACE,oBAAC,eAAM;QACL,OAAO,EAAEP,sBAAsB,CAC7BM,OAAO;MACP,GACEC,KAAK,EACT;IAEN,CAAC;IAEP,OAAO;MACLR,SAAS;MACTS,KAAK,EAALA,cAAK;MACLH,MAAM,EAAED;IACV,CAAC;EACH,CAAC;AACH"} -\ No newline at end of file -diff --git a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js -index f6f02ca..0836dfb 100644 ---- a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js -+++ b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js -@@ -1,3 +1,5 @@ -+function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -+import * as React from 'react'; - import Group from './Group'; - import Screen from './Screen'; - /** -@@ -7,15 +9,24 @@ import Screen from './Screen'; - * @param Navigator The navigtor component to wrap. - * @returns Factory method to create a `Navigator` and `Screen` pair. +-{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAqBjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAKlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,KACT;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACN,QAAQ,CAAC,CAACO,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAAChB,UAAU,CAACa,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,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,yBAAgB,EAAC;IACfzG,KAAK;IACLsE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMmC,iBAAiB,GAAG,IAAAC,qBAAY,EAAE7J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEwH;EAAW,gBACnD,oBAAC,8BAAqB,QAAExH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLkD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} +\ No newline at end of file ++{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAMlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,EACZC,sBAKC,KACE;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACP,QAAQ,CAAC,CAACQ,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAACjB,UAAU,CAACc,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,CAACI,KAAK,CAACC,aAAa,CACzB,qBACAL,KAAK,CAACI,KAAK,CAACK,IACb,kDAAiD,CACnD;QACH;QAEA,MAAML,KAAK,GACTX,sBAAsB,KAAKL,SAAS,GAChCY,KAAK,CAACI,KAAK,GACX;UACE,GAAGJ,KAAK,CAACI,KAAK;UACdM,OAAO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ACN;IACAkE;EACF,CAAC,CAAC;EAEF,IAAA0C,yBAAgB,EAAC;IACfzG,KAAK;IACLsE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMmC,iBAAiB,GAAG,IAAAC,qBAAY,EAAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js +index 051520b..3062a21 100644 +--- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js ++++ b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js +@@ -35,7 +35,7 @@ const isValidKey = key => key === undefined || typeof key === 'string' && key != + * + * @param children React Elements to extract the config from. */ --export default function createNavigatorFactory(Navigator) { -+export default function createNavigatorFactory(Navigator, transformScreenOptions) { - return function () { - if (arguments[0] !== undefined) { - throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides."); +-const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { ++const getRouteConfigsFromChildren = (children, groupKey, groupOptions, transformScreenOptions) => { + const configs = React.Children.toArray(children).reduce((acc, child) => { + var _child$type, _child$props; + if ( /*#__PURE__*/React.isValidElement(child)) { +@@ -46,10 +46,14 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + if (!isValidKey(child.props.navigationKey)) { + throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the screen '${child.props.name}'. It must be a non-empty string or 'undefined'.`); + } ++ const props = transformScreenOptions === undefined ? child.props : { ++ ...child.props, ++ options: transformScreenOptions(child.props.options) ++ }; + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, +- props: child.props ++ props: props + }); + return acc; + } +@@ -60,7 +64,7 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens +- acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions])); ++ acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions], transformScreenOptions)); + return acc; + } } -+ const TransformedScreen = transformScreenOptions === undefined ? Screen : _ref => { -+ let { -+ options, -+ ...props -+ } = _ref; -+ return /*#__PURE__*/React.createElement(Screen, _extends({ -+ options: transformScreenOptions(options) -+ }, props)); -+ }; - return { - Navigator, - Group, -- Screen -+ Screen: TransformedScreen - }; - }; - } -diff --git a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map -index 0054bc4..954b923 100644 ---- a/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map -+++ b/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js.map +@@ -121,7 +125,7 @@ const getRouteConfigsFromChildren = (children, groupKey, groupOptions) => { + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. + */ +-export default function useNavigationBuilder(createRouter, options) { ++export default function useNavigationBuilder(createRouter, options, transformScreenOptions) { + const navigatorKey = useRegisterNavigator(); + const route = React.useContext(NavigationRouteContext); + const { +@@ -137,7 +141,7 @@ export default function useNavigationBuilder(createRouter, options) { + initialRouteName: route.params.screen + } : null) + })); +- const routeConfigs = getRouteConfigsFromChildren(children); ++ const routeConfigs = getRouteConfigsFromChildren(children, undefined, undefined, transformScreenOptions); + const screens = routeConfigs.reduce((acc, config) => { + if (config.props.name in acc) { + throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); +diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map +index 5d5cdbd..5dfa49a 100644 +--- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map ++++ b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map @@ -1 +1 @@ --{"version":3,"names":["Group","Screen","createNavigatorFactory","Navigator","arguments","undefined","Error"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":"AAGA,OAAOA,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAG7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,CAK5CC,SAA6B,EAAE;EAC/B,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,OAAO;MACLH,SAAS;MACTH,KAAK;MACLC;IACF,CAAC;EACH,CAAC;AACH"} +-{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","getStateListeners","defaultScreenOptions","NavigationContent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":"AAAA,SACEA,aAAa,QAUR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAKEC,iBAAiB,QAGZ,SAAS;AAChB,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,cAAc,MAAkC,kBAAkB;AACzE,OAAOC,eAAe,MAAM,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","createNavigatorFactory","Navigator","transformScreenOptions","arguments","undefined","Error","TransformedScreen","options","props"],"sourceRoot":"../../src","sources":["createNavigatorFactory.tsx"],"mappings":";AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,MAAM,MAAM,UAAU;AAG7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,sBAAsB,CAO5CC,SAA6B,EAC7BC,sBAA6E,EAC7E;EACA,OAAO,YAML;IACA,IAAIC,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,EAAE;MAC9B,MAAM,IAAIC,KAAK,CACb,+LAA+L,CAChM;IACH;IAEA,MAAMC,iBAAiB,GACrBJ,sBAAsB,KAAKE,SAAS,GAChCL,MAAM,GACN,QASM;MAAA,IAT8B;QAClCQ,OAAO;QACP,GAAGC;MAOL,CAAC;MACC,oBACE,oBAAC,MAAM;QACL,OAAO,EAAEN,sBAAsB,CAC7BK,OAAO;MACP,GACEC,KAAK,EACT;IAEN,CAAC;IAEP,OAAO;MACLP,SAAS;MACTH,KAAK;MACLC,MAAM,EAAEO;IACV,CAAC;EACH,CAAC;AACH"} ++{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","getStateListeners","defaultScreenOptions","NavigationContent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":"AAAA,SACEA,aAAa,QAUR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAKEC,iBAAiB,QAGZ,SAAS;AAChB,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,cAAc,MAAkC,kBAAkB;AACzE,OAAOC,eAAe,MAAM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GxJ,YAAY,CAAEiB,QAAyB,iBAC/D,oBAAC,wBAAwB,CAAC,QAAQ;IAAC,KAAK,EAAE6G;EAAW,gBACnD,oBAAC,qBAAqB,QAAE7G,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACL6C,KAAK;IACLgE,UAAU;IACVC,WAAW;IACXyB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts new file mode 100644 @@ -478,110 +508,182 @@ index 0000000..0f1e440 @@ -0,0 +1 @@ +{"version":3,"file":"useRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useRoute.test.tsx"],"names":[],"mappings":""} \ No newline at end of file -diff --git a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts -index 55a87da..89ab338 100644 ---- a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts -+++ b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts -@@ -1,5 +1,5 @@ - import type { NavigationState, ParamListBase } from '@react-navigation/routers'; --import type * as React from 'react'; -+import * as React from 'react'; - import type { EventMapBase, TypedNavigator } from './types'; +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts +index 53d474e..050b605 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts ++++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts +@@ -1,6 +1,6 @@ + import { DefaultRouterOptions, NavigationState, ParamListBase, PartialState, RouterFactory } from '@react-navigation/routers'; + import * as React from 'react'; +-import { DefaultNavigatorOptions, EventMapCore, PrivateValueStore, RouteProp } from './types'; ++import { DefaultNavigatorOptions, EventMapBase, EventMapCore, PrivateValueStore, RouteConfig, RouteProp } from './types'; + type NavigationBuilderOptions = { + /** + * Default options specified by the navigator. +@@ -12,6 +12,8 @@ type NavigationBuilderOptions = { + options: ScreenOptions; + }) => ScreenOptions); + }; ++type ScreenOptionsProp = RouteConfig['options']; ++type TransformScreenOptions, TransformedScreenOptions extends ScreenOptions = ScreenOptions> = (options: ScreenOptionsProp) => ScreenOptionsProp; /** - * Higher order component to create a `Navigator` and `Screen` pair. -@@ -8,5 +8,5 @@ import type { EventMapBase, TypedNavigator } from './types'; - * @param Navigator The navigtor component to wrap. - * @returns Factory method to create a `Navigator` and `Screen` pair. + * Hook for building navigators. + * +@@ -19,7 +21,7 @@ type NavigationBuilderOptions = { + * @param options Options object containing `children` and additional options for the router. + * @returns An object containing `state`, `navigation`, `descriptors` objects. */ --export default function createNavigatorFactory>(Navigator: NavigatorComponent): () => TypedNavigator; -+export default function createNavigatorFactory, TransformedScreenOptions extends {} = ScreenOptions>(Navigator: NavigatorComponent, transformScreenOptions?: (options: ScreenOptions) => TransformedScreenOptions): () => TypedNavigator; - //# sourceMappingURL=createNavigatorFactory.d.ts.map -\ No newline at end of file -diff --git a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map -index 27faf3e..a0f9a20 100644 ---- a/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map -+++ b/node_modules/@react-navigation/core/lib/typescript/src/createNavigatorFactory.d.ts.map +-export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions): { ++export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record, TransformedScreenOptions extends ScreenOptions = ScreenOptions>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions, transformScreenOptions?: TransformScreenOptions): { + state: State; + navigation: { + dispatch(action: Readonly<{ +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map +index 33762f4..5484c68 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map ++++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map @@ -1 +1 @@ --{"version":3,"file":"createNavigatorFactory.d.ts","sourceRoot":"","sources":["../../../src/createNavigatorFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,kBAAkB,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EACnD,SAAS,EAAE,kBAAkB,wHAoB9B"} -\ No newline at end of file -+{"version":3,"file":"createNavigatorFactory.d.ts","sourceRoot":"","sources":["../../../src/createNavigatorFactory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,kBAAkB,SAAS,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EACnD,wBAAwB,SAAS,EAAE,GAAG,aAAa,EAEnD,SAAS,EAAE,kBAAkB,EAC7B,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,wBAAwB,wHA4C9E"} -\ No newline at end of file -diff --git a/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx b/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx -index e367956..50ce1c9 100644 ---- a/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx -+++ b/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx -@@ -1,9 +1,9 @@ - import type { NavigationState, ParamListBase } from '@react-navigation/routers'; --import type * as React from 'react'; -+import * as React from 'react'; +-{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EAEvB,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAwLF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,CACT,GACC,wBAAwB,CAAC,aAAa,CAAC,GACvC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0chB"} +\ No newline at end of file ++{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,YAAY,EAEZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAOF,KAAK,iBAAiB,CACpB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IACjD,WAAW,C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0cF"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +index b1971ba..8dc3b8a 100644 +--- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx ++++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +@@ -68,6 +68,41 @@ type NavigatorRoute = { + params?: NavigatorScreenParams; + }; - import Group from './Group'; - import Screen from './Screen'; --import type { EventMapBase, TypedNavigator } from './types'; -+import type { EventMapBase, RouteConfig, TypedNavigator } from './types'; ++type ScreenOptionsProp< ++ State extends NavigationState, ++ ScreenOptions extends {}, ++ EventMap extends EventMapBase, ++ ParamList extends ParamListBase, ++ RouteName extends keyof ParamList = keyof ParamList ++> = RouteConfig< ++ ParamList, ++ RouteName, ++ State, ++ ScreenOptions, ++ EventMap ++>['options']; ++ ++type TransformScreenOptions< ++ State extends NavigationState, ++ ScreenOptions extends {}, ++ EventMap extends Record, ++ TransformedScreenOptions extends ScreenOptions = ScreenOptions ++> = ( ++ options: ScreenOptionsProp< ++ State, ++ ScreenOptions, ++ EventMap, ++ ParamList, ++ RouteName ++ > ++) => ScreenOptionsProp< ++ State, ++ TransformedScreenOptions, ++ EventMap, ++ ParamList, ++ RouteName ++>; ++ + const isValidKey = (key: unknown) => + key === undefined || (typeof key === 'string' && key !== ''); - /** - * Higher order component to create a `Navigator` and `Screen` pair. -@@ -16,8 +16,12 @@ export default function createNavigatorFactory< +@@ -79,7 +114,8 @@ const isValidKey = (key: unknown) => + const getRouteConfigsFromChildren = < State extends NavigationState, ScreenOptions extends {}, - EventMap extends EventMapBase, -- NavigatorComponent extends React.ComponentType -->(Navigator: NavigatorComponent) { -+ NavigatorComponent extends React.ComponentType, -+ TransformedScreenOptions extends {} = ScreenOptions, -+>( -+ Navigator: NavigatorComponent, -+ transformScreenOptions?: (options: ScreenOptions) => TransformedScreenOptions -+) { - return function (): TypedNavigator< - ParamList, +- EventMap extends EventMapBase ++ EventMap extends EventMapBase, ++ TransformedScreenOptions extends ScreenOptions = ScreenOptions + >( + children: React.ReactNode, + groupKey?: string, +@@ -87,7 +123,13 @@ const getRouteConfigsFromChildren = < State, -@@ -31,10 +35,33 @@ export default function createNavigatorFactory< - ); - } + ScreenOptions, + EventMap +- >['options'] ++ >['options'], ++ transformScreenOptions?: TransformScreenOptions< ++ State, ++ ScreenOptions, ++ EventMap, ++ TransformedScreenOptions ++ > + ) => { + const configs = React.Children.toArray(children).reduce< + ScreenConfigWithParent[] +@@ -107,14 +149,22 @@ const getRouteConfigsFromChildren = < + ); + } -+ const TransformedScreen = -+ transformScreenOptions === undefined -+ ? Screen -+ : ({ -+ options, -+ ...props -+ }: RouteConfig< -+ ParamList, -+ RouteName, -+ State, -+ ScreenOptions, -+ EventMap -+ >) => { -+ return ( -+ -+ ) as unknown as null; -+ }; ++ const props = ++ transformScreenOptions === undefined ++ ? child.props ++ : { ++ ...child.props, ++ options: transformScreenOptions(child.props.options), ++ }; + - return { - Navigator, - Group, -- Screen, -+ Screen: TransformedScreen, - }; - }; - } -diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx -index b1971ba..8e688db 100644 ---- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx -+++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx -@@ -49,7 +49,7 @@ import useScheduleUpdate from './useScheduleUpdate'; - // eslint-disable-next-line babel/no-unused-expressions - PrivateValueStore; + acc.push({ + keys: [groupKey, child.props.navigationKey], + options: groupOptions, +- props: child.props as RouteConfig< ++ props: props as RouteConfig< + ParamListBase, + string, + State, +- ScreenOptions, ++ TransformedScreenOptions, + EventMap + >, + }); +@@ -140,7 +190,8 @@ const getRouteConfigsFromChildren = < + ? groupOptions + : groupOptions != null + ? [...groupOptions, child.props.screenOptions] +- : [child.props.screenOptions] ++ : [child.props.screenOptions], ++ transformScreenOptions + ) + ); + return acc; +@@ -257,7 +308,8 @@ export default function useNavigationBuilder< + RouterOptions extends DefaultRouterOptions, + ActionHelpers extends Record void>, + ScreenOptions extends {}, +- EventMap extends Record ++ EventMap extends Record, ++ TransformedScreenOptions extends ScreenOptions = ScreenOptions + >( + createRouter: RouterFactory, + options: DefaultNavigatorOptions< +@@ -267,7 +319,13 @@ export default function useNavigationBuilder< + EventMap + > & + NavigationBuilderOptions & +- RouterOptions ++ RouterOptions, ++ transformScreenOptions?: TransformScreenOptions< ++ State, ++ ScreenOptions, ++ EventMap, ++ TransformedScreenOptions ++ > + ) { + const navigatorKey = useRegisterNavigator(); + +@@ -292,7 +350,7 @@ export default function useNavigationBuilder< + State, + ScreenOptions, + EventMap +- >(children); ++ >(children, undefined, undefined, transformScreenOptions); --type NavigationBuilderOptions = { -+export type NavigationBuilderOptions = { - /** - * Default options specified by the navigator. - * It receives the custom options in the arguments if a function is specified. + const screens = routeConfigs.reduce< + Record> From a34607606530069d87d4e164732c63166952de46 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 11:10:09 +0200 Subject: [PATCH 057/589] fix: patch --- patches/@react-navigation+core+6.4.11.patch | 140 ++++++++++++++------ 1 file changed, 103 insertions(+), 37 deletions(-) diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch index e5236306cbf4..27e29484545a 100644 --- a/patches/@react-navigation+core+6.4.11.patch +++ b/patches/@react-navigation+core+6.4.11.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js -index 14338b9..ce42362 100644 +index 14338b9..57e1fa2 100644 --- a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js +++ b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js @@ -43,7 +43,7 @@ const isValidKey = key => key === undefined || typeof key === 'string' && key != @@ -23,7 +23,7 @@ index 14338b9..ce42362 100644 keys: [groupKey, child.props.navigationKey], options: groupOptions, - props: child.props -+ props: props ++ props }); return acc; } @@ -55,16 +55,16 @@ index 14338b9..ce42362 100644 if (config.props.name in acc) { throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); diff --git a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map -index 55b77ca..179519a 100644 +index 55b77ca..de10a37 100644 --- a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map +++ b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js.map @@ -1 +1 @@ -{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAqBjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAKlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,KACT;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACN,QAAQ,CAAC,CAACO,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAAChB,UAAU,CAACa,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,CAACI,KAAK,CAACC,aAAa,CACzB,qBACAL,KAAK,CAACI,KAAK,CAACK,IACb,kDAAiD,CACnD;QACH;QAEAV,GAAG,CAACW,IAAI,CAAC;UACPC,IAAI,EAAE,CAACnB,QAAQ,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AAC,QAAQ;IAAC,KAAK,EAAEwH;EAAW,gBACnD,oBAAC,8BAAqB,QAAExH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLkD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} \ No newline at end of file -+{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAMlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,EACZC,sBAKC,KACE;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACP,QAAQ,CAAC,CAACQ,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAACjB,UAAU,CAACc,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,CAACI,KAAK,CAACC,aAAa,CACzB,qBACAL,KAAK,CAACI,KAAK,CAACK,IACb,kDAAiD,CACnD;QACH;QAEA,MAAML,KAAK,GACTX,sBAAsB,KAAKL,SAAS,GAChCY,KAAK,CAACI,KAAK,GACX;UACE,GAAGJ,KAAK,CAACI,KAAK;UACdM,OAAO,EAAEjB,sBAAsB,CAACO,KAAK,CAACI,KAAK,CAACM,OAAO;QACrD,CAAC;QAEPX,GAAG,CAACY,IAAI,CAAC;UACPC,IAAI,EAAE,CAACrB,QAAQ,EAAES,KAAK,CAACI,KA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AAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} ++{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAMlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,EACZC,sBAKC,KACE;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACP,QAAQ,CAAC,CAACQ,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAACjB,UAAU,CAACc,KAAK,CAACI,KAAK,CAACC,aAAa,CAAC,EAAE;UAC1C,MAAM,IAAIC,KAAK,CACZ,wCAAuCC,IAAI,CAACC,SAAS,CACpDR,KAAK,CAACI,KAAK,CAACC,aAAa,CACzB,qBACAL,KAAK,CAACI,KAAK,CAACK,IACb,kDAAiD,CACnD;QACH;QAEA,MAAML,KAML,GACCX,sBAAsB,KAAKL,SAAS,GAChCY,KAAK,CAACI,KAAK,GACX;UACE,GAAGJ,KAAK,CAACI,KAAK;UACdM,OAAO,EAAEjB,sBAAsB,CAACO,KAAK,CAACI,KAAK,CAACM,OAAO;QACrD,CAAC;QAEPX,GAAG,CAACY,IAAI,CAAC;UACPC,IAAI,EAAE,CAACrB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AAAC,qBAAY,EAAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js -index 051520b..3062a21 100644 +index 051520b..01247b9 100644 --- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js +++ b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js @@ -35,7 +35,7 @@ const isValidKey = key => key === undefined || typeof key === 'string' && key != @@ -88,7 +88,7 @@ index 051520b..3062a21 100644 keys: [groupKey, child.props.navigationKey], options: groupOptions, - props: child.props -+ props: props ++ props }); return acc; } @@ -120,13 +120,13 @@ index 051520b..3062a21 100644 if (config.props.name in acc) { throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`); diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map -index 5d5cdbd..5dfa49a 100644 +index 5d5cdbd..2cb1aaf 100644 --- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map +++ b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js.map @@ -1 +1 @@ -{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","push","keys","options","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","getStateListeners","defaultScreenOptions","NavigationContent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":"AAAA,SACEA,aAAa,QAUR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAKE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,KAAK,EAAE4G;EAAW,gBACnD,oBAAC,qBAAqB,QAAE5G,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACL4C,KAAK;IACLgE,UAAU;IACVC,WAAW;IACXyB;EACF,CAAC;AACH"} \ No newline at end of file -+{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","get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AEhH,OAAO,CAACgH,EAAE;IACdN,QAAQ;IACRxD,QAAQ;IACRmC,OAAO;IACP7D;EACF,CAAC,CAAC;EAEFvD,kCAAkC,CAAC;IACjC0H,UAAU;IACVsB,gBAAgB,EAAEX,cAAc,CAACY;EACnC,CAAC,CAAC;EAEF5I,aAAa,CAAC;IACZ4E,QAAQ;IACRiE,iBAAiB,EAAEX,cAAc,CAACtD;EACpC,CAAC,CAAC;EAEF,MAAM0C,WAAW,GAAG7H,cAAc,CAKhC;IACA4D,KAAK;IACLK,OAAO;IACP2D,UAAU;IACVvF,aAAa,EAAEJ,OAAO,CAACI,aAAa;IACpCgH,oBAAoB,EAAEpH,OAAO,CAACoH,oBAAoB;IAClDV,QAAQ;IACRxD,QAAQ;IACRE,QAAQ;IACR2D,YAAY;IACZR,WAAW;IACXE,gBAAgB;IAChBjF,MAAM;IACN;IACA6D;EACF,CAAC,CAAC;EAEFvH,gBAAgB,CAAC;IACf6D,KAAK;IACLgE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMyB,iBAAiB,GAAGxJ,YAAY,CAAEiB,QAAyB,iBAC/D,oBAAC,wBAAwB,CAAC,QAAQ;IAAC,KAAK,EAAE6G;EAAW,gBACnD,oBAAC,qBAAqB,QAAE7G,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACL6C,KAAK;IACLgE,UAAU;IACVC,WAAW;IACXyB;EACF,CAAC;AACH"} ++{"version":3,"names":["CommonActions","React","isValidElementType","Group","isArrayEqual","isRecordEqual","NavigationHelpersContext","NavigationRouteContext","NavigationStateContext","PreventRemoveProvider","Screen","PrivateValueStore","useChildListeners","useComponent","useCurrentRender","useDescriptors","useEventEmitter","useFocusedListenersChildrenAdapter","useFocusEvents","useKeyedChildListeners","useNavigationHelpers","useOnAction","useOnGetState","useOnRouteFocus","useRegisterNavigator","useScheduleUpdate","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","Children","toArray","reduce","acc","child","isValidElement","type","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","route","useContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","setTimeout","initializedStateRef","emitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","emit","data","childListeners","addListener","keyedListeners","addKeyedListener","onAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","id","focusedListeners","focus","getStateListeners","defaultScreenOptions","NavigationContent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":"AAAA,SACEA,aAAa,QAUR,2BAA2B;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAKEC,iBAAiB,QAGZ,SAAS;AAChB,OAAOC,i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,MAAM;IACN;IACA6D;EACF,CAAC,CAAC;EAEFvH,gBAAgB,CAAC;IACf6D,KAAK;IACLgE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMyB,iBAAiB,GAAGxJ,YAAY,CAAEiB,QAAyB,iBAC/D,oBAAC,wBAAwB,CAAC,QAAQ;IAAC,KAAK,EAAE6G;EAAW,gBACnD,oBAAC,qBAAqB,QAAE7G,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACL6C,KAAK;IACLgE,UAAU;IACVC,WAAW;IACXyB;EACF,CAAC;AACH"} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/__tests__/BaseNavigationContainer.test.d.ts new file mode 100644 @@ -509,7 +509,7 @@ index 0000000..0f1e440 +{"version":3,"file":"useRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useRoute.test.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts -index 53d474e..050b605 100644 +index 53d474e..87c846d 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts +++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts @@ -1,6 +1,6 @@ @@ -525,7 +525,7 @@ index 53d474e..050b605 100644 }) => ScreenOptions); }; +type ScreenOptionsProp = RouteConfig['options']; -+type TransformScreenOptions, TransformedScreenOptions extends ScreenOptions = ScreenOptions> = (options: ScreenOptionsProp) => ScreenOptionsProp; ++type TransformScreenOptions, TransformedScreenOptions extends {} = ScreenOptions> = (options: ScreenOptionsProp) => ScreenOptionsProp; /** * Hook for building navigators. * @@ -534,21 +534,39 @@ index 53d474e..050b605 100644 * @returns An object containing `state`, `navigation`, `descriptors` objects. */ -export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions): { -+export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record, TransformedScreenOptions extends ScreenOptions = ScreenOptions>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions, transformScreenOptions?: TransformScreenOptions): { ++export default function useNavigationBuilder void>, ScreenOptions extends {}, EventMap extends Record, TransformedScreenOptions extends {} = ScreenOptions>(createRouter: RouterFactory, options: DefaultNavigatorOptions & NavigationBuilderOptions & RouterOptions, transformScreenOptions?: TransformScreenOptions): { state: State; navigation: { dispatch(action: Readonly<{ +@@ -118,7 +120,7 @@ export default function useNavigationBuilder & import("./types").EventEmitter & { + setParams(params: Partial): void; + } & ActionHelpers; +- descriptors: Record, {}, {}> | undefined>(id?: string | undefined): T_1; + setParams(params: Partial): void; +- setOptions(options: Partial): void; ++ setOptions(options: Partial): void; + } & import("./types").EventConsumer> & PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp>>; + NavigationContent: ({ children }: { + children: React.ReactNode; diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map -index 33762f4..5484c68 100644 +index 33762f4..8370e58 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map +++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EAEvB,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAwLF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,CACT,GACC,wBAAwB,CAAC,aAAa,CAAC,GACvC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0chB"} \ No newline at end of file -+{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EACvB,YAAY,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8cF"} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx -index b1971ba..8dc3b8a 100644 +index b1971ba..05d3976 100644 --- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx @@ -68,6 +68,41 @@ type NavigatorRoute = { @@ -573,7 +591,7 @@ index b1971ba..8dc3b8a 100644 + State extends NavigationState, + ScreenOptions extends {}, + EventMap extends Record, -+ TransformedScreenOptions extends ScreenOptions = ScreenOptions ++ TransformedScreenOptions extends {} = ScreenOptions +> = ( + options: ScreenOptionsProp< + State, @@ -593,19 +611,20 @@ index b1971ba..8dc3b8a 100644 const isValidKey = (key: unknown) => key === undefined || (typeof key === 'string' && key !== ''); -@@ -79,7 +114,8 @@ const isValidKey = (key: unknown) => +@@ -79,18 +114,25 @@ const isValidKey = (key: unknown) => const getRouteConfigsFromChildren = < State extends NavigationState, ScreenOptions extends {}, - EventMap extends EventMapBase + EventMap extends EventMapBase, -+ TransformedScreenOptions extends ScreenOptions = ScreenOptions ++ TransformedScreenOptions extends {} = ScreenOptions >( children: React.ReactNode, groupKey?: string, -@@ -87,7 +123,13 @@ const getRouteConfigsFromChildren = < + groupOptions?: ScreenConfigWithParent< State, - ScreenOptions, +- ScreenOptions, ++ TransformedScreenOptions, EventMap - >['options'] + >['options'], @@ -617,12 +636,22 @@ index b1971ba..8dc3b8a 100644 + > ) => { const configs = React.Children.toArray(children).reduce< - ScreenConfigWithParent[] -@@ -107,14 +149,22 @@ const getRouteConfigsFromChildren = < +- ScreenConfigWithParent[] ++ ScreenConfigWithParent[] + >((acc, child) => { + if (React.isValidElement(child)) { + if (child.type === Screen) { +@@ -107,16 +149,24 @@ const getRouteConfigsFromChildren = < ); } -+ const props = ++ const props: RouteConfig< ++ ParamListBase, ++ keyof ParamListBase, ++ State, ++ TransformedScreenOptions, ++ EventMap ++ > = + transformScreenOptions === undefined + ? child.props + : { @@ -634,16 +663,30 @@ index b1971ba..8dc3b8a 100644 keys: [groupKey, child.props.navigationKey], options: groupOptions, - props: child.props as RouteConfig< -+ props: props as RouteConfig< - ParamListBase, - string, - State, +- ParamListBase, +- string, +- State, - ScreenOptions, -+ TransformedScreenOptions, - EventMap - >, +- EventMap +- >, ++ props, }); -@@ -140,7 +190,8 @@ const getRouteConfigsFromChildren = < + return acc; + } +@@ -133,14 +183,20 @@ const getRouteConfigsFromChildren = < + // When we encounter a fragment or group, we need to dive into its children to extract the configs + // This is handy to conditionally define a group of screens + acc.push( +- ...getRouteConfigsFromChildren( ++ ...getRouteConfigsFromChildren< ++ State, ++ ScreenOptions, ++ EventMap, ++ TransformedScreenOptions ++ >( + child.props.children, + child.props.navigationKey, + child.type !== Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] @@ -653,21 +696,25 @@ index b1971ba..8dc3b8a 100644 ) ); return acc; -@@ -257,7 +308,8 @@ export default function useNavigationBuilder< +@@ -257,17 +313,24 @@ export default function useNavigationBuilder< RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record void>, ScreenOptions extends {}, - EventMap extends Record + EventMap extends Record, -+ TransformedScreenOptions extends ScreenOptions = ScreenOptions ++ TransformedScreenOptions extends {} = ScreenOptions >( createRouter: RouterFactory, options: DefaultNavigatorOptions< -@@ -267,7 +319,13 @@ export default function useNavigationBuilder< + ParamListBase, + State, +- ScreenOptions, ++ TransformedScreenOptions, EventMap > & - NavigationBuilderOptions & +- NavigationBuilderOptions & - RouterOptions ++ NavigationBuilderOptions & + RouterOptions, + transformScreenOptions?: TransformScreenOptions< + State, @@ -678,12 +725,31 @@ index b1971ba..8dc3b8a 100644 ) { const navigatorKey = useRegisterNavigator(); -@@ -292,7 +350,7 @@ export default function useNavigationBuilder< +@@ -291,11 +354,15 @@ export default function useNavigationBuilder< + const routeConfigs = getRouteConfigsFromChildren< State, ScreenOptions, - EventMap +- EventMap - >(children); ++ EventMap, ++ TransformedScreenOptions + >(children, undefined, undefined, transformScreenOptions); const screens = routeConfigs.reduce< - Record> +- Record> ++ Record< ++ string, ++ ScreenConfigWithParent ++ > + >((acc, config) => { + if (config.props.name in acc) { + throw new Error( +@@ -688,7 +755,7 @@ export default function useNavigationBuilder< + const descriptors = useDescriptors< + State, + ActionHelpers, +- ScreenOptions, ++ TransformedScreenOptions, + EventMap + >({ + state, From 256ee99e7ff11274e8ad064070e1650f811487cd Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 11:10:20 +0200 Subject: [PATCH 058/589] adapt responsive stack navigator --- .../Navigation/AppNavigator/AuthScreens.tsx | 4 +- .../CustomRouter.ts | 0 .../index.native.tsx | 43 +++++++++--------- .../index.tsx | 44 ++++++++++--------- .../types.ts | 0 .../useStateWithSearch.tsx} | 4 +- 6 files changed, 49 insertions(+), 46 deletions(-) rename src/libs/Navigation/AppNavigator/{createCustomStackNavigator => createResponsiveStackNavigator}/CustomRouter.ts (100%) rename src/libs/Navigation/AppNavigator/{createCustomStackNavigator => createResponsiveStackNavigator}/index.native.tsx (63%) rename src/libs/Navigation/AppNavigator/{createCustomStackNavigator => createResponsiveStackNavigator}/index.tsx (62%) rename src/libs/Navigation/AppNavigator/{createCustomStackNavigator => createResponsiveStackNavigator}/types.ts (100%) rename src/libs/Navigation/AppNavigator/{createCustomStackNavigator/useCommonLogic.tsx => createResponsiveStackNavigator/useStateWithSearch.tsx} (94%) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index c8f799490f89..c9dbc23e8d50 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -36,7 +36,7 @@ import ROUTES from '@src/ROUTES'; import SCREENS from '@src/SCREENS'; import type * as OnyxTypes from '@src/types/onyx'; import type {SelectedTimezone, Timezone} from '@src/types/onyx/PersonalDetails'; -import createCustomStackNavigator from './createCustomStackNavigator'; +import createReponsiveStackNavigator from './createResponsiveStackNavigator'; import defaultScreenOptions from './defaultScreenOptions'; import getRootNavigatorScreenOptions from './getRootNavigatorScreenOptions'; import BottomTabNavigator from './Navigators/BottomTabNavigator'; @@ -136,7 +136,7 @@ function handleNetworkReconnect() { } } -const RootStack = createCustomStackNavigator(); +const RootStack = createReponsiveStackNavigator(); // We want to delay the re-rendering for components(e.g. ReportActionCompose) // that depends on modal visibility until Modal is completely closed and its focused // When modal screen is focused, update modal visibility in Onyx diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts similarity index 100% rename from src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx similarity index 63% rename from src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx index 088780da0314..f82e3eaa58c0 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx @@ -14,27 +14,35 @@ import type { } from '@libs/Navigation/PlatformStackNavigation/types'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -import useCommonLogic from './useCommonLogic'; +import useStateWithSearch from './useStateWithSearch'; -function createCustomStackNavigator() { +function createResponsiveStackNavigator() { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withNativeNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, ResponsiveStackNavigatorRouterOptions, StackActionHelpers, - NativeStackNavigationOptions, - NativeStackNavigationEventMap - >(CustomRouter, { - children: props.children, - screenOptions: nativeScreenOptions, - initialRouteName: props.initialRouteName, - }); + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + CustomRouter, + { + children: props.children, + screenOptions: nativeScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); - const {stateToRender, searchRoute} = useCommonLogic(state); + const {stateToRender, searchRoute} = useStateWithSearch(state); return ( @@ -51,16 +59,9 @@ function createCustomStackNavigator() { } ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof ResponsiveStackNavigator, - NativeStackNavigationOptions - >(ResponsiveStackNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( + ResponsiveStackNavigator, + )(); } -export default createCustomStackNavigator; +export default createResponsiveStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx similarity index 62% rename from src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index 3ca17e15c3f8..97b3caa49fa9 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -14,27 +14,36 @@ import type { } from '@libs/Navigation/PlatformStackNavigation/types'; import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -import useCommonLogic from './useCommonLogic'; +import useStateWithSearch from './useStateWithSearch'; -function createCustomStackNavigator() { +function createReponsiveStackNavigator() { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); const webScreenOptions = withWebNavigationOptions(props.screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withWebNavigationOptions(options); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, ResponsiveStackNavigatorRouterOptions, StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(CustomRouter, { - children: props.children, - screenOptions: webScreenOptions, - initialRouteName: props.initialRouteName, - }); + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + CustomRouter, + { + children: props.children, + screenOptions: webScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); - const {stateToRender, searchRoute} = useCommonLogic(state); + const {stateToRender, searchRoute} = useStateWithSearch(state); return ( @@ -51,16 +60,9 @@ function createCustomStackNavigator() { } ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof ResponsiveStackNavigator, - StackNavigationOptions - >(ResponsiveStackNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( + ResponsiveStackNavigator, + )(); } -export default createCustomStackNavigator; +export default createReponsiveStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts similarity index 100% rename from src/libs/Navigation/AppNavigator/createCustomStackNavigator/types.ts rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/useCommonLogic.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx similarity index 94% rename from src/libs/Navigation/AppNavigator/createCustomStackNavigator/useCommonLogic.tsx rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx index 0d1af3c2f48a..47430f8225c0 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/useCommonLogic.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx @@ -28,7 +28,7 @@ function reduceCentralPaneRoutes(routes: Routes): Routes { return result.reverse(); } -const useCommonLogic = (state: PlatformStackNavigationState) => { +const useStateWithSearch = (state: PlatformStackNavigationState) => { const {isSmallScreenWidth} = useWindowDimensions(); return useMemo(() => { @@ -62,4 +62,4 @@ const useCommonLogic = (state: PlatformStackNavigationState) => { }, [isSmallScreenWidth, state]); }; -export default useCommonLogic; +export default useStateWithSearch; From c9c200864baf5f3ed2646beff600e819448490a6 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 11:18:38 +0200 Subject: [PATCH 059/589] adapt --- .../index.native.tsx | 37 +++++------ .../createCustomBottomTabNavigator/index.tsx | 36 ++++++----- .../index.native.tsx | 36 ++++++----- .../createCustomFullScreenNavigator/index.tsx | 36 ++++++----- .../index.native.tsx | 62 ++++++++++++------- .../createPlatformStackNavigator/index.tsx | 61 +++++++++++------- 6 files changed, 154 insertions(+), 114 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index dd4f2b0b568b..0c7d12b5d3aa 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -2,7 +2,6 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import {NativeStackView} from '@react-navigation/native-stack'; -import type {NativeStackNavigationConfig} from '@react-navigation/native-stack/lib/typescript/src/types'; import React from 'react'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -23,17 +22,26 @@ function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withNativeNavigationOptions(options); + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, PlatformStackNavigationRouterOptions, StackActionHelpers, - NativeStackNavigationOptions, - NativeStackNavigationEventMap - >(StackRouter, { - children, - screenOptions: nativeScreenOptions, - initialRouteName, - }); + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + StackRouter, + { + children, + screenOptions: nativeScreenOptions, + initialRouteName, + }, + transformScreenProps, + ); const styles = useThemeStyles(); @@ -59,16 +67,9 @@ function createCustomBottomTabNavigator() { } CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof CustomBottomTabNavigator, - NativeStackNavigationConfig - >(CustomBottomTabNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + CustomBottomTabNavigator, + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 8d4ddb37a44e..352ed64981e7 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -22,17 +22,26 @@ function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withWebNavigationOptions(options); + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, PlatformStackNavigationRouterOptions, StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(StackRouter, { - children, - screenOptions: webScreenOptions, - initialRouteName, - }); + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + StackRouter, + { + children, + screenOptions: webScreenOptions, + initialRouteName, + }, + transformScreenProps, + ); const styles = useThemeStyles(); const stateToRender = getStateToRender(state); @@ -59,16 +68,9 @@ function createCustomBottomTabNavigator() { } CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof CustomBottomTabNavigator, - StackNavigationOptions - >(CustomBottomTabNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + CustomBottomTabNavigator, + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 7d04893b5ebe..90f4698b0daa 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -16,17 +16,26 @@ function createCustomFullScreenNavigator() { function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withNativeNavigationOptions(options); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, FullScreenNavigatorRouterOptions, StackActionHelpers, - NativeStackNavigationOptions, - NativeStackNavigationEventMap - >(CustomFullScreenRouter, { - children: props.children, - screenOptions: nativeScreenOptions, - initialRouteName: props.initialRouteName, - }); + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + CustomFullScreenRouter, + { + children: props.children, + screenOptions: nativeScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); return ( @@ -42,16 +51,9 @@ function createCustomFullScreenNavigator() { } CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof CustomFullScreenNavigator, - NativeStackNavigationOptions - >(CustomFullScreenNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( + CustomFullScreenNavigator, + )(); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index c08ff9e88334..67005b493109 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -19,17 +19,26 @@ function createCustomFullScreenNavigator() { function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { const webScreenOptions = withWebNavigationOptions(props.screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withWebNavigationOptions(options); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, FullScreenNavigatorRouterOptions, StackActionHelpers, - StackNavigationOptions, - StackNavigationEventMap - >(CustomFullScreenRouter, { - children: props.children, - screenOptions: webScreenOptions, - initialRouteName: props.initialRouteName, - }); + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + CustomFullScreenRouter, + { + children: props.children, + screenOptions: webScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); const {isSmallScreenWidth} = useWindowDimensions(); @@ -56,16 +65,9 @@ function createCustomFullScreenNavigator() { } CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof CustomFullScreenNavigator, - StackNavigationOptions - >(CustomFullScreenNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( + CustomFullScreenNavigator, + )(); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 708c0d8f149a..1bb8e0ca0ef0 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -1,44 +1,60 @@ -import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase} from '@react-navigation/native'; -import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import {NativeStackView} from '@react-navigation/native-stack'; import React from 'react'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; import type { PlatformStackNavigationEventMap, PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, PlatformStackNavigationState, PlatformStackNavigatorProps, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { - const Stack = createNativeStackNavigator(); - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withNativeNavigationOptions(options); + + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + StackRouter, + { + children: props.children, + screenOptions: nativeScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); + return ( - - {children} - + + + ); } + PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof PlatformStackNavigator, - NativeStackNavigationOptions - >(PlatformStackNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + PlatformStackNavigator, + )(); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index 132a380b1af5..e2cff593920e 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -1,44 +1,61 @@ -import {createNavigatorFactory} from '@react-navigation/native'; -import type {ParamListBase} from '@react-navigation/native'; +import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; +import type {NativeStackNavigationEventMap} from '@react-navigation/native-stack'; import type {StackNavigationOptions} from '@react-navigation/stack'; -import {createStackNavigator} from '@react-navigation/stack'; +import {StackView} from '@react-navigation/stack'; import React from 'react'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; import type { PlatformStackNavigationEventMap, PlatformStackNavigationOptions, + PlatformStackNavigationRouterOptions, PlatformStackNavigationState, PlatformStackNavigatorProps, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; function createPlatformStackNavigator() { - const Stack = createStackNavigator(); - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions); + const transformScreenProps = ( + options: PlatformStackScreenOptionsWithoutNavigation, + ) => withWebNavigationOptions(options); + + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + StackNavigationOptions + >( + StackRouter, + { + children: props.children, + screenOptions: webScreenOptions, + initialRouteName: props.initialRouteName, + }, + transformScreenProps, + ); + return ( - - {children} - + + + ); } + PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - const transformScreenProps = (screenOptions: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(screenOptions); - - return createNavigatorFactory< - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap, - typeof PlatformStackNavigator, - StackNavigationOptions - >(PlatformStackNavigator)(transformScreenProps); + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + PlatformStackNavigator, + )(); } export default createPlatformStackNavigator; From 15b7689928036f7d427379a16a9fdae3b51bc07d Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 11:19:42 +0200 Subject: [PATCH 060/589] rename generic parameters --- .../ModalStackNavigators/index.tsx | 4 +- .../index.native.tsx | 11 ++--- .../createCustomBottomTabNavigator/index.tsx | 11 ++--- .../index.native.tsx | 11 ++--- .../createCustomFullScreenNavigator/index.tsx | 11 ++--- .../createCustomFullScreenNavigator/types.ts | 6 +-- .../index.native.tsx | 11 ++--- .../createResponsiveStackNavigator/index.tsx | 11 ++--- .../index.native.tsx | 13 +++-- .../createPlatformStackNavigator/index.tsx | 13 +++-- .../withNativeNavigationOptions.ts | 6 +-- .../withWebNavigationOptions.ts | 6 +-- .../PlatformStackNavigation/types.tsx | 48 +++++++++---------- 13 files changed, 77 insertions(+), 85 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index 43f50b4fe2e6..6343a03b5b11 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -45,8 +45,8 @@ type Screens = Partial React.ComponentType>>; * @param screens key/value pairs where the key is the name of the screen and the value is a functon that returns the lazy-loaded component * @param getScreenOptions optional function that returns the screen options, override the default options */ -function createModalStackNavigator(screens: Screens, getScreenOptions?: (styles: ThemeStyles) => PlatformStackNavigationOptions): React.ComponentType { - const ModalStackNavigator = createPlatformStackNavigator(); +function createModalStackNavigator(screens: Screens, getScreenOptions?: (styles: ThemeStyles) => PlatformStackNavigationOptions): React.ComponentType { + const ModalStackNavigator = createPlatformStackNavigator(); function ModalStack() { const screenOptions = useModalScreenOptions(getScreenOptions); diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 0c7d12b5d3aa..bdec75ec6ff3 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -18,13 +18,12 @@ import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions} from './utils'; -function createCustomBottomTabNavigator() { +function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -67,9 +66,9 @@ function createCustomBottomTabNavigator() { } CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, - )(); + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 352ed64981e7..6a8fab338d87 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -18,13 +18,12 @@ import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions, getStateToRender} from './utils'; -function createCustomBottomTabNavigator() { +function createCustomBottomTabNavigator() { function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -68,9 +67,9 @@ function createCustomBottomTabNavigator() { } CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, - )(); + )(); } export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 90f4698b0daa..67794c469885 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -12,13 +12,12 @@ import type { import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function createCustomFullScreenNavigator() { +function createCustomFullScreenNavigator() { function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -51,9 +50,9 @@ function createCustomFullScreenNavigator() { } CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( CustomFullScreenNavigator, - )(); + )(); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index 67005b493109..94fb15233e53 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -15,13 +15,12 @@ import type { import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function createCustomFullScreenNavigator() { +function createCustomFullScreenNavigator() { function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { const webScreenOptions = withWebNavigationOptions(props.screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -65,9 +64,9 @@ function createCustomFullScreenNavigator() { } CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( CustomFullScreenNavigator, - )(); + )(); } export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts index 1fe8429a4f61..2c4107335eb3 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts @@ -8,9 +8,9 @@ import type { type FullScreenNavigatorRouterOptions = PlatformStackNavigationRouterOptions; -type FullScreenNavigatorProps = DefaultNavigatorOptions< - TStackParams, - PlatformStackNavigationState, +type FullScreenNavigatorProps = DefaultNavigatorOptions< + ParamList, + PlatformStackNavigationState, PlatformStackNavigationOptions, PlatformStackNavigationEventMap >; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx index f82e3eaa58c0..bb71e476b831 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx @@ -16,14 +16,13 @@ import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useStateWithSearch from './useStateWithSearch'; -function createResponsiveStackNavigator() { +function createResponsiveStackNavigator() { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -59,9 +58,9 @@ function createResponsiveStackNavigator() { } ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( ResponsiveStackNavigator, - )(); + )(); } export default createResponsiveStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index 97b3caa49fa9..67509b90106a 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -16,15 +16,14 @@ import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useStateWithSearch from './useStateWithSearch'; -function createReponsiveStackNavigator() { +function createReponsiveStackNavigator() { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); const webScreenOptions = withWebNavigationOptions(props.screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -60,9 +59,9 @@ function createReponsiveStackNavigator() { } ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( ResponsiveStackNavigator, - )(); + )(); } export default createReponsiveStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 1bb8e0ca0ef0..912bd665e761 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -13,13 +13,12 @@ import type { PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -function createPlatformStackNavigator() { - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { +function createPlatformStackNavigator() { + function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -52,9 +51,9 @@ function createPlatformStackNavigator() { } PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, - )(); + )(); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index e2cff593920e..a0a153239c26 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -14,13 +14,12 @@ import type { PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -function createPlatformStackNavigator() { - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { +function createPlatformStackNavigator() { + function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions); - const transformScreenProps = ( - options: PlatformStackScreenOptionsWithoutNavigation, - ) => withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -53,9 +52,9 @@ function createPlatformStackNavigator() { } PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, - )(); + )(); } export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 3911b8a1c0cd..3d01784fca54 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -18,12 +18,12 @@ const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigation ...getCommonNavigationOptions(screenOptions), }); -function withNativeNavigationOptions( - screenOptions: PlatformStackScreenOptionsWithoutNavigation, +function withNativeNavigationOptions( + screenOptions: PlatformStackScreenOptionsWithoutNavigation, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { + ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToNative({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index d6f094bdb706..4c4aedc31924 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -19,12 +19,12 @@ const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOpt ...getCommonNavigationOptions(screenOptions), }); -function withWebNavigationOptions( - screenOptions: PlatformStackScreenOptionsWithoutNavigation, +function withWebNavigationOptions( + screenOptions: PlatformStackScreenOptionsWithoutNavigation, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { + ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToWeb({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index a2aa0e187f5d..f663f1819b59 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -3,7 +3,7 @@ import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from ' import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; -type PlatformStackNavigationState = StackNavigationState; +type PlatformStackNavigationState = StackNavigationState; type OmitNever> = { [K in keyof T as T[K] extends never ? never : K]: T[K]; @@ -85,44 +85,44 @@ type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; type PlatformStackNavigationRouterOptions = StackRouterOptions; type PlatformStackNavigatorProps< - TStackParams extends ParamListBase, - RouteName extends keyof TStackParams = keyof TStackParams, + ParamList extends ParamListBase, + RouteName extends keyof ParamList = keyof ParamList, RouterOptions extends PlatformStackNavigationRouterOptions = PlatformStackNavigationRouterOptions, -> = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & +> = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & RouterOptions & StackNavigationConfig; -type PlatformStackScreenOptionsProps = { - route: PlatformStackRouteProp; - navigation: PlatformStackNavigationProp; +type PlatformStackScreenOptionsProps = { + route: PlatformStackRouteProp; + navigation: PlatformStackNavigationProp; }; -type PlatformStackScreenOptionsPropsWithoutNavigation = { - route: PlatformStackRouteProp; +type PlatformStackScreenOptionsPropsWithoutNavigation = { + route: PlatformStackRouteProp; // eslint-disable-next-line @typescript-eslint/no-explicit-any navigation: any; }; -type PlatformStackScreenOptions = PlatformStackNavigatorProps< - TStackParams, - RouteName ->['screenOptions']; +type PlatformStackScreenOptions = PlatformStackNavigatorProps['screenOptions']; -type PlatformStackScreenOptionsWithoutNavigation = +type PlatformStackScreenOptionsWithoutNavigation = | PlatformStackNavigationOptions - | ((props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions) + | ((props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions) | undefined; -type PlatformStackNavigationProp< - TStackParams extends ParamListBase, - RouteName extends keyof TStackParams = keyof TStackParams, - NavigatorID extends string | undefined = undefined, -> = NavigationProp, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; -type PlatformStackRouteProp = RouteProp; +type PlatformStackNavigationProp = NavigationProp< + ParamList, + RouteName, + NavigatorID, + PlatformStackNavigationState, + PlatformStackNavigationOptions, + PlatformStackNavigationEventMap +>; +type PlatformStackRouteProp = RouteProp; -function isRouteBasedScreenOptions( - screenOptions: PlatformStackScreenOptions, -): screenOptions is (props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions { +function isRouteBasedScreenOptions( + screenOptions: PlatformStackScreenOptions, +): screenOptions is (props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions { return typeof screenOptions === 'function'; } From 48632e7cf0c7aeff6b21eac8465c9cc358f9e222 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 20:24:20 +0200 Subject: [PATCH 061/589] fix: react navigation types --- patches/@react-navigation+core+6.4.11.patch | 57 +++++++++++++++ .../index.native.tsx | 4 +- .../createCustomBottomTabNavigator/index.tsx | 4 +- .../index.native.tsx | 10 ++- .../createCustomFullScreenNavigator/index.tsx | 10 ++- .../index.native.tsx | 10 ++- .../createResponsiveStackNavigator/index.tsx | 10 ++- .../index.native.tsx | 70 +++++++++--------- .../createPlatformStackNavigator/index.tsx | 73 ++++++++++--------- 9 files changed, 160 insertions(+), 88 deletions(-) diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch index 27e29484545a..2a6d29e360f5 100644 --- a/patches/@react-navigation+core+6.4.11.patch +++ b/patches/@react-navigation+core+6.4.11.patch @@ -1,3 +1,12 @@ +diff --git a/node_modules/@react-navigation/core/lib/commonjs/types.js.map b/node_modules/@react-navigation/core/lib/commonjs/types.js.map +index a3da390..fdd09cf 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/types.js.map ++++ b/node_modules/@react-navigation/core/lib/commonjs/types.js.map +@@ -1 +1 @@ +-{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":";;;;;;AAoJO,MAAMA,iBAAiB,CAA4B;AAYzD"} +\ No newline at end of file ++{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":";;;;;;AAqJO,MAAMA,iBAAiB,CAA4B;AAYzD"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js index 14338b9..57e1fa2 100644 --- a/node_modules/@react-navigation/core/lib/commonjs/useNavigationBuilder.js @@ -63,6 +72,15 @@ index 55b77ca..de10a37 100644 \ No newline at end of file +{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IA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,MAAM+B,YAAY,GAAG,IAAAC,wBAAe,EAAC;IACnClG,MAAM;IACNnD,GAAG,EAAE6C,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAE7C,GAAG;IACf6E,QAAQ;IACRE;EACF,CAAC,CAAC;EAEF,MAAM6C,UAAU,GAAG,IAAA0B,6BAAoB,EAKrC;IACAC,EAAE,EAAEhI,OAAO,CAACgI,EAAE;IACdT,QAAQ;IACRjE,QAAQ;IACRwC,OAAO;IACPlE;EACF,CAAC,CAAC;EAEF,IAAAqG,2CAAkC,EAAC;IACjC5B,UAAU;IACV6B,gBAAgB,EAAEjB,cAAc,CAACkB;EACnC,CAAC,CAAC;EAEF,IAAAC,sBAAa,EAAC;IACZ9E,QAAQ;IACR+E,iBAAiB,EAAEjB,cAAc,CAAC9D;EACpC,CAAC,CAAC;EAEF,MAAMgD,WAAW,GAAG,IAAAgC,uBAAc,EAKhC;IACAvG,KAAK;IACLK,OAAO;IACPiE,UAAU;IACVhG,aAAa,EAAEL,OAAO,CAACK,aAAa;IACpCkI,oBAAoB,EAAEvI,OAAO,CAACuI,oBAAoB;IAClDhB,QAAQ;IACRjE,QAAQ;IACRE,QAAQ;IACRqE,YAAY;IACZX,WAAW;IACXG,gBAAgB;IAChBzF,MAAM;IACN;IACAkE;EACF,CAAC,CAAC;EAEF,IAAA0C,yBAAgB,EAAC;IACfzG,KAAK;IACLsE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMmC,iBAAiB,GAAG,IAAAC,qBAAY,EAAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} \ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/module/types.js.map b/node_modules/@react-navigation/core/lib/module/types.js.map +index 21fd3e8..7fa0d02 100644 +--- a/node_modules/@react-navigation/core/lib/module/types.js.map ++++ b/node_modules/@react-navigation/core/lib/module/types.js.map +@@ -1 +1 @@ +-{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"AAoJA,OAAO,MAAMA,iBAAiB,CAA4B"} +\ No newline at end of file ++{"version":3,"names":["PrivateValueStore"],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"AAqJA,OAAO,MAAMA,iBAAiB,CAA4B"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js b/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js index 051520b..01247b9 100644 --- a/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js @@ -508,6 +526,45 @@ index 0000000..0f1e440 @@ -0,0 +1 @@ +{"version":3,"file":"useRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useRoute.test.tsx"],"names":[],"mappings":""} \ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts +index fcd456b..a9ee1ae 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts ++++ b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts +@@ -7,7 +7,7 @@ declare global { + } + } + type Keyof = Extract; +-export type DefaultNavigatorOptions = DefaultRouterOptions> & { ++export type DefaultNavigatorOptions = DefaultRouterOptions> & { + /** + * Optional ID for the navigator. Can be used with `navigation.getParent(id)` to refer to a parent. + */ +@@ -21,14 +21,14 @@ export type DefaultNavigatorOptions | ((props: { +- route: RouteProp; ++ route: RouteProp; + navigation: any; + }) => ScreenListeners); + /** + * Default options for all screens under this navigator. + */ + screenOptions?: ScreenOptions | ((props: { +- route: RouteProp; ++ route: RouteProp; + navigation: any; + }) => ScreenOptions); + }; +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map +index 6594ef4..eccdf61 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map ++++ b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,KAAK,EACN,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,eAAe,CAAC;QAExB,UAAU,aAAa;SAAG;KAC3B;CACF;AAED,KAAK,KAAK,CAAC,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,uBAAuB,CACjC,SAAS,SAAS,aAAa,EAC/B,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,IAC3B,oBAAoB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG;IAC3C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,eAAe,CAAC,EACZ,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,GAChC,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,UAAU,EAAE,GAAG,CAAC;KACjB,KAAK,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5C;;OAEG;IACH,aAAa,CAAC,EACV,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B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C,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,EAAE,IAAI;KAC/C,SAAS,IAAI,MAAM,SAAS,CAAC,CAAC,EAAE,WAAW,CAC1C,SAAS,CAAC,SAAS,CAAC,CACrB,SAAS,qBAAqB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,GAC/C,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GACtB,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAC;CAClE,CAAC"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts index 53d474e..87c846d 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index bdec75ec6ff3..1eafed5f8202 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -19,7 +19,7 @@ import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions} from './utils'; function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { + function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => @@ -35,8 +35,10 @@ function createCustomBottomTabNavigator() { >( StackRouter, { + id, children, screenOptions: nativeScreenOptions, + screenListeners, initialRouteName, }, transformScreenProps, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 6a8fab338d87..a4f3fa4a4e42 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -19,7 +19,7 @@ import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions, getStateToRender} from './utils'; function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({initialRouteName, children, screenOptions, ...props}: CustomBottomTabNavigatorProps) { + function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => @@ -35,8 +35,10 @@ function createCustomBottomTabNavigator() { >( StackRouter, { + id, children, screenOptions: webScreenOptions, + screenListeners, initialRouteName, }, transformScreenProps, diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 67794c469885..89a73339af49 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -13,8 +13,8 @@ import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; function createCustomFullScreenNavigator() { - function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); + function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => withNativeNavigationOptions(options); @@ -29,9 +29,11 @@ function createCustomFullScreenNavigator() { >( CustomFullScreenRouter, { - children: props.children, + id, + children, screenOptions: nativeScreenOptions, - initialRouteName: props.initialRouteName, + screenListeners, + initialRouteName, }, transformScreenProps, ); diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index 94fb15233e53..44c4e1e674aa 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -16,8 +16,8 @@ import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; function createCustomFullScreenNavigator() { - function CustomFullScreenNavigator(props: FullScreenNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(props.screenOptions); + function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => withWebNavigationOptions(options); @@ -32,9 +32,11 @@ function createCustomFullScreenNavigator() { >( CustomFullScreenRouter, { - children: props.children, + id, + children, screenOptions: webScreenOptions, - initialRouteName: props.initialRouteName, + screenListeners, + initialRouteName, }, transformScreenProps, ); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx index bb71e476b831..7b53e399873a 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx @@ -17,10 +17,10 @@ import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOption import useStateWithSearch from './useStateWithSearch'; function createResponsiveStackNavigator() { - function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { + function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); - const nativeScreenOptions = withNativeNavigationOptions(props.screenOptions); + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => withNativeNavigationOptions(options); @@ -34,9 +34,11 @@ function createResponsiveStackNavigator() { >( CustomRouter, { - children: props.children, + id, + children, screenOptions: nativeScreenOptions, - initialRouteName: props.initialRouteName, + screenListeners, + initialRouteName, }, transformScreenProps, ); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index 67509b90106a..0a19e7334934 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -17,10 +17,10 @@ import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOption import useStateWithSearch from './useStateWithSearch'; function createReponsiveStackNavigator() { - function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { + function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { const styles = useThemeStyles(); - const webScreenOptions = withWebNavigationOptions(props.screenOptions); + const webScreenOptions = withWebNavigationOptions(screenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => withWebNavigationOptions(options); @@ -35,9 +35,11 @@ function createReponsiveStackNavigator() { >( CustomRouter, { - children: props.children, + id, + children, screenOptions: webScreenOptions, - initialRouteName: props.initialRouteName, + screenListeners, + initialRouteName, }, transformScreenProps, ); diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx index 912bd665e761..a60c598f86f1 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx @@ -13,44 +13,46 @@ import type { PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -function createPlatformStackNavigator() { - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); +function PlatformStackNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - StackRouter, - { - children: props.children, - screenOptions: nativeScreenOptions, - initialRouteName: props.initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + StackRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - return ( - - - - ); - } - PlatformStackNavigator.displayName = 'PlatformStackNavigator'; + return ( + + + + ); +} +PlatformStackNavigator.displayName = 'PlatformStackNavigator'; +function createPlatformStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx index a0a153239c26..b83c36810a40 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx @@ -1,7 +1,6 @@ import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap} from '@react-navigation/native-stack'; -import type {StackNavigationOptions} from '@react-navigation/stack'; +import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; import React from 'react'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; @@ -14,44 +13,46 @@ import type { PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -function createPlatformStackNavigator() { - function PlatformStackNavigator({screenOptions, children, ...props}: PlatformStackNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions); +function PlatformStackNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - StackNavigationOptions - >( - StackRouter, - { - children: props.children, - screenOptions: webScreenOptions, - initialRouteName: props.initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + StackRouter, + { + id, + children, + screenOptions: webScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - return ( - - - - ); - } - PlatformStackNavigator.displayName = 'PlatformStackNavigator'; + return ( + + + + ); +} +PlatformStackNavigator.displayName = 'PlatformStackNavigator'; +function createPlatformStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( PlatformStackNavigator, )(); From 6327d662a0de63c275b0df75edd6e3f612db8788 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 20:25:57 +0200 Subject: [PATCH 062/589] move navigators out of factory --- .../index.native.tsx | 90 +++++++++--------- .../createCustomBottomTabNavigator/index.tsx | 92 +++++++++---------- .../index.native.tsx | 72 +++++++-------- .../createCustomFullScreenNavigator/index.tsx | 90 +++++++++--------- .../index.native.tsx | 78 ++++++++-------- .../createResponsiveStackNavigator/index.tsx | 78 ++++++++-------- 6 files changed, 250 insertions(+), 250 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 1eafed5f8202..1bb1297779f4 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -18,56 +18,56 @@ import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions} from './utils'; -function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); +function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); - const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + StackRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - const styles = useThemeStyles(); + const styles = useThemeStyles(); - return ( - - - - - - - - - ); - } - CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; + return ( + + + + + + + + + ); +} +CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; +function createCustomBottomTabNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, )(); diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index a4f3fa4a4e42..8b8093a184fa 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -18,57 +18,57 @@ import BottomTabBar from './BottomTabBar'; import type CustomBottomTabNavigatorProps from './types'; import {defaultScreenOptions, getStateToRender} from './utils'; -function createCustomBottomTabNavigator() { - function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); +function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); - const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + PlatformStackNavigationRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + StackRouter, + { + id, + children, + screenOptions: webScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - const styles = useThemeStyles(); - const stateToRender = getStateToRender(state); + const styles = useThemeStyles(); + const stateToRender = getStateToRender(state); - return ( - - - - - - - - - ); - } - CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; + return ( + + + + + + + + + ); +} +CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; +function createCustomBottomTabNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( CustomBottomTabNavigator, )(); diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx index 89a73339af49..d486013d915b 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx @@ -12,46 +12,46 @@ import type { import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function createCustomFullScreenNavigator() { - function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); +function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - CustomFullScreenRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + FullScreenNavigatorRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + CustomFullScreenRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - return ( - - - - ); - } - CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; + return ( + + + + ); +} +CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; +function createCustomFullScreenNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( CustomFullScreenNavigator, )(); diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index 44c4e1e674aa..1afd96ec2636 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -15,57 +15,57 @@ import type { import CustomFullScreenRouter from './CustomFullScreenRouter'; import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function createCustomFullScreenNavigator() { - function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions); +function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { + const webScreenOptions = withWebNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - CustomFullScreenRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + FullScreenNavigatorRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + CustomFullScreenRouter, + { + id, + children, + screenOptions: webScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - const {isSmallScreenWidth} = useWindowDimensions(); + const {isSmallScreenWidth} = useWindowDimensions(); - useEffect(() => { - if (!navigationRef.isReady()) { - return; - } - // We need to separately reset state of this navigator to trigger getRehydratedState. - navigation.reset(navigation.getState()); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isSmallScreenWidth]); + useEffect(() => { + if (!navigationRef.isReady()) { + return; + } + // We need to separately reset state of this navigator to trigger getRehydratedState. + navigation.reset(navigation.getState()); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isSmallScreenWidth]); - return ( - - - - ); - } - CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; + return ( + + + + ); +} +CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; +function createCustomFullScreenNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( CustomFullScreenNavigator, )(); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx index 7b53e399873a..fca7bb1acc7c 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx @@ -16,50 +16,50 @@ import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useStateWithSearch from './useStateWithSearch'; -function createResponsiveStackNavigator() { - function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { - const styles = useThemeStyles(); +function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { + const styles = useThemeStyles(); - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withNativeNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - CustomRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + ResponsiveStackNavigatorRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + CustomRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - const {stateToRender, searchRoute} = useStateWithSearch(state); + const {stateToRender, searchRoute} = useStateWithSearch(state); - return ( - - - {searchRoute && {descriptors[searchRoute.key].render()}} - - ); - } - ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; + return ( + + + {searchRoute && {descriptors[searchRoute.key].render()}} + + ); +} +ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; +function createResponsiveStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( ResponsiveStackNavigator, )(); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index 0a19e7334934..69131d54aa64 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -16,51 +16,51 @@ import CustomRouter from './CustomRouter'; import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; import useStateWithSearch from './useStateWithSearch'; -function createReponsiveStackNavigator() { - function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { - const styles = useThemeStyles(); +function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { + const styles = useThemeStyles(); - const webScreenOptions = withWebNavigationOptions(screenOptions); + const webScreenOptions = withWebNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); + const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => + withWebNavigationOptions(options); - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - CustomRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + ResponsiveStackNavigatorRouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + CustomRouter, + { + id, + children, + screenOptions: webScreenOptions, + screenListeners, + initialRouteName, + }, + transformScreenProps, + ); - const {stateToRender, searchRoute} = useStateWithSearch(state); + const {stateToRender, searchRoute} = useStateWithSearch(state); - return ( - - - {searchRoute && {descriptors[searchRoute.key].render()}} - - ); - } - ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; + return ( + + + {searchRoute && {descriptors[searchRoute.key].render()}} + + ); +} +ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; +function createReponsiveStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( ResponsiveStackNavigator, )(); From 1080e07be07fede0f11db2092590a896272694fa Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 20 Apr 2024 20:29:41 +0200 Subject: [PATCH 063/589] add defaultOptions to CustomBottomTabNavigator --- .../createCustomBottomTabNavigator/index.native.tsx | 2 +- .../AppNavigator/createCustomBottomTabNavigator/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 1bb1297779f4..21fa0e0b885c 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -22,7 +22,7 @@ function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); + withNativeNavigationOptions(options, defaultScreenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 8b8093a184fa..d1f3333e6548 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -22,7 +22,7 @@ function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); + withWebNavigationOptions(options, defaultScreenOptions); const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, From 6649b86156b66e7d9fd370a435be65950f388f00 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 10:27:46 +0200 Subject: [PATCH 064/589] fix: animations --- .../AppNavigator/leftModalNavigatorOptions/index.native.ts | 1 - .../animation/native/slideFromLeft/index.android.ts | 2 +- .../platformOptions/animation/native/slideFromLeft/index.ts | 2 +- .../animation/native/slideFromRight/index.android.ts | 2 +- .../platformOptions/animation/native/slideFromRight/index.ts | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts index 71645e81908a..4d8219a32301 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts @@ -1,7 +1,6 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const leftModalNavigatorOptions: PlatformStackNavigationOptions = { - presentation: 'transparentModal', animation: 'slide_from_left', customAnimationOnGesture: true, }; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts index 576cdc31a090..7963a851dce4 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.android.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS // const transition: NativeStackNavigationOptions['animation'] = 'slide_from_right'; -const slideFromLeft: NativeStackNavigationOptions = {animation: 'ios'}; +const slideFromLeft: NativeStackNavigationOptions = {animation: 'slide_from_left'}; export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts index 1e1305ce54eb..991dba98c50b 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromLeft/index.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 // so we are using `simple_push` which is similar to default and not causing keyboard transition issues -const slideFromLeft: NativeStackNavigationOptions = {animation: 'simple_push'}; +const slideFromLeft: NativeStackNavigationOptions = {animation: 'slide_from_left'}; export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts index f79fb7a31c86..beb1aaa01bb2 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.android.ts @@ -1,6 +1,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; // `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS -const transition: NativeStackNavigationOptions = {animation: 'ios'}; +const transition: NativeStackNavigationOptions = {animation: 'slide_from_right'}; export default transition; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts index 4f482b5024aa..a2758682b87e 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 // so we are using `simple_push` which is similar to default and not causing keyboard transition issues -const transition: NativeStackNavigationOptions = {animation: 'simple_push'}; +const transition: NativeStackNavigationOptions = {animation: 'slide_from_right'}; export default transition; From 32cfce4e8da41a79af440ef198c99160efd3fecf Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 11:33:21 +0200 Subject: [PATCH 065/589] simplify ResponsiveStackNavigator types --- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 2 +- .../AppNavigator/createResponsiveStackNavigator/types.ts | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 7d12bdd01386..a94cdb89feb9 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -269,7 +269,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie return ( - + , PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & - ResponsiveStackNavigatorConfig; +type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; -export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps, ResponsiveStackNavigatorConfig}; +export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps}; From 9f592f38c7fe968ee12ae4105b3c147930f1127c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 11:33:27 +0200 Subject: [PATCH 066/589] update Podfile.lock --- ios/Podfile.lock | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6ef495a65bd3..71f9f765403b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2083,6 +2083,7 @@ DEPENDENCIES: - ExpoImageManipulator (from `../node_modules/expo-image-manipulator/ios`) - ExpoModulesCore (from `../node_modules/expo-modules-core`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) + - "fullstory_react-native (from `../node_modules/@fullstory/react-native`)" - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) @@ -2248,8 +2249,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/FBLazyVector" fullstory_react-native: :path: "../node_modules/@fullstory/react-native" - FBReactNativeSpec: - :path: "../node_modules/react-native/React/FBReactNativeSpec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: From 850bb3ddde5a8fa3044734199ac3fbe6054d8a99 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 11:49:09 +0200 Subject: [PATCH 067/589] fix: no animation on small screens --- .../Navigation/AppNavigator/getRootNavigatorScreenOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 6a0d89f2fad5..225c645f85e6 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -103,7 +103,7 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, ...hideKeyboardOnSwipe, title: CONFIG.SITE_TITLE, - animation: isSmallScreenWidth ? 'none' : undefined, + animation: isSmallScreenWidth ? undefined : 'none', cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), cardStyle: { ...StyleUtils.getNavigationModalCardStyle(), From 706dc61c65045ede95b9820d58a8843d4301cab1 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 14:52:37 +0200 Subject: [PATCH 068/589] simplify PlatformStackNavigation code --- patches/@react-navigation+core+6.4.11.patch | 179 +++++++++++++++++- .../PlatformStackNavigator.tsx | 5 + .../createPlatformStackNavigator.tsx | 12 ++ .../index.native.tsx | 61 ------ .../createPlatformStackNavigator/index.tsx | 61 ------ .../index.native.tsx | 79 ++++++++ .../index.tsx | 79 ++++++++ .../types.ts | 92 +++++++++ .../PlatformStackNavigation/types.tsx | 49 ++++- 9 files changed, 483 insertions(+), 134 deletions(-) create mode 100644 src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.tsx delete mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx delete mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx create mode 100644 src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch index 2a6d29e360f5..6690085b729a 100644 --- a/patches/@react-navigation+core+6.4.11.patch +++ b/patches/@react-navigation+core+6.4.11.patch @@ -1,3 +1,55 @@ +diff --git a/node_modules/@react-navigation/core/lib/commonjs/index.js b/node_modules/@react-navigation/core/lib/commonjs/index.js +index d1ea4eb..4b0a660 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/index.js ++++ b/node_modules/@react-navigation/core/lib/commonjs/index.js +@@ -22,6 +22,7 @@ var _exportNames = { + useFocusEffect: true, + useIsFocused: true, + useNavigation: true, ++ NavigationBuilderOptions: true, + useNavigationBuilder: true, + useNavigationContainerRef: true, + useNavigationState: true, +@@ -42,6 +43,12 @@ Object.defineProperty(exports, "CurrentRenderContext", { + return _CurrentRenderContext.default; + } + }); ++Object.defineProperty(exports, "NavigationBuilderOptions", { ++ enumerable: true, ++ get: function () { ++ return _useNavigationBuilder.NavigationBuilderOptions; ++ } ++}); + Object.defineProperty(exports, "NavigationContainerRefContext", { + enumerable: true, + get: function () { +@@ -210,7 +217,7 @@ Object.keys(_types).forEach(function (key) { + var _useFocusEffect = _interopRequireDefault(require("./useFocusEffect")); + var _useIsFocused = _interopRequireDefault(require("./useIsFocused")); + var _useNavigation = _interopRequireDefault(require("./useNavigation")); +-var _useNavigationBuilder = _interopRequireDefault(require("./useNavigationBuilder")); ++var _useNavigationBuilder = _interopRequireWildcard(require("./useNavigationBuilder")); + var _useNavigationContainerRef = _interopRequireDefault(require("./useNavigationContainerRef")); + var _useNavigationState = _interopRequireDefault(require("./useNavigationState")); + var _usePreventRemove = _interopRequireDefault(require("./usePreventRemove")); +@@ -229,5 +236,7 @@ Object.keys(_routers).forEach(function (key) { + } + }); + }); ++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); } ++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; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + //# sourceMappingURL=index.js.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/commonjs/index.js.map b/node_modules/@react-navigation/core/lib/commonjs/index.js.map +index f531070..f6131d3 100644 +--- a/node_modules/@react-navigation/core/lib/commonjs/index.js.map ++++ b/node_modules/@react-navigation/core/lib/commonjs/index.js.map +@@ -1 +1 @@ +-{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAA0C"} +\ No newline at end of file ++{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAA0C;AAAA;AAAA"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/commonjs/types.js.map b/node_modules/@react-navigation/core/lib/commonjs/types.js.map index a3da390..fdd09cf 100644 --- a/node_modules/@react-navigation/core/lib/commonjs/types.js.map @@ -72,6 +124,28 @@ index 55b77ca..de10a37 100644 \ No newline at end of file +{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IAC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MAAM+B,YAAY,GAAG,IAAAC,wBAAe,EAAC;IACnClG,MAAM;IACNnD,GAAG,EAAE6C,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAE7C,GAAG;IACf6E,QAAQ;IACRE;EACF,CAAC,CAAC;EAEF,MAAM6C,UAAU,GAAG,IAAA0B,6BAAoB,EAKrC;IACAC,EAAE,EAAEhI,OAAO,CAACgI,EAAE;IACdT,QAAQ;IACRjE,QAAQ;IACRwC,OAAO;IACPlE;EACF,CAAC,CAAC;EAEF,IAAAqG,2CAAkC,EAAC;IACjC5B,UAAU;IACV6B,gBAAgB,EAAEjB,cAAc,CAACkB;EACnC,CAAC,CAAC;EAEF,IAAAC,sBAAa,EAAC;IACZ9E,QAAQ;IACR+E,iBAAiB,EAAEjB,cAAc,CAAC9D;EACpC,CAAC,CAAC;EAEF,MAAMgD,WAAW,GAAG,IAAAgC,uBAAc,EAKhC;IACAvG,KAAK;IACLK,OAAO;IACPiE,UAAU;IACVhG,aAAa,EAAEL,OAAO,CAACK,aAAa;IACpCkI,oBAAoB,EAAEvI,OAAO,CAACuI,oBAAoB;IAClDhB,QAAQ;IACRjE,QAAQ;IACRE,QAAQ;IACRqE,YAAY;IACZX,WAAW;IACXG,gBAAgB;IAChBzF,MAAM;IACN;IACAkE;EACF,CAAC,CAAC;EAEF,IAAA0C,yBAAgB,EAAC;IACfzG,KAAK;IACLsE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMmC,iBAAiB,GAAG,IAAAC,qBAAY,EAAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} \ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/module/index.js b/node_modules/@react-navigation/core/lib/module/index.js +index 1d42c3a..06f6bde 100644 +--- a/node_modules/@react-navigation/core/lib/module/index.js ++++ b/node_modules/@react-navigation/core/lib/module/index.js +@@ -17,7 +17,7 @@ export * from './types'; + export { default as useFocusEffect } from './useFocusEffect'; + export { default as useIsFocused } from './useIsFocused'; + export { default as useNavigation } from './useNavigation'; +-export { default as useNavigationBuilder } from './useNavigationBuilder'; ++export { NavigationBuilderOptions, default as useNavigationBuilder } from './useNavigationBuilder'; + export { default as useNavigationContainerRef } from './useNavigationContainerRef'; + export { default as useNavigationState } from './useNavigationState'; + export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +diff --git a/node_modules/@react-navigation/core/lib/module/index.js.map b/node_modules/@react-navigation/core/lib/module/index.js.map +index ed01400..32855ca 100644 +--- a/node_modules/@react-navigation/core/lib/module/index.js.map ++++ b/node_modules/@react-navigation/core/lib/module/index.js.map +@@ -1 +1 @@ +-{"version":3,"names":["default","BaseNavigationContainer","createNavigationContainerRef","createNavigatorFactory","CurrentRenderContext","findFocusedRoute","getActionFromState","getFocusedRouteNameFromRoute","getPathFromState","getStateFromPath","NavigationContainerRefContext","NavigationContext","NavigationHelpersContext","NavigationRouteContext","PreventRemoveContext","PreventRemoveProvider","useFocusEffect","useIsFocused","useNavigation","useNavigationBuilder","useNavigationContainerRef","useNavigationState","UNSTABLE_usePreventRemove","usePreventRemoveContext","useRoute","validatePathConfig"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,OAAO,IAAIC,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASD,OAAO,IAAIE,4BAA4B,QAAQ,gCAAgC;AACxF,SAASF,OAAO,IAAIG,sBAAsB,QAAQ,0BAA0B;AAC5E,SAASH,OAAO,IAAII,oBAAoB,QAAQ,wBAAwB;AACxE,SAASJ,OAAO,IAAIK,gBAAgB,QAAQ,oBAAoB;AAChE,SAASL,OAAO,IAAIM,kBAAkB,QAAQ,sBAAsB;AACpE,SAASN,OAAO,IAAIO,4BAA4B,QAAQ,gCAAgC;AACxF,SAASP,OAAO,IAAIQ,gBAAgB,QAAQ,oBAAoB;AAChE,SAASR,OAAO,IAAIS,gBAAgB,QAAQ,oBAAoB;AAChE,SAAST,OAAO,IAAIU,6BAA6B,QAAQ,iCAAiC;AAC1F,SAASV,OAAO,IAAIW,iBAAiB,QAAQ,qBAAqB;AAClE,SAASX,OAAO,IAAIY,wBAAwB,QAAQ,4BAA4B;AAChF,SAASZ,OAAO,IAAIa,sBAAsB,QAAQ,0BAA0B;AAC5E,SAASb,OAAO,IAAIc,oBAAoB,QAAQ,wBAAwB;AACxE,SAASd,OAAO,IAAIe,qBAAqB,QAAQ,yBAAyB;AAC1E,cAAc,SAAS;AACvB,SAASf,OAAO,IAAIgB,cAAc,QAAQ,kBAAkB;AAC5D,SAAShB,OAAO,IAAIiB,YAAY,QAAQ,gBAAgB;AACxD,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,iBAAiB;AAC1D,SAASlB,OAAO,IAAImB,oBAAoB,QAAQ,wBAAwB;AACxE,SAASnB,OAAO,IAAIoB,yBAAyB,QAAQ,6BAA6B;AAClF,SAASpB,OAAO,IAAIqB,kBAAkB,QAAQ,sBAAsB;AACpE,SAASrB,OAAO,IAAIsB,yBAAyB,QAAQ,oBAAoB;AACzE,SAAStB,OAAO,IAAIuB,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASvB,OAAO,IAAIwB,QAAQ,QAAQ,YAAY;AAChD,SAASxB,OAAO,IAAIyB,kBAAkB,QAAQ,sBAAsB;AACpE,cAAc,2BAA2B"} +\ No newline at end of file ++{"version":3,"names":["default","BaseNavigationContainer","createNavigationContainerRef","createNavigatorFactory","CurrentRenderContext","findFocusedRoute","getActionFromState","getFocusedRouteNameFromRoute","getPathFromState","getStateFromPath","NavigationContainerRefContext","NavigationContext","NavigationHelpersContext","NavigationRouteContext","PreventRemoveContext","PreventRemoveProvider","useFocusEffect","useIsFocused","useNavigation","NavigationBuilderOptions","useNavigationBuilder","useNavigationContainerRef","useNavigationState","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AASvB,OAAO,IAAIwB,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASxB,OAAO,IAAIyB,QAAQ,QAAQ,YAAY;AAChD,SAASzB,OAAO,IAAI0B,kBAAkB,QAAQ,sBAAsB;AACpE,cAAc,2BAA2B"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/module/types.js.map b/node_modules/@react-navigation/core/lib/module/types.js.map index 21fd3e8..7fa0d02 100644 --- a/node_modules/@react-navigation/core/lib/module/types.js.map @@ -526,6 +600,28 @@ index 0000000..0f1e440 @@ -0,0 +1 @@ +{"version":3,"file":"useRoute.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/useRoute.test.tsx"],"names":[],"mappings":""} \ No newline at end of file +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts +index e59dc93..9481d93 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts ++++ b/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts +@@ -17,7 +17,7 @@ export * from './types'; + export { default as useFocusEffect } from './useFocusEffect'; + export { default as useIsFocused } from './useIsFocused'; + export { default as useNavigation } from './useNavigation'; +-export { default as useNavigationBuilder } from './useNavigationBuilder'; ++export { NavigationBuilderOptions, default as useNavigationBuilder, } from './useNavigationBuilder'; + export { default as useNavigationContainerRef } from './useNavigationContainerRef'; + export { default as useNavigationState } from './useNavigationState'; + export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +diff --git a/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map +index 366138e..b8b7de5 100644 +--- a/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map ++++ b/node_modules/@react-navigation/core/lib/typescript/src/index.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI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AO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,wBAAwB,EACxB,OAAO,IAAI,oBAAoB,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,cAAc,2BAA2B,CAAC"} +\ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts index fcd456b..a9ee1ae 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts @@ -566,17 +662,19 @@ index 6594ef4..eccdf61 100644 +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,o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AAS,SAAS,EAAE,IAAI;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,EAAE,IAAI;KAC/C,SAAS,IAAI,MAAM,SAAS,CAAC,CAAC,EAAE,WAAW,CAC1C,SAAS,CAAC,SAAS,CAAC,CACrB,SAAS,qBAAqB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,GAC/C,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GACtB,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,kBAAkB,CAAC;CAClE,CAAC"} \ No newline at end of file diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts -index 53d474e..87c846d 100644 +index 53d474e..3382383 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts +++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts -@@ -1,6 +1,6 @@ +@@ -1,7 +1,7 @@ import { DefaultRouterOptions, NavigationState, ParamListBase, PartialState, RouterFactory } from '@react-navigation/routers'; import * as React from 'react'; -import { DefaultNavigatorOptions, EventMapCore, PrivateValueStore, RouteProp } from './types'; +-type NavigationBuilderOptions = { +import { DefaultNavigatorOptions, EventMapBase, EventMapCore, PrivateValueStore, RouteConfig, RouteProp } from './types'; - type NavigationBuilderOptions = { ++export type NavigationBuilderOptions = { /** * Default options specified by the navigator. + * It receives the custom options in the arguments if a function is specified. @@ -12,6 +12,8 @@ type NavigationBuilderOptions = { options: ScreenOptions; }) => ScreenOptions); @@ -614,18 +712,85 @@ index 53d474e..87c846d 100644 NavigationContent: ({ children }: { children: React.ReactNode; diff --git a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map -index 33762f4..8370e58 100644 +index 33762f4..7865e44 100644 --- a/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map +++ b/node_modules/@react-navigation/core/lib/typescript/src/useNavigationBuilder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EAEvB,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAwLF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,CACT,GACC,wBAAwB,CAAC,aAAa,CAAC,GACvC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0chB"} \ No newline at end of file -+{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,YAAY,EAEZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAOF,KAAK,iBAAiB,CACpB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,SAAS,SAAS,aAAa,EAC/B,SAAS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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8cF"} -\ No newline at end of file ++{"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,YAAY,EAEZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,MAAM,MAAM,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IAC/D;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAOF,KAAK,iBAAiB,CACpB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,YAAY,EAC7B,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IACjD,WAAW,CACb,SAAS,EACT,SAAS,EACT,KAAK,EACL,aAAa,EACb,QAAQ,CACT,CAAC,SAAS,CAAC,CAAC;AAEb,KAAK,sBAAsB,CACzB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,wBAAwB,SAAS,EAAE,GAAG,aAAa,IACjD,CAAC,SAAS,SAAS,aAAa,EAAE,SAAS,SAAS,MAAM,SAAS,EACrE,OAAO,EAAE,iBAAiB,CACxB,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,SAAS,CACV,KACE,iBAAiB,CACpB,KAAK,EACL,wBAAwB,EACxB,QAAQ,EACR,SAAS,EACT,SAAS,CACV,CAAC;AAwMF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,wBAAwB,SAAS,EAAE,GAAG,aAAa,EAEnD,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,wBAAwB,EACxB,QAAQ,CACT,GACC,wBAAwB,CAAC,wBAAwB,CAAC,GAClD,aAAa,EACf,sBAAsB,CAAC,EAAE,sBAAsB,CAC7C,KAAK,EACL,aAAa,EACb,QAAQ,EACR,wBAAwB,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8cF"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/core/src/index.tsx b/node_modules/@react-navigation/core/src/index.tsx +index 61706b6..9db0c9d 100644 +--- a/node_modules/@react-navigation/core/src/index.tsx ++++ b/node_modules/@react-navigation/core/src/index.tsx +@@ -17,7 +17,10 @@ export * from './types'; + export { default as useFocusEffect } from './useFocusEffect'; + export { default as useIsFocused } from './useIsFocused'; + export { default as useNavigation } from './useNavigation'; +-export { default as useNavigationBuilder } from './useNavigationBuilder'; ++export { ++ NavigationBuilderOptions, ++ default as useNavigationBuilder, ++} from './useNavigationBuilder'; + export { default as useNavigationContainerRef } from './useNavigationContainerRef'; + export { default as useNavigationState } from './useNavigationState'; + export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; +diff --git a/node_modules/@react-navigation/core/src/types.tsx b/node_modules/@react-navigation/core/src/types.tsx +index b691d75..a76b2f9 100644 +--- a/node_modules/@react-navigation/core/src/types.tsx ++++ b/node_modules/@react-navigation/core/src/types.tsx +@@ -23,7 +23,8 @@ export type DefaultNavigatorOptions< + ParamList extends ParamListBase, + State extends NavigationState, + ScreenOptions extends {}, +- EventMap extends EventMapBase ++ EventMap extends EventMapBase, ++ RouteName extends keyof ParamList = keyof ParamList + > = DefaultRouterOptions> & { + /** + * Optional ID for the navigator. Can be used with `navigation.getParent(id)` to refer to a parent. +@@ -40,7 +41,7 @@ export type DefaultNavigatorOptions< + screenListeners?: + | ScreenListeners + | ((props: { +- route: RouteProp; ++ route: RouteProp; + navigation: any; + }) => ScreenListeners); + /** +@@ -49,7 +50,7 @@ export type DefaultNavigatorOptions< + screenOptions?: + | ScreenOptions + | ((props: { +- route: RouteProp; ++ route: RouteProp; + navigation: any; + }) => ScreenOptions); + }; +diff --git a/node_modules/@react-navigation/core/src/useDescriptors.tsx b/node_modules/@react-navigation/core/src/useDescriptors.tsx +index d5a192c..12d4f89 100644 +--- a/node_modules/@react-navigation/core/src/useDescriptors.tsx ++++ b/node_modules/@react-navigation/core/src/useDescriptors.tsx +@@ -236,3 +236,5 @@ export default function useDescriptors< + return acc; + }, {}); + } ++ ++export type { Options as DescriptorOptions }; diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx -index b1971ba..05d3976 100644 +index b1971ba..5df9cd2 100644 --- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx +@@ -49,7 +49,7 @@ import useScheduleUpdate from './useScheduleUpdate'; + // eslint-disable-next-line babel/no-unused-expressions + PrivateValueStore; + +-type NavigationBuilderOptions = { ++export type NavigationBuilderOptions = { + /** + * Default options specified by the navigator. + * It receives the custom options in the arguments if a function is specified. @@ -68,6 +68,41 @@ type NavigatorRoute = { params?: NavigatorScreenParams; }; diff --git a/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx b/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx new file mode 100644 index 000000000000..819f7ee2f3b5 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx @@ -0,0 +1,5 @@ +import createPlatformStackNavigatorComponent from './createPlatformStackNavigatorComponent/index.native'; + +const PlatformStackNavigator = createPlatformStackNavigatorComponent('PlatformStackNavigator'); + +export default PlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.tsx new file mode 100644 index 000000000000..ea025df8466d --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator.tsx @@ -0,0 +1,12 @@ +import {createNavigatorFactory} from '@react-navigation/native'; +import type {ParamListBase} from '@react-navigation/native'; +import PlatformStackNavigator from './PlatformStackNavigator'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from './types'; + +function createPlatformStackNavigator() { + return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( + PlatformStackNavigator, + )(); +} + +export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx deleted file mode 100644 index a60c598f86f1..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.native.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {NativeStackView} from '@react-navigation/native-stack'; -import React from 'react'; -import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, - PlatformStackNavigationState, - PlatformStackNavigatorProps, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; - -function PlatformStackNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - return ( - - - - ); -} -PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - -function createPlatformStackNavigator() { - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( - PlatformStackNavigator, - )(); -} - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx deleted file mode 100644 index b83c36810a40..000000000000 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import {StackView} from '@react-navigation/stack'; -import React from 'react'; -import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, - PlatformStackNavigationState, - PlatformStackNavigatorProps, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; - -function PlatformStackNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - return ( - - - - ); -} -PlatformStackNavigator.displayName = 'PlatformStackNavigator'; - -function createPlatformStackNavigator() { - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof PlatformStackNavigator>( - PlatformStackNavigator, - )(); -} - -export default createPlatformStackNavigator; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx new file mode 100644 index 000000000000..3fce3428d291 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -0,0 +1,79 @@ +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; +import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; +import {NativeStackView} from '@react-navigation/native-stack'; +import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import useThemeStyles from '@hooks/useThemeStyles'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; +import type { + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackNavigatorProps, + PlatformStackRouterOptions, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {CreatePlaformNavigatorOptions, PlatformNavigationBuilderOptions} from './types'; + +function createPlatformStackNavigatorComponent( + displayName: string, + options?: CreatePlaformNavigatorOptions, +) { + const createRouter = options?.createRouter ?? StackRouter; + const transformState = options?.transformState; + const renderExtraContent = options?.renderExtraContent; + + function PlatformNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { + const styles = useThemeStyles(); + const windowDimensions = useWindowDimensions(); + + const nativeScreenOptions = withNativeNavigationOptions(screenOptions); + + const transformScreenProps = ( + screenOptionsToTransform: PlatformStackScreenOptionsWithoutNavigation, + ) => withNativeNavigationOptions(screenOptionsToTransform); + + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + RouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + NativeStackNavigationEventMap, + NativeStackNavigationOptions + >( + createRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + } as PlatformNavigationBuilderOptions, + transformScreenProps, + ); + + const {stateToRender, searchRoute} = transformState?.(state, { + styles, + windowDimensions, + descriptors, + }) ?? {stateToRender: state, undefined}; + + return ( + + + + {renderExtraContent?.({searchRoute, styles, windowDimensions, descriptors})} + + ); + } + PlatformNavigator.displayName = displayName; + + return PlatformNavigator; +} + +export default createPlatformStackNavigatorComponent; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx new file mode 100644 index 000000000000..7ec3bac944bb --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -0,0 +1,79 @@ +import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; +import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; +import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; +import {StackView} from '@react-navigation/stack'; +import useThemeStyles from '@hooks/useThemeStyles'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import type { + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackNavigatorProps, + PlatformStackRouterOptions, + PlatformStackScreenOptionsWithoutNavigation, +} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {CreatePlaformNavigatorOptions, PlatformNavigationBuilderOptions} from './types'; + +function createPlatformStackNavigatorComponent( + displayName: string, + options?: CreatePlaformNavigatorOptions, +) { + const createRouter = options?.createRouter ?? StackRouter; + const transformState = options?.transformState; + const renderExtraContent = options?.renderExtraContent; + + function PlatformNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { + const styles = useThemeStyles(); + const windowDimensions = useWindowDimensions(); + + const nativeScreenOptions = withWebNavigationOptions(screenOptions); + + const transformScreenProps = ( + screenOptionsToTransform: PlatformStackScreenOptionsWithoutNavigation, + ) => withWebNavigationOptions(screenOptionsToTransform); + + const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< + PlatformStackNavigationState, + RouterOptions, + StackActionHelpers, + PlatformStackNavigationOptions, + StackNavigationEventMap, + StackNavigationOptions + >( + createRouter, + { + id, + children, + screenOptions: nativeScreenOptions, + screenListeners, + initialRouteName, + } as PlatformNavigationBuilderOptions, + transformScreenProps, + ); + + const {stateToRender, searchRoute} = transformState?.(state, { + styles, + windowDimensions, + descriptors, + }) ?? {stateToRender: state, undefined}; + + return ( + + + + {renderExtraContent?.({searchRoute, styles, windowDimensions, descriptors})} + + ); + } + PlatformNavigator.displayName = displayName; + + return PlatformNavigator; +} + +export default createPlatformStackNavigatorComponent; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts new file mode 100644 index 000000000000..7127a4eb573e --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts @@ -0,0 +1,92 @@ +import type {DefaultNavigatorOptions, EventMapBase, NavigationBuilderOptions, ParamListBase, StackActionHelpers, useNavigationBuilder} from '@react-navigation/native'; +import type WindowDimensions from '@hooks/useWindowDimensions/types'; +import type { + PlatformSpecificEventMap, + PlatformSpecificNavigationOptions, + PlatformStackNavigationDescriptor, + PlatformStackNavigationDescriptors, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackRouterFactory, + PlatformStackRouterOptions, +} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {ThemeStyles} from '@styles/index'; + +type PlatformNavigationBuilderOptions< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, +> = DefaultNavigatorOptions, NavigationOptions, EventMap> & NavigationBuilderOptions & RouterOptions; + +type PlatformNavigationBuilderResult< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, +> = ReturnType< + typeof useNavigationBuilder, RouterOptions, StackActionHelpers, PlatformStackNavigationOptions, EventMap, NavigationOptions> +>; + +type CustomCodeProps< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = { + styles: ThemeStyles; + windowDimensions: WindowDimensions; + descriptors: PlatformStackNavigationDescriptors; +}; + +type SearchRoute = PlatformStackNavigationState['routes'][number]; +type TransformStateProps< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = CustomCodeProps & { + state: PlatformStackNavigationState; +}; +type TransformStateExtraResult = { + searchRoute?: SearchRoute; +}; +type TransformState< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = (props: TransformStateProps) => TransformStateExtraResult & { + stateToRender: PlatformStackNavigationState; +}; + +type RenderExtraContentProps< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = CustomCodeProps & TransformStateExtraResult; +type RenderExtraContent< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = (props: RenderExtraContentProps) => React.ReactElement | null; + +type CreatePlaformNavigatorOptions< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, +> = { + createRouter?: PlatformStackRouterFactory; + transformState?: TransformState; + renderExtraContent?: RenderExtraContent; +}; + +export type { + PlatformNavigationBuilderOptions, + PlatformNavigationBuilderResult, + PlatformStackNavigationDescriptor, + TransformStateExtraResult, + TransformStateProps, + TransformState, + RenderExtraContentProps, + RenderExtraContent, + CreatePlaformNavigatorOptions, +}; diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index 9cce65ed0d97..ca66fcd87e2c 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -1,4 +1,14 @@ -import type {DefaultNavigatorOptions, NavigationProp, ParamListBase, RouteProp, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; +import type { + DefaultNavigatorOptions, + Descriptor, + EventMapBase, + NavigationProp, + ParamListBase, + RouteProp, + RouterFactory, + StackNavigationState, + StackRouterOptions, +} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; @@ -78,16 +88,40 @@ type GeneralPlatformStackNavigationOptions = { }; type PlatformStackNavigationOptions = CommonStackNavigationOptions & GeneralPlatformStackNavigationOptions; +type PlatformSpecificNavigationOptions = StackNavigationOptions | NativeStackNavigationOptions; type CommonStackNavigationEventMap = CommonProperties; type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; +type PlatformSpecificEventMap = StackNavigationOptions | NativeStackNavigationOptions; -type PlatformStackNavigationRouterOptions = StackRouterOptions; +type PlatformStackRouterOptions = StackRouterOptions; +type PlatformStackRouterFactory = RouterFactory< + PlatformStackNavigationState, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any, + RouterOptions +>; + +type PlatformStackNavigationDescriptor< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = Descriptor< + NavigationOptions, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + NavigationProp, NavigationOptions, EventMap>, + RouteProp +>; +type PlatformStackNavigationDescriptors< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = Record>; type PlatformStackNavigatorProps< ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList, - RouterOptions extends PlatformStackNavigationRouterOptions = PlatformStackNavigationRouterOptions, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, > = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & RouterOptions & StackNavigationConfig; @@ -100,7 +134,7 @@ type PlatformStackNavigationProp; -type PlatformStackRouteProp = RouteProp; +type PlatformStackRouteProp = RouteProp; type PlatformStackScreenOptionsProps = { route: PlatformStackRouteProp; @@ -132,8 +166,13 @@ export type { CommonStackNavigationEventMap, PlatformStackNavigationState, PlatformStackNavigationOptions, + PlatformSpecificNavigationOptions, PlatformStackNavigationEventMap, - PlatformStackNavigationRouterOptions, + PlatformSpecificEventMap, + PlatformStackRouterOptions, + PlatformStackRouterFactory, + PlatformStackNavigationDescriptor, + PlatformStackNavigationDescriptors, PlatformStackNavigationProp, PlatformStackRouteProp, PlatformStackScreenOptions, From 10e50c2c0ed66b2038a64b2ec8e9dd597a318448 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 14:52:45 +0200 Subject: [PATCH 069/589] simplify ResponsiveStackNavigator --- .../RenderSearchRoute.tsx | 25 ++++++ .../getStateWithSearch.tsx | 64 +++++++++++++++ .../index.native.tsx | 68 ---------------- .../createResponsiveStackNavigator/index.tsx | 78 ++++--------------- .../createResponsiveStackNavigator/types.ts | 9 +-- .../useStateWithSearch.tsx | 65 ---------------- 6 files changed, 105 insertions(+), 204 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx create mode 100644 src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx delete mode 100644 src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx delete mode 100644 src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx new file mode 100644 index 000000000000..14f97fba0e9c --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx @@ -0,0 +1,25 @@ +import type {EventMapBase} from '@react-navigation/native'; +import {View} from 'react-native'; +import type {RenderExtraContentProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; + +function RenderSearchRoute({ + searchRoute, + styles, + descriptors, +}: RenderExtraContentProps) { + if (!searchRoute) { + return null; + } + + const key = searchRoute.key; + const descriptor = descriptors[key]; + + if (!descriptor) { + return null; + } + + return {descriptor.render()}; +} + +export default RenderSearchRoute; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx new file mode 100644 index 000000000000..dc517327adce --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx @@ -0,0 +1,64 @@ +import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; +import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {RootStackParamList, State} from '@libs/Navigation/types'; +import NAVIGATORS from '@src/NAVIGATORS'; +import SCREENS from '@src/SCREENS'; + +type Routes = PlatformStackNavigationState['routes']; +function reduceCentralPaneRoutes(routes: Routes): Routes { + const result: Routes = []; + let count = 0; + const reverseRoutes = [...routes].reverse(); + + reverseRoutes.forEach((route) => { + if (route.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR) { + // Remove all central pane routes except the last 3. This will improve performance. + if (count < 3) { + result.push(route); + count++; + } + } else { + result.push(route); + } + }); + + return result.reverse(); +} + +function getStateWithSearch< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +>({state, windowDimensions}: TransformStateProps) { + const routes = reduceCentralPaneRoutes(state.routes); + + const lastRoute = routes[routes.length - 1]; + const isLastRouteSearchRoute = getTopmostCentralPaneRoute({routes: [lastRoute]} as State)?.name === SCREENS.SEARCH.CENTRAL_PANE; + + const firstRoute = routes[0]; + + // On narrow layout, if we are on /search route we want to hide all central pane routes and show only the bottom tab navigator. + if (windowDimensions.isSmallScreenWidth && isLastRouteSearchRoute) { + return { + stateToRender: { + ...state, + index: 0, + routes: [firstRoute], + }, + searchRoute: lastRoute, + }; + } + + return { + stateToRender: { + ...state, + index: routes.length - 1, + routes: [...routes], + }, + searchRoute: undefined, + }; +} + +export default getStateWithSearch; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx deleted file mode 100644 index fca7bb1acc7c..000000000000 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.native.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {NativeStackView} from '@react-navigation/native-stack'; -import React from 'react'; -import {View} from 'react-native'; -import useThemeStyles from '@hooks/useThemeStyles'; -import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import CustomRouter from './CustomRouter'; -import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -import useStateWithSearch from './useStateWithSearch'; - -function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { - const styles = useThemeStyles(); - - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - CustomRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - const {stateToRender, searchRoute} = useStateWithSearch(state); - - return ( - - - {searchRoute && {descriptors[searchRoute.key].render()}} - - ); -} -ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - -function createResponsiveStackNavigator() { - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( - ResponsiveStackNavigator, - )(); -} - -export default createResponsiveStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index 69131d54aa64..f542810bfcc2 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -1,69 +1,19 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import {StackView} from '@react-navigation/stack'; -import React from 'react'; -import {View} from 'react-native'; -import useThemeStyles from '@hooks/useThemeStyles'; -import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import CustomRouter from './CustomRouter'; -import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types'; -import useStateWithSearch from './useStateWithSearch'; - -function ResponsiveStackNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: ResponsiveStackNavigatorProps) { - const styles = useThemeStyles(); - - const webScreenOptions = withWebNavigationOptions(screenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - ResponsiveStackNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - CustomRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - const {stateToRender, searchRoute} = useStateWithSearch(state); - - return ( - - - {searchRoute && {descriptors[searchRoute.key].render()}} - - ); -} -ResponsiveStackNavigator.displayName = 'ResponsiveStackNavigator'; - -function createReponsiveStackNavigator() { +import type {ParamListBase} from '@react-navigation/native'; +import {createNavigatorFactory} from '@react-navigation/native'; +import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import getStateWithSearch from './getStateWithSearch'; +import RenderSearchRoute from './RenderSearchRoute'; + +const ResponsiveStackNavigator = createPlatformStackNavigatorComponent('ResponsiveStackNavigator', { + transformState: getStateWithSearch, + renderExtraContent: RenderSearchRoute, +}); + +function createResponsiveStackNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof ResponsiveStackNavigator>( ResponsiveStackNavigator, )(); } -export default createReponsiveStackNavigator; +export default createResponsiveStackNavigator; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts index 6d7187dbe9af..d4df8f6ea45d 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts @@ -1,12 +1,7 @@ import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, - PlatformStackNavigationState, -} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -type ResponsiveStackNavigatorRouterOptions = PlatformStackNavigationRouterOptions; +type ResponsiveStackNavigatorRouterOptions = PlatformStackRouterOptions; type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx deleted file mode 100644 index 47430f8225c0..000000000000 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/useStateWithSearch.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import type {ParamListBase} from '@react-navigation/native'; -import {useMemo} from 'react'; -import useWindowDimensions from '@hooks/useWindowDimensions'; -import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; -import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {RootStackParamList, State} from '@libs/Navigation/types'; -import NAVIGATORS from '@src/NAVIGATORS'; -import SCREENS from '@src/SCREENS'; - -type Routes = PlatformStackNavigationState['routes']; -function reduceCentralPaneRoutes(routes: Routes): Routes { - const result: Routes = []; - let count = 0; - const reverseRoutes = [...routes].reverse(); - - reverseRoutes.forEach((route) => { - if (route.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR) { - // Remove all central pane routes except the last 3. This will improve performance. - if (count < 3) { - result.push(route); - count++; - } - } else { - result.push(route); - } - }); - - return result.reverse(); -} - -const useStateWithSearch = (state: PlatformStackNavigationState) => { - const {isSmallScreenWidth} = useWindowDimensions(); - - return useMemo(() => { - const routes = reduceCentralPaneRoutes(state.routes); - - const lastRoute = routes[routes.length - 1]; - const isLastRouteSearchRoute = getTopmostCentralPaneRoute({routes: [lastRoute]} as State)?.name === SCREENS.SEARCH.CENTRAL_PANE; - - const firstRoute = routes[0]; - - // On narrow layout, if we are on /search route we want to hide all central pane routes and show only the bottom tab navigator. - if (isSmallScreenWidth && isLastRouteSearchRoute) { - return { - stateToRender: { - ...state, - index: 0, - routes: [firstRoute], - }, - searchRoute: lastRoute, - }; - } - - return { - stateToRender: { - ...state, - index: routes.length - 1, - routes: [...routes], - }, - searchRoute: undefined, - }; - }, [isSmallScreenWidth, state]); -}; - -export default useStateWithSearch; From 26a667abf2ea7e8e2dde7d42d1369a9c8ecac5a2 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 14:52:52 +0200 Subject: [PATCH 070/589] update type names --- .../createCustomBottomTabNavigator/index.native.tsx | 4 ++-- .../createCustomBottomTabNavigator/index.tsx | 4 ++-- .../createCustomFullScreenNavigator/types.ts | 9 ++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx index 21fa0e0b885c..b1da7bfc4dea 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx @@ -10,8 +10,8 @@ import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigatio import type { PlatformStackNavigationEventMap, PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, PlatformStackNavigationState, + PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; @@ -26,7 +26,7 @@ function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, + PlatformStackRouterOptions, StackActionHelpers, PlatformStackNavigationOptions, NativeStackNavigationEventMap, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index d1f3333e6548..ac1592a5e233 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -10,8 +10,8 @@ import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/p import type { PlatformStackNavigationEventMap, PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, PlatformStackNavigationState, + PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; @@ -26,7 +26,7 @@ function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, - PlatformStackNavigationRouterOptions, + PlatformStackRouterOptions, StackActionHelpers, PlatformStackNavigationOptions, StackNavigationEventMap, diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts index 2c4107335eb3..e46989c28118 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts @@ -1,12 +1,7 @@ import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationRouterOptions, - PlatformStackNavigationState, -} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -type FullScreenNavigatorRouterOptions = PlatformStackNavigationRouterOptions; +type FullScreenNavigatorRouterOptions = PlatformStackRouterOptions; type FullScreenNavigatorProps = DefaultNavigatorOptions< ParamList, From 1620f0c3070e386420245f7a839cbe0eeec587a7 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 14:53:10 +0200 Subject: [PATCH 071/589] fix: param --- .../createPlatformStackNavigatorComponent/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index 7ec3bac944bb..866f003f2e87 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -51,11 +51,7 @@ function createPlatformStackNavigatorComponent From 43f78482db0f5a5cd76aa37bd0bfec0b3994407d Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 15:41:30 +0200 Subject: [PATCH 072/589] simplify types --- .../index.native.tsx | 55 ++++++++++++------- .../index.tsx | 51 ++++++++++++----- .../types.ts | 48 +++++++++++----- 3 files changed, 106 insertions(+), 48 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index 3fce3428d291..554a596a39f9 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -2,6 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; +import {useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; @@ -12,15 +13,16 @@ import type { PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformNavigatorOptions, PlatformNavigationBuilderOptions} from './types'; +import type {CreatePlaformStackNavigatorOptions, CustomComponentProps, PlatformNavigationBuilderOptions} from './types'; function createPlatformStackNavigatorComponent( displayName: string, - options?: CreatePlaformNavigatorOptions, + options?: CreatePlaformStackNavigatorOptions, ) { const createRouter = options?.createRouter ?? StackRouter; const transformState = options?.transformState; - const renderExtraContent = options?.renderExtraContent; + const ExtraContent = options?.ExtraContent; + const NavigationContentWrapper = options?.NavigationContentWrapper; function PlatformNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { const styles = useThemeStyles(); @@ -51,25 +53,40 @@ function createPlatformStackNavigatorComponent - + const customComponentProps = useMemo>( + () => ({ + state, + displayName, + searchRoute, + descriptors, + }), + [state, searchRoute, descriptors], + ); + + const Content = useMemo( + () => ( + + - {renderExtraContent?.({searchRoute, styles, windowDimensions, descriptors})} - + {ExtraContent && ( + // eslint-disable-next-line react/jsx-props-no-spreading + + )} + + ), + [NavigationContent, customComponentProps, descriptors, navigation, props, stateToRender], ); + + // eslint-disable-next-line react/jsx-props-no-spreading + return NavigationContentWrapper === undefined ? Content : {Content}; } PlatformNavigator.displayName = displayName; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index 866f003f2e87..31d8ecc5676e 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -2,6 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; +import {useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; @@ -12,15 +13,16 @@ import type { PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformNavigatorOptions, PlatformNavigationBuilderOptions} from './types'; +import type {CreatePlaformStackNavigatorOptions, CustomComponentProps, PlatformNavigationBuilderOptions} from './types'; function createPlatformStackNavigatorComponent( displayName: string, - options?: CreatePlaformNavigatorOptions, + options?: CreatePlaformStackNavigatorOptions, ) { const createRouter = options?.createRouter ?? StackRouter; const transformState = options?.transformState; - const renderExtraContent = options?.renderExtraContent; + const ExtraContent = options?.ExtraContent; + const NavigationContentWrapper = options?.NavigationContentWrapper; function PlatformNavigator({id, initialRouteName, screenOptions, screenListeners, children, ...props}: PlatformStackNavigatorProps) { const styles = useThemeStyles(); @@ -51,21 +53,40 @@ function createPlatformStackNavigatorComponent - + const customComponentProps = useMemo>( + () => ({ + state, + displayName, + searchRoute, + descriptors, + }), + [state, searchRoute, descriptors], + ); + + const Content = useMemo( + () => ( + + - {renderExtraContent?.({searchRoute, styles, windowDimensions, descriptors})} - + {ExtraContent && ( + // eslint-disable-next-line react/jsx-props-no-spreading + + )} + + ), + [NavigationContent, customComponentProps, descriptors, navigation, props, stateToRender], ); + + // eslint-disable-next-line react/jsx-props-no-spreading + return NavigationContentWrapper === undefined ? Content : {Content}; } PlatformNavigator.displayName = displayName; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts index 7127a4eb573e..4e629a125e17 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts @@ -33,19 +33,25 @@ type CustomCodeProps< EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = { - styles: ThemeStyles; - windowDimensions: WindowDimensions; descriptors: PlatformStackNavigationDescriptors; + displayName: string; }; type SearchRoute = PlatformStackNavigationState['routes'][number]; + +type CustomCodeDisplayProps = { + styles: ThemeStyles; + windowDimensions: WindowDimensions; +}; + type TransformStateProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = CustomCodeProps & { - state: PlatformStackNavigationState; -}; +> = CustomCodeProps & + CustomCodeDisplayProps & { + state: PlatformStackNavigationState; + }; type TransformStateExtraResult = { searchRoute?: SearchRoute; }; @@ -57,26 +63,38 @@ type TransformState< stateToRender: PlatformStackNavigationState; }; -type RenderExtraContentProps< +type CustomComponentProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = CustomCodeProps & TransformStateExtraResult; -type RenderExtraContent< + +type ExtraContent = ( + props: CustomComponentProps, +) => React.ReactElement | null; + +type NavigationContentWrapperProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = (props: RenderExtraContentProps) => React.ReactElement | null; - -type CreatePlaformNavigatorOptions< +> = React.PropsWithChildren>; +type NavigationContentWrapper< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, +> = (props: NavigationContentWrapperProps) => React.ReactElement | null; + +type CreatePlaformStackNavigatorOptions< RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, + NavigationOptions extends PlatformSpecificNavigationOptions = PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase = PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, > = { createRouter?: PlatformStackRouterFactory; + defaultScreenOptions?: NavigationOptions; transformState?: TransformState; - renderExtraContent?: RenderExtraContent; + ExtraContent?: ExtraContent; + NavigationContentWrapper?: NavigationContentWrapper; }; export type { @@ -86,7 +104,9 @@ export type { TransformStateExtraResult, TransformStateProps, TransformState, - RenderExtraContentProps, - RenderExtraContent, - CreatePlaformNavigatorOptions, + CustomComponentProps, + ExtraContent, + NavigationContentWrapperProps, + NavigationContentWrapper, + CreatePlaformStackNavigatorOptions, }; From 2fe3e72e522427251a6f55262c22e25b5c268bfa Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 15:41:38 +0200 Subject: [PATCH 073/589] simplify responsive stack navigator --- .../createResponsiveStackNavigator/RenderSearchRoute.tsx | 8 ++------ .../createResponsiveStackNavigator/getStateWithSearch.tsx | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx index 14f97fba0e9c..5ce76acb82df 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx @@ -1,13 +1,9 @@ import type {EventMapBase} from '@react-navigation/native'; import {View} from 'react-native'; -import type {RenderExtraContentProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import type {CustomComponentProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -function RenderSearchRoute({ - searchRoute, - styles, - descriptors, -}: RenderExtraContentProps) { +function RenderSearchRoute({searchRoute, styles, descriptors}: CustomComponentProps) { if (!searchRoute) { return null; } diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx index dc517327adce..7ec2fc18cc26 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx @@ -27,11 +27,7 @@ function reduceCentralPaneRoutes(routes: Routes): Routes { return result.reverse(); } -function getStateWithSearch< - NavigationOptions extends PlatformSpecificNavigationOptions, - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, ->({state, windowDimensions}: TransformStateProps) { +function getStateWithSearch({state, windowDimensions}: TransformStateProps) { const routes = reduceCentralPaneRoutes(state.routes); const lastRoute = routes[routes.length - 1]; From 85d015e21fc403975949d9ef1e52bb5fb7dc8039 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 15:41:46 +0200 Subject: [PATCH 074/589] simplify Bottom tab navigator --- .../BottomTabNavigationContentWrapper.tsx | 24 +++++ .../index.native.tsx | 76 ---------------- .../createCustomBottomTabNavigator/index.tsx | 87 +++++++------------ .../createCustomBottomTabNavigator/utils.ts | 25 ------ 4 files changed, 54 insertions(+), 158 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx delete mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx delete mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx new file mode 100644 index 000000000000..3c5187e97f9e --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx @@ -0,0 +1,24 @@ +import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import {View} from 'react-native'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useThemeStyles from '@hooks/useThemeStyles'; +import type {NavigationContentWrapperProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; + +function BottomTabNavigationContentWrapper({ + children, + displayName, +}: NavigationContentWrapperProps) { + const styles = useThemeStyles(); + + return ( + + {children} + + ); +} + +export default BottomTabNavigationContentWrapper; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx deleted file mode 100644 index b1da7bfc4dea..000000000000 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.native.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {NativeStackView} from '@react-navigation/native-stack'; -import React from 'react'; -import {View} from 'react-native'; -import ScreenWrapper from '@components/ScreenWrapper'; -import useThemeStyles from '@hooks/useThemeStyles'; -import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackRouterOptions, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import BottomTabBar from './BottomTabBar'; -import type CustomBottomTabNavigatorProps from './types'; -import {defaultScreenOptions} from './utils'; - -function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions, defaultScreenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options, defaultScreenOptions); - - const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - const styles = useThemeStyles(); - - return ( - - - - - - - - - ); -} -CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; - -function createCustomBottomTabNavigator() { - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( - CustomBottomTabNavigator, - )(); -} - -export default createCustomBottomTabNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index ac1592a5e233..5bfda300be69 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -1,72 +1,45 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, StackRouter, useNavigationBuilder} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import {StackView} from '@react-navigation/stack'; +import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import {createNavigatorFactory} from '@react-navigation/native'; import React from 'react'; -import {View} from 'react-native'; -import ScreenWrapper from '@components/ScreenWrapper'; -import useThemeStyles from '@hooks/useThemeStyles'; -import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; +import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent'; +import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type { + PlatformSpecificEventMap, + PlatformSpecificNavigationOptions, PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, - PlatformStackRouterOptions, - PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationStateRoute} from '@libs/Navigation/types'; +import SCREENS from '@src/SCREENS'; import BottomTabBar from './BottomTabBar'; -import type CustomBottomTabNavigatorProps from './types'; -import {defaultScreenOptions, getStateToRender} from './utils'; +import BottomTabNavigationContentWrapper from './BottomTabNavigationContentWrapper'; -function CustomBottomTabNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: CustomBottomTabNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions, defaultScreenOptions); +function transformState({state}: TransformStateProps) { + const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options, defaultScreenOptions); + // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. + // Currently this value will be switched only after the first HOME screen is rendered. + if (routesToRender[0].name !== SCREENS.HOME) { + const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); + if (routeToRender) { + routesToRender.unshift(routeToRender); + } + } - const {state, navigation, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - PlatformStackRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - StackRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); + return {stateToRender: {...state, routes: routesToRender, index: routesToRender.length - 1}}; +} - const styles = useThemeStyles(); - const stateToRender = getStateToRender(state); +const defaultScreenOptions: PlatformStackNavigationOptions = { + animation: 'none', +}; - return ( - - - - - - - - - ); -} -CustomBottomTabNavigator.displayName = 'CustomBottomTabNavigator'; +const CustomBottomTabNavigator = createPlatformStackNavigatorComponent('CustomBottomTabNavigator', { + transformState, + defaultScreenOptions, + NavigationContentWrapper: BottomTabNavigationContentWrapper, + ExtraContent: () => , +}); function createCustomBottomTabNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomBottomTabNavigator>( diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts deleted file mode 100644 index f7fad09f2526..000000000000 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/utils.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type {ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {NavigationStateRoute} from '@libs/Navigation/types'; -import SCREENS from '@src/SCREENS'; - -const defaultScreenOptions: PlatformStackNavigationOptions = { - animation: 'none', -}; - -function getStateToRender(state: PlatformStackNavigationState): PlatformStackNavigationState { - const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; - - // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. - // Currently this value will be switched only after the first HOME screen is rendered. - if (routesToRender[0].name !== SCREENS.HOME) { - const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); - if (routeToRender) { - routesToRender.unshift(routeToRender); - } - } - - return {...state, routes: routesToRender, index: routesToRender.length - 1}; -} - -export {defaultScreenOptions, getStateToRender}; From 00fa2444e8d134be82c1c21bc0d4bb4b0cfc8568 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 16:14:46 +0200 Subject: [PATCH 075/589] further improve logic of PlatformStackNaivgation --- .../index.native.tsx | 36 +++++++++++----- .../index.tsx | 36 +++++++++++----- .../types.ts | 42 +++++++++++++------ .../PlatformStackNavigation/types.tsx | 9 ++++ 4 files changed, 91 insertions(+), 32 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index 554a596a39f9..f7780919a7b0 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -2,7 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {useMemo} from 'react'; +import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; @@ -13,7 +13,7 @@ import type { PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformStackNavigatorOptions, CustomComponentProps, PlatformNavigationBuilderOptions} from './types'; +import type {CreatePlaformStackNavigatorOptions, CustomCodePropsWithTransformedState, PlatformNavigationBuilderOptions} from './types'; function createPlatformStackNavigatorComponent( displayName: string, @@ -23,6 +23,7 @@ function createPlatformStackNavigatorComponent) { const styles = useThemeStyles(); @@ -53,16 +54,27 @@ function createPlatformStackNavigatorComponent>( + const customCodeProps = useMemo>>( () => ({ state, + navigation, + descriptors, displayName, + }), + [state, navigation, descriptors], + ); + + const {stateToRender, searchRoute} = transformState?.({...customCodeProps, styles, windowDimensions}) ?? {stateToRender: state, undefined}; + + const customCodePropsWithTransformedState = useMemo< + CustomCodePropsWithTransformedState> + >( + () => ({ + ...customCodeProps, searchRoute, - descriptors, + stateToRender, }), - [state, searchRoute, descriptors], + [customCodeProps, searchRoute, stateToRender], ); const Content = useMemo( @@ -78,15 +90,19 @@ function createPlatformStackNavigatorComponent + )} ), - [NavigationContent, customComponentProps, descriptors, navigation, props, stateToRender], + [NavigationContent, customCodePropsWithTransformedState, descriptors, navigation, props, stateToRender], ); + useEffect(() => { + onIsSmallScreenWidthChange?.({...customCodePropsWithTransformedState, windowDimensions}); + }, [customCodePropsWithTransformedState, windowDimensions]); + // eslint-disable-next-line react/jsx-props-no-spreading - return NavigationContentWrapper === undefined ? Content : {Content}; + return NavigationContentWrapper === undefined ? Content : {Content}; } PlatformNavigator.displayName = displayName; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index 31d8ecc5676e..3dc86088f8db 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -2,7 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; -import {useMemo} from 'react'; +import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; @@ -13,7 +13,7 @@ import type { PlatformStackRouterOptions, PlatformStackScreenOptionsWithoutNavigation, } from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformStackNavigatorOptions, CustomComponentProps, PlatformNavigationBuilderOptions} from './types'; +import type {CreatePlaformStackNavigatorOptions, CustomCodePropsWithTransformedState, PlatformNavigationBuilderOptions} from './types'; function createPlatformStackNavigatorComponent( displayName: string, @@ -23,6 +23,7 @@ function createPlatformStackNavigatorComponent) { const styles = useThemeStyles(); @@ -53,16 +54,27 @@ function createPlatformStackNavigatorComponent>( + const customCodeProps = useMemo>>( () => ({ state, + navigation, + descriptors, displayName, + }), + [state, navigation, descriptors], + ); + + const {stateToRender, searchRoute} = transformState?.({...customCodeProps, styles, windowDimensions}) ?? {stateToRender: state, undefined}; + + const customCodePropsWithTransformedState = useMemo< + CustomCodePropsWithTransformedState> + >( + () => ({ + ...customCodeProps, searchRoute, - descriptors, + stateToRender, }), - [state, searchRoute, descriptors], + [customCodeProps, searchRoute, stateToRender], ); const Content = useMemo( @@ -78,15 +90,19 @@ function createPlatformStackNavigatorComponent + )} ), - [NavigationContent, customComponentProps, descriptors, navigation, props, stateToRender], + [NavigationContent, customCodePropsWithTransformedState, descriptors, navigation, props, stateToRender], ); + useEffect(() => { + onIsSmallScreenWidthChange?.({...customCodePropsWithTransformedState, windowDimensions}); + }, [customCodePropsWithTransformedState, windowDimensions]); + // eslint-disable-next-line react/jsx-props-no-spreading - return NavigationContentWrapper === undefined ? Content : {Content}; + return NavigationContentWrapper === undefined ? Content : {Content}; } PlatformNavigator.displayName = displayName; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts index 4e629a125e17..168068d23913 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts @@ -1,6 +1,7 @@ import type {DefaultNavigatorOptions, EventMapBase, NavigationBuilderOptions, ParamListBase, StackActionHelpers, useNavigationBuilder} from '@react-navigation/native'; import type WindowDimensions from '@hooks/useWindowDimensions/types'; import type { + PlatformNavigationBuilderNavigation, PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationDescriptor, @@ -24,19 +25,28 @@ type PlatformNavigationBuilderResult< EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, -> = ReturnType< - typeof useNavigationBuilder, RouterOptions, StackActionHelpers, PlatformStackNavigationOptions, EventMap, NavigationOptions> ->; + ActionHelpers extends StackActionHelpers = StackActionHelpers, +> = ReturnType, RouterOptions, ActionHelpers, PlatformStackNavigationOptions, EventMap, NavigationOptions>>; type CustomCodeProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, + ActionHelpers extends StackActionHelpers = StackActionHelpers, > = { + state: PlatformStackNavigationState; + navigation: PlatformNavigationBuilderNavigation; descriptors: PlatformStackNavigationDescriptors; displayName: string; }; +type CustomCodePropsWithTransformedState< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + ActionHelpers extends StackActionHelpers = StackActionHelpers, +> = CustomCodeProps & TransformStateExtraResult; + type SearchRoute = PlatformStackNavigationState['routes'][number]; type CustomCodeDisplayProps = { @@ -48,10 +58,7 @@ type TransformStateProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = CustomCodeProps & - CustomCodeDisplayProps & { - state: PlatformStackNavigationState; - }; +> = CustomCodeProps & CustomCodeDisplayProps; type TransformStateExtraResult = { searchRoute?: SearchRoute; }; @@ -63,21 +70,29 @@ type TransformState< stateToRender: PlatformStackNavigationState; }; -type CustomComponentProps< +type OnWindowDimensionsChangeProps< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = CustomCodeProps & { + windowDimensions: WindowDimensions; +}; + +type OnWindowDimensionsChange< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = CustomCodeProps & TransformStateExtraResult; +> = (props: OnWindowDimensionsChangeProps) => void; type ExtraContent = ( - props: CustomComponentProps, + props: CustomCodePropsWithTransformedState, ) => React.ReactElement | null; type NavigationContentWrapperProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = React.PropsWithChildren>; +> = React.PropsWithChildren>; type NavigationContentWrapper< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, @@ -93,6 +108,7 @@ type CreatePlaformStackNavigatorOptions< createRouter?: PlatformStackRouterFactory; defaultScreenOptions?: NavigationOptions; transformState?: TransformState; + onWindowDimensionsChange?: OnWindowDimensionsChange; ExtraContent?: ExtraContent; NavigationContentWrapper?: NavigationContentWrapper; }; @@ -104,7 +120,9 @@ export type { TransformStateExtraResult, TransformStateProps, TransformState, - CustomComponentProps, + OnWindowDimensionsChangeProps, + OnWindowDimensionsChange, + CustomCodePropsWithTransformedState, ExtraContent, NavigationContentWrapperProps, NavigationContentWrapper, diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types.tsx index ca66fcd87e2c..caf1a74e08f6 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types.tsx @@ -2,10 +2,12 @@ import type { DefaultNavigatorOptions, Descriptor, EventMapBase, + NavigationHelpers, NavigationProp, ParamListBase, RouteProp, RouterFactory, + StackActionHelpers, StackNavigationState, StackRouterOptions, } from '@react-navigation/native'; @@ -102,6 +104,12 @@ type PlatformStackRouterFactory; +type PlatformNavigationBuilderNavigation< + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + ActionHelpers extends StackActionHelpers = StackActionHelpers, +> = NavigationHelpers & ActionHelpers; + type PlatformStackNavigationDescriptor< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, @@ -171,6 +179,7 @@ export type { PlatformSpecificEventMap, PlatformStackRouterOptions, PlatformStackRouterFactory, + PlatformNavigationBuilderNavigation, PlatformStackNavigationDescriptor, PlatformStackNavigationDescriptors, PlatformStackNavigationProp, From 6d250425ee48b0de7dea3f82aae2f10a04df564c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 16:14:53 +0200 Subject: [PATCH 076/589] simplify custom routers --- .../createCustomBottomTabNavigator/types.ts | 8 --- .../CustomFullScreenRouter.tsx | 5 +- .../index.native.tsx | 60 ---------------- .../createCustomFullScreenNavigator/index.tsx | 71 ++----------------- .../createCustomFullScreenNavigator/types.ts | 13 ---- .../CustomRouter.ts | 4 +- ...{RenderSearchRoute.tsx => SearchRoute.tsx} | 9 ++- .../createResponsiveStackNavigator/index.tsx | 26 +++++-- .../createResponsiveStackNavigator/types.ts | 8 --- 9 files changed, 39 insertions(+), 165 deletions(-) delete mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts delete mode 100644 src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx delete mode 100644 src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts rename src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/{RenderSearchRoute.tsx => SearchRoute.tsx} (52%) delete mode 100644 src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts deleted file mode 100644 index ebc3fb74a36b..000000000000 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; - -type CustomBottomTabNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap> & { - initialRouteName: string; -}; - -export default CustomBottomTabNavigatorProps; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx index 4593c0b7688e..5e11aef37897 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/CustomFullScreenRouter.tsx @@ -1,9 +1,8 @@ import type {ParamListBase, PartialState, Router, RouterConfigOptions} from '@react-navigation/native'; import {StackRouter} from '@react-navigation/native'; import getIsNarrowLayout from '@libs/getIsNarrowLayout'; -import type {PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import SCREENS from '@src/SCREENS'; -import type {FullScreenNavigatorRouterOptions} from './types'; type StackState = PlatformStackNavigationState | PartialState>; @@ -62,7 +61,7 @@ function adaptStateIfNecessary(state: StackState) { } } -function CustomFullScreenRouter(options: FullScreenNavigatorRouterOptions) { +function CustomFullScreenRouter(options: PlatformStackRouterOptions) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const stackRouter = StackRouter(options) as Router, any>; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx deleted file mode 100644 index d486013d915b..000000000000 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.native.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import {NativeStackView} from '@react-navigation/native-stack'; -import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import CustomFullScreenRouter from './CustomFullScreenRouter'; -import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; - -function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { - const nativeScreenOptions = withNativeNavigationOptions(screenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withNativeNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - NativeStackNavigationEventMap, - NativeStackNavigationOptions - >( - CustomFullScreenRouter, - { - id, - children, - screenOptions: nativeScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - return ( - - - - ); -} -CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; - -function createCustomFullScreenNavigator() { - return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( - CustomFullScreenNavigator, - )(); -} - -export default createCustomFullScreenNavigator; diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx index 1afd96ec2636..a455d5a82e30 100644 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/index.tsx @@ -1,69 +1,12 @@ -import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; -import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; -import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import {StackView} from '@react-navigation/stack'; -import React, {useEffect} from 'react'; -import useWindowDimensions from '@hooks/useWindowDimensions'; -import navigationRef from '@libs/Navigation/navigationRef'; -import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type { - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {ParamListBase} from '@react-navigation/native'; +import {createNavigatorFactory} from '@react-navigation/native'; +import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import CustomFullScreenRouter from './CustomFullScreenRouter'; -import type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions} from './types'; -function CustomFullScreenNavigator({id, initialRouteName, children, screenOptions, screenListeners, ...props}: FullScreenNavigatorProps) { - const webScreenOptions = withWebNavigationOptions(screenOptions); - - const transformScreenProps = (options: PlatformStackScreenOptionsWithoutNavigation) => - withWebNavigationOptions(options); - - const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< - PlatformStackNavigationState, - FullScreenNavigatorRouterOptions, - StackActionHelpers, - PlatformStackNavigationOptions, - StackNavigationEventMap, - StackNavigationOptions - >( - CustomFullScreenRouter, - { - id, - children, - screenOptions: webScreenOptions, - screenListeners, - initialRouteName, - }, - transformScreenProps, - ); - - const {isSmallScreenWidth} = useWindowDimensions(); - - useEffect(() => { - if (!navigationRef.isReady()) { - return; - } - // We need to separately reset state of this navigator to trigger getRehydratedState. - navigation.reset(navigation.getState()); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isSmallScreenWidth]); - - return ( - - - - ); -} -CustomFullScreenNavigator.displayName = 'CustomFullScreenNavigator'; +const CustomFullScreenNavigator = createPlatformStackNavigatorComponent('CustomFullScreenNavigator', { + createRouter: CustomFullScreenRouter, +}); function createCustomFullScreenNavigator() { return createNavigatorFactory, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, typeof CustomFullScreenNavigator>( diff --git a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts b/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts deleted file mode 100644 index e46989c28118..000000000000 --- a/src/libs/Navigation/AppNavigator/createCustomFullScreenNavigator/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; - -type FullScreenNavigatorRouterOptions = PlatformStackRouterOptions; - -type FullScreenNavigatorProps = DefaultNavigatorOptions< - ParamList, - PlatformStackNavigationState, - PlatformStackNavigationOptions, - PlatformStackNavigationEventMap ->; - -export type {FullScreenNavigatorProps, FullScreenNavigatorRouterOptions}; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts index 504803026994..defc68cd0ea7 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/CustomRouter.ts @@ -6,10 +6,10 @@ import getTopmostBottomTabRoute from '@libs/Navigation/getTopmostBottomTabRoute' import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; import linkingConfig from '@libs/Navigation/linkingConfig'; import getAdaptedStateFromPath from '@libs/Navigation/linkingConfig/getAdaptedStateFromPath'; +import type {PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NavigationPartialRoute, RootStackParamList, State} from '@libs/Navigation/types'; import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; -import type {ResponsiveStackNavigatorRouterOptions} from './types'; function insertRootRoute(state: State, routeToInsert: NavigationPartialRoute) { const nonModalRoutes = state.routes.filter((route) => route.name !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR && route.name !== NAVIGATORS.LEFT_MODAL_NAVIGATOR); @@ -96,7 +96,7 @@ function compareAndAdaptState(state: StackNavigationState) { } } -function CustomRouter(options: ResponsiveStackNavigatorRouterOptions) { +function CustomRouter(options: PlatformStackRouterOptions) { const stackRouter = StackRouter(options); return { diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx similarity index 52% rename from src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx rename to src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx index 5ce76acb82df..c836298a2a5f 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/RenderSearchRoute.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx @@ -1,9 +1,12 @@ import type {EventMapBase} from '@react-navigation/native'; import {View} from 'react-native'; -import type {CustomComponentProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import useThemeStyles from '@hooks/useThemeStyles'; +import type {CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -function RenderSearchRoute({searchRoute, styles, descriptors}: CustomComponentProps) { +function SearchRoute({searchRoute, descriptors}: CustomCodePropsWithTransformedState) { + const styles = useThemeStyles(); + if (!searchRoute) { return null; } @@ -18,4 +21,4 @@ function RenderSearchRoute({searchRoute, styles, descriptors}: CustomComponentPr return {descriptor.render()}; } -export default RenderSearchRoute; +export default SearchRoute; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index f542810bfcc2..a062eb77d301 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -1,13 +1,31 @@ -import type {ParamListBase} from '@react-navigation/native'; +import type {EventMapBase, ParamListBase} from '@react-navigation/native'; import {createNavigatorFactory} from '@react-navigation/native'; +import navigationRef from '@libs/Navigation/navigationRef'; import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {OnWindowDimensionsChange} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import type { + PlatformSpecificEventMap, + PlatformSpecificNavigationOptions, + PlatformStackNavigationEventMap, + PlatformStackNavigationOptions, + PlatformStackNavigationState, +} from '@libs/Navigation/PlatformStackNavigation/types'; import getStateWithSearch from './getStateWithSearch'; -import RenderSearchRoute from './RenderSearchRoute'; +import RenderSearchRoute from './SearchRoute'; + +const handleWindowDimensionsChange: OnWindowDimensionsChange = ({navigation}) => { + if (!navigationRef.isReady()) { + return; + } + // We need to separately reset state of this navigator to trigger getRehydratedState. + navigation.reset(navigation.getState()); + // eslint-disable-next-line react-hooks/exhaustive-deps +}; const ResponsiveStackNavigator = createPlatformStackNavigatorComponent('ResponsiveStackNavigator', { transformState: getStateWithSearch, - renderExtraContent: RenderSearchRoute, + ExtraContent: RenderSearchRoute, + onWindowDimensionsChange: handleWindowDimensionsChange, }); function createResponsiveStackNavigator() { diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts deleted file mode 100644 index d4df8f6ea45d..000000000000 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; - -type ResponsiveStackNavigatorRouterOptions = PlatformStackRouterOptions; - -type ResponsiveStackNavigatorProps = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap>; - -export type {ResponsiveStackNavigatorRouterOptions, ResponsiveStackNavigatorProps}; From 0dcb55e57f929a4cb1760061bb40e77612997f12 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 18:44:42 +0200 Subject: [PATCH 077/589] improve types and add comments --- .../index.native.tsx | 21 ++-- .../index.tsx | 21 ++-- .../withNativeNavigationOptions.ts | 13 +-- .../withWebNavigationOptions.ts | 13 +-- .../types/NavigationBuilder.ts | 66 +++++++++++ .../types.ts => types/NavigatorComponent.ts} | 69 +++++------ .../types/PlatformStackNavigator.ts | 14 +++ .../types/ScreenOptions.ts | 24 ++++ .../{types.tsx => types/index.ts} | 107 +++++------------- 9 files changed, 188 insertions(+), 160 deletions(-) create mode 100644 src/libs/Navigation/PlatformStackNavigation/types/NavigationBuilder.ts rename src/libs/Navigation/PlatformStackNavigation/{createPlatformStackNavigatorComponent/types.ts => types/NavigatorComponent.ts} (65%) create mode 100644 src/libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator.ts create mode 100644 src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts rename src/libs/Navigation/PlatformStackNavigation/{types.tsx => types/index.ts} (56%) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index f7780919a7b0..ccc94b537261 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -6,18 +6,14 @@ import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type { - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackNavigatorProps, - PlatformStackRouterOptions, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformStackNavigatorOptions, CustomCodePropsWithTransformedState, PlatformNavigationBuilderOptions} from './types'; +import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; +import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; +import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; function createPlatformStackNavigatorComponent( displayName: string, - options?: CreatePlaformStackNavigatorOptions, + options?: CreatePlatformStackNavigatorComponentOptions, ) { const createRouter = options?.createRouter ?? StackRouter; const transformState = options?.transformState; @@ -31,9 +27,8 @@ function createPlatformStackNavigatorComponent( - screenOptionsToTransform: PlatformStackScreenOptionsWithoutNavigation, - ) => withNativeNavigationOptions(screenOptionsToTransform); + const transformScreenProps = (screenOptionsToTransform: PlatformStackScreenOptions) => + withNativeNavigationOptions(screenOptionsToTransform); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -54,7 +49,7 @@ function createPlatformStackNavigatorComponent>>( + const customCodeProps = useMemo>>( () => ({ state, navigation, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index 3dc86088f8db..9dc3fcac4196 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -6,18 +6,14 @@ import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type { - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackNavigatorProps, - PlatformStackRouterOptions, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {CreatePlaformStackNavigatorOptions, CustomCodePropsWithTransformedState, PlatformNavigationBuilderOptions} from './types'; +import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; +import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; +import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; function createPlatformStackNavigatorComponent( displayName: string, - options?: CreatePlaformStackNavigatorOptions, + options?: CreatePlatformStackNavigatorComponentOptions, ) { const createRouter = options?.createRouter ?? StackRouter; const transformState = options?.transformState; @@ -31,9 +27,8 @@ function createPlatformStackNavigatorComponent( - screenOptionsToTransform: PlatformStackScreenOptionsWithoutNavigation, - ) => withWebNavigationOptions(screenOptionsToTransform); + const transformScreenProps = (screenOptionsToTransform: PlatformStackScreenOptions) => + withWebNavigationOptions(screenOptionsToTransform); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, @@ -54,7 +49,7 @@ function createPlatformStackNavigatorComponent>>( + const customCodeProps = useMemo>>( () => ({ state, navigation, diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 3d01784fca54..2ab69133b1b8 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -1,11 +1,8 @@ import type {ParamListBase} from '@react-navigation/native'; import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type { - PlatformStackNavigationOptions, - PlatformStackScreenOptionsPropsWithoutNavigation, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationOptions, PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; import noAnimation from './animation/native/none'; import slideFromBottomAnimation from './animation/native/slideFromBottom'; import slideFromLeftAnimation from './animation/native/slideFromLeft'; @@ -19,11 +16,11 @@ const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigation }); function withNativeNavigationOptions( - screenOptions: PlatformStackScreenOptionsWithoutNavigation, + screenOptions: PlatformStackScreenOptions, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { + ? (p: PlatformStackScreenProps) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToNative({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 4c4aedc31924..e639bcc42f61 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -1,11 +1,8 @@ import type {ParamListBase} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; -import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type { - PlatformStackNavigationOptions, - PlatformStackScreenOptionsPropsWithoutNavigation, - PlatformStackScreenOptionsWithoutNavigation, -} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import {isRouteBasedScreenOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; import noAnimation from './animation/web/none'; import slideFromBottomAnimation from './animation/web/slideFromBottom'; import slideFromLeftAnimation from './animation/web/slideFromLeft'; @@ -20,11 +17,11 @@ const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOpt }); function withWebNavigationOptions( - screenOptions: PlatformStackScreenOptionsWithoutNavigation, + screenOptions: PlatformStackScreenOptions, defaultScreenOptions?: PlatformStackNavigationOptions, ) { return isRouteBasedScreenOptions(screenOptions) - ? (p: PlatformStackScreenOptionsPropsWithoutNavigation) => { + ? (p: PlatformStackScreenProps) => { const routeBasedScreenOptions = screenOptions(p); return transformPlatformOptionsToWeb({...defaultScreenOptions, ...routeBasedScreenOptions}); } diff --git a/src/libs/Navigation/PlatformStackNavigation/types/NavigationBuilder.ts b/src/libs/Navigation/PlatformStackNavigation/types/NavigationBuilder.ts new file mode 100644 index 000000000000..821584f58645 --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/types/NavigationBuilder.ts @@ -0,0 +1,66 @@ +// Represents the options passed to useNavigationBuilder for creating a custom navigation builder, +import type { + DefaultNavigatorOptions, + Descriptor, + EventMapBase, + NavigationBuilderOptions, + NavigationHelpers, + NavigationProp, + ParamListBase, + RouteProp, + StackActionHelpers, + useNavigationBuilder, +} from '@react-navigation/native'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '.'; + +// Represents the options passed to useNavigationBuilder for creating a custom navigation builder, +// using the abstracted and custom types from PlatformStackNavigation. +type PlatformNavigationBuilderOptions< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, +> = DefaultNavigatorOptions, NavigationOptions, EventMap> & NavigationBuilderOptions & RouterOptions; + +// Represents the return type of the useNavigationBuilder function using the types from PlatformStackNavigation. +type PlatformNavigationBuilderResult< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, + ActionHelpers extends StackActionHelpers = StackActionHelpers, +> = ReturnType, RouterOptions, ActionHelpers, PlatformStackNavigationOptions, EventMap, NavigationOptions>>; + +// Represents the type of the navigation object returned by useNavigationBuilder +type PlatformNavigationBuilderNavigation< + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, + ActionHelpers extends StackActionHelpers = StackActionHelpers, +> = NavigationHelpers & ActionHelpers; + +// Represents the type of a single descripter returned by useNavigationBuilder +type PlatformNavigationBuilderDescriptor< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = Descriptor< + NavigationOptions, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + NavigationProp, NavigationOptions, EventMap>, + RouteProp +>; + +// Represents the type of the descriptors object returned by useNavigationBuilder +type PlatformNavigationBuilderDescriptors< + NavigationOptions extends PlatformSpecificNavigationOptions, + EventMap extends PlatformSpecificEventMap & EventMapBase, + ParamList extends ParamListBase = ParamListBase, +> = Record>; + +export type { + PlatformNavigationBuilderOptions, + PlatformNavigationBuilderResult, + PlatformNavigationBuilderNavigation, + PlatformNavigationBuilderDescriptor, + PlatformNavigationBuilderDescriptors, +}; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts similarity index 65% rename from src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts rename to src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts index 168068d23913..f54aefe5974b 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts @@ -1,33 +1,11 @@ -import type {DefaultNavigatorOptions, EventMapBase, NavigationBuilderOptions, ParamListBase, StackActionHelpers, useNavigationBuilder} from '@react-navigation/native'; +import type {EventMapBase, ParamListBase, StackActionHelpers} from '@react-navigation/native'; import type WindowDimensions from '@hooks/useWindowDimensions/types'; -import type { - PlatformNavigationBuilderNavigation, - PlatformSpecificEventMap, - PlatformSpecificNavigationOptions, - PlatformStackNavigationDescriptor, - PlatformStackNavigationDescriptors, - PlatformStackNavigationOptions, - PlatformStackNavigationState, - PlatformStackRouterFactory, - PlatformStackRouterOptions, -} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ThemeStyles} from '@styles/index'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationState, PlatformStackRouterFactory, PlatformStackRouterOptions} from '.'; +import type {PlatformNavigationBuilderDescriptors, PlatformNavigationBuilderNavigation} from './NavigationBuilder'; -type PlatformNavigationBuilderOptions< - NavigationOptions extends PlatformSpecificNavigationOptions, - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, - RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, -> = DefaultNavigatorOptions, NavigationOptions, EventMap> & NavigationBuilderOptions & RouterOptions; - -type PlatformNavigationBuilderResult< - NavigationOptions extends PlatformSpecificNavigationOptions, - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, - RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, - ActionHelpers extends StackActionHelpers = StackActionHelpers, -> = ReturnType, RouterOptions, ActionHelpers, PlatformStackNavigationOptions, EventMap, NavigationOptions>>; - +// Props that custom code receives when passed to the createPlatformStackNavigatorComponent generator function. +// Custom logic like "transformState", "onWindowDimensionsChange" and custom components like "NavigationContentWrapper" and "ExtraContent" will receive these props type CustomCodeProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, @@ -36,40 +14,49 @@ type CustomCodeProps< > = { state: PlatformStackNavigationState; navigation: PlatformNavigationBuilderNavigation; - descriptors: PlatformStackNavigationDescriptors; + descriptors: PlatformNavigationBuilderDescriptors; displayName: string; }; +// Extension of CustomCodeProps to include the output from the "transformState" function. type CustomCodePropsWithTransformedState< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, ActionHelpers extends StackActionHelpers = StackActionHelpers, -> = CustomCodeProps & TransformStateExtraResult; +> = CustomCodeProps & TransformStateResult; +// Represents a route in the search context within the navigation state. type SearchRoute = PlatformStackNavigationState['routes'][number]; +// Since we cannot use hooks like useThemeStyles and useWindowDimensions in custom code functions, +// We need to run the hooks in the navigator and pass the results as props to the custom code functions. type CustomCodeDisplayProps = { styles: ThemeStyles; windowDimensions: WindowDimensions; }; +// Props that are passed to the "transformState" function. type TransformStateProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = CustomCodeProps & CustomCodeDisplayProps; -type TransformStateExtraResult = { + +// The result from the "transformState" function, which includes the transformed state and the search route. +type TransformStateResult = { + stateToRender: PlatformStackNavigationState; searchRoute?: SearchRoute; }; + +// Defines a function type for transforming the navigation state based on props, and returning the transformed state and search route. type TransformState< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = (props: TransformStateProps) => TransformStateExtraResult & { - stateToRender: PlatformStackNavigationState; -}; +> = (props: TransformStateProps) => TransformStateResult; +// Props that are passed to the "onWindowDimensionsChange" callback. type OnWindowDimensionsChangeProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, @@ -78,28 +65,34 @@ type OnWindowDimensionsChangeProps< windowDimensions: WindowDimensions; }; +// Defines a function type for handling changes in window dimensions within a navigation context. type OnWindowDimensionsChange< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = (props: OnWindowDimensionsChangeProps) => void; +// A React component that renders extra content within the navigator, like a header or footer. type ExtraContent = ( props: CustomCodePropsWithTransformedState, ) => React.ReactElement | null; +// Props for the NavigationContentWrapper component. type NavigationContentWrapperProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = React.PropsWithChildren>; + +// A React component that renders extra content within the navigator, like a header or footer. type NavigationContentWrapper< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, > = (props: NavigationContentWrapperProps) => React.ReactElement | null; -type CreatePlaformStackNavigatorOptions< +// Options for creating the PlatformStackNavigator using createPlatformStackNavigatorComponent. +type CreatePlatformStackNavigatorComponentOptions< RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, NavigationOptions extends PlatformSpecificNavigationOptions = PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase = PlatformSpecificEventMap & EventMapBase, @@ -114,17 +107,15 @@ type CreatePlaformStackNavigatorOptions< }; export type { - PlatformNavigationBuilderOptions, - PlatformNavigationBuilderResult, - PlatformStackNavigationDescriptor, - TransformStateExtraResult, + TransformStateResult as TransformStateExtraResult, TransformStateProps, TransformState, OnWindowDimensionsChangeProps, OnWindowDimensionsChange, + CustomCodeProps, CustomCodePropsWithTransformedState, ExtraContent, NavigationContentWrapperProps, NavigationContentWrapper, - CreatePlaformStackNavigatorOptions, + CreatePlatformStackNavigatorComponentOptions, }; diff --git a/src/libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator.ts b/src/libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator.ts new file mode 100644 index 000000000000..4374417b93df --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator.ts @@ -0,0 +1,14 @@ +import type {DefaultNavigatorOptions, ParamListBase} from '@react-navigation/native'; +import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '.'; + +// Props to configure the the PlatformStackNavigator +type PlatformStackNavigatorProps< + ParamList extends ParamListBase, + RouteName extends keyof ParamList = keyof ParamList, + RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, +> = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & + RouterOptions & + StackNavigationConfig; + +export default PlatformStackNavigatorProps; diff --git a/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts b/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts new file mode 100644 index 000000000000..eeca9ab8fadb --- /dev/null +++ b/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts @@ -0,0 +1,24 @@ +import type {ParamListBase} from '@react-navigation/native'; +import type {PlatformStackNavigationOptions} from '.'; +import type {PlatformStackScreenProps} from '.'; +import type PlatformStackNavigatorProps from './PlatformStackNavigator'; + +// The "screenOptions" and "defaultScreenOptions" can either be an object of configuration settings or +// a factory function that returns the configuration settings based on route and navigation props. +// These types are used to represent the screen options and their factory functions. + +type PlatformStackScreenOptions = PlatformStackNavigatorProps['screenOptions']; + +// type PlatformStackScreenOptionsWithoutNavigation = +// | PlatformStackNavigationOptions +// | ((props: PlatformScreenOptionsFactoryFunctionProps) => PlatformStackNavigationOptions) +// | undefined; + +function isRouteBasedScreenOptions( + screenOptions: PlatformStackScreenOptions, +): screenOptions is (props: PlatformStackScreenProps) => PlatformStackNavigationOptions { + return typeof screenOptions === 'function'; +} + +export {isRouteBasedScreenOptions}; +export type {PlatformStackScreenOptions}; diff --git a/src/libs/Navigation/PlatformStackNavigation/types.tsx b/src/libs/Navigation/PlatformStackNavigation/types/index.ts similarity index 56% rename from src/libs/Navigation/PlatformStackNavigation/types.tsx rename to src/libs/Navigation/PlatformStackNavigation/types/index.ts index caf1a74e08f6..8d7b87f5c183 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/types/index.ts @@ -1,29 +1,15 @@ -import type { - DefaultNavigatorOptions, - Descriptor, - EventMapBase, - NavigationHelpers, - NavigationProp, - ParamListBase, - RouteProp, - RouterFactory, - StackActionHelpers, - StackNavigationState, - StackRouterOptions, -} from '@react-navigation/native'; +import type {NavigationProp, ParamListBase, RouteProp, RouterFactory, StackNavigationState, StackRouterOptions} from '@react-navigation/native'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; -import type {StackNavigationConfig} from '@react-navigation/stack/lib/typescript/src/types'; +import type CommonProperties from '@src/types/utils/CommonProperties'; +// Represents the navigation state type for a platform-specific stack. type PlatformStackNavigationState = StackNavigationState; -type OmitNever> = { - [K in keyof T as T[K] extends never ? never : K]: T[K]; -}; -type CommonProperties = OmitNever>; - +// Common navigation options merged from both stack and native-stack navigations. type CommonStackNavigationOptions = CommonProperties; +// Expanded navigation options including possible custom properties for platform-specific implementations. type GeneralPlatformStackNavigationOptions = { keyboardHandlingEnabled?: boolean; @@ -89,14 +75,25 @@ type GeneralPlatformStackNavigationOptions = { // orientation?: ScreenProps['screenOrientation']; }; +// Combines common and general platform-specific options for PlatformStackNavigation. type PlatformStackNavigationOptions = CommonStackNavigationOptions & GeneralPlatformStackNavigationOptions; + +// Used to represent platform-specific navigation options. type PlatformSpecificNavigationOptions = StackNavigationOptions | NativeStackNavigationOptions; +// Common event map merged from both stack and native-stack navigations. type CommonStackNavigationEventMap = CommonProperties; + +// Represents the event map that can be used in the PlatformStackNavigation (only common events). type PlatformStackNavigationEventMap = CommonStackNavigationEventMap; + +// Used to represent platform-specific event maps. type PlatformSpecificEventMap = StackNavigationOptions | NativeStackNavigationOptions; +// Router options used in the PlatformStackNavigation type PlatformStackRouterOptions = StackRouterOptions; + +// Factory function type for creating a router specific to the PlatformStackNavigation type PlatformStackRouterFactory = RouterFactory< PlatformStackNavigationState, // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -104,36 +101,7 @@ type PlatformStackRouterFactory; -type PlatformNavigationBuilderNavigation< - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, - ActionHelpers extends StackActionHelpers = StackActionHelpers, -> = NavigationHelpers & ActionHelpers; - -type PlatformStackNavigationDescriptor< - NavigationOptions extends PlatformSpecificNavigationOptions, - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, -> = Descriptor< - NavigationOptions, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - NavigationProp, NavigationOptions, EventMap>, - RouteProp ->; -type PlatformStackNavigationDescriptors< - NavigationOptions extends PlatformSpecificNavigationOptions, - EventMap extends PlatformSpecificEventMap & EventMapBase, - ParamList extends ParamListBase = ParamListBase, -> = Record>; - -type PlatformStackNavigatorProps< - ParamList extends ParamListBase, - RouteName extends keyof ParamList = keyof ParamList, - RouterOptions extends PlatformStackRouterOptions = PlatformStackRouterOptions, -> = DefaultNavigatorOptions, PlatformStackNavigationOptions, PlatformStackNavigationEventMap, RouteName> & - RouterOptions & - StackNavigationConfig; - +// Represents the navigation prop for passed to screens and "screenOptions" factory functions using the types from PlatformStackNavigation type PlatformStackNavigationProp = NavigationProp< ParamList, RouteName, @@ -142,33 +110,21 @@ type PlatformStackNavigationProp; -type PlatformStackRouteProp = RouteProp; -type PlatformStackScreenOptionsProps = { - route: PlatformStackRouteProp; - navigation: PlatformStackNavigationProp; -}; +// Represents the route prop for passed to screens and "screenOptions" factory functions using the types from PlatformStackNavigation +type PlatformStackRouteProp = RouteProp; -type PlatformStackScreenOptionsPropsWithoutNavigation = { +type PlatformStackScreenProps< + ParamList extends ParamListBase, + RouteName extends keyof ParamList = keyof ParamList, + NavigatorID extends string | undefined = undefined, + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents + NavigationProp extends PlatformStackNavigationProp | any = PlatformStackNavigationProp, +> = { route: PlatformStackRouteProp; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - navigation: any; + navigation: NavigationProp; }; -type PlatformStackScreenOptions = PlatformStackNavigatorProps['screenOptions']; - -type PlatformStackScreenOptionsWithoutNavigation = - | PlatformStackNavigationOptions - | ((props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions) - | undefined; - -function isRouteBasedScreenOptions( - screenOptions: PlatformStackScreenOptions, -): screenOptions is (props: PlatformStackScreenOptionsPropsWithoutNavigation) => PlatformStackNavigationOptions { - return typeof screenOptions === 'function'; -} - -export {isRouteBasedScreenOptions}; export type { CommonStackNavigationOptions, CommonStackNavigationEventMap, @@ -179,14 +135,7 @@ export type { PlatformSpecificEventMap, PlatformStackRouterOptions, PlatformStackRouterFactory, - PlatformNavigationBuilderNavigation, - PlatformStackNavigationDescriptor, - PlatformStackNavigationDescriptors, PlatformStackNavigationProp, PlatformStackRouteProp, - PlatformStackScreenOptions, - PlatformStackScreenOptionsWithoutNavigation, - PlatformStackScreenOptionsProps, - PlatformStackScreenOptionsPropsWithoutNavigation, - PlatformStackNavigatorProps, + PlatformStackScreenProps, }; From 8875023c36aa9b526d8c6d0e4e6e01a009187f4c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 18:44:51 +0200 Subject: [PATCH 078/589] update screen props type usage --- .../AppNavigator/Navigators/LeftModalNavigator.tsx | 4 ++-- .../AppNavigator/Navigators/RightModalNavigator.tsx | 4 ++-- src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx | 4 ++-- .../index.native.tsx | 3 ++- .../createPlatformStackNavigatorComponent/index.tsx | 3 ++- src/pages/ChatFinderPage/index.tsx | 4 ++-- src/pages/ConciergePage.tsx | 4 ++-- src/pages/DetailsPage.tsx | 4 ++-- src/pages/EditSplitBillPage.tsx | 4 ++-- src/pages/FlagCommentPage.tsx | 4 ++-- src/pages/GetAssistancePage.tsx | 4 ++-- src/pages/GroupChatNameEditPage.tsx | 4 ++-- src/pages/LogInWithShortLivedAuthTokenPage.tsx | 4 ++-- src/pages/LogOutPreviousUserPage.tsx | 4 ++-- src/pages/PrivateNotes/PrivateNotesEditPage.tsx | 4 ++-- src/pages/ProfilePage.tsx | 4 ++-- src/pages/ReferralDetailsPage.tsx | 4 ++-- .../ReimbursementAccount/ReimbursementAccountPage.tsx | 4 ++-- src/pages/ReportAvatar.tsx | 4 ++-- src/pages/ReportDescriptionPage.tsx | 4 ++-- src/pages/ReportDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantDetailsPage.tsx | 4 ++-- src/pages/ReportParticipantRoleSelectionPage.tsx | 4 ++-- src/pages/RoomInvitePage.tsx | 4 ++-- src/pages/RoomMembersPage.tsx | 4 ++-- src/pages/Search/SearchPage.tsx | 4 ++-- src/pages/TransactionReceiptPage.tsx | 4 ++-- src/pages/UnlinkLoginPage.tsx | 4 ++-- src/pages/ValidateLoginPage/types.ts | 4 ++-- src/pages/home/ReportScreen.tsx | 4 ++-- src/pages/home/report/ReportAttachments.tsx | 4 ++-- .../home/report/withReportAndReportActionOrNotFound.tsx | 4 ++-- src/pages/iou/MoneyRequestWaypointPage.tsx | 4 ++-- src/pages/iou/SplitBillDetailsPage.tsx | 4 ++-- src/pages/settings/AboutPage/ShareLogPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx | 4 ++-- src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx | 4 ++-- .../Profile/Contacts/ContactMethodDetailsPage.tsx | 4 ++-- .../settings/Profile/Contacts/ContactMethodsPage.tsx | 4 ++-- .../settings/Profile/Contacts/NewContactMethodPage.tsx | 4 ++-- .../settings/Profile/PersonalDetails/AddressPage.tsx | 4 ++-- .../Profile/PersonalDetails/CountrySelectionPage.tsx | 4 ++-- src/pages/settings/Profile/ProfileAvatar.tsx | 4 ++-- src/pages/settings/Report/NotificationPreferencePage.tsx | 4 ++-- src/pages/settings/Report/ReportSettingsPage.tsx | 4 ++-- src/pages/settings/Report/RoomNamePage.tsx | 4 ++-- src/pages/settings/Report/VisibilityPage.tsx | 4 ++-- src/pages/settings/Report/WriteCapabilityPage.tsx | 4 ++-- src/pages/settings/Security/CloseAccountPage.tsx | 4 ++-- src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx | 4 ++-- .../settings/Wallet/Card/GetPhysicalCardAddress.tsx | 4 ++-- .../settings/Wallet/Card/GetPhysicalCardConfirm.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx | 4 ++-- src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx | 4 ++-- src/pages/settings/Wallet/ExpensifyCardPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportCardLostPage.tsx | 4 ++-- src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx | 4 ++-- src/pages/tasks/NewTaskDescriptionPage.tsx | 4 ++-- src/pages/tasks/NewTaskDetailsPage.tsx | 4 ++-- src/pages/tasks/NewTaskPage.tsx | 4 ++-- src/pages/tasks/NewTaskTitlePage.tsx | 4 ++-- src/pages/wallet/WalletStatementPage.tsx | 4 ++-- src/pages/workspace/WorkspaceAvatar.tsx | 4 ++-- src/pages/workspace/WorkspaceInitialPage.tsx | 4 ++-- src/pages/workspace/WorkspaceInviteMessagePage.tsx | 4 ++-- src/pages/workspace/WorkspaceInvitePage.tsx | 4 ++-- src/pages/workspace/WorkspaceJoinUserPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMembersPage.tsx | 4 ++-- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 4 ++-- src/pages/workspace/bills/WorkspaceBillsPage.tsx | 4 ++-- src/pages/workspace/card/WorkspaceCardPage.tsx | 4 ++-- src/pages/workspace/categories/CategorySettingsPage.tsx | 4 ++-- src/pages/workspace/categories/CreateCategoryPage.tsx | 4 ++-- src/pages/workspace/categories/EditCategoryPage.tsx | 4 ++-- .../categories/WorkspaceCategoriesSettingsPage.tsx | 4 ++-- .../workspace/distanceRates/CreateDistanceRatePage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRateDetailsPage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRateEditPage.tsx | 4 ++-- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 4 ++-- .../distanceRates/PolicyDistanceRatesSettingsPage.tsx | 5 ++--- src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx | 4 ++-- .../workspace/members/WorkspaceMemberDetailsPage.tsx | 4 ++-- .../workspace/members/WorkspaceOwnerChangeErrorPage.tsx | 4 ++-- .../members/WorkspaceOwnerChangeSuccessPage.tsx | 4 ++-- .../members/WorkspaceOwnerChangeWrapperPage.tsx | 4 ++-- .../workspace/reimburse/WorkspaceRateAndUnitPage.tsx | 4 ++-- src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx | 4 ++-- src/pages/workspace/tags/EditTagPage.tsx | 4 ++-- src/pages/workspace/tags/TagSettingsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceCreateTagPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceEditTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 4 ++-- src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx | 4 ++-- src/pages/workspace/taxes/NamePage.tsx | 4 ++-- src/pages/workspace/taxes/ValuePage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsCustomTaxName.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsForeignCurrency.tsx | 4 ++-- src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx | 4 ++-- .../taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx | 4 ++-- src/pages/workspace/travel/WorkspaceTravelPage.tsx | 4 ++-- .../workflows/WorkspaceAutoReportingFrequencyPage.tsx | 4 ++-- .../WorkspaceAutoReportingMonthlyOffsetPage.tsx | 4 ++-- .../workflows/WorkspaceWorkflowsApproverPage.tsx | 4 ++-- src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 6 ++---- .../workspace/workflows/WorkspaceWorkflowsPayerPage.tsx | 4 ++-- src/types/utils/CommonProperties.ts | 9 +++++++++ tests/perf-test/ChatFinderPage.perf-test.tsx | 4 ++-- tests/perf-test/ReportScreen.perf-test.tsx | 4 ++-- 111 files changed, 229 insertions(+), 221 deletions(-) create mode 100644 src/types/utils/CommonProperties.ts diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index c42b67f75c08..5cf8754d0961 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -6,13 +6,13 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, LeftModalNavigatorParamList} from '@libs/Navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type LeftModalNavigatorProps = PlatformStackScreenOptionsProps; +type LeftModalNavigatorProps = PlatformStackScreenProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 6b147b25f10b..ad68936b080f 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -7,13 +7,13 @@ import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwi import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions'; import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; -type RightModalNavigatorProps = PlatformStackScreenOptionsProps; +type RightModalNavigatorProps = PlatformStackScreenProps; const Stack = createPlatformStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx index f265a5566e2b..9854ea136e8b 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx +++ b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@navigation/types'; import ReportScreen from '@pages/home/ReportScreen'; import type SCREENS from '@src/SCREENS'; import ReportScreenIDSetter from './ReportScreenIDSetter'; -type ReportScreenWrapperProps = PlatformStackScreenOptionsProps; +type ReportScreenWrapperProps = PlatformStackScreenProps; function ReportScreenWrapper({route, navigation}: ReportScreenWrapperProps) { // The ReportScreen without the reportID set will display a skeleton diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index ccc94b537261..14b4aa83e83c 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -6,10 +6,11 @@ import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; -import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; +import {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; function createPlatformStackNavigatorComponent( displayName: string, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index 9dc3fcac4196..bfb0811fbda8 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -6,10 +6,11 @@ import {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; -import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackNavigationOptions, PlatformStackNavigationState, PlatformStackRouterOptions} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; +import {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; function createPlatformStackNavigatorComponent( displayName: string, diff --git a/src/pages/ChatFinderPage/index.tsx b/src/pages/ChatFinderPage/index.tsx index 55f2a2bf282d..0c364f4538c2 100644 --- a/src/pages/ChatFinderPage/index.tsx +++ b/src/pages/ChatFinderPage/index.tsx @@ -14,7 +14,7 @@ import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import type {MaybePhraseKey} from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import Performance from '@libs/Performance'; @@ -35,7 +35,7 @@ type ChatFinderPageOnyxProps = { isSearchingForReports: OnyxEntry; }; -type ChatFinderPageProps = ChatFinderPageOnyxProps & PlatformStackScreenOptionsProps; +type ChatFinderPageProps = ChatFinderPageOnyxProps & PlatformStackScreenProps; type ChatFinderPageSectionItem = { data: OptionData[]; diff --git a/src/pages/ConciergePage.tsx b/src/pages/ConciergePage.tsx index cc3b2334e9e4..c22aa867f3da 100644 --- a/src/pages/ConciergePage.tsx +++ b/src/pages/ConciergePage.tsx @@ -8,7 +8,7 @@ import ReportHeaderSkeletonView from '@components/ReportHeaderSkeletonView'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as App from '@userActions/App'; import * as Report from '@userActions/Report'; @@ -21,7 +21,7 @@ type ConciergePageOnyxProps = { session: OnyxEntry; }; -type ConciergePageProps = ConciergePageOnyxProps & PlatformStackScreenOptionsProps; +type ConciergePageProps = ConciergePageOnyxProps & PlatformStackScreenProps; /* * This is a "utility page", that does this: diff --git a/src/pages/DetailsPage.tsx b/src/pages/DetailsPage.tsx index dceb5785ba12..56cc29d5bc4a 100755 --- a/src/pages/DetailsPage.tsx +++ b/src/pages/DetailsPage.tsx @@ -19,7 +19,7 @@ import Text from '@components/Text'; import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -40,7 +40,7 @@ type DetailsPageOnyxProps = { session: OnyxEntry; }; -type DetailsPageProps = DetailsPageOnyxProps & PlatformStackScreenOptionsProps; +type DetailsPageProps = DetailsPageOnyxProps & PlatformStackScreenProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/EditSplitBillPage.tsx b/src/pages/EditSplitBillPage.tsx index d9969ecf9d8c..7474ff672c34 100644 --- a/src/pages/EditSplitBillPage.tsx +++ b/src/pages/EditSplitBillPage.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {TransactionChanges} from '@libs/TransactionUtils'; @@ -32,7 +32,7 @@ type EditSplitBillOnyxProps = { draftTransaction: OnyxEntry; }; -type EditSplitBillProps = EditSplitBillOnyxProps & PlatformStackScreenOptionsProps; +type EditSplitBillProps = EditSplitBillOnyxProps & PlatformStackScreenProps; function EditSplitBillPage({route, transaction, draftTransaction, report}: EditSplitBillProps) { const {field: fieldToEdit, reportID, reportActionID, tagIndex} = route.params; diff --git a/src/pages/FlagCommentPage.tsx b/src/pages/FlagCommentPage.tsx index d499ac534bc5..93c2da15d8db 100644 --- a/src/pages/FlagCommentPage.tsx +++ b/src/pages/FlagCommentPage.tsx @@ -13,7 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as Report from '@userActions/Report'; @@ -30,7 +30,7 @@ type FlagCommentPageWithOnyxProps = { parentReportAction: OnyxEntry; }; -type FlagCommentPageNavigationProps = PlatformStackScreenOptionsProps; +type FlagCommentPageNavigationProps = PlatformStackScreenProps; type FlagCommentPageProps = FlagCommentPageNavigationProps & WithReportAndReportActionOrNotFoundProps & FlagCommentPageWithOnyxProps; diff --git a/src/pages/GetAssistancePage.tsx b/src/pages/GetAssistancePage.tsx index 5b2047b2580b..381a1716f59b 100644 --- a/src/pages/GetAssistancePage.tsx +++ b/src/pages/GetAssistancePage.tsx @@ -13,7 +13,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import * as Report from '@userActions/Report'; @@ -28,7 +28,7 @@ type GetAssistanceOnyxProps = { account: OnyxEntry; }; -type GetAssistancePageProps = GetAssistanceOnyxProps & PlatformStackScreenOptionsProps; +type GetAssistancePageProps = GetAssistanceOnyxProps & PlatformStackScreenProps; function GetAssistancePage({route, account}: GetAssistancePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/GroupChatNameEditPage.tsx b/src/pages/GroupChatNameEditPage.tsx index 8fdc945c9a8f..85a99b50b2ac 100644 --- a/src/pages/GroupChatNameEditPage.tsx +++ b/src/pages/GroupChatNameEditPage.tsx @@ -10,7 +10,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {NewChatNavigatorParamList} from '@navigation/types'; @@ -27,7 +27,7 @@ type GroupChatNameEditPageOnyxProps = { groupChatDraft: NewGroupChatDraft | null; }; -type GroupChatNameEditPageProps = PlatformStackScreenOptionsProps & GroupChatNameEditPageOnyxProps; +type GroupChatNameEditPageProps = PlatformStackScreenProps & GroupChatNameEditPageOnyxProps; function GroupChatNameEditPage({groupChatDraft, route}: GroupChatNameEditPageProps) { // If we have a reportID this means we are using this page to update an existing Group Chat name diff --git a/src/pages/LogInWithShortLivedAuthTokenPage.tsx b/src/pages/LogInWithShortLivedAuthTokenPage.tsx index b52e45e50bea..265f7666decc 100644 --- a/src/pages/LogInWithShortLivedAuthTokenPage.tsx +++ b/src/pages/LogInWithShortLivedAuthTokenPage.tsx @@ -13,7 +13,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; @@ -28,7 +28,7 @@ type LogInWithShortLivedAuthTokenPageOnyxProps = { account: OnyxEntry; }; -type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & PlatformStackScreenOptionsProps; +type LogInWithShortLivedAuthTokenPageProps = LogInWithShortLivedAuthTokenPageOnyxProps & PlatformStackScreenProps; function LogInWithShortLivedAuthTokenPage({route, account}: LogInWithShortLivedAuthTokenPageProps) { const theme = useTheme(); diff --git a/src/pages/LogOutPreviousUserPage.tsx b/src/pages/LogOutPreviousUserPage.tsx index f2204c691bd2..435efa8be6ce 100644 --- a/src/pages/LogOutPreviousUserPage.tsx +++ b/src/pages/LogOutPreviousUserPage.tsx @@ -4,7 +4,7 @@ import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import {InitialURLContext} from '@components/InitialURLContextProvider'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as SessionUtils from '@libs/SessionUtils'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; @@ -24,7 +24,7 @@ type LogOutPreviousUserPageOnyxProps = { isAccountLoading: boolean; }; -type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & PlatformStackScreenOptionsProps; +type LogOutPreviousUserPageProps = LogOutPreviousUserPageOnyxProps & PlatformStackScreenProps; // This page is responsible for handling transitions from OldDot. Specifically, it logs the current user // out if the transition is for another user. diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx index 0f3f235b2ff8..ccc4ecc0af3e 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx @@ -18,7 +18,7 @@ import useHtmlPaste from '@hooks/useHtmlPaste'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PrivateNotesNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -40,7 +40,7 @@ type PrivateNotesEditPageOnyxProps = { type PrivateNotesEditPageProps = WithReportAndPrivateNotesOrNotFoundProps & PrivateNotesEditPageOnyxProps & - PlatformStackScreenOptionsProps & { + PlatformStackScreenProps & { /** The report currently being looked at */ report: Report; }; diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index 8ba8e3f9c6b6..80a49305c05b 100755 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -21,7 +21,7 @@ import UserDetailsTooltip from '@components/UserDetailsTooltip'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import {parsePhoneNumber} from '@libs/PhoneNumber'; import * as ReportUtils from '@libs/ReportUtils'; @@ -39,7 +39,7 @@ import type {PersonalDetails, Report} from '@src/types/onyx'; import type {EmptyObject} from '@src/types/utils/EmptyObject'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ProfilePageProps = PlatformStackScreenOptionsProps; +type ProfilePageProps = PlatformStackScreenProps; /** * Gets the phone number to display for SMS logins diff --git a/src/pages/ReferralDetailsPage.tsx b/src/pages/ReferralDetailsPage.tsx index b903caa3a7a4..76dac1aca1a8 100644 --- a/src/pages/ReferralDetailsPage.tsx +++ b/src/pages/ReferralDetailsPage.tsx @@ -14,7 +14,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import Clipboard from '@libs/Clipboard'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReferralDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; @@ -29,7 +29,7 @@ type ReferralDetailsPageOnyxProps = { account: OnyxEntry; }; -type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & PlatformStackScreenOptionsProps; +type ReferralDetailsPageProps = ReferralDetailsPageOnyxProps & PlatformStackScreenProps; function ReferralDetailsPage({route, account}: ReferralDetailsPageProps) { const theme = useTheme(); diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx index 72f0c91cec60..745a4ac2e29b 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx @@ -17,7 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import getPlaidOAuthReceivedRedirectURI from '@libs/getPlaidOAuthReceivedRedirectURI'; import BankAccount from '@libs/models/BankAccount'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackRouteProp, PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackRouteProp, PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReimbursementAccountNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import shouldReopenOnfido from '@libs/shouldReopenOnfido'; @@ -67,7 +67,7 @@ type ReimbursementAccountOnyxProps = { type ReimbursementAccountPageProps = WithPolicyOnyxProps & ReimbursementAccountOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; const ROUTE_NAMES = { COMPANY: 'company', diff --git a/src/pages/ReportAvatar.tsx b/src/pages/ReportAvatar.tsx index c8171639980f..63c3d154e74c 100644 --- a/src/pages/ReportAvatar.tsx +++ b/src/pages/ReportAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -18,7 +18,7 @@ type ReportAvatarOnyxProps = { policies: OnyxCollection; }; -type ReportAvatarProps = ReportAvatarOnyxProps & PlatformStackScreenOptionsProps; +type ReportAvatarProps = ReportAvatarOnyxProps & PlatformStackScreenProps; function ReportAvatar({report = {} as Report, policies, isLoadingApp = true}: ReportAvatarProps) { const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID ?? '0'}`]; diff --git a/src/pages/ReportDescriptionPage.tsx b/src/pages/ReportDescriptionPage.tsx index 4fda961662a7..0aabe5ad5d58 100644 --- a/src/pages/ReportDescriptionPage.tsx +++ b/src/pages/ReportDescriptionPage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportDescriptionNavigatorParamList} from '@navigation/types'; import type SCREENS from '@src/SCREENS'; @@ -8,7 +8,7 @@ import withReportOrNotFound from './home/report/withReportOrNotFound'; import RoomDescriptionPage from './RoomDescriptionPage'; import TaskDescriptionPage from './tasks/TaskDescriptionPage'; -type ReportDescriptionPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type ReportDescriptionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportDescriptionPage(props: ReportDescriptionPageProps) { const isTask = ReportUtils.isTaskReport(props.report); diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 3dbcf49b1db9..90909d7e4a72 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -23,7 +23,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -58,7 +58,7 @@ type ReportDetailsPageOnyxProps = { /** Session info for the currently logged in user. */ session: OnyxEntry; }; -type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type ReportDetailsPageProps = ReportDetailsPageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportDetailsPage({policies, report, session, personalDetails}: ReportDetailsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/ReportParticipantDetailsPage.tsx b/src/pages/ReportParticipantDetailsPage.tsx index c0cf678441d2..8aea77410d2f 100644 --- a/src/pages/ReportParticipantDetailsPage.tsx +++ b/src/pages/ReportParticipantDetailsPage.tsx @@ -16,7 +16,7 @@ import useLocalize from '@hooks/useLocalize'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; @@ -34,7 +34,7 @@ type ReportParticipantDetailsOnyxProps = { }; type ReportParticipantDetailsPageProps = WithReportOrNotFoundProps & - PlatformStackScreenOptionsProps & + PlatformStackScreenProps & ReportParticipantDetailsOnyxProps; function ReportParticipantDetails({personalDetails, report, route}: ReportParticipantDetailsPageProps) { diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 5c62d130cc0c..1db4e878bcb7 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -9,7 +9,7 @@ import type {ListItem} from '@components/SelectionList/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -19,7 +19,7 @@ import NotFoundPage from './ErrorPage/NotFoundPage'; import withReportOrNotFound from './home/report/withReportOrNotFound'; import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound'; -type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type ReportParticipantRoleSelectionPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; type ListItemType = ListItem & { value: ValueOf; diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index 3ec88780970e..15681ce8816a 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -17,7 +17,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -34,7 +34,7 @@ import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound import withReportOrNotFound from './home/report/withReportOrNotFound'; import SearchInputManager from './workspace/SearchInputManager'; -type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & PlatformStackScreenOptionsProps; +type RoomInvitePageProps = WithReportOrNotFoundProps & WithNavigationTransitionEndProps & PlatformStackScreenProps; type Sections = Array>>; diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index 75e6e80e2fae..9551e5b0f10f 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -21,7 +21,7 @@ import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RoomMembersNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -45,7 +45,7 @@ type RoomMembersPageOnyxProps = { type RoomMembersPageProps = WithReportOrNotFoundProps & WithCurrentUserPersonalDetailsProps & RoomMembersPageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function RoomMembersPage({report, session, policies}: RoomMembersPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index ddb5c2638536..cf7f68a56abe 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -1,13 +1,13 @@ import React from 'react'; import ScreenWrapper from '@components/ScreenWrapper'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; // import EmptySearchView from './EmptySearchView'; import SearchResults from './SearchResults'; import useCustomBackHandler from './useCustomBackHandler'; -type SearchPageProps = PlatformStackScreenOptionsProps; +type SearchPageProps = PlatformStackScreenProps; function SearchPage({route}: SearchPageProps) { useCustomBackHandler(); diff --git a/src/pages/TransactionReceiptPage.tsx b/src/pages/TransactionReceiptPage.tsx index 03a358d71b3d..037153ff6478 100644 --- a/src/pages/TransactionReceiptPage.tsx +++ b/src/pages/TransactionReceiptPage.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReceiptUtils from '@libs/ReceiptUtils'; import * as ReportActionUtils from '@libs/ReportActionsUtils'; @@ -23,7 +23,7 @@ type TransactionReceiptOnyxProps = { reportMetadata: OnyxEntry; }; -type TransactionReceiptProps = TransactionReceiptOnyxProps & PlatformStackScreenOptionsProps; +type TransactionReceiptProps = TransactionReceiptOnyxProps & PlatformStackScreenProps; function TransactionReceipt({transaction, report, reportMetadata = {isLoadingInitialReportActions: true}, route}: TransactionReceiptProps) { const receiptURIs = ReceiptUtils.getThumbnailAndImageURIs(transaction); diff --git a/src/pages/UnlinkLoginPage.tsx b/src/pages/UnlinkLoginPage.tsx index aa9b0b387225..eaa60824ab6a 100644 --- a/src/pages/UnlinkLoginPage.tsx +++ b/src/pages/UnlinkLoginPage.tsx @@ -4,7 +4,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import usePrevious from '@hooks/usePrevious'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@navigation/types'; import * as Session from '@userActions/Session'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -16,7 +16,7 @@ type UnlinkLoginPageOnyxProps = { account: OnyxEntry; }; -type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & PlatformStackScreenOptionsProps; +type UnlinkLoginPageProps = UnlinkLoginPageOnyxProps & PlatformStackScreenProps; function UnlinkLoginPage({route, account}: UnlinkLoginPageProps) { const accountID = route.params.accountID ?? -1; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index 044de8146a46..47208eee2ebb 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -1,5 +1,5 @@ import type {OnyxEntry} from 'react-native-onyx'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import type {Account, Credentials, Session} from '@src/types/onyx'; @@ -17,6 +17,6 @@ type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { credentials: OnyxEntry; }; -type ValidateLoginPageProps = OnyxProps & PlatformStackScreenOptionsProps; +type ValidateLoginPageProps = OnyxProps & PlatformStackScreenProps; export type {ValidateLoginPageOnyxNativeProps, ValidateLoginPageOnyxProps, ValidateLoginPageProps}; diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index eabc2888a6e9..361810ed1ff7 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -29,7 +29,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import Timing from '@libs/actions/Timing'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import clearReportNotifications from '@libs/Notification/clearReportNotifications'; import Performance from '@libs/Performance'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -89,7 +89,7 @@ type OnyxHOCProps = { markReadyForHydration?: () => void; }; -type ReportScreenNavigationProps = PlatformStackScreenOptionsProps; +type ReportScreenNavigationProps = PlatformStackScreenProps; type ReportScreenPropsWithoutParentReportAction = OnyxHOCProps & CurrentReportIDContextValue & ReportScreenOnyxPropsWithoutParentReportAction & ReportScreenNavigationProps; diff --git a/src/pages/home/report/ReportAttachments.tsx b/src/pages/home/report/ReportAttachments.tsx index 23f1eff87926..7e33b7047cc5 100644 --- a/src/pages/home/report/ReportAttachments.tsx +++ b/src/pages/home/report/ReportAttachments.tsx @@ -3,13 +3,13 @@ import AttachmentModal from '@components/AttachmentModal'; import type {Attachment} from '@components/Attachments/types'; import ComposerFocusManager from '@libs/ComposerFocusManager'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type ReportAttachmentsProps = PlatformStackScreenOptionsProps; +type ReportAttachmentsProps = PlatformStackScreenProps; function ReportAttachments({route}: ReportAttachmentsProps) { const reportID = route.params.reportID; diff --git a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx index 7a845ecddcce..59e8a30dbd77 100644 --- a/src/pages/home/report/withReportAndReportActionOrNotFound.tsx +++ b/src/pages/home/report/withReportAndReportActionOrNotFound.tsx @@ -8,7 +8,7 @@ import withWindowDimensions from '@components/withWindowDimensions'; import type {WindowDimensionsProps} from '@components/withWindowDimensions/types'; import compose from '@libs/compose'; import getComponentDisplayName from '@libs/getComponentDisplayName'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {FlagCommentNavigatorParamList, SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -46,7 +46,7 @@ type OnyxProps = { type WithReportAndReportActionOrNotFoundProps = OnyxProps & WindowDimensionsProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; export default function ( WrappedComponent: ComponentType>, diff --git a/src/pages/iou/MoneyRequestWaypointPage.tsx b/src/pages/iou/MoneyRequestWaypointPage.tsx index e742a9c5d4c1..f9b78d77b81e 100644 --- a/src/pages/iou/MoneyRequestWaypointPage.tsx +++ b/src/pages/iou/MoneyRequestWaypointPage.tsx @@ -1,6 +1,6 @@ import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {MoneyRequestNavigatorParamList} from '@libs/Navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -9,7 +9,7 @@ import IOURequestStepWaypoint from './request/step/IOURequestStepWaypoint'; type MoneyRequestWaypointPageOnyxProps = { transactionID: string | undefined; }; -type MoneyRequestWaypointPageProps = PlatformStackScreenOptionsProps & MoneyRequestWaypointPageOnyxProps; +type MoneyRequestWaypointPageProps = PlatformStackScreenProps & MoneyRequestWaypointPageOnyxProps; // This component is responsible for grabbing the transactionID from the IOU key // You can't use Onyx props in the withOnyx mapping, so we need to set up and access the transactionID here, and then pass it down so that WaypointEditor can subscribe to the transaction. diff --git a/src/pages/iou/SplitBillDetailsPage.tsx b/src/pages/iou/SplitBillDetailsPage.tsx index 9946068e11bc..1275452ebd05 100644 --- a/src/pages/iou/SplitBillDetailsPage.tsx +++ b/src/pages/iou/SplitBillDetailsPage.tsx @@ -9,7 +9,7 @@ import MoneyRequestHeaderStatusBar from '@components/MoneyRequestHeaderStatusBar import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SplitDetailsNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -51,7 +51,7 @@ type SplitBillDetailsPageOnyxProps = SplitBillDetailsPageTransactionOnyxProps & type SplitBillDetailsPageProps = WithReportAndReportActionOrNotFoundProps & SplitBillDetailsPageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function SplitBillDetailsPage({personalDetails, report, route, reportActions, transaction, draftTransaction, session}: SplitBillDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/AboutPage/ShareLogPage.tsx b/src/pages/settings/AboutPage/ShareLogPage.tsx index 64fca1496422..ad4006b06e03 100644 --- a/src/pages/settings/AboutPage/ShareLogPage.tsx +++ b/src/pages/settings/AboutPage/ShareLogPage.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import ShareLogList from './ShareLogList'; -type ShareLogPageProps = PlatformStackScreenOptionsProps; +type ShareLogPageProps = PlatformStackScreenProps; function ShareLogPage({route}: ShareLogPageProps) { return ; diff --git a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx index 7172f6064950..81c95b243157 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx @@ -12,7 +12,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import variables from '@styles/variables'; @@ -31,7 +31,7 @@ type ExitSurveyConfirmPageOnyxProps = { isLoading: OnyxEntry; }; -type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & PlatformStackScreenOptionsProps; +type ExitSurveyConfirmPageProps = ExitSurveyConfirmPageOnyxProps & PlatformStackScreenProps; function ExitSurveyConfirmPage({exitReason, isLoading, route, navigation}: ExitSurveyConfirmPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx index 9f28445e89c0..8ade6b170395 100644 --- a/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx +++ b/src/pages/settings/ExitSurvey/ExitSurveyResponsePage.tsx @@ -16,7 +16,7 @@ import useSafeAreaInsets from '@hooks/useSafeAreaInsets'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import Navigation from '@navigation/Navigation'; @@ -35,7 +35,7 @@ type ExitSurveyResponsePageOnyxProps = { draftResponse: string; }; -type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & PlatformStackScreenOptionsProps; +type ExitSurveyResponsePageProps = ExitSurveyResponsePageOnyxProps & PlatformStackScreenProps; function ExitSurveyResponsePage({draftResponse, route, navigation}: ExitSurveyResponsePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index 4ce9f8b58351..58780d63f5d4 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -21,7 +21,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Session from '@userActions/Session'; import * as User from '@userActions/User'; @@ -41,7 +41,7 @@ const policiesSelector = (policy: OnyxEntry): Pick; +type ContactMethodDetailsPageProps = PlatformStackScreenProps; function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) { const [loginList, loginListResult] = useOnyx(ONYXKEYS.LOGIN_LIST); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx index 79aee2186fd0..5fec33ce4a15 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx @@ -15,7 +15,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -32,7 +32,7 @@ type ContactMethodsPageOnyxProps = { session: OnyxEntry; }; -type ContactMethodsPageProps = ContactMethodsPageOnyxProps & PlatformStackScreenOptionsProps; +type ContactMethodsPageProps = ContactMethodsPageOnyxProps & PlatformStackScreenProps; function ContactMethodsPage({loginList, session, route}: ContactMethodsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index a57e42fb37ce..8edcc669be86 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -16,7 +16,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as User from '@userActions/User'; import CONST from '@src/CONST'; @@ -32,7 +32,7 @@ type NewContactMethodPageOnyxProps = { loginList: OnyxEntry; }; -type NewContactMethodPageProps = NewContactMethodPageOnyxProps & PlatformStackScreenOptionsProps; +type NewContactMethodPageProps = NewContactMethodPageOnyxProps & PlatformStackScreenProps; const addNewContactMethod = (values: FormOnyxValues) => { const phoneLogin = LoginUtils.getPhoneLogin(values.phoneOrEmail); diff --git a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx index a48b13e6fc46..f40405d2e1a6 100644 --- a/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/AddressPage.tsx @@ -9,7 +9,7 @@ import useGeographicalStateFromRoute from '@hooks/useGeographicalStateFromRoute' import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PersonalDetails from '@userActions/PersonalDetails'; import type {FormOnyxValues} from '@src/components/Form/types'; @@ -27,7 +27,7 @@ type AddressPageOnyxProps = { isLoadingApp: OnyxEntry; }; -type AddressPageProps = PlatformStackScreenOptionsProps & AddressPageOnyxProps; +type AddressPageProps = PlatformStackScreenProps & AddressPageOnyxProps; /** * Submit form to update user's first and last legal name diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index fc8a250ca144..44e61bc7b318 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -5,7 +5,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type {CountryData} from '@libs/searchCountryOptions'; import searchCountryOptions from '@libs/searchCountryOptions'; @@ -15,7 +15,7 @@ import type {TranslationPaths} from '@src/languages/types'; import type {Route} from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type CountrySelectionPageProps = PlatformStackScreenOptionsProps; +type CountrySelectionPageProps = PlatformStackScreenProps; function CountrySelectionPage({route, navigation}: CountrySelectionPageProps) { const [searchValue, setSearchValue] = useState(''); diff --git a/src/pages/settings/Profile/ProfileAvatar.tsx b/src/pages/settings/Profile/ProfileAvatar.tsx index 0601c427a30e..ebec25da7a63 100644 --- a/src/pages/settings/Profile/ProfileAvatar.tsx +++ b/src/pages/settings/Profile/ProfileAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -19,7 +19,7 @@ type ProfileAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type ProfileAvatarProps = ProfileAvatarOnyxProps & PlatformStackScreenOptionsProps; +type ProfileAvatarProps = ProfileAvatarOnyxProps & PlatformStackScreenProps; function ProfileAvatar({route, personalDetails, personalDetailsMetadata, isLoadingApp = true}: ProfileAvatarProps) { const personalDetail = personalDetails?.[route.params.accountID]; diff --git a/src/pages/settings/Report/NotificationPreferencePage.tsx b/src/pages/settings/Report/NotificationPreferencePage.tsx index 2200c616dafb..108b6576ad96 100644 --- a/src/pages/settings/Report/NotificationPreferencePage.tsx +++ b/src/pages/settings/Report/NotificationPreferencePage.tsx @@ -5,7 +5,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -14,7 +14,7 @@ import * as ReportActions from '@userActions/Report'; import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; -type NotificationPreferencePageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type NotificationPreferencePageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function NotificationPreferencePage({report}: NotificationPreferencePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Report/ReportSettingsPage.tsx b/src/pages/settings/Report/ReportSettingsPage.tsx index 2b1c99200443..824868792124 100644 --- a/src/pages/settings/Report/ReportSettingsPage.tsx +++ b/src/pages/settings/Report/ReportSettingsPage.tsx @@ -11,7 +11,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -22,7 +22,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; -type ReportSettingsPageProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type ReportSettingsPageProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function ReportSettingsPage({report, policies}: ReportSettingsPageProps) { const reportID = report?.reportID ?? ''; diff --git a/src/pages/settings/Report/RoomNamePage.tsx b/src/pages/settings/Report/RoomNamePage.tsx index 922432e7366d..f3ae524cc154 100644 --- a/src/pages/settings/Report/RoomNamePage.tsx +++ b/src/pages/settings/Report/RoomNamePage.tsx @@ -15,7 +15,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; @@ -37,7 +37,7 @@ type RoomNamePageOnyxProps = { policy: OnyxEntry; }; -type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type RoomNamePageProps = RoomNamePageOnyxProps & WithReportOrNotFoundProps & PlatformStackScreenProps; function RoomNamePage({report, policy, reports}: RoomNamePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Report/VisibilityPage.tsx b/src/pages/settings/Report/VisibilityPage.tsx index c05d82398fe1..b53d10b5a5e1 100644 --- a/src/pages/settings/Report/VisibilityPage.tsx +++ b/src/pages/settings/Report/VisibilityPage.tsx @@ -6,7 +6,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {ReportSettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {WithReportOrNotFoundProps} from '@pages/home/report/withReportOrNotFound'; @@ -16,7 +16,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import type {RoomVisibility} from '@src/types/onyx/Report'; -type VisibilityProps = WithReportOrNotFoundProps & PlatformStackScreenOptionsProps; +type VisibilityProps = WithReportOrNotFoundProps & PlatformStackScreenProps; function VisibilityPage({report}: VisibilityProps) { const [showConfirmModal, setShowConfirmModal] = useState(false); diff --git a/src/pages/settings/Report/WriteCapabilityPage.tsx b/src/pages/settings/Report/WriteCapabilityPage.tsx index 38a2f0ab48f4..6b3dd77a94e8 100644 --- a/src/pages/settings/Report/WriteCapabilityPage.tsx +++ b/src/pages/settings/Report/WriteCapabilityPage.tsx @@ -8,7 +8,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import type {ReportSettingsNavigatorParamList} from '@navigation/types'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; @@ -27,7 +27,7 @@ type WriteCapabilityPageOnyxProps = { type WriteCapabilityPageProps = WriteCapabilityPageOnyxProps & WithReportOrNotFoundProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WriteCapabilityPage({report, policy}: WriteCapabilityPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Security/CloseAccountPage.tsx b/src/pages/settings/Security/CloseAccountPage.tsx index 4516f53cfee6..dc67f04303d5 100644 --- a/src/pages/settings/Security/CloseAccountPage.tsx +++ b/src/pages/settings/Security/CloseAccountPage.tsx @@ -14,7 +14,7 @@ import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import * as CloseAccount from '@userActions/CloseAccount'; @@ -30,7 +30,7 @@ type CloseAccountPageOnyxProps = { session: OnyxEntry; }; -type CloseAccountPageProps = CloseAccountPageOnyxProps & PlatformStackScreenOptionsProps; +type CloseAccountPageProps = CloseAccountPageOnyxProps & PlatformStackScreenProps; function CloseAccountPage({session}: CloseAccountPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx index 4638add5c6b9..791a3054f3d8 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.tsx @@ -18,7 +18,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as CardSettings from '@userActions/Card'; @@ -34,7 +34,7 @@ type ActivatePhysicalCardPageOnyxProps = { cardList: OnyxEntry>; }; -type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & PlatformStackScreenOptionsProps; +type ActivatePhysicalCardPageProps = ActivatePhysicalCardPageOnyxProps & PlatformStackScreenProps; const LAST_FOUR_DIGITS_LENGTH = 4; const MAGIC_INPUT_MIN_HEIGHT = 86; diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx index 102ad35f2474..5636358dfe6f 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardAddress.tsx @@ -4,7 +4,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import AddressForm from '@components/AddressForm'; import useLocalize from '@hooks/useLocalize'; import * as FormActions from '@libs/actions/FormActions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -18,7 +18,7 @@ type GetPhysicalCardAddressOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & PlatformStackScreenOptionsProps; +type GetPhysicalCardAddressProps = GetPhysicalCardAddressOnyxProps & PlatformStackScreenProps; function GetPhysicalCardAddress({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx index ed8801628fd3..9fcca69a611d 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardConfirm.tsx @@ -7,7 +7,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -34,7 +34,7 @@ type GetPhysicalCardConfirmOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & PlatformStackScreenOptionsProps; +type GetPhysicalCardConfirmProps = GetPhysicalCardConfirmOnyxProps & PlatformStackScreenProps; function GetPhysicalCardConfirm({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx index 780709c578df..f9a62195f81f 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardName.tsx @@ -5,7 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; @@ -26,7 +26,7 @@ type GetPhysicalCardNameOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & PlatformStackScreenOptionsProps; +type GetPhysicalCardNameProps = GetPhysicalCardNameOnyxProps & PlatformStackScreenProps; function GetPhysicalCardName({ draftValues, diff --git a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx index e2b6e7b4b726..d2eeb0d59c61 100644 --- a/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx +++ b/src/pages/settings/Wallet/Card/GetPhysicalCardPhone.tsx @@ -5,7 +5,7 @@ import InputWrapper from '@components/Form/InputWrapper'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import * as LoginUtils from '@libs/LoginUtils'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -24,7 +24,7 @@ type GetPhysicalCardPhoneOnyxProps = { draftValues: OnyxEntry; }; -type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & PlatformStackScreenOptionsProps; +type GetPhysicalCardPhoneProps = GetPhysicalCardPhoneOnyxProps & PlatformStackScreenProps; function GetPhysicalCardPhone({ route: { diff --git a/src/pages/settings/Wallet/ExpensifyCardPage.tsx b/src/pages/settings/Wallet/ExpensifyCardPage.tsx index 63d7cf6cbddc..4dac01544b23 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage.tsx +++ b/src/pages/settings/Wallet/ExpensifyCardPage.tsx @@ -19,7 +19,7 @@ import * as CardUtils from '@libs/CardUtils'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as GetPhysicalCardUtils from '@libs/GetPhysicalCardUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -49,7 +49,7 @@ type ExpensifyCardPageOnyxProps = { loginList: OnyxEntry; }; -type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & PlatformStackScreenOptionsProps; +type ExpensifyCardPageProps = ExpensifyCardPageOnyxProps & PlatformStackScreenProps; function ExpensifyCardPage({ cardList, diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 9258506a1223..585518fd59f2 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -13,7 +13,7 @@ import usePrevious from '@hooks/usePrevious'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -61,7 +61,7 @@ type ReportCardLostPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportCardLostPageProps = ReportCardLostPageOnyxProps & PlatformStackScreenOptionsProps; +type ReportCardLostPageProps = ReportCardLostPageOnyxProps & PlatformStackScreenProps; function ReportCardLostPage({ privatePersonalDetails = { diff --git a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx index 3170a20085da..1b8eb22ac649 100644 --- a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx +++ b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx @@ -12,7 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import * as Card from '@userActions/Card'; @@ -31,7 +31,7 @@ type ReportVirtualCardFraudPageOnyxProps = { cardList: OnyxEntry>; }; -type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & PlatformStackScreenOptionsProps; +type ReportVirtualCardFraudPageProps = ReportVirtualCardFraudPageOnyxProps & PlatformStackScreenProps; function ReportVirtualCardFraudPage({ route: { diff --git a/src/pages/tasks/NewTaskDescriptionPage.tsx b/src/pages/tasks/NewTaskDescriptionPage.tsx index c901021acd9e..8bef635dec64 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.tsx +++ b/src/pages/tasks/NewTaskDescriptionPage.tsx @@ -14,7 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; import * as TaskActions from '@userActions/Task'; @@ -30,7 +30,7 @@ type NewTaskDescriptionPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & PlatformStackScreenOptionsProps; +type NewTaskDescriptionPageProps = NewTaskDescriptionPageOnyxProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskDetailsPage.tsx b/src/pages/tasks/NewTaskDetailsPage.tsx index f15b566642e7..50fb856103bc 100644 --- a/src/pages/tasks/NewTaskDetailsPage.tsx +++ b/src/pages/tasks/NewTaskDetailsPage.tsx @@ -14,7 +14,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import playSound, {SOUNDS} from '@libs/Sound'; import * as TaskActions from '@userActions/Task'; @@ -30,7 +30,7 @@ type NewTaskDetailsPageOnyxProps = { task: OnyxEntry; }; -type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & PlatformStackScreenOptionsProps; +type NewTaskDetailsPageProps = NewTaskDetailsPageOnyxProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index 5498efb5a77e..f0f12d4776c8 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as ReportUtils from '@libs/ReportUtils'; @@ -36,7 +36,7 @@ type NewTaskPageOnyxProps = { reports: OnyxCollection; }; -type NewTaskPageProps = NewTaskPageOnyxProps & PlatformStackScreenOptionsProps; +type NewTaskPageProps = NewTaskPageOnyxProps & PlatformStackScreenProps; function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/tasks/NewTaskTitlePage.tsx b/src/pages/tasks/NewTaskTitlePage.tsx index b5562a978be5..f71f20257fff 100644 --- a/src/pages/tasks/NewTaskTitlePage.tsx +++ b/src/pages/tasks/NewTaskTitlePage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {NewTaskNavigatorParamList} from '@libs/Navigation/types'; import * as TaskActions from '@userActions/Task'; import CONST from '@src/CONST'; @@ -27,7 +27,7 @@ type NewTaskTitlePageOnyxProps = { /** Task Creation Data */ task: OnyxEntry; }; -type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & PlatformStackScreenOptionsProps; +type NewTaskTitlePageProps = NewTaskTitlePageOnyxProps & PlatformStackScreenProps; function NewTaskTitlePage({task}: NewTaskTitlePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/wallet/WalletStatementPage.tsx b/src/pages/wallet/WalletStatementPage.tsx index 0cbe411c565f..915df16305fd 100644 --- a/src/pages/wallet/WalletStatementPage.tsx +++ b/src/pages/wallet/WalletStatementPage.tsx @@ -14,7 +14,7 @@ import DateUtils from '@libs/DateUtils'; import fileDownload from '@libs/fileDownload'; import Growl from '@libs/Growl'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WalletStatementNavigatorParamList} from '@navigation/types'; import * as User from '@userActions/User'; import CONFIG from '@src/CONFIG'; @@ -27,7 +27,7 @@ type WalletStatementOnyxProps = { walletStatement: OnyxEntry; }; -type WalletStatementPageProps = WalletStatementOnyxProps & PlatformStackScreenOptionsProps; +type WalletStatementPageProps = WalletStatementOnyxProps & PlatformStackScreenProps; function WalletStatementPage({walletStatement, route}: WalletStatementPageProps) { const themePreference = useThemePreference(); diff --git a/src/pages/workspace/WorkspaceAvatar.tsx b/src/pages/workspace/WorkspaceAvatar.tsx index adafbf1ca5b3..fff2b9c19ddb 100644 --- a/src/pages/workspace/WorkspaceAvatar.tsx +++ b/src/pages/workspace/WorkspaceAvatar.tsx @@ -3,7 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList} from '@libs/Navigation/types'; import * as ReportUtils from '@libs/ReportUtils'; import * as UserUtils from '@libs/UserUtils'; @@ -16,7 +16,7 @@ type WorkspaceAvatarOnyxProps = { isLoadingApp: OnyxEntry; }; -type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceAvatarProps = WorkspaceAvatarOnyxProps & PlatformStackScreenProps; function WorkspaceAvatar({policy, isLoadingApp = true}: WorkspaceAvatarProps) { const avatarURL = policy?.avatar ?? '' ? policy?.avatar ?? '' : ReportUtils.getDefaultWorkspaceAvatar(policy?.name ?? ''); diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index d1e317879f19..7cf4dab2c6b8 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -20,7 +20,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; import getTopmostWorkspacesCentralPaneName from '@libs/Navigation/getTopmostWorkspacesCentralPaneName'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import {getDefaultWorkspaceAvatar} from '@libs/ReportUtils'; import type {FullScreenNavigatorParamList} from '@navigation/types'; @@ -71,7 +71,7 @@ type WorkspaceInitialPageOnyxProps = { type WorkspaceInitialPageProps = WithPolicyAndFullscreenLoadingProps & WorkspaceInitialPageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function dismissError(policyID: string) { PolicyUtils.goBackFromInvalidPolicy(); diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.tsx b/src/pages/workspace/WorkspaceInviteMessagePage.tsx index 3a9391528eba..6a955419908f 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx +++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx @@ -22,7 +22,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import updateMultilineInputRange from '@libs/updateMultilineInputRange'; @@ -54,7 +54,7 @@ type WorkspaceInviteMessagePageOnyxProps = { type WorkspaceInviteMessagePageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceInviteMessagePageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index 85a9836b9f3a..84f89f8cdbe7 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -18,7 +18,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {MemberForList} from '@libs/OptionsListUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; @@ -50,7 +50,7 @@ type WorkspaceInvitePageOnyxProps = { type WorkspaceInvitePageProps = WithPolicyAndFullscreenLoadingProps & WithNavigationTransitionEndProps & WorkspaceInvitePageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WorkspaceInvitePage({route, betas, invitedEmailsToAccountIDsDraft, policy, isLoadingReportData = true}: WorkspaceInvitePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/WorkspaceJoinUserPage.tsx b/src/pages/workspace/WorkspaceJoinUserPage.tsx index b67192f907dd..9e62a8d66071 100644 --- a/src/pages/workspace/WorkspaceJoinUserPage.tsx +++ b/src/pages/workspace/WorkspaceJoinUserPage.tsx @@ -5,7 +5,7 @@ import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; import navigateAfterJoinRequest from '@libs/navigateAfterJoinRequest'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {AuthScreensParamList} from '@navigation/types'; import * as PolicyAction from '@userActions/Policy'; @@ -20,7 +20,7 @@ type WorkspaceJoinUserPageOnyxProps = { policy: OnyxEntry; }; -type WorkspaceJoinUserPageRoute = {route: PlatformStackScreenOptionsProps['route']}; +type WorkspaceJoinUserPageRoute = {route: PlatformStackScreenProps['route']}; type WorkspaceJoinUserPageProps = WorkspaceJoinUserPageRoute & WorkspaceJoinUserPageOnyxProps; let isJoinLinkUsed = false; diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index a21c06c2c895..161cd1e1bb81 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -32,7 +32,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -58,7 +58,7 @@ type WorkspaceMembersPageOnyxProps = { type WorkspaceMembersPageProps = WithPolicyAndFullscreenLoadingProps & WithCurrentUserPersonalDetailsProps & WorkspaceMembersPageOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; /** * Inverts an object, equivalent of _.invert diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 386908c75578..5a4910f5c340 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -11,7 +11,7 @@ import useNetwork from '@hooks/useNetwork'; import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as Policy from '@userActions/Policy'; import type {TranslationPaths} from '@src/languages/types'; @@ -24,7 +24,7 @@ import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscree import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; import ToggleSettingOptionRow from './workflows/ToggleSettingsOptionRow'; -type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type WorkspaceMoreFeaturesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; type Item = { icon: IconAsset; diff --git a/src/pages/workspace/bills/WorkspaceBillsPage.tsx b/src/pages/workspace/bills/WorkspaceBillsPage.tsx index cfcc3ec576be..702f85152680 100644 --- a/src/pages/workspace/bills/WorkspaceBillsPage.tsx +++ b/src/pages/workspace/bills/WorkspaceBillsPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceBillsNoVBAView from './WorkspaceBillsNoVBAView'; import WorkspaceBillsVBAView from './WorkspaceBillsVBAView'; -type WorkspaceBillsPageProps = PlatformStackScreenOptionsProps; +type WorkspaceBillsPageProps = PlatformStackScreenProps; function WorkspaceBillsPage({route}: WorkspaceBillsPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/card/WorkspaceCardPage.tsx b/src/pages/workspace/card/WorkspaceCardPage.tsx index 50e93096ee7e..99f195a9d54b 100644 --- a/src/pages/workspace/card/WorkspaceCardPage.tsx +++ b/src/pages/workspace/card/WorkspaceCardPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -12,7 +12,7 @@ import WorkspaceCardNoVBAView from './WorkspaceCardNoVBAView'; import WorkspaceCardVBANoECardView from './WorkspaceCardVBANoECardView'; import WorkspaceCardVBAWithECardView from './WorkspaceCardVBAWithECardView'; -type WorkspaceCardPageProps = PlatformStackScreenOptionsProps; +type WorkspaceCardPageProps = PlatformStackScreenProps; function WorkspaceCardPage({route}: WorkspaceCardPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/categories/CategorySettingsPage.tsx b/src/pages/workspace/categories/CategorySettingsPage.tsx index 4743f5e70720..7a856f98332f 100644 --- a/src/pages/workspace/categories/CategorySettingsPage.tsx +++ b/src/pages/workspace/categories/CategorySettingsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceCategoryEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type CategorySettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type CategorySettingsPageProps = CategorySettingsPageOnyxProps & PlatformStackScreenOptionsProps; +type CategorySettingsPageProps = CategorySettingsPageOnyxProps & PlatformStackScreenProps; function CategorySettingsPage({route, policyCategories}: CategorySettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/CreateCategoryPage.tsx b/src/pages/workspace/categories/CreateCategoryPage.tsx index 57078a4f98b3..9cb8f19cce13 100644 --- a/src/pages/workspace/categories/CreateCategoryPage.tsx +++ b/src/pages/workspace/categories/CreateCategoryPage.tsx @@ -7,7 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -24,7 +24,7 @@ type WorkspaceCreateCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & PlatformStackScreenOptionsProps; +type CreateCategoryPageProps = WorkspaceCreateCategoryPageOnyxProps & PlatformStackScreenProps; function CreateCategoryPage({route, policyCategories}: CreateCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/EditCategoryPage.tsx b/src/pages/workspace/categories/EditCategoryPage.tsx index 3a5df14c07b7..2eeeea507065 100644 --- a/src/pages/workspace/categories/EditCategoryPage.tsx +++ b/src/pages/workspace/categories/EditCategoryPage.tsx @@ -7,7 +7,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ type WorkspaceEditCategoryPageOnyxProps = { policyCategories: OnyxEntry; }; -type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & PlatformStackScreenOptionsProps; +type EditCategoryPageProps = WorkspaceEditCategoryPageOnyxProps & PlatformStackScreenProps; function EditCategoryPage({route, policyCategories}: EditCategoryPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx index 64c520cbf8b1..d59150500113 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx @@ -10,7 +10,7 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceRequiresCategory} from '@libs/actions/Policy'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -26,7 +26,7 @@ type WorkspaceCategoriesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceCategoriesSettingsPageProps = WorkspaceCategoriesSettingsPageOnyxProps & PlatformStackScreenProps; function WorkspaceCategoriesSettingsPage({route, policyCategories}: WorkspaceCategoriesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx index 3d17086736ad..3e7004f21e02 100644 --- a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx +++ b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx @@ -10,7 +10,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {getOptimisticRateName, validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -29,7 +29,7 @@ type CreateDistanceRatePageOnyxProps = { policy: OnyxEntry; }; -type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & PlatformStackScreenOptionsProps; +type CreateDistanceRatePageProps = CreateDistanceRatePageOnyxProps & PlatformStackScreenProps; function CreateDistanceRatePage({policy, route}: CreateDistanceRatePageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx index 7ec6f3fe4ce3..6a10a6dc1039 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -34,7 +34,7 @@ type PolicyDistanceRateDetailsPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & PlatformStackScreenOptionsProps; +type PolicyDistanceRateDetailsPageProps = PolicyDistanceRateDetailsPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRateDetailsPage({policy, route}: PolicyDistanceRateDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx index 8ffbafa02ce7..22dd4e01af25 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx @@ -12,7 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import {validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type PolicyDistanceRateEditPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & PlatformStackScreenOptionsProps; +type PolicyDistanceRateEditPageProps = PolicyDistanceRateEditPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 10b851383ed7..54aa72d7814f 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -23,7 +23,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -44,7 +44,7 @@ type PolicyDistanceRatesPageOnyxProps = { policy: OnyxEntry; }; -type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & PlatformStackScreenOptionsProps; +type PolicyDistanceRatesPageProps = PolicyDistanceRatesPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRatesPage({policy, route}: PolicyDistanceRatesPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx index 8ef68569873f..9183b0860851 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx @@ -10,7 +10,7 @@ import type {UnitItemType} from '@components/UnitPicker'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -33,8 +33,7 @@ type PolicyDistanceRatesSettingsPageOnyxProps = { policyCategories: OnyxEntry; }; -type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & - PlatformStackScreenOptionsProps; +type PolicyDistanceRatesSettingsPageProps = PolicyDistanceRatesSettingsPageOnyxProps & PlatformStackScreenProps; function PolicyDistanceRatesSettingsPage({policy, policyCategories, route}: PolicyDistanceRatesSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index bf2101ca0901..71abf7ea7132 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView'; import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; -type WorkspaceInvoicesPageProps = PlatformStackScreenOptionsProps; +type WorkspaceInvoicesPageProps = PlatformStackScreenProps; function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index 1f0d8d0ce853..22982c1618ad 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -17,7 +17,7 @@ import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -40,7 +40,7 @@ type WorkspacePolicyOnyxProps = { type WorkspaceMemberDetailsPageProps = Omit & WorkspacePolicyOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceMemberDetailsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx index 70ab6d5ef9d3..41b718792e9d 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeErrorPage.tsx @@ -10,7 +10,7 @@ import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenOptionsProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; function WorkspaceOwnerChangeErrorPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx index cf1cd9596a26..3b201a8920e7 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeSuccessPage.tsx @@ -5,7 +5,7 @@ import LottieAnimations from '@components/LottieAnimations'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -14,7 +14,7 @@ import * as PolicyActions from '@userActions/Policy'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenOptionsProps; +type WorkspaceOwnerChangeSuccessPageProps = PlatformStackScreenProps; function WorkspaceOwnerChangeSuccessPage({route}: WorkspaceOwnerChangeSuccessPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx index 9a5f1e6f4d64..a264cd0e2592 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx @@ -6,7 +6,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -20,7 +20,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceOwnerChangeCheck from './WorkspaceOwnerChangeCheck'; import WorkspaceOwnerPaymentCardForm from './WorkspaceOwnerPaymentCardForm'; -type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceOwnerChangeWrapperPageProps = WithPolicyOnyxProps & PlatformStackScreenProps; function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWrapperPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx index 69c31619f1cc..38f066876d8e 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.tsx @@ -11,7 +11,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import getPermittedDecimalSeparator from '@libs/getPermittedDecimalSeparator'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as NumberUtils from '@libs/NumberUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {Unit} from '@src/types/onyx/Policy'; -type WorkspaceRateAndUnitPageProps = WithPolicyProps & PlatformStackScreenOptionsProps; +type WorkspaceRateAndUnitPageProps = WithPolicyProps & PlatformStackScreenProps; type ValidationError = {rate?: TranslationPaths | undefined}; diff --git a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx index 8e7e6f5a9f46..084141ab368a 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx @@ -1,6 +1,6 @@ import React from 'react'; import useLocalize from '@hooks/useLocalize'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import withPolicy from '@pages/workspace/withPolicy'; @@ -9,7 +9,7 @@ import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; import WorkspaceReimburseView from './WorkspaceReimburseView'; -type WorkspaceReimbursePageProps = WithPolicyProps & PlatformStackScreenOptionsProps; +type WorkspaceReimbursePageProps = WithPolicyProps & PlatformStackScreenProps; function WorkspaceReimbursePage({route, policy}: WorkspaceReimbursePageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/tags/EditTagPage.tsx b/src/pages/workspace/tags/EditTagPage.tsx index 3b52e5c22cc5..03a1c81719a5 100644 --- a/src/pages/workspace/tags/EditTagPage.tsx +++ b/src/pages/workspace/tags/EditTagPage.tsx @@ -12,7 +12,7 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -31,7 +31,7 @@ type EditTagPageOnyxProps = { policyTags: OnyxEntry; }; -type EditTagPageProps = EditTagPageOnyxProps & PlatformStackScreenOptionsProps; +type EditTagPageProps = EditTagPageOnyxProps & PlatformStackScreenProps; function EditTagPage({route, policyTags}: EditTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/TagSettingsPage.tsx b/src/pages/workspace/tags/TagSettingsPage.tsx index c9c01b9bf465..c0f8ceefb49a 100644 --- a/src/pages/workspace/tags/TagSettingsPage.tsx +++ b/src/pages/workspace/tags/TagSettingsPage.tsx @@ -16,7 +16,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {setWorkspaceTagEnabled} from '@libs/actions/Policy'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -35,7 +35,7 @@ type TagSettingsPageOnyxProps = { policyTags: OnyxEntry; }; -type TagSettingsPageProps = TagSettingsPageOnyxProps & PlatformStackScreenOptionsProps; +type TagSettingsPageProps = TagSettingsPageOnyxProps & PlatformStackScreenProps; function TagSettingsPage({route, policyTags}: TagSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx index 5e35a699af53..3c8d2e795397 100644 --- a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx +++ b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; @@ -32,7 +32,7 @@ type WorkspaceCreateTagPageOnyxProps = { policyTags: OnyxEntry; }; -type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & PlatformStackScreenOptionsProps; +type CreateTagPageProps = WorkspaceCreateTagPageOnyxProps & PlatformStackScreenProps; function CreateTagPage({route, policyTags}: CreateTagPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx index ebbb79875905..efb13e710fbd 100644 --- a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx @@ -13,7 +13,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -30,7 +30,7 @@ type WorkspaceEditTagsPageOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceEditTagsPageProps = WorkspaceEditTagsPageOnyxProps & PlatformStackScreenProps; const validateTagName = (values: FormOnyxValues) => { const errors: FormInputErrors = {}; diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index bfd71f4b59ea..877da930fd9e 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -26,7 +26,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import localeCompare from '@libs/LocaleCompare'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -60,7 +60,7 @@ type WorkspaceTagsOnyxProps = { policyTags: OnyxEntry; }; -type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceTagsPageProps = WorkspaceTagsOnyxProps & PlatformStackScreenProps; function WorkspaceTagsPage({policyTags, route}: WorkspaceTagsPageProps) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx index cc9a8bbf6e0b..6cfe9d2ef049 100644 --- a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Policy from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -28,7 +28,7 @@ type WorkspaceTagsSettingsPageOnyxProps = { /** Collection of tags attached to a policy */ policyTags: OnyxEntry; }; -type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & PlatformStackScreenOptionsProps; +type WorkspaceTagsSettingsPageProps = WorkspaceTagsSettingsPageOnyxProps & PlatformStackScreenProps; function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPageProps) { const styles = useThemeStyles(); diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index 48202d250872..a484e26b6ca4 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {renamePolicyTax, validateTaxName} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxNameForm'; -type NamePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type NamePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; const parser = new ExpensiMark(); diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index 6a2e19264746..168cd23a53d7 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -11,7 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {updatePolicyTaxValue, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -26,7 +26,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceTaxValueForm'; -type ValuePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type ValuePageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function ValuePage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index 1d5cfcb25b52..c84cd9adb8b2 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -12,7 +12,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {createPolicyTax, getNextTaxCode, getTaxValueWithPercentage, validateTaxName, validateTaxValue} from '@libs/actions/TaxRate'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -25,7 +25,7 @@ import type SCREENS from '@src/SCREENS'; import INPUT_IDS from '@src/types/form/WorkspaceNewTaxForm'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type WorkspaceCreateTaxPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceCreateTaxPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx index fb61822759d7..ae5c6c838669 100644 --- a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx @@ -15,7 +15,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {clearTaxRateFieldError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs/actions/TaxRate'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; @@ -28,7 +28,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type WorkspaceEditTaxPageBaseProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceEditTaxPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index 104694cfbc63..3c763f3c154d 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -24,7 +24,7 @@ import {clearTaxRateError, deletePolicyTaxes, setPolicyTaxesEnabled} from '@libs import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -37,7 +37,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {TaxRate} from '@src/types/onyx'; -type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type WorkspaceTaxesPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceTaxesPage({ policy, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx index 89b3fc71dc56..ab15e94add6a 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx @@ -11,7 +11,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setPolicyCustomTaxName} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; @@ -27,7 +27,7 @@ import INPUT_IDS from '@src/types/form/WorkspaceTaxCustomName'; import type {WorkspaceTaxCustomName} from '@src/types/form/WorkspaceTaxCustomName'; type WorkspaceTaxesSettingsCustomTaxNameProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WorkspaceTaxesSettingsCustomTaxName({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx index be899ce2eabf..0670c5682cb6 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx @@ -7,7 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setForeignCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsForeignCurrencyProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WorkspaceTaxesSettingsForeignCurrency({ route: { params: {policyID}, diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx index a1500e5c64f2..ebc32b2f47f2 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx @@ -8,7 +8,7 @@ import ScrollView from '@components/ScrollView'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -19,7 +19,7 @@ import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; -type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenOptionsProps; +type WorkspaceTaxesSettingsPageProps = WithPolicyAndFullscreenLoadingProps & PlatformStackScreenProps; function WorkspaceTaxesSettingsPage({ route: { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx index e40d7fbcae9c..5e9b27ca7a53 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx @@ -7,7 +7,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {setWorkspaceCurrencyDefault} from '@libs/actions/Policy'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; @@ -21,7 +21,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; type WorkspaceTaxesSettingsWorkspaceCurrencyProps = WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; function WorkspaceTaxesSettingsWorkspaceCurrency({ route: { diff --git a/src/pages/workspace/travel/WorkspaceTravelPage.tsx b/src/pages/workspace/travel/WorkspaceTravelPage.tsx index a5cbf9aae516..72bfb6cb924f 100644 --- a/src/pages/workspace/travel/WorkspaceTravelPage.tsx +++ b/src/pages/workspace/travel/WorkspaceTravelPage.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; @@ -11,7 +11,7 @@ import type SCREENS from '@src/SCREENS'; import WorkspaceTravelNoVBAView from './WorkspaceTravelNoVBAView'; import WorkspaceTravelVBAView from './WorkspaceTravelVBAView'; -type WorkspaceTravelPageProps = PlatformStackScreenOptionsProps; +type WorkspaceTravelPageProps = PlatformStackScreenProps; function WorkspaceTravelPage({route}: WorkspaceTravelPageProps) { const {translate} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx index 10ce8353eef3..d80cf676953a 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx @@ -12,7 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as Localize from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -28,7 +28,7 @@ type AutoReportingFrequencyKey = Exclude; type WorkspaceAutoReportingFrequencyPageProps = WithPolicyOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; type WorkspaceAutoReportingFrequencyPageItem = { text: string; diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx index 09787ce3ccb3..26dfa84520f4 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx @@ -7,7 +7,7 @@ import SelectionList from '@components/SelectionList'; import RadioListItem from '@components/SelectionList/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; @@ -21,7 +21,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; const DAYS_OF_MONTH = 28; type WorkspaceAutoReportingMonthlyOffsetProps = WithPolicyOnyxProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; type AutoReportingOffsetKeys = ValueOf; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx index 5919223b25c1..2b6858bba684 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx @@ -14,7 +14,7 @@ import useNetwork from '@hooks/useNetwork'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -35,7 +35,7 @@ type WorkspaceWorkflowsApproverPageOnyxProps = { type WorkspaceWorkflowsApproverPageProps = WorkspaceWorkflowsApproverPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index ae477c424423..0efa55022cfe 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -15,7 +15,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Permissions from '@libs/Permissions'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -40,9 +40,7 @@ type WorkspaceWorkflowsPageOnyxProps = { /** Beta features list */ betas: OnyxEntry; }; -type WorkspaceWorkflowsPageProps = WithPolicyProps & - WorkspaceWorkflowsPageOnyxProps & - PlatformStackScreenOptionsProps; +type WorkspaceWorkflowsPageProps = WithPolicyProps & WorkspaceWorkflowsPageOnyxProps & PlatformStackScreenProps; function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPageProps) { const {translate, preferredLocale} = useLocalize(); diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx index eabf4c787fbb..32c53aece169 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx @@ -14,7 +14,7 @@ import useNetwork from '@hooks/useNetwork'; import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Log from '@libs/Log'; import Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -36,7 +36,7 @@ type WorkspaceWorkflowsPayerPageOnyxProps = { type WorkspaceWorkflowsPayerPageProps = WorkspaceWorkflowsPayerPageOnyxProps & WithPolicyAndFullscreenLoadingProps & - PlatformStackScreenOptionsProps; + PlatformStackScreenProps; type MemberOption = Omit & {accountID: number}; type MembersSection = SectionListData>; diff --git a/src/types/utils/CommonProperties.ts b/src/types/utils/CommonProperties.ts new file mode 100644 index 000000000000..e4e44f92fd8e --- /dev/null +++ b/src/types/utils/CommonProperties.ts @@ -0,0 +1,9 @@ +// Utility type for omitting properties in an object that are 'never'. +type OmitNever> = { + [K in keyof T as T[K] extends never ? never : K]: T[K]; +}; + +// Helper type to get common properties between two types. +type CommonProperties = OmitNever>; + +export default CommonProperties; diff --git a/tests/perf-test/ChatFinderPage.perf-test.tsx b/tests/perf-test/ChatFinderPage.perf-test.tsx index 8205a6a9e798..ba416222bbe2 100644 --- a/tests/perf-test/ChatFinderPage.perf-test.tsx +++ b/tests/perf-test/ChatFinderPage.perf-test.tsx @@ -9,7 +9,7 @@ import {LocaleContextProvider} from '@components/LocaleContextProvider'; import OptionListContextProvider, {OptionsListContext} from '@components/OptionListContextProvider'; import {KeyboardStateProvider} from '@components/withKeyboardState'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {RootStackParamList} from '@libs/Navigation/types'; import {createOptionList} from '@libs/OptionsListUtils'; import ChatFinderPage from '@pages/ChatFinderPage'; @@ -123,7 +123,7 @@ afterEach(() => { Onyx.clear(); }); -type ChatFinderPageProps = PlatformStackScreenOptionsProps & { +type ChatFinderPageProps = PlatformStackScreenProps & { betas: OnyxEntry; reports: OnyxCollection; isSearchingForReports: OnyxEntry; diff --git a/tests/perf-test/ReportScreen.perf-test.tsx b/tests/perf-test/ReportScreen.perf-test.tsx index 1c5c82c379eb..779c17dc9d42 100644 --- a/tests/perf-test/ReportScreen.perf-test.tsx +++ b/tests/perf-test/ReportScreen.perf-test.tsx @@ -6,7 +6,7 @@ import type Animated from 'react-native-reanimated'; import {measurePerformance} from 'reassure'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type Navigation from '@libs/Navigation/Navigation'; -import type {PlatformStackScreenOptionsProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import ComposeProviders from '@src/components/ComposeProviders'; import DragAndDropProvider from '@src/components/DragAndDrop/Provider'; @@ -33,7 +33,7 @@ import * as TestHelper from '../utils/TestHelper'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -type ReportScreenWrapperProps = PlatformStackScreenOptionsProps; +type ReportScreenWrapperProps = PlatformStackScreenProps; jest.mock('@src/libs/API', () => ({ write: jest.fn(), From 4b40806b4957f6a9c10a5eec725d08bb809aa24b Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 19:10:52 +0200 Subject: [PATCH 079/589] allow nativeOnly and webOnly options --- .../ModalNavigatorScreenOptions.ts | 6 +- .../modalStackNavigatorOptions/index.ts | 4 +- .../useModalScreenOptions.ts | 4 +- .../BaseCentralPaneNavigator.tsx | 6 +- .../OnboardingModalNavigatorScreenOptions.ts | 4 +- .../BottomTabNavigationContentWrapper.tsx | 2 +- .../createCustomBottomTabNavigator/index.tsx | 2 +- .../SearchRoute.tsx | 2 +- .../getStateWithSearch.tsx | 2 +- .../createResponsiveStackNavigator/index.tsx | 4 +- .../getRightModalNavigatorOptions/index.ts | 16 +-- .../getRootNavigatorScreenOptions.ts | 114 ++++++++++-------- .../PlatformStackNavigator.tsx | 2 +- .../platformOptions/utils.ts | 2 +- .../withNativeNavigationOptions.ts | 1 + .../withWebNavigationOptions.ts | 1 + .../PlatformStackNavigation/types/index.ts | 46 ++++--- src/types/utils/Substract.ts | 5 + 18 files changed, 132 insertions(+), 91 deletions(-) create mode 100644 src/types/utils/Substract.ts diff --git a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts index 423c1b482302..e3a67bc37583 100644 --- a/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts @@ -9,9 +9,11 @@ import type {ThemeStyles} from '@styles/index'; */ const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles): PlatformStackNavigationOptions => ({ headerShown: false, - cardStyle: themeStyles.navigationScreenCardStyle, animation: 'slide_from_left', - cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, + webOnly: { + cardStyle: themeStyles.navigationScreenCardStyle, + cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, + }, }); export default ModalNavigatorScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts index c0093379046f..0d07e69070dc 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/modalStackNavigatorOptions/index.ts @@ -3,7 +3,9 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStac const defaultSubRouteOptions: PlatformStackNavigationOptions = { headerShown: false, - cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, + webOnly: { + cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, + }, }; export default defaultSubRouteOptions; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts index 839ba1fc73b8..fa7cfa060851 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/useModalScreenOptions.ts @@ -12,7 +12,9 @@ function useModalScreenOptions(getScreenOptions?: (styles: ThemeStyles) => Platf (): PlatformStackNavigationOptions => ({ ...subRouteOptions, ...hideKeyboardOnSwipe, - cardStyle: styles.navigationScreenCardStyle, + webOnly: { + cardStyle: styles.navigationScreenCardStyle, + }, }), [styles], ); diff --git a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx index 1d71e689d7c2..98010726923c 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator/BaseCentralPaneNavigator.tsx @@ -32,8 +32,10 @@ function BaseCentralPaneNavigator() { headerShown: false, title: 'New Expensify', animation: 'slide_from_left', - // Prevent unnecessary scrolling - cardStyle: styles.cardStyleNavigator, + webOnly: { + // Prevent unnecessary scrolling + cardStyle: styles.cardStyleNavigator, + }, }; return ( diff --git a/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts index e75a59a20062..3d6179ed53b5 100644 --- a/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/OnboardingModalNavigatorScreenOptions.ts @@ -8,8 +8,10 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStac const OnboardingModalNavigatorScreenOptions = (): PlatformStackNavigationOptions => ({ headerShown: false, gestureDirection: 'horizontal', - cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, presentation: 'transparentModal', + webOnly: { + cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, + }, }); export default OnboardingModalNavigatorScreenOptions; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx index 3c5187e97f9e..155f74d6a6ad 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx @@ -2,8 +2,8 @@ import type {EventMapBase, ParamListBase} from '@react-navigation/native'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {NavigationContentWrapperProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {NavigationContentWrapperProps} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; function BottomTabNavigationContentWrapper({ children, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 5bfda300be69..987fbfc607f6 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -2,7 +2,6 @@ import type {EventMapBase, ParamListBase} from '@react-navigation/native'; import {createNavigatorFactory} from '@react-navigation/native'; import React from 'react'; import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent'; -import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type { PlatformSpecificEventMap, PlatformSpecificNavigationOptions, @@ -10,6 +9,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationState, } from '@libs/Navigation/PlatformStackNavigation/types'; +import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type {NavigationStateRoute} from '@libs/Navigation/types'; import SCREENS from '@src/SCREENS'; import BottomTabBar from './BottomTabBar'; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx index c836298a2a5f..eee7319ec613 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/SearchRoute.tsx @@ -1,8 +1,8 @@ import type {EventMapBase} from '@react-navigation/native'; import {View} from 'react-native'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; function SearchRoute({searchRoute, descriptors}: CustomCodePropsWithTransformedState) { const styles = useThemeStyles(); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx index 7ec2fc18cc26..8c485663faa2 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/getStateWithSearch.tsx @@ -1,7 +1,7 @@ import type {EventMapBase, ParamListBase} from '@react-navigation/native'; import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute'; -import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type {RootStackParamList, State} from '@libs/Navigation/types'; import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index a062eb77d301..cea062b625cd 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -1,8 +1,7 @@ import type {EventMapBase, ParamListBase} from '@react-navigation/native'; import {createNavigatorFactory} from '@react-navigation/native'; import navigationRef from '@libs/Navigation/navigationRef'; -import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native'; -import type {OnWindowDimensionsChange} from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/types'; +import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent'; import type { PlatformSpecificEventMap, PlatformSpecificNavigationOptions, @@ -10,6 +9,7 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationState, } from '@libs/Navigation/PlatformStackNavigation/types'; +import type {OnWindowDimensionsChange} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import getStateWithSearch from './getStateWithSearch'; import RenderSearchRoute from './SearchRoute'; diff --git a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts index 0eb2bc534e80..1edcf3e27839 100644 --- a/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts +++ b/src/libs/Navigation/AppNavigator/getRightModalNavigatorOptions/index.ts @@ -4,16 +4,16 @@ import getNavigationModalCardStyle from '@styles/utils/getNavigationModalCardSty const rightModalNavigatorOptions = (isSmallScreenWidth: boolean): PlatformStackNavigationOptions => ({ presentation: 'transparentModal', - // We want pop in RHP since there are some flows that would work weird otherwise animationTypeForReplace: 'pop', - cardStyle: { - ...getNavigationModalCardStyle(), - - // This is necessary to cover translated sidebar with overlay. - width: isSmallScreenWidth ? '100%' : '200%', - // Excess space should be on the left so we need to position from right. - right: 0, + webOnly: { + cardStyle: { + ...getNavigationModalCardStyle(), + // This is necessary to cover translated sidebar with overlay. + width: isSmallScreenWidth ? '100%' : '200%', + // Excess space should be on the left so we need to position from right. + right: 0, + }, }, }); diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts index 225c645f85e6..364cf1b934b3 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.ts @@ -24,7 +24,9 @@ type ScreenOptions = { const commonScreenOptions: PlatformStackNavigationOptions = { headerShown: false, - cardOverlayEnabled: true, + webOnly: { + cardOverlayEnabled: true, + }, }; type GetRootNavigatorScreenOptions = (isSmallScreenWidth: boolean, styles: ThemeStyles, StyleUtils: StyleUtilsType) => ScreenOptions; @@ -37,7 +39,9 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...commonScreenOptions, ...getRightModalNavigatorOptions(isSmallScreenWidth), ...hideKeyboardOnSwipe, - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), + webOnly: { + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), + }, }, onboardingModalNavigator: (shouldUseNarrowLayout: boolean) => ({ cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, shouldUseNarrowLayout, props), @@ -45,58 +49,65 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr animationEnabled: true, cardOverlayEnabled: false, presentation: 'transparentModal', - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - backgroundColor: 'transparent', - width: '100%', - top: 0, - left: 0, - // We need to guarantee that it covers BottomTabBar on web, but fixed position is not supported in react native. - position: 'fixed' as ViewStyle['position'], + webOnly: { + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + backgroundColor: 'transparent', + width: '100%', + top: 0, + left: 0, + // We need to guarantee that it covers BottomTabBar on web, but fixed position is not supported in react native. + position: 'fixed' as ViewStyle['position'], + }, }, }), leftModalNavigator: { ...commonScreenOptions, ...leftModalNavigatorOptions, - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), - - // We want pop in LHP since there are some flows that would work weird otherwise animationTypeForReplace: 'pop', - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - - // This is necessary to cover translated sidebar with overlay. - width: isSmallScreenWidth ? '100%' : '200%', - - // LHP should be displayed in place of the sidebar - left: isSmallScreenWidth ? 0 : -variables.sideBarWidth, + webOnly: { + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), + // We want pop in LHP since there are some flows that would work weird otherwise + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + + // This is necessary to cover translated sidebar with overlay. + width: isSmallScreenWidth ? '100%' : '200%', + + // LHP should be displayed in place of the sidebar + left: isSmallScreenWidth ? 0 : -variables.sideBarWidth, + }, }, }, homeScreen: { ...commonScreenOptions, title: CONFIG.SITE_TITLE, - // Note: The card* properties won't be applied on mobile platforms, as they use the native defaults. - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, - - // We need to shift the sidebar to not be covered by the StackNavigator so it can be clickable. - marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, - ...(isSmallScreenWidth ? {} : themeStyles.borderRight), + webOnly: { + // Note: The card* properties won't be applied on mobile platforms, as they use the native defaults. + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, + + // We need to shift the sidebar to not be covered by the StackNavigator so it can be clickable. + marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, + ...(isSmallScreenWidth ? {} : themeStyles.borderRight), + }, }, }, fullScreen: { ...commonScreenOptions, - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - - // This is necessary to cover whole screen. Including translated sidebar. - marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, - }, animation: 'slide_from_right', + webOnly: { + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + + // This is necessary to cover whole screen. Including translated sidebar. + marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, + }, + }, }, centralPaneNavigator: { @@ -104,24 +115,27 @@ const getRootNavigatorScreenOptions: GetRootNavigatorScreenOptions = (isSmallScr ...hideKeyboardOnSwipe, title: CONFIG.SITE_TITLE, animation: isSmallScreenWidth ? undefined : 'none', - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - paddingRight: isSmallScreenWidth ? 0 : variables.sideBarWidth, + webOnly: { + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, true, false, props), + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + paddingRight: isSmallScreenWidth ? 0 : variables.sideBarWidth, + }, }, }, bottomTab: { ...commonScreenOptions, - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), - - cardStyle: { - ...StyleUtils.getNavigationModalCardStyle(), - width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, - - // We need to shift the sidebar to not be covered by the StackNavigator so it can be clickable. - marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, - ...(isSmallScreenWidth ? {} : themeStyles.borderRight), + webOnly: { + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props), + cardStyle: { + ...StyleUtils.getNavigationModalCardStyle(), + width: isSmallScreenWidth ? '100%' : variables.sideBarWidth, + + // We need to shift the sidebar to not be covered by the StackNavigator so it can be clickable. + marginLeft: isSmallScreenWidth ? 0 : -variables.sideBarWidth, + ...(isSmallScreenWidth ? {} : themeStyles.borderRight), + }, }, }, } satisfies ScreenOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx b/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx index 819f7ee2f3b5..9d1af6e764e5 100644 --- a/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/PlatformStackNavigator.tsx @@ -1,4 +1,4 @@ -import createPlatformStackNavigatorComponent from './createPlatformStackNavigatorComponent/index.native'; +import createPlatformStackNavigatorComponent from './createPlatformStackNavigatorComponent'; const PlatformStackNavigator = createPlatformStackNavigatorComponent('PlatformStackNavigator'); diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts index 9a647bcd26be..301dd733a0e9 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/utils.ts @@ -1,6 +1,6 @@ import type {CommonStackNavigationOptions, PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const getCommonNavigationOptions = (screenOptions: PlatformStackNavigationOptions | undefined): CommonStackNavigationOptions => - screenOptions === undefined ? {} : (({animation, keyboardHandlingEnabled, ...rest}: PlatformStackNavigationOptions) => rest)(screenOptions); + screenOptions === undefined ? {} : (({animation, keyboardHandlingEnabled, webOnly, nativeOnly, ...rest}: PlatformStackNavigationOptions) => rest)(screenOptions); export default getCommonNavigationOptions; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index 2ab69133b1b8..cd524a8f6956 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -13,6 +13,7 @@ import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigationOptions | undefined): NativeStackNavigationOptions => ({ ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), + ...screenOptions?.nativeOnly, }); function withNativeNavigationOptions( diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index e639bcc42f61..6ac7ed07d6dc 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -14,6 +14,7 @@ const transformPlatformOptionsToWeb = (screenOptions: PlatformStackNavigationOpt keyboardHandlingEnabled: screenOptions?.keyboardHandlingEnabled, ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), + ...screenOptions?.webOnly, }); function withWebNavigationOptions( diff --git a/src/libs/Navigation/PlatformStackNavigation/types/index.ts b/src/libs/Navigation/PlatformStackNavigation/types/index.ts index 8d7b87f5c183..2c1c36eb6a34 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/index.ts @@ -2,6 +2,7 @@ import type {NavigationProp, ParamListBase, RouteProp, RouterFactory, StackNavig import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type CommonProperties from '@src/types/utils/CommonProperties'; +import Subtract from '@src/types/utils/Substract'; // Represents the navigation state type for a platform-specific stack. type PlatformStackNavigationState = StackNavigationState; @@ -9,8 +10,35 @@ type PlatformStackNavigationState = StackNaviga // Common navigation options merged from both stack and native-stack navigations. type CommonStackNavigationOptions = CommonProperties; +// Navigation properties that are only available in web or native stack navigations. +type WebOnlyNavigationOptions = Partial>; +type NativeOnlyNavigationOptions = Partial>; + +// type CardOptions = { +// cardShadowEnabled?: StackNavigationOptions['cardShadowEnabled']; +// cardOverlayEnabled?: StackNavigationOptions['cardOverlayEnabled']; +// cardOverlay?: StackNavigationOptions['cardOverlay']; +// cardStyle?: StackNavigationOptions['cardStyle']; +// cardStyleInterpolator: StackNavigationOptions['cardStyleInterpolator']; +// }; + // Expanded navigation options including possible custom properties for platform-specific implementations. type GeneralPlatformStackNavigationOptions = { + // // Unique to StackNavigationOptions + // detachPreviousScreen?: boolean; + // freezeOnBlur?: boolean; + webOnly?: WebOnlyNavigationOptions; + + // // Unique to NativeStackNavigationOptions + // autoHideHomeIndicator?: boolean; + // contentStyle?: StyleProp; + // customAnimationOnGesture?: boolean; + // fullScreenGestureEnabled?: boolean; + // navigationBarColor?: string; + // navigationBarHidden?: boolean; + // orientation?: ScreenProps['screenOrientation']; + nativeOnly?: NativeOnlyNavigationOptions; + keyboardHandlingEnabled?: boolean; // Stack @@ -55,24 +83,6 @@ type GeneralPlatformStackNavigationOptions = { // gestureVelocityImpact?: number; // gestureDirection?: ScreenProps['swipeDirection']; gesture?: unknown; - - // // Unique to StackNavigationOptions - // cardOverlay?: (props: { style: Animated.WithAnimatedValue> }) => React.ReactNode; - // cardOverlayEnabled?: boolean; - // cardShadowEnabled?: boolean; - // cardStyle?: StyleProp; - // detachPreviousScreen?: boolean; - // keyboardHandlingEnabled?: boolean; - // freezeOnBlur?: boolean; - - // // Unique to NativeStackNavigationOptions - // autoHideHomeIndicator?: boolean; - // contentStyle?: StyleProp; - // customAnimationOnGesture?: boolean; - // fullScreenGestureEnabled?: boolean; - // navigationBarColor?: string; - // navigationBarHidden?: boolean; - // orientation?: ScreenProps['screenOrientation']; }; // Combines common and general platform-specific options for PlatformStackNavigation. diff --git a/src/types/utils/Substract.ts b/src/types/utils/Substract.ts new file mode 100644 index 000000000000..33e281ce8e1a --- /dev/null +++ b/src/types/utils/Substract.ts @@ -0,0 +1,5 @@ +type Subtract = { + [Property in Exclude]: TypeA[Property]; +}; + +export default Subtract; From a2f16c3f55bd3cb3e170ea9e3675b6733b19a165 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 19:10:59 +0200 Subject: [PATCH 080/589] fix: defaultScreenOptions --- .../Navigation/AppNavigator/defaultScreenOptions.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts b/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts index 3104264263a6..a480049ce6ae 100644 --- a/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts +++ b/src/libs/Navigation/AppNavigator/defaultScreenOptions.ts @@ -1,12 +1,14 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; const defaultScreenOptions: PlatformStackNavigationOptions = { - cardStyle: { - overflow: 'visible', - flex: 1, - }, headerShown: false, animationTypeForReplace: 'push', + webOnly: { + cardStyle: { + overflow: 'visible', + flex: 1, + }, + }, }; export default defaultScreenOptions; From b322da47b7503447147f15375c09e9c95eb82ebb Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 19:12:28 +0200 Subject: [PATCH 081/589] fix: last TS error --- .../AppNavigator/leftModalNavigatorOptions/index.native.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts index 4d8219a32301..3dfdbbbc44af 100644 --- a/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts +++ b/src/libs/Navigation/AppNavigator/leftModalNavigatorOptions/index.native.ts @@ -2,7 +2,9 @@ import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStac const leftModalNavigatorOptions: PlatformStackNavigationOptions = { animation: 'slide_from_left', - customAnimationOnGesture: true, + nativeOnly: { + customAnimationOnGesture: true, + }, }; export default leftModalNavigatorOptions; From 451ce6505e5efe95627d3bc31e26896144c131bf Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 24 Apr 2024 19:58:03 +0200 Subject: [PATCH 082/589] fix: lint errors --- .../createPlatformStackNavigatorComponent/index.native.tsx | 2 +- .../createPlatformStackNavigatorComponent/index.tsx | 2 +- .../platformOptions/withWebNavigationOptions.ts | 6 +++--- .../PlatformStackNavigation/types/ScreenOptions.ts | 3 +-- src/libs/Navigation/PlatformStackNavigation/types/index.ts | 6 +++--- src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx | 1 - 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index 14b4aa83e83c..32fcfe609fde 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -10,7 +10,7 @@ import type {PlatformStackNavigationOptions, PlatformStackNavigationState, Platf import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; -import {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; +import type {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; function createPlatformStackNavigatorComponent( displayName: string, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index bfb0811fbda8..b142ff40e6b7 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -10,7 +10,7 @@ import type {PlatformStackNavigationOptions, PlatformStackNavigationState, Platf import type {PlatformNavigationBuilderOptions} from '@libs/Navigation/PlatformStackNavigation/types/NavigationBuilder'; import type {CreatePlatformStackNavigatorComponentOptions, CustomCodeProps, CustomCodePropsWithTransformedState} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import type PlatformStackNavigatorProps from '@libs/Navigation/PlatformStackNavigation/types/PlatformStackNavigator'; -import {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; +import type {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; function createPlatformStackNavigatorComponent( displayName: string, diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts index 6ac7ed07d6dc..1a5da1615b57 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions.ts @@ -1,8 +1,8 @@ import type {ParamListBase} from '@react-navigation/native'; import type {StackNavigationOptions} from '@react-navigation/stack'; -import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; -import {isRouteBasedScreenOptions, PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; +import type {PlatformStackNavigationOptions, PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {PlatformStackScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; +import {isRouteBasedScreenOptions} from '@libs/Navigation/PlatformStackNavigation/types/ScreenOptions'; import noAnimation from './animation/web/none'; import slideFromBottomAnimation from './animation/web/slideFromBottom'; import slideFromLeftAnimation from './animation/web/slideFromLeft'; diff --git a/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts b/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts index eeca9ab8fadb..a3336b2c8672 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/ScreenOptions.ts @@ -1,6 +1,5 @@ import type {ParamListBase} from '@react-navigation/native'; -import type {PlatformStackNavigationOptions} from '.'; -import type {PlatformStackScreenProps} from '.'; +import type {PlatformStackNavigationOptions, PlatformStackScreenProps} from '.'; import type PlatformStackNavigatorProps from './PlatformStackNavigator'; // The "screenOptions" and "defaultScreenOptions" can either be an object of configuration settings or diff --git a/src/libs/Navigation/PlatformStackNavigation/types/index.ts b/src/libs/Navigation/PlatformStackNavigation/types/index.ts index 2c1c36eb6a34..f97ad8b0aa59 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/index.ts @@ -2,7 +2,7 @@ import type {NavigationProp, ParamListBase, RouteProp, RouterFactory, StackNavig import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import type CommonProperties from '@src/types/utils/CommonProperties'; -import Subtract from '@src/types/utils/Substract'; +import type Subtract from '@src/types/utils/Substract'; // Represents the navigation state type for a platform-specific stack. type PlatformStackNavigationState = StackNavigationState; @@ -129,10 +129,10 @@ type PlatformStackScreenProps< RouteName extends keyof ParamList = keyof ParamList, NavigatorID extends string | undefined = undefined, // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents - NavigationProp extends PlatformStackNavigationProp | any = PlatformStackNavigationProp, + NavigationPropType extends PlatformStackNavigationProp | any = PlatformStackNavigationProp, > = { route: PlatformStackRouteProp; - navigation: NavigationProp; + navigation: NavigationPropType; }; export type { diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index 22982c1618ad..a8982936dc15 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -18,7 +18,6 @@ import useNetwork from '@hooks/useNetwork'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; -import * as UserUtils from '@libs/UserUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AdminPolicyAccessOrNotFoundWrapper from '@pages/workspace/AdminPolicyAccessOrNotFoundWrapper'; From 899f180c3567168ec4d69310dae0d16700dc26c4 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 22:56:01 +0200 Subject: [PATCH 083/589] fix: navigation updating every render --- .../createResponsiveStackNavigator/index.tsx | 6 +++--- .../index.native.tsx | 5 +++-- .../createPlatformStackNavigatorComponent/index.tsx | 5 +++-- .../types/NavigatorComponent.ts | 12 ++++++------ 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx index cea062b625cd..f8b8cb84ecf4 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.tsx @@ -9,11 +9,11 @@ import type { PlatformStackNavigationOptions, PlatformStackNavigationState, } from '@libs/Navigation/PlatformStackNavigation/types'; -import type {OnWindowDimensionsChange} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; +import type {OnIsSmallScreenWidthChange} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; import getStateWithSearch from './getStateWithSearch'; import RenderSearchRoute from './SearchRoute'; -const handleWindowDimensionsChange: OnWindowDimensionsChange = ({navigation}) => { +const handleIsSmallScreenWidthChange: OnIsSmallScreenWidthChange = ({navigation}) => { if (!navigationRef.isReady()) { return; } @@ -25,7 +25,7 @@ const handleWindowDimensionsChange: OnWindowDimensionsChange() { diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index 32fcfe609fde..1a0f90896760 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -20,7 +20,7 @@ function createPlatformStackNavigatorComponent) { const styles = useThemeStyles(); @@ -95,7 +95,8 @@ function createPlatformStackNavigatorComponent { onIsSmallScreenWidthChange?.({...customCodePropsWithTransformedState, windowDimensions}); - }, [customCodePropsWithTransformedState, windowDimensions]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [windowDimensions.isSmallScreenWidth]); // eslint-disable-next-line react/jsx-props-no-spreading return NavigationContentWrapper === undefined ? Content : {Content}; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index b142ff40e6b7..e97eefc76a48 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -20,7 +20,7 @@ function createPlatformStackNavigatorComponent) { const styles = useThemeStyles(); @@ -95,7 +95,8 @@ function createPlatformStackNavigatorComponent { onIsSmallScreenWidthChange?.({...customCodePropsWithTransformedState, windowDimensions}); - }, [customCodePropsWithTransformedState, windowDimensions]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [windowDimensions.isSmallScreenWidth]); // eslint-disable-next-line react/jsx-props-no-spreading return NavigationContentWrapper === undefined ? Content : {Content}; diff --git a/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts index f54aefe5974b..7570a64c3b52 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts @@ -57,7 +57,7 @@ type TransformState< > = (props: TransformStateProps) => TransformStateResult; // Props that are passed to the "onWindowDimensionsChange" callback. -type OnWindowDimensionsChangeProps< +type OnIsSmallScreenWidthChangeProps< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, @@ -66,11 +66,11 @@ type OnWindowDimensionsChangeProps< }; // Defines a function type for handling changes in window dimensions within a navigation context. -type OnWindowDimensionsChange< +type OnIsSmallScreenWidthChange< NavigationOptions extends PlatformSpecificNavigationOptions, EventMap extends PlatformSpecificEventMap & EventMapBase, ParamList extends ParamListBase = ParamListBase, -> = (props: OnWindowDimensionsChangeProps) => void; +> = (props: OnIsSmallScreenWidthChangeProps) => void; // A React component that renders extra content within the navigator, like a header or footer. type ExtraContent = ( @@ -101,7 +101,7 @@ type CreatePlatformStackNavigatorComponentOptions< createRouter?: PlatformStackRouterFactory; defaultScreenOptions?: NavigationOptions; transformState?: TransformState; - onWindowDimensionsChange?: OnWindowDimensionsChange; + onIsSmallScreenWidthChange?: OnIsSmallScreenWidthChange; ExtraContent?: ExtraContent; NavigationContentWrapper?: NavigationContentWrapper; }; @@ -110,8 +110,8 @@ export type { TransformStateResult as TransformStateExtraResult, TransformStateProps, TransformState, - OnWindowDimensionsChangeProps, - OnWindowDimensionsChange, + OnIsSmallScreenWidthChangeProps, + OnIsSmallScreenWidthChange, CustomCodeProps, CustomCodePropsWithTransformedState, ExtraContent, From 549d0f1e4c63d03a32eacadba7ca1736af793ad1 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 23:01:23 +0200 Subject: [PATCH 084/589] fix: Podfile --- ios/Podfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8f0acc969352..cf5c4bab5c75 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2062,7 +2062,6 @@ DEPENDENCIES: - ExpoImageManipulator (from `../node_modules/expo-image-manipulator/ios`) - ExpoModulesCore (from `../node_modules/expo-modules-core`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - "fullstory_react-native (from `../node_modules/@fullstory/react-native`)" - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) @@ -2225,8 +2224,6 @@ EXTERNAL SOURCES: :path: "../node_modules/expo-modules-core" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" - fullstory_react-native: - :path: "../node_modules/@fullstory/react-native" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: From 5a35435129d1fa026f335e065b652a28cac89a63 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 23:12:54 +0200 Subject: [PATCH 085/589] fix: React not found --- .../BottomTabNavigationContentWrapper.tsx | 1 + .../createPlatformStackNavigatorComponent/index.native.tsx | 2 +- .../createPlatformStackNavigatorComponent/index.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx index 155f74d6a6ad..2f2f65a75ecf 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabNavigationContentWrapper.tsx @@ -1,4 +1,5 @@ import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import React from 'react'; import {View} from 'react-native'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index 1a0f90896760..dfd14e1fc01f 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -2,7 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import {NativeStackView} from '@react-navigation/native-stack'; import type {NativeStackNavigationEventMap, NativeStackNavigationOptions} from '@react-navigation/native-stack'; -import {useEffect, useMemo} from 'react'; +import React, {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withNativeNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions'; diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index e97eefc76a48..e8c945914d5c 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -2,7 +2,7 @@ import type {ParamListBase, StackActionHelpers} from '@react-navigation/native'; import {StackRouter, useNavigationBuilder} from '@react-navigation/native'; import type {StackNavigationEventMap, StackNavigationOptions} from '@react-navigation/stack'; import {StackView} from '@react-navigation/stack'; -import {useEffect, useMemo} from 'react'; +import React, {useEffect, useMemo} from 'react'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import withWebNavigationOptions from '@libs/Navigation/PlatformStackNavigation/platformOptions/withWebNavigationOptions'; From 22c0e1612b3c2e1ccb8cd39b0fa496d0ef6f1832 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 23:13:01 +0200 Subject: [PATCH 086/589] simplify web animations --- .../platformOptions/animation/web/slideFromBottom.ts | 2 +- .../platformOptions/animation/web/slideFromLeft.ts | 2 +- .../platformOptions/animation/web/slideFromRight.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts index 61279046a5c6..c43388c52a67 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromBottom.ts @@ -1,5 +1,5 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; -const slideFromBottom: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'vertical'}; +const slideFromBottom: StackNavigationOptions = {animationEnabled: true, gestureDirection: 'vertical'}; export default slideFromBottom; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts index 467456481221..d5598c93eb53 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromLeft.ts @@ -1,5 +1,5 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; -const slideFromLeft: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal-inverted'}; +const slideFromLeft: StackNavigationOptions = {animationEnabled: true, gestureDirection: 'horizontal-inverted'}; export default slideFromLeft; diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts index 31528d7fb7a4..b6b6c8c74e48 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/web/slideFromRight.ts @@ -1,5 +1,5 @@ import type {StackNavigationOptions} from '@react-navigation/stack'; -const slideFromRight: StackNavigationOptions = {animationEnabled: true, animationTypeForReplace: 'push', gestureDirection: 'horizontal'}; +const slideFromRight: StackNavigationOptions = {animationEnabled: true, gestureDirection: 'horizontal'}; export default slideFromRight; From d78c8edd55b739b833260313444d930a59d417ed Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 23:56:28 +0200 Subject: [PATCH 087/589] update patches --- package-lock.json | 10 +- package.json | 2 +- ....17+001+keyboardHandlingEnabled-prop.patch | 39 ---- ...dded-interaction-manager-integration.patch | 63 ------ ....26+001+keyboardHandlingEnabled-prop.patch | 157 ++++++++++++++ ...dded-interaction-manager-integration.patch | 191 ++++++++++++++++++ 6 files changed, 354 insertions(+), 108 deletions(-) delete mode 100644 patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch delete mode 100644 patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch create mode 100644 patches/@react-navigation+native-stack+6.9.26+001+keyboardHandlingEnabled-prop.patch create mode 100644 patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch diff --git a/package-lock.json b/package-lock.json index 2d10f5933d8a..c8c7f120de15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@react-native-picker/picker": "2.6.1", "@react-navigation/material-top-tabs": "^6.6.3", "@react-navigation/native": "6.1.12", - "@react-navigation/native-stack": "^6.9.17", + "@react-navigation/native-stack": "^6.9.26", "@react-navigation/stack": "6.3.29", "@react-ng/bounds-observer": "^0.2.1", "@rnmapbox/maps": "10.1.11", @@ -9245,11 +9245,11 @@ } }, "node_modules/@react-navigation/native-stack": { - "version": "6.9.17", - "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.17.tgz", - "integrity": "sha512-X8p8aS7JptQq7uZZNFEvfEcPf6tlK4PyVwYDdryRbG98B4bh2wFQYMThxvqa+FGEN7USEuHdv2mF0GhFKfX0ew==", + "version": "6.9.26", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.26.tgz", + "integrity": "sha512-++dueQ+FDj2XkZ902DVrK79ub1vp19nSdAZWxKRgd6+Bc0Niiesua6rMCqymYOVaYh+dagwkA9r00bpt/U5WLw==", "dependencies": { - "@react-navigation/elements": "^1.3.21", + "@react-navigation/elements": "^1.3.30", "warn-once": "^0.1.0" }, "peerDependencies": { diff --git a/package.json b/package.json index 7e04143fd615..9395ff7f0ab6 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@react-native-picker/picker": "2.6.1", "@react-navigation/material-top-tabs": "^6.6.3", "@react-navigation/native": "6.1.12", - "@react-navigation/native-stack": "^6.9.17", + "@react-navigation/native-stack": "^6.9.26", "@react-navigation/stack": "6.3.29", "@react-ng/bounds-observer": "^0.2.1", "@rnmapbox/maps": "10.1.11", diff --git a/patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch b/patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch deleted file mode 100644 index 933ca6ce792e..000000000000 --- a/patches/@react-navigation+native-stack+6.9.17+001+keyboardHandlingEnabled-prop.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/node_modules/@react-navigation/native-stack/src/types.tsx b/node_modules/@react-navigation/native-stack/src/types.tsx -index 206fb0b..7a34a8e 100644 ---- a/node_modules/@react-navigation/native-stack/src/types.tsx -+++ b/node_modules/@react-navigation/native-stack/src/types.tsx -@@ -490,6 +490,14 @@ export type NativeStackNavigationOptions = { - * Only supported on iOS and Android. - */ - freezeOnBlur?: boolean; -+ // partial changes from https://github.com/react-navigation/react-navigation/commit/90cfbf23bcc5259f3262691a9eec6c5b906e5262 -+ // patch can be removed when new version of `native-stack` will be released -+ /** -+ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`. -+ * -+ * Only supported on iOS -+ */ -+ keyboardHandlingEnabled?: boolean; - }; - - export type NativeStackNavigatorProps = DefaultNavigatorOptions< -diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -index a005c43..03d8b50 100644 ---- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -+++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -@@ -161,6 +161,7 @@ const SceneView = ({ - statusBarTranslucent, - statusBarColor, - freezeOnBlur, -+ keyboardHandlingEnabled, - } = options; - - let { -@@ -289,6 +290,7 @@ const SceneView = ({ - onNativeDismissCancelled={onNativeDismissCancelled} - // this prop is available since rn-screens 3.16 - freezeOnBlur={freezeOnBlur} -+ hideKeyboardOnSwipe={keyboardHandlingEnabled} - > - - diff --git a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch deleted file mode 100644 index da61ec6a25ba..000000000000 --- a/patches/@react-navigation+native-stack+6.9.17+002+added-interaction-manager-integration.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -index 03d8b50..acc0c34 100644 ---- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -+++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -@@ -17,7 +17,7 @@ import { - useTheme, - } from '@react-navigation/native'; - import * as React from 'react'; --import { Platform, StyleSheet, View } from 'react-native'; -+import { InteractionManager, Platform, StyleSheet, View } from 'react-native'; - import { - useSafeAreaFrame, - useSafeAreaInsets, -@@ -121,7 +121,7 @@ type SceneViewProps = { - previousDescriptor?: NativeStackDescriptor; - nextDescriptor?: NativeStackDescriptor; - onWillDisappear: () => void; -- onAppear: () => void; -+ onAppear: ScreenProps['onAppear']; - onDisappear: () => void; - onDismissed: ScreenProps['onDismissed']; - onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; -@@ -234,6 +234,31 @@ const SceneView = ({ - statusBarHeight - ); - -+ // https://github.com/react-navigation/react-navigation/pull/11887 -+ const interactionHandleRef = React.useRef(); -+ -+ // this memo acts as a synchronous `useEffect` -+ React.useMemo(() => { -+ if (focused && interactionHandleRef.current === undefined) { -+ interactionHandleRef.current = InteractionManager.createInteractionHandle(); -+ } -+ }, [focused]); -+ const finishInteraction = React.useCallback(() => { -+ if (interactionHandleRef.current !== undefined) { -+ InteractionManager.clearInteractionHandle(interactionHandleRef.current); -+ interactionHandleRef.current = undefined; -+ } -+ }, []); -+ // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired -+ // so we clean up an interaction here -+ React.useEffect(() => finishInteraction, [finishInteraction]) -+ -+ const onAppearCallback: ScreenProps["onAppear"] = React.useCallback((e) => { -+ onAppear?.(e); -+ -+ finishInteraction(); -+ }, [onAppear, finishInteraction]); -+ - const [customHeaderHeight, setCustomHeaderHeight] = - React.useState(defaultHeaderHeight); - -@@ -279,7 +304,7 @@ const SceneView = ({ - swipeDirection={gestureDirectionOverride} - transitionDuration={animationDuration} - onWillDisappear={onWillDisappear} -- onAppear={onAppear} -+ onAppear={onAppearCallback} - onDisappear={onDisappear} - onDismissed={onDismissed} - isNativeStack diff --git a/patches/@react-navigation+native-stack+6.9.26+001+keyboardHandlingEnabled-prop.patch b/patches/@react-navigation+native-stack+6.9.26+001+keyboardHandlingEnabled-prop.patch new file mode 100644 index 000000000000..40e93a0bfe79 --- /dev/null +++ b/patches/@react-navigation+native-stack+6.9.26+001+keyboardHandlingEnabled-prop.patch @@ -0,0 +1,157 @@ +diff --git a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js +index 2d5f921..997e384 100644 +--- a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js ++++ b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js +@@ -103,7 +103,8 @@ const SceneView = _ref2 => { + statusBarStyle, + statusBarTranslucent, + statusBarColor, +- freezeOnBlur ++ freezeOnBlur, ++ keyboardHandlingEnabled + } = options; + let { + animation, +@@ -205,7 +206,8 @@ const SceneView = _ref2 => { + onNativeDismissCancelled: onNativeDismissCancelled + // this prop is available since rn-screens 3.16 + , +- freezeOnBlur: freezeOnBlur ++ freezeOnBlur: freezeOnBlur, ++ hideKeyboardOnSwipe: keyboardHandlingEnabled + }, /*#__PURE__*/React.createElement(_native.NavigationContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(_native.NavigationRouteContext.Provider, { +diff --git a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map +index bacb290..1eb6dc4 100644 +--- a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map ++++ b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map +@@ -1 +1 @@ +-{"version":3,"names":["isAndroid","Platform","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","useTheme","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","React","useRef","useEffect","warnOnce","current","name","content","styles","container","backgroundColor","background","StyleSheet","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","useSafeAreaInsets","frame","useSafeAreaFrame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","HeaderShownContext","parentHeaderHeight","HeaderHeightContext","parentHeaderBack","HeaderBackContext","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","usePreventRemoveContext","defaultHeaderHeight","getDefaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","getHeaderTitle","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","useDismissedRouteError","useInvalidPreventRemoveError","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","StackActions","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";;;;;;AAAA;AAQA;AAUA;AACA;AACA;AAKA;AAKA;AAQA;AACA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAE1C,MAAMA,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAE3C,MAAMC,gBAAgB,GAAG,QAcnB;EAAA,IAdoB;IACxBC,OAAO;IACPC,KAAK;IACLC,YAAY;IACZC,YAAY;IACZC,qBAAqB;IACrBC;EAQF,CAAC;EACC,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAC7B,MAAM;IAAEC,MAAM;IAAEC,WAAW,GAAG,IAAI;IAAEC;EAAa,CAAC,GAAGV,OAAO;EAE5D,MAAMW,eAAe,GAAGf,SAAS,GAC7B,KAAK,GACLM,YAAY,KAAK,MAAM,IAAIO,WAAW,KAAK,IAAI,IAAID,MAAM,KAAKI,SAAS;EAE3E,MAAMC,sBAAsB,GAAGC,KAAK,CAACC,MAAM,CAACN,WAAW,CAAC;EAExDK,KAAK,CAACE,SAAS,C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EAAE,MAAM;QAC/BzD,UAAU,CAACoF,QAAQ,CAAC;UAClB,GAAGC,oBAAY,CAACC,GAAG,EAAE;UACrBE,MAAM,EAAE9H,KAAK,CAAC+F,GAAG;UACjByB,MAAM,EAAEd,KAAK,CAACX;QAChB,CAAC,CAAC;MACJ,CAAE;MACF,wBAAwB,EAAG0B,KAAK,IAAK;QACnCnF,UAAU,CAACoF,QAAQ,CAAC;UAClB,GAAGC,oBAAY,CAACC,GAAG,CAACH,KAAK,CAACrB,WAAW,CAACyB,YAAY,CAAC;UACnDC,MAAM,EAAE9H,KAAK,CAAC+F,GAAG;UACjByB,MAAM,EAAEd,KAAK,CAACX;QAChB,CAAC,CAAC;MACJ;IAAE,EACF;EAEN,CAAC,CAAC,CACU;AAElB;AAEe,SAASgC,eAAe,CAACC,KAAY,EAAE;EACpD,oBACE,oBAAC,gCAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAM5G,MAAM,GAAGI,uBAAU,CAACyG,MAAM,CAAC;EAC/B5G,SAAS,EAAE;IACT6G,IAAI,EAAE;EACR,CAAC;EACDhC,KAAK,EAAE;IACLgC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD7B,QAAQ,EAAE;IACR8B,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDrC,WAAW,EAAE;IACXmC,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDjH,UAAU,EAAE;IACVkH,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file ++{"version":3,"names":["isAndroid","Platform","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","useTheme","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","React","useRef","useEffect","warnOnce","current","name","content","styles","container","backgroundColor","background","StyleSheet","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","useSafeAreaInsets","frame","useSafeAreaFrame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","HeaderShownContext","parentHeaderHeight","HeaderHeightContext","parentHeaderBack","HeaderBackContext","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","usePreventRemoveContext","defaultHeaderHeight","getDefaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","getHeaderTitle","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","useDismissedRouteError","useInvalidPreventRemoveError","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","StackActions","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";;;;;;AAAA;AAQA;AAUA;AACA;AACA;AAKA;AAKA;AAQA;AACA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAE1C,MAAMA,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAE3C,MAAMC,gBAAgB,GAAG,QAcnB;EAAA,IAdoB;IACxBC,OAAO;I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B,QAAQ,EAAE;IACR8B,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDrC,WAAW,EAAE;IACXmC,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDlH,UAAU,EAAE;IACVmH,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js +index 06439fe..cbdd502 100644 +--- a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js ++++ b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js +@@ -94,7 +94,8 @@ const SceneView = _ref2 => { + statusBarStyle, + statusBarTranslucent, + statusBarColor, +- freezeOnBlur ++ freezeOnBlur, ++ keyboardHandlingEnabled + } = options; + let { + animation, +@@ -196,7 +197,8 @@ const SceneView = _ref2 => { + onNativeDismissCancelled: onNativeDismissCancelled + // this prop is available since rn-screens 3.16 + , +- freezeOnBlur: freezeOnBlur ++ freezeOnBlur: freezeOnBlur, ++ hideKeyboardOnSwipe: keyboardHandlingEnabled + }, /*#__PURE__*/React.createElement(NavigationContext.Provider, { + value: navigation + }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, { +diff --git a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map +index c0ec5e4..2b113bb 100644 +--- a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map ++++ b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map +@@ -1 +1 @@ +-{"version":3,"names":["getDefaultHeaderHeight","getHeaderTitle","HeaderBackContext","HeaderHeightContext","HeaderShownContext","SafeAreaProviderCompat","NavigationContext","NavigationRouteContext","StackActions","usePreventRemoveContext","useTheme","React","Platform","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Screen","ScreenStack","warnOnce","useDismissedRouteError","useInvalidPreventRemoveError","DebugContainer","HeaderConfig","isAndroid","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","useRef","useEffect","current","name","content","styles","container","backgroundColor","background","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","frame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","parentHeaderHeight","parentHeaderBack","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","defaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EACtBC,cAAc,EACdC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,sBAAsB,QACjB,4BAA4B;AAC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YAAY,CAACiI,GAAG,CAACF,KAAK,CAACnB,WAAW,CAACsB,YAAY,CAAC;UACnDC,MAAM,EAAE/G,KAAK,CAACmF,GAAG;UACjBuB,MAAM,EAAEZ,KAAK,CAACX;QAChB,CAAC,CAAC;MACJ;IAAE,EACF;EAEN,CAAC,CAAC,CACU;AAElB;AAEA,eAAe,SAAS6B,eAAe,CAACC,KAAY,EAAE;EACpD,oBACE,oBAAC,sBAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMhG,MAAM,GAAGhC,UAAU,CAACiI,MAAM,CAAC;EAC/BhG,SAAS,EAAE;IACTiG,IAAI,EAAE;EACR,CAAC;EACD7B,KAAK,EAAE;IACL6B,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD1B,QAAQ,EAAE;IACR2B,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDlC,WAAW,EAAE;IACXgC,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDrG,UAAU,EAAE;IACVsG,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file ++{"version":3,"names":["getDefaultHeaderHeight","getHeaderTitle","HeaderBackContext","HeaderHeightContext","HeaderShownContext","SafeAreaProviderCompat","NavigationContext","NavigationRouteContext","StackActions","usePreventRemoveContext","useTheme","React","Platform","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Screen","ScreenStack","warnOnce","useDismissedRouteError","useInvalidPreventRemoveError","DebugContainer","HeaderConfig","isAndroid","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","useRef","useEffect","current","name","content","styles","container","backgroundColor","background","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","frame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","parentHeaderHeight","parentHeaderBack","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","defaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EACtBC,cAAc,EACdC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,sBAAsB,QACjB,4BAA4B;AACnC,SACEC,iBAAiB,EACjBC,sBAAsB,EAGtBC,YAAY,EAEZC,uBAAuB,EACvBC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAEvC,SACEC,MAAM,EACNC,WAAW,QAEN,sBAAsB;AAC7B,OAAOC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AC,sBAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMjG,MAAM,GAAGhC,UAAU,CAACkI,MAAM,CAAC;EAC/BjG,SAAS,EAAE;IACTkG,IAAI,EAAE;EACR,CAAC;EACD7B,KAAK,EAAE;IACL6B,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD1B,QAAQ,EAAE;IACR2B,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDlC,WAAW,EAAE;IACXgC,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDtG,UAAU,EAAE;IACVuG,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts b/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts +new file mode 100644 +index 0000000..121d59b +--- /dev/null ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts +@@ -0,0 +1,2 @@ ++export {}; ++//# sourceMappingURL=index.test.d.ts.map +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts.map b/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts.map +new file mode 100644 +index 0000000..7b9421a +--- /dev/null ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/__tests__/index.test.d.ts.map +@@ -0,0 +1 @@ ++{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/index.test.tsx"],"names":[],"mappings":""} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts +index 3d74b14..d886b7b 100644 +--- a/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts +@@ -446,6 +446,12 @@ export type NativeStackNavigationOptions = { + * Only supported on iOS and Android. + */ + freezeOnBlur?: boolean; ++ /** ++ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`. ++ * ++ * Only supported on iOS ++ */ ++ keyboardHandlingEnabled?: boolean; + }; + export type NativeStackNavigatorProps = DefaultNavigatorOptions, NativeStackNavigationOptions, NativeStackNavigationEventMap> & StackRouterOptions & NativeStackNavigationConfig; + export type NativeStackDescriptor = Descriptor, RouteProp>; +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts.map b/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts.map +index 39c4fd5..91f0d7a 100644 +--- a/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts.map ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/types.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,WAAW,EACX,4BAA4B,EAC5B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,eAAe,EAAE;QAAE,IAAI,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAA;KAA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,EACb,oBAAoB,CAAC,aAAa,CAAC,EACnC,4BAA4B,EAC5B,6BAA6B,CAC9B,GACC,kBAAkB,GAClB,2BAA2B,CAAC;AAE9B,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAC5C,4BAA4B,EAC5B,yBAAyB,CAAC,aAAa,CAAC,EACxC,SAAS,CAAC,aAAa,CAAC,CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAC;CACtC,CAAC"} +\ No newline at end of file ++{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,WAAW,EACX,4BAA4B,EAC5B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,eAAe,EAAE;QAAE,IAAI,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC;IAChD;;OAEG;IACH,aAAa,EAAE;QAAE,IAAI,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,yBAAyB,CACnC,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAChD,cAAc,CAChB,SAAS,EACT,SAAS,EACT,WAAW,EACX,oBAAoB,CAAC,SAAS,CAAC,EAC/B,4BAA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,qBAAqB,CAAC;CACtC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map b/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map +index faf125c..3cdaf10 100644 +--- a/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EAGb,oBAAoB,EAGrB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AA+VlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AA8EF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,KAAK,eAMnD"} +\ No newline at end of file ++{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EAGb,oBAAoB,EAGrB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAiWlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AA8EF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,KAAK,eAMnD"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/src/types.tsx b/node_modules/@react-navigation/native-stack/src/types.tsx +index 206fb0b..7a34a8e 100644 +--- a/node_modules/@react-navigation/native-stack/src/types.tsx ++++ b/node_modules/@react-navigation/native-stack/src/types.tsx +@@ -490,6 +490,14 @@ export type NativeStackNavigationOptions = { + * Only supported on iOS and Android. + */ + freezeOnBlur?: boolean; ++ // partial changes from https://github.com/react-navigation/react-navigation/commit/90cfbf23bcc5259f3262691a9eec6c5b906e5262 ++ // patch can be removed when new version of `native-stack` will be released ++ /** ++ * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`. ++ * ++ * Only supported on iOS ++ */ ++ keyboardHandlingEnabled?: boolean; + }; + + export type NativeStackNavigatorProps = DefaultNavigatorOptions< +diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +index a005c43..03d8b50 100644 +--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx ++++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +@@ -161,6 +161,7 @@ const SceneView = ({ + statusBarTranslucent, + statusBarColor, + freezeOnBlur, ++ keyboardHandlingEnabled, + } = options; + + let { +@@ -289,6 +290,7 @@ const SceneView = ({ + onNativeDismissCancelled={onNativeDismissCancelled} + // this prop is available since rn-screens 3.16 + freezeOnBlur={freezeOnBlur} ++ hideKeyboardOnSwipe={keyboardHandlingEnabled} + > + + diff --git a/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch new file mode 100644 index 000000000000..73385f344fd2 --- /dev/null +++ b/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch @@ -0,0 +1,191 @@ +diff --git a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js +index 997e384..94b1b71 100644 +--- a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js ++++ b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js +@@ -160,6 +160,29 @@ const SceneView = _ref2 => { + preventedRoutes + } = (0, _native.usePreventRemoveContext)(); + const defaultHeaderHeight = (0, _elements.getDefaultHeaderHeight)(frame, isModal, statusBarHeight); ++ ++ // https://github.com/react-navigation/react-navigation/pull/11887 ++ const interactionHandleRef = React.useRef(); ++ ++ // this memo acts as a synchronous `useEffect` ++ React.useMemo(() => { ++ if (focused && interactionHandleRef.current === undefined) { ++ interactionHandleRef.current = _reactNative.InteractionManager.createInteractionHandle(); ++ } ++ }, [focused]); ++ const finishInteraction = React.useCallback(() => { ++ if (interactionHandleRef.current !== undefined) { ++ _reactNative.InteractionManager.clearInteractionHandle(interactionHandleRef.current); ++ interactionHandleRef.current = undefined; ++ } ++ }, []); ++ // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired ++ // so we clean up an interaction here ++ React.useEffect(() => finishInteraction, [finishInteraction]); ++ const onAppearCallback = React.useCallback(e => { ++ onAppear === null || onAppear === void 0 ? void 0 : onAppear(e); ++ finishInteraction(); ++ }, [onAppear, finishInteraction]); + const [customHeaderHeight, setCustomHeaderHeight] = React.useState(defaultHeaderHeight); + const headerTopInsetEnabled = topInset !== 0; + const headerHeight = header ? customHeaderHeight : defaultHeaderHeight; +@@ -192,7 +215,7 @@ const SceneView = _ref2 => { + swipeDirection: gestureDirectionOverride, + transitionDuration: animationDuration, + onWillDisappear: onWillDisappear, +- onAppear: onAppear, ++ onAppear: onAppearCallback, + onDisappear: onDisappear, + onDismissed: onDismissed, + isNativeStack: true, +diff --git a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map +index 1eb6dc4..e8f2da4 100644 +--- a/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map ++++ b/node_modules/@react-navigation/native-stack/lib/commonjs/views/NativeStackView.native.js.map +@@ -1 +1 @@ +-{"version":3,"names":["isAndroid","Platform","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","useTheme","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","React","useRef","useEffect","warnOnce","current","name","content","styles","container","backgroundColor","background","StyleSheet","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","useSafeAreaInsets","frame","useSafeAreaFrame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","HeaderShownContext","parentHeaderHeight","HeaderHeightContext","parentHeaderBack","HeaderBackContext","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","usePreventRemoveContext","defaultHeaderHeight","getDefaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","getHeaderTitle","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","useDismissedRouteError","useInvalidPreventRemoveError","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","StackActions","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";;;;;;AAAA;AAQA;AAUA;AACA;AACA;AAKA;AAKA;AAQA;AACA;AACA;AAC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CAAC0G,MAAM,CAAC;EAC/B7G,SAAS,EAAE;IACT8G,IAAI,EAAE;EACR,CAAC;EACDhC,KAAK,EAAE;IACLgC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD7B,QAAQ,EAAE;IACR8B,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDrC,WAAW,EAAE;IACXmC,QAAQ,EAAE,UAAU;IACpBnD,GAAG,EAAE,CAAC;IACNoD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDlH,UAAU,EAAE;IACVmH,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file ++{"version":3,"names":["isAndroid","Platform","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","useTheme","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","React","useRef","useEffect","warnOnce","current","name","content","styles","container","backgroundColor","background","StyleSheet","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","useSafeAreaInsets","frame","useSafeAreaFrame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","HeaderShownContext","parentHeaderHeight","HeaderHeightContext","parentHeaderBack","HeaderBackContext","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","usePreventRemoveContext","defaultHeaderHeight","getDefaultHeaderHeight","interactionHandleRef","useMemo","InteractionManager","createInteractionHandle","finishInteraction","useCallback","clearInteractionHandle","onAppearCallback","e","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","getHeaderTitle","isRemovePrevented","key","preventRemove","translucent","scene","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","useDismissedRouteError","useInvalidPreventRemoveError","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","StackActions","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";;;;;;AAAA;AAQA;AAUA;AACA;AACA;AAKA;AAKA;AAQA;AACA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAE1C,MAAMA,SAAS,GAAGC,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAE3C,MAAMC,gBAAgB,GAAG,QAcnB;EAAA,IAdoB;IACxBC,OAAO;IACPC,KAAK;IACLC,YAAY;IACZC,YAAY;IACZC,qBAAqB;IACrBC;EAQF,CAAC;EACC,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gBAAQ,GAAE;EAC7B,MAAM;IAAEC,MAAM;IAAEC,WAAW,GAAG,IAAI;IAAEC;EAAa,CAAC,GAAGV,OAAO;EAE5D,MAAMW,eAAe,GAAGf,SAAS,GAC7B,KAAK,GACLM,YAAY,KAAK,MAAM,IAAIO,WAAW,KAAK,IAAI,IAAID,MAAM,KAAKI,SAAS;EAE3E,MAAMC,sBAAsB,GAAGC,KAAK,CAACC,MAAM,CAACN,WAAW,CAAC;EAExDK,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAAC,iBAAQ,EACN,CAACrB,SAAS,IACRM,YAAY,KAAK,MAAM,IACvBW,sBAAsB,CAACK,OAAO,KAAKT,WAAW,EAC/C,6IAA4IR,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AElB;AAEe,SAAS+B,eAAe,CAACC,KAAY,EAAE;EACpD,oBACE,oBAAC,gCAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMrH,MAAM,GAAGI,uBAAU,CAACkH,MAAM,CAAC;EAC/BrH,SAAS,EAAE;IACTsH,IAAI,EAAE;EACR,CAAC;EACD/B,KAAK,EAAE;IACL+B,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD7B,QAAQ,EAAE;IACR8B,QAAQ,EAAE,UAAU;IACpB3D,GAAG,EAAE,CAAC;IACN4D,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDpC,WAAW,EAAE;IACXkC,QAAQ,EAAE,UAAU;IACpB3D,GAAG,EAAE,CAAC;IACN4D,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACD1H,UAAU,EAAE;IACV2H,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js +index cbdd502..17f337b 100644 +--- a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js ++++ b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js +@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function + import { getDefaultHeaderHeight, getHeaderTitle, HeaderBackContext, HeaderHeightContext, HeaderShownContext, SafeAreaProviderCompat } from '@react-navigation/elements'; + import { NavigationContext, NavigationRouteContext, StackActions, usePreventRemoveContext, useTheme } from '@react-navigation/native'; + import * as React from 'react'; +-import { Platform, StyleSheet, View } from 'react-native'; ++import { InteractionManager, Platform, StyleSheet, View } from 'react-native'; + import { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context'; + import { Screen, ScreenStack } from 'react-native-screens'; + import warnOnce from 'warn-once'; +@@ -151,6 +151,29 @@ const SceneView = _ref2 => { + preventedRoutes + } = usePreventRemoveContext(); + const defaultHeaderHeight = getDefaultHeaderHeight(frame, isModal, statusBarHeight); ++ ++ // https://github.com/react-navigation/react-navigation/pull/11887 ++ const interactionHandleRef = React.useRef(); ++ ++ // this memo acts as a synchronous `useEffect` ++ React.useMemo(() => { ++ if (focused && interactionHandleRef.current === undefined) { ++ interactionHandleRef.current = InteractionManager.createInteractionHandle(); ++ } ++ }, [focused]); ++ const finishInteraction = React.useCallback(() => { ++ if (interactionHandleRef.current !== undefined) { ++ InteractionManager.clearInteractionHandle(interactionHandleRef.current); ++ interactionHandleRef.current = undefined; ++ } ++ }, []); ++ // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired ++ // so we clean up an interaction here ++ React.useEffect(() => finishInteraction, [finishInteraction]); ++ const onAppearCallback = React.useCallback(e => { ++ onAppear === null || onAppear === void 0 ? void 0 : onAppear(e); ++ finishInteraction(); ++ }, [onAppear, finishInteraction]); + const [customHeaderHeight, setCustomHeaderHeight] = React.useState(defaultHeaderHeight); + const headerTopInsetEnabled = topInset !== 0; + const headerHeight = header ? customHeaderHeight : defaultHeaderHeight; +@@ -183,7 +206,7 @@ const SceneView = _ref2 => { + swipeDirection: gestureDirectionOverride, + transitionDuration: animationDuration, + onWillDisappear: onWillDisappear, +- onAppear: onAppear, ++ onAppear: onAppearCallback, + onDisappear: onDisappear, + onDismissed: onDismissed, + isNativeStack: true, +diff --git a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map +index 2b113bb..6bccdf6 100644 +--- a/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map ++++ b/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.native.js.map +@@ -1 +1 @@ +-{"version":3,"names":["getDefaultHeaderHeight","getHeaderTitle","HeaderBackContext","HeaderHeightContext","HeaderShownContext","SafeAreaProviderCompat","NavigationContext","NavigationRouteContext","StackActions","usePreventRemoveContext","useTheme","React","Platform","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Screen","ScreenStack","warnOnce","useDismissedRouteError","useInvalidPreventRemoveError","DebugContainer","HeaderConfig","isAndroid","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","useRef","useEffect","current","name","content","styles","container","backgroundColor","background","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","frame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","parentHeaderHeight","parentHeaderBack","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","defaultHeaderHeight","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","isRemovePrevented","key","preventRemove","translucent","scene","e","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EACtBC,cAAc,EACdC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,sBAAsB,QACjB,4BA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UAAU,CAAC2E,QAAQ,CAAC;UAClB,GAAGjI,YAAY,CAACkI,GAAG,CAACF,KAAK,CAACnB,WAAW,CAACsB,YAAY,CAAC;UACnDC,MAAM,EAAEhH,KAAK,CAACoF,GAAG;UACjBuB,MAAM,EAAEZ,KAAK,CAACX;QAChB,CAAC,CAAC;MACJ;IAAE,EACF;EAEN,CAAC,CAAC,CACU;AAElB;AAEA,eAAe,SAAS6B,eAAe,CAACC,KAAY,EAAE;EACpD,oBACE,oBAAC,sBAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMjG,MAAM,GAAGhC,UAAU,CAACkI,MAAM,CAAC;EAC/BjG,SAAS,EAAE;IACTkG,IAAI,EAAE;EACR,CAAC;EACD7B,KAAK,EAAE;IACL6B,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD1B,QAAQ,EAAE;IACR2B,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDlC,WAAW,EAAE;IACXgC,QAAQ,EAAE,UAAU;IACpB7C,GAAG,EAAE,CAAC;IACN8C,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACDtG,UAAU,EAAE;IACVuG,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file ++{"version":3,"names":["getDefaultHeaderHeight","getHeaderTitle","HeaderBackContext","HeaderHeightContext","HeaderShownContext","SafeAreaProviderCompat","NavigationContext","NavigationRouteContext","StackActions","usePreventRemoveContext","useTheme","React","InteractionManager","Platform","StyleSheet","View","useSafeAreaFrame","useSafeAreaInsets","Screen","ScreenStack","warnOnce","useDismissedRouteError","useInvalidPreventRemoveError","DebugContainer","HeaderConfig","isAndroid","OS","MaybeNestedStack","options","route","presentation","headerHeight","headerTopInsetEnabled","children","colors","header","headerShown","contentStyle","isHeaderInModal","undefined","headerShownPreviousRef","useRef","useEffect","current","name","content","styles","container","backgroundColor","background","absoluteFill","SceneView","index","focused","descriptor","previousDescriptor","nextDescriptor","onWillDisappear","onAppear","onDisappear","onDismissed","onHeaderBackButtonClicked","onNativeDismissCancelled","navigation","render","animationDuration","animationTypeForReplace","gestureEnabled","headerBackButtonMenuEnabled","headerBackground","headerTransparent","autoHideHomeIndicator","navigationBarColor","navigationBarHidden","orientation","statusBarAnimation","statusBarHidden","statusBarStyle","statusBarTranslucent","statusBarColor","freezeOnBlur","keyboardHandlingEnabled","animation","customAnimationOnGesture","fullScreenGestureEnabled","gestureDirection","nextGestureDirection","gestureDirectionOverride","insets","frame","isModal","isIPhone","isPad","isTV","isLandscape","width","height","isParentHeaderShown","useContext","parentHeaderHeight","parentHeaderBack","topInset","top","hasDynamicIsland","statusBarHeight","preventedRoutes","defaultHeaderHeight","interactionHandleRef","useMemo","createInteractionHandle","finishInteraction","useCallback","clearInteractionHandle","onAppearCallback","e","customHeaderHeight","setCustomHeaderHeight","useState","headerBack","title","isRemovePrevented","key","preventRemove","translucent","scene","nativeEvent","layout","absolute","back","headerBackTitle","NativeStackViewInner","state","descriptors","setNextDismissedKey","routes","map","isFocused","previousKey","nextKey","emit","type","data","closing","target","event","dispatch","pop","dismissCount","source","NativeStackView","props","create","flex","flexDirection","position","left","right","zIndex","elevation","overflow"],"sourceRoot":"../../../src","sources":["views/NativeStackView.native.tsx"],"mappings":";AAAA,SACEA,sBAAsB,EACtBC,cAAc,EACdC,iBAAiB,EACjBC,mBAAmB,EACnBC,kBAAkB,EAClBC,sBAAsB,QACjB,4BAA4B;AACnC,SACEC,iBAAiB,EACjBC,sBAAsB,EAGtBC,YAAY,EAEZC,uBAAuB,EACvBC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,QAAQ,EAAEC,UAAU,EAAEC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I,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACD1B,QAAQ,EAAE;IACR2B,QAAQ,EAAE,UAAU;IACpBpD,GAAG,EAAE,CAAC;IACNqD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDjC,WAAW,EAAE;IACX+B,QAAQ,EAAE,UAAU;IACpBpD,GAAG,EAAE,CAAC;IACNqD,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb,CAAC;EACD7G,UAAU,EAAE;IACV8G,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map b/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map +index 3cdaf10..245bf7e 100644 +--- a/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map ++++ b/node_modules/@react-navigation/native-stack/lib/typescript/src/views/NativeStackView.native.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EAGb,oBAAoB,EAGrB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAiWlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AA8EF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,KAAK,eAMnD"} +\ No newline at end of file ++{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EAGb,oBAAoB,EAGrB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAgYlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AA8EF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,KAAK,eAMnD"} +\ No newline at end of file +diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +index 03d8b50..eac1025 100644 +--- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx ++++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +@@ -17,7 +17,7 @@ import { + useTheme, + } from '@react-navigation/native'; + import * as React from 'react'; +-import { Platform, StyleSheet, View } from 'react-native'; ++import { InteractionManager, Platform, StyleSheet, View } from 'react-native'; + import { + useSafeAreaFrame, + useSafeAreaInsets, +@@ -121,7 +121,7 @@ type SceneViewProps = { + previousDescriptor?: NativeStackDescriptor; + nextDescriptor?: NativeStackDescriptor; + onWillDisappear: () => void; +- onAppear: () => void; ++ onAppear: ScreenProps['onAppear']; + onDisappear: () => void; + onDismissed: ScreenProps['onDismissed']; + onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; +@@ -234,6 +234,37 @@ const SceneView = ({ + statusBarHeight + ); + ++ // https://github.com/react-navigation/react-navigation/pull/11887 ++ const interactionHandleRef = React.useRef(); ++ ++ // this memo acts as a synchronous `useEffect` ++ React.useMemo(() => { ++ if (focused && interactionHandleRef.current === undefined) { ++ interactionHandleRef.current = ++ InteractionManager.createInteractionHandle(); ++ } ++ }, [focused]); ++ const finishInteraction = React.useCallback(() => { ++ if (interactionHandleRef.current !== undefined) { ++ InteractionManager.clearInteractionHandle(interactionHandleRef.current); ++ interactionHandleRef.current = undefined; ++ } ++ }, []); ++ // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired ++ // so we clean up an interaction here ++ React.useEffect(() => finishInteraction, [finishInteraction]); ++ ++ const onAppearCallback = React.useCallback< ++ NonNullable ++ >( ++ (e) => { ++ onAppear?.(e); ++ ++ finishInteraction(); ++ }, ++ [onAppear, finishInteraction] ++ ); ++ + const [customHeaderHeight, setCustomHeaderHeight] = + React.useState(defaultHeaderHeight); + +@@ -279,7 +310,7 @@ const SceneView = ({ + swipeDirection={gestureDirectionOverride} + transitionDuration={animationDuration} + onWillDisappear={onWillDisappear} +- onAppear={onAppear} ++ onAppear={onAppearCallback} + onDisappear={onDisappear} + onDismissed={onDismissed} + isNativeStack From 8ba4ccc24bc0f7f98a3e9ed7a4adba3a361cbaf2 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 25 Apr 2024 23:57:00 +0200 Subject: [PATCH 088/589] add keyboardHandlingEnabled option to native stack --- .../platformOptions/withNativeNavigationOptions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts index cd524a8f6956..2e9636945f43 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/withNativeNavigationOptions.ts @@ -11,6 +11,7 @@ import withAnimation from './animation/withAnimation'; import getCommonNavigationOptions from './utils'; const transformPlatformOptionsToNative = (screenOptions: PlatformStackNavigationOptions | undefined): NativeStackNavigationOptions => ({ + keyboardHandlingEnabled: screenOptions?.keyboardHandlingEnabled, ...withAnimation(screenOptions, slideFromLeftAnimation, slideFromRightAnimation, slideFromBottomAnimation, noAnimation), ...getCommonNavigationOptions(screenOptions), ...screenOptions?.nativeOnly, From 316d44fbafcfd1b1dbc78410cfde3a6f7a6dbeac Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 26 Apr 2024 00:05:45 +0200 Subject: [PATCH 089/589] use defaultScreenOptions --- .../createPlatformStackNavigatorComponent/index.native.tsx | 5 +++-- .../createPlatformStackNavigatorComponent/index.tsx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx index dfd14e1fc01f..7881e54c5d4b 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.native.tsx @@ -18,6 +18,7 @@ function createPlatformStackNavigatorComponent(screenOptionsToTransform: PlatformStackScreenOptions) => - withNativeNavigationOptions(screenOptionsToTransform); + withNativeNavigationOptions(screenOptionsToTransform, defaultScreenOptions); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, diff --git a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx index e8c945914d5c..5b1e524736cd 100644 --- a/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx +++ b/src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx @@ -18,6 +18,7 @@ function createPlatformStackNavigatorComponent(screenOptionsToTransform: PlatformStackScreenOptions) => - withWebNavigationOptions(screenOptionsToTransform); + withWebNavigationOptions(screenOptionsToTransform, defaultScreenOptions); const {navigation, state, descriptors, NavigationContent} = useNavigationBuilder< PlatformStackNavigationState, From 8a4524c6a58a4ac29699a4509c7ccad2002705d6 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 26 Apr 2024 00:06:19 +0200 Subject: [PATCH 090/589] update defaultScreenOptions type --- .../types/NavigatorComponent.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts index 7570a64c3b52..b4bda2a8a815 100644 --- a/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts +++ b/src/libs/Navigation/PlatformStackNavigation/types/NavigatorComponent.ts @@ -1,7 +1,14 @@ import type {EventMapBase, ParamListBase, StackActionHelpers} from '@react-navigation/native'; import type WindowDimensions from '@hooks/useWindowDimensions/types'; import type {ThemeStyles} from '@styles/index'; -import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions, PlatformStackNavigationState, PlatformStackRouterFactory, PlatformStackRouterOptions} from '.'; +import type { + PlatformSpecificEventMap, + PlatformSpecificNavigationOptions, + PlatformStackNavigationOptions, + PlatformStackNavigationState, + PlatformStackRouterFactory, + PlatformStackRouterOptions, +} from '.'; import type {PlatformNavigationBuilderDescriptors, PlatformNavigationBuilderNavigation} from './NavigationBuilder'; // Props that custom code receives when passed to the createPlatformStackNavigatorComponent generator function. @@ -99,7 +106,7 @@ type CreatePlatformStackNavigatorComponentOptions< ParamList extends ParamListBase = ParamListBase, > = { createRouter?: PlatformStackRouterFactory; - defaultScreenOptions?: NavigationOptions; + defaultScreenOptions?: PlatformStackNavigationOptions; transformState?: TransformState; onIsSmallScreenWidthChange?: OnIsSmallScreenWidthChange; ExtraContent?: ExtraContent; From 09a39b96c3fcb7056a241e34f9bcf4c70ffd7e03 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 26 Apr 2024 00:34:55 +0200 Subject: [PATCH 091/589] fix: bottom tab navigator transformState on native --- .../createCustomBottomTabNavigator/index.tsx | 29 ++----------------- .../transformState/index.native.ts | 3 ++ .../transformState/index.ts | 22 ++++++++++++++ 3 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.native.ts create mode 100644 src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.ts diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx index 987fbfc607f6..9a2a82c3322a 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/index.tsx @@ -1,34 +1,11 @@ -import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import type {ParamListBase} from '@react-navigation/native'; import {createNavigatorFactory} from '@react-navigation/native'; import React from 'react'; import createPlatformStackNavigatorComponent from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent'; -import type { - PlatformSpecificEventMap, - PlatformSpecificNavigationOptions, - PlatformStackNavigationEventMap, - PlatformStackNavigationOptions, - PlatformStackNavigationState, -} from '@libs/Navigation/PlatformStackNavigation/types'; -import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; -import type {NavigationStateRoute} from '@libs/Navigation/types'; -import SCREENS from '@src/SCREENS'; +import type {PlatformStackNavigationEventMap, PlatformStackNavigationOptions, PlatformStackNavigationState} from '@libs/Navigation/PlatformStackNavigation/types'; import BottomTabBar from './BottomTabBar'; import BottomTabNavigationContentWrapper from './BottomTabNavigationContentWrapper'; - -function transformState({state}: TransformStateProps) { - const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; - - // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. - // Currently this value will be switched only after the first HOME screen is rendered. - if (routesToRender[0].name !== SCREENS.HOME) { - const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); - if (routeToRender) { - routesToRender.unshift(routeToRender); - } - } - - return {stateToRender: {...state, routes: routesToRender, index: routesToRender.length - 1}}; -} +import transformState from './transformState'; const defaultScreenOptions: PlatformStackNavigationOptions = { animation: 'none', diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.native.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.native.ts new file mode 100644 index 000000000000..eee19da60af2 --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.native.ts @@ -0,0 +1,3 @@ +const transformState = undefined; + +export default transformState; diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.ts b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.ts new file mode 100644 index 000000000000..d1517a6793de --- /dev/null +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/transformState/index.ts @@ -0,0 +1,22 @@ +import type {EventMapBase, ParamListBase} from '@react-navigation/native'; +import type {PlatformSpecificEventMap, PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; +import type {TransformStateProps} from '@libs/Navigation/PlatformStackNavigation/types/NavigatorComponent'; +import type {NavigationStateRoute} from '@libs/Navigation/types'; +import SCREENS from '@src/SCREENS'; + +function transformState({state}: TransformStateProps) { + const routesToRender = [state.routes.at(-1)] as NavigationStateRoute[]; + + // We need to render at least one HOME screen to make sure everything load properly. This may be not necessary after changing how IS_SIDEBAR_LOADED is handled. + // Currently this value will be switched only after the first HOME screen is rendered. + if (routesToRender[0].name !== SCREENS.HOME) { + const routeToRender = state.routes.find((route) => route.name === SCREENS.HOME); + if (routeToRender) { + routesToRender.unshift(routeToRender); + } + } + + return {stateToRender: {...state, routes: routesToRender, index: routesToRender.length - 1}}; +} + +export default transformState; From 7c04f3f16aab8302ba5b8f4cc93736b4c7311530 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Fri, 26 Apr 2024 10:05:12 +0200 Subject: [PATCH 092/589] change iOS animation --- .../platformOptions/animation/native/slideFromRight/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts index a2758682b87e..4f482b5024aa 100644 --- a/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts +++ b/src/libs/Navigation/PlatformStackNavigation/platformOptions/animation/native/slideFromRight/index.ts @@ -2,6 +2,6 @@ import type {NativeStackNavigationOptions} from '@react-navigation/native-stack' // default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 // so we are using `simple_push` which is similar to default and not causing keyboard transition issues -const transition: NativeStackNavigationOptions = {animation: 'slide_from_right'}; +const transition: NativeStackNavigationOptions = {animation: 'simple_push'}; export default transition; From d03d1941f53ddf528437d010354fb40d0b69318f Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 26 Apr 2024 15:52:07 +0700 Subject: [PATCH 093/589] test commit --- src/libs/ReportUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index fc677dedc96e..830536c5993f 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5774,6 +5774,7 @@ function shouldDisableThread(reportAction: OnyxEntry, reportID: st (isWhisperAction && !isReportPreviewAction && !isIOUAction) || isThreadFirstChat(reportAction, reportID) ); + } function getAllAncestorReportActions(report: Report | null | undefined): Ancestor[] { From bd961fa44b177c00acc2b9cacecd3c58586e1c61 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 29 Apr 2024 16:41:02 +0200 Subject: [PATCH 094/589] fix: crash when attempt to upload a photo --- .../Navigators/Overlay/index.native.tsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx b/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx index 0dd9e203c46b..cde195fca561 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/Overlay/index.native.tsx @@ -1,15 +1,5 @@ -import React from 'react'; -import type {BaseOverlayProps} from './BaseOverlay'; -import BaseOverlay from './BaseOverlay'; - -function Overlay({...rest}: Omit) { - return ( - - ); +function Overlay() { + return null; } Overlay.displayName = 'Overlay'; From d64570da56bcc70228704af5c6a28a40aa478a3b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 30 Apr 2024 12:23:40 +0200 Subject: [PATCH 095/589] chore: update react-native-screens to latest version --- ios/Podfile.lock | 31 +++++++++---------------------- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0398bd3b1324..4b535b6e26a6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1940,7 +1940,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.30.1): + - RNScreens (3.31.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1954,13 +1954,14 @@ PODS: - React-ImageManager - React-NativeModulesApple - React-RCTFabric + - React-RCTImage - React-rendererdebug - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNScreens/common (= 3.30.1) + - RNScreens/common (= 3.31.1) - Yoga - - RNScreens/common (3.30.1): + - RNScreens/common (3.31.1): - glog - hermes-engine - RCT-Folly (= 2022.05.16.00) @@ -1974,6 +1975,7 @@ PODS: - React-ImageManager - React-NativeModulesApple - React-RCTFabric + - React-RCTImage - React-rendererdebug - React-utils - ReactCommon/turbomodule/bridging @@ -2045,24 +2047,9 @@ PODS: - SocketRocket (0.6.1) - Turf (2.7.0) - VisionCamera (4.0.0-beta.13): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Codegen + - React + - React-callinvoker - React-Core - - React-debug - - React-Fabric - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - Yoga (1.14.0) DEPENDENCIES: @@ -2562,7 +2549,7 @@ SPEC CHECKSUMS: RNPermissions: 8990fc2c10da3640938e6db1647cb6416095b729 RNReactNativeHapticFeedback: 616c35bdec7d20d4c524a7949ca9829c09e35f37 RNReanimated: 605409e0d0ced6f2e194ae585fedc2f8a1935bf2 - RNScreens: 65a936f4e227b91e4a8e2a7d4c4607355bfefda0 + RNScreens: e5204ceff1851ebae11578a43071358d37057a30 RNShare: 2a4cdfc0626ad56b0ef583d424f2038f772afe58 RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852 RNSVG: db32cfcad0a221fd175e0882eff7bcba7690380a @@ -2572,7 +2559,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 - VisionCamera: 8c5c9c50b3d76018782a823cee2f0b8b628c8604 + VisionCamera: 9f26224fce1233ffdad9fa4e56863e3de2190dc0 Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d diff --git a/package-lock.json b/package-lock.json index a6e6fbfa1543..fb06aabab198 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,7 @@ "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", - "react-native-screens": "3.30.1", + "react-native-screens": "3.31.1", "react-native-share": "^10.0.2", "react-native-sound": "^0.11.2", "react-native-svg": "14.1.0", @@ -31702,9 +31702,9 @@ } }, "node_modules/react-native-screens": { - "version": "3.30.1", - "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.30.1.tgz", - "integrity": "sha512-/muEvjocCtFb+j5J3YmLvB25+f4rIU8hnnxgGTkXcAf2omPBY8uhPjJaaFUlvj64VEoEzJcRpugbXWsjfPPIFg==", + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.31.1.tgz", + "integrity": "sha512-8fRW362pfZ9y4rS8KY5P3DFScrmwo/vu1RrRMMx0PNHbeC9TLq0Kw1ubD83591yz64gLNHFLTVkTJmWeWCXKtQ==", "dependencies": { "react-freeze": "^1.0.0", "warn-once": "^0.1.0" diff --git a/package.json b/package.json index 335c2b9f46f6..0b53cbc9b9af 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", - "react-native-screens": "3.30.1", + "react-native-screens": "3.31.1", "react-native-share": "^10.0.2", "react-native-sound": "^0.11.2", "react-native-svg": "14.1.0", From 552b97837ce4f8d6a2a626f99733c3581828b13c Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 2 May 2024 13:10:11 +0200 Subject: [PATCH 096/589] fix: update lock files --- ios/Podfile.lock | 25 ++++++++++++++++++++----- package-lock.json | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 465e11d96768..108b94ae7590 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2047,9 +2047,24 @@ PODS: - SocketRocket (0.6.1) - Turf (2.7.0) - VisionCamera (4.0.0-beta.13): - - React - - React-callinvoker + - glog + - hermes-engine + - RCT-Folly (= 2022.05.16.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - Yoga (1.14.0) DEPENDENCIES: @@ -2548,8 +2563,8 @@ SPEC CHECKSUMS: rnmapbox-maps: 51aee278cc2af8af9298f91a2aad7210739785b4 RNPermissions: 0b61d30d21acbeafe25baaa47d9bae40a0c65216 RNReactNativeHapticFeedback: 616c35bdec7d20d4c524a7949ca9829c09e35f37 - RNReanimated: 605409e0d0ced6f2e194ae585fedc2f8a1935bf2 - RNScreens: e5204ceff1851ebae11578a43071358d37057a30 + RNReanimated: 51db0fff543694d931bd3b7cab1a3b36bd86c738 + RNScreens: 2227d6ad579fe65108a404c8e11a8066371d92ab RNShare: 2a4cdfc0626ad56b0ef583d424f2038f772afe58 RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852 RNSVG: 18f1381e046be2f1c30b4724db8d0c966238089f @@ -2559,7 +2574,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 - VisionCamera: 9f26224fce1233ffdad9fa4e56863e3de2190dc0 + VisionCamera: 1394a316c7add37e619c48d7aa40b38b954bf055 Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 PODFILE CHECKSUM: a25a81f2b50270f0c0bd0aff2e2ebe4d0b4ec06d diff --git a/package-lock.json b/package-lock.json index 392ec430b571..b6d8a2820959 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "^2.0.35", + "react-native-onyx": "2.0.35", "react-native-pager-view": "6.2.3", "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", From 3d37d9d407c15cde11e93923b032c49c076c9e19 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 2 May 2024 14:42:28 +0200 Subject: [PATCH 097/589] fix: lint, typescript --- src/pages/Search/SearchPage.tsx | 2 +- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index 9107a9a0cff8..3caaf3d838bd 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -4,8 +4,8 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import * as Illustrations from '@components/Icon/Illustrations'; import ScreenWrapper from '@components/ScreenWrapper'; import Search from '@components/Search'; -import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@libs/Navigation/Navigation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {CentralPaneNavigatorParamList} from '@libs/Navigation/types'; import CONST from '@src/CONST'; import ROUTES from '@src/ROUTES'; diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 9c4e476d0e66..9a0f3bdcdb9b 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -1,5 +1,4 @@ import {useFocusEffect} from '@react-navigation/native'; -import {CONST} from 'expensify-common/lib/CONST'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; @@ -12,9 +11,11 @@ import useNetwork from '@hooks/useNetwork'; import usePermissions from '@hooks/usePermissions'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as ErrorUtils from '@libs/ErrorUtils'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type SCREENS from '@src/SCREENS'; import type {Errors, PendingAction} from '@src/types/onyx/OnyxCommon'; From c443b1cd1235db98c59154d8f4abe8d92952355b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 6 May 2024 14:28:15 +0200 Subject: [PATCH 098/589] fix: typo --- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 50ebc6f22514..b04b580abbb6 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -38,7 +38,7 @@ import ROUTES from '@src/ROUTES'; import SCREENS from '@src/SCREENS'; import type * as OnyxTypes from '@src/types/onyx'; import type {SelectedTimezone, Timezone} from '@src/types/onyx/PersonalDetails'; -import createReponsiveStackNavigator from './createResponsiveStackNavigator'; +import createResponsiveStackNavigator from './createResponsiveStackNavigator'; import defaultScreenOptions from './defaultScreenOptions'; import getRootNavigatorScreenOptions from './getRootNavigatorScreenOptions'; import BottomTabNavigator from './Navigators/BottomTabNavigator'; @@ -139,7 +139,7 @@ function handleNetworkReconnect() { } } -const RootStack = createReponsiveStackNavigator(); +const RootStack = createResponsiveStackNavigator(); // We want to delay the re-rendering for components(e.g. ReportActionCompose) // that depends on modal visibility until Modal is completely closed and its focused // When modal screen is focused, update modal visibility in Onyx From fb718b73b137643ef57e1cac629a4c94776a9bb2 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Mon, 6 May 2024 17:37:11 +0200 Subject: [PATCH 099/589] fix: issue#4 --- ...dded-interaction-manager-integration.patch | 23 +++++++++++-------- .../Navigation/AppNavigator/AuthScreens.tsx | 2 ++ src/pages/settings/Profile/ProfileAvatar.tsx | 5 +++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch b/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch index 73385f344fd2..e8c6ad7ffa2e 100644 --- a/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch +++ b/patches/@react-navigation+native-stack+6.9.26+002+added-interaction-manager-integration.patch @@ -121,7 +121,7 @@ index 3cdaf10..245bf7e 100644 +{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,aAAa,EAGb,oBAAoB,EAGrB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAgYlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AA8EF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,KAAK,eAMnD"} \ No newline at end of file diff --git a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx -index 03d8b50..eac1025 100644 +index 03d8b50..e8e4c27 100644 --- a/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx +++ b/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx @@ -17,7 +17,7 @@ import { @@ -142,26 +142,31 @@ index 03d8b50..eac1025 100644 onDisappear: () => void; onDismissed: ScreenProps['onDismissed']; onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked']; -@@ -234,6 +234,37 @@ const SceneView = ({ +@@ -234,6 +234,42 @@ const SceneView = ({ statusBarHeight ); + // https://github.com/react-navigation/react-navigation/pull/11887 + const interactionHandleRef = React.useRef(); + ++ const finishInteraction = React.useCallback(() => { ++ if (interactionHandleRef.current !== undefined) { ++ InteractionManager.clearInteractionHandle(interactionHandleRef.current); ++ interactionHandleRef.current = undefined; ++ } ++ }, []); + // this memo acts as a synchronous `useEffect` + React.useMemo(() => { + if (focused && interactionHandleRef.current === undefined) { + interactionHandleRef.current = + InteractionManager.createInteractionHandle(); ++ // actually transition is highly unlikely to be more than 500ms, but sometimes BottomTabNavigator ++ // can become unfocused and then focused again, and in this case `onAppear` will not be fired an ++ // we will get infinite interaction manager handler. To fix that we are making a running timeout ++ // action that will clear an interaction 100% ++ setTimeout(finishInteraction, 500); + } + }, [focused]); -+ const finishInteraction = React.useCallback(() => { -+ if (interactionHandleRef.current !== undefined) { -+ InteractionManager.clearInteractionHandle(interactionHandleRef.current); -+ interactionHandleRef.current = undefined; -+ } -+ }, []); + // in case if screen is unmounted faster than transition finishes, then `onAppear` will not be fired + // so we clean up an interaction here + React.useEffect(() => finishInteraction, [finishInteraction]); @@ -180,7 +185,7 @@ index 03d8b50..eac1025 100644 const [customHeaderHeight, setCustomHeaderHeight] = React.useState(defaultHeaderHeight); -@@ -279,7 +310,7 @@ const SceneView = ({ +@@ -279,7 +315,7 @@ const SceneView = ({ swipeDirection={gestureDirectionOverride} transitionDuration={animationDuration} onWillDisappear={onWillDisappear} diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index b04b580abbb6..176b0c897bd1 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -319,6 +319,8 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie name={SCREENS.PROFILE_AVATAR} options={{ headerShown: false, + presentation: 'transparentModal', + animation: 'none', }} getComponent={loadProfileAvatar} listeners={modalScreenListeners} diff --git a/src/pages/settings/Profile/ProfileAvatar.tsx b/src/pages/settings/Profile/ProfileAvatar.tsx index ebec25da7a63..b9039f85e71e 100644 --- a/src/pages/settings/Profile/ProfileAvatar.tsx +++ b/src/pages/settings/Profile/ProfileAvatar.tsx @@ -1,4 +1,5 @@ import React, {useEffect} from 'react'; +import {InteractionManager} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; @@ -41,7 +42,9 @@ function ProfileAvatar({route, personalDetails, personalDetailsMetadata, isLoadi defaultOpen source={UserUtils.getFullSizeAvatar(avatarURL, accountID)} onModalClose={() => { - Navigation.goBack(); + InteractionManager.runAfterInteractions(() => { + Navigation.goBack(); + }); }} originalFileName={personalDetail?.originalFileName ?? ''} isLoading={!!isLoading} From 1e61de84536a9d0c75db9ecb09e67719ff7a986b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 7 May 2024 11:40:22 +0200 Subject: [PATCH 100/589] fix: CI --- patches/@react-navigation+core+6.4.11.patch | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/patches/@react-navigation+core+6.4.11.patch b/patches/@react-navigation+core+6.4.11.patch index 6690085b729a..7cebc6ee28d2 100644 --- a/patches/@react-navigation+core+6.4.11.patch +++ b/patches/@react-navigation+core+6.4.11.patch @@ -124,19 +124,6 @@ index 55b77ca..de10a37 100644 \ No newline at end of file +{"version":3,"names":["PrivateValueStore","isValidKey","key","undefined","getRouteConfigsFromChildren","children","groupKey","groupOptions","transformScreenOptions","configs","React","Children","toArray","reduce","acc","child","isValidElement","type","Screen","props","navigationKey","Error","JSON","stringify","name","options","push","keys","Fragment","Group","screenOptions","String","process","env","NODE_ENV","forEach","config","component","getComponent","isValidElementType","console","warn","test","useNavigationBuilder","createRouter","navigatorKey","useRegisterNavigator","route","useContext","NavigationRouteContext","screenListeners","rest","current","router","useRef","params","state","initial","screen","initialRouteName","routeConfigs","screens","routeNames","map","routeKeyList","curr","join","routeParamList","initialParams","routeGetIdList","Object","assign","getId","length","isStateValid","useCallback","isStateInitialized","stale","currentState","getState","getCurrentState","setState","setCurrentState","setKey","getKey","getIsInitial","NavigationStateContext","stateCleanedUp","cleanUpState","initializedState","isFirstStateInitialization","useMemo","initialRouteParamList","initialParamsFromParams","getInitialState","getRehydratedState","previousRouteKeyListRef","useEffect","previousRouteKeyList","nextState","isArrayEqual","isRecordEqual","getStateForRouteNamesChange","routeKeyChanges","filter","hasOwnProperty","previousNestedParamsRef","previousParams","action","CommonActions","reset","navigate","path","updatedState","getStateForAction","shouldUpdate","useScheduleUpdate","setTimeout","initializedStateRef","emitter","useEventEmitter","e","target","routes","find","index","navigation","descriptors","listeners","concat","cb","i","self","lastIndexOf","listener","useFocusEvents","emit","data","childListeners","addListener","useChildListeners","keyedListeners","addKeyedListener","useKeyedChildListeners","onAction","useOnAction","actionListeners","beforeRemoveListeners","beforeRemove","routerConfigOptions","onRouteFocus","useOnRouteFocus","useNavigationHelpers","id","useFocusedListenersChildrenAdapter","focusedListeners","focus","useOnGetState","getStateListeners","useDescriptors","defaultScreenOptions","useCurrentRender","NavigationContent","useComponent"],"sourceRoot":"../../src","sources":["useNavigationBuilder.tsx"],"mappings":";;;;;;AAAA;AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAoD;AAAA;AAAA;AAEpD;AACA;AACAA,wBAAiB;AAwDjB,MAAMC,UAAU,GAAIC,GAAY,IAC9BA,GAAG,KAAKC,SAAS,IAAK,OAAOD,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,EAAG;;AAE9D;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAAG,CAMlCC,QAAyB,EACzBC,QAAiB,EACjBC,YAIY,EACZC,sBAKC,KACE;EACH,MAAMC,OAAO,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACP,QAAQ,CAAC,CAACQ,MAAM,CAErD,CAACC,GAAG,EAAEC,KAAK,KAAK;IAAA;IAChB,kBAAIL,KAAK,CAACM,cAAc,CAACD,KAAK,CAAC,EAAE;MAC/B,IAAIA,KAAK,CAACE,IAAI,KAAKC,eAAM,EAAE;QACzB;QACA;;QAEA,IAAI,CAACjB,UAAU,CAACc,KAAK,CAACI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D;EACpC,CAAC,CAAC;EAEF,MAAMgD,WAAW,GAAG,IAAAgC,uBAAc,EAKhC;IACAvG,KAAK;IACLK,OAAO;IACPiE,UAAU;IACVhG,aAAa,EAAEL,OAAO,CAACK,aAAa;IACpCkI,oBAAoB,EAAEvI,OAAO,CAACuI,oBAAoB;IAClDhB,QAAQ;IACRjE,QAAQ;IACRE,QAAQ;IACRqE,YAAY;IACZX,WAAW;IACXG,gBAAgB;IAChBzF,MAAM;IACN;IACAkE;EACF,CAAC,CAAC;EAEF,IAAA0C,yBAAgB,EAAC;IACfzG,KAAK;IACLsE,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,MAAMmC,iBAAiB,GAAG,IAAAC,qBAAY,EAAE9J,QAAyB,iBAC/D,oBAAC,iCAAwB,CAAC,QAAQ;IAAC,KAAK,EAAEyH;EAAW,gBACnD,oBAAC,8BAAqB,QAAEzH,QAAQ,CAAyB,CAE5D,CAAC;EAEF,OAAO;IACLmD,KAAK;IACLsE,UAAU;IACVC,WAAW;IACXmC;EACF,CAAC;AACH"} \ No newline at end of file -diff --git a/node_modules/@react-navigation/core/lib/module/index.js b/node_modules/@react-navigation/core/lib/module/index.js -index 1d42c3a..06f6bde 100644 ---- a/node_modules/@react-navigation/core/lib/module/index.js -+++ b/node_modules/@react-navigation/core/lib/module/index.js -@@ -17,7 +17,7 @@ export * from './types'; - export { default as useFocusEffect } from './useFocusEffect'; - export { default as useIsFocused } from './useIsFocused'; - export { default as useNavigation } from './useNavigation'; --export { default as useNavigationBuilder } from './useNavigationBuilder'; -+export { NavigationBuilderOptions, default as useNavigationBuilder } from './useNavigationBuilder'; - export { default as useNavigationContainerRef } from './useNavigationContainerRef'; - export { default as useNavigationState } from './useNavigationState'; - export { default as UNSTABLE_usePreventRemove } from './usePreventRemove'; diff --git a/node_modules/@react-navigation/core/lib/module/index.js.map b/node_modules/@react-navigation/core/lib/module/index.js.map index ed01400..32855ca 100644 --- a/node_modules/@react-navigation/core/lib/module/index.js.map From 935e6732e17671ce034dee83d219d08438d83273 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 7 May 2024 12:56:00 +0200 Subject: [PATCH 101/589] fix: post changes after merge --- package-lock.json | 2 +- ...ch => react-native-screens+3.31.1+001+fix-screen-type.patch} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename patches/{react-native-screens+3.30.1+001+fix-screen-type.patch => react-native-screens+3.31.1+001+fix-screen-type.patch} (100%) diff --git a/package-lock.json b/package-lock.json index e25ec84c8950..2556333b4497 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "2.0.35", + "react-native-onyx": "2.0.32", "react-native-pager-view": "6.2.3", "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", diff --git a/patches/react-native-screens+3.30.1+001+fix-screen-type.patch b/patches/react-native-screens+3.31.1+001+fix-screen-type.patch similarity index 100% rename from patches/react-native-screens+3.30.1+001+fix-screen-type.patch rename to patches/react-native-screens+3.31.1+001+fix-screen-type.patch From 0fa3d34d5da93af4e87225818c21dd2c2e498923 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Mon, 5 Aug 2024 17:00:32 +0200 Subject: [PATCH 102/589] create Balance component --- src/components/Balance.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/components/Balance.tsx diff --git a/src/components/Balance.tsx b/src/components/Balance.tsx new file mode 100644 index 000000000000..b9ca3ac6b28f --- /dev/null +++ b/src/components/Balance.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import type {TextStyle} from 'react-native'; +import useThemeStyles from '@hooks/useThemeStyles'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Text from './Text'; + +type BalanceProps = { + style?: TextStyle; + balance: number; +}; + +function Balance({style, balance}: BalanceProps) { + const styles = useThemeStyles(); + const formattedBalance = CurrencyUtils.convertToDisplayString(balance); + return {formattedBalance}; +} + +Balance.displayName = 'Balance'; + +export default Balance; From 0107f87633367dd697f36ff15520385174de5303 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Mon, 5 Aug 2024 17:06:17 +0200 Subject: [PATCH 103/589] add translations --- src/languages/en.ts | 2 ++ src/languages/es.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/languages/en.ts b/src/languages/en.ts index 8cc1f0887e75..2822ac080201 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -3285,6 +3285,8 @@ export default { payingAsIndividual: 'Paying as an individual', payingAsBusiness: 'Paying as a business', }, + invoiceBalance: 'Invoice balance', + invoiceBalanceSubtitle: 'Here’s your current balance from collecting payments on invoices.', }, travel: { unlockConciergeBookingTravel: 'Unlock Concierge travel booking', diff --git a/src/languages/es.ts b/src/languages/es.ts index b659123c0632..bd7ac8efaff0 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -3336,6 +3336,8 @@ export default { payingAsIndividual: 'Pago individual', payingAsBusiness: 'Pagar como una empresa', }, + invoiceBalance: 'Saldo de la factura', + invoiceBalanceSubtitle: 'Aquí está su saldo actual de la recaudación de pagos en las facturas.', }, travel: { unlockConciergeBookingTravel: 'Desbloquea la reserva de viajes con Concierge', From bfefb1c194c3a2dc47cc714b40eef5053d90e661 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Mon, 5 Aug 2024 17:06:26 +0200 Subject: [PATCH 104/589] integrate raw WorkspaceInvoiceBalanceSection --- .../WorkspaceInvoiceBalanceSection.tsx | 55 +++++++++++++++++++ .../invoices/WorkspaceInvoicesPage.tsx | 2 + src/styles/index.ts | 8 +++ 3 files changed, 65 insertions(+) create mode 100644 src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx new file mode 100644 index 000000000000..98352daf39f3 --- /dev/null +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -0,0 +1,55 @@ +import React from 'react'; +import {useOnyx} from 'react-native-onyx'; +import Balance from '@components/Balance'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Section from '@components/Section'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import ONYXKEYS from '@src/ONYXKEYS'; + +type WorkspaceInvoiceBalanceSectionProps = { + /** The policy ID currently being configured */ + policyID: string; +}; + +function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSectionProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`); + + return ( +
console.debug('Transfer balance'), + icon: Expensicons.Transfer, + shouldShowRightIcon: true, + iconRight: Expensicons.ArrowRight, + wrapperStyle: [styles.workspaceTransferBalance], + }, + ] + : [] + } + > + +
+ ); +} + +export default WorkspaceInvoiceBalanceSection; diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index 40a8239b9ab1..6f86a450fc9a 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -8,6 +8,7 @@ import type {FullScreenNavigatorParamList} from '@navigation/types'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; +import WorkspaceInvoiceBalanceSection from './WorkspaceInvoiceBalanceSection'; import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView'; import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; @@ -28,6 +29,7 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { > {(hasVBA?: boolean, policyID?: string) => ( + {policyID && } {!hasVBA && policyID && } {hasVBA && policyID && } diff --git a/src/styles/index.ts b/src/styles/index.ts index 3d5a2e98f3b9..a0f3fd7b5222 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -5151,6 +5151,14 @@ const styles = (theme: ThemeColors) => width: 184, height: 112, }, + + workspaceTransferBalance: { + height: variables.optionRowHeight, + marginTop: 20, + paddingLeft: 8, + paddingRight: 0, + borderRadius: 100, + }, } satisfies Styles); type ThemeStyles = ReturnType; From 69fc85c535e40c7ceab2a382dba711e687562e50 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Mon, 5 Aug 2024 17:09:50 +0200 Subject: [PATCH 105/589] integrate Balance in CurrentWalletBalance --- src/components/Balance.tsx | 8 ++++---- src/components/CurrentWalletBalance.tsx | 11 +++++++---- .../invoices/WorkspaceInvoiceBalanceSection.tsx | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/Balance.tsx b/src/components/Balance.tsx index b9ca3ac6b28f..b0db99993b65 100644 --- a/src/components/Balance.tsx +++ b/src/components/Balance.tsx @@ -1,18 +1,18 @@ import React from 'react'; -import type {TextStyle} from 'react-native'; +import type {StyleProp, TextStyle} from 'react-native'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import Text from './Text'; type BalanceProps = { - style?: TextStyle; + textStyles?: StyleProp; balance: number; }; -function Balance({style, balance}: BalanceProps) { +function Balance({textStyles, balance}: BalanceProps) { const styles = useThemeStyles(); const formattedBalance = CurrencyUtils.convertToDisplayString(balance); - return {formattedBalance}; + return {formattedBalance}; } Balance.displayName = 'Balance'; diff --git a/src/components/CurrentWalletBalance.tsx b/src/components/CurrentWalletBalance.tsx index 8761b50465f3..4391593d4094 100644 --- a/src/components/CurrentWalletBalance.tsx +++ b/src/components/CurrentWalletBalance.tsx @@ -3,10 +3,9 @@ import type {StyleProp, TextStyle} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as CurrencyUtils from '@libs/CurrencyUtils'; import ONYXKEYS from '@src/ONYXKEYS'; import type UserWallet from '@src/types/onyx/UserWallet'; -import Text from './Text'; +import Balance from './Balance'; type CurrentWalletBalanceOnyxProps = { /** The user's wallet account */ @@ -19,8 +18,12 @@ type CurrentWalletBalanceProps = CurrentWalletBalanceOnyxProps & { function CurrentWalletBalance({userWallet, balanceStyles}: CurrentWalletBalanceProps) { const styles = useThemeStyles(); - const formattedBalance = CurrencyUtils.convertToDisplayString(userWallet?.currentBalance ?? 0); - return {formattedBalance}; + return ( + + ); } CurrentWalletBalance.displayName = 'CurrentWalletBalance'; diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index 98352daf39f3..7d3c17cfba9e 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -43,7 +43,7 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti } > Date: Tue, 6 Aug 2024 14:02:04 +0200 Subject: [PATCH 106/589] add invoice types --- .../invoices/WorkspaceInvoiceBalanceSection.tsx | 4 ---- src/types/onyx/Policy.ts | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index 7d3c17cfba9e..56fc3fca7c72 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -26,8 +26,6 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti childrenStyles={styles.pt5} subtitleMuted menuItems={ - // @ts-expect-error TODO: Add invoice to types/onyx/Policy.ts - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access policy?.invoice?.bankAccount ? [ { @@ -44,8 +42,6 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti > diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 5b781ed7c034..726154b2757b 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -1292,6 +1292,18 @@ type PolicyReportField = { defaultExternalID?: string | null; }; +/** Policy invoicing details */ +type PolicyInvoicingDetails = OnyxCommon.OnyxValueWithOfflineFeedback<{ + /** Back account */ + bankAccount?: { + /** Account balance */ + stripeConnectAccountBalance?: number; + + /** bankAccountID of selected BBA for payouts */ + transferBankAccountID?: number; + }; +}>; + /** Names of policy features */ type PolicyFeatureName = ValueOf; @@ -1447,6 +1459,9 @@ type Policy = OnyxCommon.OnyxValueWithOfflineFeedback< */ isTaxTrackingEnabled?: boolean; + /** Policy invoicing details */ + invoice?: PolicyInvoicingDetails; + /** Tax data */ tax?: { /** Whether or not the policy has tax tracking enabled */ From cac61f88224e7b03718d0c81439aabd6acd740ee Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Tue, 6 Aug 2024 15:03:15 +0200 Subject: [PATCH 107/589] integrate raw WorkspaceTransferInvoiceBalance --- src/ROUTES.ts | 4 ++++ src/SCREENS.ts | 1 + .../AppNavigator/ModalStackNavigators/index.tsx | 1 + .../linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts | 1 + src/libs/Navigation/linkingConfig/config.ts | 3 +++ src/libs/Navigation/types.ts | 3 +++ .../workspace/invoices/WorkspaceInvoiceBalanceSection.tsx | 6 ++++-- .../invoices/WorkspaceTransferInvoiceBalance.tsx | 8 ++++++++ 8 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 1589d67c985a..474fdb33fa57 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -679,6 +679,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/invoices', getRoute: (policyID: string) => `settings/workspaces/${policyID}/invoices` as const, }, + WORKSPACE_INVOICES_TRANSFER_BALANCE: { + route: 'settings/workspaces/:policyID/invoices/transfer-balance', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/invoices/transfer-balance` as const, + }, WORKSPACE_TRAVEL: { route: 'settings/workspaces/:policyID/travel', getRoute: (policyID: string) => `settings/workspaces/${policyID}/travel` as const, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 831a058ebbbb..a762e9d28b5e 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -370,6 +370,7 @@ const SCREENS = { EXPENSIFY_CARD_SETTINGS_FREQUENCY: 'Workspace_ExpensifyCard_Settings_Frequency', BILLS: 'Workspace_Bills', INVOICES: 'Workspace_Invoices', + INVOICES_TRANSFER_BALANCE: 'Workspace_Invoices_Transfer_Balance', TRAVEL: 'Workspace_Travel', MEMBERS: 'Workspace_Members', INVITE: 'Workspace_Invite', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index 5b84fba03a39..05497d7328ac 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -418,6 +418,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/taxes/ValuePage').default, [SCREENS.WORKSPACE.TAX_CREATE]: () => require('../../../../pages/workspace/taxes/WorkspaceCreateTaxPage').default, [SCREENS.WORKSPACE.TAX_CODE]: () => require('../../../../pages/workspace/taxes/WorkspaceTaxCodePage').default, + [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE]: () => require('../../../../pages/workspace/invoices/WorkspaceTransferInvoiceBalance').default, [SCREENS.WORKSPACE.EXPENSIFY_CARD_ISSUE_NEW]: () => require('../../../../pages/workspace/expensifyCard/issueNew/IssueNewCardPage').default, [SCREENS.WORKSPACE.EXPENSIFY_CARD_SETTINGS]: () => require('../../../../pages/workspace/expensifyCard/WorkspaceCardSettingsPage').default, [SCREENS.WORKSPACE.EXPENSIFY_CARD_SETTINGS_ACCOUNT]: () => require('../../../../pages/workspace/expensifyCard/WorkspaceSettlementAccountPage').default, diff --git a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts index c27ccaab5176..9e9acabd63ff 100755 --- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts @@ -159,6 +159,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = { SCREENS.WORKSPACE.REPORT_FIELDS_EDIT_VALUE, SCREENS.WORKSPACE.REPORT_FIELDS_EDIT_INITIAL_VALUE, ], + [SCREENS.WORKSPACE.INVOICES]: [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE], [SCREENS.WORKSPACE.EXPENSIFY_CARD]: [ SCREENS.WORKSPACE.EXPENSIFY_CARD_ISSUE_NEW, SCREENS.WORKSPACE.EXPENSIFY_CARD_BANK_ACCOUNT, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 87802e1130cd..94448ef2854f 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -475,6 +475,9 @@ const config: LinkingOptions['config'] = { [SCREENS.WORKSPACE.SHARE]: { path: ROUTES.WORKSPACE_PROFILE_SHARE.route, }, + [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE]: { + path: ROUTES.WORKSPACE_INVOICES_TRANSFER_BALANCE.route, + }, [SCREENS.WORKSPACE.EXPENSIFY_CARD_LIMIT]: { path: ROUTES.WORKSPACE_EXPENSIFY_CARD_LIMIT.route, }, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index c527a02c16af..461b36bcef2f 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -1138,6 +1138,9 @@ type FullScreenNavigatorParamList = { [SCREENS.WORKSPACE.INVOICES]: { policyID: string; }; + [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE]: { + policyID: string; + }; [SCREENS.WORKSPACE.TRAVEL]: { policyID: string; }; diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index 56fc3fca7c72..d49f4f1718c5 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -5,7 +5,9 @@ import * as Expensicons from '@components/Icon/Expensicons'; import Section from '@components/Section'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; +import Navigation from '@libs/Navigation/Navigation'; import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; type WorkspaceInvoiceBalanceSectionProps = { /** The policy ID currently being configured */ @@ -26,11 +28,11 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti childrenStyles={styles.pt5} subtitleMuted menuItems={ - policy?.invoice?.bankAccount + !policy?.invoice?.bankAccount ? [ { title: translate('common.transferBalance'), - onPress: () => console.debug('Transfer balance'), + onPress: () => Navigation.navigate(ROUTES.WORKSPACE_INVOICES_TRANSFER_BALANCE.getRoute(policyID)), icon: Expensicons.Transfer, shouldShowRightIcon: true, iconRight: Expensicons.ArrowRight, diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx new file mode 100644 index 000000000000..894d6f34b0ff --- /dev/null +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import Text from '@components/Text'; + +function WorkspaceTransferInvoiceBalance() { + return WorkspaceTransferInvoiceBalance; +} + +export default WorkspaceTransferInvoiceBalance; From efa7d46016c747f710cd6a25661e49399ecb49e8 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Tue, 6 Aug 2024 16:08:50 +0200 Subject: [PATCH 108/589] fix nav types --- src/libs/Navigation/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 461b36bcef2f..b77a3fe3ba51 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -665,6 +665,9 @@ type SettingsNavigatorParamList = { policyID: string; taxID: string; }; + [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE]: { + policyID: string; + }; [SCREENS.WORKSPACE.EXPENSIFY_CARD_ISSUE_NEW]: { policyID: string; }; @@ -1138,9 +1141,6 @@ type FullScreenNavigatorParamList = { [SCREENS.WORKSPACE.INVOICES]: { policyID: string; }; - [SCREENS.WORKSPACE.INVOICES_TRANSFER_BALANCE]: { - policyID: string; - }; [SCREENS.WORKSPACE.TRAVEL]: { policyID: string; }; From 3cf870bdf32a8df45748a082ba8c30629b5d6019 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Tue, 6 Aug 2024 16:09:22 +0200 Subject: [PATCH 109/589] integrate raw WorkspaceTransferInvoiceBalance --- src/ONYXKEYS.ts | 4 + .../WorkspaceTransferInvoiceBalance.tsx | 133 +++++++++++++++++- src/types/onyx/InvoiceBalanceTransfer.ts | 15 ++ src/types/onyx/index.ts | 2 + 4 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 src/types/onyx/InvoiceBalanceTransfer.ts diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 979bafcdab6d..6f2333d91c81 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -397,6 +397,9 @@ const ONYXKEYS = { /** Stores the information about currently edited advanced approval workflow */ APPROVAL_WORKFLOW: 'approvalWorkflow', + /** Stores the information about the invoice balance transfer */ + INVOICE_BALANCE_TRANSFER: 'invoiceBalanceTransfer', + /** Collection Keys */ COLLECTION: { DOWNLOAD: 'download_', @@ -872,6 +875,7 @@ type OnyxValuesMapping = { [ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END]: number; [ONYXKEYS.NVP_PRIVATE_CANCELLATION_DETAILS]: OnyxTypes.CancellationDetails[]; [ONYXKEYS.APPROVAL_WORKFLOW]: OnyxTypes.ApprovalWorkflow; + [ONYXKEYS.INVOICE_BALANCE_TRANSFER]: OnyxTypes.InvoiceBalanceTransfer; }; type OnyxValues = OnyxValuesMapping & OnyxCollectionValuesMapping & OnyxFormValuesMapping & OnyxFormDraftValuesMapping; diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 894d6f34b0ff..1cd6d66572a4 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -1,8 +1,137 @@ +import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; +import {View} from 'react-native'; +import {useOnyx} from 'react-native-onyx'; +import Balance from '@components/Balance'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import ScrollView from '@components/ScrollView'; import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets'; +import useThemeStyles from '@hooks/useThemeStyles'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; +import * as PaymentUtils from '@libs/PaymentUtils'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; +import variables from '@styles/variables'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import type SCREENS from '@src/SCREENS'; +import type PaymentMethod from '@src/types/onyx/PaymentMethod'; +import {isEmptyObject} from '@src/types/utils/EmptyObject'; -function WorkspaceTransferInvoiceBalance() { - return WorkspaceTransferInvoiceBalance; +type WorkspaceTransferInvoiceBalanceProps = StackScreenProps; + +function WorkspaceTransferInvoiceBalance({ + route: { + params: {policyID}, + }, +}: WorkspaceTransferInvoiceBalanceProps) { + const styles = useThemeStyles(); + const {isOffline} = useNetwork(); + const {paddingBottom} = useStyledSafeAreaInsets(); + const {translate} = useLocalize(); + const [invoiceBalanceTransfer] = useOnyx(ONYXKEYS.INVOICE_BALANCE_TRANSFER); + const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`); + const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); + const [fundList] = useOnyx(ONYXKEYS.FUND_LIST); + + const selectedAccount: PaymentMethod | null = + PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, fundList ?? {}, styles).find( + (paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID, + ) ?? null; + const balance = policy?.invoice?.bankAccount?.stripeConnectAccountBalance ?? 0; + const calculatedFee = PaymentUtils.calculateWalletTransferBalanceFee(balance, CONST.WALLET.TRANSFER_METHOD_TYPE.ACH); + const transferAmount = balance - calculatedFee; + const isTransferable = transferAmount > 0; + const isButtonDisabled = !isTransferable || !selectedAccount; + const errorMessage = ErrorUtils.getLatestErrorMessage(invoiceBalanceTransfer); + + return ( + + + + + + + + + + console.debug('ACH')} + /> + + {translate('transferAmountPage.whichAccount')} + + + {translate('transferAmountPage.fee')} + {CurrencyUtils.convertToDisplayString(calculatedFee)} + + + + selectedAccount && PaymentMethods.transferWalletBalance(selectedAccount)} + isDisabled={isButtonDisabled || isOffline} + message={errorMessage} + isAlertVisible={!isEmptyObject(errorMessage)} + containerStyles={[styles.ph5, !paddingBottom ? styles.pb5 : null]} + /> + + + + ); } +WorkspaceTransferInvoiceBalance.displayName = 'WorkspaceTransferInvoiceBalance'; + export default WorkspaceTransferInvoiceBalance; diff --git a/src/types/onyx/InvoiceBalanceTransfer.ts b/src/types/onyx/InvoiceBalanceTransfer.ts new file mode 100644 index 000000000000..b850e6c3919c --- /dev/null +++ b/src/types/onyx/InvoiceBalanceTransfer.ts @@ -0,0 +1,15 @@ +import type * as OnyxCommon from './OnyxCommon'; + +/** Model of invoice balance transfer */ +type InvoiceBalanceTransfer = { + /** Whether the data is being fetched from server */ + loading: boolean; + + /** Whether invoice balance has been transferred successfully */ + success: boolean; + + /** Error messages to show in UI */ + errors: OnyxCommon.Errors; +}; + +export default InvoiceBalanceTransfer; diff --git a/src/types/onyx/index.ts b/src/types/onyx/index.ts index a2a66e89003f..84f0504493c5 100644 --- a/src/types/onyx/index.ts +++ b/src/types/onyx/index.ts @@ -23,6 +23,7 @@ import type {FundList} from './Fund'; import type Fund from './Fund'; import type IntroSelected from './IntroSelected'; import type InvitedEmailsToAccountIDs from './InvitedEmailsToAccountIDs'; +import type InvoiceBalanceTransfer from './InvoiceBalanceTransfer'; import type IOU from './IOU'; import type LastExportMethod from './LastExportMethod'; import type LastPaymentMethod from './LastPaymentMethod'; @@ -218,4 +219,5 @@ export type { CancellationDetails, ApprovalWorkflow, MobileSelectionMode, + InvoiceBalanceTransfer, }; From d6d4cdd14fbcb503ef5aacee380103ed5ad6f5de Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Wed, 7 Aug 2024 16:35:41 +0200 Subject: [PATCH 110/589] fix styles --- .../workspace/invoices/WorkspaceInvoiceBalanceSection.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index d49f4f1718c5..96f70b005a16 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -42,10 +42,7 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti : [] } > - + ); } From c4024d98d237844a8d40d5b19807f849506ad8dd Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Wed, 7 Aug 2024 17:24:36 +0200 Subject: [PATCH 111/589] improve TransferInvoiceBalance --- .../WorkspaceInvoiceBalanceSection.tsx | 1 + .../WorkspaceTransferInvoiceBalance.tsx | 36 ++++++++++--------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index 96f70b005a16..565a86b6c575 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -28,6 +28,7 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti childrenStyles={styles.pt5} subtitleMuted menuItems={ + // TODO: This is a temporary solution to show the Transfer Balance button !policy?.invoice?.bankAccount ? [ { diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 1cd6d66572a4..0c9efb954f47 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -20,7 +20,6 @@ import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PaymentUtils from '@libs/PaymentUtils'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import variables from '@styles/variables'; -import * as PaymentMethods from '@userActions/PaymentMethods'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -43,10 +42,12 @@ function WorkspaceTransferInvoiceBalance({ const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); const [fundList] = useOnyx(ONYXKEYS.FUND_LIST); + const paymentMethods = PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, fundList ?? {}, styles); const selectedAccount: PaymentMethod | null = - PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, fundList ?? {}, styles).find( - (paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID, - ) ?? null; + paymentMethods.find((paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID) ?? + paymentMethods.find((paymentMethod) => paymentMethod.isDefault) ?? + paymentMethods[0] ?? + null; const balance = policy?.invoice?.bankAccount?.stripeConnectAccountBalance ?? 0; const calculatedFee = PaymentUtils.calculateWalletTransferBalanceFee(balance, CONST.WALLET.TRANSFER_METHOD_TYPE.ACH); const transferAmount = balance - calculatedFee; @@ -58,6 +59,7 @@ function WorkspaceTransferInvoiceBalance({ @@ -98,17 +100,19 @@ function WorkspaceTransferInvoiceBalance({ /> {translate('transferAmountPage.whichAccount')} - + {!!selectedAccount && ( + + )} {translate('transferAmountPage.fee')} {CurrencyUtils.convertToDisplayString(calculatedFee)} @@ -120,7 +124,7 @@ function WorkspaceTransferInvoiceBalance({ amount: isTransferable ? CurrencyUtils.convertToDisplayString(transferAmount) : '', })} isLoading={invoiceBalanceTransfer?.loading} - onSubmit={() => selectedAccount && PaymentMethods.transferWalletBalance(selectedAccount)} + onSubmit={() => selectedAccount && console.debug('Transfer', selectedAccount)} isDisabled={isButtonDisabled || isOffline} message={errorMessage} isAlertVisible={!isEmptyObject(errorMessage)} From 118f9f7f56a4f8b7d4e5558f5966b9d7163740e3 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Wed, 7 Aug 2024 18:15:48 +0200 Subject: [PATCH 112/589] integrate payment methods --- .../TransferInvoiceBalanceParams.ts | 7 ++ src/libs/API/parameters/index.ts | 1 + src/libs/API/types.ts | 2 + src/libs/actions/PaymentMethods.ts | 73 +++++++++++++++++++ .../WorkspaceTransferInvoiceBalance.tsx | 9 ++- 5 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 src/libs/API/parameters/TransferInvoiceBalanceParams.ts diff --git a/src/libs/API/parameters/TransferInvoiceBalanceParams.ts b/src/libs/API/parameters/TransferInvoiceBalanceParams.ts new file mode 100644 index 000000000000..b7fa7ccf09c9 --- /dev/null +++ b/src/libs/API/parameters/TransferInvoiceBalanceParams.ts @@ -0,0 +1,7 @@ +type TransferInvoiceBalanceParams = { + policyID: string; + bankAccountID: number; + authToken: string; +}; + +export default TransferInvoiceBalanceParams; diff --git a/src/libs/API/parameters/index.ts b/src/libs/API/parameters/index.ts index 6b95190cd1ed..5cab53bc1bfc 100644 --- a/src/libs/API/parameters/index.ts +++ b/src/libs/API/parameters/index.ts @@ -269,3 +269,4 @@ export type {default as ExportSearchItemsToCSVParams} from './ExportSearchItemsT export type {default as UpdateExpensifyCardLimitParams} from './UpdateExpensifyCardLimitParams'; export type {CreateWorkspaceApprovalParams, UpdateWorkspaceApprovalParams, RemoveWorkspaceApprovalParams} from './WorkspaceApprovalParams'; export type {default as StartIssueNewCardFlowParams} from './StartIssueNewCardFlowParams'; +export type {default as TransferInvoiceBalanceParams} from './TransferInvoiceBalanceParams'; diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index 3f19c719fdd7..2b2632dc4378 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -324,6 +324,7 @@ const WRITE_COMMANDS = { CREATE_WORKSPACE_APPROVAL: 'CreateWorkspaceApproval', UPDATE_WORKSPACE_APPROVAL: 'UpdateWorkspaceApproval', REMOVE_WORKSPACE_APPROVAL: 'RemoveWorkspaceApproval', + TRANSFER_POLICY_ACCOUNT_BALANCE: 'TransferPolicyAccountBalance', } as const; type WriteCommand = ValueOf; @@ -654,6 +655,7 @@ type WriteCommandParameters = { [WRITE_COMMANDS.CREATE_WORKSPACE_APPROVAL]: Parameters.CreateWorkspaceApprovalParams; [WRITE_COMMANDS.UPDATE_WORKSPACE_APPROVAL]: Parameters.UpdateWorkspaceApprovalParams; [WRITE_COMMANDS.REMOVE_WORKSPACE_APPROVAL]: Parameters.RemoveWorkspaceApprovalParams; + [WRITE_COMMANDS.TRANSFER_POLICY_ACCOUNT_BALANCE]: Parameters.TransferInvoiceBalanceParams; }; const READ_COMMANDS = { diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index bac3739af810..de6a9310bb51 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -10,12 +10,14 @@ import type { DeletePaymentCardParams, MakeDefaultPaymentMethodParams, PaymentCardParams, + TransferInvoiceBalanceParams, TransferWalletBalanceParams, UpdateBillingCurrencyParams, } from '@libs/API/parameters'; import {READ_COMMANDS, SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; +import * as NetworkStore from '@libs/Network/NetworkStore'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Route} from '@src/ROUTES'; @@ -531,6 +533,75 @@ function setPaymentCardForm(values: AccountData) { }); } +/** + * Transfers invoice balance to a bank account + */ +function transferInvoiceBalance(policyID: string, bankAccountID: number) { + const authToken = NetworkStore.getAuthToken(); + + if (!authToken) { + return; + } + + const optimisticData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.INVOICE_BALANCE_TRANSFER, + value: { + loading: true, + }, + }, + ]; + const successData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.INVOICE_BALANCE_TRANSFER, + value: { + loading: false, + success: true, + }, + }, + ]; + const failureData: OnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.INVOICE_BALANCE_TRANSFER, + value: { + loading: false, + success: false, + }, + }, + ]; + + const parameters: TransferInvoiceBalanceParams = { + policyID, + bankAccountID, + authToken, + }; + + console.debug('Transfering invoice balance to bank account', parameters, { + optimisticData, + successData, + failureData, + }); + + API.write(WRITE_COMMANDS.TRANSFER_POLICY_ACCOUNT_BALANCE, parameters, { + optimisticData, + successData, + failureData, + }); +} + +/** + * Resets the invoice balance transfer data + */ +function resetInvoiceTransferData() { + Onyx.merge(ONYXKEYS.INVOICE_BALANCE_TRANSFER, { + loading: false, + success: false, + }); +} + export { deletePaymentCard, addPaymentCard, @@ -555,4 +626,6 @@ export { clearWalletTermsError, setPaymentCardForm, verifySetupIntent, + transferInvoiceBalance, + resetInvoiceTransferData, }; diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 0c9efb954f47..0d0ae3e2dc4f 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import React from 'react'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import Balance from '@components/Balance'; @@ -20,6 +20,7 @@ import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as PaymentUtils from '@libs/PaymentUtils'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import variables from '@styles/variables'; +import * as PaymentMethods from '@userActions/PaymentMethods'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -55,6 +56,10 @@ function WorkspaceTransferInvoiceBalance({ const isButtonDisabled = !isTransferable || !selectedAccount; const errorMessage = ErrorUtils.getLatestErrorMessage(invoiceBalanceTransfer); + useEffect(() => { + PaymentMethods.resetInvoiceTransferData(); + }, []); + return ( selectedAccount && console.debug('Transfer', selectedAccount)} + onSubmit={() => selectedAccount.methodID && PaymentMethods.transferInvoiceBalance(policyID, selectedAccount.methodID)} isDisabled={isButtonDisabled || isOffline} message={errorMessage} isAlertVisible={!isEmptyObject(errorMessage)} From 98a0b8a497db0b0e5fc857f2b9a7fc77aa8d3d01 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Thu, 8 Aug 2024 14:49:10 +0200 Subject: [PATCH 113/589] fix optional chain --- .../workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 0d0ae3e2dc4f..d8204e8b5073 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -129,7 +129,7 @@ function WorkspaceTransferInvoiceBalance({ amount: isTransferable ? CurrencyUtils.convertToDisplayString(transferAmount) : '', })} isLoading={invoiceBalanceTransfer?.loading} - onSubmit={() => selectedAccount.methodID && PaymentMethods.transferInvoiceBalance(policyID, selectedAccount.methodID)} + onSubmit={() => selectedAccount?.methodID && PaymentMethods.transferInvoiceBalance(policyID, selectedAccount.methodID)} isDisabled={isButtonDisabled || isOffline} message={errorMessage} isAlertVisible={!isEmptyObject(errorMessage)} From e21a9a231d676355eb6ee1b1096839682723118a Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Thu, 8 Aug 2024 16:23:27 +0200 Subject: [PATCH 114/589] integrate success view --- src/libs/actions/PaymentMethods.ts | 18 +++++++++--- .../WorkspaceTransferInvoiceBalance.tsx | 29 +++++++++++++++---- src/types/onyx/InvoiceBalanceTransfer.ts | 6 ++-- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index de6a9310bb51..869600595215 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -558,7 +558,7 @@ function transferInvoiceBalance(policyID: string, bankAccountID: number) { key: ONYXKEYS.INVOICE_BALANCE_TRANSFER, value: { loading: false, - success: true, + shouldShowSuccess: true, }, }, ]; @@ -568,7 +568,7 @@ function transferInvoiceBalance(policyID: string, bankAccountID: number) { key: ONYXKEYS.INVOICE_BALANCE_TRANSFER, value: { loading: false, - success: false, + shouldShowSuccess: false, }, }, ]; @@ -596,12 +596,21 @@ function transferInvoiceBalance(policyID: string, bankAccountID: number) { * Resets the invoice balance transfer data */ function resetInvoiceTransferData() { - Onyx.merge(ONYXKEYS.INVOICE_BALANCE_TRANSFER, { + Onyx.set(ONYXKEYS.INVOICE_BALANCE_TRANSFER, { loading: false, - success: false, + shouldShowSuccess: false, + errors: null, }); } +/** + * Dismisses the successful invoice transfer balance page + */ +function dismissSuccessfulInvoiceTransferBalancePage() { + Onyx.merge(ONYXKEYS.INVOICE_BALANCE_TRANSFER, {shouldShowSuccess: false}); + Navigation.goBack(); +} + export { deletePaymentCard, addPaymentCard, @@ -628,4 +637,5 @@ export { verifySetupIntent, transferInvoiceBalance, resetInvoiceTransferData, + dismissSuccessfulInvoiceTransferBalancePage, }; diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index d8204e8b5073..563c02c6ecf5 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -3,6 +3,7 @@ import React, {useEffect} from 'react'; import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import Balance from '@components/Balance'; +import ConfirmationPage from '@components/ConfirmationPage'; import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import * as Expensicons from '@components/Icon/Expensicons'; @@ -43,6 +44,28 @@ function WorkspaceTransferInvoiceBalance({ const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); const [fundList] = useOnyx(ONYXKEYS.FUND_LIST); + useEffect(() => { + PaymentMethods.resetInvoiceTransferData(); + }, []); + + if (invoiceBalanceTransfer?.shouldShowSuccess && !invoiceBalanceTransfer?.loading) { + return ( + + + + + ); + } + const paymentMethods = PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, fundList ?? {}, styles); const selectedAccount: PaymentMethod | null = paymentMethods.find((paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID) ?? @@ -56,10 +79,6 @@ function WorkspaceTransferInvoiceBalance({ const isButtonDisabled = !isTransferable || !selectedAccount; const errorMessage = ErrorUtils.getLatestErrorMessage(invoiceBalanceTransfer); - useEffect(() => { - PaymentMethods.resetInvoiceTransferData(); - }, []); - return ( Date: Thu, 8 Aug 2024 16:41:57 +0200 Subject: [PATCH 115/589] remove debug log --- src/libs/actions/PaymentMethods.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index 869600595215..ba3ee0d745ad 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -579,12 +579,6 @@ function transferInvoiceBalance(policyID: string, bankAccountID: number) { authToken, }; - console.debug('Transfering invoice balance to bank account', parameters, { - optimisticData, - successData, - failureData, - }); - API.write(WRITE_COMMANDS.TRANSFER_POLICY_ACCOUNT_BALANCE, parameters, { optimisticData, successData, From 5340ac6d91fc71e5a679d13d854b62d76a7bb564 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Thu, 8 Aug 2024 16:43:09 +0200 Subject: [PATCH 116/589] remove debug condition --- .../workspace/invoices/WorkspaceInvoiceBalanceSection.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx index 565a86b6c575..23e2582e0837 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx @@ -28,8 +28,7 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti childrenStyles={styles.pt5} subtitleMuted menuItems={ - // TODO: This is a temporary solution to show the Transfer Balance button - !policy?.invoice?.bankAccount + policy?.invoice?.bankAccount ? [ { title: translate('common.transferBalance'), From 8034af8c9ba4d99cd80397bc1152fe495bccf8ad Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Aug 2024 13:10:28 +0200 Subject: [PATCH 117/589] do not use bankAccountID for request --- src/libs/API/parameters/TransferInvoiceBalanceParams.ts | 1 - src/libs/actions/PaymentMethods.ts | 3 +-- .../workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libs/API/parameters/TransferInvoiceBalanceParams.ts b/src/libs/API/parameters/TransferInvoiceBalanceParams.ts index b7fa7ccf09c9..1e0532ff4b83 100644 --- a/src/libs/API/parameters/TransferInvoiceBalanceParams.ts +++ b/src/libs/API/parameters/TransferInvoiceBalanceParams.ts @@ -1,6 +1,5 @@ type TransferInvoiceBalanceParams = { policyID: string; - bankAccountID: number; authToken: string; }; diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index ba3ee0d745ad..3943fbd3f2c4 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -536,7 +536,7 @@ function setPaymentCardForm(values: AccountData) { /** * Transfers invoice balance to a bank account */ -function transferInvoiceBalance(policyID: string, bankAccountID: number) { +function transferInvoiceBalance(policyID: string) { const authToken = NetworkStore.getAuthToken(); if (!authToken) { @@ -575,7 +575,6 @@ function transferInvoiceBalance(policyID: string, bankAccountID: number) { const parameters: TransferInvoiceBalanceParams = { policyID, - bankAccountID, authToken, }; diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 563c02c6ecf5..340389938c98 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -148,7 +148,7 @@ function WorkspaceTransferInvoiceBalance({ amount: isTransferable ? CurrencyUtils.convertToDisplayString(transferAmount) : '', })} isLoading={invoiceBalanceTransfer?.loading} - onSubmit={() => selectedAccount?.methodID && PaymentMethods.transferInvoiceBalance(policyID, selectedAccount.methodID)} + onSubmit={() => PaymentMethods.transferInvoiceBalance(policyID)} isDisabled={isButtonDisabled || isOffline} message={errorMessage} isAlertVisible={!isEmptyObject(errorMessage)} From 451e13965ca3a958b30155731d2cb492a7952605 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Aug 2024 13:11:53 +0200 Subject: [PATCH 118/589] simplify the logic for selecting the payment account --- .../workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 340389938c98..b1f1cf1b7e6d 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -67,11 +67,7 @@ function WorkspaceTransferInvoiceBalance({ } const paymentMethods = PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, fundList ?? {}, styles); - const selectedAccount: PaymentMethod | null = - paymentMethods.find((paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID) ?? - paymentMethods.find((paymentMethod) => paymentMethod.isDefault) ?? - paymentMethods[0] ?? - null; + const selectedAccount: PaymentMethod | null = paymentMethods.find((paymentMethod) => paymentMethod.methodID === policy?.invoice?.bankAccount?.transferBankAccountID) ?? null; const balance = policy?.invoice?.bankAccount?.stripeConnectAccountBalance ?? 0; const calculatedFee = PaymentUtils.calculateWalletTransferBalanceFee(balance, CONST.WALLET.TRANSFER_METHOD_TYPE.ACH); const transferAmount = balance - calculatedFee; From ddd6ca3a436aa7f6ea2303c9ffb880814be999c5 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Aug 2024 15:48:42 +0200 Subject: [PATCH 119/589] update transfer button title --- src/languages/en.ts | 1 + src/languages/es.ts | 1 + .../workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 4 +--- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 6ce370738e4e..4a7f8e4bfa68 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -284,6 +284,7 @@ export default { join: 'Join', leave: 'Leave', decline: 'Decline', + transfer: 'Transfer', transferBalance: 'Transfer balance', cantFindAddress: "Can't find your address? ", enterManually: 'Enter it manually', diff --git a/src/languages/es.ts b/src/languages/es.ts index ad07a59b6099..5a9164664163 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -274,6 +274,7 @@ export default { join: 'Unirse', leave: 'Salir', decline: 'Rechazar', + transfer: 'Transferencia', transferBalance: 'Transferencia de saldo', cantFindAddress: '¿No encuentras tu dirección? ', enterManually: 'Introducir manualmente', diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index b1f1cf1b7e6d..7efc0957cd87 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -140,9 +140,7 @@ function WorkspaceTransferInvoiceBalance({ PaymentMethods.transferInvoiceBalance(policyID)} isDisabled={isButtonDisabled || isOffline} From e274b8f8a312068911486a608fbf3ed989f59f55 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Aug 2024 16:00:29 +0200 Subject: [PATCH 120/589] clear redundant press --- src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 7efc0957cd87..6fa1b52266b7 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -116,7 +116,6 @@ function WorkspaceTransferInvoiceBalance({ ...styles.transferBalanceSelectedPayment, }} interactive={false} - onPress={() => console.debug('ACH')} /> {translate('transferAmountPage.whichAccount')} From 52cc88b6a0ad262f56f052b83e684fe37dbacf43 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Aug 2024 16:01:36 +0200 Subject: [PATCH 121/589] update comment --- .../workspace/invoices/WorkspaceTransferInvoiceBalance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx index 6fa1b52266b7..783dbe9b82d2 100644 --- a/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx +++ b/src/pages/workspace/invoices/WorkspaceTransferInvoiceBalance.tsx @@ -80,7 +80,7 @@ function WorkspaceTransferInvoiceBalance({ accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} policyID={policyID} shouldBeBlocked={!selectedAccount} - // TODO: uncomment when CONST.POLICY.MORE_FEATURES.ARE_INVOICES_ENABLED is supported + // TODO: Uncomment the following line when the invoices screen is ready - https://github.com/Expensify/App/issues/45175. // featureName={CONST.POLICY.MORE_FEATURES.ARE_INVOICES_ENABLED} > Date: Fri, 9 Aug 2024 16:52:52 +0200 Subject: [PATCH 122/589] add empty lines --- src/components/Balance.tsx | 1 + src/components/CurrentWalletBalance.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/Balance.tsx b/src/components/Balance.tsx index b0db99993b65..b9cd93f0ed7b 100644 --- a/src/components/Balance.tsx +++ b/src/components/Balance.tsx @@ -12,6 +12,7 @@ type BalanceProps = { function Balance({textStyles, balance}: BalanceProps) { const styles = useThemeStyles(); const formattedBalance = CurrencyUtils.convertToDisplayString(balance); + return {formattedBalance}; } diff --git a/src/components/CurrentWalletBalance.tsx b/src/components/CurrentWalletBalance.tsx index 4391593d4094..5f0fa08ed3f5 100644 --- a/src/components/CurrentWalletBalance.tsx +++ b/src/components/CurrentWalletBalance.tsx @@ -18,6 +18,7 @@ type CurrentWalletBalanceProps = CurrentWalletBalanceOnyxProps & { function CurrentWalletBalance({userWallet, balanceStyles}: CurrentWalletBalanceProps) { const styles = useThemeStyles(); + return ( Date: Wed, 21 Aug 2024 16:08:26 +0700 Subject: [PATCH 123/589] fix position issue of suggestion --- .../getBottomSuggestionPadding/index.ios.ts | 5 ----- .../getBottomSuggestionPadding/index.ts | 2 +- .../AutoCompleteSuggestionsPortal/index.native.tsx | 3 +-- .../AutoCompleteSuggestionsPortal/index.tsx | 3 +-- src/components/AutoCompleteSuggestions/index.tsx | 7 ++++--- src/libs/ReportUtils.ts | 1 - .../ReportActionCompose/ReportActionCompose.tsx | 6 ++---- .../measureContainer/index.native.ts | 13 +++++++++++++ .../ReportActionCompose/measureContainer/index.ts | 11 +++++++++++ .../home/report/ReportActionItemMessageEdit.tsx | 6 ++---- 10 files changed, 35 insertions(+), 22 deletions(-) delete mode 100644 src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ios.ts create mode 100644 src/pages/home/report/ReportActionCompose/measureContainer/index.native.ts create mode 100644 src/pages/home/report/ReportActionCompose/measureContainer/index.ts diff --git a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ios.ts b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ios.ts deleted file mode 100644 index 5bb671c5edac..000000000000 --- a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ios.ts +++ /dev/null @@ -1,5 +0,0 @@ -function getBottomSuggestionPadding(): number { - return 16; -} - -export default getBottomSuggestionPadding; diff --git a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ts b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ts index acdc643b6b70..778262354973 100644 --- a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ts +++ b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ts @@ -1,5 +1,5 @@ function getBottomSuggestionPadding(): number { - return 6; + return 8; } export default getBottomSuggestionPadding; diff --git a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.native.tsx b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.native.tsx index d4f6f0eb28d4..394a7c3cd2eb 100644 --- a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.native.tsx +++ b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.native.tsx @@ -3,13 +3,12 @@ import React, {useMemo} from 'react'; import {View} from 'react-native'; import BaseAutoCompleteSuggestions from '@components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions'; import useStyleUtils from '@hooks/useStyleUtils'; -import getBottomSuggestionPadding from './getBottomSuggestionPadding'; import TransparentOverlay from './TransparentOverlay/TransparentOverlay'; import type {AutoCompleteSuggestionsPortalProps} from './types'; function AutoCompleteSuggestionsPortal({left = 0, width = 0, bottom = 0, resetSuggestions = () => {}, ...props}: AutoCompleteSuggestionsPortalProps) { const StyleUtils = useStyleUtils(); - const styles = useMemo(() => StyleUtils.getBaseAutoCompleteSuggestionContainerStyle({left, width, bottom: bottom + getBottomSuggestionPadding()}), [StyleUtils, left, width, bottom]); + const styles = useMemo(() => StyleUtils.getBaseAutoCompleteSuggestionContainerStyle({left, width, bottom}), [StyleUtils, left, width, bottom]); if (!width) { return null; diff --git a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.tsx b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.tsx index 4d322fe15c4e..27db5abed274 100644 --- a/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.tsx +++ b/src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.tsx @@ -4,7 +4,6 @@ import ReactDOM from 'react-dom'; import {View} from 'react-native'; import BaseAutoCompleteSuggestions from '@components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions'; import useStyleUtils from '@hooks/useStyleUtils'; -import getBottomSuggestionPadding from './getBottomSuggestionPadding'; import TransparentOverlay from './TransparentOverlay/TransparentOverlay'; import type {AutoCompleteSuggestionsPortalProps} from './types'; @@ -40,7 +39,7 @@ function AutoCompleteSuggestionsPortal({ ReactDOM.createPortal( <> - {componentToRender} + {componentToRender} , bodyElement, ) diff --git a/src/components/AutoCompleteSuggestions/index.tsx b/src/components/AutoCompleteSuggestions/index.tsx index 41a01fa27c46..982aaade7b08 100644 --- a/src/components/AutoCompleteSuggestions/index.tsx +++ b/src/components/AutoCompleteSuggestions/index.tsx @@ -6,6 +6,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import CONST from '@src/CONST'; import AutoCompleteSuggestionsPortal from './AutoCompleteSuggestionsPortal'; +import getBottomSuggestionPadding from './AutoCompleteSuggestionsPortal/getBottomSuggestionPadding'; import type {AutoCompleteSuggestionsProps, MeasureParentContainerAndCursor} from './types'; const measureHeightOfSuggestionRows = (numRows: number, canBeBig: boolean): number => { @@ -87,7 +88,7 @@ function AutoCompleteSuggestions({measureParentContainerAndReportCu return; } - measureParentContainerAndReportCursor(({x, y, width, scrollValue, cursorCoordinates}: MeasureParentContainerAndCursor) => { + measureParentContainerAndReportCursor(({x, y, width, scrollValue, cursorCoordinates, height}: MeasureParentContainerAndCursor) => { const xCoordinatesOfCursor = x + cursorCoordinates.x; const bigScreenLeftOffset = xCoordinatesOfCursor + CONST.AUTO_COMPLETE_SUGGESTER.BIG_SCREEN_SUGGESTION_WIDTH > windowWidth @@ -95,7 +96,7 @@ function AutoCompleteSuggestions({measureParentContainerAndReportCu : xCoordinatesOfCursor; const contentMaxHeight = measureHeightOfSuggestionRows(suggestionsLength, true); const contentMinHeight = measureHeightOfSuggestionRows(suggestionsLength, false); - let bottomValue = windowHeight - (cursorCoordinates.y - scrollValue + y) - keyboardHeight; + let bottomValue = windowHeight - (y - scrollValue) - keyboardHeight + getBottomSuggestionPadding(); const widthValue = isSmallScreenWidth ? width : CONST.AUTO_COMPLETE_SUGGESTER.BIG_SCREEN_SUGGESTION_WIDTH; const isEnoughSpaceToRenderMenuAboveForBig = isEnoughSpaceToRenderMenuAboveCursor({y, cursorCoordinates, scrollValue, contentHeight: contentMaxHeight, topInset}); @@ -121,7 +122,7 @@ function AutoCompleteSuggestions({measureParentContainerAndReportCu } else { // calculation for big suggestion box below the cursor measuredHeight = measureHeightOfSuggestionRows(suggestionsLength, true); - bottomValue = windowHeight - y - cursorCoordinates.y + scrollValue - measuredHeight - CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT - keyboardHeight; + bottomValue = bottomValue - (measuredHeight + 2 * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTER_INNER_PADDING) - height - 2 * getBottomSuggestionPadding(); } setSuggestionHeight(measuredHeight); setContainerState({ diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 94639698b42d..2c4d6d9bc1ed 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -7153,7 +7153,6 @@ function shouldDisableThread(reportAction: OnyxInputOrEntry, repor (isWhisperAction && !isReportPreviewAction && !isIOUAction) || isThreadFirstChat(reportAction, reportID) ); - } function getAllAncestorReportActions(report: Report | null | undefined): Ancestor[] { diff --git a/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx b/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx index 005824fa949f..7906ce9e3f26 100644 --- a/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx +++ b/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx @@ -49,6 +49,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; import AttachmentPickerWithMenuItems from './AttachmentPickerWithMenuItems'; import ComposerWithSuggestions from './ComposerWithSuggestions'; import type {ComposerWithSuggestionsProps} from './ComposerWithSuggestions/ComposerWithSuggestions'; +import RNMeasureContainer from './measureContainer'; import SendButton from './SendButton'; type ComposerRef = { @@ -248,10 +249,7 @@ function ReportActionCompose({ const containerRef = useRef(null); const measureContainer = useCallback( (callback: MeasureInWindowOnSuccessCallback) => { - if (!containerRef.current) { - return; - } - containerRef.current.measureInWindow(callback); + RNMeasureContainer(containerRef, callback); }, // We added isComposerFullSize in dependencies so that when this value changes, we recalculate the position of the popup // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps diff --git a/src/pages/home/report/ReportActionCompose/measureContainer/index.native.ts b/src/pages/home/report/ReportActionCompose/measureContainer/index.native.ts new file mode 100644 index 000000000000..48b85169eb49 --- /dev/null +++ b/src/pages/home/report/ReportActionCompose/measureContainer/index.native.ts @@ -0,0 +1,13 @@ +import type {RefObject} from 'react'; +import type {MeasureInWindowOnSuccessCallback, View} from 'react-native'; + +function measureContainer(containerRef: RefObject, callback: MeasureInWindowOnSuccessCallback) { + if (!containerRef?.current) { + return; + } + containerRef.current.measure((x, y, width, height, pageX, pageY) => { + callback(x + pageX, y + pageY, width, height); + }); +} + +export default measureContainer; diff --git a/src/pages/home/report/ReportActionCompose/measureContainer/index.ts b/src/pages/home/report/ReportActionCompose/measureContainer/index.ts new file mode 100644 index 000000000000..69dc8ec542c1 --- /dev/null +++ b/src/pages/home/report/ReportActionCompose/measureContainer/index.ts @@ -0,0 +1,11 @@ +import type {RefObject} from 'react'; +import type {MeasureInWindowOnSuccessCallback, View} from 'react-native'; + +function measureContainer(containerRef: RefObject, callback: MeasureInWindowOnSuccessCallback) { + if (!containerRef?.current) { + return; + } + containerRef.current.measureInWindow(callback); +} + +export default measureContainer; diff --git a/src/pages/home/report/ReportActionItemMessageEdit.tsx b/src/pages/home/report/ReportActionItemMessageEdit.tsx index 15b901689ddc..46e146309bed 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.tsx +++ b/src/pages/home/report/ReportActionItemMessageEdit.tsx @@ -47,6 +47,7 @@ import type * as OnyxTypes from '@src/types/onyx'; import * as ReportActionContextMenu from './ContextMenu/ReportActionContextMenu'; import getCursorPosition from './ReportActionCompose/getCursorPosition'; import getScrollPosition from './ReportActionCompose/getScrollPosition'; +import RNMeasureContainer from './ReportActionCompose/measureContainer'; import type {SuggestionsRef} from './ReportActionCompose/ReportActionCompose'; import Suggestions from './ReportActionCompose/Suggestions'; import shouldUseEmojiPickerSelection from './shouldUseEmojiPickerSelection'; @@ -375,10 +376,7 @@ function ReportActionItemMessageEdit( ); const measureContainer = useCallback((callback: MeasureInWindowOnSuccessCallback) => { - if (!containerRef.current) { - return; - } - containerRef.current.measureInWindow(callback); + RNMeasureContainer(containerRef, callback); }, []); const measureParentContainerAndReportCursor = useCallback( From 690cd30b0af6e56dede2c7cf895b051ba566d0b8 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Mon, 26 Aug 2024 19:59:09 -0400 Subject: [PATCH 124/589] Lazy load MapView --- src/components/MapView/MapView.website.tsx | 353 +++--------------- .../MapView/MapViewImpl.website.tsx | 303 +++++++++++++++ src/languages/en.ts | 2 + src/languages/es.ts | 2 + 4 files changed, 364 insertions(+), 296 deletions(-) create mode 100644 src/components/MapView/MapViewImpl.website.tsx diff --git a/src/components/MapView/MapView.website.tsx b/src/components/MapView/MapView.website.tsx index 618dd5b24cf5..3a28943b575a 100644 --- a/src/components/MapView/MapView.website.tsx +++ b/src/components/MapView/MapView.website.tsx @@ -1,303 +1,64 @@ -// Explanation: Different Mapbox libraries are required for web and native mobile platforms. -// This is why we have separate components for web and native to handle the specific implementations. -// For the web version, we use the Mapbox Web library called react-map-gl, while for the native mobile version, -// we utilize a different Mapbox library @rnmapbox/maps tailored for mobile development. -import {useFocusEffect} from '@react-navigation/native'; -import mapboxgl from 'mapbox-gl'; -import 'mapbox-gl/dist/mapbox-gl.css'; -import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; -import type {MapRef, ViewState} from 'react-map-gl'; -import Map, {Marker} from 'react-map-gl'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; -import Button from '@components/Button'; -import * as Expensicons from '@components/Icon/Expensicons'; +import React, {forwardRef, lazy, Suspense, useEffect, useMemo, useState} from 'react'; +import {ErrorBoundary} from 'react-error-boundary'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; import usePrevious from '@hooks/usePrevious'; -import useStyleUtils from '@hooks/useStyleUtils'; -import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; -import type {GeolocationErrorCallback} from '@libs/getCurrentPosition/getCurrentPosition.types'; -import {GeolocationErrorCode} from '@libs/getCurrentPosition/getCurrentPosition.types'; -import * as UserLocation from '@userActions/UserLocation'; -import CONST from '@src/CONST'; -import useLocalize from '@src/hooks/useLocalize'; -import useNetwork from '@src/hooks/useNetwork'; -import getCurrentPosition from '@src/libs/getCurrentPosition'; -import ONYXKEYS from '@src/ONYXKEYS'; -import Direction from './Direction'; -import './mapbox.css'; import type {MapViewHandle} from './MapViewTypes'; import PendingMapView from './PendingMapView'; -import responder from './responder'; -import type {ComponentProps, MapViewOnyxProps} from './types'; -import utils from './utils'; - -const MapView = forwardRef( - ( - { - style, - styleURL, - waypoints, - mapPadding, - accessToken, - userLocation, - directionCoordinates, - initialState = {location: CONST.MAPBOX.DEFAULT_COORDINATE, zoom: CONST.MAPBOX.DEFAULT_ZOOM}, - interactive = true, - }, - ref, - ) => { - const {isOffline} = useNetwork(); - const {translate} = useLocalize(); - - const theme = useTheme(); - const styles = useThemeStyles(); - const StyleUtils = useStyleUtils(); - - const [mapRef, setMapRef] = useState(null); - const initialLocation = useMemo(() => ({longitude: initialState.location[0], latitude: initialState.location[1]}), [initialState]); - const currentPosition = userLocation ?? initialLocation; - const prevUserPosition = usePrevious(currentPosition); - const [userInteractedWithMap, setUserInteractedWithMap] = useState(false); - const [shouldResetBoundaries, setShouldResetBoundaries] = useState(false); - const setRef = useCallback((newRef: MapRef | null) => setMapRef(newRef), []); - const shouldInitializeCurrentPosition = useRef(true); - - // Determines if map can be panned to user's detected - // location without bothering the user. It will return - // false if user has already started dragging the map or - // if there are one or more waypoints present. - const shouldPanMapToCurrentPosition = useCallback(() => !userInteractedWithMap && (!waypoints || waypoints.length === 0), [userInteractedWithMap, waypoints]); - - const setCurrentPositionToInitialState: GeolocationErrorCallback = useCallback( - (error) => { - if (error?.code !== GeolocationErrorCode.PERMISSION_DENIED || !initialLocation) { - return; - } - UserLocation.clearUserLocation(); - }, - [initialLocation], - ); - - useFocusEffect( - useCallback(() => { - if (isOffline) { - return; - } - - if (!shouldInitializeCurrentPosition.current) { - return; - } - - shouldInitializeCurrentPosition.current = false; - - if (!shouldPanMapToCurrentPosition()) { - setCurrentPositionToInitialState(); - return; - } - - getCurrentPosition((params) => { - const currentCoords = {longitude: params.coords.longitude, latitude: params.coords.latitude}; - UserLocation.setUserLocation(currentCoords); - }, setCurrentPositionToInitialState); - }, [isOffline, shouldPanMapToCurrentPosition, setCurrentPositionToInitialState]), - ); - - useEffect(() => { - if (!currentPosition || !mapRef) { - return; - } - - if (!shouldPanMapToCurrentPosition()) { - return; - } - - // Avoid animating the naviagtion to the same location - const shouldAnimate = prevUserPosition.longitude !== currentPosition.longitude || prevUserPosition.latitude !== currentPosition.latitude; - - mapRef.flyTo({ - center: [currentPosition.longitude, currentPosition.latitude], - zoom: CONST.MAPBOX.DEFAULT_ZOOM, - animate: shouldAnimate, - }); - }, [currentPosition, mapRef, prevUserPosition, shouldPanMapToCurrentPosition]); - - const resetBoundaries = useCallback(() => { - if (!waypoints || waypoints.length === 0) { - return; - } - - if (!mapRef) { - return; - } - - if (waypoints.length === 1) { - mapRef.flyTo({ - center: waypoints[0].coordinate, - zoom: CONST.MAPBOX.SINGLE_MARKER_ZOOM, - }); - return; - } - - const map = mapRef.getMap(); - - const {northEast, southWest} = utils.getBounds( - waypoints.map((waypoint) => waypoint.coordinate), - directionCoordinates, - ); - map.fitBounds([northEast, southWest], {padding: mapPadding}); - }, [waypoints, mapRef, mapPadding, directionCoordinates]); - - useEffect(resetBoundaries, [resetBoundaries]); - - useEffect(() => { - if (!shouldResetBoundaries) { - return; - } - - resetBoundaries(); - setShouldResetBoundaries(false); - // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- this effect only needs to run when the boundaries reset is forced - }, [shouldResetBoundaries]); - - useEffect(() => { - if (!mapRef) { - return; +import type {ComponentProps} from './types'; + +const MapView = forwardRef((props, ref) => { + const {isOffline} = useNetwork(); + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const [errorResetKey, setErrorResetKey] = useState(0); + + // Retry the error when reconnecting. + const wasOffline = usePrevious(isOffline); + useEffect(() => { + if (!wasOffline || isOffline) { + return; + } + setErrorResetKey((key) => key + 1); + }, [isOffline, wasOffline]); + + // The only way to retry loading the module is to call `React.lazy` again. + const MapViewImpl = useMemo( + () => lazy(() => import('./MapViewImpl.website')), + // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps + [errorResetKey], + ); + + return ( + } - - const resizeObserver = new ResizeObserver(() => { - mapRef.resize(); - setShouldResetBoundaries(true); - }); - resizeObserver.observe(mapRef.getContainer()); - - return () => { - resizeObserver?.disconnect(); - }; - }, [mapRef]); - - useImperativeHandle( - ref, - () => ({ - flyTo: (location: [number, number], zoomLevel: number = CONST.MAPBOX.DEFAULT_ZOOM, animationDuration?: number) => - mapRef?.flyTo({ - center: location, - zoom: zoomLevel, - duration: animationDuration, - }), - fitBounds: (northEast: [number, number], southWest: [number, number]) => mapRef?.fitBounds([northEast, southWest]), - }), - [mapRef], - ); - - const centerMap = useCallback(() => { - if (!mapRef) { - return; - } - const waypointCoordinates = waypoints?.map((waypoint) => waypoint.coordinate) ?? []; - if (waypointCoordinates.length > 1 || (directionCoordinates ?? []).length > 1) { - const {northEast, southWest} = utils.getBounds(waypoints?.map((waypoint) => waypoint.coordinate) ?? [], directionCoordinates); - const map = mapRef?.getMap(); - map?.fitBounds([southWest, northEast], {padding: mapPadding, animate: true, duration: CONST.MAPBOX.ANIMATION_DURATION_ON_CENTER_ME}); - return; - } - - mapRef.flyTo({ - center: [currentPosition?.longitude ?? 0, currentPosition?.latitude ?? 0], - zoom: CONST.MAPBOX.SINGLE_MARKER_ZOOM, - bearing: 0, - animate: true, - duration: CONST.MAPBOX.ANIMATION_DURATION_ON_CENTER_ME, - }); - }, [directionCoordinates, currentPosition, mapRef, waypoints, mapPadding]); - - const initialViewState: Partial | undefined = useMemo(() => { - if (!interactive) { - if (!waypoints) { - return undefined; + > + } - const {northEast, southWest} = utils.getBounds( - waypoints.map((waypoint) => waypoint.coordinate), - directionCoordinates, - ); - return { - zoom: initialState.zoom, - bounds: [northEast, southWest], - }; - } - return { - longitude: currentPosition?.longitude, - latitude: currentPosition?.latitude, - zoom: initialState.zoom, - }; - }, [waypoints, directionCoordinates, interactive, currentPosition, initialState.zoom]); - - return !isOffline && !!accessToken && !!initialViewState ? ( - - setUserInteractedWithMap(true)} - ref={setRef} - mapLib={mapboxgl} - mapboxAccessToken={accessToken} - initialViewState={initialViewState} - style={StyleUtils.getTextColorStyle(theme.mapAttributionText)} - mapStyle={styleURL} - interactive={interactive} - > - {interactive && ( - - - - )} - {waypoints?.map(({coordinate, markerComponent, id}) => { - const MarkerComponent = markerComponent; - if (utils.areSameCoordinate([coordinate[0], coordinate[1]], [currentPosition?.longitude ?? 0, currentPosition?.latitude ?? 0]) && interactive) { - return null; - } - return ( - - - - ); - })} - {directionCoordinates && } - - {interactive && ( - -