@mx-cartographer/experiences 9.0.3 → 9.1.0-alpha.bb1
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 +0 -4
- package/dist/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-Fii_xATx.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,87 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
1
|
+
import { J as ee, Pt as We, T as O, X as Fe, w as Ne } from "../core-BexP5oiV.mjs";
|
|
2
|
+
import { An as Ee, Gn as Ge, i as ge, lr as Me, mr as M, sr as H, vr as Ue } from "../accounts-DkyAiLpg.mjs";
|
|
3
|
+
import { n as je } from "../Analytics-BKzTPees.mjs";
|
|
4
|
+
import { d as pe, h as J, n as ae, p as G, t as xe, v as U } from "../Loader-BlVzRtUd.mjs";
|
|
5
|
+
import T, { useState as z } from "react";
|
|
6
|
+
import { observer as R } from "mobx-react-lite";
|
|
7
|
+
import f from "@mui/material/Stack";
|
|
8
|
+
import { InstitutionLogo as te, P as Q, Text as o } from "@mxenabled/mxui";
|
|
9
|
+
import He from "@mui/material/Button";
|
|
10
|
+
import ne from "@mui/material/Paper";
|
|
11
|
+
import { Icon as k } from "@mxenabled/mx-icons";
|
|
12
|
+
import { Fragment as se, jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
13
|
+
import { useTheme as X } from "@mui/material/styles";
|
|
14
|
+
import ze from "@mui/material/Box";
|
|
15
|
+
import Oe from "@mui/material/Tab";
|
|
16
|
+
import Ve from "@mui/material/Tabs";
|
|
15
17
|
import ye from "@mui/material/ToggleButton";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import Oe from "@mui/material/ListItemText";
|
|
28
|
-
import de from "@mui/material/IconButton";
|
|
29
|
-
import Ve from "@mui/material/Tooltip";
|
|
30
|
-
import be from "@mui/material/Accordion";
|
|
31
|
-
import _e from "@mui/material/AccordionDetails";
|
|
32
|
-
import we from "@mui/material/AccordionSummary";
|
|
33
|
-
import se from "@mui/material/Paper";
|
|
18
|
+
import ve from "@mui/material/ToggleButtonGroup";
|
|
19
|
+
import fe from "@mui/material/useMediaQuery";
|
|
20
|
+
import le from "@mui/material/IconButton";
|
|
21
|
+
import { Stack as Re } from "@mui/material";
|
|
22
|
+
import K from "@mui/material/Divider";
|
|
23
|
+
import $e from "@mui/material/Tooltip";
|
|
24
|
+
import ie from "@mui/material/List";
|
|
25
|
+
import oe from "@mui/material/ListItem";
|
|
26
|
+
import Pe from "@mui/material/ListItemButton";
|
|
27
|
+
import qe from "@mui/material/ListItemText";
|
|
28
|
+
import be from "@mui/material/TextField";
|
|
34
29
|
import p from "@mui/system/Stack";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
|
|
31
|
+
import Ye from "@mui/material/Collapse";
|
|
32
|
+
import _e from "@mui/material/Accordion";
|
|
33
|
+
import we from "@mui/material/AccordionDetails";
|
|
34
|
+
import Ce from "@mui/material/AccordionSummary";
|
|
35
|
+
var ce = ({ sx: n = {} }) => {
|
|
36
|
+
const { investments: g } = G(), { onEvent: c } = pe(), { setShowConnectionsWidget: m } = U();
|
|
37
|
+
return /* @__PURE__ */ i(f, {
|
|
38
|
+
sx: {
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
gap: 24,
|
|
41
|
+
height: 164,
|
|
42
|
+
p: 24,
|
|
43
|
+
width: "100%",
|
|
44
|
+
...n
|
|
45
|
+
},
|
|
46
|
+
children: [/* @__PURE__ */ i(f, {
|
|
47
|
+
className: "inner-container",
|
|
48
|
+
sx: {
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
gap: 8,
|
|
51
|
+
width: "100%",
|
|
52
|
+
textAlign: "center"
|
|
53
|
+
},
|
|
54
|
+
children: [/* @__PURE__ */ e(o, {
|
|
55
|
+
sx: { fontWeight: 600 },
|
|
56
|
+
variant: "body1",
|
|
57
|
+
children: g.overview.investment_accounts_footer
|
|
58
|
+
}), /* @__PURE__ */ e(o, {
|
|
51
59
|
sx: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
width: "100%",
|
|
55
|
-
textAlign: "center"
|
|
56
|
-
},
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ e(o, { sx: { fontWeight: 600 }, variant: "body1", children: u.overview.investment_accounts_footer }),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
o,
|
|
61
|
-
{
|
|
62
|
-
sx: {
|
|
63
|
-
color: "text.secondary",
|
|
64
|
-
fontWeight: 400
|
|
65
|
-
},
|
|
66
|
-
variant: "subtitle2",
|
|
67
|
-
children: u.overview.connect_more_accounts_description
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
Ue,
|
|
75
|
-
{
|
|
76
|
-
onClick: () => {
|
|
77
|
-
m(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
60
|
+
color: "text.secondary",
|
|
61
|
+
fontWeight: 400
|
|
78
62
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
63
|
+
variant: "subtitle2",
|
|
64
|
+
children: g.overview.connect_more_accounts_description
|
|
65
|
+
})]
|
|
66
|
+
}), /* @__PURE__ */ e(He, {
|
|
67
|
+
onClick: () => {
|
|
68
|
+
m(!0), c(H.ACCOUNTS_CLICK_CONNECT);
|
|
69
|
+
},
|
|
70
|
+
sx: { fontWeight: 600 },
|
|
71
|
+
variant: "outlined",
|
|
72
|
+
children: g.overview.connect_accounts
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
85
75
|
}, Je = {
|
|
86
76
|
allocations_cash: "#AEDCCC",
|
|
87
77
|
allocations_convertible: "#80CAD0",
|
|
@@ -92,917 +82,943 @@ const me = ({ sx: t = {} }) => {
|
|
|
92
82
|
allocations_unknown: "#161D6A",
|
|
93
83
|
allocations_us_bond: "#254995",
|
|
94
84
|
allocations_us_stock: "#1E2D84"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
name: "allocations_us_bond"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "allocations_us_stock"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "allocations_unknown"
|
|
122
|
-
}
|
|
123
|
-
], Ze = (t, u, c) => {
|
|
124
|
-
const m = u, f = c;
|
|
125
|
-
return t >= Math.min(m, f) && t < Math.max(m, f);
|
|
126
|
-
}, et = (t, u, c) => {
|
|
127
|
-
const m = [
|
|
128
|
-
...new Set(t.map((d) => d.name.toLowerCase()))
|
|
129
|
-
];
|
|
130
|
-
let f;
|
|
131
|
-
return m.map((d) => {
|
|
132
|
-
const l = t.reduce((x, h) => {
|
|
133
|
-
const b = h.name;
|
|
134
|
-
return b.toLowerCase() === d ? (f = b, Q(h) * h[u] / 100 + x) : x;
|
|
85
|
+
}, Qe = [
|
|
86
|
+
{ name: "allocations_cash" },
|
|
87
|
+
{ name: "allocations_convertible" },
|
|
88
|
+
{ name: "allocations_foreign_bond" },
|
|
89
|
+
{ name: "allocations_foreign_stock" },
|
|
90
|
+
{ name: "allocations_other" },
|
|
91
|
+
{ name: "allocations_preferred" },
|
|
92
|
+
{ name: "allocations_us_bond" },
|
|
93
|
+
{ name: "allocations_us_stock" },
|
|
94
|
+
{ name: "allocations_unknown" }
|
|
95
|
+
], Xe = (n, g, c) => {
|
|
96
|
+
const m = c === void 0 ? 0 : g, v = c === void 0 ? g : c;
|
|
97
|
+
return n >= Math.min(m, v) && n < Math.max(m, v);
|
|
98
|
+
}, Ze = (n, g, c) => {
|
|
99
|
+
const m = [...new Set(n.map((y) => y.name.toLowerCase()))];
|
|
100
|
+
let v;
|
|
101
|
+
return m.map((y) => {
|
|
102
|
+
const u = n.reduce((l, h) => {
|
|
103
|
+
const x = h.name;
|
|
104
|
+
return x.toLowerCase() === y ? (v = x, Y(h) * h[g] / 100 + l) : l;
|
|
135
105
|
}, 0);
|
|
136
106
|
return {
|
|
137
|
-
displayName:
|
|
138
|
-
name:
|
|
139
|
-
value:
|
|
140
|
-
percentage:
|
|
107
|
+
displayName: v,
|
|
108
|
+
name: v,
|
|
109
|
+
value: u,
|
|
110
|
+
percentage: u / c
|
|
141
111
|
};
|
|
142
112
|
});
|
|
143
|
-
},
|
|
144
|
-
const m = Object.values(
|
|
145
|
-
let
|
|
146
|
-
const
|
|
147
|
-
...
|
|
148
|
-
name:
|
|
149
|
-
gainLoss:
|
|
150
|
-
})), { cashBalance:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
), { marketValue:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
),
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
const k = et(
|
|
172
|
-
C,
|
|
173
|
-
n.name,
|
|
174
|
-
D
|
|
175
|
-
);
|
|
176
|
-
if (n.name === "allocations_cash" && x > 0) {
|
|
177
|
-
D += x;
|
|
178
|
-
const W = {
|
|
179
|
-
displayName: u.cash_balance_display_name,
|
|
113
|
+
}, Y = (n) => n.calculated_market_value ? n.calculated_market_value : n.market_value, et = (n, g, c) => {
|
|
114
|
+
const m = Object.values(g.allocations_list), v = [];
|
|
115
|
+
let y = 0;
|
|
116
|
+
const u = n.map(({ guid: t }) => t), l = c.filter(({ account_guid: t }) => u.includes(t)).map((t) => ({
|
|
117
|
+
...t,
|
|
118
|
+
name: t.symbol || t.description,
|
|
119
|
+
gainLoss: t.cost_basis || t.cost_basis === 0 ? Y(t) - t.cost_basis : 0
|
|
120
|
+
})), { cashBalance: h, totalAccountBalance: x } = n.reduce((t, d) => ({
|
|
121
|
+
cashBalance: t.cashBalance + (d.cash_balance || 0),
|
|
122
|
+
totalAccountBalance: t.totalAccountBalance + (d.balance || 0)
|
|
123
|
+
}), {
|
|
124
|
+
cashBalance: 0,
|
|
125
|
+
totalAccountBalance: 0
|
|
126
|
+
}), { marketValue: _, totalGainLoss: a } = l.reduce((t, d) => ({
|
|
127
|
+
marketValue: t.marketValue + Y(d),
|
|
128
|
+
totalGainLoss: t.totalGainLoss + d.gainLoss
|
|
129
|
+
}), {
|
|
130
|
+
marketValue: 0,
|
|
131
|
+
totalGainLoss: 0
|
|
132
|
+
}), r = _ + h;
|
|
133
|
+
return Qe.forEach((t, d) => {
|
|
134
|
+
const D = l.filter((I) => !!I[t.name]);
|
|
135
|
+
let w = D.reduce((I, B) => I + Y(B) * B[t.name] / 100, 0);
|
|
136
|
+
const L = Ze(D, t.name, w);
|
|
137
|
+
if (t.name === "allocations_cash" && h > 0) {
|
|
138
|
+
w += h;
|
|
139
|
+
const I = {
|
|
140
|
+
displayName: g.cash_balance_display_name,
|
|
180
141
|
name: "allocations_name",
|
|
181
|
-
value:
|
|
182
|
-
percentage:
|
|
142
|
+
value: h,
|
|
143
|
+
percentage: h / r
|
|
183
144
|
};
|
|
184
|
-
|
|
145
|
+
L.push(I);
|
|
185
146
|
}
|
|
186
|
-
|
|
187
|
-
name:
|
|
188
|
-
displayName: m[
|
|
189
|
-
guid: `${
|
|
190
|
-
holdings:
|
|
191
|
-
percentage:
|
|
192
|
-
value:
|
|
193
|
-
color: Je[
|
|
194
|
-
}),
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
({ displayName:
|
|
198
|
-
id:
|
|
199
|
-
color:
|
|
200
|
-
label:
|
|
201
|
-
value:
|
|
202
|
-
})
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
totalAmount: v,
|
|
208
|
-
totalGainLoss: s,
|
|
209
|
-
totalMarketValue: y,
|
|
210
|
-
totalGainLossPercentage: s / h
|
|
147
|
+
w > 0 && (v.push({
|
|
148
|
+
name: t.name,
|
|
149
|
+
displayName: m[d],
|
|
150
|
+
guid: `${t.name}-${d}`,
|
|
151
|
+
holdings: L,
|
|
152
|
+
percentage: w / r,
|
|
153
|
+
value: w,
|
|
154
|
+
color: Je[t.name]
|
|
155
|
+
}), y += w);
|
|
156
|
+
}), {
|
|
157
|
+
investmentsData: v,
|
|
158
|
+
donutData: v.map(({ displayName: t, guid: d, color: D, value: w }) => ({
|
|
159
|
+
id: d,
|
|
160
|
+
color: D,
|
|
161
|
+
label: t,
|
|
162
|
+
value: w / y * 100
|
|
163
|
+
})),
|
|
164
|
+
totalAmount: y,
|
|
165
|
+
totalGainLoss: a,
|
|
166
|
+
totalMarketValue: r,
|
|
167
|
+
totalGainLossPercentage: a / x
|
|
211
168
|
};
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}, {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
{
|
|
169
|
+
}, re = (n) => n < 1e-3 ? "< 0.1%" : Fe(n), V = (n) => n === 0 ? ee(n, "0,0.00") : Xe(n, -0.01, 0.01) ? "< $0.01" : ee(n, "0,0.00"), tt = ({ data: n, onSelected: g, selectedId: c, selectedTabs: m, setSelectedTabs: v }) => {
|
|
170
|
+
const y = (a, r) => {
|
|
171
|
+
r !== null && v(r);
|
|
172
|
+
}, { isMobile: u } = M(), { investments: { allocation: l } } = G(), h = [{
|
|
173
|
+
label: l.tabs_label_dollar,
|
|
174
|
+
value: 0
|
|
175
|
+
}, {
|
|
176
|
+
label: l.tabs_label_percent,
|
|
177
|
+
value: 1
|
|
178
|
+
}], x = !n?.investmentsData.length, { isSmallMobile: _ } = M();
|
|
179
|
+
return /* @__PURE__ */ i(f, {
|
|
180
|
+
sx: {
|
|
181
|
+
mt: 15,
|
|
182
|
+
gap: 12,
|
|
183
|
+
width: u ? 250 : 412
|
|
184
|
+
},
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ e(ve, {
|
|
231
187
|
exclusive: !0,
|
|
232
188
|
fullWidth: !0,
|
|
233
|
-
onChange:
|
|
234
|
-
value:
|
|
235
|
-
children:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
189
|
+
onChange: y,
|
|
190
|
+
value: x ? -1 : m,
|
|
191
|
+
children: h.map(({ label: a, value: r }) => /* @__PURE__ */ e(ye, {
|
|
192
|
+
color: "primary",
|
|
193
|
+
value: r,
|
|
194
|
+
children: /* @__PURE__ */ e(o, {
|
|
195
|
+
bold: !0,
|
|
196
|
+
textTransform: "capitalize",
|
|
197
|
+
variant: "body1",
|
|
198
|
+
children: a
|
|
199
|
+
})
|
|
200
|
+
}, a))
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ e(ie, {
|
|
203
|
+
sx: { px: 12 },
|
|
204
|
+
children: n.investmentsData.map((a) => /* @__PURE__ */ i(T.Fragment, { children: [
|
|
205
|
+
/* @__PURE__ */ e(oe, {
|
|
206
|
+
disableGutters: !0,
|
|
207
|
+
disablePadding: !0,
|
|
208
|
+
sx: { minHeight: 44 },
|
|
209
|
+
children: /* @__PURE__ */ i(Pe, {
|
|
210
|
+
"aria-expanded": c === a.guid,
|
|
211
|
+
onClick: () => g(a.guid),
|
|
212
|
+
sx: {
|
|
213
|
+
minHeight: 44,
|
|
214
|
+
px: 12,
|
|
215
|
+
py: 0
|
|
216
|
+
},
|
|
217
|
+
children: [/* @__PURE__ */ e(ze, {
|
|
218
|
+
borderRadius: 4,
|
|
219
|
+
flexShrink: 0,
|
|
220
|
+
height: 8,
|
|
221
|
+
sx: {
|
|
222
|
+
backgroundColor: a.color,
|
|
223
|
+
mr: 8
|
|
224
|
+
},
|
|
225
|
+
width: 8
|
|
226
|
+
}), /* @__PURE__ */ i(f, {
|
|
227
|
+
alignItems: "center",
|
|
228
|
+
direction: "row",
|
|
229
|
+
justifyContent: "space-between",
|
|
230
|
+
width: "100%",
|
|
231
|
+
children: [/* @__PURE__ */ e(o, {
|
|
232
|
+
bold: c === a.guid,
|
|
233
|
+
children: a.displayName
|
|
234
|
+
}), /* @__PURE__ */ e(o, {
|
|
235
|
+
bold: c === a.guid,
|
|
236
|
+
variant: "body1",
|
|
237
|
+
children: m === 0 ? V(a.value) : re(a.percentage)
|
|
238
|
+
})]
|
|
239
|
+
})]
|
|
240
|
+
})
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ e(K, {}),
|
|
243
|
+
a.holdings && a.holdings.length > 0 && /* @__PURE__ */ e(Ye, {
|
|
244
|
+
in: c === a.guid,
|
|
245
|
+
unmountOnExit: !0,
|
|
246
|
+
children: /* @__PURE__ */ i(ie, { children: [a?.holdings?.map((r) => /* @__PURE__ */ e(oe, {
|
|
247
|
+
sx: {
|
|
248
|
+
pl: 24,
|
|
249
|
+
pr: 8,
|
|
250
|
+
py: 0
|
|
251
|
+
},
|
|
252
|
+
children: /* @__PURE__ */ i(f, {
|
|
253
|
+
direction: "row",
|
|
254
|
+
justifyContent: "space-between",
|
|
255
|
+
width: "100%",
|
|
256
|
+
children: [/* @__PURE__ */ i(o, { children: [r.displayName, " "] }), /* @__PURE__ */ e(o, { children: m === 0 ? V(r.value) : re(r.percentage) })]
|
|
257
|
+
})
|
|
258
|
+
}, r.displayName)), /* @__PURE__ */ e(K, {})] })
|
|
259
|
+
})
|
|
260
|
+
] }, a.guid))
|
|
261
|
+
}),
|
|
262
|
+
x ? /* @__PURE__ */ i(se, { children: [
|
|
263
|
+
/* @__PURE__ */ e(o, {
|
|
244
264
|
sx: {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Ge,
|
|
249
|
-
{
|
|
250
|
-
"aria-expanded": c === s.guid,
|
|
251
|
-
onClick: () => u(s.guid),
|
|
252
|
-
sx: { minHeight: 44, px: 12, py: 0 },
|
|
253
|
-
children: [
|
|
254
|
-
/* @__PURE__ */ e(
|
|
255
|
-
Ne,
|
|
256
|
-
{
|
|
257
|
-
borderRadius: 4,
|
|
258
|
-
flexShrink: 0,
|
|
259
|
-
height: 8,
|
|
260
|
-
sx: { backgroundColor: s.color, mr: 8 },
|
|
261
|
-
width: 8
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
/* @__PURE__ */ i(
|
|
265
|
-
_,
|
|
266
|
-
{
|
|
267
|
-
alignItems: "center",
|
|
268
|
-
direction: "row",
|
|
269
|
-
justifyContent: "space-between",
|
|
270
|
-
width: "100%",
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ e(o, { bold: c === s.guid, children: s.displayName }),
|
|
273
|
-
/* @__PURE__ */ e(o, { bold: c === s.guid, variant: "body1", children: m === 0 ? R(s.value) : ae(s.percentage) })
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
)
|
|
277
|
-
]
|
|
278
|
-
}
|
|
279
|
-
)
|
|
280
|
-
}
|
|
281
|
-
),
|
|
282
|
-
/* @__PURE__ */ e(Y, {}),
|
|
283
|
-
s.holdings && s.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === s.guid, unmountOnExit: !0, children: /* @__PURE__ */ i(ne, { children: [
|
|
284
|
-
s?.holdings?.map((y) => /* @__PURE__ */ e(
|
|
285
|
-
ie,
|
|
286
|
-
{
|
|
287
|
-
sx: {
|
|
288
|
-
pl: 24,
|
|
289
|
-
pr: 8,
|
|
290
|
-
py: 0
|
|
291
|
-
},
|
|
292
|
-
children: /* @__PURE__ */ i(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
293
|
-
/* @__PURE__ */ i(o, { children: [
|
|
294
|
-
y.displayName,
|
|
295
|
-
" "
|
|
296
|
-
] }),
|
|
297
|
-
/* @__PURE__ */ e(o, { children: m === 0 ? R(y.value) : ae(y.percentage) })
|
|
298
|
-
] })
|
|
265
|
+
color: "secondary.main",
|
|
266
|
+
p: 8,
|
|
267
|
+
textAlign: "center"
|
|
299
268
|
},
|
|
300
|
-
|
|
301
|
-
)
|
|
302
|
-
/* @__PURE__ */ e(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
{
|
|
269
|
+
children: l.empty_data
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ e(K, {}),
|
|
272
|
+
/* @__PURE__ */ e(ce, { sx: { ".inner-container": { width: _ ? "100%" : 364 } } })
|
|
273
|
+
] }) : m === 0 && /* @__PURE__ */ e(o, {
|
|
274
|
+
bold: !0,
|
|
275
|
+
sx: {
|
|
276
|
+
textAlign: "right",
|
|
277
|
+
pr: 24
|
|
278
|
+
},
|
|
279
|
+
children: `${l.total_label_text} ${V(n.totalAmount)}`
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
});
|
|
283
|
+
}, nt = ({ data: n, hoveredId: g, isPercentage: c, onMouseEnter: m, onMouseLeave: v, onSelected: y, selectedId: u, size: l = 150, totalLabel: h }) => {
|
|
284
|
+
const x = X(), _ = x.palette.mode === "dark", a = T.useMemo(() => u ? n.investmentsData.find(({ guid: I }) => I === u) : void 0, [u]), { investments: { allocation: r } } = G(), t = T.useMemo(() => n.donutData.length > 0 ? n.donutData : [{
|
|
285
|
+
id: "0",
|
|
286
|
+
color: x.palette.neutral.light,
|
|
287
|
+
value: 100
|
|
288
|
+
}], [n, x]), d = _ ? "#0AC295" : "#09A57F", D = _ ? "grey.300" : "grey.700", w = () => a ? r.pie_chart_centered_click_for_details : c ? re(n.totalGainLossPercentage) : V(n.totalGainLoss), L = n.totalGainLoss >= 0 ? d : D;
|
|
289
|
+
return /* @__PURE__ */ e(Ue, {
|
|
290
|
+
data: t,
|
|
291
|
+
hoveredId: g,
|
|
292
|
+
onClick: y,
|
|
293
|
+
onMouseEnter: m,
|
|
294
|
+
onMouseLeave: v,
|
|
295
|
+
selectedId: u,
|
|
296
|
+
size: l,
|
|
297
|
+
children: /* @__PURE__ */ e(f, {
|
|
298
|
+
alignItems: "center",
|
|
299
|
+
height: "100%",
|
|
300
|
+
justifyContent: "center",
|
|
301
|
+
width: "100%",
|
|
302
|
+
children: /* @__PURE__ */ e(f, {
|
|
303
|
+
alignItems: "center",
|
|
304
|
+
justifyContent: "center",
|
|
305
|
+
minHeight: l,
|
|
306
|
+
minWidth: l,
|
|
307
|
+
children: /* @__PURE__ */ i(f, {
|
|
308
|
+
alignItems: "center",
|
|
311
309
|
sx: {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
data: t,
|
|
320
|
-
hoveredId: u,
|
|
321
|
-
isPercentage: c,
|
|
322
|
-
onMouseEnter: m,
|
|
323
|
-
onMouseLeave: f,
|
|
324
|
-
onSelected: v,
|
|
325
|
-
selectedId: d,
|
|
326
|
-
size: l = 150,
|
|
327
|
-
totalLabel: x
|
|
328
|
-
}) => {
|
|
329
|
-
const h = Z(), b = h.palette.mode === "dark", s = T.useMemo(
|
|
330
|
-
() => d ? t.investmentsData.find(({ guid: k }) => k === d) : void 0,
|
|
331
|
-
[d]
|
|
332
|
-
), {
|
|
333
|
-
investments: { allocation: y }
|
|
334
|
-
} = N(), r = T.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: h.palette.neutral.light, value: 100 }], [t, h]), n = b ? "#0AC295" : "#09A57F", g = b ? "grey.300" : "grey.700", C = () => s ? y.pie_chart_centered_click_for_details : c ? ae(t.totalGainLossPercentage) : R(t.totalGainLoss), D = t.totalGainLoss >= 0 ? n : g;
|
|
335
|
-
return /* @__PURE__ */ e(
|
|
336
|
-
He,
|
|
337
|
-
{
|
|
338
|
-
data: r,
|
|
339
|
-
hoveredId: u,
|
|
340
|
-
onClick: v,
|
|
341
|
-
onMouseEnter: m,
|
|
342
|
-
onMouseLeave: f,
|
|
343
|
-
selectedId: d,
|
|
344
|
-
size: l,
|
|
345
|
-
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: l, minWidth: l, children: /* @__PURE__ */ i(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
|
|
346
|
-
/* @__PURE__ */ e(o, { color: "text.secondary", noWrap: !0, children: s?.displayName ?? x }),
|
|
347
|
-
/* @__PURE__ */ e(X, { color: "text.primary", variant: "h1", children: R(s?.value ?? t.totalMarketValue) }),
|
|
348
|
-
/* @__PURE__ */ i(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
349
|
-
!s && /* @__PURE__ */ e(
|
|
350
|
-
B,
|
|
351
|
-
{
|
|
352
|
-
name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
353
|
-
size: 20,
|
|
354
|
-
sx: { color: D }
|
|
310
|
+
gap: {
|
|
311
|
+
xs: 4,
|
|
312
|
+
xl: 8
|
|
313
|
+
},
|
|
314
|
+
mb: {
|
|
315
|
+
xs: 4,
|
|
316
|
+
xl: 8
|
|
355
317
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
o,
|
|
359
|
-
|
|
318
|
+
},
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ e(o, {
|
|
321
|
+
color: "text.secondary",
|
|
322
|
+
noWrap: !0,
|
|
323
|
+
children: a?.displayName ?? h
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ e(Q, {
|
|
326
|
+
color: "text.primary",
|
|
327
|
+
variant: "h1",
|
|
328
|
+
children: V(a?.value ?? n.totalMarketValue)
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ i(f, {
|
|
360
331
|
sx: {
|
|
361
|
-
|
|
362
|
-
|
|
332
|
+
alignItems: "center",
|
|
333
|
+
flexDirection: "row",
|
|
334
|
+
gap: 4
|
|
363
335
|
},
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
336
|
+
children: [!a && /* @__PURE__ */ e(k, {
|
|
337
|
+
name: n.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
338
|
+
size: 20,
|
|
339
|
+
sx: { color: L }
|
|
340
|
+
}), /* @__PURE__ */ e(o, {
|
|
341
|
+
sx: {
|
|
342
|
+
color: L,
|
|
343
|
+
fontWeight: 700
|
|
344
|
+
},
|
|
345
|
+
variant: "body2",
|
|
346
|
+
children: w()
|
|
347
|
+
})]
|
|
348
|
+
})
|
|
349
|
+
]
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
})
|
|
353
|
+
});
|
|
354
|
+
}, it = () => {
|
|
355
|
+
const [n, g] = T.useState(0), [c, m] = T.useState(""), [v, y] = T.useState(""), u = (d) => {
|
|
356
|
+
c !== d ? m(d) : (m(""), y(""));
|
|
357
|
+
}, { selectedAccountGuids: l } = J(), { visibleHoldings: h } = U(), { visibleInvestmentAccounts: x } = ae(), { investments: { allocation: _ } } = G(), a = et(x.filter(({ guid: d }) => l.includes(d)), _, h), { isMobile: r } = M(), t = fe("(max-width:768px)");
|
|
358
|
+
return /* @__PURE__ */ i(f, {
|
|
359
|
+
alignItems: t ? "center" : "flex-start",
|
|
360
|
+
direction: t ? "column" : "row",
|
|
361
|
+
gap: {
|
|
362
|
+
xs: 16,
|
|
363
|
+
md: 64,
|
|
364
|
+
xl: 100
|
|
365
|
+
},
|
|
366
|
+
sx: {
|
|
367
|
+
justifyContent: "center",
|
|
368
|
+
mt: 50,
|
|
369
|
+
width: "100%"
|
|
370
|
+
},
|
|
371
|
+
children: [/* @__PURE__ */ e(nt, {
|
|
372
|
+
data: a,
|
|
373
|
+
hoveredId: v,
|
|
374
|
+
isPercentage: n === 1,
|
|
375
|
+
onMouseEnter: (d) => {
|
|
376
|
+
c === d ? y("") : c || y(d);
|
|
392
377
|
},
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
/* @__PURE__ */ e(
|
|
413
|
-
nt,
|
|
414
|
-
{
|
|
415
|
-
data: s,
|
|
416
|
-
onSelected: d,
|
|
417
|
-
selectedId: c,
|
|
418
|
-
selectedTabs: t,
|
|
419
|
-
setSelectedTabs: u
|
|
420
|
-
}
|
|
421
|
-
)
|
|
422
|
-
]
|
|
423
|
-
}
|
|
424
|
-
);
|
|
425
|
-
}, rt = $(ot), st = ({
|
|
426
|
-
analysisDetails: t,
|
|
427
|
-
analysisType: u,
|
|
428
|
-
copy: c,
|
|
429
|
-
setAnalysisType: m
|
|
430
|
-
}) => {
|
|
431
|
-
const { isSmallMobile: f } = j(), v = T.useMemo(() => Object.keys(t).filter((l) => t[l] >= 1).map((l) => ({
|
|
378
|
+
onMouseLeave: () => {
|
|
379
|
+
y("");
|
|
380
|
+
},
|
|
381
|
+
onSelected: u,
|
|
382
|
+
selectedId: c,
|
|
383
|
+
size: r ? 280 : 400,
|
|
384
|
+
totalLabel: _.pie_chart_centered_text
|
|
385
|
+
}), /* @__PURE__ */ e(tt, {
|
|
386
|
+
data: a,
|
|
387
|
+
onSelected: u,
|
|
388
|
+
selectedId: c,
|
|
389
|
+
selectedTabs: n,
|
|
390
|
+
setSelectedTabs: g
|
|
391
|
+
})]
|
|
392
|
+
});
|
|
393
|
+
}, ot = R(it), rt = ({ analysisDetails: n, analysisType: g, copy: c, setAnalysisType: m }) => {
|
|
394
|
+
const { isSmallMobile: v } = M(), y = T.useMemo(() => Object.keys(n).filter((l) => n[l] >= 1).map((l) => ({
|
|
432
395
|
key: l,
|
|
433
|
-
value:
|
|
434
|
-
formattedKey:
|
|
435
|
-
})), [
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
{
|
|
396
|
+
value: ee(n[l], "0,0"),
|
|
397
|
+
formattedKey: Ne(l)
|
|
398
|
+
})), [n]), u = [{
|
|
399
|
+
label: c.equities,
|
|
400
|
+
value: O.Stocks
|
|
401
|
+
}, {
|
|
402
|
+
label: c.bonds,
|
|
403
|
+
value: O.Bonds
|
|
404
|
+
}];
|
|
405
|
+
return /* @__PURE__ */ i(f, {
|
|
406
|
+
sx: {
|
|
407
|
+
gap: 12,
|
|
408
|
+
width: { md: 412 }
|
|
409
|
+
},
|
|
410
|
+
children: [/* @__PURE__ */ e(ve, {
|
|
411
|
+
color: "primary",
|
|
412
|
+
exclusive: !0,
|
|
413
|
+
onChange: (l, h) => h && m(h),
|
|
414
|
+
sx: {
|
|
415
|
+
width: "100%",
|
|
416
|
+
"& .MuiToggleButton-root": {
|
|
417
|
+
color: "secondary.main",
|
|
418
|
+
fontWeight: 600,
|
|
419
|
+
textTransform: "capitalize"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
value: y.length ? g : -1,
|
|
423
|
+
children: u.map(({ label: l, value: h }) => /* @__PURE__ */ e(ye, {
|
|
424
|
+
sx: { width: "100%" },
|
|
425
|
+
value: h,
|
|
426
|
+
children: l
|
|
427
|
+
}, h))
|
|
428
|
+
}), y.length ? /* @__PURE__ */ e(ie, {
|
|
429
|
+
sx: {
|
|
430
|
+
"& .MuiListItemSecondaryAction-root": { pr: 12 },
|
|
431
|
+
"& .MuiListItem-divider": { borderColor: "neutral.light" },
|
|
432
|
+
"& .MuiListItem-root": {
|
|
433
|
+
minHeight: 44,
|
|
434
|
+
px: 12
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
children: y.map(({ value: l, formattedKey: h }) => /* @__PURE__ */ e(oe, {
|
|
438
|
+
divider: !0,
|
|
439
|
+
secondaryAction: /* @__PURE__ */ e(o, { children: l }),
|
|
440
|
+
children: /* @__PURE__ */ e(qe, {
|
|
441
|
+
primary: h,
|
|
442
|
+
slotProps: { primary: { fontStyle: "normal" } }
|
|
443
|
+
})
|
|
444
|
+
}, h))
|
|
445
|
+
}) : /* @__PURE__ */ i(se, { children: [
|
|
446
|
+
/* @__PURE__ */ e(o, {
|
|
461
447
|
sx: {
|
|
462
|
-
"
|
|
463
|
-
|
|
464
|
-
|
|
448
|
+
color: "secondary.main",
|
|
449
|
+
p: 8,
|
|
450
|
+
textAlign: "center"
|
|
465
451
|
},
|
|
466
|
-
children:
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
/* @__PURE__ */ e(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
)
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
} =
|
|
506
|
-
const r = m ===
|
|
507
|
-
return {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
452
|
+
children: c.empty_data
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ e(K, { sx: { borderColor: "neutral.light" } }),
|
|
455
|
+
/* @__PURE__ */ e(ce, { sx: { ".inner-container": { width: v ? "100%" : 364 } } })
|
|
456
|
+
] })]
|
|
457
|
+
});
|
|
458
|
+
}, at = ({ body: n, title: g }) => /* @__PURE__ */ i(f, {
|
|
459
|
+
sx: {
|
|
460
|
+
gap: 4,
|
|
461
|
+
p: 12
|
|
462
|
+
},
|
|
463
|
+
children: [/* @__PURE__ */ e(o, {
|
|
464
|
+
bold: !0,
|
|
465
|
+
variant: "body1",
|
|
466
|
+
children: g
|
|
467
|
+
}), /* @__PURE__ */ e(Q, {
|
|
468
|
+
variant: "subtitle2",
|
|
469
|
+
children: n
|
|
470
|
+
})]
|
|
471
|
+
}), st = ({ placement: n = "bottom", tooltip_info_body: g, tooltip_info_title: c }) => /* @__PURE__ */ e($e, {
|
|
472
|
+
enterTouchDelay: 500,
|
|
473
|
+
placement: n,
|
|
474
|
+
title: /* @__PURE__ */ e(at, {
|
|
475
|
+
body: g,
|
|
476
|
+
title: c
|
|
477
|
+
}),
|
|
478
|
+
children: /* @__PURE__ */ e(le, {
|
|
479
|
+
"aria-label": c,
|
|
480
|
+
sx: {
|
|
481
|
+
minHeight: 0,
|
|
482
|
+
minWidth: 0,
|
|
483
|
+
p: 0
|
|
484
|
+
},
|
|
485
|
+
children: /* @__PURE__ */ e(k, {
|
|
486
|
+
name: "info",
|
|
487
|
+
sx: { color: "info.main" }
|
|
488
|
+
})
|
|
489
|
+
})
|
|
490
|
+
}), lt = () => {
|
|
491
|
+
const { investments: { analysis: n } } = G(), { analysisChartData: g, analysisDetails: c, analysisType: m, setAnalysisType: v } = U(), y = fe("(min-width:320px) and (max-width:375px)"), { isMobile: u } = M(), l = X().palette.mode === "dark", { cellDimension: h, columns: x, rows: _, textVariant: a } = T.useMemo(() => {
|
|
492
|
+
const r = m === O.Stocks, t = Object.values(r ? n.stock_column_labels : n.bond_column_labels), d = Object.values(r ? n.stock_row_labels : n.bond_row_labels);
|
|
493
|
+
return {
|
|
494
|
+
cellDimension: u ? 72 : 100,
|
|
495
|
+
columns: t,
|
|
496
|
+
rows: d,
|
|
497
|
+
textVariant: u ? "caption" : "body1"
|
|
498
|
+
};
|
|
499
|
+
}, [
|
|
500
|
+
n,
|
|
501
|
+
u,
|
|
502
|
+
m
|
|
503
|
+
]);
|
|
504
|
+
return /* @__PURE__ */ i(f, {
|
|
505
|
+
sx: {
|
|
506
|
+
flexDirection: { md: "row" },
|
|
507
|
+
gap: u ? 48 : 64,
|
|
508
|
+
justifyContent: "center",
|
|
509
|
+
pt: 48,
|
|
510
|
+
px: 16
|
|
511
|
+
},
|
|
512
|
+
children: [/* @__PURE__ */ i(f, {
|
|
512
513
|
sx: {
|
|
513
|
-
|
|
514
|
-
|
|
514
|
+
alignItems: "center",
|
|
515
|
+
flexDirection: "row",
|
|
515
516
|
justifyContent: "center",
|
|
516
|
-
|
|
517
|
-
px: 16
|
|
517
|
+
pr: { lg: 72 }
|
|
518
518
|
},
|
|
519
|
-
children: [
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
519
|
+
children: [/* @__PURE__ */ i(f, {
|
|
520
|
+
sx: {
|
|
521
|
+
alignItems: "center",
|
|
522
|
+
bottom: u ? 10 : 24,
|
|
523
|
+
gap: u ? 0 : 24,
|
|
524
|
+
position: "relative",
|
|
525
|
+
transform: "rotate(-180deg)",
|
|
526
|
+
writingMode: "vertical-rl"
|
|
527
|
+
},
|
|
528
|
+
children: [/* @__PURE__ */ e(Q, {
|
|
529
|
+
bold: !0,
|
|
530
|
+
color: "secondary.main",
|
|
531
|
+
variant: a,
|
|
532
|
+
children: m === O.Stocks ? n.market_capitalization : n.credit_quality
|
|
533
|
+
}), /* @__PURE__ */ e(f, {
|
|
534
|
+
sx: {
|
|
535
|
+
flexDirection: "row",
|
|
536
|
+
height: u ? 224 : 308,
|
|
537
|
+
justifyContent: "space-around"
|
|
538
|
+
},
|
|
539
|
+
children: x.map((r) => /* @__PURE__ */ e(o, {
|
|
540
|
+
sx: {
|
|
541
|
+
color: "secondary.main",
|
|
542
|
+
pl: 12,
|
|
543
|
+
pr: u ? 4 : 0
|
|
544
|
+
},
|
|
545
|
+
variant: a,
|
|
546
|
+
children: r
|
|
547
|
+
}, r))
|
|
548
|
+
})]
|
|
549
|
+
}), /* @__PURE__ */ i(f, {
|
|
550
|
+
sx: { gap: 4 },
|
|
551
|
+
children: [
|
|
552
|
+
/* @__PURE__ */ i(f, {
|
|
553
|
+
sx: {
|
|
554
|
+
alignSelf: y ? "start" : "center",
|
|
555
|
+
flexDirection: "row",
|
|
556
|
+
gap: 8,
|
|
557
|
+
pb: 12
|
|
558
|
+
},
|
|
559
|
+
children: [/* @__PURE__ */ e(o, {
|
|
560
|
+
bold: !0,
|
|
561
|
+
children: n.invest_analysis
|
|
562
|
+
}), /* @__PURE__ */ e(st, {
|
|
563
|
+
tooltip_info_body: n.tooltip_info_body,
|
|
564
|
+
tooltip_info_title: n.tooltip_info_title
|
|
565
|
+
})]
|
|
566
|
+
}),
|
|
567
|
+
g.map((r, t, d) => /* @__PURE__ */ e(f, {
|
|
523
568
|
sx: {
|
|
524
|
-
alignItems: "center",
|
|
525
569
|
flexDirection: "row",
|
|
526
|
-
|
|
527
|
-
pr: { lg: 72 }
|
|
570
|
+
gap: 4
|
|
528
571
|
},
|
|
529
|
-
children:
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
572
|
+
children: r.map((D, w) => {
|
|
573
|
+
const L = t === 0, I = t === d.length - 1, B = w === 0, F = w === r.length - 1, N = Number(D.replace("%", "")) >= 25;
|
|
574
|
+
let S = "grey.200", E = "grey.900";
|
|
575
|
+
return l ? (S = N ? "grey.200" : "grey.700", E = N ? "grey.900" : "common.white") : (S = N ? "grey.700" : "grey.200", E = N ? "common.white" : "grey.900"), /* @__PURE__ */ e(f, {
|
|
576
|
+
sx: {
|
|
577
|
+
borderBottomLeftRadius: I && B ? 4 : 0,
|
|
578
|
+
borderBottomRightRadius: I && F ? 4 : 0,
|
|
579
|
+
borderTopLeftRadius: L && B ? 4 : 0,
|
|
580
|
+
borderTopRightRadius: L && F ? 4 : 0,
|
|
581
|
+
alignItems: "center",
|
|
582
|
+
bgcolor: S,
|
|
583
|
+
height: h,
|
|
584
|
+
justifyContent: "center",
|
|
585
|
+
width: h
|
|
586
|
+
},
|
|
587
|
+
children: /* @__PURE__ */ e(o, {
|
|
533
588
|
sx: {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
gap: d ? 0 : 24,
|
|
537
|
-
position: "relative",
|
|
538
|
-
transform: "rotate(-180deg)",
|
|
539
|
-
writingMode: "vertical-rl"
|
|
589
|
+
color: E,
|
|
590
|
+
fontWeight: u ? 600 : 700
|
|
540
591
|
},
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
o,
|
|
553
|
-
{
|
|
554
|
-
sx: {
|
|
555
|
-
color: "secondary.main",
|
|
556
|
-
pl: 12,
|
|
557
|
-
pr: d ? 4 : 0
|
|
558
|
-
},
|
|
559
|
-
variant: y,
|
|
560
|
-
children: r
|
|
561
|
-
},
|
|
562
|
-
r
|
|
563
|
-
))
|
|
564
|
-
}
|
|
565
|
-
)
|
|
566
|
-
]
|
|
567
|
-
}
|
|
568
|
-
),
|
|
569
|
-
/* @__PURE__ */ i(_, { sx: { gap: 4 }, children: [
|
|
570
|
-
/* @__PURE__ */ i(
|
|
571
|
-
_,
|
|
572
|
-
{
|
|
573
|
-
sx: {
|
|
574
|
-
alignSelf: v ? "start" : "center",
|
|
575
|
-
flexDirection: "row",
|
|
576
|
-
gap: 8,
|
|
577
|
-
pb: 12
|
|
578
|
-
},
|
|
579
|
-
children: [
|
|
580
|
-
/* @__PURE__ */ e(o, { bold: !0, children: t.invest_analysis }),
|
|
581
|
-
/* @__PURE__ */ e(
|
|
582
|
-
lt,
|
|
583
|
-
{
|
|
584
|
-
tooltip_info_body: t.tooltip_info_body,
|
|
585
|
-
tooltip_info_title: t.tooltip_info_title
|
|
586
|
-
}
|
|
587
|
-
)
|
|
588
|
-
]
|
|
589
|
-
}
|
|
590
|
-
),
|
|
591
|
-
u.map((r, n, g) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, D) => {
|
|
592
|
-
const k = n === 0, W = n === g.length - 1, A = D === 0, G = D === r.length - 1, F = Number(C.replace("%", "")) >= 25;
|
|
593
|
-
let L = "grey.200", H = "grey.900";
|
|
594
|
-
return x ? (L = F ? "grey.200" : "grey.700", H = F ? "grey.900" : "common.white") : (L = F ? "grey.700" : "grey.200", H = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
|
|
595
|
-
_,
|
|
596
|
-
{
|
|
597
|
-
sx: {
|
|
598
|
-
...{
|
|
599
|
-
borderBottomLeftRadius: W && A ? 4 : 0,
|
|
600
|
-
borderBottomRightRadius: W && G ? 4 : 0,
|
|
601
|
-
borderTopLeftRadius: k && A ? 4 : 0,
|
|
602
|
-
borderTopRightRadius: k && G ? 4 : 0
|
|
603
|
-
},
|
|
604
|
-
alignItems: "center",
|
|
605
|
-
bgcolor: L,
|
|
606
|
-
height: h,
|
|
607
|
-
justifyContent: "center",
|
|
608
|
-
width: h
|
|
609
|
-
},
|
|
610
|
-
children: /* @__PURE__ */ e(
|
|
611
|
-
o,
|
|
612
|
-
{
|
|
613
|
-
sx: {
|
|
614
|
-
color: H,
|
|
615
|
-
fontWeight: d ? 600 : 700
|
|
616
|
-
},
|
|
617
|
-
variant: d ? "body1" : "h3",
|
|
618
|
-
children: C
|
|
619
|
-
}
|
|
620
|
-
)
|
|
621
|
-
},
|
|
622
|
-
D
|
|
623
|
-
);
|
|
624
|
-
}) }, n)),
|
|
625
|
-
/* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: s.map((r) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: h }, children: /* @__PURE__ */ e(o, { color: "secondary.main", variant: y, children: r }) }, r)) }),
|
|
626
|
-
/* @__PURE__ */ e(
|
|
627
|
-
o,
|
|
628
|
-
{
|
|
629
|
-
bold: !0,
|
|
630
|
-
sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
|
|
631
|
-
variant: y,
|
|
632
|
-
children: m === V.Stocks ? t.valuation : t.duration
|
|
633
|
-
}
|
|
634
|
-
)
|
|
635
|
-
] })
|
|
636
|
-
]
|
|
637
|
-
}
|
|
638
|
-
),
|
|
639
|
-
/* @__PURE__ */ e(
|
|
640
|
-
st,
|
|
641
|
-
{
|
|
642
|
-
analysisDetails: c,
|
|
643
|
-
analysisType: m,
|
|
644
|
-
copy: {
|
|
645
|
-
empty_data: t.empty_data,
|
|
646
|
-
equities: t.equities,
|
|
647
|
-
bonds: t.bonds
|
|
592
|
+
variant: u ? "body1" : "h3",
|
|
593
|
+
children: D
|
|
594
|
+
})
|
|
595
|
+
}, w);
|
|
596
|
+
})
|
|
597
|
+
}, t)),
|
|
598
|
+
/* @__PURE__ */ e(f, {
|
|
599
|
+
sx: {
|
|
600
|
+
alignSelf: "center",
|
|
601
|
+
flexDirection: "row",
|
|
602
|
+
pt: 12
|
|
648
603
|
},
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
604
|
+
children: _.map((r) => /* @__PURE__ */ e(f, {
|
|
605
|
+
sx: {
|
|
606
|
+
alignItems: "center",
|
|
607
|
+
width: h
|
|
608
|
+
},
|
|
609
|
+
children: /* @__PURE__ */ e(o, {
|
|
610
|
+
color: "secondary.main",
|
|
611
|
+
variant: a,
|
|
612
|
+
children: r
|
|
613
|
+
})
|
|
614
|
+
}, r))
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ e(o, {
|
|
617
|
+
bold: !0,
|
|
618
|
+
sx: {
|
|
619
|
+
color: "secondary.main",
|
|
620
|
+
pt: u ? 4 : 24,
|
|
621
|
+
textAlign: "center"
|
|
622
|
+
},
|
|
623
|
+
variant: a,
|
|
624
|
+
children: m === O.Stocks ? n.valuation : n.duration
|
|
625
|
+
})
|
|
626
|
+
]
|
|
627
|
+
})]
|
|
628
|
+
}), /* @__PURE__ */ e(rt, {
|
|
629
|
+
analysisDetails: c,
|
|
630
|
+
analysisType: m,
|
|
631
|
+
copy: {
|
|
632
|
+
empty_data: n.empty_data,
|
|
633
|
+
equities: n.equities,
|
|
634
|
+
bonds: n.bonds
|
|
635
|
+
},
|
|
636
|
+
setAnalysisType: v
|
|
637
|
+
})]
|
|
638
|
+
});
|
|
639
|
+
}, ct = R(lt), dt = ({ accountHoldingsData: n, currentEditedCostBasis: g, editingHoldingId: c, handleCostBasisBlur: m, handleCostBasisClick: v, handleCostBasisChange: y, handleCostBasisKeyDown: u, isOpen: l, onClose: h }) => {
|
|
640
|
+
const { investments: x } = G(), [_, a] = T.useState({}), r = (t) => (d, D) => {
|
|
641
|
+
a((w) => ({
|
|
642
|
+
...w,
|
|
643
|
+
[t]: D
|
|
670
644
|
}));
|
|
671
645
|
};
|
|
672
|
-
return /* @__PURE__ */ i(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
),
|
|
689
|
-
/* @__PURE__ */ e(o, {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
] }),
|
|
701
|
-
/* @__PURE__ */ i(
|
|
702
|
-
p,
|
|
703
|
-
{
|
|
646
|
+
return /* @__PURE__ */ i(Me, {
|
|
647
|
+
ariaLabelClose: x.overview.close_investment_drawer,
|
|
648
|
+
isOpen: l,
|
|
649
|
+
onClose: h,
|
|
650
|
+
title: x.overview.investment_details,
|
|
651
|
+
children: [
|
|
652
|
+
/* @__PURE__ */ i(p, {
|
|
653
|
+
sx: {
|
|
654
|
+
gap: 8,
|
|
655
|
+
p: 24
|
|
656
|
+
},
|
|
657
|
+
children: [
|
|
658
|
+
/* @__PURE__ */ e(te, {
|
|
659
|
+
alt: n.accounts.institutionName || "",
|
|
660
|
+
institutionGuid: n.accounts.institution_guid || "",
|
|
661
|
+
size: 64
|
|
662
|
+
}),
|
|
663
|
+
/* @__PURE__ */ e(o, {
|
|
664
|
+
sx: { color: "text.primary" },
|
|
665
|
+
variant: "body2",
|
|
666
|
+
children: n.accounts.memberName
|
|
667
|
+
}),
|
|
668
|
+
/* @__PURE__ */ e(o, {
|
|
669
|
+
sx: { color: "text.primary" },
|
|
670
|
+
variant: "h2",
|
|
671
|
+
children: n.accounts.user_name || n.accounts.name
|
|
672
|
+
}),
|
|
673
|
+
/* @__PURE__ */ i(p, {
|
|
704
674
|
sx: {
|
|
705
|
-
|
|
675
|
+
alignItems: "center",
|
|
706
676
|
flexDirection: "row",
|
|
707
|
-
justifyContent: "space-between"
|
|
708
|
-
px: 24,
|
|
709
|
-
py: 10
|
|
677
|
+
justifyContent: "space-between"
|
|
710
678
|
},
|
|
711
|
-
children: [
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
716
|
-
),
|
|
717
|
-
t.holdings?.map((r, n) => {
|
|
718
|
-
const g = c === r.id;
|
|
719
|
-
return /* @__PURE__ */ i(
|
|
720
|
-
be,
|
|
721
|
-
{
|
|
722
|
-
disableGutters: !0,
|
|
723
|
-
expanded: b[r.id] === !0,
|
|
724
|
-
onChange: r ? y(r?.id) : () => {
|
|
679
|
+
children: [/* @__PURE__ */ e(o, {
|
|
680
|
+
sx: {
|
|
681
|
+
color: "text.primary",
|
|
682
|
+
fontWeight: 600
|
|
725
683
|
},
|
|
684
|
+
variant: "body1",
|
|
685
|
+
children: x.overview.current_balance
|
|
686
|
+
}), /* @__PURE__ */ e(o, {
|
|
726
687
|
sx: {
|
|
727
|
-
|
|
728
|
-
|
|
688
|
+
color: "text.primary",
|
|
689
|
+
fontWeight: 600
|
|
729
690
|
},
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
name: b[r.id] ? "expand_less" : "expand_more",
|
|
842
|
-
size: 20
|
|
843
|
-
}
|
|
844
|
-
)
|
|
845
|
-
]
|
|
846
|
-
}
|
|
847
|
-
)
|
|
848
|
-
]
|
|
849
|
-
}
|
|
850
|
-
)
|
|
851
|
-
] })
|
|
852
|
-
}
|
|
853
|
-
),
|
|
854
|
-
/* @__PURE__ */ e(_e, { children: /* @__PURE__ */ i(
|
|
855
|
-
p,
|
|
856
|
-
{
|
|
691
|
+
variant: "body1",
|
|
692
|
+
children: n.accounts.balance?.toLocaleString("en-US", {
|
|
693
|
+
currency: "USD",
|
|
694
|
+
maximumFractionDigits: 2,
|
|
695
|
+
minimumFractionDigits: 2,
|
|
696
|
+
style: "currency"
|
|
697
|
+
})
|
|
698
|
+
})]
|
|
699
|
+
})
|
|
700
|
+
]
|
|
701
|
+
}),
|
|
702
|
+
/* @__PURE__ */ i(p, {
|
|
703
|
+
sx: {
|
|
704
|
+
bgcolor: "background.default",
|
|
705
|
+
flexDirection: "row",
|
|
706
|
+
justifyContent: "space-between",
|
|
707
|
+
px: 24,
|
|
708
|
+
py: 10
|
|
709
|
+
},
|
|
710
|
+
children: [/* @__PURE__ */ e(o, {
|
|
711
|
+
sx: {
|
|
712
|
+
color: "text.primary",
|
|
713
|
+
fontWeight: 700
|
|
714
|
+
},
|
|
715
|
+
variant: "caption",
|
|
716
|
+
children: x.overview.holding
|
|
717
|
+
}), /* @__PURE__ */ e(o, {
|
|
718
|
+
sx: {
|
|
719
|
+
color: "text.primary",
|
|
720
|
+
fontWeight: 700
|
|
721
|
+
},
|
|
722
|
+
variant: "caption",
|
|
723
|
+
children: x.overview.market_value
|
|
724
|
+
})]
|
|
725
|
+
}),
|
|
726
|
+
n.holdings?.map((t, d) => {
|
|
727
|
+
const D = c === t.id;
|
|
728
|
+
return /* @__PURE__ */ i(_e, {
|
|
729
|
+
disableGutters: !0,
|
|
730
|
+
expanded: _[t.id] === !0,
|
|
731
|
+
onChange: t ? r(t?.id) : () => {
|
|
732
|
+
},
|
|
733
|
+
sx: {
|
|
734
|
+
":before": d === 0 ? { opacity: 0 } : {},
|
|
735
|
+
".MuiAccordionDetails-root": { p: 0 }
|
|
736
|
+
},
|
|
737
|
+
children: [/* @__PURE__ */ e(Ce, {
|
|
738
|
+
"aria-controls": "panel1a-content",
|
|
739
|
+
id: "panel1a-header",
|
|
740
|
+
sx: [{ height: 64 }, _[t.id] && d > 0 && {
|
|
741
|
+
borderTop: 1,
|
|
742
|
+
borderColor: "divider"
|
|
743
|
+
}],
|
|
744
|
+
children: /* @__PURE__ */ i(p, {
|
|
745
|
+
sx: {
|
|
746
|
+
flexDirection: "row",
|
|
747
|
+
width: "100%"
|
|
748
|
+
},
|
|
749
|
+
children: [/* @__PURE__ */ e("div", { style: { width: 24 } }), /* @__PURE__ */ i(p, {
|
|
750
|
+
sx: [{
|
|
751
|
+
alignItems: "center",
|
|
752
|
+
flexDirection: "row",
|
|
753
|
+
justifyContent: "space-between",
|
|
754
|
+
pr: 24,
|
|
755
|
+
py: 14,
|
|
756
|
+
width: "100%"
|
|
757
|
+
}, _[t.id] && {
|
|
758
|
+
borderBottom: 1,
|
|
759
|
+
borderColor: "divider"
|
|
760
|
+
}],
|
|
761
|
+
children: [/* @__PURE__ */ e(p, {
|
|
762
|
+
sx: {
|
|
763
|
+
alignItems: "center",
|
|
764
|
+
flexDirection: "row",
|
|
765
|
+
gap: 12
|
|
766
|
+
},
|
|
767
|
+
children: /* @__PURE__ */ i(p, {
|
|
768
|
+
sx: {
|
|
769
|
+
overflow: "hidden",
|
|
770
|
+
width: 98
|
|
771
|
+
},
|
|
772
|
+
children: [/* @__PURE__ */ e(o, {
|
|
773
|
+
sx: { fontWeight: 600 },
|
|
774
|
+
variant: "body1",
|
|
775
|
+
children: t.holding
|
|
776
|
+
}), /* @__PURE__ */ e(o, {
|
|
777
|
+
variant: "caption",
|
|
778
|
+
children: t.description
|
|
779
|
+
})]
|
|
780
|
+
})
|
|
781
|
+
}), /* @__PURE__ */ i(p, {
|
|
782
|
+
sx: {
|
|
783
|
+
alignItems: "center",
|
|
784
|
+
flex: 1,
|
|
785
|
+
flexDirection: "row",
|
|
786
|
+
gap: 12,
|
|
787
|
+
justifyContent: "flex-end"
|
|
788
|
+
},
|
|
789
|
+
children: [/* @__PURE__ */ i(p, { children: [/* @__PURE__ */ e(o, {
|
|
790
|
+
sx: {
|
|
791
|
+
fontWeight: 600,
|
|
792
|
+
textAlign: "right"
|
|
793
|
+
},
|
|
794
|
+
variant: "body1",
|
|
795
|
+
children: t.marketValue?.toLocaleString("en-US", {
|
|
796
|
+
currency: "USD",
|
|
797
|
+
maximumFractionDigits: 2,
|
|
798
|
+
minimumFractionDigits: 2,
|
|
799
|
+
style: "currency"
|
|
800
|
+
})
|
|
801
|
+
}), /* @__PURE__ */ i(p, {
|
|
857
802
|
sx: {
|
|
858
803
|
alignItems: "center",
|
|
859
|
-
|
|
860
|
-
flexDirection: "row"
|
|
861
|
-
pl: 24
|
|
804
|
+
gap: 2,
|
|
805
|
+
flexDirection: "row"
|
|
862
806
|
},
|
|
863
807
|
children: [
|
|
864
|
-
/* @__PURE__ */ e(
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
direction: "row",
|
|
900
|
-
sx: {
|
|
901
|
-
alignItems: "center",
|
|
902
|
-
gap: 4
|
|
903
|
-
},
|
|
904
|
-
children: [
|
|
905
|
-
g ? /* @__PURE__ */ e(
|
|
906
|
-
Ce,
|
|
907
|
-
{
|
|
908
|
-
autoFocus: !0,
|
|
909
|
-
onBlur: () => m(r.id),
|
|
910
|
-
onChange: v,
|
|
911
|
-
onKeyDown: (C) => d(C, r.id),
|
|
912
|
-
size: "small",
|
|
913
|
-
sx: {
|
|
914
|
-
fontSize: 14,
|
|
915
|
-
width: 58,
|
|
916
|
-
"& .MuiInputBase-input": {
|
|
917
|
-
padding: "4px 0",
|
|
918
|
-
textAlign: "center",
|
|
919
|
-
fontWeight: 600,
|
|
920
|
-
color: "text.primary"
|
|
921
|
-
},
|
|
922
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
923
|
-
border: "none"
|
|
924
|
-
}
|
|
925
|
-
},
|
|
926
|
-
value: u
|
|
927
|
-
}
|
|
928
|
-
) : /* @__PURE__ */ e(o, { sx: { fontSize: 14, width: 58 }, variant: "body2", children: r.costBasis?.toLocaleString("en-US", {
|
|
929
|
-
currency: "USD",
|
|
930
|
-
maximumFractionDigits: 2,
|
|
931
|
-
minimumFractionDigits: 2,
|
|
932
|
-
style: "currency"
|
|
933
|
-
}) }),
|
|
934
|
-
/* @__PURE__ */ e(
|
|
935
|
-
de,
|
|
936
|
-
{
|
|
937
|
-
onClick: () => f(r.id, r.costBasis),
|
|
938
|
-
sx: { minWidth: 16, minHeight: 16 },
|
|
939
|
-
children: /* @__PURE__ */ e(B, { name: "stylus", size: 16, sx: { color: "grey.700" } })
|
|
940
|
-
}
|
|
941
|
-
)
|
|
942
|
-
]
|
|
943
|
-
}
|
|
944
|
-
)
|
|
945
|
-
]
|
|
946
|
-
}
|
|
947
|
-
)
|
|
948
|
-
] })
|
|
808
|
+
t.totalGainLoss !== 0 && /* @__PURE__ */ e(k, {
|
|
809
|
+
name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
810
|
+
size: 12,
|
|
811
|
+
sx: {
|
|
812
|
+
verticalAlign: "middle",
|
|
813
|
+
mr: 1,
|
|
814
|
+
color: t.totalGainLoss >= 0 ? "success.main" : "grey.700"
|
|
815
|
+
}
|
|
816
|
+
}),
|
|
817
|
+
/* @__PURE__ */ e(o, {
|
|
818
|
+
sx: {
|
|
819
|
+
color: t.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
820
|
+
fontWeight: t.totalGainLoss <= 0 ? 400 : 700
|
|
821
|
+
},
|
|
822
|
+
variant: "caption",
|
|
823
|
+
children: t.costBasis ? `${(t.totalGainLoss / t.costBasis * 100).toFixed(2)}%` : "0.00%"
|
|
824
|
+
}),
|
|
825
|
+
/* @__PURE__ */ e(o, {
|
|
826
|
+
sx: { color: "grey.700" },
|
|
827
|
+
variant: "caption",
|
|
828
|
+
children: "|"
|
|
829
|
+
}),
|
|
830
|
+
/* @__PURE__ */ e(o, {
|
|
831
|
+
sx: {
|
|
832
|
+
color: t.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
833
|
+
fontWeight: t.totalGainLoss <= 0 ? 400 : 700
|
|
834
|
+
},
|
|
835
|
+
variant: "caption",
|
|
836
|
+
children: Math.abs(t.totalGainLoss).toLocaleString("en-US", {
|
|
837
|
+
currency: "USD",
|
|
838
|
+
maximumFractionDigits: 2,
|
|
839
|
+
minimumFractionDigits: 2,
|
|
840
|
+
style: "currency"
|
|
841
|
+
})
|
|
842
|
+
})
|
|
949
843
|
]
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
|
|
844
|
+
})] }), /* @__PURE__ */ e(k, {
|
|
845
|
+
name: _[t.id] ? "expand_less" : "expand_more",
|
|
846
|
+
size: 20
|
|
847
|
+
})]
|
|
848
|
+
})]
|
|
849
|
+
})]
|
|
850
|
+
})
|
|
851
|
+
}), /* @__PURE__ */ e(we, { children: /* @__PURE__ */ i(p, {
|
|
852
|
+
sx: {
|
|
853
|
+
alignItems: "center",
|
|
854
|
+
bgcolor: "background.default",
|
|
855
|
+
flexDirection: "row",
|
|
856
|
+
pl: 24
|
|
953
857
|
},
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
858
|
+
children: [/* @__PURE__ */ e(p, { sx: { width: 32 } }), /* @__PURE__ */ i(p, {
|
|
859
|
+
sx: { flex: 1 },
|
|
860
|
+
children: [/* @__PURE__ */ i(p, {
|
|
861
|
+
sx: {
|
|
862
|
+
alignItems: "center",
|
|
863
|
+
borderBottom: 1,
|
|
864
|
+
borderColor: "divider",
|
|
865
|
+
flexDirection: "row",
|
|
866
|
+
height: 48,
|
|
867
|
+
justifyContent: "space-between",
|
|
868
|
+
pr: 24
|
|
869
|
+
},
|
|
870
|
+
children: [/* @__PURE__ */ e(o, {
|
|
871
|
+
sx: { color: "text.primary" },
|
|
872
|
+
variant: "body1",
|
|
873
|
+
children: x.overview.quantity
|
|
874
|
+
}), /* @__PURE__ */ e(o, {
|
|
875
|
+
sx: { color: "text.primary" },
|
|
876
|
+
variant: "body2",
|
|
877
|
+
children: t.qty
|
|
878
|
+
})]
|
|
879
|
+
}), /* @__PURE__ */ i(p, {
|
|
880
|
+
sx: {
|
|
881
|
+
alignItems: "center",
|
|
882
|
+
flexDirection: "row",
|
|
883
|
+
height: 48,
|
|
884
|
+
justifyContent: "space-between",
|
|
885
|
+
pr: 24
|
|
886
|
+
},
|
|
887
|
+
children: [/* @__PURE__ */ e(o, {
|
|
888
|
+
sx: { color: "text.primary" },
|
|
889
|
+
variant: "body1",
|
|
890
|
+
children: x.overview.cost_basis_header
|
|
891
|
+
}), /* @__PURE__ */ i(p, {
|
|
892
|
+
direction: "row",
|
|
893
|
+
sx: {
|
|
894
|
+
alignItems: "center",
|
|
895
|
+
gap: 4
|
|
896
|
+
},
|
|
897
|
+
children: [D ? /* @__PURE__ */ e(be, {
|
|
898
|
+
autoFocus: !0,
|
|
899
|
+
onBlur: () => m(t.id),
|
|
900
|
+
onChange: y,
|
|
901
|
+
onKeyDown: (w) => u(w, t.id),
|
|
902
|
+
size: "small",
|
|
903
|
+
sx: {
|
|
904
|
+
fontSize: 14,
|
|
905
|
+
width: 58,
|
|
906
|
+
"& .MuiInputBase-input": {
|
|
907
|
+
padding: "4px 0",
|
|
908
|
+
textAlign: "center",
|
|
909
|
+
fontWeight: 600,
|
|
910
|
+
color: "text.primary"
|
|
911
|
+
},
|
|
912
|
+
"& .MuiOutlinedInput-notchedOutline": { border: "none" }
|
|
913
|
+
},
|
|
914
|
+
value: g
|
|
915
|
+
}) : /* @__PURE__ */ e(o, {
|
|
916
|
+
sx: {
|
|
917
|
+
fontSize: 14,
|
|
918
|
+
width: 58
|
|
919
|
+
},
|
|
920
|
+
variant: "body2",
|
|
921
|
+
children: t.costBasis?.toLocaleString("en-US", {
|
|
922
|
+
currency: "USD",
|
|
923
|
+
maximumFractionDigits: 2,
|
|
924
|
+
minimumFractionDigits: 2,
|
|
925
|
+
style: "currency"
|
|
926
|
+
})
|
|
927
|
+
}), /* @__PURE__ */ e(le, {
|
|
928
|
+
onClick: () => v(t.id, t.costBasis),
|
|
929
|
+
sx: {
|
|
930
|
+
minWidth: 16,
|
|
931
|
+
minHeight: 16
|
|
932
|
+
},
|
|
933
|
+
children: /* @__PURE__ */ e(k, {
|
|
934
|
+
name: "stylus",
|
|
935
|
+
size: 16,
|
|
936
|
+
sx: { color: "grey.700" }
|
|
937
|
+
})
|
|
938
|
+
})]
|
|
939
|
+
})]
|
|
940
|
+
})]
|
|
941
|
+
})]
|
|
942
|
+
}) })]
|
|
943
|
+
}, t.id);
|
|
944
|
+
})
|
|
945
|
+
]
|
|
946
|
+
});
|
|
947
|
+
}, mt = R(dt), q = (n) => /* @__PURE__ */ i(Re, {
|
|
948
|
+
sx: {
|
|
949
|
+
alignItems: "center",
|
|
950
|
+
flexDirection: "row",
|
|
951
|
+
gap: 4
|
|
952
|
+
},
|
|
953
|
+
children: [/* @__PURE__ */ e(o, {
|
|
954
|
+
sx: {
|
|
955
|
+
color: "text.primary",
|
|
956
|
+
fontWeight: 600,
|
|
957
|
+
fontSize: 14
|
|
980
958
|
},
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
959
|
+
variant: "body2",
|
|
960
|
+
children: n.colDef.headerName
|
|
961
|
+
}), /* @__PURE__ */ e(k, {
|
|
962
|
+
name: "expand_all",
|
|
963
|
+
size: 12
|
|
964
|
+
})]
|
|
965
|
+
}), ut = ({ data: n, editingHoldingId: g, currentEditedCostBasis: c, handleCostBasisClick: m, handleCostBasisChange: v, handleCostBasisKeyDown: y, handleCostBasisBlur: u }) => {
|
|
966
|
+
const { investments: l } = G(), h = X().palette.mode === "dark", x = "success.main", _ = h ? "grey.300" : "grey.700", a = (r, t = "lesserThan") => t === "greaterThan" ? r >= 0 ? x : _ : r <= 0 ? _ : x;
|
|
967
|
+
return /* @__PURE__ */ e(ne, {
|
|
968
|
+
sx: {
|
|
969
|
+
boxShadow: "none",
|
|
970
|
+
width: "100%"
|
|
990
971
|
},
|
|
991
|
-
{
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
972
|
+
children: /* @__PURE__ */ e(Ke, {
|
|
973
|
+
columns: [
|
|
974
|
+
{
|
|
975
|
+
field: "qty",
|
|
976
|
+
headerName: l.overview.qty_header,
|
|
977
|
+
sortable: !1,
|
|
978
|
+
width: 48,
|
|
979
|
+
align: "center",
|
|
980
|
+
headerAlign: "center"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
field: "holding",
|
|
984
|
+
headerName: l.overview.holding_header,
|
|
985
|
+
flex: 1,
|
|
986
|
+
renderHeader: q,
|
|
987
|
+
renderCell: (r) => /* @__PURE__ */ e(f, {
|
|
988
|
+
sx: {
|
|
989
|
+
alignItems: "center",
|
|
990
|
+
gap: 16,
|
|
991
|
+
flexDirection: "row"
|
|
992
|
+
},
|
|
993
|
+
children: /* @__PURE__ */ i(f, { children: [/* @__PURE__ */ e(o, {
|
|
994
|
+
sx: { fontWeight: 700 },
|
|
995
|
+
children: r.row.holding
|
|
996
|
+
}), /* @__PURE__ */ e(o, {
|
|
997
|
+
sx: {
|
|
998
|
+
color: "text.secondary",
|
|
999
|
+
fontWeight: 400
|
|
1000
|
+
},
|
|
1001
|
+
variant: "tiny",
|
|
1002
|
+
children: r.row.description
|
|
1003
|
+
})] })
|
|
1004
|
+
})
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
field: "costBasis",
|
|
1008
|
+
headerName: l.overview.cost_basis_header,
|
|
1009
|
+
width: 132,
|
|
1010
|
+
renderHeader: q,
|
|
1011
|
+
renderCell: (r) => /* @__PURE__ */ i(f, {
|
|
1012
|
+
sx: {
|
|
1013
|
+
alignItems: "center",
|
|
1014
|
+
flexDirection: "row",
|
|
1015
|
+
gap: 4
|
|
1016
|
+
},
|
|
1017
|
+
children: [g === r.row.id ? /* @__PURE__ */ e(be, {
|
|
1002
1018
|
autoFocus: !0,
|
|
1003
|
-
onBlur: () =>
|
|
1004
|
-
onChange:
|
|
1005
|
-
onKeyDown: (
|
|
1019
|
+
onBlur: () => u(r.row.id),
|
|
1020
|
+
onChange: v,
|
|
1021
|
+
onKeyDown: (t) => y(t, r.row.id),
|
|
1006
1022
|
size: "small",
|
|
1007
1023
|
sx: {
|
|
1008
1024
|
fontSize: 14,
|
|
@@ -1013,382 +1029,374 @@ const me = ({ sx: t = {} }) => {
|
|
|
1013
1029
|
fontWeight: 600,
|
|
1014
1030
|
color: "text.primary"
|
|
1015
1031
|
},
|
|
1016
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
1017
|
-
border: "none"
|
|
1018
|
-
}
|
|
1032
|
+
"& .MuiOutlinedInput-notchedOutline": { border: "none" }
|
|
1019
1033
|
},
|
|
1020
1034
|
value: c
|
|
1021
|
-
}
|
|
1022
|
-
) : /* @__PURE__ */ e(o, { sx: { fontSize: 14, width: 57 }, variant: "body2", children: n.value?.toLocaleString("en-US", {
|
|
1023
|
-
currency: "USD",
|
|
1024
|
-
maximumFractionDigits: 2,
|
|
1025
|
-
minimumFractionDigits: 2,
|
|
1026
|
-
style: "currency"
|
|
1027
|
-
}) }),
|
|
1028
|
-
/* @__PURE__ */ e(
|
|
1029
|
-
de,
|
|
1030
|
-
{
|
|
1031
|
-
onClick: () => m(n.row.id, n.row.costBasis),
|
|
1032
|
-
sx: { minWidth: 12, minHeight: 12 },
|
|
1033
|
-
children: /* @__PURE__ */ e(B, { name: "stylus", size: 12, sx: { color: "grey.700" } })
|
|
1034
|
-
}
|
|
1035
|
-
)
|
|
1036
|
-
] });
|
|
1037
|
-
},
|
|
1038
|
-
align: "center",
|
|
1039
|
-
headerAlign: "center"
|
|
1040
|
-
},
|
|
1041
|
-
{
|
|
1042
|
-
field: "totalGainLoss",
|
|
1043
|
-
headerName: l.overview.total_gain_loss_header,
|
|
1044
|
-
width: 196,
|
|
1045
|
-
renderHeader: K,
|
|
1046
|
-
renderCell: (n) => {
|
|
1047
|
-
const g = n.row.costBasis, C = g ? n.row.totalGainLoss / g * 100 : 0;
|
|
1048
|
-
return /* @__PURE__ */ i(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
1049
|
-
n.value !== 0 && /* @__PURE__ */ e(
|
|
1050
|
-
B,
|
|
1051
|
-
{
|
|
1052
|
-
name: n.value > 0 ? "trending_up" : "trending_down",
|
|
1053
|
-
size: 16,
|
|
1054
|
-
sx: {
|
|
1055
|
-
color: y(n.value),
|
|
1056
|
-
mr: 1,
|
|
1057
|
-
verticalAlign: "middle"
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
),
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1062
|
-
o,
|
|
1063
|
-
{
|
|
1064
|
-
sx: {
|
|
1065
|
-
color: y(n.value),
|
|
1066
|
-
fontWeight: n.value > 0 ? 700 : 400
|
|
1067
|
-
},
|
|
1068
|
-
variant: "body2",
|
|
1069
|
-
children: g ? `${C.toFixed(2)}%` : "0.00%"
|
|
1070
|
-
}
|
|
1071
|
-
),
|
|
1072
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1073
|
-
/* @__PURE__ */ e(
|
|
1074
|
-
o,
|
|
1075
|
-
{
|
|
1035
|
+
}) : /* @__PURE__ */ e(o, {
|
|
1076
1036
|
sx: {
|
|
1077
|
-
|
|
1078
|
-
|
|
1037
|
+
fontSize: 14,
|
|
1038
|
+
width: 57
|
|
1079
1039
|
},
|
|
1080
1040
|
variant: "body2",
|
|
1081
|
-
children:
|
|
1041
|
+
children: r.value?.toLocaleString("en-US", {
|
|
1082
1042
|
currency: "USD",
|
|
1083
1043
|
maximumFractionDigits: 2,
|
|
1084
1044
|
minimumFractionDigits: 2,
|
|
1085
1045
|
style: "currency"
|
|
1086
1046
|
})
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1047
|
+
}), /* @__PURE__ */ e(le, {
|
|
1048
|
+
onClick: () => m(r.row.id, r.row.costBasis),
|
|
1049
|
+
sx: {
|
|
1050
|
+
minWidth: 12,
|
|
1051
|
+
minHeight: 12
|
|
1052
|
+
},
|
|
1053
|
+
children: /* @__PURE__ */ e(k, {
|
|
1054
|
+
name: "stylus",
|
|
1055
|
+
size: 12,
|
|
1056
|
+
sx: { color: "grey.700" }
|
|
1057
|
+
})
|
|
1058
|
+
})]
|
|
1059
|
+
}),
|
|
1060
|
+
align: "center",
|
|
1061
|
+
headerAlign: "center"
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
field: "totalGainLoss",
|
|
1065
|
+
headerName: l.overview.total_gain_loss_header,
|
|
1066
|
+
width: 196,
|
|
1067
|
+
renderHeader: q,
|
|
1068
|
+
renderCell: (r) => {
|
|
1069
|
+
const t = r.row.costBasis, d = t ? r.row.totalGainLoss / t * 100 : 0;
|
|
1070
|
+
return /* @__PURE__ */ i(f, {
|
|
1071
|
+
sx: {
|
|
1072
|
+
alignItems: "center",
|
|
1073
|
+
flexDirection: "row",
|
|
1074
|
+
gap: 2
|
|
1075
|
+
},
|
|
1076
|
+
children: [
|
|
1077
|
+
r.value !== 0 && /* @__PURE__ */ e(k, {
|
|
1078
|
+
name: r.value > 0 ? "trending_up" : "trending_down",
|
|
1079
|
+
size: 16,
|
|
1080
|
+
sx: {
|
|
1081
|
+
color: a(r.value),
|
|
1082
|
+
mr: 1,
|
|
1083
|
+
verticalAlign: "middle"
|
|
1084
|
+
}
|
|
1085
|
+
}),
|
|
1086
|
+
/* @__PURE__ */ e(o, {
|
|
1087
|
+
sx: {
|
|
1088
|
+
color: a(r.value),
|
|
1089
|
+
fontWeight: r.value > 0 ? 700 : 400
|
|
1090
|
+
},
|
|
1091
|
+
variant: "body2",
|
|
1092
|
+
children: t ? `${d.toFixed(2)}%` : "0.00%"
|
|
1093
|
+
}),
|
|
1094
|
+
/* @__PURE__ */ e(o, {
|
|
1095
|
+
sx: { color: "text.secondary" },
|
|
1096
|
+
variant: "caption",
|
|
1097
|
+
children: "|"
|
|
1098
|
+
}),
|
|
1099
|
+
/* @__PURE__ */ e(o, {
|
|
1100
|
+
sx: {
|
|
1101
|
+
color: a(r.value),
|
|
1102
|
+
fontWeight: r.value > 0 ? 700 : 400
|
|
1103
|
+
},
|
|
1104
|
+
variant: "body2",
|
|
1105
|
+
children: Math.abs(r.value).toLocaleString("en-US", {
|
|
1106
|
+
currency: "USD",
|
|
1107
|
+
maximumFractionDigits: 2,
|
|
1108
|
+
minimumFractionDigits: 2,
|
|
1109
|
+
style: "currency"
|
|
1110
|
+
})
|
|
1111
|
+
})
|
|
1112
|
+
]
|
|
1113
|
+
});
|
|
1114
|
+
},
|
|
1115
|
+
align: "right",
|
|
1116
|
+
headerAlign: "right",
|
|
1117
|
+
sortable: !1
|
|
1118
|
+
},
|
|
1119
1119
|
{
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1120
|
+
field: "marketValue",
|
|
1121
|
+
headerName: l.overview.market_value_header,
|
|
1122
|
+
width: 132,
|
|
1123
|
+
renderHeader: q,
|
|
1124
|
+
renderCell: (r) => /* @__PURE__ */ e(o, {
|
|
1125
|
+
sx: { fontWeight: 700 },
|
|
1126
|
+
variant: "body2",
|
|
1127
|
+
children: r.value?.toLocaleString("en-US", {
|
|
1128
|
+
currency: "USD",
|
|
1129
|
+
maximumFractionDigits: 2,
|
|
1130
|
+
minimumFractionDigits: 2,
|
|
1131
|
+
style: "currency"
|
|
1132
|
+
})
|
|
1133
|
+
}),
|
|
1134
|
+
align: "right",
|
|
1135
|
+
headerAlign: "right"
|
|
1127
1136
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1137
|
+
],
|
|
1138
|
+
disableColumnFilter: !0,
|
|
1139
|
+
disableColumnMenu: !0,
|
|
1140
|
+
disableRowSelectionOnClick: !0,
|
|
1141
|
+
hideFooter: !0,
|
|
1142
|
+
rows: n,
|
|
1143
|
+
slotProps: { baseIconButton: { sx: { display: "none" } } }
|
|
1144
|
+
})
|
|
1145
|
+
});
|
|
1146
|
+
}, ht = () => {
|
|
1147
|
+
const { isMobile: n } = M(), [g, c] = z({}), [m, v] = z(!1), { selectedAccountGuids: y } = J(), { visibleHoldings: u, updateHoldings: l } = U(), [h, x] = T.useState(!1), [_, a] = z({
|
|
1133
1148
|
accounts: [],
|
|
1134
1149
|
holdings: []
|
|
1135
|
-
}), { accounts:
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1138
|
-
const
|
|
1139
|
-
/^\d*\.?\d*$/.test(
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
},
|
|
1143
|
-
const
|
|
1144
|
-
if (!
|
|
1145
|
-
const
|
|
1146
|
-
if (l({
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
...
|
|
1152
|
-
|
|
1150
|
+
}), { accounts: r, investments: t } = G(), { isCopyLoaded: d } = J(), [D, w] = z(null), [L, I] = z(""), B = X().palette.mode === "dark", F = B ? "#0AC295" : "#09A57F", N = B ? "grey.300" : "grey.700", S = (s, b = "lesserThan") => b === "greaterThan" ? s >= 0 ? F : N : s <= 0 ? N : F, E = (s, b) => {
|
|
1151
|
+
w(s), I(b.toFixed(2));
|
|
1152
|
+
}, de = (s) => {
|
|
1153
|
+
const b = s.target.value;
|
|
1154
|
+
/^\d*\.?\d*$/.test(b) && I(b);
|
|
1155
|
+
}, me = (s, b) => {
|
|
1156
|
+
s.key === "Enter" ? Z(b) : s.key === "Escape" && w(null);
|
|
1157
|
+
}, Z = (s) => {
|
|
1158
|
+
const b = u.find(({ guid: W }) => W === s);
|
|
1159
|
+
if (!b) return;
|
|
1160
|
+
const j = Number(L);
|
|
1161
|
+
if (l({
|
|
1162
|
+
...b,
|
|
1163
|
+
cost_basis: j
|
|
1164
|
+
}), n) {
|
|
1165
|
+
const W = _.holdings.map((C) => C.id === s ? {
|
|
1166
|
+
...C,
|
|
1167
|
+
costBasis: j
|
|
1168
|
+
} : C);
|
|
1169
|
+
a((C) => ({
|
|
1170
|
+
...C,
|
|
1171
|
+
holdings: W
|
|
1153
1172
|
}));
|
|
1154
1173
|
}
|
|
1155
|
-
|
|
1156
|
-
},
|
|
1157
|
-
c((
|
|
1158
|
-
...
|
|
1159
|
-
[
|
|
1174
|
+
w(null);
|
|
1175
|
+
}, De = (s) => (b, j) => {
|
|
1176
|
+
c((W) => ({
|
|
1177
|
+
...W,
|
|
1178
|
+
[s]: j
|
|
1160
1179
|
}));
|
|
1161
|
-
}, { visibleHoldings:
|
|
1162
|
-
|
|
1163
|
-
), Ie = P.reduce((a, w) => a + (w.balance || 0), 0), Ae = P.map(({ guid: a }) => a), q = he.filter(
|
|
1164
|
-
({ account_guid: a }) => Ae.includes(a)
|
|
1165
|
-
).reduce((a, w) => {
|
|
1166
|
-
const M = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
|
|
1167
|
-
return a + M;
|
|
1168
|
-
}, 0), Te = () => {
|
|
1169
|
-
f(!1);
|
|
1180
|
+
}, { visibleHoldings: ue } = U(), { visibleInvestmentAccounts: Se } = ae(), $ = Se.filter(({ guid: s }) => y.includes(s)), Le = $.reduce((s, b) => s + (b.balance || 0), 0), Ie = $.map(({ guid: s }) => s), P = ue.filter(({ account_guid: s }) => Ie.includes(s)).reduce((s, b) => s + (b.market_value ? b.market_value - (b.cost_basis || 0) : 0), 0), Ae = () => {
|
|
1181
|
+
v(!1);
|
|
1170
1182
|
};
|
|
1171
|
-
return
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
/* @__PURE__ */ e(
|
|
1190
|
-
o,
|
|
1191
|
-
{
|
|
1192
|
-
sx: { color: L(q, "greaterThan"), fontWeight: 700 },
|
|
1193
|
-
variant: "body2",
|
|
1194
|
-
children: q.toLocaleString("en-US", {
|
|
1183
|
+
return d ? /* @__PURE__ */ i(p, {
|
|
1184
|
+
sx: {
|
|
1185
|
+
alignItems: "center",
|
|
1186
|
+
gap: 48,
|
|
1187
|
+
pt: 48,
|
|
1188
|
+
width: "100%"
|
|
1189
|
+
},
|
|
1190
|
+
children: [
|
|
1191
|
+
!!$.length && /* @__PURE__ */ i(p, {
|
|
1192
|
+
sx: { alignItems: "center" },
|
|
1193
|
+
children: [
|
|
1194
|
+
/* @__PURE__ */ e(o, {
|
|
1195
|
+
sx: { color: "text.secondary" },
|
|
1196
|
+
children: t.overview.total_portfolio
|
|
1197
|
+
}),
|
|
1198
|
+
/* @__PURE__ */ e(Q, {
|
|
1199
|
+
variant: "h1",
|
|
1200
|
+
children: Le.toLocaleString("en-US", {
|
|
1195
1201
|
currency: "USD",
|
|
1196
1202
|
maximumFractionDigits: 2,
|
|
1197
1203
|
minimumFractionDigits: 2,
|
|
1198
1204
|
style: "currency"
|
|
1199
1205
|
})
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1206
|
+
}),
|
|
1207
|
+
/* @__PURE__ */ i(p, {
|
|
1208
|
+
sx: {
|
|
1209
|
+
alignItems: "center",
|
|
1210
|
+
flexDirection: "row",
|
|
1211
|
+
gap: 8
|
|
1212
|
+
},
|
|
1213
|
+
children: [/* @__PURE__ */ e(k, {
|
|
1214
|
+
name: P >= 0 ? "trending_up" : "trending_down",
|
|
1215
|
+
size: 20,
|
|
1216
|
+
sx: { color: S(P, "greaterThan") }
|
|
1217
|
+
}), /* @__PURE__ */ e(o, {
|
|
1218
|
+
sx: {
|
|
1219
|
+
color: S(P, "greaterThan"),
|
|
1220
|
+
fontWeight: 700
|
|
1221
|
+
},
|
|
1222
|
+
variant: "body2",
|
|
1223
|
+
children: P.toLocaleString("en-US", {
|
|
1224
|
+
currency: "USD",
|
|
1225
|
+
maximumFractionDigits: 2,
|
|
1226
|
+
minimumFractionDigits: 2,
|
|
1227
|
+
style: "currency"
|
|
1228
|
+
})
|
|
1229
|
+
})]
|
|
1230
|
+
})
|
|
1231
|
+
]
|
|
1232
|
+
}),
|
|
1233
|
+
$.map((s) => {
|
|
1234
|
+
const b = ue.filter((A) => A.account_guid === s.guid).map((A) => ({
|
|
1235
|
+
id: A.guid,
|
|
1236
|
+
qty: A.shares || 0,
|
|
1237
|
+
holding: A.symbol || A.description || "Unknown",
|
|
1238
|
+
costBasis: A.cost_basis || 0,
|
|
1239
|
+
totalGainLoss: A.market_value ? A.market_value - (A.cost_basis || 0) : 0,
|
|
1240
|
+
marketValue: A.market_value || 0,
|
|
1241
|
+
description: A.description || ""
|
|
1242
|
+
})), j = b.length > 0, W = s.balance, C = b.reduce((A, Be) => Be.totalGainLoss + A, 0), he = W ? C / W * 100 : 0;
|
|
1243
|
+
if (n) return /* @__PURE__ */ e(ne, {
|
|
1244
|
+
onClick: b.length ? () => {
|
|
1245
|
+
v(!0), a({
|
|
1246
|
+
holdings: b,
|
|
1247
|
+
accounts: s
|
|
1248
|
+
});
|
|
1249
|
+
} : void 0,
|
|
1250
|
+
sx: {
|
|
1251
|
+
width: "100%",
|
|
1252
|
+
overflow: "hidden"
|
|
1253
|
+
},
|
|
1254
|
+
children: /* @__PURE__ */ i(p, {
|
|
1227
1255
|
sx: {
|
|
1228
|
-
|
|
1229
|
-
|
|
1256
|
+
border: 1,
|
|
1257
|
+
borderColor: "divider",
|
|
1258
|
+
borderRadius: "8px",
|
|
1259
|
+
ml: 16,
|
|
1260
|
+
mr: 16,
|
|
1261
|
+
overflow: "hidden",
|
|
1262
|
+
pt: 14
|
|
1230
1263
|
},
|
|
1231
|
-
children: /* @__PURE__ */ i(
|
|
1232
|
-
|
|
1233
|
-
|
|
1264
|
+
children: [/* @__PURE__ */ i(p, {
|
|
1265
|
+
sx: {
|
|
1266
|
+
alignItems: "center",
|
|
1267
|
+
borderBottom: 1,
|
|
1268
|
+
borderColor: "divider",
|
|
1269
|
+
flexDirection: "row",
|
|
1270
|
+
pb: 14,
|
|
1271
|
+
pl: 14,
|
|
1272
|
+
pr: 14
|
|
1273
|
+
},
|
|
1274
|
+
children: [/* @__PURE__ */ e(te, {
|
|
1275
|
+
alt: s.institutionName || "",
|
|
1276
|
+
institutionGuid: s.institution_guid || "",
|
|
1277
|
+
size: 32
|
|
1278
|
+
}), /* @__PURE__ */ i(p, {
|
|
1234
1279
|
sx: {
|
|
1235
|
-
border: 1,
|
|
1236
|
-
borderColor: "divider",
|
|
1237
|
-
borderRadius: "8px",
|
|
1238
|
-
ml: 16,
|
|
1239
|
-
mr: 16,
|
|
1240
1280
|
overflow: "hidden",
|
|
1281
|
+
pl: 13,
|
|
1282
|
+
pr: 13
|
|
1283
|
+
},
|
|
1284
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1285
|
+
sx: { color: "text.secondary" },
|
|
1286
|
+
variant: "caption",
|
|
1287
|
+
children: s.memberName
|
|
1288
|
+
}), /* @__PURE__ */ e(o, {
|
|
1289
|
+
sx: {
|
|
1290
|
+
color: "text.primary",
|
|
1291
|
+
fontWeight: 600
|
|
1292
|
+
},
|
|
1293
|
+
variant: "body1",
|
|
1294
|
+
children: s.user_name || s.name
|
|
1295
|
+
})]
|
|
1296
|
+
})]
|
|
1297
|
+
}), /* @__PURE__ */ i(p, {
|
|
1298
|
+
sx: {
|
|
1299
|
+
alignItems: "center",
|
|
1300
|
+
flexDirection: "row",
|
|
1301
|
+
justifyContent: "space-between",
|
|
1302
|
+
pb: 8,
|
|
1303
|
+
pt: 8
|
|
1304
|
+
},
|
|
1305
|
+
children: [/* @__PURE__ */ i(p, {
|
|
1306
|
+
sx: {
|
|
1307
|
+
alignItems: "center",
|
|
1308
|
+
borderRight: 1,
|
|
1309
|
+
borderColor: "divider",
|
|
1310
|
+
flex: 1,
|
|
1311
|
+
justifyContent: "center",
|
|
1312
|
+
pb: 14,
|
|
1313
|
+
pl: 7,
|
|
1314
|
+
pr: 7,
|
|
1241
1315
|
pt: 14
|
|
1242
1316
|
},
|
|
1243
|
-
children: [
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1317
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1318
|
+
sx: {
|
|
1319
|
+
color: "text.secondary",
|
|
1320
|
+
fontSize: 11
|
|
1321
|
+
},
|
|
1322
|
+
variant: "body2",
|
|
1323
|
+
children: t.overview.total_gain_Loss
|
|
1324
|
+
}), /* @__PURE__ */ i(p, {
|
|
1325
|
+
sx: {
|
|
1326
|
+
alignItems: "center",
|
|
1327
|
+
flexDirection: "row",
|
|
1328
|
+
gap: 2,
|
|
1329
|
+
justifyContent: "flex-end"
|
|
1330
|
+
},
|
|
1331
|
+
children: [
|
|
1332
|
+
C !== 0 && /* @__PURE__ */ e(k, {
|
|
1333
|
+
name: C > 0 ? "trending_up" : "trending_down",
|
|
1334
|
+
size: 20,
|
|
1335
|
+
sx: { color: S(C) }
|
|
1336
|
+
}),
|
|
1337
|
+
/* @__PURE__ */ i(o, {
|
|
1247
1338
|
sx: {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
borderColor: "divider",
|
|
1251
|
-
flexDirection: "row",
|
|
1252
|
-
pb: 14,
|
|
1253
|
-
pl: 14,
|
|
1254
|
-
pr: 14
|
|
1339
|
+
color: S(C),
|
|
1340
|
+
fontWeight: 600
|
|
1255
1341
|
},
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
/* @__PURE__ */ i(p, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
|
|
1266
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: a.memberName }),
|
|
1267
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: a.user_name || a.name })
|
|
1268
|
-
] })
|
|
1269
|
-
]
|
|
1270
|
-
}
|
|
1271
|
-
),
|
|
1272
|
-
/* @__PURE__ */ i(
|
|
1273
|
-
p,
|
|
1274
|
-
{
|
|
1342
|
+
variant: "body1",
|
|
1343
|
+
children: [he.toFixed(2), "%"]
|
|
1344
|
+
}),
|
|
1345
|
+
/* @__PURE__ */ e(o, {
|
|
1346
|
+
sx: { color: "text.secondary" },
|
|
1347
|
+
variant: "caption",
|
|
1348
|
+
children: "|"
|
|
1349
|
+
}),
|
|
1350
|
+
/* @__PURE__ */ e(o, {
|
|
1275
1351
|
sx: {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
justifyContent: "space-between",
|
|
1279
|
-
pb: 8,
|
|
1280
|
-
pt: 8
|
|
1352
|
+
color: S(C),
|
|
1353
|
+
fontWeight: 600
|
|
1281
1354
|
},
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
"%"
|
|
1328
|
-
]
|
|
1329
|
-
}
|
|
1330
|
-
),
|
|
1331
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1332
|
-
/* @__PURE__ */ e(
|
|
1333
|
-
o,
|
|
1334
|
-
{
|
|
1335
|
-
sx: {
|
|
1336
|
-
color: L(S),
|
|
1337
|
-
fontWeight: 600
|
|
1338
|
-
},
|
|
1339
|
-
variant: "body1",
|
|
1340
|
-
children: Math.abs(S).toLocaleString("en-US", {
|
|
1341
|
-
currency: "USD",
|
|
1342
|
-
maximumFractionDigits: 2,
|
|
1343
|
-
minimumFractionDigits: 2,
|
|
1344
|
-
style: "currency"
|
|
1345
|
-
})
|
|
1346
|
-
}
|
|
1347
|
-
)
|
|
1348
|
-
]
|
|
1349
|
-
}
|
|
1350
|
-
)
|
|
1351
|
-
]
|
|
1352
|
-
}
|
|
1353
|
-
),
|
|
1354
|
-
/* @__PURE__ */ i(
|
|
1355
|
-
p,
|
|
1356
|
-
{
|
|
1357
|
-
sx: {
|
|
1358
|
-
alignItems: "center",
|
|
1359
|
-
flex: 1,
|
|
1360
|
-
justifyContent: "center",
|
|
1361
|
-
pb: 14,
|
|
1362
|
-
pl: 7,
|
|
1363
|
-
pr: 7,
|
|
1364
|
-
pt: 14
|
|
1365
|
-
},
|
|
1366
|
-
children: [
|
|
1367
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_value }),
|
|
1368
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
|
|
1369
|
-
currency: "USD",
|
|
1370
|
-
maximumFractionDigits: 2,
|
|
1371
|
-
minimumFractionDigits: 2,
|
|
1372
|
-
style: "currency"
|
|
1373
|
-
}) })
|
|
1374
|
-
]
|
|
1375
|
-
}
|
|
1376
|
-
)
|
|
1377
|
-
]
|
|
1378
|
-
}
|
|
1379
|
-
)
|
|
1380
|
-
]
|
|
1381
|
-
}
|
|
1382
|
-
)
|
|
1383
|
-
},
|
|
1384
|
-
a.guid
|
|
1385
|
-
);
|
|
1386
|
-
const ke = A ? "grey.700" : "grey.400", Be = w.length ? "text.primary" : ke;
|
|
1387
|
-
return /* @__PURE__ */ i(
|
|
1388
|
-
be,
|
|
1389
|
-
{
|
|
1390
|
-
expanded: u[a.guid] === !0,
|
|
1391
|
-
onChange: M ? Se(a.guid) : () => {
|
|
1355
|
+
variant: "body1",
|
|
1356
|
+
children: Math.abs(C).toLocaleString("en-US", {
|
|
1357
|
+
currency: "USD",
|
|
1358
|
+
maximumFractionDigits: 2,
|
|
1359
|
+
minimumFractionDigits: 2,
|
|
1360
|
+
style: "currency"
|
|
1361
|
+
})
|
|
1362
|
+
})
|
|
1363
|
+
]
|
|
1364
|
+
})]
|
|
1365
|
+
}), /* @__PURE__ */ i(p, {
|
|
1366
|
+
sx: {
|
|
1367
|
+
alignItems: "center",
|
|
1368
|
+
flex: 1,
|
|
1369
|
+
justifyContent: "center",
|
|
1370
|
+
pb: 14,
|
|
1371
|
+
pl: 7,
|
|
1372
|
+
pr: 7,
|
|
1373
|
+
pt: 14
|
|
1374
|
+
},
|
|
1375
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1376
|
+
sx: { color: "text.secondary" },
|
|
1377
|
+
variant: "caption",
|
|
1378
|
+
children: t.overview.total_value
|
|
1379
|
+
}), /* @__PURE__ */ e(o, {
|
|
1380
|
+
sx: {
|
|
1381
|
+
color: "text.primary",
|
|
1382
|
+
fontWeight: 600
|
|
1383
|
+
},
|
|
1384
|
+
variant: "body1",
|
|
1385
|
+
children: W?.toLocaleString("en-US", {
|
|
1386
|
+
currency: "USD",
|
|
1387
|
+
maximumFractionDigits: 2,
|
|
1388
|
+
minimumFractionDigits: 2,
|
|
1389
|
+
style: "currency"
|
|
1390
|
+
})
|
|
1391
|
+
})]
|
|
1392
|
+
})]
|
|
1393
|
+
})]
|
|
1394
|
+
})
|
|
1395
|
+
}, s.guid);
|
|
1396
|
+
const Te = B ? "grey.700" : "grey.400", ke = b.length ? "text.primary" : Te;
|
|
1397
|
+
return /* @__PURE__ */ i(_e, {
|
|
1398
|
+
expanded: g[s.guid] === !0,
|
|
1399
|
+
onChange: j ? De(s.guid) : () => {
|
|
1392
1400
|
},
|
|
1393
1401
|
sx: {
|
|
1394
1402
|
border: 1,
|
|
@@ -1396,252 +1404,255 @@ const me = ({ sx: t = {} }) => {
|
|
|
1396
1404
|
borderRadius: "4px",
|
|
1397
1405
|
width: "100%"
|
|
1398
1406
|
},
|
|
1399
|
-
children: [
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1407
|
+
children: [/* @__PURE__ */ i(Ce, {
|
|
1408
|
+
"aria-controls": "panel1a-content",
|
|
1409
|
+
id: "panel1a-header",
|
|
1410
|
+
sx: [g[s.guid] && {
|
|
1411
|
+
borderBottom: 1,
|
|
1412
|
+
borderColor: "divider",
|
|
1413
|
+
maxHeight: 88
|
|
1414
|
+
}],
|
|
1415
|
+
children: [/* @__PURE__ */ i(p, {
|
|
1416
|
+
sx: {
|
|
1417
|
+
alignItems: "center",
|
|
1418
|
+
flexDirection: "row",
|
|
1419
|
+
gap: 13,
|
|
1420
|
+
p: 14,
|
|
1421
|
+
width: "100%"
|
|
1422
|
+
},
|
|
1423
|
+
children: [
|
|
1424
|
+
/* @__PURE__ */ e(k, {
|
|
1425
|
+
name: "expand_more",
|
|
1426
|
+
size: 20,
|
|
1427
|
+
sx: { color: ke }
|
|
1428
|
+
}),
|
|
1429
|
+
/* @__PURE__ */ e(te, {
|
|
1430
|
+
alt: s.institutionName || "",
|
|
1431
|
+
institutionGuid: s.institution_guid || "",
|
|
1432
|
+
size: 32
|
|
1433
|
+
}),
|
|
1434
|
+
/* @__PURE__ */ i(p, {
|
|
1435
|
+
sx: { alignItems: "flex-start" },
|
|
1436
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1437
|
+
sx: { color: "text.secondary" },
|
|
1438
|
+
variant: "caption",
|
|
1439
|
+
children: s.memberName
|
|
1440
|
+
}), /* @__PURE__ */ e(o, {
|
|
1441
|
+
sx: {
|
|
1442
|
+
color: "text.primary",
|
|
1443
|
+
fontWeight: 600
|
|
1444
|
+
},
|
|
1445
|
+
variant: "body1",
|
|
1446
|
+
children: s.user_name || s.name
|
|
1447
|
+
})]
|
|
1448
|
+
})
|
|
1449
|
+
]
|
|
1450
|
+
}), /* @__PURE__ */ i(p, {
|
|
1451
|
+
sx: { flexDirection: "row" },
|
|
1452
|
+
children: [/* @__PURE__ */ i(p, {
|
|
1453
|
+
sx: {
|
|
1454
|
+
alignItems: "flex-end",
|
|
1455
|
+
pb: 14,
|
|
1456
|
+
pl: 24,
|
|
1457
|
+
pr: 24,
|
|
1458
|
+
pt: 14
|
|
1459
|
+
},
|
|
1460
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1461
|
+
sx: { color: "text.secondary" },
|
|
1462
|
+
variant: "caption",
|
|
1463
|
+
children: t.overview.total_gain_Loss
|
|
1464
|
+
}), /* @__PURE__ */ i(p, {
|
|
1465
|
+
sx: {
|
|
1466
|
+
alignItems: "center",
|
|
1467
|
+
flexDirection: "row",
|
|
1468
|
+
gap: 2,
|
|
1469
|
+
justifyContent: "flex-end"
|
|
1470
|
+
},
|
|
1471
|
+
children: [
|
|
1472
|
+
C !== 0 && /* @__PURE__ */ e(k, {
|
|
1473
|
+
name: C >= 0 ? "trending_up" : "trending_down",
|
|
1474
|
+
size: 20,
|
|
1475
|
+
sx: { color: S(C) }
|
|
1476
|
+
}),
|
|
1477
|
+
/* @__PURE__ */ i(o, {
|
|
1416
1478
|
sx: {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
gap: 13,
|
|
1420
|
-
p: 14,
|
|
1421
|
-
width: "100%"
|
|
1479
|
+
color: S(C),
|
|
1480
|
+
fontWeight: 600
|
|
1422
1481
|
},
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1439
|
-
),
|
|
1440
|
-
/* @__PURE__ */ i(p, { sx: { flexDirection: "row" }, children: [
|
|
1441
|
-
/* @__PURE__ */ i(p, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
|
|
1442
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_gain_Loss }),
|
|
1443
|
-
/* @__PURE__ */ i(
|
|
1444
|
-
p,
|
|
1445
|
-
{
|
|
1446
|
-
sx: {
|
|
1447
|
-
alignItems: "center",
|
|
1448
|
-
flexDirection: "row",
|
|
1449
|
-
gap: 2,
|
|
1450
|
-
justifyContent: "flex-end"
|
|
1451
|
-
},
|
|
1452
|
-
children: [
|
|
1453
|
-
S !== 0 && /* @__PURE__ */ e(
|
|
1454
|
-
B,
|
|
1455
|
-
{
|
|
1456
|
-
name: S >= 0 ? "trending_up" : "trending_down",
|
|
1457
|
-
size: 20,
|
|
1458
|
-
sx: { color: L(S) }
|
|
1459
|
-
}
|
|
1460
|
-
),
|
|
1461
|
-
/* @__PURE__ */ i(
|
|
1462
|
-
o,
|
|
1463
|
-
{
|
|
1464
|
-
sx: {
|
|
1465
|
-
color: L(S),
|
|
1466
|
-
fontWeight: 600
|
|
1467
|
-
},
|
|
1468
|
-
variant: "body1",
|
|
1469
|
-
children: [
|
|
1470
|
-
ge.toFixed(2),
|
|
1471
|
-
"%"
|
|
1472
|
-
]
|
|
1473
|
-
}
|
|
1474
|
-
),
|
|
1475
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
|
|
1476
|
-
/* @__PURE__ */ e(
|
|
1477
|
-
o,
|
|
1478
|
-
{
|
|
1479
|
-
sx: {
|
|
1480
|
-
color: L(S),
|
|
1481
|
-
fontWeight: 600
|
|
1482
|
-
},
|
|
1483
|
-
variant: "body1",
|
|
1484
|
-
children: Math.abs(S).toLocaleString("en-US", {
|
|
1485
|
-
currency: "USD",
|
|
1486
|
-
maximumFractionDigits: 2,
|
|
1487
|
-
minimumFractionDigits: 2,
|
|
1488
|
-
style: "currency"
|
|
1489
|
-
})
|
|
1490
|
-
}
|
|
1491
|
-
)
|
|
1492
|
-
]
|
|
1493
|
-
}
|
|
1494
|
-
)
|
|
1495
|
-
] }),
|
|
1496
|
-
/* @__PURE__ */ e(p, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ i(p, { sx: { alignItems: "flex-end" }, children: [
|
|
1497
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_value }),
|
|
1498
|
-
/* @__PURE__ */ e(o, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
|
|
1482
|
+
variant: "body1",
|
|
1483
|
+
children: [he.toFixed(2), "%"]
|
|
1484
|
+
}),
|
|
1485
|
+
/* @__PURE__ */ e(o, {
|
|
1486
|
+
sx: { color: "text.secondary" },
|
|
1487
|
+
variant: "caption",
|
|
1488
|
+
children: "|"
|
|
1489
|
+
}),
|
|
1490
|
+
/* @__PURE__ */ e(o, {
|
|
1491
|
+
sx: {
|
|
1492
|
+
color: S(C),
|
|
1493
|
+
fontWeight: 600
|
|
1494
|
+
},
|
|
1495
|
+
variant: "body1",
|
|
1496
|
+
children: Math.abs(C).toLocaleString("en-US", {
|
|
1499
1497
|
currency: "USD",
|
|
1500
1498
|
maximumFractionDigits: 2,
|
|
1501
1499
|
minimumFractionDigits: 2,
|
|
1502
1500
|
style: "currency"
|
|
1503
|
-
})
|
|
1504
|
-
|
|
1505
|
-
]
|
|
1506
|
-
]
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1501
|
+
})
|
|
1502
|
+
})
|
|
1503
|
+
]
|
|
1504
|
+
})]
|
|
1505
|
+
}), /* @__PURE__ */ e(p, {
|
|
1506
|
+
sx: {
|
|
1507
|
+
alignItems: "flex-end",
|
|
1508
|
+
gap: 12,
|
|
1509
|
+
pb: 14,
|
|
1510
|
+
pl: 16,
|
|
1511
|
+
pr: 16,
|
|
1512
|
+
pt: 14
|
|
1513
|
+
},
|
|
1514
|
+
children: /* @__PURE__ */ i(p, {
|
|
1515
|
+
sx: { alignItems: "flex-end" },
|
|
1516
|
+
children: [/* @__PURE__ */ e(o, {
|
|
1517
|
+
sx: { color: "text.secondary" },
|
|
1518
|
+
variant: "caption",
|
|
1519
|
+
children: t.overview.total_value
|
|
1520
|
+
}), /* @__PURE__ */ e(o, {
|
|
1521
|
+
sx: {
|
|
1522
|
+
color: "text.primary",
|
|
1523
|
+
fontWeight: 600
|
|
1524
|
+
},
|
|
1525
|
+
variant: "body1",
|
|
1526
|
+
children: W?.toLocaleString("en-US", {
|
|
1527
|
+
currency: "USD",
|
|
1528
|
+
maximumFractionDigits: 2,
|
|
1529
|
+
minimumFractionDigits: 2,
|
|
1530
|
+
style: "currency"
|
|
1531
|
+
})
|
|
1532
|
+
})]
|
|
1533
|
+
})
|
|
1534
|
+
})]
|
|
1535
|
+
})]
|
|
1536
|
+
}), /* @__PURE__ */ e(we, {
|
|
1537
|
+
sx: {
|
|
1538
|
+
bgcolor: "background.default",
|
|
1539
|
+
p: 12
|
|
1540
|
+
},
|
|
1541
|
+
children: /* @__PURE__ */ e(ne, {
|
|
1542
|
+
sx: {
|
|
1543
|
+
border: 1,
|
|
1544
|
+
borderColor: "neutral.light"
|
|
1545
|
+
},
|
|
1546
|
+
children: /* @__PURE__ */ e(ut, {
|
|
1547
|
+
currentEditedCostBasis: L,
|
|
1548
|
+
data: b,
|
|
1549
|
+
editingHoldingId: D,
|
|
1550
|
+
handleCostBasisBlur: Z,
|
|
1551
|
+
handleCostBasisChange: de,
|
|
1552
|
+
handleCostBasisClick: E,
|
|
1553
|
+
handleCostBasisKeyDown: me
|
|
1554
|
+
})
|
|
1555
|
+
})
|
|
1556
|
+
})]
|
|
1557
|
+
}, s.guid);
|
|
1558
|
+
}),
|
|
1559
|
+
/* @__PURE__ */ e(ce, {}),
|
|
1560
|
+
/* @__PURE__ */ e(mt, {
|
|
1561
|
+
accountHoldingsData: _,
|
|
1562
|
+
currentEditedCostBasis: L,
|
|
1563
|
+
editingHoldingId: D,
|
|
1564
|
+
handleCostBasisBlur: Z,
|
|
1565
|
+
handleCostBasisChange: de,
|
|
1566
|
+
handleCostBasisClick: E,
|
|
1567
|
+
handleCostBasisKeyDown: me,
|
|
1537
1568
|
isOpen: m,
|
|
1538
|
-
onClose:
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
visibleInvestmentAccounts: l
|
|
1555
|
-
} = ce(), {
|
|
1556
|
-
visibleHoldings: x,
|
|
1557
|
-
setShowConnectionsWidget: h,
|
|
1558
|
-
showConnectionsWidget: b
|
|
1559
|
-
} = U(), { investments: s, accounts: y } = N(), { isInitialized: r } = J(), [n, g] = T.useState(0), { loadHoldings: C, holdingsLoaded: D } = U();
|
|
1560
|
-
qe({
|
|
1569
|
+
onClose: Ae
|
|
1570
|
+
}),
|
|
1571
|
+
/* @__PURE__ */ e(ge, {
|
|
1572
|
+
onClose: () => x(!1),
|
|
1573
|
+
showConnectionsWidget: h,
|
|
1574
|
+
title: r.manage_connections
|
|
1575
|
+
})
|
|
1576
|
+
]
|
|
1577
|
+
}) : /* @__PURE__ */ e(xe, {});
|
|
1578
|
+
}, gt = R(ht), pt = ({ title: n }) => /* @__PURE__ */ e(o, {
|
|
1579
|
+
bold: !0,
|
|
1580
|
+
variant: "body1",
|
|
1581
|
+
children: n
|
|
1582
|
+
}), Jt = R(({ onBackClick: n, onMenuClick: g, sx: c }) => {
|
|
1583
|
+
const { onEvent: m } = pe(), { isMobile: v } = M(), { isAccountDataLoaded: y, loadAccountData: u, visibleInvestmentAccounts: l } = ae(), { visibleHoldings: h, setShowConnectionsWidget: x, showConnectionsWidget: _ } = U(), { investments: a, accounts: r } = G(), { isInitialized: t } = J(), [d, D] = T.useState(0), { loadHoldings: w, holdingsLoaded: L } = U();
|
|
1584
|
+
je({
|
|
1561
1585
|
widgetName: "InvestmentsWidget",
|
|
1562
|
-
isLoaded:
|
|
1586
|
+
isLoaded: L
|
|
1563
1587
|
}), T.useEffect(() => {
|
|
1564
|
-
|
|
1588
|
+
y || u().finally();
|
|
1565
1589
|
}, []), T.useEffect(() => {
|
|
1566
|
-
|
|
1567
|
-
}, [
|
|
1568
|
-
const
|
|
1569
|
-
m(
|
|
1590
|
+
t && w().finally();
|
|
1591
|
+
}, [t]);
|
|
1592
|
+
const I = () => {
|
|
1593
|
+
m(H.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
|
|
1570
1594
|
};
|
|
1571
|
-
if (!
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
],
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1595
|
+
if (!t || !L) return /* @__PURE__ */ e(xe, {});
|
|
1596
|
+
const B = [
|
|
1597
|
+
H.INVESTMENT_WIDGET_DETAILS_CLICK,
|
|
1598
|
+
H.INVESTMENT_WIDGET_ALLOCATION_CLICK,
|
|
1599
|
+
H.INVESTMENT_WIDGET_ANALYSIS_CLICK
|
|
1600
|
+
], F = l.length === 0 && h.length === 0, N = [
|
|
1601
|
+
a.tab_overview_title,
|
|
1602
|
+
a.tab_allocation_title,
|
|
1603
|
+
a.tab_analysis_title
|
|
1580
1604
|
];
|
|
1581
|
-
return /* @__PURE__ */ i(
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
] })
|
|
1632
|
-
] }),
|
|
1633
|
-
/* @__PURE__ */ e(
|
|
1634
|
-
pe,
|
|
1635
|
-
{
|
|
1636
|
-
onClose: () => h(!1),
|
|
1637
|
-
showConnectionsWidget: b,
|
|
1638
|
-
title: y.manage_connections
|
|
1639
|
-
}
|
|
1640
|
-
)
|
|
1641
|
-
]
|
|
1642
|
-
}
|
|
1643
|
-
);
|
|
1605
|
+
return /* @__PURE__ */ i(Ge, {
|
|
1606
|
+
allowedAccountTypes: [We.INVESTMENT],
|
|
1607
|
+
onAccountsFilterClick: I,
|
|
1608
|
+
onBackClick: n,
|
|
1609
|
+
onMenuClick: g,
|
|
1610
|
+
sx: c,
|
|
1611
|
+
title: a.title,
|
|
1612
|
+
children: [/* @__PURE__ */ i(f, {
|
|
1613
|
+
mx: v ? 0 : 48,
|
|
1614
|
+
my: 24,
|
|
1615
|
+
children: [/* @__PURE__ */ e(Ve, {
|
|
1616
|
+
onChange: (S, E) => {
|
|
1617
|
+
D(E), m(B[E]);
|
|
1618
|
+
},
|
|
1619
|
+
sx: { bgcolor: "background.paper" },
|
|
1620
|
+
textColor: "primary",
|
|
1621
|
+
value: F ? -1 : d,
|
|
1622
|
+
variant: "fullWidth",
|
|
1623
|
+
children: N.map((S) => /* @__PURE__ */ e(Oe, {
|
|
1624
|
+
disabled: F,
|
|
1625
|
+
label: /* @__PURE__ */ e(pt, { title: S })
|
|
1626
|
+
}, S))
|
|
1627
|
+
}), F ? /* @__PURE__ */ e(Ee, {
|
|
1628
|
+
header: a.empty_state_header,
|
|
1629
|
+
icon: "bid_landscape",
|
|
1630
|
+
onClick: () => {
|
|
1631
|
+
x(!0), m(H.ACCOUNTS_CLICK_CONNECT);
|
|
1632
|
+
},
|
|
1633
|
+
primaryButton: a.overview.connect_accounts,
|
|
1634
|
+
subText: a.empty_state_description,
|
|
1635
|
+
sx: {
|
|
1636
|
+
width: { sm: 432 },
|
|
1637
|
+
".buttons-footer": { width: 167 },
|
|
1638
|
+
".MuiTypography-h2": {
|
|
1639
|
+
mt: 20,
|
|
1640
|
+
mb: 4
|
|
1641
|
+
},
|
|
1642
|
+
px: 16
|
|
1643
|
+
}
|
|
1644
|
+
}) : /* @__PURE__ */ i(se, { children: [
|
|
1645
|
+
d === 0 && /* @__PURE__ */ e(gt, {}),
|
|
1646
|
+
d === 1 && /* @__PURE__ */ e(ot, {}),
|
|
1647
|
+
d === 2 && /* @__PURE__ */ e(ct, {})
|
|
1648
|
+
] })]
|
|
1649
|
+
}), /* @__PURE__ */ e(ge, {
|
|
1650
|
+
onClose: () => x(!1),
|
|
1651
|
+
showConnectionsWidget: _,
|
|
1652
|
+
title: r.manage_connections
|
|
1653
|
+
})]
|
|
1654
|
+
});
|
|
1644
1655
|
});
|
|
1645
1656
|
export {
|
|
1646
|
-
|
|
1657
|
+
Jt as InvestmentsWidget
|
|
1647
1658
|
};
|