tek-wallet 0.0.755 → 0.0.757

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 (62) hide show
  1. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.d.ts +3 -0
  2. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +7 -7
  3. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +5 -5
  4. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +9 -4
  5. package/dist/components/TekWallet/components/ui/AmountGroupAndChart/index.js +103 -101
  6. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.d.ts +2 -1
  7. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.js +47 -32
  8. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +1 -1
  9. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +37 -39
  10. package/dist/components/TekWallet/components/ui/HistorySwap/index.js +1 -2
  11. package/dist/components/TekWallet/components/ui/NeonLineChart/index.d.ts +6 -5
  12. package/dist/components/TekWallet/components/ui/NeonLineChart/index.js +2 -2
  13. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +4 -3
  14. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +1 -2
  15. package/dist/components/TekWallet/components/ui/SmartList/index.d.ts +0 -1
  16. package/dist/components/TekWallet/components/ui/SmartList/index.js +5 -4
  17. package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +1 -0
  18. package/dist/components/TekWallet/components/ui/SvgPath/index.js +3 -2
  19. package/dist/components/TekWallet/components/ui/SwapToken/index.js +0 -5
  20. package/dist/components/TekWallet/components/ui/SwiperControlled/index.js +5 -1
  21. package/dist/components/TekWallet/components/ui/TimeFilter/index.d.ts +4 -3
  22. package/dist/components/TekWallet/components/ui/TimeFilter/index.js +27 -30
  23. package/dist/components/TekWallet/components/ui/TokenItem/index.js +11 -6
  24. package/dist/components/TekWallet/components/ui/TokensBoard/index.js +1 -3
  25. package/dist/components/TekWallet/components/views/ActivityView/index.d.ts +10 -0
  26. package/dist/components/TekWallet/components/views/ActivityView/index.js +64 -0
  27. package/dist/components/TekWallet/components/views/AssetView/index.js +69 -6
  28. package/dist/components/TekWallet/components/views/TekWalletView/index.js +1 -1
  29. package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +5 -4
  30. package/dist/components/TekWallet/components/views/TekWalletView/routes.js +11 -5
  31. package/dist/components/TekWallet/const/app.config.d.ts +1 -0
  32. package/dist/components/TekWallet/const/app.config.js +4 -0
  33. package/dist/components/TekWallet/index.d.ts +1 -1
  34. package/dist/components/TekWallet/index.js +1 -1
  35. package/dist/components/TekWallet/providers/ActivitiesProvider/const.d.ts +1 -1
  36. package/dist/components/TekWallet/providers/ActivitiesProvider/const.js +1 -1
  37. package/dist/components/TekWallet/providers/ActivitiesProvider/functions/sortActivity.d.ts +3 -0
  38. package/dist/components/TekWallet/providers/ActivitiesProvider/functions/sortActivity.js +8 -0
  39. package/dist/components/TekWallet/providers/ActivitiesProvider/index.js +55 -51
  40. package/dist/components/TekWallet/providers/ActivitiesProvider/type.d.ts +1 -1
  41. package/dist/components/TekWallet/providers/WalletDataProvider/index.js +2 -0
  42. package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +41 -6
  43. package/dist/components/TekWallet/services/axios/get-activities-service/index.js +0 -3
  44. package/dist/components/TekWallet/services/axios/get-activities-service/type.d.ts +4 -4
  45. package/dist/components/TekWallet/services/axios/get-balance-analytic/index.d.ts +3 -0
  46. package/dist/components/TekWallet/services/axios/get-balance-analytic/index.js +56 -0
  47. package/dist/components/TekWallet/services/axios/get-balance-analytic/type.d.ts +18 -0
  48. package/dist/components/TekWallet/services/axios/get-balance-analytic/type.js +2 -0
  49. package/dist/components/TekWallet/store/balance/index.d.ts +15 -0
  50. package/dist/components/TekWallet/store/balance/index.js +24 -0
  51. package/dist/components/TekWallet/store/balance/type.d.ts +9 -0
  52. package/dist/components/TekWallet/store/balance/type.js +2 -0
  53. package/dist/components/TekWallet/store/createStorage.d.ts +3 -0
  54. package/dist/components/TekWallet/store/createStorage.js +17 -0
  55. package/dist/components/TekWallet/store/user/index.d.ts +15 -0
  56. package/dist/components/TekWallet/store/user/index.js +52 -0
  57. package/dist/components/TekWallet/store/user/type.d.ts +38 -0
  58. package/dist/components/TekWallet/store/user/type.js +9 -0
  59. package/dist/components/TekWallet/types/expose-type.d.ts +3 -0
  60. package/package.json +3 -2
  61. package/dist/components/TekWallet/components/ui/Activities/index.d.ts +0 -12
  62. package/dist/components/TekWallet/components/ui/Activities/index.js +0 -117
