@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.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 (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-KpPw1phO.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,41 +1,41 @@
1
- import { jsxs as _, jsx as l } from "react/jsx-runtime";
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 w from "@mui/material/Stack";
8
- import { AccountBalance as S, ChevronRight as L } from "@mxenabled/mx-icons";
9
- import { Text as g } from "@mxenabled/mxui";
10
- import { l as y } from "./ConnectDrawer-DVp54lUH.mjs";
11
- import { a as b } from "./hooks-C41HAxM5.mjs";
12
- import { makeAutoObservable as D, runInAction as E } from "mobx";
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-BkvlItWx.mjs";
11
+ import { a as y } from "./hooks-ZMp65DFz.mjs";
12
+ import { makeAutoObservable as D, runInAction as c } from "mobx";
13
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 F } from "date-fns/addYears";
16
- import { getUnixTime as x } from "date-fns/getUnixTime";
17
- import { b as d } from "./Localization-2MODESHW.mjs";
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 || {});
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-DjTD0t3W.mjs";
19
+ import { f as B, a as U } from "./Dialog-BPTr3qHE.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 } = b(), [n, s] = u.useState(!1);
23
- return /* @__PURE__ */ _(u.Fragment, { children: [
24
- /* @__PURE__ */ _(I, { sx: { m: 24 }, children: [
25
- /* @__PURE__ */ l(
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__ */ l(S, {}),
28
+ avatar: /* @__PURE__ */ _(w, {}),
29
29
  sx: { ".MuiCardHeader-avatar": { mr: 8 } },
30
- title: /* @__PURE__ */ l(g, { bold: !0, variant: "body1", children: o })
30
+ title: /* @__PURE__ */ _(A, { bold: !0, variant: "Body", children: o })
31
31
  }
32
32
  ),
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: "subtitle2", children: e }),
35
- r.show_connections_widget_in_master && /* @__PURE__ */ l(
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__ */ l(L, {}),
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__ */ l(
53
- y,
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 A {
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
- }, m = t.is_complete ? t.completed_at : t.projected_to_complete_at, C = m ? G(m) : /* @__PURE__ */ new Date(), f = d(
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
- K(r, h)
96
- ), p = d(
95
+ F(r, h)
96
+ ), p = E(
97
97
  t.is_complete ? e.completed_label : e.goal_projection,
98
- B(C, P.MONTH_SHORT_YEAR)
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: c.EMERGENCY_FUND
119
+ metaType: l.EMERGENCY_FUND
120
120
  },
121
121
  {
122
122
  icon: "directions_car",
123
123
  label: e.saving_gaol_automobile,
124
- metaType: c.AUTOMOBILE
124
+ metaType: l.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: 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: c.RECREATIONAL_VEHICLE
131
+ metaType: l.RECREATIONAL_VEHICLE
132
132
  },
133
- { icon: "airplane_ticket", label: e.saving_goal_vacation, metaType: c.VACATION },
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: c.ELECTRONIC
137
+ metaType: l.ELECTRONIC
138
138
  },
139
- { icon: "payments", label: e.saving_goal_other, metaType: c.OTHER }
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 d(t.zero_state_ongoing, "debt");
164
+ return E(t.zero_state_ongoing, "debt");
165
165
  case a.SAVINGS_TRACK:
166
- return d(t.zero_state_ongoing, "saving");
166
+ return E(t.zero_state_ongoing, "saving");
167
167
  default:
168
- return d(t.zero_state_ongoing, "retirement");
168
+ return E(t.zero_state_ongoing, "retirement");
169
169
  }
170
- }, R = (e, t) => {
171
- const o = G(t), r = F(o, e);
172
- return x(r);
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 A("/", "");
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 A(t.endpoint, t.sessionToken, t.onError), D(this);
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.allGoals.slice().sort((t, o) => t.position - o.position);
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.allGoals.filter(
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
- this.setGoals([...this.goals, o]);
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 m = await this.api.addRetirementGoalAccount({
227
+ const d = await this.api.addRetirementGoalAccount({
295
228
  ...h,
296
229
  retirement_goal_guid: r.guid
297
230
  });
298
- n.push(m);
231
+ n.push(d);
299
232
  }
300
- this.setNewRetirementGoalAccounts([]), this.retirementGoals = [
301
- ...this.retirementGoals,
302
- {
303
- ...r,
304
- 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
308
- }
309
- ], this.setRetirementGoalAccounts([...this.retirementGoalAccounts, ...n]);
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
- E(() => {
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
- const o = this.goals.findIndex((r) => r.guid === t);
328
- o >= 0 && this.goals.splice(o, 1);
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
- (n) => n.retirement_goal_guid === t.guid
292
+ (r) => r.retirement_goal_guid === t.guid
337
293
  );
338
- for (const n of o)
339
- await this.deleteRetirementGoalAccount(n.guid);
340
- await this.api.removeRetirementGoal(t.guid);
341
- const r = this.retirementGoals.findIndex((n) => n.guid === t.guid);
342
- r >= 0 && this.retirementGoals.splice(r, 1);
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
- const o = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
351
- o >= 0 && this.retirementGoalAccounts.splice(o, 1);
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
- E(() => {
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
- E(() => {
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
- this.setMonthlyCashFlowProfile(o);
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
- c as M,
357
+ l as M,
398
358
  a as T,
399
359
  ct as a,
400
360
  st as b,
401
- A as c,
361
+ R as c,
402
362
  lt as d,
403
363
  it as g
404
364
  };
@@ -0,0 +1,6 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Text as o } from "@mxenabled/mxui";
3
+ const l = (e) => /* @__PURE__ */ r(o, { fontWeight: 600, variant: "Small", children: e.colDef.headerName });
4
+ export {
5
+ l as H
6
+ };
@@ -4,7 +4,7 @@ import { H3 as n } from "@mxenabled/mxui";
4
4
  const s = {
5
5
  text: "Oops! Something went wrong."
6
6
  };
7
- class l extends o.Component {
7
+ class r extends o.Component {
8
8
  state = {
9
9
  hasError: !1
10
10
  };
@@ -18,7 +18,7 @@ class l extends o.Component {
18
18
  return this.state.hasError ? /* @__PURE__ */ i(n, { sx: { pt: 24 }, children: s.text }) : this.props.children;
19
19
  }
20
20
  }
21
- const g = [
21
+ const g = r, d = [
22
22
  {
23
23
  flags: ["show_accounts_widget_in_master"],
24
24
  guid: "accounts",
@@ -222,7 +222,7 @@ const g = [
222
222
  }
223
223
  ]
224
224
  }
225
- ], d = [
225
+ ], _ = [
226
226
  {
227
227
  guid: "personal_information",
228
228
  icon: "person",
@@ -292,7 +292,7 @@ const g = [
292
292
  }
293
293
  ]
294
294
  }
295
- ], _ = [
295
+ ], y = [
296
296
  {
297
297
  type: "external"
298
298
  },
@@ -313,8 +313,8 @@ const g = [
313
313
  }
314
314
  ];
315
315
  export {
316
- l as E,
317
- g as H,
318
- _ as P,
319
- d as a
316
+ g as E,
317
+ d as H,
318
+ y as P,
319
+ _ as a
320
320
  };