@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.0
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 +71 -0
- package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
- package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
- package/dist/Accounts-UIlYCmHb.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-CXvenbdN.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
- package/dist/CategoryStore-BEdFs69_.mjs +183 -0
- package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DZ10CbWd.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
- package/dist/TransactionStore-C1oyQCZK.mjs +677 -0
- package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +241 -203
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +500 -507
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +384 -382
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/charts/index.d.ts +0 -2
- package/dist/common/index.es.js +391 -376
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +506 -498
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-B8qpk5MU.mjs} +14 -13
- package/dist/finstrong/index.es.js +417 -415
- package/dist/goals/index.es.js +559 -557
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +437 -435
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -1
- package/dist/networth/index.es.js +176 -174
- package/dist/notifications/index.es.js +23 -23
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +175 -173
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +285 -279
- package/dist/spending/index.es.js +282 -281
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/index.es.js +63 -64
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/index.es.js +948 -583
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import u from "react";
|
|
3
3
|
import T from "@mui/material/Button";
|
|
4
4
|
import I from "@mui/material/Card";
|
|
5
5
|
import N from "@mui/material/CardContent";
|
|
6
6
|
import O from "@mui/material/CardHeader";
|
|
7
|
-
import
|
|
8
|
-
import { AccountBalance as
|
|
9
|
-
import { Text as
|
|
10
|
-
import { l as
|
|
11
|
-
import { a as
|
|
12
|
-
import { makeAutoObservable as D, runInAction as
|
|
13
|
-
import { F as v, A as i } from "./Fetch-
|
|
7
|
+
import S from "@mui/material/Stack";
|
|
8
|
+
import { AccountBalance as w, ChevronRight as L } from "@mxenabled/mx-icons";
|
|
9
|
+
import { Text as A } from "@mxenabled/mxui";
|
|
10
|
+
import { l as b } from "./ConnectDrawer-CbxHKlRv.mjs";
|
|
11
|
+
import { a as y } from "./hooks-Cy8JnjCg.mjs";
|
|
12
|
+
import { makeAutoObservable as D, runInAction as c } from "mobx";
|
|
13
|
+
import { F as v, A as i } from "./Fetch-DecPFeGU.mjs";
|
|
14
14
|
import { fromUnixTime as G } from "date-fns/fromUnixTime";
|
|
15
|
-
import { addYears as
|
|
16
|
-
import { getUnixTime as
|
|
17
|
-
import { b as
|
|
18
|
-
import { a as
|
|
19
|
-
import { f as B, D as
|
|
20
|
-
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 || {}), $ = /* @__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))($ || {}),
|
|
15
|
+
import { addYears as x } from "date-fns/addYears";
|
|
16
|
+
import { getUnixTime as K } from "date-fns/getUnixTime";
|
|
17
|
+
import { b as E } from "./Localization-2MODESHW.mjs";
|
|
18
|
+
import { a as F } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
19
|
+
import { f as B, D as U } from "./Dialog-CWW597AF.mjs";
|
|
20
|
+
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 || {}), $ = /* @__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))($ || {}), 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 || {});
|
|
21
21
|
const at = ({ description: e, label: t, title: o }) => {
|
|
22
|
-
const { config: r } =
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
22
|
+
const { config: r } = y(), [n, s] = u.useState(!1);
|
|
23
|
+
return /* @__PURE__ */ g(u.Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ g(I, { sx: { m: 24 }, children: [
|
|
25
|
+
/* @__PURE__ */ _(
|
|
26
26
|
O,
|
|
27
27
|
{
|
|
28
|
-
avatar: /* @__PURE__ */
|
|
28
|
+
avatar: /* @__PURE__ */ _(w, {}),
|
|
29
29
|
sx: { ".MuiCardHeader-avatar": { mr: 8 } },
|
|
30
|
-
title: /* @__PURE__ */
|
|
30
|
+
title: /* @__PURE__ */ _(A, { bold: !0, variant: "Body", children: o })
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
r.show_connections_widget_in_master && /* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ _(N, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ g(S, { alignItems: "flex-start", spacing: 2, children: [
|
|
34
|
+
/* @__PURE__ */ _(A, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: e }),
|
|
35
|
+
r.show_connections_widget_in_master && /* @__PURE__ */ _(
|
|
36
36
|
T,
|
|
37
37
|
{
|
|
38
|
-
endIcon: /* @__PURE__ */
|
|
38
|
+
endIcon: /* @__PURE__ */ _(L, {}),
|
|
39
39
|
onClick: () => s(!0),
|
|
40
40
|
sx: {
|
|
41
41
|
pl: 0,
|
|
@@ -49,8 +49,8 @@ const at = ({ description: e, label: t, title: o }) => {
|
|
|
49
49
|
)
|
|
50
50
|
] }) })
|
|
51
51
|
] }),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ _(
|
|
53
|
+
b,
|
|
54
54
|
{
|
|
55
55
|
onClose: () => s(!1),
|
|
56
56
|
showConnectWidget: n,
|
|
@@ -59,7 +59,7 @@ const at = ({ description: e, label: t, title: o }) => {
|
|
|
59
59
|
)
|
|
60
60
|
] });
|
|
61
61
|
};
|
|
62
|
-
class
|
|
62
|
+
class R {
|
|
63
63
|
fetchInstance;
|
|
64
64
|
constructor(t, o, r) {
|
|
65
65
|
this.fetchInstance = new v(t, o, void 0, r);
|
|
@@ -90,12 +90,12 @@ function it(e, t) {
|
|
|
90
90
|
style: "percent",
|
|
91
91
|
minimumFractionDigits: 0,
|
|
92
92
|
maximumFractionDigits: 0
|
|
93
|
-
},
|
|
93
|
+
}, d = t.is_complete ? t.completed_at : t.projected_to_complete_at, m = d ? G(d) : /* @__PURE__ */ new Date(), f = E(
|
|
94
94
|
e.goal_percentage,
|
|
95
|
-
|
|
96
|
-
), p =
|
|
95
|
+
F(r, h)
|
|
96
|
+
), p = E(
|
|
97
97
|
t.is_complete ? e.completed_label : e.goal_projection,
|
|
98
|
-
B(
|
|
98
|
+
B(m, U.MONTH_SHORT_YEAR)
|
|
99
99
|
);
|
|
100
100
|
return {
|
|
101
101
|
backgroundColor: n,
|
|
@@ -116,27 +116,27 @@ function st(e) {
|
|
|
116
116
|
{
|
|
117
117
|
icon: "ecg_heart",
|
|
118
118
|
label: e.saving_goal_emergency_fund,
|
|
119
|
-
metaType:
|
|
119
|
+
metaType: l.EMERGENCY_FUND
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
icon: "directions_car",
|
|
123
123
|
label: e.saving_gaol_automobile,
|
|
124
|
-
metaType:
|
|
124
|
+
metaType: l.AUTOMOBILE
|
|
125
125
|
},
|
|
126
|
-
{ icon: "school", label: e.saving_goal_college, metaType:
|
|
127
|
-
{ icon: "home", label: e.saving_goal_home, metaType:
|
|
126
|
+
{ icon: "school", label: e.saving_goal_college, metaType: l.COLLEGE },
|
|
127
|
+
{ icon: "home", label: e.saving_goal_home, metaType: l.HOUSE },
|
|
128
128
|
{
|
|
129
129
|
icon: "mountain_flag",
|
|
130
130
|
label: e.saving_goal_recreational,
|
|
131
|
-
metaType:
|
|
131
|
+
metaType: l.RECREATIONAL_VEHICLE
|
|
132
132
|
},
|
|
133
|
-
{ icon: "airplane_ticket", label: e.saving_goal_vacation, metaType:
|
|
133
|
+
{ icon: "airplane_ticket", label: e.saving_goal_vacation, metaType: l.VACATION },
|
|
134
134
|
{
|
|
135
135
|
icon: "desktop_windows",
|
|
136
136
|
label: e.saving_goal_electronic,
|
|
137
|
-
metaType:
|
|
137
|
+
metaType: l.ELECTRONIC
|
|
138
138
|
},
|
|
139
|
-
{ icon: "payments", label: e.saving_goal_other, metaType:
|
|
139
|
+
{ icon: "payments", label: e.saving_goal_other, metaType: l.OTHER }
|
|
140
140
|
],
|
|
141
141
|
type: a.SAVINGS_TRACK
|
|
142
142
|
},
|
|
@@ -161,48 +161,31 @@ function st(e) {
|
|
|
161
161
|
const ct = (e, t) => {
|
|
162
162
|
switch (e) {
|
|
163
163
|
case a.DEBT_TRACK:
|
|
164
|
-
return
|
|
164
|
+
return E(t.zero_state_ongoing, "debt");
|
|
165
165
|
case a.SAVINGS_TRACK:
|
|
166
|
-
return
|
|
166
|
+
return E(t.zero_state_ongoing, "saving");
|
|
167
167
|
default:
|
|
168
|
-
return
|
|
168
|
+
return E(t.zero_state_ongoing, "retirement");
|
|
169
169
|
}
|
|
170
|
-
},
|
|
171
|
-
const o = G(t), r =
|
|
172
|
-
return
|
|
170
|
+
}, C = (e, t) => {
|
|
171
|
+
const o = G(t), r = x(o, e);
|
|
172
|
+
return K(r);
|
|
173
173
|
};
|
|
174
174
|
class lt {
|
|
175
175
|
globalStore;
|
|
176
|
-
api = new
|
|
176
|
+
api = new R("/", "");
|
|
177
|
+
alert = "";
|
|
177
178
|
goals = [];
|
|
178
|
-
goalsLoaded = !1;
|
|
179
|
-
retirementGoals = [];
|
|
180
|
-
retirementGoalsLoaded = !1;
|
|
181
179
|
retirementGoalAccounts = [];
|
|
182
|
-
retirementGoalAccountsLoaded = !1;
|
|
183
|
-
monthlyCashFlowProfile = void 0;
|
|
184
|
-
monthlyCashFlowProfileLoaded = !1;
|
|
185
180
|
newRetirementGoalAccounts = [];
|
|
186
|
-
alert = "";
|
|
187
181
|
selectedGoal = void 0;
|
|
182
|
+
monthlyCashFlowProfile = void 0;
|
|
183
|
+
goalsLoaded = !1;
|
|
188
184
|
constructor(t) {
|
|
189
|
-
this.globalStore = t, this.api = new
|
|
190
|
-
}
|
|
191
|
-
get allGoals() {
|
|
192
|
-
const t = this.globalStore.copyStore.copy.goals, o = this.globalStore.userStore.user.birthday;
|
|
193
|
-
return [
|
|
194
|
-
...this.goals,
|
|
195
|
-
...this.retirementGoals.map((r) => ({
|
|
196
|
-
...r,
|
|
197
|
-
amount: r.target_amount,
|
|
198
|
-
name: t.retirement,
|
|
199
|
-
track_type: a.RETIREMENT_TRACK,
|
|
200
|
-
projected_to_complete_at: r.retirement_age && o ? R(r.retirement_age, o) : void 0
|
|
201
|
-
}))
|
|
202
|
-
];
|
|
185
|
+
this.globalStore = t, this.api = new R(t.endpoint, t.sessionToken, t.onError), D(this);
|
|
203
186
|
}
|
|
204
187
|
get orderedGoals() {
|
|
205
|
-
return this.
|
|
188
|
+
return this.goals.slice().sort((t, o) => t.position - o.position);
|
|
206
189
|
}
|
|
207
190
|
get debtGoals() {
|
|
208
191
|
return this.orderedGoals.filter((t) => t.track_type === a.DEBT_TRACK);
|
|
@@ -214,7 +197,7 @@ class lt {
|
|
|
214
197
|
return this.orderedGoals.filter((t) => t.track_type === a.SAVINGS_TRACK);
|
|
215
198
|
}
|
|
216
199
|
get ongoingGoalsForMicroWidget() {
|
|
217
|
-
const t = this.
|
|
200
|
+
const t = this.goals.filter(
|
|
218
201
|
(r) => !r.is_complete && r.track_type !== a.EMERGENCY_FUND_TRACK && r.track_type !== null
|
|
219
202
|
), o = [
|
|
220
203
|
a.SAVINGS_TRACK,
|
|
@@ -226,62 +209,12 @@ class lt {
|
|
|
226
209
|
return s - h;
|
|
227
210
|
}).slice(0, 3);
|
|
228
211
|
}
|
|
229
|
-
setGoals = (t) => {
|
|
230
|
-
this.goals = t, this.goalsLoaded = !0;
|
|
231
|
-
};
|
|
232
|
-
setRetirementGoals = (t) => {
|
|
233
|
-
this.retirementGoals = t, this.retirementGoalsLoaded = !0;
|
|
234
|
-
};
|
|
235
|
-
setRetirementGoalAccounts = (t) => {
|
|
236
|
-
this.retirementGoalAccounts = t, this.retirementGoalAccountsLoaded = !0;
|
|
237
|
-
};
|
|
238
|
-
setMonthlyCashFlowProfile = (t) => {
|
|
239
|
-
this.monthlyCashFlowProfile = t, this.monthlyCashFlowProfileLoaded = !0;
|
|
240
|
-
};
|
|
241
|
-
loadGoalData = async () => {
|
|
242
|
-
await Promise.all([
|
|
243
|
-
this.loadGoals(),
|
|
244
|
-
this.loadRetirementGoals(),
|
|
245
|
-
this.loadRetirementGoalAccounts(),
|
|
246
|
-
this.loadMonthlyCashFlowProfile()
|
|
247
|
-
]);
|
|
248
|
-
};
|
|
249
|
-
loadGoals = async () => {
|
|
250
|
-
try {
|
|
251
|
-
const t = await this.api.getGoals();
|
|
252
|
-
this.setGoals(t);
|
|
253
|
-
} catch (t) {
|
|
254
|
-
console.error(`Error occured while getting goals: ${t}`);
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
loadRetirementGoals = async () => {
|
|
258
|
-
try {
|
|
259
|
-
const t = await this.api.getRetirementGoals();
|
|
260
|
-
this.setRetirementGoals(t);
|
|
261
|
-
} catch (t) {
|
|
262
|
-
console.error(`Error occurred while loading retirement goals: ${t}`);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
loadRetirementGoalAccounts = async () => {
|
|
266
|
-
try {
|
|
267
|
-
const t = await this.api.getRetirementGoalAccounts();
|
|
268
|
-
this.setRetirementGoalAccounts(t);
|
|
269
|
-
} catch (t) {
|
|
270
|
-
console.error(`Error occurred while loading retirement goal accounts: ${t}`);
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
loadMonthlyCashFlowProfile = async () => {
|
|
274
|
-
try {
|
|
275
|
-
const t = await this.api.getMonthlyCashFlowProfile();
|
|
276
|
-
this.setMonthlyCashFlowProfile(t);
|
|
277
|
-
} catch (t) {
|
|
278
|
-
console.error(`Error occurred while loading monthly cash flow profile: ${t}`);
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
212
|
addGoal = async (t) => {
|
|
282
213
|
try {
|
|
283
214
|
const o = await this.api.addGoal(t);
|
|
284
|
-
|
|
215
|
+
c(() => {
|
|
216
|
+
this.goals = [...this.goals, o];
|
|
217
|
+
});
|
|
285
218
|
} catch (o) {
|
|
286
219
|
console.error(`Error occurred while adding goal: ${o}`);
|
|
287
220
|
}
|
|
@@ -291,22 +224,24 @@ class lt {
|
|
|
291
224
|
try {
|
|
292
225
|
const r = await this.api.addRetirementGoal(t), n = [], s = this.globalStore.userStore.user.birthday;
|
|
293
226
|
for (const h of this.newRetirementGoalAccounts) {
|
|
294
|
-
const
|
|
227
|
+
const d = await this.api.addRetirementGoalAccount({
|
|
295
228
|
...h,
|
|
296
229
|
retirement_goal_guid: r.guid
|
|
297
230
|
});
|
|
298
|
-
n.push(
|
|
231
|
+
n.push(d);
|
|
299
232
|
}
|
|
300
|
-
this.setNewRetirementGoalAccounts([]),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
233
|
+
this.setNewRetirementGoalAccounts([]), c(() => {
|
|
234
|
+
this.goals = [
|
|
235
|
+
...this.goals,
|
|
236
|
+
{
|
|
237
|
+
...r,
|
|
238
|
+
amount: r.target_amount,
|
|
239
|
+
name: o.retirement,
|
|
240
|
+
track_type: a.RETIREMENT_TRACK,
|
|
241
|
+
projected_to_complete_at: r.retirement_age && s ? C(r.retirement_age, s) : void 0
|
|
242
|
+
}
|
|
243
|
+
], this.retirementGoalAccounts = [...this.retirementGoalAccounts, ...n];
|
|
244
|
+
});
|
|
310
245
|
} catch (r) {
|
|
311
246
|
console.error(`Error occurred while adding retirement goal: ${r}`);
|
|
312
247
|
}
|
|
@@ -314,18 +249,39 @@ class lt {
|
|
|
314
249
|
addRetirementGoalAccount = async (t) => {
|
|
315
250
|
try {
|
|
316
251
|
const o = await this.api.addRetirementGoalAccount(t);
|
|
317
|
-
|
|
252
|
+
c(() => {
|
|
318
253
|
this.retirementGoalAccounts = [...this.retirementGoalAccounts, o];
|
|
319
254
|
});
|
|
320
255
|
} catch (o) {
|
|
321
256
|
console.error(`Error occurred while adding retirement goal account: ${o}`);
|
|
322
257
|
}
|
|
323
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, d = [
|
|
263
|
+
...o,
|
|
264
|
+
...r.map((m) => ({
|
|
265
|
+
...m,
|
|
266
|
+
amount: m.target_amount,
|
|
267
|
+
name: t.retirement,
|
|
268
|
+
track_type: a.RETIREMENT_TRACK,
|
|
269
|
+
projected_to_complete_at: m.retirement_age && h ? C(m.retirement_age, h) : void 0
|
|
270
|
+
}))
|
|
271
|
+
];
|
|
272
|
+
c(() => {
|
|
273
|
+
this.goals = d, this.retirementGoalAccounts = n, this.monthlyCashFlowProfile = s, this.goalsLoaded = !0;
|
|
274
|
+
});
|
|
275
|
+
} catch (o) {
|
|
276
|
+
console.error(`Error occured while getting goals: ${o}`);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
324
279
|
deleteGoal = async (t) => {
|
|
325
280
|
try {
|
|
326
|
-
await this.api.removeGoal(t)
|
|
327
|
-
|
|
328
|
-
|
|
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
|
+
});
|
|
329
285
|
} catch (o) {
|
|
330
286
|
console.error(`Error occured while deleting goal: ${o}`);
|
|
331
287
|
}
|
|
@@ -333,22 +289,24 @@ class lt {
|
|
|
333
289
|
deleteRetirementGoal = async (t) => {
|
|
334
290
|
try {
|
|
335
291
|
const o = this.retirementGoalAccounts.filter(
|
|
336
|
-
(
|
|
292
|
+
(r) => r.retirement_goal_guid === t.guid
|
|
337
293
|
);
|
|
338
|
-
for (const
|
|
339
|
-
await this.deleteRetirementGoalAccount(
|
|
340
|
-
await this.api.removeRetirementGoal(t.guid)
|
|
341
|
-
|
|
342
|
-
|
|
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
|
+
});
|
|
343
300
|
} catch (o) {
|
|
344
301
|
console.error(`Error deleting retirement goal: ${o}`);
|
|
345
302
|
}
|
|
346
303
|
};
|
|
347
304
|
deleteRetirementGoalAccount = async (t) => {
|
|
348
305
|
try {
|
|
349
|
-
await this.api.removeRetirementGoalAccount(t)
|
|
350
|
-
|
|
351
|
-
|
|
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
|
+
});
|
|
352
310
|
} catch (o) {
|
|
353
311
|
console.error(`Error deleting retirement goal account: ${o}`);
|
|
354
312
|
}
|
|
@@ -356,7 +314,7 @@ class lt {
|
|
|
356
314
|
reorderGoals = async (t) => {
|
|
357
315
|
try {
|
|
358
316
|
const o = await this.api.reorderGoals(t);
|
|
359
|
-
|
|
317
|
+
c(() => {
|
|
360
318
|
for (const r of o) {
|
|
361
319
|
const n = this.goals.findIndex((s) => s.guid === r.guid);
|
|
362
320
|
n >= 0 && (this.goals[n].position = r.position);
|
|
@@ -374,7 +332,7 @@ class lt {
|
|
|
374
332
|
updateGoal = async (t) => {
|
|
375
333
|
try {
|
|
376
334
|
const o = await this.api.updateGoal(t);
|
|
377
|
-
|
|
335
|
+
c(() => {
|
|
378
336
|
const r = this.goals.findIndex((n) => n.guid === t.guid);
|
|
379
337
|
r >= 0 && (this.goals[r] = o), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(o);
|
|
380
338
|
});
|
|
@@ -385,7 +343,9 @@ class lt {
|
|
|
385
343
|
updateMonthlyCashFlowProfile = async (t) => {
|
|
386
344
|
try {
|
|
387
345
|
const o = await this.api.updateMonthlyCashFlowProfile(t);
|
|
388
|
-
|
|
346
|
+
c(() => {
|
|
347
|
+
this.monthlyCashFlowProfile = o;
|
|
348
|
+
});
|
|
389
349
|
} catch (o) {
|
|
390
350
|
console.error(`Error occurred while updating monthly Cash Flow profile: ${o}`);
|
|
391
351
|
}
|
|
@@ -394,11 +354,11 @@ class lt {
|
|
|
394
354
|
export {
|
|
395
355
|
at as C,
|
|
396
356
|
$ as G,
|
|
397
|
-
|
|
357
|
+
l as M,
|
|
398
358
|
a as T,
|
|
399
359
|
ct as a,
|
|
400
360
|
st as b,
|
|
401
|
-
|
|
361
|
+
R as c,
|
|
402
362
|
lt as d,
|
|
403
363
|
it as g
|
|
404
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, A as tt, d as ft, p as St, b as It, a as Tt } from "./hooks-
|
|
16
|
+
import { u as V, A as tt, d as ft, p as St, b as It, a as Tt } from "./hooks-Cy8JnjCg.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";
|
|
@@ -7,7 +7,7 @@ import ut from "@mui/material/useMediaQuery";
|
|
|
7
7
|
import { observer as xt } from "mobx-react-lite";
|
|
8
8
|
import { Stack as u, Box as N, useTheme as ft } from "@mui/material";
|
|
9
9
|
import { Text as l } from "@mxenabled/mxui";
|
|
10
|
-
import { u as gt } from "./hooks-
|
|
10
|
+
import { u as gt } from "./hooks-Cy8JnjCg.mjs";
|
|
11
11
|
import { ChartsTooltip as yt } from "@mui/x-charts/ChartsTooltip";
|
|
12
12
|
const pt = (t) => {
|
|
13
13
|
const r = X(), o = t.showLabel, s = t.style, y = Number(t.x), m = Number(t.y), x = t.handlers?.onMarkClick, f = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, d = ut(r.breakpoints.up("sm")), a = t.valueFormatterString ? b(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), h = d ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, k = h ? parseFloat(h.toString()) * 0.6 : 8, D = a.length * k + 8 + 8, T = 24, $ = y - D / 2, M = m - 30;
|
|
@@ -89,7 +89,7 @@ const pt = (t) => {
|
|
|
89
89
|
customLegendVariant: r
|
|
90
90
|
}) => {
|
|
91
91
|
const o = r || "Small";
|
|
92
|
-
return typeof t == "string" ? /* @__PURE__ */ e(l, { variant: o, children: t }) : typeof t == "object" && t.amount && t.label ? /* @__PURE__ */ i(B, { children: [
|
|
92
|
+
return typeof t == "string" ? /* @__PURE__ */ e(l, { variant: o, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(B, { children: [
|
|
93
93
|
/* @__PURE__ */ e(l, { variant: o, children: t.label }),
|
|
94
94
|
/* @__PURE__ */ e(l, { bold: !0, sx: { marginLeft: 8 }, variant: o, children: b(t.amount, "0,0") })
|
|
95
95
|
] }) : null;
|
|
@@ -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-
|
|
11
|
+
import { u as P } from "./hooks-Cy8JnjCg.mjs";
|
|
12
12
|
const D = v(
|
|
13
13
|
({
|
|
14
14
|
children: n,
|