tek-wallet 0.0.203 → 0.0.205

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.
Files changed (40) hide show
  1. package/dist/components/ui/AmountGroupAndChart/index.d.ts +5 -0
  2. package/dist/components/ui/AmountGroupAndChart/index.js +129 -0
  3. package/dist/components/ui/AnalyticGroup/index.d.ts +6 -0
  4. package/dist/components/ui/AnalyticGroup/index.js +33 -0
  5. package/dist/components/ui/ConfirmByPasscode/index.js +40 -10
  6. package/dist/components/ui/DelayMounted/index.d.ts +6 -0
  7. package/dist/components/ui/DelayMounted/index.js +18 -0
  8. package/dist/components/ui/DepositFunction/index.js +5 -1
  9. package/dist/components/ui/Formatter/index.js +7 -7
  10. package/dist/components/ui/LockToken/index.d.ts +5 -1
  11. package/dist/components/ui/LockToken/index.js +21 -2
  12. package/dist/components/ui/NeonLineChart/index.d.ts +12 -0
  13. package/dist/components/ui/NeonLineChart/index.js +179 -0
  14. package/dist/components/ui/TimeFilter/functions/getThePreviousWeekByDate.d.ts +1 -0
  15. package/dist/components/ui/TimeFilter/functions/getThePreviousWeekByDate.js +10 -0
  16. package/dist/components/ui/TimeFilter/functions/getThisDateFromLastMonthDatePicker.d.ts +1 -0
  17. package/dist/components/ui/TimeFilter/functions/getThisDateFromLastMonthDatePicker.js +10 -0
  18. package/dist/components/ui/TimeFilter/index.d.ts +19 -0
  19. package/dist/components/ui/TimeFilter/index.js +122 -0
  20. package/dist/components/ui/WithdrawFunction/index.js +1 -1
  21. package/dist/components/views/AssetView/index.js +18 -1
  22. package/dist/providers/DepositProvider/index.js +2 -2
  23. package/dist/providers/LockTokenProvider/index.js +2 -2
  24. package/dist/providers/LockTokenProvider/type.d.ts +1 -1
  25. package/dist/services/axios/authentication-by-passcode-service/index.d.ts +2 -0
  26. package/dist/services/axios/authentication-by-passcode-service/index.js +61 -0
  27. package/dist/services/axios/authentication-by-passcode-service/type.d.ts +9 -0
  28. package/dist/services/axios/{get-deposit-tokens-list → get-deposit-tokens-list-service}/index.d.ts +1 -1
  29. package/dist/services/axios/{get-deposit-tokens-list → get-deposit-tokens-list-service}/index.js +2 -2
  30. package/dist/services/axios/{get-lock-tokens-list → get-lock-tokens-list-service}/index.d.ts +1 -1
  31. package/dist/services/axios/{get-lock-tokens-list → get-lock-tokens-list-service}/index.js +2 -2
  32. package/dist/services/axios/get-lock-tokens-list-service/type.js +2 -0
  33. package/dist/theme/mui/theme.js +13 -11
  34. package/package.json +4 -1
  35. package/dist/utils/cn.d.ts +0 -2
  36. package/dist/utils/cn.js +0 -15
  37. /package/dist/services/axios/{get-lock-tokens-list → authentication-by-passcode-service}/type.js +0 -0
  38. /package/dist/services/axios/{get-config-tokens-list → get-config-tokens-list-service}/index.d.ts +0 -0
  39. /package/dist/services/axios/{get-config-tokens-list → get-config-tokens-list-service}/index.js +0 -0
  40. /package/dist/services/axios/{get-lock-tokens-list → get-lock-tokens-list-service}/type.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ interface AmountGroupAndChartProps extends GeneralProps {
3
+ }
4
+ declare const AmountGroupAndChart: (props: AmountGroupAndChartProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default AmountGroupAndChart;
@@ -0,0 +1,129 @@
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 react_1 = require("react");
19
+ var framer_motion_1 = require("framer-motion");
20
+ var AnalyticGroup_1 = __importDefault(require("../AnalyticGroup"));
21
+ var TimeFilter_1 = __importDefault(require("../TimeFilter"));
22
+ var TimeFilter_2 = require("../TimeFilter");
23
+ var DelayMounted_1 = __importDefault(require("../DelayMounted"));
24
+ var material_1 = require("@mui/material");
25
+ var NeonLineChart_1 = __importDefault(require("../NeonLineChart"));
26
+ var Icon_1 = __importDefault(require("../Icon"));
27
+ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
28
+ var fakeSeries = [
29
+ {
30
+ name: "All",
31
+ data: [
32
+ 1003785.6864951615, 1003795.988344575, 1003827.997662396,
33
+ 1003899.7426850981, 1003891.7710159089, 1003810.6439517767,
34
+ 1003780.7195320514, 1003797.9506016063, 1003781.455378438,
35
+ 1003782.0072632281, 1003715.167883104, 1003724.9791682598,
36
+ 1003716.6018329085, 1003711.3282671372, 1003686.1868489254,
37
+ 1003625.4795220237, 1003584.3334449014, 1003498.9139435134,
38
+ 1003310.7825506503, 1003339.72584186, 1003334.3069939599,
39
+ 1003364.3540547496, 1003394.4011155394, 1003398.386950134,
40
+ 1003233.005474726, 1003185.2981006557, 1003165.7981714085,
41
+ ],
42
+ },
43
+ ];
44
+ var labels = [
45
+ "2025-03-04T08:10:17.311Z",
46
+ "2025-03-04T12:10:18.859Z",
47
+ "2025-03-04T16:10:19.118Z",
48
+ "2025-03-04T20:10:18.246Z",
49
+ "2025-03-05T00:10:18.371Z",
50
+ "2025-03-05T10:12:40.882Z",
51
+ "2025-03-05T14:12:42.832Z",
52
+ "2025-03-05T18:12:41.114Z",
53
+ "2025-03-05T22:12:40.544Z",
54
+ "2025-03-06T02:12:40.718Z",
55
+ "2025-03-08T10:35:52.596Z",
56
+ "2025-03-08T14:35:52.979Z",
57
+ "2025-03-08T16:01:31.209Z",
58
+ "2025-03-08T18:35:52.824Z",
59
+ "2025-03-08T22:35:52.901Z",
60
+ "2025-03-09T06:35:53.327Z",
61
+ "2025-03-09T10:35:52.682Z",
62
+ "2025-03-09T14:35:53.001Z",
63
+ "2025-03-09T18:35:52.886Z",
64
+ "2025-03-09T22:35:52.880Z",
65
+ "2025-03-10T03:43:34.153Z",
66
+ "2025-03-10T06:35:52.944Z",
67
+ "2025-03-10T10:35:52.253Z",
68
+ "2025-03-10T14:35:52.727Z",
69
+ "2025-03-10T18:35:52.865Z",
70
+ "2025-03-10T22:35:53.563Z",
71
+ "2025-03-11T04:16:45.409Z",
72
+ ];
73
+ var defaultTimeRange = TimeFilter_2.TimeFilterType.SEVEN_DAYS;
74
+ var variants = {
75
+ hidden: { opacity: 0, left: "-70%" },
76
+ visible: { opacity: 1, left: "0%" },
77
+ };
78
+ var AmountGroupAndChart = function (props) {
79
+ var _a = (0, react_1.useState)(false), expandAreaChart = _a[0], setExpandAreaChart = _a[1];
80
+ var _b = (0, react_1.useState)(), timeRangeData = _b[0], setTimeRangeData = _b[1];
81
+ var theme = (0, material_1.useTheme)();
82
+ var handleChangeTimeRange = function (data) {
83
+ setTimeRangeData(data);
84
+ };
85
+ var toggleExpand = function () {
86
+ setExpandAreaChart(!expandAreaChart);
87
+ };
88
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, props.sx), { width: "100%" }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { position: "relative" }), children: [(0, jsx_runtime_1.jsx)(AnalyticGroup_1.default, { timeRange: timeRangeData === null || timeRangeData === void 0 ? void 0 : timeRangeData.type }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
89
+ width: "100%",
90
+ position: "relative",
91
+ duration: "500ms",
92
+ aspectRatio: "1.47317073171",
93
+ zIndex: 10,
94
+ maxHeight: expandAreaChart ? "28rem" : "0",
95
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
96
+ position: "absolute",
97
+ right: 0,
98
+ left: 0,
99
+ bottom: 0,
100
+ duration: "500ms",
101
+ transform: !expandAreaChart
102
+ ? "translateY(0) translateX(25%) scale(0.5)"
103
+ : "none",
104
+ }, children: (0, jsx_runtime_1.jsx)(DelayMounted_1.default, { delay: 800, children: (0, jsx_runtime_1.jsx)(NeonLineChart_1.default, { showMinMaxValues: expandAreaChart, series: fakeSeries, categories: labels, sx: {
105
+ width: "100%",
106
+ height: "fit-content",
107
+ duration: "500ms",
108
+ transform: !expandAreaChart ? "-translate-y-[100%]" : "none",
109
+ my: theme.mixins.customMargin.m3,
110
+ } }) }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", bottom: 0 }, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: "hidden", animate: expandAreaChart ? "visible" : "hidden", variants: variants, transition: {
111
+ opacity: {
112
+ duration: expandAreaChart ? 0.5 : 0.25,
113
+ ease: "linear",
114
+ delay: expandAreaChart ? 0.5 : 0,
115
+ },
116
+ left: {
117
+ duration: expandAreaChart ? 0.5 : 0.25,
118
+ ease: "linear",
119
+ delay: expandAreaChart ? 0.3 : 0,
120
+ },
121
+ }, children: (0, jsx_runtime_1.jsx)(TimeFilter_1.default, { hideAll: true, initialValue: defaultTimeRange, onChange: handleChangeTimeRange }) }) })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { sx: {
122
+ alignSelf: "center",
123
+ transition: "all 0.5s ease-in-out",
124
+ cursor: "pointer",
125
+ mt: theme.mixins.customMargin.m4,
126
+ transform: !expandAreaChart ? "rotate(180deg)" : "none",
127
+ }, width: 16, src: (0, getIcon_1.default)("bottom_arrow"), onClick: toggleExpand })] }) }));
128
+ };
129
+ exports.default = AmountGroupAndChart;
@@ -0,0 +1,6 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ interface AnalyticGroupProps extends GeneralProps {
3
+ timeRange?: string;
4
+ }
5
+ declare const AnalyticGroup: (props: AnalyticGroupProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default AnalyticGroup;
@@ -0,0 +1,33 @@
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 Text_1 = __importDefault(require("../Text"));
19
+ var Formatter_1 = __importDefault(require("../Formatter"));
20
+ var Icon_1 = __importDefault(require("../Icon"));
21
+ var material_1 = require("@mui/material");
22
+ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
23
+ var AnalyticGroup = function (props) {
24
+ var theme = (0, material_1.useTheme)();
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, { className: "flex items-baseline gap-1 text-24 font-semibold text-ui-text-white", 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
+ fontWeight: "typography.fontWeight500",
28
+ leading: "typography.lineHeight140",
29
+ fontSize: "typography.fontSize14",
30
+ textTransform: "capitalize",
31
+ }, children: props.timeRange }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_increase"), width: 12 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({ color: theme.palette.text.increase }, theme.mixins.value), { borderBottom: "1px dashed ".concat(theme.palette.text.increase) }), children: "5.63 (+3,22%)" })] })] }));
32
+ };
33
+ exports.default = AnalyticGroup;
@@ -92,12 +92,35 @@ var ModalLayout_1 = __importDefault(require("../ModalLayout"));
92
92
  var material_1 = require("@mui/material");
