@mx-cartographer/experiences 8.0.24 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +8 -9
  2. package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
  3. package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
  4. package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
  5. package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
  6. package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
  7. package/dist/Analytics-CjZ0emfs.mjs +53 -0
  8. package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
  9. package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
  10. package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
  11. package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
  12. package/dist/CategoryApi-CogDFScz.mjs +29 -0
  13. package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
  14. package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
  15. package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
  16. package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
  17. package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
  18. package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
  19. package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
  20. package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
  21. package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
  22. package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
  23. package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
  24. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
  25. package/dist/Goal-MFBpoOIC.mjs +29 -0
  26. package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
  27. package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
  28. package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
  29. package/dist/Localization-C_HZg9tJ.mjs +15 -0
  30. package/dist/Localization-CkQ49EKr.mjs +26 -0
  31. package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
  32. package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
  33. package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
  34. package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
  35. package/dist/NotificationApi-DF0obHoR.mjs +20 -0
  36. package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
  37. package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
  38. package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
  39. package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
  40. package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
  41. package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
  42. package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
  43. package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
  44. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
  45. package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
  46. package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
  47. package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
  48. package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
  49. package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
  50. package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
  51. package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
  52. package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
  53. package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
  54. package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
  55. package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
  56. package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
  57. package/dist/accounts/index.d.ts +0 -1
  58. package/dist/accounts/index.es.js +63 -65
  59. package/dist/accounts/stores/AccountStore.d.ts +1 -1
  60. package/dist/budgets/index.es.js +11 -11
  61. package/dist/budgets/store/BudgetsStore.d.ts +1 -1
  62. package/dist/cashflow/index.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +428 -449
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  66. package/dist/common/components/Error.d.ts +11 -0
  67. package/dist/common/components/index.d.ts +1 -0
  68. package/dist/common/constants/index.d.ts +0 -1
  69. package/dist/common/index.d.ts +0 -1
  70. package/dist/common/index.es.js +391 -492
  71. package/dist/common/stores/AppDataStore.d.ts +2 -2
  72. package/dist/common/stores/ConnectStore.d.ts +1 -1
  73. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  74. package/dist/common/stores/UserStore.d.ts +1 -1
  75. package/dist/common/utils/Localization.d.ts +0 -9
  76. package/dist/common/utils/index.d.ts +1 -2
  77. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  78. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  79. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  80. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  81. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  82. package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
  83. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  84. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  85. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  86. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  87. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  88. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  89. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  90. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  91. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
  92. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  93. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
  94. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  95. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  96. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  97. package/dist/core/api/index.d.ts +20 -0
  98. package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
  99. package/dist/core/constants/index.d.ts +1 -0
  100. package/dist/core/index.d.ts +2 -0
  101. package/dist/core/index.es.js +90 -38
  102. package/dist/{common → core}/utils/Fetch.d.ts +1 -1
  103. package/dist/core/utils/Localization.d.ts +9 -0
  104. package/dist/core/utils/index.d.ts +2 -0
  105. package/dist/debts/index.es.js +7 -7
  106. package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
  107. package/dist/finstrong/index.d.ts +0 -1
  108. package/dist/finstrong/index.es.js +16 -17
  109. package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
  110. package/dist/goals/index.d.ts +0 -1
  111. package/dist/goals/index.es.js +50 -51
  112. package/dist/goals/stores/GoalStore.d.ts +1 -1
  113. package/dist/help/index.es.js +2 -2
  114. package/dist/help/store/HelpStore.d.ts +1 -1
  115. package/dist/insights/index.es.js +6 -6
  116. package/dist/insights/store/BeatStore.d.ts +1 -1
  117. package/dist/investments/index.es.js +2 -2
  118. package/dist/investments/stores/HoldingStore.d.ts +1 -1
  119. package/dist/merchants/index.es.js +1 -1
  120. package/dist/merchants/stores/MerchantStore.d.ts +1 -1
  121. package/dist/microinsights/index.es.js +1 -1
  122. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  123. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  124. package/dist/networth/index.es.js +8 -8
  125. package/dist/networth/stores/NetWorthStore.d.ts +1 -1
  126. package/dist/notifications/index.es.js +5 -5
  127. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  128. package/dist/recurringtransactions/index.es.js +26 -25
  129. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
  130. package/dist/settings/index.d.ts +0 -1
  131. package/dist/settings/index.es.js +65 -66
  132. package/dist/settings/stores/SettingsStore.d.ts +2 -2
  133. package/dist/spending/index.es.js +6 -6
  134. package/dist/transactions/index.d.ts +0 -1
  135. package/dist/transactions/index.es.js +22 -24
  136. package/dist/transactions/stores/TransactionStore.d.ts +3 -2
  137. package/dist/trends/index.es.js +14 -14
  138. package/package.json +1 -1
  139. package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
  140. package/dist/Goal-0loDagc5.mjs +0 -6
  141. package/dist/Localization-CPkpIwIx.mjs +0 -37
  142. package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
  143. package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
  144. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  145. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  146. package/dist/common/api/index.d.ts +0 -10
  147. package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
  148. package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
