tek-wallet 0.0.205 → 0.0.207
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/ui/AnalyticGroup/index.js +1 -1
- package/dist/components/ui/ConfirmByPasscode/index.js +1 -1
- package/dist/components/ui/DepositFunction/index.js +8 -6
- package/dist/components/ui/EmptyData/index.d.ts +11 -0
- package/dist/components/ui/EmptyData/index.js +26 -0
- package/dist/components/ui/LineValue/index.js +1 -2
- package/dist/components/ui/TimeFilter/index.js +1 -1
- package/dist/services/axios/authentication-by-passcode-service/index.js +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
|
23
23
|
var AnalyticGroup = function (props) {
|
|
24
24
|
var theme = (0, material_1.useTheme)();
|
|
25
25
|
var sx = props.sx;
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(Text_1.default, {
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.row), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 1000000 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: "typography.fontWeight400", fontSize: "0.8em" }, children: "USD" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("bottom_arrow"), width: 8 })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, fontSize: theme.typography.fontSize12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
27
27
|
fontWeight: "typography.fontWeight500",
|
|
28
28
|
leading: "typography.lineHeight140",
|
|
29
29
|
fontSize: "typography.fontSize14",
|
|
@@ -193,7 +193,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
}); };
|
|
196
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: handleClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), !!authError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: authError }))] }) }) }) }));
|
|
196
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: handleClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), !!authError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "flex-start" }), children: authError }))] }) }) }) }));
|
|
197
197
|
});
|
|
198
198
|
ConfirmByPasscode.displayName = "ConfirmByPasscode";
|
|
199
199
|
exports.default = ConfirmByPasscode;
|
|
@@ -37,6 +37,8 @@ var TokenSelection_1 = __importDefault(require("../TokenSelection"));
|
|
|
37
37
|
var CloseModal_1 = __importDefault(require("../CloseModal"));
|
|
38
38
|
var useDepositData_1 = __importDefault(require("../../../hooks/useDepositData"));
|
|
39
39
|
var RequireConnect_1 = __importDefault(require("../RequireConnect"));
|
|
40
|
+
var WaitingData_1 = __importDefault(require("../WaitingData"));
|
|
41
|
+
var EmptyData_1 = __importDefault(require("../EmptyData"));
|
|
40
42
|
var DepositStep;
|
|
41
43
|
(function (DepositStep) {
|
|
42
44
|
DepositStep[DepositStep["SELECT_TOKEN"] = 1] = "SELECT_TOKEN";
|
|
@@ -134,12 +136,12 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
134
136
|
}, overrideBack: handleBack, hideBack: currentStep === DepositStep.SELECT_TOKEN, center: DEPOSIT_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: close }) }), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: {
|
|
135
137
|
autoHeight: true,
|
|
136
138
|
spaceBetween: 32,
|
|
137
|
-
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: [!depositTokens && (0, jsx_runtime_1.jsx)(WaitingData_1.default, {}), (depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.length) === 0 && (0, jsx_runtime_1.jsx)(EmptyData_1.default, {}), depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.map(function (item) {
|
|
140
|
+
var stringifiedTokenData = JSON.stringify(item);
|
|
141
|
+
if (!item)
|
|
142
|
+
return null;
|
|
143
|
+
return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { onClick: handleSelectToken, tokenData: stringifiedTokenData, active: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.id) === item.id }, item.id));
|
|
144
|
+
})] }) }, DepositStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: networks === null || networks === void 0 ? void 0 : networks.map(function (item) {
|
|
143
145
|
if (!item)
|
|
144
146
|
return null;
|
|
145
147
|
return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify(item), active: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.id) === item.id }, item.id));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GeneralProps, UnknownFunction } from "../../../types/ui";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface EmptyDataProps extends GeneralProps {
|
|
4
|
+
icon?: string;
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
action?: UnknownFunction;
|
|
8
|
+
actionText?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function EmptyData(props: EmptyDataProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default EmptyData;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var material_1 = require("@mui/material");
|
|
19
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
20
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
21
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
22
|
+
function EmptyData(props) {
|
|
23
|
+
var theme = (0, material_1.useTheme)();
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 48, src: props.icon }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description }), props.action && ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText }))] }));
|
|
25
|
+
}
|
|
26
|
+
exports.default = EmptyData;
|
|
@@ -21,7 +21,6 @@ var material_1 = require("@mui/material");
|
|
|
21
21
|
var LineValue = function (props) {
|
|
22
22
|
var theme = (0, material_1.useTheme)();
|
|
23
23
|
var field = props.field, value = props.value, valueDescription = props.valueDescription;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [!!field && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field })), !!value ||
|
|
25
|
-
(!!valueDescription && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [!!value && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value })), !!valueDescription && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription }))] })))] }));
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [!!field && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field })), (!!value || !!valueDescription) && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [!!value && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value })), !!valueDescription && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription }))] }))] }));
|
|
26
25
|
};
|
|
27
26
|
exports.default = LineValue;
|
|
@@ -105,7 +105,7 @@ var TimeFilter = function (_a) {
|
|
|
105
105
|
setValue(newData);
|
|
106
106
|
onChange === null || onChange === void 0 ? void 0 : onChange(newData);
|
|
107
107
|
}, []);
|
|
108
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g6 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: getTimeFilterLabel(value) }), (0, jsx_runtime_1.jsx)(material_1.ToggleButtonGroup, { defaultValue: initialValue, onChange: handleChange, sx: { gap: theme.mixins.gaps.g8 }, children: Object.values(TimeFilterType).map(function (type) {
|
|
108
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g6, alignItems: "flex-start" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: getTimeFilterLabel(value) }), (0, jsx_runtime_1.jsx)(material_1.ToggleButtonGroup, { defaultValue: initialValue, onChange: handleChange, sx: { gap: theme.mixins.gaps.g8 }, children: Object.values(TimeFilterType).map(function (type) {
|
|
109
109
|
if (hideAll && type === TimeFilterType.ALL)
|
|
110
110
|
return null;
|
|
111
111
|
return ((0, jsx_runtime_1.jsx)(material_1.ToggleButton, { "aria-label": type, value: type, sx: {
|
|
@@ -46,7 +46,7 @@ function authenticationByPasscode(body) {
|
|
|
46
46
|
var response;
|
|
47
47
|
return __generator(this, function (_a) {
|
|
48
48
|
switch (_a.label) {
|
|
49
|
-
case 0: return [4 /*yield*/, userClientRequest_1.default.post("/
|
|
49
|
+
case 0: return [4 /*yield*/, userClientRequest_1.default.post("/auth/passcode", body, {
|
|
50
50
|
headers: {
|
|
51
51
|
"c-payload-signature": "text",
|
|
52
52
|
},
|