@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import E 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
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { AccountBalance as
|
|
6
|
+
import w from "@mui/material/CardHeader";
|
|
7
|
+
import O from "@mui/material/Stack";
|
|
8
|
+
import { AccountBalance as L, ChevronRight as S } from "@mxenabled/mx-icons";
|
|
9
9
|
import { Text as g } from "@mxenabled/mxui";
|
|
10
|
-
import {
|
|
11
|
-
import { a as b } from "./hooks-
|
|
12
|
-
import { makeAutoObservable as D, runInAction as
|
|
13
|
-
import { F
|
|
14
|
-
import { fromUnixTime as
|
|
15
|
-
import { addYears as
|
|
10
|
+
import { b as y } from "./GlobalAccountFilter-BpWlPAl5.mjs";
|
|
11
|
+
import { a as b } from "./hooks-fY_n74f7.mjs";
|
|
12
|
+
import { makeAutoObservable as D, runInAction as _ } from "mobx";
|
|
13
|
+
import { F, A as i } from "./Fetch-DecPFeGU.mjs";
|
|
14
|
+
import { fromUnixTime as R } from "date-fns/fromUnixTime";
|
|
15
|
+
import { addYears as v } from "date-fns/addYears";
|
|
16
16
|
import { getUnixTime as x } from "date-fns/getUnixTime";
|
|
17
17
|
import { b as d } from "./Localization-2MODESHW.mjs";
|
|
18
18
|
import { a as K } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
19
|
-
import { f as
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */ _(I, { sx: { m: 24 }, children: [
|
|
19
|
+
import { f as P, D as B } from "./Dialog-CWymUiuO.mjs";
|
|
20
|
+
const nt = ({ description: o, label: t, title: e }) => {
|
|
21
|
+
const { config: r } = b(), [a, s] = E.useState(!1);
|
|
22
|
+
return /* @__PURE__ */ u(E.Fragment, { children: [
|
|
23
|
+
/* @__PURE__ */ u(I, { sx: { m: 24 }, children: [
|
|
25
24
|
/* @__PURE__ */ l(
|
|
26
|
-
|
|
25
|
+
w,
|
|
27
26
|
{
|
|
28
|
-
avatar: /* @__PURE__ */ l(
|
|
27
|
+
avatar: /* @__PURE__ */ l(L, {}),
|
|
29
28
|
sx: { ".MuiCardHeader-avatar": { mr: 8 } },
|
|
30
|
-
title: /* @__PURE__ */ l(g, { bold: !0, variant: "Body", children:
|
|
29
|
+
title: /* @__PURE__ */ l(g, { bold: !0, variant: "Body", children: e })
|
|
31
30
|
}
|
|
32
31
|
),
|
|
33
|
-
/* @__PURE__ */ l(N, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ l(g, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children:
|
|
32
|
+
/* @__PURE__ */ l(N, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ u(O, { alignItems: "flex-start", spacing: 2, children: [
|
|
33
|
+
/* @__PURE__ */ l(g, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: o }),
|
|
35
34
|
r.show_connections_widget_in_master && /* @__PURE__ */ l(
|
|
36
35
|
T,
|
|
37
36
|
{
|
|
38
|
-
endIcon: /* @__PURE__ */ l(
|
|
37
|
+
endIcon: /* @__PURE__ */ l(S, {}),
|
|
39
38
|
onClick: () => s(!0),
|
|
40
39
|
sx: {
|
|
41
40
|
pl: 0,
|
|
@@ -53,122 +52,123 @@ const at = ({ description: e, label: t, title: o }) => {
|
|
|
53
52
|
y,
|
|
54
53
|
{
|
|
55
54
|
onClose: () => s(!1),
|
|
56
|
-
showConnectWidget:
|
|
55
|
+
showConnectWidget: a,
|
|
57
56
|
title: t
|
|
58
57
|
}
|
|
59
58
|
)
|
|
60
59
|
] });
|
|
61
60
|
};
|
|
61
|
+
var n = /* @__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))(n || {}), $ = /* @__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))($ || {}), c = /* @__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))(c || {});
|
|
62
62
|
class A {
|
|
63
63
|
fetchInstance;
|
|
64
|
-
constructor(t,
|
|
65
|
-
this.fetchInstance = new
|
|
64
|
+
constructor(t, e, r) {
|
|
65
|
+
this.fetchInstance = new F(t, e, void 0, r);
|
|
66
66
|
}
|
|
67
|
-
addGoal = async (t) => this.fetchInstance.post(i.GOALS, t).then((
|
|
68
|
-
addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((
|
|
69
|
-
addRetirementGoalAccount = async (t) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, t).then((
|
|
70
|
-
getGoalByGuid = async (t) => this.fetchInstance.get(`${i.GOALS}/${t}`).then((
|
|
67
|
+
addGoal = async (t) => this.fetchInstance.post(i.GOALS, t).then((e) => e.goal);
|
|
68
|
+
addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((e) => e.retirement_goal);
|
|
69
|
+
addRetirementGoalAccount = async (t) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, t).then((e) => e.retirement_goal_account);
|
|
70
|
+
getGoalByGuid = async (t) => this.fetchInstance.get(`${i.GOALS}/${t}`).then((e) => e.goal);
|
|
71
71
|
getGoals = async () => this.fetchInstance.get(i.GOALS).then((t) => t.goals);
|
|
72
72
|
getMonthlyCashFlowProfile = async () => this.fetchInstance.get(i.MONTHLY_CASH_FLOW_PROFILE).then((t) => t.monthly_cash_flow_profile);
|
|
73
73
|
getRetirementGoals = async () => this.fetchInstance.get(i.RETIREMENT_GOALS).then((t) => t.retirement_goals);
|
|
74
74
|
getRetirementGoalAccounts = async () => this.fetchInstance.get(i.RETIREMENT_GOAL_ACCOUNTS).then((t) => t.retirement_goal_accounts);
|
|
75
|
-
removeGoal = async (t) => this.fetchInstance.delete(`${i.GOALS}/${t}`).then((
|
|
76
|
-
removeRetirementGoal = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${t}`).then((
|
|
77
|
-
removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((
|
|
78
|
-
reorderGoals = async (t) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: t }).then((
|
|
79
|
-
updateGoal = async (t) => this.fetchInstance.put(`${i.GOALS}/${t.guid}`, t).then((
|
|
80
|
-
updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, t).then((
|
|
81
|
-
updateRetirementGoal = async (t) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${t.guid}`, t).then((
|
|
75
|
+
removeGoal = async (t) => this.fetchInstance.delete(`${i.GOALS}/${t}`).then((e) => e);
|
|
76
|
+
removeRetirementGoal = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${t}`).then((e) => e);
|
|
77
|
+
removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((e) => e);
|
|
78
|
+
reorderGoals = async (t) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: t }).then((e) => e.goals);
|
|
79
|
+
updateGoal = async (t) => this.fetchInstance.put(`${i.GOALS}/${t.guid}`, t).then((e) => e.goal);
|
|
80
|
+
updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, t).then((e) => e.monthly_cash_flow_profile);
|
|
81
|
+
updateRetirementGoal = async (t) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${t.guid}`, t).then((e) => e.retirement_goal);
|
|
82
82
|
}
|
|
83
|
-
function it(
|
|
84
|
-
const
|
|
85
|
-
let r = t.current_amount /
|
|
86
|
-
r > 1 && (r = 1), r = t.track_type ===
|
|
87
|
-
let
|
|
88
|
-
t.track_type ===
|
|
83
|
+
function it(o, t) {
|
|
84
|
+
const e = t.track_type === n.DEBT_TRACK ? t.initial_amount : t.amount;
|
|
85
|
+
let r = t.current_amount / e;
|
|
86
|
+
r > 1 && (r = 1), r = t.track_type === n.DEBT_TRACK ? 1 - r : r, isNaN(r) && (r = 1);
|
|
87
|
+
let a = "chart.chart1", s = "common.black";
|
|
88
|
+
t.track_type === n.DEBT_TRACK ? (s = "common.white", a = "chart.chart5") : t.track_type === n.RETIREMENT_TRACK && (a = "chart.chart6");
|
|
89
89
|
const h = {
|
|
90
90
|
style: "percent",
|
|
91
91
|
minimumFractionDigits: 0,
|
|
92
92
|
maximumFractionDigits: 0
|
|
93
|
-
}, m = t.is_complete ? t.completed_at : t.projected_to_complete_at,
|
|
94
|
-
|
|
93
|
+
}, m = t.is_complete ? t.completed_at : t.projected_to_complete_at, f = m ? R(m) : /* @__PURE__ */ new Date(), C = d(
|
|
94
|
+
o.goal_percentage,
|
|
95
95
|
K(r, h)
|
|
96
96
|
), p = d(
|
|
97
|
-
t.is_complete ?
|
|
98
|
-
|
|
97
|
+
t.is_complete ? o.completed_label : o.goal_projection,
|
|
98
|
+
P(f, B.MONTH_SHORT_YEAR)
|
|
99
99
|
);
|
|
100
100
|
return {
|
|
101
|
-
backgroundColor:
|
|
101
|
+
backgroundColor: a,
|
|
102
102
|
color: s,
|
|
103
103
|
percentage: r,
|
|
104
|
-
percentageText:
|
|
104
|
+
percentageText: C,
|
|
105
105
|
projectedText: p
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function st(
|
|
108
|
+
function st(o) {
|
|
109
109
|
return [
|
|
110
110
|
{
|
|
111
111
|
bgcolor: "chart.chart1",
|
|
112
112
|
icon: "attach_money",
|
|
113
|
-
label:
|
|
114
|
-
description:
|
|
113
|
+
label: o.saving_goal_label,
|
|
114
|
+
description: o.saving_goal_description,
|
|
115
115
|
subTypes: [
|
|
116
116
|
{
|
|
117
117
|
icon: "ecg_heart",
|
|
118
|
-
label:
|
|
118
|
+
label: o.saving_goal_emergency_fund,
|
|
119
119
|
metaType: c.EMERGENCY_FUND
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
icon: "directions_car",
|
|
123
|
-
label:
|
|
123
|
+
label: o.saving_gaol_automobile,
|
|
124
124
|
metaType: c.AUTOMOBILE
|
|
125
125
|
},
|
|
126
|
-
{ icon: "school", label:
|
|
127
|
-
{ icon: "home", label:
|
|
126
|
+
{ icon: "school", label: o.saving_goal_college, metaType: c.COLLEGE },
|
|
127
|
+
{ icon: "home", label: o.saving_goal_home, metaType: c.HOUSE },
|
|
128
128
|
{
|
|
129
129
|
icon: "mountain_flag",
|
|
130
|
-
label:
|
|
130
|
+
label: o.saving_goal_recreational,
|
|
131
131
|
metaType: c.RECREATIONAL_VEHICLE
|
|
132
132
|
},
|
|
133
|
-
{ icon: "airplane_ticket", label:
|
|
133
|
+
{ icon: "airplane_ticket", label: o.saving_goal_vacation, metaType: c.VACATION },
|
|
134
134
|
{
|
|
135
135
|
icon: "desktop_windows",
|
|
136
|
-
label:
|
|
136
|
+
label: o.saving_goal_electronic,
|
|
137
137
|
metaType: c.ELECTRONIC
|
|
138
138
|
},
|
|
139
|
-
{ icon: "payments", label:
|
|
139
|
+
{ icon: "payments", label: o.saving_goal_other, metaType: c.OTHER }
|
|
140
140
|
],
|
|
141
|
-
type:
|
|
141
|
+
type: n.SAVINGS_TRACK
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
bgcolor: "chart.chart5",
|
|
145
145
|
icon: "note_stack",
|
|
146
|
-
label:
|
|
147
|
-
description:
|
|
146
|
+
label: o.debt_goal_label,
|
|
147
|
+
description: o.debt_goal_description,
|
|
148
148
|
subTypes: [],
|
|
149
|
-
type:
|
|
149
|
+
type: n.DEBT_TRACK
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
bgcolor: "chart.chart6",
|
|
153
153
|
icon: "person",
|
|
154
|
-
label:
|
|
155
|
-
description:
|
|
154
|
+
label: o.retirement_goal_label,
|
|
155
|
+
description: o.retirement_goal_description,
|
|
156
156
|
subTypes: [],
|
|
157
|
-
type:
|
|
157
|
+
type: n.RETIREMENT_TRACK
|
|
158
158
|
}
|
|
159
159
|
];
|
|
160
160
|
}
|
|
161
|
-
const ct = (
|
|
162
|
-
switch (
|
|
163
|
-
case
|
|
161
|
+
const ct = (o, t) => {
|
|
162
|
+
switch (o) {
|
|
163
|
+
case n.DEBT_TRACK:
|
|
164
164
|
return d(t.zero_state_ongoing, "debt");
|
|
165
|
-
case
|
|
165
|
+
case n.SAVINGS_TRACK:
|
|
166
166
|
return d(t.zero_state_ongoing, "saving");
|
|
167
167
|
default:
|
|
168
168
|
return d(t.zero_state_ongoing, "retirement");
|
|
169
169
|
}
|
|
170
|
-
},
|
|
171
|
-
const
|
|
170
|
+
}, G = (o, t) => {
|
|
171
|
+
const e = R(t), r = v(e, o);
|
|
172
172
|
return x(r);
|
|
173
173
|
};
|
|
174
174
|
class lt {
|
|
@@ -189,43 +189,47 @@ class lt {
|
|
|
189
189
|
this.globalStore = t, this.api = new A(t.endpoint, t.sessionToken, t.onError), D(this);
|
|
190
190
|
}
|
|
191
191
|
get allGoals() {
|
|
192
|
-
|
|
192
|
+
if (!this.isAllGoalDataLoaded) return [];
|
|
193
|
+
const t = this.globalStore.copyStore.copy.goals, e = this.globalStore.userStore.user.birthday;
|
|
193
194
|
return [
|
|
194
195
|
...this.goals,
|
|
195
196
|
...this.retirementGoals.map((r) => ({
|
|
196
197
|
...r,
|
|
197
198
|
amount: r.target_amount,
|
|
198
199
|
name: t.retirement,
|
|
199
|
-
track_type:
|
|
200
|
-
projected_to_complete_at: r.retirement_age &&
|
|
200
|
+
track_type: n.RETIREMENT_TRACK,
|
|
201
|
+
projected_to_complete_at: r.retirement_age && e ? G(r.retirement_age, e) : void 0
|
|
201
202
|
}))
|
|
202
203
|
];
|
|
203
204
|
}
|
|
204
205
|
get orderedGoals() {
|
|
205
|
-
return this.allGoals.slice().sort((t,
|
|
206
|
+
return this.allGoals.slice().sort((t, e) => t.position - e.position);
|
|
206
207
|
}
|
|
207
208
|
get debtGoals() {
|
|
208
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
209
|
+
return this.orderedGoals.filter((t) => t.track_type === n.DEBT_TRACK);
|
|
209
210
|
}
|
|
210
211
|
get retirmentGoals() {
|
|
211
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
212
|
+
return this.orderedGoals.filter((t) => t.track_type === n.RETIREMENT_TRACK);
|
|
212
213
|
}
|
|
213
214
|
get savingGoals() {
|
|
214
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
215
|
+
return this.orderedGoals.filter((t) => t.track_type === n.SAVINGS_TRACK);
|
|
215
216
|
}
|
|
216
217
|
get ongoingGoalsForMicroWidget() {
|
|
217
218
|
const t = this.allGoals.filter(
|
|
218
|
-
(r) => !r.is_complete && r.track_type !==
|
|
219
|
-
),
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
(r) => !r.is_complete && r.track_type !== n.EMERGENCY_FUND_TRACK && r.track_type !== null
|
|
220
|
+
), e = [
|
|
221
|
+
n.SAVINGS_TRACK,
|
|
222
|
+
n.DEBT_TRACK,
|
|
223
|
+
n.RETIREMENT_TRACK
|
|
223
224
|
];
|
|
224
|
-
return t.sort((r,
|
|
225
|
-
const s = r.track_type ?
|
|
225
|
+
return t.sort((r, a) => {
|
|
226
|
+
const s = r.track_type ? e.indexOf(r.track_type) : -1, h = a.track_type ? e.indexOf(a.track_type) : -1;
|
|
226
227
|
return s - h;
|
|
227
228
|
}).slice(0, 3);
|
|
228
229
|
}
|
|
230
|
+
get isAllGoalDataLoaded() {
|
|
231
|
+
return this.goalsLoaded && this.retirementGoalsLoaded && this.retirementGoalAccountsLoaded && this.monthlyCashFlowProfileLoaded;
|
|
232
|
+
}
|
|
229
233
|
setGoals = (t) => {
|
|
230
234
|
this.goals = t, this.goalsLoaded = !0;
|
|
231
235
|
};
|
|
@@ -280,90 +284,90 @@ class lt {
|
|
|
280
284
|
};
|
|
281
285
|
addGoal = async (t) => {
|
|
282
286
|
try {
|
|
283
|
-
const
|
|
284
|
-
this.setGoals([...this.goals,
|
|
285
|
-
} catch (
|
|
286
|
-
console.error(`Error occurred while adding goal: ${
|
|
287
|
+
const e = await this.api.addGoal(t);
|
|
288
|
+
this.setGoals([...this.goals, e]);
|
|
289
|
+
} catch (e) {
|
|
290
|
+
console.error(`Error occurred while adding goal: ${e}`);
|
|
287
291
|
}
|
|
288
292
|
};
|
|
289
293
|
addRetirementGoal = async (t) => {
|
|
290
|
-
const
|
|
294
|
+
const e = this.globalStore.copyStore.copy.goals;
|
|
291
295
|
try {
|
|
292
|
-
const r = await this.api.addRetirementGoal(t),
|
|
296
|
+
const r = await this.api.addRetirementGoal(t), a = [], s = this.globalStore.userStore.user.birthday;
|
|
293
297
|
for (const h of this.newRetirementGoalAccounts) {
|
|
294
298
|
const m = await this.api.addRetirementGoalAccount({
|
|
295
299
|
...h,
|
|
296
300
|
retirement_goal_guid: r.guid
|
|
297
301
|
});
|
|
298
|
-
|
|
302
|
+
a.push(m);
|
|
299
303
|
}
|
|
300
304
|
this.setNewRetirementGoalAccounts([]), this.retirementGoals = [
|
|
301
305
|
...this.retirementGoals,
|
|
302
306
|
{
|
|
303
307
|
...r,
|
|
304
308
|
amount: r.target_amount,
|
|
305
|
-
name:
|
|
306
|
-
track_type:
|
|
307
|
-
projected_to_complete_at: r.retirement_age && s ?
|
|
309
|
+
name: e.retirement,
|
|
310
|
+
track_type: n.RETIREMENT_TRACK,
|
|
311
|
+
projected_to_complete_at: r.retirement_age && s ? G(r.retirement_age, s) : void 0
|
|
308
312
|
}
|
|
309
|
-
], this.setRetirementGoalAccounts([...this.retirementGoalAccounts, ...
|
|
313
|
+
], this.setRetirementGoalAccounts([...this.retirementGoalAccounts, ...a]);
|
|
310
314
|
} catch (r) {
|
|
311
315
|
console.error(`Error occurred while adding retirement goal: ${r}`);
|
|
312
316
|
}
|
|
313
317
|
};
|
|
314
318
|
addRetirementGoalAccount = async (t) => {
|
|
315
319
|
try {
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
this.retirementGoalAccounts = [...this.retirementGoalAccounts,
|
|
320
|
+
const e = await this.api.addRetirementGoalAccount(t);
|
|
321
|
+
_(() => {
|
|
322
|
+
this.retirementGoalAccounts = [...this.retirementGoalAccounts, e];
|
|
319
323
|
});
|
|
320
|
-
} catch (
|
|
321
|
-
console.error(`Error occurred while adding retirement goal account: ${
|
|
324
|
+
} catch (e) {
|
|
325
|
+
console.error(`Error occurred while adding retirement goal account: ${e}`);
|
|
322
326
|
}
|
|
323
327
|
};
|
|
324
328
|
deleteGoal = async (t) => {
|
|
325
329
|
try {
|
|
326
330
|
await this.api.removeGoal(t);
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
} catch (
|
|
330
|
-
console.error(`Error occured while deleting goal: ${
|
|
331
|
+
const e = this.goals.findIndex((r) => r.guid === t);
|
|
332
|
+
e >= 0 && this.goals.splice(e, 1);
|
|
333
|
+
} catch (e) {
|
|
334
|
+
console.error(`Error occured while deleting goal: ${e}`);
|
|
331
335
|
}
|
|
332
336
|
};
|
|
333
337
|
deleteRetirementGoal = async (t) => {
|
|
334
338
|
try {
|
|
335
|
-
const
|
|
336
|
-
(
|
|
339
|
+
const e = this.retirementGoalAccounts.filter(
|
|
340
|
+
(a) => a.retirement_goal_guid === t.guid
|
|
337
341
|
);
|
|
338
|
-
for (const
|
|
339
|
-
await this.deleteRetirementGoalAccount(
|
|
342
|
+
for (const a of e)
|
|
343
|
+
await this.deleteRetirementGoalAccount(a.guid);
|
|
340
344
|
await this.api.removeRetirementGoal(t.guid);
|
|
341
|
-
const r = this.retirementGoals.findIndex((
|
|
345
|
+
const r = this.retirementGoals.findIndex((a) => a.guid === t.guid);
|
|
342
346
|
r >= 0 && this.retirementGoals.splice(r, 1);
|
|
343
|
-
} catch (
|
|
344
|
-
console.error(`Error deleting retirement goal: ${
|
|
347
|
+
} catch (e) {
|
|
348
|
+
console.error(`Error deleting retirement goal: ${e}`);
|
|
345
349
|
}
|
|
346
350
|
};
|
|
347
351
|
deleteRetirementGoalAccount = async (t) => {
|
|
348
352
|
try {
|
|
349
353
|
await this.api.removeRetirementGoalAccount(t);
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
} catch (
|
|
353
|
-
console.error(`Error deleting retirement goal account: ${
|
|
354
|
+
const e = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
|
|
355
|
+
e >= 0 && this.retirementGoalAccounts.splice(e, 1);
|
|
356
|
+
} catch (e) {
|
|
357
|
+
console.error(`Error deleting retirement goal account: ${e}`);
|
|
354
358
|
}
|
|
355
359
|
};
|
|
356
360
|
reorderGoals = async (t) => {
|
|
357
361
|
try {
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
for (const r of
|
|
361
|
-
const
|
|
362
|
-
|
|
362
|
+
const e = await this.api.reorderGoals(t);
|
|
363
|
+
_(() => {
|
|
364
|
+
for (const r of e) {
|
|
365
|
+
const a = this.goals.findIndex((s) => s.guid === r.guid);
|
|
366
|
+
a >= 0 && (this.goals[a].position = r.position);
|
|
363
367
|
}
|
|
364
368
|
});
|
|
365
|
-
} catch (
|
|
366
|
-
console.error(`Error reordering goals: ${
|
|
369
|
+
} catch (e) {
|
|
370
|
+
console.error(`Error reordering goals: ${e}`);
|
|
367
371
|
}
|
|
368
372
|
};
|
|
369
373
|
setAlert = (t) => this.alert = t;
|
|
@@ -373,29 +377,43 @@ class lt {
|
|
|
373
377
|
setSelectedGoal = (t) => this.selectedGoal = t;
|
|
374
378
|
updateGoal = async (t) => {
|
|
375
379
|
try {
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
const r = this.goals.findIndex((
|
|
379
|
-
r >= 0 && (this.goals[r] =
|
|
380
|
+
const e = await this.api.updateGoal(t);
|
|
381
|
+
_(() => {
|
|
382
|
+
const r = this.goals.findIndex((a) => a.guid === t.guid);
|
|
383
|
+
r >= 0 && (this.goals[r] = e), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(e);
|
|
384
|
+
});
|
|
385
|
+
} catch (e) {
|
|
386
|
+
console.error(`Error occurred while updating goal: ${e}`);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
updateRetirementGoal = async (t) => {
|
|
390
|
+
try {
|
|
391
|
+
const e = await this.api.updateRetirementGoal({
|
|
392
|
+
...t,
|
|
393
|
+
target_amount: t.amount
|
|
394
|
+
});
|
|
395
|
+
_(() => {
|
|
396
|
+
const r = this.retirementGoals.findIndex((a) => a.guid === t.guid);
|
|
397
|
+
r >= 0 && (this.retirementGoals[r] = e), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(this.allGoals.find((a) => a.guid === t.guid));
|
|
380
398
|
});
|
|
381
|
-
} catch (
|
|
382
|
-
console.error(`Error occurred while updating goal: ${
|
|
399
|
+
} catch (e) {
|
|
400
|
+
console.error(`Error occurred while updating goal: ${e}`);
|
|
383
401
|
}
|
|
384
402
|
};
|
|
385
403
|
updateMonthlyCashFlowProfile = async (t) => {
|
|
386
404
|
try {
|
|
387
|
-
const
|
|
388
|
-
this.setMonthlyCashFlowProfile(
|
|
389
|
-
} catch (
|
|
390
|
-
console.error(`Error occurred while updating monthly Cash Flow profile: ${
|
|
405
|
+
const e = await this.api.updateMonthlyCashFlowProfile(t);
|
|
406
|
+
this.setMonthlyCashFlowProfile(e);
|
|
407
|
+
} catch (e) {
|
|
408
|
+
console.error(`Error occurred while updating monthly Cash Flow profile: ${e}`);
|
|
391
409
|
}
|
|
392
410
|
};
|
|
393
411
|
}
|
|
394
412
|
export {
|
|
395
|
-
|
|
413
|
+
nt as C,
|
|
396
414
|
$ as G,
|
|
397
415
|
c as M,
|
|
398
|
-
|
|
416
|
+
n as T,
|
|
399
417
|
ct as a,
|
|
400
418
|
st as b,
|
|
401
419
|
A as c,
|
|
@@ -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,
|
|
16
|
+
import { u as V, B as tt, d as ft, o as St, b as It, a as Tt } from "./hooks-fY_n74f7.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-c-zHlDbv.mjs";
|
|
@@ -21,7 +21,7 @@ import { observer as rt } from "mobx-react-lite";
|
|
|
21
21
|
import at from "@mui/material/Alert";
|
|
22
22
|
import ct from "@mui/material/Snackbar";
|
|
23
23
|
import lt from "@mui/material/TextField";
|
|
24
|
-
import { D as U } from "./Drawer-
|
|
24
|
+
import { D as U } from "./Drawer-Bet2ZPJo.mjs";
|
|
25
25
|
import { L as dt } from "./Loader-BSWSYqvn.mjs";
|
|
26
26
|
import Nt from "@mui/material/ListItemAvatar";
|
|
27
27
|
import Ot from "@mui/material/ListItem";
|