tek-wallet 0.0.790 → 0.0.792
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/layouts/ChildPageLayout/index.d.ts +15 -0
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +50 -2
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/refresh.json +265 -0
- package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +2 -1
- package/dist/components/TekWallet/components/ui/Button/index.js +9 -1
- package/dist/components/TekWallet/components/ui/ClickEffect/index.d.ts +6 -0
- package/dist/components/TekWallet/components/ui/ClickEffect/index.js +35 -0
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +1 -2
- package/dist/components/TekWallet/components/views/AssetView/index.js +51 -6
- package/package.json +2 -1
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { GeneralProps } from "../../../types/ui";
|
|
2
2
|
import { StatusDisplayType } from "../../ui/StatusDisplay";
|
|
3
3
|
import { SxProps } from "@mui/material";
|
|
4
|
+
export interface PullToRefreshProps {
|
|
5
|
+
isPullable?: boolean;
|
|
6
|
+
canFetchMore?: boolean;
|
|
7
|
+
onRefresh: () => Promise<any>;
|
|
8
|
+
onFetchMore?: () => Promise<any>;
|
|
9
|
+
refreshingContent?: React.ReactNode;
|
|
10
|
+
pullingContent?: React.ReactNode;
|
|
11
|
+
pullDownThreshold?: number;
|
|
12
|
+
fetchMoreThreshold?: number;
|
|
13
|
+
maxPullDownDistance?: number;
|
|
14
|
+
resistance?: number;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
4
18
|
interface ChildPageLayoutProps extends GeneralProps {
|
|
5
19
|
header?: React.ReactNode;
|
|
6
20
|
footer?: React.ReactNode;
|
|
@@ -15,6 +29,7 @@ interface ChildPageLayoutProps extends GeneralProps {
|
|
|
15
29
|
header?: SxProps;
|
|
16
30
|
footer?: SxProps;
|
|
17
31
|
};
|
|
32
|
+
pullToRefreshProps?: PullToRefreshProps;
|
|
18
33
|
}
|
|
19
34
|
export type ChildPageLayoutRef = {
|
|
20
35
|
showNormal: () => void;
|
|
@@ -10,6 +10,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
13
49
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
50
|
var t = {};
|
|
15
51
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -32,10 +68,14 @@ var StatusDisplay_2 = __importDefault(require("../../ui/StatusDisplay"));
|
|
|
32
68
|
var material_1 = require("@mui/material");
|
|
33
69
|
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
34
70
|
var AppBackDrop_1 = __importDefault(require("../../ui/AppBackDrop"));
|
|
71
|
+
var react_simple_pull_to_refresh_1 = __importDefault(require("react-simple-pull-to-refresh"));
|
|
72
|
+
var lottie_react_1 = __importDefault(require("lottie-react"));
|
|
73
|
+
var refresh_json_1 = __importDefault(require("./refresh.json"));
|
|
35
74
|
var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
36
|
-
var header = props.header, footer = props.footer, children = props.children, sx = props.sx, className = props.className, classNames = props.classNames, statusMessage = props.statusMessage, sxs = props.sxs, rest = __rest(props, ["header", "footer", "children", "sx", "className", "classNames", "statusMessage", "sxs"]);
|
|
75
|
+
var header = props.header, footer = props.footer, children = props.children, sx = props.sx, className = props.className, classNames = props.classNames, statusMessage = props.statusMessage, sxs = props.sxs, pullToRefreshProps = props.pullToRefreshProps, rest = __rest(props, ["header", "footer", "children", "sx", "className", "classNames", "statusMessage", "sxs", "pullToRefreshProps"]);
|
|
37
76
|
var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
|
|
38
77
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
78
|
+
var _b = pullToRefreshProps || {}, onRefresh = _b.onRefresh, isPullable = _b.isPullable, restPullToRefreshProps = __rest(_b, ["onRefresh", "isPullable"]);
|
|
39
79
|
(0, react_1.useImperativeHandle)(ref, function () {
|
|
40
80
|
return {
|
|
41
81
|
showNormal: function () {
|
|
@@ -52,7 +92,15 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
52
92
|
},
|
|
53
93
|
};
|
|
54
94
|
});
|
|
55
|
-
|
|
95
|
+
var handleRefresh = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
return [2 /*return*/, Promise.all([new Promise(function (resolve) { return setTimeout(resolve, 1000); }), onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh()])]; // for user feel data is loading
|
|
98
|
+
});
|
|
99
|
+
}); };
|
|
100
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ ref: ref, sx: __assign({ height: "100%", width: "100%", display: "grid", gridTemplateRows: "auto 1fr auto", position: "relative", overflow: "hidden", backgroundColor: theme.palette.background.white }, sx), className: className }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.header), className: classNames === null || classNames === void 0 ? void 0 : classNames.header, children: header }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, sxs === null || sxs === void 0 ? void 0 : sxs.body), className: classNames === null || classNames === void 0 ? void 0 : classNames.body, children: [!!isPullable && ((0, jsx_runtime_1.jsx)(react_simple_pull_to_refresh_1.default, __assign({ pullingContent: null, refreshingContent: ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center pt-3", children: (0, jsx_runtime_1.jsx)(lottie_react_1.default, { animationData: refresh_json_1.default, style: {
|
|
101
|
+
width: "2.5rem",
|
|
102
|
+
height: "2.5rem",
|
|
103
|
+
} }) })) }, restPullToRefreshProps, { onRefresh: handleRefresh, children: children }))), !isPullable && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.footer), className: classNames === null || classNames === void 0 ? void 0 : classNames.footer, children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: true, hideProgress: true, message: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status, statusMessage: statusMessage === null || statusMessage === void 0 ? void 0 : statusMessage[status] }) }))] })));
|
|
56
104
|
});
|
|
57
105
|
ChildPageLayout.displayName = "ChildPageLayout";
|
|
58
106
|
exports.default = ChildPageLayout;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nm": "Cloud",
|
|
3
|
+
"ddd": 0,
|
|
4
|
+
"h": 400,
|
|
5
|
+
"w": 400,
|
|
6
|
+
"meta": { "g": "LottieFiles AE " },
|
|
7
|
+
"layers": [
|
|
8
|
+
{
|
|
9
|
+
"ty": 4,
|
|
10
|
+
"nm": "layer",
|
|
11
|
+
"sr": 1,
|
|
12
|
+
"st": 0,
|
|
13
|
+
"op": 270,
|
|
14
|
+
"ip": 0,
|
|
15
|
+
"hd": false,
|
|
16
|
+
"ddd": 0,
|
|
17
|
+
"bm": 0,
|
|
18
|
+
"hasMask": false,
|
|
19
|
+
"ao": 0,
|
|
20
|
+
"ks": {
|
|
21
|
+
"a": { "a": 0, "k": [0, 0, 0], "ix": 1 },
|
|
22
|
+
"s": { "a": 0, "k": [100, 100, 100], "ix": 6 },
|
|
23
|
+
"sk": { "a": 0, "k": 0 },
|
|
24
|
+
"p": { "a": 0, "k": [193.754, 199.967, 0], "ix": 2 },
|
|
25
|
+
"r": {
|
|
26
|
+
"a": 1,
|
|
27
|
+
"k": [
|
|
28
|
+
{ "o": { "x": 0.167, "y": 0.167 }, "i": { "x": 0.833, "y": 0.833 }, "s": [0], "t": 0 },
|
|
29
|
+
{ "s": [720], "t": 58 }
|
|
30
|
+
],
|
|
31
|
+
"ix": 10
|
|
32
|
+
},
|
|
33
|
+
"sa": { "a": 0, "k": 0 },
|
|
34
|
+
"o": { "a": 0, "k": 100, "ix": 11 }
|
|
35
|
+
},
|
|
36
|
+
"ef": [],
|
|
37
|
+
"shapes": [
|
|
38
|
+
{
|
|
39
|
+
"ty": "gr",
|
|
40
|
+
"bm": 0,
|
|
41
|
+
"hd": false,
|
|
42
|
+
"mn": "ADBE Vector Group",
|
|
43
|
+
"nm": "Group 1",
|
|
44
|
+
"ix": 1,
|
|
45
|
+
"cix": 2,
|
|
46
|
+
"np": 3,
|
|
47
|
+
"it": [
|
|
48
|
+
{
|
|
49
|
+
"ty": "sh",
|
|
50
|
+
"bm": 0,
|
|
51
|
+
"hd": false,
|
|
52
|
+
"mn": "ADBE Vector Shape - Group",
|
|
53
|
+
"nm": "Path 1",
|
|
54
|
+
"ix": 1,
|
|
55
|
+
"d": 1,
|
|
56
|
+
"ks": {
|
|
57
|
+
"a": 0,
|
|
58
|
+
"k": {
|
|
59
|
+
"c": true,
|
|
60
|
+
"i": [
|
|
61
|
+
[-0.05, 8.105],
|
|
62
|
+
[1.614, 7.934],
|
|
63
|
+
[3.187, 7.416],
|
|
64
|
+
[11.709, 10.898],
|
|
65
|
+
[14.814, 5.288],
|
|
66
|
+
[15.397, -0.831],
|
|
67
|
+
[13.593, -6.503],
|
|
68
|
+
[10.085, -10.846],
|
|
69
|
+
[3.946, -6.2],
|
|
70
|
+
[2.718, -6.781],
|
|
71
|
+
[1.397, -7.15],
|
|
72
|
+
[-0.005, -7.304],
|
|
73
|
+
[-1.378, -7.159],
|
|
74
|
+
[-2.701, -6.797],
|
|
75
|
+
[-10.067, -10.88],
|
|
76
|
+
[-13.621, -6.477],
|
|
77
|
+
[-15.419, -0.841],
|
|
78
|
+
[-14.827, 5.306],
|
|
79
|
+
[-11.693, 10.924],
|
|
80
|
+
[-6.435, 14.817],
|
|
81
|
+
[-1.612, 7.937]
|
|
82
|
+
],
|
|
83
|
+
"o": [
|
|
84
|
+
[-0.05, -8.105],
|
|
85
|
+
[-1.615, -7.936],
|
|
86
|
+
[-6.439, -14.815],
|
|
87
|
+
[-11.698, -10.916],
|
|
88
|
+
[-14.827, -5.29],
|
|
89
|
+
[-15.412, 0.843],
|
|
90
|
+
[-13.613, 6.475],
|
|
91
|
+
[-5.046, 5.424],
|
|
92
|
+
[-3.935, 6.214],
|
|
93
|
+
[-2.71, 6.793],
|
|
94
|
+
[-1.383, 7.158],
|
|
95
|
+
[-0.03, 7.304],
|
|
96
|
+
[1.353, 7.162],
|
|
97
|
+
[5.32, 13.623],
|
|
98
|
+
[10.079, 10.862],
|
|
99
|
+
[13.598, 6.517],
|
|
100
|
+
[15.405, 0.823],
|
|
101
|
+
[14.817, -5.295],
|
|
102
|
+
[11.708, -10.903],
|
|
103
|
+
[3.186, -7.417],
|
|
104
|
+
[1.613, -7.934]
|
|
105
|
+
],
|
|
106
|
+
"v": [
|
|
107
|
+
[130.064, 0.033],
|
|
108
|
+
[127.572, -24.102],
|
|
109
|
+
[120.242, -47.184],
|
|
110
|
+
[92.581, -86.301],
|
|
111
|
+
[52.192, -110.896],
|
|
112
|
+
[6.246, -117.502],
|
|
113
|
+
[-37.773, -106.249],
|
|
114
|
+
[-73.656, -79.869],
|
|
115
|
+
[-87.108, -62.329],
|
|
116
|
+
[-97.007, -42.73],
|
|
117
|
+
[-103.048, -21.722],
|
|
118
|
+
[-105.077, 0.033],
|
|
119
|
+
[-103.059, 21.79],
|
|
120
|
+
[-97.036, 42.808],
|
|
121
|
+
[-73.699, 79.979],
|
|
122
|
+
[-37.8, 106.383],
|
|
123
|
+
[6.246, 117.633],
|
|
124
|
+
[52.209, 111.003],
|
|
125
|
+
[92.595, 86.382],
|
|
126
|
+
[120.246, 47.252],
|
|
127
|
+
[127.573, 24.168]
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"ix": 2
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"ty": "sh",
|
|
135
|
+
"bm": 0,
|
|
136
|
+
"hd": false,
|
|
137
|
+
"mn": "ADBE Vector Shape - Group",
|
|
138
|
+
"nm": "Path 2",
|
|
139
|
+
"ix": 2,
|
|
140
|
+
"d": 1,
|
|
141
|
+
"ks": {
|
|
142
|
+
"a": 0,
|
|
143
|
+
"k": {
|
|
144
|
+
"c": true,
|
|
145
|
+
"i": [
|
|
146
|
+
[0.03, -8.105],
|
|
147
|
+
[1.538, -7.965],
|
|
148
|
+
[3.022, -7.555],
|
|
149
|
+
[11.215, -12.024],
|
|
150
|
+
[15.138, -7.103],
|
|
151
|
+
[17.015, -0.835],
|
|
152
|
+
[16.343, 5.924],
|
|
153
|
+
[12.847, 12.061],
|
|
154
|
+
[7.078, 16.333],
|
|
155
|
+
[1.795, 8.738],
|
|
156
|
+
[0.05, 8.906],
|
|
157
|
+
[-1.768, 8.741],
|
|
158
|
+
[-3.498, 8.179],
|
|
159
|
+
[-5.077, 7.257],
|
|
160
|
+
[-6.41, 6.043],
|
|
161
|
+
[-16.342, 5.923],
|
|
162
|
+
[-17.008, -0.831],
|
|
163
|
+
[-15.115, -7.152],
|
|
164
|
+
[-11.228, -12.007],
|
|
165
|
+
[-5.96, -15.141],
|
|
166
|
+
[-1.532, -7.963]
|
|
167
|
+
],
|
|
168
|
+
"o": [
|
|
169
|
+
[0.03, 8.105],
|
|
170
|
+
[-1.536, 7.962],
|
|
171
|
+
[-5.964, 15.139],
|
|
172
|
+
[-11.233, 11.999],
|
|
173
|
+
[-15.115, 7.135],
|
|
174
|
+
[-17.001, 0.829],
|
|
175
|
+
[-16.335, -5.922],
|
|
176
|
+
[-12.856, -12.047],
|
|
177
|
+
[-3.506, -8.175],
|
|
178
|
+
[-1.773, -8.74],
|
|
179
|
+
[0.026, -8.906],
|
|
180
|
+
[1.751, -8.749],
|
|
181
|
+
[3.487, -8.192],
|
|
182
|
+
[5.066, -7.273],
|
|
183
|
+
[12.842, -12.077],
|
|
184
|
+
[16.349, -5.939],
|
|
185
|
+
[17.023, 0.842],
|
|
186
|
+
[15.141, 7.111],
|
|
187
|
+
[11.214, 12.028],
|
|
188
|
+
[3.02, 7.556],
|
|
189
|
+
[1.538, 7.965]
|
|
190
|
+
],
|
|
191
|
+
"v": [
|
|
192
|
+
[130.064, 0.033],
|
|
193
|
+
[127.809, 24.215],
|
|
194
|
+
[121.059, 47.589],
|
|
195
|
+
[95.002, 88.789],
|
|
196
|
+
[55.059, 117.876],
|
|
197
|
+
[6.246, 130.069],
|
|
198
|
+
[-44.482, 122.496],
|
|
199
|
+
[-88.912, 95.192],
|
|
200
|
+
[-119.283, 52.033],
|
|
201
|
+
[-127.336, 26.593],
|
|
202
|
+
[-130.065, 0.033],
|
|
203
|
+
[-127.348, -26.529],
|
|
204
|
+
[-119.313, -51.979],
|
|
205
|
+
[-106.306, -75.182],
|
|
206
|
+
[-88.956, -95.169],
|
|
207
|
+
[-44.51, -122.497],
|
|
208
|
+
[6.246, -130.067],
|
|
209
|
+
[55.076, -117.85],
|
|
210
|
+
[95.017, -88.737],
|
|
211
|
+
[121.063, -47.525],
|
|
212
|
+
[127.809, -24.149]
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"ix": 2
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"ty": "gf",
|
|
220
|
+
"bm": 0,
|
|
221
|
+
"hd": false,
|
|
222
|
+
"mn": "ADBE Vector Graphic - G-Fill",
|
|
223
|
+
"nm": "Gradient Fill 1",
|
|
224
|
+
"e": { "a": 0, "k": [-99, -0.5], "ix": 6 },
|
|
225
|
+
"g": {
|
|
226
|
+
"p": 3,
|
|
227
|
+
"k": {
|
|
228
|
+
"a": 0,
|
|
229
|
+
"k": [
|
|
230
|
+
0, 0.9529411764705882, 0.9529411764705882, 0.9529411764705882, 0.5,
|
|
231
|
+
0.01568627450980392, 0.2980392156862745, 0.1843137254901961, 1,
|
|
232
|
+
0.01568627450980392, 0.2980392156862745, 0.1843137254901961, 0, 0, 0.5, 1, 1, 1
|
|
233
|
+
],
|
|
234
|
+
"ix": 9
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"t": 1,
|
|
238
|
+
"a": { "a": 0, "k": 0 },
|
|
239
|
+
"h": { "a": 0, "k": 0 },
|
|
240
|
+
"s": { "a": 0, "k": [96, 1.5], "ix": 5 },
|
|
241
|
+
"r": 1,
|
|
242
|
+
"o": { "a": 0, "k": 100, "ix": 10 }
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"ty": "tr",
|
|
246
|
+
"a": { "a": 0, "k": [0, 0], "ix": 1 },
|
|
247
|
+
"s": { "a": 0, "k": [100, 100], "ix": 3 },
|
|
248
|
+
"sk": { "a": 0, "k": 0, "ix": 4 },
|
|
249
|
+
"p": { "a": 0, "k": [0, 0], "ix": 2 },
|
|
250
|
+
"r": { "a": 0, "k": 0, "ix": 6 },
|
|
251
|
+
"sa": { "a": 0, "k": 0, "ix": 5 },
|
|
252
|
+
"o": { "a": 0, "k": 100, "ix": 7 }
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"ind": 1
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"v": "4.8.0",
|
|
261
|
+
"fr": 30,
|
|
262
|
+
"op": 60,
|
|
263
|
+
"ip": 0,
|
|
264
|
+
"assets": []
|
|
265
|
+
}
|
|
@@ -29,6 +29,7 @@ var SmartList_1 = __importDefault(require("../SmartList"));
|
|
|
29
29
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
30
30
|
var const_1 = require("../../../providers/ActivitiesProvider/const");
|
|
31
31
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
32
|
+
var ClickEffect_1 = __importDefault(require("../ClickEffect"));
|
|
32
33
|
var Status;
|
|
33
34
|
(function (Status) {
|
|
34
35
|
Status["Loading"] = "loading";
|
|
@@ -79,7 +80,7 @@ function ActivitiesTypeSlice(props) {
|
|
|
79
80
|
if (!activity)
|
|
80
81
|
return null;
|
|
81
82
|
var dataAsJson = JSON.stringify(activity);
|
|
82
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
83
|
+
return ((0, jsx_runtime_1.jsx)(ClickEffect_1.default, { children: (0, jsx_runtime_1.jsx)(ActivityItem_1.default, { data: dataAsJson, component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity/").concat(activity === null || activity === void 0 ? void 0 : activity.id) }) }, (activity === null || activity === void 0 ? void 0 : activity.id) + "-" + index + "-" + (type === null || type === void 0 ? void 0 : type.slug)));
|
|
83
84
|
}) }) }) }))] }));
|
|
84
85
|
}
|
|
85
86
|
exports.default = ActivitiesTypeSlice;
|
|
@@ -21,12 +21,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
28
|
exports.BUTTON_STATUS = void 0;
|
|
26
29
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
30
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
28
31
|
var material_1 = require("@mui/material");
|
|
29
32
|
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
33
|
+
var ClickEffect_1 = __importDefault(require("../ClickEffect"));
|
|
30
34
|
var BUTTON_STATUS;
|
|
31
35
|
(function (BUTTON_STATUS) {
|
|
32
36
|
BUTTON_STATUS["LOADING"] = "loading";
|
|
@@ -34,9 +38,13 @@ var BUTTON_STATUS;
|
|
|
34
38
|
BUTTON_STATUS["DISABLED"] = "disabled";
|
|
35
39
|
BUTTON_STATUS["ENABLED"] = "enabled";
|
|
36
40
|
})(BUTTON_STATUS || (exports.BUTTON_STATUS = BUTTON_STATUS = {}));
|
|
41
|
+
var ClickEffectButton = function (_a) {
|
|
42
|
+
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(ClickEffect_1.default, __assign({ element: "button" }, rest, { children: children })));
|
|
44
|
+
};
|
|
37
45
|
var Button = function (props) {
|
|
38
46
|
var _a = props.status, status = _a === void 0 ? BUTTON_STATUS.ENABLED : _a, rest = __rest(props, ["status"]);
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Button, __assign({ disabled: status !== BUTTON_STATUS.ENABLED }, rest, { children: props.children })));
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Button, __assign({ disabled: status !== BUTTON_STATUS.ENABLED }, rest, { component: ClickEffectButton, children: props.children })));
|
|
40
48
|
};
|
|
41
49
|
Button.displayName = "Button";
|
|
42
50
|
Button.Primary = function (props) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BoxProps } from "@mui/material";
|
|
2
|
+
export interface ClickEffectProps extends Omit<BoxProps, "component"> {
|
|
3
|
+
element?: keyof HTMLElementTagNameMap;
|
|
4
|
+
}
|
|
5
|
+
declare function ClickEffect(props: ClickEffectProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default ClickEffect;
|
|
@@ -0,0 +1,35 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
+
var t = {};
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
+
t[p] = s[p];
|
|
18
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
+
t[p[i]] = s[p[i]];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var react_1 = require("react");
|
|
28
|
+
var react_2 = require("motion/react");
|
|
29
|
+
var material_1 = require("@mui/material");
|
|
30
|
+
function ClickEffect(props) {
|
|
31
|
+
var _a = props.element, element = _a === void 0 ? "div" : _a, sx = props.sx, children = props.children, rest = __rest(props, ["element", "sx", "children"]);
|
|
32
|
+
var Component = (0, react_1.useMemo)(function () { return react_2.motion[element]; }, [element]);
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, __assign({ component: Component, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, sx: __assign({ willChange: "transform" }, sx) }, rest, { children: children })));
|
|
34
|
+
}
|
|
35
|
+
exports.default = ClickEffect;
|
|
@@ -69,9 +69,8 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
69
69
|
setIsOpen(true);
|
|
70
70
|
};
|
|
71
71
|
var close = function () {
|
|
72
|
-
var _a
|
|
72
|
+
var _a;
|
|
73
73
|
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
74
|
-
(_b = boxRef.current) === null || _b === void 0 ? void 0 : _b.click();
|
|
75
74
|
setIsOpen(false);
|
|
76
75
|
};
|
|
77
76
|
var onOpen = function () {
|
|
@@ -11,6 +11,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
|
+
function step(op) {
|
|
28
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
30
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
|
+
switch (op[0]) {
|
|
33
|
+
case 0: case 1: t = op; break;
|
|
34
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
35
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
36
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
37
|
+
default:
|
|
38
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
39
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
40
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
41
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
42
|
+
if (t[2]) _.ops.pop();
|
|
43
|
+
_.trys.pop(); continue;
|
|
44
|
+
}
|
|
45
|
+
op = body.call(thisArg, _);
|
|
46
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
47
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
14
50
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
51
|
var t = {};
|
|
16
52
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -49,9 +85,10 @@ var xhub_keyboard_1 = require("xhub-keyboard");
|
|
|
49
85
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
50
86
|
var BasicAmountGroup_1 = __importDefault(require("../../ui/BasicAmountGroup"));
|
|
51
87
|
var AssetViewHeader_1 = __importDefault(require("../../ui/AssetViewHeader"));
|
|
88
|
+
var ClickEffect_1 = __importDefault(require("../../ui/ClickEffect"));
|
|
52
89
|
var AssetView = function (props) {
|
|
53
90
|
var sx = props.sx, rest = __rest(props, ["sx"]);
|
|
54
|
-
var _a = (0, useWalletData_1.default)(), isInitPasscode = _a.isInitPasscode, masterWallet = _a.masterWallet;
|
|
91
|
+
var _a = (0, useWalletData_1.default)(), isInitPasscode = _a.isInitPasscode, masterWallet = _a.masterWallet, updateWalletDetail = _a.updateWalletDetail;
|
|
55
92
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
56
93
|
var options = (0, TekWalletProvider_1.useWalletSetup)().options;
|
|
57
94
|
var _b = options || {}, hideActivitySectionInAssetView = _b.hideActivitySectionInAssetView, useBasicAmountGroupInAssetView = _b.useBasicAmountGroupInAssetView, basePath = _b.basePath;
|
|
@@ -60,25 +97,33 @@ var AssetView = function (props) {
|
|
|
60
97
|
var handleBackInitPasscodeView = function () {
|
|
61
98
|
router.back();
|
|
62
99
|
};
|
|
63
|
-
|
|
64
|
-
|
|
100
|
+
var handleRefresh = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
return [2 /*return*/, updateWalletDetail()];
|
|
103
|
+
});
|
|
104
|
+
}); };
|
|
105
|
+
return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), pullToRefreshProps: {
|
|
106
|
+
isPullable: !!isInitPasscode,
|
|
107
|
+
onRefresh: handleRefresh,
|
|
108
|
+
}, children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { items: [
|
|
109
|
+
(0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
65
110
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
66
111
|
placeContent: "center",
|
|
67
112
|
columnSpan: 1,
|
|
68
113
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_RECEIVE", label: "Receive", sx: {
|
|
69
114
|
width: "100%",
|
|
70
115
|
} }) }) }, "receive"),
|
|
71
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
116
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
72
117
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
73
118
|
placeContent: "center",
|
|
74
119
|
columnSpan: 1,
|
|
75
120
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_WITHDRAW_FC", label: "Withdraw", sx: { width: "100%" } }) }) }, "withdraw"),
|
|
76
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
121
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
77
122
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
78
123
|
placeContent: "center",
|
|
79
124
|
columnSpan: 1,
|
|
80
125
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_TRANSFER", label: "Transfer", sx: { width: "100%" } }) }) }, "send-internal"),
|
|
81
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/swap"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
126
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/swap"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
82
127
|
placeContent: "center",
|
|
83
128
|
columnSpan: 1,
|
|
84
129
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_SWAP_FC", label: "Swap", sx: { width: "100%" } }) }) }, "swap"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tek-wallet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.792",
|
|
4
4
|
"description": "A custom React provider with TypeScript support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
52
52
|
"react-otp-input": "^3.1.1",
|
|
53
53
|
"react-qr-reader": "^3.0.0-beta-1",
|
|
54
|
+
"react-simple-pull-to-refresh": "^1.3.3",
|
|
54
55
|
"react-window": "^1.8.11",
|
|
55
56
|
"react-window-infinite-loader": "^1.0.10",
|
|
56
57
|
"styled-components": "^6.1.17",
|