@mx-cartographer/experiences 7.0.9-alpha.mega1 → 7.0.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/{Account-Bdz1k5WZ.mjs → Account-BVKkr6ft.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CEjEyv_M.mjs → AccountDetailsContent-HwQ1sepW.mjs} +11 -11
  4. package/dist/{AccountDetailsHeader-uX5amBaR.mjs → AccountDetailsHeader-C9uufKqN.mjs} +11 -11
  5. package/dist/{AccountFields-Ckw28o6E.mjs → AccountFields-VRK4zgvW.mjs} +2 -2
  6. package/dist/{AccountListItem-DKwz0HGB.mjs → AccountListItem-SkBUCsb0.mjs} +3 -3
  7. package/dist/{AccountStore-DhfQsEK5.mjs → AccountStore-3Umlm7QY.mjs} +1 -1
  8. package/dist/{Accounts-CAr848d0.mjs → Accounts-CYsoAdW-.mjs} +1 -1
  9. package/dist/{BudgetUtil-spowPvBM.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-BPvjZ-Xo.mjs} +1 -1
  11. package/dist/{ConnectDrawer-yFS82Il7.mjs → ConnectDrawer-BA9H_xx8.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-Cl1jJGRv.mjs → ConnectionsDrawer-Bs-NUsAs.mjs} +2 -2
  13. package/dist/{CurrencyInput-CSZjO22Z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
  14. package/dist/{DebtsStore-Bep2cYsx.mjs → DebtsStore-BwmpJMik.mjs} +1 -1
  15. package/dist/{ExportCsvAction-dpvaZxbS.mjs → ExportCsvAction-CvyiKLTh.mjs} +3 -3
  16. package/dist/GoalStore-BH5TWxYr.mjs +364 -0
  17. package/dist/{Help-BazrEpv7.mjs → Help-B3oENhkG.mjs} +1 -1
  18. package/dist/{LineChart-CYiUS-px.mjs → LineChart-jpdaQX7x.mjs} +1 -1
  19. package/dist/{ListItemAction-BzmbPuNp.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
  20. package/dist/{ManageIncome-Dk2ZDGqw.mjs → ManageIncome-DCUX6T2b.mjs} +4 -4
  21. package/dist/{MicroWidgetContainer-DmYiksbT.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-DqKQNubH.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
  23. package/dist/{NetWorthStore-DrBL4JEO.mjs → NetWorthStore-NKD8a-19.mjs} +2 -2
  24. package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-uXVwpIa1.mjs} +17 -17
  25. package/dist/{OriginalBalanceAction-CSu5brQE.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
  26. package/dist/{RecurringSettings-DNJs5JIe.mjs → RecurringSettings-BD_CIXnV.mjs} +3 -3
  27. package/dist/{Transaction-CyqrHmAA.mjs → Transaction-Dns0Kuuy.mjs} +1 -1
  28. package/dist/{TransactionDetails-B6h5Qo1c.mjs → TransactionDetails-DFDYdDae.mjs} +5 -5
  29. package/dist/{TransactionStore-DSyXtPek.mjs → TransactionStore-BVKUoEHj.mjs} +2 -2
  30. package/dist/{TrendsStore-DR8etTL2.mjs → TrendsStore-D6Un6Y4A.mjs} +1 -1
  31. package/dist/{WidgetContainer-D7sX3S6R.mjs → WidgetContainer-BHhhVctF.mjs} +2 -2
  32. package/dist/accounts/index.es.js +12 -12
  33. package/dist/analytics/index.es.js +2 -2
  34. package/dist/budgets/index.es.js +10 -10
  35. package/dist/cashflow/index.es.js +7 -7
  36. package/dist/categories/index.es.js +1 -1
  37. package/dist/common/index.es.js +22 -22
  38. package/dist/dashboard/index.es.js +9 -9
  39. package/dist/debts/index.es.js +11 -11
  40. package/dist/{exportTransactionsToCSV-BlVifaOG.mjs → exportTransactionsToCSV-B4JW8rfR.mjs} +1 -1
  41. package/dist/finstrong/index.es.js +6 -6
  42. package/dist/goals/index.es.js +560 -647
  43. package/dist/goals/util/GoalsUtil.d.ts +1 -0
  44. package/dist/help/index.es.js +3 -3
  45. package/dist/{hooks-02T565vf.mjs → hooks-DkUqN6JE.mjs} +3 -3
  46. package/dist/investments/index.es.js +3 -3
  47. package/dist/merchants/index.es.js +1 -1
  48. package/dist/networth/index.es.js +7 -7
  49. package/dist/notifications/index.es.js +7 -7
  50. package/dist/recurringtransactions/index.es.js +8 -8
  51. package/dist/settings/index.es.js +6 -6
  52. package/dist/spending/index.es.js +4 -4
  53. package/dist/transactions/index.es.js +13 -13
  54. package/dist/trends/index.es.js +9 -9
  55. package/package.json +1 -1
  56. package/dist/GoalStore-ChqCWX_U.mjs +0 -263
package/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
- ## [7.0.9] - 09-19-2025
1
+ ## [7.0.10] - 09-19-2025
2
2
 
3
3
  - **ADDED** - Support for excluding external accounts based on feature flag
4
4
 
5
+ ## [7.0.9] - 09-19-2025
6
+
7
+ - **FIXED** - `Retirement Goal` Projection month and year issue fixed
8
+
5
9
  ## [7.0.8] - 09-18-2025
6
10
 
7
11
  - **FIXED** - Cash Flow mini widget not getting data as a standalone widget
@@ -1,4 +1,4 @@
1
- import { A as C } from "./ConnectDrawer-yFS82Il7.mjs";
1
+ import { A as C } from "./ConnectDrawer-BA9H_xx8.mjs";
2
2
  const I = [
3
3
  C.ANY,
4
4
  C.CASH,
@@ -11,10 +11,10 @@ import M from "@mui/material/Divider";
11
11
  import v from "@mui/material/ListItem";
12
12
  import N from "@mui/material/ListItemButton";
13
13
  import w from "@mui/material/ListItemText";
14
- import { u as D } from "./AccountDetailsHeader-uX5amBaR.mjs";
15
- import { c as z, u as E, e as O, f as X } from "./hooks-02T565vf.mjs";
16
- import { A as at } from "./AccountListItem-DKwz0HGB.mjs";
17
- import { A as k } from "./WidgetContainer-D7sX3S6R.mjs";
14
+ import { u as D } from "./AccountDetailsHeader-C9uufKqN.mjs";
15
+ import { c as z, u as E, e as O, f as X } from "./hooks-DkUqN6JE.mjs";
16
+ import { A as at } from "./AccountListItem-SkBUCsb0.mjs";
17
+ import { A as k } from "./WidgetContainer-BHhhVctF.mjs";
18
18
  import { a as V, f as B, D as K } from "./Dialog-CWW597AF.mjs";
19
19
  import { b as h } from "./Localization-2MODESHW.mjs";
20
20
  import { D as J } from "./Drawer-kEE73B87.mjs";
@@ -22,7 +22,7 @@ import R from "@mui/material/ListItemAvatar";
22
22
  import ct from "@mui/material/Stack";
23
23
  import st from "@mui/material/styles/useTheme";
24
24
  import { Error as q, CheckCircle as it, Language as rt } from "@mxenabled/mx-icons";
25
- import { k as m, N as Q, h as Z, F as P } from "./ConnectDrawer-yFS82Il7.mjs";
25
+ import { k as m, N as Q, h as Z, F as P } from "./ConnectDrawer-BA9H_xx8.mjs";
26
26
  import { fromUnixTime as lt } from "date-fns/fromUnixTime";
27
27
  import { isToday as dt } from "date-fns/isToday";
28
28
  import { isYesterday as ut } from "date-fns/isYesterday";
@@ -37,14 +37,14 @@ import { LocalizationProvider as ft } from "@mui/x-date-pickers-pro";
37
37
  import At from "@mui/material/MenuItem";
38
38
  import bt from "@mui/material/Select";
39
39
  import Tt from "@mui/material/TextField";
40
- import { C as St } from "./CurrencyInput-CSZjO22Z.mjs";
41
- import { a as Dt } from "./AccountFields-Ckw28o6E.mjs";
40
+ import { C as St } from "./CurrencyInput-bEx2Mbd0.mjs";
41
+ import { a as Dt } from "./AccountFields-VRK4zgvW.mjs";
42
42
  import Et from "@mui/material/Alert";
43
43
  import yt from "@mui/material/AlertTitle";
44
44
  import xt from "@mui/material/Link";
45
45
  import wt from "@mui/material/Paper";
46
46
  import { subDays as kt, startOfToday as It, endOfToday as Mt } from "date-fns";
47
- import { T as vt, a as Lt } from "./TransactionDetails-B6h5Qo1c.mjs";
47
+ import { T as vt, a as Lt } from "./TransactionDetails-DFDYdDae.mjs";
48
48
  import { T as j } from "./TabContentContainer-j01JYR_7.mjs";
49
49
  const U = ({
50
50
  children: e,
@@ -341,12 +341,12 @@ const U = ({
341
341
  } = st(), { selectedMember: c } = D(), { accounts: i, connect: u } = E(), l = tt(c, u), s = Q.includes(c.connection_status) ? {
342
342
  color: "error.main",
343
343
  ctaCopy: l.cta ?? "",
344
- icon: /* @__PURE__ */ t(q, { sx: { ...W } }),
344
+ icon: /* @__PURE__ */ t(q, { filled: !0, sx: { ...W } }),
345
345
  mainMessage: l.statusName,
346
346
  secondaryMessage: `${l.title}.`
347
347
  } : {
348
348
  color: "success.main",
349
- icon: /* @__PURE__ */ t(it, { sx: { ...W } }),
349
+ icon: /* @__PURE__ */ t(it, { filled: !0, sx: { ...W } }),
350
350
  mainMessage: l.statusName,
351
351
  secondaryMessage: l.title
352
352
  };
@@ -571,7 +571,7 @@ const U = ({
571
571
  children: /* @__PURE__ */ d(
572
572
  Et,
573
573
  {
574
- icon: /* @__PURE__ */ t(q, {}),
574
+ icon: /* @__PURE__ */ t(q, { filled: !0 }),
575
575
  severity: "error",
576
576
  sx: {
577
577
  borderLeft: 5,
@@ -2,25 +2,25 @@ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
2
  import { observer as p } from "mobx-react-lite";
3
3
  import d from "@mui/material/Stack";
4
4
  import { H3 as w, InstitutionLogo as I, Text as m, H2 as L } from "@mxenabled/mxui";
5
- import { g as N } from "./AccountFields-Ckw28o6E.mjs";
5
+ import { g as N } from "./AccountFields-VRK4zgvW.mjs";
6
6
  import h from "react";
7
- import { G as v, c as S, l as y, u as _, m as E } from "./hooks-02T565vf.mjs";
7
+ import { G as v, c as S, k as y, u as _, l as E } from "./hooks-DkUqN6JE.mjs";
8
8
  import G from "@mui/material/Card";
9
9
  import O from "@mui/material/CardContent";
10
10
  import P from "@mui/material/CardHeader";
11
11
  import { useTheme as M } from "@mui/material/styles";
12
12
  import { g as B, a as H, b as U } from "./SpendingData-D5vsfYKo.mjs";
13
- import { L as j } from "./LineChart-CYiUS-px.mjs";
14
- import { I as f, P as g, S as C } from "./Account-Bdz1k5WZ.mjs";
15
- import { A } from "./ConnectDrawer-yFS82Il7.mjs";
13
+ import { L as j } from "./LineChart-jpdaQX7x.mjs";
14
+ import { I as f, P as g, S as C } from "./Account-BVKkr6ft.mjs";
15
+ import { A } from "./ConnectDrawer-BA9H_xx8.mjs";
16
16
  import { L as z } from "./Loader-Dp1P2gNw.mjs";
17
- import { f as Y, D as R } from "./Dialog-CWW597AF.mjs";
18
- import { f as $ } from "./NumberFormatting-CtWHhyBX.mjs";
17
+ import { f as Y, D as k } from "./Dialog-CWW597AF.mjs";
18
+ import { f as R } from "./NumberFormatting-CtWHhyBX.mjs";
19
19
  const b = () => {
20
20
  if (!h.useContext(v))
21
21
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
22
22
  return S().uiStore;
23
- }, k = (o, n) => {
23
+ }, $ = (o, n) => {
24
24
  const t = f.includes(n) ? B(o) : [], a = g.includes(n) ? H(o) : [], r = C.includes(n) ? U(o) : [];
25
25
  return [t, a, r].filter((s) => s.length > 0);
26
26
  }, F = (o, n, t) => {
@@ -38,7 +38,7 @@ const b = () => {
38
38
  }
39
39
  return i;
40
40
  }, V = () => {
41
- const o = M(), { selectedAccount: n } = b(), { monthlyCategoryTotals: t } = y(), { trends: a } = _(), r = [o.palette.chart?.chart1, o.palette.chart?.chart2], s = k(t, n.account_type), c = F(s, n.account_type, a), i = [A.LOAN, A.MORTGAGE].includes(n.account_type);
41
+ const o = M(), { selectedAccount: n } = b(), { monthlyCategoryTotals: t } = y(), { trends: a } = _(), r = [o.palette.chart?.chart1, o.palette.chart?.chart2], s = $(t, n.account_type), c = F(s, n.account_type, a), i = [A.LOAN, A.MORTGAGE].includes(n.account_type);
42
42
  return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
43
43
  j,
44
44
  {
@@ -72,7 +72,7 @@ const b = () => {
72
72
  P,
73
73
  {
74
74
  sx: { pb: 0 },
75
- title: /* @__PURE__ */ e(w, { sx: { pb: 4 }, children: Y(/* @__PURE__ */ new Date(), R.MONTH_LONG) })
75
+ title: /* @__PURE__ */ e(w, { sx: { pb: 4 }, children: Y(/* @__PURE__ */ new Date(), k.MONTH_LONG) })
76
76
  }
77
77
  ),
78
78
  /* @__PURE__ */ e(O, { sx: { p: 0 }, children: /* @__PURE__ */ e(W, {}) })
@@ -103,7 +103,7 @@ const b = () => {
103
103
  /* @__PURE__ */ e(L, { children: t.name || t.feed_name }),
104
104
  /* @__PURE__ */ u(d, { direction: "row", justifyContent: "space-between", children: [
105
105
  /* @__PURE__ */ e(m, { bold: c, variant: "Body", children: r }),
106
- /* @__PURE__ */ e(m, { bold: !0, variant: "Body", children: $(s, "0,0.00") })
106
+ /* @__PURE__ */ e(m, { bold: !0, variant: "Body", children: R(s, "0,0.00") })
107
107
  ] }),
108
108
  /* @__PURE__ */ u(d, { direction: "row", justifyContent: "space-between", children: [
109
109
  /* @__PURE__ */ e(m, { variant: "Small", children: i }),
@@ -1,7 +1,7 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { Icon as p, Text as c } from "@mxenabled/mxui";
3
- import { F as m, A as b, a as v, P as h, b as F } from "./ConnectDrawer-yFS82Il7.mjs";
4
- import { i as D, u as T, a as A, b as O, c as g } from "./Accounts-CAr848d0.mjs";
3
+ import { F as m, A as b, a as v, P as h, b as F } from "./ConnectDrawer-BA9H_xx8.mjs";
4
+ import { i as D, u as T, a as A, b as O, c as g } from "./Accounts-CYsoAdW-.mjs";
5
5
  import { f as _, i as d, a as N, b as S } from "./NumberFormatting-CtWHhyBX.mjs";
6
6
  import { b as i } from "./Localization-2MODESHW.mjs";
7
7
  import { f, D as o } from "./Dialog-CWW597AF.mjs";
@@ -10,9 +10,9 @@ import C from "@mui/material/styles/useTheme";
10
10
  import { InstitutionLogo as B, Text as o } from "@mxenabled/mxui";
11
11
  import { Error as L } from "@mxenabled/mx-icons";
12
12
  import { I as A } from "./IconBacking-B9oC6uL2.mjs";
13
- import { g as j } from "./AccountFields-Ckw28o6E.mjs";
14
- import { d } from "./ConnectDrawer-yFS82Il7.mjs";
15
- import { u as T } from "./hooks-02T565vf.mjs";
13
+ import { g as j } from "./AccountFields-VRK4zgvW.mjs";
14
+ import { d } from "./ConnectDrawer-BA9H_xx8.mjs";
15
+ import { u as T } from "./hooks-DkUqN6JE.mjs";
16
16
  import { f as X } from "./NumberFormatting-CtWHhyBX.mjs";
17
17
  const $ = {
18
18
  gridRow: 1,
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as _, runInAction as a } from "mobx";
2
2
  import { F as g, A as i } from "./Fetch-CkFKy79O.mjs";
3
- import { A as s, d, E as f, i as p, j as y } from "./ConnectDrawer-yFS82Il7.mjs";
3
+ import { A as s, d, E as f, i as p, j as y } from "./ConnectDrawer-BA9H_xx8.mjs";
4
4
  class l {
5
5
  fetchInstance;
6
6
  constructor(t, e) {
@@ -1,4 +1,4 @@
1
- import { A as _ } from "./ConnectDrawer-yFS82Il7.mjs";
1
+ import { A as _ } from "./ConnectDrawer-BA9H_xx8.mjs";
2
2
  const s = (t) => t && (t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CHECKING_LINE_OF_CREDIT), p = (t) => t.is_manual || !t.guid, E = (t) => t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.CHECKING_LINE_OF_CREDIT, a = (t) => t.account_type === _.SAVINGS || t.account_type === _.CHECKING || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE, y = (t) => t.account_type === _.LOAN || t.account_type === _.MORTGAGE;
3
3
  export {
4
4
  s as a,
@@ -1,4 +1,4 @@
1
- import { g as _ } from "./hooks-02T565vf.mjs";
1
+ import { g as _ } from "./hooks-DkUqN6JE.mjs";
2
2
  import { b as d } from "./Category-CevNQ03n.mjs";
3
3
  import { b as f } from "./Localization-2MODESHW.mjs";
4
4
  import { f as l } from "./NumberFormatting-CtWHhyBX.mjs";
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as E } from "react/jsx-runtime";
2
2
  import { observer as g } from "mobx-react-lite";
3
3
  import C from "react";
4
4
  import $ from "@mui/material/Stack";
5
- import { G as K, l as y, u as b, e as D, a as U } from "./hooks-02T565vf.mjs";
5
+ import { G as K, k as y, u as b, e as D, a as U } from "./hooks-DkUqN6JE.mjs";
6
6
  import Y from "@mui/material/List";
7
7
  import V from "@mui/material/Paper";
8
8
  import v from "@mui/material/Divider";
@@ -14,7 +14,7 @@ import p from "@mui/material/ListItemText";
14
14
  import y from "@mui/material/Popover";
15
15
  import g from "@mui/material/Stack";
16
16
  import v from "@mui/material/Checkbox";
17
- import { u as B, c, d as u } from "./hooks-02T565vf.mjs";
17
+ import { u as B, c, d as u } from "./hooks-DkUqN6JE.mjs";
18
18
  import { b as W } from "./Localization-2MODESHW.mjs";
19
19
  import { u as EE } from "./useScreenSize-B6JyS_Lj.mjs";
20
20
  import { observer as z } from "mobx-react-lite";
@@ -3,8 +3,8 @@ import r from "react";
3
3
  import { observer as E } from "mobx-react-lite";
4
4
  import { useTheme as D } from "@mui/material/styles";
5
5
  import { ConnectionsWidget as L } from "@mxenabled/web-widget-sdk";
6
- import { C as a, c, M as i } from "./ConnectDrawer-yFS82Il7.mjs";
7
- import { c as b, d as w, u as _ } from "./hooks-02T565vf.mjs";
6
+ import { C as a, c, M as i } from "./ConnectDrawer-BA9H_xx8.mjs";
7
+ import { c as b, d as w, u as _ } from "./hooks-DkUqN6JE.mjs";
8
8
  import { D as x } from "./Drawer-kEE73B87.mjs";
9
9
  const I = ({
10
10
  onClose: l,
@@ -5,7 +5,7 @@ import { v4 as B } from "uuid";
5
5
  import { useTokens as O, TextField as W, P as p } from "@mxenabled/mxui";
6
6
  import { b as _, g as d } from "./Localization-2MODESHW.mjs";
7
7
  import { g as j, C as D, f as y, M as C } from "./NumberFormatting-CtWHhyBX.mjs";
8
- import { u as F } from "./hooks-02T565vf.mjs";
8
+ import { u as F } from "./hooks-DkUqN6JE.mjs";
9
9
  const G = ({
10
10
  allowDecimals: o = !0,
11
11
  ariaLabel: g,
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as l } from "mobx";
2
2
  import { getDate as o, fromUnixTime as m, startOfMonth as _ } from "date-fns";
3
- import { A as b } from "./ConnectDrawer-yFS82Il7.mjs";
3
+ import { A as b } from "./ConnectDrawer-BA9H_xx8.mjs";
4
4
  var u = /* @__PURE__ */ ((a) => (a[a.HIGHEST_INTEREST = 1] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 2] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 3] = "HIGHEST_BALANCE", a))(u || {});
5
5
  const p = {
6
6
  unnamed_label: "Unnamed Debt"
@@ -1,10 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { observer as c } from "mobx-react-lite";
3
3
  import { Icon as i } from "@mxenabled/mxui";
4
- import { e as p } from "./exportTransactionsToCSV-BlVifaOG.mjs";
5
- import { O as m } from "./Transaction-CyqrHmAA.mjs";
4
+ import { e as p } from "./exportTransactionsToCSV-B4JW8rfR.mjs";
5
+ import { O as m } from "./Transaction-Dns0Kuuy.mjs";
6
6
  import { R as x } from "./ResponsiveButton-DZFp78fJ.mjs";
7
- import { e as _, f as C, u as l } from "./hooks-02T565vf.mjs";
7
+ import { e as _, f as C, u as l } from "./hooks-DkUqN6JE.mjs";
8
8
  const v = ({ filter: t }) => {
9
9
  const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
10
10
  r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);
@@ -0,0 +1,364 @@
1
+ import { jsxs as g, jsx as _ } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import p from "@mui/material/Button";
4
+ import T from "@mui/material/Card";
5
+ import I from "@mui/material/CardContent";
6
+ import N from "@mui/material/CardHeader";
7
+ import O from "@mui/material/Stack";
8
+ import { AccountBalance as w, ChevronRight as S } from "@mxenabled/mx-icons";
9
+ import { Text as A } from "@mxenabled/mxui";
10
+ import { h as L } from "./ConnectDrawer-BA9H_xx8.mjs";
11
+ import { m as b } from "./hooks-DkUqN6JE.mjs";
12
+ import { makeAutoObservable as y, runInAction as c } from "mobx";
13
+ import { F as D, A as i } from "./Fetch-CkFKy79O.mjs";
14
+ import { fromUnixTime as C } from "date-fns/fromUnixTime";
15
+ import { addYears as v } from "date-fns/addYears";
16
+ import { getUnixTime as x } from "date-fns/getUnixTime";
17
+ import { b as m } from "./Localization-2MODESHW.mjs";
18
+ import { a as K } from "./NumberFormatting-CtWHhyBX.mjs";
19
+ import { f as F, D as B } from "./Dialog-CWW597AF.mjs";
20
+ const at = ({ description: e, label: t, title: o }) => {
21
+ const { config: r } = b(), [n, s] = u.useState(!1);
22
+ if (r.show_connections_widget_in_master)
23
+ return /* @__PURE__ */ g(u.Fragment, { children: [
24
+ /* @__PURE__ */ g(T, { sx: { m: 24 }, children: [
25
+ /* @__PURE__ */ _(
26
+ N,
27
+ {
28
+ avatar: /* @__PURE__ */ _(w, {}),
29
+ sx: { ".MuiCardHeader-avatar": { mr: 8 } },
30
+ title: /* @__PURE__ */ _(A, { bold: !0, variant: "Body", children: o })
31
+ }
32
+ ),
33
+ /* @__PURE__ */ _(I, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ g(O, { alignItems: "flex-start", spacing: 2, children: [
34
+ /* @__PURE__ */ _(A, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: e }),
35
+ /* @__PURE__ */ _(
36
+ p,
37
+ {
38
+ endIcon: /* @__PURE__ */ _(S, {}),
39
+ onClick: () => s(!0),
40
+ sx: {
41
+ pl: 0,
42
+ ":hover": {
43
+ bgcolor: "unset"
44
+ }
45
+ },
46
+ variant: "text",
47
+ children: t
48
+ }
49
+ )
50
+ ] }) })
51
+ ] }),
52
+ /* @__PURE__ */ _(
53
+ L,
54
+ {
55
+ onClose: () => s(!1),
56
+ showConnectWidget: n,
57
+ title: t
58
+ }
59
+ )
60
+ ] });
61
+ };
62
+ var a = /* @__PURE__ */ ((e) => (e[e.DEBT_TRACK = 1] = "DEBT_TRACK", e[e.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", e[e.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", e[e.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", e))(a || {}), U = /* @__PURE__ */ ((e) => (e[e.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", e[e.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", e[e.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", e[e.ACTION = 4] = "ACTION", e))(U || {}), l = /* @__PURE__ */ ((e) => (e[e.AUTOMOBILE = 1] = "AUTOMOBILE", e[e.COLLEGE = 2] = "COLLEGE", e[e.HOUSE = 3] = "HOUSE", e[e.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", e[e.VACATION = 5] = "VACATION", e[e.ELECTRONIC = 6] = "ELECTRONIC", e[e.OTHER = 7] = "OTHER", e[e.RETIREMENT = 8] = "RETIREMENT", e[e.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", e[e.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", e[e.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", e[e.CREDIT_CARD = 12] = "CREDIT_CARD", e[e.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", e[e.LOANS = 14] = "LOANS", e))(l || {});
63
+ class R {
64
+ fetchInstance;
65
+ constructor(t, o) {
66
+ this.fetchInstance = new D(t, o);
67
+ }
68
+ addGoal = async (t) => this.fetchInstance.post(i.GOALS, t).then((o) => o.goal);
69
+ addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((o) => o.retirement_goal);
70
+ addRetirementGoalAccount = async (t) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, t).then((o) => o.retirement_goal_account);
71
+ getGoalByGuid = async (t) => this.fetchInstance.get(`${i.GOALS}/${t}`).then((o) => o.goal);
72
+ getGoals = async () => this.fetchInstance.get(i.GOALS).then((t) => t.goals);
73
+ getMonthlyCashFlowProfile = async () => this.fetchInstance.get(i.MONTHLY_CASH_FLOW_PROFILE).then((t) => t.monthly_cash_flow_profile);
74
+ getRetirementGoals = async () => this.fetchInstance.get(i.RETIREMENT_GOALS).then((t) => t.retirement_goals);
75
+ getRetirementGoalAccounts = async () => this.fetchInstance.get(i.RETIREMENT_GOAL_ACCOUNTS).then((t) => t.retirement_goal_accounts);
76
+ removeGoal = async (t) => this.fetchInstance.delete(`${i.GOALS}/${t}`).then((o) => o);
77
+ removeRetirementGoal = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${t}`).then((o) => o);
78
+ removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((o) => o);
79
+ reorderGoals = async (t) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: t }).then((o) => o.goals);
80
+ updateGoal = async (t) => this.fetchInstance.put(`${i.GOALS}/${t.guid}`, t).then((o) => o.goal);
81
+ updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, t).then((o) => o.monthly_cash_flow_profile);
82
+ updateRetirementGoal = async (t) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${t.guid}`, t).then((o) => o.retirement_goal);
83
+ }
84
+ function it(e, t) {
85
+ const o = t.track_type === a.DEBT_TRACK ? t.initial_amount : t.amount;
86
+ let r = t.current_amount / o;
87
+ r > 1 && (r = 1), r = t.track_type === a.DEBT_TRACK ? 1 - r : r, isNaN(r) && (r = 1);
88
+ let n = "chart.chart1", s = "common.black";
89
+ t.track_type === a.DEBT_TRACK ? (s = "common.white", n = "chart.chart5") : t.track_type === a.RETIREMENT_TRACK && (n = "chart.chart6");
90
+ const h = {
91
+ style: "percent",
92
+ minimumFractionDigits: 0,
93
+ maximumFractionDigits: 0
94
+ }, E = t.is_complete ? t.completed_at : t.projected_to_complete_at, d = E ? C(E) : /* @__PURE__ */ new Date(), G = m(
95
+ e.goal_percentage,
96
+ K(r, h)
97
+ ), f = m(
98
+ t.is_complete ? e.completed_label : e.goal_projection,
99
+ F(d, B.MONTH_SHORT_YEAR)
100
+ );
101
+ return {
102
+ backgroundColor: n,
103
+ color: s,
104
+ percentage: r,
105
+ percentageText: G,
106
+ projectedText: f
107
+ };
108
+ }
109
+ function st(e) {
110
+ return [
111
+ {
112
+ bgcolor: "chart.chart1",
113
+ icon: "attach_money",
114
+ label: e.saving_goal_label,
115
+ description: e.saving_goal_description,
116
+ subTypes: [
117
+ {
118
+ icon: "ecg_heart",
119
+ label: e.saving_goal_emergency_fund,
120
+ metaType: l.EMERGENCY_FUND
121
+ },
122
+ {
123
+ icon: "directions_car",
124
+ label: e.saving_gaol_automobile,
125
+ metaType: l.AUTOMOBILE
126
+ },
127
+ { icon: "school", label: e.saving_goal_college, metaType: l.COLLEGE },
128
+ { icon: "home", label: e.saving_goal_home, metaType: l.HOUSE },
129
+ {
130
+ icon: "mountain_flag",
131
+ label: e.saving_goal_recreational,
132
+ metaType: l.RECREATIONAL_VEHICLE
133
+ },
134
+ { icon: "airplane_ticket", label: e.saving_goal_vacation, metaType: l.VACATION },
135
+ {
136
+ icon: "desktop_windows",
137
+ label: e.saving_goal_electronic,
138
+ metaType: l.ELECTRONIC
139
+ },
140
+ { icon: "payments", label: e.saving_goal_other, metaType: l.OTHER }
141
+ ],
142
+ type: a.SAVINGS_TRACK
143
+ },
144
+ {
145
+ bgcolor: "chart.chart5",
146
+ icon: "note_stack",
147
+ label: e.debt_goal_label,
148
+ description: e.debt_goal_description,
149
+ subTypes: [],
150
+ type: a.DEBT_TRACK
151
+ },
152
+ {
153
+ bgcolor: "chart.chart6",
154
+ icon: "person",
155
+ label: e.retirement_goal_label,
156
+ description: e.retirement_goal_description,
157
+ subTypes: [],
158
+ type: a.RETIREMENT_TRACK
159
+ }
160
+ ];
161
+ }
162
+ const ct = (e, t) => {
163
+ switch (e) {
164
+ case a.DEBT_TRACK:
165
+ return m(t.zero_state_ongoing, "debt");
166
+ case a.SAVINGS_TRACK:
167
+ return m(t.zero_state_ongoing, "saving");
168
+ default:
169
+ return m(t.zero_state_ongoing, "retirement");
170
+ }
171
+ }, $ = (e, t) => {
172
+ const o = C(t), r = v(o, e);
173
+ return x(r);
174
+ };
175
+ class lt {
176
+ globalStore;
177
+ api = new R("/", "");
178
+ alert = "";
179
+ goals = [];
180
+ retirementGoalAccounts = [];
181
+ newRetirementGoalAccounts = [];
182
+ selectedGoal = void 0;
183
+ monthlyCashFlowProfile = void 0;
184
+ goalsLoaded = !1;
185
+ constructor(t) {
186
+ this.globalStore = t, this.api = new R(t.endpoint, t.sessionToken), y(this);
187
+ }
188
+ get orderedGoals() {
189
+ return this.goals.slice().sort((t, o) => t.position - o.position);
190
+ }
191
+ get debtGoals() {
192
+ return this.orderedGoals.filter((t) => t.track_type === a.DEBT_TRACK);
193
+ }
194
+ get retirmentGoals() {
195
+ return this.orderedGoals.filter((t) => t.track_type === a.RETIREMENT_TRACK);
196
+ }
197
+ get savingGoals() {
198
+ return this.orderedGoals.filter((t) => t.track_type === a.SAVINGS_TRACK);
199
+ }
200
+ get ongoingGoalsForMicroWidget() {
201
+ const t = this.goals.filter(
202
+ (r) => !r.is_complete && r.track_type !== a.EMERGENCY_FUND_TRACK && r.track_type !== null
203
+ ), o = [
204
+ a.SAVINGS_TRACK,
205
+ a.DEBT_TRACK,
206
+ a.RETIREMENT_TRACK
207
+ ];
208
+ return t.sort((r, n) => {
209
+ const s = r.track_type ? o.indexOf(r.track_type) : -1, h = n.track_type ? o.indexOf(n.track_type) : -1;
210
+ return s - h;
211
+ }).slice(0, 3);
212
+ }
213
+ addGoal = async (t) => {
214
+ try {
215
+ const o = await this.api.addGoal(t);
216
+ c(() => {
217
+ this.goals = [...this.goals, o];
218
+ });
219
+ } catch (o) {
220
+ console.error(`Error occurred while adding goal: ${o}`);
221
+ }
222
+ };
223
+ addRetirementGoal = async (t) => {
224
+ const o = this.globalStore.copyStore.copy.goals;
225
+ try {
226
+ const r = await this.api.addRetirementGoal(t), n = [];
227
+ for (const s of this.newRetirementGoalAccounts) {
228
+ const h = await this.api.addRetirementGoalAccount({
229
+ ...s,
230
+ retirement_goal_guid: r.guid
231
+ });
232
+ n.push(h);
233
+ }
234
+ this.setNewRetirementGoalAccounts([]), c(() => {
235
+ this.goals = [
236
+ ...this.goals,
237
+ {
238
+ ...r,
239
+ amount: r.target_amount,
240
+ name: o.retirement,
241
+ track_type: a.RETIREMENT_TRACK
242
+ }
243
+ ], this.retirementGoalAccounts = [...this.retirementGoalAccounts, ...n];
244
+ });
245
+ } catch (r) {
246
+ console.error(`Error occurred while adding retirement goal: ${r}`);
247
+ }
248
+ };
249
+ addRetirementGoalAccount = async (t) => {
250
+ try {
251
+ const o = await this.api.addRetirementGoalAccount(t);
252
+ c(() => {
253
+ this.retirementGoalAccounts = [...this.retirementGoalAccounts, o];
254
+ });
255
+ } catch (o) {
256
+ console.error(`Error occurred while adding retirement goal account: ${o}`);
257
+ }
258
+ };
259
+ loadGoals = async () => {
260
+ const t = this.globalStore.copyStore.copy.goals;
261
+ try {
262
+ const o = await this.api.getGoals(), r = await this.api.getRetirementGoals(), n = await this.api.getRetirementGoalAccounts(), s = await this.api.getMonthlyCashFlowProfile(), h = this.globalStore.userStore.user.birthday, E = [
263
+ ...o,
264
+ ...r.map((d) => ({
265
+ ...d,
266
+ amount: d.target_amount,
267
+ name: t.retirement,
268
+ track_type: a.RETIREMENT_TRACK,
269
+ projected_to_complete_at: d.retirement_age && h ? $(d.retirement_age, h) : void 0
270
+ }))
271
+ ];
272
+ c(() => {
273
+ this.goals = E, this.retirementGoalAccounts = n, this.monthlyCashFlowProfile = s, this.goalsLoaded = !0;
274
+ });
275
+ } catch (o) {
276
+ console.error(`Error occured while getting goals: ${o}`);
277
+ }
278
+ };
279
+ deleteGoal = async (t) => {
280
+ try {
281
+ await this.api.removeGoal(t), c(() => {
282
+ const o = this.goals.findIndex((r) => r.guid === t);
283
+ o >= 0 && this.goals.splice(o, 1);
284
+ });
285
+ } catch (o) {
286
+ console.error(`Error occured while deleting goal: ${o}`);
287
+ }
288
+ };
289
+ deleteRetirementGoal = async (t) => {
290
+ try {
291
+ const o = this.retirementGoalAccounts.filter(
292
+ (r) => r.retirement_goal_guid === t.guid
293
+ );
294
+ for (const r of o)
295
+ await this.deleteRetirementGoalAccount(r.guid);
296
+ await this.api.removeRetirementGoal(t.guid), c(() => {
297
+ const r = this.goals.findIndex((n) => n.guid === t.guid);
298
+ r >= 0 && this.goals.splice(r, 1);
299
+ });
300
+ } catch (o) {
301
+ console.error(`Error deleting retirement goal: ${o}`);
302
+ }
303
+ };
304
+ deleteRetirementGoalAccount = async (t) => {
305
+ try {
306
+ await this.api.removeRetirementGoalAccount(t), c(() => {
307
+ const o = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
308
+ o >= 0 && this.retirementGoalAccounts.splice(o, 1);
309
+ });
310
+ } catch (o) {
311
+ console.error(`Error deleting retirement goal account: ${o}`);
312
+ }
313
+ };
314
+ reorderGoals = async (t) => {
315
+ try {
316
+ const o = await this.api.reorderGoals(t);
317
+ c(() => {
318
+ for (const r of o) {
319
+ const n = this.goals.findIndex((s) => s.guid === r.guid);
320
+ n >= 0 && (this.goals[n].position = r.position);
321
+ }
322
+ });
323
+ } catch (o) {
324
+ console.error(`Error reordering goals: ${o}`);
325
+ }
326
+ };
327
+ setAlert = (t) => this.alert = t;
328
+ setNewRetirementGoalAccounts = (t) => {
329
+ this.newRetirementGoalAccounts = t;
330
+ };
331
+ setSelectedGoal = (t) => this.selectedGoal = t;
332
+ updateGoal = async (t) => {
333
+ try {
334
+ const o = await this.api.updateGoal(t);
335
+ c(() => {
336
+ const r = this.goals.findIndex((n) => n.guid === t.guid);
337
+ r >= 0 && (this.goals[r] = o), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(o);
338
+ });
339
+ } catch (o) {
340
+ console.error(`Error occurred while updating goal: ${o}`);
341
+ }
342
+ };
343
+ updateMonthlyCashFlowProfile = async (t) => {
344
+ try {
345
+ const o = await this.api.updateMonthlyCashFlowProfile(t);
346
+ c(() => {
347
+ this.monthlyCashFlowProfile = o;
348
+ });
349
+ } catch (o) {
350
+ console.error(`Error occurred while updating monthly Cash Flow profile: ${o}`);
351
+ }
352
+ };
353
+ }
354
+ export {
355
+ at as C,
356
+ U as G,
357
+ l as M,
358
+ a as T,
359
+ ct as a,
360
+ st as b,
361
+ R as c,
362
+ lt as d,
363
+ it as g
364
+ };
@@ -13,7 +13,7 @@ import E from "@mui/material/Stack";
13
13
  import { H3 as y, P as H, Icon as X, Text as T, H2 as _t, InstitutionLogo as bt } from "@mxenabled/mxui";
14
14
  import { ExpandMore as ot, ChevronRight as wt } from "@mxenabled/mx-icons";
15
15
  import xt from "@mui/material/Breadcrumbs";
16
- import { u as V, y as tt, c as ft, o as St, a as It, k as Tt } from "./hooks-02T565vf.mjs";
16
+ import { u as V, y as tt, c as ft, o as St, a as It, m as Tt } from "./hooks-DkUqN6JE.mjs";
17
17
  import { useTheme as Z } from "@mui/material/styles";
18
18
  import { b as s } from "./Localization-2MODESHW.mjs";
19
19
  import { E as Et, a as Ct, P as At } from "./Help-DhcC-C05.mjs";
@@ -6,7 +6,7 @@ import { f as y } from "./NumberFormatting-CtWHhyBX.mjs";
6
6
  import { observer as le } from "mobx-react-lite";
7
7
  import { Stack as x, Box as A, useTheme as se } from "@mui/material";
8
8
  import { Text as l } from "@mxenabled/mxui";
9
- import { u as ce } from "./hooks-02T565vf.mjs";
9
+ import { u as ce } from "./hooks-DkUqN6JE.mjs";
10
10
  import { ChartsTooltip as de } from "@mui/x-charts/ChartsTooltip";
11
11
  const he = (e) => {
12
12
  const a = N(), o = e.showLabel, s = e.style, g = Number(e.x), u = Number(e.y), m = e.handlers?.onMarkClick, f = e.handlers?.onMouseEnter, c = e.handlers?.onMouseLeave, d = oe(a.breakpoints.up("sm")), n = e.valueFormatterString ? y(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), h = d ? a.typography.Small?.fontSize : a.typography.XSmall?.fontSize, k = h ? parseFloat(h.toString()) * 0.6 : 8, C = n.length * k + 8 + 8, M = 24, S = g - C / 2, T = u - 30;
@@ -8,7 +8,7 @@ import L from "@mui/material/Stack";
8
8
  import { ChevronRight as g } from "@mxenabled/mx-icons";
9
9
  import { Text as m } from "@mxenabled/mxui";
10
10
  import { a as j } from "./Dialog-CWW597AF.mjs";
11
- import { u as P } from "./hooks-02T565vf.mjs";
11
+ import { u as P } from "./hooks-DkUqN6JE.mjs";
12
12
  const D = v(
13
13
  ({
14
14
  children: n,