@react-navigation/drawer 7.14.3 → 7.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,62 @@ import { DrawerToggleButton } from "./DrawerToggleButton.js";
|
|
|
15
15
|
import { MaybeScreen, MaybeScreenContainer } from "./ScreenFallback.js";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const DRAWER_BORDER_RADIUS = 16;
|
|
18
|
+
const DrawerScene = /*#__PURE__*/React.memo(function DrawerScene({
|
|
19
|
+
descriptor,
|
|
20
|
+
isFocused,
|
|
21
|
+
shouldFreeze,
|
|
22
|
+
detachInactiveScreens,
|
|
23
|
+
drawerPosition,
|
|
24
|
+
layout
|
|
25
|
+
}) {
|
|
26
|
+
const {
|
|
27
|
+
freezeOnBlur,
|
|
28
|
+
header = ({
|
|
29
|
+
layout,
|
|
30
|
+
route,
|
|
31
|
+
options
|
|
32
|
+
}) => /*#__PURE__*/_jsx(Header, {
|
|
33
|
+
...options,
|
|
34
|
+
layout: layout,
|
|
35
|
+
title: getHeaderTitle(options, route.name),
|
|
36
|
+
headerLeft: drawerPosition === 'left' && options.headerLeft == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
|
|
37
|
+
...props
|
|
38
|
+
}) : options.headerLeft,
|
|
39
|
+
headerRight: drawerPosition === 'right' && options.headerRight == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
|
|
40
|
+
...props
|
|
41
|
+
}) : options.headerRight
|
|
42
|
+
}),
|
|
43
|
+
headerShown,
|
|
44
|
+
headerStatusBarHeight,
|
|
45
|
+
headerTransparent,
|
|
46
|
+
sceneStyle
|
|
47
|
+
} = descriptor.options;
|
|
48
|
+
return /*#__PURE__*/_jsx(MaybeScreen, {
|
|
49
|
+
style: [StyleSheet.absoluteFill, {
|
|
50
|
+
zIndex: isFocused ? 0 : -1
|
|
51
|
+
}],
|
|
52
|
+
visible: isFocused,
|
|
53
|
+
enabled: detachInactiveScreens,
|
|
54
|
+
freezeOnBlur: freezeOnBlur,
|
|
55
|
+
shouldFreeze: shouldFreeze,
|
|
56
|
+
children: /*#__PURE__*/_jsx(Screen, {
|
|
57
|
+
focused: isFocused,
|
|
58
|
+
route: descriptor.route,
|
|
59
|
+
navigation: descriptor.navigation,
|
|
60
|
+
headerShown: headerShown,
|
|
61
|
+
headerStatusBarHeight: headerStatusBarHeight,
|
|
62
|
+
headerTransparent: headerTransparent,
|
|
63
|
+
header: header({
|
|
64
|
+
layout,
|
|
65
|
+
route: descriptor.route,
|
|
66
|
+
navigation: descriptor.navigation,
|
|
67
|
+
options: descriptor.options
|
|
68
|
+
}),
|
|
69
|
+
style: sceneStyle,
|
|
70
|
+
children: descriptor.render()
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
});
|
|
18
74
|
const renderDrawerContentDefault = props => /*#__PURE__*/_jsx(DrawerContent, {
|
|
19
75
|
...props
|
|
20
76
|
});
|
|
@@ -169,51 +225,13 @@ function DrawerViewBase({
|
|
|
169
225
|
// Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
|
|
170
226
|
return null;
|
|
171
227
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
layout,
|
|
176
|
-
options
|
|
177
|
-
}) => /*#__PURE__*/_jsx(Header, {
|
|
178
|
-
...options,
|
|
179
|
-
layout: layout,
|
|
180
|
-
title: getHeaderTitle(options, route.name),
|
|
181
|
-
headerLeft: drawerPosition === 'left' && options.headerLeft == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
|
|
182
|
-
...props
|
|
183
|
-
}) : options.headerLeft,
|
|
184
|
-
headerRight: drawerPosition === 'right' && options.headerRight == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
|
|
185
|
-
...props
|
|
186
|
-
}) : options.headerRight
|
|
187
|
-
}),
|
|
188
|
-
headerShown,
|
|
189
|
-
headerStatusBarHeight,
|
|
190
|
-
headerTransparent,
|
|
191
|
-
sceneStyle
|
|
192
|
-
} = descriptor.options;
|
|
193
|
-
return /*#__PURE__*/_jsx(MaybeScreen, {
|
|
194
|
-
style: [StyleSheet.absoluteFill, {
|
|
195
|
-
zIndex: isFocused ? 0 : -1
|
|
196
|
-
}],
|
|
197
|
-
visible: isFocused,
|
|
198
|
-
enabled: detachInactiveScreens,
|
|
199
|
-
freezeOnBlur: freezeOnBlur,
|
|
228
|
+
return /*#__PURE__*/_jsx(DrawerScene, {
|
|
229
|
+
descriptor: descriptor,
|
|
230
|
+
isFocused: isFocused,
|
|
200
231
|
shouldFreeze: !isFocused && !isPreloaded,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
navigation: descriptor.navigation,
|
|
205
|
-
headerShown: headerShown,
|
|
206
|
-
headerStatusBarHeight: headerStatusBarHeight,
|
|
207
|
-
headerTransparent: headerTransparent,
|
|
208
|
-
header: header({
|
|
209
|
-
layout: dimensions,
|
|
210
|
-
route: descriptor.route,
|
|
211
|
-
navigation: descriptor.navigation,
|
|
212
|
-
options: descriptor.options
|
|
213
|
-
}),
|
|
214
|
-
style: sceneStyle,
|
|
215
|
-
children: descriptor.render()
|
|
216
|
-
})
|
|
232
|
+
detachInactiveScreens: detachInactiveScreens,
|
|
233
|
+
drawerPosition: drawerPosition,
|
|
234
|
+
layout: dimensions
|
|
217
235
|
}, route.key);
|
|
218
236
|
})
|
|
219
237
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","useFrameSize","DrawerActions","StackActions","useLocale","useTheme","React","Platform","StyleSheet","Drawer","useLatestCallback","addCancelListener","DrawerPositionContext","DrawerStatusContext","getDrawerStatusFromState","DrawerContent","DrawerToggleButton","MaybeScreen","MaybeScreenContainer","jsx","_jsx","DRAWER_BORDER_RADIUS","renderDrawerContentDefault","props","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","detachInactiveScreens","OS","direction","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","default","configureGestureHandler","keyboardDismissMode","overlayColor","overlayStyle","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","options","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","popToTopOnBlur","currentState","getState","prevRoute","find","route","type","length","dispatch","popToTop","target","dimensions","size","colors","drawerStatus","handleDrawerOpen","openDrawer","handleDrawerClose","closeDrawer","handleGestureStart","emit","handleGestureEnd","handleGestureCancel","handleTransitionStart","closing","data","handleTransitionEnd","handleHardwareBack","isFocused","renderDrawerContent","Provider","value","children","renderSceneContent","enabled","hasTwoStates","style","styles","content","map","descriptor","lazy","isPreloaded","preloadedRouteKeys","freezeOnBlur","header","layout","title","name","headerLeft","headerRight","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","absoluteFill","zIndex","visible","shouldFreeze","focused","render","open","onOpen","onClose","onGestureStart","onGestureEnd","onGestureCancel","onTransitionStart","onTransitionEnd","hideStatusBarOnOpen","statusBarAnimation","backgroundColor","card","borderLeftColor","border","borderLeftWidth","hairlineWidth","borderRightColor","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;AAAA,SACEA,cAAc,EACdC,MAAM,EACNC,sBAAsB,EACtBC,MAAM,EACNC,YAAY,QACP,4BAA4B;AACnC,SACEC,aAAa,EAIbC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,OAAOC,iBAAiB,MAAM,qBAAqB;AASnD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC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B,EAAE3H,oBAAoB;QACzC4H,sBAAsB,EAAE5H;MAC1B,CAAC,CAAC,EACRmB,WAAW,CACX;MACFQ,YAAY,EAAE,CAAC;QAAEsF,eAAe,EAAEvF;MAAa,CAAC,EAAEC,YAAY,CAAE;MAChE4C,mBAAmB,EAAEA,mBAAoB;MAAAG,QAAA,EAExCC,kBAAkB,CAAC;IAAC,CACf;EAAC,CACmB,CAAC;AAEnC;AAEA,OAAO,SAASkD,UAAUA,CAAC;EAAExH,UAAU;EAAE,GAAGyH;AAAY,CAAC,EAAE;EACzD,oBACE/H,IAAA,CAACrB,sBAAsB;IAAAgG,QAAA,eACrB3E,IAAA,CAACI,cAAc;MAACE,UAAU,EAAEA,UAAW;MAAA,GAAKyH;IAAI,CAAG;EAAC,CAC9B,CAAC;AAE7B;AAEA,MAAM/C,MAAM,GAAG5F,UAAU,CAAC4I,MAAM,CAAC;EAC/B/C,OAAO,EAAE;IACPgD,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","useFrameSize","DrawerActions","StackActions","useLocale","useTheme","React","Platform","StyleSheet","Drawer","useLatestCallback","addCancelListener","DrawerPositionContext","DrawerStatusContext","getDrawerStatusFromState","DrawerContent","DrawerToggleButton","MaybeScreen","MaybeScreenContainer","jsx","_jsx","DRAWER_BORDER_RADIUS","DrawerScene","memo","descriptor","isFocused","shouldFreeze","detachInactiveScreens","drawerPosition","layout","freezeOnBlur","header","route","options","title","name","headerLeft","props","headerRight","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","style","absoluteFill","zIndex","visible","enabled","children","focused","navigation","render","renderDrawerContentDefault","DrawerViewBase","state","descriptors","defaultStatus","drawerContent","OS","direction","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","default","configureGestureHandler","keyboardDismissMode","overlayColor","overlayStyle","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","popToTopOnBlur","currentState","getState","prevRoute","find","type","length","dispatch","popToTop","target","dimensions","size","colors","drawerStatus","handleDrawerOpen","openDrawer","handleDrawerClose","closeDrawer","handleGestureStart","emit","handleGestureEnd","handleGestureCancel","handleTransitionStart","closing","data","handleTransitionEnd","handleHardwareBack","renderDrawerContent","Provider","value","renderSceneContent","hasTwoStates","styles","content","map","lazy","isPreloaded","preloadedRouteKeys","open","onOpen","onClose","onGestureStart","onGestureEnd","onGestureCancel","onTransitionStart","onTransitionEnd","hideStatusBarOnOpen","statusBarAnimation","backgroundColor","card","borderLeftColor","border","borderLeftWidth","hairlineWidth","borderRightColor","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;AAAA,SACEA,cAAc,EACdC,MAAM,EACNC,sBAAsB,EACtBC,MAAM,EACNC,YAAY,QACP,4BAA4B;AACnC,SACEC,aAAa,EAIbC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,OAAOC,iBAAiB,MAAM,qBAAqB;AAWnD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,wBAAwB,QAAQ,sCAAmC;AAC5E,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASrE,MAAMC,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ACnBvC,cAAc,KAAK,MAAM,GACtB;QACEoH,oBAAoB,EAAE3H,oBAAoB;QAC1C4H,uBAAuB,EAAE5H;MAC3B,CAAC,GACD;QACE6H,mBAAmB,EAAE7H,oBAAoB;QACzC8H,sBAAsB,EAAE9H;MAC1B,CAAC,CAAC,EACR6C,WAAW,CACX;MACFQ,YAAY,EAAE,CAAC;QAAE8D,eAAe,EAAE/D;MAAa,CAAC,EAAEC,YAAY,CAAE;MAChEyC,mBAAmB,EAAEA,mBAAoB;MAAAnE,QAAA,EAExCsE,kBAAkB,CAAC;IAAC,CACf;EAAC,CACmB,CAAC;AAEnC;AAEA,OAAO,SAAS8B,UAAUA,CAAC;EAAElG,UAAU;EAAE,GAAGmG;AAAY,CAAC,EAAE;EACzD,oBACEjI,IAAA,CAACrB,sBAAsB;IAAAiD,QAAA,eACrB5B,IAAA,CAACiC,cAAc;MAACH,UAAU,EAAEA,UAAW;MAAA,GAAKmG;IAAI,CAAG;EAAC,CAC9B,CAAC;AAE7B;AAEA,MAAM7B,MAAM,GAAGhH,UAAU,CAAC8I,MAAM,CAAC;EAC/B7B,OAAO,EAAE;IACP8B,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -168,7 +168,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
168
168
|
*/
|
|
169
169
|
swipeMinDistance?: number;
|
|
170
170
|
/**
|
|
171
|
-
* Whether the keyboard should be dismissed when the
|
|
171
|
+
* Whether the keyboard should be dismissed when the drawer starts opening or closing.
|
|
172
172
|
* Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
|
|
173
173
|
*/
|
|
174
174
|
keyboardDismissMode?: 'on-drag' | 'none';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAGV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,aAAU,CAAC;AASlB,KAAK,KAAK,GAAG,sBAAsB,GAAG;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AA6VF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMxD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/drawer",
|
|
3
3
|
"description": "Integration for the drawer component from react-native-drawer-layout",
|
|
4
|
-
"version": "7.14.
|
|
4
|
+
"version": "7.14.4",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
"clean": "del lib"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@react-navigation/elements": "^2.9.
|
|
49
|
+
"@react-navigation/elements": "^2.9.45",
|
|
50
50
|
"color": "^4.2.3",
|
|
51
|
-
"react-native-drawer-layout": "^4.2.
|
|
51
|
+
"react-native-drawer-layout": "^4.2.12",
|
|
52
52
|
"use-latest-callback": "^0.2.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@babel/core": "^7.29.0",
|
|
56
56
|
"@jest/globals": "^30.0.0",
|
|
57
57
|
"@react-native/metro-config": "0.85.3",
|
|
58
|
-
"@react-navigation/native": "^7.5.
|
|
58
|
+
"@react-navigation/native": "^7.5.1",
|
|
59
59
|
"@testing-library/react-native": "^13.2.1",
|
|
60
60
|
"@types/react": "~19.2.4",
|
|
61
61
|
"del-cli": "^6.0.0",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"react-native-gesture-handler": "~2.31.1",
|
|
66
66
|
"react-native-reanimated": "4.3.1",
|
|
67
67
|
"react-native-safe-area-context": "~5.10.0",
|
|
68
|
-
"react-native-screens": "^4.
|
|
68
|
+
"react-native-screens": "^4.30.0",
|
|
69
69
|
"react-native-worklets": "0.8.3",
|
|
70
70
|
"react-test-renderer": "19.2.3",
|
|
71
71
|
"typescript": "~6.0.3"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@react-navigation/native": "^7.5.
|
|
74
|
+
"@react-navigation/native": "^7.5.1",
|
|
75
75
|
"react": ">= 18.2.0",
|
|
76
76
|
"react-native": "*",
|
|
77
77
|
"react-native-gesture-handler": ">= 2.0.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
]
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "379552aab1a143b61058ab572450cbfb363bff77"
|
|
101
101
|
}
|
package/src/types.tsx
CHANGED
|
@@ -209,7 +209,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
209
209
|
swipeMinDistance?: number;
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
|
-
* Whether the keyboard should be dismissed when the
|
|
212
|
+
* Whether the keyboard should be dismissed when the drawer starts opening or closing.
|
|
213
213
|
* Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
|
|
214
214
|
*/
|
|
215
215
|
keyboardDismissMode?: 'on-drag' | 'none';
|
package/src/views/DrawerView.tsx
CHANGED
|
@@ -21,10 +21,12 @@ import useLatestCallback from 'use-latest-callback';
|
|
|
21
21
|
|
|
22
22
|
import type {
|
|
23
23
|
DrawerContentComponentProps,
|
|
24
|
+
DrawerDescriptor,
|
|
24
25
|
DrawerDescriptorMap,
|
|
25
26
|
DrawerHeaderProps,
|
|
26
27
|
DrawerNavigationConfig,
|
|
27
28
|
DrawerNavigationHelpers,
|
|
29
|
+
Layout,
|
|
28
30
|
} from '../types';
|
|
29
31
|
import { addCancelListener } from '../utils/addCancelListener';
|
|
30
32
|
import { DrawerPositionContext } from '../utils/DrawerPositionContext';
|
|
@@ -43,6 +45,77 @@ type Props = DrawerNavigationConfig & {
|
|
|
43
45
|
|
|
44
46
|
const DRAWER_BORDER_RADIUS = 16;
|
|
45
47
|
|
|
48
|
+
type DrawerSceneProps = {
|
|
49
|
+
descriptor: DrawerDescriptor;
|
|
50
|
+
isFocused: boolean;
|
|
51
|
+
shouldFreeze: boolean;
|
|
52
|
+
detachInactiveScreens: boolean;
|
|
53
|
+
drawerPosition: 'left' | 'right';
|
|
54
|
+
layout: Layout;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const DrawerScene = React.memo(function DrawerScene({
|
|
58
|
+
descriptor,
|
|
59
|
+
isFocused,
|
|
60
|
+
shouldFreeze,
|
|
61
|
+
detachInactiveScreens,
|
|
62
|
+
drawerPosition,
|
|
63
|
+
layout,
|
|
64
|
+
}: DrawerSceneProps) {
|
|
65
|
+
const {
|
|
66
|
+
freezeOnBlur,
|
|
67
|
+
header = ({ layout, route, options }: DrawerHeaderProps) => (
|
|
68
|
+
<Header
|
|
69
|
+
{...options}
|
|
70
|
+
layout={layout}
|
|
71
|
+
title={getHeaderTitle(options, route.name)}
|
|
72
|
+
headerLeft={
|
|
73
|
+
drawerPosition === 'left' && options.headerLeft == null
|
|
74
|
+
? (props) => <DrawerToggleButton {...props} />
|
|
75
|
+
: options.headerLeft
|
|
76
|
+
}
|
|
77
|
+
headerRight={
|
|
78
|
+
drawerPosition === 'right' && options.headerRight == null
|
|
79
|
+
? (props) => <DrawerToggleButton {...props} />
|
|
80
|
+
: options.headerRight
|
|
81
|
+
}
|
|
82
|
+
/>
|
|
83
|
+
),
|
|
84
|
+
headerShown,
|
|
85
|
+
headerStatusBarHeight,
|
|
86
|
+
headerTransparent,
|
|
87
|
+
sceneStyle,
|
|
88
|
+
} = descriptor.options;
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<MaybeScreen
|
|
92
|
+
style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}
|
|
93
|
+
visible={isFocused}
|
|
94
|
+
enabled={detachInactiveScreens}
|
|
95
|
+
freezeOnBlur={freezeOnBlur}
|
|
96
|
+
shouldFreeze={shouldFreeze}
|
|
97
|
+
>
|
|
98
|
+
<Screen
|
|
99
|
+
focused={isFocused}
|
|
100
|
+
route={descriptor.route}
|
|
101
|
+
navigation={descriptor.navigation}
|
|
102
|
+
headerShown={headerShown}
|
|
103
|
+
headerStatusBarHeight={headerStatusBarHeight}
|
|
104
|
+
headerTransparent={headerTransparent}
|
|
105
|
+
header={header({
|
|
106
|
+
layout,
|
|
107
|
+
route: descriptor.route,
|
|
108
|
+
navigation: descriptor.navigation,
|
|
109
|
+
options: descriptor.options,
|
|
110
|
+
})}
|
|
111
|
+
style={sceneStyle}
|
|
112
|
+
>
|
|
113
|
+
{descriptor.render()}
|
|
114
|
+
</Screen>
|
|
115
|
+
</MaybeScreen>
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
|
|
46
119
|
const renderDrawerContentDefault = (props: DrawerContentComponentProps) => (
|
|
47
120
|
<DrawerContent {...props} />
|
|
48
121
|
);
|
|
@@ -239,58 +312,16 @@ function DrawerViewBase({
|
|
|
239
312
|
return null;
|
|
240
313
|
}
|
|
241
314
|
|
|
242
|
-
const {
|
|
243
|
-
freezeOnBlur,
|
|
244
|
-
header = ({ layout, options }: DrawerHeaderProps) => (
|
|
245
|
-
<Header
|
|
246
|
-
{...options}
|
|
247
|
-
layout={layout}
|
|
248
|
-
title={getHeaderTitle(options, route.name)}
|
|
249
|
-
headerLeft={
|
|
250
|
-
drawerPosition === 'left' && options.headerLeft == null
|
|
251
|
-
? (props) => <DrawerToggleButton {...props} />
|
|
252
|
-
: options.headerLeft
|
|
253
|
-
}
|
|
254
|
-
headerRight={
|
|
255
|
-
drawerPosition === 'right' && options.headerRight == null
|
|
256
|
-
? (props) => <DrawerToggleButton {...props} />
|
|
257
|
-
: options.headerRight
|
|
258
|
-
}
|
|
259
|
-
/>
|
|
260
|
-
),
|
|
261
|
-
headerShown,
|
|
262
|
-
headerStatusBarHeight,
|
|
263
|
-
headerTransparent,
|
|
264
|
-
sceneStyle,
|
|
265
|
-
} = descriptor.options;
|
|
266
|
-
|
|
267
315
|
return (
|
|
268
|
-
<
|
|
316
|
+
<DrawerScene
|
|
269
317
|
key={route.key}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
enabled={detachInactiveScreens}
|
|
273
|
-
freezeOnBlur={freezeOnBlur}
|
|
318
|
+
descriptor={descriptor}
|
|
319
|
+
isFocused={isFocused}
|
|
274
320
|
shouldFreeze={!isFocused && !isPreloaded}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
navigation={descriptor.navigation}
|
|
280
|
-
headerShown={headerShown}
|
|
281
|
-
headerStatusBarHeight={headerStatusBarHeight}
|
|
282
|
-
headerTransparent={headerTransparent}
|
|
283
|
-
header={header({
|
|
284
|
-
layout: dimensions,
|
|
285
|
-
route: descriptor.route,
|
|
286
|
-
navigation: descriptor.navigation,
|
|
287
|
-
options: descriptor.options,
|
|
288
|
-
})}
|
|
289
|
-
style={sceneStyle}
|
|
290
|
-
>
|
|
291
|
-
{descriptor.render()}
|
|
292
|
-
</Screen>
|
|
293
|
-
</MaybeScreen>
|
|
321
|
+
detachInactiveScreens={detachInactiveScreens}
|
|
322
|
+
drawerPosition={drawerPosition}
|
|
323
|
+
layout={dimensions}
|
|
324
|
+
/>
|
|
294
325
|
);
|
|
295
326
|
})}
|
|
296
327
|
</MaybeScreenContainer>
|