@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.mega1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +178 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
- package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
- package/dist/LineChart-KpPw1phO.mjs +580 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
- package/dist/SpendingLegend-CDO060GT.mjs +193 -0
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +245 -235
- package/dist/accounts/stores/AccountStore.d.ts +24 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +611 -580
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +187 -180
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +397 -387
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +458 -448
- package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3190 -1073
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +302 -291
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +108 -104
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +4 -3
- package/dist/microinsights/index.es.js +101 -14
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/index.es.js +197 -190
- package/dist/notifications/index.es.js +25 -25
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +395 -351
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +307 -298
- package/dist/spending/index.es.js +299 -438
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +115 -112
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +1025 -604
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
package/dist/goals/index.es.js
CHANGED
|
@@ -1,114 +1,115 @@
|
|
|
1
|
-
import { g as ue, T as
|
|
2
|
-
import { c as
|
|
1
|
+
import { g as ue, T as u, G as me, a as Pe, M as J, C as Ae, b as Ve } from "../GoalStore-1P19goZ7.mjs";
|
|
2
|
+
import { c as qn, d as Jn } from "../GoalStore-1P19goZ7.mjs";
|
|
3
3
|
import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import y from "react";
|
|
5
5
|
import { observer as D } from "mobx-react-lite";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import je from "@mui/material/Alert";
|
|
7
|
+
import Fe from "@mui/material/Snackbar";
|
|
8
8
|
import f from "@mui/material/Stack";
|
|
9
9
|
import le from "@mui/material/Tab";
|
|
10
|
-
import
|
|
11
|
-
import { Text as A, H2 as _e, P as W, H3 as
|
|
10
|
+
import ze from "@mui/material/Tabs";
|
|
11
|
+
import { Text as A, H2 as _e, P as W, H3 as He, Icon as $e, InstitutionLogo as ne } from "@mxenabled/mxui";
|
|
12
12
|
import pe from "@mui/material/Button";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
13
|
+
import Te from "@mui/material/Card";
|
|
14
|
+
import Ce from "@mui/material/CardActionArea";
|
|
15
|
+
import Se from "@mui/material/CardContent";
|
|
16
|
+
import be from "@mui/material/Unstable_Grid2";
|
|
17
17
|
import oe from "@mui/material/Avatar";
|
|
18
|
-
import
|
|
19
|
-
import { Payments as
|
|
20
|
-
import { u as C, l as I,
|
|
21
|
-
import { u as
|
|
22
|
-
import { f as x } from "../NumberFormatting-
|
|
23
|
-
import { S as
|
|
18
|
+
import Xe from "@mui/material/CardHeader";
|
|
19
|
+
import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
|
|
20
|
+
import { u as C, l as I, b as he, a as Ie, d as V, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
|
|
21
|
+
import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
22
|
+
import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
23
|
+
import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
|
|
24
24
|
import E from "@mui/material/Divider";
|
|
25
|
-
import
|
|
26
|
-
import { L as ee } from "../ListItemAction-
|
|
27
|
-
import { C as ke } from "../CurrencyInput-
|
|
25
|
+
import B from "@mui/material/List";
|
|
26
|
+
import { L as ee } from "../ListItemAction-BxTkF6Tz.mjs";
|
|
27
|
+
import { C as ke } from "../CurrencyInput-itK0R3wV.mjs";
|
|
28
28
|
import { fromUnixTime as Q } from "date-fns/fromUnixTime";
|
|
29
29
|
import N from "@mui/material/ListItem";
|
|
30
30
|
import k from "@mui/material/ListItemButton";
|
|
31
31
|
import w from "@mui/material/ListItemText";
|
|
32
|
-
import { DataGridPro as
|
|
33
|
-
import { D as j } from "../Drawer-
|
|
34
|
-
import { b as
|
|
35
|
-
import { f as ae,
|
|
32
|
+
import { DataGridPro as et } from "@mui/x-data-grid-pro";
|
|
33
|
+
import { D as j } from "../Drawer-By9V-B5L.mjs";
|
|
34
|
+
import { b as L } from "../Localization-2MODESHW.mjs";
|
|
35
|
+
import { f as ae, a as re, D as tt } from "../Dialog-BPTr3qHE.mjs";
|
|
36
36
|
import P from "@mui/material/ListItemAvatar";
|
|
37
|
-
import { g as we, A as
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import { u as
|
|
42
|
-
import { A as
|
|
43
|
-
import { u as
|
|
37
|
+
import { g as we, A as ye } from "../ConnectDrawer-BkvlItWx.mjs";
|
|
38
|
+
import nt from "@mui/material/Collapse";
|
|
39
|
+
import ot from "@mui/material/ListItemIcon";
|
|
40
|
+
import at from "@mui/material/Checkbox";
|
|
41
|
+
import { u as rt, A as it } from "../AccountDetailsHeader-BkG3MNYo.mjs";
|
|
42
|
+
import { A as st } from "../AccountDetailsContent-CitErkuS.mjs";
|
|
43
|
+
import { u as lt } from "../useAccountDisplayName-B7iXTNM8.mjs";
|
|
44
44
|
import De from "@mui/material/TextField";
|
|
45
|
-
import { M as
|
|
46
|
-
import { getUnixTime as
|
|
47
|
-
import { isValid as
|
|
48
|
-
import { AdapterDateFns as
|
|
49
|
-
import { DatePicker as
|
|
50
|
-
import { LocalizationProvider as
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import ft from "
|
|
55
|
-
import yt from "@mui/material/
|
|
56
|
-
import At from "@mui/material/
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
45
|
+
import { M as ct, I as dt, O as mt } from "../OriginalBalanceAction-C6jdS4ws.mjs";
|
|
46
|
+
import { getUnixTime as ut } from "date-fns/getUnixTime";
|
|
47
|
+
import { isValid as _t } from "date-fns/isValid";
|
|
48
|
+
import { AdapterDateFns as pt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
49
|
+
import { DatePicker as ht } from "@mui/x-date-pickers";
|
|
50
|
+
import { LocalizationProvider as gt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
51
|
+
import { u as Ke } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
52
|
+
import { A as Y, W as bt } from "../WidgetContainer-CoFDmQRE.mjs";
|
|
53
|
+
import { L as Me } from "../Loader-DUaFpDGv.mjs";
|
|
54
|
+
import { E as ft } from "../EmptyState-DoxNUae-.mjs";
|
|
55
|
+
import yt from "@mui/material/Stack/Stack";
|
|
56
|
+
import At from "@mui/material/Box";
|
|
57
|
+
import Tt from "@mui/material/styles/useTheme";
|
|
58
|
+
import { S as Ct } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
59
|
+
import { M as St } from "../MicroWidgetContainer-r6mtxRer.mjs";
|
|
59
60
|
function ce({ title: t, subtitle: n }) {
|
|
60
61
|
return /* @__PURE__ */ r(f, { children: [
|
|
61
62
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
|
|
62
63
|
/* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
|
|
63
64
|
] });
|
|
64
65
|
}
|
|
65
|
-
const
|
|
66
|
+
const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
66
67
|
/(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
|
|
67
68
|
"$1$2$3"
|
|
68
|
-
) : x(t, "0,0.00"),
|
|
69
|
+
) : x(t, "0,0.00"), Le = D(
|
|
69
70
|
({ goal: t, isInDrawer: n = !1, onClick: i }) => {
|
|
70
|
-
const { goals: s } = C(), { isMobile: p, isTablet: a } =
|
|
71
|
+
const { goals: s } = C(), { isMobile: p, isTablet: a } = ge(), _ = p || a, {
|
|
71
72
|
backgroundColor: g,
|
|
72
73
|
color: l,
|
|
73
74
|
percentage: h,
|
|
74
|
-
percentageText:
|
|
75
|
-
projectedText:
|
|
76
|
-
} = ue(s, t), c = t.track_type ===
|
|
75
|
+
percentageText: d,
|
|
76
|
+
projectedText: o
|
|
77
|
+
} = ue(s, t), c = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, m = [
|
|
77
78
|
{
|
|
78
79
|
color: g,
|
|
79
80
|
percentage: `${h}`
|
|
80
81
|
}
|
|
81
82
|
];
|
|
82
|
-
let b = /* @__PURE__ */ e(
|
|
83
|
-
return t.track_type ===
|
|
83
|
+
let b = /* @__PURE__ */ e(Re, {});
|
|
84
|
+
return t.track_type === u.DEBT_TRACK ? b = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ r(Ce, { disabled: !i, onClick: i, children: [
|
|
84
85
|
/* @__PURE__ */ e(
|
|
85
|
-
|
|
86
|
+
Xe,
|
|
86
87
|
{
|
|
87
88
|
avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
|
|
88
|
-
subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${
|
|
89
|
+
subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Rt(
|
|
89
90
|
c,
|
|
90
91
|
_
|
|
91
92
|
)}` }),
|
|
92
93
|
title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
|
|
93
94
|
}
|
|
94
95
|
),
|
|
95
|
-
/* @__PURE__ */ e(
|
|
96
|
-
/* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
|
|
97
|
+
/* @__PURE__ */ e(Qe, { data: m, height: 24 }),
|
|
97
98
|
/* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
98
|
-
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children:
|
|
99
|
-
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children:
|
|
99
|
+
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: d }),
|
|
100
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
|
|
100
101
|
] })
|
|
101
102
|
] }) })
|
|
102
103
|
] }) });
|
|
103
104
|
}
|
|
104
|
-
),
|
|
105
|
+
), Et = D(({ trackType: t }) => {
|
|
105
106
|
const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
|
|
106
107
|
let h = 0;
|
|
107
|
-
return t ===
|
|
108
|
+
return t === u.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
|
|
108
109
|
}, [s]), [_, g] = y.useState(a), l = async () => {
|
|
109
110
|
if (s) {
|
|
110
111
|
const h = { ...s };
|
|
111
|
-
t ===
|
|
112
|
+
t === u.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
115
|
return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
@@ -134,20 +135,20 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
134
135
|
)
|
|
135
136
|
}
|
|
136
137
|
) });
|
|
137
|
-
}),
|
|
138
|
-
const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((
|
|
138
|
+
}), xt = ({ goals: t }) => {
|
|
139
|
+
const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((m) => ({ ...m })));
|
|
139
140
|
y.useEffect(() => {
|
|
140
|
-
a && l(t.map((
|
|
141
|
+
a && l(t.map((m) => ({ ...m })));
|
|
141
142
|
}, [a]);
|
|
142
143
|
const h = [
|
|
143
144
|
{
|
|
144
145
|
field: "name",
|
|
145
146
|
flex: 1,
|
|
146
|
-
renderCell: (
|
|
147
|
-
const b =
|
|
147
|
+
renderCell: (m) => {
|
|
148
|
+
const b = m.row;
|
|
148
149
|
return /* @__PURE__ */ r(f, { children: [
|
|
149
150
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
|
|
150
|
-
/* @__PURE__ */ e(A, { variant: "XSmall", children:
|
|
151
|
+
/* @__PURE__ */ e(A, { variant: "XSmall", children: L(
|
|
151
152
|
n.goal_projection,
|
|
152
153
|
ae(
|
|
153
154
|
Q(b.projected_to_complete_at || 0),
|
|
@@ -162,20 +163,20 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
162
163
|
align: "right",
|
|
163
164
|
field: "amount",
|
|
164
165
|
minWidth: 140,
|
|
165
|
-
renderCell: (
|
|
166
|
-
const b =
|
|
166
|
+
renderCell: (m) => {
|
|
167
|
+
const b = m.row;
|
|
167
168
|
return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
|
|
168
169
|
},
|
|
169
170
|
sortable: !1
|
|
170
171
|
}
|
|
171
|
-
],
|
|
172
|
-
id:
|
|
172
|
+
], d = g.map((m) => ({
|
|
173
|
+
id: m.guid,
|
|
173
174
|
isHovering: !1,
|
|
174
|
-
__reorder__:
|
|
175
|
-
...
|
|
176
|
-
})),
|
|
175
|
+
__reorder__: m.name,
|
|
176
|
+
...m
|
|
177
|
+
})), o = ({ oldIndex: m, targetIndex: b }) => {
|
|
177
178
|
const T = [...g];
|
|
178
|
-
T.splice(b, 0, T.splice(
|
|
179
|
+
T.splice(b, 0, T.splice(m, 1)[0]);
|
|
179
180
|
for (let S = 0; S < T.length; S += 1)
|
|
180
181
|
T[S].position = S + 1;
|
|
181
182
|
l(T);
|
|
@@ -207,18 +208,18 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
207
208
|
children: /* @__PURE__ */ r(f, { children: [
|
|
208
209
|
/* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
|
|
209
210
|
/* @__PURE__ */ e(
|
|
210
|
-
|
|
211
|
+
et,
|
|
211
212
|
{
|
|
212
213
|
columnHeaderHeight: 0,
|
|
213
214
|
columns: h,
|
|
214
215
|
disableColumnFilter: !0,
|
|
215
216
|
disableColumnMenu: !0,
|
|
216
217
|
hideFooter: !0,
|
|
217
|
-
onRowOrderChange:
|
|
218
|
+
onRowOrderChange: o,
|
|
218
219
|
rowReordering: !0,
|
|
219
|
-
rows:
|
|
220
|
+
rows: d,
|
|
220
221
|
slots: {
|
|
221
|
-
rowReorderIcon: () => /* @__PURE__ */ e(
|
|
222
|
+
rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
|
|
222
223
|
//TODO: Add to mx-icons
|
|
223
224
|
},
|
|
224
225
|
sx: {
|
|
@@ -232,10 +233,10 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
232
233
|
}
|
|
233
234
|
)
|
|
234
235
|
] });
|
|
235
|
-
},
|
|
236
|
-
const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed :
|
|
236
|
+
}, vt = ({ goal: t, index: n }) => {
|
|
237
|
+
const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : L(i.goal_percentage_reached, `${s * 100}`);
|
|
237
238
|
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
|
|
238
|
-
t.track_type !==
|
|
239
|
+
t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
239
240
|
P,
|
|
240
241
|
{
|
|
241
242
|
sx: {
|
|
@@ -250,7 +251,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
250
251
|
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
251
252
|
/* @__PURE__ */ r(f, { children: [
|
|
252
253
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
|
|
253
|
-
/* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p :
|
|
254
|
+
/* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : L(
|
|
254
255
|
i.goal_projection,
|
|
255
256
|
ae(
|
|
256
257
|
Q(t.projected_to_complete_at || 0),
|
|
@@ -261,14 +262,14 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
261
262
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
|
|
262
263
|
] }) })
|
|
263
264
|
] }) });
|
|
264
|
-
},
|
|
265
|
+
}, It = ({ goal: t }) => {
|
|
265
266
|
const { goals: n } = C();
|
|
266
267
|
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
|
|
267
|
-
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
|
|
268
269
|
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
269
270
|
/* @__PURE__ */ r(f, { children: [
|
|
270
271
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
|
|
271
|
-
/* @__PURE__ */ e(A, { variant: "XSmall", children:
|
|
272
|
+
/* @__PURE__ */ e(A, { variant: "XSmall", children: L(
|
|
272
273
|
n.completed_label,
|
|
273
274
|
ae(
|
|
274
275
|
Q(t.completed_at || 0),
|
|
@@ -279,14 +280,14 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
279
280
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
|
|
280
281
|
] }) })
|
|
281
282
|
] }) }, t.guid);
|
|
282
|
-
},
|
|
283
|
-
const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((
|
|
284
|
-
(
|
|
283
|
+
}, Gt = ({ trackType: t }) => {
|
|
284
|
+
const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((m) => m.track_type === t), a = p.filter(
|
|
285
|
+
(m) => m.track_type === u.SAVINGS_TRACK && !m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && !m.is_complete
|
|
285
286
|
), _ = p.filter(
|
|
286
|
-
(
|
|
287
|
+
(m) => m.track_type === u.SAVINGS_TRACK && m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && m.is_complete
|
|
287
288
|
), [g, l] = y.useState(!1);
|
|
288
|
-
let h = n.manage_saving_goals,
|
|
289
|
-
return t ===
|
|
289
|
+
let h = n.manage_saving_goals, d = n.manage_saving_drawer_title, o = n.manage_saving_title, c = n.manage_saving_description;
|
|
290
|
+
return t === u.DEBT_TRACK ? (h = n.manage_debt_goals, d = n.manage_debt_drawer_title, o = n.manage_debt_title, c = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (h = n.manage_retirement_goals, d = n.manage_retirement_drawer_title, o = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
|
|
290
291
|
/* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
|
|
291
292
|
/* @__PURE__ */ e(
|
|
292
293
|
j,
|
|
@@ -294,40 +295,40 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
294
295
|
ariaLabelClose: i.close_aria,
|
|
295
296
|
isOpen: g,
|
|
296
297
|
onClose: () => l(!1),
|
|
297
|
-
title:
|
|
298
|
+
title: d,
|
|
298
299
|
children: /* @__PURE__ */ r(f, { children: [
|
|
299
300
|
/* @__PURE__ */ r(f, { m: 24, children: [
|
|
300
|
-
/* @__PURE__ */ e(
|
|
301
|
+
/* @__PURE__ */ e(He, { children: o }),
|
|
301
302
|
/* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
|
|
302
303
|
] }),
|
|
303
|
-
/* @__PURE__ */ e(
|
|
304
|
+
/* @__PURE__ */ e(Et, { trackType: t }),
|
|
304
305
|
/* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
|
|
305
|
-
/* @__PURE__ */ r(
|
|
306
|
-
a.map((
|
|
306
|
+
/* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
|
|
307
|
+
a.map((m, b) => {
|
|
307
308
|
const T = b >= a.length - 1;
|
|
308
309
|
return /* @__PURE__ */ r(f, { children: [
|
|
309
|
-
/* @__PURE__ */ e(
|
|
310
|
+
/* @__PURE__ */ e(vt, { goal: m, index: b }),
|
|
310
311
|
/* @__PURE__ */ e(
|
|
311
312
|
E,
|
|
312
313
|
{
|
|
313
|
-
variant: T && t ===
|
|
314
|
+
variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
|
|
314
315
|
}
|
|
315
316
|
)
|
|
316
|
-
] }, `ongoing-${
|
|
317
|
+
] }, `ongoing-${m.guid}`);
|
|
317
318
|
}),
|
|
318
|
-
t !==
|
|
319
|
-
/* @__PURE__ */ e(
|
|
319
|
+
t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
|
|
320
|
+
/* @__PURE__ */ e(xt, { goals: a }),
|
|
320
321
|
/* @__PURE__ */ e(E, {})
|
|
321
322
|
] })
|
|
322
323
|
] }),
|
|
323
|
-
t !==
|
|
324
|
+
t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
|
|
324
325
|
/* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
|
|
325
|
-
/* @__PURE__ */ e(
|
|
326
|
+
/* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((m, b) => {
|
|
326
327
|
const T = b > a.length - 1;
|
|
327
328
|
return /* @__PURE__ */ r(f, { children: [
|
|
328
|
-
/* @__PURE__ */ e(
|
|
329
|
+
/* @__PURE__ */ e(It, { goal: m }),
|
|
329
330
|
/* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
|
|
330
|
-
] }, `complete-${
|
|
331
|
+
] }, `complete-${m.guid}`);
|
|
331
332
|
}) })
|
|
332
333
|
] })
|
|
333
334
|
] })
|
|
@@ -335,19 +336,21 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
335
336
|
)
|
|
336
337
|
] });
|
|
337
338
|
}, de = D(({ trackType: t, onAddGoals: n }) => {
|
|
338
|
-
const { isMobile: i } =
|
|
339
|
-
(o) => o.track_type ===
|
|
340
|
-
), l =
|
|
341
|
-
(o) => o.track_type ===
|
|
342
|
-
), h =
|
|
339
|
+
const { isMobile: i } = ge(), { goals: s } = C(), { selectedAccountGuids: p } = he(), { orderedGoals: a, setSelectedGoal: _ } = I(), g = a.filter(
|
|
340
|
+
(o) => o.track_type === t && p.includes(o.account_guid)
|
|
341
|
+
), l = g.filter(
|
|
342
|
+
(o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
|
|
343
|
+
), h = g.filter(
|
|
344
|
+
(o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
|
|
345
|
+
), d = t === u.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
|
|
343
346
|
return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
|
|
344
347
|
/* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
345
348
|
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
|
|
346
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(Gt, { trackType: t })
|
|
347
350
|
] }),
|
|
348
|
-
|
|
351
|
+
l.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: l.map((o, c, m) => (
|
|
349
352
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
350
|
-
/* @__PURE__ */ e(
|
|
353
|
+
/* @__PURE__ */ e(be, { xs: i || c === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, c)
|
|
351
354
|
)) }) : /* @__PURE__ */ r(
|
|
352
355
|
f,
|
|
353
356
|
{
|
|
@@ -369,16 +372,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
369
372
|
width: { sm: 381 }
|
|
370
373
|
}),
|
|
371
374
|
variant: "Small",
|
|
372
|
-
children:
|
|
375
|
+
children: Pe(t, s)
|
|
373
376
|
}
|
|
374
377
|
),
|
|
375
378
|
/* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
|
|
376
379
|
]
|
|
377
380
|
}
|
|
378
381
|
),
|
|
379
|
-
t !==
|
|
382
|
+
t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
|
|
380
383
|
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
|
|
381
|
-
|
|
384
|
+
h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
|
|
382
385
|
W,
|
|
383
386
|
{
|
|
384
387
|
sx: (o) => ({
|
|
@@ -389,40 +392,40 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
389
392
|
}
|
|
390
393
|
}),
|
|
391
394
|
variant: "Small",
|
|
392
|
-
children:
|
|
395
|
+
children: d
|
|
393
396
|
}
|
|
394
397
|
) }),
|
|
395
|
-
|
|
398
|
+
h.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => _(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
396
399
|
/* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
397
|
-
/* @__PURE__ */ e(
|
|
400
|
+
/* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
|
|
398
401
|
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
|
|
399
402
|
] }),
|
|
400
403
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(o.amount, "0,0.00") })
|
|
401
404
|
] }) }) }) }, o.guid))
|
|
402
405
|
] })
|
|
403
406
|
] });
|
|
404
|
-
}),
|
|
405
|
-
const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h,
|
|
406
|
-
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(
|
|
407
|
+
}), Nt = ({ goalType: t, onClick: n }) => {
|
|
408
|
+
const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, d] = y.useState(!1), o = g.length > 0;
|
|
409
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
|
|
407
410
|
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
|
|
408
411
|
k,
|
|
409
412
|
{
|
|
410
|
-
onClick:
|
|
411
|
-
l ===
|
|
412
|
-
l ===
|
|
413
|
+
onClick: o ? () => d(!h) : () => n(
|
|
414
|
+
l === u.RETIREMENT_TRACK ? i.retirement : "",
|
|
415
|
+
l === u.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
|
|
413
416
|
l
|
|
414
417
|
),
|
|
415
418
|
children: [
|
|
416
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
419
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
|
|
417
420
|
/* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
|
|
418
|
-
!
|
|
419
|
-
|
|
421
|
+
!o && /* @__PURE__ */ e(M, {}),
|
|
422
|
+
o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
|
|
420
423
|
]
|
|
421
424
|
}
|
|
422
425
|
) }),
|
|
423
426
|
/* @__PURE__ */ e(E, { variant: "inset" }),
|
|
424
|
-
|
|
425
|
-
/* @__PURE__ */ e(
|
|
427
|
+
o && /* @__PURE__ */ e(nt, { in: h, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: g.map((c, m) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
|
|
428
|
+
/* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: c.icon }) }),
|
|
426
429
|
/* @__PURE__ */ e(
|
|
427
430
|
w,
|
|
428
431
|
{
|
|
@@ -431,7 +434,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
431
434
|
}
|
|
432
435
|
),
|
|
433
436
|
/* @__PURE__ */ e(M, {})
|
|
434
|
-
] }) },
|
|
437
|
+
] }) }, m)) }) })
|
|
435
438
|
] }) });
|
|
436
439
|
}, Be = ({
|
|
437
440
|
accounts: t,
|
|
@@ -440,9 +443,9 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
440
443
|
onSave: s,
|
|
441
444
|
title: p
|
|
442
445
|
}) => {
|
|
443
|
-
const { goals: a, common: _ } = C(), { config: g } =
|
|
444
|
-
const c = l.findIndex((b) => b.guid ===
|
|
445
|
-
c >= 0 ?
|
|
446
|
+
const { goals: a, common: _ } = C(), { config: g } = Ie(), [l, h] = y.useState([]), d = (o) => {
|
|
447
|
+
const c = l.findIndex((b) => b.guid === o.guid), m = [...l];
|
|
448
|
+
c >= 0 ? m.splice(c, 1) : m.push(o), h(m);
|
|
446
449
|
};
|
|
447
450
|
return /* @__PURE__ */ r(
|
|
448
451
|
j,
|
|
@@ -454,33 +457,33 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
454
457
|
title: p,
|
|
455
458
|
children: [
|
|
456
459
|
/* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
|
|
457
|
-
/* @__PURE__ */ r(
|
|
460
|
+
/* @__PURE__ */ r(B, { sx: { bgcolor: "background.white" }, children: [
|
|
458
461
|
/* @__PURE__ */ e(E, { variant: "fullWidth" }),
|
|
459
|
-
t.map((
|
|
460
|
-
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o
|
|
462
|
+
t.map((o, c) => /* @__PURE__ */ r(y.Fragment, { children: [
|
|
463
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => d(o), children: [
|
|
461
464
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
462
465
|
ne,
|
|
463
466
|
{
|
|
464
|
-
alt:
|
|
465
|
-
institutionGuid:
|
|
467
|
+
alt: o?.name || "",
|
|
468
|
+
institutionGuid: o?.institution_guid || ""
|
|
466
469
|
}
|
|
467
470
|
) }),
|
|
468
471
|
/* @__PURE__ */ e(
|
|
469
472
|
w,
|
|
470
473
|
{
|
|
471
|
-
primary: we(
|
|
474
|
+
primary: we(o, {
|
|
472
475
|
allowNickname: g?.show_account_nicknames_in_master
|
|
473
476
|
}),
|
|
474
|
-
secondary: x(
|
|
477
|
+
secondary: x(o.balance || 0, "0,0.00")
|
|
475
478
|
}
|
|
476
479
|
),
|
|
477
|
-
/* @__PURE__ */ e(
|
|
480
|
+
/* @__PURE__ */ e(at, { checked: l.some((m) => m.guid === o.guid) })
|
|
478
481
|
] }) }),
|
|
479
482
|
/* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
|
|
480
|
-
] },
|
|
483
|
+
] }, o.guid))
|
|
481
484
|
] }),
|
|
482
485
|
/* @__PURE__ */ e(
|
|
483
|
-
|
|
486
|
+
Ae,
|
|
484
487
|
{
|
|
485
488
|
description: a.connect_description,
|
|
486
489
|
label: a.connect_button,
|
|
@@ -490,21 +493,21 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
490
493
|
]
|
|
491
494
|
}
|
|
492
495
|
);
|
|
493
|
-
},
|
|
494
|
-
const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } =
|
|
495
|
-
T ===
|
|
496
|
+
}, kt = ({ onClose: t }) => {
|
|
497
|
+
const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ie(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), d = Ve(n), o = (m, b, T) => {
|
|
498
|
+
T === u.DEBT_TRACK ? h(!0) : a({
|
|
496
499
|
amount: 0,
|
|
497
500
|
current_amount: 0,
|
|
498
501
|
goal_type: me.SAVE_AMOUNT,
|
|
499
502
|
initial_amount: 0,
|
|
500
503
|
meta_type: b,
|
|
501
|
-
name:
|
|
504
|
+
name: m,
|
|
502
505
|
track_type: T
|
|
503
506
|
});
|
|
504
|
-
}, c = async (
|
|
505
|
-
for (const b of
|
|
507
|
+
}, c = async (m) => {
|
|
508
|
+
for (const b of m) {
|
|
506
509
|
let T = J.CREDIT_CARD;
|
|
507
|
-
b.account_type ===
|
|
510
|
+
b.account_type === ye.LOAN ? T = J.LOANS : b.account_type === ye.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
|
|
508
511
|
account_guid: b.guid,
|
|
509
512
|
amount: 0,
|
|
510
513
|
current_amount: 0,
|
|
@@ -516,17 +519,17 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
516
519
|
name: we(b, {
|
|
517
520
|
allowNickname: _?.show_account_nicknames_in_master
|
|
518
521
|
}),
|
|
519
|
-
track_type:
|
|
522
|
+
track_type: u.DEBT_TRACK
|
|
520
523
|
}), p(n.alert_goal_added);
|
|
521
524
|
}
|
|
522
|
-
h(!1), t?.(
|
|
525
|
+
h(!1), t?.(u.DEBT_TRACK);
|
|
523
526
|
};
|
|
524
527
|
return /* @__PURE__ */ r(f, { children: [
|
|
525
|
-
/* @__PURE__ */ e(
|
|
528
|
+
/* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: d.map((m, b) => /* @__PURE__ */ e(Nt, { goalType: m, onClick: o }, b)) }),
|
|
526
529
|
/* @__PURE__ */ e(
|
|
527
530
|
Be,
|
|
528
531
|
{
|
|
529
|
-
accounts: g.filter((
|
|
532
|
+
accounts: g.filter((m) => !s.find((b) => b.account_guid === m.guid)),
|
|
530
533
|
isOpen: l,
|
|
531
534
|
onClose: () => h(!1),
|
|
532
535
|
onSave: c,
|
|
@@ -534,8 +537,8 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
534
537
|
}
|
|
535
538
|
)
|
|
536
539
|
] });
|
|
537
|
-
},
|
|
538
|
-
const { accounts: n } = C(), i =
|
|
540
|
+
}, Oe = ({ account: t }) => {
|
|
541
|
+
const { accounts: n } = C(), i = lt(t), { setSelectedAccount: s } = rt(), [p, a] = y.useState(!1);
|
|
539
542
|
return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
|
|
540
543
|
/* @__PURE__ */ r(k, { onClick: () => {
|
|
541
544
|
s(t), a(!0);
|
|
@@ -557,15 +560,15 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
557
560
|
/* @__PURE__ */ e(M, {})
|
|
558
561
|
] }),
|
|
559
562
|
/* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
|
|
560
|
-
/* @__PURE__ */ e(
|
|
561
|
-
/* @__PURE__ */ e(
|
|
563
|
+
/* @__PURE__ */ e(it, {}),
|
|
564
|
+
/* @__PURE__ */ e(st, {})
|
|
562
565
|
] }) })
|
|
563
566
|
] });
|
|
564
|
-
},
|
|
565
|
-
const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type ===
|
|
567
|
+
}, wt = D(({ goal: t }) => {
|
|
568
|
+
const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, d = async () => {
|
|
566
569
|
const c = { ...t, amount: a };
|
|
567
570
|
t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
|
|
568
|
-
},
|
|
571
|
+
}, o = () => {
|
|
569
572
|
setTimeout(() => {
|
|
570
573
|
_(t.amount);
|
|
571
574
|
}, 250);
|
|
@@ -576,8 +579,8 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
576
579
|
isDisabled: h,
|
|
577
580
|
isSaveDisabled: l,
|
|
578
581
|
label: n.details_amount_to_save,
|
|
579
|
-
onCancel:
|
|
580
|
-
onSave:
|
|
582
|
+
onCancel: o,
|
|
583
|
+
onSave: d,
|
|
581
584
|
primaryText: n.details_amount_to_save,
|
|
582
585
|
secondaryText: x(t.amount, "0,0"),
|
|
583
586
|
zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
|
|
@@ -595,33 +598,33 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
595
598
|
)
|
|
596
599
|
}
|
|
597
600
|
);
|
|
598
|
-
}),
|
|
599
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h,
|
|
600
|
-
const b = { ...t, account_guid:
|
|
601
|
-
l ? _(b) : (await g(b), a(p.alert_account_changed)),
|
|
601
|
+
}), Dt = ({ goal: t }) => {
|
|
602
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, d] = y.useState(!1), o = async ({ balance: c, guid: m }) => {
|
|
603
|
+
const b = { ...t, account_guid: m, current_amount: c || 0 };
|
|
604
|
+
l ? _(b) : (await g(b), a(p.alert_account_changed)), d(!1);
|
|
602
605
|
};
|
|
603
606
|
return /* @__PURE__ */ r(f, { children: [
|
|
604
|
-
l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () =>
|
|
607
|
+
l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => d(!0), children: [
|
|
605
608
|
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
606
|
-
/* @__PURE__ */ e(
|
|
609
|
+
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
607
610
|
p.details_add_account
|
|
608
611
|
] }) }),
|
|
609
612
|
/* @__PURE__ */ e(M, { color: "primary" })
|
|
610
613
|
] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
611
|
-
/* @__PURE__ */ e(pe, { onClick: () =>
|
|
614
|
+
/* @__PURE__ */ e(pe, { onClick: () => d(!0), variant: "text", children: p.details_change_account }),
|
|
612
615
|
/* @__PURE__ */ e(
|
|
613
616
|
A,
|
|
614
617
|
{
|
|
615
618
|
color: "text.secondary",
|
|
616
619
|
sx: { textAlign: "center", whiteSpace: "wrap" },
|
|
617
620
|
variant: "Paragraph",
|
|
618
|
-
children:
|
|
621
|
+
children: L(p.details_change_account_description, t.name)
|
|
619
622
|
}
|
|
620
623
|
)
|
|
621
624
|
] }),
|
|
622
|
-
/* @__PURE__ */ e(j, { isOpen: h, onClose: () =>
|
|
625
|
+
/* @__PURE__ */ e(j, { isOpen: h, onClose: () => d(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
|
|
623
626
|
n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
|
|
624
|
-
/* @__PURE__ */ e(
|
|
627
|
+
/* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
|
|
625
628
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
626
629
|
ne,
|
|
627
630
|
{
|
|
@@ -639,7 +642,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
639
642
|
/* @__PURE__ */ e(M, {})
|
|
640
643
|
] }) }, c.guid)) }),
|
|
641
644
|
i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
|
|
642
|
-
/* @__PURE__ */ e(
|
|
645
|
+
/* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
|
|
643
646
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
644
647
|
ne,
|
|
645
648
|
{
|
|
@@ -657,7 +660,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
657
660
|
/* @__PURE__ */ e(M, {})
|
|
658
661
|
] }) }, c.guid)) }),
|
|
659
662
|
/* @__PURE__ */ e(
|
|
660
|
-
|
|
663
|
+
Ae,
|
|
661
664
|
{
|
|
662
665
|
description: p.connect_description,
|
|
663
666
|
label: p.connect_button,
|
|
@@ -666,11 +669,11 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
666
669
|
)
|
|
667
670
|
] }) })
|
|
668
671
|
] });
|
|
669
|
-
},
|
|
670
|
-
const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type ===
|
|
671
|
-
const
|
|
672
|
-
t.name = a, g ? s(
|
|
673
|
-
},
|
|
672
|
+
}, Kt = D(({ goal: t }) => {
|
|
673
|
+
const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
674
|
+
const o = { ...t, name: a };
|
|
675
|
+
t.name = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_name));
|
|
676
|
+
}, d = () => {
|
|
674
677
|
setTimeout(() => {
|
|
675
678
|
_(t.name);
|
|
676
679
|
}, 250);
|
|
@@ -681,7 +684,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
681
684
|
isDisabled: l,
|
|
682
685
|
isSaveDisabled: !a,
|
|
683
686
|
label: n.details_goal_name,
|
|
684
|
-
onCancel:
|
|
687
|
+
onCancel: d,
|
|
685
688
|
onSave: h,
|
|
686
689
|
primaryText: n.details_goal_name,
|
|
687
690
|
secondaryText: t.name,
|
|
@@ -691,28 +694,28 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
691
694
|
error: !a,
|
|
692
695
|
fullWidth: !0,
|
|
693
696
|
label: n.details_goal_name,
|
|
694
|
-
onChange: (
|
|
697
|
+
onChange: (o) => _(o.target.value),
|
|
695
698
|
value: a
|
|
696
699
|
}
|
|
697
700
|
)
|
|
698
701
|
}
|
|
699
702
|
);
|
|
700
|
-
}),
|
|
703
|
+
}), Mt = ({ goal: t }) => {
|
|
701
704
|
const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
|
|
702
705
|
if (!isNaN(a)) {
|
|
703
|
-
const
|
|
704
|
-
t.retirement_age = a, g ? s(
|
|
706
|
+
const o = { ...t, retirement_age: a };
|
|
707
|
+
t.retirement_age = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_retirement_age));
|
|
705
708
|
}
|
|
706
709
|
}, h = () => {
|
|
707
710
|
setTimeout(() => {
|
|
708
711
|
_(t.retirement_age || 65);
|
|
709
712
|
}, 250);
|
|
710
|
-
},
|
|
713
|
+
}, d = !a || isNaN(a) || a < 20 || a >= 100;
|
|
711
714
|
return /* @__PURE__ */ e(
|
|
712
715
|
ee,
|
|
713
716
|
{
|
|
714
717
|
isDisabled: t.is_complete,
|
|
715
|
-
isSaveDisabled:
|
|
718
|
+
isSaveDisabled: d,
|
|
716
719
|
label: n.details_retirement_age,
|
|
717
720
|
onCancel: h,
|
|
718
721
|
onSave: l,
|
|
@@ -722,18 +725,18 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
722
725
|
children: /* @__PURE__ */ e(
|
|
723
726
|
De,
|
|
724
727
|
{
|
|
725
|
-
error:
|
|
728
|
+
error: d,
|
|
726
729
|
fullWidth: !0,
|
|
727
730
|
label: n.details_retirement_age,
|
|
728
|
-
onChange: (
|
|
731
|
+
onChange: (o) => _(Number(o.target.value)),
|
|
729
732
|
value: isNaN(a) ? "" : a
|
|
730
733
|
}
|
|
731
734
|
)
|
|
732
735
|
}
|
|
733
736
|
);
|
|
734
|
-
},
|
|
735
|
-
const { goals: n } = C(), { user: i, updateUser: s } =
|
|
736
|
-
a &&
|
|
737
|
+
}, Lt = D(({ goal: t }) => {
|
|
738
|
+
const { goals: n } = C(), { user: i, updateUser: s } = Ge(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, d = async () => {
|
|
739
|
+
a && _t(a) && (await s({ ...i, birthday: ut(a) }), p(n.alert_goal_updated_birthday));
|
|
737
740
|
};
|
|
738
741
|
return /* @__PURE__ */ e(
|
|
739
742
|
ee,
|
|
@@ -741,16 +744,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
741
744
|
isDisabled: h,
|
|
742
745
|
isSaveDisabled: !!g,
|
|
743
746
|
label: n.details_birthday,
|
|
744
|
-
onSave:
|
|
747
|
+
onSave: d,
|
|
745
748
|
primaryText: n.details_birthday,
|
|
746
749
|
secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
|
|
747
750
|
zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
|
|
748
|
-
children: /* @__PURE__ */ e(
|
|
749
|
-
|
|
751
|
+
children: /* @__PURE__ */ e(gt, { dateAdapter: pt, children: /* @__PURE__ */ e(
|
|
752
|
+
ht,
|
|
750
753
|
{
|
|
751
754
|
label: n.details_birthday,
|
|
752
755
|
onChange: _,
|
|
753
|
-
onError: (
|
|
756
|
+
onError: (o) => l(o),
|
|
754
757
|
sx: { width: "100%" },
|
|
755
758
|
value: a
|
|
756
759
|
}
|
|
@@ -766,7 +769,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
766
769
|
setAlert: g,
|
|
767
770
|
setNewRetirementGoalAccounts: l,
|
|
768
771
|
setSelectedGoal: h
|
|
769
|
-
} = I(), [
|
|
772
|
+
} = I(), [d, o] = y.useState(!1), c = !t.guid, m = i.filter(
|
|
770
773
|
(S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
|
|
771
774
|
), b = i.filter(
|
|
772
775
|
(S) => !a.find((R) => R.account_guid === S.guid)
|
|
@@ -783,16 +786,16 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
783
786
|
h({
|
|
784
787
|
..._,
|
|
785
788
|
current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
|
|
786
|
-
}),
|
|
789
|
+
}), o(!1);
|
|
787
790
|
};
|
|
788
791
|
return /* @__PURE__ */ r(f, { children: [
|
|
789
|
-
|
|
790
|
-
/* @__PURE__ */ e(
|
|
792
|
+
m.map((S) => /* @__PURE__ */ r(f, { children: [
|
|
793
|
+
/* @__PURE__ */ e(Oe, { account: S }),
|
|
791
794
|
/* @__PURE__ */ e(E, {})
|
|
792
795
|
] }, S.guid)),
|
|
793
|
-
/* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () =>
|
|
796
|
+
/* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
|
|
794
797
|
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
795
|
-
/* @__PURE__ */ e(
|
|
798
|
+
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
796
799
|
n.details_add_account
|
|
797
800
|
] }) }),
|
|
798
801
|
/* @__PURE__ */ e(M, { color: "primary" })
|
|
@@ -801,59 +804,59 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
801
804
|
Be,
|
|
802
805
|
{
|
|
803
806
|
accounts: b,
|
|
804
|
-
isOpen:
|
|
805
|
-
onClose: () =>
|
|
807
|
+
isOpen: d,
|
|
808
|
+
onClose: () => o(!1),
|
|
806
809
|
onSave: T,
|
|
807
810
|
title: n.add_select_accounts
|
|
808
811
|
}
|
|
809
812
|
)
|
|
810
813
|
] });
|
|
811
|
-
},
|
|
814
|
+
}, Ot = D(({ goal: t }) => {
|
|
812
815
|
const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
|
|
813
816
|
() => i.find((_) => _.guid === t.account_guid),
|
|
814
817
|
[i, t]
|
|
815
818
|
), p = t.track_type;
|
|
816
819
|
let a = n.details_save_title;
|
|
817
|
-
return t.track_type ===
|
|
820
|
+
return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
|
|
818
821
|
/* @__PURE__ */ r(f, { mx: 24, children: [
|
|
819
822
|
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
|
|
820
|
-
/* @__PURE__ */ e(
|
|
823
|
+
/* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
|
|
821
824
|
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
|
|
822
825
|
] }),
|
|
823
|
-
/* @__PURE__ */ r(
|
|
824
|
-
/* @__PURE__ */ e(
|
|
826
|
+
/* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
|
|
827
|
+
/* @__PURE__ */ e(Kt, { goal: t }),
|
|
825
828
|
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
826
|
-
(p ===
|
|
827
|
-
/* @__PURE__ */ e(
|
|
828
|
-
/* @__PURE__ */ e(E, { sx: { ml: p ===
|
|
829
|
+
(p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
|
|
830
|
+
/* @__PURE__ */ e(wt, { goal: t }),
|
|
831
|
+
/* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
|
|
829
832
|
] }),
|
|
830
|
-
t.track_type ===
|
|
831
|
-
/* @__PURE__ */ e(lt, { goal: t }),
|
|
832
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
833
|
+
t.track_type === u.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
|
|
833
834
|
/* @__PURE__ */ e(ct, { goal: t }),
|
|
834
835
|
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
835
836
|
/* @__PURE__ */ e(dt, { goal: t }),
|
|
837
|
+
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
838
|
+
/* @__PURE__ */ e(mt, { goal: t }),
|
|
836
839
|
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
837
840
|
] }),
|
|
838
|
-
t.track_type ===
|
|
839
|
-
/* @__PURE__ */ e(Kt, { goal: t }),
|
|
840
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
841
|
+
t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
|
|
841
842
|
/* @__PURE__ */ e(Mt, { goal: t }),
|
|
843
|
+
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
844
|
+
/* @__PURE__ */ e(Lt, { goal: t }),
|
|
842
845
|
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
843
846
|
] })
|
|
844
847
|
] }),
|
|
845
|
-
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type ===
|
|
846
|
-
t.track_type !==
|
|
847
|
-
/* @__PURE__ */ e(
|
|
848
|
+
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
|
849
|
+
t.track_type !== u.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
|
|
850
|
+
/* @__PURE__ */ e(Oe, { account: s }),
|
|
848
851
|
/* @__PURE__ */ e(E, {})
|
|
849
852
|
] }),
|
|
850
|
-
t.track_type ===
|
|
853
|
+
t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
|
|
851
854
|
/* @__PURE__ */ e(Bt, { goal: t }),
|
|
852
855
|
/* @__PURE__ */ e(E, {})
|
|
853
856
|
] }),
|
|
854
|
-
t.track_type ===
|
|
857
|
+
t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Dt, { goal: t })
|
|
855
858
|
] });
|
|
856
|
-
}),
|
|
859
|
+
}), Wt = D(({ onClose: t }) => {
|
|
857
860
|
const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
|
|
858
861
|
addGoal: p,
|
|
859
862
|
addRetirementGoal: a,
|
|
@@ -861,34 +864,34 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
861
864
|
deleteRetirementGoal: g,
|
|
862
865
|
newRetirementGoalAccounts: l,
|
|
863
866
|
retirementGoalAccounts: h,
|
|
864
|
-
selectedGoal:
|
|
865
|
-
setAlert:
|
|
867
|
+
selectedGoal: d,
|
|
868
|
+
setAlert: o,
|
|
866
869
|
setSelectedGoal: c,
|
|
867
|
-
updateGoal:
|
|
868
|
-
} = I(), { user: b } =
|
|
870
|
+
updateGoal: m
|
|
871
|
+
} = I(), { user: b } = Ge(), [T, S] = y.useState(!1), R = !d?.guid, v = d?.track_type === u.SAVINGS_TRACK && d.is_complete && !d.has_been_spent, F = y.useMemo(() => {
|
|
869
872
|
const G = R ? l : h;
|
|
870
873
|
return n.filter(($) => G.some((K) => K.account_guid === $.guid));
|
|
871
874
|
}, [R, n, l, h]), Z = y.useMemo(() => {
|
|
872
|
-
if (!
|
|
875
|
+
if (!d) return !1;
|
|
873
876
|
if (!R && !v) return !0;
|
|
874
|
-
const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } =
|
|
875
|
-
return $ ===
|
|
876
|
-
}, [
|
|
877
|
+
const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = d;
|
|
878
|
+
return $ === u.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === u.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
|
|
879
|
+
}, [d, F, b.birthday]);
|
|
877
880
|
let z = s.delete_button, H = () => S(!0);
|
|
878
881
|
R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
|
|
879
882
|
const te = async () => {
|
|
880
|
-
if (
|
|
881
|
-
const G =
|
|
882
|
-
G !==
|
|
883
|
+
if (d) {
|
|
884
|
+
const G = d.track_type;
|
|
885
|
+
G !== u.RETIREMENT_TRACK ? await p(d) : G === u.RETIREMENT_TRACK && await a({ ...d, target_amount: d.amount }), o(i.alert_goal_added), c(void 0), G && t?.(G);
|
|
883
886
|
}
|
|
884
887
|
}, ie = async () => {
|
|
885
|
-
|
|
888
|
+
d && (d.track_type !== u.RETIREMENT_TRACK ? await _(d.guid) : d.track_type === u.RETIREMENT_TRACK && await g(d), o(i.alert_goal_deleted), c(void 0));
|
|
886
889
|
}, se = async () => {
|
|
887
890
|
const G = {
|
|
888
|
-
...
|
|
891
|
+
...d,
|
|
889
892
|
has_been_spent: !0
|
|
890
893
|
};
|
|
891
|
-
await
|
|
894
|
+
await m(G), o(i.alert_goal_completed), c(void 0);
|
|
892
895
|
};
|
|
893
896
|
return /* @__PURE__ */ r(f, { children: [
|
|
894
897
|
/* @__PURE__ */ e(
|
|
@@ -896,7 +899,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
896
899
|
{
|
|
897
900
|
ariaLabelClose: s.close_aria,
|
|
898
901
|
hasSecondaryAction: R,
|
|
899
|
-
isOpen: !!
|
|
902
|
+
isOpen: !!d,
|
|
900
903
|
isPrimaryDisabled: !Z,
|
|
901
904
|
onClose: () => c(void 0),
|
|
902
905
|
onPrimaryAction: H,
|
|
@@ -904,11 +907,11 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
904
907
|
primaryText: z,
|
|
905
908
|
secondaryColor: "primary",
|
|
906
909
|
title: i.goal_details,
|
|
907
|
-
children:
|
|
910
|
+
children: d && /* @__PURE__ */ e(Ot, { goal: d })
|
|
908
911
|
}
|
|
909
912
|
),
|
|
910
913
|
/* @__PURE__ */ e(
|
|
911
|
-
|
|
914
|
+
tt,
|
|
912
915
|
{
|
|
913
916
|
copy: { close_aria: s.close_aria, title: i.delete_goal },
|
|
914
917
|
isOpen: T,
|
|
@@ -917,38 +920,43 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
917
920
|
onPrimaryAction: ie,
|
|
918
921
|
primaryColor: "error",
|
|
919
922
|
primaryText: s.delete_button,
|
|
920
|
-
children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children:
|
|
923
|
+
children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(i.delete_description, d?.name || "") })
|
|
921
924
|
}
|
|
922
925
|
)
|
|
923
926
|
] });
|
|
924
|
-
}),
|
|
925
|
-
const { onEvent: i } =
|
|
927
|
+
}), Xn = D(({ onBackClick: t, sx: n }) => {
|
|
928
|
+
const { onEvent: i } = Ne(), { isMobile: s } = ge(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = he(), { goals: l, common: h } = C(), { alert: d, goals: o, goalsLoaded: c, loadGoals: m, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0;
|
|
929
|
+
Ke({
|
|
930
|
+
widgetName: "GoalsWidget",
|
|
931
|
+
isLoaded: c
|
|
932
|
+
});
|
|
933
|
+
const ie = a ? L(
|
|
926
934
|
s ? l.tab_subtitle_mobile : l.tab_subtitle,
|
|
927
935
|
x(z, "0,0")
|
|
928
|
-
) : "", se = a ?
|
|
936
|
+
) : "", se = a ? L(
|
|
929
937
|
s ? l.tab_subtitle_mobile : l.tab_subtitle,
|
|
930
938
|
x(H, "0,0")
|
|
931
|
-
) : "", G = a ?
|
|
939
|
+
) : "", G = a ? L(
|
|
932
940
|
s ? l.tab_subtitle_mobile : l.tab_subtitle,
|
|
933
941
|
x(te, "0,0")
|
|
934
942
|
) : "";
|
|
935
943
|
y.useEffect(() => {
|
|
936
944
|
g(p), i(Y.GOALS_VIEW);
|
|
937
|
-
}, []), y.useEffect(() => {
|
|
938
|
-
_ &&
|
|
945
|
+
}, [p]), y.useEffect(() => {
|
|
946
|
+
_ && m().finally();
|
|
939
947
|
}, [_, z, H, te]);
|
|
940
948
|
const $ = () => {
|
|
941
949
|
i(Y.GOALS_CLICK_FILTER);
|
|
942
950
|
}, K = () => {
|
|
943
951
|
Z(!0), i(Y.GOALS_CLICK_ADD);
|
|
944
952
|
}, q = (X) => {
|
|
945
|
-
Z(!1), X ===
|
|
953
|
+
Z(!1), X === u.SAVINGS_TRACK ? v(0) : X === u.DEBT_TRACK ? v(1) : X === u.RETIREMENT_TRACK && v(2);
|
|
946
954
|
}, O = y.useMemo(
|
|
947
|
-
() => c && (
|
|
948
|
-
[
|
|
955
|
+
() => c && (o.length === 0 || o.every(({ track_type: X }) => !X) && S.length === 0),
|
|
956
|
+
[o, c, S]
|
|
949
957
|
);
|
|
950
|
-
return !c || !a || !_ ? /* @__PURE__ */ e(
|
|
951
|
-
|
|
958
|
+
return !c || !a || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ r(
|
|
959
|
+
bt,
|
|
952
960
|
{
|
|
953
961
|
accountOptions: p,
|
|
954
962
|
actions: [
|
|
@@ -965,9 +973,9 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
965
973
|
children: [
|
|
966
974
|
/* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
|
|
967
975
|
/* @__PURE__ */ r(
|
|
968
|
-
|
|
976
|
+
ze,
|
|
969
977
|
{
|
|
970
|
-
onChange: (X,
|
|
978
|
+
onChange: (X, We) => v(We),
|
|
971
979
|
sx: { bgcolor: "background.paper" },
|
|
972
980
|
textColor: "primary",
|
|
973
981
|
value: O ? !1 : R,
|
|
@@ -998,7 +1006,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
998
1006
|
}
|
|
999
1007
|
),
|
|
1000
1008
|
O ? /* @__PURE__ */ e(
|
|
1001
|
-
|
|
1009
|
+
ft,
|
|
1002
1010
|
{
|
|
1003
1011
|
header: l.create_goals_header,
|
|
1004
1012
|
icon: "trophy",
|
|
@@ -1013,12 +1021,12 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1013
1021
|
}
|
|
1014
1022
|
}
|
|
1015
1023
|
) : /* @__PURE__ */ r(U, { children: [
|
|
1016
|
-
R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType:
|
|
1017
|
-
R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType:
|
|
1018
|
-
R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType:
|
|
1024
|
+
R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.SAVINGS_TRACK }),
|
|
1025
|
+
R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.DEBT_TRACK }),
|
|
1026
|
+
R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.RETIREMENT_TRACK })
|
|
1019
1027
|
] })
|
|
1020
1028
|
] }),
|
|
1021
|
-
/* @__PURE__ */ e(
|
|
1029
|
+
/* @__PURE__ */ e(Wt, { onClose: q }),
|
|
1022
1030
|
/* @__PURE__ */ e(
|
|
1023
1031
|
j,
|
|
1024
1032
|
{
|
|
@@ -1026,29 +1034,29 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1026
1034
|
isOpen: F,
|
|
1027
1035
|
onClose: () => Z(!1),
|
|
1028
1036
|
title: l.add_goal_title,
|
|
1029
|
-
children: /* @__PURE__ */ e(
|
|
1037
|
+
children: /* @__PURE__ */ e(kt, { onClose: q })
|
|
1030
1038
|
}
|
|
1031
1039
|
),
|
|
1032
|
-
/* @__PURE__ */ e(
|
|
1040
|
+
/* @__PURE__ */ e(Fe, { onClose: () => T(""), open: !!d, children: /* @__PURE__ */ e(je, { onClose: () => T(""), severity: "success", variant: "filled", children: d }) })
|
|
1033
1041
|
]
|
|
1034
1042
|
}
|
|
1035
1043
|
);
|
|
1036
|
-
}),
|
|
1037
|
-
const { goals: n } = C(), i =
|
|
1044
|
+
}), Pt = D(({ goal: t }) => {
|
|
1045
|
+
const { goals: n } = C(), i = Tt(), {
|
|
1038
1046
|
backgroundColor: s,
|
|
1039
1047
|
color: p,
|
|
1040
1048
|
percentage: a,
|
|
1041
1049
|
projectedText: _
|
|
1042
1050
|
} = ue(n, t), g = Math.round(a * 100);
|
|
1043
|
-
let l = /* @__PURE__ */ e(
|
|
1044
|
-
return t.track_type ===
|
|
1051
|
+
let l = /* @__PURE__ */ e(Re, {});
|
|
1052
|
+
return t.track_type === u.DEBT_TRACK ? l = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
1045
1053
|
/* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
|
|
1046
|
-
/* @__PURE__ */ r(
|
|
1054
|
+
/* @__PURE__ */ r(At, { sx: { width: "100%" }, children: [
|
|
1047
1055
|
/* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
1048
1056
|
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
|
|
1049
1057
|
] }),
|
|
1050
1058
|
/* @__PURE__ */ e(
|
|
1051
|
-
|
|
1059
|
+
Ct,
|
|
1052
1060
|
{
|
|
1053
1061
|
backgroundStrokeColor: i.palette.border.lighter,
|
|
1054
1062
|
color: i.palette.primary.main,
|
|
@@ -1059,7 +1067,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1059
1067
|
}
|
|
1060
1068
|
)
|
|
1061
1069
|
] });
|
|
1062
|
-
}),
|
|
1070
|
+
}), Vt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
|
|
1063
1071
|
f,
|
|
1064
1072
|
{
|
|
1065
1073
|
sx: {
|
|
@@ -1069,7 +1077,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1069
1077
|
...i
|
|
1070
1078
|
},
|
|
1071
1079
|
children: [
|
|
1072
|
-
/* @__PURE__ */ e(
|
|
1080
|
+
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
1073
1081
|
/* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
|
|
1074
1082
|
/* @__PURE__ */ e(
|
|
1075
1083
|
W,
|
|
@@ -1082,46 +1090,49 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1082
1090
|
)
|
|
1083
1091
|
]
|
|
1084
1092
|
}
|
|
1085
|
-
),
|
|
1086
|
-
const { visibleAccounts: n } = V(), { onEvent: i } =
|
|
1087
|
-
|
|
1093
|
+
), Un = D(({ onCTAClick: t }) => {
|
|
1094
|
+
const { visibleAccounts: n } = V(), { onEvent: i } = Ne(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = he(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
|
|
1095
|
+
Ke({
|
|
1096
|
+
widgetName: "GoalsMicroWidget",
|
|
1097
|
+
isLoaded: h
|
|
1098
|
+
}), y.useEffect(() => {
|
|
1088
1099
|
a(n);
|
|
1089
1100
|
}, []), y.useEffect(() => {
|
|
1090
1101
|
p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
|
|
1091
1102
|
state: n?.length ? "default" : "zeroState"
|
|
1092
1103
|
}));
|
|
1093
1104
|
}, [p]);
|
|
1094
|
-
const
|
|
1105
|
+
const d = y.useMemo(
|
|
1095
1106
|
() => h && g.length === 0,
|
|
1096
1107
|
[g, h]
|
|
1097
|
-
),
|
|
1108
|
+
), o = () => {
|
|
1098
1109
|
i(
|
|
1099
|
-
|
|
1110
|
+
d ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
|
|
1100
1111
|
), t();
|
|
1101
1112
|
};
|
|
1102
|
-
return !h || !_ || !p ? /* @__PURE__ */ e(
|
|
1103
|
-
|
|
1113
|
+
return !h || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
|
|
1114
|
+
St,
|
|
1104
1115
|
{
|
|
1105
1116
|
className: "mx-goals-microwidget",
|
|
1106
|
-
ctaLabel:
|
|
1107
|
-
onCTAClick:
|
|
1117
|
+
ctaLabel: d ? s.get_started : s.view_details,
|
|
1118
|
+
onCTAClick: o,
|
|
1108
1119
|
title: s.title,
|
|
1109
|
-
children:
|
|
1110
|
-
|
|
1120
|
+
children: d ? /* @__PURE__ */ e(
|
|
1121
|
+
Vt,
|
|
1111
1122
|
{
|
|
1112
1123
|
header: s.create_goals_header,
|
|
1113
1124
|
subText: s.micro_zero_state_description
|
|
1114
1125
|
}
|
|
1115
|
-
) : /* @__PURE__ */ e(
|
|
1116
|
-
/* @__PURE__ */ e(
|
|
1117
|
-
|
|
1126
|
+
) : /* @__PURE__ */ e(yt, { sx: { justifyContent: "space-between" }, children: g.map((c, m) => /* @__PURE__ */ r(y.Fragment, { children: [
|
|
1127
|
+
/* @__PURE__ */ e(Pt, { goal: c }),
|
|
1128
|
+
m !== g.length - 1 && /* @__PURE__ */ e(E, {})
|
|
1118
1129
|
] }, c.guid)) })
|
|
1119
1130
|
}
|
|
1120
1131
|
);
|
|
1121
1132
|
});
|
|
1122
1133
|
export {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1134
|
+
qn as GoalApi,
|
|
1135
|
+
Jn as GoalStore,
|
|
1136
|
+
Un as GoalsMicroWidget,
|
|
1137
|
+
Xn as GoalsWidget
|
|
1127
1138
|
};
|