93
93
  var LoadingLayout_1 = __importDefault(require("../LoadingLayout"));
94
94
  var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
95
+ var authentication_by_passcode_service_1 = __importDefault(require("../../../services/axios/authentication-by-passcode-service"));
96
+ var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
97
+ var handleVerifyPasscode = function (data) { return __awaiter(void 0, void 0, void 0, function () {
98
+ var response, err_1;
99
+ return __generator(this, function (_a) {
100
+ switch (_a.label) {
101
+ case 0:
102
+ _a.trys.push([0, 2, , 3]);
103
+ return [4 /*yield*/, (0, authentication_by_passcode_service_1.default)(data)];
104
+ case 1:
105
+ response = _a.sent();
106
+ console.warn("🚀 ~ response:", response);
107
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.success];
108
+ case 2:
109
+ err_1 = _a.sent();
110
+ console.error("handleVerifyPasscode", err_1);
111
+ return [2 /*return*/, false];
112
+ case 3: return [2 /*return*/];
113
+ }
114
+ });
115
+ }); };
95
116
  var passcodeLength = 6;
96
117
  var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
97
118
  var action = props.action, onConfirmSuccess = props.onConfirmSuccess;
98
119
  var theme = (0, material_1.useTheme)();
99
120
  var _a = (0, react_1.useState)(""), otp = _a[0], setOtp = _a[1];
121
+ var masterWallet = (0, useWalletData_1.default)().masterWallet;
100
122
  var loadingRef = (0, react_1.useRef)(null);
123
+ var _b = (0, react_1.useState)(""), authError = _b[0], setAuthError = _b[1];
101
124
  var drawerRef = (0, react_1.useRef)(null);
102
125
  var handleCleardata = function () {
103
126
  setOtp("");
@@ -136,7 +159,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
136
159
  (_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props);
137
160
  };
