@react-navigation/drawer 7.3.8 → 7.3.9

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.
Files changed (43) hide show
  1. package/package.json +9 -6
  2. package/lib/commonjs/index.js +0 -89
  3. package/lib/commonjs/index.js.map +0 -1
  4. package/lib/commonjs/navigators/createDrawerNavigator.js +0 -53
  5. package/lib/commonjs/navigators/createDrawerNavigator.js.map +0 -1
  6. package/lib/commonjs/package.json +0 -1
  7. package/lib/commonjs/types.js +0 -6
  8. package/lib/commonjs/types.js.map +0 -1
  9. package/lib/commonjs/utils/DrawerPositionContext.js +0 -11
  10. package/lib/commonjs/utils/DrawerPositionContext.js.map +0 -1
  11. package/lib/commonjs/utils/DrawerStatusContext.js +0 -11
  12. package/lib/commonjs/utils/DrawerStatusContext.js.map +0 -1
  13. package/lib/commonjs/utils/addCancelListener.js +0 -19
  14. package/lib/commonjs/utils/addCancelListener.js.map +0 -1
  15. package/lib/commonjs/utils/addCancelListener.native.js +0 -15
  16. package/lib/commonjs/utils/addCancelListener.native.js.map +0 -1
  17. package/lib/commonjs/utils/getDrawerStatusFromState.js +0 -14
  18. package/lib/commonjs/utils/getDrawerStatusFromState.js.map +0 -1
  19. package/lib/commonjs/utils/useDrawerStatus.js +0 -22
  20. package/lib/commonjs/utils/useDrawerStatus.js.map +0 -1
  21. package/lib/commonjs/views/DrawerContent.js +0 -33
  22. package/lib/commonjs/views/DrawerContent.js.map +0 -1
  23. package/lib/commonjs/views/DrawerContentScrollView.js +0 -47
  24. package/lib/commonjs/views/DrawerContentScrollView.js.map +0 -1
  25. package/lib/commonjs/views/DrawerItem.js +0 -121
  26. package/lib/commonjs/views/DrawerItem.js.map +0 -1
  27. package/lib/commonjs/views/DrawerItemList.js +0 -73
  28. package/lib/commonjs/views/DrawerItemList.js.map +0 -1
  29. package/lib/commonjs/views/DrawerToggleButton.js +0 -41
  30. package/lib/commonjs/views/DrawerToggleButton.js.map +0 -1
  31. package/lib/commonjs/views/DrawerView.js +0 -290
  32. package/lib/commonjs/views/DrawerView.js.map +0 -1
  33. package/lib/commonjs/views/ScreenFallback.js +0 -53
  34. package/lib/commonjs/views/ScreenFallback.js.map +0 -1
  35. package/lib/commonjs/views/assets/toggle-drawer-icon.png +0 -0
  36. package/lib/commonjs/views/assets/toggle-drawer-icon@1x.android.png +0 -0
  37. package/lib/commonjs/views/assets/toggle-drawer-icon@1x.ios.png +0 -0
  38. package/lib/commonjs/views/assets/toggle-drawer-icon@2x.android.png +0 -0
  39. package/lib/commonjs/views/assets/toggle-drawer-icon@2x.ios.png +0 -0
  40. package/lib/commonjs/views/assets/toggle-drawer-icon@3x.android.png +0 -0
  41. package/lib/commonjs/views/assets/toggle-drawer-icon@3x.ios.png +0 -0
  42. package/lib/commonjs/views/assets/toggle-drawer-icon@4x.android.png +0 -0
  43. package/lib/commonjs/views/assets/toggle-drawer-icon@4x.ios.png +0 -0
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.3.8",
4
+ "version": "7.3.9",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -24,6 +24,7 @@
24
24
  "homepage": "https://reactnavigation.org/docs/drawer-navigator/",
25
25
  "source": "./src/index.tsx",
26
26
  "main": "./lib/module/index.js",
27
+ "types": "./lib/typescript/src/index.d.ts",
27
28
  "exports": {
28
29
  ".": {
29
30
  "types": "./lib/typescript/src/index.d.ts",
@@ -45,14 +46,15 @@
45
46
  "clean": "del lib"
46
47
  },
47
48
  "dependencies": {
48
- "@react-navigation/elements": "^2.3.7",
49
+ "@react-navigation/elements": "^2.3.8",
49
50
  "color": "^4.2.3",
50
- "react-native-drawer-layout": "^4.1.5",
51
+ "react-native-drawer-layout": "^4.1.6",
51
52
  "use-latest-callback": "^0.2.1"
52
53
  },
53
54
  "devDependencies": {
55
+ "@babel/core": "^7.24.0",
54
56
  "@jest/globals": "^29.7.0",
55
- "@react-navigation/native": "^7.1.5",
57
+ "@react-navigation/native": "^7.1.6",
56
58
  "@testing-library/react-native": "^12.8.1",
57
59
  "@types/react": "~18.3.12",
58
60
  "del-cli": "^5.1.0",
@@ -63,10 +65,11 @@
63
65
  "react-native-reanimated": "~3.16.1",
64
66
  "react-native-safe-area-context": "4.12.0",
65
67
  "react-native-screens": "^4.3.0",
68
+ "react-test-renderer": "18.2.0",
66
69
  "typescript": "^5.5.2"
67
70
  },
68
71
  "peerDependencies": {
69
- "@react-navigation/native": "^7.1.5",
72
+ "@react-navigation/native": "^7.1.6",
70
73
  "react": ">= 18.2.0",
71
74
  "react-native": "*",
72
75
  "react-native-gesture-handler": ">= 2.0.0",
@@ -92,5 +95,5 @@
92
95
  ]
93
96
  ]
94
97
  },
95
- "gitHead": "f81cdb021eae329286a4416b54a9902376f8b41d"
98
+ "gitHead": "174dd433d7c7bdd13958c8527760a688e64ab478"
96
99
  }
