tek-wallet 0.0.812 → 0.0.815
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/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +1 -1
- package/dist/components/TekWallet/components/ui/LoadingLayout/index.js +1 -1
- package/dist/components/TekWallet/components/views/NotFoundView/index.d.ts +1 -1
- package/dist/components/TekWallet/components/views/NotFoundView/index.js +7 -6
- package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +3 -1
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +11 -2
- package/package.json +1 -1
|
@@ -204,7 +204,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
204
204
|
backgroundColor: theme.palette.background.tertiary,
|
|
205
205
|
}, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { justifyContent: "center", alignItems: "center", gap: "0.75rem", width: "100%" }), children: [(0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { style: {
|
|
206
206
|
width: "100%",
|
|
207
|
-
}, useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { disabled: isLocked, value: passcode, onChange: handlePasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.CONFIRM_BY_PASSCODE }) }),
|
|
207
|
+
}, useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { disabled: isLocked, value: passcode, onChange: handlePasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.CONFIRM_BY_PASSCODE }) }), warningContent, unknownError] }) }) }) }) }));
|
|
208
208
|
});
|
|
209
209
|
ConfirmByPasscode.displayName = "ConfirmByPasscode";
|
|
210
210
|
exports.default = ConfirmByPasscode;
|
|
@@ -31,7 +31,7 @@ var LoadingLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
31
31
|
setLoading(false);
|
|
32
32
|
},
|
|
33
33
|
}); });
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, justifyContent: "center" }), overlaySx), children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { sx: { color: "black" }, size: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, justifyContent: "center", position: "absolute", inset: 0, backgroundColor: (0, material_1.alpha)(theme.palette.background.default, 0.5), borderRadius: theme.styleMixins.customRadius.r12, backdropFilter: "blur(2px)" }), overlaySx), children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { sx: { color: "black" }, size: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
35
35
|
fontSize: theme.typography.fontSize12,
|
|
36
36
|
color: "black",
|
|
37
37
|
}, children: loadingMessage })] }))] }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function NotFoundView(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare function NotFoundView(): string | number | bigint | true | Iterable<import("react").ReactNode> | Promise<import("react").AwaitedReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default NotFoundView;
|
|
@@ -6,7 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
var material_1 = require("@mui/material");
|
|
8
8
|
var Button_1 = __importDefault(require("../../ui/Button"));
|
|
9
|
+
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
10
|
+
var react_1 = require("react");
|
|
9
11
|
function NotFoundView() {
|
|
12
|
+
var NotFoundPage = (0, react_1.useContext)(TekWalletProvider_1.TekWalletContext).NotFoundPage;
|
|
13
|
+
if (NotFoundPage) {
|
|
14
|
+
return NotFoundPage;
|
|
15
|
+
}
|
|
10
16
|
var handleGoBack = function () {
|
|
11
17
|
window.history.back();
|
|
12
18
|
};
|
|
@@ -20,12 +26,7 @@ function NotFoundView() {
|
|
|
20
26
|
}, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
21
27
|
textAlign: "center",
|
|
22
28
|
maxWidth: 400,
|
|
23
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "
|
|
24
|
-
fontSize: "6rem",
|
|
25
|
-
fontWeight: "bold",
|
|
26
|
-
color: "grey.400",
|
|
27
|
-
mb: 2,
|
|
28
|
-
}, children: "404" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", sx: {
|
|
29
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", sx: {
|
|
29
30
|
fontWeight: "semibold",
|
|
30
31
|
color: "grey.700",
|
|
31
32
|
mb: 1,
|
|
@@ -23,6 +23,7 @@ export interface TekWalletProviderProps {
|
|
|
23
23
|
options?: Options;
|
|
24
24
|
onLogout?: () => void;
|
|
25
25
|
topOffset?: number;
|
|
26
|
+
NotFoundPage?: ReactNode;
|
|
26
27
|
overrideQRScanMethod?: () => Promise<string>;
|
|
27
28
|
theme?: Theme;
|
|
28
29
|
themeMode?: ThemeModes;
|
|
@@ -35,9 +36,10 @@ export interface TekWalletContextType {
|
|
|
35
36
|
theme?: Theme;
|
|
36
37
|
themeMode?: ThemeModes;
|
|
37
38
|
overrideQRScanMethod?: () => Promise<string>;
|
|
39
|
+
NotFoundPage?: ReactNode;
|
|
38
40
|
}
|
|
39
41
|
export declare const TekWalletContext: import("react").Context<TekWalletContextType>;
|
|
40
|
-
export declare function TekWalletProvider({ children, isSSO, accessToken, options, topOffset, onLogout, overrideQRScanMethod, theme, themeMode, }: TekWalletProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function TekWalletProvider({ children, isSSO, accessToken, options, topOffset, onLogout, overrideQRScanMethod, theme, themeMode, NotFoundPage, }: TekWalletProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
41
43
|
export default TekWalletProvider;
|
|
42
44
|
export declare const useWalletSetup: () => TekWalletContextType;
|
|
43
45
|
export declare const useKeyboardThemeMode: () => THEME;
|
|
@@ -32,13 +32,22 @@ var initialTekWalletContext = {
|
|
|
32
32
|
};
|
|
33
33
|
exports.TekWalletContext = (0, react_1.createContext)(initialTekWalletContext);
|
|
34
34
|
function TekWalletProvider(_a) {
|
|
35
|
-
var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options, topOffset = _a.topOffset, onLogout = _a.onLogout, overrideQRScanMethod = _a.overrideQRScanMethod, theme = _a.theme, themeMode = _a.themeMode;
|
|
35
|
+
var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options, topOffset = _a.topOffset, onLogout = _a.onLogout, overrideQRScanMethod = _a.overrideQRScanMethod, theme = _a.theme, themeMode = _a.themeMode, NotFoundPage = _a.NotFoundPage;
|
|
36
36
|
var WalletProvider = isSSO ? WalletDataProviderNoImport_1.default : WalletDataProvider_1.default;
|
|
37
37
|
var _b = (0, react_1.useState)("1"), resetTrigger = _b[0], setResetTrigger = _b[1];
|
|
38
38
|
var onDisconnect = function () {
|
|
39
39
|
setResetTrigger(function (prev) { return prev + "1"; });
|
|
40
40
|
};
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(exports.TekWalletContext.Provider, { value: {
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(exports.TekWalletContext.Provider, { value: {
|
|
42
|
+
isSSO: isSSO,
|
|
43
|
+
options: options,
|
|
44
|
+
onLogout: onLogout,
|
|
45
|
+
topOffset: topOffset,
|
|
46
|
+
overrideQRScanMethod: overrideQRScanMethod,
|
|
47
|
+
theme: theme,
|
|
48
|
+
themeMode: themeMode,
|
|
49
|
+
NotFoundPage: NotFoundPage,
|
|
50
|
+
}, children: (0, jsx_runtime_1.jsx)(WalletProvider, { accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : "", onDisconnect: onDisconnect, children: (0, jsx_runtime_1.jsx)(mui_1.default, { children: (0, jsx_runtime_1.jsx)(RealtimeProvider_1.default, { options: options, children: (0, jsx_runtime_1.jsx)(ActivitiesProvider_1.default, { children: (0, jsx_runtime_1.jsx)(ReceiveProvider_1.default, { children: (0, jsx_runtime_1.jsx)(LockTokenProvider_1.default, { children: (0, jsx_runtime_1.jsx)(WithdrawProvider_1.default, { children: (0, jsx_runtime_1.jsx)(SwapProvider_1.default, { children: (0, jsx_runtime_1.jsx)(EventHandlerProvider_1.default, { options: options, children: children }) }) }) }) }) }) }) }) }, resetTrigger) }));
|
|
42
51
|
}
|
|
43
52
|
exports.default = TekWalletProvider;
|
|
44
53
|
var useWalletSetup = function () {
|