138
161
  var handleOtpChange = function (value) { return __awaiter(void 0, void 0, void 0, function () {
139
- var err_1;
162
+ var isAuth, err_2;
140
163
  var _a, _b;
141
164
  return __generator(this, function (_c) {
142
165
  switch (_c.label) {
@@ -144,26 +167,33 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
144
167
  _c.trys.push([0, 3, , 4]);
145
168
  setOtp(value);
146
169
  if (!(value.length === passcodeLength)) return [3 /*break*/, 2];
147
- // drawerRef.current?.lockStatus();
148
170
  (_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.startLoading();
149
- return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 5000); })];
171
+ return [4 /*yield*/, handleVerifyPasscode({
172
+ passcode: value,
173
+ wallet_address: masterWallet || "",
174
+ })];
150
175
  case 1:
151
- _c.sent();
152
- // drawerRef.current?.unlockStatus();
176
+ isAuth = _c.sent();
177
+ console.warn("🚀 ~ handleOtpChange ~ isAuth:", isAuth);
178
+ if (isAuth) {
179
+ handleClose();
180
+ onConfirmSuccess === null || onConfirmSuccess === void 0 ? void 0 : onConfirmSuccess(value);
181
+ }
182
+ else {
183
+ setAuthError("Invalid passcode");
184
+ }
153
185
  (_b = loadingRef.current) === null || _b === void 0 ? void 0 : _b.endLoading();
154
- handleClose();
155
- onConfirmSuccess === null || onConfirmSuccess === void 0 ? void 0 : onConfirmSuccess(value);
156
186
  _c.label = 2;
157
187
  case 2: return [3 /*break*/, 4];
158
188
  case 3:
159
- err_1 = _c.sent();
160
- console.error(err_1);
189
+ err_2 = _c.sent();
190
+ console.error(err_2);
161
191
  return [3 /*break*/, 4];
162
192
  case 4: return [2 /*return*/];
163
193
  }
164
194
  });
165
195
  }); };
166
- 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 })] }) }) }) }));
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 }))] }) }) }) }));
167
197
  });
168
198
  ConfirmByPasscode.displayName = "ConfirmByPasscode";
169
199
  exports.default = ConfirmByPasscode;
@@ -0,0 +1,6 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ interface DelayMountedPropsType extends GeneralProps {
3
+ delay?: number;
4
+ }
5
+ declare function DelayMounted({ children, delay }: DelayMountedPropsType): import("react/jsx-runtime").JSX.Element;
6
+ export default DelayMounted;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var jsx_runtime_1 = require("react/jsx-runtime");
4
+ var react_1 = require("react");
5
+ function DelayMounted(_a) {
6
+ var children = _a.children, _b = _a.delay, delay = _b === void 0 ? 1000 : _b;
7
+ var _c = (0, react_1.useState)(false), allowMount = _c[0], setAllowMount = _c[1];
8
+ (0, react_1.useEffect)(function () {
9
+ var timeout = setTimeout(function () {
10
+ setAllowMount(true);
11
+ }, delay);
12
+ return function () {
13
+ clearTimeout(timeout);
14
+ };
15
+ }, []);
16
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: allowMount && children });
17
+ }
18
+ exports.default = DelayMounted;
@@ -84,10 +84,14 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
84
84
  }, [addressByNetwork, selectedToken]);
85
85
  var open = function () {
86
86
  var _a;
87
+ if (!isAuthenticated)
88
+ throw new Error("Please connect your wallet");
87
89
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
88
90
  };
89
91
  var close = function () {
90
92
  var _a;
93
+ if (!isAuthenticated)
94
+ throw new Error("Please connect your wallet");
91
95
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
92
96
  };
93
97
  (0, react_1.useImperativeHandle)(ref, function () { return ({
@@ -126,7 +130,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
126
130
  display: "flex",
127
131
  alignItems: "center",
128
132
  minHeight: "2rem",
129
- mb: theme.mixins.customMargin.p20,
133
+ mb: theme.mixins.customMargin.m20,
130
134
  }, 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: {
131
135
  autoHeight: true,
132
136
  spaceBetween: 32,
@@ -8,12 +8,11 @@ var jsx_runtime_1 = require("react/jsx-runtime");
8
8
  var getStandardNumber_1 = __importDefault(require("../../../utils/getStandardNumber"));
9
9
  var lengthFromDotToFirstNonZero_1 = __importDefault(require("../../../utils/lengthFromDotToFirstNonZero"));
10
10
  var CustomTooltip_1 = __importDefault(require("../CustomTooltip"));
11
- var cn_1 = __importDefault(require("../../../utils/cn"));
12
11
  var material_1 = require("@mui/material");
13
12
  var formatter_1 = __importDefault(require("../../../utils/formatter"));
14
13
  var Formatter = function (_a) {
15
14
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
16
- var value = _a.value, _o = _a.start, start = _o === void 0 ? "" : _o, _p = _a.unit, unit = _p === void 0 ? "" : _p, _q = _a.lengthValueAllowed, lengthValueAllowed = _q === void 0 ? 2 : _q, _r = _a.noUnitSpacing, noUnitSpacing = _r === void 0 ? false : _r, _s = _a.allowShowZero, allowShowZero = _s === void 0 ? false : _s, _t = _a.useCompact, useCompact = _t === void 0 ? true : _t, disableTooltip = _a.disableTooltip, isUnitStyle = _a.isUnitStyle, unitCustomStyle = _a.unitCustomStyle, disableAdjustUnitColor = _a.disableAdjustUnitColor, isLessThan = _a.isLessThan, overrideLessThanClass = _a.overrideLessThanClass, unitStyle = _a.unitStyle, _u = _a.useCompactOnThousand, useCompactOnThousand = _u === void 0 ? false : _u, startStyle = _a.startStyle, hideStart = _a.hideStart, hideUnit = _a.hideUnit, onClickUnit = _a.onClickUnit;
15
+ var value = _a.value, _o = _a.start, start = _o === void 0 ? "" : _o, _p = _a.unit, unit = _p === void 0 ? "" : _p, _q = _a.lengthValueAllowed, lengthValueAllowed = _q === void 0 ? 2 : _q, _r = _a.noUnitSpacing, noUnitSpacing = _r === void 0 ? false : _r, _s = _a.allowShowZero, allowShowZero = _s === void 0 ? false : _s, _t = _a.useCompact, useCompact = _t === void 0 ? true : _t, disableTooltip = _a.disableTooltip, isLessThan = _a.isLessThan, unitStyle = _a.unitStyle, _u = _a.useCompactOnThousand, useCompactOnThousand = _u === void 0 ? false : _u, startStyle = _a.startStyle, hideStart = _a.hideStart, hideUnit = _a.hideUnit, onClickUnit = _a.onClickUnit;
17
16
  var tokensRateState = {}.tokensRateState;
18
17
  var userInfo = {}.userInfo;
19
18
  // const { tokensRateState } = useRealtimeData();
@@ -39,16 +38,17 @@ var Formatter = function (_a) {
39
38
  var lessThan = numberDisplay > 0 && numberDisplay < 0.01 && isLessThan;
40
39
  return ((0, jsx_runtime_1.jsx)(CustomTooltip_1.default, { disabled: disableTooltip, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
41
40
  whiteSpace: "nowrap",
42
- }, children: numberDisplay === 0 && !allowShowZero ? ("--") : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lessThan && ((0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.default)("relative -top-0.5 font-primary mr-0.5", overrideLessThanClass), children: "< " })), !(numberDisplay === 0) && !hideStart && ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", style: startStyle, children: startDisplay })), !lessThan && numberDisplay > 0 && numberDisplay < 0.000001 ? ((0, jsx_runtime_1.jsxs)("span", { className: "font-primary", children: ["0.0", (0, jsx_runtime_1.jsx)("sub", { children: lengthFromDot }), formattedNumber.slice(2 + lengthFromDot, lengthValueAllowed - 2 + lengthFromDot)] })) : ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", children: lessThan
41
+ }, children: numberDisplay === 0 && !allowShowZero ? ("--") : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lessThan && ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: {
42
+ position: "relative",
43
+ top: "-0.125rem",
44
+ mr: "0.125rem",
45
+ }, children: "< " })), !(numberDisplay === 0) && !hideStart && ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", style: startStyle, children: startDisplay })), !lessThan && numberDisplay > 0 && numberDisplay < 0.000001 ? ((0, jsx_runtime_1.jsxs)("span", { className: "font-primary", children: ["0.0", (0, jsx_runtime_1.jsx)("sub", { children: lengthFromDot }), formattedNumber.slice(2 + lengthFromDot, lengthValueAllowed - 2 + lengthFromDot)] })) : ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", children: lessThan
43
46
  ? "0.01"
44
47
  : (0, formatter_1.default)(isLessThan
45
48
  ? Number(numberDisplay).toFixed(2)
46
49
  : numberDisplay, useCompact, useCompactOnThousand, lengthValueAllowed) })), !hideUnit &&