@@ -1,7 +1,10 @@
1
+ import { SxProps } from "@mui/material";
1
2
  import { TransactionType } from "../../../services/axios/get-activities-service/type";
2
3
  export interface ActivitiesTypeSlicePropsType {
3
4
  type: TransactionType;
4
5
  isActive?: boolean;
6
+ limitItems?: number;
7
+ sx?: SxProps;
5
8
  }
6
9
  export declare enum Status {
7
10
  Loading = "loading",
@@ -28,7 +28,6 @@ var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
28
28
  var ModalLayout_1 = __importDefault(require("../ModalLayout"));
29
29
  var ActivityDetail_1 = __importDefault(require("../ActivityDetail"));
30
30
  var SmartList_1 = __importDefault(require("../SmartList"));
31
- var type_1 = require("../../../providers/ActivitiesProvider/type");
32
31
  var Status;
33
32
  (function (Status) {
34
33
  Status["Loading"] = "loading";
@@ -37,11 +36,11 @@ var Status;
37
36
  })(Status || (exports.Status = Status = {}));
38
37
  var prefix = "activities_";
39
38
  function ActivitiesTypeSlice(props) {
40
- var _a, _b;
39
+ var _a, _b, _c;
41
40
  var theme = (0, ThemeProvider_1.useTheme)();
42
- var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, pages = _c.pages;
43
- var type = props.type, isActive = props.isActive;
44
- var _d = (0, react_1.useState)(undefined), detailActivity = _d[0], setDetailActivity = _d[1];
41
+ var _d = (0, useActivities_1.default)(), activities = _d.activities, loadActivities = _d.loadActivities, loadOutActivityType = _d.loadOutActivityType;
42
+ var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx;
43
+ var _e = (0, react_1.useState)(undefined), detailActivity = _e[0], setDetailActivity = _e[1];
45
44
  var detailDrawerRef = (0, react_1.useRef)(null);
46
45
  var activitiesByType = (0, react_1.useMemo)(function () {
47
46
  if (!(type === null || type === void 0 ? void 0 : type.slug))
@@ -73,11 +72,12 @@ function ActivitiesTypeSlice(props) {
73
72
  var loadMore = (0, react_1.useCallback)(function () {
74
73
  loadActivities(type.slug);
75
74
  }, [loadActivities, type.slug]);
76
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { width: "100%", height: "100%", display: "flex" }, children: [status === Status.Loading && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { margin: "auto" } }), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { margin: "auto" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SmartList_1.default, { items: activitiesByType || [], loadMoreData: loadMore, hasMore: pages[type.slug] !== type_1.MAX_PAGE, loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { margin: "auto" } }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, paddingTop: theme.mixins.customPadding.p16, paddingBottom: theme.mixins.customPadding.p32, px: theme.mixins.customPadding.p16 }), children: activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.map(function (activity, index) {
75
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex", paddingTop: theme.mixins.customPadding.p8, px: theme.mixins.customPadding.p16 }, sx), children: [status === Status.Loading && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto" } }), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, hasMore: !loadOutActivityType[type.slug] &&
76
+ ((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 3, sx: { marginTop: theme.mixins.customMargin.m12 } }), sx: {}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
77
77
  if (!activity)
78
78
  return null;
79
79
  var dataAsJson = JSON.stringify(activity);
80
80
  return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default, { onClick: function () { return openDetail(activity); }, data: dataAsJson }, index));
