@mx-cartographer/experiences 7.13.8 → 7.13.10
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 +11 -0
- package/dist/{CategorySelectorDrawer-gc41lfFZ.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +60 -53
- package/dist/{ManageIncome-XrztG-9d.mjs → ManageIncome--_KEPuCK.mjs} +1 -1
- package/dist/{RecurringSettings-O2PM8MWW.mjs → RecurringSettings-XPxxB0Wf.mjs} +1 -1
- package/dist/{TransactionDetails-CkQxd3Ao.mjs → TransactionDetails-B-C-7meW.mjs} +2 -2
- package/dist/accounts/index.es.js +1 -1
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +2 -2
- package/dist/categories/index.es.js +1 -1
- package/dist/finstrong/index.es.js +2 -2
- package/dist/goals/index.es.js +134 -128
- package/dist/recurringtransactions/index.es.js +5 -5
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/index.es.js +3 -3
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [7.13.10] - 03-30-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Casing of 'upcoming' copy in recurring transactions
|
|
4
|
+
- **FIXED** - Wrapping of longer goal names on goal status cards
|
|
5
|
+
- **FIXED** - Truncation of custom subcategory names
|
|
6
|
+
- **FIXED** - Wrapping of delete subcategory message
|
|
7
|
+
|
|
8
|
+
## [7.13.9] - 03-30-2026
|
|
9
|
+
|
|
10
|
+
- **UPDATED** - `AddMerchantBudgetAction` | Updated the condition to execute the transcation's setFilter only when the merchantBudgetDrawer is open
|
|
11
|
+
|
|
1
12
|
## [7.13.8] - 03-30-2026
|
|
2
13
|
|
|
3
14
|
- **FIXED** - Remove extra space in `AmericanUpcomingTaxDeadlineAlert` SVG
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as t, jsxs as _ } from "react/jsx-runtime";
|
|
2
2
|
import { observer as E } from "mobx-react-lite";
|
|
3
3
|
import p from "react";
|
|
4
|
-
import
|
|
5
|
-
import { G as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import $ from "@mui/material/Stack";
|
|
5
|
+
import { G as K, l as f, u as S, g as A, b as B } from "./hooks-BxkfR-Ff.mjs";
|
|
6
|
+
import U from "@mui/material/List";
|
|
7
|
+
import V from "@mui/material/Paper";
|
|
8
|
+
import Y from "@mui/material/Divider";
|
|
9
9
|
import x from "@mui/material/ListItem";
|
|
10
|
-
import
|
|
10
|
+
import W from "@mui/material/ListItemAvatar";
|
|
11
11
|
import N from "@mui/material/ListItemButton";
|
|
12
|
-
import
|
|
12
|
+
import F from "@mui/material/ListItemIcon";
|
|
13
13
|
import G from "@mui/material/ListItemText";
|
|
14
|
-
import { CheckCircle as
|
|
15
|
-
import { Text as
|
|
14
|
+
import { CheckCircle as M, Edit as j, Delete as X, ExpandMore as z } from "@mxenabled/mx-icons";
|
|
15
|
+
import { Text as q, TextField as H, CategoryIcon as J } from "@mxenabled/mxui";
|
|
16
16
|
import Q from "@mui/material/Collapse";
|
|
17
17
|
import Z from "@mui/material/DialogContent";
|
|
18
18
|
import { b as g } from "./Localization-CPkpIwIx.mjs";
|
|
19
19
|
import { D as ee } from "./Dialog-Ck34yr-d.mjs";
|
|
20
20
|
import te from "@mui/material/Box";
|
|
21
21
|
import oe from "@mui/material/Chip";
|
|
22
|
-
import
|
|
22
|
+
import v from "@mui/material/IconButton";
|
|
23
23
|
import { u as ae } from "./useAriaLive-MkYebyUR.mjs";
|
|
24
24
|
import { S as re } from "./SearchBox-CwDgvWVJ.mjs";
|
|
25
|
-
import { L as
|
|
25
|
+
import { L as k } from "./Loader-D3rjKx72.mjs";
|
|
26
26
|
import { D as ne } from "./Drawer-Bbe4AMB1.mjs";
|
|
27
27
|
const b = () => {
|
|
28
|
-
if (!p.useContext(
|
|
28
|
+
if (!p.useContext(K))
|
|
29
29
|
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
|
30
30
|
return f().uiStore;
|
|
31
31
|
}, C = {
|
|
@@ -62,7 +62,7 @@ const se = ({
|
|
|
62
62
|
case "delete":
|
|
63
63
|
d = r.delete_subcategory_heading, m = g(
|
|
64
64
|
r.all_transactions_in_this_subcategory,
|
|
65
|
-
/* @__PURE__ */ t(
|
|
65
|
+
/* @__PURE__ */ t(q, { bold: !0, component: "span", children: g(r.all_parent_category, h) })
|
|
66
66
|
);
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
@@ -80,7 +80,7 @@ const se = ({
|
|
|
80
80
|
onPrimaryAction: () => {
|
|
81
81
|
n(!1), o(a);
|
|
82
82
|
},
|
|
83
|
-
children: /* @__PURE__ */ t(Z, { children: u ?
|
|
83
|
+
children: /* @__PURE__ */ t(Z, { children: u ? m : /* @__PURE__ */ t(
|
|
84
84
|
H,
|
|
85
85
|
{
|
|
86
86
|
inputProps: {
|
|
@@ -179,7 +179,7 @@ const se = ({
|
|
|
179
179
|
showSelected: r,
|
|
180
180
|
unselectable: n,
|
|
181
181
|
unselectableText: d
|
|
182
|
-
} = b(), { categories: m } = S(), { onEvent: u } = A(), [h, y] = p.useState(!1), [D, O] = p.useState(!1), T = !!o.revision, w = o.guid === i, I = !n.some((
|
|
182
|
+
} = b(), { categories: m } = S(), { onEvent: u } = A(), [h, y] = p.useState(!1), [D, O] = p.useState(!1), T = !!o.revision, w = o.guid === i, I = !n.some((P) => P === o.guid);
|
|
183
183
|
return /* @__PURE__ */ _(
|
|
184
184
|
x,
|
|
185
185
|
{
|
|
@@ -196,43 +196,50 @@ const se = ({
|
|
|
196
196
|
onClick: () => {
|
|
197
197
|
I && (a(o.guid), l(o.guid), u(C.ON_CATEGORY_SELECTED));
|
|
198
198
|
},
|
|
199
|
-
sx: { height: 44 },
|
|
199
|
+
sx: { height: 44, minWidth: 0, overflow: "hidden" },
|
|
200
200
|
children: [
|
|
201
201
|
/* @__PURE__ */ t(
|
|
202
202
|
G,
|
|
203
203
|
{
|
|
204
204
|
primary: o.name,
|
|
205
|
-
primaryTypographyProps: { fontWeight: "normal", variant: "body1" }
|
|
205
|
+
primaryTypographyProps: { fontWeight: "normal", variant: "body1", noWrap: !0 }
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
|
-
r && w && /* @__PURE__ */ t(
|
|
208
|
+
r && w && /* @__PURE__ */ t(M, { fontSize: "small" }),
|
|
209
209
|
!I && /* @__PURE__ */ t(oe, { label: d })
|
|
210
210
|
]
|
|
211
211
|
}
|
|
212
212
|
),
|
|
213
|
-
T && /* @__PURE__ */ _(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
213
|
+
T && /* @__PURE__ */ _(
|
|
214
|
+
te,
|
|
215
|
+
{
|
|
216
|
+
className: "mx-cat-subcategory-edit-container",
|
|
217
|
+
sx: { marginRight: 24, flexShrink: 0 },
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ t(
|
|
220
|
+
v,
|
|
221
|
+
{
|
|
222
|
+
"aria-label": g(m.edit_subcategory_title, o.name),
|
|
223
|
+
onClick: () => {
|
|
224
|
+
y(!0), c(!0), u(C.ON_SUBCATEGORY_EDIT_CLICK);
|
|
225
|
+
},
|
|
226
|
+
children: /* @__PURE__ */ t(j, { color: "secondary" })
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ t(
|
|
230
|
+
v,
|
|
231
|
+
{
|
|
232
|
+
"aria-label": g(m.delete_subcategory_aria, o.name),
|
|
233
|
+
edge: "end",
|
|
234
|
+
onClick: () => {
|
|
235
|
+
O(!0), c(!0), u(C.ON_SUBCATEGORY_DELETE_CLICK);
|
|
236
|
+
},
|
|
237
|
+
children: /* @__PURE__ */ t(X, { color: "secondary" })
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
),
|
|
236
243
|
D && /* @__PURE__ */ t(
|
|
237
244
|
me,
|
|
238
245
|
{
|
|
@@ -267,7 +274,7 @@ const se = ({
|
|
|
267
274
|
children: [
|
|
268
275
|
a,
|
|
269
276
|
/* @__PURE__ */ _(
|
|
270
|
-
|
|
277
|
+
U,
|
|
271
278
|
{
|
|
272
279
|
"aria-labelledby": `category-${s.guid}`,
|
|
273
280
|
className: "mx-cat-subcategory-list",
|
|
@@ -282,7 +289,7 @@ const se = ({
|
|
|
282
289
|
subCategory: n
|
|
283
290
|
}
|
|
284
291
|
),
|
|
285
|
-
/* @__PURE__ */ t(
|
|
292
|
+
/* @__PURE__ */ t(Y, { "aria-hidden": "true", component: "li", sx: { ml: 58 } })
|
|
286
293
|
] }, n.guid)),
|
|
287
294
|
!r && /* @__PURE__ */ t(ce, { announce: i, parentCategory: s })
|
|
288
295
|
]
|
|
@@ -306,7 +313,7 @@ const se = ({
|
|
|
306
313
|
id: `category-${e.guid}`,
|
|
307
314
|
onClick: r,
|
|
308
315
|
children: [
|
|
309
|
-
/* @__PURE__ */ t(
|
|
316
|
+
/* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(J, { categoryGuid: e.guid }) }),
|
|
310
317
|
/* @__PURE__ */ t(
|
|
311
318
|
G,
|
|
312
319
|
{
|
|
@@ -314,8 +321,8 @@ const se = ({
|
|
|
314
321
|
primaryTypographyProps: { fontWeight: "normal", variant: "body1" }
|
|
315
322
|
}
|
|
316
323
|
),
|
|
317
|
-
/* @__PURE__ */ t(
|
|
318
|
-
|
|
324
|
+
/* @__PURE__ */ t(F, { children: /* @__PURE__ */ t(
|
|
325
|
+
z,
|
|
319
326
|
{
|
|
320
327
|
sx: {
|
|
321
328
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -327,7 +334,7 @@ const se = ({
|
|
|
327
334
|
},
|
|
328
335
|
e.guid
|
|
329
336
|
) }),
|
|
330
|
-
/* @__PURE__ */ t(
|
|
337
|
+
/* @__PURE__ */ t(Y, { "aria-hidden": "true", component: "li", sx: { ml: 58 } }),
|
|
331
338
|
/* @__PURE__ */ t("li", { style: { listStyle: "none" }, children: /* @__PURE__ */ t(pe, { categories: s, parentCategory: e }) })
|
|
332
339
|
] });
|
|
333
340
|
}, he = E(Ee), Se = () => {
|
|
@@ -348,7 +355,7 @@ const se = ({
|
|
|
348
355
|
}
|
|
349
356
|
return r;
|
|
350
357
|
}, []))(e, s);
|
|
351
|
-
return /* @__PURE__ */ t(
|
|
358
|
+
return /* @__PURE__ */ t(V, { className: "mx-cat-category-list", sx: { boxShadow: "none" }, children: /* @__PURE__ */ t(U, { children: i.map((a) => /* @__PURE__ */ t(
|
|
352
359
|
he,
|
|
353
360
|
{
|
|
354
361
|
category: a.category,
|
|
@@ -363,7 +370,7 @@ const se = ({
|
|
|
363
370
|
unselectable: l = [],
|
|
364
371
|
unselectableText: i = "Unselectable"
|
|
365
372
|
}) => {
|
|
366
|
-
const { categories: a, loadCategories: c } = f(), { common: r } = S(), { isCopyLoaded: n } =
|
|
373
|
+
const { categories: a, loadCategories: c } = f(), { common: r } = S(), { isCopyLoaded: n } = B(), {
|
|
367
374
|
searchValue: d,
|
|
368
375
|
setOnSelect: m,
|
|
369
376
|
setSearchValue: u,
|
|
@@ -378,7 +385,7 @@ const se = ({
|
|
|
378
385
|
a.length || c();
|
|
379
386
|
}, []), p.useEffect(() => {
|
|
380
387
|
e && h(e), y(o), D(l), O(i);
|
|
381
|
-
}, [e, o, l, i]), n ? /* @__PURE__ */ _(
|
|
388
|
+
}, [e, o, l, i]), n ? /* @__PURE__ */ _($, { className: "mx-cat-category-selector", sx: { width: "100%" }, children: [
|
|
382
389
|
/* @__PURE__ */ t(
|
|
383
390
|
re,
|
|
384
391
|
{
|
|
@@ -390,7 +397,7 @@ const se = ({
|
|
|
390
397
|
}
|
|
391
398
|
),
|
|
392
399
|
/* @__PURE__ */ t(ye, {})
|
|
393
|
-
] }) : /* @__PURE__ */ t(
|
|
400
|
+
] }) : /* @__PURE__ */ t(k, {});
|
|
394
401
|
}, De = E(be), fe = ({
|
|
395
402
|
id: e,
|
|
396
403
|
onClose: s,
|
|
@@ -398,7 +405,7 @@ const se = ({
|
|
|
398
405
|
showDrawer: l,
|
|
399
406
|
...i
|
|
400
407
|
}) => {
|
|
401
|
-
const { common: a } = S(), { isCopyLoaded: c } =
|
|
408
|
+
const { common: a } = S(), { isCopyLoaded: c } = B();
|
|
402
409
|
return c ? /* @__PURE__ */ t(
|
|
403
410
|
ne,
|
|
404
411
|
{
|
|
@@ -410,7 +417,7 @@ const se = ({
|
|
|
410
417
|
title: o,
|
|
411
418
|
children: /* @__PURE__ */ t(De, { ...i })
|
|
412
419
|
}
|
|
413
|
-
) : /* @__PURE__ */ t(
|
|
420
|
+
) : /* @__PURE__ */ t(k, {});
|
|
414
421
|
}, Je = E(fe);
|
|
415
422
|
export {
|
|
416
423
|
De as C,
|
|
@@ -18,7 +18,7 @@ import { parseISO as me } from "date-fns/parseISO";
|
|
|
18
18
|
import J from "@mui/material/Button";
|
|
19
19
|
import { Delete as pe, Add as ye, ReceiptLong as he } from "@mxenabled/mx-icons";
|
|
20
20
|
import { T as V, u as fe, S as ge, a as Ce } from "./StatusIndicator-CIKUOoN_.mjs";
|
|
21
|
-
import { T as be } from "./TransactionDetails-
|
|
21
|
+
import { T as be } from "./TransactionDetails-B-C-7meW.mjs";
|
|
22
22
|
import { addYears as j } from "date-fns/addYears";
|
|
23
23
|
import { getDayOfYear as xe } from "date-fns/getDayOfYear";
|
|
24
24
|
import { setDayOfYear as Se } from "date-fns/setDayOfYear";
|
|
@@ -7,7 +7,7 @@ import R from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
8
|
import b from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome--_KEPuCK.mjs";
|
|
11
11
|
import { u as _, i as A, g as f } from "./hooks-BxkfR-Ff.mjs";
|
|
12
12
|
import { R as y, F as N } from "./RecurringTransactions-BOzBqfdg.mjs";
|
|
13
13
|
import { A as m } from "./Analytics-BYItVAe-.mjs";
|
|
@@ -27,7 +27,7 @@ import $ from "@mui/material/ListItemText";
|
|
|
27
27
|
import { f as Me, D as ke } from "./DateFormats-BMpMrZpW.mjs";
|
|
28
28
|
import Y from "@mui/material/ListItemButton";
|
|
29
29
|
import z from "@mui/material/ListItemIcon";
|
|
30
|
-
import { a as Pe } from "./CategorySelectorDrawer-
|
|
30
|
+
import { a as Pe } from "./CategorySelectorDrawer-Dc9Widy9.mjs";
|
|
31
31
|
import { b as et, T as tt, u as J } from "./StatusIndicator-CIKUOoN_.mjs";
|
|
32
32
|
import { D as X } from "./Dialog-Ck34yr-d.mjs";
|
|
33
33
|
import { b as I } from "./Localization-CPkpIwIx.mjs";
|
|
@@ -276,7 +276,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
276
276
|
start: ot(new Date(t.date * 1e3)),
|
|
277
277
|
end: it(new Date(t.date * 1e3))
|
|
278
278
|
};
|
|
279
|
-
A({
|
|
279
|
+
ee && A({
|
|
280
280
|
accounts: T.map((G) => G.guid),
|
|
281
281
|
custom: ee ? (G) => G.merchant_guid === t.merchant_guid : (G) => G.guid === t.guid,
|
|
282
282
|
dateRange: M
|
|
@@ -56,7 +56,7 @@ import t3 from "@mui/material/Link";
|
|
|
56
56
|
import n3 from "@mui/material/Paper";
|
|
57
57
|
import { subDays as o3, startOfToday as i3, endOfToday as c3 } from "date-fns";
|
|
58
58
|
import { T as a3 } from "../StatusIndicator-CIKUOoN_.mjs";
|
|
59
|
-
import { T as s3 } from "../TransactionDetails-
|
|
59
|
+
import { T as s3 } from "../TransactionDetails-B-C-7meW.mjs";
|
|
60
60
|
import { T as r1 } from "../TabContentContainer-j01JYR_7.mjs";
|
|
61
61
|
import { f as d1 } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
62
62
|
import { C as l3 } from "../ConnectionsDrawer-IA7vnv1J.mjs";
|
package/dist/budgets/index.es.js
CHANGED
|
@@ -37,16 +37,16 @@ import Ee from "@mui/material/Tab";
|
|
|
37
37
|
import et from "@mui/material/Tabs";
|
|
38
38
|
import { e as tt } from "../exportTransactionsToCSV-CdTF_RqL.mjs";
|
|
39
39
|
import { T as Ae } from "../StatusIndicator-CIKUOoN_.mjs";
|
|
40
|
-
import { T as ot, c as nt } from "../TransactionDetails-
|
|
40
|
+
import { T as ot, c as nt } from "../TransactionDetails-B-C-7meW.mjs";
|
|
41
41
|
import ve from "@mui/material/Card";
|
|
42
42
|
import Te from "@mui/material/CardContent";
|
|
43
43
|
import { S as Be } from "../StatusBar-BK_uYHAB.mjs";
|
|
44
44
|
import { S as Pe } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
45
|
-
import { u as at, b as rt } from "../CategorySelectorDrawer-
|
|
45
|
+
import { u as at, b as rt } from "../CategorySelectorDrawer-Dc9Widy9.mjs";
|
|
46
46
|
import je from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as st } from "date-fns/subDays";
|
|
48
48
|
import it from "@mui/material/IconButton";
|
|
49
|
-
import { M as ct } from "../ManageIncome
|
|
49
|
+
import { M as ct } from "../ManageIncome--_KEPuCK.mjs";
|
|
50
50
|
import { u as ze } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
51
51
|
import { W as lt } from "../WidgetContainer-D_iaToWJ.mjs";
|
|
52
52
|
import { u as dt, g as ut, C as mt } from "../BudgetUtil-CLhRnCoX.mjs";
|
|
@@ -18,7 +18,7 @@ import { b as $ } from "../Localization-CPkpIwIx.mjs";
|
|
|
18
18
|
import { M as Je } from "../MiniWidgetContainer-xLWSV6Wz.mjs";
|
|
19
19
|
import { E as Ze } from "../EmptyState-DHAkGsjk.mjs";
|
|
20
20
|
import { u as Fe } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
21
|
-
import { R as et } from "../RecurringSettings-
|
|
21
|
+
import { R as et } from "../RecurringSettings-XPxxB0Wf.mjs";
|
|
22
22
|
import tt from "@mui/material/Tabs";
|
|
23
23
|
import Ce from "@mui/material/Tab";
|
|
24
24
|
import { getUnixTime as z } from "date-fns/getUnixTime";
|
|
@@ -36,7 +36,7 @@ import { alpha as it, keyframes as at } from "@mui/material/styles";
|
|
|
36
36
|
import { DataGridPro as rt } from "@mui/x-data-grid-pro";
|
|
37
37
|
import { T as _e } from "../TabContentContainer-j01JYR_7.mjs";
|
|
38
38
|
import G from "@mui/material/Button";
|
|
39
|
-
import { M as st, S as ct, i as lt, d as Se, c as dt } from "../ManageIncome
|
|
39
|
+
import { M as st, S as ct, i as lt, d as Se, c as dt } from "../ManageIncome--_KEPuCK.mjs";
|
|
40
40
|
import { D as Ge } from "../Drawer-Bbe4AMB1.mjs";
|
|
41
41
|
import { subDays as Me } from "date-fns/subDays";
|
|
42
42
|
import { endOfToday as mt } from "date-fns/endOfToday";
|
|
@@ -56,10 +56,10 @@ import { formatISO as oo } from "date-fns/formatISO";
|
|
|
56
56
|
import { fromUnixTime as ro } from "date-fns/fromUnixTime";
|
|
57
57
|
import { startOfToday as st } from "date-fns/startOfToday";
|
|
58
58
|
import { subDays as ao } from "date-fns/subDays";
|
|
59
|
-
import { c as io, d as ct, S as so, i as co } from "../ManageIncome
|
|
59
|
+
import { c as io, d as ct, S as so, i as co } from "../ManageIncome--_KEPuCK.mjs";
|
|
60
60
|
import { LocalizationProvider as lo, DatePicker as po, StaticDatePicker as _o } from "@mui/x-date-pickers";
|
|
61
61
|
import { AdapterDateFns as Ot } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
62
|
-
import { R as uo } from "../RecurringSettings-
|
|
62
|
+
import { R as uo } from "../RecurringSettings-XPxxB0Wf.mjs";
|
|
63
63
|
import { LocalizationProvider as ho } from "@mui/x-date-pickers/LocalizationProvider";
|
|
64
64
|
import { format as mo } from "date-fns/format";
|
|
65
65
|
import go from "@mui/lab/Timeline";
|
package/dist/goals/index.es.js
CHANGED
|
@@ -5,19 +5,19 @@ import T from "react";
|
|
|
5
5
|
import { observer as D } from "mobx-react-lite";
|
|
6
6
|
import Pe from "@mui/material/Alert";
|
|
7
7
|
import je from "@mui/material/Snackbar";
|
|
8
|
-
import
|
|
8
|
+
import y from "@mui/material/Stack";
|
|
9
9
|
import ie from "@mui/material/Tab";
|
|
10
10
|
import Fe from "@mui/material/Tabs";
|
|
11
11
|
import { Text as C, H3 as le, P as q, Icon as $e, InstitutionLogo as te, H2 as Te } from "@mxenabled/mxui";
|
|
12
12
|
import me from "@mui/material/Button";
|
|
13
13
|
import Ce from "@mui/material/Card";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
14
|
+
import xe from "@mui/material/CardActionArea";
|
|
15
|
+
import Re from "@mui/material/CardContent";
|
|
16
|
+
import fe from "@mui/material/Unstable_Grid2";
|
|
17
17
|
import oe from "@mui/material/Avatar";
|
|
18
18
|
import He from "@mui/material/CardHeader";
|
|
19
|
-
import { Payments as Se, NoteStack as Ee, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as V, Icon as
|
|
20
|
-
import { u as
|
|
19
|
+
import { Payments as Se, NoteStack as Ee, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as V, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
|
|
20
|
+
import { u as x, k as G, b as ue, a as _e, d as P, o as Ge, g as Ne } from "../hooks-BxkfR-Ff.mjs";
|
|
21
21
|
import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
22
22
|
import { f as I } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
23
23
|
import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
|
|
@@ -31,7 +31,7 @@ import k from "@mui/material/ListItem";
|
|
|
31
31
|
import z from "@mui/material/ListItemAvatar";
|
|
32
32
|
import M from "@mui/material/ListItemButton";
|
|
33
33
|
import w from "@mui/material/ListItemText";
|
|
34
|
-
import { b as
|
|
34
|
+
import { b as W } from "../Localization-CPkpIwIx.mjs";
|
|
35
35
|
import { f as he, D as be } from "../DateFormats-BMpMrZpW.mjs";
|
|
36
36
|
import { D as Q } from "../Drawer-Bbe4AMB1.mjs";
|
|
37
37
|
import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
|
|
@@ -55,11 +55,11 @@ import { W as _t } from "../WidgetContainer-D_iaToWJ.mjs";
|
|
|
55
55
|
import { E as pt } from "../EmptyState-DHAkGsjk.mjs";
|
|
56
56
|
import ht from "@mui/material/Stack/Stack";
|
|
57
57
|
import bt from "@mui/material/Box";
|
|
58
|
-
import
|
|
59
|
-
import { S as
|
|
58
|
+
import ft from "@mui/material/styles/useTheme";
|
|
59
|
+
import { S as yt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
60
60
|
import { M as gt } from "../MicroWidgetContainer-B_EnfvCq.mjs";
|
|
61
61
|
function re({ title: t, subtitle: n }) {
|
|
62
|
-
return /* @__PURE__ */ c(
|
|
62
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
63
63
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t }),
|
|
64
64
|
/* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "body1", children: n })
|
|
65
65
|
] });
|
|
@@ -69,7 +69,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
69
69
|
"$1$2$3"
|
|
70
70
|
) : I(t, "0,0.00"), Le = D(
|
|
71
71
|
({ goal: t, isInDrawer: n = !1, onClick: u }) => {
|
|
72
|
-
const { goals: l } =
|
|
72
|
+
const { goals: l } = x(), { isMobile: _, isTablet: i } = pe(), d = _ || i, {
|
|
73
73
|
backgroundColor: s,
|
|
74
74
|
color: p,
|
|
75
75
|
percentage: h,
|
|
@@ -92,7 +92,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
92
92
|
outlineColor: "primary.main"
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
|
-
children: /* @__PURE__ */ c(
|
|
95
|
+
children: /* @__PURE__ */ c(xe, { disabled: !u, onClick: u, children: [
|
|
96
96
|
/* @__PURE__ */ e(
|
|
97
97
|
He,
|
|
98
98
|
{
|
|
@@ -111,21 +111,27 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
111
111
|
)}`
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
+
sx: { alignItems: "flex-start", "& .MuiCardHeader-content": { minWidth: 0 } },
|
|
114
115
|
title: /* @__PURE__ */ e(
|
|
115
116
|
C,
|
|
116
117
|
{
|
|
117
118
|
color: "text.secondary",
|
|
118
119
|
fontWeight: 400,
|
|
119
|
-
sx: {
|
|
120
|
+
sx: {
|
|
121
|
+
fontSize: "15px",
|
|
122
|
+
lineHeight: "20px",
|
|
123
|
+
whiteSpace: "normal",
|
|
124
|
+
overflowWrap: "break-word"
|
|
125
|
+
},
|
|
120
126
|
variant: "h4",
|
|
121
127
|
children: t.name
|
|
122
128
|
}
|
|
123
129
|
)
|
|
124
130
|
}
|
|
125
131
|
),
|
|
126
|
-
/* @__PURE__ */ e(
|
|
132
|
+
/* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ c(y, { gap: 6, children: [
|
|
127
133
|
/* @__PURE__ */ e(Qe, { data: m, height: 24 }),
|
|
128
|
-
/* @__PURE__ */ c(
|
|
134
|
+
/* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
129
135
|
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: a }),
|
|
130
136
|
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: o })
|
|
131
137
|
] })
|
|
@@ -135,7 +141,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
135
141
|
);
|
|
136
142
|
}
|
|
137
143
|
), Tt = D(({ trackType: t }) => {
|
|
138
|
-
const { goals: n } =
|
|
144
|
+
const { goals: n } = x(), { setAlert: u, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: _ } = G(), i = T.useMemo(() => {
|
|
139
145
|
let a = 0;
|
|
140
146
|
return t === r.SAVINGS_TRACK ? a = l?.amount_allocated_for_savings_goals || 0 : t === r.DEBT_TRACK ? a = l?.amount_allocated_for_debt_goals || 0 : t === r.RETIREMENT_TRACK && (a = l?.amount_allocated_for_retirement_goals || 0), a;
|
|
141
147
|
}, [l]);
|
|
@@ -148,7 +154,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
148
154
|
t === r.SAVINGS_TRACK ? a.amount_allocated_for_savings_goals = d : t === r.DEBT_TRACK ? a.amount_allocated_for_debt_goals = d : t === r.RETIREMENT_TRACK && (a.amount_allocated_for_retirement_goals = d), await _(a), u(n.alert_contribution_updated);
|
|
149
155
|
}
|
|
150
156
|
};
|
|
151
|
-
return /* @__PURE__ */ e(
|
|
157
|
+
return /* @__PURE__ */ e(y, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
152
158
|
J,
|
|
153
159
|
{
|
|
154
160
|
isSaveDisabled: !d || isNaN(d),
|
|
@@ -172,7 +178,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
172
178
|
}
|
|
173
179
|
) });
|
|
174
180
|
}), Ct = ({ goal: t, index: n, onUpClick: u }) => {
|
|
175
|
-
const { goals: l } =
|
|
181
|
+
const { goals: l } = x(), { percentage: _ } = de(l, t), i = t.goal_type === ce.KEEP_BALANCE_BELOW || t.has_been_spent ? l.goal_completed : W(l.goal_percentage_reached, `${_ * 100}`);
|
|
176
182
|
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
177
183
|
M,
|
|
178
184
|
{
|
|
@@ -191,10 +197,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
191
197
|
children: t.track_type === r.SAVINGS_TRACK ? /* @__PURE__ */ e(Xe, { onClick: () => u?.(t), children: /* @__PURE__ */ e(Ue, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: n + 1 }) })
|
|
192
198
|
}
|
|
193
199
|
),
|
|
194
|
-
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(
|
|
195
|
-
/* @__PURE__ */ c(
|
|
200
|
+
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
201
|
+
/* @__PURE__ */ c(y, { sx: { maxWidth: "70%" }, children: [
|
|
196
202
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
197
|
-
/* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i :
|
|
203
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : W(
|
|
198
204
|
l.goal_projection,
|
|
199
205
|
he(
|
|
200
206
|
ne(t.projected_to_complete_at || 0),
|
|
@@ -207,8 +213,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
207
213
|
]
|
|
208
214
|
}
|
|
209
215
|
) });
|
|
210
|
-
},
|
|
211
|
-
const { goals: n } =
|
|
216
|
+
}, xt = ({ goal: t }) => {
|
|
217
|
+
const { goals: n } = x();
|
|
212
218
|
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
213
219
|
M,
|
|
214
220
|
{
|
|
@@ -216,10 +222,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
216
222
|
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
217
223
|
children: [
|
|
218
224
|
/* @__PURE__ */ e(z, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
|
|
219
|
-
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(
|
|
220
|
-
/* @__PURE__ */ c(
|
|
225
|
+
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
226
|
+
/* @__PURE__ */ c(y, { children: [
|
|
221
227
|
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
222
|
-
/* @__PURE__ */ e(C, { variant: "caption", children:
|
|
228
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: W(
|
|
223
229
|
n.completed_label,
|
|
224
230
|
he(
|
|
225
231
|
ne(t.completed_at || 0),
|
|
@@ -232,23 +238,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
232
238
|
]
|
|
233
239
|
}
|
|
234
240
|
) }, t.guid);
|
|
235
|
-
},
|
|
236
|
-
const { goals: n, common: u } =
|
|
237
|
-
(
|
|
241
|
+
}, Rt = ({ trackType: t }) => {
|
|
242
|
+
const { goals: n, common: u } = x(), { loadGoals: l, orderedGoals: _, reorderGoals: i } = G(), d = _.filter((f) => f.track_type === t), s = d.filter(
|
|
243
|
+
(f) => f.track_type === r.SAVINGS_TRACK && !f.has_been_spent || f.track_type !== r.SAVINGS_TRACK && !f.is_complete
|
|
238
244
|
), p = d.filter(
|
|
239
|
-
(
|
|
245
|
+
(f) => f.track_type === r.SAVINGS_TRACK && f.has_been_spent || f.track_type !== r.SAVINGS_TRACK && f.is_complete
|
|
240
246
|
), [h, a] = T.useState(!1);
|
|
241
247
|
let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, m = n.manage_saving_title, g = n.manage_saving_description;
|
|
242
248
|
t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, m = n.manage_debt_title, g = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (o = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, m = n.manage_retirement_title, g = n.manage_retirement_description);
|
|
243
|
-
const
|
|
244
|
-
const A = [...s], S = A.findIndex((K) => K.guid ===
|
|
249
|
+
const R = async (f) => {
|
|
250
|
+
const A = [...s], S = A.findIndex((K) => K.guid === f.guid);
|
|
245
251
|
let N = S - 1;
|
|
246
252
|
N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(S, 1)[0]);
|
|
247
253
|
for (let K = 0; K < A.length; K++)
|
|
248
254
|
A[K].position = K + 1;
|
|
249
255
|
await i(A), await l();
|
|
250
256
|
};
|
|
251
|
-
return /* @__PURE__ */ c(
|
|
257
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
252
258
|
/* @__PURE__ */ e(me, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => a(!0), children: o }),
|
|
253
259
|
/* @__PURE__ */ e(
|
|
254
260
|
Q,
|
|
@@ -257,28 +263,28 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
257
263
|
isOpen: h,
|
|
258
264
|
onClose: () => a(!1),
|
|
259
265
|
title: b,
|
|
260
|
-
children: /* @__PURE__ */ c(
|
|
261
|
-
/* @__PURE__ */ c(
|
|
266
|
+
children: /* @__PURE__ */ c(y, { children: [
|
|
267
|
+
/* @__PURE__ */ c(y, { m: 24, children: [
|
|
262
268
|
/* @__PURE__ */ e(le, { children: m }),
|
|
263
269
|
/* @__PURE__ */ e(q, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: g })
|
|
264
270
|
] }),
|
|
265
271
|
/* @__PURE__ */ e(Tt, { trackType: t }),
|
|
266
272
|
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
|
|
267
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((
|
|
273
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((f, A) => {
|
|
268
274
|
const S = A >= s.length - 1;
|
|
269
|
-
return /* @__PURE__ */ c(
|
|
270
|
-
/* @__PURE__ */ e(Ct, { goal:
|
|
275
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
276
|
+
/* @__PURE__ */ e(Ct, { goal: f, index: A, onUpClick: R }),
|
|
271
277
|
/* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
|
|
272
|
-
] }, `ongoing-${
|
|
278
|
+
] }, `ongoing-${f.guid}`);
|
|
273
279
|
}) }),
|
|
274
|
-
t !== r.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(
|
|
280
|
+
t !== r.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(y, { children: [
|
|
275
281
|
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
|
|
276
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((
|
|
282
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((f, A) => {
|
|
277
283
|
const S = A > s.length - 1;
|
|
278
|
-
return /* @__PURE__ */ c(
|
|
279
|
-
/* @__PURE__ */ e(
|
|
284
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
285
|
+
/* @__PURE__ */ e(xt, { goal: f }),
|
|
280
286
|
/* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
|
|
281
|
-
] }, `complete-${
|
|
287
|
+
] }, `complete-${f.guid}`);
|
|
282
288
|
}) })
|
|
283
289
|
] })
|
|
284
290
|
] })
|
|
@@ -286,23 +292,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
286
292
|
)
|
|
287
293
|
] });
|
|
288
294
|
}, se = D(({ trackType: t, onAddGoals: n }) => {
|
|
289
|
-
const { isMobile: u } = pe(), { goals: l } =
|
|
295
|
+
const { isMobile: u } = pe(), { goals: l } = x(), { selectedAccountGuids: _ } = ue(), { orderedGoals: i, setSelectedGoal: d } = G(), s = i.filter(
|
|
290
296
|
(o) => o.track_type === t && (o.track_type !== r.RETIREMENT_TRACK && _.includes(o.account_guid) || o.track_type === r.RETIREMENT_TRACK)
|
|
291
297
|
), p = s.filter(
|
|
292
298
|
(o) => o.track_type === r.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && !o.is_complete
|
|
293
299
|
), h = s.filter(
|
|
294
300
|
(o) => o.track_type === r.SAVINGS_TRACK && o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && o.is_complete
|
|
295
301
|
), a = t === r.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
|
|
296
|
-
return /* @__PURE__ */ c(
|
|
297
|
-
/* @__PURE__ */ c(
|
|
302
|
+
return /* @__PURE__ */ c(y, { mt: 16, mx: u ? 24 : 0, children: [
|
|
303
|
+
/* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
298
304
|
/* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.ongoing_title }),
|
|
299
|
-
/* @__PURE__ */ e(
|
|
305
|
+
/* @__PURE__ */ e(Rt, { trackType: t })
|
|
300
306
|
] }),
|
|
301
|
-
p.length > 0 ? /* @__PURE__ */ e(
|
|
307
|
+
p.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: p.map((o, b, m) => (
|
|
302
308
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
303
|
-
/* @__PURE__ */ e(
|
|
309
|
+
/* @__PURE__ */ e(fe, { xs: u || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => d(o) }, o.guid) }, b)
|
|
304
310
|
)) }) : /* @__PURE__ */ c(
|
|
305
|
-
|
|
311
|
+
y,
|
|
306
312
|
{
|
|
307
313
|
alignItems: "center",
|
|
308
314
|
bgcolor: "background.default",
|
|
@@ -329,9 +335,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
329
335
|
]
|
|
330
336
|
}
|
|
331
337
|
),
|
|
332
|
-
t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(
|
|
338
|
+
t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(y, { gap: 16, mt: 48, children: [
|
|
333
339
|
/* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.complete_title }),
|
|
334
|
-
h.length === 0 && /* @__PURE__ */ e(
|
|
340
|
+
h.length === 0 && /* @__PURE__ */ e(y, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
|
|
335
341
|
q,
|
|
336
342
|
{
|
|
337
343
|
sx: (o) => ({
|
|
@@ -345,8 +351,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
345
351
|
children: a
|
|
346
352
|
}
|
|
347
353
|
) }),
|
|
348
|
-
h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(
|
|
349
|
-
/* @__PURE__ */ c(
|
|
354
|
+
h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(xe, { onClick: () => d(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
355
|
+
/* @__PURE__ */ c(y, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
350
356
|
/* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
|
|
351
357
|
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "body1", children: o.name })
|
|
352
358
|
] }),
|
|
@@ -355,8 +361,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
355
361
|
] })
|
|
356
362
|
] });
|
|
357
363
|
}), St = ({ goalType: t, onClick: n }) => {
|
|
358
|
-
const { goals: u } =
|
|
359
|
-
return /* @__PURE__ */ e(
|
|
364
|
+
const { goals: u } = x(), { bgcolor: l, icon: _, label: i, description: d, subTypes: s, type: p } = t, [h, a] = T.useState(!1), o = s.length > 0;
|
|
365
|
+
return /* @__PURE__ */ e(y, { children: /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
360
366
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
361
367
|
M,
|
|
362
368
|
{
|
|
@@ -366,7 +372,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
366
372
|
p
|
|
367
373
|
),
|
|
368
374
|
children: [
|
|
369
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
375
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: _, sx: { color: "grey.900" } }) }) }),
|
|
370
376
|
/* @__PURE__ */ e(w, { primary: i, secondary: d, sx: { mr: 24 } }),
|
|
371
377
|
!o && /* @__PURE__ */ e(V, {}),
|
|
372
378
|
o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
|
|
@@ -375,7 +381,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
375
381
|
) }),
|
|
376
382
|
/* @__PURE__ */ e(v, { variant: "inset" }),
|
|
377
383
|
o && /* @__PURE__ */ e(et, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((b, m) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(M, { onClick: () => n(b.label, b.metaType, p), children: [
|
|
378
|
-
/* @__PURE__ */ e(tt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(
|
|
384
|
+
/* @__PURE__ */ e(tt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: b.icon }) }),
|
|
379
385
|
/* @__PURE__ */ e(
|
|
380
386
|
w,
|
|
381
387
|
{
|
|
@@ -393,7 +399,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
393
399
|
onSave: l,
|
|
394
400
|
title: _
|
|
395
401
|
}) => {
|
|
396
|
-
const { goals: i, common: d } =
|
|
402
|
+
const { goals: i, common: d } = x(), { config: s } = _e(), [p, h] = T.useState([]), a = (o) => {
|
|
397
403
|
const b = p.findIndex((g) => g.guid === o.guid), m = [...p];
|
|
398
404
|
b >= 0 ? m.splice(b, 1) : m.push(o), h(m);
|
|
399
405
|
};
|
|
@@ -443,27 +449,27 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
443
449
|
}
|
|
444
450
|
);
|
|
445
451
|
}, Et = ({ onClose: t }) => {
|
|
446
|
-
const { goals: n } =
|
|
447
|
-
|
|
452
|
+
const { goals: n } = x(), { addGoal: u, debtGoals: l, setAlert: _, setSelectedGoal: i } = G(), { config: d } = _e(), { visibleDebtAccounts: s } = P(), [p, h] = T.useState(!1), a = ze(n), o = (m, g, R) => {
|
|
453
|
+
R === r.DEBT_TRACK ? h(!0) : i({
|
|
448
454
|
amount: 0,
|
|
449
455
|
current_amount: 0,
|
|
450
456
|
goal_type: ce.SAVE_AMOUNT,
|
|
451
457
|
initial_amount: 0,
|
|
452
458
|
meta_type: g,
|
|
453
459
|
name: m,
|
|
454
|
-
track_type:
|
|
460
|
+
track_type: R
|
|
455
461
|
});
|
|
456
462
|
}, b = async (m) => {
|
|
457
463
|
for (const g of m) {
|
|
458
|
-
let
|
|
459
|
-
g.account_type === ge.LOAN ?
|
|
464
|
+
let R = Z.CREDIT_CARD;
|
|
465
|
+
g.account_type === ge.LOAN ? R = Z.LOANS : g.account_type === ge.LINE_OF_CREDIT && (R = Z.LINE_OF_CREDIT), await u({
|
|
460
466
|
account_guid: g.guid,
|
|
461
467
|
amount: 0,
|
|
462
468
|
current_amount: 0,
|
|
463
469
|
goal_type: ce.KEEP_BALANCE_BELOW,
|
|
464
470
|
initial_amount: g.balance || 0,
|
|
465
471
|
interest_rate: g.interest_rate || 0,
|
|
466
|
-
meta_type:
|
|
472
|
+
meta_type: R,
|
|
467
473
|
monthly_payment: g.minimum_payment || 0,
|
|
468
474
|
name: we(g, {
|
|
469
475
|
allowNickname: d?.show_account_nicknames_in_master
|
|
@@ -473,7 +479,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
473
479
|
}
|
|
474
480
|
h(!1), t?.(r.DEBT_TRACK);
|
|
475
481
|
};
|
|
476
|
-
return /* @__PURE__ */ c(
|
|
482
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
477
483
|
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: a.map((m, g) => /* @__PURE__ */ e(St, { goalType: m, onClick: o }, g)) }),
|
|
478
484
|
/* @__PURE__ */ e(
|
|
479
485
|
Oe,
|
|
@@ -486,7 +492,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
486
492
|
}
|
|
487
493
|
)
|
|
488
494
|
] });
|
|
489
|
-
},
|
|
495
|
+
}, We = ({ account: t }) => {
|
|
490
496
|
const n = ot(t);
|
|
491
497
|
return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
|
|
492
498
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
|
|
@@ -505,7 +511,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
505
511
|
)
|
|
506
512
|
] });
|
|
507
513
|
}, vt = D(({ goal: t }) => {
|
|
508
|
-
const { goals: n } =
|
|
514
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateGoal: _, updateRetirementGoal: i } = G(), [d, s] = T.useState(t.amount), p = !t.guid, h = d < 0 || d > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
|
|
509
515
|
const m = { ...t, amount: d };
|
|
510
516
|
t.amount = d, p ? l(m) : (t.track_type !== r.RETIREMENT_TRACK ? await _(m) : await i(m), u(n.alert_goal_updated_amount));
|
|
511
517
|
}, b = () => {
|
|
@@ -539,18 +545,18 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
539
545
|
}
|
|
540
546
|
);
|
|
541
547
|
}), It = ({ goal: t }) => {
|
|
542
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = P(), { accounts: l, goals: _ } =
|
|
543
|
-
const
|
|
544
|
-
h ? s(
|
|
548
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = P(), { accounts: l, goals: _ } = x(), { config: i } = _e(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: m, guid: g }) => {
|
|
549
|
+
const R = { ...t, account_guid: g, current_amount: m || 0 };
|
|
550
|
+
h ? s(R) : (await p(R), d(_.alert_account_changed)), o(!1);
|
|
545
551
|
};
|
|
546
|
-
return /* @__PURE__ */ c(
|
|
552
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
547
553
|
h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
|
|
548
|
-
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(
|
|
554
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(y, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
549
555
|
/* @__PURE__ */ e(Ie, { filled: !0 }),
|
|
550
556
|
_.details_add_account
|
|
551
557
|
] }) }),
|
|
552
558
|
/* @__PURE__ */ e(V, { color: "primary" })
|
|
553
|
-
] }) }) : /* @__PURE__ */ c(
|
|
559
|
+
] }) }) : /* @__PURE__ */ c(y, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
554
560
|
/* @__PURE__ */ e(me, { onClick: () => o(!0), variant: "text", children: _.details_change_account }),
|
|
555
561
|
/* @__PURE__ */ e(
|
|
556
562
|
C,
|
|
@@ -558,11 +564,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
558
564
|
color: "text.secondary",
|
|
559
565
|
sx: { textAlign: "center", whiteSpace: "wrap" },
|
|
560
566
|
variant: "subtitle1",
|
|
561
|
-
children:
|
|
567
|
+
children: W(_.details_change_account_description, t.name)
|
|
562
568
|
}
|
|
563
569
|
)
|
|
564
570
|
] }),
|
|
565
|
-
/* @__PURE__ */ e(Q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(
|
|
571
|
+
/* @__PURE__ */ e(Q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(y, { children: [
|
|
566
572
|
n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[1] }),
|
|
567
573
|
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
|
|
568
574
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
|
|
@@ -610,7 +616,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
610
616
|
] }) })
|
|
611
617
|
] });
|
|
612
618
|
}, Gt = D(({ goal: t }) => {
|
|
613
|
-
const { goals: n } =
|
|
619
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateGoal: _ } = G(), [i, d] = T.useState(t.name), s = !t.guid, p = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
614
620
|
const o = { ...t, name: i };
|
|
615
621
|
t.name = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_name));
|
|
616
622
|
}, a = () => {
|
|
@@ -641,7 +647,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
641
647
|
}
|
|
642
648
|
);
|
|
643
649
|
}), Nt = ({ goal: t }) => {
|
|
644
|
-
const { goals: n } =
|
|
650
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateRetirementGoal: _ } = G(), [i, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
|
|
645
651
|
if (!isNaN(i)) {
|
|
646
652
|
const o = { ...t, retirement_age: i };
|
|
647
653
|
t.retirement_age = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_retirement_age));
|
|
@@ -675,7 +681,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
675
681
|
}
|
|
676
682
|
);
|
|
677
683
|
}, kt = D(({ goal: t }) => {
|
|
678
|
-
const { goals: n } =
|
|
684
|
+
const { goals: n } = x(), { user: u, updateUser: l } = Ge(), { setAlert: _ } = G(), [i, d] = T.useState(ne(u.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, a = async () => {
|
|
679
685
|
i && ct(i) && (await l({ ...u, birthday: st(i) }), _(n.alert_goal_updated_birthday));
|
|
680
686
|
};
|
|
681
687
|
return /* @__PURE__ */ e(
|
|
@@ -701,7 +707,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
701
707
|
}
|
|
702
708
|
);
|
|
703
709
|
}), wt = ({ goal: t }) => {
|
|
704
|
-
const { goals: n } =
|
|
710
|
+
const { goals: n } = x(), { visibleRetirementAccounts: u } = P(), {
|
|
705
711
|
addRetirementGoalAccount: l,
|
|
706
712
|
newRetirementGoalAccounts: _,
|
|
707
713
|
retirementGoalAccounts: i,
|
|
@@ -710,11 +716,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
710
716
|
setNewRetirementGoalAccounts: p,
|
|
711
717
|
setSelectedGoal: h
|
|
712
718
|
} = G(), [a, o] = T.useState(!1), b = !t.guid, m = u.filter(
|
|
713
|
-
(
|
|
719
|
+
(f) => b ? _.find((A) => A.account_guid === f.guid) : i.find((A) => A.account_guid === f.guid)
|
|
714
720
|
), g = u.filter(
|
|
715
|
-
(
|
|
716
|
-
),
|
|
717
|
-
const A =
|
|
721
|
+
(f) => !i.find((A) => A.account_guid === f.guid)
|
|
722
|
+
), R = async (f) => {
|
|
723
|
+
const A = f.map((S) => ({
|
|
718
724
|
account_guid: S.guid,
|
|
719
725
|
retirement_goal_guid: t.guid
|
|
720
726
|
}));
|
|
@@ -725,16 +731,16 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
725
731
|
await l(S), s(n.alert_account_added);
|
|
726
732
|
h({
|
|
727
733
|
...d,
|
|
728
|
-
current_amount:
|
|
734
|
+
current_amount: f.reduce((S, N) => S + (N.balance || 0), 0)
|
|
729
735
|
}), o(!1);
|
|
730
736
|
};
|
|
731
|
-
return /* @__PURE__ */ c(
|
|
732
|
-
m.map((
|
|
733
|
-
/* @__PURE__ */ e(
|
|
737
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
738
|
+
m.map((f) => /* @__PURE__ */ c(y, { children: [
|
|
739
|
+
/* @__PURE__ */ e(We, { account: f }),
|
|
734
740
|
/* @__PURE__ */ e(v, {})
|
|
735
|
-
] },
|
|
741
|
+
] }, f.guid)),
|
|
736
742
|
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
|
|
737
|
-
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(
|
|
743
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(y, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
738
744
|
/* @__PURE__ */ e(Ie, { filled: !0 }),
|
|
739
745
|
n.details_add_account
|
|
740
746
|
] }) }),
|
|
@@ -746,19 +752,19 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
746
752
|
accounts: g,
|
|
747
753
|
isOpen: a,
|
|
748
754
|
onClose: () => o(!1),
|
|
749
|
-
onSave:
|
|
755
|
+
onSave: R,
|
|
750
756
|
title: n.add_select_accounts
|
|
751
757
|
}
|
|
752
758
|
)
|
|
753
759
|
] });
|
|
754
760
|
}, Dt = D(({ goal: t }) => {
|
|
755
|
-
const { goals: n } =
|
|
761
|
+
const { goals: n } = x(), { visibleAccounts: u } = P(), l = T.useMemo(
|
|
756
762
|
() => u.find((d) => d.guid === t.account_guid),
|
|
757
763
|
[u, t]
|
|
758
764
|
), _ = t.track_type;
|
|
759
765
|
let i = n.details_save_title;
|
|
760
|
-
return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(
|
|
761
|
-
/* @__PURE__ */ c(
|
|
766
|
+
return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(y, { children: [
|
|
767
|
+
/* @__PURE__ */ c(y, { mx: 24, children: [
|
|
762
768
|
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: i }),
|
|
763
769
|
/* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
|
|
764
770
|
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
|
|
@@ -767,7 +773,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
767
773
|
_ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
768
774
|
w,
|
|
769
775
|
{
|
|
770
|
-
primary: /* @__PURE__ */ c(
|
|
776
|
+
primary: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
771
777
|
/* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
|
|
772
778
|
/* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
|
|
773
779
|
] }),
|
|
@@ -796,7 +802,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
796
802
|
] }),
|
|
797
803
|
/* @__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 }),
|
|
798
804
|
t.track_type !== r.RETIREMENT_TRACK && l && /* @__PURE__ */ c($, { children: [
|
|
799
|
-
/* @__PURE__ */ e(
|
|
805
|
+
/* @__PURE__ */ e(We, { account: l }),
|
|
800
806
|
/* @__PURE__ */ e(v, {})
|
|
801
807
|
] }),
|
|
802
808
|
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
|
|
@@ -806,7 +812,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
806
812
|
t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
|
|
807
813
|
] });
|
|
808
814
|
}), Kt = D(({ onClose: t }) => {
|
|
809
|
-
const { visibleRetirementAccounts: n } = P(), { goals: u, common: l } =
|
|
815
|
+
const { visibleRetirementAccounts: n } = P(), { goals: u, common: l } = x(), {
|
|
810
816
|
addGoal: _,
|
|
811
817
|
addRetirementGoal: i,
|
|
812
818
|
deleteGoal: d,
|
|
@@ -817,7 +823,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
817
823
|
setAlert: o,
|
|
818
824
|
setSelectedGoal: b,
|
|
819
825
|
updateGoal: m
|
|
820
|
-
} = G(), { user: g } = Ge(), [
|
|
826
|
+
} = G(), { user: g } = Ge(), [R, f] = T.useState(!1), A = !a?.guid, S = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, N = T.useMemo(() => {
|
|
821
827
|
const E = A ? p : h;
|
|
822
828
|
return n.filter((j) => E.some((F) => F.account_guid === j.guid));
|
|
823
829
|
}, [A, n, p, h]), K = T.useMemo(() => {
|
|
@@ -826,14 +832,14 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
826
832
|
const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: O } = a;
|
|
827
833
|
return j === r.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === r.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!O && !!g.birthday : !1 : !0;
|
|
828
834
|
}, [a, N, g.birthday]);
|
|
829
|
-
let U = l.delete_button, Y = () =>
|
|
835
|
+
let U = l.delete_button, Y = () => f(!0);
|
|
830
836
|
A ? (Y = () => ae(), U = l.save_button) : S && (Y = () => X(), U = u.mark_as_complete_button);
|
|
831
837
|
const ae = async () => {
|
|
832
838
|
if (a) {
|
|
833
839
|
const E = a.track_type;
|
|
834
840
|
E !== r.RETIREMENT_TRACK ? await _(a) : E === r.RETIREMENT_TRACK && await i({ ...a, target_amount: a.amount }), o(u.alert_goal_added), b(void 0), E && t?.(E);
|
|
835
841
|
}
|
|
836
|
-
},
|
|
842
|
+
}, B = async () => {
|
|
837
843
|
a && (a.track_type !== r.RETIREMENT_TRACK ? await d(a.guid) : a.track_type === r.RETIREMENT_TRACK && await s(a), o(u.alert_goal_deleted), b(void 0));
|
|
838
844
|
}, X = async () => {
|
|
839
845
|
const E = {
|
|
@@ -842,7 +848,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
842
848
|
};
|
|
843
849
|
await m(E), o(u.alert_goal_completed), b(void 0);
|
|
844
850
|
};
|
|
845
|
-
return /* @__PURE__ */ c(
|
|
851
|
+
return /* @__PURE__ */ c(y, { children: [
|
|
846
852
|
/* @__PURE__ */ e(
|
|
847
853
|
Q,
|
|
848
854
|
{
|
|
@@ -863,26 +869,26 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
863
869
|
ut,
|
|
864
870
|
{
|
|
865
871
|
copy: { close_aria: l.close_aria, title: u.delete_goal },
|
|
866
|
-
isOpen:
|
|
872
|
+
isOpen: R,
|
|
867
873
|
maxWidth: "xs",
|
|
868
|
-
onClose: () =>
|
|
869
|
-
onPrimaryAction:
|
|
874
|
+
onClose: () => f(!1),
|
|
875
|
+
onPrimaryAction: B,
|
|
870
876
|
primaryColor: "error",
|
|
871
877
|
primaryText: l.delete_button,
|
|
872
|
-
children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "subtitle1", children:
|
|
878
|
+
children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "subtitle1", children: W(u.delete_description, a?.name || "") })
|
|
873
879
|
}
|
|
874
880
|
)
|
|
875
881
|
] });
|
|
876
882
|
}), jn = D(({ onBackClick: t, sx: n }) => {
|
|
877
|
-
const { onEvent: u } = Ne(), { isMobile: l } = pe(), { isAccountDataLoaded: _, loadAccountData: i } = P(), { isInitialized: d } = ue(), { goals: s, common: p } =
|
|
883
|
+
const { onEvent: u } = Ne(), { isMobile: l } = pe(), { isAccountDataLoaded: _, loadAccountData: i } = P(), { isInitialized: d } = ue(), { goals: s, common: p } = x(), {
|
|
878
884
|
alert: h,
|
|
879
885
|
goals: a,
|
|
880
886
|
isAllGoalDataLoaded: o,
|
|
881
887
|
loadGoalData: b,
|
|
882
888
|
monthlyCashFlowProfile: m,
|
|
883
889
|
setAlert: g,
|
|
884
|
-
retirmentGoals:
|
|
885
|
-
} = G(), [
|
|
890
|
+
retirmentGoals: R
|
|
891
|
+
} = G(), [f, A] = T.useState(0), [S, N] = T.useState(!1), K = m?.amount_allocated_for_savings_goals || 0, U = m?.amount_allocated_for_debt_goals || 0, Y = m?.amount_allocated_for_retirement_goals || 0;
|
|
886
892
|
Ke({
|
|
887
893
|
widgetName: "GoalsWidget",
|
|
888
894
|
isLoaded: o
|
|
@@ -893,23 +899,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
893
899
|
}, [d]);
|
|
894
900
|
const ae = () => {
|
|
895
901
|
u(H.GOALS_CLICK_FILTER);
|
|
896
|
-
},
|
|
902
|
+
}, B = () => {
|
|
897
903
|
N(!0), u(H.GOALS_CLICK_ADD);
|
|
898
904
|
}, X = (O) => {
|
|
899
905
|
N(!1), O === r.SAVINGS_TRACK ? A(0) : O === r.DEBT_TRACK ? A(1) : O === r.RETIREMENT_TRACK && A(2);
|
|
900
906
|
}, E = T.useMemo(
|
|
901
|
-
() => o && (a.length === 0 || a.every(({ track_type: O }) => !O) &&
|
|
902
|
-
[a, o,
|
|
907
|
+
() => o && (a.length === 0 || a.every(({ track_type: O }) => !O) && R.length === 0),
|
|
908
|
+
[a, o, R]
|
|
903
909
|
);
|
|
904
910
|
if (!d || !o)
|
|
905
911
|
return /* @__PURE__ */ e(Me, {});
|
|
906
|
-
const j =
|
|
912
|
+
const j = W(
|
|
907
913
|
l ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
908
914
|
I(K, "0,0")
|
|
909
|
-
), F =
|
|
915
|
+
), F = W(
|
|
910
916
|
l ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
911
917
|
I(U, "0,0")
|
|
912
|
-
), ee =
|
|
918
|
+
), ee = W(
|
|
913
919
|
l ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
914
920
|
I(Y, "0,0")
|
|
915
921
|
);
|
|
@@ -920,7 +926,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
920
926
|
{
|
|
921
927
|
iconName: "add",
|
|
922
928
|
label: s.add_title,
|
|
923
|
-
onClick:
|
|
929
|
+
onClick: B
|
|
924
930
|
}
|
|
925
931
|
],
|
|
926
932
|
onAccountsFilterClick: ae,
|
|
@@ -928,14 +934,14 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
928
934
|
sx: n,
|
|
929
935
|
title: s.title,
|
|
930
936
|
children: [
|
|
931
|
-
/* @__PURE__ */ c(
|
|
937
|
+
/* @__PURE__ */ c(y, { mx: l ? 0 : 48, my: 24, children: [
|
|
932
938
|
/* @__PURE__ */ c(
|
|
933
939
|
Fe,
|
|
934
940
|
{
|
|
935
|
-
onChange: (O,
|
|
941
|
+
onChange: (O, Be) => A(Be),
|
|
936
942
|
sx: { bgcolor: "background.paper" },
|
|
937
943
|
textColor: "primary",
|
|
938
|
-
value: E ? !1 :
|
|
944
|
+
value: E ? !1 : f,
|
|
939
945
|
variant: "fullWidth",
|
|
940
946
|
children: [
|
|
941
947
|
/* @__PURE__ */ e(
|
|
@@ -967,7 +973,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
967
973
|
{
|
|
968
974
|
header: s.create_goals_header,
|
|
969
975
|
icon: "trophy",
|
|
970
|
-
onClick:
|
|
976
|
+
onClick: B,
|
|
971
977
|
primaryButton: s.add_goals_button,
|
|
972
978
|
subText: s.empty_state_subheader,
|
|
973
979
|
sx: {
|
|
@@ -978,9 +984,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
978
984
|
}
|
|
979
985
|
}
|
|
980
986
|
) : /* @__PURE__ */ c($, { children: [
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
987
|
+
f === 0 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.SAVINGS_TRACK }),
|
|
988
|
+
f === 1 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.DEBT_TRACK }),
|
|
989
|
+
f === 2 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.RETIREMENT_TRACK })
|
|
984
990
|
] })
|
|
985
991
|
] }),
|
|
986
992
|
/* @__PURE__ */ e(Kt, { onClose: X }),
|
|
@@ -999,21 +1005,21 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
999
1005
|
}
|
|
1000
1006
|
);
|
|
1001
1007
|
}), Mt = D(({ goal: t }) => {
|
|
1002
|
-
const { goals: n } =
|
|
1008
|
+
const { goals: n } = x(), u = ft(), {
|
|
1003
1009
|
backgroundColor: l,
|
|
1004
1010
|
color: _,
|
|
1005
1011
|
percentage: i,
|
|
1006
1012
|
projectedText: d
|
|
1007
1013
|
} = de(n, t), s = Math.round(i * 100);
|
|
1008
1014
|
let p = /* @__PURE__ */ e(Se, {});
|
|
1009
|
-
return t.track_type === r.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(
|
|
1015
|
+
return t.track_type === r.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
1010
1016
|
/* @__PURE__ */ e(oe, { sx: { bgcolor: l, color: _, height: 32, width: 32 }, variant: "rounded", children: p }),
|
|
1011
1017
|
/* @__PURE__ */ c(bt, { sx: { width: "100%" }, children: [
|
|
1012
1018
|
/* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
1013
1019
|
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: d })
|
|
1014
1020
|
] }),
|
|
1015
1021
|
/* @__PURE__ */ e(
|
|
1016
|
-
|
|
1022
|
+
yt,
|
|
1017
1023
|
{
|
|
1018
1024
|
backgroundStrokeColor: u.palette.border.lighter,
|
|
1019
1025
|
color: u.palette.primary.main,
|
|
@@ -1025,7 +1031,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1025
1031
|
)
|
|
1026
1032
|
] });
|
|
1027
1033
|
}), Lt = ({ header: t, subText: n, sx: u }) => /* @__PURE__ */ c(
|
|
1028
|
-
|
|
1034
|
+
y,
|
|
1029
1035
|
{
|
|
1030
1036
|
sx: {
|
|
1031
1037
|
alignItems: "center",
|
|
@@ -1048,7 +1054,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1048
1054
|
]
|
|
1049
1055
|
}
|
|
1050
1056
|
), Fn = D(({ onCTAClick: t }) => {
|
|
1051
|
-
const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: l } = P(), { onEvent: _ } = Ne(), { goals: i } =
|
|
1057
|
+
const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: l } = P(), { onEvent: _ } = Ne(), { goals: i } = x(), { isInitialized: d } = ue(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
|
|
1052
1058
|
Ke({
|
|
1053
1059
|
widgetName: "GoalsMicroWidget",
|
|
1054
1060
|
isLoaded: p
|
|
@@ -6,8 +6,8 @@ import { endOfToday as J } from "date-fns/endOfToday";
|
|
|
6
6
|
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
7
|
import { startOfToday as Q } from "date-fns/startOfToday";
|
|
8
8
|
import { subDays as ee } from "date-fns/subDays";
|
|
9
|
-
import { R as _e } from "../RecurringSettings-
|
|
10
|
-
import { M as Un } from "../RecurringSettings-
|
|
9
|
+
import { R as _e } from "../RecurringSettings-XPxxB0Wf.mjs";
|
|
10
|
+
import { M as Un } from "../RecurringSettings-XPxxB0Wf.mjs";
|
|
11
11
|
import { addMonths as He } from "date-fns/addMonths";
|
|
12
12
|
import { subMonths as $e } from "date-fns/subMonths";
|
|
13
13
|
import { isBefore as Be } from "date-fns/isBefore";
|
|
@@ -47,8 +47,8 @@ import dt from "@mui/material/ListSubheader";
|
|
|
47
47
|
import ut from "@mui/material/ListItemAvatar";
|
|
48
48
|
import mt from "@mui/material/ListItemButton";
|
|
49
49
|
import pt from "@mui/material/ListItemText";
|
|
50
|
-
import { b as gt } from "../ManageIncome
|
|
51
|
-
import { c as Vn, M as qn, S as Zn } from "../ManageIncome
|
|
50
|
+
import { b as gt } from "../ManageIncome--_KEPuCK.mjs";
|
|
51
|
+
import { c as Vn, M as qn, S as Zn } from "../ManageIncome--_KEPuCK.mjs";
|
|
52
52
|
import { f as E } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
53
53
|
import { D as ie } from "../Drawer-Bbe4AMB1.mjs";
|
|
54
54
|
import O from "@mui/material/Box";
|
|
@@ -469,7 +469,7 @@ const Y = {
|
|
|
469
469
|
] }),
|
|
470
470
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
471
471
|
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: E(u, "0,0.00") }),
|
|
472
|
-
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming })
|
|
472
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming?.toLowerCase() })
|
|
473
473
|
] })
|
|
474
474
|
] });
|
|
475
475
|
}
|
|
@@ -35,7 +35,7 @@ import { L as ie } from "../Loader-D3rjKx72.mjs";
|
|
|
35
35
|
import Ae from "@mui/material/List";
|
|
36
36
|
import J from "@mui/material/Divider";
|
|
37
37
|
import Ee from "@mui/material/ListSubheader";
|
|
38
|
-
import { a as Re, u as Pe } from "../CategorySelectorDrawer-
|
|
38
|
+
import { a as Re, u as Pe } from "../CategorySelectorDrawer-Dc9Widy9.mjs";
|
|
39
39
|
import Ne from "@mui/material/ListItem";
|
|
40
40
|
import Me from "@mui/material/ListItemButton";
|
|
41
41
|
import Le from "@mui/material/ListItemIcon";
|
|
@@ -20,7 +20,7 @@ import St from "@mui/material/Button";
|
|
|
20
20
|
import { useTheme as Tt } from "@mui/material";
|
|
21
21
|
import { e as Mt } from "../exportTransactionsToCSV-CdTF_RqL.mjs";
|
|
22
22
|
import { T as Dt } from "../StatusIndicator-CIKUOoN_.mjs";
|
|
23
|
-
import { T as xt } from "../TransactionDetails-
|
|
23
|
+
import { T as xt } from "../TransactionDetails-B-C-7meW.mjs";
|
|
24
24
|
import vt from "@mui/material/Collapse";
|
|
25
25
|
import wt from "@mui/material/Divider";
|
|
26
26
|
import J from "@mui/material/List";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as wa } from "../TransactionApi-Ck5Ua-7F.mjs";
|
|
2
|
-
import { C as Me, D as Le, M as Re, a as He, T as Be } from "../TransactionDetails-
|
|
3
|
-
import { B as Da, b as Ia } from "../TransactionDetails-
|
|
2
|
+
import { C as Me, D as Le, M as Re, a as He, T as Be } from "../TransactionDetails-B-C-7meW.mjs";
|
|
3
|
+
import { B as Da, b as Ia } from "../TransactionDetails-B-C-7meW.mjs";
|
|
4
4
|
import { T as E } from "../Transaction-CqjlF6SO.mjs";
|
|
5
5
|
import { O as Na } from "../Transaction-CqjlF6SO.mjs";
|
|
6
6
|
import { S as Z, D as Pe } from "../TransactionStore-DP5vipL2.mjs";
|
|
@@ -35,7 +35,7 @@ import rt from "@mui/material/MenuItem";
|
|
|
35
35
|
import it from "@mui/material/RadioGroup";
|
|
36
36
|
import { ExpandMore as st } from "@mxenabled/mx-icons";
|
|
37
37
|
import { C as ct } from "../CurrencyInput-DuMktPu3.mjs";
|
|
38
|
-
import { a as lt, u as dt } from "../CategorySelectorDrawer-
|
|
38
|
+
import { a as lt, u as dt } from "../CategorySelectorDrawer-Dc9Widy9.mjs";
|
|
39
39
|
import { b as U } from "../Localization-CPkpIwIx.mjs";
|
|
40
40
|
import { u as ut } from "../useAriaLive-MkYebyUR.mjs";
|
|
41
41
|
import { S as mt } from "../SkeletonLoader-BaNboJjD.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -36,7 +36,7 @@ import Qt from "@mui/material/Badge";
|
|
|
36
36
|
import qt from "@mui/material/IconButton";
|
|
37
37
|
import { A as v } from "../Analytics-BYItVAe-.mjs";
|
|
38
38
|
import { T as ct } from "../StatusIndicator-CIKUOoN_.mjs";
|
|
39
|
-
import { T as dt } from "../TransactionDetails-
|
|
39
|
+
import { T as dt } from "../TransactionDetails-B-C-7meW.mjs";
|
|
40
40
|
import { D as Pe } from "../Drawer-Bbe4AMB1.mjs";
|
|
41
41
|
import { u as Ie } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
42
42
|
import { L as Le } from "../Loader-D3rjKx72.mjs";
|