47
50
  !!unitDisplay &&
48
51
  !noUnitSpacing &&
49
- !(numberDisplay === 0) && ((0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.default)("font-primary", unitCustomStyle, {
50
- "text-secondary": isUnitStyle,
51
- not_apply_adjust_color_tbk: disableAdjustUnitColor,
52
- }), style: unitStyle, onClick: onClickUnit, children: unitDisplay }))] })) }), children: (0, jsx_runtime_1.jsx)(Formatter, { disableTooltip: true, start: start, value: value, lengthValueAllowed: 12, useCompact: false, unit: unit, allowShowZero: true, disableAdjustUnitColor: true, hideStart: hideStart, hideUnit: hideUnit }) }));
52
+ !(numberDisplay === 0) && ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", style: unitStyle, onClick: onClickUnit, children: unitDisplay }))] })) }), children: (0, jsx_runtime_1.jsx)(Formatter, { disableTooltip: true, start: start, value: value, lengthValueAllowed: 12, useCompact: false, unit: unit, allowShowZero: true, disableAdjustUnitColor: true, hideStart: hideStart, hideUnit: hideUnit }) }));
53
53
  };
54
54
  exports.default = Formatter;
@@ -3,11 +3,15 @@ import { LockData } from "./type";
3
3
  interface LockTokenProps extends Omit<ConfirmLayoutProps, "action"> {
4
4
  lockData: LockData;
5
5
  }
6
+ export interface LockTokenRef {
7
+ open: () => void;
8
+ close: () => void;
9
+ }
6
10
  export declare enum LockTokenError {
7
11
  TOKEN_NOT_FOUND = "Token not found",
8
12
  NOT_ENOUGH_BALANCE = "Not enough balance",
9
13
  MAX_AMOUNT = "Max amount",
10
14
  MIN_AMOUNT = "Min amount"
11
15
  }
