@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,110 +1,118 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { fromUnixTime as
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
3
|
+
import { observer as S } from "mobx-react-lite";
|
|
4
|
+
import ie from "@mui/material/Stack/Stack";
|
|
5
|
+
import { useTheme as j } from "@mui/material/styles";
|
|
6
|
+
import { L as ae } from "../LineChart-DHj-Bufi.mjs";
|
|
7
|
+
import { p as se, q as R, u as N, g as z, d as ce, b as Y } from "../hooks-fY_n74f7.mjs";
|
|
8
|
+
import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
9
|
+
import { f as le, D as me } from "../Dialog-CWymUiuO.mjs";
|
|
10
|
+
import u from "react";
|
|
11
|
+
import de from "@mui/material/Button";
|
|
12
|
+
import T from "@mui/material/Divider";
|
|
13
|
+
import $ from "@mui/material/List";
|
|
11
14
|
import k from "@mui/material/ListSubheader";
|
|
12
|
-
import
|
|
13
|
-
import { Text as m, Icon as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import et from "@mui/material/ListItemButton";
|
|
15
|
+
import d from "@mui/material/Stack";
|
|
16
|
+
import { Text as m, Icon as B, P as Z } from "@mxenabled/mxui";
|
|
17
|
+
import A from "@mui/material/ListItem";
|
|
18
|
+
import J from "@mui/material/ListItemButton";
|
|
17
19
|
import _ from "@mui/material/ListItemText";
|
|
18
|
-
import { i as
|
|
19
|
-
import { C as
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
20
|
+
import { i as Q } from "../DateUtil-CVsMhbZU.mjs";
|
|
21
|
+
import { C as x } from "../CurrencyText-C-85TnUF.mjs";
|
|
22
|
+
import P from "@mui/material/styles/useTheme";
|
|
23
|
+
import { Stack as he } from "@mui/material";
|
|
24
|
+
import ee from "@mui/material/Box";
|
|
25
|
+
import pe from "@mui/material/Collapse";
|
|
26
|
+
import X from "@mui/material/ListItemIcon";
|
|
27
|
+
import { g as F } from "../NetWorthStore-B6ziBtaH.mjs";
|
|
28
|
+
import { N as vt } from "../NetWorthStore-B6ziBtaH.mjs";
|
|
29
|
+
import { D as K } from "../Drawer-Bet2ZPJo.mjs";
|
|
30
|
+
import { A as v, W as ue } from "../WidgetContainer-mzejMmz2.mjs";
|
|
31
|
+
import { format as fe, fromUnixTime as xe, differenceInMonths as ge } from "date-fns";
|
|
32
|
+
import { Icon as te } from "@mxenabled/mx-icons";
|
|
25
33
|
import { f as U } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
26
|
-
import { L as
|
|
27
|
-
import { M as
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
34
|
+
import { L as ne } from "../Loader-BSWSYqvn.mjs";
|
|
35
|
+
import { M as ye } from "../MicroWidgetContainer-DSyYwRCU.mjs";
|
|
36
|
+
import { u as re } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
37
|
+
import { C as Ce } from "../ConnectionsDrawer-BExzgE16.mjs";
|
|
38
|
+
import { E as _e } from "../EmptyState-DoxNUae-.mjs";
|
|
39
|
+
const Se = () => {
|
|
40
|
+
const { isMobile: t } = q(), { availableWidth: a } = se(), i = j(), {
|
|
41
|
+
hoveredData: n,
|
|
42
|
+
netWorthChartData: s,
|
|
43
|
+
selectedData: r,
|
|
44
|
+
setHoveredIndex: c,
|
|
45
|
+
setSelectedIndex: l
|
|
46
|
+
} = R(), f = a - 320, g = s.map((h) => ({
|
|
47
|
+
x: le(oe(h.x), me.MONTH_SHORT),
|
|
48
|
+
y: h.y
|
|
49
|
+
})), w = r ? { index: s.findIndex((h) => h.x === r.x) } : void 0, y = n ? { index: s.findIndex((h) => h.x === n.x) } : void 0, b = (h) => ({
|
|
50
|
+
fill: h === w?.index ? i.palette.success.main : "",
|
|
51
|
+
filter: h === y?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
|
|
52
|
+
stroke: i.palette.success.main
|
|
53
|
+
}), I = (h, M) => {
|
|
54
|
+
l(M);
|
|
55
|
+
}, L = (h) => {
|
|
56
|
+
c(h);
|
|
57
|
+
}, E = () => {
|
|
58
|
+
c(-1);
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ e(ie, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
61
|
+
ae,
|
|
54
62
|
{
|
|
55
63
|
baseline: "min",
|
|
56
64
|
chartFor: "networthChart",
|
|
57
65
|
chartXaxisSx: { "& .MuiChartsAxis-tickLabel": { transform: "translateX(8px)" } },
|
|
58
66
|
chartYaxisSx: { "& .MuiChartsAxis-tickLabel": { transform: "translateX(-8px)" } },
|
|
59
|
-
colors: [
|
|
60
|
-
datasets: [
|
|
67
|
+
colors: [i.palette.success.main],
|
|
68
|
+
datasets: [g],
|
|
61
69
|
height: 350,
|
|
62
70
|
labels: [],
|
|
63
|
-
margin: { right: 20, left:
|
|
64
|
-
markHandlers: { onMarkClick:
|
|
65
|
-
markStyles:
|
|
71
|
+
margin: { right: 20, left: 38 },
|
|
72
|
+
markHandlers: { onMarkClick: I, onMouseEnter: L, onMouseLeave: E },
|
|
73
|
+
markStyles: b,
|
|
66
74
|
showArea: !0,
|
|
67
75
|
useCustomMark: !0,
|
|
68
76
|
valueFormatterString: "0.0[0]a",
|
|
69
|
-
width:
|
|
77
|
+
width: t ? a - 48 : f
|
|
70
78
|
}
|
|
71
|
-
);
|
|
72
|
-
},
|
|
73
|
-
item:
|
|
74
|
-
getStyles:
|
|
79
|
+
) });
|
|
80
|
+
}, we = S(Se), be = ({
|
|
81
|
+
item: t,
|
|
82
|
+
getStyles: a,
|
|
75
83
|
isHovered: i = !1,
|
|
76
84
|
isSelected: n = !1,
|
|
77
85
|
onItemClick: s,
|
|
78
|
-
onMouseEnter:
|
|
79
|
-
onMouseLeave:
|
|
86
|
+
onMouseEnter: r,
|
|
87
|
+
onMouseLeave: c
|
|
80
88
|
}) => {
|
|
81
|
-
const [
|
|
89
|
+
const [l, f] = u.useState({
|
|
82
90
|
color: ""
|
|
83
91
|
});
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
}, [i, n]), /* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
92
|
+
return u.useEffect(() => {
|
|
93
|
+
f(a(t));
|
|
94
|
+
}, [i, n]), /* @__PURE__ */ o(u.Fragment, { children: [
|
|
95
|
+
/* @__PURE__ */ e(
|
|
96
|
+
A,
|
|
89
97
|
{
|
|
90
98
|
sx: {
|
|
91
|
-
...
|
|
99
|
+
...l,
|
|
92
100
|
minHeight: 44,
|
|
93
|
-
"&:hover": { color: n ? "inherit" :
|
|
101
|
+
"&:hover": { color: n ? "inherit" : l.color }
|
|
94
102
|
},
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
|
|
103
|
+
children: /* @__PURE__ */ e(
|
|
104
|
+
J,
|
|
97
105
|
{
|
|
98
|
-
onClick: (
|
|
99
|
-
onMouseEnter: () =>
|
|
100
|
-
onMouseLeave: () =>
|
|
106
|
+
onClick: (g) => s?.(g, t.x),
|
|
107
|
+
onMouseEnter: () => r(t.x),
|
|
108
|
+
onMouseLeave: () => c(),
|
|
101
109
|
sx: { minHeight: 20, padding: 12 },
|
|
102
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ e(
|
|
103
111
|
_,
|
|
104
112
|
{
|
|
105
|
-
primary: /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
113
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
114
|
+
/* @__PURE__ */ e(m, { variant: "Body", children: Q(t.x) }),
|
|
115
|
+
/* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "Body" })
|
|
108
116
|
] })
|
|
109
117
|
}
|
|
110
118
|
)
|
|
@@ -112,164 +120,154 @@ const Rt = ({
|
|
|
112
120
|
)
|
|
113
121
|
}
|
|
114
122
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
] },
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
onDataClick: i,
|
|
121
|
-
onButtonClick: n,
|
|
122
|
-
onMouseEnter: s,
|
|
123
|
-
onMouseLeave: o,
|
|
124
|
-
selectedData: a
|
|
125
|
-
}) => {
|
|
126
|
-
const { net_worth: c } = T(), u = z(), C = (x) => {
|
|
127
|
-
const g = x.x === l?.x, S = x.x === a?.x, p = {
|
|
128
|
-
backgroundColor: "inherit",
|
|
129
|
-
borderBottom: "inherit",
|
|
130
|
-
color: "inherit"
|
|
131
|
-
};
|
|
132
|
-
return g && (p.color = S ? "inherit" : p.color, p.backgroundColor = u.palette.action.hover), S && (p.backgroundColor = u.palette.primary.main, p.borderBottom = u.palette.border.light, p.color = u.palette.common.white), p;
|
|
133
|
-
};
|
|
134
|
-
return /* @__PURE__ */ r(h, { direction: "column", sx: { width: 320 }, children: [
|
|
135
|
-
/* @__PURE__ */ r(B, { children: [
|
|
136
|
-
/* @__PURE__ */ t(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ t(m, { bold: !0, component: "h2", variant: "Body", children: c.monthly_totals }) }),
|
|
137
|
-
/* @__PURE__ */ t(W, {}),
|
|
138
|
-
e.map((x, g) => /* @__PURE__ */ t(
|
|
139
|
-
Gt,
|
|
140
|
-
{
|
|
141
|
-
getStyles: C,
|
|
142
|
-
isHovered: x.x === l?.x,
|
|
143
|
-
isSelected: x.x === a?.x,
|
|
144
|
-
item: x,
|
|
145
|
-
onItemClick: (S) => i(S, g),
|
|
146
|
-
onMouseEnter: () => s(g),
|
|
147
|
-
onMouseLeave: () => o()
|
|
148
|
-
},
|
|
149
|
-
x.x
|
|
150
|
-
))
|
|
151
|
-
] }),
|
|
152
|
-
/* @__PURE__ */ t(
|
|
153
|
-
Nt,
|
|
154
|
-
{
|
|
155
|
-
onClick: () => n(),
|
|
156
|
-
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
157
|
-
variant: "outlined",
|
|
158
|
-
children: c.view_assets_and_liabilities
|
|
159
|
-
}
|
|
160
|
-
)
|
|
161
|
-
] });
|
|
162
|
-
}, Ft = w(Xt), Kt = ({
|
|
163
|
-
currencyLabel: e,
|
|
164
|
-
currencyVariant: l = "Small",
|
|
123
|
+
/* @__PURE__ */ e(T, {})
|
|
124
|
+
] }, t.x);
|
|
125
|
+
}, ve = S(be), We = ({
|
|
126
|
+
currencyLabel: t,
|
|
127
|
+
currencyVariant: a = "Small",
|
|
165
128
|
iconSize: i,
|
|
166
129
|
netWorth: n,
|
|
167
130
|
theme: s
|
|
168
131
|
}) => {
|
|
169
|
-
let
|
|
170
|
-
return n.change < 0 ?
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
132
|
+
let r = s.palette.secondary.main, c = s.palette.secondary.main, l = "trending_flat";
|
|
133
|
+
return n.change < 0 ? l = "trending_down" : n.change > 0 && (r = s.palette.success.main, c = s.palette.success.main, l = "trending_up"), /* @__PURE__ */ o(he, { alignItems: "center", direction: "row", spacing: 4, children: [
|
|
134
|
+
/* @__PURE__ */ e(
|
|
135
|
+
B,
|
|
173
136
|
{
|
|
174
|
-
name:
|
|
137
|
+
name: l,
|
|
175
138
|
size: i,
|
|
176
139
|
sx: {
|
|
177
|
-
color:
|
|
140
|
+
color: r
|
|
178
141
|
}
|
|
179
142
|
}
|
|
180
143
|
),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
] });
|
|
184
|
-
}, R = w(Kt), Ut = ({ hoveredData: e, selectedData: l }) => {
|
|
185
|
-
const { net_worth: i } = T(), n = z(), s = e || l, o = kt(Dt(s.x), "MMMM");
|
|
186
|
-
return /* @__PURE__ */ r(h, { alignItems: "center", direction: "column", m: 24, children: [
|
|
187
|
-
/* @__PURE__ */ t(m, { color: n.palette.secondary.main, variant: "Small", children: `${o} ${i.net_worth}` }),
|
|
188
|
-
/* @__PURE__ */ t(y, { amount: s.y, variant: "H2" }),
|
|
189
|
-
/* @__PURE__ */ t(R, { currencyLabel: i.this_month, netWorth: s, theme: n })
|
|
144
|
+
/* @__PURE__ */ e(x, { amount: n.change, color: c, variant: a }),
|
|
145
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: t })
|
|
190
146
|
] });
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
] })
|
|
209
|
-
] }), He = w(({ onCTAClick: e }) => {
|
|
210
|
-
const [l, i] = d.useState(!1), { visibleAccounts: n } = J(), { onEvent: s } = Q(), { net_worth: o, common: a } = T(), { isInitialized: c, selectedAccounts: u, setSelectedAccounts: C } = P(), { loadChartData: x, loadNetWorthData: g, netWorthData: S, selectedData: p } = tt(), f = async () => {
|
|
211
|
-
await g(u), await x(1), i(!0);
|
|
212
|
-
};
|
|
213
|
-
if (d.useEffect(() => C(n), [n]), d.useEffect(() => {
|
|
214
|
-
c && f().finally(), s(b.NET_WORTH_LOAD_WIDGET, {
|
|
215
|
-
state: n?.length ? "default" : "zeroState"
|
|
216
|
-
});
|
|
217
|
-
}, [c]), !l) return /* @__PURE__ */ t(O, { height: 100 });
|
|
218
|
-
const L = () => {
|
|
219
|
-
s(
|
|
220
|
-
n.length ? b.NET_WORTH_CLICK_VIEW_DETAILS : b.NET_WORTH_CLICK_GET_STARTED
|
|
221
|
-
), e();
|
|
222
|
-
};
|
|
223
|
-
return /* @__PURE__ */ t(
|
|
224
|
-
Mt,
|
|
225
|
-
{
|
|
226
|
-
className: "mx-networth-microwidget",
|
|
227
|
-
ctaLabel: a.see_details,
|
|
228
|
-
onCTAClick: L,
|
|
229
|
-
title: o.net_worth,
|
|
230
|
-
children: S.accounts.length ? /* @__PURE__ */ t(
|
|
231
|
-
Yt,
|
|
147
|
+
}, G = S(We), Te = ({
|
|
148
|
+
netWorth: t,
|
|
149
|
+
gains: a,
|
|
150
|
+
losses: i,
|
|
151
|
+
totalGains: n,
|
|
152
|
+
totalLosses: s
|
|
153
|
+
}) => {
|
|
154
|
+
const { net_worth: r } = N(), c = P();
|
|
155
|
+
return /* @__PURE__ */ o(D, { children: [
|
|
156
|
+
/* @__PURE__ */ o(d, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
|
157
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: Q(t?.x) }),
|
|
158
|
+
/* @__PURE__ */ e(m, { variant: "Body", children: r.total_change }),
|
|
159
|
+
t && /* @__PURE__ */ e(G, { currencyVariant: "H1", iconSize: 32, netWorth: t, theme: c })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ o($, { children: [
|
|
162
|
+
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
163
|
+
_,
|
|
232
164
|
{
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
165
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
166
|
+
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.gains }),
|
|
167
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
168
|
+
] })
|
|
236
169
|
}
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
170
|
+
) }),
|
|
171
|
+
a?.map((l) => /* @__PURE__ */ o(u.Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ e(A, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
|
|
173
|
+
_,
|
|
174
|
+
{
|
|
175
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
176
|
+
/* @__PURE__ */ e(m, { sx: { mr: 10 }, variant: "Body", children: l.accountName }),
|
|
177
|
+
/* @__PURE__ */ e(
|
|
178
|
+
x,
|
|
179
|
+
{
|
|
180
|
+
amount: l.gain,
|
|
181
|
+
sx: { color: c.palette.success.main, flexShrink: 0, fontWeight: 700 },
|
|
182
|
+
variant: "Body"
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
] }),
|
|
186
|
+
sx: { px: 16 }
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
/* @__PURE__ */ e(T, {})
|
|
190
|
+
] }, l.accountName)),
|
|
191
|
+
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
246
192
|
_,
|
|
247
193
|
{
|
|
248
|
-
primary: /* @__PURE__ */
|
|
194
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
195
|
+
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.losses }),
|
|
196
|
+
/* @__PURE__ */ e(x, { amount: s, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
197
|
+
] })
|
|
198
|
+
}
|
|
199
|
+
) }),
|
|
200
|
+
i?.map((l) => /* @__PURE__ */ o(D, { children: [
|
|
201
|
+
/* @__PURE__ */ e(
|
|
202
|
+
A,
|
|
203
|
+
{
|
|
204
|
+
sx: { backgroundColor: c.palette.background.paper, py: 14 },
|
|
205
|
+
children: /* @__PURE__ */ e(
|
|
206
|
+
_,
|
|
207
|
+
{
|
|
208
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
209
|
+
/* @__PURE__ */ e(
|
|
210
|
+
m,
|
|
211
|
+
{
|
|
212
|
+
sx: {
|
|
213
|
+
mr: 10
|
|
214
|
+
},
|
|
215
|
+
variant: "Body",
|
|
216
|
+
children: l.accountName
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
x,
|
|
221
|
+
{
|
|
222
|
+
amount: l.loss,
|
|
223
|
+
sx: { flexShrink: 0, fontWeight: 700 },
|
|
224
|
+
variant: "Body"
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] }),
|
|
228
|
+
sx: { px: 16 }
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
},
|
|
232
|
+
l.accountName
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ e(T, {})
|
|
235
|
+
] }))
|
|
236
|
+
] })
|
|
237
|
+
] });
|
|
238
|
+
}, Ie = S(Te), Le = ({ accounts: t, name: a, icon: i }) => {
|
|
239
|
+
const [n, s] = u.useState(!1);
|
|
240
|
+
return /* @__PURE__ */ o(D, { children: [
|
|
241
|
+
/* @__PURE__ */ e(A, { sx: (r) => ({ backgroundColor: r.palette.background.paper }), children: /* @__PURE__ */ o(J, { onClick: () => s(!n), children: [
|
|
242
|
+
i && /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(B, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
243
|
+
/* @__PURE__ */ e(
|
|
244
|
+
_,
|
|
245
|
+
{
|
|
246
|
+
primary: /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "Body", children: a })
|
|
249
247
|
}
|
|
250
248
|
),
|
|
251
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ e(X, { children: n ? /* @__PURE__ */ e(B, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(B, { name: "expand_more", size: 24 }) })
|
|
252
250
|
] }) }),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ e(T, {}),
|
|
252
|
+
/* @__PURE__ */ e(pe, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((r, c) => /* @__PURE__ */ o($, { children: [
|
|
253
|
+
/* @__PURE__ */ e(A, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
256
254
|
_,
|
|
257
255
|
{
|
|
258
|
-
primary: /* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
256
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
257
|
+
/* @__PURE__ */ e(
|
|
260
258
|
m,
|
|
261
259
|
{
|
|
262
260
|
sx: {
|
|
263
261
|
marginRight: 10
|
|
264
262
|
},
|
|
265
263
|
variant: "Body",
|
|
266
|
-
children:
|
|
264
|
+
children: r.accountName
|
|
267
265
|
}
|
|
268
266
|
),
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
|
|
267
|
+
/* @__PURE__ */ e(
|
|
268
|
+
x,
|
|
271
269
|
{
|
|
272
|
-
amount:
|
|
270
|
+
amount: r.balance,
|
|
273
271
|
sx: {
|
|
274
272
|
flexShrink: 0
|
|
275
273
|
},
|
|
@@ -280,20 +278,20 @@ const Rt = ({
|
|
|
280
278
|
sx: { pl: 72, pr: 16 }
|
|
281
279
|
}
|
|
282
280
|
) }),
|
|
283
|
-
|
|
284
|
-
] },
|
|
281
|
+
c < t.length - 1 ? /* @__PURE__ */ e(T, { variant: "inset" }) : /* @__PURE__ */ e(T, {})
|
|
282
|
+
] }, r.accountName)) })
|
|
285
283
|
] });
|
|
286
|
-
},
|
|
287
|
-
netWorth:
|
|
288
|
-
assets:
|
|
284
|
+
}, V = ({ groupedAccounts: t }) => /* @__PURE__ */ e(D, { children: t.map(({ accounts: a, icon: i, name: n }) => /* @__PURE__ */ e(Le, { accounts: a, icon: i, name: n }, n)) }), De = ({
|
|
285
|
+
netWorth: t,
|
|
286
|
+
assets: a,
|
|
289
287
|
liabilities: i,
|
|
290
288
|
totalAssets: n,
|
|
291
289
|
totalLiabilities: s
|
|
292
290
|
}) => {
|
|
293
|
-
const { net_worth:
|
|
294
|
-
return /* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
|
|
291
|
+
const { net_worth: r } = N(), c = P();
|
|
292
|
+
return /* @__PURE__ */ o(D, { children: [
|
|
293
|
+
/* @__PURE__ */ o(
|
|
294
|
+
ee,
|
|
297
295
|
{
|
|
298
296
|
sx: {
|
|
299
297
|
alignItems: "center",
|
|
@@ -304,194 +302,215 @@ const Rt = ({
|
|
|
304
302
|
marginBottom: 8
|
|
305
303
|
},
|
|
306
304
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
|
|
310
|
-
|
|
305
|
+
/* @__PURE__ */ e(m, { variant: "Body", children: r.current_net_worth }),
|
|
306
|
+
/* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "H1" }),
|
|
307
|
+
t && /* @__PURE__ */ e(
|
|
308
|
+
G,
|
|
311
309
|
{
|
|
312
|
-
currencyLabel:
|
|
310
|
+
currencyLabel: r.this_month,
|
|
313
311
|
iconSize: 20,
|
|
314
|
-
netWorth:
|
|
315
|
-
theme:
|
|
312
|
+
netWorth: t,
|
|
313
|
+
theme: c
|
|
316
314
|
}
|
|
317
315
|
)
|
|
318
316
|
]
|
|
319
317
|
}
|
|
320
318
|
),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ o($, { children: [
|
|
320
|
+
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
323
321
|
_,
|
|
324
322
|
{
|
|
325
|
-
primary: /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
323
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
324
|
+
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.assets }),
|
|
325
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
328
326
|
] })
|
|
329
327
|
}
|
|
330
328
|
) }),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ e(V, { groupedAccounts: F(a) }),
|
|
330
|
+
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
333
331
|
_,
|
|
334
332
|
{
|
|
335
|
-
primary: /* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
/* @__PURE__ */
|
|
333
|
+
primary: /* @__PURE__ */ o(d, { direction: "row", justifyContent: "space-between", children: [
|
|
334
|
+
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: r.liabilities }),
|
|
335
|
+
/* @__PURE__ */ e(x, { amount: s, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
338
336
|
] })
|
|
339
337
|
}
|
|
340
338
|
) }),
|
|
341
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ e(V, { groupedAccounts: F(i) })
|
|
342
340
|
] })
|
|
343
341
|
] });
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
y,
|
|
376
|
-
{
|
|
377
|
-
amount: c.gain,
|
|
378
|
-
sx: { color: a.palette.success.main, flexShrink: 0, fontWeight: 700 },
|
|
379
|
-
variant: "Body"
|
|
380
|
-
}
|
|
381
|
-
)
|
|
382
|
-
] }),
|
|
383
|
-
sx: { px: 16 }
|
|
384
|
-
}
|
|
385
|
-
) }),
|
|
386
|
-
/* @__PURE__ */ t(W, {})
|
|
387
|
-
] }, c.accountName)),
|
|
388
|
-
/* @__PURE__ */ t(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
|
|
389
|
-
_,
|
|
342
|
+
}, Ne = S(De), Ee = () => {
|
|
343
|
+
const { net_worth: t } = N(), a = j(), { onEvent: i } = z(), {
|
|
344
|
+
assetsLiabilities: n,
|
|
345
|
+
gainsLosses: s,
|
|
346
|
+
hoveredData: r,
|
|
347
|
+
netWorthChartData: c,
|
|
348
|
+
selectedData: l,
|
|
349
|
+
setHoveredIndex: f,
|
|
350
|
+
setSelectedIndex: g
|
|
351
|
+
} = R(), [w, y] = u.useState(!1), [b, I] = u.useState(!1), L = (p) => {
|
|
352
|
+
const C = p.x === r?.x, O = p.x === l?.x, W = {
|
|
353
|
+
backgroundColor: "inherit",
|
|
354
|
+
borderBottom: "inherit",
|
|
355
|
+
color: "inherit"
|
|
356
|
+
};
|
|
357
|
+
return C && (W.color = O ? "inherit" : W.color, W.backgroundColor = a.palette.action.hover), O && (W.backgroundColor = a.palette.primary.main, W.borderBottom = a.palette.border.light, W.color = a.palette.common.white), W;
|
|
358
|
+
}, E = (p, C) => {
|
|
359
|
+
g(C), p.currentTarget instanceof HTMLDivElement && y(!0);
|
|
360
|
+
}, h = () => {
|
|
361
|
+
I(!0), i(v.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
|
|
362
|
+
}, M = (p) => {
|
|
363
|
+
f(p);
|
|
364
|
+
}, H = () => {
|
|
365
|
+
f(-1);
|
|
366
|
+
};
|
|
367
|
+
return /* @__PURE__ */ o(d, { direction: "column", sx: { width: 320 }, children: [
|
|
368
|
+
/* @__PURE__ */ o($, { children: [
|
|
369
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(m, { bold: !0, component: "h2", variant: "Body", children: t.monthly_totals }) }),
|
|
370
|
+
/* @__PURE__ */ e(T, {}),
|
|
371
|
+
c.map((p, C) => /* @__PURE__ */ e(
|
|
372
|
+
ve,
|
|
390
373
|
{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
374
|
+
getStyles: L,
|
|
375
|
+
isHovered: p.x === r?.x,
|
|
376
|
+
isSelected: p.x === l?.x,
|
|
377
|
+
item: p,
|
|
378
|
+
onItemClick: (O) => E(O, C),
|
|
379
|
+
onMouseEnter: () => M(C),
|
|
380
|
+
onMouseLeave: () => H()
|
|
381
|
+
},
|
|
382
|
+
p.x
|
|
383
|
+
))
|
|
384
|
+
] }),
|
|
385
|
+
/* @__PURE__ */ e(
|
|
386
|
+
de,
|
|
387
|
+
{
|
|
388
|
+
onClick: () => h(),
|
|
389
|
+
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
390
|
+
variant: "outlined",
|
|
391
|
+
children: t.view_assets_and_liabilities
|
|
392
|
+
}
|
|
393
|
+
),
|
|
394
|
+
/* @__PURE__ */ e(
|
|
395
|
+
K,
|
|
396
|
+
{
|
|
397
|
+
ariaLabelClose: "Close",
|
|
398
|
+
isOpen: w,
|
|
399
|
+
onClose: () => y(!1),
|
|
400
|
+
shouldShowHeaderBorders: !1,
|
|
401
|
+
shouldShowHeaderShadow: !0,
|
|
402
|
+
title: t.gains_and_losses,
|
|
403
|
+
children: s && /* @__PURE__ */ e(Ie, { ...s })
|
|
404
|
+
}
|
|
405
|
+
),
|
|
406
|
+
/* @__PURE__ */ e(
|
|
407
|
+
K,
|
|
408
|
+
{
|
|
409
|
+
ariaLabelClose: "Close",
|
|
410
|
+
isOpen: b,
|
|
411
|
+
onClose: () => I(!1),
|
|
412
|
+
shouldShowHeaderBorders: !1,
|
|
413
|
+
shouldShowHeaderShadow: !0,
|
|
414
|
+
title: t.assets_and_liabilities,
|
|
415
|
+
children: n && /* @__PURE__ */ e(Ne, { ...n })
|
|
416
|
+
}
|
|
417
|
+
)
|
|
418
|
+
] });
|
|
419
|
+
}, Me = S(Ee), ke = ({ hoveredData: t, selectedData: a }) => {
|
|
420
|
+
const { net_worth: i } = N(), n = j(), s = t || a, r = fe(xe(s.x), "MMMM");
|
|
421
|
+
return /* @__PURE__ */ o(d, { alignItems: "center", direction: "column", m: 24, children: [
|
|
422
|
+
/* @__PURE__ */ e(m, { color: n.palette.secondary.main, variant: "Small", children: `${r} ${i.net_worth}` }),
|
|
423
|
+
/* @__PURE__ */ e(x, { amount: s.y, variant: "H2" }),
|
|
424
|
+
/* @__PURE__ */ e(G, { currencyLabel: i.this_month, netWorth: s, theme: n })
|
|
425
|
+
] });
|
|
426
|
+
}, Ae = S(ke), He = ({ amount: t, copy: a, trendValue: i }) => {
|
|
427
|
+
const n = i > 0, r = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
428
|
+
return /* @__PURE__ */ o(d, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
429
|
+
/* @__PURE__ */ e(Z, { variant: "H1", children: U(t, "0,0") }),
|
|
430
|
+
t !== 0 && /* @__PURE__ */ o(d, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
|
|
431
|
+
/* @__PURE__ */ o(d, { sx: { flexDirection: "row", gap: 8 }, children: [
|
|
432
|
+
/* @__PURE__ */ e(te, { name: r, size: 20 }),
|
|
433
|
+
/* @__PURE__ */ e(m, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: U(i, "0,0.00") })
|
|
434
|
+
] }),
|
|
435
|
+
/* @__PURE__ */ e(m, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: a.this_month })
|
|
433
436
|
] })
|
|
434
437
|
] });
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}, []), d.useEffect(() => {
|
|
452
|
-
s(c);
|
|
453
|
-
}, [c]), d.useEffect(() => {
|
|
454
|
-
i && pt().finally(() => {
|
|
455
|
-
st?.("NetWorthWidget");
|
|
438
|
+
}, Oe = ({ copy: t }) => /* @__PURE__ */ o(d, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
439
|
+
/* @__PURE__ */ e(te, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
|
|
440
|
+
/* @__PURE__ */ o(d, { children: [
|
|
441
|
+
/* @__PURE__ */ e(m, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
|
|
442
|
+
/* @__PURE__ */ e(Z, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
|
|
443
|
+
] })
|
|
444
|
+
] }), _t = S(({ onCTAClick: t }) => {
|
|
445
|
+
const { visibleAccounts: a } = ce(), { onEvent: i } = z(), { net_worth: n, common: s } = N(), { isInitialized: r } = Y(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: f, selectedData: g } = R();
|
|
446
|
+
if (u.useEffect(() => {
|
|
447
|
+
c || l().finally();
|
|
448
|
+
}, []), re({
|
|
449
|
+
widgetName: "NetWorthMicroWidget",
|
|
450
|
+
isLoaded: c
|
|
451
|
+
}), u.useEffect(() => {
|
|
452
|
+
c && i(v.NET_WORTH_LOAD_WIDGET, {
|
|
453
|
+
state: a?.length ? "default" : "zeroState"
|
|
456
454
|
});
|
|
457
|
-
}, [
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}, xt = (I) => {
|
|
463
|
-
L(I);
|
|
464
|
-
}, gt = () => {
|
|
465
|
-
L(null);
|
|
466
|
-
}, yt = () => {
|
|
467
|
-
E(b.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), $(!0);
|
|
468
|
-
}, Ct = async (I) => {
|
|
469
|
-
const M = I[0], F = I[1];
|
|
470
|
-
M && F && mt(At(F, M));
|
|
471
|
-
}, X = {
|
|
472
|
-
chartData: p,
|
|
473
|
-
hoveredData: x,
|
|
474
|
-
onButtonClick: yt,
|
|
475
|
-
onDataClick: ft,
|
|
476
|
-
onMouseEnter: xt,
|
|
477
|
-
onMouseLeave: gt,
|
|
478
|
-
selectedData: f
|
|
479
|
-
}, St = () => {
|
|
480
|
-
G(!0), E(b.ACCOUNTS_CLICK_CONNECT);
|
|
455
|
+
}, [c]), !r || !c) return /* @__PURE__ */ e(ne, { height: 100 });
|
|
456
|
+
const w = () => {
|
|
457
|
+
i(
|
|
458
|
+
a.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
|
|
459
|
+
), t();
|
|
481
460
|
};
|
|
482
|
-
return
|
|
483
|
-
|
|
461
|
+
return /* @__PURE__ */ e(
|
|
462
|
+
ye,
|
|
484
463
|
{
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
464
|
+
className: "mx-networth-microwidget",
|
|
465
|
+
ctaLabel: s.see_details,
|
|
466
|
+
onCTAClick: w,
|
|
467
|
+
title: n.net_worth,
|
|
468
|
+
children: f.accounts.length ? /* @__PURE__ */ e(
|
|
469
|
+
He,
|
|
470
|
+
{
|
|
471
|
+
amount: g?.y,
|
|
472
|
+
copy: n,
|
|
473
|
+
trendValue: g?.change
|
|
474
|
+
}
|
|
475
|
+
) : /* @__PURE__ */ e(Oe, { copy: n })
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
}), St = S(({ onBackClick: t }) => {
|
|
479
|
+
const { isInitialized: a } = Y(), { accounts: i, net_worth: n } = N(), {
|
|
480
|
+
hoveredData: s,
|
|
481
|
+
isNetWorthDataLoaded: r,
|
|
482
|
+
loadNetWorthData: c,
|
|
483
|
+
netWorthChartData: l,
|
|
484
|
+
selectedData: f,
|
|
485
|
+
setTimeframe: g,
|
|
486
|
+
timeframe: w
|
|
487
|
+
} = R(), { isMobile: y } = q(), { onEvent: b } = z(), [I, L] = u.useState(!1);
|
|
488
|
+
re({
|
|
489
|
+
widgetName: "NetWorthWidget",
|
|
490
|
+
isLoaded: r
|
|
491
|
+
}), u.useEffect(() => {
|
|
492
|
+
r || c().finally(), b(v.NET_WORTH_VIEW);
|
|
493
|
+
}, []), u.useEffect(() => {
|
|
494
|
+
b(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: w + "M" });
|
|
495
|
+
}, [w]);
|
|
496
|
+
const E = async (H) => {
|
|
497
|
+
const p = H[0], C = H[1];
|
|
498
|
+
p && C && g(ge(C, p));
|
|
499
|
+
}, h = () => {
|
|
500
|
+
L(!0), b(v.ACCOUNTS_CLICK_CONNECT);
|
|
501
|
+
};
|
|
502
|
+
if (!a || !r) return /* @__PURE__ */ e(ne, {});
|
|
503
|
+
const M = l.length === 0;
|
|
504
|
+
return /* @__PURE__ */ o(
|
|
505
|
+
ue,
|
|
506
|
+
{
|
|
507
|
+
calendarActions: { onRangeChanged: E },
|
|
508
|
+
dateRangeVariant: y ? "timeframetabs" : "timeframebuttons",
|
|
509
|
+
onAccountsFilterClick: () => b(v.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
510
|
+
onBackClick: t,
|
|
492
511
|
showDividerAboveDateSelector: !1,
|
|
493
512
|
sx: {
|
|
494
|
-
p:
|
|
513
|
+
p: y ? 0 : 48,
|
|
495
514
|
"& .MuiCardHeader-root": {
|
|
496
515
|
px: 16,
|
|
497
516
|
py: 12
|
|
@@ -503,30 +522,16 @@ const Rt = ({
|
|
|
503
522
|
width: "100%"
|
|
504
523
|
}
|
|
505
524
|
},
|
|
506
|
-
title:
|
|
507
|
-
children:
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
/* @__PURE__ */ r(
|
|
511
|
-
h,
|
|
512
|
-
{
|
|
513
|
-
alignItems: N ? "center" : "flex-start",
|
|
514
|
-
direction: N ? "column" : "row",
|
|
515
|
-
spacing: N ? 0 : 48,
|
|
516
|
-
children: [
|
|
517
|
-
/* @__PURE__ */ t(jt, { ...X }),
|
|
518
|
-
/* @__PURE__ */ t(Ft, { ...X })
|
|
519
|
-
]
|
|
520
|
-
}
|
|
521
|
-
)
|
|
522
|
-
] }) : /* @__PURE__ */ t(rt, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ t(
|
|
523
|
-
zt,
|
|
525
|
+
title: n.net_worth,
|
|
526
|
+
children: [
|
|
527
|
+
M ? /* @__PURE__ */ e(ee, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
|
|
528
|
+
_e,
|
|
524
529
|
{
|
|
525
|
-
header:
|
|
530
|
+
header: n.empty_widget_header,
|
|
526
531
|
icon: "elevation",
|
|
527
|
-
onClick:
|
|
528
|
-
primaryButton:
|
|
529
|
-
subText:
|
|
532
|
+
onClick: h,
|
|
533
|
+
primaryButton: n.empty_widget_button,
|
|
534
|
+
subText: n.empty_widget_description,
|
|
530
535
|
sx: {
|
|
531
536
|
width: { sm: 432 },
|
|
532
537
|
".buttons-footer": {
|
|
@@ -534,48 +539,38 @@ const Rt = ({
|
|
|
534
539
|
}
|
|
535
540
|
}
|
|
536
541
|
}
|
|
537
|
-
) }),
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
title: a.gains_and_losses,
|
|
555
|
-
children: C && /* @__PURE__ */ t(te, { ...C })
|
|
556
|
-
}
|
|
557
|
-
),
|
|
558
|
-
/* @__PURE__ */ t(
|
|
559
|
-
Y,
|
|
542
|
+
) }) : /* @__PURE__ */ o(D, { children: [
|
|
543
|
+
f && /* @__PURE__ */ e(Ae, { hoveredData: s, selectedData: f }),
|
|
544
|
+
/* @__PURE__ */ o(
|
|
545
|
+
d,
|
|
546
|
+
{
|
|
547
|
+
alignItems: y ? "center" : "flex-start",
|
|
548
|
+
direction: y ? "column" : "row",
|
|
549
|
+
spacing: y ? 0 : 48,
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ e(we, {}),
|
|
552
|
+
/* @__PURE__ */ e(Me, {})
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
] }),
|
|
557
|
+
/* @__PURE__ */ e(
|
|
558
|
+
Ce,
|
|
560
559
|
{
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
shouldShowHeaderBorders: !1,
|
|
565
|
-
shouldShowHeaderShadow: !0,
|
|
566
|
-
title: a.assets_and_liabilities,
|
|
567
|
-
children: u && /* @__PURE__ */ t(Qt, { ...u })
|
|
560
|
+
onClose: () => L(!1),
|
|
561
|
+
showConnectionsWidget: I,
|
|
562
|
+
title: i.manage_connections
|
|
568
563
|
}
|
|
569
564
|
)
|
|
570
|
-
]
|
|
565
|
+
]
|
|
571
566
|
}
|
|
572
|
-
)
|
|
567
|
+
);
|
|
573
568
|
});
|
|
574
569
|
export {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
570
|
+
we as NetWorthChart,
|
|
571
|
+
Me as NetWorthList,
|
|
572
|
+
_t as NetWorthMicroWidget,
|
|
573
|
+
vt as NetWorthStore,
|
|
574
|
+
Ae as NetWorthSummary,
|
|
575
|
+
St as NetWorthWidget
|
|
581
576
|
};
|