@mx-cartographer/experiences 6.26.18-alpha.mega4 → 6.26.18-alpha.sms1
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/dist/common/context/hooks.d.ts +13 -13
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/index.d.ts +22 -0
- package/dist/index.es.js +30335 -0
- package/dist/index.es.js.map +1 -0
- package/package.json +3 -155
- package/dist/Account-DM32_5k9.mjs +0 -30
- package/dist/AccountDetailsContent-B_qRSB8l.mjs +0 -677
- package/dist/AccountDetailsHeader-CAm6ADMq.mjs +0 -119
- package/dist/AccountFields-Bb4pds0q.mjs +0 -135
- package/dist/AccountListItem-G7iAesaO.mjs +0 -90
- package/dist/AccountStore-RSanus_m.mjs +0 -230
- package/dist/Accounts-BfAQRG8R.mjs +0 -9
- package/dist/BeatApi-DLu87ijw.mjs +0 -21
- package/dist/BeatStore-By4aGoRM.mjs +0 -81
- package/dist/BudgetUtil-DcqclhiQ.mjs +0 -101
- package/dist/CashflowStore-D9Dpuz7X.mjs +0 -91
- package/dist/Category-5S6uwuXz.mjs +0 -301
- package/dist/CategorySelectorDrawer-DgrePTRg.mjs +0 -397
- package/dist/CategoryStore-B5EW6I1d.mjs +0 -183
- package/dist/CategoryUtil-DRyruNgi.mjs +0 -78
- package/dist/ConnectDrawer-DPnfeIfn.mjs +0 -508
- package/dist/ConnectionsDrawer-BCzpuNsK.mjs +0 -52
- package/dist/CurrencyInput-DzsPiUsU.mjs +0 -83
- package/dist/CurrencyText-YUhH2caW.mjs +0 -20
- package/dist/DateUtil-BcuH7ErC.mjs +0 -48
- package/dist/DebtsStore-C6VcBnpG.mjs +0 -60
- package/dist/Dialog-CWW597AF.mjs +0 -123
- package/dist/Donut-1UMNcG67.mjs +0 -57
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/EmptyState-Dcb-o2tl.mjs +0 -55
- package/dist/Fetch-CkFKy79O.mjs +0 -116
- package/dist/FinstrongStore-mkALvztw.mjs +0 -101
- package/dist/GoalStore-DyCr4wNc.mjs +0 -263
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/Help-DhcC-C05.mjs +0 -320
- package/dist/Help-toqAK5eD.mjs +0 -3173
- package/dist/IconBacking-B9oC6uL2.mjs +0 -39
- package/dist/InvestmentUtil-jOyOgzIB.mjs +0 -134
- package/dist/LineChart-CQWu5KoO.mjs +0 -403
- package/dist/ListItemAction-Df3OPMOW.mjs +0 -69
- package/dist/Loader-Dp1P2gNw.mjs +0 -14
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/ManageIncome-BVt_XQbo.mjs +0 -535
- package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
- package/dist/MicroWidgetContainer-DaLW43tE.mjs +0 -45
- package/dist/MiniWidgetContainer-BcNPxZt2.mjs +0 -39
- package/dist/NetWorthStore-DE8CQBMM.mjs +0 -150
- package/dist/Notification-AMGWM1Al.mjs +0 -78
- package/dist/NotificationSettings-CPZN0l8X.mjs +0 -667
- package/dist/NotificationStore-DHtSGySy.mjs +0 -67
- package/dist/NumberFormatting-CtWHhyBX.mjs +0 -40
- package/dist/OriginalBalanceAction-s9sUxofR.mjs +0 -115
- package/dist/RecurringSettings-DIEsympT.mjs +0 -57
- package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +0 -263
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SettingsStore-CE7jDVFL.mjs +0 -265
- package/dist/SingleSegmentDonut-BgbLgwHi.mjs +0 -69
- package/dist/SpendingData-ByFCw95X.mjs +0 -53
- package/dist/StatusBar-BK_uYHAB.mjs +0 -30
- package/dist/TabContentContainer-j01JYR_7.mjs +0 -21
- package/dist/Transaction-C-5-Iuab.mjs +0 -312
- package/dist/TransactionApi-DbbcjI2L.mjs +0 -86
- package/dist/TransactionDetails-B5qfs9Zh.mjs +0 -1283
- package/dist/TransactionStore-BWi6_2Ny.mjs +0 -669
- package/dist/TrendsStore-Borh98aN.mjs +0 -448
- package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +0 -1959
- package/dist/WidgetContainer-CmGNZW0M.mjs +0 -548
- package/dist/accounts/index.es.js +0 -752
- package/dist/analytics/index.es.js +0 -171
- package/dist/budgets/index.es.js +0 -1070
- package/dist/cashflow/index.es.js +0 -1098
- package/dist/categories/index.es.js +0 -9
- package/dist/common/index.es.js +0 -1451
- package/dist/dashboard/index.es.js +0 -181
- package/dist/debts/index.es.js +0 -1460
- package/dist/exportTransactionsToCSV-j4g8bdVZ.mjs +0 -47
- package/dist/finstrong/index.es.js +0 -1455
- package/dist/goals/index.es.js +0 -1209
- package/dist/help/index.es.js +0 -14
- package/dist/hooks-ClhFlg78.mjs +0 -71
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +0 -4
- package/dist/investments/index.es.js +0 -1638
- package/dist/merchants/index.es.js +0 -79
- package/dist/microinsights/index.es.js +0 -16
- package/dist/networth/index.es.js +0 -542
- package/dist/notifications/index.es.js +0 -192
- package/dist/recurringtransactions/index.es.js +0 -879
- package/dist/settings/index.es.js +0 -879
- package/dist/spending/index.es.js +0 -570
- package/dist/transactions/index.es.js +0 -587
- package/dist/trends/index.es.js +0 -1103
- package/dist/useCombineEvents-DaDBSR_1.mjs +0 -92
- package/dist/useDimensions-27p2evRx.mjs +0 -36
- package/dist/useScreenSize-B6JyS_Lj.mjs +0 -36
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import s from "react";
|
|
3
|
-
import { observer as y } from "mobx-react-lite";
|
|
4
|
-
import { useVirtualizer as _ } from "@tanstack/react-virtual";
|
|
5
|
-
import m from "@mui/material/Box";
|
|
6
|
-
import I from "@mui/material/Divider";
|
|
7
|
-
import z from "@mui/material/List";
|
|
8
|
-
import E from "@mui/material/ListItem";
|
|
9
|
-
import G from "@mui/material/ListItemAvatar";
|
|
10
|
-
import T from "@mui/material/ListItemButton";
|
|
11
|
-
import k from "@mui/material/ListItemText";
|
|
12
|
-
import A from "@mui/material/Paper";
|
|
13
|
-
import d from "@mui/material/Stack";
|
|
14
|
-
import { MerchantLogo as V, Text as R } from "@mxenabled/mxui";
|
|
15
|
-
import { b as v, u as w, a as C } from "../hooks-ClhFlg78.mjs";
|
|
16
|
-
import { L as p } from "../Loader-Dp1P2gNw.mjs";
|
|
17
|
-
import { S as N } from "../SearchBox-B2_zLv8-.mjs";
|
|
18
|
-
import { M as ne } from "../MerchantStore-DVH-QOf0.mjs";
|
|
19
|
-
const B = /^[ a-zA-ZÀ-ÿ0-9]+$/, H = 50, u = 65, P = ({
|
|
20
|
-
height: f = "calc(100dvh - 120px)",
|
|
21
|
-
onSelect: g
|
|
22
|
-
}) => {
|
|
23
|
-
const { isLoading: l, merchants: o, loadMerchants: c } = v(), { common: a } = w(), { isCopyLoaded: L } = C(), [x, S] = s.useState("");
|
|
24
|
-
s.useEffect(() => {
|
|
25
|
-
c().finally();
|
|
26
|
-
}, [c]);
|
|
27
|
-
const b = (t) => {
|
|
28
|
-
g(t);
|
|
29
|
-
}, M = async (t) => {
|
|
30
|
-
(!t || B.test(t)) && t.length <= H && (S(t), await c(t));
|
|
31
|
-
}, h = s.useRef(null), i = _({
|
|
32
|
-
count: o.length,
|
|
33
|
-
getScrollElement: () => h.current,
|
|
34
|
-
estimateSize: () => u,
|
|
35
|
-
overscan: 5
|
|
36
|
-
});
|
|
37
|
-
return s.useEffect(() => i.measure(), [o]), L ? /* @__PURE__ */ r(d, { className: "mx-mrt-lookup", children: [
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
N,
|
|
40
|
-
{
|
|
41
|
-
ariaLabel: a.search_aria,
|
|
42
|
-
cancelAriaLabel: a.cancel_search_aria,
|
|
43
|
-
onChange: M,
|
|
44
|
-
placeholder: a.search_placeholder,
|
|
45
|
-
searchValue: x
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
/* @__PURE__ */ e(A, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(z, { children: /* @__PURE__ */ r(m, { height: f, overflow: "auto", ref: h, children: [
|
|
49
|
-
/* @__PURE__ */ r(m, { height: i.getTotalSize(), position: "relative", children: [
|
|
50
|
-
l && /* @__PURE__ */ e(p, { label: "Loading...", size: 32 }),
|
|
51
|
-
!l && i.getVirtualItems().length > 0 && i.getVirtualItems().map((t) => {
|
|
52
|
-
const n = o[t.index];
|
|
53
|
-
return /* @__PURE__ */ r(
|
|
54
|
-
m,
|
|
55
|
-
{
|
|
56
|
-
height: u,
|
|
57
|
-
position: "absolute",
|
|
58
|
-
sx: { transform: `translateY(${t.start}px)` },
|
|
59
|
-
width: "100%",
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ e(E, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ r(T, { onClick: () => b(n.guid), children: [
|
|
62
|
-
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(V, { categoryGuid: "", merchantGuid: n.guid }) }),
|
|
63
|
-
/* @__PURE__ */ e(k, { primary: n.name })
|
|
64
|
-
] }) }),
|
|
65
|
-
/* @__PURE__ */ e(I, { sx: { ml: 24 } })
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
n.guid
|
|
69
|
-
);
|
|
70
|
-
})
|
|
71
|
-
] }),
|
|
72
|
-
!o.length && /* @__PURE__ */ e(d, { alignItems: "center", my: 24, children: /* @__PURE__ */ e(R, { bold: !0, color: "secondary", variant: "Small", children: a.search_zero_state }) })
|
|
73
|
-
] }) }) })
|
|
74
|
-
] }) : /* @__PURE__ */ e(p, {});
|
|
75
|
-
}, oe = y(P);
|
|
76
|
-
export {
|
|
77
|
-
oe as MerchantLookup,
|
|
78
|
-
ne as MerchantStore
|
|
79
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-CAPFNz-J.mjs";
|
|
2
|
-
export {
|
|
3
|
-
s as AppStore,
|
|
4
|
-
e as BeatCard,
|
|
5
|
-
o as CarouselHeader,
|
|
6
|
-
t as ChartFilledIcon,
|
|
7
|
-
i as InsightsMicroWidget,
|
|
8
|
-
d as InsightsMicroWidgetDataProvider,
|
|
9
|
-
n as MicroBeatCarousel,
|
|
10
|
-
C as MicroInsightCard,
|
|
11
|
-
c as MonthlySpendComparisonIcon,
|
|
12
|
-
I as NoRelevantInsightsCard,
|
|
13
|
-
M as ViewMoreMicroCard,
|
|
14
|
-
g as ZeroStateCard,
|
|
15
|
-
h as ZeroStateIcon
|
|
16
|
-
};
|
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as v } from "react/jsx-runtime";
|
|
2
|
-
import { format as we } from "date-fns/format";
|
|
3
|
-
import { fromUnixTime as _e } from "date-fns/fromUnixTime";
|
|
4
|
-
import { observer as S } from "mobx-react-lite";
|
|
5
|
-
import { useTheme as z } from "@mui/material/styles";
|
|
6
|
-
import { u as Z } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
7
|
-
import { p as Se, u as T, c as J, g as Q, a as P, q as ee } from "../hooks-ClhFlg78.mjs";
|
|
8
|
-
import { L as be } from "../LineChart-CQWu5KoO.mjs";
|
|
9
|
-
import W from "@mui/material/Divider";
|
|
10
|
-
import H from "@mui/material/List";
|
|
11
|
-
import D from "@mui/material/ListSubheader";
|
|
12
|
-
import h from "@mui/material/Stack";
|
|
13
|
-
import { Text as m, Icon as B, H1 as We, P as ve } from "@mxenabled/mxui";
|
|
14
|
-
import d from "react";
|
|
15
|
-
import k from "@mui/material/ListItem";
|
|
16
|
-
import te from "@mui/material/ListItemButton";
|
|
17
|
-
import _ from "@mui/material/ListItemText";
|
|
18
|
-
import { i as ne } from "../DateUtil-BcuH7ErC.mjs";
|
|
19
|
-
import { C as y } from "../CurrencyText-YUhH2caW.mjs";
|
|
20
|
-
import { Button as Ie, Stack as Te } from "@mui/material";
|
|
21
|
-
import { format as Le, fromUnixTime as Ee, differenceInMonths as Ne } from "date-fns";
|
|
22
|
-
import { g as K } from "../NetWorthStore-DE8CQBMM.mjs";
|
|
23
|
-
import { N as Ht } from "../NetWorthStore-DE8CQBMM.mjs";
|
|
24
|
-
import { Icon as oe } from "@mxenabled/mx-icons";
|
|
25
|
-
import { f as U } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
26
|
-
import { A as b, W as De } from "../WidgetContainer-CmGNZW0M.mjs";
|
|
27
|
-
import { L as O } from "../Loader-Dp1P2gNw.mjs";
|
|
28
|
-
import { M as ke } from "../MicroWidgetContainer-DaLW43tE.mjs";
|
|
29
|
-
import re from "@mui/material/Box";
|
|
30
|
-
import { C as Me } from "../ConnectionsDrawer-BCzpuNsK.mjs";
|
|
31
|
-
import Ae from "@mui/material/Collapse";
|
|
32
|
-
import V from "@mui/material/ListItemIcon";
|
|
33
|
-
import ie from "@mui/material/styles/useTheme";
|
|
34
|
-
import { E as Be } from "../EmptyState-Dcb-o2tl.mjs";
|
|
35
|
-
import { D as Y } from "../Drawer-kEE73B87.mjs";
|
|
36
|
-
const He = ({
|
|
37
|
-
chartData: t,
|
|
38
|
-
hoveredData: l,
|
|
39
|
-
onDataClick: i,
|
|
40
|
-
onMouseEnter: n,
|
|
41
|
-
onMouseLeave: a,
|
|
42
|
-
selectedData: o
|
|
43
|
-
}) => {
|
|
44
|
-
const { isMobile: s } = Z(), { availableWidth: c } = Se(), u = z(), C = c - 320, x = t.map((f) => ({
|
|
45
|
-
x: we(_e(f.x), "MMM"),
|
|
46
|
-
y: f.y
|
|
47
|
-
})), g = o ? { index: t.findIndex((f) => f.x === o.x) } : void 0, w = l ? { index: t.findIndex((f) => f.x === l.x) } : void 0, p = (f) => ({
|
|
48
|
-
fill: f === g?.index ? u.palette.success.main : "",
|
|
49
|
-
filter: f === w?.index ? `drop-shadow(0px 0px 10px ${u.palette.success.main})` : "none",
|
|
50
|
-
stroke: u.palette.success.main
|
|
51
|
-
});
|
|
52
|
-
return /* @__PURE__ */ e(
|
|
53
|
-
be,
|
|
54
|
-
{
|
|
55
|
-
baseline: "min",
|
|
56
|
-
colors: [u.palette.success.main],
|
|
57
|
-
datasets: [x],
|
|
58
|
-
height: 350,
|
|
59
|
-
labels: [],
|
|
60
|
-
margin: { right: 20 },
|
|
61
|
-
markHandlers: { onMarkClick: i, onMouseEnter: n, onMouseLeave: a },
|
|
62
|
-
markStyles: p,
|
|
63
|
-
showArea: !0,
|
|
64
|
-
useCustomMark: !0,
|
|
65
|
-
valueFormatterString: "0,0a",
|
|
66
|
-
width: s ? 320 : C
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}, Oe = S(He), ze = ({
|
|
70
|
-
item: t,
|
|
71
|
-
getStyles: l,
|
|
72
|
-
isHovered: i = !1,
|
|
73
|
-
isSelected: n = !1,
|
|
74
|
-
onItemClick: a,
|
|
75
|
-
onMouseEnter: o,
|
|
76
|
-
onMouseLeave: s
|
|
77
|
-
}) => {
|
|
78
|
-
const [c, u] = d.useState({
|
|
79
|
-
color: ""
|
|
80
|
-
});
|
|
81
|
-
return d.useEffect(() => {
|
|
82
|
-
u(l(t));
|
|
83
|
-
}, [i, n]), /* @__PURE__ */ r(d.Fragment, { children: [
|
|
84
|
-
/* @__PURE__ */ e(
|
|
85
|
-
k,
|
|
86
|
-
{
|
|
87
|
-
sx: {
|
|
88
|
-
...c,
|
|
89
|
-
minHeight: 44,
|
|
90
|
-
"&:hover": { color: n ? "inherit" : c.color }
|
|
91
|
-
},
|
|
92
|
-
children: /* @__PURE__ */ e(
|
|
93
|
-
te,
|
|
94
|
-
{
|
|
95
|
-
onClick: (C) => a?.(C, t.x),
|
|
96
|
-
onMouseEnter: () => o(t.x),
|
|
97
|
-
onMouseLeave: () => s(),
|
|
98
|
-
sx: { minHeight: 20, padding: 12 },
|
|
99
|
-
children: /* @__PURE__ */ e(
|
|
100
|
-
_,
|
|
101
|
-
{
|
|
102
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
103
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: ne(t.x) }),
|
|
104
|
-
/* @__PURE__ */ e(y, { amount: t.y, sx: { color: "inherit" }, variant: "Body" })
|
|
105
|
-
] })
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ e(W, {})
|
|
113
|
-
] }, t.x);
|
|
114
|
-
}, $e = S(ze), je = ({
|
|
115
|
-
chartData: t,
|
|
116
|
-
hoveredData: l,
|
|
117
|
-
onDataClick: i,
|
|
118
|
-
onButtonClick: n,
|
|
119
|
-
onMouseEnter: a,
|
|
120
|
-
onMouseLeave: o,
|
|
121
|
-
selectedData: s
|
|
122
|
-
}) => {
|
|
123
|
-
const { net_worth: c } = T(), u = z(), C = (x) => {
|
|
124
|
-
const g = x.x === l?.x, w = x.x === s?.x, p = {
|
|
125
|
-
backgroundColor: "inherit",
|
|
126
|
-
borderBottom: "inherit",
|
|
127
|
-
color: "inherit"
|
|
128
|
-
};
|
|
129
|
-
return g && (p.color = w ? "inherit" : p.color, p.backgroundColor = u.palette.action.hover), w && (p.backgroundColor = u.palette.primary.main, p.borderBottom = u.palette.border.light, p.color = u.palette.common.white), p;
|
|
130
|
-
};
|
|
131
|
-
return /* @__PURE__ */ r(h, { direction: "column", sx: { width: 320 }, children: [
|
|
132
|
-
/* @__PURE__ */ r(H, { children: [
|
|
133
|
-
/* @__PURE__ */ e(D, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(m, { bold: !0, component: "h2", variant: "Body", children: c.monthly_totals }) }),
|
|
134
|
-
/* @__PURE__ */ e(W, {}),
|
|
135
|
-
t.map((x, g) => /* @__PURE__ */ e(
|
|
136
|
-
$e,
|
|
137
|
-
{
|
|
138
|
-
getStyles: C,
|
|
139
|
-
isHovered: x.x === l?.x,
|
|
140
|
-
isSelected: x.x === s?.x,
|
|
141
|
-
item: x,
|
|
142
|
-
onItemClick: (w) => i(w, g),
|
|
143
|
-
onMouseEnter: () => a(g),
|
|
144
|
-
onMouseLeave: () => o()
|
|
145
|
-
},
|
|
146
|
-
x.x
|
|
147
|
-
))
|
|
148
|
-
] }),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
Ie,
|
|
151
|
-
{
|
|
152
|
-
onClick: () => n(),
|
|
153
|
-
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
154
|
-
variant: "outlined",
|
|
155
|
-
children: c.view_assets_and_liabilities
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
] });
|
|
159
|
-
}, Re = S(je), Ge = ({
|
|
160
|
-
currencyLabel: t,
|
|
161
|
-
currencyVariant: l = "Small",
|
|
162
|
-
iconSize: i,
|
|
163
|
-
netWorth: n,
|
|
164
|
-
theme: a
|
|
165
|
-
}) => {
|
|
166
|
-
let o = a.palette.secondary.main, s = a.palette.secondary.main, c = "trending_flat";
|
|
167
|
-
return n.change < 0 ? c = "trending_down" : n.change > 0 && (o = a.palette.success.main, s = a.palette.success.main, c = "trending_up"), /* @__PURE__ */ r(Te, { alignItems: "center", direction: "row", spacing: 4, children: [
|
|
168
|
-
/* @__PURE__ */ e(
|
|
169
|
-
B,
|
|
170
|
-
{
|
|
171
|
-
name: c,
|
|
172
|
-
size: i,
|
|
173
|
-
sx: {
|
|
174
|
-
color: o
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
),
|
|
178
|
-
/* @__PURE__ */ e(y, { amount: n.change, color: s, variant: l }),
|
|
179
|
-
/* @__PURE__ */ e(m, { variant: "Small", children: t })
|
|
180
|
-
] });
|
|
181
|
-
}, $ = S(Ge), Fe = ({ hoveredData: t, selectedData: l }) => {
|
|
182
|
-
const { net_worth: i } = T(), n = z(), a = t || l, o = Le(Ee(a.x), "MMMM");
|
|
183
|
-
return /* @__PURE__ */ r(h, { alignItems: "center", direction: "column", m: 24, children: [
|
|
184
|
-
/* @__PURE__ */ e(m, { color: n.palette.secondary.main, variant: "Small", children: `${o} ${i.net_worth}` }),
|
|
185
|
-
/* @__PURE__ */ e(y, { amount: a.y, variant: "H2" }),
|
|
186
|
-
/* @__PURE__ */ e($, { currencyLabel: i.this_month, netWorth: a, theme: n })
|
|
187
|
-
] });
|
|
188
|
-
}, Xe = S(Fe), Ke = ({ amount: t, copy: l, trendValue: i }) => {
|
|
189
|
-
const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
190
|
-
return /* @__PURE__ */ r(h, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
191
|
-
/* @__PURE__ */ e(We, { children: U(t, "0,0") }),
|
|
192
|
-
t !== 0 && /* @__PURE__ */ r(h, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
|
|
193
|
-
/* @__PURE__ */ r(h, { sx: { flexDirection: "row", gap: 8 }, children: [
|
|
194
|
-
/* @__PURE__ */ e(oe, { name: o, size: 20 }),
|
|
195
|
-
/* @__PURE__ */ e(m, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: U(i, "0,0.00") })
|
|
196
|
-
] }),
|
|
197
|
-
/* @__PURE__ */ e(m, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: l.this_month })
|
|
198
|
-
] })
|
|
199
|
-
] });
|
|
200
|
-
}, Ue = ({ copy: t }) => /* @__PURE__ */ r(h, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
201
|
-
/* @__PURE__ */ e(oe, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
|
|
202
|
-
/* @__PURE__ */ r(h, { children: [
|
|
203
|
-
/* @__PURE__ */ e(m, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
|
|
204
|
-
/* @__PURE__ */ e(ve, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
|
|
205
|
-
] })
|
|
206
|
-
] }), kt = S(({ onCTAClick: t }) => {
|
|
207
|
-
const [l, i] = d.useState(!1), { visibleAccounts: n } = J(), { onEvent: a } = Q(), { net_worth: o, common: s } = T(), { isInitialized: c, selectedAccounts: u, setSelectedAccounts: C } = P(), { loadChartData: x, loadNetWorthData: g, netWorthData: w, selectedData: p } = ee(), f = async () => {
|
|
208
|
-
await g(u), await x(1), i(!0);
|
|
209
|
-
};
|
|
210
|
-
if (d.useEffect(() => C(n), [n]), d.useEffect(() => {
|
|
211
|
-
c && f().finally(), a(b.NET_WORTH_LOAD_WIDGET, {
|
|
212
|
-
state: n?.length ? "default" : "zeroState"
|
|
213
|
-
});
|
|
214
|
-
}, [c]), !l) return /* @__PURE__ */ e(O, { height: 100 });
|
|
215
|
-
const L = () => {
|
|
216
|
-
a(
|
|
217
|
-
n.length ? b.NET_WORTH_CLICK_VIEW_DETAILS : b.NET_WORTH_CLICK_GET_STARTED
|
|
218
|
-
), t();
|
|
219
|
-
};
|
|
220
|
-
return /* @__PURE__ */ e(
|
|
221
|
-
ke,
|
|
222
|
-
{
|
|
223
|
-
className: "mx-networth-microwidget",
|
|
224
|
-
ctaLabel: s.see_details,
|
|
225
|
-
onCTAClick: L,
|
|
226
|
-
title: o.net_worth,
|
|
227
|
-
children: w.accounts.length ? /* @__PURE__ */ e(
|
|
228
|
-
Ke,
|
|
229
|
-
{
|
|
230
|
-
amount: p?.y,
|
|
231
|
-
copy: o,
|
|
232
|
-
trendValue: p?.change
|
|
233
|
-
}
|
|
234
|
-
) : /* @__PURE__ */ e(Ue, { copy: o })
|
|
235
|
-
}
|
|
236
|
-
);
|
|
237
|
-
}), Ve = ({ accounts: t, name: l, icon: i }) => {
|
|
238
|
-
const [n, a] = d.useState(!1);
|
|
239
|
-
return /* @__PURE__ */ r(v, { children: [
|
|
240
|
-
/* @__PURE__ */ e(k, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(te, { onClick: () => a(!n), children: [
|
|
241
|
-
i && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(B, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
242
|
-
/* @__PURE__ */ e(
|
|
243
|
-
_,
|
|
244
|
-
{
|
|
245
|
-
primary: /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "Body", children: l })
|
|
246
|
-
}
|
|
247
|
-
),
|
|
248
|
-
/* @__PURE__ */ e(V, { children: n ? /* @__PURE__ */ e(B, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(B, { name: "expand_more", size: 24 }) })
|
|
249
|
-
] }) }),
|
|
250
|
-
/* @__PURE__ */ e(W, {}),
|
|
251
|
-
/* @__PURE__ */ e(Ae, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, s) => /* @__PURE__ */ r(H, { children: [
|
|
252
|
-
/* @__PURE__ */ e(k, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
253
|
-
_,
|
|
254
|
-
{
|
|
255
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
256
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: o.accountName }),
|
|
257
|
-
/* @__PURE__ */ e(y, { amount: o.balance, variant: "Small" })
|
|
258
|
-
] }),
|
|
259
|
-
sx: { pl: 72, pr: 16 }
|
|
260
|
-
}
|
|
261
|
-
) }),
|
|
262
|
-
s < t.length - 1 ? /* @__PURE__ */ e(W, { variant: "inset" }) : /* @__PURE__ */ e(W, {})
|
|
263
|
-
] }, o.accountName)) })
|
|
264
|
-
] });
|
|
265
|
-
}, q = ({ groupedAccounts: t }) => /* @__PURE__ */ e(v, { children: t.map(({ accounts: l, icon: i, name: n }) => /* @__PURE__ */ e(Ve, { accounts: l, icon: i, name: n }, n)) }), Ye = ({
|
|
266
|
-
netWorth: t,
|
|
267
|
-
assets: l,
|
|
268
|
-
liabilities: i,
|
|
269
|
-
totalAssets: n,
|
|
270
|
-
totalLiabilities: a
|
|
271
|
-
}) => {
|
|
272
|
-
const { net_worth: o } = T(), s = ie();
|
|
273
|
-
return /* @__PURE__ */ r(v, { children: [
|
|
274
|
-
/* @__PURE__ */ r(
|
|
275
|
-
re,
|
|
276
|
-
{
|
|
277
|
-
sx: {
|
|
278
|
-
alignItems: "center",
|
|
279
|
-
display: "flex",
|
|
280
|
-
flexDirection: "column",
|
|
281
|
-
justifyContent: "space-between",
|
|
282
|
-
paddingTop: 24,
|
|
283
|
-
marginBottom: 8
|
|
284
|
-
},
|
|
285
|
-
children: [
|
|
286
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: o.current_net_worth }),
|
|
287
|
-
/* @__PURE__ */ e(y, { amount: t?.y ?? 0, variant: "H1" }),
|
|
288
|
-
t && /* @__PURE__ */ e(
|
|
289
|
-
$,
|
|
290
|
-
{
|
|
291
|
-
currencyLabel: o.this_month,
|
|
292
|
-
iconSize: 20,
|
|
293
|
-
netWorth: t,
|
|
294
|
-
theme: s
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
),
|
|
300
|
-
/* @__PURE__ */ r(H, { children: [
|
|
301
|
-
/* @__PURE__ */ e(D, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
302
|
-
_,
|
|
303
|
-
{
|
|
304
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
|
|
305
|
-
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.assets }),
|
|
306
|
-
/* @__PURE__ */ e(y, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
307
|
-
] })
|
|
308
|
-
}
|
|
309
|
-
) }),
|
|
310
|
-
/* @__PURE__ */ e(q, { groupedAccounts: K(l) }),
|
|
311
|
-
/* @__PURE__ */ e(D, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
312
|
-
_,
|
|
313
|
-
{
|
|
314
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
|
|
315
|
-
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.liabilities }),
|
|
316
|
-
/* @__PURE__ */ e(y, { amount: a, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
317
|
-
] })
|
|
318
|
-
}
|
|
319
|
-
) }),
|
|
320
|
-
/* @__PURE__ */ e(q, { groupedAccounts: K(i) })
|
|
321
|
-
] })
|
|
322
|
-
] });
|
|
323
|
-
}, qe = S(Ye), Ze = ({
|
|
324
|
-
netWorth: t,
|
|
325
|
-
gains: l,
|
|
326
|
-
losses: i,
|
|
327
|
-
totalGains: n,
|
|
328
|
-
totalLosses: a
|
|
329
|
-
}) => {
|
|
330
|
-
const { net_worth: o } = T(), s = ie();
|
|
331
|
-
return /* @__PURE__ */ r(v, { children: [
|
|
332
|
-
/* @__PURE__ */ r(h, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
|
333
|
-
/* @__PURE__ */ e(m, { variant: "Small", children: ne(t?.x) }),
|
|
334
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: o.total_change }),
|
|
335
|
-
t && /* @__PURE__ */ e($, { currencyVariant: "H1", iconSize: 32, netWorth: t, theme: s })
|
|
336
|
-
] }),
|
|
337
|
-
/* @__PURE__ */ r(H, { children: [
|
|
338
|
-
/* @__PURE__ */ e(D, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
339
|
-
_,
|
|
340
|
-
{
|
|
341
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
|
|
342
|
-
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.gains }),
|
|
343
|
-
/* @__PURE__ */ e(y, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
344
|
-
] })
|
|
345
|
-
}
|
|
346
|
-
) }),
|
|
347
|
-
l?.map((c) => /* @__PURE__ */ r(d.Fragment, { children: [
|
|
348
|
-
/* @__PURE__ */ e(k, { sx: { backgroundColor: s.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
|
|
349
|
-
_,
|
|
350
|
-
{
|
|
351
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
352
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: c.accountName }),
|
|
353
|
-
/* @__PURE__ */ e(
|
|
354
|
-
y,
|
|
355
|
-
{
|
|
356
|
-
amount: c.gain,
|
|
357
|
-
sx: { color: s.palette.success.main, fontWeight: 700 },
|
|
358
|
-
variant: "Body"
|
|
359
|
-
}
|
|
360
|
-
)
|
|
361
|
-
] }),
|
|
362
|
-
sx: { px: 16 }
|
|
363
|
-
}
|
|
364
|
-
) }),
|
|
365
|
-
/* @__PURE__ */ e(W, {})
|
|
366
|
-
] }, c.accountName)),
|
|
367
|
-
/* @__PURE__ */ e(D, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
368
|
-
_,
|
|
369
|
-
{
|
|
370
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
|
|
371
|
-
/* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.losses }),
|
|
372
|
-
/* @__PURE__ */ e(y, { amount: a, sx: { fontWeight: 400 }, variant: "XSmall" })
|
|
373
|
-
] })
|
|
374
|
-
}
|
|
375
|
-
) }),
|
|
376
|
-
i?.map((c) => /* @__PURE__ */ r(v, { children: [
|
|
377
|
-
/* @__PURE__ */ e(
|
|
378
|
-
k,
|
|
379
|
-
{
|
|
380
|
-
sx: { backgroundColor: s.palette.background.paper, py: 14 },
|
|
381
|
-
children: /* @__PURE__ */ e(
|
|
382
|
-
_,
|
|
383
|
-
{
|
|
384
|
-
primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
385
|
-
/* @__PURE__ */ e(m, { variant: "Body", children: c.accountName }),
|
|
386
|
-
/* @__PURE__ */ e(y, { amount: c.loss, sx: { fontWeight: 700 }, variant: "Body" })
|
|
387
|
-
] }),
|
|
388
|
-
sx: { px: 16 }
|
|
389
|
-
}
|
|
390
|
-
)
|
|
391
|
-
},
|
|
392
|
-
c.accountName
|
|
393
|
-
),
|
|
394
|
-
/* @__PURE__ */ e(W, {})
|
|
395
|
-
] }))
|
|
396
|
-
] })
|
|
397
|
-
] });
|
|
398
|
-
}, Je = S(Ze), Mt = S(({ onBackClick: t }) => {
|
|
399
|
-
const { isCopyLoaded: l, isInitialized: i, selectedAccounts: n, setSelectedAccounts: a } = P(), { accounts: o, net_worth: s } = T(), { visibleAccounts: c } = J(), {
|
|
400
|
-
assetsLiabilities: u,
|
|
401
|
-
gainsLosses: C,
|
|
402
|
-
hoveredData: x,
|
|
403
|
-
loadChartData: g,
|
|
404
|
-
loadNetWorthData: w,
|
|
405
|
-
netWorthChartData: p,
|
|
406
|
-
selectedData: f,
|
|
407
|
-
setHoveredData: L,
|
|
408
|
-
setSelectedData: se
|
|
409
|
-
} = ee(), { isMobile: E } = Z(), { onEvent: N } = Q(), [ae, ce] = d.useState(!1), [M, le] = d.useState(6), [me, j] = d.useState(!1), [de, R] = d.useState(!1), [he, G] = d.useState(!1), ue = async () => {
|
|
410
|
-
await w(n), await g(M), ce(!0);
|
|
411
|
-
};
|
|
412
|
-
d.useEffect(() => {
|
|
413
|
-
N(b.NET_WORTH_VIEW);
|
|
414
|
-
}, []), d.useEffect(() => {
|
|
415
|
-
a(c);
|
|
416
|
-
}, [c]), d.useEffect(() => {
|
|
417
|
-
i && ue().finally();
|
|
418
|
-
}, [i, n]), d.useEffect(() => {
|
|
419
|
-
N(b.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: M + "M" }), g(M).finally();
|
|
420
|
-
}, [M]);
|
|
421
|
-
const pe = (I, A) => {
|
|
422
|
-
se(A), I.currentTarget instanceof HTMLDivElement && j(!0);
|
|
423
|
-
}, fe = (I) => {
|
|
424
|
-
L(I);
|
|
425
|
-
}, xe = () => {
|
|
426
|
-
L(null);
|
|
427
|
-
}, ge = () => {
|
|
428
|
-
N(b.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), R(!0);
|
|
429
|
-
}, ye = async (I) => {
|
|
430
|
-
const A = I[0], X = I[1];
|
|
431
|
-
A && X && le(Ne(X, A));
|
|
432
|
-
}, F = {
|
|
433
|
-
chartData: p,
|
|
434
|
-
hoveredData: x,
|
|
435
|
-
onButtonClick: ge,
|
|
436
|
-
onDataClick: pe,
|
|
437
|
-
onMouseEnter: fe,
|
|
438
|
-
onMouseLeave: xe,
|
|
439
|
-
selectedData: f
|
|
440
|
-
}, Ce = () => {
|
|
441
|
-
G(!0), N(b.ACCOUNTS_CLICK_CONNECT);
|
|
442
|
-
};
|
|
443
|
-
return l ? /* @__PURE__ */ e(
|
|
444
|
-
De,
|
|
445
|
-
{
|
|
446
|
-
accountOptions: c,
|
|
447
|
-
calendarActions: {
|
|
448
|
-
onRangeChanged: ye
|
|
449
|
-
},
|
|
450
|
-
dateRangeVariant: E ? "timeframetabs" : "timeframebuttons",
|
|
451
|
-
onAccountsFilterClick: () => N(b.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
452
|
-
onBackClick: t,
|
|
453
|
-
showDividerAboveDateSelector: !1,
|
|
454
|
-
sx: {
|
|
455
|
-
p: E ? 0 : 48,
|
|
456
|
-
"& .MuiCardHeader-root": {
|
|
457
|
-
px: 16,
|
|
458
|
-
py: 12
|
|
459
|
-
},
|
|
460
|
-
"& .MuiBox-root": {
|
|
461
|
-
m: 0
|
|
462
|
-
},
|
|
463
|
-
"& .MuiTabs-root": {
|
|
464
|
-
width: "100%"
|
|
465
|
-
}
|
|
466
|
-
},
|
|
467
|
-
title: s.net_worth,
|
|
468
|
-
children: ae ? /* @__PURE__ */ r(v, { children: [
|
|
469
|
-
p.length ? /* @__PURE__ */ r(v, { children: [
|
|
470
|
-
f && /* @__PURE__ */ e(Xe, { hoveredData: x, selectedData: f }),
|
|
471
|
-
/* @__PURE__ */ r(
|
|
472
|
-
h,
|
|
473
|
-
{
|
|
474
|
-
alignItems: E ? "center" : "flex-start",
|
|
475
|
-
direction: E ? "column" : "row",
|
|
476
|
-
spacing: E ? 0 : 48,
|
|
477
|
-
children: [
|
|
478
|
-
/* @__PURE__ */ e(Oe, { ...F }),
|
|
479
|
-
/* @__PURE__ */ e(Re, { ...F })
|
|
480
|
-
]
|
|
481
|
-
}
|
|
482
|
-
)
|
|
483
|
-
] }) : /* @__PURE__ */ e(re, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
|
|
484
|
-
Be,
|
|
485
|
-
{
|
|
486
|
-
header: s.empty_widget_header,
|
|
487
|
-
icon: "elevation",
|
|
488
|
-
onClick: Ce,
|
|
489
|
-
primaryButton: s.empty_widget_button,
|
|
490
|
-
subText: s.empty_widget_description,
|
|
491
|
-
sx: {
|
|
492
|
-
width: { sm: 432 },
|
|
493
|
-
".buttons-footer": {
|
|
494
|
-
width: 167
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
) }),
|
|
499
|
-
/* @__PURE__ */ e(
|
|
500
|
-
Me,
|
|
501
|
-
{
|
|
502
|
-
onClose: () => G(!1),
|
|
503
|
-
showConnectionsWidget: he,
|
|
504
|
-
title: o.manage_connections
|
|
505
|
-
}
|
|
506
|
-
),
|
|
507
|
-
/* @__PURE__ */ e(
|
|
508
|
-
Y,
|
|
509
|
-
{
|
|
510
|
-
ariaLabelClose: "Close",
|
|
511
|
-
isOpen: me,
|
|
512
|
-
onClose: () => j(!1),
|
|
513
|
-
shouldShowHeaderBorders: !1,
|
|
514
|
-
shouldShowHeaderShadow: !0,
|
|
515
|
-
title: s.gains_and_losses,
|
|
516
|
-
children: C && /* @__PURE__ */ e(Je, { ...C })
|
|
517
|
-
}
|
|
518
|
-
),
|
|
519
|
-
/* @__PURE__ */ e(
|
|
520
|
-
Y,
|
|
521
|
-
{
|
|
522
|
-
ariaLabelClose: "Close",
|
|
523
|
-
isOpen: de,
|
|
524
|
-
onClose: () => R(!1),
|
|
525
|
-
shouldShowHeaderBorders: !1,
|
|
526
|
-
shouldShowHeaderShadow: !0,
|
|
527
|
-
title: s.assets_and_liabilities,
|
|
528
|
-
children: u && /* @__PURE__ */ e(qe, { ...u })
|
|
529
|
-
}
|
|
530
|
-
)
|
|
531
|
-
] }) : /* @__PURE__ */ e(O, {})
|
|
532
|
-
}
|
|
533
|
-
) : /* @__PURE__ */ e(O, {});
|
|
534
|
-
});
|
|
535
|
-
export {
|
|
536
|
-
Oe as NetWorthChart,
|
|
537
|
-
Re as NetWorthList,
|
|
538
|
-
kt as NetWorthMicroWidget,
|
|
539
|
-
Ht as NetWorthStore,
|
|
540
|
-
Xe as NetWorthSummary,
|
|
541
|
-
Mt as NetWorthWidget
|
|
542
|
-
};
|