@mx-cartographer/experiences 8.2.3 → 8.2.4-alpha-ram1-bug-testing
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 +16 -0
- package/dist/{AccountDetailsHeader-CfdnKyJK.mjs → AccountDetailsHeader-DIysk_4w.mjs} +1 -1
- package/dist/{AccountFields-CAy0x_4i.mjs → AccountFields-mwJ8NXsX.mjs} +18 -18
- package/dist/{AccountListItem-BYyeeCf6.mjs → AccountListItem-BDXHs4tV.mjs} +7 -8
- package/dist/{CategorySelectorDrawer-Cu1ohxeM.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +71 -68
- package/dist/{ConnectCard-Dix8BoV_.mjs → ConnectCard-CCep7Zqe.mjs} +9 -9
- package/dist/{ConnectDrawer-DgfsTpyW.mjs → ConnectDrawer-Cnjr3Ddg.mjs} +2 -2
- package/dist/{ConnectionsDrawer-D7IXAza2.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +1 -1
- package/dist/{CurrencyDialog-d4dL7vA5.mjs → CurrencyDialog-DumQCTPO.mjs} +18 -16
- package/dist/{CurrencyInput-B59ugxPN.mjs → CurrencyInput-adTIRtL3.mjs} +28 -26
- package/dist/{Dialog-iLlBR8TG.mjs → Dialog-CwWc0AbH.mjs} +11 -11
- package/dist/{Drawer-XPaLYjiO.mjs → Drawer-BXqqBMxg.mjs} +26 -28
- package/dist/{EmbeddedCard-BNl3quCs.mjs → EmbeddedCard-DPwJjqMH.mjs} +37 -37
- package/dist/{EmptyState-DHAkGsjk.mjs → EmptyState-CJUDc3kD.mjs} +17 -17
- package/dist/{ExportCsvAction-hDprC41l.mjs → ExportCsvAction-Bw02ZJEj.mjs} +2 -2
- package/dist/{GlobalAccountFilter-DrhtwPqh.mjs → GlobalAccountFilter-7Cg2-9A5.mjs} +25 -25
- package/dist/{Help-BSQm9o29.mjs → Help-DJ8PrVHX.mjs} +56 -73
- package/dist/{ListItemAction-DGjHxNDJ.mjs → ListItemAction-CwspSmQi.mjs} +22 -22
- package/dist/{ManageIncome-DwylSiWs.mjs → ManageIncome-B1JfqslT.mjs} +6 -6
- package/dist/{NotificationSettings-CCg-Tml2.mjs → NotificationSettings-6p-h5phZ.mjs} +48 -48
- package/dist/{OriginalBalanceAction-CvDx0K6k.mjs → OriginalBalanceAction-CkJPnp2c.mjs} +2 -2
- package/dist/{RecurringSettings-CPXLW6AR.mjs → RecurringSettings-cm6MK_aS.mjs} +1 -1
- package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-CC9F_Ezk.mjs} +1 -1
- package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
- package/dist/Select-BFt-HD-L.mjs +55 -0
- package/dist/{SelectionBox-Bx2a5rh4.mjs → SelectionBox-B4xELRgp.mjs} +1 -1
- package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
- package/dist/{SpendingLegend-BmkEr9Nh.mjs → SpendingLegend-5Ct_FZ8o.mjs} +1 -1
- package/dist/{ToggleListItem-BLu_fWA2.mjs → ToggleListItem-Dl1lXNwj.mjs} +29 -28
- package/dist/{TransactionDetails-CbBSxdOi.mjs → TransactionDetails-C3dlAzYf.mjs} +386 -393
- package/dist/{ViewMoreMicroCard-D_LoKlJU.mjs → ViewMoreMicroCard-BD_MNc2z.mjs} +526 -518
- package/dist/{WidgetContainer-CYcmwsSu.mjs → WidgetContainer-DNuz_s7W.mjs} +5 -5
- package/dist/accounts/index.es.js +199 -194
- package/dist/analytics/index.es.js +1 -1
- package/dist/budgets/index.es.js +183 -184
- package/dist/cashflow/index.es.js +70 -80
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +1 -1
- package/dist/common/index.es.js +206 -194
- package/dist/common/utils/Theme.d.ts +6 -5
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +47 -47
- package/dist/debts/index.es.js +140 -140
- package/dist/finstrong/index.es.js +40 -32
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
- package/dist/goals/index.es.js +154 -165
- package/dist/help/index.es.js +2 -2
- package/dist/insights/components/insights/UserFeedback/Types.d.ts +1 -1
- package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +3 -3
- package/dist/insights/hooks/useContainerDimensions.d.ts +1 -1
- package/dist/insights/index.es.js +677 -687
- package/dist/insights/themes/Typography.d.ts +0 -2
- package/dist/investments/index.es.js +205 -207
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/cards/InsightCard.d.ts +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -5
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -5
- package/dist/microinsights/carousel/BeatList.d.ts +2 -2
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +11 -5
- package/dist/networth/index.es.js +85 -87
- package/dist/notifications/index.es.js +7 -8
- package/dist/recurringtransactions/index.es.js +53 -53
- package/dist/settings/index.es.js +111 -111
- package/dist/spending/index.es.js +7 -7
- package/dist/transactions/components/shared/TransactionList.d.ts +2 -2
- package/dist/transactions/index.es.js +138 -140
- package/dist/trends/index.es.js +293 -292
- package/dist/{useScreenSize-CeFhWTt_.mjs → useScreenSize-mWpmnh5w.mjs} +1 -1
- package/package.json +29 -23
- package/dist/SearchBox-CwDgvWVJ.mjs +0 -48
- package/dist/Select-BZRUpOib.mjs +0 -51
package/dist/goals/index.es.js
CHANGED
|
@@ -6,25 +6,25 @@ import je from "@mui/material/Snackbar";
|
|
|
6
6
|
import f from "@mui/material/Stack";
|
|
7
7
|
import re from "@mui/material/Tab";
|
|
8
8
|
import Fe from "@mui/material/Tabs";
|
|
9
|
-
import { b as
|
|
9
|
+
import { b as B } from "../Localization-DnoVyBNK.mjs";
|
|
10
10
|
import { f as I } from "../NumberFormatting--XMeeBfr.mjs";
|
|
11
11
|
import { Text as C, H3 as le, P as Y, Icon as $e, InstitutionLogo as X, H2 as Te } from "@mxenabled/mxui";
|
|
12
12
|
import me from "@mui/material/Button";
|
|
13
13
|
import Ce from "@mui/material/Card";
|
|
14
14
|
import Re from "@mui/material/CardActionArea";
|
|
15
15
|
import xe from "@mui/material/CardContent";
|
|
16
|
-
import
|
|
16
|
+
import ge from "@mui/material/Grid";
|
|
17
17
|
import te from "@mui/material/Avatar";
|
|
18
18
|
import He from "@mui/material/CardHeader";
|
|
19
|
-
import { Payments as
|
|
19
|
+
import { Payments as Ee, NoteStack as Se, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as z, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
|
|
20
20
|
import { g as ue, T as r, G as de, a as Qe, M as U, b as Xe } from "../GoalsUtil-C9EnLWvC.mjs";
|
|
21
21
|
import { u as x, k as N, b as _e, a as pe, d as j, C as Ge, g as Ne } from "../hooks-BaO_gOI6.mjs";
|
|
22
|
-
import { u as he } from "../useScreenSize-
|
|
22
|
+
import { u as he } from "../useScreenSize-mWpmnh5w.mjs";
|
|
23
23
|
import { S as et } from "../StatusBar-CPfSXe80.mjs";
|
|
24
24
|
import v from "@mui/material/Divider";
|
|
25
25
|
import O from "@mui/material/List";
|
|
26
|
-
import { L as Z } from "../ListItemAction-
|
|
27
|
-
import { C as ke } from "../CurrencyInput-
|
|
26
|
+
import { L as Z } from "../ListItemAction-CwspSmQi.mjs";
|
|
27
|
+
import { C as ke } from "../CurrencyInput-adTIRtL3.mjs";
|
|
28
28
|
import { fromUnixTime as ee } from "date-fns/fromUnixTime";
|
|
29
29
|
import tt from "@mui/material/IconButton";
|
|
30
30
|
import k from "@mui/material/ListItem";
|
|
@@ -32,39 +32,38 @@ import P from "@mui/material/ListItemAvatar";
|
|
|
32
32
|
import L from "@mui/material/ListItemButton";
|
|
33
33
|
import w from "@mui/material/ListItemText";
|
|
34
34
|
import { f as be, D as fe } from "../DateFormats-HudZ3Bjs.mjs";
|
|
35
|
-
import { D as q } from "../Drawer-
|
|
35
|
+
import { D as q } from "../Drawer-BXqqBMxg.mjs";
|
|
36
36
|
import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
|
|
37
37
|
import nt from "@mui/material/Collapse";
|
|
38
38
|
import ot from "@mui/material/ListItemIcon";
|
|
39
39
|
import at from "@mui/material/Checkbox";
|
|
40
|
-
import { C as De } from "../ConnectCard-
|
|
40
|
+
import { C as De } from "../ConnectCard-CCep7Zqe.mjs";
|
|
41
41
|
import { A as Ae } from "../Account-BaJmiJAG.mjs";
|
|
42
42
|
import { u as it } from "../useAccountDisplayName-CFa_MrS6.mjs";
|
|
43
43
|
import Ke from "@mui/material/TextField";
|
|
44
|
-
import { M as rt, I as st, O as ct } from "../OriginalBalanceAction-
|
|
44
|
+
import { M as rt, I as st, O as ct } from "../OriginalBalanceAction-CkJPnp2c.mjs";
|
|
45
45
|
import { getUnixTime as lt } from "date-fns/getUnixTime";
|
|
46
46
|
import { isValid as dt } from "date-fns/isValid";
|
|
47
47
|
import { AdapterDateFns as mt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
48
48
|
import { DatePicker as ut } from "@mui/x-date-pickers";
|
|
49
49
|
import { LocalizationProvider as _t } from "@mui/x-date-pickers/LocalizationProvider";
|
|
50
|
-
import { D as pt } from "../Dialog-
|
|
50
|
+
import { D as pt } from "../Dialog-CwWc0AbH.mjs";
|
|
51
51
|
import { u as Me } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
52
52
|
import { A as $ } from "../Analytics-CzGzz_sE.mjs";
|
|
53
53
|
import { L as Le } from "../Loader-CxeBwuPG.mjs";
|
|
54
|
-
import { W as ht } from "../WidgetContainer-
|
|
55
|
-
import { E as bt } from "../EmptyState-
|
|
56
|
-
import ft from "@mui/material/
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import {
|
|
60
|
-
import { M as Tt } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
54
|
+
import { W as ht } from "../WidgetContainer-DNuz_s7W.mjs";
|
|
55
|
+
import { E as bt } from "../EmptyState-CJUDc3kD.mjs";
|
|
56
|
+
import ft from "@mui/material/Box";
|
|
57
|
+
import { useTheme as gt } from "@mui/material/styles";
|
|
58
|
+
import { S as yt } from "../SingleSegmentDonut-7Uy6VEld.mjs";
|
|
59
|
+
import { M as At } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
61
60
|
function se({ title: t, subtitle: n }) {
|
|
62
61
|
return /* @__PURE__ */ c(f, { children: [
|
|
63
62
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t }),
|
|
64
63
|
/* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "body1", children: n })
|
|
65
64
|
] });
|
|
66
65
|
}
|
|
67
|
-
const
|
|
66
|
+
const Tt = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
68
67
|
/(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
|
|
69
68
|
"$1$2$3"
|
|
70
69
|
) : I(t, "0,0.00"), Oe = D(
|
|
@@ -81,8 +80,8 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
81
80
|
percentage: `${h}`
|
|
82
81
|
}
|
|
83
82
|
];
|
|
84
|
-
let
|
|
85
|
-
return t.track_type === r.DEBT_TRACK ?
|
|
83
|
+
let y = /* @__PURE__ */ e(Ee, {});
|
|
84
|
+
return t.track_type === r.DEBT_TRACK ? y = /* @__PURE__ */ e(Se, {}) : t.track_type === r.RETIREMENT_TRACK && (y = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(
|
|
86
85
|
Ce,
|
|
87
86
|
{
|
|
88
87
|
elevation: 2,
|
|
@@ -96,7 +95,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
96
95
|
/* @__PURE__ */ e(
|
|
97
96
|
He,
|
|
98
97
|
{
|
|
99
|
-
avatar: /* @__PURE__ */ e(te, { sx: { bgcolor: p, color: s, height: 48, width: 48 }, variant: "rounded", children:
|
|
98
|
+
avatar: /* @__PURE__ */ e(te, { sx: { bgcolor: p, color: s, height: 48, width: 48 }, variant: "rounded", children: y }),
|
|
100
99
|
subheader: /* @__PURE__ */ e(
|
|
101
100
|
C,
|
|
102
101
|
{
|
|
@@ -105,7 +104,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
105
104
|
fontSize: n || m ? "18px" : "23px",
|
|
106
105
|
lineHeight: n || m ? "24px" : "32px"
|
|
107
106
|
},
|
|
108
|
-
children: `${I(t.current_amount, m ? "0,0" : "0,0.00")} / ${
|
|
107
|
+
children: `${I(t.current_amount, m ? "0,0" : "0,0.00")} / ${Tt(
|
|
109
108
|
b,
|
|
110
109
|
m
|
|
111
110
|
)}`
|
|
@@ -119,9 +118,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
119
118
|
fontWeight: 400,
|
|
120
119
|
sx: {
|
|
121
120
|
fontSize: "15px",
|
|
122
|
-
lineHeight: "20px"
|
|
123
|
-
whiteSpace: "normal",
|
|
124
|
-
overflowWrap: "break-word"
|
|
121
|
+
lineHeight: "20px"
|
|
125
122
|
},
|
|
126
123
|
variant: "h4",
|
|
127
124
|
children: t.name
|
|
@@ -140,7 +137,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
140
137
|
}
|
|
141
138
|
);
|
|
142
139
|
}
|
|
143
|
-
),
|
|
140
|
+
), Ct = D(({ trackType: t }) => {
|
|
144
141
|
const { goals: n } = x(), { setAlert: u, monthlyCashFlowProfile: d, updateMonthlyCashFlowProfile: _ } = N(), i = T.useMemo(() => {
|
|
145
142
|
let a = 0;
|
|
146
143
|
return t === r.SAVINGS_TRACK ? a = d?.amount_allocated_for_savings_goals || 0 : t === r.DEBT_TRACK ? a = d?.amount_allocated_for_debt_goals || 0 : t === r.RETIREMENT_TRACK && (a = d?.amount_allocated_for_retirement_goals || 0), a;
|
|
@@ -177,8 +174,8 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
177
174
|
)
|
|
178
175
|
}
|
|
179
176
|
) });
|
|
180
|
-
}),
|
|
181
|
-
const { goals: d } = x(), { percentage: _ } = ue(d, t), i = t.goal_type === de.KEEP_BALANCE_BELOW || t.has_been_spent ? d.goal_completed :
|
|
177
|
+
}), Rt = ({ goal: t, index: n, onUpClick: u }) => {
|
|
178
|
+
const { goals: d } = x(), { percentage: _ } = ue(d, t), i = t.goal_type === de.KEEP_BALANCE_BELOW || t.has_been_spent ? d.goal_completed : B(d.goal_percentage_reached, `${_ * 100}`);
|
|
182
179
|
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
183
180
|
L,
|
|
184
181
|
{
|
|
@@ -197,10 +194,10 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
197
194
|
children: t.track_type === r.SAVINGS_TRACK ? /* @__PURE__ */ e(tt, { onClick: () => u?.(t), children: /* @__PURE__ */ e(Ue, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(te, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: n + 1 }) })
|
|
198
195
|
}
|
|
199
196
|
),
|
|
200
|
-
/* @__PURE__ */ e(w, {
|
|
197
|
+
/* @__PURE__ */ e(w, { slotProps: { primary: { variant: "body1" } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
201
198
|
/* @__PURE__ */ c(f, { sx: { maxWidth: "70%" }, children: [
|
|
202
199
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
203
|
-
/* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i :
|
|
200
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : B(
|
|
204
201
|
d.goal_projection,
|
|
205
202
|
be(
|
|
206
203
|
ee(t.projected_to_complete_at || 0),
|
|
@@ -213,7 +210,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
213
210
|
]
|
|
214
211
|
}
|
|
215
212
|
) });
|
|
216
|
-
},
|
|
213
|
+
}, xt = ({ goal: t }) => {
|
|
217
214
|
const { goals: n } = x();
|
|
218
215
|
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
219
216
|
L,
|
|
@@ -222,10 +219,10 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
222
219
|
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
223
220
|
children: [
|
|
224
221
|
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
|
|
225
|
-
/* @__PURE__ */ e(w, {
|
|
222
|
+
/* @__PURE__ */ e(w, { slotProps: { primary: { variant: "body1" } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
226
223
|
/* @__PURE__ */ c(f, { children: [
|
|
227
224
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
228
|
-
/* @__PURE__ */ e(C, { variant: "caption", children:
|
|
225
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: B(
|
|
229
226
|
n.completed_label,
|
|
230
227
|
be(
|
|
231
228
|
ee(t.completed_at || 0),
|
|
@@ -239,15 +236,15 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
239
236
|
}
|
|
240
237
|
) }, t.guid);
|
|
241
238
|
}, Et = ({ trackType: t }) => {
|
|
242
|
-
const { goals: n, common: u } = x(), { loadGoals: d, orderedGoals: _, reorderGoals: i } = N(), m = _.filter((
|
|
243
|
-
(
|
|
239
|
+
const { goals: n, common: u } = x(), { loadGoals: d, orderedGoals: _, reorderGoals: i } = N(), m = _.filter((g) => g.track_type === t), p = m.filter(
|
|
240
|
+
(g) => g.track_type === r.SAVINGS_TRACK && !g.has_been_spent || g.track_type !== r.SAVINGS_TRACK && !g.is_complete
|
|
244
241
|
), s = m.filter(
|
|
245
|
-
(
|
|
242
|
+
(g) => g.track_type === r.SAVINGS_TRACK && g.has_been_spent || g.track_type !== r.SAVINGS_TRACK && g.is_complete
|
|
246
243
|
), [h, a] = T.useState(!1);
|
|
247
|
-
let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, l = n.manage_saving_title,
|
|
248
|
-
t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, l = n.manage_debt_title,
|
|
249
|
-
const
|
|
250
|
-
const A = [...p], R = A.findIndex((K) => K.guid ===
|
|
244
|
+
let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, l = n.manage_saving_title, y = n.manage_saving_description;
|
|
245
|
+
t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, l = n.manage_debt_title, y = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (o = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, l = n.manage_retirement_title, y = n.manage_retirement_description);
|
|
246
|
+
const E = async (g) => {
|
|
247
|
+
const A = [...p], R = A.findIndex((K) => K.guid === g.guid);
|
|
251
248
|
let G = R - 1;
|
|
252
249
|
G < 0 && (G = A.length - 1), A.splice(G, 0, A.splice(R, 1)[0]);
|
|
253
250
|
for (let K = 0; K < A.length; K++)
|
|
@@ -266,25 +263,25 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
266
263
|
children: /* @__PURE__ */ c(f, { children: [
|
|
267
264
|
/* @__PURE__ */ c(f, { m: 24, children: [
|
|
268
265
|
/* @__PURE__ */ e(le, { children: l }),
|
|
269
|
-
/* @__PURE__ */ e(Y, { color: "text.secondary",
|
|
266
|
+
/* @__PURE__ */ e(Y, { color: "text.secondary", variant: "subtitle2", children: y })
|
|
270
267
|
] }),
|
|
271
|
-
/* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ e(Ct, { trackType: t }),
|
|
272
269
|
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
|
|
273
|
-
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: p.map((
|
|
270
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: p.map((g, A) => {
|
|
274
271
|
const R = A >= p.length - 1;
|
|
275
272
|
return /* @__PURE__ */ c(f, { children: [
|
|
276
|
-
/* @__PURE__ */ e(
|
|
273
|
+
/* @__PURE__ */ e(Rt, { goal: g, index: A, onUpClick: E }),
|
|
277
274
|
/* @__PURE__ */ e(v, { variant: R ? "fullWidth" : "inset" })
|
|
278
|
-
] }, `ongoing-${
|
|
275
|
+
] }, `ongoing-${g.guid}`);
|
|
279
276
|
}) }),
|
|
280
277
|
t !== r.RETIREMENT_TRACK && s.length > 0 && /* @__PURE__ */ c(f, { children: [
|
|
281
278
|
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
|
|
282
|
-
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: s.map((
|
|
279
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: s.map((g, A) => {
|
|
283
280
|
const R = A > p.length - 1;
|
|
284
281
|
return /* @__PURE__ */ c(f, { children: [
|
|
285
|
-
/* @__PURE__ */ e(
|
|
282
|
+
/* @__PURE__ */ e(xt, { goal: g }),
|
|
286
283
|
/* @__PURE__ */ e(v, { variant: R ? "fullWidth" : "inset" })
|
|
287
|
-
] }, `complete-${
|
|
284
|
+
] }, `complete-${g.guid}`);
|
|
288
285
|
}) })
|
|
289
286
|
] })
|
|
290
287
|
] })
|
|
@@ -304,9 +301,9 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
304
301
|
/* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: d.ongoing_title }),
|
|
305
302
|
/* @__PURE__ */ e(Et, { trackType: t })
|
|
306
303
|
] }),
|
|
307
|
-
s.length > 0 ? /* @__PURE__ */ e(
|
|
304
|
+
s.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: s.map((o, b, l) => (
|
|
308
305
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
309
|
-
/* @__PURE__ */ e(
|
|
306
|
+
/* @__PURE__ */ e(ge, { size: u || b === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Oe, { goal: o, onClick: () => m(o) }, o.guid) }, b)
|
|
310
307
|
)) }) : /* @__PURE__ */ c(
|
|
311
308
|
f,
|
|
312
309
|
{
|
|
@@ -360,7 +357,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
360
357
|
] }) }) }) }, o.guid))
|
|
361
358
|
] })
|
|
362
359
|
] });
|
|
363
|
-
}),
|
|
360
|
+
}), St = ({ goalType: t, onClick: n }) => {
|
|
364
361
|
const { goals: u } = x(), { bgcolor: d, icon: _, label: i, description: m, subTypes: p, type: s } = t, [h, a] = T.useState(!1), o = p.length > 0;
|
|
365
362
|
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ c(O, { sx: { bgcolor: "background.paper" }, children: [
|
|
366
363
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
@@ -372,7 +369,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
372
369
|
s
|
|
373
370
|
),
|
|
374
371
|
children: [
|
|
375
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(te, { sx: { bgcolor: d }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
372
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(te, { sx: { bgcolor: d }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: _, sx: { color: "grey.900" } }) }) }),
|
|
376
373
|
/* @__PURE__ */ e(w, { primary: i, secondary: m, sx: { mr: 24 } }),
|
|
377
374
|
!o && /* @__PURE__ */ e(z, {}),
|
|
378
375
|
o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
|
|
@@ -381,18 +378,18 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
381
378
|
) }),
|
|
382
379
|
/* @__PURE__ */ e(v, { variant: "inset" }),
|
|
383
380
|
o && /* @__PURE__ */ e(nt, { in: h, children: /* @__PURE__ */ e(O, { sx: { bgcolor: "background.default" }, children: p.map((b, l) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(L, { onClick: () => n(b.label, b.metaType, s), children: [
|
|
384
|
-
/* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(
|
|
381
|
+
/* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: b.icon }) }),
|
|
385
382
|
/* @__PURE__ */ e(
|
|
386
383
|
w,
|
|
387
384
|
{
|
|
388
385
|
primary: b.label,
|
|
389
|
-
|
|
386
|
+
slotProps: { primary: { variant: "body1" } }
|
|
390
387
|
}
|
|
391
388
|
),
|
|
392
389
|
/* @__PURE__ */ e(z, {})
|
|
393
390
|
] }) }, l)) }) })
|
|
394
391
|
] }) });
|
|
395
|
-
},
|
|
392
|
+
}, Be = ({
|
|
396
393
|
accounts: t,
|
|
397
394
|
isOpen: n,
|
|
398
395
|
onClose: u,
|
|
@@ -400,7 +397,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
400
397
|
title: _
|
|
401
398
|
}) => {
|
|
402
399
|
const { goals: i, common: m } = x(), { config: p } = pe(), [s, h] = T.useState([]), a = (o) => {
|
|
403
|
-
const b = s.findIndex((
|
|
400
|
+
const b = s.findIndex((y) => y.guid === o.guid), l = [...s];
|
|
404
401
|
b >= 0 ? l.splice(b, 1) : l.push(o), h(l);
|
|
405
402
|
};
|
|
406
403
|
return /* @__PURE__ */ c(
|
|
@@ -448,30 +445,30 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
448
445
|
]
|
|
449
446
|
}
|
|
450
447
|
);
|
|
451
|
-
},
|
|
452
|
-
const { goals: n } = x(), { addGoal: u, debtGoals: d, setAlert: _, setSelectedGoal: i } = N(), { config: m } = pe(), { visibleDebtAccounts: p } = j(), [s, h] = T.useState(!1), a = Xe(n), o = (l,
|
|
453
|
-
|
|
448
|
+
}, vt = ({ onClose: t }) => {
|
|
449
|
+
const { goals: n } = x(), { addGoal: u, debtGoals: d, setAlert: _, setSelectedGoal: i } = N(), { config: m } = pe(), { visibleDebtAccounts: p } = j(), [s, h] = T.useState(!1), a = Xe(n), o = (l, y, E) => {
|
|
450
|
+
E === r.DEBT_TRACK ? h(!0) : i({
|
|
454
451
|
amount: 0,
|
|
455
452
|
current_amount: 0,
|
|
456
453
|
goal_type: de.SAVE_AMOUNT,
|
|
457
454
|
initial_amount: 0,
|
|
458
|
-
meta_type:
|
|
455
|
+
meta_type: y,
|
|
459
456
|
name: l,
|
|
460
|
-
track_type:
|
|
457
|
+
track_type: E
|
|
461
458
|
});
|
|
462
459
|
}, b = async (l) => {
|
|
463
|
-
for (const
|
|
464
|
-
let
|
|
465
|
-
|
|
466
|
-
account_guid:
|
|
460
|
+
for (const y of l) {
|
|
461
|
+
let E = U.CREDIT_CARD;
|
|
462
|
+
y.account_type === Ae.LOAN ? E = U.LOANS : y.account_type === Ae.LINE_OF_CREDIT && (E = U.LINE_OF_CREDIT), await u({
|
|
463
|
+
account_guid: y.guid,
|
|
467
464
|
amount: 0,
|
|
468
465
|
current_amount: 0,
|
|
469
466
|
goal_type: de.KEEP_BALANCE_BELOW,
|
|
470
|
-
initial_amount:
|
|
471
|
-
interest_rate:
|
|
472
|
-
meta_type:
|
|
473
|
-
monthly_payment:
|
|
474
|
-
name: we(
|
|
467
|
+
initial_amount: y.balance || 0,
|
|
468
|
+
interest_rate: y.interest_rate || 0,
|
|
469
|
+
meta_type: E,
|
|
470
|
+
monthly_payment: y.minimum_payment || 0,
|
|
471
|
+
name: we(y, {
|
|
475
472
|
allowNickname: m?.show_account_nicknames_in_master
|
|
476
473
|
}),
|
|
477
474
|
track_type: r.DEBT_TRACK
|
|
@@ -480,11 +477,11 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
480
477
|
h(!1), t?.(r.DEBT_TRACK);
|
|
481
478
|
};
|
|
482
479
|
return /* @__PURE__ */ c(f, { children: [
|
|
483
|
-
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: a.map((l,
|
|
480
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: a.map((l, y) => /* @__PURE__ */ e(St, { goalType: l, onClick: o }, y)) }),
|
|
484
481
|
/* @__PURE__ */ e(
|
|
485
|
-
|
|
482
|
+
Be,
|
|
486
483
|
{
|
|
487
|
-
accounts: p.filter((l) => !d.find((
|
|
484
|
+
accounts: p.filter((l) => !d.find((y) => y.account_guid === l.guid)),
|
|
488
485
|
isOpen: s,
|
|
489
486
|
onClose: () => h(!1),
|
|
490
487
|
onSave: b,
|
|
@@ -492,7 +489,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
492
489
|
}
|
|
493
490
|
)
|
|
494
491
|
] });
|
|
495
|
-
},
|
|
492
|
+
}, We = ({ account: t }) => {
|
|
496
493
|
const n = it(t);
|
|
497
494
|
return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
|
|
498
495
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
@@ -510,7 +507,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
510
507
|
}
|
|
511
508
|
)
|
|
512
509
|
] });
|
|
513
|
-
},
|
|
510
|
+
}, It = D(({ goal: t }) => {
|
|
514
511
|
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateGoal: _, updateRetirementGoal: i } = N(), [m, p] = T.useState(t.amount), s = !t.guid, h = m < 0 || m > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
|
|
515
512
|
const l = { ...t, amount: m };
|
|
516
513
|
t.amount = m, s ? d(l) : (t.track_type !== r.RETIREMENT_TRACK ? await _(l) : await i(l), u(n.alert_goal_updated_amount));
|
|
@@ -544,10 +541,10 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
544
541
|
)
|
|
545
542
|
}
|
|
546
543
|
);
|
|
547
|
-
}),
|
|
548
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = j(), { accounts: d, goals: _ } = x(), { config: i } = pe(), { setAlert: m, setSelectedGoal: p, updateGoal: s } = N(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: l, guid:
|
|
549
|
-
const
|
|
550
|
-
h ? p(
|
|
544
|
+
}), Gt = ({ goal: t }) => {
|
|
545
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = j(), { accounts: d, goals: _ } = x(), { config: i } = pe(), { setAlert: m, setSelectedGoal: p, updateGoal: s } = N(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: l, guid: y }) => {
|
|
546
|
+
const E = { ...t, account_guid: y, current_amount: l || 0 };
|
|
547
|
+
h ? p(E) : (await s(E), m(_.alert_account_changed)), o(!1);
|
|
551
548
|
};
|
|
552
549
|
return /* @__PURE__ */ c(f, { children: [
|
|
553
550
|
h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(L, { onClick: () => o(!0), children: [
|
|
@@ -558,15 +555,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
558
555
|
/* @__PURE__ */ e(z, { color: "primary" })
|
|
559
556
|
] }) }) : /* @__PURE__ */ c(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
560
557
|
/* @__PURE__ */ e(me, { onClick: () => o(!0), variant: "text", children: _.details_change_account }),
|
|
561
|
-
/* @__PURE__ */ e(
|
|
562
|
-
C,
|
|
563
|
-
{
|
|
564
|
-
color: "text.secondary",
|
|
565
|
-
sx: { textAlign: "center", whiteSpace: "wrap" },
|
|
566
|
-
variant: "subtitle1",
|
|
567
|
-
children: W(_.details_change_account_description, t.name)
|
|
568
|
-
}
|
|
569
|
-
)
|
|
558
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { textAlign: "center" }, variant: "subtitle1", children: B(_.details_change_account_description, t.name) })
|
|
570
559
|
] }),
|
|
571
560
|
/* @__PURE__ */ e(q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(f, { children: [
|
|
572
561
|
n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: d.account_types[1] }),
|
|
@@ -615,7 +604,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
615
604
|
)
|
|
616
605
|
] }) })
|
|
617
606
|
] });
|
|
618
|
-
},
|
|
607
|
+
}, Nt = D(({ goal: t }) => {
|
|
619
608
|
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateGoal: _ } = N(), [i, m] = T.useState(t.name), p = !t.guid, s = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
620
609
|
const o = { ...t, name: i };
|
|
621
610
|
t.name = i, p ? d(o) : (await _(o), u(n.alert_goal_updated_name));
|
|
@@ -646,7 +635,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
646
635
|
)
|
|
647
636
|
}
|
|
648
637
|
);
|
|
649
|
-
}),
|
|
638
|
+
}), kt = ({ goal: t }) => {
|
|
650
639
|
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateRetirementGoal: _ } = N(), [i, m] = T.useState(t.retirement_age || 65), p = !t.guid, s = async () => {
|
|
651
640
|
if (!isNaN(i)) {
|
|
652
641
|
const o = { ...t, retirement_age: i };
|
|
@@ -680,7 +669,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
680
669
|
)
|
|
681
670
|
}
|
|
682
671
|
);
|
|
683
|
-
},
|
|
672
|
+
}, wt = D(({ goal: t }) => {
|
|
684
673
|
const { goals: n } = x(), { user: u, updateUser: d } = Ge(), { setAlert: _ } = N(), [i, m] = T.useState(ee(u.birthday ?? 0)), [p, s] = T.useState(null), h = t.is_complete, a = async () => {
|
|
685
674
|
i && dt(i) && (await d({ ...u, birthday: lt(i) }), _(n.alert_goal_updated_birthday));
|
|
686
675
|
};
|
|
@@ -706,7 +695,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
706
695
|
) })
|
|
707
696
|
}
|
|
708
697
|
);
|
|
709
|
-
}),
|
|
698
|
+
}), Dt = ({ goal: t }) => {
|
|
710
699
|
const { goals: n } = x(), { visibleRetirementAccounts: u } = j(), {
|
|
711
700
|
addRetirementGoalAccount: d,
|
|
712
701
|
newRetirementGoalAccounts: _,
|
|
@@ -716,11 +705,11 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
716
705
|
setNewRetirementGoalAccounts: s,
|
|
717
706
|
setSelectedGoal: h
|
|
718
707
|
} = N(), [a, o] = T.useState(!1), b = !t.guid, l = u.filter(
|
|
719
|
-
(
|
|
720
|
-
),
|
|
721
|
-
(
|
|
722
|
-
),
|
|
723
|
-
const A =
|
|
708
|
+
(g) => b ? _.find((A) => A.account_guid === g.guid) : i.find((A) => A.account_guid === g.guid)
|
|
709
|
+
), y = u.filter(
|
|
710
|
+
(g) => !i.find((A) => A.account_guid === g.guid)
|
|
711
|
+
), E = async (g) => {
|
|
712
|
+
const A = g.map((R) => ({
|
|
724
713
|
account_guid: R.guid,
|
|
725
714
|
retirement_goal_guid: t.guid
|
|
726
715
|
}));
|
|
@@ -731,14 +720,14 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
731
720
|
await d(R), p(n.alert_account_added);
|
|
732
721
|
h({
|
|
733
722
|
...m,
|
|
734
|
-
current_amount:
|
|
723
|
+
current_amount: g.reduce((R, G) => R + (G.balance || 0), 0)
|
|
735
724
|
}), o(!1);
|
|
736
725
|
};
|
|
737
726
|
return /* @__PURE__ */ c(f, { children: [
|
|
738
|
-
l.map((
|
|
739
|
-
/* @__PURE__ */ e(
|
|
727
|
+
l.map((g) => /* @__PURE__ */ c(f, { children: [
|
|
728
|
+
/* @__PURE__ */ e(We, { account: g }),
|
|
740
729
|
/* @__PURE__ */ e(v, {})
|
|
741
|
-
] },
|
|
730
|
+
] }, g.guid)),
|
|
742
731
|
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(L, { onClick: () => o(!0), children: [
|
|
743
732
|
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
744
733
|
/* @__PURE__ */ e(Ie, { filled: !0 }),
|
|
@@ -747,17 +736,17 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
747
736
|
/* @__PURE__ */ e(z, { color: "primary" })
|
|
748
737
|
] }) }),
|
|
749
738
|
/* @__PURE__ */ e(
|
|
750
|
-
|
|
739
|
+
Be,
|
|
751
740
|
{
|
|
752
|
-
accounts:
|
|
741
|
+
accounts: y,
|
|
753
742
|
isOpen: a,
|
|
754
743
|
onClose: () => o(!1),
|
|
755
|
-
onSave:
|
|
744
|
+
onSave: E,
|
|
756
745
|
title: n.add_select_accounts
|
|
757
746
|
}
|
|
758
747
|
)
|
|
759
748
|
] });
|
|
760
|
-
},
|
|
749
|
+
}, Kt = D(({ goal: t }) => {
|
|
761
750
|
const { goals: n } = x(), { visibleAccounts: u } = j(), d = T.useMemo(
|
|
762
751
|
() => u.find((m) => m.guid === t.account_guid),
|
|
763
752
|
[u, t]
|
|
@@ -770,19 +759,19 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
770
759
|
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
|
|
771
760
|
] }),
|
|
772
761
|
/* @__PURE__ */ c(O, { sx: { bgcolor: "background.paper" }, children: [
|
|
773
|
-
_ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(
|
|
762
|
+
_ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(Nt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
774
763
|
w,
|
|
775
764
|
{
|
|
776
765
|
primary: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
777
766
|
/* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
|
|
778
767
|
/* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
|
|
779
768
|
] }),
|
|
780
|
-
|
|
769
|
+
slotProps: { primary: { variant: "body1" } }
|
|
781
770
|
}
|
|
782
771
|
) }),
|
|
783
772
|
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
784
773
|
(_ === r.SAVINGS_TRACK || _ === r.RETIREMENT_TRACK) && /* @__PURE__ */ c(F, { children: [
|
|
785
|
-
/* @__PURE__ */ e(
|
|
774
|
+
/* @__PURE__ */ e(It, { goal: t }),
|
|
786
775
|
/* @__PURE__ */ e(v, { sx: { ml: _ === r.RETIREMENT_TRACK ? 24 : 0 } })
|
|
787
776
|
] }),
|
|
788
777
|
t.track_type === r.DEBT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
@@ -794,24 +783,24 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
794
783
|
/* @__PURE__ */ e(v, { variant: "fullWidth" })
|
|
795
784
|
] }),
|
|
796
785
|
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
797
|
-
/* @__PURE__ */ e(
|
|
786
|
+
/* @__PURE__ */ e(kt, { goal: t }),
|
|
798
787
|
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
799
|
-
/* @__PURE__ */ e(
|
|
788
|
+
/* @__PURE__ */ e(wt, { goal: t }),
|
|
800
789
|
/* @__PURE__ */ e(v, { variant: "fullWidth" })
|
|
801
790
|
] })
|
|
802
791
|
] }),
|
|
803
792
|
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: t.track_type === r.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
|
804
793
|
t.track_type !== r.RETIREMENT_TRACK && d && /* @__PURE__ */ c(F, { children: [
|
|
805
|
-
/* @__PURE__ */ e(
|
|
794
|
+
/* @__PURE__ */ e(We, { account: d }),
|
|
806
795
|
/* @__PURE__ */ e(v, {})
|
|
807
796
|
] }),
|
|
808
797
|
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
809
|
-
/* @__PURE__ */ e(
|
|
798
|
+
/* @__PURE__ */ e(Dt, { goal: t }),
|
|
810
799
|
/* @__PURE__ */ e(v, {})
|
|
811
800
|
] }),
|
|
812
|
-
t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(
|
|
801
|
+
t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Gt, { goal: t })
|
|
813
802
|
] });
|
|
814
|
-
}),
|
|
803
|
+
}), Mt = D(({ onClose: t }) => {
|
|
815
804
|
const { visibleRetirementAccounts: n } = j(), { goals: u, common: d } = x(), {
|
|
816
805
|
addGoal: _,
|
|
817
806
|
addRetirementGoal: i,
|
|
@@ -823,30 +812,30 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
823
812
|
setAlert: o,
|
|
824
813
|
setSelectedGoal: b,
|
|
825
814
|
updateGoal: l
|
|
826
|
-
} = N(), { user:
|
|
827
|
-
const
|
|
828
|
-
return n.filter((V) =>
|
|
815
|
+
} = N(), { user: y } = Ge(), [E, g] = T.useState(!1), A = !a?.guid, R = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, G = T.useMemo(() => {
|
|
816
|
+
const S = A ? s : h;
|
|
817
|
+
return n.filter((V) => S.some((M) => M.account_guid === V.guid));
|
|
829
818
|
}, [A, n, s, h]), K = T.useMemo(() => {
|
|
830
819
|
if (!a) return !1;
|
|
831
820
|
if (!A && !R) return !0;
|
|
832
|
-
const { account_guid:
|
|
833
|
-
return V === r.SAVINGS_TRACK ?
|
|
834
|
-
}, [a, G,
|
|
835
|
-
let
|
|
836
|
-
A ? (H = () => ne(),
|
|
821
|
+
const { account_guid: S, track_type: V, name: M, amount: J, retirement_age: ie } = a;
|
|
822
|
+
return V === r.SAVINGS_TRACK ? S ? !!M && !!J : !1 : V === r.RETIREMENT_TRACK ? G.length ? !!M && !!J && !!ie && !!y.birthday : !1 : !0;
|
|
823
|
+
}, [a, G, y.birthday]);
|
|
824
|
+
let W = d.delete_button, H = () => g(!0);
|
|
825
|
+
A ? (H = () => ne(), W = d.save_button) : R && (H = () => ae(), W = u.mark_as_complete_button);
|
|
837
826
|
const ne = async () => {
|
|
838
827
|
if (a) {
|
|
839
|
-
const
|
|
840
|
-
|
|
828
|
+
const S = a.track_type;
|
|
829
|
+
S !== r.RETIREMENT_TRACK ? await _(a) : S === r.RETIREMENT_TRACK && await i({ ...a, target_amount: a.amount }), o(u.alert_goal_added), b(void 0), S && t?.(S);
|
|
841
830
|
}
|
|
842
831
|
}, oe = async () => {
|
|
843
832
|
a && (a.track_type !== r.RETIREMENT_TRACK ? await m(a.guid) : a.track_type === r.RETIREMENT_TRACK && await p(a), o(u.alert_goal_deleted), b(void 0));
|
|
844
833
|
}, ae = async () => {
|
|
845
|
-
const
|
|
834
|
+
const S = {
|
|
846
835
|
...a,
|
|
847
836
|
has_been_spent: !0
|
|
848
837
|
};
|
|
849
|
-
await l(
|
|
838
|
+
await l(S), o(u.alert_goal_completed), b(void 0);
|
|
850
839
|
};
|
|
851
840
|
return /* @__PURE__ */ c(f, { children: [
|
|
852
841
|
/* @__PURE__ */ e(
|
|
@@ -859,64 +848,64 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
859
848
|
onClose: () => b(void 0),
|
|
860
849
|
onPrimaryAction: H,
|
|
861
850
|
primaryColor: A || R ? "primary" : "error",
|
|
862
|
-
primaryText:
|
|
851
|
+
primaryText: W,
|
|
863
852
|
secondaryColor: "primary",
|
|
864
853
|
title: u.goal_details,
|
|
865
|
-
children: a && /* @__PURE__ */ e(
|
|
854
|
+
children: a && /* @__PURE__ */ e(Kt, { goal: a })
|
|
866
855
|
}
|
|
867
856
|
),
|
|
868
857
|
/* @__PURE__ */ e(
|
|
869
858
|
pt,
|
|
870
859
|
{
|
|
871
860
|
copy: { close_aria: d.close_aria, title: u.delete_goal },
|
|
872
|
-
isOpen:
|
|
861
|
+
isOpen: E,
|
|
873
862
|
maxWidth: "xs",
|
|
874
|
-
onClose: () =>
|
|
863
|
+
onClose: () => g(!1),
|
|
875
864
|
onPrimaryAction: oe,
|
|
876
865
|
primaryColor: "error",
|
|
877
866
|
primaryText: d.delete_button,
|
|
878
|
-
children: /* @__PURE__ */ e(C, {
|
|
867
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: B(u.delete_description, a?.name || "") })
|
|
879
868
|
}
|
|
880
869
|
)
|
|
881
870
|
] });
|
|
882
|
-
}),
|
|
871
|
+
}), Fn = D(({ onBackClick: t, onMenuClick: n, sx: u }) => {
|
|
883
872
|
const { onEvent: d } = Ne(), { isMobile: _ } = he(), { isAccountDataLoaded: i, loadAccountData: m } = j(), { isInitialized: p } = _e(), { goals: s, common: h } = x(), {
|
|
884
873
|
alert: a,
|
|
885
874
|
allGoals: o,
|
|
886
875
|
goals: b,
|
|
887
876
|
isAllGoalDataLoaded: l,
|
|
888
|
-
loadGoalData:
|
|
889
|
-
monthlyCashFlowProfile:
|
|
890
|
-
setAlert:
|
|
877
|
+
loadGoalData: y,
|
|
878
|
+
monthlyCashFlowProfile: E,
|
|
879
|
+
setAlert: g,
|
|
891
880
|
retirmentGoals: A
|
|
892
|
-
} = N(), [R, G] = T.useState(0), [K,
|
|
881
|
+
} = N(), [R, G] = T.useState(0), [K, W] = T.useState(!1), H = E?.amount_allocated_for_savings_goals || 0, ne = E?.amount_allocated_for_debt_goals || 0, oe = E?.amount_allocated_for_retirement_goals || 0;
|
|
893
882
|
Me({
|
|
894
883
|
widgetName: "GoalsWidget",
|
|
895
884
|
isLoaded: l
|
|
896
885
|
}), T.useEffect(() => {
|
|
897
886
|
i || m().finally(), d($.GOALS_VIEW);
|
|
898
887
|
}, []), T.useEffect(() => {
|
|
899
|
-
p &&
|
|
888
|
+
p && y().finally();
|
|
900
889
|
}, [p]);
|
|
901
890
|
const ae = () => {
|
|
902
891
|
d($.GOALS_CLICK_FILTER);
|
|
903
|
-
},
|
|
904
|
-
|
|
892
|
+
}, S = () => {
|
|
893
|
+
W(!0), d($.GOALS_CLICK_ADD);
|
|
905
894
|
}, V = (Q) => {
|
|
906
|
-
|
|
895
|
+
W(!1), Q === r.SAVINGS_TRACK ? G(0) : Q === r.DEBT_TRACK ? G(1) : Q === r.RETIREMENT_TRACK && G(2);
|
|
907
896
|
}, M = T.useMemo(
|
|
908
897
|
() => l && o.length === 0,
|
|
909
898
|
[b, l, A]
|
|
910
899
|
);
|
|
911
900
|
if (!p || !l)
|
|
912
901
|
return /* @__PURE__ */ e(Le, {});
|
|
913
|
-
const J =
|
|
902
|
+
const J = B(
|
|
914
903
|
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
915
904
|
I(H, "0,0")
|
|
916
|
-
), ie =
|
|
905
|
+
), ie = B(
|
|
917
906
|
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
918
907
|
I(ne, "0,0")
|
|
919
|
-
), Ve =
|
|
908
|
+
), Ve = B(
|
|
920
909
|
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
921
910
|
I(oe, "0,0")
|
|
922
911
|
);
|
|
@@ -927,7 +916,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
927
916
|
{
|
|
928
917
|
iconName: "add",
|
|
929
918
|
label: s.add_title,
|
|
930
|
-
onClick:
|
|
919
|
+
onClick: S
|
|
931
920
|
}
|
|
932
921
|
],
|
|
933
922
|
onAccountsFilterClick: ae,
|
|
@@ -975,7 +964,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
975
964
|
{
|
|
976
965
|
header: s.create_goals_header,
|
|
977
966
|
icon: "trophy",
|
|
978
|
-
onClick:
|
|
967
|
+
onClick: S,
|
|
979
968
|
primaryButton: s.add_goals_button,
|
|
980
969
|
subText: s.empty_state_subheader,
|
|
981
970
|
sx: {
|
|
@@ -986,42 +975,42 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
986
975
|
}
|
|
987
976
|
}
|
|
988
977
|
) : /* @__PURE__ */ c(F, { children: [
|
|
989
|
-
R === 0 && /* @__PURE__ */ e(ce, { onAddGoals:
|
|
990
|
-
R === 1 && /* @__PURE__ */ e(ce, { onAddGoals:
|
|
991
|
-
R === 2 && /* @__PURE__ */ e(ce, { onAddGoals:
|
|
978
|
+
R === 0 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.SAVINGS_TRACK }),
|
|
979
|
+
R === 1 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.DEBT_TRACK }),
|
|
980
|
+
R === 2 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.RETIREMENT_TRACK })
|
|
992
981
|
] })
|
|
993
982
|
] }),
|
|
994
|
-
/* @__PURE__ */ e(
|
|
983
|
+
/* @__PURE__ */ e(Mt, { onClose: V }),
|
|
995
984
|
/* @__PURE__ */ e(
|
|
996
985
|
q,
|
|
997
986
|
{
|
|
998
987
|
ariaLabelClose: h.close_aria,
|
|
999
988
|
isOpen: K,
|
|
1000
|
-
onClose: () =>
|
|
989
|
+
onClose: () => W(!1),
|
|
1001
990
|
title: s.add_goal_title,
|
|
1002
|
-
children: /* @__PURE__ */ e(
|
|
991
|
+
children: /* @__PURE__ */ e(vt, { onClose: V })
|
|
1003
992
|
}
|
|
1004
993
|
),
|
|
1005
|
-
/* @__PURE__ */ e(je, { onClose: () =>
|
|
994
|
+
/* @__PURE__ */ e(je, { onClose: () => g(""), open: !!a, children: /* @__PURE__ */ e(Pe, { onClose: () => g(""), severity: "success", variant: "filled", children: a }) })
|
|
1006
995
|
]
|
|
1007
996
|
}
|
|
1008
997
|
);
|
|
1009
|
-
}),
|
|
998
|
+
}), Lt = D(({ goal: t }) => {
|
|
1010
999
|
const { goals: n } = x(), u = gt(), {
|
|
1011
1000
|
backgroundColor: d,
|
|
1012
1001
|
color: _,
|
|
1013
1002
|
percentage: i,
|
|
1014
1003
|
projectedText: m
|
|
1015
1004
|
} = ue(n, t), p = Math.round(i * 100);
|
|
1016
|
-
let s = /* @__PURE__ */ e(
|
|
1017
|
-
return t.track_type === r.DEBT_TRACK ? s = /* @__PURE__ */ e(
|
|
1005
|
+
let s = /* @__PURE__ */ e(Ee, {});
|
|
1006
|
+
return t.track_type === r.DEBT_TRACK ? s = /* @__PURE__ */ e(Se, {}) : t.track_type === r.RETIREMENT_TRACK && (s = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
1018
1007
|
/* @__PURE__ */ e(te, { sx: { bgcolor: d, color: _, height: 32, width: 32 }, variant: "rounded", children: s }),
|
|
1019
|
-
/* @__PURE__ */ c(
|
|
1008
|
+
/* @__PURE__ */ c(ft, { sx: { width: "100%" }, children: [
|
|
1020
1009
|
/* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
1021
1010
|
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: m })
|
|
1022
1011
|
] }),
|
|
1023
1012
|
/* @__PURE__ */ e(
|
|
1024
|
-
|
|
1013
|
+
yt,
|
|
1025
1014
|
{
|
|
1026
1015
|
backgroundStrokeColor: u.palette.neutral.light,
|
|
1027
1016
|
color: u.palette.primary.main,
|
|
@@ -1032,7 +1021,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1032
1021
|
}
|
|
1033
1022
|
)
|
|
1034
1023
|
] });
|
|
1035
|
-
}),
|
|
1024
|
+
}), Ot = ({ header: t, subText: n, sx: u }) => /* @__PURE__ */ c(
|
|
1036
1025
|
f,
|
|
1037
1026
|
{
|
|
1038
1027
|
sx: {
|
|
@@ -1055,7 +1044,7 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1055
1044
|
)
|
|
1056
1045
|
]
|
|
1057
1046
|
}
|
|
1058
|
-
),
|
|
1047
|
+
), $n = D(({ onCTAClick: t }) => {
|
|
1059
1048
|
const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: d } = j(), { onEvent: _ } = Ne(), { goals: i } = x(), { isInitialized: m } = _e(), { ongoingGoalsForMicroWidget: p, isAllGoalDataLoaded: s, loadGoalData: h } = N();
|
|
1060
1049
|
Me({
|
|
1061
1050
|
widgetName: "GoalsMicroWidget",
|
|
@@ -1076,26 +1065,26 @@ const Ct = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1076
1065
|
), t();
|
|
1077
1066
|
};
|
|
1078
1067
|
return !m || !s ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
1079
|
-
|
|
1068
|
+
At,
|
|
1080
1069
|
{
|
|
1081
1070
|
className: "mx-goals-microwidget",
|
|
1082
1071
|
ctaLabel: a ? i.get_started : i.view_details,
|
|
1083
1072
|
onCTAClick: o,
|
|
1084
1073
|
title: i.title,
|
|
1085
1074
|
children: a ? /* @__PURE__ */ e(
|
|
1086
|
-
|
|
1075
|
+
Ot,
|
|
1087
1076
|
{
|
|
1088
1077
|
header: i.create_goals_header,
|
|
1089
1078
|
subText: i.micro_zero_state_description
|
|
1090
1079
|
}
|
|
1091
|
-
) : /* @__PURE__ */ e(
|
|
1092
|
-
/* @__PURE__ */ e(
|
|
1080
|
+
) : /* @__PURE__ */ e(f, { sx: { justifyContent: "space-between" }, children: p.map((b, l) => /* @__PURE__ */ c(T.Fragment, { children: [
|
|
1081
|
+
/* @__PURE__ */ e(Lt, { goal: b }),
|
|
1093
1082
|
l !== p.length - 1 && /* @__PURE__ */ e(v, {})
|
|
1094
1083
|
] }, b.guid)) })
|
|
1095
1084
|
}
|
|
1096
1085
|
);
|
|
1097
1086
|
});
|
|
1098
1087
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1088
|
+
$n as GoalsMicroWidget,
|
|
1089
|
+
Fn as GoalsWidget
|
|
1101
1090
|
};
|