12
- declare const LockToken: (props: LockTokenProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const LockToken: import("react").ForwardRefExoticComponent<Omit<LockTokenProps, "ref"> & import("react").RefAttributes<LockTokenRef>>;
13
17
  export default LockToken;
@@ -61,6 +61,7 @@ var react_1 = require("react");
61
61
  var useLockTokenData_1 = __importDefault(require("../../../hooks/useLockTokenData"));
62
62
  var Text_1 = __importDefault(require("../Text"));
63
63
  var RequireConnect_1 = __importDefault(require("../RequireConnect"));
64
+ var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
64
65
  var LockTokenError;
65
66
  (function (LockTokenError) {
66
67
  LockTokenError["TOKEN_NOT_FOUND"] = "Token not found";
@@ -68,10 +69,11 @@ var LockTokenError;
68
69
  LockTokenError["MAX_AMOUNT"] = "Max amount";
69
70
  LockTokenError["MIN_AMOUNT"] = "Min amount";
70
71
  })(LockTokenError || (exports.LockTokenError = LockTokenError = {}));
71
- var LockToken = function (props) {
72
+ var LockToken = (0, react_1.forwardRef)(function (props, ref) {
72
73
  var _a, _b;
73
74
  var theme = (0, material_1.useTheme)();
74
75
  var lockTokens = (0, useLockTokenData_1.default)().lockTokens;
76
+ var isAuthenticated = (0, useWalletData_1.default)().isAuthenticated;
75
77
  var confirmByPasscodeDrawerRef = (0, react_1.useRef)(null);
76
78
  var _c = (0, react_1.useState)(undefined), token = _c[0], setToken = _c[1];
77
79
  var _d = (0, react_1.useState)(undefined), error = _d[0], setError = _d[1];
@@ -112,9 +114,26 @@ var LockToken = function (props) {
112
114
  (_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
113
115
  }, 3000);
114
116
  };
117
+ var handleOpen = function () {
118
+ var _a;
119
+ if (!isAuthenticated)
120
+ throw new Error("Please connect your wallet");
121
+ (_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
122
+ };
123
+ var handleClose = function () {
124
+ var _a;
125
+ if (!isAuthenticated)
126
+ throw new Error("Please connect your wallet");
127
+ (_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
128
+ };
129
+ (0, react_1.useImperativeHandle)(ref, function () { return ({
130
+ open: handleOpen,
131
+ close: handleClose,
132
+ }); });
115
133
  (0, react_1.useEffect)(function () {
116
134
  validateAmount(props.lockData);
117
135
  }, [validateAmount]);
118
136
  return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(ConfirmLayout_1.default, { ref: confirmByPasscodeDrawerRef, action: type_1.ActionConfirm.LOCK, trigger: props.children, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.paper), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Amount", value: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: props.lockData.amount, unit: token === null || token === void 0 ? void 0 : token.name }) }), !!error && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { mt: theme.mixins.gaps.g6 }), children: [error, " ", !!errorAmount && ((0, jsx_runtime_1.jsx)(Formatter_1.default, { value: errorAmount, unit: token === null || token === void 0 ? void 0 : token.name }))] }))] }) }), (0, jsx_runtime_1.jsx)(ConfirmByPasscode_1.default, { action: type_1.ActionConfirm.LOCK, onConfirmSuccess: handleLockToken, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: !!error ? Button_1.BUTTON_STATUS.DISABLED : buttonStatus, sx: { width: "100%" }, children: "Confirm" }) })] }) }) }));
119
- };
137
+ });
138
+ LockToken.displayName = "LockToken";
120
139
  exports.default = LockToken;
@@ -0,0 +1,12 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ export interface NeonLineChartPropsTypes extends GeneralProps {
3
+ categories?: string[];
4
+ series?: Array<{
5
+ name: string;
6
+ data: any[];
7
+ }>;
8
+ showMinMaxValues?: boolean;
9
+ }
10
+ declare function NeonLineChart({ series, categories, showMinMaxValues, sx, }: NeonLineChartPropsTypes): import("react/jsx-runtime").JSX.Element;
11
+ declare const _default: import("react").MemoExoticComponent<typeof NeonLineChart>;
12
+ export default _default;
@@ -0,0 +1,179 @@
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 react_1 = require("react");
19
+ var highcharts_1 = __importDefault(require("highcharts"));
20
+ var highcharts_react_official_1 = __importDefault(require("highcharts-react-official"));
21
+ var Formatter_1 = __importDefault(require("../Formatter"));
22
+ var Text_1 = __importDefault(require("../Text"));
23
+ var framer_motion_1 = require("framer-motion");
24
+ var useFormatter_1 = __importDefault(require("../../../hooks/useFormatter"));
25
+ var material_1 = require("@mui/material");
26
+ var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
27
+ function NeonLineChart(_a) {
28
+ var _b, _c, _d, _e;
29
+ var series = _a.series, categories = _a.categories, _f = _a.showMinMaxValues, showMinMaxValues = _f === void 0 ? false : _f, sx = _a.sx;
30
+ var chartComponentRef = (0, react_1.useRef)(null);
31
+ var formatValue = (0, useFormatter_1.default)().formatValue;
32
+ var theme = (0, material_1.useTheme)();
33
+ var options = {
34
+ title: {
35
+ text: "",
36
+ },
37
+ chart: {
38
+ backgroundColor: "transparent",
39
+ height: "".concat(180, "px"),
40
+ animation: true,
41
+ },
42
+ colors: ["#60D591"],
43
+ series: [
44
+ {
45
+ type: "line",
46
+ name: "",
47
+ data: (_c = (_b = series === null || series === void 0 ? void 0 : series[0]) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : [],
48
+ lineWidth: 2, // Line width
49
+ shadow: {
50
+ color: "#60D591", // Neon red glow
51
+ offsetX: 0,
52
+ offsetY: 0,
53
+ opacity: 1,
54
+ width: 15, // Glow width
55
+ },
56
+ },
57
+ ],
58
+ plotOptions: {
59
+ series: {
60
+ marker: {
61
+ enabled: false,
62
+ },
63
+ },
64
+ },
65
+ yAxis: {
66
+ visible: false,
67
+ },
68
+ xAxis: {
69
+ visible: false,
70
+ categories: categories,
71
+ },
72
+ legend: {
73
+ enabled: false,
74
+ },
75
+ tooltip: {
76
+ backgroundColor: "#00000055",
77
+ style: {
78
+ color: "#fff",
79
+ },
80
+ padding: 6,
81
+ formatter: function () {
82
+ var _a;
83
+ try {
84
+ if ((this === null || this === void 0 ? void 0 : this.y) === "") {
85
+ return null;
86
+ }
87
+ return "<div>\n <div style=\"font-size: 0.8em; \">".concat((0, formatDate_1.default)(this === null || this === void 0 ? void 0 : this.x), "</div> <br/>\n <div style=\"font-weight: 600; color: #60D591; font-size: 1.1em;\">").concat(formatValue(+((_a = this === null || this === void 0 ? void 0 : this.y) !== null && _a !== void 0 ? _a : 0)), "</div>\n </div>");
88
+ }
89
+ catch (err) {
90
+ console.error("🚀 ~ NeonLineChart ~ err:", err);
91
+ return null;
92
+ }
93
+ },
94
+ },
95
+ };
96
+ var data = (0, react_1.useMemo)(function () {
97
+ var _a, _b;
98
+ return (_b = (_a = series === null || series === void 0 ? void 0 : series[0]) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : [];
99
+ }, [((_d = series === null || series === void 0 ? void 0 : series[0]) === null || _d === void 0 ? void 0 : _d.data) && JSON.stringify((_e = series === null || series === void 0 ? void 0 : series[0]) === null || _e === void 0 ? void 0 : _e.data)]);
100
+ var chartLength = (0, react_1.useMemo)(function () {
101
+ try {
102
+ var length_1 = data === null || data === void 0 ? void 0 : data.length;
103
+ return length_1 !== null && length_1 !== void 0 ? length_1 : 0;
104
+ }
105
+ catch (_a) {
106
+ return -1;
107
+ }
108
+ }, [data]);
109
+ var maxValue = (0, react_1.useMemo)(function () {
110
+ try {
111
+ var max = Math.max.apply(Math, (data !== null && data !== void 0 ? data : []));
112
+ return max !== null && max !== void 0 ? max : -1;
113
+ }
114
+ catch (_a) {
115
+ return -1;
116
+ }
117
+ }, [data]);
118
+ var maxIndex = (0, react_1.useMemo)(function () {
119
+ try {
120
+ var index = data === null || data === void 0 ? void 0 : data.findLastIndex(function (e) { return e === maxValue; });
121
+ return index !== null && index !== void 0 ? index : -1;
122
+ }
123
+ catch (_a) {
124
+ return -1;
125
+ }
126
+ }, [maxValue]);
127
+ var minValue = (0, react_1.useMemo)(function () {
128
+ try {
129
+ var min = Math.min.apply(Math, (data !== null && data !== void 0 ? data : []));
130
+ return min !== null && min !== void 0 ? min : -1;
131
+ }
132
+ catch (_a) {
133
+ return -1;
134
+ }
135
+ }, [data]);
136
+ var minIndex = (0, react_1.useMemo)(function () {
137
+ try {
138
+ var index = data === null || data === void 0 ? void 0 : data.findLastIndex(function (e) { return e === minValue; });
139
+ return index !== null && index !== void 0 ? index : -1;
140
+ }
141
+ catch (_a) {
142
+ return -1;
143
+ }
144
+ }, [minValue]);
145
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative" }, sx), children: [showMinMaxValues && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute top-0 w-fit z-50", style: {
146
+ left: "".concat((maxIndex / chartLength) * 100, "%"),
147
+ }, initial: {
148
+ scale: 0,
149
+ translateX: "-50%",
150
+ opacity: 0,
151
+ origin: "50% center",
152
+ }, animate: {
153
+ scale: 1,
154
+ translateX: "-50%",
155
+ opacity: 1,
156
+ origin: "50% center",
157
+ }, transition: {
158
+ duration: 0.4,
159
+ ease: "easeInOut",
160
+ delay: 0.4,
161
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white text-12 leading-140", children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: maxValue }) }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute bottom-0 w-fit z-50", style: {
162
+ left: "".concat((minIndex / chartLength) * 100, "%"),
163
+ }, initial: {
164
+ scale: 0,
165
+ translateX: "-50%",
166
+ opacity: 0,
167
+ origin: "50% center",
168
+ }, animate: {
169
+ scale: 1,
170
+ translateX: "-50%",
171
+ opacity: 1,
172
+ origin: "50% center",
173
+ }, transition: {
174
+ duration: 0.4,
175
+ ease: "easeInOut",
176
+ delay: 0.4,
177
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: minValue }) }) })] })), (0, jsx_runtime_1.jsx)(highcharts_react_official_1.default, { highcharts: highcharts_1.default, options: options, ref: chartComponentRef })] }));
178
+ }
179
+ exports.default = (0, react_1.memo)(NeonLineChart);
@@ -0,0 +1 @@
1
+ export declare const getThePreviousWeekByDate: (date: Date) => Date;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getThePreviousWeekByDate = void 0;
4
+ var date_fns_1 = require("date-fns");
5
+ var getThePreviousWeekByDate = function (date) {
6
+ return (0, date_fns_1.sub)(date, {
7
+ days: 6,
8
+ });
9
+ };
10
+ exports.getThePreviousWeekByDate = getThePreviousWeekByDate;
@@ -0,0 +1 @@
1
+ export declare const getThisDateFromLastMonthDatePicker: (date: Date) => Date;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getThisDateFromLastMonthDatePicker = void 0;
4
+ var date_fns_1 = require("date-fns");
5
+ var getThisDateFromLastMonthDatePicker = function (date) {
6
+ return (0, date_fns_1.sub)(date, {
7
+ days: 29,
8
+ });
9
+ };
10
+ exports.getThisDateFromLastMonthDatePicker = getThisDateFromLastMonthDatePicker;
@@ -0,0 +1,19 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ export declare enum TimeFilterType {
3
+ ALL = "all",
4
+ TODAY = "today",
5
+ SEVEN_DAYS = "7 days",
6
+ THIRTY_DAYS = "30 days"
7
+ }
8
+ export interface TimeFilterProps extends GeneralProps {
9
+ initialValue?: TimeFilterType;
10
+ onChange?: (value: TimeFilterData, event?: React.MouseEvent<HTMLElement>) => any;
11
+ hideAll?: boolean;
12
+ }
13
+ export interface TimeFilterData {
14
+ type: TimeFilterType;
15
+ startDate?: string;
16
+ endDate?: string;
17
+ }
18
+ declare const TimeFilter: ({ initialValue, onChange, hideAll, }: TimeFilterProps) => import("react/jsx-runtime").JSX.Element;
19
+ export default TimeFilter;
@@ -0,0 +1,122 @@
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
+ exports.TimeFilterType = void 0;
18
+ var jsx_runtime_1 = require("react/jsx-runtime");
19
+ var material_1 = require("@mui/material");
20
+ var react_1 = require("react");
21
+ var Text_1 = __importDefault(require("../Text"));
22
+ var date_fns_1 = require("date-fns");
23
+ var getMaxTime_1 = __importDefault(require("../../../utils/getMaxTime"));
24
+ var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
25
+ var TimeFilterType;
26
+ (function (TimeFilterType) {
27
+ TimeFilterType["ALL"] = "all";
28
+ TimeFilterType["TODAY"] = "today";
29
+ TimeFilterType["SEVEN_DAYS"] = "7 days";
30
+ TimeFilterType["THIRTY_DAYS"] = "30 days";
31
+ })(TimeFilterType || (exports.TimeFilterType = TimeFilterType = {}));
32
+ var TimeFilter = function (_a) {
33
+ var _b = _a.initialValue, initialValue = _b === void 0 ? TimeFilterType.ALL : _b, onChange = _a.onChange, hideAll = _a.hideAll;
34
+ var theme = (0, material_1.useTheme)();
35
+ var _c = (0, react_1.useState)({
36
+ type: initialValue,
37
+ }), value = _c[0], setValue = _c[1];
38
+ var getTimeFilterData = function (type) {
39
+ var _a, _b, _c;
40
+ var newData = {
41
+ type: type,
42
+ };
43
+ switch (type) {
44
+ case TimeFilterType.TODAY:
45
+ var _d = (_a = (0, getMaxTime_1.default)(new Date().toISOString(), new Date().toISOString())) !== null && _a !== void 0 ? _a : {}, startDate = _d.startDate, endDate = _d.endDate;
46
+ newData.startDate = startDate;
47
+ newData.endDate = endDate;
48
+ break;
49
+ case TimeFilterType.SEVEN_DAYS: {
50
+ var today = new Date();
51
+ var sevenPreDay = (0, date_fns_1.subDays)(today, 7);
52
+ var _e = (_b = (0, getMaxTime_1.default)(sevenPreDay.toISOString(), today.toISOString())) !== null && _b !== void 0 ? _b : {}, startDate_1 = _e.startDate, endDate_1 = _e.endDate;
53
+ newData.startDate = startDate_1;
54
+ newData.endDate = endDate_1;
55
+ break;
56
+ }
57
+ case TimeFilterType.THIRTY_DAYS: {
58
+ var today = new Date();
59
+ var oneMonthPreDay = (0, date_fns_1.subDays)(today, 30);
60
+ var _f = (_c = (0, getMaxTime_1.default)(oneMonthPreDay.toISOString(), today.toISOString())) !== null && _c !== void 0 ? _c : {}, startDate_2 = _f.startDate, endDate_2 = _f.endDate;
61
+ newData.startDate = startDate_2;
62
+ newData.endDate = endDate_2;
63
+ break;
64
+ }
65
+ default: {
66
+ break;
67
+ }
68
+ }
69
+ return newData;
70
+ };
71
+ var handleChange = function (event, newValueArray) {
72
+ try {
73
+ var newValue = newValueArray === null || newValueArray === void 0 ? void 0 : newValueArray[0];
74
+ if (newValue === (value === null || value === void 0 ? void 0 : value.type))
75
+ return;
76
+ var newData = getTimeFilterData(newValue);
77
+ setValue(newData);
78
+ onChange === null || onChange === void 0 ? void 0 : onChange(newData, event);
79
+ }
80
+ catch (err) {
81
+ console.error("🚀 ~ err:", err);
82
+ }
83
+ };
84
+ var getTimeFilterLabel = function (dateData) {
85
+ try {
86
+ switch (dateData === null || dateData === void 0 ? void 0 : dateData.type) {
87
+ case TimeFilterType.TODAY:
88
+ return "".concat((0, formatDate_1.default)((dateData === null || dateData === void 0 ? void 0 : dateData.startDate) || ""));
89
+ case TimeFilterType.SEVEN_DAYS:
90
+ case TimeFilterType.THIRTY_DAYS:
91
+ return "".concat((0, formatDate_1.default)((dateData === null || dateData === void 0 ? void 0 : dateData.startDate) || ""), " - ").concat((0, formatDate_1.default)((dateData === null || dateData === void 0 ? void 0 : dateData.endDate) || ""));
92
+ default:
93
+ return null;
94
+ }
95
+ }
96
+ catch (err) {
97
+ console.error("🚀 ~ err:", err);
98
+ return null;
99
+ }
100
+ };
101
+ (0, react_1.useEffect)(function () {
102
+ if (!initialValue)
103
+ return;
104
+ var newData = getTimeFilterData(initialValue);
105
+ setValue(newData);
106
+ onChange === null || onChange === void 0 ? void 0 : onChange(newData);
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) {
109
+ if (hideAll && type === TimeFilterType.ALL)
110
+ return null;
111
+ return ((0, jsx_runtime_1.jsx)(material_1.ToggleButton, { "aria-label": type, value: type, sx: {
112
+ p: 0,
113
+ border: "none",
114
+ }, children: (0, jsx_runtime_1.jsx)(material_1.Chip, { label: type, variant: "outlined", sx: {
115
+ textTransform: "capitalize",
116
+ leading: "typography.lineHeight100",
117
+ borderColor: "currentColor",
118
+ color: (value === null || value === void 0 ? void 0 : value.type) === type ? "text.white" : "text.white64",
119
+ }, onClick: function () { } }) }, type));
120
+ }) })] }));
121
+ };
122
+ exports.default = TimeFilter;
@@ -126,7 +126,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
126
126
  display: "flex",
