@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.
Files changed (139) hide show
  1. package/CHANGELOG.md +217 -0
  2. package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
  3. package/dist/Account-CMjOp7S2.mjs +118 -0
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
  8. package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
  9. package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
  10. package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
  11. package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
  12. package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
  13. package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
  14. package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
  16. package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
  17. package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
  19. package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
  21. package/dist/Drawer-Bet2ZPJo.mjs +176 -0
  22. package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
  23. package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
  24. package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
  25. package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
  26. package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
  27. package/dist/LineChart-DHj-Bufi.mjs +580 -0
  28. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
  29. package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
  30. package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
  31. package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
  32. package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
  33. package/dist/NotificationSettings-e789PcRb.mjs +676 -0
  34. package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
  35. package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
  36. package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
  37. package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
  38. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
  39. package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
  40. package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
  41. package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
  42. package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
  43. package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
  44. package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
  45. package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
  46. package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
  48. package/dist/accounts/index.es.js +933 -232
  49. package/dist/accounts/stores/AccountStore.d.ts +6 -2
  50. package/dist/accounts/utils/AccountDetails.d.ts +5 -0
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  53. package/dist/budgets/index.es.js +561 -522
  54. package/dist/cashflow/index.es.js +397 -396
  55. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
  56. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
  57. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
  58. package/dist/categories/components/SubcategoryRow.d.ts +1 -0
  59. package/dist/categories/index.es.js +2 -2
  60. package/dist/categories/stores/CategoryStore.d.ts +5 -3
  61. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  62. package/dist/common/components/WidgetContainer.d.ts +7 -6
  63. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  64. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  65. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  66. package/dist/common/components/index.d.ts +2 -2
  67. package/dist/common/hooks/index.d.ts +1 -0
  68. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  69. package/dist/common/index.es.js +325 -306
  70. package/dist/common/stores/GlobalUiStore.d.ts +7 -4
  71. package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
  72. package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
  73. package/dist/common/types/localization/CommonCopy.d.ts +3 -0
  74. package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
  75. package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
  76. package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
  77. package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
  78. package/dist/dashboard/index.es.js +95 -125
  79. package/dist/debts/index.es.js +466 -460
  80. package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
  81. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  82. package/dist/finstrong/index.es.js +1660 -1553
  83. package/dist/goals/index.es.js +716 -677
  84. package/dist/goals/stores/GoalStore.d.ts +2 -0
  85. package/dist/help/index.es.js +14 -10
  86. package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
  87. package/dist/investments/index.es.js +464 -457
  88. package/dist/merchants/index.es.js +1 -1
  89. package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
  90. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
  91. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
  92. package/dist/microinsights/beaticons/index.d.ts +1 -0
  93. package/dist/microinsights/cards/InsightCard.d.ts +0 -2
  94. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
  95. package/dist/microinsights/index.d.ts +2 -2
  96. package/dist/microinsights/index.es.js +824 -14
  97. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  98. package/dist/networth/components/NetWorthList.d.ts +3 -3
  99. package/dist/networth/index.es.js +433 -438
  100. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  101. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  102. package/dist/notifications/index.es.js +5 -5
  103. package/dist/recurringtransactions/index.es.js +331 -325
  104. package/dist/settings/index.es.js +293 -285
  105. package/dist/spending/components/SpendingChart.d.ts +1 -1
  106. package/dist/spending/components/SpendingList.d.ts +1 -1
  107. package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
  108. package/dist/spending/index.es.js +250 -235
  109. package/dist/transactions/index.es.js +288 -281
  110. package/dist/transactions/stores/TransactionStore.d.ts +5 -0
  111. package/dist/trends/components/TrendsTable.d.ts +0 -2
  112. package/dist/trends/index.es.js +876 -802
  113. package/dist/trends/utils/TrendsData.d.ts +1 -0
  114. package/dist/trends/utils/TrendsTable.d.ts +12 -0
  115. package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
  116. package/dist/useAriaLive-B3_pRUio.mjs +35 -0
  117. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
  118. package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
  119. package/package.json +26 -21
  120. package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
  121. package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
  122. package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
  123. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  124. package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
  125. package/dist/Drawer-Dqe5EqvA.mjs +0 -163
  126. package/dist/LineChart-bc1D9xBE.mjs +0 -581
  127. package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
  128. package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
  129. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  130. package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
  131. package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
  132. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  133. package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
  134. package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
  135. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  136. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  137. package/dist/common/components/accountfilter/index.d.ts +0 -1
  138. package/dist/microinsights/cards/BaseCard.d.ts +0 -13
  139. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -1,41 +1,40 @@
