@mx-cartographer/experiences 7.12.17 → 7.13.1
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 +8 -0
- package/dist/{AccountDetailsHeader-BkEF1gO-.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
- package/dist/{AccountFields-C_dcdCM7.mjs → AccountFields-CxqONzjY.mjs} +6 -6
- package/dist/AccountListItem-LcJVJysf.mjs +90 -0
- package/dist/{AccountStore-ypdfueW9.mjs → AccountStore-BNlTuxWN.mjs} +1 -1
- package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
- package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
- package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
- package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
- package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
- package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
- package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
- package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
- package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
- package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
- package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
- package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
- package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
- package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
- package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
- package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
- package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
- package/dist/{ViewMoreMicroCard-BhG9hCoO.mjs → ViewMoreMicroCard-ApUBfGOX.mjs} +107 -106
- package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
- package/dist/accounts/index.es.js +107 -107
- package/dist/analytics/index.es.js +18 -18
- package/dist/budgets/index.es.js +182 -182
- package/dist/cashflow/index.es.js +223 -223
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +54 -64
- package/dist/common/types/Beat.d.ts +2 -0
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +469 -469
- package/dist/finstrong/index.es.js +68 -68
- package/dist/goals/index.es.js +437 -437
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +159 -159
- package/dist/investments/index.es.js +292 -292
- package/dist/merchants/index.es.js +12 -12
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +175 -168
- package/dist/notifications/index.es.js +13 -13
- package/dist/recurringtransactions/index.es.js +69 -69
- package/dist/settings/index.es.js +187 -187
- package/dist/spending/index.es.js +58 -58
- package/dist/transactions/index.es.js +70 -70
- package/dist/trends/index.es.js +16 -16
- package/package.json +1 -1
- package/dist/AccountListItem-BAf03YhK.mjs +0 -90
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { fromUnixTime as
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { fromUnixTime as re } from "date-fns/fromUnixTime";
|
|
3
|
+
import { observer as _ } from "mobx-react-lite";
|
|
4
4
|
import ie from "@mui/material/Stack/Stack";
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { L as ae } from "../LineChart-
|
|
7
|
-
import { p as se, q as
|
|
5
|
+
import { useTheme as z } from "@mui/material/styles";
|
|
6
|
+
import { L as ae } from "../LineChart-DBSlRSEm.mjs";
|
|
7
|
+
import { p as se, q as $, u as N, g as G, d as ce, b as Y } from "../hooks-BxkfR-Ff.mjs";
|
|
8
8
|
import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
9
|
-
import { f as le, D as
|
|
9
|
+
import { f as le, D as de } from "../DateFormats-BMpMrZpW.mjs";
|
|
10
10
|
import u from "react";
|
|
11
|
-
import
|
|
11
|
+
import me from "@mui/material/Button";
|
|
12
12
|
import T from "@mui/material/Divider";
|
|
13
|
-
import
|
|
13
|
+
import j from "@mui/material/List";
|
|
14
14
|
import k from "@mui/material/ListSubheader";
|
|
15
|
-
import
|
|
16
|
-
import { Text as
|
|
15
|
+
import m from "@mui/material/Stack";
|
|
16
|
+
import { Text as d, Icon as R, P as Z } from "@mxenabled/mxui";
|
|
17
17
|
import A from "@mui/material/ListItem";
|
|
18
18
|
import J from "@mui/material/ListItemButton";
|
|
19
|
-
import
|
|
19
|
+
import b from "@mui/material/ListItemText";
|
|
20
20
|
import { i as Q } from "../DateUtil-wcYTmDRD.mjs";
|
|
21
21
|
import { C as x } from "../CurrencyText-CA-E5N_y.mjs";
|
|
22
22
|
import P from "@mui/material/styles/useTheme";
|
|
23
23
|
import { Stack as he } from "@mui/material";
|
|
24
24
|
import ee from "@mui/material/Box";
|
|
25
25
|
import pe from "@mui/material/Collapse";
|
|
26
|
-
import
|
|
27
|
-
import { g as
|
|
28
|
-
import { N as
|
|
29
|
-
import { D as
|
|
30
|
-
import { A as
|
|
26
|
+
import F from "@mui/material/ListItemIcon";
|
|
27
|
+
import { g as K } from "../NetWorthStore-BqZ44-4M.mjs";
|
|
28
|
+
import { N as St } from "../NetWorthStore-BqZ44-4M.mjs";
|
|
29
|
+
import { D as U } from "../Drawer-Bbe4AMB1.mjs";
|
|
30
|
+
import { A as W } from "../Analytics-BYItVAe-.mjs";
|
|
31
31
|
import { format as ue, fromUnixTime as fe, differenceInMonths as xe } from "date-fns";
|
|
32
32
|
import { Icon as te } from "@mxenabled/mx-icons";
|
|
33
|
-
import { f as
|
|
33
|
+
import { f as V } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
34
34
|
import { u as ne } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
35
|
-
import { L as
|
|
35
|
+
import { L as oe } from "../Loader-D3rjKx72.mjs";
|
|
36
36
|
import { M as ge } from "../MicroWidgetContainer-B_EnfvCq.mjs";
|
|
37
|
-
import { C as ye } from "../ConnectionsDrawer-
|
|
38
|
-
import { W as Ce } from "../WidgetContainer-
|
|
39
|
-
import { E as
|
|
40
|
-
const
|
|
41
|
-
const { isMobile: t } = q(), { availableWidth: a } = se(), i =
|
|
37
|
+
import { C as ye } from "../ConnectionsDrawer-IA7vnv1J.mjs";
|
|
38
|
+
import { W as Ce } from "../WidgetContainer-D_iaToWJ.mjs";
|
|
39
|
+
import { E as be } from "../EmptyState-DHAkGsjk.mjs";
|
|
40
|
+
const _e = () => {
|
|
41
|
+
const { isMobile: t } = q(), { availableWidth: a } = se(), i = z(), {
|
|
42
42
|
hoveredData: n,
|
|
43
43
|
netWorthChartData: s,
|
|
44
|
-
selectedData:
|
|
44
|
+
selectedData: o,
|
|
45
45
|
setHoveredIndex: c,
|
|
46
46
|
setSelectedIndex: l
|
|
47
|
-
} =
|
|
48
|
-
x: le(
|
|
47
|
+
} = $(), f = a - 320, g = s.map((h) => ({
|
|
48
|
+
x: le(re(h.x), de.MONTH_SHORT),
|
|
49
49
|
y: h.y
|
|
50
|
-
})), w =
|
|
50
|
+
})), w = o ? { index: s.findIndex((h) => h.x === o.x) } : void 0, y = n ? { index: s.findIndex((h) => h.x === n.x) } : void 0, v = (h) => ({
|
|
51
51
|
fill: h === w?.index ? i.palette.success.main : "",
|
|
52
52
|
filter: h === y?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
|
|
53
53
|
stroke: i.palette.success.main
|
|
@@ -71,20 +71,20 @@ const Se = () => {
|
|
|
71
71
|
labels: [],
|
|
72
72
|
margin: { right: 20, left: 38 },
|
|
73
73
|
markHandlers: { onMarkClick: I, onMouseEnter: L, onMouseLeave: E },
|
|
74
|
-
markStyles:
|
|
74
|
+
markStyles: v,
|
|
75
75
|
showArea: !0,
|
|
76
76
|
useCustomMark: !0,
|
|
77
77
|
valueFormatterString: "0.0[0]a",
|
|
78
78
|
width: t ? a - 48 : f
|
|
79
79
|
}
|
|
80
80
|
) });
|
|
81
|
-
}, we =
|
|
81
|
+
}, we = _(_e), ve = ({
|
|
82
82
|
item: t,
|
|
83
83
|
getStyles: a,
|
|
84
84
|
isHovered: i = !1,
|
|
85
85
|
isSelected: n = !1,
|
|
86
86
|
onItemClick: s,
|
|
87
|
-
onMouseEnter:
|
|
87
|
+
onMouseEnter: o,
|
|
88
88
|
onMouseLeave: c
|
|
89
89
|
}) => {
|
|
90
90
|
const [l, f] = u.useState({
|
|
@@ -92,7 +92,7 @@ const Se = () => {
|
|
|
92
92
|
});
|
|
93
93
|
return u.useEffect(() => {
|
|
94
94
|
f(a(t));
|
|
95
|
-
}, [i, n]), /* @__PURE__ */
|
|
95
|
+
}, [i, n]), /* @__PURE__ */ r(u.Fragment, { children: [
|
|
96
96
|
/* @__PURE__ */ e(
|
|
97
97
|
A,
|
|
98
98
|
{
|
|
@@ -105,15 +105,15 @@ const Se = () => {
|
|
|
105
105
|
J,
|
|
106
106
|
{
|
|
107
107
|
onClick: (g) => s?.(g, t.x),
|
|
108
|
-
onMouseEnter: () =>
|
|
108
|
+
onMouseEnter: () => o(t.x),
|
|
109
109
|
onMouseLeave: () => c(),
|
|
110
110
|
sx: { minHeight: 20, padding: 12 },
|
|
111
111
|
children: /* @__PURE__ */ e(
|
|
112
|
-
|
|
112
|
+
b,
|
|
113
113
|
{
|
|
114
|
-
primary: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
/* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "
|
|
114
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
115
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: Q(t.x) }),
|
|
116
|
+
/* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "body1" })
|
|
117
117
|
] })
|
|
118
118
|
}
|
|
119
119
|
)
|
|
@@ -123,64 +123,64 @@ const Se = () => {
|
|
|
123
123
|
),
|
|
124
124
|
/* @__PURE__ */ e(T, {})
|
|
125
125
|
] }, t.x);
|
|
126
|
-
},
|
|
126
|
+
}, We = _(ve), Se = ({
|
|
127
127
|
currencyLabel: t,
|
|
128
|
-
currencyVariant: a = "
|
|
128
|
+
currencyVariant: a = "body2",
|
|
129
129
|
iconSize: i,
|
|
130
130
|
netWorth: n,
|
|
131
131
|
theme: s
|
|
132
132
|
}) => {
|
|
133
|
-
let
|
|
134
|
-
return n.change < 0 ? l = "trending_down" : n.change > 0 && (
|
|
133
|
+
let o = s.palette.secondary.main, c = s.palette.secondary.main, l = "trending_flat";
|
|
134
|
+
return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = s.palette.success.main, c = s.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(he, { alignItems: "center", direction: "row", spacing: 4, children: [
|
|
135
135
|
/* @__PURE__ */ e(
|
|
136
|
-
|
|
136
|
+
R,
|
|
137
137
|
{
|
|
138
138
|
name: l,
|
|
139
139
|
size: i,
|
|
140
140
|
sx: {
|
|
141
|
-
color:
|
|
141
|
+
color: o
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
145
|
/* @__PURE__ */ e(x, { amount: n.change, color: c, variant: a }),
|
|
146
|
-
/* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e(d, { variant: "body2", children: t })
|
|
147
147
|
] });
|
|
148
|
-
},
|
|
148
|
+
}, B = _(Se), Te = ({
|
|
149
149
|
netWorth: t,
|
|
150
150
|
gains: a,
|
|
151
151
|
losses: i,
|
|
152
152
|
totalGains: n,
|
|
153
153
|
totalLosses: s
|
|
154
154
|
}) => {
|
|
155
|
-
const { net_worth:
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ e(
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
t && /* @__PURE__ */ e(
|
|
155
|
+
const { net_worth: o } = N(), c = P();
|
|
156
|
+
return /* @__PURE__ */ r(D, { children: [
|
|
157
|
+
/* @__PURE__ */ r(m, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
|
158
|
+
/* @__PURE__ */ e(d, { variant: "body2", children: Q(t?.x) }),
|
|
159
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: o.total_change }),
|
|
160
|
+
t && /* @__PURE__ */ e(B, { currencyVariant: "h1", iconSize: 32, netWorth: t, theme: c })
|
|
161
161
|
] }),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ r(j, { children: [
|
|
163
163
|
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
164
|
-
|
|
164
|
+
b,
|
|
165
165
|
{
|
|
166
|
-
primary: /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */ e(
|
|
168
|
-
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "
|
|
166
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
167
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
|
|
168
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
|
|
169
169
|
] })
|
|
170
170
|
}
|
|
171
171
|
) }),
|
|
172
|
-
a?.map((l) => /* @__PURE__ */
|
|
172
|
+
a?.map((l) => /* @__PURE__ */ r(u.Fragment, { children: [
|
|
173
173
|
/* @__PURE__ */ e(A, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
|
|
174
|
-
|
|
174
|
+
b,
|
|
175
175
|
{
|
|
176
|
-
primary: /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */ e(
|
|
176
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
177
|
+
/* @__PURE__ */ e(d, { sx: { mr: 10 }, variant: "body1", children: l.accountName }),
|
|
178
178
|
/* @__PURE__ */ e(
|
|
179
179
|
x,
|
|
180
180
|
{
|
|
181
181
|
amount: l.gain,
|
|
182
182
|
sx: { color: c.palette.success.main, flexShrink: 0, fontWeight: 700 },
|
|
183
|
-
variant: "
|
|
183
|
+
variant: "body1"
|
|
184
184
|
}
|
|
185
185
|
)
|
|
186
186
|
] }),
|
|
@@ -190,30 +190,30 @@ const Se = () => {
|
|
|
190
190
|
/* @__PURE__ */ e(T, {})
|
|
191
191
|
] }, l.accountName)),
|
|
192
192
|
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
193
|
-
|
|
193
|
+
b,
|
|
194
194
|
{
|
|
195
|
-
primary: /* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ e(
|
|
197
|
-
/* @__PURE__ */ e(x, { amount: s, sx: { fontWeight: 400 }, variant: "
|
|
195
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
196
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
|
|
197
|
+
/* @__PURE__ */ e(x, { amount: s, sx: { fontWeight: 400 }, variant: "caption" })
|
|
198
198
|
] })
|
|
199
199
|
}
|
|
200
200
|
) }),
|
|
201
|
-
i?.map((l) => /* @__PURE__ */
|
|
201
|
+
i?.map((l) => /* @__PURE__ */ r(D, { children: [
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
203
|
A,
|
|
204
204
|
{
|
|
205
205
|
sx: { backgroundColor: c.palette.background.paper, py: 14 },
|
|
206
206
|
children: /* @__PURE__ */ e(
|
|
207
|
-
|
|
207
|
+
b,
|
|
208
208
|
{
|
|
209
|
-
primary: /* @__PURE__ */
|
|
209
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
210
210
|
/* @__PURE__ */ e(
|
|
211
|
-
|
|
211
|
+
d,
|
|
212
212
|
{
|
|
213
213
|
sx: {
|
|
214
214
|
mr: 10
|
|
215
215
|
},
|
|
216
|
-
variant: "
|
|
216
|
+
variant: "body1",
|
|
217
217
|
children: l.accountName
|
|
218
218
|
}
|
|
219
219
|
),
|
|
@@ -222,7 +222,7 @@ const Se = () => {
|
|
|
222
222
|
{
|
|
223
223
|
amount: l.loss,
|
|
224
224
|
sx: { flexShrink: 0, fontWeight: 700 },
|
|
225
|
-
variant: "
|
|
225
|
+
variant: "body1"
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
@@ -236,43 +236,43 @@ const Se = () => {
|
|
|
236
236
|
] }))
|
|
237
237
|
] })
|
|
238
238
|
] });
|
|
239
|
-
}, Ie =
|
|
239
|
+
}, Ie = _(Te), Le = ({ accounts: t, name: a, icon: i }) => {
|
|
240
240
|
const [n, s] = u.useState(!1);
|
|
241
|
-
return /* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */ e(A, { sx: (
|
|
243
|
-
i && /* @__PURE__ */ e(
|
|
241
|
+
return /* @__PURE__ */ r(D, { children: [
|
|
242
|
+
/* @__PURE__ */ e(A, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(J, { onClick: () => s(!n), children: [
|
|
243
|
+
i && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(R, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
244
244
|
/* @__PURE__ */ e(
|
|
245
|
-
|
|
245
|
+
b,
|
|
246
246
|
{
|
|
247
|
-
primary: /* @__PURE__ */ e(
|
|
247
|
+
primary: /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "body1", children: a })
|
|
248
248
|
}
|
|
249
249
|
),
|
|
250
|
-
/* @__PURE__ */ e(
|
|
250
|
+
/* @__PURE__ */ e(F, { children: n ? /* @__PURE__ */ e(R, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(R, { name: "expand_more", size: 24 }) })
|
|
251
251
|
] }) }),
|
|
252
252
|
/* @__PURE__ */ e(T, {}),
|
|
253
|
-
/* @__PURE__ */ e(pe, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((
|
|
253
|
+
/* @__PURE__ */ e(pe, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, c) => /* @__PURE__ */ r(j, { children: [
|
|
254
254
|
/* @__PURE__ */ e(A, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
255
|
-
|
|
255
|
+
b,
|
|
256
256
|
{
|
|
257
|
-
primary: /* @__PURE__ */
|
|
257
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
258
258
|
/* @__PURE__ */ e(
|
|
259
|
-
|
|
259
|
+
d,
|
|
260
260
|
{
|
|
261
261
|
sx: {
|
|
262
262
|
marginRight: 10
|
|
263
263
|
},
|
|
264
|
-
variant: "
|
|
265
|
-
children:
|
|
264
|
+
variant: "body1",
|
|
265
|
+
children: o.accountName
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
268
|
/* @__PURE__ */ e(
|
|
269
269
|
x,
|
|
270
270
|
{
|
|
271
|
-
amount:
|
|
271
|
+
amount: o.balance,
|
|
272
272
|
sx: {
|
|
273
273
|
flexShrink: 0
|
|
274
274
|
},
|
|
275
|
-
variant: "
|
|
275
|
+
variant: "body2"
|
|
276
276
|
}
|
|
277
277
|
)
|
|
278
278
|
] }),
|
|
@@ -280,18 +280,18 @@ const Se = () => {
|
|
|
280
280
|
}
|
|
281
281
|
) }),
|
|
282
282
|
c < t.length - 1 ? /* @__PURE__ */ e(T, { variant: "inset" }) : /* @__PURE__ */ e(T, {})
|
|
283
|
-
] },
|
|
283
|
+
] }, o.accountName)) })
|
|
284
284
|
] });
|
|
285
|
-
},
|
|
285
|
+
}, X = ({ 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 = ({
|
|
286
286
|
netWorth: t,
|
|
287
287
|
assets: a,
|
|
288
288
|
liabilities: i,
|
|
289
289
|
totalAssets: n,
|
|
290
290
|
totalLiabilities: s
|
|
291
291
|
}) => {
|
|
292
|
-
const { net_worth:
|
|
293
|
-
return /* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
292
|
+
const { net_worth: o } = N(), c = P();
|
|
293
|
+
return /* @__PURE__ */ r(D, { children: [
|
|
294
|
+
/* @__PURE__ */ r(
|
|
295
295
|
ee,
|
|
296
296
|
{
|
|
297
297
|
sx: {
|
|
@@ -303,12 +303,12 @@ const Se = () => {
|
|
|
303
303
|
marginBottom: 8
|
|
304
304
|
},
|
|
305
305
|
children: [
|
|
306
|
-
/* @__PURE__ */ e(
|
|
307
|
-
/* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "
|
|
306
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: o.current_net_worth }),
|
|
307
|
+
/* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "h1" }),
|
|
308
308
|
t && /* @__PURE__ */ e(
|
|
309
|
-
|
|
309
|
+
B,
|
|
310
310
|
{
|
|
311
|
-
currencyLabel:
|
|
311
|
+
currencyLabel: o.this_month,
|
|
312
312
|
iconSize: 20,
|
|
313
313
|
netWorth: t,
|
|
314
314
|
theme: c
|
|
@@ -317,74 +317,81 @@ const Se = () => {
|
|
|
317
317
|
]
|
|
318
318
|
}
|
|
319
319
|
),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ r(j, { children: [
|
|
321
321
|
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
322
|
-
|
|
322
|
+
b,
|
|
323
323
|
{
|
|
324
|
-
primary: /* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */ e(
|
|
326
|
-
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "
|
|
324
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
325
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
|
|
326
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
|
|
327
327
|
] })
|
|
328
328
|
}
|
|
329
329
|
) }),
|
|
330
|
-
/* @__PURE__ */ e(
|
|
330
|
+
/* @__PURE__ */ e(X, { groupedAccounts: K(a) }),
|
|
331
331
|
/* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
332
|
-
|
|
332
|
+
b,
|
|
333
333
|
{
|
|
334
|
-
primary: /* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */ e(
|
|
336
|
-
/* @__PURE__ */ e(
|
|
334
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
335
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
|
|
336
|
+
/* @__PURE__ */ e(
|
|
337
|
+
x,
|
|
338
|
+
{
|
|
339
|
+
amount: s,
|
|
340
|
+
sx: { fontWeight: 400 },
|
|
341
|
+
variant: "caption"
|
|
342
|
+
}
|
|
343
|
+
)
|
|
337
344
|
] })
|
|
338
345
|
}
|
|
339
346
|
) }),
|
|
340
|
-
/* @__PURE__ */ e(
|
|
347
|
+
/* @__PURE__ */ e(X, { groupedAccounts: K(i) })
|
|
341
348
|
] })
|
|
342
349
|
] });
|
|
343
|
-
}, Ne =
|
|
344
|
-
const { net_worth: t } = N(), a =
|
|
350
|
+
}, Ne = _(De), Ee = () => {
|
|
351
|
+
const { net_worth: t } = N(), a = z(), { onEvent: i } = G(), {
|
|
345
352
|
assetsLiabilities: n,
|
|
346
353
|
gainsLosses: s,
|
|
347
|
-
hoveredData:
|
|
354
|
+
hoveredData: o,
|
|
348
355
|
netWorthChartData: c,
|
|
349
356
|
selectedData: l,
|
|
350
357
|
setHoveredIndex: f,
|
|
351
358
|
setSelectedIndex: g
|
|
352
|
-
} =
|
|
353
|
-
const C = p.x ===
|
|
359
|
+
} = $(), [w, y] = u.useState(!1), [v, I] = u.useState(!1), L = (p) => {
|
|
360
|
+
const C = p.x === o?.x, H = p.x === l?.x, S = {
|
|
354
361
|
backgroundColor: "inherit",
|
|
355
362
|
borderBottom: "inherit",
|
|
356
363
|
color: "inherit"
|
|
357
364
|
};
|
|
358
|
-
return C && (
|
|
365
|
+
return C && (S.color = H ? "inherit" : S.color, S.backgroundColor = a.palette.action.hover), H && (S.backgroundColor = a.palette.primary.main, S.borderBottom = a.palette.border.light, S.color = a.palette.common.white), S;
|
|
359
366
|
}, E = (p, C) => {
|
|
360
367
|
g(C), p.currentTarget instanceof HTMLDivElement && y(!0);
|
|
361
368
|
}, h = () => {
|
|
362
|
-
I(!0), i(
|
|
369
|
+
I(!0), i(W.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
|
|
363
370
|
}, M = (p) => {
|
|
364
371
|
f(p);
|
|
365
|
-
},
|
|
372
|
+
}, O = () => {
|
|
366
373
|
f(-1);
|
|
367
374
|
};
|
|
368
|
-
return /* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */ e(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(
|
|
375
|
+
return /* @__PURE__ */ r(m, { direction: "column", sx: { width: 320 }, children: [
|
|
376
|
+
/* @__PURE__ */ r(j, { children: [
|
|
377
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(d, { bold: !0, component: "h2", variant: "body1", children: t.monthly_totals }) }),
|
|
371
378
|
/* @__PURE__ */ e(T, {}),
|
|
372
379
|
c.map((p, C) => /* @__PURE__ */ e(
|
|
373
|
-
|
|
380
|
+
We,
|
|
374
381
|
{
|
|
375
382
|
getStyles: L,
|
|
376
|
-
isHovered: p.x ===
|
|
383
|
+
isHovered: p.x === o?.x,
|
|
377
384
|
isSelected: p.x === l?.x,
|
|
378
385
|
item: p,
|
|
379
|
-
onItemClick: (
|
|
386
|
+
onItemClick: (H) => E(H, C),
|
|
380
387
|
onMouseEnter: () => M(C),
|
|
381
|
-
onMouseLeave: () =>
|
|
388
|
+
onMouseLeave: () => O()
|
|
382
389
|
},
|
|
383
390
|
p.x
|
|
384
391
|
))
|
|
385
392
|
] }),
|
|
386
393
|
/* @__PURE__ */ e(
|
|
387
|
-
|
|
394
|
+
me,
|
|
388
395
|
{
|
|
389
396
|
onClick: () => h(),
|
|
390
397
|
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
@@ -393,7 +400,7 @@ const Se = () => {
|
|
|
393
400
|
}
|
|
394
401
|
),
|
|
395
402
|
/* @__PURE__ */ e(
|
|
396
|
-
|
|
403
|
+
U,
|
|
397
404
|
{
|
|
398
405
|
ariaLabelClose: "Close",
|
|
399
406
|
isOpen: w,
|
|
@@ -405,10 +412,10 @@ const Se = () => {
|
|
|
405
412
|
}
|
|
406
413
|
),
|
|
407
414
|
/* @__PURE__ */ e(
|
|
408
|
-
|
|
415
|
+
U,
|
|
409
416
|
{
|
|
410
417
|
ariaLabelClose: "Close",
|
|
411
|
-
isOpen:
|
|
418
|
+
isOpen: v,
|
|
412
419
|
onClose: () => I(!1),
|
|
413
420
|
shouldShowHeaderBorders: !1,
|
|
414
421
|
shouldShowHeaderShadow: !0,
|
|
@@ -417,46 +424,46 @@ const Se = () => {
|
|
|
417
424
|
}
|
|
418
425
|
)
|
|
419
426
|
] });
|
|
420
|
-
}, Me =
|
|
421
|
-
const { net_worth: i } = N(), n =
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */ e(
|
|
424
|
-
/* @__PURE__ */ e(x, { amount: s.y, variant: "
|
|
425
|
-
/* @__PURE__ */ e(
|
|
427
|
+
}, Me = _(Ee), ke = ({ hoveredData: t, selectedData: a }) => {
|
|
428
|
+
const { net_worth: i } = N(), n = z(), s = t || a, o = ue(fe(s.x), "MMMM");
|
|
429
|
+
return /* @__PURE__ */ r(m, { alignItems: "center", direction: "column", m: 24, children: [
|
|
430
|
+
/* @__PURE__ */ e(d, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
|
|
431
|
+
/* @__PURE__ */ e(x, { amount: s.y, variant: "h2" }),
|
|
432
|
+
/* @__PURE__ */ e(B, { currencyLabel: i.this_month, netWorth: s, theme: n })
|
|
426
433
|
] });
|
|
427
|
-
}, Ae =
|
|
428
|
-
const n = i > 0,
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */ e(Z, { variant: "
|
|
431
|
-
t !== 0 && /* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */ e(te, { name:
|
|
434
|
-
/* @__PURE__ */ e(
|
|
434
|
+
}, Ae = _(ke), Oe = ({ amount: t, copy: a, trendValue: i }) => {
|
|
435
|
+
const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
436
|
+
return /* @__PURE__ */ r(m, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
437
|
+
/* @__PURE__ */ e(Z, { variant: "h1", children: V(t, "0,0") }),
|
|
438
|
+
t !== 0 && /* @__PURE__ */ r(m, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
|
|
439
|
+
/* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 8 }, children: [
|
|
440
|
+
/* @__PURE__ */ e(te, { name: o, size: 20 }),
|
|
441
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: V(i, "0,0.00") })
|
|
435
442
|
] }),
|
|
436
|
-
/* @__PURE__ */ e(
|
|
443
|
+
/* @__PURE__ */ e(d, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: a.this_month })
|
|
437
444
|
] })
|
|
438
445
|
] });
|
|
439
|
-
},
|
|
446
|
+
}, He = ({ copy: t }) => /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
440
447
|
/* @__PURE__ */ e(te, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */ e(
|
|
448
|
+
/* @__PURE__ */ r(m, { children: [
|
|
449
|
+
/* @__PURE__ */ e(d, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
|
|
443
450
|
/* @__PURE__ */ e(Z, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
|
|
444
451
|
] })
|
|
445
|
-
] }),
|
|
446
|
-
const { visibleAccounts: a } = ce(), { onEvent: i } =
|
|
452
|
+
] }), _t = _(({ onCTAClick: t }) => {
|
|
453
|
+
const { visibleAccounts: a } = ce(), { onEvent: i } = G(), { net_worth: n, common: s } = N(), { isInitialized: o } = Y(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: f, selectedData: g } = $();
|
|
447
454
|
if (u.useEffect(() => {
|
|
448
455
|
c || l().finally();
|
|
449
456
|
}, []), ne({
|
|
450
457
|
widgetName: "NetWorthMicroWidget",
|
|
451
458
|
isLoaded: c
|
|
452
459
|
}), u.useEffect(() => {
|
|
453
|
-
c && i(
|
|
460
|
+
c && i(W.NET_WORTH_LOAD_WIDGET, {
|
|
454
461
|
state: a?.length ? "default" : "zeroState"
|
|
455
462
|
});
|
|
456
|
-
}, [c]), !
|
|
463
|
+
}, [c]), !o || !c) return /* @__PURE__ */ e(oe, { height: 100 });
|
|
457
464
|
const w = () => {
|
|
458
465
|
i(
|
|
459
|
-
a.length ?
|
|
466
|
+
a.length ? W.NET_WORTH_CLICK_VIEW_DETAILS : W.NET_WORTH_CLICK_GET_STARTED
|
|
460
467
|
), t();
|
|
461
468
|
};
|
|
462
469
|
return /* @__PURE__ */ e(
|
|
@@ -467,47 +474,47 @@ const Se = () => {
|
|
|
467
474
|
onCTAClick: w,
|
|
468
475
|
title: n.net_worth,
|
|
469
476
|
children: f.accounts.length ? /* @__PURE__ */ e(
|
|
470
|
-
|
|
477
|
+
Oe,
|
|
471
478
|
{
|
|
472
479
|
amount: g?.y,
|
|
473
480
|
copy: n,
|
|
474
481
|
trendValue: g?.change
|
|
475
482
|
}
|
|
476
|
-
) : /* @__PURE__ */ e(
|
|
483
|
+
) : /* @__PURE__ */ e(He, { copy: n })
|
|
477
484
|
}
|
|
478
485
|
);
|
|
479
|
-
}), wt =
|
|
486
|
+
}), wt = _(({ onBackClick: t }) => {
|
|
480
487
|
const { isInitialized: a } = Y(), { accounts: i, net_worth: n } = N(), {
|
|
481
488
|
hoveredData: s,
|
|
482
|
-
isNetWorthDataLoaded:
|
|
489
|
+
isNetWorthDataLoaded: o,
|
|
483
490
|
loadNetWorthData: c,
|
|
484
491
|
netWorthChartData: l,
|
|
485
492
|
selectedData: f,
|
|
486
493
|
setTimeframe: g,
|
|
487
494
|
timeframe: w
|
|
488
|
-
} =
|
|
495
|
+
} = $(), { isMobile: y } = q(), { onEvent: v } = G(), [I, L] = u.useState(!1);
|
|
489
496
|
ne({
|
|
490
497
|
widgetName: "NetWorthWidget",
|
|
491
|
-
isLoaded:
|
|
498
|
+
isLoaded: o
|
|
492
499
|
}), u.useEffect(() => {
|
|
493
|
-
|
|
500
|
+
o || c().finally(), v(W.NET_WORTH_VIEW);
|
|
494
501
|
}, []), u.useEffect(() => {
|
|
495
|
-
|
|
502
|
+
v(W.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: w + "M" });
|
|
496
503
|
}, [w]);
|
|
497
|
-
const E = async (
|
|
498
|
-
const p =
|
|
504
|
+
const E = async (O) => {
|
|
505
|
+
const p = O[0], C = O[1];
|
|
499
506
|
p && C && g(xe(C, p));
|
|
500
507
|
}, h = () => {
|
|
501
|
-
L(!0),
|
|
508
|
+
L(!0), v(W.ACCOUNTS_CLICK_CONNECT);
|
|
502
509
|
};
|
|
503
|
-
if (!a || !
|
|
510
|
+
if (!a || !o) return /* @__PURE__ */ e(oe, {});
|
|
504
511
|
const M = l.length === 0;
|
|
505
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ r(
|
|
506
513
|
Ce,
|
|
507
514
|
{
|
|
508
515
|
calendarActions: { onRangeChanged: E },
|
|
509
516
|
dateRangeVariant: y ? "timeframetabs" : "timeframebuttons",
|
|
510
|
-
onAccountsFilterClick: () =>
|
|
517
|
+
onAccountsFilterClick: () => v(W.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
511
518
|
onBackClick: t,
|
|
512
519
|
showDividerAboveDateSelector: !1,
|
|
513
520
|
sx: {
|
|
@@ -526,7 +533,7 @@ const Se = () => {
|
|
|
526
533
|
title: n.net_worth,
|
|
527
534
|
children: [
|
|
528
535
|
M ? /* @__PURE__ */ e(ee, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
|
|
529
|
-
|
|
536
|
+
be,
|
|
530
537
|
{
|
|
531
538
|
header: n.empty_widget_header,
|
|
532
539
|
icon: "elevation",
|
|
@@ -540,10 +547,10 @@ const Se = () => {
|
|
|
540
547
|
}
|
|
541
548
|
}
|
|
542
549
|
}
|
|
543
|
-
) }) : /* @__PURE__ */
|
|
550
|
+
) }) : /* @__PURE__ */ r(D, { children: [
|
|
544
551
|
f && /* @__PURE__ */ e(Ae, { hoveredData: s, selectedData: f }),
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
|
|
552
|
+
/* @__PURE__ */ r(
|
|
553
|
+
m,
|
|
547
554
|
{
|
|
548
555
|
alignItems: y ? "center" : "flex-start",
|
|
549
556
|
direction: y ? "column" : "row",
|
|
@@ -570,8 +577,8 @@ const Se = () => {
|
|
|
570
577
|
export {
|
|
571
578
|
we as NetWorthChart,
|
|
572
579
|
Me as NetWorthList,
|
|
573
|
-
|
|
574
|
-
|
|
580
|
+
_t as NetWorthMicroWidget,
|
|
581
|
+
St as NetWorthStore,
|
|
575
582
|
Ae as NetWorthSummary,
|
|
576
583
|
wt as NetWorthWidget
|
|
577
584
|
};
|