@mx-cartographer/experiences 8.1.12 → 8.2.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 +4 -0
- package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
- package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
- package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +21 -21
- package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
- package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-BYyeeCf6.mjs} +7 -7
- package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
- package/dist/{Analytics-CxK7O19c.mjs → Analytics-CkYXKvco.mjs} +1 -1
- package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
- package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +2 -2
- package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
- package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
- package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
- package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
- package/dist/CurrencyDialog-d4dL7vA5.mjs +371 -0
- package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-B59ugxPN.mjs} +15 -16
- package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
- package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-HudZ3Bjs.mjs} +6 -7
- package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
- package/dist/DebtUtils-DD3186U-.mjs +153 -0
- package/dist/EmbeddedCard-BNl3quCs.mjs +856 -0
- package/dist/Error-Dogaw2jO.mjs +84 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
- package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-hDprC41l.mjs} +6 -5
- package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
- package/dist/{Help-C_CM4gpK.mjs → Help-BSQm9o29.mjs} +68 -67
- package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
- package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
- package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-CejWS_rh.mjs} +2 -2
- package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
- package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
- package/dist/Localization-DnoVyBNK.mjs +38 -0
- package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-DwylSiWs.mjs} +51 -51
- package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
- package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
- package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-CCg-Tml2.mjs} +13 -13
- package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
- package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
- package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +4 -4
- package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-CPXLW6AR.mjs} +9 -9
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
- package/dist/Select-BZRUpOib.mjs +51 -0
- package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
- package/dist/Sizes-DISGrlUg.mjs +6 -0
- package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-PKlh8caU.mjs} +6 -6
- package/dist/{SpendingLegend-BS8mHUbu.mjs → SpendingLegend-BmkEr9Nh.mjs} +4 -4
- package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-CbBSxdOi.mjs} +33 -33
- package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
- package/dist/UserStore-CRpKQjpP.mjs +3002 -0
- package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +28 -30
- package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-DalWyz5A.mjs} +3 -3
- package/dist/accounts/hooks/useUiStore.d.ts +6 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +62 -64
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +18 -18
- package/dist/cashflow/context/hooks.d.ts +15 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +28 -31
- package/dist/categories/context/hooks.d.ts +19 -1
- package/dist/categories/index.d.ts +0 -1
- package/dist/categories/index.es.js +4 -6
- package/dist/common/constants/ScheduledPayment.d.ts +1 -1
- package/dist/common/constants/index.d.ts +0 -3
- package/dist/common/context/GlobalDataProvider.d.ts +1 -1
- package/dist/common/context/hooks.d.ts +20 -20
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.es.js +215 -961
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/index.d.ts +0 -4
- package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
- package/dist/core/constants/Transaction.d.ts +10 -0
- package/dist/core/constants/index.d.ts +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.es.js +94 -79
- package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
- package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
- package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
- package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
- package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
- package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
- package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
- package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
- package/dist/core/stores/DebtsStore.d.ts +22 -0
- package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
- package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
- package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
- package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
- package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
- package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
- package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
- package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
- package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
- package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
- package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
- package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
- package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
- package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
- package/dist/{common → core}/stores/UserStore.d.ts +2 -2
- package/dist/core/stores/index.d.ts +24 -0
- package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
- package/dist/core/types/Offer.d.ts +32 -0
- package/dist/core/types/index.d.ts +3 -1
- package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
- package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
- package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
- package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
- package/dist/core/utils/DebtUtils.d.ts +31 -0
- package/dist/core/utils/FinstrongUtils.d.ts +7 -0
- package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
- package/dist/core/utils/HelpUtil.d.ts +3 -0
- package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
- package/dist/core/utils/Localization.d.ts +3 -0
- package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
- package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
- package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
- package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
- package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
- package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
- package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
- package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/components/DebtsChart.d.ts +1 -1
- package/dist/debts/components/DebtsTable.d.ts +1 -1
- package/dist/debts/components/SnowballCard.d.ts +1 -1
- package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
- package/dist/debts/index.d.ts +0 -1
- package/dist/debts/index.es.js +568 -691
- package/dist/debts/utils/DebtsTable.d.ts +1 -1
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +1565 -1342
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +71 -73
- package/dist/help/index.es.js +4 -4
- package/dist/help/utils/index.d.ts +0 -1
- package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +52 -54
- package/dist/investments/components/AnalysisDetails.d.ts +1 -1
- package/dist/investments/index.es.js +6 -6
- package/dist/merchants/index.d.ts +0 -1
- package/dist/merchants/index.es.js +12 -14
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -33
- package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
- package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -1
- package/dist/networth/components/NetWorthListItem.d.ts +1 -1
- package/dist/networth/components/NetWorthSummary.d.ts +1 -1
- package/dist/networth/index.d.ts +0 -4
- package/dist/networth/index.es.js +232 -237
- package/dist/notifications/index.d.ts +0 -2
- package/dist/notifications/index.es.js +23 -26
- package/dist/recurringtransactions/index.d.ts +0 -1
- package/dist/recurringtransactions/index.es.js +92 -96
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +11 -13
- package/dist/spending/index.es.js +10 -10
- package/dist/transactions/context/hooks.d.ts +1 -1
- package/dist/transactions/index.d.ts +0 -4
- package/dist/transactions/index.es.js +102 -109
- package/dist/trends/index.d.ts +0 -1
- package/dist/trends/index.es.js +67 -68
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
- package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
- package/package.json +1 -1
- package/dist/AccountApi-WEM2M9tg.mjs +0 -19
- package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
- package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
- package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
- package/dist/BeatStore-C7-PIhpB.mjs +0 -163
- package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
- package/dist/CashflowStore-BEi92kJg.mjs +0 -91
- package/dist/CategoryApi-CogDFScz.mjs +0 -29
- package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
- package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
- package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
- package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
- package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
- package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
- package/dist/Goal-MFBpoOIC.mjs +0 -29
- package/dist/GoalStore-BBAEbf43.mjs +0 -395
- package/dist/Localization-C_HZg9tJ.mjs +0 -15
- package/dist/Localization-CkQ49EKr.mjs +0 -26
- package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
- package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
- package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
- package/dist/NotificationApi-DF0obHoR.mjs +0 -20
- package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
- package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
- package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
- package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
- package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
- package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
- package/dist/Transaction-Cn5_iFm0.mjs +0 -5
- package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
- package/dist/TransactionStore-amPYxHnA.mjs +0 -710
- package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
- package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
- package/dist/accounts/stores/UiStore.d.ts +0 -10
- package/dist/accounts/utils/index.d.ts +0 -1
- package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
- package/dist/categories/stores/UiStore.d.ts +0 -20
- package/dist/common/stores/index.d.ts +0 -3
- package/dist/common/utils/Categories.d.ts +0 -6
- package/dist/common/utils/Localization.d.ts +0 -3
- package/dist/debts/store/DebtsStore.d.ts +0 -10
- package/dist/debts/store/DebtsUiStore.d.ts +0 -13
- package/dist/debts/utils/DebtStore.d.ts +0 -4
- package/dist/debts/utils/DebtsWidget.d.ts +0 -20
- package/dist/debts/utils/shared.d.ts +0 -12
- package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
- package/dist/help/constants/index.d.ts +0 -1
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
- package/dist/transactions/analytics.d.ts +0 -3
- package/dist/transactions/constants/Transaction.d.ts +0 -2
- package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
- package/dist/transactions/stores/UiStore.d.ts +0 -25
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
- /package/dist/{common → core}/constants/Category.d.ts +0 -0
- /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
- /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
- /package/dist/{help → core}/constants/Help.d.ts +0 -0
- /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
- /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
- /package/dist/{common → core}/constants/Table.d.ts +0 -0
- /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
|
@@ -1,65 +1,116 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fromUnixTime as rt } from "date-fns/fromUnixTime";
|
|
3
|
-
import { observer as _ } from "mobx-react-lite";
|
|
4
|
-
import it from "@mui/material/Stack/Stack";
|
|
5
|
-
import { useTheme as z } from "@mui/material/styles";
|
|
6
|
-
import { L as at } from "../LineChart-CeZnCZ7j.mjs";
|
|
7
|
-
import { u as Y } from "../useScreenSize-CeFhWTt_.mjs";
|
|
8
|
-
import { p as st, q as R, u as E, g as G, d as ct, b as q } from "../hooks-RzCoiTd0.mjs";
|
|
9
|
-
import { f as lt, D as mt } from "../DateFormats-CaOj_4eI.mjs";
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
10
2
|
import u from "react";
|
|
11
|
-
import
|
|
3
|
+
import { observer as _ } from "mobx-react-lite";
|
|
4
|
+
import m from "@mui/material/Stack";
|
|
5
|
+
import { P as Y, Text as d, Icon as H } from "@mxenabled/mxui";
|
|
6
|
+
import { Icon as Z } from "@mxenabled/mx-icons";
|
|
7
|
+
import { f as F } from "../NumberFormatting--XMeeBfr.mjs";
|
|
8
|
+
import { d as re, g as z, u as E, b as q, x as R, D as ie } from "../hooks-BaO_gOI6.mjs";
|
|
9
|
+
import { u as J } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
10
|
+
import { A as v } from "../Analytics-CzGzz_sE.mjs";
|
|
11
|
+
import { L as Q } from "../Loader-CxeBwuPG.mjs";
|
|
12
|
+
import { M as ae } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
13
|
+
import { format as se, fromUnixTime as ce, differenceInMonths as le } from "date-fns";
|
|
14
|
+
import P from "@mui/material/Box";
|
|
15
|
+
import { C as de } from "../ConnectionsDrawer-D7IXAza2.mjs";
|
|
16
|
+
import { fromUnixTime as me } from "date-fns/fromUnixTime";
|
|
17
|
+
import he from "@mui/material/Stack/Stack";
|
|
18
|
+
import { useTheme as G } from "@mui/material/styles";
|
|
19
|
+
import { L as pe } from "../LineChart-CejWS_rh.mjs";
|
|
20
|
+
import { u as ee } from "../useScreenSize-CeFhWTt_.mjs";
|
|
21
|
+
import { f as ue, D as fe } from "../DateFormats-HudZ3Bjs.mjs";
|
|
22
|
+
import xe from "@mui/material/Button";
|
|
12
23
|
import L from "@mui/material/Divider";
|
|
13
24
|
import j from "@mui/material/List";
|
|
14
25
|
import A from "@mui/material/ListSubheader";
|
|
15
|
-
import d from "@mui/material/Stack";
|
|
16
|
-
import { Text as m, Icon as H, P as Z } from "@mxenabled/mxui";
|
|
17
26
|
import O from "@mui/material/ListItem";
|
|
18
|
-
import
|
|
27
|
+
import te from "@mui/material/ListItemButton";
|
|
19
28
|
import b from "@mui/material/ListItemText";
|
|
20
|
-
import { j as
|
|
21
|
-
import { C as x } from "../CurrencyText-
|
|
22
|
-
import
|
|
23
|
-
import { Stack as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
import { j as ne } from "../DateUtil-Bhq59ZVg.mjs";
|
|
30
|
+
import { C as x } from "../CurrencyText-CCbE6MmF.mjs";
|
|
31
|
+
import oe from "@mui/material/styles/useTheme";
|
|
32
|
+
import { Stack as ge } from "@mui/material";
|
|
33
|
+
import ye from "@mui/material/Collapse";
|
|
34
|
+
import K from "@mui/material/ListItemIcon";
|
|
35
|
+
import { g as U } from "../NetWorthUtils-DilGN1nW.mjs";
|
|
36
|
+
import { D as V } from "../Drawer-XPaLYjiO.mjs";
|
|
37
|
+
import { W as Ce } from "../WidgetContainer-DalWyz5A.mjs";
|
|
38
|
+
import { E as be } from "../EmptyState-DHAkGsjk.mjs";
|
|
39
|
+
const _e = ({ amount: t, copy: s, trendValue: i }) => {
|
|
40
|
+
const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
41
|
+
return /* @__PURE__ */ r(m, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
42
|
+
/* @__PURE__ */ e(Y, { variant: "h1", children: F(t, "0,0") }),
|
|
43
|
+
t !== 0 && /* @__PURE__ */ r(m, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
|
|
44
|
+
/* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 8 }, children: [
|
|
45
|
+
/* @__PURE__ */ e(Z, { name: o, size: 20 }),
|
|
46
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: F(i, "0,0.00") })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ e(d, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
|
|
49
|
+
] })
|
|
50
|
+
] });
|
|
51
|
+
}, we = ({ copy: t }) => /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
52
|
+
/* @__PURE__ */ e(Z, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
|
|
53
|
+
/* @__PURE__ */ r(m, { children: [
|
|
54
|
+
/* @__PURE__ */ e(d, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
|
|
55
|
+
/* @__PURE__ */ e(Y, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
|
|
56
|
+
] })
|
|
57
|
+
] }), _t = _(({ onCTAClick: t }) => {
|
|
58
|
+
const { visibleAccounts: s } = re(), { onEvent: i } = z(), { net_worth: n, common: a } = E(), { isInitialized: o } = q(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = R();
|
|
59
|
+
if (u.useEffect(() => {
|
|
60
|
+
c || l().finally();
|
|
61
|
+
}, []), J({
|
|
62
|
+
widgetName: "NetWorthMicroWidget",
|
|
63
|
+
isLoaded: c
|
|
64
|
+
}), u.useEffect(() => {
|
|
65
|
+
c && i(v.NET_WORTH_LOAD_WIDGET, {
|
|
66
|
+
state: s?.length ? "default" : "zeroState"
|
|
67
|
+
});
|
|
68
|
+
}, [c]), !o || !c) return /* @__PURE__ */ e(Q, { height: 100 });
|
|
69
|
+
const S = () => {
|
|
70
|
+
i(
|
|
71
|
+
s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
|
|
72
|
+
), t();
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ e(
|
|
75
|
+
ae,
|
|
76
|
+
{
|
|
77
|
+
className: "mx-networth-microwidget",
|
|
78
|
+
ctaLabel: a.see_details,
|
|
79
|
+
onCTAClick: S,
|
|
80
|
+
title: n.net_worth,
|
|
81
|
+
children: g.accounts.length ? /* @__PURE__ */ e(
|
|
82
|
+
_e,
|
|
83
|
+
{
|
|
84
|
+
amount: f?.y,
|
|
85
|
+
copy: n,
|
|
86
|
+
trendValue: f?.change
|
|
87
|
+
}
|
|
88
|
+
) : /* @__PURE__ */ e(we, { copy: n })
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}), ve = () => {
|
|
92
|
+
const { isMobile: t } = ee(), { availableWidth: s } = ie(), i = G(), {
|
|
42
93
|
hoveredData: n,
|
|
43
94
|
netWorthChartData: a,
|
|
44
95
|
selectedData: o,
|
|
45
96
|
setHoveredIndex: c,
|
|
46
97
|
setSelectedIndex: l
|
|
47
98
|
} = R(), g = s - 320, f = a.map((h) => ({
|
|
48
|
-
x:
|
|
99
|
+
x: ue(me(h.x), fe.MONTH_SHORT),
|
|
49
100
|
y: h.y
|
|
50
|
-
})),
|
|
51
|
-
fill: h ===
|
|
52
|
-
filter: h ===
|
|
101
|
+
})), S = o ? { index: a.findIndex((h) => h.x === o.x) } : void 0, W = n ? { index: a.findIndex((h) => h.x === n.x) } : void 0, w = (h) => ({
|
|
102
|
+
fill: h === S?.index ? i.palette.success.main : "",
|
|
103
|
+
filter: h === W?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
|
|
53
104
|
stroke: i.palette.success.main
|
|
54
105
|
}), y = (h, M) => {
|
|
55
106
|
l(M);
|
|
56
107
|
}, k = (h) => {
|
|
57
108
|
c(h);
|
|
58
|
-
},
|
|
109
|
+
}, D = () => {
|
|
59
110
|
c(-1);
|
|
60
111
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
112
|
+
return /* @__PURE__ */ e(he, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
113
|
+
pe,
|
|
63
114
|
{
|
|
64
115
|
baseline: "min",
|
|
65
116
|
chartFor: "networthChart",
|
|
@@ -70,16 +121,16 @@ const _t = () => {
|
|
|
70
121
|
height: 350,
|
|
71
122
|
labels: [],
|
|
72
123
|
margin: { right: 20, left: 38 },
|
|
73
|
-
markHandlers: { onMarkClick: y, onMouseEnter: k, onMouseLeave:
|
|
124
|
+
markHandlers: { onMarkClick: y, onMouseEnter: k, onMouseLeave: D },
|
|
74
125
|
markStyles: w,
|
|
75
126
|
showArea: !0,
|
|
76
127
|
useCustomMark: !0,
|
|
77
128
|
valueFormatterString: "0.0[0]a",
|
|
78
|
-
width:
|
|
129
|
+
width: t ? s - 48 : g
|
|
79
130
|
}
|
|
80
131
|
) });
|
|
81
|
-
},
|
|
82
|
-
item:
|
|
132
|
+
}, Se = _(ve), We = ({
|
|
133
|
+
item: t,
|
|
83
134
|
getStyles: s,
|
|
84
135
|
isHovered: i = !1,
|
|
85
136
|
isSelected: n = !1,
|
|
@@ -91,9 +142,9 @@ const _t = () => {
|
|
|
91
142
|
color: ""
|
|
92
143
|
});
|
|
93
144
|
return u.useEffect(() => {
|
|
94
|
-
g(s(
|
|
145
|
+
g(s(t));
|
|
95
146
|
}, [i, n]), /* @__PURE__ */ r(u.Fragment, { children: [
|
|
96
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ e(
|
|
97
148
|
O,
|
|
98
149
|
{
|
|
99
150
|
sx: {
|
|
@@ -101,19 +152,19 @@ const _t = () => {
|
|
|
101
152
|
minHeight: 44,
|
|
102
153
|
"&:hover": { color: n ? "inherit" : l.color }
|
|
103
154
|
},
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
|
|
155
|
+
children: /* @__PURE__ */ e(
|
|
156
|
+
te,
|
|
106
157
|
{
|
|
107
|
-
onClick: (f) => a?.(f,
|
|
108
|
-
onMouseEnter: () => o(
|
|
158
|
+
onClick: (f) => a?.(f, t.x),
|
|
159
|
+
onMouseEnter: () => o(t.x),
|
|
109
160
|
onMouseLeave: () => c(),
|
|
110
161
|
sx: { minHeight: 20, padding: 12 },
|
|
111
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ e(
|
|
112
163
|
b,
|
|
113
164
|
{
|
|
114
|
-
primary: /* @__PURE__ */ r(
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
165
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
166
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: ne(t.x) }),
|
|
167
|
+
/* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "body1" })
|
|
117
168
|
] })
|
|
118
169
|
}
|
|
119
170
|
)
|
|
@@ -121,18 +172,18 @@ const _t = () => {
|
|
|
121
172
|
)
|
|
122
173
|
}
|
|
123
174
|
),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
] },
|
|
126
|
-
},
|
|
127
|
-
currencyLabel:
|
|
175
|
+
/* @__PURE__ */ e(L, {})
|
|
176
|
+
] }, t.x);
|
|
177
|
+
}, Te = _(We), Ie = ({
|
|
178
|
+
currencyLabel: t,
|
|
128
179
|
currencyVariant: s = "body2",
|
|
129
180
|
iconSize: i,
|
|
130
181
|
netWorth: n,
|
|
131
182
|
theme: a
|
|
132
183
|
}) => {
|
|
133
184
|
let o = a.palette.secondary.main, c = a.palette.secondary.main, l = "trending_flat";
|
|
134
|
-
return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(
|
|
135
|
-
/* @__PURE__ */
|
|
185
|
+
return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(ge, { alignItems: "center", direction: "row", spacing: 4, children: [
|
|
186
|
+
/* @__PURE__ */ e(
|
|
136
187
|
H,
|
|
137
188
|
{
|
|
138
189
|
name: l,
|
|
@@ -142,40 +193,40 @@ const _t = () => {
|
|
|
142
193
|
}
|
|
143
194
|
}
|
|
144
195
|
),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ e(x, { amount: n.change, color: c, variant: s }),
|
|
197
|
+
/* @__PURE__ */ e(d, { variant: "body2", children: t })
|
|
147
198
|
] });
|
|
148
|
-
}, B = _(
|
|
149
|
-
netWorth:
|
|
199
|
+
}, B = _(Ie), Le = ({
|
|
200
|
+
netWorth: t,
|
|
150
201
|
gains: s,
|
|
151
202
|
losses: i,
|
|
152
203
|
totalGains: n,
|
|
153
204
|
totalLosses: a
|
|
154
205
|
}) => {
|
|
155
|
-
const { net_worth: o } = E(), c =
|
|
156
|
-
return /* @__PURE__ */ r(
|
|
157
|
-
/* @__PURE__ */ r(
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
206
|
+
const { net_worth: o } = E(), c = oe();
|
|
207
|
+
return /* @__PURE__ */ r(N, { children: [
|
|
208
|
+
/* @__PURE__ */ r(m, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
|
|
209
|
+
/* @__PURE__ */ e(d, { variant: "body2", children: ne(t?.x) }),
|
|
210
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: o.total_change }),
|
|
211
|
+
t && /* @__PURE__ */ e(B, { currencyVariant: "h1", iconSize: 32, netWorth: t, theme: c })
|
|
161
212
|
] }),
|
|
162
213
|
/* @__PURE__ */ r(j, { children: [
|
|
163
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
164
215
|
b,
|
|
165
216
|
{
|
|
166
|
-
primary: /* @__PURE__ */ r(
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
217
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
218
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
|
|
219
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
|
|
169
220
|
] })
|
|
170
221
|
}
|
|
171
222
|
) }),
|
|
172
223
|
s?.map((l) => /* @__PURE__ */ r(u.Fragment, { children: [
|
|
173
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ e(O, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
|
|
174
225
|
b,
|
|
175
226
|
{
|
|
176
|
-
primary: /* @__PURE__ */ r(
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
227
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
228
|
+
/* @__PURE__ */ e(d, { sx: { mr: 10 }, variant: "body1", children: l.accountName }),
|
|
229
|
+
/* @__PURE__ */ e(
|
|
179
230
|
x,
|
|
180
231
|
{
|
|
181
232
|
amount: l.gain,
|
|
@@ -187,28 +238,28 @@ const _t = () => {
|
|
|
187
238
|
sx: { px: 16 }
|
|
188
239
|
}
|
|
189
240
|
) }),
|
|
190
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ e(L, {})
|
|
191
242
|
] }, l.accountName)),
|
|
192
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
193
244
|
b,
|
|
194
245
|
{
|
|
195
|
-
primary: /* @__PURE__ */ r(
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
246
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
247
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
|
|
248
|
+
/* @__PURE__ */ e(x, { amount: a, sx: { fontWeight: 400 }, variant: "caption" })
|
|
198
249
|
] })
|
|
199
250
|
}
|
|
200
251
|
) }),
|
|
201
|
-
i?.map((l) => /* @__PURE__ */ r(
|
|
202
|
-
/* @__PURE__ */
|
|
252
|
+
i?.map((l) => /* @__PURE__ */ r(N, { children: [
|
|
253
|
+
/* @__PURE__ */ e(
|
|
203
254
|
O,
|
|
204
255
|
{
|
|
205
256
|
sx: { backgroundColor: c.palette.background.paper, py: 14 },
|
|
206
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ e(
|
|
207
258
|
b,
|
|
208
259
|
{
|
|
209
|
-
primary: /* @__PURE__ */ r(
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
260
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
261
|
+
/* @__PURE__ */ e(
|
|
262
|
+
d,
|
|
212
263
|
{
|
|
213
264
|
sx: {
|
|
214
265
|
mr: 10
|
|
@@ -217,7 +268,7 @@ const _t = () => {
|
|
|
217
268
|
children: l.accountName
|
|
218
269
|
}
|
|
219
270
|
),
|
|
220
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ e(
|
|
221
272
|
x,
|
|
222
273
|
{
|
|
223
274
|
amount: l.loss,
|
|
@@ -232,31 +283,31 @@ const _t = () => {
|
|
|
232
283
|
},
|
|
233
284
|
l.accountName
|
|
234
285
|
),
|
|
235
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ e(L, {})
|
|
236
287
|
] }))
|
|
237
288
|
] })
|
|
238
289
|
] });
|
|
239
|
-
},
|
|
290
|
+
}, De = _(Le), Ne = ({ accounts: t, name: s, icon: i }) => {
|
|
240
291
|
const [n, a] = u.useState(!1);
|
|
241
|
-
return /* @__PURE__ */ r(
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
i && /* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ r(N, { children: [
|
|
293
|
+
/* @__PURE__ */ e(O, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(te, { onClick: () => a(!n), children: [
|
|
294
|
+
i && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(H, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
295
|
+
/* @__PURE__ */ e(
|
|
245
296
|
b,
|
|
246
297
|
{
|
|
247
|
-
primary: /* @__PURE__ */
|
|
298
|
+
primary: /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "body1", children: s })
|
|
248
299
|
}
|
|
249
300
|
),
|
|
250
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ e(K, { children: n ? /* @__PURE__ */ e(H, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(H, { name: "expand_more", size: 24 }) })
|
|
251
302
|
] }) }),
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ e(L, {}),
|
|
304
|
+
/* @__PURE__ */ e(ye, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, c) => /* @__PURE__ */ r(j, { children: [
|
|
305
|
+
/* @__PURE__ */ e(O, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
255
306
|
b,
|
|
256
307
|
{
|
|
257
|
-
primary: /* @__PURE__ */ r(
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
|
|
308
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
309
|
+
/* @__PURE__ */ e(
|
|
310
|
+
d,
|
|
260
311
|
{
|
|
261
312
|
sx: {
|
|
262
313
|
marginRight: 10
|
|
@@ -265,7 +316,7 @@ const _t = () => {
|
|
|
265
316
|
children: o.accountName
|
|
266
317
|
}
|
|
267
318
|
),
|
|
268
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ e(
|
|
269
320
|
x,
|
|
270
321
|
{
|
|
271
322
|
amount: o.balance,
|
|
@@ -279,20 +330,20 @@ const _t = () => {
|
|
|
279
330
|
sx: { pl: 72, pr: 16 }
|
|
280
331
|
}
|
|
281
332
|
) }),
|
|
282
|
-
c <
|
|
333
|
+
c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})
|
|
283
334
|
] }, o.accountName)) })
|
|
284
335
|
] });
|
|
285
|
-
}, X = ({ groupedAccounts:
|
|
286
|
-
netWorth:
|
|
336
|
+
}, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Ne, { accounts: s, icon: i, name: n }, n)) }), Ee = ({
|
|
337
|
+
netWorth: t,
|
|
287
338
|
assets: s,
|
|
288
339
|
liabilities: i,
|
|
289
340
|
totalAssets: n,
|
|
290
341
|
totalLiabilities: a
|
|
291
342
|
}) => {
|
|
292
|
-
const { net_worth: o } = E(), c =
|
|
293
|
-
return /* @__PURE__ */ r(
|
|
343
|
+
const { net_worth: o } = E(), c = oe();
|
|
344
|
+
return /* @__PURE__ */ r(N, { children: [
|
|
294
345
|
/* @__PURE__ */ r(
|
|
295
|
-
|
|
346
|
+
P,
|
|
296
347
|
{
|
|
297
348
|
sx: {
|
|
298
349
|
alignItems: "center",
|
|
@@ -303,14 +354,14 @@ const _t = () => {
|
|
|
303
354
|
marginBottom: 8
|
|
304
355
|
},
|
|
305
356
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
|
|
357
|
+
/* @__PURE__ */ e(d, { variant: "body1", children: o.current_net_worth }),
|
|
358
|
+
/* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "h1" }),
|
|
359
|
+
t && /* @__PURE__ */ e(
|
|
309
360
|
B,
|
|
310
361
|
{
|
|
311
362
|
currencyLabel: o.this_month,
|
|
312
363
|
iconSize: 20,
|
|
313
|
-
netWorth:
|
|
364
|
+
netWorth: t,
|
|
314
365
|
theme: c
|
|
315
366
|
}
|
|
316
367
|
)
|
|
@@ -318,22 +369,22 @@ const _t = () => {
|
|
|
318
369
|
}
|
|
319
370
|
),
|
|
320
371
|
/* @__PURE__ */ r(j, { children: [
|
|
321
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
322
373
|
b,
|
|
323
374
|
{
|
|
324
|
-
primary: /* @__PURE__ */ r(
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
375
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
376
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
|
|
377
|
+
/* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
|
|
327
378
|
] })
|
|
328
379
|
}
|
|
329
380
|
) }),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ e(X, { groupedAccounts: U(s) }),
|
|
382
|
+
/* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
|
|
332
383
|
b,
|
|
333
384
|
{
|
|
334
|
-
primary: /* @__PURE__ */ r(
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
385
|
+
primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
|
|
386
|
+
/* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
|
|
387
|
+
/* @__PURE__ */ e(
|
|
337
388
|
x,
|
|
338
389
|
{
|
|
339
390
|
amount: a,
|
|
@@ -344,11 +395,11 @@ const _t = () => {
|
|
|
344
395
|
] })
|
|
345
396
|
}
|
|
346
397
|
) }),
|
|
347
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ e(X, { groupedAccounts: U(i) })
|
|
348
399
|
] })
|
|
349
400
|
] });
|
|
350
|
-
},
|
|
351
|
-
const { net_worth:
|
|
401
|
+
}, ke = _(Ee), Me = () => {
|
|
402
|
+
const { net_worth: t } = E(), s = G(), { onEvent: i } = z(), {
|
|
352
403
|
assetsLiabilities: n,
|
|
353
404
|
gainsLosses: a,
|
|
354
405
|
hoveredData: o,
|
|
@@ -356,15 +407,15 @@ const _t = () => {
|
|
|
356
407
|
selectedData: l,
|
|
357
408
|
setHoveredIndex: g,
|
|
358
409
|
setSelectedIndex: f
|
|
359
|
-
} = R(), [
|
|
410
|
+
} = R(), [S, W] = u.useState(!1), [w, y] = u.useState(!1), k = (p) => {
|
|
360
411
|
const C = p.x === o?.x, T = p.x === l?.x, I = {
|
|
361
412
|
backgroundColor: "inherit",
|
|
362
413
|
borderBottom: "inherit",
|
|
363
414
|
color: "inherit"
|
|
364
415
|
};
|
|
365
416
|
return C && (I.color = T ? "inherit" : I.color, I.backgroundColor = s.palette.action.hover), T && (I.backgroundColor = s.palette.primary.main, I.borderBottom = s.palette.neutral.light, I.color = s.palette.common.white), I;
|
|
366
|
-
},
|
|
367
|
-
f(C), p.currentTarget instanceof HTMLDivElement &&
|
|
417
|
+
}, D = (p, C) => {
|
|
418
|
+
f(C), p.currentTarget instanceof HTMLDivElement && W(!0);
|
|
368
419
|
}, h = () => {
|
|
369
420
|
y(!0), i(v.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
|
|
370
421
|
}, M = (p) => {
|
|
@@ -372,155 +423,103 @@ const _t = () => {
|
|
|
372
423
|
}, $ = () => {
|
|
373
424
|
g(-1);
|
|
374
425
|
};
|
|
375
|
-
return /* @__PURE__ */ r(
|
|
426
|
+
return /* @__PURE__ */ r(m, { direction: "column", sx: { width: 320 }, children: [
|
|
376
427
|
/* @__PURE__ */ r(j, { children: [
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
c.map((p, C) => /* @__PURE__ */
|
|
380
|
-
|
|
428
|
+
/* @__PURE__ */ e(A, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(d, { bold: !0, component: "h2", variant: "body1", children: t.monthly_totals }) }),
|
|
429
|
+
/* @__PURE__ */ e(L, {}),
|
|
430
|
+
c.map((p, C) => /* @__PURE__ */ e(
|
|
431
|
+
Te,
|
|
381
432
|
{
|
|
382
433
|
getStyles: k,
|
|
383
434
|
isHovered: p.x === o?.x,
|
|
384
435
|
isSelected: p.x === l?.x,
|
|
385
436
|
item: p,
|
|
386
|
-
onItemClick: (T) =>
|
|
437
|
+
onItemClick: (T) => D(T, C),
|
|
387
438
|
onMouseEnter: () => M(C),
|
|
388
439
|
onMouseLeave: () => $()
|
|
389
440
|
},
|
|
390
441
|
p.x
|
|
391
442
|
))
|
|
392
443
|
] }),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
|
|
444
|
+
/* @__PURE__ */ e(
|
|
445
|
+
xe,
|
|
395
446
|
{
|
|
396
447
|
onClick: () => h(),
|
|
397
448
|
sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
|
|
398
449
|
variant: "outlined",
|
|
399
|
-
children:
|
|
450
|
+
children: t.view_assets_and_liabilities
|
|
400
451
|
}
|
|
401
452
|
),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
|
|
453
|
+
/* @__PURE__ */ e(
|
|
454
|
+
V,
|
|
404
455
|
{
|
|
405
456
|
ariaLabelClose: "Close",
|
|
406
|
-
isOpen:
|
|
407
|
-
onClose: () =>
|
|
457
|
+
isOpen: S,
|
|
458
|
+
onClose: () => W(!1),
|
|
408
459
|
shouldShowHeaderBorders: !1,
|
|
409
460
|
shouldShowHeaderShadow: !0,
|
|
410
|
-
title:
|
|
411
|
-
children: a && /* @__PURE__ */
|
|
461
|
+
title: t.gains_and_losses,
|
|
462
|
+
children: a && /* @__PURE__ */ e(De, { ...a })
|
|
412
463
|
}
|
|
413
464
|
),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
|
|
465
|
+
/* @__PURE__ */ e(
|
|
466
|
+
V,
|
|
416
467
|
{
|
|
417
468
|
ariaLabelClose: "Close",
|
|
418
469
|
isOpen: w,
|
|
419
470
|
onClose: () => y(!1),
|
|
420
471
|
shouldShowHeaderBorders: !1,
|
|
421
472
|
shouldShowHeaderShadow: !0,
|
|
422
|
-
title:
|
|
423
|
-
children: n && /* @__PURE__ */
|
|
473
|
+
title: t.assets_and_liabilities,
|
|
474
|
+
children: n && /* @__PURE__ */ e(ke, { ...n })
|
|
424
475
|
}
|
|
425
476
|
)
|
|
426
477
|
] });
|
|
427
|
-
},
|
|
428
|
-
const { net_worth: i } = E(), n =
|
|
429
|
-
return /* @__PURE__ */ r(
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
] });
|
|
434
|
-
}, At = _(Mt), Ot = ({ amount: e, copy: s, trendValue: i }) => {
|
|
435
|
-
const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
|
|
436
|
-
return /* @__PURE__ */ r(d, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
437
|
-
/* @__PURE__ */ t(Z, { variant: "h1", children: V(e, "0,0") }),
|
|
438
|
-
e !== 0 && /* @__PURE__ */ r(d, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
|
|
439
|
-
/* @__PURE__ */ r(d, { sx: { flexDirection: "row", gap: 8 }, children: [
|
|
440
|
-
/* @__PURE__ */ t(et, { name: o, size: 20 }),
|
|
441
|
-
/* @__PURE__ */ t(m, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: V(i, "0,0.00") })
|
|
442
|
-
] }),
|
|
443
|
-
/* @__PURE__ */ t(m, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
|
|
444
|
-
] })
|
|
478
|
+
}, Ae = _(Me), Oe = ({ hoveredData: t, selectedData: s }) => {
|
|
479
|
+
const { net_worth: i } = E(), n = G(), a = t || s, o = se(ce(a.x), "MMMM");
|
|
480
|
+
return /* @__PURE__ */ r(m, { alignItems: "center", direction: "column", m: 24, children: [
|
|
481
|
+
/* @__PURE__ */ e(d, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
|
|
482
|
+
/* @__PURE__ */ e(x, { amount: a.y, variant: "h2" }),
|
|
483
|
+
/* @__PURE__ */ e(B, { currencyLabel: i.this_month, netWorth: a, theme: n })
|
|
445
484
|
] });
|
|
446
|
-
},
|
|
447
|
-
/* @__PURE__ */ t(et, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
|
|
448
|
-
/* @__PURE__ */ r(d, { children: [
|
|
449
|
-
/* @__PURE__ */ t(m, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: e.empty_widget_header }),
|
|
450
|
-
/* @__PURE__ */ t(Z, { sx: { color: "text.secondary" }, variant: "body2", children: e.zero_state_description })
|
|
451
|
-
] })
|
|
452
|
-
] }), _e = _(({ onCTAClick: e }) => {
|
|
453
|
-
const { visibleAccounts: s } = ct(), { onEvent: i } = G(), { net_worth: n, common: a } = E(), { isInitialized: o } = q(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = R();
|
|
454
|
-
if (u.useEffect(() => {
|
|
455
|
-
c || l().finally();
|
|
456
|
-
}, []), nt({
|
|
457
|
-
widgetName: "NetWorthMicroWidget",
|
|
458
|
-
isLoaded: c
|
|
459
|
-
}), u.useEffect(() => {
|
|
460
|
-
c && i(v.NET_WORTH_LOAD_WIDGET, {
|
|
461
|
-
state: s?.length ? "default" : "zeroState"
|
|
462
|
-
});
|
|
463
|
-
}, [c]), !o || !c) return /* @__PURE__ */ t(ot, { height: 100 });
|
|
464
|
-
const W = () => {
|
|
465
|
-
i(
|
|
466
|
-
s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
|
|
467
|
-
), e();
|
|
468
|
-
};
|
|
469
|
-
return /* @__PURE__ */ t(
|
|
470
|
-
gt,
|
|
471
|
-
{
|
|
472
|
-
className: "mx-networth-microwidget",
|
|
473
|
-
ctaLabel: a.see_details,
|
|
474
|
-
onCTAClick: W,
|
|
475
|
-
title: n.net_worth,
|
|
476
|
-
children: g.accounts.length ? /* @__PURE__ */ t(
|
|
477
|
-
Ot,
|
|
478
|
-
{
|
|
479
|
-
amount: f?.y,
|
|
480
|
-
copy: n,
|
|
481
|
-
trendValue: f?.change
|
|
482
|
-
}
|
|
483
|
-
) : /* @__PURE__ */ t(Ht, { copy: n })
|
|
484
|
-
}
|
|
485
|
-
);
|
|
486
|
-
}), we = _(({ onBackClick: e, onMenuClick: s }) => {
|
|
485
|
+
}, He = _(Oe), wt = _(({ onBackClick: t, onMenuClick: s }) => {
|
|
487
486
|
const { isInitialized: i } = q(), { accounts: n, net_worth: a } = E(), {
|
|
488
487
|
hoveredData: o,
|
|
489
488
|
isNetWorthDataLoaded: c,
|
|
490
489
|
loadNetWorthData: l,
|
|
491
490
|
netWorthChartData: g,
|
|
492
491
|
selectedData: f,
|
|
493
|
-
setTimeframe:
|
|
494
|
-
timeframe:
|
|
495
|
-
} = R(), { isMobile: w } =
|
|
496
|
-
|
|
492
|
+
setTimeframe: S,
|
|
493
|
+
timeframe: W
|
|
494
|
+
} = R(), { isMobile: w } = ee(), { onEvent: y } = z(), [k, D] = u.useState(!1);
|
|
495
|
+
J({
|
|
497
496
|
widgetName: "NetWorthWidget",
|
|
498
497
|
isLoaded: c
|
|
499
498
|
}), u.useEffect(() => {
|
|
500
499
|
c || l().finally(), y(v.NET_WORTH_VIEW);
|
|
501
500
|
}, []), u.useEffect(() => {
|
|
502
|
-
y(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period:
|
|
503
|
-
}, [
|
|
501
|
+
y(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: W + "M" });
|
|
502
|
+
}, [W]);
|
|
504
503
|
const h = async (p) => {
|
|
505
504
|
const C = p[0], T = p[1];
|
|
506
|
-
C && T &&
|
|
505
|
+
C && T && S(le(T, C));
|
|
507
506
|
}, M = () => {
|
|
508
|
-
|
|
507
|
+
D(!0), y(v.ACCOUNTS_CLICK_CONNECT);
|
|
509
508
|
};
|
|
510
|
-
if (!i || !c) return /* @__PURE__ */
|
|
509
|
+
if (!i || !c) return /* @__PURE__ */ e(Q, {});
|
|
511
510
|
const $ = g.length === 0;
|
|
512
511
|
return /* @__PURE__ */ r(
|
|
513
|
-
|
|
512
|
+
Ce,
|
|
514
513
|
{
|
|
515
514
|
calendarActions: { onRangeChanged: h },
|
|
516
515
|
dateRangeVariant: w ? "timeframetabs" : "timeframebuttons",
|
|
517
516
|
onAccountsFilterClick: () => y(v.NET_WORTH_WIDGET_CLICK_FILTER),
|
|
518
|
-
onBackClick:
|
|
517
|
+
onBackClick: t,
|
|
519
518
|
onMenuClick: s,
|
|
520
519
|
title: a.net_worth,
|
|
521
520
|
children: [
|
|
522
|
-
$ ? /* @__PURE__ */
|
|
523
|
-
|
|
521
|
+
$ ? /* @__PURE__ */ e(P, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
|
|
522
|
+
be,
|
|
524
523
|
{
|
|
525
524
|
header: a.empty_widget_header,
|
|
526
525
|
icon: "elevation",
|
|
@@ -534,25 +533,25 @@ const _t = () => {
|
|
|
534
533
|
}
|
|
535
534
|
}
|
|
536
535
|
}
|
|
537
|
-
) }) : /* @__PURE__ */ r(
|
|
538
|
-
f && /* @__PURE__ */
|
|
536
|
+
) }) : /* @__PURE__ */ r(N, { children: [
|
|
537
|
+
f && /* @__PURE__ */ e(He, { hoveredData: o, selectedData: f }),
|
|
539
538
|
/* @__PURE__ */ r(
|
|
540
|
-
|
|
539
|
+
m,
|
|
541
540
|
{
|
|
542
541
|
alignItems: w ? "center" : "flex-start",
|
|
543
542
|
direction: w ? "column" : "row",
|
|
544
543
|
spacing: w ? 0 : 48,
|
|
545
544
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ e(Se, {}),
|
|
546
|
+
/* @__PURE__ */ e(Ae, {})
|
|
548
547
|
]
|
|
549
548
|
}
|
|
550
549
|
)
|
|
551
550
|
] }),
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
|
|
551
|
+
/* @__PURE__ */ e(
|
|
552
|
+
de,
|
|
554
553
|
{
|
|
555
|
-
onClose: () =>
|
|
554
|
+
onClose: () => D(!1),
|
|
556
555
|
showConnectionsWidget: k,
|
|
557
556
|
title: n.manage_connections
|
|
558
557
|
}
|
|
@@ -562,10 +561,6 @@ const _t = () => {
|
|
|
562
561
|
);
|
|
563
562
|
});
|
|
564
563
|
export {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
_e as NetWorthMicroWidget,
|
|
568
|
-
Se as NetWorthStore,
|
|
569
|
-
At as NetWorthSummary,
|
|
570
|
-
we as NetWorthWidget
|
|
564
|
+
_t as NetWorthMicroWidget,
|
|
565
|
+
wt as NetWorthWidget
|
|
571
566
|
};
|