@react-navigation/drawer 6.6.2 → 6.6.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.
- package/lib/commonjs/utils/addCancelListener.js +21 -0
- package/lib/commonjs/utils/addCancelListener.js.map +1 -0
- package/lib/commonjs/utils/addCancelListener.native.js +15 -0
- package/lib/commonjs/utils/addCancelListener.native.js.map +1 -0
- package/lib/commonjs/views/DrawerView.js +2 -17
- package/lib/commonjs/views/DrawerView.js.map +1 -1
- package/lib/module/utils/addCancelListener.js +14 -0
- package/lib/module/utils/addCancelListener.js.map +1 -0
- package/lib/module/utils/addCancelListener.native.js +8 -0
- package/lib/module/utils/addCancelListener.native.js.map +1 -0
- package/lib/module/views/DrawerView.js +3 -18
- package/lib/module/views/DrawerView.js.map +1 -1
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts +1 -2
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +13 -13
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/addCancelListener.d.ts +2 -0
- package/lib/typescript/src/utils/addCancelListener.d.ts.map +1 -0
- package/lib/typescript/src/utils/addCancelListener.native.d.ts +2 -0
- package/lib/typescript/src/utils/addCancelListener.native.d.ts.map +1 -0
- package/lib/typescript/src/views/DrawerContent.d.ts +0 -1
- package/lib/typescript/src/views/DrawerContent.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerItem.d.ts +1 -1
- package/lib/typescript/src/views/DrawerItem.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerItemList.d.ts +1 -1
- package/lib/typescript/src/views/DrawerItemList.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerToggleButton.d.ts +1 -2
- package/lib/typescript/src/views/DrawerToggleButton.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerView.d.ts +1 -2
- package/lib/typescript/src/views/DrawerView.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandlerNative.d.ts +0 -1
- package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
- package/lib/typescript/src/views/ScreenFallback.d.ts +1 -1
- package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -1
- package/lib/typescript/src/views/legacy/Overlay.d.ts +31 -1
- package/lib/typescript/src/views/legacy/Overlay.d.ts.map +1 -1
- package/lib/typescript/src/views/modern/Drawer.d.ts +0 -1
- package/lib/typescript/src/views/modern/Drawer.d.ts.map +1 -1
- package/lib/typescript/src/views/modern/Overlay.d.ts +31 -1
- package/lib/typescript/src/views/modern/Overlay.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/utils/addCancelListener.native.tsx +12 -0
- package/src/utils/addCancelListener.tsx +13 -0
- package/src/views/DrawerView.tsx +3 -29
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addCancelListener = void 0;
|
|
7
|
+
const addCancelListener = callback => {
|
|
8
|
+
var _document, _document$body, _document$body$addEve;
|
|
9
|
+
const handleEscape = e => {
|
|
10
|
+
if (e.key === 'Escape') {
|
|
11
|
+
callback();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
(_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : (_document$body$addEve = _document$body.addEventListener) === null || _document$body$addEve === void 0 ? void 0 : _document$body$addEve.call(_document$body, 'keyup', handleEscape);
|
|
15
|
+
return () => {
|
|
16
|
+
var _document2, _document2$body, _document2$body$remov;
|
|
17
|
+
(_document2 = document) === null || _document2 === void 0 ? void 0 : (_document2$body = _document2.body) === null || _document2$body === void 0 ? void 0 : (_document2$body$remov = _document2$body.removeEventListener) === null || _document2$body$remov === void 0 ? void 0 : _document2$body$remov.call(_document2$body, 'keyup', handleEscape);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.addCancelListener = addCancelListener;
|
|
21
|
+
//# sourceMappingURL=addCancelListener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addCancelListener","callback","handleEscape","e","key","document","body","addEventListener","removeEventListener"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.tsx"],"mappings":";;;;;;AAAO,MAAMA,iBAAiB,GAAIC,QAAuB,IAAK;EAAA;EAC5D,MAAMC,YAAY,GAAIC,CAAgB,IAAK;IACzC,IAAIA,CAAC,CAACC,GAAG,KAAK,QAAQ,EAAE;MACtBH,QAAQ,EAAE;IACZ;EACF,CAAC;EAED,aAAAI,QAAQ,gEAAR,UAAUC,IAAI,4EAAd,eAAgBC,gBAAgB,0DAAhC,2CAAmC,OAAO,EAAEL,YAAY,CAAC;EAEzD,OAAO,MAAM;IAAA;IACX,cAAAG,QAAQ,kEAAR,WAAUC,IAAI,6EAAd,gBAAgBE,mBAAmB,0DAAnC,4CAAsC,OAAO,EAAEN,YAAY,CAAC;EAC9D,CAAC;AACH,CAAC;AAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addCancelListener = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const addCancelListener = callback => {
|
|
9
|
+
const subscription = _reactNative.BackHandler.addEventListener('hardwareBackPress', callback);
|
|
10
|
+
return () => {
|
|
11
|
+
subscription.remove();
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.addCancelListener = addCancelListener;
|
|
15
|
+
//# sourceMappingURL=addCancelListener.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addCancelListener","callback","subscription","BackHandler","addEventListener","remove"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.native.tsx"],"mappings":";;;;;;AAAA;AAEO,MAAMA,iBAAiB,GAAIC,QAAuB,IAAK;EAC5D,MAAMC,YAAY,GAAGC,wBAAW,CAACC,gBAAgB,CAC/C,mBAAmB,EACnBH,QAAQ,CACT;EAED,OAAO,MAAM;IACXC,YAAY,CAACG,MAAM,EAAE;EACvB,CAAC;AACH,CAAC;AAAC"}
|
|
@@ -10,6 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
11
|
var Reanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
12
12
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
13
|
+
var _addCancelListener = require("../utils/addCancelListener");
|
|
13
14
|
var _DrawerPositionContext = _interopRequireDefault(require("../utils/DrawerPositionContext"));
|
|
14
15
|
var _DrawerStatusContext = _interopRequireDefault(require("../utils/DrawerStatusContext"));
|
|
15
16
|
var _getDrawerStatusFromState = _interopRequireDefault(require("../utils/getDrawerStatusFromState"));
|
|
@@ -114,27 +115,11 @@ function DrawerViewBase(_ref2) {
|
|
|
114
115
|
}
|
|
115
116
|
return true;
|
|
116
117
|
};
|
|
117
|
-
const handleEscape = e => {
|
|
118
|
-
if (e.key === 'Escape') {
|
|
119
|
-
handleHardwareBack();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
118
|
|
|
123
119
|
// We only add the listeners when drawer opens
|
|
124
120
|
// This way we can make sure that the listener is added as late as possible
|
|
125
121
|
// This will make sure that our handler will run first when back button is pressed
|
|
126
|
-
|
|
127
|
-
if (_reactNative.Platform.OS === 'web') {
|
|
128
|
-
var _document, _document$body, _document$body$addEve;
|
|
129
|
-
(_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : (_document$body$addEve = _document$body.addEventListener) === null || _document$body$addEve === void 0 ? void 0 : _document$body$addEve.call(_document$body, 'keyup', handleEscape);
|
|
130
|
-
}
|
|
131
|
-
return () => {
|
|
132
|
-
subscription.remove();
|
|
133
|
-
if (_reactNative.Platform.OS === 'web') {
|
|
134
|
-
var _document2, _document2$body, _document2$body$remov;
|
|
135
|
-
(_document2 = document) === null || _document2 === void 0 ? void 0 : (_document2$body = _document2.body) === null || _document2$body === void 0 ? void 0 : (_document2$body$remov = _document2$body.removeEventListener) === null || _document2$body$remov === void 0 ? void 0 : _document2$body$remov.call(_document2$body, 'keyup', handleEscape);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
122
|
+
return (0, _addCancelListener.addCancelListener)(handleHardwareBack);
|
|
138
123
|
}, [defaultStatus, drawerStatus, drawerType, handleDrawerClose, handleDrawerOpen, navigation]);
|
|
139
124
|
const renderDrawerContent = () => {
|
|
140
125
|
return /*#__PURE__*/React.createElement(_DrawerPositionContext.default.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getDefaultDrawerWidth","height","width","smallerAxisSize","Math","min","isLandscape","isTablet","appBarHeight","Platform","OS","maxWidth","GestureHandlerWrapper","GestureHandlerRootView","View","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","props","detachInactiveScreens","useLegacyImplementation","Reanimated","isConfigured","legacyImplemenationNotAvailable","require","abs","undefined","Error","Drawer","default","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","I18nManager","getConstants","isRTL","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","gestureHandlerProps","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","options","loaded","setLoaded","React","useState","includes","dimensions","useSafeAreaFrame","colors","useTheme","drawerStatus","getDrawerStatusFromState","handleDrawerOpen","useCallback","dispatch","DrawerActions","openDrawer","target","handleDrawerClose","closeDrawer","useEffect","handleHardwareBack","isFocused","
|
|
1
|
+
{"version":3,"names":["getDefaultDrawerWidth","height","width","smallerAxisSize","Math","min","isLandscape","isTablet","appBarHeight","Platform","OS","maxWidth","GestureHandlerWrapper","GestureHandlerRootView","View","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","props","detachInactiveScreens","useLegacyImplementation","Reanimated","isConfigured","legacyImplemenationNotAvailable","require","abs","undefined","Error","Drawer","default","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","I18nManager","getConstants","isRTL","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","gestureHandlerProps","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","options","loaded","setLoaded","React","useState","includes","dimensions","useSafeAreaFrame","colors","useTheme","drawerStatus","getDrawerStatusFromState","handleDrawerOpen","useCallback","dispatch","DrawerActions","openDrawer","target","handleDrawerClose","closeDrawer","useEffect","handleHardwareBack","isFocused","addCancelListener","renderDrawerContent","renderSceneContent","styles","content","map","route","descriptor","lazy","unmountOnBlur","freezeOnBlur","header","layout","getHeaderTitle","name","headerLeft","headerShown","headerStatusBarHeight","headerTransparent","sceneContainerStyle","StyleSheet","absoluteFill","zIndex","render","backgroundColor","card","borderRightColor","border","borderRightWidth","hairlineWidth","borderLeftColor","borderLeftWidth","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;;;;;AAAA;AAMA;AAOA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAqE;AAAA;AAAA;AAAA;AASrE,MAAMA,qBAAqB,GAAG,QAMxB;EAAA,IANyB;IAC7BC,MAAM;IACNC;EAIF,CAAC;EACC;AACF;AACA;AACA;AACA;EACE,MAAMC,eAAe,GAAGC,IAAI,CAACC,GAAG,CAACJ,MAAM,EAAEC,KAAK,CAAC;EAC/C,MAAMI,WAAW,GAAGJ,KAAK,GAAGD,MAAM;EAClC,MAAMM,QAAQ,GAAGJ,eAAe,IAAI,GAAG;EACvC,MAAMK,YAAY,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAIJ,WAAW,GAAG,EAAE,GAAG,EAAE,GAAI,EAAE;EACzE,MAAMK,QAAQ,GA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EAAEnB;EAAW,EACvB,CAC2B;AAEnC;AAEe,SAASiD,UAAU,QAAiC;EAAA,IAAhC;IAAE5F,UAAU;IAAE,GAAG6F;EAAY,CAAC;EAC/D,oBACE,oBAAC,gCAAsB,qBACrB,oBAAC,qBAAqB;IAAC,KAAK,EAAE9B,MAAM,CAACC;EAAQ,gBAC3C,oBAAC,cAAc;IAAC,UAAU,EAAEhE;EAAW,GAAK6F,IAAI,EAAI,CAC9B,CACD;AAE7B;AAEA,MAAM9B,MAAM,GAAGiB,uBAAU,CAACc,MAAM,CAAC;EAC/B9B,OAAO,EAAE;IACP+B,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const addCancelListener = callback => {
|
|
2
|
+
var _document, _document$body, _document$body$addEve;
|
|
3
|
+
const handleEscape = e => {
|
|
4
|
+
if (e.key === 'Escape') {
|
|
5
|
+
callback();
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
(_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : (_document$body$addEve = _document$body.addEventListener) === null || _document$body$addEve === void 0 ? void 0 : _document$body$addEve.call(_document$body, 'keyup', handleEscape);
|
|
9
|
+
return () => {
|
|
10
|
+
var _document2, _document2$body, _document2$body$remov;
|
|
11
|
+
(_document2 = document) === null || _document2 === void 0 ? void 0 : (_document2$body = _document2.body) === null || _document2$body === void 0 ? void 0 : (_document2$body$remov = _document2$body.removeEventListener) === null || _document2$body$remov === void 0 ? void 0 : _document2$body$remov.call(_document2$body, 'keyup', handleEscape);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=addCancelListener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addCancelListener","callback","handleEscape","e","key","document","body","addEventListener","removeEventListener"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.tsx"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,GAAIC,QAAuB,IAAK;EAAA;EAC5D,MAAMC,YAAY,GAAIC,CAAgB,IAAK;IACzC,IAAIA,CAAC,CAACC,GAAG,KAAK,QAAQ,EAAE;MACtBH,QAAQ,EAAE;IACZ;EACF,CAAC;EAED,aAAAI,QAAQ,gEAAR,UAAUC,IAAI,4EAAd,eAAgBC,gBAAgB,0DAAhC,2CAAmC,OAAO,EAAEL,YAAY,CAAC;EAEzD,OAAO,MAAM;IAAA;IACX,cAAAG,QAAQ,kEAAR,WAAUC,IAAI,6EAAd,gBAAgBE,mBAAmB,0DAAnC,4CAAsC,OAAO,EAAEN,YAAY,CAAC;EAC9D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BackHandler } from 'react-native';
|
|
2
|
+
export const addCancelListener = callback => {
|
|
3
|
+
const subscription = BackHandler.addEventListener('hardwareBackPress', callback);
|
|
4
|
+
return () => {
|
|
5
|
+
subscription.remove();
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=addCancelListener.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BackHandler","addCancelListener","callback","subscription","addEventListener","remove"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.native.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,cAAc;AAE1C,OAAO,MAAMC,iBAAiB,GAAIC,QAAuB,IAAK;EAC5D,MAAMC,YAAY,GAAGH,WAAW,CAACI,gBAAgB,CAC/C,mBAAmB,EACnBF,QAAQ,CACT;EAED,OAAO,MAAM;IACXC,YAAY,CAACE,MAAM,EAAE;EACvB,CAAC;AACH,CAAC"}
|
|
@@ -2,9 +2,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
|
|
3
3
|
import { DrawerActions, useTheme } from '@react-navigation/native';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { I18nManager, Platform, StyleSheet, View } from 'react-native';
|
|
6
6
|
import * as Reanimated from 'react-native-reanimated';
|
|
7
7
|
import { useSafeAreaFrame } from 'react-native-safe-area-context';
|
|
8
|
+
import { addCancelListener } from '../utils/addCancelListener';
|
|
8
9
|
import DrawerPositionContext from '../utils/DrawerPositionContext';
|
|
9
10
|
import DrawerStatusContext from '../utils/DrawerStatusContext';
|
|
10
11
|
import getDrawerStatusFromState from '../utils/getDrawerStatusFromState';
|
|
@@ -105,27 +106,11 @@ function DrawerViewBase(_ref2) {
|
|
|
105
106
|
}
|
|
106
107
|
return true;
|
|
107
108
|
};
|
|
108
|
-
const handleEscape = e => {
|
|
109
|
-
if (e.key === 'Escape') {
|
|
110
|
-
handleHardwareBack();
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
109
|
|
|
114
110
|
// We only add the listeners when drawer opens
|
|
115
111
|
// This way we can make sure that the listener is added as late as possible
|
|
116
112
|
// This will make sure that our handler will run first when back button is pressed
|
|
117
|
-
|
|
118
|
-
if (Platform.OS === 'web') {
|
|
119
|
-
var _document, _document$body, _document$body$addEve;
|
|
120
|
-
(_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : (_document$body$addEve = _document$body.addEventListener) === null || _document$body$addEve === void 0 ? void 0 : _document$body$addEve.call(_document$body, 'keyup', handleEscape);
|
|
121
|
-
}
|
|
122
|
-
return () => {
|
|
123
|
-
subscription.remove();
|
|
124
|
-
if (Platform.OS === 'web') {
|
|
125
|
-
var _document2, _document2$body, _document2$body$remov;
|
|
126
|
-
(_document2 = document) === null || _document2 === void 0 ? void 0 : (_document2$body = _document2.body) === null || _document2$body === void 0 ? void 0 : (_document2$body$remov = _document2$body.removeEventListener) === null || _document2$body$remov === void 0 ? void 0 : _document2$body$remov.call(_document2$body, 'keyup', handleEscape);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
113
|
+
return addCancelListener(handleHardwareBack);
|
|
129
114
|
}, [defaultStatus, drawerStatus, drawerType, handleDrawerClose, handleDrawerOpen, navigation]);
|
|
130
115
|
const renderDrawerContent = () => {
|
|
131
116
|
return /*#__PURE__*/React.createElement(DrawerPositionContext.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","DrawerActions","useTheme","React","
|
|
1
|
+
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","DrawerActions","useTheme","React","I18nManager","Platform","StyleSheet","View","Reanimated","useSafeAreaFrame","addCancelListener","DrawerPositionContext","DrawerStatusContext","getDrawerStatusFromState","DrawerContent","DrawerToggleButton","GestureHandlerRootView","MaybeScreen","MaybeScreenContainer","getDefaultDrawerWidth","height","width","smallerAxisSize","Math","min","isLandscape","isTablet","appBarHeight","OS","maxWidth","GestureHandlerWrapper","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","props","detachInactiveScreens","useLegacyImplementation","isConfigured","legacyImplemenationNotAvailable","require","abs","undefined","Error","Drawer","default","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","getConstants","isRTL","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","gestureHandlerProps","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","options","loaded","setLoaded","useState","includes","dimensions","colors","drawerStatus","handleDrawerOpen","useCallback","dispatch","openDrawer","target","handleDrawerClose","closeDrawer","useEffect","handleHardwareBack","isFocused","renderDrawerContent","renderSceneContent","styles","content","map","route","descriptor","lazy","unmountOnBlur","freezeOnBlur","header","layout","name","headerLeft","headerShown","headerStatusBarHeight","headerTransparent","sceneContainerStyle","absoluteFill","zIndex","render","backgroundColor","card","borderRightColor","border","borderRightWidth","hairlineWidth","borderLeftColor","borderLeftWidth","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";AAAA,S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AAC,UAAU,EAAExD;EAAW,GAAKmF,IAAI,EAAI,CAC9B,CACD;AAE7B;AAEA,MAAM5B,MAAM,GAAGlF,UAAU,CAAC+G,MAAM,CAAC;EAC/B5B,OAAO,EAAE;IACP6B,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DefaultNavigatorOptions, DrawerNavigationState, DrawerRouterOptions, ParamListBase } from '@react-navigation/native';
|
|
3
2
|
import type { DrawerNavigationConfig, DrawerNavigationEventMap, DrawerNavigationOptions } from '../types';
|
|
4
|
-
|
|
3
|
+
type Props = DefaultNavigatorOptions<ParamListBase, DrawerNavigationState<ParamListBase>, DrawerNavigationOptions, DrawerNavigationEventMap> & DrawerRouterOptions & DrawerNavigationConfig;
|
|
5
4
|
declare function DrawerNavigator({ id, initialRouteName, defaultStatus: customDefaultStatus, backBehavior, children, screenListeners, screenOptions, ...restWithDeprecated }: Props): JSX.Element;
|
|
6
5
|
declare const _default: <ParamList extends ParamListBase>() => import("@react-navigation/native").TypedNavigator<ParamList, DrawerNavigationState<ParamListBase>, DrawerNavigationOptions, DrawerNavigationEventMap, typeof DrawerNavigator>;
|
|
7
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDrawerNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createDrawerNavigator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createDrawerNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createDrawerNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EAEvB,qBAAqB,EAErB,mBAAmB,EAEnB,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAGlB,KAAK,KAAK,GAAG,uBAAuB,CAClC,aAAa,EACb,qBAAqB,CAAC,aAAa,CAAC,EACpC,uBAAuB,EACvB,wBAAwB,CACzB,GACC,mBAAmB,GACnB,sBAAsB,CAAC;AAEzB,iBAAS,eAAe,CAAC,EACvB,EAAE,EACF,gBAAgB,EAChB,aAAa,EAAE,mBAAmB,EAClC,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,aAAa,EACb,GAAG,kBAAkB,EACtB,EAAE,KAAK,eAiGP;;AAED,wBAKmB"}
|
|
@@ -3,16 +3,16 @@ import type { HeaderOptions } from '@react-navigation/elements';
|
|
|
3
3
|
import type { Descriptor, DrawerActionHelpers, DrawerNavigationState, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp } from '@react-navigation/native';
|
|
4
4
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
5
5
|
import type { PanGestureHandler, PanGestureHandlerProperties } from 'react-native-gesture-handler';
|
|
6
|
-
export
|
|
6
|
+
export type Scene = {
|
|
7
7
|
route: Route<string>;
|
|
8
8
|
focused: boolean;
|
|
9
9
|
color?: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type Layout = {
|
|
12
12
|
width: number;
|
|
13
13
|
height: number;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type DrawerNavigationConfig = {
|
|
16
16
|
/**
|
|
17
17
|
* Function that returns React element to render as the content of the drawer, for example, navigation items.
|
|
18
18
|
* Defaults to `DrawerContent`.
|
|
@@ -35,7 +35,7 @@ export declare type DrawerNavigationConfig = {
|
|
|
35
35
|
*/
|
|
36
36
|
useLegacyImplementation?: boolean;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type DrawerNavigationOptions = HeaderOptions & {
|
|
39
39
|
/**
|
|
40
40
|
* Title text for the screen.
|
|
41
41
|
*/
|
|
@@ -186,12 +186,12 @@ export declare type DrawerNavigationOptions = HeaderOptions & {
|
|
|
186
186
|
*/
|
|
187
187
|
freezeOnBlur?: boolean;
|
|
188
188
|
};
|
|
189
|
-
export
|
|
189
|
+
export type DrawerContentComponentProps = {
|
|
190
190
|
state: DrawerNavigationState<ParamListBase>;
|
|
191
191
|
navigation: DrawerNavigationHelpers;
|
|
192
192
|
descriptors: DrawerDescriptorMap;
|
|
193
193
|
};
|
|
194
|
-
export
|
|
194
|
+
export type DrawerHeaderProps = {
|
|
195
195
|
/**
|
|
196
196
|
* Layout of the screen.
|
|
197
197
|
*/
|
|
@@ -209,7 +209,7 @@ export declare type DrawerHeaderProps = {
|
|
|
209
209
|
*/
|
|
210
210
|
navigation: DrawerNavigationProp<ParamListBase>;
|
|
211
211
|
};
|
|
212
|
-
export
|
|
212
|
+
export type DrawerNavigationEventMap = {
|
|
213
213
|
/**
|
|
214
214
|
* Event which fires on tapping on the item in the drawer menu.
|
|
215
215
|
*/
|
|
@@ -218,15 +218,15 @@ export declare type DrawerNavigationEventMap = {
|
|
|
218
218
|
canPreventDefault: true;
|
|
219
219
|
};
|
|
220
220
|
};
|
|
221
|
-
export
|
|
222
|
-
export
|
|
223
|
-
export
|
|
221
|
+
export type DrawerNavigationHelpers = NavigationHelpers<ParamListBase, DrawerNavigationEventMap> & DrawerActionHelpers<ParamListBase>;
|
|
222
|
+
export type DrawerNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, DrawerNavigationState<ParamList>, DrawerNavigationOptions, DrawerNavigationEventMap> & DrawerActionHelpers<ParamList>;
|
|
223
|
+
export type DrawerScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList, NavigatorID extends string | undefined = undefined> = {
|
|
224
224
|
navigation: DrawerNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
225
225
|
route: RouteProp<ParamList, RouteName>;
|
|
226
226
|
};
|
|
227
|
-
export
|
|
228
|
-
export
|
|
229
|
-
export
|
|
227
|
+
export type DrawerDescriptor = Descriptor<DrawerNavigationOptions, DrawerNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
|
|
228
|
+
export type DrawerDescriptorMap = Record<string, DrawerDescriptor>;
|
|
229
|
+
export type DrawerProps = {
|
|
230
230
|
dimensions: {
|
|
231
231
|
width: number;
|
|
232
232
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAEtC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IAAE,K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"AAAA,eAAO,MAAM,iBAAiB,aAAc,MAAM,OAAO,eAYxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addCancelListener.native.d.ts","sourceRoot":"","sources":["../../../../src/utils/addCancelListener.native.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,aAAc,MAAM,OAAO,eASxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,eAgB7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,SAAS,EAGT,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,
|
|
1
|
+
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,SAAS,EAGT,SAAS,EAET,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,EACD,MAAM,GACN,CAAC,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IACtE;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA0DF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,KAAK,eA8E9C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DrawerNavigationState, ParamListBase } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types';
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
5
|
state: DrawerNavigationState<ParamListBase>;
|
|
6
6
|
navigation: DrawerNavigationHelpers;
|
|
7
7
|
descriptors: DrawerDescriptorMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerItemList.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItemList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAG7E,
|
|
1
|
+
{"version":3,"file":"DrawerItemList.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItemList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAG7E,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,sEAmEP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"AAWA,KAAK,KAAK,GAAG;IACX,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAuBvE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DrawerNavigationState, DrawerStatus, ParamListBase } from '@react-navigation/native';
|
|
3
2
|
import type { DrawerDescriptorMap, DrawerNavigationConfig, DrawerNavigationHelpers } from '../types';
|
|
4
|
-
|
|
3
|
+
type Props = DrawerNavigationConfig & {
|
|
5
4
|
defaultStatus: DrawerStatus;
|
|
6
5
|
state: DrawerNavigationState<ParamListBase>;
|
|
7
6
|
navigation: DrawerNavigationHelpers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,qBAAqB,EACrB,YAAY,EACZ,aAAa,EAEd,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAEV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAGxB,MAAM,UAAU,CAAC;AAUlB,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;AAoQF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAQhE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PanGestureHandlerProperties } from 'react-native-gesture-handler';
|
|
3
2
|
export declare function PanGestureHandler(props: PanGestureHandlerProperties): JSX.Element;
|
|
4
3
|
export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAItC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,2BAA2B,eAQnE;AAED,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,sBAAsB,EACtB,KAAK,IAAI,YAAY,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE,
|
|
1
|
+
{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAUF,eAAO,MAAM,oBAAoB;aAItB,OAAO;kBACF,OAAO;cACX,MAAM,SAAS;iBAO1B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,eAchE"}
|
|
@@ -4,6 +4,7 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
4
4
|
children?: React.ReactNode | Animated.Node<React.ReactNode>;
|
|
5
5
|
removeClippedSubviews?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
6
6
|
hitSlop?: import("react-native").Insets | Animated.Node<import("react-native").Insets | undefined> | undefined;
|
|
7
|
+
id?: string | Animated.Node<string | undefined> | undefined;
|
|
7
8
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.Node<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
8
9
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | Animated.Node<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
9
10
|
testID?: string | Animated.Node<string | undefined> | undefined;
|
|
@@ -37,6 +38,18 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
37
38
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
38
39
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
39
40
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
41
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
42
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
43
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
44
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
45
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
46
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
47
|
+
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
48
|
+
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
49
|
+
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
50
|
+
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
51
|
+
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
52
|
+
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
40
53
|
accessible?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
41
54
|
accessibilityActions?: readonly Readonly<{
|
|
42
55
|
name: string;
|
|
@@ -46,19 +59,36 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
46
59
|
label?: string | undefined;
|
|
47
60
|
}>[] | undefined> | undefined;
|
|
48
61
|
accessibilityLabel?: string | Animated.Node<string | undefined> | undefined;
|
|
62
|
+
'aria-label'?: string | Animated.Node<string | undefined> | undefined;
|
|
49
63
|
accessibilityRole?: import("react-native").AccessibilityRole | Animated.Node<import("react-native").AccessibilityRole | undefined> | undefined;
|
|
50
64
|
accessibilityState?: import("react-native").AccessibilityState | Animated.Node<import("react-native").AccessibilityState | undefined> | undefined;
|
|
65
|
+
'aria-busy'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
66
|
+
'aria-checked'?: boolean | "mixed" | Animated.Node<boolean | "mixed" | undefined> | undefined;
|
|
67
|
+
'aria-disabled'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
68
|
+
'aria-expanded'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
69
|
+
'aria-selected'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
70
|
+
'aria-labelledby'?: string | Animated.Node<string | undefined> | undefined;
|
|
51
71
|
accessibilityHint?: string | Animated.Node<string | undefined> | undefined;
|
|
52
72
|
accessibilityValue?: import("react-native").AccessibilityValue | Animated.Node<import("react-native").AccessibilityValue | undefined> | undefined;
|
|
73
|
+
'aria-valuemax'?: number | Animated.Node<number | undefined> | undefined;
|
|
74
|
+
'aria-valuemin'?: number | Animated.Node<number | undefined> | undefined;
|
|
75
|
+
'aria-valuenow'?: number | Animated.Node<number | undefined> | undefined;
|
|
76
|
+
'aria-valuetext'?: string | Animated.Node<string | undefined> | undefined;
|
|
53
77
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | Animated.Node<((event: import("react-native").AccessibilityActionEvent) => void) | undefined> | undefined;
|
|
54
|
-
accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.Node<"none" | "polite" | "assertive" | undefined> | undefined;
|
|
55
78
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | Animated.Node<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
|
|
79
|
+
'aria-hidden'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
80
|
+
'aria-live'?: "polite" | "assertive" | "off" | Animated.Node<"polite" | "assertive" | "off" | undefined> | undefined;
|
|
81
|
+
'aria-modal'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
82
|
+
role?: import("react-native").Role | Animated.Node<import("react-native").Role | undefined> | undefined;
|
|
83
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.Node<"none" | "polite" | "assertive" | undefined> | undefined;
|
|
84
|
+
accessibilityLabelledBy?: string | string[] | Animated.Node<string | string[] | undefined> | undefined;
|
|
56
85
|
accessibilityElementsHidden?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
57
86
|
accessibilityViewIsModal?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
58
87
|
onAccessibilityEscape?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
59
88
|
onAccessibilityTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
60
89
|
onMagicTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
61
90
|
accessibilityIgnoresInvertColors?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
91
|
+
accessibilityLanguage?: string | Animated.Node<string | undefined> | undefined;
|
|
62
92
|
} & {
|
|
63
93
|
style?: import("react-native").StyleProp<Animated.AnimateStyle<import("react-native").StyleProp<import("react-native").ViewStyle>>>;
|
|
64
94
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../../src/views/legacy/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAqB/C,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../../src/views/legacy/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAqB/C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cALD,aAAa,CAAC,MAAM,CAAC;aACtB,MAAM,IAAI;;uCA8CnB,CAAC;AAqBH,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DrawerProps } from '../../types';
|
|
3
2
|
export default function Drawer({ dimensions, drawerPosition, drawerStyle, drawerType, gestureHandlerProps, hideStatusBarOnOpen, keyboardDismissMode, onClose, onOpen, open, overlayStyle, renderDrawerContent, renderSceneContent, statusBarAnimation, swipeDistanceThreshold, swipeEdgeWidth, swipeEnabled, swipeVelocityThreshold, overlayAccessibilityLabel, }: DrawerProps): JSX.Element;
|
|
4
3
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/views/modern/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/views/modern/Drawer.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmB/C,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,UAAU,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,GAC1B,EAAE,WAAW,eAmVb"}
|
|
@@ -4,6 +4,7 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
4
4
|
children?: React.ReactNode | Animated.Node<React.ReactNode>;
|
|
5
5
|
removeClippedSubviews?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
6
6
|
hitSlop?: import("react-native").Insets | Animated.Node<import("react-native").Insets | undefined> | undefined;
|
|
7
|
+
id?: string | Animated.Node<string | undefined> | undefined;
|
|
7
8
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.Node<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
8
9
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | Animated.Node<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
9
10
|
testID?: string | Animated.Node<string | undefined> | undefined;
|
|
@@ -37,6 +38,18 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
37
38
|
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
38
39
|
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
39
40
|
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
|
|
41
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
42
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
43
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
44
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
45
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
46
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
47
|
+
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
48
|
+
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
49
|
+
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
50
|
+
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
51
|
+
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
52
|
+
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.Node<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
|
|
40
53
|
accessible?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
41
54
|
accessibilityActions?: readonly Readonly<{
|
|
42
55
|
name: string;
|
|
@@ -46,19 +59,36 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
46
59
|
label?: string | undefined;
|
|
47
60
|
}>[] | undefined> | undefined;
|
|
48
61
|
accessibilityLabel?: string | Animated.Node<string | undefined> | undefined;
|
|
62
|
+
'aria-label'?: string | Animated.Node<string | undefined> | undefined;
|
|
49
63
|
accessibilityRole?: import("react-native").AccessibilityRole | Animated.Node<import("react-native").AccessibilityRole | undefined> | undefined;
|
|
50
64
|
accessibilityState?: import("react-native").AccessibilityState | Animated.Node<import("react-native").AccessibilityState | undefined> | undefined;
|
|
65
|
+
'aria-busy'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
66
|
+
'aria-checked'?: boolean | "mixed" | Animated.Node<boolean | "mixed" | undefined> | undefined;
|
|
67
|
+
'aria-disabled'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
68
|
+
'aria-expanded'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
69
|
+
'aria-selected'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
70
|
+
'aria-labelledby'?: string | Animated.Node<string | undefined> | undefined;
|
|
51
71
|
accessibilityHint?: string | Animated.Node<string | undefined> | undefined;
|
|
52
72
|
accessibilityValue?: import("react-native").AccessibilityValue | Animated.Node<import("react-native").AccessibilityValue | undefined> | undefined;
|
|
73
|
+
'aria-valuemax'?: number | Animated.Node<number | undefined> | undefined;
|
|
74
|
+
'aria-valuemin'?: number | Animated.Node<number | undefined> | undefined;
|
|
75
|
+
'aria-valuenow'?: number | Animated.Node<number | undefined> | undefined;
|
|
76
|
+
'aria-valuetext'?: string | Animated.Node<string | undefined> | undefined;
|
|
53
77
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | Animated.Node<((event: import("react-native").AccessibilityActionEvent) => void) | undefined> | undefined;
|
|
54
|
-
accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.Node<"none" | "polite" | "assertive" | undefined> | undefined;
|
|
55
78
|
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | Animated.Node<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
|
|
79
|
+
'aria-hidden'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
80
|
+
'aria-live'?: "polite" | "assertive" | "off" | Animated.Node<"polite" | "assertive" | "off" | undefined> | undefined;
|
|
81
|
+
'aria-modal'?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
82
|
+
role?: import("react-native").Role | Animated.Node<import("react-native").Role | undefined> | undefined;
|
|
83
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.Node<"none" | "polite" | "assertive" | undefined> | undefined;
|
|
84
|
+
accessibilityLabelledBy?: string | string[] | Animated.Node<string | string[] | undefined> | undefined;
|
|
56
85
|
accessibilityElementsHidden?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
57
86
|
accessibilityViewIsModal?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
58
87
|
onAccessibilityEscape?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
59
88
|
onAccessibilityTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
60
89
|
onMagicTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
|
|
61
90
|
accessibilityIgnoresInvertColors?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
91
|
+
accessibilityLanguage?: string | Animated.Node<string | undefined> | undefined;
|
|
62
92
|
} & {
|
|
63
93
|
style?: import("react-native").StyleProp<Animated.AnimateStyle<import("react-native").StyleProp<import("react-native").ViewStyle>>>;
|
|
64
94
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../../src/views/modern/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAGN,MAAM,yBAAyB,CAAC;AAUjC,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../../src/views/modern/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAGN,MAAM,yBAAyB,CAAC;AAUjC,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cALD,SAAS,WAAW,CAAC,MAAM,CAAC;aAC7B,MAAM,IAAI;;uCAgDnB,CAAC;AAsBH,eAAe,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/drawer",
|
|
3
3
|
"description": "Drawer navigator component with animated transitions and gesturess",
|
|
4
|
-
"version": "6.6.
|
|
4
|
+
"version": "6.6.4",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@react-navigation/elements": "^1.3.
|
|
44
|
+
"@react-navigation/elements": "^1.3.19",
|
|
45
45
|
"color": "^4.2.3",
|
|
46
46
|
"warn-once": "^0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@react-navigation/native": "^6.1.
|
|
49
|
+
"@react-navigation/native": "^6.1.8",
|
|
50
50
|
"@testing-library/react-native": "^11.5.0",
|
|
51
|
-
"@types/react": "~18.0.
|
|
52
|
-
"@types/react-native": "~0.
|
|
53
|
-
"del-cli": "^
|
|
54
|
-
"react": "18.
|
|
55
|
-
"react-native": "0.
|
|
51
|
+
"@types/react": "~18.0.27",
|
|
52
|
+
"@types/react-native": "~0.71.3",
|
|
53
|
+
"del-cli": "^5.0.0",
|
|
54
|
+
"react": "18.2.0",
|
|
55
|
+
"react-native": "0.71.8",
|
|
56
56
|
"react-native-builder-bob": "^0.20.4",
|
|
57
|
-
"react-native-gesture-handler": "~2.
|
|
58
|
-
"react-native-reanimated": "~2.
|
|
59
|
-
"react-native-safe-area-context": "4.
|
|
60
|
-
"react-native-screens": "~3.
|
|
61
|
-
"typescript": "^4.
|
|
57
|
+
"react-native-gesture-handler": "~2.9.0",
|
|
58
|
+
"react-native-reanimated": "~2.14.4",
|
|
59
|
+
"react-native-safe-area-context": "4.5.0",
|
|
60
|
+
"react-native-screens": "~3.20.0",
|
|
61
|
+
"typescript": "^4.9.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@react-navigation/native": "^6.0.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
]
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "46954cec3d746aa2d9097d1b94f9e2a915d3e1c7"
|
|
87
87
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BackHandler } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const addCancelListener = (callback: () => boolean) => {
|
|
4
|
+
const subscription = BackHandler.addEventListener(
|
|
5
|
+
'hardwareBackPress',
|
|
6
|
+
callback
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
return () => {
|
|
10
|
+
subscription.remove();
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const addCancelListener = (callback: () => boolean) => {
|
|
2
|
+
const handleEscape = (e: KeyboardEvent) => {
|
|
3
|
+
if (e.key === 'Escape') {
|
|
4
|
+
callback();
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
document?.body?.addEventListener?.('keyup', handleEscape);
|
|
9
|
+
|
|
10
|
+
return () => {
|
|
11
|
+
document?.body?.removeEventListener?.('keyup', handleEscape);
|
|
12
|
+
};
|
|
13
|
+
};
|
package/src/views/DrawerView.tsx
CHANGED
|
@@ -12,13 +12,7 @@ import {
|
|
|
12
12
|
useTheme,
|
|
13
13
|
} from '@react-navigation/native';
|
|
14
14
|
import * as React from 'react';
|
|
15
|
-
import {
|
|
16
|
-
BackHandler,
|
|
17
|
-
I18nManager,
|
|
18
|
-
Platform,
|
|
19
|
-
StyleSheet,
|
|
20
|
-
View,
|
|
21
|
-
} from 'react-native';
|
|
15
|
+
import { I18nManager, Platform, StyleSheet, View } from 'react-native';
|
|
22
16
|
import * as Reanimated from 'react-native-reanimated';
|
|
23
17
|
import { useSafeAreaFrame } from 'react-native-safe-area-context';
|
|
24
18
|
|
|
@@ -31,6 +25,7 @@ import type {
|
|
|
31
25
|
DrawerNavigationProp,
|
|
32
26
|
DrawerProps,
|
|
33
27
|
} from '../types';
|
|
28
|
+
import { addCancelListener } from '../utils/addCancelListener';
|
|
34
29
|
import DrawerPositionContext from '../utils/DrawerPositionContext';
|
|
35
30
|
import DrawerStatusContext from '../utils/DrawerStatusContext';
|
|
36
31
|
import getDrawerStatusFromState from '../utils/getDrawerStatusFromState';
|
|
@@ -163,31 +158,10 @@ function DrawerViewBase({
|
|
|
163
158
|
return true;
|
|
164
159
|
};
|
|
165
160
|
|
|
166
|
-
const handleEscape = (e: KeyboardEvent) => {
|
|
167
|
-
if (e.key === 'Escape') {
|
|
168
|
-
handleHardwareBack();
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
161
|
// We only add the listeners when drawer opens
|
|
173
162
|
// This way we can make sure that the listener is added as late as possible
|
|
174
163
|
// This will make sure that our handler will run first when back button is pressed
|
|
175
|
-
|
|
176
|
-
'hardwareBackPress',
|
|
177
|
-
handleHardwareBack
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
if (Platform.OS === 'web') {
|
|
181
|
-
document?.body?.addEventListener?.('keyup', handleEscape);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return () => {
|
|
185
|
-
subscription.remove();
|
|
186
|
-
|
|
187
|
-
if (Platform.OS === 'web') {
|
|
188
|
-
document?.body?.removeEventListener?.('keyup', handleEscape);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
164
|
+
return addCancelListener(handleHardwareBack);
|
|
191
165
|
}, [
|
|
192
166
|
defaultStatus,
|
|
193
167
|
drawerStatus,
|