81
- }) }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: detailDrawerRef, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: closeDetail, title: (_b = detailActivity === null || detailActivity === void 0 ? void 0 : detailActivity.transaction_type) === null || _b === void 0 ? void 0 : _b.name, children: (0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: detailActivity }) }) })] }))] }));
81
+ }) }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: detailDrawerRef, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: closeDetail, title: (_c = detailActivity === null || detailActivity === void 0 ? void 0 : detailActivity.transaction_type) === null || _c === void 0 ? void 0 : _c.name, children: (0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: detailActivity }) }) })] }))] }));
82
82
  }
83
83
  exports.default = ActivitiesTypeSlice;
@@ -72,19 +72,19 @@ function ActivityDetail(props) {
72
72
  var getAmountColor = (0, react_1.useCallback)(function () {
73
73
  if (isIncrease)
74
74
  return theme.palette.text.successStatus;
75
- return theme.palette.text.white;
75
+ return theme.palette.text.black;
76
76
  }, [isIncrease, theme]);
77
77
  if (!activityData)
78
78
  return null;
79
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { mr: "0.5rem" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
79
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
80
80
  borderRadius: theme.mixins.customRadius.full,
81
81
  border: isSwap ? "0.25rem white solid" : "none",
82
- ml: "-0.5rem",
82
+ // ml: "-0.5rem",
83
83
  } }), (swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link) && ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link, width: 64, sx: {
84
84
  borderRadius: theme.mixins.customRadius.full,
85
85
  border: isSwap ? "0.25rem white solid" : "none",
86
- ml: "-0.5rem",
87
- } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeightBold, fontSize: theme.typography.fontSize24, color: getAmountColor(), opacity: isSwap ? 0.5 : 1 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeightBold, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
86
+ ml: "-1rem",
87
+ } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
88
88
  fontSize: theme.typography.fontSize12,
89
89
  textTransform: "capitalize",
90
90
  color: getStatusColor(),
@@ -88,17 +88,22 @@ function ActivityItem(props) {
88
88
  var getAmountColor = (0, react_1.useCallback)(function () {
89
89
  if (isIncrease)
90
90
  return theme.palette.text.successStatus;
91
- return theme.palette.text.white;
91
+ return theme.palette.text.black;
92
92
  }, [isIncrease, theme]);
93
93
  if (!activityData)
94
94
  return null;
95
- return ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, __assign({ sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, backgroundColor: theme.palette.background.white16, borderRadius: theme.mixins.customRadius.r16, p: theme.mixins.customPadding.p12, flexGrow: "unset", boxShadow: theme.shadows[1] }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
95
+ return ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, __assign({ sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, p: theme.mixins.customPadding.p12, flexGrow: "unset", boxShadow: theme.shadows[1] }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
96
96
  width: "fit-content",
97
97
  height: "fit-content",
98
- }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 24 }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 12 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
98
+ }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 24, sx: { borderRadius: theme.mixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 12 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
99
99
  fontSize: theme.typography.fontSize12,
100
100
  textTransform: "capitalize",
101
101
  color: getStatusColor(),
102
- }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, width: "fit-content", alignItems: "flex-end", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.successStatus, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeightBold, color: getAmountColor(), textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { textAlign: "right" }), children: (0, formatDate_1.default)(activityData.date_created) })] })] })));
102
+ }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, width: "fit-content", alignItems: "flex-end", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize13, color: theme.palette.text.successStatus, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
103
+ fontSize: theme.typography.fontSize13,
104
+ fontWeight: theme.typography.fontWeight700,
105
+ color: getAmountColor(),
106
+ textAlign: "right",
107
+ }, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { textAlign: "right" }), children: (0, formatDate_1.default)(activityData.date_created) })] })] })));
103
108
  }
104
109
  exports.default = ActivityItem;