@@ -1,89 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DrawerContent", {
7
- enumerable: true,
8
- get: function () {
9
- return _DrawerContent.DrawerContent;
10
- }
11
- });
12
- Object.defineProperty(exports, "DrawerContentScrollView", {
13
- enumerable: true,
14
- get: function () {
15
- return _DrawerContentScrollView.DrawerContentScrollView;
16
- }
17
- });
18
- Object.defineProperty(exports, "DrawerItem", {
19
- enumerable: true,
20
- get: function () {
21
- return _DrawerItem.DrawerItem;
22
- }
23
- });
24
- Object.defineProperty(exports, "DrawerItemList", {
25
- enumerable: true,
26
- get: function () {
27
- return _DrawerItemList.DrawerItemList;
28
- }
29
- });
30
- Object.defineProperty(exports, "DrawerProgressContext", {
31
- enumerable: true,
32
- get: function () {
33
- return _reactNativeDrawerLayout.DrawerProgressContext;
34
- }
35
- });
36
- Object.defineProperty(exports, "DrawerStatusContext", {
37
- enumerable: true,
38
- get: function () {
39
- return _DrawerStatusContext.DrawerStatusContext;
40
- }
41
- });
42
- Object.defineProperty(exports, "DrawerToggleButton", {
43
- enumerable: true,
44
- get: function () {
45
- return _DrawerToggleButton.DrawerToggleButton;
46
- }
47
- });
48
- Object.defineProperty(exports, "DrawerView", {
49
- enumerable: true,
50
- get: function () {
51
- return _DrawerView.DrawerView;
52
- }
53
- });
54
- Object.defineProperty(exports, "createDrawerNavigator", {
55
- enumerable: true,
56
- get: function () {
57
- return _createDrawerNavigator.createDrawerNavigator;
58
- }
59
- });
60
- Object.defineProperty(exports, "getDrawerStatusFromState", {
61
- enumerable: true,
62
- get: function () {
63
- return _getDrawerStatusFromState.getDrawerStatusFromState;
64
- }
65
- });
66
- Object.defineProperty(exports, "useDrawerProgress", {
67
- enumerable: true,
68
- get: function () {
69
- return _reactNativeDrawerLayout.useDrawerProgress;
70
- }
71
- });
72
- Object.defineProperty(exports, "useDrawerStatus", {
73
- enumerable: true,
74
- get: function () {
75
- return _useDrawerStatus.useDrawerStatus;
76
- }
77
- });
78
- var _createDrawerNavigator = require("./navigators/createDrawerNavigator.js");
79
- var _DrawerContent = require("./views/DrawerContent.js");
80
- var _DrawerContentScrollView = require("./views/DrawerContentScrollView.js");
81
- var _DrawerItem = require("./views/DrawerItem.js");
82
- var _DrawerItemList = require("./views/DrawerItemList.js");
83
- var _DrawerToggleButton = require("./views/DrawerToggleButton.js");
84
- var _DrawerView = require("./views/DrawerView.js");
85
- var _DrawerStatusContext = require("./utils/DrawerStatusContext.js");
86
- var _getDrawerStatusFromState = require("./utils/getDrawerStatusFromState.js");
87
- var _useDrawerStatus = require("./utils/useDrawerStatus.js");
88
- var _reactNativeDrawerLayout = require("react-native-drawer-layout");
89
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_createDrawerNavigator","require","_DrawerContent","_DrawerContentScrollView","_DrawerItem","_DrawerItemList","_DrawerToggleButton","_DrawerView","_DrawerStatusContext","_getDrawerStatusFromState","_useDrawerStatus","_reactNativeDrawerLayout"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAKA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,yBAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,wBAAA,GAAAV,OAAA","ignoreList":[]}
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createDrawerNavigator = createDrawerNavigator;
7
- var _native = require("@react-navigation/native");
8
- var _DrawerView = require("../views/DrawerView.js");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- function DrawerNavigator({
11
- id,
12
- initialRouteName,
13
- defaultStatus = 'closed',
14
- backBehavior,
15
- children,
16
- layout,
17
- screenListeners,
18
- screenOptions,
19
- screenLayout,
20
- UNSTABLE_router,
21
- ...rest
22
- }) {
23
- const {
24
- state,
25
- descriptors,
26
- navigation,
27
- NavigationContent
28
- } = (0, _native.useNavigationBuilder)(_native.DrawerRouter, {
29
- id,
30
- initialRouteName,
31
- defaultStatus,
32
- backBehavior,
33
- children,
34
- layout,
35
- screenListeners,
36
- screenOptions,
37
- screenLayout,
38
- UNSTABLE_router
39
- });
40
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavigationContent, {
41
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerView.DrawerView, {
42
- ...rest,
43
- defaultStatus: defaultStatus,
44
- state: state,
45
- descriptors: descriptors,
46
- navigation: navigation
47
- })
48
- });
49
- }
50
- function createDrawerNavigator(config) {
51
- return (0, _native.createNavigatorFactory)(DrawerNavigator)(config);
52
- }
53
- //# sourceMappingURL=createDrawerNavigator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_native","require","_DrawerView","_jsxRuntime","DrawerNavigator","id","initialRouteName","defaultStatus","backBehavior","children","layout","screenListeners","screenOptions","screenLayout","UNSTABLE_router","rest","state","descriptors","navigation","NavigationContent","useNavigationBuilder","DrawerRouter","jsx","DrawerView","createDrawerNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../src","sources":["navigators/createDrawerNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAmBA,IAAAC,WAAA,GAAAD,OAAA;AAAiD,IAAAE,WAAA,GAAAF,OAAA;AAEjD,SAASG,eAAeA,CAAC;EACvBC,EAAE;EACFC,gBAAgB;EAChBC,aAAa,GAAG,QAAQ;EACxBC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,aAAa;EACbC,YAAY;EACZC,eAAe;EACf,GAAGC;AACiB,CAAC,EAAE;EACvB,MAAM;IAAEC,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GACzD,IAAAC,4BAAoB,EAMlBC,oBAAY,EAAE;IACdhB,EAAE;IACFC,gBAAgB;IAChBC,aAAa;IACbC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC,YAAY;IACZC;EACF,CAAC,CAAC;EAEJ,oBACE,IAAAX,WAAA,CAAAmB,GAAA,EAACH,iBAAiB;IAAAV,QAAA,eAChB,IAAAN,WAAA,CAAAmB,GAAA,EAACpB,WAAA,CAAAqB,UAAU;MAAA,GACLR,IAAI;MACRR,aAAa,EAAEA,aAAc;MAC7BS,KAAK,EAAEA,KAAM;MACbC,WAAW,EAAEA,WAAY;MACzBC,UAAU,EAAEA;IAAW,CACxB;EAAC,CACe,CAAC;AAExB;AAEO,SAASM,qBAAqBA,CAmBnCC,MAAe,EAAmC;EAClD,OAAO,IAAAC,8BAAsB,EAACtB,eAAe,CAAC,CAACqB,MAAM,CAAC;AACxD","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"type":"commonjs"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":"","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerPositionContext = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
- const DrawerPositionContext = exports.DrawerPositionContext = /*#__PURE__*/React.createContext(undefined);
11
- //# sourceMappingURL=DrawerPositionContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DrawerPositionContext","exports","createContext","undefined"],"sourceRoot":"../../../src","sources":["utils/Draw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tDC,SAAS,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerStatusContext = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
- const DrawerStatusContext = exports.DrawerStatusContext = /*#__PURE__*/React.createContext(undefined);
11
- //# sourceMappingURL=DrawerStatusContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DrawerStatusContext","exports","createContext","undefined"],"sourceRoot":"../../../src","sources":["utils/DrawerStatusContext.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAExB,MAAMW,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,gBAAGvB,KAAK,CAACyB,aAAa,CAEpDC,SAAS,CAAC","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.addCancelListener = void 0;
7
- const addCancelListener = callback => {
8
- const handleEscape = e => {
9
- if (e.key === 'Escape') {
10
- callback();
11
- }
12
- };
13
- document?.body?.addEventListener?.('keyup', handleEscape);
14
- return () => {
15
- document?.body?.removeEventListener?.('keyup', handleEscape);
16
- };
17
- };
18
- exports.addCancelListener = addCancelListener;
19
- //# sourceMappingURL=addCancelListener.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["addCancelListener","callback","handleEscape","e","key","document","body","addEventListener","removeEventListener","exports"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.tsx"],"mappings":";;;;;;AAAO,MAAMA,iBAAiB,GAAIC,QAAuB,IAAK;EAC5D,MAAMC,YAAY,GAAIC,CAAgB,IAAK;IACzC,IAAIA,CAAC,CAACC,GAAG,KAAK,QAAQ,EAAE;MACtBH,QAAQ,CAAC,CAAC;IACZ;EACF,CAAC;EAEDI,QAAQ,EAAEC,IAAI,EAAEC,gBAAgB,GAAG,OAAO,EAAEL,YAAY,CAAC;EAEzD,OAAO,MAAM;IACXG,QAAQ,EAAEC,IAAI,EAAEE,mBAAmB,GAAG,OAAO,EAAEN,YAAY,CAAC;EAC9D,CAAC;AACH,CAAC;AAACO,OAAA,CAAAT,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","addCancelListener","callback","subscription","BackHandler","addEventListener","remove","exports"],"sourceRoot":"../../../src","sources":["utils/addCancelListener.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,iBAAiB,GAAIC,QAAuB,IAAK;EAC5D,MAAMC,YAAY,GAAGC,wBAAW,CAACC,gBAAgB,CAC/C,mBAAmB,EACnBH,QACF,CAAC;EAED,OAAO,MAAM;IACXC,YAAY,CAACG,MAAM,CAAC,CAAC;EACvB,CAAC;AACH,CAAC;AAACC,OAAA,CAAAN,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getDrawerStatusFromState = getDrawerStatusFromState;
7
- function getDrawerStatusFromState(state) {
8
- if (state.history == null) {
9
- throw new Error("Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?");
10
- }
11
- const entry = state.history.find(it => it.type === 'drawer');
12
- return entry?.status ?? state.default ?? 'closed';
13
- }
14
- //# sourceMappingURL=getDrawerStatusFromState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getDrawerStatusFromState","state","history","Error","entry","find","it","type","status","default"],"sourceRoot":"../../../src","sources":["utils/getDrawerStatusFromState.tsx"],"mappings":";;;;;;AAMO,SAASA,wBAAwBA,CACtCC,KAA2C,EAC7B;EACd,IAAIA,KAAK,CAACC,OAAO,IAAI,IAAI,EAAE;IACzB,MAAM,IAAIC,KAAK,CACb,sGACF,CAAC;EACH;EAEA,MAAMC,KAAK,GAAGH,KAAK,CAACC,OAAO,CAACG,IAAI,CAAEC,EAAE,IAAKA,EAAE,CAACC,IAAI,KAAK,QAAQ,CAEhD;EAEb,OAAOH,KAAK,EAAEI,MAAM,IAAIP,KAAK,CAACQ,OAAO,IAAI,QAAQ;AACnD","ignoreList":[]}
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useDrawerStatus = useDrawerStatus;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _DrawerStatusContext = require("./DrawerStatusContext.js");
9
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
- /**
12
- * Hook to detect if the drawer's status in a parent navigator.
13
- * Returns 'open' if the drawer is open, 'closed' if the drawer is closed.
14
- */
15
- function useDrawerStatus() {
16
- const drawerStatus = React.useContext(_DrawerStatusContext.DrawerStatusContext);
17
- if (drawerStatus === undefined) {
18
- throw new Error("Couldn't find a drawer. Is your component inside a drawer navigator?");
19
- }
20
- return drawerStatus;
21
- }
22
- //# sourceMappingURL=useDrawerStatus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_DrawerStatusContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useDrawerStatus","drawerStatus","useContext","DrawerStatusContext","undefined","Error"],"sourceRoot":"../../../src","sources":["utils/useDrawerStatus.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAA4D,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAE5D;AACA;AACA;AACA;AACO,SAASW,eAAeA,CAAA,EAAiB;EAC9C,MAAMC,YAAY,GAAGzB,KAAK,CAAC0B,UAAU,CAACC,wCAAmB,CAAC;EAE1D,IAAIF,YAAY,KAAKG,SAAS,EAAE;IAC9B,MAAM,IAAIC,KAAK,CACb,sEACF,CAAC;EACH;EAEA,OAAOJ,YAAY;AACrB","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerContent = DrawerContent;
7
- var _DrawerContentScrollView = require("./DrawerContentScrollView.js");
8
- var _DrawerItemList = require("./DrawerItemList.js");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- function DrawerContent({
11
- descriptors,
12
- state,
13
- ...rest
14
- }) {
15
- const focusedRoute = state.routes[state.index];
16
- const focusedDescriptor = descriptors[focusedRoute.key];
17
- const focusedOptions = focusedDescriptor.options;
18
- const {
19
- drawerContentStyle,
20
- drawerContentContainerStyle
21
- } = focusedOptions;
22
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerContentScrollView.DrawerContentScrollView, {
23
- ...rest,
24
- contentContainerStyle: drawerContentContainerStyle,
25
- style: drawerContentStyle,
26
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerItemList.DrawerItemList, {
27
- descriptors: descriptors,
28
- state: state,
29
- ...rest
30
- })
31
- });
32
- }
33
- //# sourceMappingURL=DrawerContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_DrawerContentScrollView","require","_DrawerItemList","_jsxRuntime","DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle","jsx","DrawerContentScrollView","contentContainerStyle","style","children","DrawerItemList"],"sourceRoot":"../../../src","sources":["views/DrawerContent.tsx"],"mappings":";;;;;;AACA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAAkD,IAAAE,WAAA,GAAAF,OAAA;AAE3C,SAASG,aAAaA,CAAC;EAC5BC,WAAW;EACXC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACI,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IAAEC,kBAAkB;IAAEC;EAA4B,CAAC,GAAGH,cAAc;EAE1E,oBACE,IAAAV,WAAA,CAAAc,GAAA,EAACjB,wBAAA,CAAAkB,uBAAuB;IAAA,GAClBX,IAAI;IACRY,qBAAqB,EAAEH,2BAA4B;IACnDI,KAAK,EAAEL,kBAAmB;IAAAM,QAAA,eAE1B,IAAAlB,WAAA,CAAAc,GAAA,EAACf,eAAA,CAAAoB,cAAc;MAACjB,WAAW,EAAEA,WAAY;MAACC,KAAK,EAAEA,KAAM;MAAA,GAAKC;IAAI,CAAG;EAAC,CAC7C,CAAC;AAE9B","ignoreList":[]}
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerContentScrollView = void 0;
7
- var _native = require("@react-navigation/native");
8
- var React = _interopRequireWildcard(require("react"));
9
- var _reactNative = require("react-native");
10
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
11
- var _DrawerPositionContext = require("../utils/DrawerPositionContext.js");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- const SPACING = 12;
16
- function DrawerContentScrollViewInner({
17
- contentContainerStyle,
18
- style,
19
- children,
20
- ...rest
21
- }, ref) {
22
- const drawerPosition = React.useContext(_DrawerPositionContext.DrawerPositionContext);
23
- const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
24
- const {
25
- direction
26
- } = (0, _native.useLocale)();
27
- const isRight = direction === 'rtl' ? drawerPosition === 'left' : drawerPosition === 'right';
28
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
29
- ...rest,
30
- ref: ref,
31
- contentContainerStyle: [{
32
- paddingTop: SPACING + insets.top,
33
- paddingBottom: SPACING + insets.bottom,
34
- paddingStart: SPACING + (!isRight ? insets.left : 0),
35
- paddingEnd: SPACING + (isRight ? insets.right : 0)
36
- }, contentContainerStyle],
37
- style: [styles.container, style],
38
- children: children
39
- });
40
- }
41
- const DrawerContentScrollView = exports.DrawerContentScrollView = /*#__PURE__*/React.forwardRef(DrawerContentScrollViewInner);
42
- const styles = _reactNative.StyleSheet.create({
43
- container: {
44
- flex: 1
45
- }
46
- });
47
- //# sourceMappingURL=DrawerContentScrollView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_native","require","React","_interopRequireWildcard","_reactNative","_reactNativeSafeAreaContext","_DrawerPositionContext","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SPACING","DrawerContentScrollViewInner","contentContainerStyle","style","children","rest","ref","drawerPosition","useContext","DrawerPositionContext","insets","useSafeAreaInsets","direction","useLocale","isRight","jsx","ScrollView","paddingTop","top","paddingBottom","bottom","paddingStart","left","paddingEnd","right","styles","container","DrawerContentScrollView","exports","forwardRef","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerContentScrollView.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AAEA,IAAAK,sBAAA,GAAAL,OAAA;AAAuE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EA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K,KAAK,GACfL,cAAc,KAAK,MAAM,GACzBA,cAAc,KAAK,OAAO;EAEhC,oBACE,IAAA5B,WAAA,CAAAoC,GAAA,EAACvC,YAAA,CAAAwC,UAAU;IAAA,GACLX,IAAI;IACRC,GAAG,EAAEA,GAAI;IACTJ,qBAAqB,EAAE,CACrB;MACEe,UAAU,EAAEjB,OAAO,GAAGU,MAAM,CAACQ,GAAG;MAChCC,aAAa,EAAEnB,OAAO,GAAGU,MAAM,CAACU,MAAM;MACtCC,YAAY,EAAErB,OAAO,IAAI,CAACc,OAAO,GAAGJ,MAAM,CAACY,IAAI,GAAG,CAAC,CAAC;MACpDC,UAAU,EAAEvB,OAAO,IAAIc,OAAO,GAAGJ,MAAM,CAACc,KAAK,GAAG,CAAC;IACnD,CAAC,EACDtB,qBAAqB,CACrB;IACFC,KAAK,EAAE,CAACsB,MAAM,CAACC,SAAS,EAAEvB,KAAK,CAAE;IAAAC,QAAA,EAEhCA;EAAQ,CACC,CAAC;AAEjB;AAEO,MAAMuB,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,gBAAGrD,KAAK,CAACuD,UAAU,CACrD5B,4BACF,CAAC;AAED,MAAMwB,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,121 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerItem = DrawerItem;
7
- var _elements = require("@react-navigation/elements");
8
- var _native = require("@react-navigation/native");
9
- var _color = _interopRequireDefault(require("color"));
10
- var React = _interopRequireWildcard(require("react"));
11
- var _reactNative = require("react-native");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- /**
17
- * A component used to show an action item with an icon and a label in a navigation drawer.
18
- */
19
- function DrawerItem(props) {
20
- const {
21
- colors,
22
- fonts
23
- } = (0, _native.useTheme)();
24
- const {
25
- href,
26
- icon,
27
- label,
28
- labelStyle,
29
- focused = false,
30
- allowFontScaling,
31
- activeTintColor = colors.primary,
32
- // eslint-disable-next-line @eslint-react/no-unstable-default-props
33
- inactiveTintColor = (0, _color.default)(colors.text).alpha(0.68).rgb().string(),
34
- // eslint-disable-next-line @eslint-react/no-unstable-default-props
35
- activeBackgroundColor = (0, _color.default)(activeTintColor).alpha(0.12).rgb().string(),
36
- inactiveBackgroundColor = 'transparent',
37
- style,
38
- onPress,
39
- pressColor,
40
- pressOpacity = 1,
41
- testID,
42
- accessibilityLabel,
43
- ...rest
44
- } = props;
45
- const {
46
- borderRadius = 56
47
- } = _reactNative.StyleSheet.flatten(style || {});
48
- const color = focused ? activeTintColor : inactiveTintColor;
49
- const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor;
50
- const iconNode = icon ? icon({
51
- size: 24,
52
- focused,
53
- color
54
- }) : null;
55
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
56
- collapsable: false,
57
- ...rest,
58
- style: [styles.container, {
59
- borderRadius,
60
- backgroundColor
61
- }, style],
62
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.PlatformPressable, {
63
- testID: testID,
64
- onPress: onPress,
65
- accessibilityLabel: accessibilityLabel,
66
- accessibilityRole: "button",
67
- accessibilityState: {
68
- selected: focused
69
- },
70
- pressColor: pressColor,
71
- pressOpacity: pressOpacity,
72
- hoverEffect: {
73
- color
74
- },
75
- href: href,
76
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
77
- style: [styles.wrapper, {
78
- borderRadius
79
- }],
80
- children: [iconNode, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
81
- style: [styles.label, {
82
- marginStart: iconNode ? 12 : 0
83
- }],
84
- children: typeof label === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Text, {
85
- numberOfLines: 1,
86
- allowFontScaling: allowFontScaling,
87
- style: [styles.labelText, {
88
- color
89
- }, fonts.medium, labelStyle],
90
- children: label
91
- }) : label({
92
- color,
93
- focused
94
- })
95
- })]
96
- })
97
- })
98
- });
99
- }
100
- const styles = _reactNative.StyleSheet.create({
101
- container: {
102
- overflow: 'hidden'
103
- },
104
- wrapper: {
105
- flexDirection: 'row',
106
- alignItems: 'center',
107
- paddingVertical: 11,
108
- paddingStart: 16,
109
- paddingEnd: 24
110
- },
111
- label: {
112
- marginEnd: 12,
113
- marginVertical: 4,
114
- flex: 1
115
- },
116
- labelText: {
117
- lineHeight: 24,
118
- textAlignVertical: 'center'
119
- }
120
- });
121
- //# sourceMappingURL=DrawerItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_elements","require","_native","_color","_interopRequireDefault","React","_interopRequireWildcard","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DrawerItem","props","colors","fonts","useTheme","href","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","Color","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","style","onPress","pressColor","pressOpacity","testID","accessibilityLabel","rest","borderRadius","StyleSheet","flatten","color","backgroundColor","iconNode","size","jsx","View","collapsable","styles","container","children","PlatformPressable","accessibilityRole","accessibilityState","selected","hoverEffect","jsxs","wrapper","marginStart","Text","numberOfLines","labelText","medium","create","overflow","flexDirection","alignItems","paddingVertical","paddingStart","paddingEnd","marginEnd","marginVertical","flex","lineHeight","textAlignVertical"],"sourceRoot":"../../../src","sources":["views/DrawerItem.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAMsB,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAA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AAC,CAAE;UAAAO,QAAA,EAC7D,OAAOjC,KAAK,KAAK,QAAQ,gBACxB,IAAA5B,WAAA,CAAAwD,GAAA,EAAChE,SAAA,CAAA8E,IAAI;YACHC,aAAa,EAAE,CAAE;YACjBxC,gBAAgB,EAAEA,gBAAiB;YACnCW,KAAK,EAAE,CAACiB,MAAM,CAACa,SAAS,EAAE;cAAEpB;YAAM,CAAC,EAAE5B,KAAK,CAACiD,MAAM,EAAE5C,UAAU,CAAE;YAAAgC,QAAA,EAE9DjC;UAAK,CACF,CAAC,GAEPA,KAAK,CAAC;YAAEwB,KAAK;YAAEtB;UAAQ,CAAC;QACzB,CACG,CAAC;MAAA,CACH;IAAC,CACU;EAAC,CAChB,CAAC;AAEX;AAEA,MAAM6B,MAAM,GAAGT,uBAAU,CAACwB,MAAM,CAAC;EAC/Bd,SAAS,EAAE;IACTe,QAAQ,EAAE;EACZ,CAAC;EACDP,OAAO,EAAE;IACPQ,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,EAAE;IACnBC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC;EACDpD,KAAK,EAAE;IACLqD,SAAS,EAAE,EAAE;IACbC,cAAc,EAAE,CAAC;IACjBC,IAAI,EAAE;EACR,CAAC;EACDX,SAAS,EAAE;IACTY,UAAU,EAAE,EAAE;IACdC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerItemList = DrawerItemList;
7
- var _native = require("@react-navigation/native");
8
- var React = _interopRequireWildcard(require("react"));
9
- var _DrawerItem = require("./DrawerItem.js");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- /**
14
- * Component that renders the navigation list in the drawer.
15
- */
16
- function DrawerItemList({
17
- state,
18
- navigation,
19
- descriptors
20
- }) {
21
- const {
22
- buildHref
23
- } = (0, _native.useLinkBuilder)();
24
- const focusedRoute = state.routes[state.index];
25
- const focusedDescriptor = descriptors[focusedRoute.key];
26
- const focusedOptions = focusedDescriptor.options;
27
- const {
28
- drawerActiveTintColor,
29
- drawerInactiveTintColor,
30
- drawerActiveBackgroundColor,
31
- drawerInactiveBackgroundColor
32
- } = focusedOptions;
33
- return state.routes.map((route, i) => {
34
- const focused = i === state.index;
35
- const onPress = () => {
36
- const event = navigation.emit({
37
- type: 'drawerItemPress',
38
- target: route.key,
39
- canPreventDefault: true
40
- });
41
- if (!event.defaultPrevented) {
42
- navigation.dispatch({
43
- ...(focused ? _native.DrawerActions.closeDrawer() : _native.CommonActions.navigate(route)),
44
- target: state.key
45
- });
46
- }
47
- };
48
- const {
49
- title,
50
- drawerLabel,
51
- drawerIcon,
52
- drawerLabelStyle,
53
- drawerItemStyle,
54
- drawerAllowFontScaling
55
- } = descriptors[route.key].options;
56
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerItem.DrawerItem, {
57
- route: route,
58
- href: buildHref(route.name, route.params),
59
- label: drawerLabel !== undefined ? drawerLabel : title !== undefined ? title : route.name,
60
- icon: drawerIcon,
61
- focused: focused,
62
- activeTintColor: drawerActiveTintColor,
63
- inactiveTintColor: drawerInactiveTintColor,
64
- activeBackgroundColor: drawerActiveBackgroundColor,
65
- inactiveBackgroundColor: drawerInactiveBackgroundColor,
66
- allowFontScaling: drawerAllowFontScaling,
67
- labelStyle: drawerLabelStyle,
68
- style: drawerItemStyle,
69
- onPress: onPress
70
- }, route.key);
71
- });
72
- }
73
- //# sourceMappingURL=DrawerItemList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_native","require","React","_interopRequireWildcard","_DrawerItem","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DrawerItemList","state","navigation","descriptors","buildHref","useLinkBuilder","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerActiveTintColor","drawerInactiveTintColor","drawerActiveBackgroundColor","drawerInactiveBackgroundColor","map","route","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","DrawerActions","closeDrawer","CommonActions","navigate","title","drawerLabel","drawerIcon","drawerLabelStyle","drawerItemStyle","drawerAllowFontScaling","jsx","DrawerItem","href","name","params","label","undefined","icon","activeTintColor","inactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","allowFontScaling","labelStyle","style"],"sourceRoot":"../../../src","sources":["views/DrawerItemList.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,WAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,U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EjC,6BAA8B;MACvDkC,gBAAgB,EAAEb,sBAAuB;MACzCc,UAAU,EAAEhB,gBAAiB;MAC7BiB,KAAK,EAAEhB,eAAgB;MACvBhB,OAAO,EAAEA;IAAQ,GAnBZF,KAAK,CAACR,GAoBZ,CAAC;EAEN,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerToggleButton = DrawerToggleButton;
7
- var _elements = require("@react-navigation/elements");
8
- var _native = require("@react-navigation/native");
9
- var _reactNative = require("react-native");
10
- var _toggleDrawerIcon = _interopRequireDefault(require("./assets/toggle-drawer-icon.png"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- function DrawerToggleButton({
14
- tintColor,
15
- accessibilityLabel = 'Show navigation menu',
16
- imageSource = _toggleDrawerIcon.default,
17
- ...rest
18
- }) {
19
- const navigation = (0, _native.useNavigation)();
20
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.HeaderButton, {
21
- ...rest,
22
- accessibilityLabel: accessibilityLabel,
23
- onPress: () => navigation.dispatch(_native.DrawerActions.toggleDrawer()),
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
25
- resizeMode: "contain",
26
- source: imageSource,
27
- fadeDuration: 0,
28
- tintColor: tintColor,
29
- style: styles.icon
30
- })
31
- });
32
- }
33
- const styles = _reactNative.StyleSheet.create({
34
- icon: {
35
- height: 24,
36
- width: 24,
37
- marginVertical: 8,
38
- marginHorizontal: 5
39
- }
40
- });
41
- //# sourceMappingURL=DrawerToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_elements","require","_native","_reactNative","_toggleDrawerIcon","_interopRequireDefault","_jsxRuntime","e","__esModule","default","DrawerToggleButton","tintColor","accessibilityLabel","imageSource","toggleDrawerIcon","rest","navigation","useNavigation","jsx","HeaderButton","onPress","dispatch","DrawerActions","toggleDrawer","children","Image","resizeMode","source","fadeDuration","style","styles","icon","StyleSheet","create","height","width","marginVertical","marginHorizontal"],"sourceRoot":"../../../src","sources":["views/DrawerToggleButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAF,OAAA;AAGA,IAAAG,iBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA+D,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUxD,SAASG,kBAAkBA,CAAC;EACjCC,SAAS;EACTC,kBAAkB,GAAG,sBAAsB;EAC3CC,WAAW,GAAGC,yBAAgB;EAC9B,GAAGC;AACE,CAAC,EAAE;EACR,MAAMC,UAAU,GAAG,IAAAC,qBAAa,EAAsC,CAAC;EAEvE,oBACE,IAAAX,WAAA,CAAAY,GAAA,EAAClB,SAAA,CAAAmB,YAAY;IAAA,GACPJ,IAAI;IACRH,kBAAkB,EAAEA,kBAAmB;IACvCQ,OAAO,EAAEA,CAAA,KAAMJ,UAAU,CAACK,QAAQ,CAACC,qBAAa,CAACC,YAAY,CAAC,CAAC,CAAE;IAAAC,QAAA,eAEjE,IAAAlB,WAAA,CAAAY,GAAA,EAACf,YAAA,CAAAsB,KAAK;MACJC,UAAU,EAAC,SAAS;MACpBC,MAAM,EAAEd,WAAY;MACpBe,YAAY,EAAE,CAAE;MAChBjB,SAAS,EAAEA,SAAU;MACrBkB,KAAK,EAAEC,MAAM,CAACC;IAAK,CACpB;EAAC,CACU,CAAC;AAEnB;AAEA,MAAMD,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,290 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DrawerView = DrawerView;
7
- var _elements = require("@react-navigation/elements");
8
- var _native = require("@react-navigation/native");
9
- var React = _interopRequireWildcard(require("react"));
10
- var _reactNative = require("react-native");
11
- var _reactNativeDrawerLayout = require("react-native-drawer-layout");
12
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
- var _useLatestCallback = _interopRequireDefault(require("use-latest-callback"));
14
- var _addCancelListener = require("../utils/addCancelListener");
15
- var _DrawerPositionContext = require("../utils/DrawerPositionContext.js");
16
- var _DrawerStatusContext = require("../utils/DrawerStatusContext.js");
17
- var _getDrawerStatusFromState = require("../utils/getDrawerStatusFromState.js");
18
- var _DrawerContent = require("./DrawerContent.js");
19
- var _DrawerToggleButton = require("./DrawerToggleButton.js");
20
- var _ScreenFallback = require("./ScreenFallback.js");
21
- var _jsxRuntime = require("react/jsx-runtime");
22
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
23
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
- const DRAWER_BORDER_RADIUS = 16;
26
- const renderDrawerContentDefault = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerContent.DrawerContent, {
27
- ...props
28
- });
29
- function DrawerViewBase({
30
- state,
31
- navigation,
32
- descriptors,
33
- defaultStatus,
34
- drawerContent = renderDrawerContentDefault,
35
- detachInactiveScreens = _reactNative.Platform.OS === 'web' || _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios'
36
- }) {
37
- const {
38
- direction
39
- } = (0, _native.useLocale)();
40
- const focusedRouteKey = state.routes[state.index].key;
41
- const {
42
- drawerHideStatusBarOnOpen,
43
- drawerPosition = direction === 'rtl' ? 'right' : 'left',
44
- drawerStatusBarAnimation,
45
- drawerStyle,
46
- drawerType = _reactNative.Platform.select({
47
- ios: 'slide',
48
- default: 'front'
49
- }),
50
- configureGestureHandler,
51
- keyboardDismissMode,
52
- overlayColor = 'rgba(0, 0, 0, 0.5)',
53
- swipeEdgeWidth,
54
- swipeEnabled = _reactNative.Platform.OS !== 'web' && _reactNative.Platform.OS !== 'windows' && _reactNative.Platform.OS !== 'macos',
55
- swipeMinDistance,
56
- overlayAccessibilityLabel
57
- } = descriptors[focusedRouteKey].options;
58
- const [loaded, setLoaded] = React.useState([focusedRouteKey]);
59
- if (!loaded.includes(focusedRouteKey)) {
60
- setLoaded([...loaded, focusedRouteKey]);
61
- }
62
- const previousRouteKeyRef = React.useRef(focusedRouteKey);
63
- React.useEffect(() => {
64
- const previousRouteKey = previousRouteKeyRef.current;
65
- if (previousRouteKey !== focusedRouteKey && descriptors[previousRouteKey]?.options.popToTopOnBlur) {
66
- const prevRoute = state.routes.find(route => route.key === previousRouteKey);
67
- if (prevRoute?.state?.type === 'stack' && prevRoute.state.key) {
68
- navigation.dispatch({
69
- ..._native.StackActions.popToTop(),
70
- target: prevRoute.state.key
71
- });
72
- }
73
- }
74
- previousRouteKeyRef.current = focusedRouteKey;
75
- }, [descriptors, focusedRouteKey, navigation, state.routes]);
76
- const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)();
77
- const {
78
- colors
79
- } = (0, _native.useTheme)();
80
- const drawerStatus = (0, _getDrawerStatusFromState.getDrawerStatusFromState)(state);
81
- const handleDrawerOpen = (0, _useLatestCallback.default)(() => {
82
- navigation.dispatch({
83
- ..._native.DrawerActions.openDrawer(),
84
- target: state.key
85
- });
86
- });
87
- const handleDrawerClose = (0, _useLatestCallback.default)(() => {
88
- navigation.dispatch({
89
- ..._native.DrawerActions.closeDrawer(),
90
- target: state.key
91
- });
92
- });
93
- const handleGestureStart = (0, _useLatestCallback.default)(() => {
94
- navigation.emit({
95
- type: 'gestureStart',
96
- target: state.key
97
- });
98
- });
99
- const handleGestureEnd = (0, _useLatestCallback.default)(() => {
100
- navigation.emit({
101
- type: 'gestureEnd',
102
- target: state.key
103
- });
104
- });
105
- const handleGestureCancel = (0, _useLatestCallback.default)(() => {
106
- navigation.emit({
107
- type: 'gestureCancel',
108
- target: state.key
109
- });
110
- });
111
- const handleTransitionStart = (0, _useLatestCallback.default)(closing => {
112
- navigation.emit({
113
- type: 'transitionStart',
114
- data: {
115
- closing
116
- },
117
- target: state.key
118
- });
119
- });
120
- const handleTransitionEnd = (0, _useLatestCallback.default)(closing => {
121
- navigation.emit({
122
- type: 'transitionEnd',
123
- data: {
124
- closing
125
- },
126
- target: state.key
127
- });
128
- });
129
- React.useEffect(() => {
130
- if (drawerStatus === defaultStatus || drawerType === 'permanent') {
131
- return;
132
- }
133
- const handleHardwareBack = () => {
134
- // We shouldn't handle the back button if the parent screen isn't focused
135
- // This will avoid the drawer overriding event listeners from a focused screen
136
- if (!navigation.isFocused()) {
137
- return false;
138
- }
139
- if (defaultStatus === 'open') {
140
- handleDrawerOpen();
141
- } else {
142
- handleDrawerClose();
143
- }
144
- return true;
145
- };
146
-
147
- // We only add the listeners when drawer opens
148
- // This way we can make sure that the listener is added as late as possible
149
- // This will make sure that our handler will run first when back button is pressed
150
- return (0, _addCancelListener.addCancelListener)(handleHardwareBack);
151
- }, [defaultStatus, drawerStatus, drawerType, handleDrawerClose, handleDrawerOpen, navigation]);
152
- const renderDrawerContent = () => {
153
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerPositionContext.DrawerPositionContext.Provider, {
154
- value: drawerPosition,
155
- children: drawerContent({
156
- state: state,
157
- navigation: navigation,
158
- descriptors: descriptors
159
- })
160
- });
161
- };
162
- const renderSceneContent = () => {
163
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenFallback.MaybeScreenContainer, {
164
- enabled: detachInactiveScreens,
165
- hasTwoStates: true,
166
- style: styles.content,
167
- children: state.routes.map((route, index) => {
168
- const descriptor = descriptors[route.key];
169
- const {
170
- lazy = true
171
- } = descriptor.options;
172
- const isFocused = state.index === index;
173
- const isPreloaded = state.preloadedRouteKeys.includes(route.key);
174
- if (lazy && !loaded.includes(route.key) && !isFocused && !isPreloaded) {
175
- // Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
176
- return null;
177
- }
178
- const {
179
- freezeOnBlur,
180
- header = ({
181
- layout,
182
- options
183
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Header, {
184
- ...options,
185
- layout: layout,
186
- title: (0, _elements.getHeaderTitle)(options, route.name),
187
- headerLeft: drawerPosition === 'left' && options.headerLeft == null ? props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerToggleButton.DrawerToggleButton, {
188
- ...props
189
- }) : options.headerLeft,
190
- headerRight: drawerPosition === 'right' && options.headerRight == null ? props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerToggleButton.DrawerToggleButton, {
191
- ...props
192
- }) : options.headerRight
193
- }),
194
- headerShown,
195
- headerStatusBarHeight,
196
- headerTransparent,
197
- sceneStyle
198
- } = descriptor.options;
199
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenFallback.MaybeScreen, {
200
- style: [_reactNative.StyleSheet.absoluteFill, {
201
- zIndex: isFocused ? 0 : -1
202
- }],
203
- visible: isFocused,
204
- enabled: detachInactiveScreens,
205
- freezeOnBlur: freezeOnBlur,
206
- shouldFreeze: !isFocused && !isPreloaded,
207
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Screen, {
208
- focused: isFocused,
209
- route: descriptor.route,
210
- navigation: descriptor.navigation,
211
- headerShown: headerShown,
212
- headerStatusBarHeight: headerStatusBarHeight,
213
- headerTransparent: headerTransparent,
214
- header: header({
215
- layout: dimensions,
216
- route: descriptor.route,
217
- navigation: descriptor.navigation,
218
- options: descriptor.options
219
- }),
220
- style: sceneStyle,
221
- children: descriptor.render()
222
- })
223
- }, route.key);
224
- })
225
- });
226
- };
227
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawerStatusContext.DrawerStatusContext.Provider, {
228
- value: drawerStatus,
229
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeDrawerLayout.Drawer, {
230
- open: drawerStatus !== 'closed',
231
- onOpen: handleDrawerOpen,
232
- onClose: handleDrawerClose,
233
- onGestureStart: handleGestureStart,
234
- onGestureEnd: handleGestureEnd,
235
- onGestureCancel: handleGestureCancel,
236
- onTransitionStart: handleTransitionStart,
237
- onTransitionEnd: handleTransitionEnd,
238
- layout: dimensions,
239
- direction: direction,
240
- configureGestureHandler: configureGestureHandler,
241
- swipeEnabled: swipeEnabled,
242
- swipeEdgeWidth: swipeEdgeWidth,
243
- swipeMinDistance: swipeMinDistance,
244
- hideStatusBarOnOpen: drawerHideStatusBarOnOpen,
245
- statusBarAnimation: drawerStatusBarAnimation,
246
- keyboardDismissMode: keyboardDismissMode,
247
- drawerType: drawerType,
248
- overlayAccessibilityLabel: overlayAccessibilityLabel,
249
- drawerPosition: drawerPosition,
250
- drawerStyle: [{
251
- backgroundColor: colors.card,
252
- width: (0, _elements.getDefaultSidebarWidth)(dimensions)
253
- }, drawerType === 'permanent' && ((_reactNative.Platform.OS === 'web' ? drawerPosition === 'right' : direction === 'rtl' && drawerPosition !== 'right' || direction !== 'rtl' && drawerPosition === 'right') ? {
254
- borderLeftColor: colors.border,
255
- borderLeftWidth: _reactNative.StyleSheet.hairlineWidth
256
- } : {
257
- borderRightColor: colors.border,
258
- borderRightWidth: _reactNative.StyleSheet.hairlineWidth
259
- }), drawerType === 'front' && (drawerPosition === 'left' ? {
260
- borderTopRightRadius: DRAWER_BORDER_RADIUS,
261
- borderBottomRightRadius: DRAWER_BORDER_RADIUS
262
- } : {
263
- borderTopLeftRadius: DRAWER_BORDER_RADIUS,
264
- borderBottomLeftRadius: DRAWER_BORDER_RADIUS
265
- }), drawerStyle],
266
- overlayStyle: {
267
- backgroundColor: overlayColor
268
- },
269
- renderDrawerContent: renderDrawerContent,
270
- children: renderSceneContent()
271
- })
272
- });
273
- }
274
- function DrawerView({
275
- navigation,
276
- ...rest
277
- }) {
278
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.SafeAreaProviderCompat, {
279
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DrawerViewBase, {
280
- navigation: navigation,
281
- ...rest
282
- })
283
- });
284
- }
285
- const styles = _reactNative.StyleSheet.create({
286
- content: {
287
- flex: 1
288
- }
289
- });
290
- //# sourceMappingURL=DrawerView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_elements","require","_native","React","_interopRequireWildcard","_reactNative","_reactNativeDrawerLayout","_reactNativeSafeAreaContext","_useLatestCallback","_interopRequireDefault","_addCancelListener","_DrawerPositionContext","_DrawerStatusContext","_getDrawerStatusFromState","_DrawerContent","_DrawerToggleButton","_ScreenFallback","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DRAWER_BORDER_RADIUS","renderDrawerContentDefault","props","jsx","DrawerContent","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","detachInactiveScreens","Platform","OS","direction","useLocale","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","configureGestureHandler","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","overlayAccessibilityLabel","options","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","popToTopOnBlur","prevRoute","find","route","type","dispatch","StackActions","popToTop","target","dimensions","useSafeAreaFrame","colors","useTheme","drawerStatus","getDrawerStatusFromState","handleDrawerOpen","useLatestCallback","DrawerActions","openDrawer","handleDrawerClose","closeDrawer","handleGestureStart","emit","handleGestureEnd","handleGestureCancel","handleTransitionStart","closing","data","handleTransitionEnd","handleHardwareBack","isFocused","addCancelListener","renderDrawerContent","DrawerPositionContext","Provider","value","children","renderSceneContent","MaybeScreenContainer","enabled","hasTwoStates","style","styles","content","map","descriptor","lazy","isPreloaded","preloadedRouteKeys","freezeOnBlur","header","layout","Header","title","getHeaderTitle","name","headerLeft","DrawerToggleButton","headerRight","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","MaybeScreen","StyleSheet","absoluteFill","zIndex","visible","shouldFreeze","Screen","focused","render","DrawerStatusContext","Drawer","open","onOpen","onClose","onGestureStart","onGestureEnd","onGestureCancel","onTransitionStart","onTransitionEnd","hideStatusBarOnOpen","statusBarAnimation","backgroundColor","card","width","getDefaultSidebarWidth","borderLeftColor","border","borderLeftWidth","hairlineWidth","borderRightColor","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","overlayStyle","DrawerView","rest","SafeAreaProviderCompat","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAOA,IAAAC,OAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAC,sBAAA,CAAAR,OAAA;AAUA,IAAAS,kBAAA,GAAAT,OAAA;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,CAAC8E,MAAM;QAC/BI,gBAAgB,EAAE7B,uBAAU,CAAC2B;MAC/B,CAAC,CAAC,EAER/G,UAAU,KAAK,OAAO,KACnBH,cAAc,KAAK,MAAM,GACtB;QACEqH,oBAAoB,EAAE1I,oBAAoB;QAC1C2I,uBAAuB,EAAE3I;MAC3B,CAAC,GACD;QACE4I,mBAAmB,EAAE5I,oBAAoB;QACzC6I,sBAAsB,EAAE7I;MAC1B,CAAC,CAAC,EACRuB,WAAW,CACX;MACFuH,YAAY,EAAE;QAAEd,eAAe,EAAEnG;MAAa,CAAE;MAChD+C,mBAAmB,EAAEA,mBAAoB;MAAAI,QAAA,EAExCC,kBAAkB,CAAC;IAAC,CACf;EAAC,CACmB,CAAC;AAEnC;AAEO,SAAS8D,UAAUA,CAAC;EAAExI,UAAU;EAAE,GAAGyI;AAAY,CAAC,EAAE;EACzD,oBACE,IAAArK,WAAA,CAAAwB,GAAA,EAACzC,SAAA,CAAAuL,sBAAsB;IAAAjE,QAAA,eACrB,IAAArG,WAAA,CAAAwB,GAAA,EAACE,cAAc;MAACE,UAAU,EAAEA,UAAW;MAAA,GAAKyI;IAAI,CAAG;EAAC,CAC9B,CAAC;AAE7B;AAEA,MAAM1D,MAAM,GAAGsB,uBAAU,CAACsC,MAAM,CAAC;EAC/B3D,OAAO,EAAE;IACP4D,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MaybeScreen = MaybeScreen;
7
- exports.MaybeScreenContainer = void 0;
8
- var _elements = require("@react-navigation/elements");
9
- var React = _interopRequireWildcard(require("react"));
10
- var _reactNative = require("react-native");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- let Screens;
15
- try {
16
- Screens = require('react-native-screens');
17
- } catch (e) {
18
- // Ignore
19
- }
20
- const MaybeScreenContainer = ({
21
- enabled,
22
- ...rest
23
- }) => {
24
- if (Screens?.screensEnabled?.()) {
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Screens.ScreenContainer, {
26
- enabled: enabled,
27
- ...rest
28
- });
29
- }
30
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
31
- ...rest
32
- });
33
- };
34
- exports.MaybeScreenContainer = MaybeScreenContainer;
35
- function MaybeScreen({
36
- visible,
37
- children,
38
- ...rest
39
- }) {
40
- if (Screens?.screensEnabled?.()) {
41
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Screens.Screen, {
42
- activityState: visible ? 2 : 0,
43
- ...rest,
44
- children: children
45
- });
46
- }
47
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.ResourceSavingView, {
48
- visible: visible,
49
- ...rest,
50
- children: children
51
- });
52
- }
53
- //# sourceMappingURL=ScreenFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_elements","require","React","_interopRequireWildcard","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Screens","MaybeScreenContainer","enabled","rest","screensEnabled","jsx","ScreenContainer","View","exports","MaybeScreen","visible","children","Screen","activityState","ResourceSavingView"],"sour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