@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.1

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 (105) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
  4. package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
  8. package/dist/Accounts-UIlYCmHb.mjs +9 -0
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-CXvenbdN.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
  13. package/dist/CategoryStore-BEdFs69_.mjs +183 -0
  14. package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
  18. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
  19. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DNSgmdyv.mjs} +3 -3
  20. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  21. package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
  22. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
  23. package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
  24. package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
  25. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
  26. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
  27. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  28. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
  29. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
  30. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
  31. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
  32. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  33. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
  34. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
  35. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
  36. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
  37. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  38. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  39. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  40. package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
  41. package/dist/TransactionStore-CtGTg0XS.mjs +677 -0
  42. package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
  43. package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
  44. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
  45. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
  46. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  48. package/dist/accounts/index.es.js +241 -203
  49. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  50. package/dist/accounts/utils/Accounts.d.ts +1 -2
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/index.es.js +500 -507
  53. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  54. package/dist/cashflow/index.es.js +384 -382
  55. package/dist/categories/index.es.js +2 -2
  56. package/dist/categories/stores/CategoryStore.d.ts +1 -5
  57. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  58. package/dist/common/components/charts/index.d.ts +0 -2
  59. package/dist/common/index.es.js +391 -376
  60. package/dist/common/stores/AppDataStore.d.ts +1 -3
  61. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  62. package/dist/common/stores/GlobalStore.d.ts +10 -4
  63. package/dist/common/stores/UserStore.d.ts +2 -3
  64. package/dist/common/types/Account.d.ts +6 -9
  65. package/dist/common/types/Global.d.ts +1 -0
  66. package/dist/dashboard/index.es.js +2 -2
  67. package/dist/debts/index.es.js +506 -498
  68. package/dist/exportTransactionsToCSV-C4PkIYP6.mjs +48 -0
  69. package/dist/finstrong/index.es.js +417 -415
  70. package/dist/goals/index.es.js +559 -557
  71. package/dist/goals/stores/GoalStore.d.ts +4 -17
  72. package/dist/help/index.es.js +3 -3
  73. package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
  74. package/dist/insights/index.es.js +1 -1
  75. package/dist/investments/index.es.js +437 -435
  76. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  77. package/dist/merchants/index.es.js +2 -2
  78. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  79. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
  80. package/dist/microinsights/index.es.js +1 -1
  81. package/dist/microinsights/interfaces.d.ts +0 -1
  82. package/dist/networth/index.es.js +176 -174
  83. package/dist/notifications/index.es.js +23 -23
  84. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  85. package/dist/recurringtransactions/index.es.js +175 -173
  86. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  87. package/dist/settings/index.es.js +285 -279
  88. package/dist/spending/index.es.js +328 -304
  89. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  90. package/dist/transactions/index.es.js +63 -64
  91. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  92. package/dist/trends/index.es.js +948 -583
  93. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
  94. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  95. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
  96. package/package.json +3 -3
  97. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  98. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  99. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  100. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  101. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  102. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  103. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  104. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  105. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
2
2
  import { fromUnixTime as o, isSameDay as d } from "date-fns";