127
127
  alignItems: "center",
128
128
  minHeight: "2rem",
129
- mb: theme.mixins.customMargin.p20,
129
+ mb: theme.mixins.customMargin.m20,
130
130
  }, 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: {
131
131
  autoHeight: true,
132
132
  spaceBetween: 32,
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
4
15
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
16
  };
@@ -12,7 +23,13 @@ var FunctionItem_1 = __importDefault(require("../../ui/FunctionItem"));
12
23
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
13
24
  var WithdrawFunction_1 = __importDefault(require("../../ui/WithdrawFunction"));
14
25
  var TokensBoard_1 = __importDefault(require("../../ui/TokensBoard"));
26
+ var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
27
+ var Text_1 = __importDefault(require("../../ui/Text"));
28
+ var material_2 = require("@mui/material");
29
+ var AmountGroupAndChart_1 = __importDefault(require("../../ui/AmountGroupAndChart"));
15
30
  var AssetView = function () {
16
- return ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-4", children: [(0, jsx_runtime_1.jsx)(DepositFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("deposit"), label: "Deposit", className: "w-full" }) }) }), (0, jsx_runtime_1.jsx)(WithdrawFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("withdraw"), label: "Withdraw", className: "w-full" }) }) }), (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("fortune", "gif"), label: "Fortune", className: "w-full" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("p2p", "gif"), label: "P2P", className: "w-full" }) })] }), (0, jsx_runtime_1.jsx)(TokensBoard_1.default, {})] }));
31
+ var isAuthenticated = (0, useWalletData_1.default)().isAuthenticated;
32
+ var theme = (0, material_2.useTheme)();
33
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isAuthenticated && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: "Please connect your wallet to get asset information" })), !!isAuthenticated && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-4", children: [(0, jsx_runtime_1.jsx)(DepositFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("deposit"), label: "Deposit", className: "w-full" }) }) }), (0, jsx_runtime_1.jsx)(WithdrawFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("withdraw"), label: "Withdraw", className: "w-full" }) }) }), (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("fortune", "gif"), label: "Fortune", className: "w-full" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: (0, getIcon_1.default)("p2p", "gif"), label: "P2P", className: "w-full" }) })] }), (0, jsx_runtime_1.jsx)(TokensBoard_1.default, {})] }))] }));
17
34
  };
