@mx-cartographer/experiences 7.7.0-alpha.bb5 → 7.7.0-alpha.bb7

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 (58) hide show
  1. package/dist/{AccountDetailsHeader-BNNbAnUH.mjs → AccountDetailsHeader-rT8KbT1M.mjs} +14 -13
  2. package/dist/{AccountFields-BCh1wYpK.mjs → AccountFields-B7s_bbQT.mjs} +1 -1
  3. package/dist/{AccountListItem-BuZ13G21.mjs → AccountListItem-B_plAb79.mjs} +3 -3
  4. package/dist/{AccountStore-CKqJzOjg.mjs → AccountStore-DY5HniWw.mjs} +49 -55
  5. package/dist/{BudgetUtil-DNiI2Ujh.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
  6. package/dist/{CategorySelectorDrawer-CgIwjagM.mjs → CategorySelectorDrawer-DywvMfPe.mjs} +12 -11
  7. package/dist/{CategoryStore-D6asehRf.mjs → CategoryStore-BYICdb9m.mjs} +56 -55
  8. package/dist/{ConnectionsDrawer-BsXHs0_D.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +2 -2
  9. package/dist/{CurrencyInput-DRHDDBe0.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
  10. package/dist/{ExportCsvAction-axGRjx1O.mjs → ExportCsvAction-HK5CeZWR.mjs} +3 -3
  11. package/dist/{GlobalAccountFilter-KiJBWY-3.mjs → GlobalAccountFilter-DQCPNc95.mjs} +132 -134
  12. package/dist/{GoalStore-3lHk7OP5.mjs → GoalStore-DtqS4bfg.mjs} +2 -2
  13. package/dist/{Help-BOJnveEe.mjs → Help-DODxp9uw.mjs} +18 -17
  14. package/dist/{LineChart-BaTgdCbJ.mjs → LineChart-BF4QA-Lx.mjs} +1 -1
  15. package/dist/{ListItemAction-Dz_tQRh6.mjs → ListItemAction-CU42h39I.mjs} +1 -1
  16. package/dist/Loader-DUaFpDGv.mjs +24 -0
  17. package/dist/{ManageIncome-THd-sExY.mjs → ManageIncome-DAfRhEXW.mjs} +4 -4
  18. package/dist/{MicroWidgetContainer-B0g9p7Qy.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
  19. package/dist/{MiniWidgetContainer-NlcAp9Zw.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
  20. package/dist/{NotificationSettings-DYmttvKa.mjs → NotificationSettings-D4Vh3z8I.mjs} +25 -24
  21. package/dist/{OriginalBalanceAction-DZHKt6_5.mjs → OriginalBalanceAction-ChGGq5AH.mjs} +3 -3
  22. package/dist/{RecurringSettings-B3U_M7tQ.mjs → RecurringSettings-C-_usEQP.mjs} +3 -3
  23. package/dist/{SpendingLegend-DC4lhPfg.mjs → SpendingLegend-BFX7hUBn.mjs} +2 -2
  24. package/dist/{TransactionDetails-Cw8ZfHGt.mjs → TransactionDetails-D1TZl3jS.mjs} +17 -16
  25. package/dist/{TransactionStore-BTs3acQe.mjs → TransactionStore-BJMWfvHs.mjs} +2 -2
  26. package/dist/{User-axNnA_vB.mjs → User-LJpEwPtn.mjs} +1 -1
  27. package/dist/{ViewMoreMicroCard-Cs5asYRB.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +2 -2
  28. package/dist/{WidgetContainer-CP4X59Wk.mjs → WidgetContainer-Dd99GYSN.mjs} +7 -6
  29. package/dist/accounts/index.es.js +38 -37
  30. package/dist/accounts/stores/AccountStore.d.ts +0 -1
  31. package/dist/analytics/index.es.js +9 -8
  32. package/dist/budgets/index.es.js +241 -240
  33. package/dist/cashflow/index.es.js +19 -18
  34. package/dist/categories/index.es.js +2 -2
  35. package/dist/categories/stores/CategoryStore.d.ts +1 -2
  36. package/dist/common/index.es.js +195 -194
  37. package/dist/dashboard/index.es.js +3 -3
  38. package/dist/debts/index.es.js +196 -195
  39. package/dist/{exportTransactionsToCSV-CNvZQPqO.mjs → exportTransactionsToCSV-BrTYdSgJ.mjs} +1 -1
  40. package/dist/finstrong/index.es.js +35 -34
  41. package/dist/goals/index.es.js +156 -155
  42. package/dist/help/index.es.js +13 -12
  43. package/dist/hooks-ZMp65DFz.mjs +77 -0
  44. package/dist/investments/index.es.js +21 -20
  45. package/dist/merchants/index.es.js +13 -12
  46. package/dist/microinsights/index.es.js +1 -1
  47. package/dist/networth/index.es.js +35 -34
  48. package/dist/notifications/index.es.js +17 -16
  49. package/dist/recurringtransactions/index.es.js +38 -37
  50. package/dist/settings/index.es.js +28 -27
  51. package/dist/spending/index.es.js +105 -104
  52. package/dist/transactions/index.es.js +25 -24
  53. package/dist/trends/index.es.js +22 -21
  54. package/dist/{useAccountDisplayName-kGrgMfs3.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
  55. package/dist/{useInsightsEnabled-ElCA2ILK.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  56. package/dist/{useWidgetLoadTimer-BszQ1BcD.mjs → useWidgetLoadTimer-hIOioiKx.mjs} +1 -1
  57. package/package.json +1 -1
  58. package/dist/Loader-CMzJy34G.mjs +0 -97
@@ -3,14 +3,15 @@ import { observer as f } from "mobx-react-lite";
3
3
  import s from "@mui/material/Stack";
4
4
  import { H3 as T, InstitutionLogo as x, Text as l, H2 as D } from "@mxenabled/mxui";
5
5
  import p from "react";
6
- import { G as N, d as C, m as P, f as G, L as O, u as R } from "./Loader-CMzJy34G.mjs";
7
- import { g as w } from "./AccountFields-BCh1wYpK.mjs";
6
+ import { G as N, d as C, m as P, f as G, u as O } from "./hooks-ZMp65DFz.mjs";
7
+ import { g as R } from "./AccountFields-B7s_bbQT.mjs";
8
8
  import { A as r } from "./Account-Cp4uT2pE.mjs";
9
- import v from "@mui/material/Card";
10
- import L from "@mui/material/CardContent";
11
- import H from "@mui/material/CardHeader";
9
+ import w from "@mui/material/Card";
10
+ import v from "@mui/material/CardContent";
11
+ import L from "@mui/material/CardHeader";
12
+ import { L as H } from "./Loader-DUaFpDGv.mjs";
12
13
  import { I as M, P as U, S as Y } from "./Account-B6i0x4zD.mjs";
13
- import { u as j } from "./useAccountDisplayName-kGrgMfs3.mjs";
14
+ import { u as j } from "./useAccountDisplayName-Bot2tb4n.mjs";
14
15
  import { f as z } from "./NumberFormatting-DjTD0t3W.mjs";
15
16
  const _ = () => {
16
17
  if (!p.useContext(N))
@@ -36,8 +37,8 @@ const _ = () => {
36
37
  o && n([d]).finally(() => {
37
38
  m(!0);
38
39
  });
39
- }, [o, d]), !o || !u ? /* @__PURE__ */ t(O, {}) : /* @__PURE__ */ a(
40
- v,
40
+ }, [o, d]), !o || !u ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ a(
41
+ w,
41
42
  {
42
43
  sx: {
43
44
  "& .MuiCardContent-root:last-child": {
@@ -46,8 +47,8 @@ const _ = () => {
46
47
  ...i
47
48
  },
48
49
  children: [
49
- /* @__PURE__ */ t(H, { sx: { pb: 0 }, title: /* @__PURE__ */ t(T, { sx: { pb: 4 }, children: c }) }),
50
- /* @__PURE__ */ t(L, { sx: { p: 0 }, children: e ? /* @__PURE__ */ t(e, {}) : null })
50
+ /* @__PURE__ */ t(L, { sx: { pb: 0 }, title: /* @__PURE__ */ t(T, { sx: { pb: 4 }, children: c }) }),
51
+ /* @__PURE__ */ t(v, { sx: { p: 0 }, children: e ? /* @__PURE__ */ t(e, {}) : null })
51
52
  ]
52
53
  }
53
54
  );
@@ -55,7 +56,7 @@ const _ = () => {
55
56
  customDetailsChart: i,
56
57
  ChartComponent: e
57
58
  }) => {
58
- const { institutions: c } = C(), { selectedAccount: n } = _(), { accounts: o } = R(), { firstSubtitle: d, firstValue: u, hasAvailableBalance: m, secondSubtitle: h, secondValue: b } = w(n, o), A = c.find(
59
+ const { institutions: c } = C(), { selectedAccount: n } = _(), { accounts: o } = O(), { firstSubtitle: d, firstValue: u, hasAvailableBalance: m, secondSubtitle: h, secondValue: b } = R(n, o), A = c.find(
59
60
  (I) => I.guid === n?.institution_guid
60
61
  ), S = [
61
62
  ...M,
@@ -87,8 +88,8 @@ const _ = () => {
87
88
  ] }),
88
89
  S && /* @__PURE__ */ t(s, { "aria-label": E, role: "img", children: i || /* @__PURE__ */ t(F, { ChartComponent: e, header: y }) })
89
90
  ] });
90
- }, st = f(V);
91
+ }, at = f(V);
91
92
  export {
92
- st as A,
93
+ at as A,
93
94
  _ as u
94
95
  };
@@ -2,7 +2,7 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { Icon as p, Text as y } from "@mxenabled/mxui";
3
3
  import { A as d, a as v, P as h, b as F } from "./Account-Cp4uT2pE.mjs";
4
4
  import { i as T, u as D, a as A, b as g, c as O } from "./Accounts-DBJHvSZk.mjs";
5
- import { F as m } from "./GlobalAccountFilter-KiJBWY-3.mjs";
5
+ import { F as m } from "./GlobalAccountFilter-DQCPNc95.mjs";
6
6
  import { f as _, i as b, a as N, b as S } from "./NumberFormatting-DjTD0t3W.mjs";
7
7
  import { b as i } from "./Localization-2MODESHW.mjs";
8
8
  import { f as o, D as f } from "./Dialog-B4PI-_bL.mjs";
@@ -10,9 +10,9 @@ import B from "@mui/material/styles/useTheme";
10
10
  import { InstitutionLogo as L, Text as o } from "@mxenabled/mxui";
11
11
  import { Error as A } from "@mxenabled/mx-icons";
12
12
  import { I as j } from "./IconBacking-B9oC6uL2.mjs";
13
- import { g as T } from "./AccountFields-BCh1wYpK.mjs";
14
- import { u as X } from "./useAccountDisplayName-kGrgMfs3.mjs";
15
- import { u as $ } from "./Loader-CMzJy34G.mjs";
13
+ import { g as T } from "./AccountFields-B7s_bbQT.mjs";
14
+ import { u as X } from "./useAccountDisplayName-Bot2tb4n.mjs";
15
+ import { u as $ } from "./hooks-ZMp65DFz.mjs";
16
16
  import { C as d } from "./Account-Cp4uT2pE.mjs";
17
17
  import { f as k } from "./NumberFormatting-DjTD0t3W.mjs";
18
18
  const w = {
@@ -1,22 +1,22 @@
1
1
  import { g as m } from "./AccountDisplayName-CO7z3v99.mjs";
2
- import { A as n, e as _, f as u } from "./Account-Cp4uT2pE.mjs";
2
+ import { A as c, e as _, f as u } from "./Account-Cp4uT2pE.mjs";
3
3
  import { makeAutoObservable as g, runInAction as d } from "mobx";
4
- import { i as f } from "./User-axNnA_vB.mjs";
4
+ import { i as f } from "./User-LJpEwPtn.mjs";
5
5
  import { A as l } from "./AccountApi-DgZ8ILj1.mjs";
6
6
  import { d as y } from "./Accounts-DBJHvSZk.mjs";
7
- const T = (o, t) => o.reduce((e, s) => (e[s.guid] = t?.includes(s.guid), e), {}), M = (o, t, e) => o.reduce((s, c) => {
8
- const i = _[c.account_type], r = m(c, {
7
+ const T = (i, t) => i.reduce((e, s) => (e[s.guid] = t?.includes(s.guid), e), {}), M = (i, t, e) => i.reduce((s, n) => {
8
+ const o = _[n.account_type], r = m(n, {
9
9
  allowNickname: e?.appConfig.config?.show_account_nicknames_in_master
10
10
  }), a = {
11
- accountNumber: c.account_number,
12
- name: `${r} ${c.is_closed ? `(${t})` : ""}`,
13
- guid: c.guid
11
+ accountNumber: n.account_number,
12
+ name: `${r} ${n.is_closed ? `(${t})` : ""}`,
13
+ guid: n.guid
14
14
  };
15
- return Object.prototype.hasOwnProperty.call(s, i) ? s[i] = s[i].concat(a) : s[i] = [a], s;
15
+ return Object.prototype.hasOwnProperty.call(s, o) ? s[o] = s[o].concat(a) : s[o] = [a], s;
16
16
  }, {});
17
- function b(o) {
18
- const { heldAccounts: t, externalAccounts: e } = o.reduce(
19
- (s, c) => (c.member_is_managed_by_user ? s.externalAccounts.push(c) : s.heldAccounts.push(c), s),
17
+ function b(i) {
18
+ const { heldAccounts: t, externalAccounts: e } = i.reduce(
19
+ (s, n) => (n.member_is_managed_by_user ? s.externalAccounts.push(n) : s.heldAccounts.push(n), s),
20
20
  { heldAccounts: [], externalAccounts: [] }
21
21
  );
22
22
  return {
@@ -24,17 +24,17 @@ function b(o) {
24
24
  externalAccounts: A(e)
25
25
  };
26
26
  }
27
- function x(o, t) {
28
- const { heldAccounts: e, externalAccounts: s } = b(o), c = e.slice(0, t);
29
- return c.length < t && c.push(...s.slice(0, t - c.length)), c;
27
+ function R(i, t) {
28
+ const { heldAccounts: e, externalAccounts: s } = b(i), n = e.slice(0, t);
29
+ return n.length < t && n.push(...s.slice(0, t - n.length)), n;
30
30
  }
31
31
  const I = {
32
- [n.CHECKING]: 1,
33
- [n.SAVINGS]: 2,
34
- [n.CREDIT_CARD]: 3
35
- }, h = (o) => I[o] ?? o + 100, A = (o) => o.sort((t, e) => {
36
- const s = h(t.account_type), c = h(e.account_type), i = s - c;
37
- if (i !== 0) return i;
32
+ [c.CHECKING]: 1,
33
+ [c.SAVINGS]: 2,
34
+ [c.CREDIT_CARD]: 3
35
+ }, h = (i) => I[i] ?? i + 100, A = (i) => i.sort((t, e) => {
36
+ const s = h(t.account_type), n = h(e.account_type), o = s - n;
37
+ if (o !== 0) return o;
38
38
  const r = t.name ?? t.feed_name ?? "", a = e.name ?? e.feed_name ?? "";
39
39
  return r.localeCompare(a);
40
40
  });
@@ -49,7 +49,7 @@ class E {
49
49
  setSelectedAccount = (t) => this.selectedAccount = t;
50
50
  setSelectedMember = (t) => this.selectedMember = t;
51
51
  }
52
- class R {
52
+ class x {
53
53
  globalStore;
54
54
  api = new l("/", "");
55
55
  accounts = [];
@@ -78,46 +78,46 @@ class R {
78
78
  get accountsByTypeMap() {
79
79
  return this.detailedAccounts.reduce((t, e) => {
80
80
  const s = e.account_type;
81
- let c = t.get(s);
82
- return c || (c = []), c.push(e), t.set(s, c), t;
81
+ let n = t.get(s);
82
+ return n || (n = []), n.push(e), t.set(s, n), t;
83
83
  }, /* @__PURE__ */ new Map());
84
84
  }
85
85
  get cashAccounts() {
86
86
  return this.detailedAccounts.filter(
87
- (t) => t.account_type === n.CASH || t.account_type === n.CHECKING || t.account_type === n.PREPAID || t.account_type === n.SAVINGS || t.account_type === n.CHECKING_LINE_OF_CREDIT
87
+ (t) => t.account_type === c.CASH || t.account_type === c.CHECKING || t.account_type === c.PREPAID || t.account_type === c.SAVINGS || t.account_type === c.CHECKING_LINE_OF_CREDIT
88
88
  );
89
89
  }
90
90
  get cashBalance() {
91
91
  return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
92
92
  }
93
93
  get checkingAccounts() {
94
- return this.detailedAccounts.filter((t) => t.account_type === n.CHECKING);
94
+ return this.detailedAccounts.filter((t) => t.account_type === c.CHECKING);
95
95
  }
96
96
  get debtAccounts() {
97
97
  return this.detailedAccounts.filter(
98
- (t) => t.account_type === n.CREDIT_CARD || t.account_type === n.LOAN || t.account_type === n.MORTGAGE || t.account_type === n.LINE_OF_CREDIT || t.account_type === n.CHECKING_LINE_OF_CREDIT
98
+ (t) => t.account_type === c.CREDIT_CARD || t.account_type === c.LOAN || t.account_type === c.MORTGAGE || t.account_type === c.LINE_OF_CREDIT || t.account_type === c.CHECKING_LINE_OF_CREDIT
99
99
  );
100
100
  }
101
101
  get finstrongAccounts() {
102
102
  const t = /* @__PURE__ */ new Set([
103
- n.CHECKING,
104
- n.SAVINGS,
105
- n.CREDIT_CARD,
106
- n.INVESTMENT
103
+ c.CHECKING,
104
+ c.SAVINGS,
105
+ c.CREDIT_CARD,
106
+ c.INVESTMENT
107
107
  ]);
108
108
  return this.detailedAccounts.filter((e) => t.has(e.account_type));
109
109
  }
110
110
  get investmentAccounts() {
111
111
  return this.detailedAccounts.filter(
112
- (t) => t.account_type === n.INVESTMENT
112
+ (t) => t.account_type === c.INVESTMENT
113
113
  );
114
114
  }
115
115
  get savingsAccounts() {
116
- return this.detailedAccounts.filter((t) => t.account_type === n.SAVINGS);
116
+ return this.detailedAccounts.filter((t) => t.account_type === c.SAVINGS);
117
117
  }
118
118
  get retirementAccounts() {
119
119
  return this.detailedAccounts.filter(
120
- (t) => t.account_type === n.INVESTMENT || t.account_type === n.SAVINGS || t.account_type === n.CHECKING || t.account_type === n.CASH || t.account_type === n.PROPERTY || t.account_type === n.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
120
+ (t) => t.account_type === c.INVESTMENT || t.account_type === c.SAVINGS || t.account_type === c.CHECKING || t.account_type === c.CASH || t.account_type === c.PROPERTY || t.account_type === c.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
121
121
  );
122
122
  }
123
123
  get visibleAccounts() {
@@ -157,7 +157,7 @@ class R {
157
157
  }
158
158
  get savingsAndCheckingAccounts() {
159
159
  return this.accounts.filter(
160
- (e) => e.account_type === n.SAVINGS || e.account_type === n.CHECKING
160
+ (e) => e.account_type === c.SAVINGS || e.account_type === c.CHECKING
161
161
  );
162
162
  }
163
163
  setAccounts = (t) => {
@@ -216,10 +216,10 @@ class R {
216
216
  try {
217
217
  const e = await this.api.mergeAccounts(t), s = e[Object.keys(e)[0]];
218
218
  d(() => {
219
- const c = this.accounts.findIndex((r) => r.guid === t[1]);
220
- this.accounts.splice(c, 1);
221
- const i = this.accounts.findIndex((r) => r.guid === t[0]);
222
- this.accounts.splice(i, 1, s);
219
+ const n = this.accounts.findIndex((r) => r.guid === t[1]);
220
+ this.accounts.splice(n, 1);
221
+ const o = this.accounts.findIndex((r) => r.guid === t[0]);
222
+ this.accounts.splice(o, 1, s);
223
223
  });
224
224
  } catch (e) {
225
225
  console.error(`Error occurred while merging accounts: ${e}`);
@@ -247,7 +247,7 @@ class R {
247
247
  updateAccount = async (t) => {
248
248
  try {
249
249
  const e = await this.api.updateAccount(t), s = this.accounts.findIndex(
250
- (c) => c.guid === e.guid
250
+ (n) => n.guid === e.guid
251
251
  );
252
252
  this.accounts.splice(s, 1, e);
253
253
  } catch (e) {
@@ -255,34 +255,28 @@ class R {
255
255
  }
256
256
  };
257
257
  updateAccountBalance = (t, e) => {
258
- const s = this.accounts.find((c) => c.guid === t);
258
+ const s = this.accounts.find((n) => n.guid === t);
259
259
  s && d(() => {
260
260
  s.balance = (s.balance || 0) + e;
261
261
  });
262
262
  };
263
- updateAccountFiltering = async (t, e) => {
264
- for (const s of t) {
265
- const c = this.accounts.find((i) => i.guid === s);
266
- c && (c.is_excluded_from_accounts = e, await this.updateAccount(c));
267
- }
268
- };
269
263
  updateAccountFilter = async (t) => {
270
264
  const e = [];
271
- for (const [i, r] of t.entries()) {
272
- const a = this.accounts.find((p) => p.guid === i);
265
+ for (const [o, r] of t.entries()) {
266
+ const a = this.accounts.find((p) => p.guid === o);
273
267
  a && a.is_excluded_from_accounts === r && (a.is_excluded_from_accounts = !r, e.push(this.api.updateAccount(a)));
274
268
  }
275
- const s = await Promise.all(e), c = [...this.accounts];
276
- for (const i of s) {
277
- const r = c.findIndex((a) => a.guid === i.guid);
278
- r !== -1 && c.splice(r, 1, i);
269
+ const s = await Promise.all(e), n = [...this.accounts];
270
+ for (const o of s) {
271
+ const r = n.findIndex((a) => a.guid === o.guid);
272
+ r !== -1 && n.splice(r, 1, o);
279
273
  }
280
- this.setAccounts(c);
274
+ this.setAccounts(n);
281
275
  };
282
276
  }
283
277
  export {
284
- R as A,
278
+ x as A,
285
279
  T as a,
286
- x as g,
280
+ R as g,
287
281
  M as s
288
282
  };
@@ -1,4 +1,4 @@
1
- import { i as _ } from "./Loader-CMzJy34G.mjs";
1
+ import { i as _ } from "./hooks-ZMp65DFz.mjs";
2
2
  import { b as d } from "./Category-CevNQ03n.mjs";
3
3
  import { b as f } from "./Localization-2MODESHW.mjs";
4
4
  import { f as l } from "./NumberFormatting-DjTD0t3W.mjs";
@@ -2,10 +2,10 @@ import { jsx as t, jsxs as E } from "react/jsx-runtime";
2
2
  import { observer as g } from "mobx-react-lite";
3
3
  import C from "react";
4
4
  import $ from "@mui/material/Stack";
5
- import { G as K, m as y, u as b, g as D, b as U, L as Y } from "./Loader-CMzJy34G.mjs";
6
- import v from "@mui/material/List";
5
+ import { G as K, m as y, u as b, g as D, b as U } from "./hooks-ZMp65DFz.mjs";
6
+ import Y from "@mui/material/List";
7
7
  import V from "@mui/material/Paper";
8
- import k from "@mui/material/Divider";
8
+ import v from "@mui/material/Divider";
9
9
  import x from "@mui/material/ListItem";
10
10
  import W from "@mui/material/ListItemAvatar";
11
11
  import N from "@mui/material/ListItemButton";
@@ -21,6 +21,7 @@ import ee from "@mui/material/Box";
21
21
  import te from "@mui/material/Chip";
22
22
  import I from "@mui/material/IconButton";
23
23
  import { S as oe } from "./SearchBox-B2_zLv8-.mjs";
24
+ import { L as k } from "./Loader-DUaFpDGv.mjs";
24
25
  import { D as ae } from "./Drawer-DV4NTsFg.mjs";
25
26
  const p = () => {
26
27
  if (!C.useContext(K))
@@ -253,7 +254,7 @@ const re = ({
253
254
  timeout: "auto",
254
255
  unmountOnExit: !0,
255
256
  children: /* @__PURE__ */ E(
256
- v,
257
+ Y,
257
258
  {
258
259
  "aria-labelledby": `category-${o.guid}`,
259
260
  className: "mx-cat-subcategory-list",
@@ -261,7 +262,7 @@ const re = ({
261
262
  children: [
262
263
  e.map((i) => /* @__PURE__ */ E(C.Fragment, { children: [
263
264
  /* @__PURE__ */ t(me, { parentCategory: o, subCategory: i }),
264
- /* @__PURE__ */ t(k, { sx: { ml: 58 } })
265
+ /* @__PURE__ */ t(v, { sx: { ml: 58 } })
265
266
  ] }, i.guid)),
266
267
  !a && /* @__PURE__ */ t(se, { parentCategory: o })
267
268
  ]
@@ -305,7 +306,7 @@ const re = ({
305
306
  },
306
307
  e.guid
307
308
  ) }),
308
- /* @__PURE__ */ t(k, { sx: { ml: 58 } }),
309
+ /* @__PURE__ */ t(v, { sx: { ml: 58 } }),
309
310
  /* @__PURE__ */ t(ge, { categories: o, parentCategory: e })
310
311
  ] });
311
312
  }, Ee = g(_e), pe = () => {
@@ -326,7 +327,7 @@ const re = ({
326
327
  }
327
328
  return n;
328
329
  }, []))(e, o);
329
- return /* @__PURE__ */ t(V, { className: "mx-cat-category-list", sx: { boxShadow: "none" }, children: /* @__PURE__ */ t(v, { children: s.map((a) => /* @__PURE__ */ t(
330
+ return /* @__PURE__ */ t(V, { className: "mx-cat-category-list", sx: { boxShadow: "none" }, children: /* @__PURE__ */ t(Y, { children: s.map((a) => /* @__PURE__ */ t(
330
331
  Ee,
331
332
  {
332
333
  category: a.category,
@@ -368,7 +369,7 @@ const re = ({
368
369
  }
369
370
  ),
370
371
  /* @__PURE__ */ t(he, {})
371
- ] }) : /* @__PURE__ */ t(Y, {});
372
+ ] }) : /* @__PURE__ */ t(k, {});
372
373
  }, ye = g(Se), be = ({
373
374
  id: e,
374
375
  onClose: o,
@@ -388,11 +389,11 @@ const re = ({
388
389
  title: r,
389
390
  children: /* @__PURE__ */ t(ye, { ...s })
390
391
  }
391
- ) : /* @__PURE__ */ t(Y, {});
392
- }, Xe = g(be);
392
+ ) : /* @__PURE__ */ t(k, {});
393
+ }, ze = g(be);
393
394
  export {
394
395
  ye as C,
395
- Xe as a,
396
+ ze as a,
396
397
  Ee as b,
397
398
  p as u
398
399
  };
@@ -1,35 +1,35 @@
1
- import { makeAutoObservable as h } from "mobx";
1
+ import { makeAutoObservable as y } from "mobx";
2
2
  import { getUnixTime as n } from "date-fns/getUnixTime";
3
- import { subMonths as y } from "date-fns/subMonths";
4
- import { startOfMonth as u } from "date-fns/startOfMonth";
5
- import { endOfMonth as C } from "date-fns/endOfMonth";
6
- import { a as T, g as f } from "./CategoryUtil-meuejJqP.mjs";
7
- import { F as m, A as r } from "./Fetch-DecPFeGU.mjs";
3
+ import { subMonths as c } from "date-fns/subMonths";
4
+ import { startOfMonth as C } from "date-fns/startOfMonth";
5
+ import { endOfMonth as h } from "date-fns/endOfMonth";
6
+ import { a as T, g as m } from "./CategoryUtil-meuejJqP.mjs";
7
+ import { F as f, A as i } from "./Fetch-DecPFeGU.mjs";
8
8
  import { b as l, c as p } from "./Category-CevNQ03n.mjs";
9
- class c {
9
+ class d {
10
10
  fetchInstance;
11
- constructor(t, e, a) {
12
- this.fetchInstance = new m(t, e, void 0, a);
11
+ constructor(t, e, o) {
12
+ this.fetchInstance = new f(t, e, void 0, o);
13
13
  }
14
- addCategory = async (t) => this.fetchInstance.post(r.CATEGORIES, t).then((e) => e.category);
15
- getCategories = async () => this.fetchInstance.get(r.CATEGORIES).then((t) => t.categories);
16
- getDateRangeCategoryTotals = async (t, e, a) => a.length === 0 ? [] : this.fetchInstance.post(`${r.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${e}`, {
17
- account_guid: a.map((o) => o.guid)
18
- }).then((o) => o.date_range_category_totals);
19
- getMonthlyCategoryTotals = async (t, e, a) => {
14
+ addCategory = async (t) => this.fetchInstance.post(i.CATEGORIES, t).then((e) => e.category);
15
+ getCategories = async () => this.fetchInstance.get(i.CATEGORIES).then((t) => t.categories);
16
+ getDateRangeCategoryTotals = async (t, e, o) => o.length === 0 ? [] : this.fetchInstance.post(`${i.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${e}`, {
17
+ account_guid: o.map((a) => a.guid)
18
+ }).then((a) => a.date_range_category_totals);
19
+ getMonthlyCategoryTotals = async (t, e, o) => {
20
20
  try {
21
- const o = `${r.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${e}`;
22
- if (a) {
23
- const s = a.length === 0 ? [""] : a.map((d) => d.guid);
24
- return (await this.fetchInstance.post(o, { account_guid: s })).monthly_category_totals;
21
+ const a = `${i.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${e}`;
22
+ if (o) {
23
+ const r = o.length === 0 ? [""] : o.map((u) => u.guid);
24
+ return (await this.fetchInstance.post(a, { account_guid: r })).monthly_category_totals;
25
25
  } else
26
- return (await this.fetchInstance.get(o)).monthly_category_totals;
27
- } catch (o) {
28
- throw console.error("Error fetching monthly category totals:", o), o;
26
+ return (await this.fetchInstance.get(a)).monthly_category_totals;
27
+ } catch (a) {
28
+ throw console.error("Error fetching monthly category totals:", a), a;
29
29
  }
30
30
  };
31
- removeCategory = async (t) => this.fetchInstance.delete(`${r.CATEGORIES}/${t}`);
32
- updateCategory = async (t) => this.fetchInstance.put(`${r.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
31
+ removeCategory = async (t) => this.fetchInstance.delete(`${i.CATEGORIES}/${t}`);
32
+ updateCategory = async (t) => this.fetchInstance.put(`${i.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
33
33
  }
34
34
  class S {
35
35
  expandedGuid = null;
@@ -42,7 +42,7 @@ class S {
42
42
  savedOnSelect;
43
43
  // todo
44
44
  constructor() {
45
- h(this);
45
+ y(this);
46
46
  }
47
47
  setExpandedGuid = (t) => this.expandedGuid = t;
48
48
  setSelectedGuid = (t) => this.selectedGuid = t;
@@ -54,10 +54,10 @@ class S {
54
54
  onSelect = (t) => this.savedOnSelect(t);
55
55
  setOnSelect = (t) => this.savedOnSelect = t;
56
56
  }
57
- class G {
57
+ class $ {
58
58
  globalStore;
59
59
  uiStore;
60
- api = new c("/", "");
60
+ api = new d("/", "");
61
61
  categories = [];
62
62
  categoriesLoaded = !1;
63
63
  categoriesLoading = !1;
@@ -68,7 +68,7 @@ class G {
68
68
  monthlyTotalsLoaded = !1;
69
69
  monthlyTotalsLoading = !1;
70
70
  constructor(t) {
71
- this.globalStore = t, this.uiStore = new S(), this.api = new c(t.endpoint, t.sessionToken, t.onError), h(this);
71
+ this.globalStore = t, this.uiStore = new S(), this.api = new d(t.endpoint, t.sessionToken, t.onError), y(this);
72
72
  }
73
73
  get detailedCategories() {
74
74
  return this.globalStore.isInitialized ? T(
@@ -79,7 +79,7 @@ class G {
79
79
  ) : [];
80
80
  }
81
81
  get detailedCategoriesWithTransactions() {
82
- return f(
82
+ return m(
83
83
  this.detailedCategories,
84
84
  this.globalStore.transactionStore.sortedTransactions
85
85
  );
@@ -108,11 +108,11 @@ class G {
108
108
  return this.detailedCategories.filter((t) => t.totalAmount !== 0).filter((t) => t.guid !== l.INVESTMENTS && t.guid !== l.TRANSFER);
109
109
  }
110
110
  addCategory = async (t, e) => {
111
- const a = { name: t, parent_guid: e };
111
+ const o = { name: t, parent_guid: e };
112
112
  try {
113
- await this.api.addCategory(a), await this.loadCategories();
114
- } catch (o) {
115
- console.error(`Error occurred while adding category: ${o}`);
113
+ await this.api.addCategory(o), await this.loadCategories();
114
+ } catch (a) {
115
+ console.error(`Error occurred while adding category: ${a}`);
116
116
  }
117
117
  };
118
118
  loadCategories = async () => {
@@ -126,40 +126,41 @@ class G {
126
126
  }
127
127
  }
128
128
  };
129
- loadDateRangeCategoryTotals = async (t, e, a) => {
129
+ loadDateRangeCategoryTotals = async (t, e, o) => {
130
130
  if (!this.dateRangeTotalsLoading) {
131
131
  this.dateRangeTotalsLoading = !0;
132
132
  try {
133
- const o = await this.api.getDateRangeCategoryTotals(
133
+ const a = await this.api.getDateRangeCategoryTotals(
134
134
  n(e),
135
- n(a),
135
+ n(o),
136
136
  t
137
137
  );
138
- this.setDateRangeCategoryTotals(o);
139
- } catch (o) {
140
- console.error(`Error occurred while getting date range category totals: ${o}`);
138
+ this.setDateRangeCategoryTotals(a);
139
+ } catch (a) {
140
+ console.error(`Error occurred while getting date range category totals: ${a}`);
141
141
  }
142
142
  }
143
143
  };
144
- loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, e, a) => {
144
+ loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, e, o) => {
145
145
  if (this.monthlyTotalsLoading) return;
146
146
  this.monthlyTotalsLoading = !0;
147
- const o = n(u(e ?? y(/* @__PURE__ */ new Date(), 11))), s = n(C(a ?? /* @__PURE__ */ new Date()));
147
+ const a = n(C(e ?? c(/* @__PURE__ */ new Date(), 11))), r = n(h(o ?? /* @__PURE__ */ new Date()));
148
148
  try {
149
- const i = await this.api.getMonthlyCategoryTotals(o, s, t);
150
- this.setMonthlyCategoryTotals(i);
151
- } catch (i) {
152
- console.error(`Error occurred while getting monthly category totals: ${i}`);
149
+ const s = await this.api.getMonthlyCategoryTotals(a, r, t);
150
+ this.setMonthlyCategoryTotals(s);
151
+ } catch (s) {
152
+ console.error(`Error occurred while getting monthly category totals: ${s}`);
153
153
  }
154
154
  };
155
- resetCategoryTotals = () => {
156
- this.dateRangeCategoryTotals = [], this.monthlyCategoryTotals = [], this.dateRangeTotalsLoaded = !1, this.monthlyTotalsLoaded = !1;
157
- };
158
- reloadCategoryTotals = async (t, e, a) => {
155
+ reloadCategoryTotals = async (t, e, o) => {
156
+ const a = e ?? c(/* @__PURE__ */ new Date(), 11), r = o ?? h(/* @__PURE__ */ new Date());
159
157
  try {
160
- await this.loadMonthlyCategoryTotals(t, e, a), await this.loadDateRangeCategoryTotals(t, e, a);
161
- } catch (o) {
162
- console.error(`Error occurred while getting category totals: ${o}`);
158
+ await Promise.all([
159
+ this.loadMonthlyCategoryTotals(t, a, r),
160
+ this.loadDateRangeCategoryTotals(t, a, r)
161
+ ]);
162
+ } catch (s) {
163
+ console.error(`Error occurred while getting category totals: ${s}`);
163
164
  }
164
165
  };
165
166
  removeCategory = async (t) => {
@@ -177,9 +178,9 @@ class G {
177
178
  }
178
179
  };
179
180
  // TODO: Remove this after refactoring Trends components to use detailedCategories
180
- getCategoryName = (t) => this.categories.find((a) => a.guid === t)?.name ?? p[t];
181
+ getCategoryName = (t) => this.categories.find((o) => o.guid === t)?.name ?? p[t];
181
182
  }
182
183
  export {
183
- G as C,
184
- c as a
184
+ $ as C,
185
+ d as a
185
186
  };
@@ -3,8 +3,8 @@ import s from "react";
3
3
  import { observer as E } from "mobx-react-lite";
4
4
  import { useTheme as b } from "@mui/material/styles";
5
5
  import { ConnectionsWidget as D } from "@mxenabled/web-widget-sdk";
6
- import { C as a, a as c, M as i } from "./GlobalAccountFilter-KiJBWY-3.mjs";
7
- import { d as L, e as w, u as _ } from "./Loader-CMzJy34G.mjs";
6
+ import { C as a, a as c, M as i } from "./GlobalAccountFilter-DQCPNc95.mjs";
7
+ import { d as L, e as w, u as _ } from "./hooks-ZMp65DFz.mjs";
8
8
  import { D as x } from "./Drawer-DV4NTsFg.mjs";
9
9
  const I = ({
10
10
  onClose: l,
@@ -5,7 +5,7 @@ import { v4 as B } from "uuid";
5
5
  import { useTokens as L, TextField as O, P as _ } from "@mxenabled/mxui";
6
6
  import { b as y, g as C } from "./Localization-2MODESHW.mjs";
7
7
  import { g as W, C as j, f as g, M as b } from "./NumberFormatting-DjTD0t3W.mjs";
8
- import { u as D } from "./Loader-CMzJy34G.mjs";
8
+ import { u as D } from "./hooks-ZMp65DFz.mjs";
9
9
  const F = ({
10
10
  allowDecimals: o = !0,
11
11
  ariaLabel: h,
@@ -1,10 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { observer as c } from "mobx-react-lite";
3
3
  import { Icon as i } from "@mxenabled/mxui";
4
- import { e as p } from "./exportTransactionsToCSV-CNvZQPqO.mjs";
5
- import { O as m } from "./User-axNnA_vB.mjs";
4
+ import { e as p } from "./exportTransactionsToCSV-BrTYdSgJ.mjs";
5
+ import { O as m } from "./User-LJpEwPtn.mjs";
6
6
  import { R as x } from "./ResponsiveButton-DZFp78fJ.mjs";
7
- import { g as _, h as C, u as l } from "./Loader-CMzJy34G.mjs";
7
+ import { g as _, h as C, u as l } from "./hooks-ZMp65DFz.mjs";
8
8
  const v = ({ filter: t }) => {
9
9
  const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
10
10
  r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);