@mx-cartographer/experiences 9.0.3 → 9.1.0-alpha.bb1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -4
- package/dist/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-Fii_xATx.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,115 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { M as ie } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
13
|
-
import { format as ae, fromUnixTime as se, differenceInMonths as ce } from "date-fns";
|
|
14
|
-
import P from "@mui/material/Box";
|
|
15
|
-
import { C as le } from "../ConnectionsDrawer-CtfPXk0M.mjs";
|
|
16
|
-
import { fromUnixTime as de } from "date-fns/fromUnixTime";
|
|
1
|
+
import { J as F, ln as re, m as Y, un as oe, x as K } from "../core-BexP5oiV.mjs";
|
|
2
|
+
import { An as ie, Gn as ae, i as se, jn as x, lr as U, mr as q, qn as ce, sr as w, yn as le } from "../accounts-DkyAiLpg.mjs";
|
|
3
|
+
import { n as J } from "../Analytics-BKzTPees.mjs";
|
|
4
|
+
import { d as B, h as Z, k as de, n as he, p as E, t as Q, x as j } from "../Loader-BlVzRtUd.mjs";
|
|
5
|
+
import p from "react";
|
|
6
|
+
import { observer as C } from "mobx-react-lite";
|
|
7
|
+
import h from "@mui/material/Stack";
|
|
8
|
+
import { Icon as R, P, Text as d } from "@mxenabled/mxui";
|
|
9
|
+
import me from "@mui/material/Button";
|
|
10
|
+
import { Icon as ee } from "@mxenabled/mx-icons";
|
|
11
|
+
import { Fragment as N, jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
17
12
|
import { useTheme as H } from "@mui/material/styles";
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
13
|
+
import te from "@mui/material/Box";
|
|
14
|
+
import { fromUnixTime as ue } from "date-fns/fromUnixTime";
|
|
15
|
+
import { differenceInMonths as pe, format as fe, fromUnixTime as xe } from "date-fns";
|
|
16
|
+
import { Stack as ge } from "@mui/material";
|
|
22
17
|
import L from "@mui/material/Divider";
|
|
23
|
-
import
|
|
24
|
-
import A from "@mui/material/
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
18
|
+
import G from "@mui/material/List";
|
|
19
|
+
import A from "@mui/material/ListItem";
|
|
20
|
+
import ne from "@mui/material/ListItemButton";
|
|
21
|
+
import V from "@mui/material/ListItemIcon";
|
|
22
|
+
import v from "@mui/material/ListItemText";
|
|
23
|
+
import O from "@mui/material/ListSubheader";
|
|
24
|
+
import ye from "@mui/material/Collapse";
|
|
25
|
+
var _e = ({ amount: t, copy: s, trendValue: i }) => {
|
|
26
|
+
const n = i > 0, r = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
27
|
+
return /* @__PURE__ */ o(h, {
|
|
28
|
+
sx: {
|
|
29
|
+
flexDirection: "row",
|
|
30
|
+
justifyContent: "space-between"
|
|
31
|
+
},
|
|
32
|
+
children: [/* @__PURE__ */ e(P, {
|
|
33
|
+
variant: "h1",
|
|
34
|
+
children: F(t, "0,0")
|
|
35
|
+
}), t !== 0 && /* @__PURE__ */ o(h, {
|
|
36
|
+
sx: { color: n ? "success.main" : "text.secondary" },
|
|
37
|
+
children: [/* @__PURE__ */ o(h, {
|
|
38
|
+
sx: {
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
gap: 8
|
|
41
|
+
},
|
|
42
|
+
children: [/* @__PURE__ */ e(ee, {
|
|
43
|
+
name: r,
|
|
44
|
+
size: 20
|
|
45
|
+
}), /* @__PURE__ */ e(d, {
|
|
46
|
+
sx: {
|
|
47
|
+
fontWeight: 600,
|
|
48
|
+
textAlign: "right"
|
|
49
|
+
},
|
|
50
|
+
variant: "body1",
|
|
51
|
+
children: F(i, "0,0.00")
|
|
52
|
+
})]
|
|
53
|
+
}), /* @__PURE__ */ e(d, {
|
|
54
|
+
sx: {
|
|
55
|
+
display: "block",
|
|
56
|
+
textAlign: "right"
|
|
57
|
+
},
|
|
58
|
+
variant: "caption",
|
|
59
|
+
children: s.this_month
|
|
60
|
+
})]
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}, ve = ({ copy: t }) => /* @__PURE__ */ o(h, {
|
|
64
|
+
sx: {
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
gap: 12
|
|
67
|
+
},
|
|
68
|
+
children: [/* @__PURE__ */ e(ee, {
|
|
69
|
+
name: "elevation",
|
|
70
|
+
size: 32,
|
|
71
|
+
sx: { color: "text.primary" }
|
|
72
|
+
}), /* @__PURE__ */ o(h, { children: [/* @__PURE__ */ e(d, {
|
|
73
|
+
sx: {
|
|
74
|
+
display: "block",
|
|
75
|
+
fontWeight: 600
|
|
76
|
+
},
|
|
77
|
+
variant: "body1",
|
|
78
|
+
children: t.empty_widget_header
|
|
79
|
+
}), /* @__PURE__ */ e(P, {
|
|
80
|
+
sx: { color: "text.secondary" },
|
|
81
|
+
variant: "body2",
|
|
82
|
+
children: t.zero_state_description
|
|
83
|
+
})] })]
|
|
84
|
+
}), it = C(({ onCTAClick: t }) => {
|
|
85
|
+
const { visibleAccounts: s } = he(), { onEvent: i } = B(), { net_worth: n, common: r } = E(), { isInitialized: a } = Z(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = j();
|
|
86
|
+
if (p.useEffect(() => {
|
|
58
87
|
c || l().finally();
|
|
59
88
|
}, []), J({
|
|
60
89
|
widgetName: "NetWorthMicroWidget",
|
|
61
90
|
isLoaded: c
|
|
62
|
-
}),
|
|
63
|
-
c && i(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const W = () => {
|
|
68
|
-
i(
|
|
69
|
-
s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
|
|
70
|
-
), t();
|
|
91
|
+
}), p.useEffect(() => {
|
|
92
|
+
c && i(w.NET_WORTH_LOAD_WIDGET, { state: s?.length ? "default" : "zeroState" });
|
|
93
|
+
}, [c]), !a || !c) return /* @__PURE__ */ e(Q, { height: 100 });
|
|
94
|
+
const S = () => {
|
|
95
|
+
i(s.length ? w.NET_WORTH_CLICK_VIEW_DETAILS : w.NET_WORTH_CLICK_GET_STARTED), t();
|
|
71
96
|
};
|
|
72
|
-
return /* @__PURE__ */ e(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const { isMobile: t } = ee(), { availableWidth: s } = re(), i = H(), {
|
|
91
|
-
hoveredData: n,
|
|
92
|
-
netWorthChartData: a,
|
|
93
|
-
selectedData: o,
|
|
94
|
-
setHoveredIndex: c,
|
|
95
|
-
setSelectedIndex: l
|
|
96
|
-
} = j(), g = s - 320, f = a.map((h) => ({
|
|
97
|
-
x: he(de(h.x), pe.MONTH_SHORT),
|
|
98
|
-
y: h.y
|
|
99
|
-
})), W = o ? { index: a.findIndex((h) => h.x === o.x) } : void 0, S = n ? { index: a.findIndex((h) => h.x === n.x) } : void 0, w = (h) => ({
|
|
100
|
-
fill: h === W?.index ? i.palette.success.main : "",
|
|
101
|
-
filter: h === S?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
|
|
97
|
+
return /* @__PURE__ */ e(ce, {
|
|
98
|
+
className: "mx-networth-microwidget",
|
|
99
|
+
ctaLabel: r.see_details,
|
|
100
|
+
onCTAClick: S,
|
|
101
|
+
title: n.net_worth,
|
|
102
|
+
children: g.accounts.length ? /* @__PURE__ */ e(_e, {
|
|
103
|
+
amount: f?.y,
|
|
104
|
+
copy: n,
|
|
105
|
+
trendValue: f?.change
|
|
106
|
+
}) : /* @__PURE__ */ e(ve, { copy: n })
|
|
107
|
+
});
|
|
108
|
+
}), Ce = () => {
|
|
109
|
+
const { isMobile: t } = q(), { availableWidth: s } = de(), i = H(), { hoveredData: n, netWorthChartData: r, selectedData: a, setHoveredIndex: c, setSelectedIndex: l } = j(), g = s - 320, f = r.map((m) => ({
|
|
110
|
+
x: oe(ue(m.x), re.MONTH_SHORT),
|
|
111
|
+
y: m.y
|
|
112
|
+
})), S = a ? { index: r.findIndex((m) => m.x === a.x) } : void 0, W = n ? { index: r.findIndex((m) => m.x === n.x) } : void 0, b = (m) => ({
|
|
113
|
+
fill: m === S?.index ? i.palette.success.main : "",
|
|
114
|
+
filter: m === W?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
|
|
102
115
|
stroke: i.palette.success.main
|
|
103
|
-
}), y = (
|
|
116
|
+
}), y = (m, M) => {
|
|
104
117
|
l(M);
|
|
105
|
-
}, k = (
|
|
106
|
-
c(
|
|
118
|
+
}, k = (m) => {
|
|
119
|
+
c(m);
|
|
107
120
|
}, D = () => {
|
|
108
121
|
c(-1);
|
|
109
122
|
};
|
|
110
|
-
return /* @__PURE__ */ e(
|
|
111
|
-
|
|
112
|
-
{
|
|
123
|
+
return /* @__PURE__ */ e(h, {
|
|
124
|
+
sx: { width: "100%" },
|
|
125
|
+
children: /* @__PURE__ */ e(le, {
|
|
113
126
|
baseline: "min",
|
|
114
127
|
chartFor: "networthChart",
|
|
115
128
|
chartXaxisSx: { "& .MuiChartsAxis-tickLabel": { transform: "translateX(8px)" } },
|
|
@@ -118,447 +131,481 @@ const Ce = ({ amount: t, copy: s, trendValue: i }) => {
|
|
|
118
131
|
datasets: [f],
|
|
119
132
|
height: 350,
|
|
120
133
|
labels: [],
|
|
121
|
-
margin: {
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
margin: {
|
|
135
|
+
right: 20,
|
|
136
|
+
left: 38
|
|
137
|
+
},
|
|
138
|
+
markHandlers: {
|
|
139
|
+
onMarkClick: y,
|
|
140
|
+
onMouseEnter: k,
|
|
141
|
+
onMouseLeave: D
|
|
142
|
+
},
|
|
143
|
+
markStyles: b,
|
|
124
144
|
showArea: !0,
|
|
125
145
|
useCustomMark: !0,
|
|
126
146
|
valueFormatterString: "0.0[0]a",
|
|
127
147
|
width: t ? s - 48 : g
|
|
128
|
-
}
|
|
129
|
-
) });
|
|
130
|
-
}, we = _(_e), ve = ({
|
|
131
|
-
item: t,
|
|
132
|
-
getStyles: s,
|
|
133
|
-
isHovered: i = !1,
|
|
134
|
-
isSelected: n = !1,
|
|
135
|
-
onItemClick: a,
|
|
136
|
-
onMouseEnter: o,
|
|
137
|
-
onMouseLeave: c
|
|
138
|
-
}) => {
|
|
139
|
-
const [l, g] = u.useState({
|
|
140
|
-
color: ""
|
|
148
|
+
})
|
|
141
149
|
});
|
|
142
|
-
|
|
150
|
+
}, be = C(Ce), we = ({ item: t, getStyles: s, isHovered: i = !1, isSelected: n = !1, onItemClick: r, onMouseEnter: a, onMouseLeave: c }) => {
|
|
151
|
+
const [l, g] = p.useState({ color: "" });
|
|
152
|
+
return p.useEffect(() => {
|
|
143
153
|
g(s(t));
|
|
144
|
-
}, [i, n]), /* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}) => {
|
|
182
|
-
let o = a.palette.secondary.main, c = a.palette.secondary.main, l = "trending_flat";
|
|
183
|
-
return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(fe, { alignItems: "center", direction: "row", spacing: 4, children: [
|
|
184
|
-
/* @__PURE__ */ e(
|
|
185
|
-
R,
|
|
186
|
-
{
|
|
154
|
+
}, [i, n]), /* @__PURE__ */ o(p.Fragment, { children: [/* @__PURE__ */ e(A, {
|
|
155
|
+
sx: {
|
|
156
|
+
...l,
|
|
157
|
+
minHeight: 44,
|
|
158
|
+
"&:hover": { color: n ? "inherit" : l.color }
|
|
159
|
+
},
|
|
160
|
+
children: /* @__PURE__ */ e(ne, {
|
|
161
|
+
onClick: (f) => r?.(f, t.x),
|
|
162
|
+
onMouseEnter: () => a(t.x),
|
|
163
|
+
onMouseLeave: () => c(),
|
|
164
|
+
sx: {
|
|
165
|
+
minHeight: 20,
|
|
166
|
+
padding: 12
|
|
167
|
+
},
|
|
168
|
+
children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
|
|
169
|
+
direction: "row",
|
|
170
|
+
justifyContent: "space-between",
|
|
171
|
+
sx: { fontWeight: 400 },
|
|
172
|
+
children: [/* @__PURE__ */ e(d, {
|
|
173
|
+
variant: "body1",
|
|
174
|
+
children: Y(t.x)
|
|
175
|
+
}), /* @__PURE__ */ e(x, {
|
|
176
|
+
amount: t.y,
|
|
177
|
+
sx: { color: "inherit" },
|
|
178
|
+
variant: "body1"
|
|
179
|
+
})]
|
|
180
|
+
}) })
|
|
181
|
+
})
|
|
182
|
+
}), /* @__PURE__ */ e(L, {})] }, t.x);
|
|
183
|
+
}, Se = C(we), We = ({ currencyLabel: t, currencyVariant: s = "body2", iconSize: i, netWorth: n, theme: r }) => {
|
|
184
|
+
let a = r.palette.secondary.main, c = r.palette.secondary.main, l = "trending_flat";
|
|
185
|
+
return n.change < 0 ? l = "trending_down" : n.change > 0 && (a = r.palette.success.main, c = r.palette.success.main, l = "trending_up"), /* @__PURE__ */ o(ge, {
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
direction: "row",
|
|
188
|
+
spacing: 4,
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ e(R, {
|
|
187
191
|
name: l,
|
|
188
192
|
size: i,
|
|
189
|
-
sx: {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
})
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */ e(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
sx: { backgroundColor: c.palette.background.paper, py: 14 },
|
|
255
|
-
children: /* @__PURE__ */ e(
|
|
256
|
-
b,
|
|
257
|
-
{
|
|
258
|
-
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
260
|
-
d,
|
|
261
|
-
{
|
|
262
|
-
sx: {
|
|
263
|
-
mr: 10
|
|
264
|
-
},
|
|
265
|
-
variant: "body1",
|
|
266
|
-
children: l.accountName
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
/* @__PURE__ */ e(
|
|
270
|
-
x,
|
|
271
|
-
{
|
|
272
|
-
amount: l.loss,
|
|
273
|
-
sx: { flexShrink: 0, fontWeight: 700 },
|
|
274
|
-
variant: "body1"
|
|
275
|
-
}
|
|
276
|
-
)
|
|
277
|
-
] }),
|
|
278
|
-
sx: { px: 16 }
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
},
|
|
282
|
-
l.accountName
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ e(L, {})
|
|
285
|
-
] }))
|
|
286
|
-
] })
|
|
287
|
-
] });
|
|
288
|
-
}, Te = _(Ie), Le = ({ accounts: t, name: s, icon: i }) => {
|
|
289
|
-
const [n, a] = u.useState(!1);
|
|
290
|
-
return /* @__PURE__ */ r(N, { children: [
|
|
291
|
-
/* @__PURE__ */ e(O, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(te, { onClick: () => a(!n), children: [
|
|
292
|
-
i && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(R, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
293
|
-
/* @__PURE__ */ e(
|
|
294
|
-
b,
|
|
295
|
-
{
|
|
296
|
-
primary: /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "body1", children: s })
|
|
297
|
-
}
|
|
298
|
-
),
|
|
299
|
-
/* @__PURE__ */ e(K, { children: n ? /* @__PURE__ */ e(R, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(R, { name: "expand_more", size: 24 }) })
|
|
300
|
-
] }) }),
|
|
301
|
-
/* @__PURE__ */ e(L, {}),
|
|
302
|
-
/* @__PURE__ */ e(xe, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, c) => /* @__PURE__ */ r(z, { children: [
|
|
303
|
-
/* @__PURE__ */ e(O, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
304
|
-
b,
|
|
305
|
-
{
|
|
306
|
-
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
307
|
-
/* @__PURE__ */ e(
|
|
308
|
-
d,
|
|
309
|
-
{
|
|
310
|
-
sx: {
|
|
311
|
-
marginRight: 10
|
|
312
|
-
},
|
|
313
|
-
variant: "body1",
|
|
314
|
-
children: o.accountName
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
/* @__PURE__ */ e(
|
|
318
|
-
x,
|
|
319
|
-
{
|
|
320
|
-
amount: o.balance,
|
|
321
|
-
sx: {
|
|
322
|
-
flexShrink: 0
|
|
323
|
-
},
|
|
324
|
-
variant: "body2"
|
|
325
|
-
}
|
|
326
|
-
)
|
|
327
|
-
] }),
|
|
328
|
-
sx: { pl: 72, pr: 16 }
|
|
329
|
-
}
|
|
330
|
-
) }),
|
|
331
|
-
c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})
|
|
332
|
-
] }, o.accountName)) })
|
|
333
|
-
] });
|
|
334
|
-
}, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Le, { accounts: s, icon: i, name: n }, n)) }), De = ({
|
|
335
|
-
netWorth: t,
|
|
336
|
-
assets: s,
|
|
337
|
-
liabilities: i,
|
|
338
|
-
totalAssets: n,
|
|
339
|
-
totalLiabilities: a
|
|
340
|
-
}) => {
|
|
341
|
-
const { net_worth: o } = E(), c = H();
|
|
342
|
-
return /* @__PURE__ */ r(N, { children: [
|
|
343
|
-
/* @__PURE__ */ r(
|
|
344
|
-
P,
|
|
345
|
-
{
|
|
346
|
-
sx: {
|
|
347
|
-
alignItems: "center",
|
|
348
|
-
display: "flex",
|
|
349
|
-
flexDirection: "column",
|
|
193
|
+
sx: { color: a }
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ e(x, {
|
|
196
|
+
amount: n.change,
|
|
197
|
+
color: c,
|
|
198
|
+
variant: s
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ e(d, {
|
|
201
|
+
variant: "body2",
|
|
202
|
+
children: t
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
});
|
|
206
|
+
}, $ = C(We), Te = ({ netWorth: t, gains: s, losses: i, totalGains: n, totalLosses: r }) => {
|
|
207
|
+
const { net_worth: a } = E(), c = H();
|
|
208
|
+
return /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ o(h, {
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
justifyContent: "space-between",
|
|
211
|
+
mb: 8,
|
|
212
|
+
pt: 24,
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ e(d, {
|
|
215
|
+
variant: "body2",
|
|
216
|
+
children: Y(t?.x)
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ e(d, {
|
|
219
|
+
variant: "body1",
|
|
220
|
+
children: a.total_change
|
|
221
|
+
}),
|
|
222
|
+
t && /* @__PURE__ */ e($, {
|
|
223
|
+
currencyVariant: "h1",
|
|
224
|
+
iconSize: 32,
|
|
225
|
+
netWorth: t,
|
|
226
|
+
theme: c
|
|
227
|
+
})
|
|
228
|
+
]
|
|
229
|
+
}), /* @__PURE__ */ o(G, { children: [
|
|
230
|
+
/* @__PURE__ */ e(O, {
|
|
231
|
+
sx: {
|
|
232
|
+
mb: 8,
|
|
233
|
+
mt: 12,
|
|
234
|
+
mx: 8
|
|
235
|
+
},
|
|
236
|
+
children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
|
|
237
|
+
direction: "row",
|
|
238
|
+
justifyContent: "space-between",
|
|
239
|
+
children: [/* @__PURE__ */ e(d, {
|
|
240
|
+
sx: { fontWeight: 700 },
|
|
241
|
+
variant: "caption",
|
|
242
|
+
children: a.gains
|
|
243
|
+
}), /* @__PURE__ */ e(x, {
|
|
244
|
+
amount: n,
|
|
245
|
+
sx: { fontWeight: 400 },
|
|
246
|
+
variant: "caption"
|
|
247
|
+
})]
|
|
248
|
+
}) })
|
|
249
|
+
}),
|
|
250
|
+
s?.map((l) => /* @__PURE__ */ o(p.Fragment, { children: [/* @__PURE__ */ e(A, {
|
|
251
|
+
sx: {
|
|
252
|
+
backgroundColor: c.palette.background.paper,
|
|
253
|
+
py: 14
|
|
254
|
+
},
|
|
255
|
+
children: /* @__PURE__ */ e(v, {
|
|
256
|
+
primary: /* @__PURE__ */ o(h, {
|
|
257
|
+
direction: "row",
|
|
350
258
|
justifyContent: "space-between",
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
259
|
+
children: [/* @__PURE__ */ e(d, {
|
|
260
|
+
sx: { mr: 10 },
|
|
261
|
+
variant: "body1",
|
|
262
|
+
children: l.accountName
|
|
263
|
+
}), /* @__PURE__ */ e(x, {
|
|
264
|
+
amount: l.gain,
|
|
265
|
+
sx: {
|
|
266
|
+
color: c.palette.success.main,
|
|
267
|
+
flexShrink: 0,
|
|
268
|
+
fontWeight: 700
|
|
269
|
+
},
|
|
270
|
+
variant: "body1"
|
|
271
|
+
})]
|
|
272
|
+
}),
|
|
273
|
+
sx: { px: 16 }
|
|
274
|
+
})
|
|
275
|
+
}), /* @__PURE__ */ e(L, {})] }, l.accountName)),
|
|
276
|
+
/* @__PURE__ */ e(O, {
|
|
277
|
+
sx: {
|
|
278
|
+
mb: 8,
|
|
279
|
+
mt: 12,
|
|
280
|
+
mx: 8
|
|
281
|
+
},
|
|
282
|
+
children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
|
|
283
|
+
direction: "row",
|
|
284
|
+
justifyContent: "space-between",
|
|
285
|
+
children: [/* @__PURE__ */ e(d, {
|
|
286
|
+
sx: { fontWeight: 700 },
|
|
287
|
+
variant: "caption",
|
|
288
|
+
children: a.losses
|
|
289
|
+
}), /* @__PURE__ */ e(x, {
|
|
290
|
+
amount: r,
|
|
291
|
+
sx: { fontWeight: 400 },
|
|
292
|
+
variant: "caption"
|
|
293
|
+
})]
|
|
294
|
+
}) })
|
|
295
|
+
}),
|
|
296
|
+
i?.map((l) => /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ e(A, {
|
|
297
|
+
sx: {
|
|
298
|
+
backgroundColor: c.palette.background.paper,
|
|
299
|
+
py: 14
|
|
300
|
+
},
|
|
301
|
+
children: /* @__PURE__ */ e(v, {
|
|
302
|
+
primary: /* @__PURE__ */ o(h, {
|
|
303
|
+
direction: "row",
|
|
304
|
+
justifyContent: "space-between",
|
|
305
|
+
children: [/* @__PURE__ */ e(d, {
|
|
306
|
+
sx: { mr: 10 },
|
|
307
|
+
variant: "body1",
|
|
308
|
+
children: l.accountName
|
|
309
|
+
}), /* @__PURE__ */ e(x, {
|
|
310
|
+
amount: l.loss,
|
|
311
|
+
sx: {
|
|
312
|
+
flexShrink: 0,
|
|
313
|
+
fontWeight: 700
|
|
314
|
+
},
|
|
315
|
+
variant: "body1"
|
|
316
|
+
})]
|
|
317
|
+
}),
|
|
318
|
+
sx: { px: 16 }
|
|
319
|
+
})
|
|
320
|
+
}, l.accountName), /* @__PURE__ */ e(L, {})] }))
|
|
321
|
+
] })] });
|
|
322
|
+
}, Ie = C(Te), Le = ({ accounts: t, name: s, icon: i }) => {
|
|
323
|
+
const [n, r] = p.useState(!1);
|
|
324
|
+
return /* @__PURE__ */ o(N, { children: [
|
|
325
|
+
/* @__PURE__ */ e(A, {
|
|
326
|
+
sx: (a) => ({ backgroundColor: a.palette.background.paper }),
|
|
327
|
+
children: /* @__PURE__ */ o(ne, {
|
|
328
|
+
onClick: () => r(!n),
|
|
354
329
|
children: [
|
|
355
|
-
/* @__PURE__ */ e(
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
330
|
+
i && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(R, {
|
|
331
|
+
name: i,
|
|
332
|
+
size: 24,
|
|
333
|
+
sx: { mr: 12 }
|
|
334
|
+
}) }),
|
|
335
|
+
/* @__PURE__ */ e(v, { primary: /* @__PURE__ */ e(d, {
|
|
336
|
+
sx: { fontWeight: 700 },
|
|
337
|
+
variant: "body1",
|
|
338
|
+
children: s
|
|
339
|
+
}) }),
|
|
340
|
+
/* @__PURE__ */ e(V, { children: n ? /* @__PURE__ */ e(R, {
|
|
341
|
+
name: "expand_less",
|
|
342
|
+
size: 24
|
|
343
|
+
}) : /* @__PURE__ */ e(R, {
|
|
344
|
+
name: "expand_more",
|
|
345
|
+
size: 24
|
|
346
|
+
}) })
|
|
366
347
|
]
|
|
367
|
-
}
|
|
368
|
-
),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
/* @__PURE__ */ e(
|
|
386
|
-
|
|
387
|
-
{
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */ e(
|
|
397
|
-
|
|
348
|
+
})
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ e(L, {}),
|
|
351
|
+
/* @__PURE__ */ e(ye, {
|
|
352
|
+
in: n,
|
|
353
|
+
timeout: "auto",
|
|
354
|
+
unmountOnExit: !0,
|
|
355
|
+
children: t.map((a, c) => /* @__PURE__ */ o(G, { children: [/* @__PURE__ */ e(A, {
|
|
356
|
+
sx: () => ({ py: 14 }),
|
|
357
|
+
children: /* @__PURE__ */ e(v, {
|
|
358
|
+
primary: /* @__PURE__ */ o(h, {
|
|
359
|
+
direction: "row",
|
|
360
|
+
justifyContent: "space-between",
|
|
361
|
+
sx: { fontWeight: 400 },
|
|
362
|
+
children: [/* @__PURE__ */ e(d, {
|
|
363
|
+
sx: { marginRight: 10 },
|
|
364
|
+
variant: "body1",
|
|
365
|
+
children: a.accountName
|
|
366
|
+
}), /* @__PURE__ */ e(x, {
|
|
367
|
+
amount: a.balance,
|
|
368
|
+
sx: { flexShrink: 0 },
|
|
369
|
+
variant: "body2"
|
|
370
|
+
})]
|
|
371
|
+
}),
|
|
372
|
+
sx: {
|
|
373
|
+
pl: 72,
|
|
374
|
+
pr: 16
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
}), c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})] }, a.accountName))
|
|
378
|
+
})
|
|
398
379
|
] });
|
|
399
|
-
},
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
380
|
+
}, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Le, {
|
|
381
|
+
accounts: s,
|
|
382
|
+
icon: i,
|
|
383
|
+
name: n
|
|
384
|
+
}, n)) }), De = ({ netWorth: t, assets: s, liabilities: i, totalAssets: n, totalLiabilities: r }) => {
|
|
385
|
+
const { net_worth: a } = E(), c = H();
|
|
386
|
+
return /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ o(te, {
|
|
387
|
+
sx: {
|
|
388
|
+
alignItems: "center",
|
|
389
|
+
display: "flex",
|
|
390
|
+
flexDirection: "column",
|
|
391
|
+
justifyContent: "space-between",
|
|
392
|
+
paddingTop: 24,
|
|
393
|
+
marginBottom: 8
|
|
394
|
+
},
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ e(d, {
|
|
397
|
+
variant: "body1",
|
|
398
|
+
children: a.current_net_worth
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ e(x, {
|
|
401
|
+
amount: t?.y ?? 0,
|
|
402
|
+
variant: "h1"
|
|
403
|
+
}),
|
|
404
|
+
t && /* @__PURE__ */ e($, {
|
|
405
|
+
currencyLabel: a.this_month,
|
|
406
|
+
iconSize: 20,
|
|
407
|
+
netWorth: t,
|
|
408
|
+
theme: c
|
|
409
|
+
})
|
|
410
|
+
]
|
|
411
|
+
}), /* @__PURE__ */ o(G, { children: [
|
|
412
|
+
/* @__PURE__ */ e(O, {
|
|
413
|
+
sx: {
|
|
414
|
+
mb: 8,
|
|
415
|
+
mt: 12,
|
|
416
|
+
mx: 8
|
|
417
|
+
},
|
|
418
|
+
children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
|
|
419
|
+
direction: "row",
|
|
420
|
+
justifyContent: "space-between",
|
|
421
|
+
children: [/* @__PURE__ */ e(d, {
|
|
422
|
+
sx: { fontWeight: 700 },
|
|
423
|
+
variant: "caption",
|
|
424
|
+
children: a.assets
|
|
425
|
+
}), /* @__PURE__ */ e(x, {
|
|
426
|
+
amount: n,
|
|
427
|
+
sx: { fontWeight: 400 },
|
|
428
|
+
variant: "caption"
|
|
429
|
+
})]
|
|
430
|
+
}) })
|
|
431
|
+
}),
|
|
432
|
+
/* @__PURE__ */ e(X, { groupedAccounts: K(s) }),
|
|
433
|
+
/* @__PURE__ */ e(O, {
|
|
434
|
+
sx: {
|
|
435
|
+
mb: 8,
|
|
436
|
+
mt: 12,
|
|
437
|
+
mx: 8
|
|
438
|
+
},
|
|
439
|
+
children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
|
|
440
|
+
direction: "row",
|
|
441
|
+
justifyContent: "space-between",
|
|
442
|
+
children: [/* @__PURE__ */ e(d, {
|
|
443
|
+
sx: { fontWeight: 700 },
|
|
444
|
+
variant: "caption",
|
|
445
|
+
children: a.liabilities
|
|
446
|
+
}), /* @__PURE__ */ e(x, {
|
|
447
|
+
amount: r,
|
|
448
|
+
sx: { fontWeight: 400 },
|
|
449
|
+
variant: "caption"
|
|
450
|
+
})]
|
|
451
|
+
}) })
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ e(X, { groupedAccounts: K(i) })
|
|
454
|
+
] })] });
|
|
455
|
+
}, Ne = C(De), Ee = () => {
|
|
456
|
+
const { net_worth: t } = E(), s = H(), { onEvent: i } = B(), { assetsLiabilities: n, gainsLosses: r, hoveredData: a, netWorthChartData: c, selectedData: l, setHoveredIndex: g, setSelectedIndex: f } = j(), [S, W] = p.useState(!1), [b, y] = p.useState(!1), k = (u) => {
|
|
457
|
+
const _ = u.x === a?.x, T = u.x === l?.x, I = {
|
|
410
458
|
backgroundColor: "inherit",
|
|
411
459
|
borderBottom: "inherit",
|
|
412
460
|
color: "inherit"
|
|
413
461
|
};
|
|
414
|
-
return
|
|
415
|
-
}, D = (
|
|
416
|
-
f(
|
|
417
|
-
},
|
|
418
|
-
y(!0), i(
|
|
419
|
-
}, M = (
|
|
420
|
-
g(
|
|
421
|
-
},
|
|
462
|
+
return _ && (I.color = T ? "inherit" : I.color, I.backgroundColor = s.palette.action.hover), T && (I.backgroundColor = s.palette.primary.main, I.borderBottom = s.palette.neutral.light, I.color = s.palette.common.white), I;
|
|
463
|
+
}, D = (u, _) => {
|
|
464
|
+
f(_), u.currentTarget instanceof HTMLDivElement && W(!0);
|
|
465
|
+
}, m = () => {
|
|
466
|
+
y(!0), i(w.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
|
|
467
|
+
}, M = (u) => {
|
|
468
|
+
g(u);
|
|
469
|
+
}, z = () => {
|
|
422
470
|
g(-1);
|
|
423
471
|
};
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
472
|
+
return /* @__PURE__ */ o(h, {
|
|
473
|
+
direction: "column",
|
|
474
|
+
sx: { width: 320 },
|
|
475
|
+
children: [
|
|
476
|
+
/* @__PURE__ */ o(G, { children: [
|
|
477
|
+
/* @__PURE__ */ e(O, {
|
|
478
|
+
sx: {
|
|
479
|
+
backgroundColor: "transparent",
|
|
480
|
+
mb: 8,
|
|
481
|
+
mt: 12,
|
|
482
|
+
px: 12
|
|
483
|
+
},
|
|
484
|
+
children: /* @__PURE__ */ e(d, {
|
|
485
|
+
bold: !0,
|
|
486
|
+
component: "h2",
|
|
487
|
+
variant: "body1",
|
|
488
|
+
children: t.monthly_totals
|
|
489
|
+
})
|
|
490
|
+
}),
|
|
491
|
+
/* @__PURE__ */ e(L, {}),
|
|
492
|
+
c.map((u, _) => /* @__PURE__ */ e(Se, {
|
|
431
493
|
getStyles: k,
|
|
432
|
-
isHovered:
|
|
433
|
-
isSelected:
|
|
434
|
-
item:
|
|
435
|
-
onItemClick: (
|
|
436
|
-
onMouseEnter: () => M(
|
|
437
|
-
onMouseLeave: () =>
|
|
494
|
+
isHovered: u.x === a?.x,
|
|
495
|
+
isSelected: u.x === l?.x,
|
|
496
|
+
item: u,
|
|
497
|
+
onItemClick: (T) => D(T, _),
|
|
498
|
+
onMouseEnter: () => M(_),
|
|
499
|
+
onMouseLeave: () => z()
|
|
500
|
+
}, u.x))
|
|
501
|
+
] }),
|
|
502
|
+
/* @__PURE__ */ e(me, {
|
|
503
|
+
onClick: () => m(),
|
|
504
|
+
sx: {
|
|
505
|
+
alignSelf: "center",
|
|
506
|
+
marginTop: 16,
|
|
507
|
+
width: "fit-content"
|
|
438
508
|
},
|
|
439
|
-
p.x
|
|
440
|
-
))
|
|
441
|
-
] }),
|
|
442
|
-
/* @__PURE__ */ e(
|
|
443
|
-
ue,
|
|
444
|
-
{
|
|
445
|
-
onClick: () => h(),
|
|
446
|
-
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
447
509
|
variant: "outlined",
|
|
448
510
|
children: t.view_assets_and_liabilities
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/* @__PURE__ */ e(
|
|
452
|
-
V,
|
|
453
|
-
{
|
|
511
|
+
}),
|
|
512
|
+
/* @__PURE__ */ e(U, {
|
|
454
513
|
ariaLabelClose: "Close",
|
|
455
|
-
isOpen:
|
|
456
|
-
onClose: () =>
|
|
514
|
+
isOpen: S,
|
|
515
|
+
onClose: () => W(!1),
|
|
457
516
|
shouldShowHeaderBorders: !1,
|
|
458
517
|
shouldShowHeaderShadow: !0,
|
|
459
518
|
title: t.gains_and_losses,
|
|
460
|
-
children:
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/* @__PURE__ */ e(
|
|
464
|
-
V,
|
|
465
|
-
{
|
|
519
|
+
children: r && /* @__PURE__ */ e(Ie, { ...r })
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ e(U, {
|
|
466
522
|
ariaLabelClose: "Close",
|
|
467
|
-
isOpen:
|
|
523
|
+
isOpen: b,
|
|
468
524
|
onClose: () => y(!1),
|
|
469
525
|
shouldShowHeaderBorders: !1,
|
|
470
526
|
shouldShowHeaderShadow: !0,
|
|
471
527
|
title: t.assets_and_liabilities,
|
|
472
528
|
children: n && /* @__PURE__ */ e(Ne, { ...n })
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
}, ke =
|
|
477
|
-
const { net_worth: i } = E(), n = H(),
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
529
|
+
})
|
|
530
|
+
]
|
|
531
|
+
});
|
|
532
|
+
}, ke = C(Ee), Me = ({ hoveredData: t, selectedData: s }) => {
|
|
533
|
+
const { net_worth: i } = E(), n = H(), r = t || s, a = fe(xe(r.x), "MMMM");
|
|
534
|
+
return /* @__PURE__ */ o(h, {
|
|
535
|
+
alignItems: "center",
|
|
536
|
+
direction: "column",
|
|
537
|
+
m: 24,
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ e(d, {
|
|
540
|
+
color: n.palette.secondary.main,
|
|
541
|
+
variant: "body2",
|
|
542
|
+
children: `${a} ${i.net_worth}`
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ e(x, {
|
|
545
|
+
amount: r.y,
|
|
546
|
+
variant: "h2"
|
|
547
|
+
}),
|
|
548
|
+
/* @__PURE__ */ e($, {
|
|
549
|
+
currencyLabel: i.this_month,
|
|
550
|
+
netWorth: r,
|
|
551
|
+
theme: n
|
|
552
|
+
})
|
|
553
|
+
]
|
|
554
|
+
});
|
|
555
|
+
}, Ae = C(Me), at = C(({ onBackClick: t, onMenuClick: s }) => {
|
|
556
|
+
const { isInitialized: i } = Z(), { accounts: n, net_worth: r } = E(), { hoveredData: a, isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthChartData: g, selectedData: f, setTimeframe: S, timeframe: W } = j(), { isMobile: b } = q(), { onEvent: y } = B(), [k, D] = p.useState(!1);
|
|
493
557
|
J({
|
|
494
558
|
widgetName: "NetWorthWidget",
|
|
495
559
|
isLoaded: c
|
|
496
|
-
}),
|
|
497
|
-
c || l().finally(), y(
|
|
498
|
-
}, []),
|
|
499
|
-
y(
|
|
500
|
-
}, [
|
|
501
|
-
const
|
|
502
|
-
const
|
|
503
|
-
|
|
560
|
+
}), p.useEffect(() => {
|
|
561
|
+
c || l().finally(), y(w.NET_WORTH_VIEW);
|
|
562
|
+
}, []), p.useEffect(() => {
|
|
563
|
+
y(w.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: W + "M" });
|
|
564
|
+
}, [W]);
|
|
565
|
+
const m = async (u) => {
|
|
566
|
+
const _ = u[0], T = u[1];
|
|
567
|
+
_ && T && S(pe(T, _));
|
|
504
568
|
}, M = () => {
|
|
505
|
-
D(!0), y(
|
|
569
|
+
D(!0), y(w.ACCOUNTS_CLICK_CONNECT);
|
|
506
570
|
};
|
|
507
571
|
if (!i || !c) return /* @__PURE__ */ e(Q, {});
|
|
508
|
-
const
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
children:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
/* @__PURE__ */ e(we, {}),
|
|
544
|
-
/* @__PURE__ */ e(ke, {})
|
|
545
|
-
]
|
|
546
|
-
}
|
|
547
|
-
)
|
|
548
|
-
] }),
|
|
549
|
-
/* @__PURE__ */ e(
|
|
550
|
-
le,
|
|
551
|
-
{
|
|
552
|
-
onClose: () => D(!1),
|
|
553
|
-
showConnectionsWidget: k,
|
|
554
|
-
title: n.manage_connections
|
|
555
|
-
}
|
|
556
|
-
)
|
|
557
|
-
]
|
|
558
|
-
}
|
|
559
|
-
);
|
|
572
|
+
const z = g.length === 0;
|
|
573
|
+
return /* @__PURE__ */ o(ae, {
|
|
574
|
+
calendarActions: { onRangeChanged: m },
|
|
575
|
+
dateRangeVariant: b ? "timeframetabs" : "timeframebuttons",
|
|
576
|
+
onAccountsFilterClick: () => y(w.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
577
|
+
onBackClick: t,
|
|
578
|
+
onMenuClick: s,
|
|
579
|
+
title: r.net_worth,
|
|
580
|
+
children: [z ? /* @__PURE__ */ e(te, {
|
|
581
|
+
sx: { justifyItems: "center" },
|
|
582
|
+
children: /* @__PURE__ */ e(ie, {
|
|
583
|
+
header: r.empty_widget_header,
|
|
584
|
+
icon: "elevation",
|
|
585
|
+
onClick: M,
|
|
586
|
+
primaryButton: r.empty_widget_button,
|
|
587
|
+
subText: r.empty_widget_description,
|
|
588
|
+
sx: {
|
|
589
|
+
width: { sm: 432 },
|
|
590
|
+
".buttons-footer": { width: 167 }
|
|
591
|
+
}
|
|
592
|
+
})
|
|
593
|
+
}) : /* @__PURE__ */ o(N, { children: [f && /* @__PURE__ */ e(Ae, {
|
|
594
|
+
hoveredData: a,
|
|
595
|
+
selectedData: f
|
|
596
|
+
}), /* @__PURE__ */ o(h, {
|
|
597
|
+
alignItems: b ? "center" : "flex-start",
|
|
598
|
+
direction: b ? "column" : "row",
|
|
599
|
+
spacing: b ? 0 : 48,
|
|
600
|
+
children: [/* @__PURE__ */ e(be, {}), /* @__PURE__ */ e(ke, {})]
|
|
601
|
+
})] }), /* @__PURE__ */ e(se, {
|
|
602
|
+
onClose: () => D(!1),
|
|
603
|
+
showConnectionsWidget: k,
|
|
604
|
+
title: n.manage_connections
|
|
605
|
+
})]
|
|
606
|
+
});
|
|
560
607
|
});
|
|
561
608
|
export {
|
|
562
|
-
|
|
563
|
-
|
|
609
|
+
it as NetWorthMicroWidget,
|
|
610
|
+
at as NetWorthWidget
|
|
564
611
|
};
|