tek-wallet 0.0.654 → 0.0.655
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.
|
@@ -4,5 +4,5 @@ export interface RequireConnectProps extends BoxProps {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
signIn?: UnknownFunction;
|
|
6
6
|
}
|
|
7
|
-
export declare function RequireConnect({ children, signIn, component }: RequireConnectProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function RequireConnect({ children, signIn, component, sx }: RequireConnectProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default RequireConnect;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __assign = (this && this.__assign) || function () {
|
|
4
|
+
__assign = Object.assign || function(t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
return __assign.apply(this, arguments);
|
|
13
|
+
};
|
|
3
14
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
15
|
if (k2 === undefined) k2 = k;
|
|
5
16
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -47,7 +58,7 @@ var material_1 = require("@mui/material");
|
|
|
47
58
|
var AuthViewSignIn_1 = __importDefault(require("../../views/AuthViewSignIn"));
|
|
48
59
|
var ChangePasscodeView_1 = __importDefault(require("../../views/ChangePasscodeView"));
|
|
49
60
|
function RequireConnect(_a) {
|
|
50
|
-
var children = _a.children, signIn = _a.signIn, component = _a.component;
|
|
61
|
+
var children = _a.children, signIn = _a.signIn, component = _a.component, sx = _a.sx;
|
|
51
62
|
var authViewRef = (0, react_1.useRef)(null);
|
|
52
63
|
var _b = (0, useWalletData_1.default)(), isInitPasscode = _b.isInitPasscode, isSSO = _b.isSSO, isAuthenticated = _b.isAuthenticated;
|
|
53
64
|
var backAuthView = function () {
|
|
@@ -63,10 +74,10 @@ function RequireConnect(_a) {
|
|
|
63
74
|
(_a = authViewRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
64
75
|
};
|
|
65
76
|
if (!isAuthenticated) {
|
|
66
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { position: "relative" }, component: component || "div", children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView, children: (0, jsx_runtime_1.jsxs)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onClick: stopPropagation, children: [isSSO && (0, jsx_runtime_1.jsx)(AuthViewSignIn_1.default, { onBack: backAuthView, onSignIn: signIn }), !isSSO && (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView })] }) })] }) }));
|
|
77
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative" }, sx), component: component || "div", children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView, children: (0, jsx_runtime_1.jsxs)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onClick: stopPropagation, children: [isSSO && (0, jsx_runtime_1.jsx)(AuthViewSignIn_1.default, { onBack: backAuthView, onSignIn: signIn }), !isSSO && (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView })] }) })] }) }));
|
|
67
78
|
}
|
|
68
79
|
if (!isInitPasscode) {
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { position: "relative" }, component: component || "div", children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView, children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onClick: stopPropagation, children: (0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { onBack: backAuthView, isInitPasscode: true }) }) })] }) }));
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative" }, sx), component: component || "div", children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView, children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onClick: stopPropagation, children: (0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { onBack: backAuthView, isInitPasscode: true }) }) })] }) }));
|
|
70
81
|
}
|
|
71
82
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
72
83
|
}
|