@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms2
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/{Account-B4CDD-zq.mjs → Account-Cp30A3ad.mjs} +1 -1
- package/dist/AccountDetailsContent-C1HumFnW.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-NMx79DGs.mjs} +17 -17
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-CW6cIthP.mjs} +8 -8
- package/dist/AccountListItem-DxmAs98Z.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-hIs-yA6W.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DUHkUyK4.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-CIDAPPPT.mjs} +30 -30
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-naOtJcwo.mjs} +22 -15
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqDAA_5I.mjs} +26 -26
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-Dn1MlqLz.mjs} +60 -61
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-CSo6AFkG.mjs} +2 -2
- package/dist/CurrencyInput-BrGvhgVK.mjs +85 -0
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-hi1cqrRk.mjs} +3 -3
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-Dqe5EqvA.mjs} +6 -6
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-CQ1grpwo.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-dKZOZ2hM.mjs} +3 -3
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-CFeAJloA.mjs} +3 -3
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-i4OasOO-.mjs} +176 -158
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/Loader-BSWSYqvn.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-D_qVX5dN.mjs} +44 -44
- package/dist/{MiniWidgetContainer-CKzf_Ira.mjs → MiniWidgetContainer-D7MkHG15.mjs} +12 -12
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-8FFC1Bs0.mjs} +2 -2
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-BsWiYD94.mjs} +67 -67
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-62e0mU_3.mjs} +7 -7
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-RfZ8Wuhh.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-Bhx56aA3.mjs} +76 -76
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-D3EOKZ2B.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-C6KH8JH4.mjs} +1 -1
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-PsRQPkmV.mjs} +1 -1
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CZzDb-7d.mjs} +10 -10
- package/dist/TransactionDetails-Duv1X9ec.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-DgLrYW4C.mjs} +3 -3
- package/dist/{User-BklmOUSd.mjs → User-DqNX2GAK.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-CH9E-jOx.mjs} +178 -177
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-B1Jzb4XA.mjs} +6 -6
- package/dist/accounts/index.es.js +45 -45
- package/dist/analytics/index.es.js +22 -22
- package/dist/budgets/index.es.js +266 -265
- package/dist/cashflow/index.es.js +155 -154
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +659 -394
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +438 -438
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-BFpuIAXW.mjs} +1 -1
- package/dist/finstrong/index.es.js +113 -113
- package/dist/goals/index.es.js +379 -385
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +3 -3
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +16 -16
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +29 -29
- package/dist/recurringtransactions/index.es.js +82 -82
- package/dist/settings/index.es.js +254 -254
- package/dist/spending/index.es.js +43 -43
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +150 -149
- package/dist/trends/index.es.js +297 -296
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-usSZCQ7I.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +30 -30
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -1,45 +1,46 @@
|
|
|
1
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 P } from "mobx-react-lite";
|
|
4
4
|
import _ from "@mui/material/Stack";
|
|
5
5
|
import Ee from "@mui/material/Tab";
|
|
6
6
|
import Ge from "@mui/material/Tabs";
|
|
7
|
-
import { C as ge } from "../ConnectionsDrawer-
|
|
7
|
+
import { C as ge } from "../ConnectionsDrawer-CSo6AFkG.mjs";
|
|
8
8
|
import pe from "@mui/material/useMediaQuery";
|
|
9
9
|
import Me from "@mui/material/Box";
|
|
10
10
|
import Ne from "@mui/material/Collapse";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
11
|
+
import K from "@mui/material/Divider";
|
|
12
|
+
import ee from "@mui/material/List";
|
|
13
|
+
import te from "@mui/material/ListItem";
|
|
14
|
+
import He from "@mui/material/ListItemButton";
|
|
15
15
|
import xe from "@mui/material/ToggleButton";
|
|
16
16
|
import ye from "@mui/material/ToggleButtonGroup";
|
|
17
|
-
import { Text as i, H1 as fe, P as ve, InstitutionLogo as
|
|
18
|
-
import
|
|
19
|
-
import { u as M, g as be, t as
|
|
20
|
-
import { A as z, W as ze } from "../WidgetContainer-
|
|
21
|
-
import { a as Oe, f as
|
|
22
|
-
import { u as
|
|
23
|
-
import
|
|
24
|
-
import { Icon as
|
|
17
|
+
import { Text as i, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
|
|
18
|
+
import Ue from "@mui/material/Button";
|
|
19
|
+
import { u as M, g as be, t as H, b as Q, d as se, n as je } from "../hooks-C41HAxM5.mjs";
|
|
20
|
+
import { A as z, W as ze } from "../WidgetContainer-B1Jzb4XA.mjs";
|
|
21
|
+
import { a as Oe, f as oe } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
22
|
+
import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
|
+
import le from "@mui/material/styles/useTheme";
|
|
24
|
+
import { Icon as k } from "@mxenabled/mx-icons";
|
|
25
25
|
import { D as Ve } from "../Donut-Dmy3JTWd.mjs";
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
26
|
+
import { useTheme as Re } from "@mui/material/styles";
|
|
27
|
+
import { f as Pe, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
28
|
+
import Xe from "@mui/material/ListItemText";
|
|
28
29
|
import ce from "@mui/material/IconButton";
|
|
29
|
-
import
|
|
30
|
+
import $e from "@mui/material/Tooltip";
|
|
30
31
|
import _e from "@mui/material/Accordion";
|
|
31
32
|
import we from "@mui/material/AccordionDetails";
|
|
32
33
|
import Ce from "@mui/material/AccordionSummary";
|
|
33
|
-
import
|
|
34
|
+
import ie from "@mui/material/Paper";
|
|
34
35
|
import x from "@mui/system/Stack";
|
|
35
|
-
import
|
|
36
|
-
import { D as qe } from "../Drawer-
|
|
36
|
+
import Se from "@mui/material/TextField";
|
|
37
|
+
import { D as qe } from "../Drawer-Dqe5EqvA.mjs";
|
|
37
38
|
import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
|
|
38
39
|
import { Stack as Ye } from "@mui/material";
|
|
39
|
-
import { L as
|
|
40
|
+
import { L as De } from "../Loader-BSWSYqvn.mjs";
|
|
40
41
|
import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
|
|
41
42
|
const de = ({ sx: t = {} }) => {
|
|
42
|
-
const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } =
|
|
43
|
+
const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
|
|
43
44
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
|
|
44
45
|
/* @__PURE__ */ o(
|
|
45
46
|
_,
|
|
@@ -52,7 +53,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
52
53
|
textAlign: "center"
|
|
53
54
|
},
|
|
54
55
|
children: [
|
|
55
|
-
/* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "
|
|
56
|
+
/* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: g.overview.investment_accounts_footer }),
|
|
56
57
|
/* @__PURE__ */ e(
|
|
57
58
|
i,
|
|
58
59
|
{
|
|
@@ -61,7 +62,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
61
62
|
whiteSpace: "normal",
|
|
62
63
|
fontWeight: 400
|
|
63
64
|
},
|
|
64
|
-
variant: "
|
|
65
|
+
variant: "ParagraphSmall",
|
|
65
66
|
children: g.overview.connect_more_accounts_description
|
|
66
67
|
}
|
|
67
68
|
)
|
|
@@ -69,7 +70,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
72
|
/* @__PURE__ */ e(
|
|
72
|
-
|
|
73
|
+
Ue,
|
|
73
74
|
{
|
|
74
75
|
onClick: () => {
|
|
75
76
|
u(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
@@ -90,7 +91,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
90
91
|
allocations_unknown: "#161D6A",
|
|
91
92
|
allocations_us_bond: "#254995",
|
|
92
93
|
allocations_us_stock: "#1E2D84"
|
|
93
|
-
},
|
|
94
|
+
}, Ze = [
|
|
94
95
|
{
|
|
95
96
|
name: "allocations_cash"
|
|
96
97
|
},
|
|
@@ -118,85 +119,85 @@ const de = ({ sx: t = {} }) => {
|
|
|
118
119
|
{
|
|
119
120
|
name: "allocations_unknown"
|
|
120
121
|
}
|
|
121
|
-
],
|
|
122
|
+
], et = (t, g, c) => {
|
|
122
123
|
const u = g, v = c;
|
|
123
124
|
return t >= Math.min(u, v) && t < Math.max(u, v);
|
|
124
|
-
},
|
|
125
|
+
}, tt = (t, g, c) => {
|
|
125
126
|
const u = [
|
|
126
127
|
...new Set(t.map((m) => m.name.toLowerCase()))
|
|
127
128
|
];
|
|
128
129
|
let v;
|
|
129
130
|
return u.map((m) => {
|
|
130
|
-
const
|
|
131
|
+
const s = t.reduce((y, d) => {
|
|
131
132
|
const b = d.name;
|
|
132
|
-
return b.toLowerCase() === m ? (v = b,
|
|
133
|
+
return b.toLowerCase() === m ? (v = b, Y(d) * d[g] / 100 + y) : y;
|
|
133
134
|
}, 0);
|
|
134
135
|
return {
|
|
135
136
|
displayName: v,
|
|
136
137
|
name: v,
|
|
137
|
-
value:
|
|
138
|
-
percentage:
|
|
138
|
+
value: s,
|
|
139
|
+
percentage: s / c
|
|
139
140
|
};
|
|
140
141
|
});
|
|
141
|
-
},
|
|
142
|
+
}, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, g, c) => {
|
|
142
143
|
const u = Object.values(g.allocations_list), v = [];
|
|
143
144
|
let f = 0;
|
|
144
|
-
const m = t.map(({ guid: n }) => n),
|
|
145
|
+
const m = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => m.includes(n)).map((n) => ({
|
|
145
146
|
...n,
|
|
146
147
|
name: n.symbol || n.description,
|
|
147
|
-
gainLoss: n.cost_basis || n.cost_basis === 0 ?
|
|
148
|
+
gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
|
|
148
149
|
})), { cashBalance: y, totalAccountBalance: d } = t.reduce(
|
|
149
150
|
(n, p) => ({
|
|
150
151
|
cashBalance: n.cashBalance + (p.cash_balance || 0),
|
|
151
152
|
totalAccountBalance: n.totalAccountBalance + (p.balance || 0)
|
|
152
153
|
}),
|
|
153
154
|
{ cashBalance: 0, totalAccountBalance: 0 }
|
|
154
|
-
), { marketValue: b, totalGainLoss: l } =
|
|
155
|
+
), { marketValue: b, totalGainLoss: l } = s.reduce(
|
|
155
156
|
(n, p) => ({
|
|
156
|
-
marketValue: n.marketValue +
|
|
157
|
+
marketValue: n.marketValue + Y(p),
|
|
157
158
|
totalGainLoss: n.totalGainLoss + p.gainLoss
|
|
158
159
|
}),
|
|
159
160
|
{ marketValue: 0, totalGainLoss: 0 }
|
|
160
161
|
), h = b + y;
|
|
161
|
-
|
|
162
|
-
const C =
|
|
162
|
+
Ze.forEach((n, p) => {
|
|
163
|
+
const C = s.filter(
|
|
163
164
|
(I) => !!I[n.name]
|
|
164
165
|
);
|
|
165
|
-
let
|
|
166
|
-
(I, W) => I +
|
|
166
|
+
let S = C.reduce(
|
|
167
|
+
(I, W) => I + Y(W) * W[n.name] / 100,
|
|
167
168
|
0
|
|
168
169
|
);
|
|
169
|
-
const
|
|
170
|
+
const B = tt(
|
|
170
171
|
C,
|
|
171
172
|
n.name,
|
|
172
|
-
|
|
173
|
+
S
|
|
173
174
|
);
|
|
174
175
|
if (n.name === "allocations_cash" && y > 0) {
|
|
175
|
-
|
|
176
|
+
S += y;
|
|
176
177
|
const I = {
|
|
177
178
|
displayName: g.cash_balance_display_name,
|
|
178
179
|
name: "allocations_name",
|
|
179
180
|
value: y,
|
|
180
181
|
percentage: y / h
|
|
181
182
|
};
|
|
182
|
-
|
|
183
|
+
B.push(I);
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
+
S > 0 && (v.push({
|
|
185
186
|
name: n.name,
|
|
186
187
|
displayName: u[p],
|
|
187
188
|
guid: `${n.name}-${p}`,
|
|
188
|
-
holdings:
|
|
189
|
-
percentage:
|
|
190
|
-
value:
|
|
189
|
+
holdings: B,
|
|
190
|
+
percentage: S / h,
|
|
191
|
+
value: S,
|
|
191
192
|
color: Je[n.name]
|
|
192
|
-
}), f +=
|
|
193
|
+
}), f += S);
|
|
193
194
|
});
|
|
194
195
|
const r = v.map(
|
|
195
|
-
({ displayName: n, guid: p, color: C, value:
|
|
196
|
+
({ displayName: n, guid: p, color: C, value: S }) => ({
|
|
196
197
|
id: p,
|
|
197
198
|
color: C,
|
|
198
199
|
label: n,
|
|
199
|
-
value:
|
|
200
|
+
value: S / f * 100
|
|
200
201
|
})
|
|
201
202
|
);
|
|
202
203
|
return {
|
|
@@ -207,7 +208,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
207
208
|
totalMarketValue: h,
|
|
208
209
|
totalGainLossPercentage: l / d
|
|
209
210
|
};
|
|
210
|
-
},
|
|
211
|
+
}, re = (t) => t < 1e-3 ? "< 0.1%" : Oe(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
|
|
211
212
|
data: t,
|
|
212
213
|
onSelected: g,
|
|
213
214
|
selectedId: c,
|
|
@@ -216,12 +217,12 @@ const de = ({ sx: t = {} }) => {
|
|
|
216
217
|
}) => {
|
|
217
218
|
const f = (l, h) => {
|
|
218
219
|
h !== null && v(h);
|
|
219
|
-
}, { isMobile: m } =
|
|
220
|
-
investments: { allocation:
|
|
220
|
+
}, { isMobile: m } = U(), {
|
|
221
|
+
investments: { allocation: s }
|
|
221
222
|
} = M(), y = [
|
|
222
|
-
{ label:
|
|
223
|
-
{ label:
|
|
224
|
-
], d = !t?.investmentsData.length, { isSmallMobile: b } =
|
|
223
|
+
{ label: s.tabs_label_dollar, value: 0 },
|
|
224
|
+
{ label: s.tabs_label_percent, value: 1 }
|
|
225
|
+
], d = !t?.investmentsData.length, { isSmallMobile: b } = U();
|
|
225
226
|
return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: m ? 250 : 412 }, children: [
|
|
226
227
|
/* @__PURE__ */ e(
|
|
227
228
|
ye,
|
|
@@ -230,12 +231,12 @@ const de = ({ sx: t = {} }) => {
|
|
|
230
231
|
fullWidth: !0,
|
|
231
232
|
onChange: f,
|
|
232
233
|
value: d ? -1 : u,
|
|
233
|
-
children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "
|
|
234
|
+
children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
|
|
234
235
|
}
|
|
235
236
|
),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
|
|
237
238
|
/* @__PURE__ */ e(
|
|
238
|
-
|
|
239
|
+
te,
|
|
239
240
|
{
|
|
240
241
|
disableGutters: !0,
|
|
241
242
|
disablePadding: !0,
|
|
@@ -243,7 +244,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
243
244
|
minHeight: 44
|
|
244
245
|
},
|
|
245
246
|
children: /* @__PURE__ */ o(
|
|
246
|
-
|
|
247
|
+
He,
|
|
247
248
|
{
|
|
248
249
|
"aria-expanded": c === l.guid,
|
|
249
250
|
onClick: () => g(l.guid),
|
|
@@ -268,7 +269,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
268
269
|
width: "100%",
|
|
269
270
|
children: [
|
|
270
271
|
/* @__PURE__ */ e(i, { bold: c === l.guid, children: l.displayName }),
|
|
271
|
-
/* @__PURE__ */ e(i, { bold: c === l.guid, variant: "
|
|
272
|
+
/* @__PURE__ */ e(i, { bold: c === l.guid, variant: "Body", children: u === 0 ? R(l.value) : re(l.percentage) })
|
|
272
273
|
]
|
|
273
274
|
}
|
|
274
275
|
)
|
|
@@ -277,10 +278,10 @@ const de = ({ sx: t = {} }) => {
|
|
|
277
278
|
)
|
|
278
279
|
}
|
|
279
280
|
),
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(
|
|
281
|
+
/* @__PURE__ */ e(K, {}),
|
|
282
|
+
l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
|
|
282
283
|
l?.holdings?.map((h) => /* @__PURE__ */ e(
|
|
283
|
-
|
|
284
|
+
te,
|
|
284
285
|
{
|
|
285
286
|
sx: {
|
|
286
287
|
pl: 24,
|
|
@@ -292,17 +293,17 @@ const de = ({ sx: t = {} }) => {
|
|
|
292
293
|
h.displayName,
|
|
293
294
|
" "
|
|
294
295
|
] }),
|
|
295
|
-
/* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) :
|
|
296
|
+
/* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) : re(h.percentage) })
|
|
296
297
|
] })
|
|
297
298
|
},
|
|
298
299
|
h.displayName
|
|
299
300
|
)),
|
|
300
|
-
/* @__PURE__ */ e(
|
|
301
|
+
/* @__PURE__ */ e(K, {})
|
|
301
302
|
] }) })
|
|
302
303
|
] }, l.guid)) }),
|
|
303
304
|
d ? /* @__PURE__ */ o(ae, { children: [
|
|
304
|
-
/* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children:
|
|
305
|
-
/* @__PURE__ */ e(
|
|
305
|
+
/* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
|
|
306
|
+
/* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
|
|
306
307
|
/* @__PURE__ */ e(
|
|
307
308
|
de,
|
|
308
309
|
{
|
|
@@ -311,9 +312,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
314
|
)
|
|
314
|
-
] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${
|
|
315
|
+
] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.total_label_text} ${R(t.totalAmount)}` })
|
|
315
316
|
] });
|
|
316
|
-
},
|
|
317
|
+
}, it = ({
|
|
317
318
|
data: t,
|
|
318
319
|
hoveredId: g,
|
|
319
320
|
isPercentage: c,
|
|
@@ -321,15 +322,15 @@ const de = ({ sx: t = {} }) => {
|
|
|
321
322
|
onMouseLeave: v,
|
|
322
323
|
onSelected: f,
|
|
323
324
|
selectedId: m,
|
|
324
|
-
size:
|
|
325
|
+
size: s = 150,
|
|
325
326
|
totalLabel: y
|
|
326
327
|
}) => {
|
|
327
|
-
const d =
|
|
328
|
-
() => m ? t.investmentsData.find(({ guid:
|
|
328
|
+
const d = le(), b = d.palette.mode === "dark", l = A.useMemo(
|
|
329
|
+
() => m ? t.investmentsData.find(({ guid: B }) => B === m) : void 0,
|
|
329
330
|
[m]
|
|
330
331
|
), {
|
|
331
332
|
investments: { allocation: h }
|
|
332
|
-
} = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.
|
|
333
|
+
} = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.border.light, value: 100 }], [t, d]), n = b ? "#0AC295" : "#09A57F", p = b ? "grey.300" : "grey.700", C = () => l ? h.pie_chart_centered_click_for_details : c ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : p;
|
|
333
334
|
return /* @__PURE__ */ e(
|
|
334
335
|
Ve,
|
|
335
336
|
{
|
|
@@ -339,27 +340,27 @@ const de = ({ sx: t = {} }) => {
|
|
|
339
340
|
onMouseEnter: u,
|
|
340
341
|
onMouseLeave: v,
|
|
341
342
|
selectedId: m,
|
|
342
|
-
size:
|
|
343
|
-
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight:
|
|
343
|
+
size: s,
|
|
344
|
+
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: s, minWidth: s, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
|
|
344
345
|
/* @__PURE__ */ e(i, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? y }),
|
|
345
346
|
/* @__PURE__ */ e(fe, { color: "text.primary", children: R(l?.value ?? t.totalMarketValue) }),
|
|
346
347
|
/* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
347
348
|
!l && /* @__PURE__ */ e(
|
|
348
|
-
|
|
349
|
+
k,
|
|
349
350
|
{
|
|
350
351
|
name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
351
352
|
size: 20,
|
|
352
|
-
sx: { color:
|
|
353
|
+
sx: { color: S }
|
|
353
354
|
}
|
|
354
355
|
),
|
|
355
356
|
/* @__PURE__ */ e(
|
|
356
357
|
i,
|
|
357
358
|
{
|
|
358
359
|
sx: {
|
|
359
|
-
color:
|
|
360
|
+
color: S,
|
|
360
361
|
fontWeight: 700
|
|
361
362
|
},
|
|
362
|
-
variant: "
|
|
363
|
+
variant: "Small",
|
|
363
364
|
children: C()
|
|
364
365
|
}
|
|
365
366
|
)
|
|
@@ -367,16 +368,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
367
368
|
] }) }) })
|
|
368
369
|
}
|
|
369
370
|
);
|
|
370
|
-
},
|
|
371
|
+
}, rt = () => {
|
|
371
372
|
const [t, g] = A.useState(0), [c, u] = A.useState(""), [v, f] = A.useState(""), m = (n) => {
|
|
372
373
|
c !== n ? u(n) : (u(""), f(""));
|
|
373
|
-
}, { selectedAccountGuids:
|
|
374
|
+
}, { selectedAccountGuids: s } = Q(), { visibleHoldings: y } = H(), { visibleInvestmentAccounts: d } = se(), {
|
|
374
375
|
investments: { allocation: b }
|
|
375
|
-
} = M(), l =
|
|
376
|
-
d.filter(({ guid: n }) =>
|
|
376
|
+
} = M(), l = nt(
|
|
377
|
+
d.filter(({ guid: n }) => s.includes(n)),
|
|
377
378
|
b,
|
|
378
379
|
y
|
|
379
|
-
), { isMobile: h } =
|
|
380
|
+
), { isMobile: h } = U(), r = pe("(max-width:768px)");
|
|
380
381
|
return /* @__PURE__ */ o(
|
|
381
382
|
_,
|
|
382
383
|
{
|
|
@@ -390,7 +391,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
390
391
|
},
|
|
391
392
|
children: [
|
|
392
393
|
/* @__PURE__ */ e(
|
|
393
|
-
|
|
394
|
+
it,
|
|
394
395
|
{
|
|
395
396
|
data: l,
|
|
396
397
|
hoveredId: v,
|
|
@@ -408,7 +409,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
408
409
|
}
|
|
409
410
|
),
|
|
410
411
|
/* @__PURE__ */ e(
|
|
411
|
-
|
|
412
|
+
ot,
|
|
412
413
|
{
|
|
413
414
|
data: l,
|
|
414
415
|
onSelected: m,
|
|
@@ -420,16 +421,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
420
421
|
]
|
|
421
422
|
}
|
|
422
423
|
);
|
|
423
|
-
},
|
|
424
|
+
}, at = P(rt), st = ({
|
|
424
425
|
analysisDetails: t,
|
|
425
426
|
analysisType: g,
|
|
426
427
|
copy: c,
|
|
427
428
|
setAnalysisType: u
|
|
428
429
|
}) => {
|
|
429
|
-
const { isSmallMobile: v } =
|
|
430
|
-
key:
|
|
431
|
-
value:
|
|
432
|
-
formattedKey:
|
|
430
|
+
const { isSmallMobile: v } = U(), f = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
|
|
431
|
+
key: s,
|
|
432
|
+
value: oe(t[s], "0,0"),
|
|
433
|
+
formattedKey: Pe(s)
|
|
433
434
|
})), [t]), m = [
|
|
434
435
|
{ label: c.equities, value: V.Stocks },
|
|
435
436
|
{ label: c.bonds, value: V.Bonds }
|
|
@@ -440,7 +441,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
440
441
|
{
|
|
441
442
|
color: "primary",
|
|
442
443
|
exclusive: !0,
|
|
443
|
-
onChange: (
|
|
444
|
+
onChange: (s, y) => y && u(y),
|
|
444
445
|
sx: {
|
|
445
446
|
width: "100%",
|
|
446
447
|
"& .MuiToggleButton-root": {
|
|
@@ -450,19 +451,19 @@ const de = ({ sx: t = {} }) => {
|
|
|
450
451
|
}
|
|
451
452
|
},
|
|
452
453
|
value: f.length ? g : -1,
|
|
453
|
-
children: m.map(({ label:
|
|
454
|
+
children: m.map(({ label: s, value: y }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: y, children: s }, y))
|
|
454
455
|
}
|
|
455
456
|
),
|
|
456
457
|
f.length ? /* @__PURE__ */ e(
|
|
457
|
-
|
|
458
|
+
ee,
|
|
458
459
|
{
|
|
459
460
|
sx: {
|
|
460
461
|
"& .MuiListItemSecondaryAction-root": { pr: 12 },
|
|
461
|
-
"& .MuiListItem-divider": { borderColor: "
|
|
462
|
+
"& .MuiListItem-divider": { borderColor: "border.light" },
|
|
462
463
|
"& .MuiListItem-root": { minHeight: 44, px: 12 }
|
|
463
464
|
},
|
|
464
|
-
children: f.map(({ value:
|
|
465
|
-
|
|
465
|
+
children: f.map(({ value: s, formattedKey: y }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(i, { children: s }), children: /* @__PURE__ */ e(
|
|
466
|
+
Xe,
|
|
466
467
|
{
|
|
467
468
|
primary: y,
|
|
468
469
|
primaryTypographyProps: { fontStyle: "normal" }
|
|
@@ -471,7 +472,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
471
472
|
}
|
|
472
473
|
) : /* @__PURE__ */ o(ae, { children: [
|
|
473
474
|
/* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
|
|
474
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
|
|
475
476
|
/* @__PURE__ */ e(
|
|
476
477
|
de,
|
|
477
478
|
{
|
|
@@ -482,27 +483,27 @@ const de = ({ sx: t = {} }) => {
|
|
|
482
483
|
)
|
|
483
484
|
] })
|
|
484
485
|
] });
|
|
485
|
-
},
|
|
486
|
-
/* @__PURE__ */ e(i, { bold: !0, variant: "
|
|
487
|
-
/* @__PURE__ */ e(ve, { variant: "
|
|
488
|
-
] }),
|
|
486
|
+
}, lt = ({ body: t, title: g }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
|
|
487
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: g }),
|
|
488
|
+
/* @__PURE__ */ e(ve, { variant: "ParagraphSmall", children: t })
|
|
489
|
+
] }), ct = ({
|
|
489
490
|
placement: t = "bottom",
|
|
490
491
|
tooltip_info_body: g,
|
|
491
492
|
tooltip_info_title: c
|
|
492
493
|
}) => /* @__PURE__ */ e(
|
|
493
|
-
|
|
494
|
+
$e,
|
|
494
495
|
{
|
|
495
496
|
enterTouchDelay: 500,
|
|
496
497
|
placement: t,
|
|
497
|
-
title: /* @__PURE__ */ e(
|
|
498
|
-
children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(
|
|
498
|
+
title: /* @__PURE__ */ e(lt, { body: g, title: c }),
|
|
499
|
+
children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
|
|
499
500
|
}
|
|
500
|
-
),
|
|
501
|
+
), dt = () => {
|
|
501
502
|
const {
|
|
502
503
|
investments: { analysis: t }
|
|
503
|
-
} = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } =
|
|
504
|
+
} = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } = H(), f = pe("(min-width:320px) and (max-width:375px)"), { isMobile: m } = U(), y = Re().palette.mode === "dark", { cellDimension: d, columns: b, rows: l, textVariant: h } = A.useMemo(() => {
|
|
504
505
|
const r = u === V.Stocks, n = Object.values(r ? t.stock_column_labels : t.bond_column_labels), p = Object.values(r ? t.stock_row_labels : t.bond_row_labels);
|
|
505
|
-
return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "
|
|
506
|
+
return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "XSmall" : "Body" };
|
|
506
507
|
}, [t, m, u]);
|
|
507
508
|
return /* @__PURE__ */ o(
|
|
508
509
|
_,
|
|
@@ -577,7 +578,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
577
578
|
children: [
|
|
578
579
|
/* @__PURE__ */ e(i, { bold: !0, children: t.invest_analysis }),
|
|
579
580
|
/* @__PURE__ */ e(
|
|
580
|
-
|
|
581
|
+
ct,
|
|
581
582
|
{
|
|
582
583
|
tooltip_info_body: t.tooltip_info_body,
|
|
583
584
|
tooltip_info_title: t.tooltip_info_title
|
|
@@ -586,8 +587,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
586
587
|
]
|
|
587
588
|
}
|
|
588
589
|
),
|
|
589
|
-
g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C,
|
|
590
|
-
const
|
|
590
|
+
g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, S) => {
|
|
591
|
+
const B = n === 0, I = n === p.length - 1, W = S === 0, G = S === r.length - 1, F = Number(C.replace("%", "")) >= 25;
|
|
591
592
|
let T = "grey.200", j = "grey.900";
|
|
592
593
|
return y ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
|
|
593
594
|
_,
|
|
@@ -596,8 +597,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
596
597
|
...{
|
|
597
598
|
borderBottomLeftRadius: I && W ? 4 : 0,
|
|
598
599
|
borderBottomRightRadius: I && G ? 4 : 0,
|
|
599
|
-
borderTopLeftRadius:
|
|
600
|
-
borderTopRightRadius:
|
|
600
|
+
borderTopLeftRadius: B && W ? 4 : 0,
|
|
601
|
+
borderTopRightRadius: B && G ? 4 : 0
|
|
601
602
|
},
|
|
602
603
|
alignItems: "center",
|
|
603
604
|
bgcolor: T,
|
|
@@ -612,12 +613,12 @@ const de = ({ sx: t = {} }) => {
|
|
|
612
613
|
color: j,
|
|
613
614
|
fontWeight: m ? 600 : 700
|
|
614
615
|
},
|
|
615
|
-
variant: m ? "
|
|
616
|
+
variant: m ? "Body" : "H3",
|
|
616
617
|
children: C
|
|
617
618
|
}
|
|
618
619
|
)
|
|
619
620
|
},
|
|
620
|
-
|
|
621
|
+
S
|
|
621
622
|
);
|
|
622
623
|
}) }, n)),
|
|
623
624
|
/* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((r) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: d }, children: /* @__PURE__ */ e(i, { color: "secondary.main", variant: h, children: r }) }, r)) }),
|
|
@@ -650,7 +651,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
650
651
|
]
|
|
651
652
|
}
|
|
652
653
|
);
|
|
653
|
-
},
|
|
654
|
+
}, mt = P(dt), ut = ({
|
|
654
655
|
accountHoldingsData: t,
|
|
655
656
|
currentEditedCostBasis: g,
|
|
656
657
|
editingHoldingId: c,
|
|
@@ -658,7 +659,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
658
659
|
handleCostBasisClick: v,
|
|
659
660
|
handleCostBasisChange: f,
|
|
660
661
|
handleCostBasisKeyDown: m,
|
|
661
|
-
isOpen:
|
|
662
|
+
isOpen: s,
|
|
662
663
|
onClose: y
|
|
663
664
|
}) => {
|
|
664
665
|
const { investments: d } = M(), [b, l] = A.useState({}), h = (r) => (n, p) => {
|
|
@@ -671,24 +672,24 @@ const de = ({ sx: t = {} }) => {
|
|
|
671
672
|
qe,
|
|
672
673
|
{
|
|
673
674
|
ariaLabelClose: d.overview.close_investment_drawer,
|
|
674
|
-
isOpen:
|
|
675
|
+
isOpen: s,
|
|
675
676
|
onClose: y,
|
|
676
677
|
title: d.overview.investment_details,
|
|
677
678
|
children: [
|
|
678
679
|
/* @__PURE__ */ o(x, { sx: { gap: 8, p: 24 }, children: [
|
|
679
680
|
/* @__PURE__ */ e(
|
|
680
|
-
|
|
681
|
+
ne,
|
|
681
682
|
{
|
|
682
683
|
alt: t.accounts.institutionName || "",
|
|
683
684
|
institutionGuid: t.accounts.institution_guid || "",
|
|
684
685
|
size: 64
|
|
685
686
|
}
|
|
686
687
|
),
|
|
687
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "
|
|
688
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "
|
|
688
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
|
|
689
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
|
|
689
690
|
/* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
690
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
691
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
691
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: d.overview.current_balance }),
|
|
692
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
|
|
692
693
|
currency: "USD",
|
|
693
694
|
maximumFractionDigits: 2,
|
|
694
695
|
minimumFractionDigits: 2,
|
|
@@ -707,8 +708,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
707
708
|
py: 10
|
|
708
709
|
},
|
|
709
710
|
children: [
|
|
710
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "
|
|
711
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "
|
|
711
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.holding }),
|
|
712
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.market_value })
|
|
712
713
|
]
|
|
713
714
|
}
|
|
714
715
|
),
|
|
@@ -735,7 +736,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
735
736
|
{ height: 64 },
|
|
736
737
|
b[r.id] && n > 0 && {
|
|
737
738
|
borderTop: 1,
|
|
738
|
-
borderColor: "
|
|
739
|
+
borderColor: "border.main"
|
|
739
740
|
}
|
|
740
741
|
],
|
|
741
742
|
children: /* @__PURE__ */ o(x, { sx: { flexDirection: "row", width: "100%" }, children: [
|
|
@@ -754,7 +755,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
754
755
|
},
|
|
755
756
|
b[r.id] && {
|
|
756
757
|
borderBottom: 1,
|
|
757
|
-
borderColor: "
|
|
758
|
+
borderColor: "border.main"
|
|
758
759
|
}
|
|
759
760
|
],
|
|
760
761
|
children: [
|
|
@@ -767,8 +768,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
767
768
|
gap: 12
|
|
768
769
|
},
|
|
769
770
|
children: /* @__PURE__ */ o(x, { sx: { overflow: "hidden", width: 98 }, children: [
|
|
770
|
-
/* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "
|
|
771
|
-
/* @__PURE__ */ e(i, { variant: "
|
|
771
|
+
/* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "Body", children: r.holding }),
|
|
772
|
+
/* @__PURE__ */ e(i, { variant: "XSmall", children: r.description })
|
|
772
773
|
] })
|
|
773
774
|
}
|
|
774
775
|
),
|
|
@@ -784,7 +785,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
784
785
|
},
|
|
785
786
|
children: [
|
|
786
787
|
/* @__PURE__ */ o(x, { children: [
|
|
787
|
-
/* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "
|
|
788
|
+
/* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: r.marketValue?.toLocaleString("en-US", {
|
|
788
789
|
currency: "USD",
|
|
789
790
|
maximumFractionDigits: 2,
|
|
790
791
|
minimumFractionDigits: 2,
|
|
@@ -792,7 +793,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
792
793
|
}) }),
|
|
793
794
|
/* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
|
|
794
795
|
r.totalGainLoss !== 0 && /* @__PURE__ */ e(
|
|
795
|
-
|
|
796
|
+
k,
|
|
796
797
|
{
|
|
797
798
|
name: r.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
798
799
|
size: 12,
|
|
@@ -810,11 +811,11 @@ const de = ({ sx: t = {} }) => {
|
|
|
810
811
|
color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
811
812
|
fontWeight: r.totalGainLoss <= 0 ? 400 : 700
|
|
812
813
|
},
|
|
813
|
-
variant: "
|
|
814
|
+
variant: "XSmall",
|
|
814
815
|
children: r.costBasis ? `${(r.totalGainLoss / r.costBasis * 100).toFixed(2)}%` : "0.00%"
|
|
815
816
|
}
|
|
816
817
|
),
|
|
817
|
-
/* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "
|
|
818
|
+
/* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
|
|
818
819
|
/* @__PURE__ */ e(
|
|
819
820
|
i,
|
|
820
821
|
{
|
|
@@ -822,7 +823,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
822
823
|
color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
823
824
|
fontWeight: r.totalGainLoss <= 0 ? 400 : 700
|
|
824
825
|
},
|
|
825
|
-
variant: "
|
|
826
|
+
variant: "XSmall",
|
|
826
827
|
children: Math.abs(r.totalGainLoss).toLocaleString("en-US", {
|
|
827
828
|
currency: "USD",
|
|
828
829
|
maximumFractionDigits: 2,
|
|
@@ -834,7 +835,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
834
835
|
] })
|
|
835
836
|
] }),
|
|
836
837
|
/* @__PURE__ */ e(
|
|
837
|
-
|
|
838
|
+
k,
|
|
838
839
|
{
|
|
839
840
|
name: b[r.id] ? "expand_less" : "expand_more",
|
|
840
841
|
size: 20
|
|
@@ -867,15 +868,15 @@ const de = ({ sx: t = {} }) => {
|
|
|
867
868
|
sx: {
|
|
868
869
|
alignItems: "center",
|
|
869
870
|
borderBottom: 1,
|
|
870
|
-
borderColor: "
|
|
871
|
+
borderColor: "border.main",
|
|
871
872
|
flexDirection: "row",
|
|
872
873
|
height: 48,
|
|
873
874
|
justifyContent: "space-between",
|
|
874
875
|
pr: 24
|
|
875
876
|
},
|
|
876
877
|
children: [
|
|
877
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "
|
|
878
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "
|
|
878
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.quantity }),
|
|
879
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: r.qty })
|
|
879
880
|
]
|
|
880
881
|
}
|
|
881
882
|
),
|
|
@@ -890,7 +891,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
890
891
|
pr: 24
|
|
891
892
|
},
|
|
892
893
|
children: [
|
|
893
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "
|
|
894
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.cost_basis_header }),
|
|
894
895
|
/* @__PURE__ */ o(
|
|
895
896
|
x,
|
|
896
897
|
{
|
|
@@ -901,7 +902,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
901
902
|
},
|
|
902
903
|
children: [
|
|
903
904
|
p ? /* @__PURE__ */ e(
|
|
904
|
-
|
|
905
|
+
Se,
|
|
905
906
|
{
|
|
906
907
|
autoFocus: !0,
|
|
907
908
|
onBlur: () => u(r.id),
|
|
@@ -923,7 +924,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
923
924
|
},
|
|
924
925
|
value: g
|
|
925
926
|
}
|
|
926
|
-
) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "
|
|
927
|
+
) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: r.costBasis?.toLocaleString("en-US", {
|
|
927
928
|
currency: "USD",
|
|
928
929
|
maximumFractionDigits: 2,
|
|
929
930
|
minimumFractionDigits: 2,
|
|
@@ -934,7 +935,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
934
935
|
{
|
|
935
936
|
onClick: () => v(r.id, r.costBasis),
|
|
936
937
|
sx: { minWidth: 16, minHeight: 16 },
|
|
937
|
-
children: /* @__PURE__ */ e(
|
|
938
|
+
children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
|
|
938
939
|
}
|
|
939
940
|
)
|
|
940
941
|
]
|
|
@@ -955,10 +956,10 @@ const de = ({ sx: t = {} }) => {
|
|
|
955
956
|
]
|
|
956
957
|
}
|
|
957
958
|
);
|
|
958
|
-
},
|
|
959
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "
|
|
960
|
-
/* @__PURE__ */ e(
|
|
961
|
-
] }),
|
|
959
|
+
}, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ye, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
960
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
|
|
961
|
+
/* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
|
|
962
|
+
] }), gt = ({
|
|
962
963
|
data: t,
|
|
963
964
|
editingHoldingId: g,
|
|
964
965
|
currentEditedCostBasis: c,
|
|
@@ -967,10 +968,10 @@ const de = ({ sx: t = {} }) => {
|
|
|
967
968
|
handleCostBasisKeyDown: f,
|
|
968
969
|
handleCostBasisBlur: m
|
|
969
970
|
}) => {
|
|
970
|
-
const { investments:
|
|
971
|
+
const { investments: s } = M(), d = le().palette.mode === "dark", b = "success.main", l = d ? "grey.300" : "grey.700", h = (n, p = "lesserThan") => p === "greaterThan" ? n >= 0 ? b : l : n <= 0 ? l : b, r = [
|
|
971
972
|
{
|
|
972
973
|
field: "qty",
|
|
973
|
-
headerName:
|
|
974
|
+
headerName: s.overview.qty_header,
|
|
974
975
|
sortable: !1,
|
|
975
976
|
width: 48,
|
|
976
977
|
align: "center",
|
|
@@ -978,9 +979,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
978
979
|
},
|
|
979
980
|
{
|
|
980
981
|
field: "holding",
|
|
981
|
-
headerName:
|
|
982
|
+
headerName: s.overview.holding_header,
|
|
982
983
|
flex: 1,
|
|
983
|
-
renderHeader:
|
|
984
|
+
renderHeader: q,
|
|
984
985
|
renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
|
|
985
986
|
/* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, children: n.row.holding }),
|
|
986
987
|
/* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
|
|
@@ -988,14 +989,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
988
989
|
},
|
|
989
990
|
{
|
|
990
991
|
field: "costBasis",
|
|
991
|
-
headerName:
|
|
992
|
+
headerName: s.overview.cost_basis_header,
|
|
992
993
|
width: 132,
|
|
993
|
-
renderHeader:
|
|
994
|
+
renderHeader: q,
|
|
994
995
|
renderCell: (n) => {
|
|
995
996
|
const p = g === n.row.id;
|
|
996
997
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
997
998
|
p ? /* @__PURE__ */ e(
|
|
998
|
-
|
|
999
|
+
Se,
|
|
999
1000
|
{
|
|
1000
1001
|
autoFocus: !0,
|
|
1001
1002
|
onBlur: () => m(n.row.id),
|
|
@@ -1017,7 +1018,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1017
1018
|
},
|
|
1018
1019
|
value: c
|
|
1019
1020
|
}
|
|
1020
|
-
) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "
|
|
1021
|
+
) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
|
|
1021
1022
|
currency: "USD",
|
|
1022
1023
|
maximumFractionDigits: 2,
|
|
1023
1024
|
minimumFractionDigits: 2,
|
|
@@ -1028,7 +1029,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1028
1029
|
{
|
|
1029
1030
|
onClick: () => u(n.row.id, n.row.costBasis),
|
|
1030
1031
|
sx: { minWidth: 12, minHeight: 12 },
|
|
1031
|
-
children: /* @__PURE__ */ e(
|
|
1032
|
+
children: /* @__PURE__ */ e(k, { name: "stylus", size: 12, sx: { color: "grey.700" } })
|
|
1032
1033
|
}
|
|
1033
1034
|
)
|
|
1034
1035
|
] });
|
|
@@ -1038,14 +1039,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
1038
1039
|
},
|
|
1039
1040
|
{
|
|
1040
1041
|
field: "totalGainLoss",
|
|
1041
|
-
headerName:
|
|
1042
|
+
headerName: s.overview.total_gain_loss_header,
|
|
1042
1043
|
width: 196,
|
|
1043
|
-
renderHeader:
|
|
1044
|
+
renderHeader: q,
|
|
1044
1045
|
renderCell: (n) => {
|
|
1045
1046
|
const p = n.row.costBasis, C = p ? n.row.totalGainLoss / p * 100 : 0;
|
|
1046
1047
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
1047
1048
|
n.value !== 0 && /* @__PURE__ */ e(
|
|
1048
|
-
|
|
1049
|
+
k,
|
|
1049
1050
|
{
|
|
1050
1051
|
name: n.value > 0 ? "trending_up" : "trending_down",
|
|
1051
1052
|
size: 16,
|
|
@@ -1063,11 +1064,11 @@ const de = ({ sx: t = {} }) => {
|
|
|
1063
1064
|
color: h(n.value),
|
|
1064
1065
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1065
1066
|
},
|
|
1066
|
-
variant: "
|
|
1067
|
+
variant: "Small",
|
|
1067
1068
|
children: p ? `${C.toFixed(2)}%` : "0.00%"
|
|
1068
1069
|
}
|
|
1069
1070
|
),
|
|
1070
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1071
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1071
1072
|
/* @__PURE__ */ e(
|
|
1072
1073
|
i,
|
|
1073
1074
|
{
|
|
@@ -1075,7 +1076,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1075
1076
|
color: h(n.value),
|
|
1076
1077
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1077
1078
|
},
|
|
1078
|
-
variant: "
|
|
1079
|
+
variant: "Small",
|
|
1079
1080
|
children: Math.abs(n.value).toLocaleString("en-US", {
|
|
1080
1081
|
currency: "USD",
|
|
1081
1082
|
maximumFractionDigits: 2,
|
|
@@ -1092,10 +1093,10 @@ const de = ({ sx: t = {} }) => {
|
|
|
1092
1093
|
},
|
|
1093
1094
|
{
|
|
1094
1095
|
field: "marketValue",
|
|
1095
|
-
headerName:
|
|
1096
|
+
headerName: s.overview.market_value_header,
|
|
1096
1097
|
width: 132,
|
|
1097
|
-
renderHeader:
|
|
1098
|
-
renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "
|
|
1098
|
+
renderHeader: q,
|
|
1099
|
+
renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
|
|
1099
1100
|
currency: "USD",
|
|
1100
1101
|
maximumFractionDigits: 2,
|
|
1101
1102
|
minimumFractionDigits: 2,
|
|
@@ -1106,7 +1107,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1106
1107
|
}
|
|
1107
1108
|
];
|
|
1108
1109
|
return /* @__PURE__ */ e(
|
|
1109
|
-
|
|
1110
|
+
ie,
|
|
1110
1111
|
{
|
|
1111
1112
|
sx: {
|
|
1112
1113
|
boxShadow: "none",
|
|
@@ -1126,48 +1127,48 @@ const de = ({ sx: t = {} }) => {
|
|
|
1126
1127
|
)
|
|
1127
1128
|
}
|
|
1128
1129
|
);
|
|
1129
|
-
},
|
|
1130
|
-
const { isMobile: t } =
|
|
1130
|
+
}, pt = () => {
|
|
1131
|
+
const { isMobile: t } = U(), [g, c] = O({}), [u, v] = O(!1), { selectedAccountGuids: f } = Q(), { visibleHoldings: m, updateHoldings: s } = H(), [y, d] = A.useState(!1), [b, l] = O({
|
|
1131
1132
|
accounts: [],
|
|
1132
1133
|
holdings: []
|
|
1133
|
-
}), { accounts: h, investments: r } = M(), { isCopyLoaded: n } =
|
|
1134
|
-
C(
|
|
1135
|
-
},
|
|
1136
|
-
const w =
|
|
1137
|
-
/^\d*\.?\d*$/.test(w) &&
|
|
1138
|
-
}, me = (
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
const w = m.find(({ guid: E }) => E ===
|
|
1134
|
+
}), { accounts: h, investments: r } = M(), { isCopyLoaded: n } = Q(), [p, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", G = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? G : F : a <= 0 ? F : G, j = (a, w) => {
|
|
1135
|
+
C(a), B(w.toFixed(2));
|
|
1136
|
+
}, J = (a) => {
|
|
1137
|
+
const w = a.target.value;
|
|
1138
|
+
/^\d*\.?\d*$/.test(w) && B(w);
|
|
1139
|
+
}, me = (a, w) => {
|
|
1140
|
+
a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
|
|
1141
|
+
}, Z = (a) => {
|
|
1142
|
+
const w = m.find(({ guid: E }) => E === a);
|
|
1142
1143
|
if (!w) return;
|
|
1143
|
-
const N = Number(
|
|
1144
|
-
if (
|
|
1144
|
+
const N = Number(S);
|
|
1145
|
+
if (s({ ...w, cost_basis: N }), t) {
|
|
1145
1146
|
const E = b.holdings.map(
|
|
1146
|
-
(
|
|
1147
|
+
(D) => D.id === a ? { ...D, costBasis: N } : D
|
|
1147
1148
|
);
|
|
1148
|
-
l((
|
|
1149
|
-
...
|
|
1149
|
+
l((D) => ({
|
|
1150
|
+
...D,
|
|
1150
1151
|
holdings: E
|
|
1151
1152
|
}));
|
|
1152
1153
|
}
|
|
1153
1154
|
C(null);
|
|
1154
|
-
}, Le = (
|
|
1155
|
+
}, Le = (a) => (w, N) => {
|
|
1155
1156
|
c((E) => ({
|
|
1156
1157
|
...E,
|
|
1157
|
-
[
|
|
1158
|
+
[a]: N
|
|
1158
1159
|
}));
|
|
1159
|
-
}, { visibleHoldings: ue } =
|
|
1160
|
-
({ guid:
|
|
1161
|
-
), Ae =
|
|
1162
|
-
({ account_guid:
|
|
1163
|
-
).reduce((
|
|
1160
|
+
}, { visibleHoldings: ue } = H(), { visibleInvestmentAccounts: Ie } = se(), X = Ie.filter(
|
|
1161
|
+
({ guid: a }) => f.includes(a)
|
|
1162
|
+
), Ae = X.reduce((a, w) => a + (w.balance || 0), 0), Be = X.map(({ guid: a }) => a), $ = ue.filter(
|
|
1163
|
+
({ account_guid: a }) => Be.includes(a)
|
|
1164
|
+
).reduce((a, w) => {
|
|
1164
1165
|
const N = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
|
|
1165
|
-
return
|
|
1166
|
+
return a + N;
|
|
1166
1167
|
}, 0), Te = () => {
|
|
1167
1168
|
v(!1);
|
|
1168
1169
|
};
|
|
1169
1170
|
return n ? /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
|
|
1170
|
-
!!
|
|
1171
|
+
!!X.length && /* @__PURE__ */ o(x, { sx: { alignItems: "center" }, children: [
|
|
1171
1172
|
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, children: r.overview.total_portfolio }),
|
|
1172
1173
|
/* @__PURE__ */ e(fe, { children: Ae.toLocaleString("en-US", {
|
|
1173
1174
|
currency: "USD",
|
|
@@ -1177,19 +1178,19 @@ const de = ({ sx: t = {} }) => {
|
|
|
1177
1178
|
}) }),
|
|
1178
1179
|
/* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
1179
1180
|
/* @__PURE__ */ e(
|
|
1180
|
-
|
|
1181
|
+
k,
|
|
1181
1182
|
{
|
|
1182
|
-
name:
|
|
1183
|
+
name: $ >= 0 ? "trending_up" : "trending_down",
|
|
1183
1184
|
size: 20,
|
|
1184
|
-
sx: { color: T(
|
|
1185
|
+
sx: { color: T($, "greaterThan") }
|
|
1185
1186
|
}
|
|
1186
1187
|
),
|
|
1187
1188
|
/* @__PURE__ */ e(
|
|
1188
1189
|
i,
|
|
1189
1190
|
{
|
|
1190
|
-
sx: { color: T(
|
|
1191
|
-
variant: "
|
|
1192
|
-
children:
|
|
1191
|
+
sx: { color: T($, "greaterThan"), fontWeight: 700 },
|
|
1192
|
+
variant: "Small",
|
|
1193
|
+
children: $.toLocaleString("en-US", {
|
|
1193
1194
|
currency: "USD",
|
|
1194
1195
|
maximumFractionDigits: 2,
|
|
1195
1196
|
minimumFractionDigits: 2,
|
|
@@ -1199,8 +1200,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
1199
1200
|
)
|
|
1200
1201
|
] })
|
|
1201
1202
|
] }),
|
|
1202
|
-
|
|
1203
|
-
const w = ue.filter((L) => L.account_guid ===
|
|
1203
|
+
X.map((a) => {
|
|
1204
|
+
const w = ue.filter((L) => L.account_guid === a.guid).map((L) => ({
|
|
1204
1205
|
id: L.guid,
|
|
1205
1206
|
qty: L.shares || 0,
|
|
1206
1207
|
holding: L.symbol || L.description || "Unknown",
|
|
@@ -1208,18 +1209,18 @@ const de = ({ sx: t = {} }) => {
|
|
|
1208
1209
|
totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
|
|
1209
1210
|
marketValue: L.market_value || 0,
|
|
1210
1211
|
description: L.description || ""
|
|
1211
|
-
})), N = w.length > 0, E =
|
|
1212
|
+
})), N = w.length > 0, E = a.balance, D = w.reduce(
|
|
1212
1213
|
(L, Fe) => Fe.totalGainLoss + L,
|
|
1213
1214
|
0
|
|
1214
|
-
), he = E ?
|
|
1215
|
+
), he = E ? D / E * 100 : 0;
|
|
1215
1216
|
if (t)
|
|
1216
1217
|
return /* @__PURE__ */ e(
|
|
1217
|
-
|
|
1218
|
+
ie,
|
|
1218
1219
|
{
|
|
1219
1220
|
onClick: w.length ? () => {
|
|
1220
1221
|
v(!0), l({
|
|
1221
1222
|
holdings: w,
|
|
1222
|
-
accounts:
|
|
1223
|
+
accounts: a
|
|
1223
1224
|
});
|
|
1224
1225
|
} : void 0,
|
|
1225
1226
|
sx: {
|
|
@@ -1231,7 +1232,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1231
1232
|
{
|
|
1232
1233
|
sx: {
|
|
1233
1234
|
border: 1,
|
|
1234
|
-
borderColor: "
|
|
1235
|
+
borderColor: "border.main",
|
|
1235
1236
|
borderRadius: "8px",
|
|
1236
1237
|
ml: 16,
|
|
1237
1238
|
mr: 16,
|
|
@@ -1245,7 +1246,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1245
1246
|
sx: {
|
|
1246
1247
|
alignItems: "center",
|
|
1247
1248
|
borderBottom: 1,
|
|
1248
|
-
borderColor: "
|
|
1249
|
+
borderColor: "border.main",
|
|
1249
1250
|
flexDirection: "row",
|
|
1250
1251
|
pb: 14,
|
|
1251
1252
|
pl: 14,
|
|
@@ -1253,16 +1254,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
1253
1254
|
},
|
|
1254
1255
|
children: [
|
|
1255
1256
|
/* @__PURE__ */ e(
|
|
1256
|
-
|
|
1257
|
+
ne,
|
|
1257
1258
|
{
|
|
1258
|
-
alt:
|
|
1259
|
-
institutionGuid:
|
|
1259
|
+
alt: a.institutionName || "",
|
|
1260
|
+
institutionGuid: a.institution_guid || "",
|
|
1260
1261
|
size: 32
|
|
1261
1262
|
}
|
|
1262
1263
|
),
|
|
1263
1264
|
/* @__PURE__ */ o(x, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
|
|
1264
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1265
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1265
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
|
|
1266
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
|
|
1266
1267
|
] })
|
|
1267
1268
|
]
|
|
1268
1269
|
}
|
|
@@ -1284,7 +1285,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1284
1285
|
sx: {
|
|
1285
1286
|
alignItems: "center",
|
|
1286
1287
|
borderRight: 1,
|
|
1287
|
-
borderColor: "
|
|
1288
|
+
borderColor: "border.main",
|
|
1288
1289
|
flex: 1,
|
|
1289
1290
|
justifyContent: "center",
|
|
1290
1291
|
pb: 14,
|
|
@@ -1293,7 +1294,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1293
1294
|
pt: 14
|
|
1294
1295
|
},
|
|
1295
1296
|
children: [
|
|
1296
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "
|
|
1297
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: r.overview.total_gain_Loss }),
|
|
1297
1298
|
/* @__PURE__ */ o(
|
|
1298
1299
|
x,
|
|
1299
1300
|
{
|
|
@@ -1304,38 +1305,38 @@ const de = ({ sx: t = {} }) => {
|
|
|
1304
1305
|
justifyContent: "flex-end"
|
|
1305
1306
|
},
|
|
1306
1307
|
children: [
|
|
1307
|
-
|
|
1308
|
-
|
|
1308
|
+
D !== 0 && /* @__PURE__ */ e(
|
|
1309
|
+
k,
|
|
1309
1310
|
{
|
|
1310
|
-
name:
|
|
1311
|
+
name: D > 0 ? "trending_up" : "trending_down",
|
|
1311
1312
|
size: 20,
|
|
1312
|
-
sx: { color: T(
|
|
1313
|
+
sx: { color: T(D) }
|
|
1313
1314
|
}
|
|
1314
1315
|
),
|
|
1315
1316
|
/* @__PURE__ */ o(
|
|
1316
1317
|
i,
|
|
1317
1318
|
{
|
|
1318
1319
|
sx: {
|
|
1319
|
-
color: T(
|
|
1320
|
+
color: T(D),
|
|
1320
1321
|
fontWeight: 600
|
|
1321
1322
|
},
|
|
1322
|
-
variant: "
|
|
1323
|
+
variant: "Body",
|
|
1323
1324
|
children: [
|
|
1324
1325
|
he.toFixed(2),
|
|
1325
1326
|
"%"
|
|
1326
1327
|
]
|
|
1327
1328
|
}
|
|
1328
1329
|
),
|
|
1329
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1330
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1330
1331
|
/* @__PURE__ */ e(
|
|
1331
1332
|
i,
|
|
1332
1333
|
{
|
|
1333
1334
|
sx: {
|
|
1334
|
-
color: T(
|
|
1335
|
+
color: T(D),
|
|
1335
1336
|
fontWeight: 600
|
|
1336
1337
|
},
|
|
1337
|
-
variant: "
|
|
1338
|
-
children: Math.abs(
|
|
1338
|
+
variant: "Body",
|
|
1339
|
+
children: Math.abs(D).toLocaleString("en-US", {
|
|
1339
1340
|
currency: "USD",
|
|
1340
1341
|
maximumFractionDigits: 2,
|
|
1341
1342
|
minimumFractionDigits: 2,
|
|
@@ -1362,8 +1363,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
1362
1363
|
pt: 14
|
|
1363
1364
|
},
|
|
1364
1365
|
children: [
|
|
1365
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1366
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1366
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
|
|
1367
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
|
|
1367
1368
|
currency: "USD",
|
|
1368
1369
|
maximumFractionDigits: 2,
|
|
1369
1370
|
minimumFractionDigits: 2,
|
|
@@ -1379,14 +1380,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
1379
1380
|
}
|
|
1380
1381
|
)
|
|
1381
1382
|
},
|
|
1382
|
-
|
|
1383
|
+
a.guid
|
|
1383
1384
|
);
|
|
1384
|
-
const
|
|
1385
|
+
const ke = W ? "grey.700" : "grey.400", We = w.length ? "text.primary" : ke;
|
|
1385
1386
|
return /* @__PURE__ */ o(
|
|
1386
1387
|
_e,
|
|
1387
1388
|
{
|
|
1388
|
-
expanded: g[
|
|
1389
|
-
onChange: N ? Le(
|
|
1389
|
+
expanded: g[a.guid] === !0,
|
|
1390
|
+
onChange: N ? Le(a.guid) : () => {
|
|
1390
1391
|
},
|
|
1391
1392
|
sx: {
|
|
1392
1393
|
border: 1,
|
|
@@ -1401,9 +1402,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
1401
1402
|
"aria-controls": "panel1a-content",
|
|
1402
1403
|
id: "panel1a-header",
|
|
1403
1404
|
sx: [
|
|
1404
|
-
g[
|
|
1405
|
+
g[a.guid] && {
|
|
1405
1406
|
borderBottom: 1,
|
|
1406
|
-
borderColor: "
|
|
1407
|
+
borderColor: "border.main",
|
|
1407
1408
|
maxHeight: 88
|
|
1408
1409
|
}
|
|
1409
1410
|
],
|
|
@@ -1419,25 +1420,25 @@ const de = ({ sx: t = {} }) => {
|
|
|
1419
1420
|
width: "100%"
|
|
1420
1421
|
},
|
|
1421
1422
|
children: [
|
|
1422
|
-
/* @__PURE__ */ e(
|
|
1423
|
+
/* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color: We } }),
|
|
1423
1424
|
/* @__PURE__ */ e(
|
|
1424
|
-
|
|
1425
|
+
ne,
|
|
1425
1426
|
{
|
|
1426
|
-
alt:
|
|
1427
|
-
institutionGuid:
|
|
1427
|
+
alt: a.institutionName || "",
|
|
1428
|
+
institutionGuid: a.institution_guid || "",
|
|
1428
1429
|
size: 32
|
|
1429
1430
|
}
|
|
1430
1431
|
),
|
|
1431
1432
|
/* @__PURE__ */ o(x, { sx: { alignItems: "flex-start" }, children: [
|
|
1432
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1433
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1433
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
|
|
1434
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
|
|
1434
1435
|
] })
|
|
1435
1436
|
]
|
|
1436
1437
|
}
|
|
1437
1438
|
),
|
|
1438
1439
|
/* @__PURE__ */ o(x, { sx: { flexDirection: "row" }, children: [
|
|
1439
1440
|
/* @__PURE__ */ o(x, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
|
|
1440
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1441
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_gain_Loss }),
|
|
1441
1442
|
/* @__PURE__ */ o(
|
|
1442
1443
|
x,
|
|
1443
1444
|
{
|
|
@@ -1448,38 +1449,38 @@ const de = ({ sx: t = {} }) => {
|
|
|
1448
1449
|
justifyContent: "flex-end"
|
|
1449
1450
|
},
|
|
1450
1451
|
children: [
|
|
1451
|
-
|
|
1452
|
-
|
|
1452
|
+
D !== 0 && /* @__PURE__ */ e(
|
|
1453
|
+
k,
|
|
1453
1454
|
{
|
|
1454
|
-
name:
|
|
1455
|
+
name: D >= 0 ? "trending_up" : "trending_down",
|
|
1455
1456
|
size: 20,
|
|
1456
|
-
sx: { color: T(
|
|
1457
|
+
sx: { color: T(D) }
|
|
1457
1458
|
}
|
|
1458
1459
|
),
|
|
1459
1460
|
/* @__PURE__ */ o(
|
|
1460
1461
|
i,
|
|
1461
1462
|
{
|
|
1462
1463
|
sx: {
|
|
1463
|
-
color: T(
|
|
1464
|
+
color: T(D),
|
|
1464
1465
|
fontWeight: 600
|
|
1465
1466
|
},
|
|
1466
|
-
variant: "
|
|
1467
|
+
variant: "Body",
|
|
1467
1468
|
children: [
|
|
1468
1469
|
he.toFixed(2),
|
|
1469
1470
|
"%"
|
|
1470
1471
|
]
|
|
1471
1472
|
}
|
|
1472
1473
|
),
|
|
1473
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1474
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1474
1475
|
/* @__PURE__ */ e(
|
|
1475
1476
|
i,
|
|
1476
1477
|
{
|
|
1477
1478
|
sx: {
|
|
1478
|
-
color: T(
|
|
1479
|
+
color: T(D),
|
|
1479
1480
|
fontWeight: 600
|
|
1480
1481
|
},
|
|
1481
|
-
variant: "
|
|
1482
|
-
children: Math.abs(
|
|
1482
|
+
variant: "Body",
|
|
1483
|
+
children: Math.abs(D).toLocaleString("en-US", {
|
|
1483
1484
|
currency: "USD",
|
|
1484
1485
|
maximumFractionDigits: 2,
|
|
1485
1486
|
minimumFractionDigits: 2,
|
|
@@ -1492,8 +1493,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
1492
1493
|
)
|
|
1493
1494
|
] }),
|
|
1494
1495
|
/* @__PURE__ */ e(x, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end" }, children: [
|
|
1495
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "
|
|
1496
|
-
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "
|
|
1496
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
|
|
1497
|
+
/* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
|
|
1497
1498
|
currency: "USD",
|
|
1498
1499
|
maximumFractionDigits: 2,
|
|
1499
1500
|
minimumFractionDigits: 2,
|
|
@@ -1504,32 +1505,32 @@ const de = ({ sx: t = {} }) => {
|
|
|
1504
1505
|
]
|
|
1505
1506
|
}
|
|
1506
1507
|
),
|
|
1507
|
-
/* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(
|
|
1508
|
-
|
|
1508
|
+
/* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(ie, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
|
|
1509
|
+
gt,
|
|
1509
1510
|
{
|
|
1510
|
-
currentEditedCostBasis:
|
|
1511
|
+
currentEditedCostBasis: S,
|
|
1511
1512
|
data: w,
|
|
1512
1513
|
editingHoldingId: p,
|
|
1513
|
-
handleCostBasisBlur:
|
|
1514
|
-
handleCostBasisChange:
|
|
1514
|
+
handleCostBasisBlur: Z,
|
|
1515
|
+
handleCostBasisChange: J,
|
|
1515
1516
|
handleCostBasisClick: j,
|
|
1516
1517
|
handleCostBasisKeyDown: me
|
|
1517
1518
|
}
|
|
1518
1519
|
) }) })
|
|
1519
1520
|
]
|
|
1520
1521
|
},
|
|
1521
|
-
|
|
1522
|
+
a.guid
|
|
1522
1523
|
);
|
|
1523
1524
|
}),
|
|
1524
1525
|
/* @__PURE__ */ e(de, {}),
|
|
1525
1526
|
/* @__PURE__ */ e(
|
|
1526
|
-
|
|
1527
|
+
ht,
|
|
1527
1528
|
{
|
|
1528
1529
|
accountHoldingsData: b,
|
|
1529
|
-
currentEditedCostBasis:
|
|
1530
|
+
currentEditedCostBasis: S,
|
|
1530
1531
|
editingHoldingId: p,
|
|
1531
|
-
handleCostBasisBlur:
|
|
1532
|
-
handleCostBasisChange:
|
|
1532
|
+
handleCostBasisBlur: Z,
|
|
1533
|
+
handleCostBasisChange: J,
|
|
1533
1534
|
handleCostBasisClick: j,
|
|
1534
1535
|
handleCostBasisKeyDown: me,
|
|
1535
1536
|
isOpen: u,
|
|
@@ -1544,13 +1545,13 @@ const de = ({ sx: t = {} }) => {
|
|
|
1544
1545
|
title: h.manage_connections
|
|
1545
1546
|
}
|
|
1546
1547
|
)
|
|
1547
|
-
] }) : /* @__PURE__ */ e(
|
|
1548
|
-
},
|
|
1549
|
-
const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } =
|
|
1548
|
+
] }) : /* @__PURE__ */ e(De, {});
|
|
1549
|
+
}, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t }), sn = P(({ onBackClick: t, sx: g }) => {
|
|
1550
|
+
const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } = U(), { visibleInvestmentAccounts: f } = se(), {
|
|
1550
1551
|
visibleHoldings: m,
|
|
1551
|
-
setShowConnectionsWidget:
|
|
1552
|
+
setShowConnectionsWidget: s,
|
|
1552
1553
|
showConnectionsWidget: y
|
|
1553
|
-
} =
|
|
1554
|
+
} = H(), { investments: d, accounts: b } = M(), { isCopyLoaded: l, isInitialized: h, setSelectedAccounts: r } = Q(), [n, p] = A.useState(0), { loadHoldings: C } = H();
|
|
1554
1555
|
A.useEffect(() => {
|
|
1555
1556
|
r(f);
|
|
1556
1557
|
}, [f]), A.useEffect(() => {
|
|
@@ -1558,11 +1559,11 @@ const de = ({ sx: t = {} }) => {
|
|
|
1558
1559
|
u?.("InvestmentsWidget");
|
|
1559
1560
|
});
|
|
1560
1561
|
}, [h]);
|
|
1561
|
-
const
|
|
1562
|
+
const S = () => {
|
|
1562
1563
|
c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
|
|
1563
1564
|
};
|
|
1564
|
-
if (!l || !h) return /* @__PURE__ */ e(
|
|
1565
|
-
const
|
|
1565
|
+
if (!l || !h) return /* @__PURE__ */ e(De, {});
|
|
1566
|
+
const B = [
|
|
1566
1567
|
z.INVESTMENT_WIDGET_DETAILS_CLICK,
|
|
1567
1568
|
z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
|
|
1568
1569
|
z.INVESTMENT_WIDGET_ANALYSIS_CLICK
|
|
@@ -1575,7 +1576,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1575
1576
|
ze,
|
|
1576
1577
|
{
|
|
1577
1578
|
accountOptions: f,
|
|
1578
|
-
onAccountsFilterClick:
|
|
1579
|
+
onAccountsFilterClick: S,
|
|
1579
1580
|
onBackClick: t,
|
|
1580
1581
|
sx: g,
|
|
1581
1582
|
title: d.title,
|
|
@@ -1585,13 +1586,13 @@ const de = ({ sx: t = {} }) => {
|
|
|
1585
1586
|
Ge,
|
|
1586
1587
|
{
|
|
1587
1588
|
onChange: (G, F) => {
|
|
1588
|
-
p(F), c(
|
|
1589
|
+
p(F), c(B[F]);
|
|
1589
1590
|
},
|
|
1590
1591
|
sx: { bgcolor: "background.paper" },
|
|
1591
1592
|
textColor: "primary",
|
|
1592
1593
|
value: I ? -1 : n,
|
|
1593
1594
|
variant: "fullWidth",
|
|
1594
|
-
children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(
|
|
1595
|
+
children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: G }) }, G))
|
|
1595
1596
|
}
|
|
1596
1597
|
),
|
|
1597
1598
|
I ? /* @__PURE__ */ e(
|
|
@@ -1600,7 +1601,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1600
1601
|
header: d.empty_state_header,
|
|
1601
1602
|
icon: "bid_landscape",
|
|
1602
1603
|
onClick: () => {
|
|
1603
|
-
|
|
1604
|
+
s(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
1604
1605
|
},
|
|
1605
1606
|
primaryButton: d.overview.connect_accounts,
|
|
1606
1607
|
subText: d.empty_state_description,
|
|
@@ -1617,15 +1618,15 @@ const de = ({ sx: t = {} }) => {
|
|
|
1617
1618
|
}
|
|
1618
1619
|
}
|
|
1619
1620
|
) : /* @__PURE__ */ o(ae, { children: [
|
|
1620
|
-
n === 0 && /* @__PURE__ */ e(
|
|
1621
|
-
n === 1 && /* @__PURE__ */ e(
|
|
1622
|
-
n === 2 && /* @__PURE__ */ e(
|
|
1621
|
+
n === 0 && /* @__PURE__ */ e(xt, {}),
|
|
1622
|
+
n === 1 && /* @__PURE__ */ e(at, {}),
|
|
1623
|
+
n === 2 && /* @__PURE__ */ e(mt, {})
|
|
1623
1624
|
] })
|
|
1624
1625
|
] }),
|
|
1625
1626
|
/* @__PURE__ */ e(
|
|
1626
1627
|
ge,
|
|
1627
1628
|
{
|
|
1628
|
-
onClose: () =>
|
|
1629
|
+
onClose: () => s(!1),
|
|
1629
1630
|
showConnectionsWidget: y,
|
|
1630
1631
|
title: b.manage_connections
|
|
1631
1632
|
}
|
|
@@ -1635,5 +1636,5 @@ const de = ({ sx: t = {} }) => {
|
|
|
1635
1636
|
);
|
|
1636
1637
|
});
|
|
1637
1638
|
export {
|
|
1638
|
-
|
|
1639
|
+
sn as InvestmentsWidget
|
|
1639
1640
|
};
|