@@ -16,123 +16,125 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var react_1 = require("react");
19
- var framer_motion_1 = require("framer-motion");
20
19
  var AnalyticGroup_1 = __importDefault(require("../AnalyticGroup"));
21
20
  var TimeFilter_1 = __importDefault(require("../TimeFilter"));
22
- var TimeFilter_2 = require("../TimeFilter");
23
21
  var DelayMounted_1 = __importDefault(require("../DelayMounted"));
24
22
  var material_1 = require("@mui/material");
25
23
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
26
24
  var NeonLineChart_1 = __importDefault(require("../NeonLineChart"));
27
- var ContentHiddenProvider_1 = require("../../../providers/ContentHiddenProvider");
28
25
  var SvgPath_1 = require("../SvgPath");
29
- var fakeSeries = [
30
- {
31
- name: "All",
32
- data: [
33
- 1003785.6864951615, 1003795.988344575, 1003827.99766239, 1003899.7426850981,
34
- 1003891.7710159089, 1003810.6439517767, 1003780.7195320514, 1003797.9506016063,
35
- 1003781.455378438, 1003782.0072632281, 1003715.167883104, 1003724.9791682598,
36
- 1003716.6018329085, 1003711.3282671372, 1003686.1868489254, 1003625.4795220237,
37
- 1003584.3334449014, 1003498.9139435134, 1003310.7825506503, 1003339.72584186,
38
- 1003334.3069939599, 1003364.3540547496, 1003394.4011155394, 1003398.386950134,
39
- 1003233.005474726, 1003185.2981006557, 1003165.7981714085,
40
- ],
41
- },
42
- ];
43
- var labels = [
44
- "2025-03-04T08:10:17.311Z",
45
- "2025-03-04T12:10:18.859Z",
46
- "2025-03-04T16:10:19.118Z",
47
- "2025-03-04T20:10:18.246Z",
48
- "2025-03-05T00:10:18.371Z",
49
- "2025-03-05T10:12:40.882Z",
50
- "2025-03-05T14:12:42.832Z",
51
- "2025-03-05T18:12:41.114Z",
52
- "2025-03-05T22:12:40.544Z",
53
- "2025-03-06T02:12:40.718Z",
54
- "2025-03-08T10:35:52.596Z",
55
- "2025-03-08T14:35:52.979Z",
56
- "2025-03-08T16:01:31.209Z",
57
- "2025-03-08T18:35:52.824Z",
58
- "2025-03-08T22:35:52.901Z",
59
- "2025-03-09T06:35:53.327Z",
60
- "2025-03-09T10:35:52.682Z",
61
- "2025-03-09T14:35:53.001Z",
62
- "2025-03-09T18:35:52.886Z",
63
- "2025-03-09T22:35:52.880Z",
64
- "2025-03-10T03:43:34.153Z",
65
- "2025-03-10T06:35:52.944Z",
66
- "2025-03-10T10:35:52.253Z",
67
- "2025-03-10T14:35:52.727Z",
68
- "2025-03-10T18:35:52.865Z",
69
- "2025-03-10T22:35:53.563Z",
70
- "2025-03-11T04:16:45.409Z",
71
- ];
72
- var defaultTimeRange = TimeFilter_2.TimeFilterType.SEVEN_DAYS;
73
- var variants = {
74
- hidden: { opacity: 0, display: "none" },
75
- visible: { opacity: 1, display: "block" },
76
- };
26
+ var user_1 = __importDefault(require("../../../store/user"));
27
+ var balance_1 = __importDefault(require("../../../store/balance"));
28
+ var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
29
+ // const fakeSeries = [
30
+ // {
31
+ // name: "All",
32
+ // data: [
33
+ // 1003785.6864951615, 1003795.988344575, 1003827.99766239, 1003899.7426850981,
34
+ // 1003891.7710159089, 1003810.6439517767, 1003780.7195320514, 1003797.9506016063,
35
+ // 1003781.455378438, 1003782.0072632281, 1003715.167883104, 1003724.9791682598,
36
+ // 1003716.6018329085, 1003711.3282671372, 1003686.1868489254, 1003625.4795220237,
37
+ // 1003584.3334449014, 1003498.9139435134, 1003310.7825506503, 1003339.72584186,
38
+ // 1003334.3069939599, 1003364.3540547496, 1003394.4011155394, 1003398.386950134,
39
+ // 1003233.005474726, 1003185.2981006557, 1003165.7981714085,
40
+ // ],
41
+ // },
42
+ // ];
43
+ // const labels = [
44
+ // "2025-03-04T08:10:17.311Z",
45
+ // "2025-03-04T12:10:18.859Z",
46
+ // "2025-03-04T16:10:19.118Z",
47
+ // "2025-03-04T20:10:18.246Z",
48
+ // "2025-03-05T00:10:18.371Z",
49
+ // "2025-03-05T10:12:40.882Z",
50
+ // "2025-03-05T14:12:42.832Z",
51
+ // "2025-03-05T18:12:41.114Z",
52
+ // "2025-03-05T22:12:40.544Z",
53
+ // "2025-03-06T02:12:40.718Z",
54
+ // "2025-03-08T10:35:52.596Z",
55
+ // "2025-03-08T14:35:52.979Z",
56
+ // "2025-03-08T16:01:31.209Z",
57
+ // "2025-03-08T18:35:52.824Z",
58
+ // "2025-03-08T22:35:52.901Z",
59
+ // "2025-03-09T06:35:53.327Z",
60
+ // "2025-03-09T10:35:52.682Z",
61
+ // "2025-03-09T14:35:53.001Z",
62
+ // "2025-03-09T18:35:52.886Z",
63
+ // "2025-03-09T22:35:52.880Z",
64
+ // "2025-03-10T03:43:34.153Z",
65
+ // "2025-03-10T06:35:52.944Z",
66
+ // "2025-03-10T10:35:52.253Z",
67
+ // "2025-03-10T14:35:52.727Z",
68
+ // "2025-03-10T18:35:52.865Z",
69
+ // "2025-03-10T22:35:53.563Z",
70
+ // "2025-03-11T04:16:45.409Z",
71
+ // ];
77
72
  var AmountGroupAndChart = function (props) {
73
+ var defaultTimeRange = (0, user_1.default)(function (state) { return state.settings.balance.timeRangeTracking; });
78
74
  var _a = (0, react_1.useState)(false), expandAreaChart = _a[0], setExpandAreaChart = _a[1];
79
75
  var _b = (0, react_1.useState)(), timeRangeData = _b[0], setTimeRangeData = _b[1];
80
- var isHidden = (0, ContentHiddenProvider_1.useContentHidden)().isHidden;
81
76
  var theme = (0, ThemeProvider_1.useTheme)();
77
+ var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
78
+ var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
79
+ var setTimeRangeTracking = (0, user_1.default)(function (state) { return state.setTimeRangeTracking; });
80
+ var updateBalanceAnalytic = (0, useWallet_1.default)().updateBalanceAnalytic;
81
+ var series = (0, react_1.useMemo)(function () {
82
+ var _a;
83
+ return (_a = analytic === null || analytic === void 0 ? void 0 : analytic.data) === null || _a === void 0 ? void 0 : _a.map(function (item) { return ({
84
+ name: item.name,
85
+ data: item.values,
86
+ }); });
87
+ }, [analytic]);
82
88
  var handleChangeTimeRange = function (data) {
83
89
  setTimeRangeData(data);
90
+ setTimeRangeTracking(data.type);
91
+ updateBalanceAnalytic(data.type);
84
92
  };
85
93
  var toggleExpand = function () {
86
94
  setExpandAreaChart(function (prev) { return !prev; });
87
95
  };
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({}, theme.mixins.column), 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: __assign(__assign({}, theme.mixins.row), { position: "relative", marginTop: theme.mixins.customMargin.m12 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
89
- width: "100%",
90
- position: "relative",
91
- transition: "all 500ms ease-in-out",
92
- // aspectRatio: expandAreaChart ? "1.47317073171" : 999999,
93
- zIndex: 10,
94
- minHeight: expandAreaChart ? "16rem" : "0",
95
- maxHeight: expandAreaChart ? "28rem" : "0",
96
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
97
- position: "absolute",
98
- top: 0,
99
- right: 0,
100
- left: 0,
101
- bottom: 0,
102
- transition: "all 500ms ease-in-out",
103
- transform: !expandAreaChart ? "translateX(-25%) scale(0.5)" : "none",
104
- display: isHidden && !expandAreaChart ? "none" : "block",
105
- }, 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: {
106
- width: "100%",
107
- height: "fit-content",
108
- transition: "all 500ms ease-in-out",
109
- transform: !expandAreaChart ? "translateY(-100%)" : "none",
110
- my: theme.mixins.customMargin.m3,
111
- } }) }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { style: {
112
- position: "relative",
113
- transform: "translateY(350%)",
114
- }, initial: "hidden", animate: expandAreaChart ? "visible" : "hidden", variants: variants, transition: {
115
- opacity: {
116
- duration: expandAreaChart ? 0.5 : 0.25,
117
- ease: "linear",
118
- delay: expandAreaChart ? 0.5 : 0,
119
- },
120
- display: {
121
- duration: 0,
122
- ease: "linear",
123
- delay: expandAreaChart ? 0.5 : 0.25,
124
- },
125
- }, children: (0, jsx_runtime_1.jsx)(DelayMounted_1.default, { delay: 100, children: (0, jsx_runtime_1.jsx)(TimeFilter_1.default, { hideAll: true, initialValue: defaultTimeRange, onChange: handleChangeTimeRange }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { onClick: toggleExpand, sx: {
126
- alignSelf: "center",
127
- transition: "all 500ms ease-in-out",
128
- cursor: "pointer",
129
- mt: theme.mixins.customMargin.m4,
130
- transform: !expandAreaChart
131
- ? "rotate(180deg) translateX(900%) translateY(120%)"
132
- : "translateX(-50%) translateY(100%)",
133
- zIndex: 20,
134
- width: 20,
135
- height: 20,
136
- }, children: SvgPath_1.IC_EXPANDER_ARROW })] })] }) }));
96
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "fit-content", position: "relative" }, props.sx), children: [(0, jsx_runtime_1.jsx)(AnalyticGroup_1.default, { sx: { position: "relative" }, timeRange: timeRangeData === null || timeRangeData === void 0 ? void 0 : timeRangeData.type }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
97
+ width: "100%",
98
+ position: "relative",
99
+ transition: "all 500ms ease-in-out",
100
+ top: expandAreaChart ? "0px" : "-30px",
101
+ aspectRatio: expandAreaChart ? "1.6" : 6.2,
102
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
103
+ position: "absolute",
104
+ top: 0,
105
+ right: 0,
106
+ left: 0,
107
+ bottom: 0,
108
+ transition: "all 500ms ease-in-out",
109
+ transform: !expandAreaChart ? "scale(0.5)" : "scale(1)",
110
+ transformOrigin: "top left",
111
+ }, children: (0, jsx_runtime_1.jsx)(DelayMounted_1.default, { delay: 800, children: (0, jsx_runtime_1.jsx)(NeonLineChart_1.default, { showMinMaxValues: expandAreaChart && isShowBalance, series: series, categories: analytic === null || analytic === void 0 ? void 0 : analytic.labels, sx: {
112
+ width: "100%",
113
+ height: "fit-content",
114
+ transition: "all 500ms ease-in-out",
115
+ my: theme.mixins.customMargin.m3,
116
+ }, children: (0, jsx_runtime_1.jsx)(DelayMounted_1.default, { delay: 800, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { onClick: toggleExpand, sx: {
117
+ position: "absolute",
118
+ right: 0,
119
+ bottom: 0,
120
+ width: 20,
121
+ height: 20,
122
+ cursor: "pointer",
123
+ zIndex: 9999,
124
+ transition: "all 500ms ease-in-out",
125
+ transform: !expandAreaChart
126
+ ? "scale(2) translate(50%, -50%)"
127
+ : "scale(1) translate(50%, -50%)",
128
+ }, children: SvgPath_1.IC_EXPANDER_ARROW }) }) }) }) }), (0, jsx_runtime_1.jsx)(TimeFilter_1.default, { hideAll: true, initialValue: defaultTimeRange, onChange: handleChangeTimeRange, sx: {
129
+ position: "absolute",
130
+ bottom: 0,
131
+ left: 0,
132
+ right: 0,
133
+ opacity: expandAreaChart ? 1 : 0,
134
+ transform: expandAreaChart ? "scale(1)" : "scale(0)",
135
+ transition: expandAreaChart
136
+ ? "opacity 300ms ease-in-out 500ms, transform 0ms ease-in-out 0ms"
137
+ : "opacity 200ms ease-in-out 0ms, transform 0ms ease-in-out 200ms",
138
+ } })] })] }));
137
139
  };
