@mx-cartographer/experiences 7.2.23-alpha.sms9 → 7.2.24-alpha.mega1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountStore-Btn5o4df.mjs → AccountStore-BkoLK9Tq.mjs} +1 -1
  3. package/dist/{BeatApi-CFYrDz5U.mjs → BeatApi-DhJpgCLz.mjs} +1 -1
  4. package/dist/{BeatStore-DEtafH_V.mjs → BeatStore-IBnXd4YK.mjs} +1 -1
  5. package/dist/{CategoryStore-C1xS77xq.mjs → CategoryStore-BCcpI3oJ.mjs} +1 -1
  6. package/dist/{Fetch-eKeiWwHO.mjs → Fetch-87LIQbEA.mjs} +22 -24
  7. package/dist/{FinstrongStore-rHppBFdm.mjs → FinstrongStore-F2c607dj.mjs} +1 -1
  8. package/dist/{GoalStore-DWzBj5pE.mjs → GoalStore-DZ_Jvsa_.mjs} +1 -1
  9. package/dist/{MerchantStore-C-JxAzJk.mjs → MerchantStore-DrFvsUyy.mjs} +1 -1
  10. package/dist/{NotificationStore-u4lhEpv4.mjs → NotificationStore-86g0bKKR.mjs} +1 -1
  11. package/dist/{RecurringTransactionsStore-NxZVyLT4.mjs → RecurringTransactionsStore-DrzS1LmF.mjs} +1 -1
  12. package/dist/{SettingsStore-BzKZ_3Gx.mjs → SettingsStore-BcgS_Ohv.mjs} +2 -2
  13. package/dist/TransactionApi-B3Tksf7L.mjs +86 -0
  14. package/dist/{TransactionStore-D7b9jEP1.mjs → TransactionStore-hfOsBbDt.mjs} +2 -2
  15. package/dist/{ViewMoreMicroCard-DJD8RyoA.mjs → ViewMoreMicroCard-SCn2wt4i.mjs} +2 -2
  16. package/dist/accounts/index.es.js +1 -1
  17. package/dist/cashflow/index.es.js +1 -1
  18. package/dist/categories/index.es.js +1 -1
  19. package/dist/common/index.es.js +19 -19
  20. package/dist/finstrong/index.es.js +1 -1
  21. package/dist/goals/index.es.js +2 -2
  22. package/dist/insights/index.es.js +1 -1
  23. package/dist/merchants/index.es.js +1 -1
  24. package/dist/microinsights/index.es.js +1 -1
  25. package/dist/notifications/index.es.js +30 -30
  26. package/dist/recurringtransactions/index.es.js +2 -2
  27. package/dist/settings/index.es.js +1 -1
  28. package/dist/transactions/index.es.js +3 -3
  29. package/dist/trends/index.es.js +1 -1
  30. package/dist/{useCombineEvents-CwAgn0fb.mjs → useCombineEvents-BUDIR1ba.mjs} +1 -1
  31. package/package.json +1 -1
  32. package/dist/TransactionApi-DNTc_QPz.mjs +0 -86
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.2.24] - 12-05-2025
2
+
3
+ - **FIXED** - `mark_all_as_viewd` API called after getting `notifications` api response in `Notifications List`.
4
+
1
5
  ## [7.2.23] - 12-03-2025
2
6
 
3
7
  - **UPDATED** - `GlobalStore` emits an update when a subscribed-to variable changes. Good for external libraries like Pulse.
@@ -1,6 +1,6 @@
1
1
  import { makeAutoObservable as A, runInAction as a } from "mobx";
2
2
  import { i as f } from "./User-BQUxBeZV.mjs";
3
- import { F as p, A as i } from "./Fetch-eKeiWwHO.mjs";
3
+ import { F as p, A as i } from "./Fetch-87LIQbEA.mjs";
4
4
  import { A as c, h as d, d as h, E as y, i as I, j as b } from "./ConnectDrawer-Bw5s6Dw1.mjs";