@@ -1,40 +1,39 @@
1
- import { jsxs as g, jsx as c } from "react/jsx-runtime";
2
- import _ from "react";
3
- import E from "@mui/material/Button";
4
- import C from "@mui/material/Card";
5
- import w from "@mui/material/CardContent";
6
- import I from "@mui/material/CardHeader";
1
+ import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
+ import g from "react";
3
+ import A from "@mui/material/Button";
4
+ import w from "@mui/material/Card";
5
+ import C from "@mui/material/CardContent";
6
+ import E from "@mui/material/CardHeader";
7
7
  import b from "@mui/material/Stack";
8
- import { AccountBalance as S, ChevronRight as L } from "@mxenabled/mx-icons";
8
+ import { AccountBalance as x, ChevronRight as v } from "@mxenabled/mx-icons";
9
9
  import { Text as p } from "@mxenabled/mxui";
10
- import { C as O } from "./ConnectDrawer-C0wjwcJt.mjs";
11
- import { makeAutoObservable as x, runInAction as u } from "mobx";
12
- import { F as N, A as i } from "./Fetch-B6tMJC1r.mjs";
13
- import { fromUnixTime as y } from "date-fns/fromUnixTime";
14
- import { addYears as M } from "date-fns/addYears";
15
- import { getUnixTime as v } from "date-fns/getUnixTime";
16
- import { T as n, M as l } from "./Goal-0loDagc5.mjs";
17
- import { b as d } from "./Localization-CPkpIwIx.mjs";
18
- import { a as F } from "./NumberFormatting-QCaNwbjv.mjs";
19
- import { f as $, D } from "./DateFormats-BMpMrZpW.mjs";
20
- const re = ({ description: a, label: e, title: t }) => {
21
- const [o, r] = _.useState(!1);
22
- return /* @__PURE__ */ g(_.Fragment, { children: [
23
- /* @__PURE__ */ g(C, { sx: { m: 24 }, children: [
24
- /* @__PURE__ */ c(
25
- I,
10
+ import { C as I } from "./ConnectDrawer-C0wjwcJt.mjs";
11
+ import { makeAutoObservable as S, runInAction as h } from "mobx";
12
+ import { T as i, M as l, G as _ } from "./Goal-MFBpoOIC.mjs";
13
+ import { fromUnixTime as f } from "date-fns/fromUnixTime";
14
+ import { addYears as D } from "date-fns/addYears";
15
+ import { getUnixTime as k } from "date-fns/getUnixTime";
16
+ import { b as d } from "./Localization-CkQ49EKr.mjs";
17
+ import { a as M } from "./NumberFormatting-CyrvFgfd.mjs";
18
+ import { f as N, D as F } from "./DateFormats-CaOj_4eI.mjs";
19
+ const ee = ({ description: a, label: e, title: t }) => {
20
+ const [o, r] = g.useState(!1);
21
+ return /* @__PURE__ */ u(g.Fragment, { children: [
22
+ /* @__PURE__ */ u(w, { sx: { m: 24 }, children: [
23
+ /* @__PURE__ */ s(
24
+ E,
26
25
  {
27
- avatar: /* @__PURE__ */ c(S, {}),
26
+ avatar: /* @__PURE__ */ s(x, {}),
28
27
  sx: { ".MuiCardHeader-avatar": { mr: 8 } },
29
- title: /* @__PURE__ */ c(p, { bold: !0, variant: "body1", children: t })
28
+ title: /* @__PURE__ */ s(p, { bold: !0, variant: "body1", children: t })
30
29
  }
31
30
  ),
32
- /* @__PURE__ */ c(w, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ g(b, { alignItems: "flex-start", spacing: 2, children: [
33
- /* @__PURE__ */ c(p, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: a }),
34
- /* @__PURE__ */ c(
35
- E,
31
+ /* @__PURE__ */ s(C, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ u(b, { alignItems: "flex-start", spacing: 2, children: [
32
+ /* @__PURE__ */ s(p, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: a }),
33
+ /* @__PURE__ */ s(
34
+ A,
36
35
  {
37
- endIcon: /* @__PURE__ */ c(L, {}),
36
+ endIcon: /* @__PURE__ */ s(v, {}),
38
37
  onClick: () => r(!0),
39
38
  sx: {
40
39
  pl: 0,
@@ -48,8 +47,8 @@ const re = ({ description: a, label: e, title: t }) => {
48
47
  )
49
48
  ] }) })
50
49
  ] }),
51
- /* @__PURE__ */ c(
52
- O,
50
+ /* @__PURE__ */ s(
51
+ I,
53
52
  {
54
53
  onClose: () => r(!1),
55
54
  showConnectWidget: o,
@@ -58,53 +57,32 @@ const re = ({ description: a, label: e, title: t }) => {
58
57
  )
59
58
  ] });
60
59
  };
61
- class G {
62
- fetchInstance;
63
- constructor(e, t, o) {
64
- this.fetchInstance = new N(e, t, void 0, o);
65
- }
66
- addGoal = async (e) => this.fetchInstance.post(i.GOALS, e).then((t) => t.goal);
67
- addRetirementGoal = async (e) => this.fetchInstance.post(i.RETIREMENT_GOALS, e).then((t) => t.retirement_goal);
68
- addRetirementGoalAccount = async (e) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, e).then((t) => t.retirement_goal_account);
69
- getGoalByGuid = async (e) => this.fetchInstance.get(`${i.GOALS}/${e}`).then((t) => t.goal);
70
- getGoals = async () => this.fetchInstance.get(i.GOALS).then((e) => e.goals);
71
- getMonthlyCashFlowProfile = async () => this.fetchInstance.get(i.MONTHLY_CASH_FLOW_PROFILE).then((e) => e.monthly_cash_flow_profile);
72
- getRetirementGoals = async () => this.fetchInstance.get(i.RETIREMENT_GOALS).then((e) => e.retirement_goals);
73
- getRetirementGoalAccounts = async () => this.fetchInstance.get(i.RETIREMENT_GOAL_ACCOUNTS).then((e) => e.retirement_goal_accounts);
74
- removeGoal = async (e) => this.fetchInstance.delete(`${i.GOALS}/${e}`).then((t) => t);
75
- removeRetirementGoal = async (e) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${e}`).then((t) => t);
76
- removeRetirementGoalAccount = async (e) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${e}`).then((t) => t);
77
- reorderGoals = async (e) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: e }).then((t) => t.goals);
78
- updateGoal = async (e) => this.fetchInstance.put(`${i.GOALS}/${e.guid}`, e).then((t) => t.goal);
79
- updateMonthlyCashFlowProfile = async (e) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, e).then((t) => t.monthly_cash_flow_profile);
80
- updateRetirementGoal = async (e) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${e.guid}`, e).then((t) => t.retirement_goal);
81
- }
82
- function ae(a, e) {
83
- const t = e.track_type === n.DEBT_TRACK ? e.initial_amount : e.amount;
60
+ function te(a, e) {
61
+ const t = e.track_type === i.DEBT_TRACK ? e.initial_amount : e.amount;
84
62
  let o = e.current_amount / t;
85
- o > 1 && (o = 1), o = e.track_type === n.DEBT_TRACK ? 1 - o : o, isNaN(o) && (o = 1);
86
- let r = "chart.chart1", s = "common.black";
87
- e.track_type === n.DEBT_TRACK ? (s = "common.white", r = "chart.chart5") : e.track_type === n.RETIREMENT_TRACK && (r = "chart.chart6");
88
- const h = {
63
+ o > 1 && (o = 1), o = e.track_type === i.DEBT_TRACK ? 1 - o : o, isNaN(o) && (o = 1);
64
+ let r = "chart.chart1", n = "common.black";
65
+ e.track_type === i.DEBT_TRACK ? (n = "common.white", r = "chart.chart5") : e.track_type === i.RETIREMENT_TRACK && (r = "chart.chart6");
66
+ const c = {
89
67
  style: "percent",
90
68
  minimumFractionDigits: 0,
91
69
  maximumFractionDigits: 0
92
- }, m = e.is_complete ? e.completed_at : e.projected_to_complete_at, R = m ? y(m) : /* @__PURE__ */ new Date(), A = d(
70
+ }, m = e.is_complete ? e.completed_at : e.projected_to_complete_at, y = m ? f(m) : /* @__PURE__ */ new Date(), R = d(
93
71
  a.goal_percentage,
94
- F(o, h)
72
+ M(o, c)
95
73
  ), T = d(
96
74
  e.is_complete ? a.completed_label : a.goal_projection,
97
- $(R, D.MONTH_SHORT_YEAR)
75
+ N(y, F.MONTH_SHORT_YEAR)
98
76
  );
99
77
  return {
100
78
  backgroundColor: r,
101
- color: s,
79
+ color: n,
102
80
  percentage: o,
103
- percentageText: A,
81
+ percentageText: R,
104
82
  projectedText: T
105
83
  };
106
84
  }
107
- function ne(a) {
85
+ function oe(a) {
108
86
  return [
109
87
  {
110
88
  bgcolor: "chart.chart1",
@@ -137,7 +115,7 @@ function ne(a) {
137
115
  },
138
116
  { icon: "payments", label: a.saving_goal_other, metaType: l.OTHER }
139
117
  ],
140
- type: n.SAVINGS_TRACK
118
+ type: i.SAVINGS_TRACK
141
119
  },
142
120
  {
143
121
  bgcolor: "chart.chart5",
@@ -145,7 +123,7 @@ function ne(a) {
145
123
  label: a.debt_goal_label,
146
124
  description: a.debt_goal_description,
147
125
  subTypes: [],
148
- type: n.DEBT_TRACK
126
+ type: i.DEBT_TRACK
149
127
  },
150
128
  {
151
129
  bgcolor: "chart.chart6",
@@ -153,26 +131,26 @@ function ne(a) {
153
131
  label: a.retirement_goal_label,
154
132
  description: a.retirement_goal_description,
155
133
  subTypes: [],
156
- type: n.RETIREMENT_TRACK
134
+ type: i.RETIREMENT_TRACK
157
135
  }
158
136
  ];
159
137
  }
160
- const ie = (a, e) => {
138
+ const re = (a, e) => {
161
139
  switch (a) {
162
- case n.DEBT_TRACK:
140
+ case i.DEBT_TRACK:
163
141
  return d(e.zero_state_ongoing, "debt");
164
- case n.SAVINGS_TRACK:
142
+ case i.SAVINGS_TRACK:
165
143
  return d(e.zero_state_ongoing, "saving");
166
144
  default:
167
145
  return d(e.zero_state_ongoing, "retirement");
168
146
  }
169
- }, f = (a, e) => {
170
- const t = y(e), o = M(t, a);
171
- return v(o);
147
+ }, G = (a, e) => {
148
+ const t = f(e), o = D(t, a);
149
+ return k(o);
172
150
  };
173
- class se {
151
+ class ae {
174
152
  globalStore;
175
- api = new G("/", "");
153
+ api = new _("/", "");
176
154
  goals = [];
177
155
  goalsLoaded = !1;
178
156
  retirementGoals = [];
@@ -185,7 +163,7 @@ class se {
185
163
  alert = "";
186
164
  selectedGoal = void 0;
187
165
  constructor(e) {
188
- this.globalStore = e, this.api = new G(e.endpoint, e.sessionToken, e.onError), x(this);
166
+ this.globalStore = e, this.api = new _(e.endpoint, e.sessionToken, e.onError), S(this);
189
167
  }
190
168
  get allGoals() {
191
169
  if (!this.isAllGoalDataLoaded) return [];
@@ -196,8 +174,8 @@ class se {
196
174
  ...o,
197
175
  amount: o.target_amount,
198
176
  name: e.retirement,
199
- track_type: n.RETIREMENT_TRACK,
200
- projected_to_complete_at: o.retirement_age && t ? f(o.retirement_age, t) : void 0
177
+ track_type: i.RETIREMENT_TRACK,
178
+ projected_to_complete_at: o.retirement_age && t ? G(o.retirement_age, t) : void 0
201
179
  }))
202
180
  ];
203
181
  }
@@ -205,25 +183,25 @@ class se {
205
183
  return this.allGoals.slice().sort((e, t) => e.position - t.position);
206
184
  }
207
185
  get debtGoals() {
208
- return this.orderedGoals.filter((e) => e.track_type === n.DEBT_TRACK);
186
+ return this.orderedGoals.filter((e) => e.track_type === i.DEBT_TRACK);
209
187
  }
210
188
  get retirmentGoals() {
211
- return this.orderedGoals.filter((e) => e.track_type === n.RETIREMENT_TRACK);
189
+ return this.orderedGoals.filter((e) => e.track_type === i.RETIREMENT_TRACK);
212
190
  }
213
191
  get savingGoals() {
214
- return this.orderedGoals.filter((e) => e.track_type === n.SAVINGS_TRACK);
192
+ return this.orderedGoals.filter((e) => e.track_type === i.SAVINGS_TRACK);
215
193
  }
216
194
  get ongoingGoalsForMicroWidget() {
217
195
  const e = this.allGoals.filter(
218
- (o) => !o.is_complete && o.track_type !== n.EMERGENCY_FUND_TRACK && o.track_type !== null
196
+ (o) => !o.is_complete && o.track_type !== i.EMERGENCY_FUND_TRACK && o.track_type !== null
219
197
  ), t = [
220
- n.SAVINGS_TRACK,
221
- n.DEBT_TRACK,
222
- n.RETIREMENT_TRACK
198
+ i.SAVINGS_TRACK,
199
+ i.DEBT_TRACK,
200
+ i.RETIREMENT_TRACK
223
201
  ];
224
202
  return e.sort((o, r) => {
225
- const s = o.track_type ? t.indexOf(o.track_type) : -1, h = r.track_type ? t.indexOf(r.track_type) : -1;
226
- return s - h;
203
+ const n = o.track_type ? t.indexOf(o.track_type) : -1, c = r.track_type ? t.indexOf(r.track_type) : -1;
204
+ return n - c;
227
205
  }).slice(0, 3);
228
206
  }
229
207
  get isAllGoalDataLoaded() {
@@ -292,10 +270,10 @@ class se {
292
270
  addRetirementGoal = async (e) => {
293
271
  const t = this.globalStore.copyStore.copy.goals;
294
272
  try {
295
- const o = await this.api.addRetirementGoal(e), r = [], s = this.globalStore.userStore.user.birthday;
296
- for (const h of this.newRetirementGoalAccounts) {
273
+ const o = await this.api.addRetirementGoal(e), r = [], n = this.globalStore.userStore.user.birthday;
274
+ for (const c of this.newRetirementGoalAccounts) {
297
275
  const m = await this.api.addRetirementGoalAccount({
298
- ...h,
276
+ ...c,
299
277
  retirement_goal_guid: o.guid
300
278
  });
301
279
  r.push(m);
@@ -306,8 +284,8 @@ class se {
306
284
  ...o,
307
285
  amount: o.target_amount,
308
286
  name: t.retirement,
309
- track_type: n.RETIREMENT_TRACK,
310
- projected_to_complete_at: o.retirement_age && s ? f(o.retirement_age, s) : void 0
287
+ track_type: i.RETIREMENT_TRACK,
288
+ projected_to_complete_at: o.retirement_age && n ? G(o.retirement_age, n) : void 0
311
289
  }
312
290
  ], this.setRetirementGoalAccounts([...this.retirementGoalAccounts, ...r]);
313
291
  } catch (o) {
@@ -317,7 +295,7 @@ class se {
317
295
  addRetirementGoalAccount = async (e) => {
318
296
  try {
319
297
  const t = await this.api.addRetirementGoalAccount(e);
320
- u(() => {
298
+ h(() => {
321
299
  this.retirementGoalAccounts = [...this.retirementGoalAccounts, t];
322
300
  });
323
301
  } catch (t) {
@@ -359,9 +337,9 @@ class se {
359
337
  reorderGoals = async (e) => {
360
338
  try {
361
339
  const t = await this.api.reorderGoals(e);
362
- u(() => {
340
+ h(() => {
363
341
  for (const o of t) {
364
- const r = this.goals.findIndex((s) => s.guid === o.guid);
342
+ const r = this.goals.findIndex((n) => n.guid === o.guid);
365
343
  r >= 0 && (this.goals[r].position = o.position);
366
344
  }
367
345
  });
@@ -377,7 +355,7 @@ class se {
377
355
  updateGoal = async (e) => {
378
356
  try {
379
357
  const t = await this.api.updateGoal(e);
380
- u(() => {
358
+ h(() => {
381
359
  const o = this.goals.findIndex((r) => r.guid === e.guid);
382
360
  o >= 0 && (this.goals[o] = t), this.selectedGoal?.guid === e.guid && this.setSelectedGoal(t);
383
361
  });
@@ -391,7 +369,7 @@ class se {
391
369
  ...e,
392
370
  target_amount: e.amount
393
371
  });
394
- u(() => {
372
+ h(() => {
395
373
  const o = this.retirementGoals.findIndex((r) => r.guid === e.guid);
396
374
  o >= 0 && (this.retirementGoals[o] = t), this.selectedGoal?.guid === e.guid && this.setSelectedGoal(this.allGoals.find((r) => r.guid === e.guid));
397
375
  });
@@ -409,10 +387,9 @@ class se {
409
387
  };
410
388
  }
411
389
  export {
412
- re as C,
413
- G,
414
- ie as a,
415
- ne as b,
416
- se as c,
417
- ae as g
390
+ ee as C,
391
+ ae as G,
392
+ re as a,
393
+ oe as b,
394
+ te as g
418
395
  };
@@ -16,7 +16,7 @@ import { g as V, u as K, z as nt, d as It, b as Tt, o as Et, a as Ct } from "./h
16
16
  import { A as k } from "./Analytics-0Xm_BjHU.mjs";
17
17
  import At from "@mui/material/Breadcrumbs";
18
18
  import { useTheme as Q } from "@mui/material/styles";
19
- import { b as s } from "./Localization-CPkpIwIx.mjs";
19
+ import { b as s } from "./Localization-CkQ49EKr.mjs";
20
20
  import { E as Ot, a as Nt, P as Lt } from "./Help-B8mD4aLJ.mjs";
21
21
  import { observer as lt } from "mobx-react-lite";
22
22
  import dt from "@mui/material/Alert";
@@ -9,7 +9,7 @@ import { useAxesTooltip as kt, ChartsTooltipContainer as Mt } from "@mui/x-chart
9
9
  import { ChartsXAxis as wt } from "@mui/x-charts/ChartsXAxis";
10
10
  import { ChartsYAxis as Ct } from "@mui/x-charts/ChartsYAxis";
11
11
  import { AreaPlot as vt, LinePlot as St, MarkPlot as At } from "@mui/x-charts/LineChart";
12
- import { f as L, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
12
+ import { f as L, c as O } from "./NumberFormatting-CyrvFgfd.mjs";
13
13
  import { observer as Dt } from "mobx-react-lite";
14
14
  import z from "@mui/material/Stack";
15
15
  import { Text as d } from "@mxenabled/mxui";
@@ -0,0 +1,15 @@
1
+ const s = {
2
+ EN_US: "en-us",
3
+ EN_CA: "en-ca",
4
+ FR: "fr",
5
+ FR_CA: "fr-ca",
6
+ ES: "es"
7
+ }, o = Object.values(s), r = () => {
8
+ const n = s.EN_US, e = window?.app?.options?.language?.toLowerCase() ?? "", a = window.navigator.language.toLowerCase();
9
+ return e === "browser" && o.includes(a) ? a : o.includes(e) ? e : n;
10
+ };
11
+ export {
12
+ s as L,
13
+ o as V,
14
+ r as g
15
+ };
@@ -0,0 +1,26 @@
1
+ import d from "react";
2
+ const h = /(?<static>.*?)(?<dynamic>(?:_\d+{(?:.*?)}))|(?<staticEnd>.+)/g, b = (n, ...e) => {
3
+ if (!n) return "";
4
+ const s = e.some((o) => typeof o != "string"), i = [...n.matchAll(h)].reduce(
5
+ (o, u, l) => {
6
+ const c = [...o], t = u.groups;
7
+ if (t?.static && c.push(t.static), t?.dynamic) {
8
+ const m = t.dynamic.indexOf("{"), p = t.dynamic.substring(m + 1, t.dynamic.length - 1), a = Number(t.dynamic.substring(1, m));
9
+ if (d.isValidElement(e[a - 1])) {
10
+ const y = e[a - 1], f = d.cloneElement(y, {
11
+ key: `${p}-${l}`
12
+ });
13
+ c.push(f);
14
+ } else
15
+ c.push(e[a - 1]);
16
+ }
17
+ return t?.staticEnd && c.push(t.staticEnd), c;
18
+ },
19
+ []
20
+ );
21
+ return s ? i : i.join("");
22
+ }, g = (n, e, s, ...r) => !n || !e ? "" : b(s === 1 ? n : e, ...r);
23
+ export {
24
+ g as a,
25
+ b
26
+ };
@@ -10,15 +10,15 @@ import ce from "@mui/material/ListItem";
10
10
  import de from "@mui/material/ListItemAvatar";
11
11
  import le from "@mui/material/ListItemButton";
12
12
  import _e from "@mui/material/ListItemText";
13
- import { S as M, D as z, g as H, c as X } from "./RecurringTransactions-BbZ6MQsX.mjs";
13
+ import { S as M, D as z, g as H, c as X } from "./RecurringTransactions-kzlU8OFY.mjs";
14
14
  import { subDays as Z } from "date-fns/subDays";
15
- import { startOfToday as E } from "date-fns/startOfToday";
15
+ import { startOfToday as R } from "date-fns/startOfToday";
16
16
  import { endOfMonth as ue } from "date-fns/endOfMonth";
17
17
  import { parseISO as me } from "date-fns/parseISO";
18
18
  import J from "@mui/material/Button";
19
19
  import { Delete as pe, Add as ye, ReceiptLong as he } from "@mxenabled/mx-icons";
20
- import { T as V, u as fe, S as ge, a as Ce } from "./EmbeddedCard-qwIhF1VP.mjs";
21
- import { T as be } from "./TransactionDetails-I1ny1ecc.mjs";
20
+ import { T as V, u as fe, S as ge, a as Ce } from "./EmbeddedCard-j7IGx3s1.mjs";
21
+ import { T as be } from "./TransactionDetails-CN-yZkin.mjs";
22
22
  import { addYears as j } from "date-fns/addYears";
23
23
  import { getDayOfYear as xe } from "date-fns/getDayOfYear";
24
24
  import { setDayOfYear as Se } from "date-fns/setDayOfYear";
@@ -26,18 +26,18 @@ import { AdapterDateFns as ve } from "@mui/x-date-pickers/AdapterDateFnsV3";
26
26
  import { DatePicker as De } from "@mui/x-date-pickers";
27
27
  import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
28
28
  import { u as w, i as Y, g as P, b as Ae, h as ee, o as Ie } from "./hooks-BxkfR-Ff.mjs";
29
- import { F as l, R as L } from "./RepeatingTransaction-DF4vJn_v.mjs";
30
- import { b as Re, f as te } from "./NumberFormatting-QCaNwbjv.mjs";
29
+ import { F as l, b as L } from "./RepeatingTransaction-D2gmBTd0.mjs";
30
+ import { b as Ee, f as te } from "./NumberFormatting-CyrvFgfd.mjs";
31
31
  import { D as N } from "./Drawer-Bbe4AMB1.mjs";
32
32
  import { A as O } from "./Analytics-0Xm_BjHU.mjs";
33
- import { f as Ee, D as Le } from "./DateFormats-BMpMrZpW.mjs";
33
+ import { f as Re, D as Le } from "./DateFormats-CaOj_4eI.mjs";
34
34
  import { D as Oe } from "./Dialog-Ck34yr-d.mjs";
35
35
  import { formatISO as Te } from "date-fns/formatISO";
36
36
  import { fromUnixTime as ke } from "date-fns/fromUnixTime";
37
37
  import { S as Ne } from "./SearchBox-CwDgvWVJ.mjs";
38
- import { h as Me } from "./DateUtil-wcYTmDRD.mjs";
38
+ import { h as Me } from "./DateUtil-C57sqxn4.mjs";
39
39
  import { b as q } from "./Category-CevNQ03n.mjs";
40
- import { a as ne } from "./Transaction-C3Pg9TKf.mjs";
40
+ import { T as ne } from "./Transaction-Cn5_iFm0.mjs";
41
41
  const re = ({
42
42
  frequency: n,
43
43
  firstDay: t,
@@ -68,10 +68,10 @@ const re = ({
68
68
  { id: 6, label: r.weekday_saturday }
69
69
  ], h = [...Array(31).keys()].map((b) => ({
70
70
  id: b + 1,
71
- label: Re(b + 1)
71
+ label: Ee(b + 1)
72
72
  }));
73
73
  h[30].label += ` (${r.last_day_of_month})`;
74
- const g = h.slice(0, 15), v = h.slice(14), C = n === l.EveryWeek || n === l.EveryOtherWeek, f = n === l.TwiceAMonth || n === l.EveryMonth || n === l.EveryOtherMonth || n === l.EveryQuarter || n === l.EveryOtherQuarter, A = Se(E(), t), y = A < E() ? j(A, 1) : A, D = (b) => {
74
+ const g = h.slice(0, 15), v = h.slice(14), C = n === l.EveryWeek || n === l.EveryOtherWeek, f = n === l.TwiceAMonth || n === l.EveryMonth || n === l.EveryOtherMonth || n === l.EveryQuarter || n === l.EveryOtherQuarter, A = Se(R(), t), y = A < R() ? j(A, 1) : A, D = (b) => {
75
75
  b && s(xe(b));
76
76
  };
77
77
  return /* @__PURE__ */ c(p, { gap: 24, sx: { m: 24 }, children: [
@@ -116,8 +116,8 @@ const re = ({
116
116
  {
117
117
  disablePast: !0,
118
118
  label: r.next_payment_date,
119
- maxDate: Z(j(E(), 1), 1),
120
- minDate: E(),
119
+ maxDate: Z(j(R(), 1), 1),
120
+ minDate: R(),
121
121
  onChange: D,
122
122
  value: y
123
123
  }
@@ -172,7 +172,7 @@ const re = ({
172
172
  _.useEffect(() => {
173
173
  r({
174
174
  accounts: i,
175
- dateRange: { start: Z(E(), 90), end: ue(E()) },
175
+ dateRange: { start: Z(R(), 90), end: ue(R()) },
176
176
  custom: (u) => u.repeating_transaction_guid === t.guid
177
177
  });
178
178
  }, [t]);
@@ -200,7 +200,7 @@ const re = ({
200
200
  D ? "+" : "",
201
201
  te(m, "0,0.00")
202
202
  ] }),
203
- /* @__PURE__ */ e(S, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${Ee(
203
+ /* @__PURE__ */ e(S, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${Re(
204
204
  X(
205
205
  t.recurrence_type,
206
206
  me(t.predicted_occurs_on),
@@ -438,7 +438,7 @@ const re = ({
438
438
  return;
439
439
  }
440
440
  o();
441
- const x = X(f, ke(u.date), y), R = {
441
+ const x = X(f, ke(u.date), y), E = {
442
442
  account_guid: u.account_guid,
443
443
  amount: u.amount,
444
444
  created_by: 0,
@@ -453,7 +453,7 @@ const re = ({
453
453
  transaction_type: u.transaction_type,
454
454
  user_guid: m.guid
455
455
  };
456
- await a(R, u), K();
456
+ await a(E, u), K();
457
457
  }, K = () => {
458
458
  C(""), g(!1);
459
459
  };
@@ -473,7 +473,7 @@ const re = ({
473
473
  onSearch: (x) => {
474
474
  d({
475
475
  ...s,
476
- custom: (R) => n ? x ? qe(R, x) : W(R) : x ? ze(R, x) : B(R)
476
+ custom: (E) => n ? x ? qe(E, x) : W(E) : x ? ze(E, x) : B(E)
477
477
  });
478
478
  },
479
479
  onSelected: (x) => C(x)
@@ -588,8 +588,8 @@ export {
588
588
  Ye as R,
589
589
  Pe as S,
590
590
  Be as a,
591
- Ge as b,
591
+ W as b,
592
592
  Ue as c,
593
- W as d,
593
+ Ge as d,
594
594
  qe as i
595
595
  };
@@ -0,0 +1,15 @@
1
+ import { F as s, A as h } from "./ApiEndpoints-C5IA97i7.mjs";
2
+ class o {
3
+ fetchInstance;
4
+ constructor(t, e, a) {
5
+ this.fetchInstance = new s(t, e, void 0, a);
6
+ }
7
+ getMerchants = async (t = [], e = [], a = 1, r = 25) => {
8
+ let c = h.MERCHANTS;
9
+ return c += `?page=${a}&per_page=${r}`, t.length && t.forEach((n) => c += `&fuzzy_name[]=${n}`), e.length && e.forEach((n) => c += `&guid[]=${n}`), this.fetchInstance.get(c).then((n) => n.merchants);
10
+ };
11
+ getMerchantByGuid = async (t) => this.fetchInstance.get(`${h.MERCHANTS}/${t}`).then((e) => e.merchant);
12
+ }
13
+ export {
14
+ o as M
15
+ };
@@ -0,0 +1,26 @@
1
+ import { makeAutoObservable as i, runInAction as s } from "mobx";
2
+ import { M as n } from "./MerchantApi-D8ahYxiG.mjs";
3
+ class c {
4
+ globalStore;
5
+ api = new n("/", "");
6
+ merchant = null;
7
+ merchants = [];
8
+ isLoading = !1;
9
+ constructor(t) {
10
+ this.globalStore = t, this.api = new n(t.endpoint, t.sessionToken, t.onError), i(this);
11
+ }
12
+ loadMerchants = async (t = "") => {
13
+ this.isLoading = !0;
14
+ const a = await this.api.getMerchants([t]);
15
+ s(() => {
16
+ this.merchants = a, this.isLoading = !1;
17
+ });
18
+ };
19
+ loadMerchantByGuid = async (t) => {
20
+ const a = await this.api.getMerchantByGuid(t);
21
+ s(() => this.merchant = a);
22
+ };
23
+ }
24
+ export {
25
+ c as M
26
+ };
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as p } from "mobx";
2
- import { A as m } from "./AccountApi-ChQr5PAZ.mjs";
2
+ import { A as m } from "./AccountApi-WEM2M9tg.mjs";
3
3
  import { format as B } from "date-fns/format";
4
4
  import { fromUnixTime as W } from "date-fns/fromUnixTime";
5
5
  import { startOfMonth as D } from "date-fns/startOfMonth";
@@ -0,0 +1,20 @@
1
+ import { F as a, A as i } from "./ApiEndpoints-C5IA97i7.mjs";
2
+ class o {
3
+ fetchInstance;
4
+ constructor(t, e, n) {
5
+ this.fetchInstance = new a(t, e, void 0, n);
6
+ }
7
+ getNotifications = () => this.fetchInstance.get(i.NOTIFICATIONS).then(
8
+ (t) => t.notifications.map((e) => e.notification)
9
+ ).finally();
10
+ updateNotification = (t) => this.fetchInstance.put(`${i.NOTIFICATIONS}/${t.guid}`, {
11
+ guid: t.guid,
12
+ has_been_viewed: t.has_been_viewed
13
+ }).then((e) => e.notification).finally();
14
+ // Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
15
+ // A bug ticket has been filed to fix it, but should not require any changes here.
16
+ markAllAsViewed = (t) => this.fetchInstance.put(`${i.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
17
+ }
18
+ export {
19
+ o as N
20
+ };
@@ -17,10 +17,10 @@ import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
17
  import { T as R, a as D } from "./ToggleListItem-BLu_fWA2.mjs";
18
18
  import { u as k, r as T, o as A, d as J, g as le, a as q, b as re } from "./hooks-BxkfR-Ff.mjs";
19
19
  import { A as de, N as b } from "./Notification-DTNYSd8P.mjs";
20
- import { b as me } from "./Localization-CPkpIwIx.mjs";
21
- import { b as he, f as ue } from "./NumberFormatting-QCaNwbjv.mjs";
20
+ import { b as me } from "./Localization-CkQ49EKr.mjs";
21
+ import { b as he, f as ue } from "./NumberFormatting-CyrvFgfd.mjs";
22
22
  import { D as B } from "./Dialog-Ck34yr-d.mjs";
23
- import { C as _e } from "./CurrencyInput-DuMktPu3.mjs";
23
+ import { C as _e } from "./CurrencyInput-BkNVHxSV.mjs";
24
24
  import { u as pe } from "./useScreenSize-CUcpY7aJ.mjs";
25
25
  import { D as K } from "./Drawer-Bbe4AMB1.mjs";
26
26
  import fe from "@mui/material/Collapse";