138
140
  exports.default = AmountGroupAndChart;
@@ -1,6 +1,7 @@
1
1
  import { GeneralProps } from "../../../types/ui";
2
+ import { TimeFilterType } from "../TimeFilter";
2
3
  interface AnalyticGroupProps extends GeneralProps {
3
- timeRange?: string;
4
+ timeRange?: TimeFilterType;
4
5
  }
5
6
  declare const AnalyticGroup: (props: AnalyticGroupProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export default AnalyticGroup;
@@ -19,61 +19,76 @@ var Text_1 = __importDefault(require("../Text"));
19
19
  var Formatter_1 = __importDefault(require("../Formatter"));
20
20
  var material_1 = require("@mui/material");
21
21
  var providers_1 = require("../../../providers");
22
- var ContentHiddenProvider_1 = require("../../../providers/ContentHiddenProvider");
23
22
  var SvgPath_1 = require("../SvgPath");
23
+ var TimeFilter_1 = require("../TimeFilter");
24
+ var user_1 = __importDefault(require("../../../store/user"));
25
+ var balance_1 = __importDefault(require("../../../store/balance"));
24
26
  var AnalyticGroup = function (props) {
27
+ var sx = props.sx;
25
28
  var theme = (0, providers_1.useTheme)();
26
- var _a = (0, ContentHiddenProvider_1.useContentHidden)(), isHidden = _a.isHidden, setIsHidden = _a.setIsHidden;
27
- var toggleHidden = function () {
28
- setIsHidden(!isHidden);
29
- };
30
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative", bottom: "30px" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
29
+ var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
30
+ var toggleShowBalance = (0, user_1.default)(function (state) { return state.toggleShowBalance; });
31
+ var totalBalanceInUSD = (0, balance_1.default)(function (state) { return state.totalBalanceInUSD; });
32
+ var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { justifyContent: "space-between", alignItems: "flex-start" }), sx), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
31
34
  fontSize: theme.typography.fontSize15,
