tek-wallet 0.0.736 → 0.0.738
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/AmountGroupAndChart/index.js +13 -12
- package/dist/components/TekWallet/components/ui/Button/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +23 -31
- package/dist/components/TekWallet/components/ui/EmptyData/index.js +1 -2
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.d.ts +8 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +149 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareDrawer.d.ts +8 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareDrawer.js +21 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.d.ts +9 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +125 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +254 -0
- package/dist/components/TekWallet/components/ui/Formatter/index.js +9 -8
- package/dist/components/TekWallet/components/ui/HistorySwap/index.js +2 -3
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.d.ts +2 -1
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +9 -2
- package/dist/components/TekWallet/components/ui/LoadingLayout/index.d.ts +2 -0
- package/dist/components/TekWallet/components/ui/LoadingLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/OTP/index.d.ts +1 -0
- package/dist/components/TekWallet/components/ui/OTP/index.js +3 -1
- package/dist/components/TekWallet/components/ui/PageHeader/index.js +1 -1
- package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +4 -1
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpButton.d.ts +2 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpButton.js +53 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpView.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpView.js +80 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortGroup.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortGroup.js +64 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortTool.d.ts +11 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/{sortByBalance.js → SortTool.js} +20 -19
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.d.ts +9 -1
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +198 -86
- package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +3 -4
- package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +4 -0
- package/dist/components/TekWallet/components/ui/SvgPath/index.js +7 -3
- package/dist/components/TekWallet/components/ui/TimeText/index.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/TimeText/index.js +22 -0
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +24 -10
- package/dist/components/TekWallet/hooks/useConvertTime.d.ts +3 -0
- package/dist/components/TekWallet/hooks/useConvertTime.js +25 -0
- package/dist/components/TekWallet/hooks/useEventHandler.js +7 -10
- package/dist/components/TekWallet/hooks/useFormatter.d.ts +2 -0
- package/dist/components/TekWallet/hooks/useFormatter.js +2 -0
- package/dist/components/TekWallet/hooks/useWarningWrongPasscode.d.ts +14 -0
- package/dist/components/TekWallet/hooks/useWarningWrongPasscode.js +153 -0
- package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +5 -2
- package/dist/components/TekWallet/services/axios/authentication-by-passcode-service/index.d.ts +1 -1
- package/dist/components/TekWallet/services/axios/authentication-by-passcode-service/index.js +9 -19
- package/dist/components/TekWallet/services/axios/authentication-by-passcode-service/type.d.ts +14 -0
- package/dist/components/TekWallet/services/axios/get-deposit-fiat-info-service/getDepositFiatInfoService.d.ts +13 -0
- package/dist/components/TekWallet/services/axios/get-deposit-fiat-info-service/getDepositFiatInfoService.js +55 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.d.ts +3 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +158 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.d.ts +55 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +45 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.d.ts +2 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.js +13 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.d.ts +39 -0
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.js +65 -0
- package/dist/components/TekWallet/theme/mui/theme.js +6 -6
- package/dist/components/TekWallet/types/expose-type.d.ts +49 -0
- package/dist/components/TekWallet/utils/cn.d.ts +2 -0
- package/dist/components/TekWallet/utils/cn.js +12 -0
- package/dist/components/TekWallet/utils/formatDate.d.ts +9 -6
- package/dist/components/TekWallet/utils/formatDate.js +410 -91
- package/package.json +5 -2
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/sortByBalance.d.ts +0 -11
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
var react_1 = require("react");
|
|
20
|
+
var Accordion_1 = __importDefault(require("@mui/material/Accordion"));
|
|
21
|
+
var AccordionSummary_1 = __importDefault(require("@mui/material/AccordionSummary"));
|
|
22
|
+
var AccordionDetails_1 = __importDefault(require("@mui/material/AccordionDetails"));
|
|
23
|
+
var material_1 = require("@mui/material");
|
|
24
|
+
var Text_1 = __importDefault(require("../../Text"));
|
|
25
|
+
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
26
|
+
var PageHeader_1 = __importDefault(require("../../PageHeader"));
|
|
27
|
+
var DefaultPageLayout_1 = __importDefault(require("../../../layouts/DefaultPageLayout"));
|
|
28
|
+
var ThemeProvider_1 = require("../../../../providers/ThemeProvider");
|
|
29
|
+
var accordionData = [
|
|
30
|
+
{
|
|
31
|
+
id: "panel1",
|
|
32
|
+
title: "Things to know before swapping",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "panel2",
|
|
36
|
+
title: "Ready to dive in?",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "panel3",
|
|
40
|
+
title: "Preparing your Swap",
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
var HelpView = function (_a) {
|
|
44
|
+
var onBack = _a.onBack;
|
|
45
|
+
var _b = (0, react_1.useState)("panel1"), expanded = _b[0], setExpanded = _b[1];
|
|
46
|
+
var handleChange = function (panel) { return function (_, isExpanded) {
|
|
47
|
+
setExpanded(isExpanded ? panel : false);
|
|
48
|
+
}; };
|
|
49
|
+
var handleBack = function () {
|
|
50
|
+
onBack === null || onBack === void 0 ? void 0 : onBack();
|
|
51
|
+
handleChange("panel1");
|
|
52
|
+
};
|
|
53
|
+
var theme = (0, ThemeProvider_1.useTheme)();
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Help", overrideBack: handleBack }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: { paddingTop: "0px" }, children: (0, jsx_runtime_1.jsx)(material_1.Box, { children: accordionData.map(function (_a, index) {
|
|
55
|
+
var id = _a.id, title = _a.title;
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [index !== 0 && (0, jsx_runtime_1.jsx)(material_1.Divider, {}, "divider-".concat(id)), (0, jsx_runtime_1.jsxs)(Accordion_1.default, { expanded: expanded === id, onChange: handleChange(id), sx: {
|
|
57
|
+
backgroundColor: "#fff",
|
|
58
|
+
boxShadow: "none",
|
|
59
|
+
"&::before": { display: "none" },
|
|
60
|
+
margin: "0px 0px",
|
|
61
|
+
transition: "none",
|
|
62
|
+
transitionDuration: 0,
|
|
63
|
+
"&.Mui-expanded": {
|
|
64
|
+
margin: "0 !important",
|
|
65
|
+
marginBottom: "1rem !important",
|
|
66
|
+
},
|
|
67
|
+
}, children: [(0, jsx_runtime_1.jsx)(AccordionSummary_1.default, { sx: {
|
|
68
|
+
padding: "0px",
|
|
69
|
+
py: theme.mixins.customPadding.p16,
|
|
70
|
+
minHeight: "0 !important",
|
|
71
|
+
"&.Mui-expanded": {
|
|
72
|
+
minHeight: "0 !important",
|
|
73
|
+
},
|
|
74
|
+
"& .MuiAccordionSummary-content": {
|
|
75
|
+
my: "0 !important",
|
|
76
|
+
},
|
|
77
|
+
}, expandIcon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: "auto" }, children: (0, jsx_runtime_1.jsx)("svg", { width: "6", height: "4", viewBox: "0 0 6 4", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M3 3.85039L0 0.850391L0.7 0.150391L3 2.45039L5.3 0.150391L6 0.850391L3 3.85039Z", fill: "#121212" }) }) }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", color: "contrast", children: title }) }), (0, jsx_runtime_1.jsx)(AccordionDetails_1.default, { sx: { padding: "0px", my: "0px" }, children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.listDescription), children: [(0, jsx_runtime_1.jsx)("p", { children: "Lorem ipsum dolor sit amet consectetur. Vitae faucibus ornare lectus arcu sit sed et. Eu integer pharetra posuere lobortis varius dapibus risus. Eget viverra quis facilisis velit mattis. Risus sed egestas vitae ridiculus odio sit eu adipiscing." }), (0, jsx_runtime_1.jsx)("p", { children: "Id pulvinar aliquam quam ut sed ut pharetra turpis ipsum. Condimentum eget a interdum neque sagittis lobortis proin nisi." })] }) })] }, id)] }));
|
|
78
|
+
}) }) }) }));
|
|
79
|
+
};
|
|
80
|
+
exports.default = HelpView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SortOrder } from "./SortTool";
|
|
2
|
+
export declare enum SortByType {
|
|
3
|
+
Name = "Name",
|
|
4
|
+
Balance = "Balance"
|
|
5
|
+
}
|
|
6
|
+
interface SortGroupProps {
|
|
7
|
+
onChange: (sortBy: SortByType, sortOrder: SortOrder) => void;
|
|
8
|
+
}
|
|
9
|
+
declare function SortGroup(props: SortGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default SortGroup;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SortByType = void 0;
|
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
var material_1 = require("@mui/material");
|
|
39
|
+
var SortTool_1 = __importStar(require("./SortTool"));
|
|
40
|
+
var providers_1 = require("../../../../providers");
|
|
41
|
+
var react_1 = require("react");
|
|
42
|
+
var SortByType;
|
|
43
|
+
(function (SortByType) {
|
|
44
|
+
SortByType["Name"] = "Name";
|
|
45
|
+
SortByType["Balance"] = "Balance";
|
|
46
|
+
})(SortByType || (exports.SortByType = SortByType = {}));
|
|
47
|
+
function SortGroup(props) {
|
|
48
|
+
var onChange = props.onChange;
|
|
49
|
+
var theme = (0, providers_1.useTheme)();
|
|
50
|
+
var _a = (0, react_1.useState)(SortByType.Name), sortBy = _a[0], setSortBy = _a[1];
|
|
51
|
+
var _b = (0, react_1.useState)(SortTool_1.SortOrder.ASC), sortOrder = _b[0], setSortOrder = _b[1];
|
|
52
|
+
var handleChangeSortBy = function (sortBy, sortOrder) {
|
|
53
|
+
var sortByValue = sortBy;
|
|
54
|
+
setSortBy(sortByValue);
|
|
55
|
+
setSortOrder(sortOrder);
|
|
56
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(sortByValue, sortOrder);
|
|
57
|
+
};
|
|
58
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
59
|
+
display: theme.mixins.row,
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
mt: theme.mixins.customMargin.m16,
|
|
62
|
+
}, children: Object.values(SortByType).map(function (type) { return ((0, jsx_runtime_1.jsx)(SortTool_1.default, { name: type, onChange: handleChangeSortBy, value: sortBy === type ? sortOrder : undefined }, type)); }) }));
|
|
63
|
+
}
|
|
64
|
+
exports.default = SortGroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum SortOrder {
|
|
2
|
+
ASC = "asc",
|
|
3
|
+
DESC = "desc"
|
|
4
|
+
}
|
|
5
|
+
interface SortToolProps {
|
|
6
|
+
value?: SortOrder;
|
|
7
|
+
onChange?: (name: string, sortOrder: SortOrder) => void;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export default function SortTool(props: SortToolProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type { SortToolProps };
|
|
@@ -14,37 +14,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.default =
|
|
17
|
+
exports.SortOrder = void 0;
|
|
18
|
+
exports.default = SortTool;
|
|
19
19
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
20
|
var material_1 = require("@mui/material");
|
|
21
21
|
var Text_1 = __importDefault(require("../../Text"));
|
|
22
22
|
var SvgPath_1 = require("../../SvgPath");
|
|
23
23
|
var ThemeProvider_1 = require("../../../../providers/ThemeProvider");
|
|
24
|
-
var
|
|
25
|
-
(function (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})(
|
|
29
|
-
function
|
|
30
|
-
var
|
|
24
|
+
var SortOrder;
|
|
25
|
+
(function (SortOrder) {
|
|
26
|
+
SortOrder["ASC"] = "asc";
|
|
27
|
+
SortOrder["DESC"] = "desc";
|
|
28
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
29
|
+
function SortTool(props) {
|
|
30
|
+
var value = props.value, onChange = props.onChange, name = props.name;
|
|
31
31
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
var handleChangeSortOrder = function () {
|
|
33
|
+
if (value === SortOrder.ASC) {
|
|
34
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(name, SortOrder.DESC);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(name, SortOrder.ASC);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 0.5, onClick: handleChangeSortOrder, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { color: theme.palette.text.accent, fontWeight: theme.typography.fontWeight600 }), children: name }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-col gap-[0.8px]", children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
|
|
40
41
|
width: 8,
|
|
41
42
|
height: 5,
|
|
42
43
|
transition: "opacity 0.2s ease-in-out",
|
|
43
|
-
opacity:
|
|
44
|
+
opacity: value === SortOrder.ASC ? 0.8 : 0.5,
|
|
44
45
|
}, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
|
|
45
46
|
width: 8,
|
|
46
47
|
height: 5,
|
|
47
48
|
transition: "opacity 0.2s ease-in-out",
|
|
48
|
-
opacity:
|
|
49
|
+
opacity: value === SortOrder.DESC ? 0.8 : 0.5,
|
|
49
50
|
}, children: SvgPath_1.ARROW_DROP_DOWN })] })] }));
|
|
50
51
|
}
|
|
@@ -6,6 +6,13 @@ export interface ReceiveInternalParams extends TonTransferUrlParams {
|
|
|
6
6
|
interface ReceiveFunctionProps extends GeneralProps {
|
|
7
7
|
onClose?: UnknownFunction;
|
|
8
8
|
onOpen?: UnknownFunction;
|
|
9
|
+
functionsList?: ReceiveMethods[];
|
|
10
|
+
gotoHistory?: (method?: ReceiveMethods) => void;
|
|
11
|
+
userInfo?: {
|
|
12
|
+
nickname?: string;
|
|
13
|
+
username?: string;
|
|
14
|
+
avatar?: string;
|
|
15
|
+
};
|
|
9
16
|
}
|
|
10
17
|
export type ReceiveFunctionRef = {
|
|
11
18
|
open: () => void;
|
|
@@ -13,7 +20,8 @@ export type ReceiveFunctionRef = {
|
|
|
13
20
|
};
|
|
14
21
|
export declare enum ReceiveMethods {
|
|
15
22
|
RECEIVE_INTERNAL = "Receive internally",
|
|
16
|
-
RECEIVE_EXTERNAL = "Receive externally"
|
|
23
|
+
RECEIVE_EXTERNAL = "Receive externally",
|
|
24
|
+
RECEIVE_FIAT = "Receive fiat"
|
|
17
25
|
}
|
|
18
26
|
export declare const ReceiveFunction: import("react").ForwardRefExoticComponent<ReceiveFunctionProps & import("react").RefAttributes<ReceiveFunctionRef>>;
|
|
19
27
|
export default ReceiveFunction;
|