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