@mx-cartographer/experiences 7.0.8 → 7.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{Account-BFol-JYA.mjs → Account-BW3-oYEs.mjs} +1 -1
- package/dist/{AccountDetailsContent-OzI5Hs8T.mjs → AccountDetailsContent-Dkpo7pw6.mjs} +8 -8
- package/dist/{AccountDetailsHeader-DnEyQMpX.mjs → AccountDetailsHeader-2HU_fMWZ.mjs} +11 -11
- package/dist/{AccountFields-CeHZrIQe.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
- package/dist/{AccountListItem-CR6I3Hl8.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
- package/dist/{AccountStore-Cu3GoLh-.mjs → AccountStore-BQKxAYSg.mjs} +1 -1
- package/dist/{Accounts-BuYXUMhP.mjs → Accounts-CA-nqAjT.mjs} +1 -1
- package/dist/{BudgetUtil-spowPvBM.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-BPvjZ-Xo.mjs} +1 -1
- package/dist/{ConnectDrawer-WfKHsHSF.mjs → ConnectDrawer-phFH6OHt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-Czp-E0-m.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
- package/dist/{CurrencyInput-CSZjO22Z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
- package/dist/{DebtsStore-D9holN8L.mjs → DebtsStore-Dp-CraCD.mjs} +1 -1
- package/dist/{ExportCsvAction-dpvaZxbS.mjs → ExportCsvAction-CvyiKLTh.mjs} +3 -3
- package/dist/GoalStore-BWHkOQ8o.mjs +364 -0
- package/dist/{Help-BazrEpv7.mjs → Help-B3oENhkG.mjs} +1 -1
- package/dist/{LineChart-CYiUS-px.mjs → LineChart-jpdaQX7x.mjs} +1 -1
- package/dist/{ListItemAction-BzmbPuNp.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
- package/dist/{ManageIncome-CzTV55Bh.mjs → ManageIncome-Bd14SWPF.mjs} +4 -4
- package/dist/{MicroWidgetContainer-DmYiksbT.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
- package/dist/{MiniWidgetContainer-DqKQNubH.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
- package/dist/{NetWorthStore-BK1_NbXW.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
- package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-uXVwpIa1.mjs} +17 -17
- package/dist/{OriginalBalanceAction-CSu5brQE.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
- package/dist/{RecurringSettings-BQDQvmSY.mjs → RecurringSettings-4Y2RJy_M.mjs} +3 -3
- package/dist/{Transaction-CyqrHmAA.mjs → Transaction-Dns0Kuuy.mjs} +1 -1
- package/dist/{TransactionDetails-BSfXqkpH.mjs → TransactionDetails-BSl6CpL8.mjs} +5 -5
- package/dist/{TransactionStore-DSyXtPek.mjs → TransactionStore-BVKUoEHj.mjs} +2 -2
- package/dist/{TrendsStore-DR8etTL2.mjs → TrendsStore-D6Un6Y4A.mjs} +1 -1
- package/dist/{WidgetContainer-BG-fdDOf.mjs → WidgetContainer-C2NBfpDg.mjs} +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +22 -22
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-BlVifaOG.mjs → exportTransactionsToCSV-B4JW8rfR.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +560 -647
- package/dist/goals/util/GoalsUtil.d.ts +1 -0
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-02T565vf.mjs → hooks-DkUqN6JE.mjs} +3 -3
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +7 -7
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +13 -13
- package/dist/trends/index.es.js +9 -9
- package/package.json +1 -1
- package/dist/GoalStore-Drf76ell.mjs +0 -263
|
@@ -21,3 +21,4 @@ export type GoalType = {
|
|
|
21
21
|
export declare function getGoalStatusData(copy: GoalsCopy, goal: Goal): GoalStatusData;
|
|
22
22
|
export declare function getGoalTypes(copy: GoalsCopy): GoalType[];
|
|
23
23
|
export declare const getZeroStateOngoing: (trackType: TrackType, copy: GoalsCopy) => string;
|
|
24
|
+
export declare const getProjectedRetirementDate: (retirementAge: number, userBirthday: number) => number;
|
package/dist/help/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { observer as t } from "mobx-react-lite";
|
|
3
|
-
import { H as m } from "../Help-
|
|
4
|
-
import { a as s } from "../hooks-
|
|
3
|
+
import { H as m } from "../Help-B3oENhkG.mjs";
|
|
4
|
+
import { a as s } from "../hooks-DkUqN6JE.mjs";
|
|
5
5
|
import { L as p } from "../Loader-Dp1P2gNw.mjs";
|
|
6
|
-
import { W as a } from "../WidgetContainer-
|
|
6
|
+
import { W as a } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
7
7
|
const x = t(({ sx: o }) => {
|
|
8
8
|
const { isCopyLoaded: i, isInitialized: e } = s();
|
|
9
9
|
return !i || !e ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(a, { sx: { p: 16 }, children: /* @__PURE__ */ r(m, { sx: o }) });
|
|
@@ -4,7 +4,7 @@ import { observer as P } from "mobx-react-lite";
|
|
|
4
4
|
import _ from "@mui/material/Stack";
|
|
5
5
|
import Ee from "@mui/material/Tab";
|
|
6
6
|
import Ge from "@mui/material/Tabs";
|
|
7
|
-
import { C as ge } from "../ConnectionsDrawer-
|
|
7
|
+
import { C as ge } from "../ConnectionsDrawer-ihxkAi1P.mjs";
|
|
8
8
|
import pe from "@mui/material/useMediaQuery";
|
|
9
9
|
import Me from "@mui/material/Box";
|
|
10
10
|
import Ne from "@mui/material/Collapse";
|
|
@@ -16,8 +16,8 @@ import xe from "@mui/material/ToggleButton";
|
|
|
16
16
|
import ye from "@mui/material/ToggleButtonGroup";
|
|
17
17
|
import { Text as r, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
|
|
18
18
|
import Ue from "@mui/material/Button";
|
|
19
|
-
import { u as E, e as be, s as H, a as Q, c as se } from "../hooks-
|
|
20
|
-
import { A as z, W as je } from "../WidgetContainer-
|
|
19
|
+
import { u as E, e as be, s as H, a as Q, c as se } from "../hooks-DkUqN6JE.mjs";
|
|
20
|
+
import { A as z, W as je } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
21
21
|
import { a as ze, f as oe } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
22
22
|
import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
23
|
import le from "@mui/material/styles/useTheme";
|
|
@@ -12,7 +12,7 @@ import k from "@mui/material/ListItemText";
|
|
|
12
12
|
import A from "@mui/material/Paper";
|
|
13
13
|
import d from "@mui/material/Stack";
|
|
14
14
|
import { MerchantLogo as V, Text as R } from "@mxenabled/mxui";
|
|
15
|
-
import { b as v, u as w, a as C } from "../hooks-
|
|
15
|
+
import { b as v, u as w, a as C } from "../hooks-DkUqN6JE.mjs";
|
|
16
16
|
import { L as p } from "../Loader-Dp1P2gNw.mjs";
|
|
17
17
|
import { S as N } from "../SearchBox-B2_zLv8-.mjs";
|
|
18
18
|
import { M as ne } from "../MerchantStore-DVH-QOf0.mjs";
|
|
@@ -3,9 +3,9 @@ import { fromUnixTime as Se } from "date-fns/fromUnixTime";
|
|
|
3
3
|
import { observer as w } from "mobx-react-lite";
|
|
4
4
|
import { useTheme as z } from "@mui/material/styles";
|
|
5
5
|
import { u as Z } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
6
|
-
import { p as _e, u as T, c as J, e as Q, a as P, q as ee } from "../hooks-
|
|
6
|
+
import { p as _e, u as T, c as J, e as Q, a as P, q as ee } from "../hooks-DkUqN6JE.mjs";
|
|
7
7
|
import { f as we, D as be } from "../Dialog-CWW597AF.mjs";
|
|
8
|
-
import { L as We } from "../LineChart-
|
|
8
|
+
import { L as We } from "../LineChart-jpdaQX7x.mjs";
|
|
9
9
|
import W from "@mui/material/Divider";
|
|
10
10
|
import B from "@mui/material/List";
|
|
11
11
|
import E from "@mui/material/ListSubheader";
|
|
@@ -19,15 +19,15 @@ import { i as ne } from "../DateUtil-BcuH7ErC.mjs";
|
|
|
19
19
|
import { C as y } from "../CurrencyText-YUhH2caW.mjs";
|
|
20
20
|
import { Button as Te, Stack as Le } from "@mui/material";
|
|
21
21
|
import { format as Ne, fromUnixTime as De, differenceInMonths as Ee } from "date-fns";
|
|
22
|
-
import { g as K } from "../NetWorthStore-
|
|
23
|
-
import { N as Ot } from "../NetWorthStore-
|
|
22
|
+
import { g as K } from "../NetWorthStore-B6xF9eGH.mjs";
|
|
23
|
+
import { N as Ot } from "../NetWorthStore-B6xF9eGH.mjs";
|
|
24
24
|
import { Icon as oe } from "@mxenabled/mx-icons";
|
|
25
25
|
import { f as U } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
26
|
-
import { A as b, W as ke } from "../WidgetContainer-
|
|
26
|
+
import { A as b, W as ke } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
27
27
|
import { L as O } from "../Loader-Dp1P2gNw.mjs";
|
|
28
|
-
import { M as Ae } from "../MicroWidgetContainer-
|
|
28
|
+
import { M as Ae } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
|
|
29
29
|
import re from "@mui/material/Box";
|
|
30
|
-
import { C as Me } from "../ConnectionsDrawer-
|
|
30
|
+
import { C as Me } from "../ConnectionsDrawer-ihxkAi1P.mjs";
|
|
31
31
|
import He from "@mui/material/Collapse";
|
|
32
32
|
import V from "@mui/material/ListItemIcon";
|
|
33
33
|
import ie from "@mui/material/styles/useTheme";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as f, B as C } from "../Notification-ByMBpJ5u.mjs";
|
|
2
2
|
import { A as _ } from "../Fetch-CkFKy79O.mjs";
|
|
3
|
-
import { s as
|
|
3
|
+
import { s as L } from "../NotificationStore-DHtSGySy.mjs";
|
|
4
4
|
import { N as Nt, f as St } from "../NotificationStore-DHtSGySy.mjs";
|
|
5
5
|
import { jsx as t, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
6
|
+
import k, { useEffect as A } from "react";
|
|
7
7
|
import { observer as p } from "mobx-react-lite";
|
|
8
8
|
import y from "@mui/material/Box";
|
|
9
9
|
import D from "@mui/material/Divider";
|
|
@@ -11,13 +11,13 @@ import B from "@mui/material/List";
|
|
|
11
11
|
import { Text as m, InstitutionLogo as T, CategoryIcon as R } from "@mxenabled/mxui";
|
|
12
12
|
import { h as I } from "../DateUtil-BcuH7ErC.mjs";
|
|
13
13
|
import { useTheme as O, Card as G } from "@mui/material";
|
|
14
|
-
import { c as E, g as j, u as g, n as N, a as S,
|
|
14
|
+
import { c as E, g as j, u as g, n as N, a as S, m as z } from "../hooks-DkUqN6JE.mjs";
|
|
15
15
|
import { Icon as U, Settings as F } from "@mxenabled/mx-icons";
|
|
16
16
|
import P from "@mui/material/Button";
|
|
17
17
|
import W from "@mui/material/Stack";
|
|
18
18
|
import { L as w } from "../Loader-Dp1P2gNw.mjs";
|
|
19
19
|
import $ from "@mui/material/IconButton";
|
|
20
|
-
import { N as H } from "../NotificationSettings-
|
|
20
|
+
import { N as H } from "../NotificationSettings-uXVwpIa1.mjs";
|
|
21
21
|
import { D as b } from "../Drawer-kEE73B87.mjs";
|
|
22
22
|
const yt = (e) => {
|
|
23
23
|
switch (e) {
|
|
@@ -119,9 +119,9 @@ const yt = (e) => {
|
|
|
119
119
|
(!c || a) && /* @__PURE__ */ t(w, { label: u?.loading, size: 40 }),
|
|
120
120
|
c && !a && i.length === 0 && /* @__PURE__ */ t(q, { onManageNotifications: o }),
|
|
121
121
|
/* @__PURE__ */ t(B, { sx: { p: 16 }, children: c && !a && i.slice().sort((n, h) => h.delivered_at - n.delivered_at).map((n, h) => {
|
|
122
|
-
const
|
|
122
|
+
const v = L(h, i);
|
|
123
123
|
return /* @__PURE__ */ d(y, { sx: { mb: 12 }, children: [
|
|
124
|
-
|
|
124
|
+
v && /* @__PURE__ */ d(y, { sx: { mb: 12 }, children: [
|
|
125
125
|
/* @__PURE__ */ t(M, { date: n.delivered_at }),
|
|
126
126
|
/* @__PURE__ */ t(D, {})
|
|
127
127
|
] }),
|
|
@@ -131,7 +131,7 @@ const yt = (e) => {
|
|
|
131
131
|
] });
|
|
132
132
|
}, K = p(J), Ct = p(
|
|
133
133
|
({ notificationTypes: e, isOpen: o, onClose: a, onNotificationClick: s }) => {
|
|
134
|
-
const { config: i } = z(), { notifications: r, settings: u } = g(), { isCopyLoaded: c } = S(), [l, n] =
|
|
134
|
+
const { config: i } = z(), { notifications: r, settings: u } = g(), { isCopyLoaded: c } = S(), [l, n] = k.useState(!1);
|
|
135
135
|
return c ? /* @__PURE__ */ d(x, { children: [
|
|
136
136
|
/* @__PURE__ */ d(
|
|
137
137
|
b,
|
|
@@ -8,8 +8,8 @@ import { startOfToday as le } from "date-fns/startOfToday";
|
|
|
8
8
|
import { subDays as de } from "date-fns/subDays";
|
|
9
9
|
import re from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as He } from "../RecurringSettings-
|
|
12
|
-
import { M as An } from "../RecurringSettings-
|
|
11
|
+
import { R as He } from "../RecurringSettings-4Y2RJy_M.mjs";
|
|
12
|
+
import { M as An } from "../RecurringSettings-4Y2RJy_M.mjs";
|
|
13
13
|
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Be } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Ue } from "date-fns/isBefore";
|
|
@@ -28,11 +28,11 @@ import { isSameDay as tt } from "date-fns/isSameDay";
|
|
|
28
28
|
import nt from "@mui/material/Badge";
|
|
29
29
|
import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
|
|
30
30
|
import { I as Y } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
-
import { u as D, a as V, h as v, e as X, c as pe, f as ge, p as rt } from "../hooks-
|
|
31
|
+
import { u as D, a as V, h as v, e as X, c as pe, f as ge, p as rt } from "../hooks-DkUqN6JE.mjs";
|
|
32
32
|
import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
33
|
import { T as P } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
34
34
|
import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
35
|
-
import { A as _, W as at } from "../WidgetContainer-
|
|
35
|
+
import { A as _, W as at } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import se from "@mui/material/Divider";
|
|
38
38
|
import Se from "@mui/material/List";
|
|
@@ -41,8 +41,8 @@ import ct from "@mui/material/ListSubheader";
|
|
|
41
41
|
import lt from "@mui/material/ListItemAvatar";
|
|
42
42
|
import dt from "@mui/material/ListItemButton";
|
|
43
43
|
import ut from "@mui/material/ListItemText";
|
|
44
|
-
import { b as mt } from "../ManageIncome-
|
|
45
|
-
import { c as On, M as kn, S as Wn } from "../ManageIncome-
|
|
44
|
+
import { b as mt } from "../ManageIncome-Bd14SWPF.mjs";
|
|
45
|
+
import { c as On, M as kn, S as Wn } from "../ManageIncome-Bd14SWPF.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
47
|
import { D as Ae } from "../Drawer-kEE73B87.mjs";
|
|
48
48
|
import { b as N } from "../Localization-2MODESHW.mjs";
|
|
@@ -51,9 +51,9 @@ import O from "@mui/material/Box";
|
|
|
51
51
|
import { S as Ee } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
52
|
import { u as Ge } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
53
|
import { L as j } from "../Loader-Dp1P2gNw.mjs";
|
|
54
|
-
import { M as pt } from "../MiniWidgetContainer-
|
|
54
|
+
import { M as pt } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
|
-
import { M as ht } from "../MicroWidgetContainer-
|
|
56
|
+
import { M as ht } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
|
|
57
57
|
const Z = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
@@ -16,9 +16,9 @@ import F from "@mui/material/Box";
|
|
|
16
16
|
import Q from "@mui/material/Button";
|
|
17
17
|
import I from "@mui/material/TextField";
|
|
18
18
|
import { H3 as J, P as H, Text as x, Icon as M, ChevronRightIcon as xe } from "@mxenabled/mxui";
|
|
19
|
-
import { V as ve, a as Ce, N as G } from "../NotificationSettings-
|
|
20
|
-
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-
|
|
21
|
-
import { u as k,
|
|
19
|
+
import { V as ve, a as Ce, N as G } from "../NotificationSettings-uXVwpIa1.mjs";
|
|
20
|
+
import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-uXVwpIa1.mjs";
|
|
21
|
+
import { u as k, m as $, r as A, o as De, a as Z, k as ee } from "../hooks-DkUqN6JE.mjs";
|
|
22
22
|
import { u as L } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
23
23
|
import { a as W } from "../Dialog-CWW597AF.mjs";
|
|
24
24
|
import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
|
|
@@ -35,14 +35,14 @@ import { L as ne } from "../Loader-Dp1P2gNw.mjs";
|
|
|
35
35
|
import Ie from "@mui/material/List";
|
|
36
36
|
import j from "@mui/material/Divider";
|
|
37
37
|
import Ae from "@mui/material/ListSubheader";
|
|
38
|
-
import { a as Ee, u as Pe } from "../CategorySelectorDrawer-
|
|
38
|
+
import { a as Ee, u as Pe } from "../CategorySelectorDrawer-BPvjZ-Xo.mjs";
|
|
39
39
|
import Re from "@mui/material/ListItem";
|
|
40
40
|
import Be from "@mui/material/ListItemButton";
|
|
41
41
|
import Me from "@mui/material/ListItemIcon";
|
|
42
42
|
import Ne from "@mui/material/ListItemText";
|
|
43
43
|
import { D as He } from "../Drawer-kEE73B87.mjs";
|
|
44
|
-
import { H as Le } from "../Help-
|
|
45
|
-
import { W as K } from "../WidgetContainer-
|
|
44
|
+
import { H as Le } from "../Help-B3oENhkG.mjs";
|
|
45
|
+
import { W as K } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
46
46
|
const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
|
|
47
47
|
const o = ye(), { common: n, settings: r } = k(), { isDesktop: m, isMobile: l, isSmallMobile: i, isTablet: s } = L(t), { config: g } = $(), { updateUser: _ } = A(), { user: d } = De(), [u, S] = h.useState({
|
|
48
48
|
first_name: d.first_name,
|
|
@@ -14,20 +14,20 @@ import { Text as f, CategoryIcon as ht, CategoryIconVariants as ft } from "@mxen
|
|
|
14
14
|
import { f as A } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
15
15
|
import yt from "@mui/material/Button";
|
|
16
16
|
import { useTheme as it } from "@mui/material";
|
|
17
|
-
import { u as w, a as R,
|
|
17
|
+
import { u as w, a as R, k as z, c as rt, m as st, f as Ct, e as _t } from "../hooks-DkUqN6JE.mjs";
|
|
18
18
|
import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
19
19
|
import { D as bt } from "../Donut-1UMNcG67.mjs";
|
|
20
20
|
import { L as F } from "../Loader-Dp1P2gNw.mjs";
|
|
21
|
-
import { M as St } from "../MiniWidgetContainer-
|
|
21
|
+
import { M as St } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
22
22
|
import { startOfToday as U } from "date-fns/startOfToday";
|
|
23
|
-
import { T as Tt, a as Mt } from "../TransactionDetails-
|
|
23
|
+
import { T as Tt, a as Mt } from "../TransactionDetails-BSl6CpL8.mjs";
|
|
24
24
|
import Dt from "@mui/material/Collapse";
|
|
25
25
|
import B from "@mui/material/Divider";
|
|
26
26
|
import q from "@mui/material/List";
|
|
27
27
|
import J from "@mui/material/ListItem";
|
|
28
28
|
import xt from "@mui/material/ListItemButton";
|
|
29
29
|
import { D as Q } from "../Drawer-kEE73B87.mjs";
|
|
30
|
-
import { A as Z, W as wt } from "../WidgetContainer-
|
|
30
|
+
import { A as Z, W as wt } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
31
31
|
const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
|
|
32
32
|
if (c.total > 0) {
|
|
33
33
|
const a = n.find((s) => s.guid === c.category_guid);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { T as ha } from "../TransactionApi-DbbcjI2L.mjs";
|
|
2
|
-
import { u as B, C as Le, D as Re, M as He, c as Be, T as Pe, a as $e } from "../TransactionDetails-
|
|
3
|
-
import { B as Ca, d as ya, b as ba } from "../TransactionDetails-
|
|
4
|
-
import { T as M } from "../Transaction-
|
|
5
|
-
import { O as Aa } from "../Transaction-
|
|
6
|
-
import { S as ee, D as Ve } from "../TransactionStore-
|
|
7
|
-
import { T as xa } from "../TransactionStore-
|
|
8
|
-
import { e as We } from "../exportTransactionsToCSV-
|
|
9
|
-
import { E as Ia } from "../ExportCsvAction-
|
|
2
|
+
import { u as B, C as Le, D as Re, M as He, c as Be, T as Pe, a as $e } from "../TransactionDetails-BSl6CpL8.mjs";
|
|
3
|
+
import { B as Ca, d as ya, b as ba } from "../TransactionDetails-BSl6CpL8.mjs";
|
|
4
|
+
import { T as M } from "../Transaction-Dns0Kuuy.mjs";
|
|
5
|
+
import { O as Aa } from "../Transaction-Dns0Kuuy.mjs";
|
|
6
|
+
import { S as ee, D as Ve } from "../TransactionStore-BVKUoEHj.mjs";
|
|
7
|
+
import { T as xa } from "../TransactionStore-BVKUoEHj.mjs";
|
|
8
|
+
import { e as We } from "../exportTransactionsToCSV-B4JW8rfR.mjs";
|
|
9
|
+
import { E as Ia } from "../ExportCsvAction-CvyiKLTh.mjs";
|
|
10
10
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
11
11
|
import u from "react";
|
|
12
12
|
import { observer as S } from "mobx-react-lite";
|
|
@@ -15,7 +15,7 @@ import { DataGridPro as Ue } from "@mui/x-data-grid-pro";
|
|
|
15
15
|
import A from "@mui/material/Box";
|
|
16
16
|
import { useTheme as Fe } from "@mui/material/styles";
|
|
17
17
|
import { Text as C, Icon as H, MerchantLogo as ze, TextField as te, P as Ke } from "@mxenabled/mxui";
|
|
18
|
-
import { f as P, u as x, a as K, c as re,
|
|
18
|
+
import { f as P, u as x, a as K, c as re, k as qe, m as je, e as Xe, o as Ye } from "../hooks-DkUqN6JE.mjs";
|
|
19
19
|
import { fromUnixTime as Je } from "date-fns/fromUnixTime";
|
|
20
20
|
import { f as Qe, D as Ze, a as se } from "../Dialog-CWW597AF.mjs";
|
|
21
21
|
import N from "@mui/material/Stack";
|
|
@@ -26,15 +26,15 @@ import { getUnixTime as tt } from "date-fns/getUnixTime";
|
|
|
26
26
|
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
27
27
|
import { startOfToday as z } from "date-fns/startOfToday";
|
|
28
28
|
import nt from "@mui/material/styles/useTheme";
|
|
29
|
-
import { j as ot } from "../ConnectDrawer-
|
|
29
|
+
import { j as ot } from "../ConnectDrawer-phFH6OHt.mjs";
|
|
30
30
|
import rt from "@mui/material/Divider";
|
|
31
31
|
import st from "@mui/material/MenuItem";
|
|
32
32
|
import it from "@mui/material/RadioGroup";
|
|
33
33
|
import { ExpandMore as ct } from "@mxenabled/mx-icons";
|
|
34
|
-
import { C as lt } from "../CurrencyInput-
|
|
35
|
-
import { a as dt, u as ut } from "../CategorySelectorDrawer-
|
|
34
|
+
import { C as lt } from "../CurrencyInput-bEx2Mbd0.mjs";
|
|
35
|
+
import { a as dt, u as ut } from "../CategorySelectorDrawer-BPvjZ-Xo.mjs";
|
|
36
36
|
import { b as ae } from "../Localization-2MODESHW.mjs";
|
|
37
|
-
import { A as T, W as mt } from "../WidgetContainer-
|
|
37
|
+
import { A as T, W as mt } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
38
38
|
import { u as _t } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
39
39
|
import { S as pt } from "../SearchBox-B2_zLv8-.mjs";
|
|
40
40
|
import { D as ne } from "../Drawer-kEE73B87.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -7,12 +7,12 @@ import b from "@mui/material/Stack";
|
|
|
7
7
|
import ge from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as De } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as pe } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { a as ze, g as Fe, S as Pe, L as Ie, u as Ke } from "../TrendsStore-
|
|
11
|
-
import { T as Zn } from "../TrendsStore-
|
|
10
|
+
import { a as ze, g as Fe, S as Pe, L as Ie, u as Ke } from "../TrendsStore-D6Un6Y4A.mjs";
|
|
11
|
+
import { T as Zn } from "../TrendsStore-D6Un6Y4A.mjs";
|
|
12
12
|
import { i as $e, c as je, d as Ye, e as Ue, f as Xe, h as Ze, b as Ee, g as Le, j as ye } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
13
|
import Qe from "@mui/material/ToggleButton";
|
|
14
14
|
import qe from "@mui/material/ToggleButtonGroup";
|
|
15
|
-
import { u as k,
|
|
15
|
+
import { u as k, k as F, e as N, a as P, f as ne, c as oe, v as J, l as xe, p as Je } from "../hooks-DkUqN6JE.mjs";
|
|
16
16
|
import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
17
|
import { f as Q, D as z } from "../Dialog-CWW597AF.mjs";
|
|
18
18
|
import { DataGridPro as et } from "@mui/x-data-grid-pro";
|
|
@@ -21,17 +21,17 @@ import { c as ve } from "../Category-CevNQ03n.mjs";
|
|
|
21
21
|
import { b as nt } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { H as _e } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
23
|
import { T as R, b as ot } from "../ViewMoreMicroCard-BZI5VMNW.mjs";
|
|
24
|
-
import { A as _, W as Me } from "../WidgetContainer-
|
|
25
|
-
import { a as Ae, T as Re } from "../TransactionDetails-
|
|
24
|
+
import { A as _, W as Me } from "../WidgetContainer-C2NBfpDg.mjs";
|
|
25
|
+
import { a as Ae, T as Re } from "../TransactionDetails-BSl6CpL8.mjs";
|
|
26
26
|
import { D as Ce } from "../Drawer-kEE73B87.mjs";
|
|
27
27
|
import { L as q } from "../Loader-Dp1P2gNw.mjs";
|
|
28
28
|
import { useTheme as ke } from "@mui/material/styles";
|
|
29
|
-
import { L as Te } from "../LineChart-
|
|
30
|
-
import { M as st } from "../MiniWidgetContainer-
|
|
29
|
+
import { L as Te } from "../LineChart-jpdaQX7x.mjs";
|
|
30
|
+
import { M as st } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
31
31
|
import { subMonths as rt } from "date-fns";
|
|
32
32
|
import { TrendingUp as at, TrendingDown as it, MultilineChart as ct, ExpandLess as lt, ExpandMore as dt } from "@mxenabled/mx-icons";
|
|
33
33
|
import { a as ht, f as X } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
34
|
-
import { M as ut } from "../MicroWidgetContainer-
|
|
34
|
+
import { M as ut } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
|
|
35
35
|
import mt from "@mui/material/Collapse";
|
|
36
36
|
import gt from "@mui/material/List";
|
|
37
37
|
import pt from "@mui/material/ListItem";
|
|
@@ -43,7 +43,7 @@ import yt from "@mui/material/Divider";
|
|
|
43
43
|
import { useTheme as _t, Stack as bt } from "@mui/material";
|
|
44
44
|
import St from "@mui/material/Paper";
|
|
45
45
|
import { b as wt } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
46
|
-
import { E as Dt } from "../ExportCsvAction-
|
|
46
|
+
import { E as Dt } from "../ExportCsvAction-CvyiKLTh.mjs";
|
|
47
47
|
import { E as It } from "../EmptyState-Dcb-o2tl.mjs";
|
|
48
48
|
const Ne = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
49
49
|
qe,
|
package/package.json
CHANGED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import u from "react";
|
|
3
|
-
import g from "@mui/material/Button";
|
|
4
|
-
import _ from "@mui/material/Card";
|
|
5
|
-
import R from "@mui/material/CardContent";
|
|
6
|
-
import G from "@mui/material/CardHeader";
|
|
7
|
-
import C from "@mui/material/Stack";
|
|
8
|
-
import { AccountBalance as f, ChevronRight as I } from "@mxenabled/mx-icons";
|
|
9
|
-
import { Text as A } from "@mxenabled/mxui";
|
|
10
|
-
import { j as N } from "./ConnectDrawer-WfKHsHSF.mjs";
|
|
11
|
-
import { k as O } from "./hooks-02T565vf.mjs";
|
|
12
|
-
import { makeAutoObservable as p, runInAction as i } from "mobx";
|
|
13
|
-
import { F as w, A as s } from "./Fetch-CkFKy79O.mjs";
|
|
14
|
-
const V = ({ description: o, label: t, title: e }) => {
|
|
15
|
-
const { config: r } = O(), [n, a] = u.useState(!1);
|
|
16
|
-
if (r.show_connections_widget_in_master)
|
|
17
|
-
return /* @__PURE__ */ d(u.Fragment, { children: [
|
|
18
|
-
/* @__PURE__ */ d(_, { sx: { m: 24 }, children: [
|
|
19
|
-
/* @__PURE__ */ l(
|
|
20
|
-
G,
|
|
21
|
-
{
|
|
22
|
-
avatar: /* @__PURE__ */ l(f, {}),
|
|
23
|
-
sx: { ".MuiCardHeader-avatar": { mr: 8 } },
|
|
24
|
-
title: /* @__PURE__ */ l(A, { bold: !0, variant: "Body", children: e })
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ l(R, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ d(C, { alignItems: "flex-start", spacing: 2, children: [
|
|
28
|
-
/* @__PURE__ */ l(A, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: o }),
|
|
29
|
-
/* @__PURE__ */ l(
|
|
30
|
-
g,
|
|
31
|
-
{
|
|
32
|
-
endIcon: /* @__PURE__ */ l(I, {}),
|
|
33
|
-
onClick: () => a(!0),
|
|
34
|
-
sx: {
|
|
35
|
-
pl: 0,
|
|
36
|
-
":hover": {
|
|
37
|
-
bgcolor: "unset"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
variant: "text",
|
|
41
|
-
children: t
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] }) })
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ l(
|
|
47
|
-
N,
|
|
48
|
-
{
|
|
49
|
-
onClose: () => a(!1),
|
|
50
|
-
showConnectWidget: n,
|
|
51
|
-
title: t
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
] });
|
|
55
|
-
};
|
|
56
|
-
var c = /* @__PURE__ */ ((o) => (o[o.DEBT_TRACK = 1] = "DEBT_TRACK", o[o.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", o[o.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", o[o.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", o))(c || {}), S = /* @__PURE__ */ ((o) => (o[o.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", o[o.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", o[o.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", o[o.ACTION = 4] = "ACTION", o))(S || {}), L = /* @__PURE__ */ ((o) => (o[o.AUTOMOBILE = 1] = "AUTOMOBILE", o[o.COLLEGE = 2] = "COLLEGE", o[o.HOUSE = 3] = "HOUSE", o[o.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", o[o.VACATION = 5] = "VACATION", o[o.ELECTRONIC = 6] = "ELECTRONIC", o[o.OTHER = 7] = "OTHER", o[o.RETIREMENT = 8] = "RETIREMENT", o[o.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", o[o.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", o[o.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", o[o.CREDIT_CARD = 12] = "CREDIT_CARD", o[o.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", o[o.LOANS = 14] = "LOANS", o))(L || {});
|
|
57
|
-
class m {
|
|
58
|
-
fetchInstance;
|
|
59
|
-
constructor(t, e) {
|
|
60
|
-
this.fetchInstance = new w(t, e);
|
|
61
|
-
}
|
|
62
|
-
addGoal = async (t) => this.fetchInstance.post(s.GOALS, t).then((e) => e.goal);
|
|
63
|
-
addRetirementGoal = async (t) => this.fetchInstance.post(s.RETIREMENT_GOALS, t).then((e) => e.retirement_goal);
|
|
64
|
-
addRetirementGoalAccount = async (t) => this.fetchInstance.post(s.RETIREMENT_GOAL_ACCOUNTS, t).then((e) => e.retirement_goal_account);
|
|
65
|
-
getGoalByGuid = async (t) => this.fetchInstance.get(`${s.GOALS}/${t}`).then((e) => e.goal);
|
|
66
|
-
getGoals = async () => this.fetchInstance.get(s.GOALS).then((t) => t.goals);
|
|
67
|
-
getMonthlyCashFlowProfile = async () => this.fetchInstance.get(s.MONTHLY_CASH_FLOW_PROFILE).then((t) => t.monthly_cash_flow_profile);
|
|
68
|
-
getRetirementGoals = async () => this.fetchInstance.get(s.RETIREMENT_GOALS).then((t) => t.retirement_goals);
|
|
69
|
-
getRetirementGoalAccounts = async () => this.fetchInstance.get(s.RETIREMENT_GOAL_ACCOUNTS).then((t) => t.retirement_goal_accounts);
|
|
70
|
-
removeGoal = async (t) => this.fetchInstance.delete(`${s.GOALS}/${t}`).then((e) => e);
|
|
71
|
-
removeRetirementGoal = async (t) => this.fetchInstance.delete(`${s.RETIREMENT_GOALS}/${t}`).then((e) => e);
|
|
72
|
-
removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${s.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((e) => e);
|
|
73
|
-
reorderGoals = async (t) => this.fetchInstance.post(`${s.GOALS}/reposition`, { goals: t }).then((e) => e.goals);
|
|
74
|
-
updateGoal = async (t) => this.fetchInstance.put(`${s.GOALS}/${t.guid}`, t).then((e) => e.goal);
|
|
75
|
-
updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${s.MONTHLY_CASH_FLOW_PROFILE}`, t).then((e) => e.monthly_cash_flow_profile);
|
|
76
|
-
updateRetirementGoal = async (t) => this.fetchInstance.put(`${s.RETIREMENT_GOALS}/${t.guid}`, t).then((e) => e.retirement_goal);
|
|
77
|
-
}
|
|
78
|
-
class k {
|
|
79
|
-
globalStore;
|
|
80
|
-
api = new m("/", "");
|
|
81
|
-
alert = "";
|
|
82
|
-
goals = [];
|
|
83
|
-
retirementGoalAccounts = [];
|
|
84
|
-
newRetirementGoalAccounts = [];
|
|
85
|
-
selectedGoal = void 0;
|
|
86
|
-
monthlyCashFlowProfile = void 0;
|
|
87
|
-
goalsLoaded = !1;
|
|
88
|
-
constructor(t) {
|
|
89
|
-
this.globalStore = t, this.api = new m(t.endpoint, t.sessionToken), p(this);
|
|
90
|
-
}
|
|
91
|
-
get orderedGoals() {
|
|
92
|
-
return this.goals.slice().sort((t, e) => t.position - e.position);
|
|
93
|
-
}
|
|
94
|
-
get debtGoals() {
|
|
95
|
-
return this.orderedGoals.filter((t) => t.track_type === c.DEBT_TRACK);
|
|
96
|
-
}
|
|
97
|
-
get retirmentGoals() {
|
|
98
|
-
return this.orderedGoals.filter((t) => t.track_type === c.RETIREMENT_TRACK);
|
|
99
|
-
}
|
|
100
|
-
get savingGoals() {
|
|
101
|
-
return this.orderedGoals.filter((t) => t.track_type === c.SAVINGS_TRACK);
|
|
102
|
-
}
|
|
103
|
-
get ongoingGoalsForMicroWidget() {
|
|
104
|
-
const t = this.goals.filter(
|
|
105
|
-
(r) => !r.is_complete && r.track_type !== c.EMERGENCY_FUND_TRACK && r.track_type !== null
|
|
106
|
-
), e = [
|
|
107
|
-
c.SAVINGS_TRACK,
|
|
108
|
-
c.DEBT_TRACK,
|
|
109
|
-
c.RETIREMENT_TRACK
|
|
110
|
-
];
|
|
111
|
-
return t.sort((r, n) => {
|
|
112
|
-
const a = r.track_type ? e.indexOf(r.track_type) : -1, h = n.track_type ? e.indexOf(n.track_type) : -1;
|
|
113
|
-
return a - h;
|
|
114
|
-
}).slice(0, 3);
|
|
115
|
-
}
|
|
116
|
-
addGoal = async (t) => {
|
|
117
|
-
try {
|
|
118
|
-
const e = await this.api.addGoal(t);
|
|
119
|
-
i(() => {
|
|
120
|
-
this.goals = [...this.goals, e];
|
|
121
|
-
});
|
|
122
|
-
} catch (e) {
|
|
123
|
-
console.error(`Error occurred while adding goal: ${e}`);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
addRetirementGoal = async (t) => {
|
|
127
|
-
const e = this.globalStore.copyStore.copy.goals;
|
|
128
|
-
try {
|
|
129
|
-
const r = await this.api.addRetirementGoal(t), n = [];
|
|
130
|
-
for (const a of this.newRetirementGoalAccounts) {
|
|
131
|
-
const h = await this.api.addRetirementGoalAccount({
|
|
132
|
-
...a,
|
|
133
|
-
retirement_goal_guid: r.guid
|
|
134
|
-
});
|
|
135
|
-
n.push(h);
|
|
136
|
-
}
|
|
137
|
-
this.setNewRetirementGoalAccounts([]), i(() => {
|
|
138
|
-
this.goals = [
|
|
139
|
-
...this.goals,
|
|
140
|
-
{
|
|
141
|
-
...r,
|
|
142
|
-
amount: r.target_amount,
|
|
143
|
-
name: e.retirement,
|
|
144
|
-
track_type: c.RETIREMENT_TRACK
|
|
145
|
-
}
|
|
146
|
-
], this.retirementGoalAccounts = [...this.retirementGoalAccounts, ...n];
|
|
147
|
-
});
|
|
148
|
-
} catch (r) {
|
|
149
|
-
console.error(`Error occurred while adding retirement goal: ${r}`);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
addRetirementGoalAccount = async (t) => {
|
|
153
|
-
try {
|
|
154
|
-
const e = await this.api.addRetirementGoalAccount(t);
|
|
155
|
-
i(() => {
|
|
156
|
-
this.retirementGoalAccounts = [...this.retirementGoalAccounts, e];
|
|
157
|
-
});
|
|
158
|
-
} catch (e) {
|
|
159
|
-
console.error(`Error occurred while adding retirement goal account: ${e}`);
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
loadGoals = async () => {
|
|
163
|
-
const t = this.globalStore.copyStore.copy.goals;
|
|
164
|
-
try {
|
|
165
|
-
const e = await this.api.getGoals(), r = await this.api.getRetirementGoals(), n = await this.api.getRetirementGoalAccounts(), a = await this.api.getMonthlyCashFlowProfile(), h = [
|
|
166
|
-
...e,
|
|
167
|
-
...r.map((E) => ({
|
|
168
|
-
...E,
|
|
169
|
-
amount: E.target_amount,
|
|
170
|
-
name: t.retirement,
|
|
171
|
-
track_type: c.RETIREMENT_TRACK
|
|
172
|
-
}))
|
|
173
|
-
];
|
|
174
|
-
i(() => {
|
|
175
|
-
this.goals = h, this.retirementGoalAccounts = n, this.monthlyCashFlowProfile = a, this.goalsLoaded = !0;
|
|
176
|
-
});
|
|
177
|
-
} catch (e) {
|
|
178
|
-
console.error(`Error occured while getting goals: ${e}`);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
deleteGoal = async (t) => {
|
|
182
|
-
try {
|
|
183
|
-
await this.api.removeGoal(t), i(() => {
|
|
184
|
-
const e = this.goals.findIndex((r) => r.guid === t);
|
|
185
|
-
e >= 0 && this.goals.splice(e, 1);
|
|
186
|
-
});
|
|
187
|
-
} catch (e) {
|
|
188
|
-
console.error(`Error occured while deleting goal: ${e}`);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
deleteRetirementGoal = async (t) => {
|
|
192
|
-
try {
|
|
193
|
-
const e = this.retirementGoalAccounts.filter(
|
|
194
|
-
(r) => r.retirement_goal_guid === t.guid
|
|
195
|
-
);
|
|
196
|
-
for (const r of e)
|
|
197
|
-
await this.deleteRetirementGoalAccount(r.guid);
|
|
198
|
-
await this.api.removeRetirementGoal(t.guid), i(() => {
|
|
199
|
-
const r = this.goals.findIndex((n) => n.guid === t.guid);
|
|
200
|
-
r >= 0 && this.goals.splice(r, 1);
|
|
201
|
-
});
|
|
202
|
-
} catch (e) {
|
|
203
|
-
console.error(`Error deleting retirement goal: ${e}`);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
deleteRetirementGoalAccount = async (t) => {
|
|
207
|
-
try {
|
|
208
|
-
await this.api.removeRetirementGoalAccount(t), i(() => {
|
|
209
|
-
const e = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
|
|
210
|
-
e >= 0 && this.retirementGoalAccounts.splice(e, 1);
|
|
211
|
-
});
|
|
212
|
-
} catch (e) {
|
|
213
|
-
console.error(`Error deleting retirement goal account: ${e}`);
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
reorderGoals = async (t) => {
|
|
217
|
-
try {
|
|
218
|
-
const e = await this.api.reorderGoals(t);
|
|
219
|
-
i(() => {
|
|
220
|
-
for (const r of e) {
|
|
221
|
-
const n = this.goals.findIndex((a) => a.guid === r.guid);
|
|
222
|
-
n >= 0 && (this.goals[n].position = r.position);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
} catch (e) {
|
|
226
|
-
console.error(`Error reordering goals: ${e}`);
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
setAlert = (t) => this.alert = t;
|
|
230
|
-
setNewRetirementGoalAccounts = (t) => {
|
|
231
|
-
this.newRetirementGoalAccounts = t;
|
|
232
|
-
};
|
|
233
|
-
setSelectedGoal = (t) => this.selectedGoal = t;
|
|
234
|
-
updateGoal = async (t) => {
|
|
235
|
-
try {
|
|
236
|
-
const e = await this.api.updateGoal(t);
|
|
237
|
-
i(() => {
|
|
238
|
-
const r = this.goals.findIndex((n) => n.guid === t.guid);
|
|
239
|
-
r >= 0 && (this.goals[r] = e), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(e);
|
|
240
|
-
});
|
|
241
|
-
} catch (e) {
|
|
242
|
-
console.error(`Error occurred while updating goal: ${e}`);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
updateMonthlyCashFlowProfile = async (t) => {
|
|
246
|
-
try {
|
|
247
|
-
const e = await this.api.updateMonthlyCashFlowProfile(t);
|
|
248
|
-
i(() => {
|
|
249
|
-
this.monthlyCashFlowProfile = e;
|
|
250
|
-
});
|
|
251
|
-
} catch (e) {
|
|
252
|
-
console.error(`Error occurred while updating monthly Cash Flow profile: ${e}`);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
export {
|
|
257
|
-
V as C,
|
|
258
|
-
S as G,
|
|
259
|
-
L as M,
|
|
260
|
-
c as T,
|
|
261
|
-
m as a,
|
|
262
|
-
k as b
|
|
263
|
-
};
|