@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e, Fragment as
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import A, { useState as O } from "react";
|
|
3
3
|
import { observer as P } from "mobx-react-lite";
|
|
4
4
|
import _ from "@mui/material/Stack";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { C as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
import Fe from "@mui/material/Tab";
|
|
6
|
+
import Ee from "@mui/material/Tabs";
|
|
7
|
+
import { C as pe } from "../ConnectionsDrawer-BExzgE16.mjs";
|
|
8
|
+
import xe from "@mui/material/useMediaQuery";
|
|
9
|
+
import Ne from "@mui/material/Box";
|
|
10
|
+
import Me from "@mui/material/Collapse";
|
|
11
11
|
import K from "@mui/material/Divider";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { Text as
|
|
18
|
-
import
|
|
19
|
-
import { u as M, g as
|
|
20
|
-
import { A as z, W as
|
|
21
|
-
import {
|
|
12
|
+
import te from "@mui/material/List";
|
|
13
|
+
import ne from "@mui/material/ListItem";
|
|
14
|
+
import Ge from "@mui/material/ListItemButton";
|
|
15
|
+
import ye from "@mui/material/ToggleButton";
|
|
16
|
+
import fe from "@mui/material/ToggleButtonGroup";
|
|
17
|
+
import { Text as r, P as J, InstitutionLogo as oe } from "@mxenabled/mxui";
|
|
18
|
+
import He from "@mui/material/Button";
|
|
19
|
+
import { u as M, g as ve, s as H, b as Q, d as le } from "../hooks-fY_n74f7.mjs";
|
|
20
|
+
import { A as z, W as Ue } from "../WidgetContainer-mzejMmz2.mjs";
|
|
21
|
+
import { f as ie, a as je } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
22
22
|
import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
|
-
import
|
|
23
|
+
import ce from "@mui/material/styles/useTheme";
|
|
24
24
|
import { Icon as k } from "@mxenabled/mx-icons";
|
|
25
|
-
import { D as
|
|
26
|
-
import { useTheme as
|
|
27
|
-
import { f as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import { D as
|
|
38
|
-
import { DataGridPro as
|
|
39
|
-
import { Stack as
|
|
40
|
-
import { L as
|
|
25
|
+
import { D as ze } from "../Donut-Dmy3JTWd.mjs";
|
|
26
|
+
import { useTheme as Oe } from "@mui/material/styles";
|
|
27
|
+
import { f as Ve, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
28
|
+
import Re from "@mui/material/ListItemText";
|
|
29
|
+
import de from "@mui/material/IconButton";
|
|
30
|
+
import Pe from "@mui/material/Tooltip";
|
|
31
|
+
import be from "@mui/material/Accordion";
|
|
32
|
+
import _e from "@mui/material/AccordionDetails";
|
|
33
|
+
import we from "@mui/material/AccordionSummary";
|
|
34
|
+
import re from "@mui/material/Paper";
|
|
35
|
+
import y from "@mui/system/Stack";
|
|
36
|
+
import Ce from "@mui/material/TextField";
|
|
37
|
+
import { D as Xe } from "../Drawer-Bet2ZPJo.mjs";
|
|
38
|
+
import { DataGridPro as $e } from "@mui/x-data-grid-pro";
|
|
39
|
+
import { Stack as qe } from "@mui/material";
|
|
40
|
+
import { L as Se } from "../Loader-BSWSYqvn.mjs";
|
|
41
|
+
import { u as Ke } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
42
|
+
import { A as Ye } from "../Account-CMjOp7S2.mjs";
|
|
41
43
|
import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
|
|
42
|
-
const
|
|
43
|
-
const { investments:
|
|
44
|
+
const me = ({ sx: t = {} }) => {
|
|
45
|
+
const { investments: h } = M(), { onEvent: c } = ve(), { setShowConnectionsWidget: m } = H();
|
|
44
46
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
|
|
45
47
|
/* @__PURE__ */ o(
|
|
46
48
|
_,
|
|
@@ -53,9 +55,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
53
55
|
textAlign: "center"
|
|
54
56
|
},
|
|
55
57
|
children: [
|
|
56
|
-
/* @__PURE__ */ e(
|
|
58
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: h.overview.investment_accounts_footer }),
|
|
57
59
|
/* @__PURE__ */ e(
|
|
58
|
-
|
|
60
|
+
r,
|
|
59
61
|
{
|
|
60
62
|
sx: {
|
|
61
63
|
color: "text.secondary",
|
|
@@ -63,21 +65,21 @@ const de = ({ sx: t = {} }) => {
|
|
|
63
65
|
fontWeight: 400
|
|
64
66
|
},
|
|
65
67
|
variant: "ParagraphSmall",
|
|
66
|
-
children:
|
|
68
|
+
children: h.overview.connect_more_accounts_description
|
|
67
69
|
}
|
|
68
70
|
)
|
|
69
71
|
]
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
74
|
/* @__PURE__ */ e(
|
|
73
|
-
|
|
75
|
+
He,
|
|
74
76
|
{
|
|
75
77
|
onClick: () => {
|
|
76
|
-
|
|
78
|
+
m(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
77
79
|
},
|
|
78
80
|
sx: { fontWeight: 600 },
|
|
79
81
|
variant: "outlined",
|
|
80
|
-
children:
|
|
82
|
+
children: h.overview.connect_accounts
|
|
81
83
|
}
|
|
82
84
|
)
|
|
83
85
|
] });
|
|
@@ -119,18 +121,18 @@ const de = ({ sx: t = {} }) => {
|
|
|
119
121
|
{
|
|
120
122
|
name: "allocations_unknown"
|
|
121
123
|
}
|
|
122
|
-
], et = (t,
|
|
123
|
-
const
|
|
124
|
-
return t >= Math.min(
|
|
125
|
-
}, tt = (t,
|
|
126
|
-
const
|
|
127
|
-
...new Set(t.map((
|
|
124
|
+
], et = (t, h, c) => {
|
|
125
|
+
const m = h, v = c;
|
|
126
|
+
return t >= Math.min(m, v) && t < Math.max(m, v);
|
|
127
|
+
}, tt = (t, h, c) => {
|
|
128
|
+
const m = [
|
|
129
|
+
...new Set(t.map((d) => d.name.toLowerCase()))
|
|
128
130
|
];
|
|
129
131
|
let v;
|
|
130
|
-
return
|
|
131
|
-
const s = t.reduce((
|
|
132
|
-
const
|
|
133
|
-
return
|
|
132
|
+
return m.map((d) => {
|
|
133
|
+
const s = t.reduce((g, f) => {
|
|
134
|
+
const p = f.name;
|
|
135
|
+
return p.toLowerCase() === d ? (v = p, Y(f) * f[h] / 100 + g) : g;
|
|
134
136
|
}, 0);
|
|
135
137
|
return {
|
|
136
138
|
displayName: v,
|
|
@@ -139,104 +141,104 @@ const de = ({ sx: t = {} }) => {
|
|
|
139
141
|
percentage: s / c
|
|
140
142
|
};
|
|
141
143
|
});
|
|
142
|
-
}, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t,
|
|
143
|
-
const
|
|
144
|
-
let
|
|
145
|
-
const
|
|
144
|
+
}, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, h, c) => {
|
|
145
|
+
const m = Object.values(h.allocations_list), v = [];
|
|
146
|
+
let b = 0;
|
|
147
|
+
const d = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
|
|
146
148
|
...n,
|
|
147
149
|
name: n.symbol || n.description,
|
|
148
150
|
gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
|
|
149
|
-
})), { cashBalance:
|
|
150
|
-
(n,
|
|
151
|
-
cashBalance: n.cashBalance + (
|
|
152
|
-
totalAccountBalance: n.totalAccountBalance + (
|
|
151
|
+
})), { cashBalance: g, totalAccountBalance: f } = t.reduce(
|
|
152
|
+
(n, x) => ({
|
|
153
|
+
cashBalance: n.cashBalance + (x.cash_balance || 0),
|
|
154
|
+
totalAccountBalance: n.totalAccountBalance + (x.balance || 0)
|
|
153
155
|
}),
|
|
154
156
|
{ cashBalance: 0, totalAccountBalance: 0 }
|
|
155
|
-
), { marketValue:
|
|
156
|
-
(n,
|
|
157
|
-
marketValue: n.marketValue + Y(
|
|
158
|
-
totalGainLoss: n.totalGainLoss +
|
|
157
|
+
), { marketValue: p, totalGainLoss: l } = s.reduce(
|
|
158
|
+
(n, x) => ({
|
|
159
|
+
marketValue: n.marketValue + Y(x),
|
|
160
|
+
totalGainLoss: n.totalGainLoss + x.gainLoss
|
|
159
161
|
}),
|
|
160
162
|
{ marketValue: 0, totalGainLoss: 0 }
|
|
161
|
-
),
|
|
162
|
-
Ze.forEach((n,
|
|
163
|
-
const
|
|
163
|
+
), u = p + g;
|
|
164
|
+
Ze.forEach((n, x) => {
|
|
165
|
+
const w = s.filter(
|
|
164
166
|
(I) => !!I[n.name]
|
|
165
167
|
);
|
|
166
|
-
let S =
|
|
168
|
+
let S = w.reduce(
|
|
167
169
|
(I, W) => I + Y(W) * W[n.name] / 100,
|
|
168
170
|
0
|
|
169
171
|
);
|
|
170
172
|
const B = tt(
|
|
171
|
-
|
|
173
|
+
w,
|
|
172
174
|
n.name,
|
|
173
175
|
S
|
|
174
176
|
);
|
|
175
|
-
if (n.name === "allocations_cash" &&
|
|
176
|
-
S +=
|
|
177
|
+
if (n.name === "allocations_cash" && g > 0) {
|
|
178
|
+
S += g;
|
|
177
179
|
const I = {
|
|
178
|
-
displayName:
|
|
180
|
+
displayName: h.cash_balance_display_name,
|
|
179
181
|
name: "allocations_name",
|
|
180
|
-
value:
|
|
181
|
-
percentage:
|
|
182
|
+
value: g,
|
|
183
|
+
percentage: g / u
|
|
182
184
|
};
|
|
183
185
|
B.push(I);
|
|
184
186
|
}
|
|
185
187
|
S > 0 && (v.push({
|
|
186
188
|
name: n.name,
|
|
187
|
-
displayName:
|
|
188
|
-
guid: `${n.name}-${
|
|
189
|
+
displayName: m[x],
|
|
190
|
+
guid: `${n.name}-${x}`,
|
|
189
191
|
holdings: B,
|
|
190
|
-
percentage: S /
|
|
192
|
+
percentage: S / u,
|
|
191
193
|
value: S,
|
|
192
194
|
color: Je[n.name]
|
|
193
|
-
}),
|
|
195
|
+
}), b += S);
|
|
194
196
|
});
|
|
195
|
-
const
|
|
196
|
-
({ displayName: n, guid:
|
|
197
|
-
id:
|
|
198
|
-
color:
|
|
197
|
+
const i = v.map(
|
|
198
|
+
({ displayName: n, guid: x, color: w, value: S }) => ({
|
|
199
|
+
id: x,
|
|
200
|
+
color: w,
|
|
199
201
|
label: n,
|
|
200
|
-
value: S /
|
|
202
|
+
value: S / b * 100
|
|
201
203
|
})
|
|
202
204
|
);
|
|
203
205
|
return {
|
|
204
206
|
investmentsData: v,
|
|
205
|
-
donutData:
|
|
206
|
-
totalAmount:
|
|
207
|
+
donutData: i,
|
|
208
|
+
totalAmount: b,
|
|
207
209
|
totalGainLoss: l,
|
|
208
|
-
totalMarketValue:
|
|
209
|
-
totalGainLossPercentage: l /
|
|
210
|
+
totalMarketValue: u,
|
|
211
|
+
totalGainLossPercentage: l / f
|
|
210
212
|
};
|
|
211
|
-
},
|
|
213
|
+
}, ae = (t) => t < 1e-3 ? "< 0.1%" : je(t), R = (t) => t === 0 ? ie(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : ie(t, "0,0.00"), ot = ({
|
|
212
214
|
data: t,
|
|
213
|
-
onSelected:
|
|
215
|
+
onSelected: h,
|
|
214
216
|
selectedId: c,
|
|
215
|
-
selectedTabs:
|
|
217
|
+
selectedTabs: m,
|
|
216
218
|
setSelectedTabs: v
|
|
217
219
|
}) => {
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
}, { isMobile:
|
|
220
|
+
const b = (l, u) => {
|
|
221
|
+
u !== null && v(u);
|
|
222
|
+
}, { isMobile: d } = U(), {
|
|
221
223
|
investments: { allocation: s }
|
|
222
|
-
} = M(),
|
|
224
|
+
} = M(), g = [
|
|
223
225
|
{ label: s.tabs_label_dollar, value: 0 },
|
|
224
226
|
{ label: s.tabs_label_percent, value: 1 }
|
|
225
|
-
],
|
|
226
|
-
return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width:
|
|
227
|
+
], f = !t?.investmentsData.length, { isSmallMobile: p } = U();
|
|
228
|
+
return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
|
|
227
229
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
230
|
+
fe,
|
|
229
231
|
{
|
|
230
232
|
exclusive: !0,
|
|
231
233
|
fullWidth: !0,
|
|
232
|
-
onChange:
|
|
233
|
-
value:
|
|
234
|
-
children:
|
|
234
|
+
onChange: b,
|
|
235
|
+
value: f ? -1 : m,
|
|
236
|
+
children: g.map(({ label: l, value: u }) => /* @__PURE__ */ e(ye, { color: "primary", value: u, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
|
|
235
237
|
}
|
|
236
238
|
),
|
|
237
|
-
/* @__PURE__ */ e(
|
|
239
|
+
/* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
|
|
238
240
|
/* @__PURE__ */ e(
|
|
239
|
-
|
|
241
|
+
ne,
|
|
240
242
|
{
|
|
241
243
|
disableGutters: !0,
|
|
242
244
|
disablePadding: !0,
|
|
@@ -244,14 +246,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
244
246
|
minHeight: 44
|
|
245
247
|
},
|
|
246
248
|
children: /* @__PURE__ */ o(
|
|
247
|
-
|
|
249
|
+
Ge,
|
|
248
250
|
{
|
|
249
251
|
"aria-expanded": c === l.guid,
|
|
250
|
-
onClick: () =>
|
|
252
|
+
onClick: () => h(l.guid),
|
|
251
253
|
sx: { minHeight: 44, px: 12, py: 0 },
|
|
252
254
|
children: [
|
|
253
255
|
/* @__PURE__ */ e(
|
|
254
|
-
|
|
256
|
+
Ne,
|
|
255
257
|
{
|
|
256
258
|
borderRadius: 4,
|
|
257
259
|
flexShrink: 0,
|
|
@@ -268,8 +270,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
268
270
|
justifyContent: "space-between",
|
|
269
271
|
width: "100%",
|
|
270
272
|
children: [
|
|
271
|
-
/* @__PURE__ */ e(
|
|
272
|
-
/* @__PURE__ */ e(
|
|
273
|
+
/* @__PURE__ */ e(r, { bold: c === l.guid, children: l.displayName }),
|
|
274
|
+
/* @__PURE__ */ e(r, { bold: c === l.guid, variant: "Body", children: m === 0 ? R(l.value) : ae(l.percentage) })
|
|
273
275
|
]
|
|
274
276
|
}
|
|
275
277
|
)
|
|
@@ -279,9 +281,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
279
281
|
}
|
|
280
282
|
),
|
|
281
283
|
/* @__PURE__ */ e(K, {}),
|
|
282
|
-
l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(
|
|
283
|
-
l?.holdings?.map((
|
|
284
|
-
|
|
284
|
+
l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(te, { children: [
|
|
285
|
+
l?.holdings?.map((u) => /* @__PURE__ */ e(
|
|
286
|
+
ne,
|
|
285
287
|
{
|
|
286
288
|
sx: {
|
|
287
289
|
pl: 24,
|
|
@@ -289,61 +291,61 @@ const de = ({ sx: t = {} }) => {
|
|
|
289
291
|
py: 0
|
|
290
292
|
},
|
|
291
293
|
children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
292
|
-
/* @__PURE__ */ o(
|
|
293
|
-
|
|
294
|
+
/* @__PURE__ */ o(r, { children: [
|
|
295
|
+
u.displayName,
|
|
294
296
|
" "
|
|
295
297
|
] }),
|
|
296
|
-
/* @__PURE__ */ e(
|
|
298
|
+
/* @__PURE__ */ e(r, { children: m === 0 ? R(u.value) : ae(u.percentage) })
|
|
297
299
|
] })
|
|
298
300
|
},
|
|
299
|
-
|
|
301
|
+
u.displayName
|
|
300
302
|
)),
|
|
301
303
|
/* @__PURE__ */ e(K, {})
|
|
302
304
|
] }) })
|
|
303
305
|
] }, l.guid)) }),
|
|
304
|
-
|
|
305
|
-
/* @__PURE__ */ e(
|
|
306
|
+
f ? /* @__PURE__ */ o(se, { children: [
|
|
307
|
+
/* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
|
|
306
308
|
/* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
|
|
307
309
|
/* @__PURE__ */ e(
|
|
308
|
-
|
|
310
|
+
me,
|
|
309
311
|
{
|
|
310
312
|
sx: {
|
|
311
|
-
".inner-container": { width:
|
|
313
|
+
".inner-container": { width: p ? "100%" : 364 }
|
|
312
314
|
}
|
|
313
315
|
}
|
|
314
316
|
)
|
|
315
|
-
] }) :
|
|
317
|
+
] }) : m === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.total_label_text} ${R(t.totalAmount)}` })
|
|
316
318
|
] });
|
|
317
319
|
}, it = ({
|
|
318
320
|
data: t,
|
|
319
|
-
hoveredId:
|
|
321
|
+
hoveredId: h,
|
|
320
322
|
isPercentage: c,
|
|
321
|
-
onMouseEnter:
|
|
323
|
+
onMouseEnter: m,
|
|
322
324
|
onMouseLeave: v,
|
|
323
|
-
onSelected:
|
|
324
|
-
selectedId:
|
|
325
|
+
onSelected: b,
|
|
326
|
+
selectedId: d,
|
|
325
327
|
size: s = 150,
|
|
326
|
-
totalLabel:
|
|
328
|
+
totalLabel: g
|
|
327
329
|
}) => {
|
|
328
|
-
const
|
|
329
|
-
() =>
|
|
330
|
-
[
|
|
330
|
+
const f = ce(), p = f.palette.mode === "dark", l = A.useMemo(
|
|
331
|
+
() => d ? t.investmentsData.find(({ guid: B }) => B === d) : void 0,
|
|
332
|
+
[d]
|
|
331
333
|
), {
|
|
332
|
-
investments: { allocation:
|
|
333
|
-
} = M(),
|
|
334
|
+
investments: { allocation: u }
|
|
335
|
+
} = M(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: f.palette.border.light, value: 100 }], [t, f]), n = p ? "#0AC295" : "#09A57F", x = p ? "grey.300" : "grey.700", w = () => l ? u.pie_chart_centered_click_for_details : c ? ae(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : x;
|
|
334
336
|
return /* @__PURE__ */ e(
|
|
335
|
-
|
|
337
|
+
ze,
|
|
336
338
|
{
|
|
337
|
-
data:
|
|
338
|
-
hoveredId:
|
|
339
|
-
onClick:
|
|
340
|
-
onMouseEnter:
|
|
339
|
+
data: i,
|
|
340
|
+
hoveredId: h,
|
|
341
|
+
onClick: b,
|
|
342
|
+
onMouseEnter: m,
|
|
341
343
|
onMouseLeave: v,
|
|
342
|
-
selectedId:
|
|
344
|
+
selectedId: d,
|
|
343
345
|
size: s,
|
|
344
346
|
children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: s, minWidth: s, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
|
|
345
|
-
/* @__PURE__ */ e(
|
|
346
|
-
/* @__PURE__ */ e(
|
|
347
|
+
/* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? g }),
|
|
348
|
+
/* @__PURE__ */ e(J, { color: "text.primary", variant: "H1", children: R(l?.value ?? t.totalMarketValue) }),
|
|
347
349
|
/* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
348
350
|
!l && /* @__PURE__ */ e(
|
|
349
351
|
k,
|
|
@@ -354,14 +356,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
354
356
|
}
|
|
355
357
|
),
|
|
356
358
|
/* @__PURE__ */ e(
|
|
357
|
-
|
|
359
|
+
r,
|
|
358
360
|
{
|
|
359
361
|
sx: {
|
|
360
362
|
color: S,
|
|
361
363
|
fontWeight: 700
|
|
362
364
|
},
|
|
363
365
|
variant: "Small",
|
|
364
|
-
children:
|
|
366
|
+
children: w()
|
|
365
367
|
}
|
|
366
368
|
)
|
|
367
369
|
] })
|
|
@@ -369,20 +371,20 @@ const de = ({ sx: t = {} }) => {
|
|
|
369
371
|
}
|
|
370
372
|
);
|
|
371
373
|
}, rt = () => {
|
|
372
|
-
const [t,
|
|
373
|
-
c !== n ?
|
|
374
|
-
}, { selectedAccountGuids: s } = Q(), { visibleHoldings:
|
|
375
|
-
investments: { allocation:
|
|
374
|
+
const [t, h] = A.useState(0), [c, m] = A.useState(""), [v, b] = A.useState(""), d = (n) => {
|
|
375
|
+
c !== n ? m(n) : (m(""), b(""));
|
|
376
|
+
}, { selectedAccountGuids: s } = Q(), { visibleHoldings: g } = H(), { visibleInvestmentAccounts: f } = le(), {
|
|
377
|
+
investments: { allocation: p }
|
|
376
378
|
} = M(), l = nt(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
), { isMobile:
|
|
379
|
+
f.filter(({ guid: n }) => s.includes(n)),
|
|
380
|
+
p,
|
|
381
|
+
g
|
|
382
|
+
), { isMobile: u } = U(), i = xe("(max-width:768px)");
|
|
381
383
|
return /* @__PURE__ */ o(
|
|
382
384
|
_,
|
|
383
385
|
{
|
|
384
|
-
alignItems:
|
|
385
|
-
direction:
|
|
386
|
+
alignItems: i ? "center" : "flex-start",
|
|
387
|
+
direction: i ? "column" : "row",
|
|
386
388
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
387
389
|
sx: {
|
|
388
390
|
justifyContent: "center",
|
|
@@ -397,25 +399,25 @@ const de = ({ sx: t = {} }) => {
|
|
|
397
399
|
hoveredId: v,
|
|
398
400
|
isPercentage: t === 1,
|
|
399
401
|
onMouseEnter: (n) => {
|
|
400
|
-
c === n ?
|
|
402
|
+
c === n ? b("") : c || b(n);
|
|
401
403
|
},
|
|
402
404
|
onMouseLeave: () => {
|
|
403
|
-
|
|
405
|
+
b("");
|
|
404
406
|
},
|
|
405
|
-
onSelected:
|
|
407
|
+
onSelected: d,
|
|
406
408
|
selectedId: c,
|
|
407
|
-
size:
|
|
408
|
-
totalLabel:
|
|
409
|
+
size: u ? 280 : 400,
|
|
410
|
+
totalLabel: p.pie_chart_centered_text
|
|
409
411
|
}
|
|
410
412
|
),
|
|
411
413
|
/* @__PURE__ */ e(
|
|
412
414
|
ot,
|
|
413
415
|
{
|
|
414
416
|
data: l,
|
|
415
|
-
onSelected:
|
|
417
|
+
onSelected: d,
|
|
416
418
|
selectedId: c,
|
|
417
419
|
selectedTabs: t,
|
|
418
|
-
setSelectedTabs:
|
|
420
|
+
setSelectedTabs: h
|
|
419
421
|
}
|
|
420
422
|
)
|
|
421
423
|
]
|
|
@@ -423,25 +425,25 @@ const de = ({ sx: t = {} }) => {
|
|
|
423
425
|
);
|
|
424
426
|
}, at = P(rt), st = ({
|
|
425
427
|
analysisDetails: t,
|
|
426
|
-
analysisType:
|
|
428
|
+
analysisType: h,
|
|
427
429
|
copy: c,
|
|
428
|
-
setAnalysisType:
|
|
430
|
+
setAnalysisType: m
|
|
429
431
|
}) => {
|
|
430
|
-
const { isSmallMobile: v } = U(),
|
|
432
|
+
const { isSmallMobile: v } = U(), b = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
|
|
431
433
|
key: s,
|
|
432
|
-
value:
|
|
433
|
-
formattedKey:
|
|
434
|
-
})), [t]),
|
|
434
|
+
value: ie(t[s], "0,0"),
|
|
435
|
+
formattedKey: Ve(s)
|
|
436
|
+
})), [t]), d = [
|
|
435
437
|
{ label: c.equities, value: V.Stocks },
|
|
436
438
|
{ label: c.bonds, value: V.Bonds }
|
|
437
439
|
];
|
|
438
440
|
return /* @__PURE__ */ o(_, { sx: { gap: 12, width: { md: 412 } }, children: [
|
|
439
441
|
/* @__PURE__ */ e(
|
|
440
|
-
|
|
442
|
+
fe,
|
|
441
443
|
{
|
|
442
444
|
color: "primary",
|
|
443
445
|
exclusive: !0,
|
|
444
|
-
onChange: (s,
|
|
446
|
+
onChange: (s, g) => g && m(g),
|
|
445
447
|
sx: {
|
|
446
448
|
width: "100%",
|
|
447
449
|
"& .MuiToggleButton-root": {
|
|
@@ -450,31 +452,31 @@ const de = ({ sx: t = {} }) => {
|
|
|
450
452
|
textTransform: "capitalize"
|
|
451
453
|
}
|
|
452
454
|
},
|
|
453
|
-
value:
|
|
454
|
-
children:
|
|
455
|
+
value: b.length ? h : -1,
|
|
456
|
+
children: d.map(({ label: s, value: g }) => /* @__PURE__ */ e(ye, { sx: { width: "100%" }, value: g, children: s }, g))
|
|
455
457
|
}
|
|
456
458
|
),
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
b.length ? /* @__PURE__ */ e(
|
|
460
|
+
te,
|
|
459
461
|
{
|
|
460
462
|
sx: {
|
|
461
463
|
"& .MuiListItemSecondaryAction-root": { pr: 12 },
|
|
462
464
|
"& .MuiListItem-divider": { borderColor: "border.light" },
|
|
463
465
|
"& .MuiListItem-root": { minHeight: 44, px: 12 }
|
|
464
466
|
},
|
|
465
|
-
children:
|
|
466
|
-
|
|
467
|
+
children: b.map(({ value: s, formattedKey: g }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: s }), children: /* @__PURE__ */ e(
|
|
468
|
+
Re,
|
|
467
469
|
{
|
|
468
|
-
primary:
|
|
470
|
+
primary: g,
|
|
469
471
|
primaryTypographyProps: { fontStyle: "normal" }
|
|
470
472
|
}
|
|
471
|
-
) },
|
|
473
|
+
) }, g))
|
|
472
474
|
}
|
|
473
|
-
) : /* @__PURE__ */ o(
|
|
474
|
-
/* @__PURE__ */ e(
|
|
475
|
+
) : /* @__PURE__ */ o(se, { children: [
|
|
476
|
+
/* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
|
|
475
477
|
/* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
|
|
476
478
|
/* @__PURE__ */ e(
|
|
477
|
-
|
|
479
|
+
me,
|
|
478
480
|
{
|
|
479
481
|
sx: {
|
|
480
482
|
".inner-container": { width: v ? "100%" : 364 }
|
|
@@ -483,34 +485,34 @@ const de = ({ sx: t = {} }) => {
|
|
|
483
485
|
)
|
|
484
486
|
] })
|
|
485
487
|
] });
|
|
486
|
-
}, lt = ({ body: t, title:
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */ e(
|
|
488
|
+
}, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
|
|
489
|
+
/* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
|
|
490
|
+
/* @__PURE__ */ e(J, { variant: "ParagraphSmall", children: t })
|
|
489
491
|
] }), ct = ({
|
|
490
492
|
placement: t = "bottom",
|
|
491
|
-
tooltip_info_body:
|
|
493
|
+
tooltip_info_body: h,
|
|
492
494
|
tooltip_info_title: c
|
|
493
495
|
}) => /* @__PURE__ */ e(
|
|
494
|
-
|
|
496
|
+
Pe,
|
|
495
497
|
{
|
|
496
498
|
enterTouchDelay: 500,
|
|
497
499
|
placement: t,
|
|
498
|
-
title: /* @__PURE__ */ e(lt, { body:
|
|
499
|
-
children: /* @__PURE__ */ e(
|
|
500
|
+
title: /* @__PURE__ */ e(lt, { body: h, title: c }),
|
|
501
|
+
children: /* @__PURE__ */ e(de, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
|
|
500
502
|
}
|
|
501
503
|
), dt = () => {
|
|
502
504
|
const {
|
|
503
505
|
investments: { analysis: t }
|
|
504
|
-
} = M(), { analysisChartData:
|
|
505
|
-
const
|
|
506
|
-
return { cellDimension:
|
|
507
|
-
}, [t,
|
|
506
|
+
} = M(), { analysisChartData: h, analysisDetails: c, analysisType: m, setAnalysisType: v } = H(), b = xe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = U(), g = Oe().palette.mode === "dark", { cellDimension: f, columns: p, rows: l, textVariant: u } = A.useMemo(() => {
|
|
507
|
+
const i = m === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), x = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
|
|
508
|
+
return { cellDimension: d ? 72 : 100, columns: n, rows: x, textVariant: d ? "XSmall" : "Body" };
|
|
509
|
+
}, [t, d, m]);
|
|
508
510
|
return /* @__PURE__ */ o(
|
|
509
511
|
_,
|
|
510
512
|
{
|
|
511
513
|
sx: {
|
|
512
514
|
flexDirection: { md: "row" },
|
|
513
|
-
gap:
|
|
515
|
+
gap: d ? 48 : 64,
|
|
514
516
|
justifyContent: "center",
|
|
515
517
|
pt: 48,
|
|
516
518
|
px: 16
|
|
@@ -531,34 +533,34 @@ const de = ({ sx: t = {} }) => {
|
|
|
531
533
|
{
|
|
532
534
|
sx: {
|
|
533
535
|
alignItems: "center",
|
|
534
|
-
bottom:
|
|
535
|
-
gap:
|
|
536
|
+
bottom: d ? 10 : 24,
|
|
537
|
+
gap: d ? 0 : 24,
|
|
536
538
|
position: "relative",
|
|
537
539
|
transform: "rotate(-180deg)",
|
|
538
540
|
writingMode: "vertical-rl"
|
|
539
541
|
},
|
|
540
542
|
children: [
|
|
541
|
-
/* @__PURE__ */ e(
|
|
543
|
+
/* @__PURE__ */ e(J, { bold: !0, color: "secondary.main", variant: u, children: m === V.Stocks ? t.market_capitalization : t.credit_quality }),
|
|
542
544
|
/* @__PURE__ */ e(
|
|
543
545
|
_,
|
|
544
546
|
{
|
|
545
547
|
sx: {
|
|
546
548
|
flexDirection: "row",
|
|
547
|
-
height:
|
|
549
|
+
height: d ? 224 : 308,
|
|
548
550
|
justifyContent: "space-around"
|
|
549
551
|
},
|
|
550
|
-
children:
|
|
551
|
-
|
|
552
|
+
children: p.map((i) => /* @__PURE__ */ e(
|
|
553
|
+
r,
|
|
552
554
|
{
|
|
553
555
|
sx: {
|
|
554
556
|
color: "secondary.main",
|
|
555
557
|
pl: 12,
|
|
556
|
-
pr:
|
|
558
|
+
pr: d ? 4 : 0
|
|
557
559
|
},
|
|
558
|
-
variant:
|
|
559
|
-
children:
|
|
560
|
+
variant: u,
|
|
561
|
+
children: i
|
|
560
562
|
},
|
|
561
|
-
|
|
563
|
+
i
|
|
562
564
|
))
|
|
563
565
|
}
|
|
564
566
|
)
|
|
@@ -570,13 +572,13 @@ const de = ({ sx: t = {} }) => {
|
|
|
570
572
|
_,
|
|
571
573
|
{
|
|
572
574
|
sx: {
|
|
573
|
-
alignSelf:
|
|
575
|
+
alignSelf: b ? "start" : "center",
|
|
574
576
|
flexDirection: "row",
|
|
575
577
|
gap: 8,
|
|
576
578
|
pb: 12
|
|
577
579
|
},
|
|
578
580
|
children: [
|
|
579
|
-
/* @__PURE__ */ e(
|
|
581
|
+
/* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
|
|
580
582
|
/* @__PURE__ */ e(
|
|
581
583
|
ct,
|
|
582
584
|
{
|
|
@@ -587,48 +589,48 @@ const de = ({ sx: t = {} }) => {
|
|
|
587
589
|
]
|
|
588
590
|
}
|
|
589
591
|
),
|
|
590
|
-
|
|
591
|
-
const B = n === 0, I = n ===
|
|
592
|
+
h.map((i, n, x) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((w, S) => {
|
|
593
|
+
const B = n === 0, I = n === x.length - 1, W = S === 0, N = S === i.length - 1, F = Number(w.replace("%", "")) >= 25;
|
|
592
594
|
let T = "grey.200", j = "grey.900";
|
|
593
|
-
return
|
|
595
|
+
return g ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
|
|
594
596
|
_,
|
|
595
597
|
{
|
|
596
598
|
sx: {
|
|
597
599
|
...{
|
|
598
600
|
borderBottomLeftRadius: I && W ? 4 : 0,
|
|
599
|
-
borderBottomRightRadius: I &&
|
|
601
|
+
borderBottomRightRadius: I && N ? 4 : 0,
|
|
600
602
|
borderTopLeftRadius: B && W ? 4 : 0,
|
|
601
|
-
borderTopRightRadius: B &&
|
|
603
|
+
borderTopRightRadius: B && N ? 4 : 0
|
|
602
604
|
},
|
|
603
605
|
alignItems: "center",
|
|
604
606
|
bgcolor: T,
|
|
605
|
-
height:
|
|
607
|
+
height: f,
|
|
606
608
|
justifyContent: "center",
|
|
607
|
-
width:
|
|
609
|
+
width: f
|
|
608
610
|
},
|
|
609
611
|
children: /* @__PURE__ */ e(
|
|
610
|
-
|
|
612
|
+
r,
|
|
611
613
|
{
|
|
612
614
|
sx: {
|
|
613
615
|
color: j,
|
|
614
|
-
fontWeight:
|
|
616
|
+
fontWeight: d ? 600 : 700
|
|
615
617
|
},
|
|
616
|
-
variant:
|
|
617
|
-
children:
|
|
618
|
+
variant: d ? "Body" : "H3",
|
|
619
|
+
children: w
|
|
618
620
|
}
|
|
619
621
|
)
|
|
620
622
|
},
|
|
621
623
|
S
|
|
622
624
|
);
|
|
623
625
|
}) }, n)),
|
|
624
|
-
/* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((
|
|
626
|
+
/* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: f }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: u, children: i }) }, i)) }),
|
|
625
627
|
/* @__PURE__ */ e(
|
|
626
|
-
|
|
628
|
+
r,
|
|
627
629
|
{
|
|
628
630
|
bold: !0,
|
|
629
|
-
sx: { color: "secondary.main", pt:
|
|
630
|
-
variant:
|
|
631
|
-
children:
|
|
631
|
+
sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
|
|
632
|
+
variant: u,
|
|
633
|
+
children: m === V.Stocks ? t.valuation : t.duration
|
|
632
634
|
}
|
|
633
635
|
)
|
|
634
636
|
] })
|
|
@@ -639,7 +641,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
639
641
|
st,
|
|
640
642
|
{
|
|
641
643
|
analysisDetails: c,
|
|
642
|
-
analysisType:
|
|
644
|
+
analysisType: m,
|
|
643
645
|
copy: {
|
|
644
646
|
empty_data: t.empty_data,
|
|
645
647
|
equities: t.equities,
|
|
@@ -653,43 +655,43 @@ const de = ({ sx: t = {} }) => {
|
|
|
653
655
|
);
|
|
654
656
|
}, mt = P(dt), ut = ({
|
|
655
657
|
accountHoldingsData: t,
|
|
656
|
-
currentEditedCostBasis:
|
|
658
|
+
currentEditedCostBasis: h,
|
|
657
659
|
editingHoldingId: c,
|
|
658
|
-
handleCostBasisBlur:
|
|
660
|
+
handleCostBasisBlur: m,
|
|
659
661
|
handleCostBasisClick: v,
|
|
660
|
-
handleCostBasisChange:
|
|
661
|
-
handleCostBasisKeyDown:
|
|
662
|
+
handleCostBasisChange: b,
|
|
663
|
+
handleCostBasisKeyDown: d,
|
|
662
664
|
isOpen: s,
|
|
663
|
-
onClose:
|
|
665
|
+
onClose: g
|
|
664
666
|
}) => {
|
|
665
|
-
const { investments:
|
|
666
|
-
l((
|
|
667
|
-
...
|
|
668
|
-
[
|
|
667
|
+
const { investments: f } = M(), [p, l] = A.useState({}), u = (i) => (n, x) => {
|
|
668
|
+
l((w) => ({
|
|
669
|
+
...w,
|
|
670
|
+
[i]: x
|
|
669
671
|
}));
|
|
670
672
|
};
|
|
671
673
|
return /* @__PURE__ */ o(
|
|
672
|
-
|
|
674
|
+
Xe,
|
|
673
675
|
{
|
|
674
|
-
ariaLabelClose:
|
|
676
|
+
ariaLabelClose: f.overview.close_investment_drawer,
|
|
675
677
|
isOpen: s,
|
|
676
|
-
onClose:
|
|
677
|
-
title:
|
|
678
|
+
onClose: g,
|
|
679
|
+
title: f.overview.investment_details,
|
|
678
680
|
children: [
|
|
679
|
-
/* @__PURE__ */ o(
|
|
681
|
+
/* @__PURE__ */ o(y, { sx: { gap: 8, p: 24 }, children: [
|
|
680
682
|
/* @__PURE__ */ e(
|
|
681
|
-
|
|
683
|
+
oe,
|
|
682
684
|
{
|
|
683
685
|
alt: t.accounts.institutionName || "",
|
|
684
686
|
institutionGuid: t.accounts.institution_guid || "",
|
|
685
687
|
size: 64
|
|
686
688
|
}
|
|
687
689
|
),
|
|
688
|
-
/* @__PURE__ */ e(
|
|
689
|
-
/* @__PURE__ */ e(
|
|
690
|
-
/* @__PURE__ */ o(
|
|
691
|
-
/* @__PURE__ */ e(
|
|
692
|
-
/* @__PURE__ */ e(
|
|
690
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
|
|
691
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
|
|
692
|
+
/* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
693
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: f.overview.current_balance }),
|
|
694
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
|
|
693
695
|
currency: "USD",
|
|
694
696
|
maximumFractionDigits: 2,
|
|
695
697
|
minimumFractionDigits: 2,
|
|
@@ -698,7 +700,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
698
700
|
] })
|
|
699
701
|
] }),
|
|
700
702
|
/* @__PURE__ */ o(
|
|
701
|
-
|
|
703
|
+
y,
|
|
702
704
|
{
|
|
703
705
|
sx: {
|
|
704
706
|
bgcolor: "background.default",
|
|
@@ -708,19 +710,19 @@ const de = ({ sx: t = {} }) => {
|
|
|
708
710
|
py: 10
|
|
709
711
|
},
|
|
710
712
|
children: [
|
|
711
|
-
/* @__PURE__ */ e(
|
|
712
|
-
/* @__PURE__ */ e(
|
|
713
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: f.overview.holding }),
|
|
714
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: f.overview.market_value })
|
|
713
715
|
]
|
|
714
716
|
}
|
|
715
717
|
),
|
|
716
|
-
t.holdings?.map((
|
|
717
|
-
const
|
|
718
|
+
t.holdings?.map((i, n) => {
|
|
719
|
+
const x = c === i.id;
|
|
718
720
|
return /* @__PURE__ */ o(
|
|
719
|
-
|
|
721
|
+
be,
|
|
720
722
|
{
|
|
721
723
|
disableGutters: !0,
|
|
722
|
-
expanded:
|
|
723
|
-
onChange:
|
|
724
|
+
expanded: p[i.id] === !0,
|
|
725
|
+
onChange: i ? u(i?.id) : () => {
|
|
724
726
|
},
|
|
725
727
|
sx: {
|
|
726
728
|
":before": n === 0 ? { opacity: 0 } : {},
|
|
@@ -728,21 +730,21 @@ const de = ({ sx: t = {} }) => {
|
|
|
728
730
|
},
|
|
729
731
|
children: [
|
|
730
732
|
/* @__PURE__ */ e(
|
|
731
|
-
|
|
733
|
+
we,
|
|
732
734
|
{
|
|
733
735
|
"aria-controls": "panel1a-content",
|
|
734
736
|
id: "panel1a-header",
|
|
735
737
|
sx: [
|
|
736
738
|
{ height: 64 },
|
|
737
|
-
|
|
739
|
+
p[i.id] && n > 0 && {
|
|
738
740
|
borderTop: 1,
|
|
739
741
|
borderColor: "border.main"
|
|
740
742
|
}
|
|
741
743
|
],
|
|
742
|
-
children: /* @__PURE__ */ o(
|
|
744
|
+
children: /* @__PURE__ */ o(y, { sx: { flexDirection: "row", width: "100%" }, children: [
|
|
743
745
|
/* @__PURE__ */ e("div", { style: { width: 24 } }),
|
|
744
746
|
/* @__PURE__ */ o(
|
|
745
|
-
|
|
747
|
+
y,
|
|
746
748
|
{
|
|
747
749
|
sx: [
|
|
748
750
|
{
|
|
@@ -753,28 +755,28 @@ const de = ({ sx: t = {} }) => {
|
|
|
753
755
|
py: 14,
|
|
754
756
|
width: "100%"
|
|
755
757
|
},
|
|
756
|
-
|
|
758
|
+
p[i.id] && {
|
|
757
759
|
borderBottom: 1,
|
|
758
760
|
borderColor: "border.main"
|
|
759
761
|
}
|
|
760
762
|
],
|
|
761
763
|
children: [
|
|
762
764
|
/* @__PURE__ */ e(
|
|
763
|
-
|
|
765
|
+
y,
|
|
764
766
|
{
|
|
765
767
|
sx: {
|
|
766
768
|
alignItems: "center",
|
|
767
769
|
flexDirection: "row",
|
|
768
770
|
gap: 12
|
|
769
771
|
},
|
|
770
|
-
children: /* @__PURE__ */ o(
|
|
771
|
-
/* @__PURE__ */ e(
|
|
772
|
-
/* @__PURE__ */ e(
|
|
772
|
+
children: /* @__PURE__ */ o(y, { sx: { overflow: "hidden", width: 98 }, children: [
|
|
773
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
|
|
774
|
+
/* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
|
|
773
775
|
] })
|
|
774
776
|
}
|
|
775
777
|
),
|
|
776
778
|
/* @__PURE__ */ o(
|
|
777
|
-
|
|
779
|
+
y,
|
|
778
780
|
{
|
|
779
781
|
sx: {
|
|
780
782
|
alignItems: "center",
|
|
@@ -784,47 +786,47 @@ const de = ({ sx: t = {} }) => {
|
|
|
784
786
|
justifyContent: "flex-end"
|
|
785
787
|
},
|
|
786
788
|
children: [
|
|
787
|
-
/* @__PURE__ */ o(
|
|
788
|
-
/* @__PURE__ */ e(
|
|
789
|
+
/* @__PURE__ */ o(y, { children: [
|
|
790
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
|
|
789
791
|
currency: "USD",
|
|
790
792
|
maximumFractionDigits: 2,
|
|
791
793
|
minimumFractionDigits: 2,
|
|
792
794
|
style: "currency"
|
|
793
795
|
}) }),
|
|
794
|
-
/* @__PURE__ */ o(
|
|
795
|
-
|
|
796
|
+
/* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
|
|
797
|
+
i.totalGainLoss !== 0 && /* @__PURE__ */ e(
|
|
796
798
|
k,
|
|
797
799
|
{
|
|
798
|
-
name:
|
|
800
|
+
name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
|
|
799
801
|
size: 12,
|
|
800
802
|
sx: {
|
|
801
803
|
verticalAlign: "middle",
|
|
802
804
|
mr: 1,
|
|
803
|
-
color:
|
|
805
|
+
color: i.totalGainLoss >= 0 ? "success.main" : "grey.700"
|
|
804
806
|
}
|
|
805
807
|
}
|
|
806
808
|
),
|
|
807
809
|
/* @__PURE__ */ e(
|
|
808
|
-
|
|
810
|
+
r,
|
|
809
811
|
{
|
|
810
812
|
sx: {
|
|
811
|
-
color:
|
|
812
|
-
fontWeight:
|
|
813
|
+
color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
814
|
+
fontWeight: i.totalGainLoss <= 0 ? 400 : 700
|
|
813
815
|
},
|
|
814
816
|
variant: "XSmall",
|
|
815
|
-
children:
|
|
817
|
+
children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
|
|
816
818
|
}
|
|
817
819
|
),
|
|
818
|
-
/* @__PURE__ */ e(
|
|
820
|
+
/* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
|
|
819
821
|
/* @__PURE__ */ e(
|
|
820
|
-
|
|
822
|
+
r,
|
|
821
823
|
{
|
|
822
824
|
sx: {
|
|
823
|
-
color:
|
|
824
|
-
fontWeight:
|
|
825
|
+
color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
|
|
826
|
+
fontWeight: i.totalGainLoss <= 0 ? 400 : 700
|
|
825
827
|
},
|
|
826
828
|
variant: "XSmall",
|
|
827
|
-
children: Math.abs(
|
|
829
|
+
children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
|
|
828
830
|
currency: "USD",
|
|
829
831
|
maximumFractionDigits: 2,
|
|
830
832
|
minimumFractionDigits: 2,
|
|
@@ -837,7 +839,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
837
839
|
/* @__PURE__ */ e(
|
|
838
840
|
k,
|
|
839
841
|
{
|
|
840
|
-
name:
|
|
842
|
+
name: p[i.id] ? "expand_less" : "expand_more",
|
|
841
843
|
size: 20
|
|
842
844
|
}
|
|
843
845
|
)
|
|
@@ -850,8 +852,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
850
852
|
] })
|
|
851
853
|
}
|
|
852
854
|
),
|
|
853
|
-
/* @__PURE__ */ e(
|
|
854
|
-
|
|
855
|
+
/* @__PURE__ */ e(_e, { children: /* @__PURE__ */ o(
|
|
856
|
+
y,
|
|
855
857
|
{
|
|
856
858
|
sx: {
|
|
857
859
|
alignItems: "center",
|
|
@@ -860,10 +862,10 @@ const de = ({ sx: t = {} }) => {
|
|
|
860
862
|
pl: 24
|
|
861
863
|
},
|
|
862
864
|
children: [
|
|
863
|
-
/* @__PURE__ */ e(
|
|
864
|
-
/* @__PURE__ */ o(
|
|
865
|
+
/* @__PURE__ */ e(y, { sx: { width: 32 } }),
|
|
866
|
+
/* @__PURE__ */ o(y, { sx: { flex: 1 }, children: [
|
|
865
867
|
/* @__PURE__ */ o(
|
|
866
|
-
|
|
868
|
+
y,
|
|
867
869
|
{
|
|
868
870
|
sx: {
|
|
869
871
|
alignItems: "center",
|
|
@@ -875,13 +877,13 @@ const de = ({ sx: t = {} }) => {
|
|
|
875
877
|
pr: 24
|
|
876
878
|
},
|
|
877
879
|
children: [
|
|
878
|
-
/* @__PURE__ */ e(
|
|
879
|
-
/* @__PURE__ */ e(
|
|
880
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.quantity }),
|
|
881
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
|
|
880
882
|
]
|
|
881
883
|
}
|
|
882
884
|
),
|
|
883
885
|
/* @__PURE__ */ o(
|
|
884
|
-
|
|
886
|
+
y,
|
|
885
887
|
{
|
|
886
888
|
sx: {
|
|
887
889
|
alignItems: "center",
|
|
@@ -891,9 +893,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
891
893
|
pr: 24
|
|
892
894
|
},
|
|
893
895
|
children: [
|
|
894
|
-
/* @__PURE__ */ e(
|
|
896
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.cost_basis_header }),
|
|
895
897
|
/* @__PURE__ */ o(
|
|
896
|
-
|
|
898
|
+
y,
|
|
897
899
|
{
|
|
898
900
|
direction: "row",
|
|
899
901
|
sx: {
|
|
@@ -901,13 +903,13 @@ const de = ({ sx: t = {} }) => {
|
|
|
901
903
|
gap: 4
|
|
902
904
|
},
|
|
903
905
|
children: [
|
|
904
|
-
|
|
905
|
-
|
|
906
|
+
x ? /* @__PURE__ */ e(
|
|
907
|
+
Ce,
|
|
906
908
|
{
|
|
907
909
|
autoFocus: !0,
|
|
908
|
-
onBlur: () =>
|
|
909
|
-
onChange:
|
|
910
|
-
onKeyDown: (
|
|
910
|
+
onBlur: () => m(i.id),
|
|
911
|
+
onChange: b,
|
|
912
|
+
onKeyDown: (w) => d(w, i.id),
|
|
911
913
|
size: "small",
|
|
912
914
|
sx: {
|
|
913
915
|
fontSize: 14,
|
|
@@ -922,18 +924,18 @@ const de = ({ sx: t = {} }) => {
|
|
|
922
924
|
border: "none"
|
|
923
925
|
}
|
|
924
926
|
},
|
|
925
|
-
value:
|
|
927
|
+
value: h
|
|
926
928
|
}
|
|
927
|
-
) : /* @__PURE__ */ e(
|
|
929
|
+
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: i.costBasis?.toLocaleString("en-US", {
|
|
928
930
|
currency: "USD",
|
|
929
931
|
maximumFractionDigits: 2,
|
|
930
932
|
minimumFractionDigits: 2,
|
|
931
933
|
style: "currency"
|
|
932
934
|
}) }),
|
|
933
935
|
/* @__PURE__ */ e(
|
|
934
|
-
|
|
936
|
+
de,
|
|
935
937
|
{
|
|
936
|
-
onClick: () => v(
|
|
938
|
+
onClick: () => v(i.id, i.costBasis),
|
|
937
939
|
sx: { minWidth: 16, minHeight: 16 },
|
|
938
940
|
children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
|
|
939
941
|
}
|
|
@@ -950,25 +952,25 @@ const de = ({ sx: t = {} }) => {
|
|
|
950
952
|
) })
|
|
951
953
|
]
|
|
952
954
|
},
|
|
953
|
-
|
|
955
|
+
i.id
|
|
954
956
|
);
|
|
955
957
|
})
|
|
956
958
|
]
|
|
957
959
|
}
|
|
958
960
|
);
|
|
959
|
-
}, ht = P(ut), q = (t) => /* @__PURE__ */ o(
|
|
960
|
-
/* @__PURE__ */ e(
|
|
961
|
+
}, ht = P(ut), q = (t) => /* @__PURE__ */ o(qe, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
962
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
|
|
961
963
|
/* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
|
|
962
964
|
] }), gt = ({
|
|
963
965
|
data: t,
|
|
964
|
-
editingHoldingId:
|
|
966
|
+
editingHoldingId: h,
|
|
965
967
|
currentEditedCostBasis: c,
|
|
966
|
-
handleCostBasisClick:
|
|
968
|
+
handleCostBasisClick: m,
|
|
967
969
|
handleCostBasisChange: v,
|
|
968
|
-
handleCostBasisKeyDown:
|
|
969
|
-
handleCostBasisBlur:
|
|
970
|
+
handleCostBasisKeyDown: b,
|
|
971
|
+
handleCostBasisBlur: d
|
|
970
972
|
}) => {
|
|
971
|
-
const { investments: s } = M(),
|
|
973
|
+
const { investments: s } = M(), f = ce().palette.mode === "dark", p = "success.main", l = f ? "grey.300" : "grey.700", u = (n, x = "lesserThan") => x === "greaterThan" ? n >= 0 ? p : l : n <= 0 ? l : p, i = [
|
|
972
974
|
{
|
|
973
975
|
field: "qty",
|
|
974
976
|
headerName: s.overview.qty_header,
|
|
@@ -983,8 +985,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
983
985
|
flex: 1,
|
|
984
986
|
renderHeader: q,
|
|
985
987
|
renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
|
|
986
|
-
/* @__PURE__ */ e(
|
|
987
|
-
/* @__PURE__ */ e(
|
|
988
|
+
/* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
|
|
989
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
|
|
988
990
|
] }) })
|
|
989
991
|
},
|
|
990
992
|
{
|
|
@@ -993,15 +995,15 @@ const de = ({ sx: t = {} }) => {
|
|
|
993
995
|
width: 132,
|
|
994
996
|
renderHeader: q,
|
|
995
997
|
renderCell: (n) => {
|
|
996
|
-
const
|
|
998
|
+
const x = h === n.row.id;
|
|
997
999
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
+
x ? /* @__PURE__ */ e(
|
|
1001
|
+
Ce,
|
|
1000
1002
|
{
|
|
1001
1003
|
autoFocus: !0,
|
|
1002
|
-
onBlur: () =>
|
|
1004
|
+
onBlur: () => d(n.row.id),
|
|
1003
1005
|
onChange: v,
|
|
1004
|
-
onKeyDown: (
|
|
1006
|
+
onKeyDown: (w) => b(w, n.row.id),
|
|
1005
1007
|
size: "small",
|
|
1006
1008
|
sx: {
|
|
1007
1009
|
fontSize: 14,
|
|
@@ -1018,16 +1020,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
1018
1020
|
},
|
|
1019
1021
|
value: c
|
|
1020
1022
|
}
|
|
1021
|
-
) : /* @__PURE__ */ e(
|
|
1023
|
+
) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
|
|
1022
1024
|
currency: "USD",
|
|
1023
1025
|
maximumFractionDigits: 2,
|
|
1024
1026
|
minimumFractionDigits: 2,
|
|
1025
1027
|
style: "currency"
|
|
1026
1028
|
}) }),
|
|
1027
1029
|
/* @__PURE__ */ e(
|
|
1028
|
-
|
|
1030
|
+
de,
|
|
1029
1031
|
{
|
|
1030
|
-
onClick: () =>
|
|
1032
|
+
onClick: () => m(n.row.id, n.row.costBasis),
|
|
1031
1033
|
sx: { minWidth: 12, minHeight: 12 },
|
|
1032
1034
|
children: /* @__PURE__ */ e(k, { name: "stylus", size: 12, sx: { color: "grey.700" } })
|
|
1033
1035
|
}
|
|
@@ -1043,7 +1045,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1043
1045
|
width: 196,
|
|
1044
1046
|
renderHeader: q,
|
|
1045
1047
|
renderCell: (n) => {
|
|
1046
|
-
const
|
|
1048
|
+
const x = n.row.costBasis, w = x ? n.row.totalGainLoss / x * 100 : 0;
|
|
1047
1049
|
return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
1048
1050
|
n.value !== 0 && /* @__PURE__ */ e(
|
|
1049
1051
|
k,
|
|
@@ -1051,29 +1053,29 @@ const de = ({ sx: t = {} }) => {
|
|
|
1051
1053
|
name: n.value > 0 ? "trending_up" : "trending_down",
|
|
1052
1054
|
size: 16,
|
|
1053
1055
|
sx: {
|
|
1054
|
-
color:
|
|
1056
|
+
color: u(n.value),
|
|
1055
1057
|
mr: 1,
|
|
1056
1058
|
verticalAlign: "middle"
|
|
1057
1059
|
}
|
|
1058
1060
|
}
|
|
1059
1061
|
),
|
|
1060
1062
|
/* @__PURE__ */ e(
|
|
1061
|
-
|
|
1063
|
+
r,
|
|
1062
1064
|
{
|
|
1063
1065
|
sx: {
|
|
1064
|
-
color:
|
|
1066
|
+
color: u(n.value),
|
|
1065
1067
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1066
1068
|
},
|
|
1067
1069
|
variant: "Small",
|
|
1068
|
-
children:
|
|
1070
|
+
children: x ? `${w.toFixed(2)}%` : "0.00%"
|
|
1069
1071
|
}
|
|
1070
1072
|
),
|
|
1071
|
-
/* @__PURE__ */ e(
|
|
1073
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1072
1074
|
/* @__PURE__ */ e(
|
|
1073
|
-
|
|
1075
|
+
r,
|
|
1074
1076
|
{
|
|
1075
1077
|
sx: {
|
|
1076
|
-
color:
|
|
1078
|
+
color: u(n.value),
|
|
1077
1079
|
fontWeight: n.value > 0 ? 700 : 400
|
|
1078
1080
|
},
|
|
1079
1081
|
variant: "Small",
|
|
@@ -1096,7 +1098,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1096
1098
|
headerName: s.overview.market_value_header,
|
|
1097
1099
|
width: 132,
|
|
1098
1100
|
renderHeader: q,
|
|
1099
|
-
renderCell: (n) => /* @__PURE__ */ e(
|
|
1101
|
+
renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
|
|
1100
1102
|
currency: "USD",
|
|
1101
1103
|
maximumFractionDigits: 2,
|
|
1102
1104
|
minimumFractionDigits: 2,
|
|
@@ -1107,16 +1109,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
1107
1109
|
}
|
|
1108
1110
|
];
|
|
1109
1111
|
return /* @__PURE__ */ e(
|
|
1110
|
-
|
|
1112
|
+
re,
|
|
1111
1113
|
{
|
|
1112
1114
|
sx: {
|
|
1113
1115
|
boxShadow: "none",
|
|
1114
1116
|
width: "100%"
|
|
1115
1117
|
},
|
|
1116
1118
|
children: /* @__PURE__ */ e(
|
|
1117
|
-
|
|
1119
|
+
$e,
|
|
1118
1120
|
{
|
|
1119
|
-
columns:
|
|
1121
|
+
columns: i,
|
|
1120
1122
|
disableColumnFilter: !0,
|
|
1121
1123
|
disableColumnMenu: !0,
|
|
1122
1124
|
disableRowSelectionOnClick: !0,
|
|
@@ -1128,55 +1130,55 @@ const de = ({ sx: t = {} }) => {
|
|
|
1128
1130
|
}
|
|
1129
1131
|
);
|
|
1130
1132
|
}, pt = () => {
|
|
1131
|
-
const { isMobile: t } = U(), [
|
|
1133
|
+
const { isMobile: t } = U(), [h, c] = O({}), [m, v] = O(!1), { selectedAccountGuids: b } = Q(), { visibleHoldings: d, updateHoldings: s } = H(), [g, f] = A.useState(!1), [p, l] = O({
|
|
1132
1134
|
accounts: [],
|
|
1133
1135
|
holdings: []
|
|
1134
|
-
}), { accounts:
|
|
1135
|
-
|
|
1136
|
-
}, J = (a) => {
|
|
1137
|
-
const w = a.target.value;
|
|
1138
|
-
/^\d*\.?\d*$/.test(w) && B(w);
|
|
1139
|
-
}, me = (a, w) => {
|
|
1140
|
-
a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
|
|
1136
|
+
}), { accounts: u, investments: i } = M(), { isCopyLoaded: n } = Q(), [x, w] = O(null), [S, B] = O(""), W = ce().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, C = "lesserThan") => C === "greaterThan" ? a >= 0 ? N : F : a <= 0 ? F : N, j = (a, C) => {
|
|
1137
|
+
w(a), B(C.toFixed(2));
|
|
1141
1138
|
}, Z = (a) => {
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1139
|
+
const C = a.target.value;
|
|
1140
|
+
/^\d*\.?\d*$/.test(C) && B(C);
|
|
1141
|
+
}, ue = (a, C) => {
|
|
1142
|
+
a.key === "Enter" ? ee(C) : a.key === "Escape" && w(null);
|
|
1143
|
+
}, ee = (a) => {
|
|
1144
|
+
const C = d.find(({ guid: E }) => E === a);
|
|
1145
|
+
if (!C) return;
|
|
1146
|
+
const G = Number(S);
|
|
1147
|
+
if (s({ ...C, cost_basis: G }), t) {
|
|
1148
|
+
const E = p.holdings.map(
|
|
1149
|
+
(D) => D.id === a ? { ...D, costBasis: G } : D
|
|
1148
1150
|
);
|
|
1149
1151
|
l((D) => ({
|
|
1150
1152
|
...D,
|
|
1151
1153
|
holdings: E
|
|
1152
1154
|
}));
|
|
1153
1155
|
}
|
|
1154
|
-
|
|
1155
|
-
},
|
|
1156
|
+
w(null);
|
|
1157
|
+
}, De = (a) => (C, G) => {
|
|
1156
1158
|
c((E) => ({
|
|
1157
1159
|
...E,
|
|
1158
|
-
[a]:
|
|
1160
|
+
[a]: G
|
|
1159
1161
|
}));
|
|
1160
|
-
}, { visibleHoldings:
|
|
1161
|
-
({ guid: a }) =>
|
|
1162
|
-
),
|
|
1163
|
-
({ account_guid: a }) =>
|
|
1164
|
-
).reduce((a,
|
|
1165
|
-
const
|
|
1166
|
-
return a +
|
|
1167
|
-
}, 0),
|
|
1162
|
+
}, { visibleHoldings: he } = H(), { visibleInvestmentAccounts: Le } = le(), X = Le.filter(
|
|
1163
|
+
({ guid: a }) => b.includes(a)
|
|
1164
|
+
), Ie = X.reduce((a, C) => a + (C.balance || 0), 0), Ae = X.map(({ guid: a }) => a), $ = he.filter(
|
|
1165
|
+
({ account_guid: a }) => Ae.includes(a)
|
|
1166
|
+
).reduce((a, C) => {
|
|
1167
|
+
const G = C.market_value ? C.market_value - (C.cost_basis || 0) : 0;
|
|
1168
|
+
return a + G;
|
|
1169
|
+
}, 0), Be = () => {
|
|
1168
1170
|
v(!1);
|
|
1169
1171
|
};
|
|
1170
|
-
return n ? /* @__PURE__ */ o(
|
|
1171
|
-
!!X.length && /* @__PURE__ */ o(
|
|
1172
|
-
/* @__PURE__ */ e(
|
|
1173
|
-
/* @__PURE__ */ e(
|
|
1172
|
+
return n ? /* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
|
|
1173
|
+
!!X.length && /* @__PURE__ */ o(y, { sx: { alignItems: "center" }, children: [
|
|
1174
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
|
|
1175
|
+
/* @__PURE__ */ e(J, { variant: "H1", children: Ie.toLocaleString("en-US", {
|
|
1174
1176
|
currency: "USD",
|
|
1175
1177
|
maximumFractionDigits: 2,
|
|
1176
1178
|
minimumFractionDigits: 2,
|
|
1177
1179
|
style: "currency"
|
|
1178
1180
|
}) }),
|
|
1179
|
-
/* @__PURE__ */ o(
|
|
1181
|
+
/* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
1180
1182
|
/* @__PURE__ */ e(
|
|
1181
1183
|
k,
|
|
1182
1184
|
{
|
|
@@ -1186,7 +1188,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1186
1188
|
}
|
|
1187
1189
|
),
|
|
1188
1190
|
/* @__PURE__ */ e(
|
|
1189
|
-
|
|
1191
|
+
r,
|
|
1190
1192
|
{
|
|
1191
1193
|
sx: { color: T($, "greaterThan"), fontWeight: 700 },
|
|
1192
1194
|
variant: "Small",
|
|
@@ -1201,7 +1203,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1201
1203
|
] })
|
|
1202
1204
|
] }),
|
|
1203
1205
|
X.map((a) => {
|
|
1204
|
-
const
|
|
1206
|
+
const C = he.filter((L) => L.account_guid === a.guid).map((L) => ({
|
|
1205
1207
|
id: L.guid,
|
|
1206
1208
|
qty: L.shares || 0,
|
|
1207
1209
|
holding: L.symbol || L.description || "Unknown",
|
|
@@ -1209,17 +1211,17 @@ const de = ({ sx: t = {} }) => {
|
|
|
1209
1211
|
totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
|
|
1210
1212
|
marketValue: L.market_value || 0,
|
|
1211
1213
|
description: L.description || ""
|
|
1212
|
-
})),
|
|
1213
|
-
(L,
|
|
1214
|
+
})), G = C.length > 0, E = a.balance, D = C.reduce(
|
|
1215
|
+
(L, We) => We.totalGainLoss + L,
|
|
1214
1216
|
0
|
|
1215
|
-
),
|
|
1217
|
+
), ge = E ? D / E * 100 : 0;
|
|
1216
1218
|
if (t)
|
|
1217
1219
|
return /* @__PURE__ */ e(
|
|
1218
|
-
|
|
1220
|
+
re,
|
|
1219
1221
|
{
|
|
1220
|
-
onClick:
|
|
1222
|
+
onClick: C.length ? () => {
|
|
1221
1223
|
v(!0), l({
|
|
1222
|
-
holdings:
|
|
1224
|
+
holdings: C,
|
|
1223
1225
|
accounts: a
|
|
1224
1226
|
});
|
|
1225
1227
|
} : void 0,
|
|
@@ -1228,7 +1230,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1228
1230
|
overflow: "hidden"
|
|
1229
1231
|
},
|
|
1230
1232
|
children: /* @__PURE__ */ o(
|
|
1231
|
-
|
|
1233
|
+
y,
|
|
1232
1234
|
{
|
|
1233
1235
|
sx: {
|
|
1234
1236
|
border: 1,
|
|
@@ -1241,7 +1243,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1241
1243
|
},
|
|
1242
1244
|
children: [
|
|
1243
1245
|
/* @__PURE__ */ o(
|
|
1244
|
-
|
|
1246
|
+
y,
|
|
1245
1247
|
{
|
|
1246
1248
|
sx: {
|
|
1247
1249
|
alignItems: "center",
|
|
@@ -1254,22 +1256,22 @@ const de = ({ sx: t = {} }) => {
|
|
|
1254
1256
|
},
|
|
1255
1257
|
children: [
|
|
1256
1258
|
/* @__PURE__ */ e(
|
|
1257
|
-
|
|
1259
|
+
oe,
|
|
1258
1260
|
{
|
|
1259
1261
|
alt: a.institutionName || "",
|
|
1260
1262
|
institutionGuid: a.institution_guid || "",
|
|
1261
1263
|
size: 32
|
|
1262
1264
|
}
|
|
1263
1265
|
),
|
|
1264
|
-
/* @__PURE__ */ o(
|
|
1265
|
-
/* @__PURE__ */ e(
|
|
1266
|
-
/* @__PURE__ */ e(
|
|
1266
|
+
/* @__PURE__ */ o(y, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
|
|
1267
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
|
|
1268
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
|
|
1267
1269
|
] })
|
|
1268
1270
|
]
|
|
1269
1271
|
}
|
|
1270
1272
|
),
|
|
1271
1273
|
/* @__PURE__ */ o(
|
|
1272
|
-
|
|
1274
|
+
y,
|
|
1273
1275
|
{
|
|
1274
1276
|
sx: {
|
|
1275
1277
|
alignItems: "center",
|
|
@@ -1280,7 +1282,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1280
1282
|
},
|
|
1281
1283
|
children: [
|
|
1282
1284
|
/* @__PURE__ */ o(
|
|
1283
|
-
|
|
1285
|
+
y,
|
|
1284
1286
|
{
|
|
1285
1287
|
sx: {
|
|
1286
1288
|
alignItems: "center",
|
|
@@ -1294,9 +1296,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
1294
1296
|
pt: 14
|
|
1295
1297
|
},
|
|
1296
1298
|
children: [
|
|
1297
|
-
/* @__PURE__ */ e(
|
|
1299
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
|
|
1298
1300
|
/* @__PURE__ */ o(
|
|
1299
|
-
|
|
1301
|
+
y,
|
|
1300
1302
|
{
|
|
1301
1303
|
sx: {
|
|
1302
1304
|
alignItems: "center",
|
|
@@ -1314,7 +1316,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1314
1316
|
}
|
|
1315
1317
|
),
|
|
1316
1318
|
/* @__PURE__ */ o(
|
|
1317
|
-
|
|
1319
|
+
r,
|
|
1318
1320
|
{
|
|
1319
1321
|
sx: {
|
|
1320
1322
|
color: T(D),
|
|
@@ -1322,14 +1324,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
1322
1324
|
},
|
|
1323
1325
|
variant: "Body",
|
|
1324
1326
|
children: [
|
|
1325
|
-
|
|
1327
|
+
ge.toFixed(2),
|
|
1326
1328
|
"%"
|
|
1327
1329
|
]
|
|
1328
1330
|
}
|
|
1329
1331
|
),
|
|
1330
|
-
/* @__PURE__ */ e(
|
|
1332
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1331
1333
|
/* @__PURE__ */ e(
|
|
1332
|
-
|
|
1334
|
+
r,
|
|
1333
1335
|
{
|
|
1334
1336
|
sx: {
|
|
1335
1337
|
color: T(D),
|
|
@@ -1351,7 +1353,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1351
1353
|
}
|
|
1352
1354
|
),
|
|
1353
1355
|
/* @__PURE__ */ o(
|
|
1354
|
-
|
|
1356
|
+
y,
|
|
1355
1357
|
{
|
|
1356
1358
|
sx: {
|
|
1357
1359
|
alignItems: "center",
|
|
@@ -1363,8 +1365,8 @@ const de = ({ sx: t = {} }) => {
|
|
|
1363
1365
|
pt: 14
|
|
1364
1366
|
},
|
|
1365
1367
|
children: [
|
|
1366
|
-
/* @__PURE__ */ e(
|
|
1367
|
-
/* @__PURE__ */ e(
|
|
1368
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
|
|
1369
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
|
|
1368
1370
|
currency: "USD",
|
|
1369
1371
|
maximumFractionDigits: 2,
|
|
1370
1372
|
minimumFractionDigits: 2,
|
|
@@ -1382,12 +1384,12 @@ const de = ({ sx: t = {} }) => {
|
|
|
1382
1384
|
},
|
|
1383
1385
|
a.guid
|
|
1384
1386
|
);
|
|
1385
|
-
const
|
|
1387
|
+
const Te = W ? "grey.700" : "grey.400", ke = C.length ? "text.primary" : Te;
|
|
1386
1388
|
return /* @__PURE__ */ o(
|
|
1387
|
-
|
|
1389
|
+
be,
|
|
1388
1390
|
{
|
|
1389
|
-
expanded:
|
|
1390
|
-
onChange:
|
|
1391
|
+
expanded: h[a.guid] === !0,
|
|
1392
|
+
onChange: G ? De(a.guid) : () => {
|
|
1391
1393
|
},
|
|
1392
1394
|
sx: {
|
|
1393
1395
|
border: 1,
|
|
@@ -1397,12 +1399,12 @@ const de = ({ sx: t = {} }) => {
|
|
|
1397
1399
|
},
|
|
1398
1400
|
children: [
|
|
1399
1401
|
/* @__PURE__ */ o(
|
|
1400
|
-
|
|
1402
|
+
we,
|
|
1401
1403
|
{
|
|
1402
1404
|
"aria-controls": "panel1a-content",
|
|
1403
1405
|
id: "panel1a-header",
|
|
1404
1406
|
sx: [
|
|
1405
|
-
|
|
1407
|
+
h[a.guid] && {
|
|
1406
1408
|
borderBottom: 1,
|
|
1407
1409
|
borderColor: "border.main",
|
|
1408
1410
|
maxHeight: 88
|
|
@@ -1410,7 +1412,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1410
1412
|
],
|
|
1411
1413
|
children: [
|
|
1412
1414
|
/* @__PURE__ */ o(
|
|
1413
|
-
|
|
1415
|
+
y,
|
|
1414
1416
|
{
|
|
1415
1417
|
sx: {
|
|
1416
1418
|
alignItems: "center",
|
|
@@ -1420,27 +1422,27 @@ const de = ({ sx: t = {} }) => {
|
|
|
1420
1422
|
width: "100%"
|
|
1421
1423
|
},
|
|
1422
1424
|
children: [
|
|
1423
|
-
/* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color:
|
|
1425
|
+
/* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color: ke } }),
|
|
1424
1426
|
/* @__PURE__ */ e(
|
|
1425
|
-
|
|
1427
|
+
oe,
|
|
1426
1428
|
{
|
|
1427
1429
|
alt: a.institutionName || "",
|
|
1428
1430
|
institutionGuid: a.institution_guid || "",
|
|
1429
1431
|
size: 32
|
|
1430
1432
|
}
|
|
1431
1433
|
),
|
|
1432
|
-
/* @__PURE__ */ o(
|
|
1433
|
-
/* @__PURE__ */ e(
|
|
1434
|
-
/* @__PURE__ */ e(
|
|
1434
|
+
/* @__PURE__ */ o(y, { sx: { alignItems: "flex-start" }, children: [
|
|
1435
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
|
|
1436
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
|
|
1435
1437
|
] })
|
|
1436
1438
|
]
|
|
1437
1439
|
}
|
|
1438
1440
|
),
|
|
1439
|
-
/* @__PURE__ */ o(
|
|
1440
|
-
/* @__PURE__ */ o(
|
|
1441
|
-
/* @__PURE__ */ e(
|
|
1441
|
+
/* @__PURE__ */ o(y, { sx: { flexDirection: "row" }, children: [
|
|
1442
|
+
/* @__PURE__ */ o(y, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
|
|
1443
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
|
|
1442
1444
|
/* @__PURE__ */ o(
|
|
1443
|
-
|
|
1445
|
+
y,
|
|
1444
1446
|
{
|
|
1445
1447
|
sx: {
|
|
1446
1448
|
alignItems: "center",
|
|
@@ -1458,7 +1460,7 @@ const de = ({ sx: t = {} }) => {
|
|
|
1458
1460
|
}
|
|
1459
1461
|
),
|
|
1460
1462
|
/* @__PURE__ */ o(
|
|
1461
|
-
|
|
1463
|
+
r,
|
|
1462
1464
|
{
|
|
1463
1465
|
sx: {
|
|
1464
1466
|
color: T(D),
|
|
@@ -1466,14 +1468,14 @@ const de = ({ sx: t = {} }) => {
|
|
|
1466
1468
|
},
|
|
1467
1469
|
variant: "Body",
|
|
1468
1470
|
children: [
|
|
1469
|
-
|
|
1471
|
+
ge.toFixed(2),
|
|
1470
1472
|
"%"
|
|
1471
1473
|
]
|
|
1472
1474
|
}
|
|
1473
1475
|
),
|
|
1474
|
-
/* @__PURE__ */ e(
|
|
1476
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
|
|
1475
1477
|
/* @__PURE__ */ e(
|
|
1476
|
-
|
|
1478
|
+
r,
|
|
1477
1479
|
{
|
|
1478
1480
|
sx: {
|
|
1479
1481
|
color: T(D),
|
|
@@ -1492,9 +1494,9 @@ const de = ({ sx: t = {} }) => {
|
|
|
1492
1494
|
}
|
|
1493
1495
|
)
|
|
1494
1496
|
] }),
|
|
1495
|
-
/* @__PURE__ */ e(
|
|
1496
|
-
/* @__PURE__ */ e(
|
|
1497
|
-
/* @__PURE__ */ e(
|
|
1497
|
+
/* @__PURE__ */ e(y, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(y, { sx: { alignItems: "flex-end" }, children: [
|
|
1498
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
|
|
1499
|
+
/* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
|
|
1498
1500
|
currency: "USD",
|
|
1499
1501
|
maximumFractionDigits: 2,
|
|
1500
1502
|
minimumFractionDigits: 2,
|
|
@@ -1505,16 +1507,16 @@ const de = ({ sx: t = {} }) => {
|
|
|
1505
1507
|
]
|
|
1506
1508
|
}
|
|
1507
1509
|
),
|
|
1508
|
-
/* @__PURE__ */ e(
|
|
1510
|
+
/* @__PURE__ */ e(_e, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(re, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
|
|
1509
1511
|
gt,
|
|
1510
1512
|
{
|
|
1511
1513
|
currentEditedCostBasis: S,
|
|
1512
|
-
data:
|
|
1513
|
-
editingHoldingId:
|
|
1514
|
-
handleCostBasisBlur:
|
|
1515
|
-
handleCostBasisChange:
|
|
1514
|
+
data: C,
|
|
1515
|
+
editingHoldingId: x,
|
|
1516
|
+
handleCostBasisBlur: ee,
|
|
1517
|
+
handleCostBasisChange: Z,
|
|
1516
1518
|
handleCostBasisClick: j,
|
|
1517
|
-
handleCostBasisKeyDown:
|
|
1519
|
+
handleCostBasisKeyDown: ue
|
|
1518
1520
|
}
|
|
1519
1521
|
) }) })
|
|
1520
1522
|
]
|
|
@@ -1522,89 +1524,94 @@ const de = ({ sx: t = {} }) => {
|
|
|
1522
1524
|
a.guid
|
|
1523
1525
|
);
|
|
1524
1526
|
}),
|
|
1525
|
-
/* @__PURE__ */ e(
|
|
1527
|
+
/* @__PURE__ */ e(me, {}),
|
|
1526
1528
|
/* @__PURE__ */ e(
|
|
1527
1529
|
ht,
|
|
1528
1530
|
{
|
|
1529
|
-
accountHoldingsData:
|
|
1531
|
+
accountHoldingsData: p,
|
|
1530
1532
|
currentEditedCostBasis: S,
|
|
1531
|
-
editingHoldingId:
|
|
1532
|
-
handleCostBasisBlur:
|
|
1533
|
-
handleCostBasisChange:
|
|
1533
|
+
editingHoldingId: x,
|
|
1534
|
+
handleCostBasisBlur: ee,
|
|
1535
|
+
handleCostBasisChange: Z,
|
|
1534
1536
|
handleCostBasisClick: j,
|
|
1535
|
-
handleCostBasisKeyDown:
|
|
1536
|
-
isOpen:
|
|
1537
|
-
onClose:
|
|
1537
|
+
handleCostBasisKeyDown: ue,
|
|
1538
|
+
isOpen: m,
|
|
1539
|
+
onClose: Be
|
|
1538
1540
|
}
|
|
1539
1541
|
),
|
|
1540
1542
|
/* @__PURE__ */ e(
|
|
1541
|
-
|
|
1543
|
+
pe,
|
|
1542
1544
|
{
|
|
1543
|
-
onClose: () =>
|
|
1544
|
-
showConnectionsWidget:
|
|
1545
|
-
title:
|
|
1545
|
+
onClose: () => f(!1),
|
|
1546
|
+
showConnectionsWidget: g,
|
|
1547
|
+
title: u.manage_connections
|
|
1546
1548
|
}
|
|
1547
1549
|
)
|
|
1548
|
-
] }) : /* @__PURE__ */ e(
|
|
1549
|
-
}, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(
|
|
1550
|
-
const { onEvent: c } =
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
} =
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1550
|
+
] }) : /* @__PURE__ */ e(Se, {});
|
|
1551
|
+
}, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), cn = P(({ onBackClick: t, sx: h }) => {
|
|
1552
|
+
const { onEvent: c } = ve(), { isMobile: m } = U(), {
|
|
1553
|
+
isAccountDataLoaded: v,
|
|
1554
|
+
loadAccountData: b,
|
|
1555
|
+
visibleInvestmentAccounts: d
|
|
1556
|
+
} = le(), {
|
|
1557
|
+
visibleHoldings: s,
|
|
1558
|
+
setShowConnectionsWidget: g,
|
|
1559
|
+
showConnectionsWidget: f
|
|
1560
|
+
} = H(), { investments: p, accounts: l } = M(), { isInitialized: u } = Q(), [i, n] = A.useState(0), { loadHoldings: x, holdingsLoaded: w } = H();
|
|
1561
|
+
Ke({
|
|
1562
|
+
widgetName: "InvestmentsWidget",
|
|
1563
|
+
isLoaded: w
|
|
1564
|
+
}), A.useEffect(() => {
|
|
1565
|
+
v || b().finally();
|
|
1566
|
+
}, []), A.useEffect(() => {
|
|
1567
|
+
u && x().finally();
|
|
1568
|
+
}, [u]);
|
|
1562
1569
|
const S = () => {
|
|
1563
1570
|
c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
|
|
1564
1571
|
};
|
|
1565
|
-
if (!
|
|
1572
|
+
if (!u || !w) return /* @__PURE__ */ e(Se, {});
|
|
1566
1573
|
const B = [
|
|
1567
1574
|
z.INVESTMENT_WIDGET_DETAILS_CLICK,
|
|
1568
1575
|
z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
|
|
1569
1576
|
z.INVESTMENT_WIDGET_ANALYSIS_CLICK
|
|
1570
|
-
], I =
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1577
|
+
], I = d.length === 0 && s.length === 0, W = [
|
|
1578
|
+
p.tab_overview_title,
|
|
1579
|
+
p.tab_allocation_title,
|
|
1580
|
+
p.tab_analysis_title
|
|
1574
1581
|
];
|
|
1575
1582
|
return /* @__PURE__ */ o(
|
|
1576
|
-
|
|
1583
|
+
Ue,
|
|
1577
1584
|
{
|
|
1578
|
-
|
|
1585
|
+
allowedAccountTypes: [Ye.INVESTMENT],
|
|
1579
1586
|
onAccountsFilterClick: S,
|
|
1580
1587
|
onBackClick: t,
|
|
1581
|
-
sx:
|
|
1582
|
-
title:
|
|
1588
|
+
sx: h,
|
|
1589
|
+
title: p.title,
|
|
1583
1590
|
children: [
|
|
1584
|
-
/* @__PURE__ */ o(_, { mx:
|
|
1591
|
+
/* @__PURE__ */ o(_, { mx: m ? 0 : 48, my: 24, children: [
|
|
1585
1592
|
/* @__PURE__ */ e(
|
|
1586
|
-
|
|
1593
|
+
Ee,
|
|
1587
1594
|
{
|
|
1588
|
-
onChange: (
|
|
1589
|
-
|
|
1595
|
+
onChange: (N, F) => {
|
|
1596
|
+
n(F), c(B[F]);
|
|
1590
1597
|
},
|
|
1591
1598
|
sx: { bgcolor: "background.paper" },
|
|
1592
1599
|
textColor: "primary",
|
|
1593
|
-
value: I ? -1 :
|
|
1600
|
+
value: I ? -1 : i,
|
|
1594
1601
|
variant: "fullWidth",
|
|
1595
|
-
children: W.map((
|
|
1602
|
+
children: W.map((N) => /* @__PURE__ */ e(Fe, { disabled: I, label: /* @__PURE__ */ e(yt, { title: N }) }, N))
|
|
1596
1603
|
}
|
|
1597
1604
|
),
|
|
1598
1605
|
I ? /* @__PURE__ */ e(
|
|
1599
1606
|
Qe,
|
|
1600
1607
|
{
|
|
1601
|
-
header:
|
|
1608
|
+
header: p.empty_state_header,
|
|
1602
1609
|
icon: "bid_landscape",
|
|
1603
1610
|
onClick: () => {
|
|
1604
|
-
|
|
1611
|
+
g(!0), c(z.ACCOUNTS_CLICK_CONNECT);
|
|
1605
1612
|
},
|
|
1606
|
-
primaryButton:
|
|
1607
|
-
subText:
|
|
1613
|
+
primaryButton: p.overview.connect_accounts,
|
|
1614
|
+
subText: p.empty_state_description,
|
|
1608
1615
|
sx: {
|
|
1609
1616
|
width: { sm: 432 },
|
|
1610
1617
|
".buttons-footer": {
|
|
@@ -1617,18 +1624,18 @@ const de = ({ sx: t = {} }) => {
|
|
|
1617
1624
|
px: 16
|
|
1618
1625
|
}
|
|
1619
1626
|
}
|
|
1620
|
-
) : /* @__PURE__ */ o(
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1627
|
+
) : /* @__PURE__ */ o(se, { children: [
|
|
1628
|
+
i === 0 && /* @__PURE__ */ e(xt, {}),
|
|
1629
|
+
i === 1 && /* @__PURE__ */ e(at, {}),
|
|
1630
|
+
i === 2 && /* @__PURE__ */ e(mt, {})
|
|
1624
1631
|
] })
|
|
1625
1632
|
] }),
|
|
1626
1633
|
/* @__PURE__ */ e(
|
|
1627
|
-
|
|
1634
|
+
pe,
|
|
1628
1635
|
{
|
|
1629
|
-
onClose: () =>
|
|
1630
|
-
showConnectionsWidget:
|
|
1631
|
-
title:
|
|
1636
|
+
onClose: () => g(!1),
|
|
1637
|
+
showConnectionsWidget: f,
|
|
1638
|
+
title: l.manage_connections
|
|
1632
1639
|
}
|
|
1633
1640
|
)
|
|
1634
1641
|
]
|
|
@@ -1636,5 +1643,5 @@ const de = ({ sx: t = {} }) => {
|
|
|
1636
1643
|
);
|
|
1637
1644
|
});
|
|
1638
1645
|
export {
|
|
1639
|
-
|
|
1646
|
+
cn as InvestmentsWidget
|
|
1640
1647
|
};
|