1
- import { jsxs as _, jsx as l } from "react/jsx-runtime";
2
- import u from "react";
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 O from "@mui/material/CardHeader";
7
- import w from "@mui/material/Stack";
8
- import { AccountBalance as S, ChevronRight as L } from "@mxenabled/mx-icons";
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 { l as y } from "./ConnectDrawer-Dn1MlqLz.mjs";
11
- import { a as b } from "./hooks-C41HAxM5.mjs";
12
- import { makeAutoObservable as D, runInAction as E } from "mobx";
13
- import { F as v, A as i } from "./Fetch-DecPFeGU.mjs";
14
- import { fromUnixTime as G } from "date-fns/fromUnixTime";
15
- import { addYears as F } from "date-fns/addYears";
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 B, a as P } from "./Dialog-CDV0kKxj.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))($ || {}), c = /* @__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))(c || {});
21
- const at = ({ description: e, label: t, title: o }) => {
22
- const { config: r } = b(), [n, s] = u.useState(!1);
23
- return /* @__PURE__ */ _(u.Fragment, { children: [
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
- O,
25
+ w,
27
26
  {
28
- avatar: /* @__PURE__ */ l(S, {}),
27
+ avatar: /* @__PURE__ */ l(L, {}),
29
28
  sx: { ".MuiCardHeader-avatar": { mr: 8 } },
30
- title: /* @__PURE__ */ l(g, { bold: !0, variant: "Body", children: o })
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__ */ _(w, { alignItems: "flex-start", spacing: 2, children: [
34
- /* @__PURE__ */ l(g, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: e }),
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(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: n,
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, o, r) {
65
- this.fetchInstance = new v(t, o, void 0, r);
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((o) => o.goal);
68
- addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((o) => o.retirement_goal);
69
- addRetirementGoalAccount = async (t) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, t).then((o) => o.retirement_goal_account);
70
- getGoalByGuid = async (t) => this.fetchInstance.get(`${i.GOALS}/${t}`).then((o) => o.goal);
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((o) => o);
76
- removeRetirementGoal = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${t}`).then((o) => o);
77
- removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((o) => o);
78
- reorderGoals = async (t) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: t }).then((o) => o.goals);
79
- updateGoal = async (t) => this.fetchInstance.put(`${i.GOALS}/${t.guid}`, t).then((o) => o.goal);
80
- updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, t).then((o) => o.monthly_cash_flow_profile);
81
- updateRetirementGoal = async (t) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${t.guid}`, t).then((o) => o.retirement_goal);
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(e, t) {
84
- const o = t.track_type === a.DEBT_TRACK ? t.initial_amount : t.amount;
85
- let r = t.current_amount / o;
86
- r > 1 && (r = 1), r = t.track_type === a.DEBT_TRACK ? 1 - r : r, isNaN(r) && (r = 1);
87
- let n = "chart.chart1", s = "common.black";
88
- t.track_type === a.DEBT_TRACK ? (s = "common.white", n = "chart.chart5") : t.track_type === a.RETIREMENT_TRACK && (n = "chart.chart6");
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, C = m ? G(m) : /* @__PURE__ */ new Date(), f = d(
94
- e.goal_percentage,
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 ? e.completed_label : e.goal_projection,
98
- B(C, P.MONTH_SHORT_YEAR)
97
+ t.is_complete ? o.completed_label : o.goal_projection,
98
+ P(f, B.MONTH_SHORT_YEAR)
99
99
  );
100
100
  return {
101
- backgroundColor: n,
101
+ backgroundColor: a,
102
102
  color: s,
103
103
  percentage: r,
104
- percentageText: f,
104
+ percentageText: C,
105
105
  projectedText: p
106
106
  };
107
107
  }
108
- function st(e) {
108
+ function st(o) {
109
109
  return [
110
110
  {
111
111
  bgcolor: "chart.chart1",
112
112
  icon: "attach_money",
113
- label: e.saving_goal_label,
114
- description: e.saving_goal_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: e.saving_goal_emergency_fund,
118
+ label: o.saving_goal_emergency_fund,
119
119
  metaType: c.EMERGENCY_FUND
120
120
  },
121
121
  {
122
122
  icon: "directions_car",
123
- label: e.saving_gaol_automobile,
123
+ label: o.saving_gaol_automobile,
124
124
  metaType: c.AUTOMOBILE
125
125
  },
126
- { icon: "school", label: e.saving_goal_college, metaType: c.COLLEGE },
127
- { icon: "home", label: e.saving_goal_home, metaType: c.HOUSE },
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: e.saving_goal_recreational,
130
+ label: o.saving_goal_recreational,
131
131
  metaType: c.RECREATIONAL_VEHICLE
132
132
  },
133
- { icon: "airplane_ticket", label: e.saving_goal_vacation, metaType: c.VACATION },
133
+ { icon: "airplane_ticket", label: o.saving_goal_vacation, metaType: c.VACATION },
134
134
  {
135
135
  icon: "desktop_windows",
136
- label: e.saving_goal_electronic,
136
+ label: o.saving_goal_electronic,
137
137
  metaType: c.ELECTRONIC
138
138
  },
139
- { icon: "payments", label: e.saving_goal_other, metaType: c.OTHER }
139
+ { icon: "payments", label: o.saving_goal_other, metaType: c.OTHER }
140
140
  ],
141
- type: a.SAVINGS_TRACK
141
+ type: n.SAVINGS_TRACK
142
142
  },
143
143
  {
144
144
  bgcolor: "chart.chart5",
145
145
  icon: "note_stack",
146
- label: e.debt_goal_label,
147
- description: e.debt_goal_description,
146
+ label: o.debt_goal_label,
147
+ description: o.debt_goal_description,
148
148
  subTypes: [],
149
- type: a.DEBT_TRACK
149
+ type: n.DEBT_TRACK
150
150
  },
151
151
  {
152
152
  bgcolor: "chart.chart6",
153
153
  icon: "person",
154
- label: e.retirement_goal_label,
155
- description: e.retirement_goal_description,
154
+ label: o.retirement_goal_label,
155
+ description: o.retirement_goal_description,
156
156
  subTypes: [],
157
- type: a.RETIREMENT_TRACK
157
+ type: n.RETIREMENT_TRACK
158
158
  }
159
159
  ];
160
160
  }
161
- const ct = (e, t) => {
162
- switch (e) {
163
- case a.DEBT_TRACK:
161
+ const ct = (o, t) => {
162
+ switch (o) {
163
+ case n.DEBT_TRACK:
164
164
  return d(t.zero_state_ongoing, "debt");
165
- case a.SAVINGS_TRACK:
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
- }, R = (e, t) => {
171
- const o = G(t), r = F(o, e);
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
- const t = this.globalStore.copyStore.copy.goals, o = this.globalStore.userStore.user.birthday;
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: a.RETIREMENT_TRACK,
200
- projected_to_complete_at: r.retirement_age && o ? R(r.retirement_age, o) : void 0
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, o) => t.position - o.position);
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 === a.DEBT_TRACK);
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 === a.RETIREMENT_TRACK);
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 === a.SAVINGS_TRACK);
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 !== a.EMERGENCY_FUND_TRACK && r.track_type !== null
219
- ), o = [
220
- a.SAVINGS_TRACK,
221
- a.DEBT_TRACK,
222
- a.RETIREMENT_TRACK
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, n) => {
225
- const s = r.track_type ? o.indexOf(r.track_type) : -1, h = n.track_type ? o.indexOf(n.track_type) : -1;
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 o = await this.api.addGoal(t);
284
- this.setGoals([...this.goals, o]);
285
- } catch (o) {
286
- console.error(`Error occurred while adding goal: ${o}`);
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 o = this.globalStore.copyStore.copy.goals;
294
+ const e = this.globalStore.copyStore.copy.goals;
291
295
  try {
292
- const r = await this.api.addRetirementGoal(t), n = [], s = this.globalStore.userStore.user.birthday;
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
- n.push(m);
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: o.retirement,
306
- track_type: a.RETIREMENT_TRACK,
307
- projected_to_complete_at: r.retirement_age && s ? R(r.retirement_age, s) : void 0
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, ...n]);
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 o = await this.api.addRetirementGoalAccount(t);
317
- E(() => {
318
- this.retirementGoalAccounts = [...this.retirementGoalAccounts, o];
320
+ const e = await this.api.addRetirementGoalAccount(t);
321
+ _(() => {
322
+ this.retirementGoalAccounts = [...this.retirementGoalAccounts, e];
319
323
  });
320
- } catch (o) {
321
- console.error(`Error occurred while adding retirement goal account: ${o}`);
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 o = this.goals.findIndex((r) => r.guid === t);
328
- o >= 0 && this.goals.splice(o, 1);
329
- } catch (o) {
330
- console.error(`Error occured while deleting goal: ${o}`);
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 o = this.retirementGoalAccounts.filter(
336
- (n) => n.retirement_goal_guid === t.guid
339
+ const e = this.retirementGoalAccounts.filter(
340
+ (a) => a.retirement_goal_guid === t.guid
337
341
  );
338
- for (const n of o)
339
- await this.deleteRetirementGoalAccount(n.guid);
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((n) => n.guid === t.guid);
345
+ const r = this.retirementGoals.findIndex((a) => a.guid === t.guid);
342
346
  r >= 0 && this.retirementGoals.splice(r, 1);
343
- } catch (o) {
344
- console.error(`Error deleting retirement goal: ${o}`);
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 o = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
351
- o >= 0 && this.retirementGoalAccounts.splice(o, 1);
352
- } catch (o) {
353
- console.error(`Error deleting retirement goal account: ${o}`);
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 o = await this.api.reorderGoals(t);
359
- E(() => {
360
- for (const r of o) {
361
- const n = this.goals.findIndex((s) => s.guid === r.guid);
362
- n >= 0 && (this.goals[n].position = r.position);
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 (o) {
366
- console.error(`Error reordering goals: ${o}`);
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 o = await this.api.updateGoal(t);
377
- E(() => {
378
- const r = this.goals.findIndex((n) => n.guid === t.guid);
379
- r >= 0 && (this.goals[r] = o), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(o);
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 (o) {
382
- console.error(`Error occurred while updating goal: ${o}`);
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 o = await this.api.updateMonthlyCashFlowProfile(t);
388
- this.setMonthlyCashFlowProfile(o);
389
- } catch (o) {
390
- console.error(`Error occurred while updating monthly Cash Flow profile: ${o}`);
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
- at as C,
413
+ nt as C,
396
414
  $ as G,
397
415
  c as M,
398
- a as T,
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, A as tt, d as ft, p as St, b as It, a as Tt } from "./hooks-C41HAxM5.mjs";
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-Dqe5EqvA.mjs";
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";