5
5
  class _ {
6
6
  fetchInstance;
@@ -1,4 +1,4 @@
1
- import { F as c, A as s } from "./Fetch-eKeiWwHO.mjs";
1
+ import { F as c, A as s } from "./Fetch-87LIQbEA.mjs";
2
2
  class i {
3
3
  fetchInstance;
4
4
  constructor(t, e, n) {
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as c, runInAction as r } from "mobx";
2
- import { B as l } from "./BeatApi-CFYrDz5U.mjs";
2
+ import { B as l } from "./BeatApi-DhJpgCLz.mjs";
3
3
  function d(t, e, s, i = "asc") {
4
4
  const a = i === "desc" ? -1 : 1;
5
5
  return [...t, ...e].sort((_, n) => _[s] < n[s] ? -1 * a : _[s] > n[s] ? 1 * a : 0);
@@ -4,7 +4,7 @@ import { subMonths as g } from "date-fns/subMonths";
4
4
  import { startOfMonth as h } from "date-fns/startOfMonth";
5
5
  import { endOfMonth as d } from "date-fns/endOfMonth";
6
6
  import { a as T, g as m } from "./CategoryUtil-BR3H5i6n.mjs";
7
- import { F as p, A as i } from "./Fetch-eKeiWwHO.mjs";
7
+ import { F as p, A as i } from "./Fetch-87LIQbEA.mjs";
8
8
  import { b as f, c as w } from "./Category-CevNQ03n.mjs";
9
9
  class y {
10
10
  fetchInstance;
@@ -1,4 +1,4 @@
1
- import { g as i } from "./Localization-2MODESHW.mjs";
1
+ import { g as r } from "./Localization-2MODESHW.mjs";
2
2
  const E = {
3
3
  ACCOUNTS: "accounts",
4
4
  ANALYTICS_EVENTS: "analytics_events",
@@ -46,26 +46,26 @@ const E = {
46
46
  USER_PROFILES: "user_profiles",
47
47
  WIDGET_URLS: "widget_urls"
48
48
  };
49
- class _ {
49
+ class S {
50
50
  endpoint = "/";
51
51
  headers;
52
52
  onError;
53
- constructor(n, s, t, o) {
54
- this.endpoint = n;
53
+ constructor(s, n, t, o) {
54
+ this.endpoint = s;
55
55
  const e = {
56
56
  Accept: "application/json",
57
- "Accept-Language": i(),
57
+ "Accept-Language": r(),
58
58
  "Content-Type": "application/json",
59
- "MD-Session-Token": s
59
+ "MD-Session-Token": n
60
60
  };
61
61
  this.headers = t || e, this.onError = o;
62
62
  }
63
- get = async (n) => {
64
- const s = {
63
+ get = async (s) => {
64
+ const n = {
65
65
  method: "GET",
66
66
  headers: this.headers
67
67
  };
68
- return fetch(`${this.endpoint}${n}`, s).then((t) => {
68
+ return fetch(`${this.endpoint}${s}`, n).then((t) => {
69
69
  if (t.ok)
70
70
  return t.text();
71
71
  throw t;
@@ -73,13 +73,13 @@ class _ {
73
73
  throw this.onError?.(t, void 0, "ApiGetRequestError"), t;
74
74
  });
75
75
  };
76
- post = async (n, s) => {
77
- const t = s ? JSON.stringify(s) : void 0, o = {
76
+ post = async (s, n) => {
77
+ const t = n ? JSON.stringify(n) : void 0, o = {
78
78
  method: "POST",
79
79
  headers: this.headers,
80
80
  body: t
81
81
  };
82
- return fetch(`${this.endpoint}${n}`, o).then((e) => {
82
+ return fetch(`${this.endpoint}${s}`, o).then((e) => {
83
83
  if (!e.ok)
84
84
  throw e;
85
85
  return e.text();
@@ -87,26 +87,24 @@ class _ {
87
87
  throw e;
88
88
  });
89
89
  };
90
- put = async (n, s) => {
91
- const t = JSON.stringify(s), o = {
90
+ put = async (s, n) => {
91
+ const t = JSON.stringify(n), o = {
92
92
  method: "PUT",
93
93
  headers: this.headers,
94
94
  body: t
95
95
  };
96
- return fetch(`${this.endpoint}${n}`, o).then((e) => {
97
- if (e.ok)
98
- return e.text();
99
- throw new Error(`${e.status}`);
100
- }).then((e) => e.length ? JSON.parse(e) : {}).then((e) => e).catch((e) => {
101
- throw console.log("err from exp", e), console.log("err msg?", e.message), this.onError?.(e), e;
96
+ return fetch(`${this.endpoint}${s}`, o).then((e) => e.ok ? e.text() : e.text().then((i) => {
97
+ throw new Error(i);
98
+ })).then((e) => e.length ? JSON.parse(e) : {}).then((e) => e).catch((e) => {
99
+ throw e;
102
100
  });
103
101
  };
104
- delete = async (n) => {
105
- const s = {
102
+ delete = async (s) => {
103
+ const n = {
106
104
  method: "DELETE",
107
105
  headers: this.headers
108
106
  };
109
- return fetch(`${this.endpoint}${n}`, s).then((t) => t.ok ? t.text() : t.text().then((o) => {
107
+ return fetch(`${this.endpoint}${s}`, n).then((t) => t.ok ? t.text() : t.text().then((o) => {
110
108
  throw new Error(o);
111
109
  })).then((t) => t.length ? JSON.parse(t) : {}).then((t) => t).catch((t) => {
112
110
  throw t;
@@ -115,5 +113,5 @@ class _ {
115
113
  }
116
114
  export {
117
115
  E as A,
118
- _ as F
116
+ S as F
119
117
  };
@@ -3,7 +3,7 @@ import { format as i } from "date-fns/format";
3
3
  import { fromUnixTime as g } from "date-fns/fromUnixTime";
4
4
  import { getUnixTime as s } from "date-fns/getUnixTime";
5
5
  import { subMonths as S } from "date-fns/subMonths";
6
- import { F as m, A as o } from "./Fetch-eKeiWwHO.mjs";
6
+ import { F as m, A as o } from "./Fetch-87LIQbEA.mjs";
7
7
  import { f as p, D as u } from "./Dialog-CWW597AF.mjs";
8
8
  class n {
9
9
  fetchInstance;
@@ -10,7 +10,7 @@ import { Text as A } from "@mxenabled/mxui";
10
10
  import { l as b } from "./ConnectDrawer-Bw5s6Dw1.mjs";
11
11
  import { a as y } from "./hooks-D6XlXHf4.mjs";
12
12
  import { makeAutoObservable as D, runInAction as c } from "mobx";
13
- import { F as v, A as i } from "./Fetch-eKeiWwHO.mjs";
13
+ import { F as v, A as i } from "./Fetch-87LIQbEA.mjs";
14
14
  import { fromUnixTime as G } from "date-fns/fromUnixTime";
15
15
  import { addYears as x } from "date-fns/addYears";
16
16
  import { getUnixTime as K } from "date-fns/getUnixTime";
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as m, runInAction as c } from "mobx";
2
- import { F as p, A as h } from "./Fetch-eKeiWwHO.mjs";
2
+ import { F as p, A as h } from "./Fetch-87LIQbEA.mjs";
3
3
  class i {
4
4
  fetchInstance;
5
5
  constructor(t, n, s) {
@@ -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-eKeiWwHO.mjs";
3
+ import { F as l, A as a } from "./Fetch-87LIQbEA.mjs";
4
4
  class s {
5
5
  fetchInstance;
6
6
  constructor(t, i, n) {
@@ -7,7 +7,7 @@ import { isWithinInterval as m } from "date-fns/isWithinInterval";
7
7
  import { startOfMonth as S } from "date-fns/startOfMonth";
8
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 o } from "./Fetch-eKeiWwHO.mjs";
10
+ import { F as x, A as o } from "./Fetch-87LIQbEA.mjs";
11
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;
@@ -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-eKeiWwHO.mjs";
2
+ import { F as D, A as r } from "./Fetch-87LIQbEA.mjs";
3
3
  import { B as f, A as n, I as i } from "./ToggleListItem-r0Kx56wF.mjs";
4
- import { T as m } from "./TransactionApi-DNTc_QPz.mjs";
4
+ import { T as m } from "./TransactionApi-B3Tksf7L.mjs";
5
5
  class y {
6
6
  fetchInstance;
7
7
  constructor(e, t, o) {
@@ -0,0 +1,86 @@
1
+ import { F as T, A as e } from "./Fetch-87LIQbEA.mjs";
2
+ class u {
3
+ fetchInstance;
4
+ constructor(t, n, a) {
5
+ this.fetchInstance = new T(t, n, void 0, a);
6
+ }
7
+ addTag = async (t) => this.fetchInstance.post(e.TAGS, t).then((n) => n.tag);
8
+ addTagging = async (t) => this.fetchInstance.post(e.TAGGINGS, t).then((n) => n.tagging);
9
+ addTransaction = async (t) => this.fetchInstance.post(e.TRANSACTIONS, t).then((n) => n.transaction);
10
+ addTransactionRule = async (t) => this.fetchInstance.post(e.TRANSACTION_RULES, t).then((n) => n);
11
+ getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((t) => t.map((n) => n.tagging));
12
+ getTags = async () => this.fetchInstance.get(e.TAGS).then((t) => t.map((n) => n.tag));
13
+ getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((t) => t.transaction_rules);
14
+ getTransactionsByDateRange = async (t, n) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${n}`).then((a) => a.map((s) => s.transaction));
15
+ // DEPRECATED
16
+ getTransactionsByAccountsAndDateRange = async (t, n, a) => {
17
+ console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
18
+ const s = t.reduce(
19
+ (o, c, r) => `${o}account_guids[]=${c}${r !== t.length - 1 ? "&" : ""}`,
20
+ ""
21
+ );
22
+ return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${a}?${s}`).then((o) => o.map((c) => c.transaction));
23
+ };
24
+ // DEPRECATED
25
+ getTransactionsByGuids = async (t) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: t.join("+") }).then((n) => n.map((a) => a.transaction)));
26
+ // DEPRECATED
27
+ getTransactionsByCategoryAndDate = async (t, n, a) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
28
+ `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${a}`
29
+ ).then((s) => s.map((o) => o.transaction)));
30
+ // DEPRECATED
31
+ getTransactionsByCategoryDateAndAccounts = async (t, n, a, s) => {
32
+ console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
33
+ const o = s.reduce(
34
+ (c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
35
+ ""
36
+ );
37
+ return this.fetchInstance.get(
38
+ `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${a}?${o}`
39
+ ).then((c) => c.map((r) => r.transaction));
40
+ };
41
+ // DEPRECATED
42
+ getTransactionsByCategoriesDateAndAccounts = async (t, n, a, s) => {
43
+ console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
44
+ const o = s.reduce(
45
+ (c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
46
+ ""
47
+ );
48
+ return this.fetchInstance.get(
49
+ `${e.TRANSACTIONS}/by_category_guids/${t.join(
50
+ "+"
51
+ )}/by_date/${n}/${a}?${o}`
52
+ ).then((c) => c.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 (t, n, a, s = []) => {
64
+ console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
65
+ let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${t}/by_date/${n}/${a}`;
66
+ if (s.length > 0) {
67
+ const c = s.reduce(
68
+ (r, i, g) => `${r}account_guids[]=${i}${g !== s.length - 1 ? "&" : ""}`,
69
+ ""
70
+ );
71
+ o += `?${c}`;
72
+ }
73
+ return this.fetchInstance.get(o).then((c) => c.map((r) => r.transaction));
74
+ };
75
+ removeTag = async (t) => this.fetchInstance.delete(`${e.TAGS}/${t}`).then((n) => n);
76
+ removeTagging = async (t) => this.fetchInstance.delete(`${e.TAGGINGS}/${t}`).then((n) => n);
77
+ removeTransaction = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}`).then((n) => n);
78
+ removeTransactionRule = async (t) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${t}`);
79
+ removeTransactionSplit = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}/unsplit`).then((n) => n);
80
+ updateTransactionRule = async (t) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${t.guid}`, t).then((n) => n);
81
+ updateTag = async (t) => this.fetchInstance.put(`${e.TAGS}/${t.guid}`, t).then((n) => n.tag);
82
+ updateTransaction = async (t) => this.fetchInstance.put(`${e.TRANSACTIONS}/${t.guid}`, t).then((n) => n.transaction);
83
+ }
84
+ export {
85
+ u as T
86
+ };
@@ -14,13 +14,13 @@ import { startOfMonth as R } from "date-fns/startOfMonth";
14
14
  import { startOfToday as b } from "date-fns/startOfToday";
15
15
  import { subDays as F } from "date-fns/subDays";
16
16
  import { O as n, a as G, T as w } from "./User-BQUxBeZV.mjs";
17
- import { T as p } from "./TransactionApi-DNTc_QPz.mjs";
17
+ import { T as p } from "./TransactionApi-B3Tksf7L.mjs";
18
18
  import { b as W } from "./Category-CevNQ03n.mjs";
19
19
  import { f as z } from "./exportTransactionsToCSV-BwwmL4pM.mjs";
20
20
  import { format as k } from "date-fns/format";
21
21
  import { f as g, D as O, O as $ } from "./Dialog-CWW597AF.mjs";
22
22
  import { endOfMonth as X } from "date-fns/endOfMonth";
23
- import { B as f } from "./BeatApi-CFYrDz5U.mjs";
23
+ import { B as f } from "./BeatApi-DhJpgCLz.mjs";
24
24
  const j = ({
25
25
  checked: S = !1,
26
26
  label: t,
@@ -17,8 +17,8 @@ import { css as Xe } from "@mxenabled/cssinjs";
17
17
  import { b as Qe } from "./Localization-2MODESHW.mjs";
18
18
  import qe from "@mui/material/CircularProgress";
19
19
  import { makeAutoObservable as de, runInAction as Oe } from "mobx";
20
- import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-CwAgn0fb.mjs";
21
- import { B as Ce } from "./BeatApi-CFYrDz5U.mjs";
20
+ import { G as _e, a as Je, u as et, b as tt } from "./useCombineEvents-BUDIR1ba.mjs";
21
+ import { B as Ce } from "./BeatApi-DhJpgCLz.mjs";
22
22
  import it from "@mui/material/Card";
23
23
  import ot from "@mui/material/CardActions";
24
24
  import rt from "@mui/material/CardContent";
@@ -25,7 +25,7 @@ import { F as K1, M as z1 } from "../ConnectDrawer-Bw5s6Dw1.mjs";
25
25
  import l1 from "@mui/material/ListItem";
26
26
  import { M as $ } from "../MiniWidgetContainer-D0gfmbaF.mjs";
27
27
  import i1 from "@mui/material/Stack";
28
- import { A as Y1, a as q1 } from "../AccountStore-Btn5o4df.mjs";
28
+ import { A as Y1, a as q1 } from "../AccountStore-BkoLK9Tq.mjs";
29
29
  const n1 = () => {
30
30
  const [c, h] = d.useState(""), { accounts: C } = Z(), { selectedAccounts: l } = b(), { setSelectedAccount: p, setSelectedMember: u } = z(), { members: H } = T(), { onEvent: f } = D(), a = [...new Set(l.map((t) => t.account_type))], r = l.find((t) => c === t.guid), s = d.useMemo(
31
31
  () => l.filter((t) => t.is_hidden),
@@ -46,7 +46,7 @@ import { F as ft, R as De, e as ve } from "../RecurringTransactions-ej39mgA6.mjs
46
46
  import { h as gt } from "../DateUtil-BcuH7ErC.mjs";
47
47
  import { endOfToday as bt } from "date-fns/endOfToday";
48
48
  import { W as Ae, A as Ee } from "../WidgetContainer-EbrN1oIo.mjs";
49
- import { F as xt, A as z } from "../Fetch-eKeiWwHO.mjs";
49
+ import { F as xt, A as z } from "../Fetch-87LIQbEA.mjs";
50
50
  const K = () => {
51
51
  if (!p.useContext(Qe))
52
52
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
@@ -1,5 +1,5 @@
1
1
  import { b as o, C as a, a as t, u as C } from "../CategorySelectorDrawer-BXnLseqP.mjs";
2
- import { C as g } from "../CategoryStore-C1xS77xq.mjs";
2
+ import { C as g } from "../CategoryStore-BCcpI3oJ.mjs";
3
3
  export {
4
4
  o as CategoryRow,
5
5
  a as CategorySelector,
@@ -1,11 +1,11 @@
1
- import { G as k } from "../useCombineEvents-CwAgn0fb.mjs";
2
- import { A as rs, a as os, u as as, b as ns } from "../useCombineEvents-CwAgn0fb.mjs";
3
- import { F as S, A as h } from "../Fetch-eKeiWwHO.mjs";
4
- import { B as cs } from "../BeatApi-CFYrDz5U.mjs";
5
- import { C as et } from "../CategoryStore-C1xS77xq.mjs";
6
- import { a as ls } from "../CategoryStore-C1xS77xq.mjs";
7
- import { N as st } from "../NotificationStore-u4lhEpv4.mjs";
8
- import { a as hs } from "../NotificationStore-u4lhEpv4.mjs";
1
+ import { G as k } from "../useCombineEvents-BUDIR1ba.mjs";
2
+ import { A as rs, a as os, u as as, b as ns } from "../useCombineEvents-BUDIR1ba.mjs";
3
+ import { F as S, A as h } from "../Fetch-87LIQbEA.mjs";
4
+ import { B as cs } from "../BeatApi-DhJpgCLz.mjs";
5
+ import { C as et } from "../CategoryStore-BCcpI3oJ.mjs";
6
+ import { a as ls } from "../CategoryStore-BCcpI3oJ.mjs";
7
+ import { N as st } from "../NotificationStore-86g0bKKR.mjs";
8
+ import { a as hs } from "../NotificationStore-86g0bKKR.mjs";
9
9
  import { T as rt } from "../User-BQUxBeZV.mjs";
10
10
  import { C as ps, b as ms, L as _s, a as fs } from "../User-BQUxBeZV.mjs";
11
11
  import { H as ot } from "../Help-DhcC-C05.mjs";
@@ -18,15 +18,15 @@ import { C as Qs } from "../CurrencyInput-DUsQbkXb.mjs";
18
18
  import { L as Xs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as Ks } from "../ResponsiveButton-DZFp78fJ.mjs";
20
20
  import { S as Zs } from "../SearchBox-B2_zLv8-.mjs";
21
- import { T as at } from "../TransactionStore-D7b9jEP1.mjs";
22
- import { S as tr } from "../TransactionStore-D7b9jEP1.mjs";
21
+ import { T as at } from "../TransactionStore-hfOsBbDt.mjs";
22
+ import { S as tr } from "../TransactionStore-hfOsBbDt.mjs";
23
23
  import { T as sr } from "../TabContentContainer-j01JYR_7.mjs";
24
24
  import { I as or } from "../IconBacking-B9oC6uL2.mjs";
25
25
  import { D as nr, F as ir, a as cr, c as dr, R as lr, S as ur } from "../RecurringTransactions-ej39mgA6.mjs";
26
26
  import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
27
27
  import { I as gr } from "../CashflowStore-D9Dpuz7X.mjs";
28
- import { d as it } from "../GoalStore-DWzBj5pE.mjs";
29
- import { C as mr, G as _r, M as fr, T as yr } from "../GoalStore-DWzBj5pE.mjs";
28
+ import { d as it } from "../GoalStore-DZ_Jvsa_.mjs";
29
+ import { C as mr, G as _r, M as fr, T as yr } from "../GoalStore-DZ_Jvsa_.mjs";
30
30
  import { C as br } from "../CurrencyText-kyC1aseI.mjs";
31
31
  import { E as xr } from "../EmptyState-DA_lfRBv.mjs";
32
32
  import { L as vr } from "../ListItemAction-DHa3KJPs.mjs";
@@ -48,27 +48,27 @@ import { I as Zr, P as Jr, S as to } from "../Account-vp_TAbGt.mjs";
48
48
  import { b as E } from "../Category-CevNQ03n.mjs";
49
49
  import { C as so, c as ro, a as oo, P as ao } from "../Category-CevNQ03n.mjs";
50
50
  import { C as io, f as co, b as lo, a as uo, g as ho, i as go } from "../NumberFormatting-Buh7u8Oi.mjs";
51
- import { R as mt } from "../RecurringTransactionsStore-NxZVyLT4.mjs";
52
- import { S as mo, T as _o } from "../RecurringTransactionsStore-NxZVyLT4.mjs";
51
+ import { R as mt } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
52
+ import { S as mo, T as _o } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
53
53
  import { G as yo, C as So, D as bo, W as wo, d as xo, a as Co, i as vo, v as Do, m as Ao, y as Eo, z as To, g as Bo, x as Io, u as No, f as Mo, b as ko, l as $o, A as Ro, t as Uo, n as Po, c as Oo, r as Lo, o as Go, B as Ho, j as Fo, s as Wo, h as qo, w as Yo, p as Qo, q as zo } from "../hooks-D6XlXHf4.mjs";
54
54
  import { u as jo } from "../useAccountDisplayName-jS05A6-6.mjs";
55
55
  import { u as Vo } from "../useInsightsEnabled-DBpwEq10.mjs";
56
56
  import { u as Jo } from "../useScreenSize-B6JyS_Lj.mjs";
57
57
  import { makeAutoObservable as f, runInAction as p, reaction as _t, autorun as ft } from "mobx";
58
- import { a as yt } from "../AccountStore-Btn5o4df.mjs";
58
+ import { a as yt } from "../AccountStore-BkoLK9Tq.mjs";
59
59
  import St from "posthog-js";
60
- import { B as bt } from "../BeatStore-DEtafH_V.mjs";
60
+ import { B as bt } from "../BeatStore-IBnXd4YK.mjs";
61
61
  import { endOfMonth as Z } from "date-fns/endOfMonth";
62
62
  import { startOfMonth as J } from "date-fns/startOfMonth";
63
63
  import { startOfToday as O } from "date-fns/startOfToday";
64
64
  import { f as wt, a as xt, b as L } from "../BudgetUtil-B2ZXyw-g.mjs";
65
65
  import { g as ea, e as sa, c as ra, d as oa, i as aa } from "../BudgetUtil-B2ZXyw-g.mjs";
66
66
  import { a as Ct } from "../DebtsStore-BD_XwsI7.mjs";
67
- import { a as vt } from "../FinstrongStore-rHppBFdm.mjs";
67
+ import { a as vt } from "../FinstrongStore-F2c607dj.mjs";
68
68
  import { A as Dt, m as At, a as Et, b as Tt } from "../InvestmentUtil-jOyOgzIB.mjs";
69
- import { M as Bt } from "../MerchantStore-C-JxAzJk.mjs";
69
+ import { M as Bt } from "../MerchantStore-DrFvsUyy.mjs";
70
70
  import { N as It } from "../NetWorthStore-D1NiDUcc.mjs";
71
- import { a as Nt } from "../SettingsStore-BzKZ_3Gx.mjs";
71
+ import { a as Nt } from "../SettingsStore-BcgS_Ohv.mjs";
72
72
  import { addMonths as Mt } from "date-fns/addMonths";
73
73
  import { getMonth as T } from "date-fns/getMonth";
74
74
  import { i as ia } from "../DateUtil-BcuH7ErC.mjs";
@@ -19,7 +19,7 @@ import * as le from "d3";
19
19
  import { observer as I } from "mobx-react-lite";
20
20
  import { u as S, b as z, x as $, p as Y, d as ye, i as be, n as Ke, m as Xe } from "../hooks-D6XlXHf4.mjs";
21
21
  import { L as N } from "../Loader-DUaFpDGv.mjs";
22
- import { F as Ko, a as Xo } from "../FinstrongStore-rHppBFdm.mjs";
22
+ import { F as Ko, a as Xo } from "../FinstrongStore-F2c607dj.mjs";
23
23
  import q from "@mui/material/Button";
24
24
  import J from "@mui/material/Card";
25
25
  import { L as xe } from "../LineChart-4Zi8Z8PR.mjs";
@@ -1,5 +1,5 @@
1
- import { g as _e, T as m, G as ue, a as Pe, M as q, C as Ae, b as Ve } from "../GoalStore-DWzBj5pE.mjs";
2
- import { c as qn, d as Jn } from "../GoalStore-DWzBj5pE.mjs";
1
+ import { g as _e, T as m, G as ue, a as Pe, M as q, C as Ae, b as Ve } from "../GoalStore-DZ_Jvsa_.mjs";
2
+ import { c as qn, d as Jn } from "../GoalStore-DZ_Jvsa_.mjs";
3
3
  import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
5
5
  import { observer as D } from "mobx-react-lite";
@@ -1,4 +1,4 @@
1
- import { B as r } from "../BeatStore-DEtafH_V.mjs";
1
+ import { B as r } from "../BeatStore-IBnXd4YK.mjs";
2
2
  export {
3
3
  r as BeatStore
4
4
  };
@@ -15,7 +15,7 @@ import { MerchantLogo as V, Text as R } from "@mxenabled/mxui";
15
15
  import { c as v, u as w, b as C } from "../hooks-D6XlXHf4.mjs";
16
16
  import { L as p } from "../Loader-DUaFpDGv.mjs";
17
17
  import { S as N } from "../SearchBox-B2_zLv8-.mjs";
18
- import { M as ne } from "../MerchantStore-C-JxAzJk.mjs";
18
+ import { M as ne } from "../MerchantStore-DrFvsUyy.mjs";
19
19
  const B = /^[ a-zA-ZÀ-ÿ0-9]+$/, H = 50, u = 65, P = ({
20
20
  height: f = "calc(100dvh - 120px)",
21
21
  onSelect: g
@@ -1,4 +1,4 @@
1
- import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-DJD8RyoA.mjs";
1
+ import { A as s, B as e, C as o, c as t, b as i, I as d, M as n, a as C, d as c, N as I, V as M, Z as g, e as h } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
2
2
  export {
3
3
  s as AppStore,
4
4
  e as BeatCard,
@@ -1,7 +1,7 @@
1
1
  import { A as f, B as b } from "../ToggleListItem-r0Kx56wF.mjs";
2
- import { A as _ } from "../Fetch-eKeiWwHO.mjs";
3
- import { s as L } from "../NotificationStore-u4lhEpv4.mjs";
4
- import { N as Nt, f as St } from "../NotificationStore-u4lhEpv4.mjs";
2
+ import { A as _ } from "../Fetch-87LIQbEA.mjs";
3
+ import { s as L } from "../NotificationStore-86g0bKKR.mjs";
4
+ import { N as Nt, f as St } from "../NotificationStore-86g0bKKR.mjs";
5
5
  import { jsx as t, jsxs as d, Fragment as x } from "react/jsx-runtime";
6
6
  import k, { useEffect as A } from "react";
7
7
  import { observer as p } from "mobx-react-lite";
@@ -19,8 +19,8 @@ import { L as w } from "../Loader-DUaFpDGv.mjs";
19
19
  import $ from "@mui/material/IconButton";
20
20
  import { N as H } from "../NotificationSettings-5i3IywCi.mjs";
21
21
  import { D as C } from "../Drawer-kEE73B87.mjs";
22
- const yt = (i) => {
23
- switch (i) {
22
+ const yt = (e) => {
23
+ switch (e) {
24
24
  case b.BudgetExceeded:
25
25
  case b.BudgetOffTarget:
26
26
  return _.BUDGETS;
@@ -35,8 +35,8 @@ const yt = (i) => {
35
35
  default:
36
36
  return null;
37
37
  }
38
- }, M = ({ date: i }) => /* @__PURE__ */ t(y, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(m, { bold: !0, variant: "Small", children: I(i) }) }), V = ({ notification: i }) => {
39
- const { accounts: o } = E(), { budgets: s } = j(), { accounts: a } = g(), e = o.find((l) => l.guid === i.entity_guid), r = s.find((l) => l.guid === i.entity_guid), u = i.entity_guid.includes("GOL"), c = {
38
+ }, M = ({ date: e }) => /* @__PURE__ */ t(y, { sx: { display: "flex", justifyContent: "center", mt: 12, py: 8 }, children: /* @__PURE__ */ t(m, { bold: !0, variant: "Small", children: I(e) }) }), V = ({ notification: e }) => {
39
+ const { accounts: o } = E(), { budgets: s } = j(), { accounts: a } = g(), i = o.find((l) => l.guid === e.entity_guid), r = s.find((l) => l.guid === e.entity_guid), u = e.entity_guid.includes("GOL"), c = {
40
40
  badge: {
41
41
  display: "flex",
42
42
  alignItems: "center",
@@ -45,16 +45,16 @@ const yt = (i) => {
45
45
  marginRight: 12
46
46
  }
47
47
  };
48
- return e || u ? /* @__PURE__ */ t("div", { style: c.badge, children: /* @__PURE__ */ t(
48
+ return i || u ? /* @__PURE__ */ t("div", { style: c.badge, children: /* @__PURE__ */ t(
49
49
  T,
50
50
  {
51
- alt: e?.institutionName || a.institution_logo_alt,
52
- institutionGuid: e?.institution_guid ?? "",
51
+ alt: i?.institutionName || a.institution_logo_alt,
52
+ institutionGuid: i?.institution_guid ?? "",
53
53
  size: 33
54
54
  }
55
55
  ) }) : /* @__PURE__ */ t("div", { style: c.badge, children: /* @__PURE__ */ t(R, { categoryGuid: r?.category_guid, size: 36 }) });
56
- }, X = p(V), Y = ({ notification: i, onClick: o }) => {
57
- const { updateNotification: s } = N(), a = O(), e = {
56
+ }, X = p(V), Y = ({ notification: e, onClick: o }) => {
57
+ const { updateNotification: s } = N(), a = O(), i = {
58
58
  card: {
59
59
  alignItems: "center",
60
60
  cursor: "pointer",
@@ -80,14 +80,14 @@ const yt = (i) => {
80
80
  }
81
81
  };
82
82
  return /* @__PURE__ */ d(G, { onClick: () => {
83
- o(i), s({ ...i, has_been_viewed: !0 }).finally();
84
- }, sx: e.card, children: [
85
- i.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: e.dot }),
86
- /* @__PURE__ */ t(X, { notification: i }),
87
- /* @__PURE__ */ t(m, { bold: !i.has_been_viewed, truncate: !1, variant: "Small", children: i.content })
83
+ o(e), s({ ...e, has_been_viewed: !0 }).finally();
84
+ }, sx: i.card, children: [
85
+ e.has_been_viewed ? null : /* @__PURE__ */ t("div", { "data-testid": "new-message-dot", style: i.dot }),
86
+ /* @__PURE__ */ t(X, { notification: e }),
87
+ /* @__PURE__ */ t(m, { bold: !e.has_been_viewed, truncate: !1, variant: "Small", children: e.content })
88
88
  ] });
89
89
  }, q = p(
90
- ({ onManageNotifications: i }) => {
90
+ ({ onManageNotifications: e }) => {
91
91
  const { notifications: o } = g();
92
92
  return /* @__PURE__ */ d(W, { sx: { alignItems: "center", height: "95%", justifyContent: "center" }, children: [
93
93
  /* @__PURE__ */ t(U, { name: "notifications", size: 32 }),
@@ -106,20 +106,20 @@ const yt = (i) => {
106
106
  children: o.notification_empty_state.notification_description
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ t(P, { onClick: i, sx: { p: "12px 16px" }, variant: "outlined", children: o.notification_empty_state.manage_notifications })
109
+ /* @__PURE__ */ t(P, { onClick: e, sx: { p: "12px 16px" }, variant: "outlined", children: o.notification_empty_state.manage_notifications })
110
110
  ] });
111
111
  }
112
- ), J = ({ onClick: i, onManageNotifications: o }) => {
113
- const { isLoading: s, loadNotifications: a, newNotifications: e, markAllAsViewed: r } = N(), { notifications: u } = g(), { isCopyLoaded: c } = S(), l = (n) => {
114
- i?.(n);
112
+ ), J = ({ onClick: e, onManageNotifications: o }) => {
113
+ const { isLoading: s, loadNotifications: a, newNotifications: i, markAllAsViewed: r } = N(), { notifications: u } = g(), { isCopyLoaded: c } = S(), l = (n) => {
114
+ e?.(n);
115
115
  };
116
116
  return A(() => {
117
- a().finally(), r().finally();
117
+ a().then(() => r()).finally();
118
118
  }, [a, r]), /* @__PURE__ */ d(x, { children: [
119
119
  (!c || s) && /* @__PURE__ */ t(w, { label: u?.loading, size: 40 }),
120
- c && !s && e.length === 0 && /* @__PURE__ */ t(q, { onManageNotifications: o }),
121
- /* @__PURE__ */ t(B, { sx: { p: 16 }, children: c && !s && e.slice().sort((n, h) => h.delivered_at - n.delivered_at).map((n, h) => {
122
- const v = L(h, e);
120
+ c && !s && i.length === 0 && /* @__PURE__ */ t(q, { onManageNotifications: o }),
121
+ /* @__PURE__ */ t(B, { sx: { p: 16 }, children: c && !s && i.slice().sort((n, h) => h.delivered_at - n.delivered_at).map((n, h) => {
122
+ const v = L(h, i);
123
123
  return /* @__PURE__ */ d(y, { sx: { mb: 12 }, children: [
124
124
  v && /* @__PURE__ */ d(y, { sx: { mb: 12 }, children: [
125
125
  /* @__PURE__ */ t(M, { date: n.delivered_at }),
@@ -130,8 +130,8 @@ const yt = (i) => {
130
130
  }) })
131
131
  ] });
132
132
  }, K = p(J), bt = p(
133
- ({ notificationTypes: i, isOpen: o, onClose: s, onNotificationClick: a }) => {
134
- const { config: e } = z(), { notifications: r, settings: u } = g(), { isCopyLoaded: c } = S(), [l, n] = k.useState(!1);
133
+ ({ notificationTypes: e, isOpen: o, onClose: s, onNotificationClick: a }) => {
134
+ const { config: i } = z(), { notifications: r, settings: u } = g(), { isCopyLoaded: c } = S(), [l, n] = k.useState(!1);
135
135
  return c ? /* @__PURE__ */ d(x, { children: [
136
136
  /* @__PURE__ */ d(
137
137
  C,
@@ -174,8 +174,8 @@ const yt = (i) => {
174
174
  children: /* @__PURE__ */ t(
175
175
  H,
176
176
  {
177
- notificationTypes: i,
178
- showPersonalDetails: !e.display_user_profile_in_settings
177
+ notificationTypes: e,
178
+ showPersonalDetails: !i.display_user_profile_in_settings
179
179
  }
180
180
  )
181
181
  }
@@ -30,8 +30,8 @@ import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
30
30
  import { I as q } from "../IconBacking-B9oC6uL2.mjs";
31
31
  import { u as T, b as Z, j as v, g as J, q as Oe, d as he, h as fe, n as ot } from "../hooks-D6XlXHf4.mjs";
32
32
  import { c as L, a as S, g as Ie, f as at } from "../RecurringTransactions-ej39mgA6.mjs";
33
- import { T as B } from "../RecurringTransactionsStore-NxZVyLT4.mjs";
34
- import { R as On } from "../RecurringTransactionsStore-NxZVyLT4.mjs";
33
+ import { T as B } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
34
+ import { R as On } from "../RecurringTransactionsStore-DrzS1LmF.mjs";
35
35
  import { A as I, W as st } from "../WidgetContainer-EbrN1oIo.mjs";
36
36
  import ct from "@mui/material/Button";
37
37
  import le from "@mui/material/Divider";
@@ -1,4 +1,4 @@
1
- import { S as Kt, a as Xt } from "../SettingsStore-BzKZ_3Gx.mjs";
1
+ import { S as Kt, a as Xt } from "../SettingsStore-BcgS_Ohv.mjs";
2
2
  import { jsxs as c, Fragment as q, jsx as e } from "react/jsx-runtime";
3
3
  import u from "react";
4
4
  import { observer as D } from "mobx-react-lite";
@@ -1,10 +1,10 @@
1
- import { T as Ta } from "../TransactionApi-DNTc_QPz.mjs";
1
+ import { T as Ta } from "../TransactionApi-B3Tksf7L.mjs";
2
2
  import { u as P, C as Pe, D as $e, M as Ve, d as We, c as Ge, T as Ue, a as Fe } from "../TransactionDetails-Cscyr17P.mjs";
3
3
  import { B as Sa, e as xa, b as wa } from "../TransactionDetails-Cscyr17P.mjs";
4
4
  import { T as M } from "../User-BQUxBeZV.mjs";
5
5
  import { O as va } from "../User-BQUxBeZV.mjs";
6
- import { S as ae, D as ze } from "../TransactionStore-D7b9jEP1.mjs";
7
- import { T as Na } from "../TransactionStore-D7b9jEP1.mjs";
6
+ import { S as ae, D as ze } from "../TransactionStore-hfOsBbDt.mjs";
7
+ import { T as Na } from "../TransactionStore-hfOsBbDt.mjs";
8
8
  import { e as Ke } from "../exportTransactionsToCSV-BwwmL4pM.mjs";
9
9
  import { E as Oa } from "../ExportCsvAction-DTO_UotC.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
@@ -19,7 +19,7 @@ import { DataGridPro as mt } from "@mui/x-data-grid-pro";
19
19
  import { C as pt } from "../CurrencyText-kyC1aseI.mjs";
20
20
  import { b as Ct } from "../Localization-2MODESHW.mjs";
21
21
  import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
22
- import { T as M, b as ft } from "../ViewMoreMicroCard-DJD8RyoA.mjs";
22
+ import { T as M, b as ft } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
23
23
  import { A as _, W as ke } from "../WidgetContainer-EbrN1oIo.mjs";
24
24
  import { c as Tt } from "../Category-CevNQ03n.mjs";
25
25
  import { a as Ne, T as He } from "../TransactionDetails-Cscyr17P.mjs";
@@ -1,6 +1,6 @@
1
1
  import { getUnixTime as l } from "date-fns/getUnixTime";
2
2
  import A from "bowser";
3
- import { F as u, A as r } from "./Fetch-eKeiWwHO.mjs";
3
+ import { F as u, A as r } from "./Fetch-87LIQbEA.mjs";
4
4
  import y from "react";
5
5
  const g = async (o, t, n = "1.0.0", s = "Experiences") => {
6
6
  const a = new _(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.23-alpha.sms9",
3
+ "version": "7.2.24-alpha.mega1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,86 +0,0 @@
1
- import { F as g, A as e } from "./Fetch-eKeiWwHO.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
- };