18
35
  exports.default = AssetView;
@@ -76,7 +76,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
76
76
  exports.DepositContext = exports.initialDeposit = void 0;
77
77
  var jsx_runtime_1 = require("react/jsx-runtime");
78
78
  var react_1 = __importStar(require("react"));
79
- var get_deposit_tokens_list_1 = __importDefault(require("../../services/axios/get-deposit-tokens-list"));
79
+ var get_deposit_tokens_list_service_1 = __importDefault(require("../../services/axios/get-deposit-tokens-list-service"));
80
80
  var useWalletData_1 = __importDefault(require("../../hooks/useWalletData"));
81
81
  exports.initialDeposit = {
82
82
  isLoadingDepositToken: true,
@@ -100,7 +100,7 @@ function DepositProvider(_a) {
100
100
  throw new Error("Authenticate to get deposit tokens");
101
101
  }
102
102
  setIsLoadingDepositToken(true);
103
- return [4 /*yield*/, (0, get_deposit_tokens_list_1.default)()];
103
+ return [4 /*yield*/, (0, get_deposit_tokens_list_service_1.default)()];
104
104
  case 1:
105
105
  response = _a.sent();
106
106
  console.warn("🚀 ~ getBalance ~ response:", response);
@@ -76,7 +76,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
76
76
  exports.LockTokensContext = exports.initialLockTokens = void 0;
77
77
  var jsx_runtime_1 = require("react/jsx-runtime");
78
78
  var react_1 = __importStar(require("react"));
79
- var get_lock_tokens_list_1 = __importDefault(require("../../services/axios/get-lock-tokens-list"));
79
+ var get_lock_tokens_list_service_1 = __importDefault(require("../../services/axios/get-lock-tokens-list-service"));
80
80
  var useWalletData_1 = __importDefault(require("../../hooks/useWalletData"));
81
81
  exports.initialLockTokens = {
82
82
  isLoadingLockToken: true,
@@ -100,7 +100,7 @@ function LockTokensProvider(_a) {
100
100
  throw new Error("Authenticate to get lock tokens");
101
101
  }
102
102
  setIsLoadingLockToken(true);
103
- return [4 /*yield*/, (0, get_lock_tokens_list_1.default)()];
103
+ return [4 /*yield*/, (0, get_lock_tokens_list_service_1.default)()];
104
104
  case 1:
105
105
  response = _a.sent();
106
106
  console.warn("🚀 ~ getBalance ~ response: ", response);
@@ -1,4 +1,4 @@
1
- import { LockCurrency } from "../../services/axios/get-lock-tokens-list/type";
1
+ import { LockCurrency } from "../../services/axios/get-lock-tokens-list-service/type";
2
2
  export interface LockTokensProviderDataType {
3
3
  isLoadingLockToken: boolean;
4
4
  lockTokens: LockCurrency[] | undefined;
@@ -0,0 +1,2 @@
1
+ import { AuthenticationByPasscodeBody, AuthenticationByPasscodeResponse } from "./type";
2
+ export default function authenticationByPasscode(body: AuthenticationByPasscodeBody): Promise<AuthenticationByPasscodeResponse>;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ 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);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ 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;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.default = authenticationByPasscode;
43
+ var userClientRequest_1 = __importDefault(require("../clients/userClientRequest"));
44
+ function authenticationByPasscode(body) {
45
+ return __awaiter(this, void 0, void 0, function () {
46
+ var response;
47
+ return __generator(this, function (_a) {
48
+ switch (_a.label) {
49
+ case 0: return [4 /*yield*/, userClientRequest_1.default.post("/api/auth/passcode", body, {
50
+ headers: {
51
+ "c-payload-signature": "text",
52
+ },
53
+ })];
54
+ case 1:
55
+ response = _a.sent();
56
+ console.warn("🚀 ~ response authenticationByPasscode:", response);
57
+ return [2 /*return*/, response === null || response === void 0 ? void 0 : response.data];
58
+ }
59
+ });
60
+ });
61
+ }
@@ -0,0 +1,9 @@
1
+ export interface AuthenticationByPasscodeBody {
2
+ passcode: string;
3
+ wallet_address: string;
4
+ }
5
+ export interface AuthenticationByPasscodeResponse {
6
+ success: boolean;
7
+ message: string;
8
+ timestamp: string;
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { DepositTokenList } from "./../../../types/expose-type";
2
- import { GetConfigTokenListQuery } from "../get-config-tokens-list";
2
+ import { GetConfigTokenListQuery } from "../get-config-tokens-list-service";
3
3
  export type GetDepositTokenListQuery = Omit<GetConfigTokenListQuery, "transactionType">;
4
4
  declare const getDepositTokenList: (query?: GetDepositTokenListQuery) => Promise<DepositTokenList>;
5
5
  export default getDepositTokenList;
@@ -50,14 +50,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
50
50
  return (mod && mod.__esModule) ? mod : { "default": mod };
51
51
  };
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
- var get_config_tokens_list_1 = __importDefault(require("../get-config-tokens-list"));
53
+ var get_config_tokens_list_service_1 = __importDefault(require("../get-config-tokens-list-service"));
54
54
  var getDepositTokenList = function (query) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var params, response;
56
56
  return __generator(this, function (_a) {
57
57
  switch (_a.label) {
58
58
  case 0:
59
59
  params = __assign(__assign({}, query), { transactionType: "deposit" });
60
- return [4 /*yield*/, (0, get_config_tokens_list_1.default)(params)];
60
+ return [4 /*yield*/, (0, get_config_tokens_list_service_1.default)(params)];
61
61
  case 1:
62
62
  response = _a.sent();
63
63
  return [2 /*return*/, response === null || response === void 0 ? void 0 : response.data];
@@ -1,4 +1,4 @@
1
- import { GetConfigTokenListQuery } from "../get-config-tokens-list";
1
+ import { GetConfigTokenListQuery } from "../get-config-tokens-list-service";
2
2
  import { LockTokenList } from "./type";
3
3
  export type GetLockTokenListQuery = Omit<GetConfigTokenListQuery, "transactionType">;
4
4
  declare const getLockTokenList: (query?: GetLockTokenListQuery) => Promise<LockTokenList>;
@@ -50,14 +50,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
50
50
  return (mod && mod.__esModule) ? mod : { "default": mod };
51
51
  };
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
- var get_config_tokens_list_1 = __importDefault(require("../get-config-tokens-list"));
53
+ var get_config_tokens_list_service_1 = __importDefault(require("../get-config-tokens-list-service"));
54
54
  var getLockTokenList = function (query) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var params, response;
56
56
  return __generator(this, function (_a) {
57
57
  switch (_a.label) {
58
58
  case 0:
59
59
  params = __assign(__assign({}, query), { transactionType: "withdrawn" });
60
- return [4 /*yield*/, (0, get_config_tokens_list_1.default)(params)];
60
+ return [4 /*yield*/, (0, get_config_tokens_list_service_1.default)(params)];
61
61
  case 1:
62
62
  response = _a.sent();
63
63
  console.warn("🚀 ~ response getConfigTokenList:", response);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -61,6 +61,8 @@ var text = {
61
61
  successStatus: "#01FF00",
62
62
  errorStatus: "#FE6565",
63
63
  loadingStatus: "#01FFFF",
64
+ increase: "#01FF00",
65
+ decrease: "#FE6565",
64
66
  };
65
67
  var gaps = {
66
68
  g2: "0.125rem",
@@ -95,17 +97,17 @@ var customPadding = {
95
97
  p48: "3rem",
96
98
  };
97
99
  var customMargin = {
98
- p4: "0.25rem",
99
- p6: "0.375rem",
100
- p8: "0.5rem",
101
- p10: "0.625rem",
102
- p12: "0.75rem",
103
- p16: "1rem",
104
- p20: "1.25rem",
105
- p24: "1.5rem",
106
- p32: "2rem",
107
- p40: "2.5rem",
108
- p48: "3rem",
100
+ m4: "0.25rem",
101
+ m6: "0.375rem",
102
+ m8: "0.5rem",
103
+ m10: "0.625rem",
104
+ m12: "0.75rem",
105
+ m16: "1rem",
106
+ m20: "1.25rem",
107
+ m24: "1.5rem",
108
+ m32: "2rem",
109
+ m40: "2.5rem",
110
+ m48: "3rem",
109
111
  };
110
112
  var theBorderRadius = {
111
113
  full: "999px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.203",
3
+ "version": "0.0.205",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,6 +34,9 @@
34
34
  "axios": "^1.8.4",
35
35
  "clsx": "^2.1.1",
36
36
  "date-fns": "^4.1.0",
37
+ "framer-motion": "^12.7.4",
38
+ "highcharts": "^12.2.0",
39
+ "highcharts-react-official": "^3.2.1",
37
40
  "html-to-image": "^1.11.13",
38
41
  "jsonwebtoken": "^9.0.2",
39
42
  "next": "^15.2.4",
@@ -1,2 +0,0 @@
1
- declare const cn: (...inputs: any[]) => string;
2
- export default cn;
package/dist/utils/cn.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var clsx_1 = __importDefault(require("clsx"));
7
- // import { twMerge } from "tailwind-merge";
8
- var cn = function () {
9
- var inputs = [];
10
- for (var _i = 0; _i < arguments.length; _i++) {
11
- inputs[_i] = arguments[_i];
12
- }
13
- return (0, clsx_1.default)(inputs);
14
- };
15
- exports.default = cn;