3
- import { F as l, A as a } from "./Fetch-87LIQbEA.mjs";
3
+ import { F as l, A as a } from "./Fetch-DecPFeGU.mjs";
4
4
  class s {
5
5
  fetchInstance;
6
6
  constructor(t, i, n) {
@@ -33,7 +33,7 @@ class A {
33
33
  api = new s("/", "");
34
34
  isLoading = !0;
35
35
  notifications = [];
36
- notificationsLoaded = !1;
36
+ recentNotifications = [];
37
37
  constructor(t) {
38
38
  this.globalStore = t, this.api = new s(
39
39
  t.endpoint,
@@ -45,27 +45,19 @@ class A {
45
45
  get newNotifications() {
46
46
  return this.recentNotifications.filter((t) => !t.has_been_viewed);
47
47
  }
48
- get recentNotifications() {
49
- return u(this.notifications);
50
- }
51
- setNotifications = (t) => {
52
- this.notifications = t, this.notificationsLoaded = !0;
53
- };
54
48
  loadNotifications = async () => {
55
- this.isLoading = !0;
56
49
  try {
50
+ this.isLoading = !0;
57
51
  const t = await this.api.getNotifications();
58
- this.setNotifications(t);
59
- } catch (t) {
60
- console.error(`Error occurred while loading notifications: ${t}`);
61
- } finally {
62
52
  h(() => {
63
- this.isLoading = !1;
53
+ this.notifications = t, this.recentNotifications = u(t), this.isLoading = !1;
64
54
  });
55
+ } catch (t) {
56
+ console.error(`Error occurred while loading notifications: ${t}`);
65
57
  }
66
58
  };
67
59
  markAllAsViewed = async () => {
68
- this.notifications.forEach((t) => t.has_been_viewed = !0), await this.api.markAllAsViewed(), await this.loadNotifications();
60
+ this.notifications.forEach((t) => t.has_been_viewed = !0), await this.api.markAllAsViewed();
69
61
  };
70
62
  updateNotification = async (t) => {
71
63
  t.has_been_viewed = !0, await this.api.updateNotification(t);
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
- import { L as y } from "./ListItemAction-DHa3KJPs.mjs";
6
- import { u as h, l as b } from "./hooks-D6XlXHf4.mjs";
5
+ import { L as y } from "./ListItemAction-BmL5buOf.mjs";
6
+ import { u as h, l as b } from "./hooks-Cy8JnjCg.mjs";
7
7
  import { a as T, f as S } from "./NumberFormatting-Buh7u8Oi.mjs";
8
- import { C as f } from "./CurrencyInput-DUsQbkXb.mjs";
8
+ import { C as f } from "./CurrencyInput-lSC7oPDg.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,10 +7,10 @@ import b from "@mui/material/Tabs";
7
7
  import d from "@mui/material/Divider";
8
8
  import R from "@mui/material/List";
9
9
  import T from "@mui/material/Stack";
10
- import { R as C, A as S, a as E, M as v } from "./ManageIncome-1s_q5W4X.mjs";
11
- import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
12
- import { R as y, F as N } from "./RecurringTransactions-DK8dWldr.mjs";
13
- import { A as m } from "./WidgetContainer-BHWANqT4.mjs";
10
+ import { R as C, A as S, a as E, M as v } from "./ManageIncome-Cypo9qY4.mjs";
11
+ import { u as _, j as A, g as f } from "./hooks-Cy8JnjCg.mjs";
12
+ import { R as y, F as N } from "./RecurringTransactions-ej39mgA6.mjs";
13
+ import { A as m } from "./WidgetContainer-BnTgAfQn.mjs";
14
14
  const I = h(() => {
15
15
  const { recurring: g } = _(), { repeatingTransactions: n } = A(), { onEvent: o } = f(), l = (r) => {
16
16
  o(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
@@ -281,10 +281,10 @@ export {
281
281
  s as F,
282
282
  Y as R,
283
283
  Re as S,
284
- tt as a,
284
+ p as a,
285
285
  et as b,
286
- p as c,
287
- O as d,
286
+ O as c,
287
+ tt as d,
288
288
  at as e,
289
289
  rt as f,
290
290
  ot as g
@@ -1,14 +1,14 @@
1
- import { makeAutoObservable as R, runInAction as o } from "mobx";
2
- import { endOfMonth as f } from "date-fns/endOfMonth";
1
+ import { makeAutoObservable as f, runInAction as i } from "mobx";
2
+ import { endOfMonth as R } from "date-fns/endOfMonth";
3
3
  import { isAfter as p } from "date-fns/isAfter";
4
4
  import { isBefore as I } from "date-fns/isBefore";
5
5
  import { isSameDay as g } from "date-fns/isSameDay";
6
6
  import { isWithinInterval as m } from "date-fns/isWithinInterval";
7
7
  import { startOfMonth as S } from "date-fns/startOfMonth";
8
- import { startOfToday as i } from "date-fns/startOfToday";
8
+ import { startOfToday as c } from "date-fns/startOfToday";
9
9
  import { subDays as y } from "date-fns/subDays";
10
- import { F as x, A as c } from "./Fetch-87LIQbEA.mjs";
11
- import { a as u, b as E, c as a, d } from "./RecurringTransactions-DK8dWldr.mjs";
10
+ import { F as x, A as o } from "./Fetch-DecPFeGU.mjs";
11
+ import { b as E, a, c as d, d as u } from "./RecurringTransactions-ej39mgA6.mjs";
12
12
  var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
13
13
  const U = 44;
14
14
  class h {
@@ -16,42 +16,36 @@ class h {
16
16
  constructor(e, t, n) {
17
17
  this.fetchInstance = new x(e, t, void 0, n);
18
18
  }
19
- addRepeatingTransaction = async (e) => this.fetchInstance.post(c.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
20
- getRepeatingTransactions = async () => this.fetchInstance.get(c.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
19
+ addRepeatingTransaction = async (e) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
20
+ getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
21
21
  updateRepeatingTransaction = async (e) => this.fetchInstance.put(
22
- `${c.REPEATING_TRANSACTIONS}/${e.guid}`,
22
+ `${o.REPEATING_TRANSACTIONS}/${e.guid}`,
23
23
  e
24
24
  ).then((t) => t.repeating_transaction);
25
- deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${c.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
25
+ deleteRepeatingTransaction = async (e) => this.fetchInstance.delete(`${o.REPEATING_TRANSACTIONS}/${e}`).then((t) => t);
26
26
  }
27
27
  const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
28
28
  class C {
29
29
  globalStore;
30
30
  api = new h("/", "");
31
+ transactions = [];
31
32
  repeatingTransactions = [];
32
- isDataLoaded = !1;
33
33
  selectedDay;
34
- dateRange = { start: S(i()), end: f(i()) };
34
+ dateRange = { start: S(c()), end: R(c()) };
35
+ isDataLoaded = !1;
35
36
  constructor(e) {
36
37
  this.globalStore = e, this.api = new h(
37
38
  e.endpoint,
38
39
  e.sessionToken,
39
40
  e.onError
40
- ), R(this);
41
- }
42
- get detailedRepeatingTransactions() {
43
- return u(
44
- this.globalStore.accountStore.visibleAccounts,
45
- this.repeatingTransactions,
46
- this.globalStore.transactionStore.transactions
47
- );
41
+ ), f(this);
48
42
  }
49
43
  /**
50
44
  * Returns all recurrences built from repeating transactions and filtered by accounts.
51
45
  */
52
46
  get recurrences() {
53
47
  const e = this.globalStore.accountStore.visibleAccounts;
54
- return E(this.detailedRepeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
48
+ return E(this.repeatingTransactions, this.dateRange).filter((t) => e.some((n) => n.guid === t.accountGuid && !n.is_excluded_from_accounts)).filter((t) => m(t.expectedDate, this.dateRange));
55
49
  }
56
50
  /**
57
51
  * Returns all recurrences that have occurred in the past, including those that are paid or missed
@@ -67,7 +61,7 @@ class C {
67
61
  */
68
62
  get upcomingRecurrences() {
69
63
  return this.recurrences.filter(
70
- (e) => p(e.expectedDate, y(i(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
64
+ (e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
71
65
  );
72
66
  }
73
67
  /**
@@ -103,7 +97,7 @@ class C {
103
97
  );
104
98
  }
105
99
  get nextIncomeRecurrence() {
106
- return this.upcomingIncome.find((e) => p(e.expectedDate, i()));
100
+ return this.upcomingIncome.find((e) => p(e.expectedDate, c()));
107
101
  }
108
102
  /**
109
103
  * Returns the expense recurrences for the current month.
@@ -171,9 +165,6 @@ class C {
171
165
  (e) => this.selectedDay && g(e.occurredOnDate || e.expectedDate, this.selectedDay)
172
166
  );
173
167
  }
174
- setRepeatingTransactions = (e) => {
175
- this.repeatingTransactions = e, this.isDataLoaded = !0;
176
- };
177
168
  /**
178
169
  * Set the date range for filtering recurrences.
179
170
  * @param dateRange - The date range to set.
@@ -192,7 +183,13 @@ class C {
192
183
  loadRepeatingTransactions = async () => {
193
184
  try {
194
185
  const e = await this.api.getRepeatingTransactions();
195
- this.setRepeatingTransactions(e);
186
+ i(() => {
187
+ this.repeatingTransactions = u(
188
+ this.globalStore.accountStore.visibleAccounts,
189
+ e,
190
+ this.globalStore.transactionStore.transactions
191
+ ), this.isDataLoaded = !0;
192
+ });
196
193
  } catch (e) {
197
194
  console.error(`Error occurred while getting repeating transactions: ${e}`);
198
195
  }
@@ -208,7 +205,7 @@ class C {
208
205
  await this.globalStore.transactionStore.updateTransaction({
209
206
  ...t,
210
207
  repeating_transaction_guid: n.guid
211
- }), o(() => {
208
+ }), i(() => {
212
209
  this.repeatingTransactions = [
213
210
  ...this.repeatingTransactions,
214
211
  ...u(
@@ -228,7 +225,7 @@ class C {
228
225
  */
229
226
  deleteRepeatingTransaction = async (e) => {
230
227
  try {
231
- await this.api.deleteRepeatingTransaction(e), o(() => {
228
+ await this.api.deleteRepeatingTransaction(e), i(() => {
232
229
  this.repeatingTransactions = [
233
230
  ...this.repeatingTransactions.filter((t) => t.guid !== e)
234
231
  ];
@@ -247,7 +244,7 @@ class C {
247
244
  (T) => T.guid === t.guid
248
245
  );
249
246
  if (n < 0) return;
250
- o(() => {
247
+ i(() => {
251
248
  this.repeatingTransactions = [
252
249
  ...this.repeatingTransactions.slice(0, n),
253
250
  ...u(
@@ -1,7 +1,7 @@
1
1
  import { makeAutoObservable as N, runInAction as l } from "mobx";
2
- import { F as D, A as r } from "./Fetch-87LIQbEA.mjs";
3
- import { B as f, A as n, I as i } from "./ToggleListItem-r0Kx56wF.mjs";
4
- import { T as m } from "./TransactionApi-B3Tksf7L.mjs";
2
+ import { F as D, A as r } from "./Fetch-DecPFeGU.mjs";
3
+ import { B as f, A as n, I as i } from "./ToggleListItem-ciFTiqRS.mjs";
4
+ import { T as m } from "./TransactionApi-CjBoLleL.mjs";
5
5
  class y {
6
6
  fetchInstance;
7
7
  constructor(e, t, o) {
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
- import x from "@mui/material/ListItem";
2
+ import o from "@mui/material/ListItem";
3
3
  import c from "@mui/material/ListItemButton";
4
4
  import p from "@mui/material/ListItemIcon";
5
- import D from "@mui/material/ListItemText";
6
- import L from "@mui/material/Stack";
7
- import o from "@mui/material/Switch";
8
- import { Text as u } from "@mxenabled/mxui";
5
+ import u from "@mui/material/ListItemText";
6
+ import x from "@mui/material/Stack";
7
+ import D from "@mui/material/Switch";
8
+ import { Text as L } from "@mxenabled/mxui";
9
9
  import w from "@mui/material/ListItemAvatar";
10
10
  var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), P = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(A || {});
11
11
  const z = ({
@@ -21,18 +21,18 @@ const z = ({
21
21
  }) => (
22
22
  //TODO: implement common/components/ListItemRow.tsx
23
23
  /* @__PURE__ */ e(
24
- x,
24
+ o,
25
25
  {
26
- secondaryAction: /* @__PURE__ */ e(o, { checked: l, onChange: C }),
26
+ secondaryAction: /* @__PURE__ */ e(D, { checked: l, onChange: C }),
27
27
  sx: {
28
28
  "& .MuiListItemSecondaryAction-root": { right: a ? 64 : 24 },
29
29
  "& .MuiListItemButton-root": { pr: 24 }
30
30
  },
31
31
  children: /* @__PURE__ */ S(c, { onClick: d ? void 0 : () => m(), children: [
32
32
  r && /* @__PURE__ */ e(w, { children: r }),
33
- /* @__PURE__ */ e(D, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(L, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(L, { sx: { width: "100%" }, children: [
33
+ /* @__PURE__ */ e(u, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(x, { sx: { width: "100%" }, children: [
34
34
  /* @__PURE__ */ e(
35
- u,
35
+ L,
36
36
  {
37
37
  bold: n,
38
38
  color: "text.primary",
@@ -43,7 +43,7 @@ const z = ({
43
43
  children: v
44
44
  }
45
45
  ),
46
- /* @__PURE__ */ e(u, { color: "text.secondary", variant: "caption", children: M })
46
+ /* @__PURE__ */ e(L, { color: "text.secondary", variant: "caption", children: M })
47
47
  ] }) }) }),
48
48
  !d && a && /* @__PURE__ */ e(p, { children: a })
49
49
  ] })
@@ -57,18 +57,23 @@ const z = ({
57
57
  secondaryText: n = void 0,
58
58
  useExtraPadding: m = !0
59
59
  }) => /* @__PURE__ */ e(
60
- x,
60
+ o,
61
61
  {
62
- secondaryAction: /* @__PURE__ */ e(o, { checked: r, disabled: a, onChange: l }),
62
+ secondaryAction: /* @__PURE__ */ e(D, { checked: r, disabled: a, onChange: l }),
63
63
  sx: {
64
64
  pl: m ? 48 : 0,
65
65
  "& .MuiListItemSecondaryAction-root": { right: m ? 64 : 24 }
66
66
  },
67
67
  children: /* @__PURE__ */ e(
68
- D,
68
+ u,
69
69
  {
70
70
  primary: d,
71
- primaryTypographyProps: { fontWeight: 400, variant: "body1", maxWidth: "calc(100% - 60px)" },
71
+ primaryTypographyProps: {
72
+ fontWeight: 400,
73
+ variant: "body1",
74
+ maxWidth: "calc(100% - 60px)",
75
+ color: "text.primary"
76
+ },
72
77
  secondary: n,
73
78
  secondaryTypographyProps: {
74
79
  color: "text.secondary",
@@ -0,0 +1,86 @@
1
+ import { F as g, A as e } from "./Fetch-DecPFeGU.mjs";
2
+ class u {
3
+ fetchInstance;
4
+ constructor(n, t, a) {
5
+ this.fetchInstance = new g(n, t, void 0, a);
6
+ }
7
+ addTag = async (n) => this.fetchInstance.post(e.TAGS, n).then((t) => t.tag).catch((t) => t);
8
+ addTagging = async (n) => this.fetchInstance.post(e.TAGGINGS, n).then((t) => t.tagging).catch((t) => t);
9
+ addTransaction = async (n) => this.fetchInstance.post(e.TRANSACTIONS, n).then((t) => t.transaction).catch((t) => t);
10
+ addTransactionRule = async (n) => this.fetchInstance.post(e.TRANSACTION_RULES, n).then((t) => t).catch((t) => t);
11
+ getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((n) => n.map((t) => t.tagging));
12
+ getTags = async () => this.fetchInstance.get(e.TAGS).then((n) => n.map((t) => t.tag));
13
+ getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((n) => n.transaction_rules);
14
+ getTransactionsByDateRange = async (n, t) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${t}`).then((a) => a.map((c) => c.transaction));
15
+ // DEPRECATED
16
+ getTransactionsByAccountsAndDateRange = async (n, t, a) => {
17
+ console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
18
+ const c = n.reduce(
19
+ (o, s, r) => `${o}account_guids[]=${s}${r !== n.length - 1 ? "&" : ""}`,
20
+ ""
21
+ );
22
+ return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${a}?${c}`).then((o) => o.map((s) => s.transaction));
23
+ };
24
+ // DEPRECATED
25
+ getTransactionsByGuids = async (n) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: n.join("+") }).then((t) => t.map((a) => a.transaction)));
26
+ // DEPRECATED
27
+ getTransactionsByCategoryAndDate = async (n, t, a) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
28
+ `${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}`
29
+ ).then((c) => c.map((o) => o.transaction)));
30
+ // DEPRECATED
31
+ getTransactionsByCategoryDateAndAccounts = async (n, t, a, c) => {
32
+ console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
33
+ const o = c.reduce(
34
+ (s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
35
+ ""
36
+ );
37
+ return this.fetchInstance.get(
38
+ `${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}?${o}`
39
+ ).then((s) => s.map((r) => r.transaction));
40
+ };
41
+ // DEPRECATED
42
+ getTransactionsByCategoriesDateAndAccounts = async (n, t, a, c) => {
43
+ console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
44
+ const o = c.reduce(
45
+ (s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
46
+ ""
47
+ );
48
+ return this.fetchInstance.get(
49
+ `${e.TRANSACTIONS}/by_category_guids/${n.join(
50
+ "+"
51
+ )}/by_date/${t}/${a}?${o}`
52
+ ).then((s) => s.map((r) => r.transaction));
53
+ };
54
+ /**
55
+ * DEPRECATED
56
+ * Get all transactions by the top level category, between begin date and end date, and optionally
57
+ * filtered by accounts
58
+ * @param categoryGuid The top level category guid
59
+ * @param beginDate the start date
60
+ * @param endDate the end date
61
+ * @param accountGuids an optional list of account guids
62
+ */
63
+ getTransactionsByTopLevelCategoryAndDate = async (n, t, a, c = []) => {
64
+ console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
65
+ let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${n}/by_date/${t}/${a}`;
66
+ if (c.length > 0) {
67
+ const s = c.reduce(
68
+ (r, i, h) => `${r}account_guids[]=${i}${h !== c.length - 1 ? "&" : ""}`,
69
+ ""
70
+ );
71
+ o += `?${s}`;
72
+ }
73
+ return this.fetchInstance.get(o).then((s) => s.map((r) => r.transaction));
74
+ };
75
+ removeTag = async (n) => this.fetchInstance.delete(`${e.TAGS}/${n}`).then((t) => t).catch((t) => t);
76
+ removeTagging = async (n) => this.fetchInstance.delete(`${e.TAGGINGS}/${n}`).then((t) => t).catch((t) => t);
77
+ removeTransaction = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}`).then((t) => t);
78
+ removeTransactionRule = async (n) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${n}`).catch((t) => t);
79
+ removeTransactionSplit = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}/unsplit`).then((t) => t).catch((t) => t);
80
+ updateTransactionRule = async (n) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${n.guid}`, n).then((t) => t).catch((t) => t);
81
+ updateTag = async (n) => this.fetchInstance.put(`${e.TAGS}/${n.guid}`, n).then((t) => t.tag).catch((t) => t);
82
+ updateTransaction = async (n) => this.fetchInstance.put(`${e.TRANSACTIONS}/${n.guid}`, n).then((t) => t.transaction).catch((t) => t);
83
+ }
84
+ export {
85
+ u as T
86
+ };