32
35
  fontWeight: theme.typography.fontWeight500,
33
36
  color: theme.palette.text.accent2,
34
- }, children: "Total Amount" }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { onClick: toggleHidden, sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_NO_SEE })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
37
+ }, children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: toggleShowBalance, sx: {
38
+ position: "relative",
39
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 20, height: 20 }, children: SvgPath_1.IC_NO_SEE }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
40
+ position: "absolute",
41
+ left: "50%",
42
+ width: "2px",
43
+ top: "50%",
44
+ height: !isShowBalance ? "80%" : "0px",
45
+ transition: "height 0.2s ease-in-out",
46
+ backgroundColor: theme.palette.text.accent2,
47
+ transform: "translate(calc(-50% + 1px), calc(-50% + 1px)) rotate(45deg)",
48
+ transformOrigin: "center center",
49
+ } })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
35
50
  display: "flex",
36
51
  flexDirection: "column",
37
52
  alignItems: "flex-end",
38
53
  gap: theme.mixins.gaps.g6,
39
54
  fontSize: theme.typography.fontSize12,
40
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g6 }), children: !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, 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: {
55
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
41
56
  fontWeight: theme.typography.fontWeight400,
42
57
  fontSize: "0.8em",
43
- }, children: "USDC" }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN })] })] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
58
+ }, children: "USD" }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN })] })] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
44
59
  fontSize: theme.typography.fontSize24,
