@mx-cartographer/experiences 7.12.16 → 7.13.0
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-DkBNsLsI.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
- package/dist/{AccountFields-DeZSQOuM.mjs → AccountFields-CxqONzjY.mjs} +7 -7
- package/dist/AccountListItem-LcJVJysf.mjs +90 -0
- package/dist/{AccountStore-Brc0MNSF.mjs → AccountStore-BNlTuxWN.mjs} +12 -6
- package/dist/Accounts-o7ohkngR.mjs +27 -0
- 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/{NetWorthStore-DP78lgZ0.mjs → NetWorthStore-BqZ44-4M.mjs} +1 -1
- 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/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
- package/dist/accounts/index.es.js +107 -107
- package/dist/accounts/utils/Accounts.d.ts +1 -1
- 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/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/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 +15 -15
- package/package.json +1 -1
- package/dist/AccountListItem-BIVhda6q.mjs +0 -90
- package/dist/Accounts-M-LTzStv.mjs +0 -27
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e, Fragment as
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as ae } from "react/jsx-runtime";
|
|
2
2
|
import A, { useState as O } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as $ } from "mobx-react-lite";
|
|
4
4
|
import _ from "@mui/material/Stack";
|
|
5
5
|
import Fe from "@mui/material/Tab";
|
|
6
6
|
import Ee from "@mui/material/Tabs";
|
|
7
|
-
import { C as pe } from "../ConnectionsDrawer-
|
|
7
|
+
import { C as pe } from "../ConnectionsDrawer-IA7vnv1J.mjs";
|
|
8
8
|
import xe from "@mui/material/useMediaQuery";
|
|
9
9
|
import Ne from "@mui/material/Box";
|
|
10
10
|
import Me from "@mui/material/Collapse";
|
|
11
|
-
import
|
|
11
|
+
import Y from "@mui/material/Divider";
|
|
12
12
|
import te from "@mui/material/List";
|
|
13
13
|
import ne from "@mui/material/ListItem";
|
|
14
14
|
import Ge from "@mui/material/ListItemButton";
|
|
15
15
|
import ye from "@mui/material/ToggleButton";
|
|
16
16
|
import fe from "@mui/material/ToggleButtonGroup";
|
|
17
|
-
import { Text as r, P as
|
|
18
|
-
import
|
|
19
|
-
import { u as M, g as
|
|
17
|
+
import { Text as r, P as X, InstitutionLogo as oe } from "@mxenabled/mxui";
|
|
18
|
+
import Ue from "@mui/material/Button";
|
|
19
|
+
import { u as M, g as be, s as U, b as J, d as le } from "../hooks-BxkfR-Ff.mjs";
|
|
20
20
|
import { A as z } from "../Analytics-BYItVAe-.mjs";
|
|
21
|
-
import { a as
|
|
22
|
-
import { u as
|
|
21
|
+
import { a as je, f as ie } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
22
|
+
import { u as j } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
23
|
import ce from "@mui/material/styles/useTheme";
|
|
24
|
-
import { Icon as
|
|
25
|
-
import { D as
|
|
24
|
+
import { Icon as B } from "@mxenabled/mx-icons";
|
|
25
|
+
import { D as He } from "../Donut-CpxJlVvJ.mjs";
|
|
26
26
|
import { useTheme as ze } from "@mui/material/styles";
|
|
27
27
|
import { f as Oe, A as V } from "../InvestmentUtil-BItV7uEs.mjs";
|
|
28
28
|
import Ve from "@mui/material/ListItemText";
|
|
29
29
|
import de from "@mui/material/IconButton";
|
|
30
30
|
import Re from "@mui/material/Tooltip";
|
|
31
|
-
import
|
|
31
|
+
import ve from "@mui/material/Accordion";
|
|
32
32
|
import _e from "@mui/material/AccordionDetails";
|
|
33
33
|
import we from "@mui/material/AccordionSummary";
|
|
34
34
|
import re from "@mui/material/Paper";
|
|
35
35
|
import y from "@mui/system/Stack";
|
|
36
36
|
import Ce from "@mui/material/TextField";
|
|
37
|
-
import { D as
|
|
38
|
-
import { DataGridPro as
|
|
39
|
-
import { Stack as
|
|
40
|
-
import { L as
|
|
41
|
-
import { u as
|
|
42
|
-
import { W as
|
|
43
|
-
import { A as
|
|
44
|
-
import { E as
|
|
37
|
+
import { D as $e } from "../Drawer-Bbe4AMB1.mjs";
|
|
38
|
+
import { DataGridPro as Pe } from "@mui/x-data-grid-pro";
|
|
39
|
+
import { Stack as qe } from "@mui/material";
|
|
40
|
+
import { L as De } from "../Loader-D3rjKx72.mjs";
|
|
41
|
+
import { u as Ke } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
42
|
+
import { W as Ye } from "../WidgetContainer-D_iaToWJ.mjs";
|
|
43
|
+
import { A as Qe } from "../Account-BiB1F8lL.mjs";
|
|
44
|
+
import { E as Je } from "../EmptyState-DHAkGsjk.mjs";
|
|
45
45
|
const me = ({ sx: t = {} }) => {
|
|
46
|
-
const { investments: h } = M(), { onEvent: c } =
|
|
46
|
+
const { investments: h } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: m } = U();
|
|
47
47
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
|
|
48
48
|
/* @__PURE__ */ o(
|
|
49
49
|
_,
|
|
@@ -56,7 +56,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
56
56
|
textAlign: "center"
|
|
57
57
|
},
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "
|
|
59
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "body1", children: h.overview.investment_accounts_footer }),
|
|
60
60
|
/* @__PURE__ */ e(
|
|
61
61
|
r,
|
|
62
62
|
{
|
|
@@ -65,7 +65,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
65
65
|
whiteSpace: "normal",
|
|
66
66
|
fontWeight: 400
|
|
67
67
|
},
|
|
68
|
-
variant: "
|
|
68
|
+
variant: "subtitle2",
|
|
69
69
|
children: h.overview.connect_more_accounts_description
|
|
70
70
|
}
|
|
71
71
|
)
|
|
@@ -73,7 +73,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
75
|
/* @__PURE__ */ e(
|
|
76
|
-
|
|
76
|
+
Ue,
|
|
77
77
|
{
|
|
78
78
|
onClick: () => {
|
|
79
79
|
m(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
@@ -84,7 +84,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
] });
|
|
87
|
-
},
|
|
87
|
+
}, Xe = {
|
|
88
88
|
allocations_cash: "#AEDCCC",
|
|
89
89
|
allocations_convertible: "#80CAD0",
|
|
90
90
|
allocations_foreign_bond: "#51B9D4",
|
|
@@ -123,118 +123,118 @@ const me = ({ sx: t = {} }) => {
|
|
|
123
123
|
name: "allocations_unknown"
|
|
124
124
|
}
|
|
125
125
|
], et = (t, h, c) => {
|
|
126
|
-
const m = h,
|
|
127
|
-
return t >= Math.min(m,
|
|
126
|
+
const m = h, b = c;
|
|
127
|
+
return t >= Math.min(m, b) && t < Math.max(m, b);
|
|
128
128
|
}, tt = (t, h, c) => {
|
|
129
129
|
const m = [
|
|
130
130
|
...new Set(t.map((d) => d.name.toLowerCase()))
|
|
131
131
|
];
|
|
132
|
-
let
|
|
132
|
+
let b;
|
|
133
133
|
return m.map((d) => {
|
|
134
|
-
const
|
|
134
|
+
const a = t.reduce((g, f) => {
|
|
135
135
|
const p = f.name;
|
|
136
|
-
return p.toLowerCase() === d ? (
|
|
136
|
+
return p.toLowerCase() === d ? (b = p, Q(f) * f[h] / 100 + g) : g;
|
|
137
137
|
}, 0);
|
|
138
138
|
return {
|
|
139
|
-
displayName:
|
|
140
|
-
name:
|
|
141
|
-
value:
|
|
142
|
-
percentage:
|
|
139
|
+
displayName: b,
|
|
140
|
+
name: b,
|
|
141
|
+
value: a,
|
|
142
|
+
percentage: a / c
|
|
143
143
|
};
|
|
144
144
|
});
|
|
145
|
-
},
|
|
146
|
-
const m = Object.values(h.allocations_list),
|
|
147
|
-
let
|
|
148
|
-
const d = t.map(({ guid: n }) => n),
|
|
145
|
+
}, Q = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, h, c) => {
|
|
146
|
+
const m = Object.values(h.allocations_list), b = [];
|
|
147
|
+
let v = 0;
|
|
148
|
+
const d = t.map(({ guid: n }) => n), a = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
|
|
149
149
|
...n,
|
|
150
150
|
name: n.symbol || n.description,
|
|
151
|
-
gainLoss: n.cost_basis || n.cost_basis === 0 ?
|
|
151
|
+
gainLoss: n.cost_basis || n.cost_basis === 0 ? Q(n) - n.cost_basis : 0
|
|
152
152
|
})), { cashBalance: g, totalAccountBalance: f } = t.reduce(
|
|
153
153
|
(n, x) => ({
|
|
154
154
|
cashBalance: n.cashBalance + (x.cash_balance || 0),
|
|
155
155
|
totalAccountBalance: n.totalAccountBalance + (x.balance || 0)
|
|
156
156
|
}),
|
|
157
157
|
{ cashBalance: 0, totalAccountBalance: 0 }
|
|
158
|
-
), { marketValue: p, totalGainLoss: l } =
|
|
158
|
+
), { marketValue: p, totalGainLoss: l } = a.reduce(
|
|
159
159
|
(n, x) => ({
|
|
160
|
-
marketValue: n.marketValue +
|
|
160
|
+
marketValue: n.marketValue + Q(x),
|
|
161
161
|
totalGainLoss: n.totalGainLoss + x.gainLoss
|
|
162
162
|
}),
|
|
163
163
|
{ marketValue: 0, totalGainLoss: 0 }
|
|
164
164
|
), u = p + g;
|
|
165
165
|
Ze.forEach((n, x) => {
|
|
166
|
-
const w =
|
|
166
|
+
const w = a.filter(
|
|
167
167
|
(I) => !!I[n.name]
|
|
168
168
|
);
|
|
169
|
-
let
|
|
170
|
-
(I, W) => I +
|
|
169
|
+
let D = w.reduce(
|
|
170
|
+
(I, W) => I + Q(W) * W[n.name] / 100,
|
|
171
171
|
0
|
|
172
172
|
);
|
|
173
|
-
const
|
|
173
|
+
const T = tt(
|
|
174
174
|
w,
|
|
175
175
|
n.name,
|
|
176
|
-
|
|
176
|
+
D
|
|
177
177
|
);
|
|
178
178
|
if (n.name === "allocations_cash" && g > 0) {
|
|
179
|
-
|
|
179
|
+
D += g;
|
|
180
180
|
const I = {
|
|
181
181
|
displayName: h.cash_balance_display_name,
|
|
182
182
|
name: "allocations_name",
|
|
183
183
|
value: g,
|
|
184
184
|
percentage: g / u
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
T.push(I);
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
D > 0 && (b.push({
|
|
189
189
|
name: n.name,
|
|
190
190
|
displayName: m[x],
|
|
191
191
|
guid: `${n.name}-${x}`,
|
|
192
|
-
holdings:
|
|
193
|
-
percentage:
|
|
194
|
-
value:
|
|
195
|
-
color:
|
|
196
|
-
}),
|
|
192
|
+
holdings: T,
|
|
193
|
+
percentage: D / u,
|
|
194
|
+
value: D,
|
|
195
|
+
color: Xe[n.name]
|
|
196
|
+
}), v += D);
|
|
197
197
|
});
|
|
198
|
-
const i =
|
|
199
|
-
({ displayName: n, guid: x, color: w, value:
|
|
198
|
+
const i = b.map(
|
|
199
|
+
({ displayName: n, guid: x, color: w, value: D }) => ({
|
|
200
200
|
id: x,
|
|
201
201
|
color: w,
|
|
202
202
|
label: n,
|
|
203
|
-
value:
|
|
203
|
+
value: D / v * 100
|
|
204
204
|
})
|
|
205
205
|
);
|
|
206
206
|
return {
|
|
207
|
-
investmentsData:
|
|
207
|
+
investmentsData: b,
|
|
208
208
|
donutData: i,
|
|
209
|
-
totalAmount:
|
|
209
|
+
totalAmount: v,
|
|
210
210
|
totalGainLoss: l,
|
|
211
211
|
totalMarketValue: u,
|
|
212
212
|
totalGainLossPercentage: l / f
|
|
213
213
|
};
|
|
214
|
-
},
|
|
214
|
+
}, se = (t) => t < 1e-3 ? "< 0.1%" : je(t), R = (t) => t === 0 ? ie(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : ie(t, "0,0.00"), ot = ({
|
|
215
215
|
data: t,
|
|
216
216
|
onSelected: h,
|
|
217
217
|
selectedId: c,
|
|
218
218
|
selectedTabs: m,
|
|
219
|
-
setSelectedTabs:
|
|
219
|
+
setSelectedTabs: b
|
|
220
220
|
}) => {
|
|
221
|
-
const
|
|
222
|
-
u !== null &&
|
|
223
|
-
}, { isMobile: d } =
|
|
224
|
-
investments: { allocation:
|
|
221
|
+
const v = (l, u) => {
|
|
222
|
+
u !== null && b(u);
|
|
223
|
+
}, { isMobile: d } = j(), {
|
|
224
|
+
investments: { allocation: a }
|
|
225
225
|
} = M(), g = [
|
|
226
|
-
{ label:
|
|
227
|
-
{ label:
|
|
228
|
-
], f = !t?.investmentsData.length, { isSmallMobile: p } =
|
|
226
|
+
{ label: a.tabs_label_dollar, value: 0 },
|
|
227
|
+
{ label: a.tabs_label_percent, value: 1 }
|
|
228
|
+
], f = !t?.investmentsData.length, { isSmallMobile: p } = j();
|
|
229
229
|
return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
|
|
230
230
|
/* @__PURE__ */ e(
|
|
231
231
|
fe,
|
|
232
232
|
{
|
|
233
233
|
exclusive: !0,
|
|
234
234
|
fullWidth: !0,
|
|
235
|
-
onChange:
|
|
235
|
+
onChange: v,
|
|
236
236
|
value: f ? -1 : m,
|
|
237
|
-
children: g.map(({ label: l, value: u }) => /* @__PURE__ */ e(ye, { color: "primary", value: u, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "
|
|
237
|
+
children: g.map(({ label: l, value: u }) => /* @__PURE__ */ e(ye, { color: "primary", value: u, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "body1", children: l }) }, l))
|
|
238
238
|
}
|
|
239
239
|
),
|
|
240
240
|
/* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
|
|
@@ -272,7 +272,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
272
272
|
width: "100%",
|
|
273
273
|
children: [
|
|
274
274
|
/* @__PURE__ */ e(r, { bold: c === l.guid, children: l.displayName }),
|
|
275
|
-
/* @__PURE__ */ e(r, { bold: c === l.guid, variant: "
|
|
275
|
+
/* @__PURE__ */ e(r, { bold: c === l.guid, variant: "body1", children: m === 0 ? R(l.value) : se(l.percentage) })
|
|
276
276
|
]
|
|
277
277
|
}
|
|
278
278
|
)
|
|
@@ -281,7 +281,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
281
281
|
)
|
|
282
282
|
}
|
|
283
283
|
),
|
|
284
|
-
/* @__PURE__ */ e(
|
|
284
|
+
/* @__PURE__ */ e(Y, {}),
|
|
285
285
|
l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(te, { children: [
|
|
286
286
|
l?.holdings?.map((u) => /* @__PURE__ */ e(
|
|
287
287
|
ne,
|
|
@@ -296,17 +296,17 @@ const me = ({ sx: t = {} }) => {
|
|
|
296
296
|
u.displayName,
|
|
297
297
|
" "
|
|
298
298
|
] }),
|
|
299
|
-
/* @__PURE__ */ e(r, { children: m === 0 ? R(u.value) :
|
|
299
|
+
/* @__PURE__ */ e(r, { children: m === 0 ? R(u.value) : se(u.percentage) })
|
|
300
300
|
] })
|
|
301
301
|
},
|
|
302
302
|
u.displayName
|
|
303
303
|
)),
|
|
304
|
-
/* @__PURE__ */ e(
|
|
304
|
+
/* @__PURE__ */ e(Y, {})
|
|
305
305
|
] }) })
|
|
306
306
|
] }, l.guid)) }),
|
|
307
|
-
f ? /* @__PURE__ */ o(
|
|
308
|
-
/* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children:
|
|
309
|
-
/* @__PURE__ */ e(
|
|
307
|
+
f ? /* @__PURE__ */ o(ae, { children: [
|
|
308
|
+
/* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: a.empty_data }),
|
|
309
|
+
/* @__PURE__ */ e(Y, { sx: { borderColor: "border.light" } }),
|
|
310
310
|
/* @__PURE__ */ e(
|
|
311
311
|
me,
|
|
312
312
|
{
|
|
@@ -315,55 +315,55 @@ const me = ({ sx: t = {} }) => {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
)
|
|
318
|
-
] }) : m === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${
|
|
318
|
+
] }) : m === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${a.total_label_text} ${R(t.totalAmount)}` })
|
|
319
319
|
] });
|
|
320
320
|
}, it = ({
|
|
321
321
|
data: t,
|
|
322
322
|
hoveredId: h,
|
|
323
323
|
isPercentage: c,
|
|
324
324
|
onMouseEnter: m,
|
|
325
|
-
onMouseLeave:
|
|
326
|
-
onSelected:
|
|
325
|
+
onMouseLeave: b,
|
|
326
|
+
onSelected: v,
|
|
327
327
|
selectedId: d,
|
|
328
|
-
size:
|
|
328
|
+
size: a = 150,
|
|
329
329
|
totalLabel: g
|
|
330
330
|
}) => {
|
|
331
331
|
const f = ce(), p = f.palette.mode === "dark", l = A.useMemo(
|
|
332
|
-
() => d ? t.investmentsData.find(({ guid:
|
|
332
|
+
() => d ? t.investmentsData.find(({ guid: T }) => T === d) : void 0,
|
|
333
333
|
[d]
|
|
334
334
|
), {
|
|
335
335
|
investments: { allocation: u }
|
|
336
|
-
} = M(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: f.palette.border.light, value: 100 }], [t, f]), n = p ? "#0AC295" : "#09A57F", x = p ? "grey.300" : "grey.700", w = () => l ? u.pie_chart_centered_click_for_details : c ?
|
|
336
|
+
} = M(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: f.palette.border.light, value: 100 }], [t, f]), n = p ? "#0AC295" : "#09A57F", x = p ? "grey.300" : "grey.700", w = () => l ? u.pie_chart_centered_click_for_details : c ? se(t.totalGainLossPercentage) : R(t.totalGainLoss), D = t.totalGainLoss >= 0 ? n : x;
|
|
337
337
|
return /* @__PURE__ */ e(
|
|
338
|
-
|
|
338
|
+
He,
|
|
339
339
|
{
|
|
340
340
|
data: i,
|
|
341
341
|
hoveredId: h,
|
|
342
|
-
onClick:
|
|
342
|
+
onClick: v,
|
|
343
343
|
onMouseEnter: m,
|
|
344
|
-
onMouseLeave:
|
|
344
|
+
onMouseLeave: b,
|
|
345
345
|
selectedId: d,
|
|
346
|
-
size:
|
|
347
|
-
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight:
|
|
346
|
+
size: a,
|
|
347
|
+
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
|
|
348
348
|
/* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? g }),
|
|
349
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(X, { color: "text.primary", variant: "h1", children: R(l?.value ?? t.totalMarketValue) }),
|
|
350
350
|
/* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
351
351
|
!l && /* @__PURE__ */ e(
|
|
352
|
-
|
|
352
|
+
B,
|
|
353
353
|
{
|
|
354
354
|
name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
355
355
|
size: 20,
|
|
356
|
-
sx: { color:
|
|
356
|
+
sx: { color: D }
|
|
357
357
|
}
|
|
358
358
|
),
|
|
359
359
|
/* @__PURE__ */ e(
|
|
360
360
|
r,
|
|
361
361
|
{
|
|
362
362
|
sx: {
|
|
363
|
-
color:
|
|
363
|
+
color: D,
|
|
364
364
|
fontWeight: 700
|
|
365
365
|
},
|
|
366
|
-
variant: "
|
|
366
|
+
variant: "body2",
|
|
367
367
|
children: w()
|
|
368
368
|
}
|
|
369
369
|
)
|
|
@@ -372,15 +372,15 @@ const me = ({ sx: t = {} }) => {
|
|
|
372
372
|
}
|
|
373
373
|
);
|
|
374
374
|
}, rt = () => {
|
|
375
|
-
const [t, h] = A.useState(0), [c, m] = A.useState(""), [
|
|
376
|
-
c !== n ? m(n) : (m(""),
|
|
377
|
-
}, { selectedAccountGuids:
|
|
375
|
+
const [t, h] = A.useState(0), [c, m] = A.useState(""), [b, v] = A.useState(""), d = (n) => {
|
|
376
|
+
c !== n ? m(n) : (m(""), v(""));
|
|
377
|
+
}, { selectedAccountGuids: a } = J(), { visibleHoldings: g } = U(), { visibleInvestmentAccounts: f } = le(), {
|
|
378
378
|
investments: { allocation: p }
|
|
379
379
|
} = M(), l = nt(
|
|
380
|
-
f.filter(({ guid: n }) =>
|
|
380
|
+
f.filter(({ guid: n }) => a.includes(n)),
|
|
381
381
|
p,
|
|
382
382
|
g
|
|
383
|
-
), { isMobile: u } =
|
|
383
|
+
), { isMobile: u } = j(), i = xe("(max-width:768px)");
|
|
384
384
|
return /* @__PURE__ */ o(
|
|
385
385
|
_,
|
|
386
386
|
{
|
|
@@ -397,13 +397,13 @@ const me = ({ sx: t = {} }) => {
|
|
|
397
397
|
it,
|
|
398
398
|
{
|
|
399
399
|
data: l,
|
|
400
|
-
hoveredId:
|
|
400
|
+
hoveredId: b,
|
|
401
401
|
isPercentage: t === 1,
|
|
402
402
|
onMouseEnter: (n) => {
|
|
403
|
-
c === n ?
|
|
403
|
+
c === n ? v("") : c || v(n);
|
|
404
404
|
},
|
|
405
405
|
onMouseLeave: () => {
|
|
406
|
-
|
|
406
|
+
v("");
|
|
407
407
|
},
|
|
408
408
|
onSelected: d,
|
|
409
409
|
selectedId: c,
|
|
@@ -424,16 +424,16 @@ const me = ({ sx: t = {} }) => {
|
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
426
|
);
|
|
427
|
-
},
|
|
427
|
+
}, st = $(rt), at = ({
|
|
428
428
|
analysisDetails: t,
|
|
429
429
|
analysisType: h,
|
|
430
430
|
copy: c,
|
|
431
431
|
setAnalysisType: m
|
|
432
432
|
}) => {
|
|
433
|
-
const { isSmallMobile:
|
|
434
|
-
key:
|
|
435
|
-
value: ie(t[
|
|
436
|
-
formattedKey: Oe(
|
|
433
|
+
const { isSmallMobile: b } = j(), v = A.useMemo(() => Object.keys(t).filter((a) => t[a] >= 1).map((a) => ({
|
|
434
|
+
key: a,
|
|
435
|
+
value: ie(t[a], "0,0"),
|
|
436
|
+
formattedKey: Oe(a)
|
|
437
437
|
})), [t]), d = [
|
|
438
438
|
{ label: c.equities, value: V.Stocks },
|
|
439
439
|
{ label: c.bonds, value: V.Bonds }
|
|
@@ -444,7 +444,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
444
444
|
{
|
|
445
445
|
color: "primary",
|
|
446
446
|
exclusive: !0,
|
|
447
|
-
onChange: (
|
|
447
|
+
onChange: (a, g) => g && m(g),
|
|
448
448
|
sx: {
|
|
449
449
|
width: "100%",
|
|
450
450
|
"& .MuiToggleButton-root": {
|
|
@@ -453,11 +453,11 @@ const me = ({ sx: t = {} }) => {
|
|
|
453
453
|
textTransform: "capitalize"
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
|
-
value:
|
|
457
|
-
children: d.map(({ label:
|
|
456
|
+
value: v.length ? h : -1,
|
|
457
|
+
children: d.map(({ label: a, value: g }) => /* @__PURE__ */ e(ye, { sx: { width: "100%" }, value: g, children: a }, g))
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
|
-
|
|
460
|
+
v.length ? /* @__PURE__ */ e(
|
|
461
461
|
te,
|
|
462
462
|
{
|
|
463
463
|
sx: {
|
|
@@ -465,7 +465,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
465
465
|
"& .MuiListItem-divider": { borderColor: "border.light" },
|
|
466
466
|
"& .MuiListItem-root": { minHeight: 44, px: 12 }
|
|
467
467
|
},
|
|
468
|
-
children:
|
|
468
|
+
children: v.map(({ value: a, formattedKey: g }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: a }), children: /* @__PURE__ */ e(
|
|
469
469
|
Ve,
|
|
470
470
|
{
|
|
471
471
|
primary: g,
|
|
@@ -473,22 +473,22 @@ const me = ({ sx: t = {} }) => {
|
|
|
473
473
|
}
|
|
474
474
|
) }, g))
|
|
475
475
|
}
|
|
476
|
-
) : /* @__PURE__ */ o(
|
|
476
|
+
) : /* @__PURE__ */ o(ae, { children: [
|
|
477
477
|
/* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
|
|
478
|
-
/* @__PURE__ */ e(
|
|
478
|
+
/* @__PURE__ */ e(Y, { sx: { borderColor: "border.light" } }),
|
|
479
479
|
/* @__PURE__ */ e(
|
|
480
480
|
me,
|
|
481
481
|
{
|
|
482
482
|
sx: {
|
|
483
|
-
".inner-container": { width:
|
|
483
|
+
".inner-container": { width: b ? "100%" : 364 }
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
)
|
|
487
487
|
] })
|
|
488
488
|
] });
|
|
489
489
|
}, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
|
|
490
|
-
/* @__PURE__ */ e(r, { bold: !0, variant: "
|
|
491
|
-
/* @__PURE__ */ e(
|
|
490
|
+
/* @__PURE__ */ e(r, { bold: !0, variant: "body1", children: h }),
|
|
491
|
+
/* @__PURE__ */ e(X, { variant: "subtitle2", children: t })
|
|
492
492
|
] }), ct = ({
|
|
493
493
|
placement: t = "bottom",
|
|
494
494
|
tooltip_info_body: h,
|
|
@@ -499,14 +499,14 @@ const me = ({ sx: t = {} }) => {
|
|
|
499
499
|
enterTouchDelay: 500,
|
|
500
500
|
placement: t,
|
|
501
501
|
title: /* @__PURE__ */ e(lt, { body: h, title: c }),
|
|
502
|
-
children: /* @__PURE__ */ e(de, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(
|
|
502
|
+
children: /* @__PURE__ */ e(de, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(B, { name: "info", sx: { color: "info.main" } }) })
|
|
503
503
|
}
|
|
504
504
|
), dt = () => {
|
|
505
505
|
const {
|
|
506
506
|
investments: { analysis: t }
|
|
507
|
-
} = M(), { analysisChartData: h, analysisDetails: c, analysisType: m, setAnalysisType:
|
|
507
|
+
} = M(), { analysisChartData: h, analysisDetails: c, analysisType: m, setAnalysisType: b } = U(), v = xe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = j(), g = ze().palette.mode === "dark", { cellDimension: f, columns: p, rows: l, textVariant: u } = A.useMemo(() => {
|
|
508
508
|
const i = m === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), x = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
|
|
509
|
-
return { cellDimension: d ? 72 : 100, columns: n, rows: x, textVariant: d ? "
|
|
509
|
+
return { cellDimension: d ? 72 : 100, columns: n, rows: x, textVariant: d ? "caption" : "body1" };
|
|
510
510
|
}, [t, d, m]);
|
|
511
511
|
return /* @__PURE__ */ o(
|
|
512
512
|
_,
|
|
@@ -541,7 +541,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
541
541
|
writingMode: "vertical-rl"
|
|
542
542
|
},
|
|
543
543
|
children: [
|
|
544
|
-
/* @__PURE__ */ e(
|
|
544
|
+
/* @__PURE__ */ e(X, { bold: !0, color: "secondary.main", variant: u, children: m === V.Stocks ? t.market_capitalization : t.credit_quality }),
|
|
545
545
|
/* @__PURE__ */ e(
|
|
546
546
|
_,
|
|
547
547
|
{
|
|
@@ -573,7 +573,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
573
573
|
_,
|
|
574
574
|
{
|
|
575
575
|
sx: {
|
|
576
|
-
alignSelf:
|
|
576
|
+
alignSelf: v ? "start" : "center",
|
|
577
577
|
flexDirection: "row",
|
|
578
578
|
gap: 8,
|
|
579
579
|
pb: 12
|
|
@@ -590,21 +590,21 @@ const me = ({ sx: t = {} }) => {
|
|
|
590
590
|
]
|
|
591
591
|
}
|
|
592
592
|
),
|
|
593
|
-
h.map((i, n, x) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((w,
|
|
594
|
-
const
|
|
595
|
-
let
|
|
596
|
-
return g ? (
|
|
593
|
+
h.map((i, n, x) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((w, D) => {
|
|
594
|
+
const T = n === 0, I = n === x.length - 1, W = D === 0, N = D === i.length - 1, F = Number(w.replace("%", "")) >= 25;
|
|
595
|
+
let k = "grey.200", H = "grey.900";
|
|
596
|
+
return g ? (k = F ? "grey.200" : "grey.700", H = F ? "grey.900" : "common.white") : (k = F ? "grey.700" : "grey.200", H = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
|
|
597
597
|
_,
|
|
598
598
|
{
|
|
599
599
|
sx: {
|
|
600
600
|
...{
|
|
601
601
|
borderBottomLeftRadius: I && W ? 4 : 0,
|
|
602
602
|
borderBottomRightRadius: I && N ? 4 : 0,
|
|
603
|
-
borderTopLeftRadius:
|
|
604
|
-
borderTopRightRadius:
|
|
603
|
+
borderTopLeftRadius: T && W ? 4 : 0,
|
|
604
|
+
borderTopRightRadius: T && N ? 4 : 0
|
|
605
605
|
},
|
|
606
606
|
alignItems: "center",
|
|
607
|
-
bgcolor:
|
|
607
|
+
bgcolor: k,
|
|
608
608
|
height: f,
|
|
609
609
|
justifyContent: "center",
|
|
610
610
|
width: f
|
|
@@ -613,15 +613,15 @@ const me = ({ sx: t = {} }) => {
|
|
|
613
613
|
r,
|
|
614
614
|
{
|
|
615
615
|
sx: {
|
|
616
|
-
color:
|
|
616
|
+
color: H,
|
|
617
617
|
fontWeight: d ? 600 : 700
|
|
618
618
|
},
|
|
619
|
-
variant: d ? "
|
|
619
|
+
variant: d ? "body1" : "h3",
|
|
620
620
|
children: w
|
|
621
621
|
}
|
|
622
622
|
)
|
|
623
623
|
},
|
|
624
|
-
|
|
624
|
+
D
|
|
625
625
|
);
|
|
626
626
|
}) }, n)),
|
|
627
627
|
/* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: f }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: u, children: i }) }, i)) }),
|
|
@@ -639,7 +639,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
641
|
/* @__PURE__ */ e(
|
|
642
|
-
|
|
642
|
+
at,
|
|
643
643
|
{
|
|
644
644
|
analysisDetails: c,
|
|
645
645
|
analysisType: m,
|
|
@@ -648,21 +648,21 @@ const me = ({ sx: t = {} }) => {
|
|
|
648
648
|
equities: t.equities,
|
|
649
649
|
bonds: t.bonds
|
|
650
650
|
},
|
|
651
|
-
setAnalysisType:
|
|
651
|
+
setAnalysisType: b
|
|
652
652
|
}
|
|
653
653
|
)
|
|
654
654
|
]
|
|
655
655
|
}
|
|
656
656
|
);
|
|
657
|
-
}, mt =
|
|
657
|
+
}, mt = $(dt), ut = ({
|
|
658
658
|
accountHoldingsData: t,
|
|
659
659
|
currentEditedCostBasis: h,
|
|
660
660
|
editingHoldingId: c,
|
|
661
661
|
handleCostBasisBlur: m,
|
|
662
|
-
handleCostBasisClick:
|
|
663
|
-
handleCostBasisChange:
|
|
662
|
+
handleCostBasisClick: b,
|
|
663
|
+
handleCostBasisChange: v,
|
|
664
664
|
handleCostBasisKeyDown: d,
|
|
665
|
-
isOpen:
|
|
665
|
+
isOpen: a,
|
|
666
666
|
onClose: g
|
|
667
667
|
}) => {
|
|
668
668
|
const { investments: f } = M(), [p, l] = A.useState({}), u = (i) => (n, x) => {
|
|
@@ -672,10 +672,10 @@ const me = ({ sx: t = {} }) => {
|
|
|
672
672
|
}));
|
|
673
673
|
};
|
|
674
674
|
return /* @__PURE__ */ o(
|
|
675
|
-
|
|
675
|
+
$e,
|
|
676
676
|
{
|
|
677
677
|
ariaLabelClose: f.overview.close_investment_drawer,
|
|
678
|
-
isOpen:
|
|
678
|
+
isOpen: a,
|
|
679
679
|
onClose: g,
|
|
680
680
|
title: f.overview.investment_details,
|
|
681
681
|
children: [
|
|
@@ -688,11 +688,11 @@ const me = ({ sx: t = {} }) => {
|
|
|
688
688
|
size: 64
|
|
689
689
|
}
|
|
690
690
|
),
|
|
691
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "
|
|
692
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "
|
|
691
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "body2", children: t.accounts.memberName }),
|
|
692
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "h2", children: t.accounts.user_name || t.accounts.name }),
|
|
693
693
|
/* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
694
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
695
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
694
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: f.overview.current_balance }),
|
|
695
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: t.accounts.balance?.toLocaleString("en-US", {
|
|
696
696
|
currency: "USD",
|
|
697
697
|
maximumFractionDigits: 2,
|
|
698
698
|
minimumFractionDigits: 2,
|
|
@@ -711,15 +711,15 @@ const me = ({ sx: t = {} }) => {
|
|
|
711
711
|
py: 10
|
|
712
712
|
},
|
|
713
713
|
children: [
|
|
714
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "
|
|
715
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "
|
|
714
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "caption", children: f.overview.holding }),
|
|
715
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "caption", children: f.overview.market_value })
|
|
716
716
|
]
|
|
717
717
|
}
|
|
718
718
|
),
|
|
719
719
|
t.holdings?.map((i, n) => {
|
|
720
720
|
const x = c === i.id;
|
|
721
721
|
return /* @__PURE__ */ o(
|
|
722
|
-
|
|
722
|
+
ve,
|
|
723
723
|
{
|
|
724
724
|
disableGutters: !0,
|
|
725
725
|
expanded: p[i.id] === !0,
|
|
@@ -771,8 +771,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
771
771
|
gap: 12
|
|
772
772
|
},
|
|
773
773
|
children: /* @__PURE__ */ o(y, { sx: { overflow: "hidden", width: 98 }, children: [
|
|
774
|
-
/* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "
|
|
775
|
-
/* @__PURE__ */ e(r, { variant: "
|
|
774
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "body1", children: i.holding }),
|
|
775
|
+
/* @__PURE__ */ e(r, { variant: "caption", children: i.description })
|
|
776
776
|
] })
|
|
777
777
|
}
|
|
778
778
|
),
|
|
@@ -788,7 +788,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
788
788
|
},
|
|
789
789
|
children: [
|
|
790
790
|
/* @__PURE__ */ o(y, { children: [
|
|
791
|
-
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "
|
|
791
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: i.marketValue?.toLocaleString("en-US", {
|
|
792
792
|
currency: "USD",
|
|
793
793
|
maximumFractionDigits: 2,
|
|
794
794
|
minimumFractionDigits: 2,
|
|
@@ -796,7 +796,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
796
796
|
}) }),
|
|
797
797
|
/* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
|
|
798
798
|
i.totalGainLoss !== 0 && /* @__PURE__ */ e(
|
|
799
|
-
|
|
799
|
+
B,
|
|
800
800
|
{
|
|
801
801
|
name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
802
802
|
size: 12,
|
|
@@ -814,11 +814,11 @@ const me = ({ sx: t = {} }) => {
|
|
|
814
814
|
color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
815
815
|
fontWeight: i.totalGainLoss <= 0 ? 400 : 700
|
|
816
816
|
},
|
|
817
|
-
variant: "
|
|
817
|
+
variant: "caption",
|
|
818
818
|
children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
|
|
819
819
|
}
|
|
820
820
|
),
|
|
821
|
-
/* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "
|
|
821
|
+
/* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "caption", children: "|" }),
|
|
822
822
|
/* @__PURE__ */ e(
|
|
823
823
|
r,
|
|
824
824
|
{
|
|
@@ -826,7 +826,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
826
826
|
color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
827
827
|
fontWeight: i.totalGainLoss <= 0 ? 400 : 700
|
|
828
828
|
},
|
|
829
|
-
variant: "
|
|
829
|
+
variant: "caption",
|
|
830
830
|
children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
|
|
831
831
|
currency: "USD",
|
|
832
832
|
maximumFractionDigits: 2,
|
|
@@ -838,7 +838,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
838
838
|
] })
|
|
839
839
|
] }),
|
|
840
840
|
/* @__PURE__ */ e(
|
|
841
|
-
|
|
841
|
+
B,
|
|
842
842
|
{
|
|
843
843
|
name: p[i.id] ? "expand_less" : "expand_more",
|
|
844
844
|
size: 20
|
|
@@ -878,8 +878,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
878
878
|
pr: 24
|
|
879
879
|
},
|
|
880
880
|
children: [
|
|
881
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "
|
|
882
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "
|
|
881
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "body1", children: f.overview.quantity }),
|
|
882
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "body2", children: i.qty })
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
),
|
|
@@ -894,7 +894,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
894
894
|
pr: 24
|
|
895
895
|
},
|
|
896
896
|
children: [
|
|
897
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "
|
|
897
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "body1", children: f.overview.cost_basis_header }),
|
|
898
898
|
/* @__PURE__ */ o(
|
|
899
899
|
y,
|
|
900
900
|
{
|
|
@@ -909,7 +909,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
909
909
|
{
|
|
910
910
|
autoFocus: !0,
|
|
911
911
|
onBlur: () => m(i.id),
|
|
912
|
-
onChange:
|
|
912
|
+
onChange: v,
|
|
913
913
|
onKeyDown: (w) => d(w, i.id),
|
|
914
914
|
size: "small",
|
|
915
915
|
sx: {
|
|
@@ -927,7 +927,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
927
927
|
},
|
|
928
928
|
value: h
|
|
929
929
|
}
|
|
930
|
-
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "
|
|
930
|
+
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "body2", children: i.costBasis?.toLocaleString("en-US", {
|
|
931
931
|
currency: "USD",
|
|
932
932
|
maximumFractionDigits: 2,
|
|
933
933
|
minimumFractionDigits: 2,
|
|
@@ -936,9 +936,9 @@ const me = ({ sx: t = {} }) => {
|
|
|
936
936
|
/* @__PURE__ */ e(
|
|
937
937
|
de,
|
|
938
938
|
{
|
|
939
|
-
onClick: () =>
|
|
939
|
+
onClick: () => b(i.id, i.costBasis),
|
|
940
940
|
sx: { minWidth: 16, minHeight: 16 },
|
|
941
|
-
children: /* @__PURE__ */ e(
|
|
941
|
+
children: /* @__PURE__ */ e(B, { name: "stylus", size: 16, sx: { color: "grey.700" } })
|
|
942
942
|
}
|
|
943
943
|
)
|
|
944
944
|
]
|
|
@@ -959,22 +959,22 @@ const me = ({ sx: t = {} }) => {
|
|
|
959
959
|
]
|
|
960
960
|
}
|
|
961
961
|
);
|
|
962
|
-
}, ht =
|
|
963
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "
|
|
964
|
-
/* @__PURE__ */ e(
|
|
962
|
+
}, ht = $(ut), K = (t) => /* @__PURE__ */ o(qe, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
963
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "body2", children: t.colDef.headerName }),
|
|
964
|
+
/* @__PURE__ */ e(B, { name: "expand_all", size: 12 })
|
|
965
965
|
] }), gt = ({
|
|
966
966
|
data: t,
|
|
967
967
|
editingHoldingId: h,
|
|
968
968
|
currentEditedCostBasis: c,
|
|
969
969
|
handleCostBasisClick: m,
|
|
970
|
-
handleCostBasisChange:
|
|
971
|
-
handleCostBasisKeyDown:
|
|
970
|
+
handleCostBasisChange: b,
|
|
971
|
+
handleCostBasisKeyDown: v,
|
|
972
972
|
handleCostBasisBlur: d
|
|
973
973
|
}) => {
|
|
974
|
-
const { investments:
|
|
974
|
+
const { investments: a } = M(), f = ce().palette.mode === "dark", p = "success.main", l = f ? "grey.300" : "grey.700", u = (n, x = "lesserThan") => x === "greaterThan" ? n >= 0 ? p : l : n <= 0 ? l : p, i = [
|
|
975
975
|
{
|
|
976
976
|
field: "qty",
|
|
977
|
-
headerName:
|
|
977
|
+
headerName: a.overview.qty_header,
|
|
978
978
|
sortable: !1,
|
|
979
979
|
width: 48,
|
|
980
980
|
align: "center",
|
|
@@ -982,9 +982,9 @@ const me = ({ sx: t = {} }) => {
|
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
field: "holding",
|
|
985
|
-
headerName:
|
|
985
|
+
headerName: a.overview.holding_header,
|
|
986
986
|
flex: 1,
|
|
987
|
-
renderHeader:
|
|
987
|
+
renderHeader: K,
|
|
988
988
|
renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
|
|
989
989
|
/* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
|
|
990
990
|
/* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
|
|
@@ -992,9 +992,9 @@ const me = ({ sx: t = {} }) => {
|
|
|
992
992
|
},
|
|
993
993
|
{
|
|
994
994
|
field: "costBasis",
|
|
995
|
-
headerName:
|
|
995
|
+
headerName: a.overview.cost_basis_header,
|
|
996
996
|
width: 132,
|
|
997
|
-
renderHeader:
|
|
997
|
+
renderHeader: K,
|
|
998
998
|
renderCell: (n) => {
|
|
999
999
|
const x = h === n.row.id;
|
|
1000
1000
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
@@ -1003,8 +1003,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
1003
1003
|
{
|
|
1004
1004
|
autoFocus: !0,
|
|
1005
1005
|
onBlur: () => d(n.row.id),
|
|
1006
|
-
onChange:
|
|
1007
|
-
onKeyDown: (w) =>
|
|
1006
|
+
onChange: b,
|
|
1007
|
+
onKeyDown: (w) => v(w, n.row.id),
|
|
1008
1008
|
size: "small",
|
|
1009
1009
|
sx: {
|
|
1010
1010
|
fontSize: 14,
|
|
@@ -1021,7 +1021,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
value: c
|
|
1023
1023
|
}
|
|
1024
|
-
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "
|
|
1024
|
+
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "body2", children: n.value?.toLocaleString("en-US", {
|
|
1025
1025
|
currency: "USD",
|
|
1026
1026
|
maximumFractionDigits: 2,
|
|
1027
1027
|
minimumFractionDigits: 2,
|
|
@@ -1032,7 +1032,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1032
1032
|
{
|
|
1033
1033
|
onClick: () => m(n.row.id, n.row.costBasis),
|
|
1034
1034
|
sx: { minWidth: 12, minHeight: 12 },
|
|
1035
|
-
children: /* @__PURE__ */ e(
|
|
1035
|
+
children: /* @__PURE__ */ e(B, { name: "stylus", size: 12, sx: { color: "grey.700" } })
|
|
1036
1036
|
}
|
|
1037
1037
|
)
|
|
1038
1038
|
] });
|
|
@@ -1042,14 +1042,14 @@ const me = ({ sx: t = {} }) => {
|
|
|
1042
1042
|
},
|
|
1043
1043
|
{
|
|
1044
1044
|
field: "totalGainLoss",
|
|
1045
|
-
headerName:
|
|
1045
|
+
headerName: a.overview.total_gain_loss_header,
|
|
1046
1046
|
width: 196,
|
|
1047
|
-
renderHeader:
|
|
1047
|
+
renderHeader: K,
|
|
1048
1048
|
renderCell: (n) => {
|
|
1049
1049
|
const x = n.row.costBasis, w = x ? n.row.totalGainLoss / x * 100 : 0;
|
|
1050
1050
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
1051
1051
|
n.value !== 0 && /* @__PURE__ */ e(
|
|
1052
|
-
|
|
1052
|
+
B,
|
|
1053
1053
|
{
|
|
1054
1054
|
name: n.value > 0 ? "trending_up" : "trending_down",
|
|
1055
1055
|
size: 16,
|
|
@@ -1067,11 +1067,11 @@ const me = ({ sx: t = {} }) => {
|
|
|
1067
1067
|
color: u(n.value),
|
|
1068
1068
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1069
1069
|
},
|
|
1070
|
-
variant: "
|
|
1070
|
+
variant: "body2",
|
|
1071
1071
|
children: x ? `${w.toFixed(2)}%` : "0.00%"
|
|
1072
1072
|
}
|
|
1073
1073
|
),
|
|
1074
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1074
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1075
1075
|
/* @__PURE__ */ e(
|
|
1076
1076
|
r,
|
|
1077
1077
|
{
|
|
@@ -1079,7 +1079,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1079
1079
|
color: u(n.value),
|
|
1080
1080
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1081
1081
|
},
|
|
1082
|
-
variant: "
|
|
1082
|
+
variant: "body2",
|
|
1083
1083
|
children: Math.abs(n.value).toLocaleString("en-US", {
|
|
1084
1084
|
currency: "USD",
|
|
1085
1085
|
maximumFractionDigits: 2,
|
|
@@ -1096,10 +1096,10 @@ const me = ({ sx: t = {} }) => {
|
|
|
1096
1096
|
},
|
|
1097
1097
|
{
|
|
1098
1098
|
field: "marketValue",
|
|
1099
|
-
headerName:
|
|
1099
|
+
headerName: a.overview.market_value_header,
|
|
1100
1100
|
width: 132,
|
|
1101
|
-
renderHeader:
|
|
1102
|
-
renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "
|
|
1101
|
+
renderHeader: K,
|
|
1102
|
+
renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "body2", children: n.value?.toLocaleString("en-US", {
|
|
1103
1103
|
currency: "USD",
|
|
1104
1104
|
maximumFractionDigits: 2,
|
|
1105
1105
|
minimumFractionDigits: 2,
|
|
@@ -1117,7 +1117,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1117
1117
|
width: "100%"
|
|
1118
1118
|
},
|
|
1119
1119
|
children: /* @__PURE__ */ e(
|
|
1120
|
-
|
|
1120
|
+
Pe,
|
|
1121
1121
|
{
|
|
1122
1122
|
columns: i,
|
|
1123
1123
|
disableColumnFilter: !0,
|
|
@@ -1131,49 +1131,49 @@ const me = ({ sx: t = {} }) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
);
|
|
1133
1133
|
}, pt = () => {
|
|
1134
|
-
const { isMobile: t } =
|
|
1134
|
+
const { isMobile: t } = j(), [h, c] = O({}), [m, b] = O(!1), { selectedAccountGuids: v } = J(), { visibleHoldings: d, updateHoldings: a } = U(), [g, f] = A.useState(!1), [p, l] = O({
|
|
1135
1135
|
accounts: [],
|
|
1136
1136
|
holdings: []
|
|
1137
|
-
}), { accounts: u, investments: i } = M(), { isCopyLoaded: n } =
|
|
1138
|
-
w(
|
|
1139
|
-
}, Z = (
|
|
1140
|
-
const C =
|
|
1141
|
-
/^\d*\.?\d*$/.test(C) &&
|
|
1142
|
-
}, ue = (
|
|
1143
|
-
|
|
1144
|
-
}, ee = (
|
|
1145
|
-
const C = d.find(({ guid: E }) => E ===
|
|
1137
|
+
}), { accounts: u, investments: i } = M(), { isCopyLoaded: n } = J(), [x, w] = O(null), [D, T] = O(""), W = ce().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", k = (s, C = "lesserThan") => C === "greaterThan" ? s >= 0 ? N : F : s <= 0 ? F : N, H = (s, C) => {
|
|
1138
|
+
w(s), T(C.toFixed(2));
|
|
1139
|
+
}, Z = (s) => {
|
|
1140
|
+
const C = s.target.value;
|
|
1141
|
+
/^\d*\.?\d*$/.test(C) && T(C);
|
|
1142
|
+
}, ue = (s, C) => {
|
|
1143
|
+
s.key === "Enter" ? ee(C) : s.key === "Escape" && w(null);
|
|
1144
|
+
}, ee = (s) => {
|
|
1145
|
+
const C = d.find(({ guid: E }) => E === s);
|
|
1146
1146
|
if (!C) return;
|
|
1147
|
-
const G = Number(
|
|
1148
|
-
if (
|
|
1147
|
+
const G = Number(D);
|
|
1148
|
+
if (a({ ...C, cost_basis: G }), t) {
|
|
1149
1149
|
const E = p.holdings.map(
|
|
1150
|
-
(
|
|
1150
|
+
(S) => S.id === s ? { ...S, costBasis: G } : S
|
|
1151
1151
|
);
|
|
1152
|
-
l((
|
|
1153
|
-
...
|
|
1152
|
+
l((S) => ({
|
|
1153
|
+
...S,
|
|
1154
1154
|
holdings: E
|
|
1155
1155
|
}));
|
|
1156
1156
|
}
|
|
1157
1157
|
w(null);
|
|
1158
|
-
},
|
|
1158
|
+
}, Se = (s) => (C, G) => {
|
|
1159
1159
|
c((E) => ({
|
|
1160
1160
|
...E,
|
|
1161
|
-
[
|
|
1161
|
+
[s]: G
|
|
1162
1162
|
}));
|
|
1163
|
-
}, { visibleHoldings: he } =
|
|
1164
|
-
({ guid:
|
|
1165
|
-
), Ie =
|
|
1166
|
-
({ account_guid:
|
|
1167
|
-
).reduce((
|
|
1163
|
+
}, { visibleHoldings: he } = U(), { visibleInvestmentAccounts: Le } = le(), P = Le.filter(
|
|
1164
|
+
({ guid: s }) => v.includes(s)
|
|
1165
|
+
), Ie = P.reduce((s, C) => s + (C.balance || 0), 0), Ae = P.map(({ guid: s }) => s), q = he.filter(
|
|
1166
|
+
({ account_guid: s }) => Ae.includes(s)
|
|
1167
|
+
).reduce((s, C) => {
|
|
1168
1168
|
const G = C.market_value ? C.market_value - (C.cost_basis || 0) : 0;
|
|
1169
|
-
return
|
|
1170
|
-
}, 0),
|
|
1171
|
-
|
|
1169
|
+
return s + G;
|
|
1170
|
+
}, 0), Te = () => {
|
|
1171
|
+
b(!1);
|
|
1172
1172
|
};
|
|
1173
1173
|
return n ? /* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
|
|
1174
|
-
!!
|
|
1174
|
+
!!P.length && /* @__PURE__ */ o(y, { sx: { alignItems: "center" }, children: [
|
|
1175
1175
|
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
|
|
1176
|
-
/* @__PURE__ */ e(
|
|
1176
|
+
/* @__PURE__ */ e(X, { variant: "h1", children: Ie.toLocaleString("en-US", {
|
|
1177
1177
|
currency: "USD",
|
|
1178
1178
|
maximumFractionDigits: 2,
|
|
1179
1179
|
minimumFractionDigits: 2,
|
|
@@ -1181,19 +1181,19 @@ const me = ({ sx: t = {} }) => {
|
|
|
1181
1181
|
}) }),
|
|
1182
1182
|
/* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
1183
1183
|
/* @__PURE__ */ e(
|
|
1184
|
-
|
|
1184
|
+
B,
|
|
1185
1185
|
{
|
|
1186
|
-
name:
|
|
1186
|
+
name: q >= 0 ? "trending_up" : "trending_down",
|
|
1187
1187
|
size: 20,
|
|
1188
|
-
sx: { color:
|
|
1188
|
+
sx: { color: k(q, "greaterThan") }
|
|
1189
1189
|
}
|
|
1190
1190
|
),
|
|
1191
1191
|
/* @__PURE__ */ e(
|
|
1192
1192
|
r,
|
|
1193
1193
|
{
|
|
1194
|
-
sx: { color:
|
|
1195
|
-
variant: "
|
|
1196
|
-
children:
|
|
1194
|
+
sx: { color: k(q, "greaterThan"), fontWeight: 700 },
|
|
1195
|
+
variant: "body2",
|
|
1196
|
+
children: q.toLocaleString("en-US", {
|
|
1197
1197
|
currency: "USD",
|
|
1198
1198
|
maximumFractionDigits: 2,
|
|
1199
1199
|
minimumFractionDigits: 2,
|
|
@@ -1203,8 +1203,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
1203
1203
|
)
|
|
1204
1204
|
] })
|
|
1205
1205
|
] }),
|
|
1206
|
-
|
|
1207
|
-
const C = he.filter((L) => L.account_guid ===
|
|
1206
|
+
P.map((s) => {
|
|
1207
|
+
const C = he.filter((L) => L.account_guid === s.guid).map((L) => ({
|
|
1208
1208
|
id: L.guid,
|
|
1209
1209
|
qty: L.shares || 0,
|
|
1210
1210
|
holding: L.symbol || L.description || "Unknown",
|
|
@@ -1212,18 +1212,18 @@ const me = ({ sx: t = {} }) => {
|
|
|
1212
1212
|
totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
|
|
1213
1213
|
marketValue: L.market_value || 0,
|
|
1214
1214
|
description: L.description || ""
|
|
1215
|
-
})), G = C.length > 0, E =
|
|
1215
|
+
})), G = C.length > 0, E = s.balance, S = C.reduce(
|
|
1216
1216
|
(L, We) => We.totalGainLoss + L,
|
|
1217
1217
|
0
|
|
1218
|
-
), ge = E ?
|
|
1218
|
+
), ge = E ? S / E * 100 : 0;
|
|
1219
1219
|
if (t)
|
|
1220
1220
|
return /* @__PURE__ */ e(
|
|
1221
1221
|
re,
|
|
1222
1222
|
{
|
|
1223
1223
|
onClick: C.length ? () => {
|
|
1224
|
-
|
|
1224
|
+
b(!0), l({
|
|
1225
1225
|
holdings: C,
|
|
1226
|
-
accounts:
|
|
1226
|
+
accounts: s
|
|
1227
1227
|
});
|
|
1228
1228
|
} : void 0,
|
|
1229
1229
|
sx: {
|
|
@@ -1259,14 +1259,14 @@ const me = ({ sx: t = {} }) => {
|
|
|
1259
1259
|
/* @__PURE__ */ e(
|
|
1260
1260
|
oe,
|
|
1261
1261
|
{
|
|
1262
|
-
alt:
|
|
1263
|
-
institutionGuid:
|
|
1262
|
+
alt: s.institutionName || "",
|
|
1263
|
+
institutionGuid: s.institution_guid || "",
|
|
1264
1264
|
size: 32
|
|
1265
1265
|
}
|
|
1266
1266
|
),
|
|
1267
1267
|
/* @__PURE__ */ o(y, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
|
|
1268
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1269
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1268
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: s.memberName }),
|
|
1269
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: s.user_name || s.name })
|
|
1270
1270
|
] })
|
|
1271
1271
|
]
|
|
1272
1272
|
}
|
|
@@ -1297,7 +1297,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1297
1297
|
pt: 14
|
|
1298
1298
|
},
|
|
1299
1299
|
children: [
|
|
1300
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "
|
|
1300
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "body2", children: i.overview.total_gain_Loss }),
|
|
1301
1301
|
/* @__PURE__ */ o(
|
|
1302
1302
|
y,
|
|
1303
1303
|
{
|
|
@@ -1308,38 +1308,38 @@ const me = ({ sx: t = {} }) => {
|
|
|
1308
1308
|
justifyContent: "flex-end"
|
|
1309
1309
|
},
|
|
1310
1310
|
children: [
|
|
1311
|
-
|
|
1312
|
-
|
|
1311
|
+
S !== 0 && /* @__PURE__ */ e(
|
|
1312
|
+
B,
|
|
1313
1313
|
{
|
|
1314
|
-
name:
|
|
1314
|
+
name: S > 0 ? "trending_up" : "trending_down",
|
|
1315
1315
|
size: 20,
|
|
1316
|
-
sx: { color:
|
|
1316
|
+
sx: { color: k(S) }
|
|
1317
1317
|
}
|
|
1318
1318
|
),
|
|
1319
1319
|
/* @__PURE__ */ o(
|
|
1320
1320
|
r,
|
|
1321
1321
|
{
|
|
1322
1322
|
sx: {
|
|
1323
|
-
color:
|
|
1323
|
+
color: k(S),
|
|
1324
1324
|
fontWeight: 600
|
|
1325
1325
|
},
|
|
1326
|
-
variant: "
|
|
1326
|
+
variant: "body1",
|
|
1327
1327
|
children: [
|
|
1328
1328
|
ge.toFixed(2),
|
|
1329
1329
|
"%"
|
|
1330
1330
|
]
|
|
1331
1331
|
}
|
|
1332
1332
|
),
|
|
1333
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1333
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1334
1334
|
/* @__PURE__ */ e(
|
|
1335
1335
|
r,
|
|
1336
1336
|
{
|
|
1337
1337
|
sx: {
|
|
1338
|
-
color:
|
|
1338
|
+
color: k(S),
|
|
1339
1339
|
fontWeight: 600
|
|
1340
1340
|
},
|
|
1341
|
-
variant: "
|
|
1342
|
-
children: Math.abs(
|
|
1341
|
+
variant: "body1",
|
|
1342
|
+
children: Math.abs(S).toLocaleString("en-US", {
|
|
1343
1343
|
currency: "USD",
|
|
1344
1344
|
maximumFractionDigits: 2,
|
|
1345
1345
|
minimumFractionDigits: 2,
|
|
@@ -1366,8 +1366,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
1366
1366
|
pt: 14
|
|
1367
1367
|
},
|
|
1368
1368
|
children: [
|
|
1369
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1370
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1369
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: i.overview.total_value }),
|
|
1370
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
|
|
1371
1371
|
currency: "USD",
|
|
1372
1372
|
maximumFractionDigits: 2,
|
|
1373
1373
|
minimumFractionDigits: 2,
|
|
@@ -1383,14 +1383,14 @@ const me = ({ sx: t = {} }) => {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
)
|
|
1385
1385
|
},
|
|
1386
|
-
|
|
1386
|
+
s.guid
|
|
1387
1387
|
);
|
|
1388
|
-
const
|
|
1388
|
+
const ke = W ? "grey.700" : "grey.400", Be = C.length ? "text.primary" : ke;
|
|
1389
1389
|
return /* @__PURE__ */ o(
|
|
1390
|
-
|
|
1390
|
+
ve,
|
|
1391
1391
|
{
|
|
1392
|
-
expanded: h[
|
|
1393
|
-
onChange: G ?
|
|
1392
|
+
expanded: h[s.guid] === !0,
|
|
1393
|
+
onChange: G ? Se(s.guid) : () => {
|
|
1394
1394
|
},
|
|
1395
1395
|
sx: {
|
|
1396
1396
|
border: 1,
|
|
@@ -1405,7 +1405,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1405
1405
|
"aria-controls": "panel1a-content",
|
|
1406
1406
|
id: "panel1a-header",
|
|
1407
1407
|
sx: [
|
|
1408
|
-
h[
|
|
1408
|
+
h[s.guid] && {
|
|
1409
1409
|
borderBottom: 1,
|
|
1410
1410
|
borderColor: "border.main",
|
|
1411
1411
|
maxHeight: 88
|
|
@@ -1423,25 +1423,25 @@ const me = ({ sx: t = {} }) => {
|
|
|
1423
1423
|
width: "100%"
|
|
1424
1424
|
},
|
|
1425
1425
|
children: [
|
|
1426
|
-
/* @__PURE__ */ e(
|
|
1426
|
+
/* @__PURE__ */ e(B, { name: "expand_more", size: 20, sx: { color: Be } }),
|
|
1427
1427
|
/* @__PURE__ */ e(
|
|
1428
1428
|
oe,
|
|
1429
1429
|
{
|
|
1430
|
-
alt:
|
|
1431
|
-
institutionGuid:
|
|
1430
|
+
alt: s.institutionName || "",
|
|
1431
|
+
institutionGuid: s.institution_guid || "",
|
|
1432
1432
|
size: 32
|
|
1433
1433
|
}
|
|
1434
1434
|
),
|
|
1435
1435
|
/* @__PURE__ */ o(y, { sx: { alignItems: "flex-start" }, children: [
|
|
1436
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1437
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1436
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: s.memberName }),
|
|
1437
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: s.user_name || s.name })
|
|
1438
1438
|
] })
|
|
1439
1439
|
]
|
|
1440
1440
|
}
|
|
1441
1441
|
),
|
|
1442
1442
|
/* @__PURE__ */ o(y, { sx: { flexDirection: "row" }, children: [
|
|
1443
1443
|
/* @__PURE__ */ o(y, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
|
|
1444
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1444
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: i.overview.total_gain_Loss }),
|
|
1445
1445
|
/* @__PURE__ */ o(
|
|
1446
1446
|
y,
|
|
1447
1447
|
{
|
|
@@ -1452,38 +1452,38 @@ const me = ({ sx: t = {} }) => {
|
|
|
1452
1452
|
justifyContent: "flex-end"
|
|
1453
1453
|
},
|
|
1454
1454
|
children: [
|
|
1455
|
-
|
|
1456
|
-
|
|
1455
|
+
S !== 0 && /* @__PURE__ */ e(
|
|
1456
|
+
B,
|
|
1457
1457
|
{
|
|
1458
|
-
name:
|
|
1458
|
+
name: S >= 0 ? "trending_up" : "trending_down",
|
|
1459
1459
|
size: 20,
|
|
1460
|
-
sx: { color:
|
|
1460
|
+
sx: { color: k(S) }
|
|
1461
1461
|
}
|
|
1462
1462
|
),
|
|
1463
1463
|
/* @__PURE__ */ o(
|
|
1464
1464
|
r,
|
|
1465
1465
|
{
|
|
1466
1466
|
sx: {
|
|
1467
|
-
color:
|
|
1467
|
+
color: k(S),
|
|
1468
1468
|
fontWeight: 600
|
|
1469
1469
|
},
|
|
1470
|
-
variant: "
|
|
1470
|
+
variant: "body1",
|
|
1471
1471
|
children: [
|
|
1472
1472
|
ge.toFixed(2),
|
|
1473
1473
|
"%"
|
|
1474
1474
|
]
|
|
1475
1475
|
}
|
|
1476
1476
|
),
|
|
1477
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1477
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1478
1478
|
/* @__PURE__ */ e(
|
|
1479
1479
|
r,
|
|
1480
1480
|
{
|
|
1481
1481
|
sx: {
|
|
1482
|
-
color:
|
|
1482
|
+
color: k(S),
|
|
1483
1483
|
fontWeight: 600
|
|
1484
1484
|
},
|
|
1485
|
-
variant: "
|
|
1486
|
-
children: Math.abs(
|
|
1485
|
+
variant: "body1",
|
|
1486
|
+
children: Math.abs(S).toLocaleString("en-US", {
|
|
1487
1487
|
currency: "USD",
|
|
1488
1488
|
maximumFractionDigits: 2,
|
|
1489
1489
|
minimumFractionDigits: 2,
|
|
@@ -1496,8 +1496,8 @@ const me = ({ sx: t = {} }) => {
|
|
|
1496
1496
|
)
|
|
1497
1497
|
] }),
|
|
1498
1498
|
/* @__PURE__ */ e(y, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(y, { sx: { alignItems: "flex-end" }, children: [
|
|
1499
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "
|
|
1500
|
-
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1499
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "caption", children: i.overview.total_value }),
|
|
1500
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
|
|
1501
1501
|
currency: "USD",
|
|
1502
1502
|
maximumFractionDigits: 2,
|
|
1503
1503
|
minimumFractionDigits: 2,
|
|
@@ -1511,18 +1511,18 @@ const me = ({ sx: t = {} }) => {
|
|
|
1511
1511
|
/* @__PURE__ */ e(_e, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(re, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
|
|
1512
1512
|
gt,
|
|
1513
1513
|
{
|
|
1514
|
-
currentEditedCostBasis:
|
|
1514
|
+
currentEditedCostBasis: D,
|
|
1515
1515
|
data: C,
|
|
1516
1516
|
editingHoldingId: x,
|
|
1517
1517
|
handleCostBasisBlur: ee,
|
|
1518
1518
|
handleCostBasisChange: Z,
|
|
1519
|
-
handleCostBasisClick:
|
|
1519
|
+
handleCostBasisClick: H,
|
|
1520
1520
|
handleCostBasisKeyDown: ue
|
|
1521
1521
|
}
|
|
1522
1522
|
) }) })
|
|
1523
1523
|
]
|
|
1524
1524
|
},
|
|
1525
|
-
|
|
1525
|
+
s.guid
|
|
1526
1526
|
);
|
|
1527
1527
|
}),
|
|
1528
1528
|
/* @__PURE__ */ e(me, {}),
|
|
@@ -1530,14 +1530,14 @@ const me = ({ sx: t = {} }) => {
|
|
|
1530
1530
|
ht,
|
|
1531
1531
|
{
|
|
1532
1532
|
accountHoldingsData: p,
|
|
1533
|
-
currentEditedCostBasis:
|
|
1533
|
+
currentEditedCostBasis: D,
|
|
1534
1534
|
editingHoldingId: x,
|
|
1535
1535
|
handleCostBasisBlur: ee,
|
|
1536
1536
|
handleCostBasisChange: Z,
|
|
1537
|
-
handleCostBasisClick:
|
|
1537
|
+
handleCostBasisClick: H,
|
|
1538
1538
|
handleCostBasisKeyDown: ue,
|
|
1539
1539
|
isOpen: m,
|
|
1540
|
-
onClose:
|
|
1540
|
+
onClose: Te
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
1543
|
/* @__PURE__ */ e(
|
|
@@ -1548,43 +1548,43 @@ const me = ({ sx: t = {} }) => {
|
|
|
1548
1548
|
title: u.manage_connections
|
|
1549
1549
|
}
|
|
1550
1550
|
)
|
|
1551
|
-
] }) : /* @__PURE__ */ e(
|
|
1552
|
-
}, xt =
|
|
1553
|
-
const { onEvent: c } =
|
|
1554
|
-
isAccountDataLoaded:
|
|
1555
|
-
loadAccountData:
|
|
1551
|
+
] }) : /* @__PURE__ */ e(De, {});
|
|
1552
|
+
}, xt = $(pt), yt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "body1", children: t }), dn = $(({ onBackClick: t, sx: h }) => {
|
|
1553
|
+
const { onEvent: c } = be(), { isMobile: m } = j(), {
|
|
1554
|
+
isAccountDataLoaded: b,
|
|
1555
|
+
loadAccountData: v,
|
|
1556
1556
|
visibleInvestmentAccounts: d
|
|
1557
1557
|
} = le(), {
|
|
1558
|
-
visibleHoldings:
|
|
1558
|
+
visibleHoldings: a,
|
|
1559
1559
|
setShowConnectionsWidget: g,
|
|
1560
1560
|
showConnectionsWidget: f
|
|
1561
|
-
} =
|
|
1562
|
-
|
|
1561
|
+
} = U(), { investments: p, accounts: l } = M(), { isInitialized: u } = J(), [i, n] = A.useState(0), { loadHoldings: x, holdingsLoaded: w } = U();
|
|
1562
|
+
Ke({
|
|
1563
1563
|
widgetName: "InvestmentsWidget",
|
|
1564
1564
|
isLoaded: w
|
|
1565
1565
|
}), A.useEffect(() => {
|
|
1566
|
-
|
|
1566
|
+
b || v().finally();
|
|
1567
1567
|
}, []), A.useEffect(() => {
|
|
1568
1568
|
u && x().finally();
|
|
1569
1569
|
}, [u]);
|
|
1570
|
-
const
|
|
1570
|
+
const D = () => {
|
|
1571
1571
|
c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
|
|
1572
1572
|
};
|
|
1573
|
-
if (!u || !w) return /* @__PURE__ */ e(
|
|
1574
|
-
const
|
|
1573
|
+
if (!u || !w) return /* @__PURE__ */ e(De, {});
|
|
1574
|
+
const T = [
|
|
1575
1575
|
z.INVESTMENT_WIDGET_DETAILS_CLICK,
|
|
1576
1576
|
z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
|
|
1577
1577
|
z.INVESTMENT_WIDGET_ANALYSIS_CLICK
|
|
1578
|
-
], I = d.length === 0 &&
|
|
1578
|
+
], I = d.length === 0 && a.length === 0, W = [
|
|
1579
1579
|
p.tab_overview_title,
|
|
1580
1580
|
p.tab_allocation_title,
|
|
1581
1581
|
p.tab_analysis_title
|
|
1582
1582
|
];
|
|
1583
1583
|
return /* @__PURE__ */ o(
|
|
1584
|
-
|
|
1584
|
+
Ye,
|
|
1585
1585
|
{
|
|
1586
|
-
allowedAccountTypes: [
|
|
1587
|
-
onAccountsFilterClick:
|
|
1586
|
+
allowedAccountTypes: [Qe.INVESTMENT],
|
|
1587
|
+
onAccountsFilterClick: D,
|
|
1588
1588
|
onBackClick: t,
|
|
1589
1589
|
sx: h,
|
|
1590
1590
|
title: p.title,
|
|
@@ -1594,7 +1594,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1594
1594
|
Ee,
|
|
1595
1595
|
{
|
|
1596
1596
|
onChange: (N, F) => {
|
|
1597
|
-
n(F), c(
|
|
1597
|
+
n(F), c(T[F]);
|
|
1598
1598
|
},
|
|
1599
1599
|
sx: { bgcolor: "background.paper" },
|
|
1600
1600
|
textColor: "primary",
|
|
@@ -1604,7 +1604,7 @@ const me = ({ sx: t = {} }) => {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
),
|
|
1606
1606
|
I ? /* @__PURE__ */ e(
|
|
1607
|
-
|
|
1607
|
+
Je,
|
|
1608
1608
|
{
|
|
1609
1609
|
header: p.empty_state_header,
|
|
1610
1610
|
icon: "bid_landscape",
|
|
@@ -1625,9 +1625,9 @@ const me = ({ sx: t = {} }) => {
|
|
|
1625
1625
|
px: 16
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
|
-
) : /* @__PURE__ */ o(
|
|
1628
|
+
) : /* @__PURE__ */ o(ae, { children: [
|
|
1629
1629
|
i === 0 && /* @__PURE__ */ e(xt, {}),
|
|
1630
|
-
i === 1 && /* @__PURE__ */ e(
|
|
1630
|
+
i === 1 && /* @__PURE__ */ e(st, {}),
|
|
1631
1631
|
i === 2 && /* @__PURE__ */ e(mt, {})
|
|
1632
1632
|
] })
|
|
1633
1633
|
] }),
|