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