45
60
  fontWeight: theme.typography.fontWeight700,
46
61
  color: theme.palette.text.black,
47
- }, children: "*****" })) }), (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: {
48
- fontWeight: theme.typography.fontWeight600,
49
- leading: theme.typography.leading140,
50
- fontSize: theme.typography.fontSize12,
51
- textTransform: "capitalize",
52
- color: theme.palette.text.accent,
53
- }, children: props.timeRange }), !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: "5.63 (+3,22%)" })] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
54
- fontSize: theme.typography.fontSize12,
62
+ }, children: "******" })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [!!props.timeRange && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
55
63
  fontWeight: theme.typography.fontWeight600,
56
- color: theme.palette.text.accent2,
57
- display: theme.mixins.row,
58
- }, children: "****" }))] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
59
- width: "110%",
60
- borderColor: "".concat(theme.palette.border.accent),
61
- opacity: 0.2,
62
- marginTop: theme.mixins.customMargin.m4,
63
- } }), (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: {
64
- fontWeight: theme.typography.fontWeight500,
65
64
  leading: theme.typography.leading140,
66
65
  fontSize: theme.typography.fontSize12,
67
66
  textTransform: "capitalize",
68
67
  color: theme.palette.text.accent,
69
- }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: !isHidden ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
68
+ }, children: TimeFilter_1.TIME_FILTER_LABEL[props.timeRange] })), !!(analytic === null || analytic === void 0 ? void 0 : analytic.pnl) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowBalance && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: [(0, jsx_runtime_1.jsx)("span", { children: (analytic === null || analytic === void 0 ? void 0 : analytic.pnl) > 0 ? "+" : "" }), " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl }), " ", "(", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl_percent, unit: "%" }), ")"] })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
70
69
  fontSize: theme.typography.fontSize12,
71
70
  fontWeight: theme.typography.fontWeight600,
72
71
  color: theme.palette.text.accent2,
73
- }, children: "\u2248 250k XP" }) })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
74
- fontSize: theme.typography.fontSize12,
75
- fontWeight: theme.typography.fontWeight600,
76
- color: theme.palette.text.accent2,
77
- }, children: "****" })) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })] })] }));
72
+ display: theme.mixins.row,
73
+ }, children: "******" }))] }))] }), false && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
74
+ width: "110%",
75
+ borderColor: "".concat(theme.palette.border.accent),
76
+ opacity: 0.2,
77
+ marginTop: theme.mixins.customMargin.m4,
78
+ } }), isShowBalance && ((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: {
79
+ fontWeight: theme.typography.fontWeight500,
80
+ leading: theme.typography.leading140,
81
+ fontSize: theme.typography.fontSize12,
82
+ textTransform: "capitalize",
83
+ color: theme.palette.text.accent,
84
+ }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
85
+ fontSize: theme.typography.fontSize12,
86
+ fontWeight: theme.typography.fontWeight600,
87
+ color: theme.palette.text.accent2,
88
+ }, children: "\u2248 250k XP" }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
89
+ fontSize: theme.typography.fontSize12,
90
+ fontWeight: theme.typography.fontWeight600,
91
+ color: theme.palette.text.accent2,
92
+ }, children: "******" }))] }))] })] }));
78
93
  };
79
94
  exports.default = AnalyticGroup;
@@ -104,7 +104,7 @@ var CopyTextComponent = function (_a) {
104
104
  ? "opacity 0.5s linear, transform 0.17s linear"
105
105
  : "opacity 0.15s linear, transform 0.1s linear",
106
106
  }, children: [iconSuccess || (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_SUCCESS }), !hideTextMessage && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
107
- color: theme.palette.text.successStatus,
107
+ color: "#01FF00",
108
108
  fontSize: theme.typography.fontSize14,
109
109
  lineHeight: theme.typography.leading100,
110
110
  }, children: "Copied" }))] })] }));