@mx-cartographer/experiences 7.0.32 → 7.0.33
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.
- package/CHANGELOG.md +4 -0
- package/dist/{Account-CK-DrCEa.mjs → Account-DeMa6XJz.mjs} +1 -1
- package/dist/{AccountDetailsContent-BGXM8acm.mjs → AccountDetailsContent-BwTOak3W.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Dwk01nsY.mjs → AccountDetailsHeader-BCW4d-j4.mjs} +5 -5
- package/dist/{AccountFields-5i77eFJ6.mjs → AccountFields-B-igjxt-.mjs} +2 -2
- package/dist/{AccountListItem-BiST9IgK.mjs → AccountListItem-DAF9c7_x.mjs} +3 -3
- package/dist/{AccountStore-DiGbJBUT.mjs → AccountStore-Bzy6rKGo.mjs} +26 -26
- package/dist/{Accounts-BBkQjUmS.mjs → Accounts-DNMSlq9A.mjs} +1 -1
- package/dist/{BeatApi-DLu87ijw.mjs → BeatApi-DhJpgCLz.mjs} +3 -3
- package/dist/{BeatStore-By4aGoRM.mjs → BeatStore-IBnXd4YK.mjs} +17 -17
- package/dist/{BudgetUtil-D5jO0box.mjs → BudgetUtil-Iw9hUxhI.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-joMax4Fb.mjs → CategorySelectorDrawer-CMorcKFW.mjs} +1 -1
- package/dist/{CategoryStore-BOyzQjQp.mjs → CategoryStore-BCcpI3oJ.mjs} +4 -4
- package/dist/{ConnectDrawer-D86nRDxQ.mjs → ConnectDrawer-jeSmGg38.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BkNr5Up0.mjs → ConnectionsDrawer-hdOVHICr.mjs} +2 -2
- package/dist/{CurrencyInput-BkflFU_-.mjs → CurrencyInput-C0wTgNV6.mjs} +1 -1
- package/dist/{DebtsStore-qrqY9Abz.mjs → DebtsStore-C2OfwE0t.mjs} +1 -1
- package/dist/{ExportCsvAction-DRfdZis1.mjs → ExportCsvAction-BlKpQTTL.mjs} +3 -3
- package/dist/{Fetch-CkFKy79O.mjs → Fetch-87LIQbEA.mjs} +11 -10
- package/dist/{FinstrongStore-mkALvztw.mjs → FinstrongStore-F2c607dj.mjs} +4 -4
- package/dist/{GoalStore-BQRcowCN.mjs → GoalStore-D2A2Lqd5.mjs} +6 -6
- package/dist/{Help-B3dFeYi2.mjs → Help-DwKXfnqC.mjs} +1 -1
- package/dist/{LineChart-Dyps2sOy.mjs → LineChart-DNC5UEt4.mjs} +1 -1
- package/dist/{ListItemAction-BgKx_n6d.mjs → ListItemAction-Dt9A2GQk.mjs} +1 -1
- package/dist/{ManageIncome-Byw3lVtR.mjs → ManageIncome-C0CbczlY.mjs} +4 -4
- package/dist/MerchantStore-DrFvsUyy.mjs +37 -0
- package/dist/{MicroWidgetContainer-DPDsZIiS.mjs → MicroWidgetContainer-DVRe-MJs.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BzW7V_04.mjs → MiniWidgetContainer-C_N1u9ad.mjs} +1 -1
- package/dist/{NetWorthStore-DWG9Mkuu.mjs → NetWorthStore-CD4WWdXC.mjs} +2 -2
- package/dist/{NotificationSettings-B9wNyWEL.mjs → NotificationSettings-CtbJFbrv.mjs} +3 -3
- package/dist/{NotificationStore-DHtSGySy.mjs → NotificationStore-C6PH6MKm.mjs} +8 -4
- package/dist/{OriginalBalanceAction-B--pIAF0.mjs → OriginalBalanceAction-CqQ5j4OW.mjs} +3 -3
- package/dist/{RecurringSettings-ClbdFNWX.mjs → RecurringSettings-DR9KuVEN.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-D62XJtdL.mjs → RecurringTransactionsStore-DeLXfuC4.mjs} +20 -16
- package/dist/{SettingsStore-B0kRTFjD.mjs → SettingsStore-Dc34Tzx8.mjs} +33 -29
- package/dist/{TransactionApi-DbbcjI2L.mjs → TransactionApi-B3Tksf7L.mjs} +29 -29
- package/dist/{TransactionDetails-C4PW8SRL.mjs → TransactionDetails-BafSm7_T.mjs} +5 -5
- package/dist/{TransactionStore-CZOvxcSw.mjs → TransactionStore-C4LPHwzx.mjs} +29 -25
- package/dist/{TrendsStore-pvzHAX6B.mjs → TrendsStore-BM-JjAs5.mjs} +1 -1
- package/dist/{User-D-O9EHMb.mjs → User-BYkzrOdM.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-DFAY0tA8.mjs → ViewMoreMicroCard-C66pzgfS.mjs} +5 -2
- package/dist/{WidgetContainer-CBpf3h1Y.mjs → WidgetContainer-CPBhSP3k.mjs} +2 -2
- package/dist/accounts/api/AccountApi.d.ts +2 -2
- package/dist/accounts/index.es.js +13 -13
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/api/BudgetsApi.d.ts +2 -2
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/api/CashflowApi.d.ts +3 -2
- package/dist/cashflow/index.es.js +10 -10
- package/dist/categories/index.es.js +2 -2
- package/dist/common/api/AnalyticsApi.d.ts +2 -2
- package/dist/common/api/AppDataApi.d.ts +2 -2
- package/dist/common/api/BeatApi.d.ts +2 -2
- package/dist/common/api/CategoryApi.d.ts +2 -3
- package/dist/common/api/GlobalCopyApi.d.ts +2 -1
- package/dist/common/api/LocalizedCopyApi.d.ts +2 -1
- package/dist/common/api/NotificationApi.d.ts +2 -2
- package/dist/common/api/ScheduledPaymentsApi.d.ts +3 -2
- package/dist/common/api/UserApi.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +3 -2
- package/dist/common/context/hooks.d.ts +4 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +252 -246
- package/dist/common/stores/GlobalStore.d.ts +3 -2
- package/dist/common/types/Handlers.d.ts +2 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/utils/Fetch.d.ts +3 -1
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-zyHeWfQo.mjs → exportTransactionsToCSV-21c0EV3t.mjs} +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +2 -1
- package/dist/finstrong/index.es.js +7 -7
- package/dist/goals/api/GoalApi.d.ts +3 -2
- package/dist/goals/index.es.js +11 -11
- package/dist/help/api/HelpApi.d.ts +2 -2
- package/dist/help/index.es.js +3 -3
- package/dist/hooks-BhSK6dal.mjs +74 -0
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/api/HoldingApi.d.ts +3 -2
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/api/MerchantApi.d.ts +2 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +2 -1
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/recurringtransactions/index.es.js +10 -10
- package/dist/settings/api/SettingsApi.d.ts +3 -2
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/api/TransactionApi.d.ts +3 -2
- package/dist/transactions/index.es.js +14 -14
- package/dist/trends/index.es.js +11 -11
- package/dist/{useCombineEvents-DaDBSR_1.mjs → useCombineEvents-BUDIR1ba.mjs} +29 -29
- package/dist/{useInsightsEnabled-fGr6xrSj.mjs → useInsightsEnabled-DqM4sFO1.mjs} +1 -1
- package/package.json +1 -1
- package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
- package/dist/hooks-DlI63qSB.mjs +0 -71
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { makeAutoObservable as m, runInAction as c } from "mobx";
|
|
2
|
+
import { F as p, A as h } from "./Fetch-87LIQbEA.mjs";
|
|
3
|
+
class i {
|
|
4
|
+
fetchInstance;
|
|
5
|
+
constructor(t, n, s) {
|
|
6
|
+
this.fetchInstance = new p(t, n, void 0, s);
|
|
7
|
+
}
|
|
8
|
+
getMerchants = async (t = [], n = [], s = 1, o = 25) => {
|
|
9
|
+
let a = h.MERCHANTS;
|
|
10
|
+
return a += `?page=${s}&per_page=${o}`, t.length && t.forEach((e) => a += `&fuzzy_name[]=${e}`), n.length && n.forEach((e) => a += `&guid[]=${e}`), this.fetchInstance.get(a).then((e) => e.merchants);
|
|
11
|
+
};
|
|
12
|
+
getMerchantByGuid = async (t) => this.fetchInstance.get(`${h.MERCHANTS}/${t}`).then((n) => n.merchant);
|
|
13
|
+
}
|
|
14
|
+
class u {
|
|
15
|
+
globalStore;
|
|
16
|
+
api = new i("/", "");
|
|
17
|
+
merchant = null;
|
|
18
|
+
merchants = [];
|
|
19
|
+
isLoading = !1;
|
|
20
|
+
constructor(t) {
|
|
21
|
+
this.globalStore = t, this.api = new i(t.endpoint, t.sessionToken, t.onError), m(this);
|
|
22
|
+
}
|
|
23
|
+
loadMerchants = async (t = "") => {
|
|
24
|
+
this.isLoading = !0;
|
|
25
|
+
const n = await this.api.getMerchants([t]);
|
|
26
|
+
c(() => {
|
|
27
|
+
this.merchants = n, this.isLoading = !1;
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
loadMerchantByGuid = async (t) => {
|
|
31
|
+
const n = await this.api.getMerchantByGuid(t);
|
|
32
|
+
c(() => this.merchant = n);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
u as M
|
|
37
|
+
};
|
|
@@ -6,7 +6,7 @@ import b from "@mui/material/CardHeader";
|
|
|
6
6
|
import { P as u, H3 as v } from "@mxenabled/mxui";
|
|
7
7
|
import { ChevronRight as W } from "@mxenabled/mx-icons";
|
|
8
8
|
import { u as M } from "./useDimensions-27p2evRx.mjs";
|
|
9
|
-
import { W as w } from "./hooks-
|
|
9
|
+
import { W as w } from "./hooks-BhSK6dal.mjs";
|
|
10
10
|
const H = ({
|
|
11
11
|
children: e,
|
|
12
12
|
className: o,
|
|
@@ -7,7 +7,7 @@ import b from "@mui/material/IconButton";
|
|
|
7
7
|
import { Icon as C, ChevronRight as v } from "@mxenabled/mx-icons";
|
|
8
8
|
import { Text as W, H3 as H } from "@mxenabled/mxui";
|
|
9
9
|
import { u as I } from "./useDimensions-27p2evRx.mjs";
|
|
10
|
-
import { W as M } from "./hooks-
|
|
10
|
+
import { W as M } from "./hooks-BhSK6dal.mjs";
|
|
11
11
|
const j = ({
|
|
12
12
|
className: t = "mx-cmn-mini-widget",
|
|
13
13
|
closeLabel: a,
|
|
@@ -3,8 +3,8 @@ import { format as A } from "date-fns/format";
|
|
|
3
3
|
import { fromUnixTime as W } from "date-fns/fromUnixTime";
|
|
4
4
|
import { startOfMonth as _ } from "date-fns/startOfMonth";
|
|
5
5
|
import { subMonths as B } from "date-fns/subMonths";
|
|
6
|
-
import { a as b } from "./Accounts-
|
|
7
|
-
import { e as N, a as M, f as v } from "./ConnectDrawer-
|
|
6
|
+
import { a as b } from "./Accounts-DNMSlq9A.mjs";
|
|
7
|
+
import { e as N, a as M, f as v } from "./ConnectDrawer-jeSmGg38.mjs";
|
|
8
8
|
const f = 13, L = (n, t) => n.filter((e) => {
|
|
9
9
|
const { is_closed: r, is_deleted: s, is_hidden: a, is_manual: i } = e;
|
|
10
10
|
return r || s || a ? !1 : i || !e.guid ? !0 : t.some((l) => n.some((g) => l.guid === g.member_guid));
|
|
@@ -15,11 +15,11 @@ import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
|
|
|
15
15
|
import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
|
|
16
16
|
import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
17
|
import { A as oe, T as F, a as P, N as y } from "./Notification-aGCHxikw.mjs";
|
|
18
|
-
import { u as D, r as T, o as A, c as se, f as ae, m as W, a as ce } from "./hooks-
|
|
18
|
+
import { u as D, r as T, o as A, c as se, f as ae, m as W, a as ce } from "./hooks-BhSK6dal.mjs";
|
|
19
19
|
import { b as le } from "./Localization-2MODESHW.mjs";
|
|
20
20
|
import { b as re, f as de } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
21
21
|
import { a as M } from "./Dialog-CWW597AF.mjs";
|
|
22
|
-
import { C as me } from "./CurrencyInput-
|
|
22
|
+
import { C as me } from "./CurrencyInput-C0wTgNV6.mjs";
|
|
23
23
|
import { u as he } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
24
24
|
import { D as J } from "./Drawer-kEE73B87.mjs";
|
|
25
25
|
import _e from "@mui/material/Collapse";
|
|
@@ -30,7 +30,7 @@ import R from "@mui/material/Button";
|
|
|
30
30
|
import L from "@mui/material/TextField";
|
|
31
31
|
import { u as fe } from "./useDimensions-27p2evRx.mjs";
|
|
32
32
|
import X from "@mui/material/styles/useTheme";
|
|
33
|
-
import { u as ge } from "./useInsightsEnabled-
|
|
33
|
+
import { u as ge } from "./useInsightsEnabled-DqM4sFO1.mjs";
|
|
34
34
|
import { L as ye } from "./Loader-DUaFpDGv.mjs";
|
|
35
35
|
const be = C(() => {
|
|
36
36
|
const { common: n, settings: t } = D(), { sendEmailVerification: s } = T(), { user: l } = A(), i = X(), [d, a] = f.useState(!1), o = () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
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 n } from "./Fetch-
|
|
3
|
+
import { F as l, A as n } from "./Fetch-87LIQbEA.mjs";
|
|
4
4
|
class s {
|
|
5
5
|
fetchInstance;
|
|
6
|
-
constructor(t, i) {
|
|
7
|
-
this.fetchInstance = new l(t, i);
|
|
6
|
+
constructor(t, i, a) {
|
|
7
|
+
this.fetchInstance = new l(t, i, void 0, a);
|
|
8
8
|
}
|
|
9
9
|
getNotifications = () => this.fetchInstance.get(n.NOTIFICATIONS).then(
|
|
10
10
|
(t) => t.notifications.map((i) => i.notification)
|
|
@@ -35,7 +35,11 @@ class A {
|
|
|
35
35
|
notifications = [];
|
|
36
36
|
recentNotifications = [];
|
|
37
37
|
constructor(t) {
|
|
38
|
-
this.globalStore = t, this.api = new s(
|
|
38
|
+
this.globalStore = t, this.api = new s(
|
|
39
|
+
t.endpoint,
|
|
40
|
+
t.sessionToken,
|
|
41
|
+
t.onError
|
|
42
|
+
), c(this, { notifications: f });
|
|
39
43
|
}
|
|
40
44
|
// Used in Money Dashboard
|
|
41
45
|
get newNotifications() {
|
|
@@ -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-
|
|
6
|
-
import { u as h, k as b } from "./hooks-
|
|
5
|
+
import { L as y } from "./ListItemAction-Dt9A2GQk.mjs";
|
|
6
|
+
import { u as h, k as b } from "./hooks-BhSK6dal.mjs";
|
|
7
7
|
import { a as T, f as S } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
8
|
-
import { C as f } from "./CurrencyInput-
|
|
8
|
+
import { C as f } from "./CurrencyInput-C0wTgNV6.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 R from "@mui/material/Tabs";
|
|
|
7
7
|
import l from "@mui/material/Divider";
|
|
8
8
|
import T from "@mui/material/List";
|
|
9
9
|
import C from "@mui/material/Stack";
|
|
10
|
-
import { R as x, A as S, a as E, M as A } from "./ManageIncome-
|
|
11
|
-
import { u as h, i as y, f as _ } from "./hooks-
|
|
10
|
+
import { R as x, A as S, a as E, M as A } from "./ManageIncome-C0CbczlY.mjs";
|
|
11
|
+
import { u as h, i as y, f as _ } from "./hooks-BhSK6dal.mjs";
|
|
12
12
|
import { R as v, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
13
|
-
import { A as d } from "./WidgetContainer-
|
|
13
|
+
import { A as d } from "./WidgetContainer-CPBhSP3k.mjs";
|
|
14
14
|
const I = u(() => {
|
|
15
15
|
const { recurring: r } = h(), { repeatingTransactions: s } = y(), { onEvent: o } = _(), a = (n) => {
|
|
16
16
|
o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
package/dist/{RecurringTransactionsStore-D62XJtdL.mjs → RecurringTransactionsStore-DeLXfuC4.mjs}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { makeAutoObservable as f, runInAction as i } from "mobx";
|
|
2
2
|
import { endOfMonth as R } from "date-fns/endOfMonth";
|
|
3
3
|
import { isAfter as p } from "date-fns/isAfter";
|
|
4
|
-
import { isBefore as
|
|
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
|
-
import { startOfMonth as
|
|
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-
|
|
11
|
-
import { b as
|
|
12
|
-
var
|
|
10
|
+
import { F as x, A as o } from "./Fetch-87LIQbEA.mjs";
|
|
11
|
+
import { b as E, a, c as d, d as u } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
12
|
+
var A = /* @__PURE__ */ ((r) => (r.Small = "small", r.Medium = "medium", r.Large = "large", r))(A || {});
|
|
13
13
|
const U = 44;
|
|
14
|
-
class
|
|
14
|
+
class h {
|
|
15
15
|
fetchInstance;
|
|
16
|
-
constructor(e, t) {
|
|
17
|
-
this.fetchInstance = new x(e, t);
|
|
16
|
+
constructor(e, t, n) {
|
|
17
|
+
this.fetchInstance = new x(e, t, void 0, n);
|
|
18
18
|
}
|
|
19
19
|
addRepeatingTransaction = async (e) => this.fetchInstance.post(o.REPEATING_TRANSACTIONS, e).then((t) => t.repeating_transaction);
|
|
20
20
|
getRepeatingTransactions = async () => this.fetchInstance.get(o.REPEATING_TRANSACTIONS).then((e) => e.repeating_transactions);
|
|
@@ -27,21 +27,25 @@ class d {
|
|
|
27
27
|
const l = (r, e) => m(e.expectedDate, r), s = (r, e) => r + e.amount;
|
|
28
28
|
class C {
|
|
29
29
|
globalStore;
|
|
30
|
-
api = new
|
|
30
|
+
api = new h("/", "");
|
|
31
31
|
transactions = [];
|
|
32
32
|
repeatingTransactions = [];
|
|
33
33
|
selectedDay;
|
|
34
|
-
dateRange = { start:
|
|
34
|
+
dateRange = { start: S(c()), end: R(c()) };
|
|
35
35
|
isDataLoaded = !1;
|
|
36
36
|
constructor(e) {
|
|
37
|
-
this.globalStore = e, this.api = new
|
|
37
|
+
this.globalStore = e, this.api = new h(
|
|
38
|
+
e.endpoint,
|
|
39
|
+
e.sessionToken,
|
|
40
|
+
e.onError
|
|
41
|
+
), f(this);
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* Returns all recurrences built from repeating transactions and filtered by accounts.
|
|
41
45
|
*/
|
|
42
46
|
get recurrences() {
|
|
43
47
|
const e = this.globalStore.accountStore.visibleAccounts;
|
|
44
|
-
return
|
|
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));
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* Returns all recurrences that have occurred in the past, including those that are paid or missed
|
|
@@ -57,7 +61,7 @@ class C {
|
|
|
57
61
|
*/
|
|
58
62
|
get upcomingRecurrences() {
|
|
59
63
|
return this.recurrences.filter(
|
|
60
|
-
(e) => p(e.expectedDate, y(c(), 3)) &&
|
|
64
|
+
(e) => p(e.expectedDate, y(c(), 3)) && I(e.expectedDate, this.dateRange.end) && e.status === a.Upcoming
|
|
61
65
|
);
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
@@ -65,7 +69,7 @@ class C {
|
|
|
65
69
|
*/
|
|
66
70
|
get expenses() {
|
|
67
71
|
return this.recurrences.filter(
|
|
68
|
-
(e) => e.type ===
|
|
72
|
+
(e) => e.type === d.Expense
|
|
69
73
|
);
|
|
70
74
|
}
|
|
71
75
|
/**
|
|
@@ -81,7 +85,7 @@ class C {
|
|
|
81
85
|
*/
|
|
82
86
|
get income() {
|
|
83
87
|
return this.recurrences.filter(
|
|
84
|
-
(e) => e.type ===
|
|
88
|
+
(e) => e.type === d.Income
|
|
85
89
|
);
|
|
86
90
|
}
|
|
87
91
|
/**
|
|
@@ -258,6 +262,6 @@ class C {
|
|
|
258
262
|
}
|
|
259
263
|
export {
|
|
260
264
|
C as R,
|
|
261
|
-
|
|
265
|
+
A as S,
|
|
262
266
|
U as T
|
|
263
267
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { makeAutoObservable as N, runInAction as l } from "mobx";
|
|
2
|
-
import { F as D, A as
|
|
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 "./Notification-aGCHxikw.mjs";
|
|
4
|
-
import { T as m } from "./TransactionApi-
|
|
4
|
+
import { T as m } from "./TransactionApi-B3Tksf7L.mjs";
|
|
5
5
|
class y {
|
|
6
6
|
fetchInstance;
|
|
7
|
-
constructor(e, t) {
|
|
8
|
-
this.fetchInstance = new D(e, t);
|
|
7
|
+
constructor(e, t, o) {
|
|
8
|
+
this.fetchInstance = new D(e, t, void 0, o);
|
|
9
9
|
}
|
|
10
|
-
deleteDevice = async (e) => this.fetchInstance.delete(`${
|
|
11
|
-
generateDeviceToken = async () => this.fetchInstance.get(`${
|
|
12
|
-
getDevices = async () => this.fetchInstance.get(
|
|
13
|
-
getNotificationProfiles = async () => this.fetchInstance.get(
|
|
10
|
+
deleteDevice = async (e) => this.fetchInstance.delete(`${r.DEVICES}/${e}`).then((t) => t);
|
|
11
|
+
generateDeviceToken = async () => this.fetchInstance.get(`${r.USER}/mobile_token`).then((e) => e.mobile_token);
|
|
12
|
+
getDevices = async () => this.fetchInstance.get(r.DEVICES).then((e) => e.map((t) => t.device));
|
|
13
|
+
getNotificationProfiles = async () => this.fetchInstance.get(r.NOTIFICATION_PROFILES).then((e) => e.notification_profiles);
|
|
14
14
|
// verifications endpoints respond with HTTP status codes; they error otherwise
|
|
15
|
-
sendEmailVerification = async () => this.fetchInstance.post(
|
|
16
|
-
sendPhoneVerification = async () => this.fetchInstance.post(
|
|
17
|
-
verifyPhoneToken = async (e) => this.fetchInstance.post(
|
|
18
|
-
updateDevice = async (e) => this.fetchInstance.put(`${
|
|
19
|
-
updateNotificationProfile = async (e) => this.fetchInstance.put(`${
|
|
20
|
-
updateUserCommunicationProfile = async (e) => this.fetchInstance.put(
|
|
21
|
-
getInsightsNotificationProfiles = async () => this.fetchInstance.get(`${
|
|
15
|
+
sendEmailVerification = async () => this.fetchInstance.post(r.EMAIL_VERIFICATIONS);
|
|
16
|
+
sendPhoneVerification = async () => this.fetchInstance.post(r.PHONE_VERIFICATIONS + "/deliver");
|
|
17
|
+
verifyPhoneToken = async (e) => this.fetchInstance.post(r.PHONE_VERIFICATIONS + "/verify", { sms_verification_token: e }).then((t) => ({ verified: t.verified }));
|
|
18
|
+
updateDevice = async (e) => this.fetchInstance.put(`${r.DEVICES}/${e.guid}`, e).then((t) => t.device);
|
|
19
|
+
updateNotificationProfile = async (e) => this.fetchInstance.put(`${r.NOTIFICATION_PROFILES}/${e.guid}`, e).then((t) => t.notification_profile);
|
|
20
|
+
updateUserCommunicationProfile = async (e) => this.fetchInstance.put(r.USER_COMMUNICATION_PROFILE, e).then((t) => t.user_communication_profile);
|
|
21
|
+
getInsightsNotificationProfiles = async () => this.fetchInstance.get(`${r.NOTIFICATION_PROFILES}/${r.INSIGHTS_NOTIFICATION_PROFILES}`).then((e) => e);
|
|
22
22
|
}
|
|
23
23
|
const v = "PARENT-ENTITY", C = (s, e) => ({
|
|
24
24
|
[f.BudgetExceeded]: e.notification_budget_exceeded,
|
|
@@ -53,7 +53,7 @@ const v = "PARENT-ENTITY", C = (s, e) => ({
|
|
|
53
53
|
[i.TransactionExpenseLarge]: e.large_transaction,
|
|
54
54
|
[i.PromotionalCampaignMessages]: e.promotional_campaign_messages,
|
|
55
55
|
[i.TransparentOverdraft]: e.transparent_overdraft
|
|
56
|
-
})[s] || "", R = (s, e, t,
|
|
56
|
+
})[s] || "", R = (s, e, t, o, d, p) => {
|
|
57
57
|
const g = [], {
|
|
58
58
|
email_notifications_enabled: I,
|
|
59
59
|
sms_notifications_enabled: P,
|
|
@@ -61,15 +61,15 @@ const v = "PARENT-ENTITY", C = (s, e) => ({
|
|
|
61
61
|
} = e, {
|
|
62
62
|
opted_out_of_email_notifications: b,
|
|
63
63
|
opted_out_of_sms_notifications: E,
|
|
64
|
-
opted_out_of_push_notifications:
|
|
64
|
+
opted_out_of_push_notifications: A
|
|
65
65
|
} = d;
|
|
66
|
-
for (const a of
|
|
67
|
-
const u = C(a.notification_type, t),
|
|
66
|
+
for (const a of o.filter((u) => u.entity_guid === v)) {
|
|
67
|
+
const u = C(a.notification_type, t), S = o.filter(
|
|
68
68
|
(c) => c.entity_guid !== v && c.notification_type === a.notification_type && s.some((h) => h.guid === c.entity_guid)
|
|
69
69
|
), _ = [];
|
|
70
|
-
I && !b && a.email_channel && p.email && _.push(t.delivery_method_email_label), P && !E && a.sms_channel && p.phone && _.push(t.delivery_method_sms_label), T && !
|
|
70
|
+
I && !b && a.email_channel && p.email && _.push(t.delivery_method_email_label), P && !E && a.sms_channel && p.phone && _.push(t.delivery_method_sms_label), T && !A && a.push_channel && _.push(t.delivery_method_push_label), g.push({
|
|
71
71
|
...a,
|
|
72
|
-
children:
|
|
72
|
+
children: S.map((c) => ({
|
|
73
73
|
...c,
|
|
74
74
|
account: s.find((h) => h.guid === c.entity_guid),
|
|
75
75
|
label: u
|
|
@@ -90,7 +90,11 @@ class x {
|
|
|
90
90
|
selectedRule = void 0;
|
|
91
91
|
transactionRules = [];
|
|
92
92
|
constructor(e) {
|
|
93
|
-
this.globalStore = e, this.api = new y(e.endpoint, e.sessionToken), this.transactionApi = new m(
|
|
93
|
+
this.globalStore = e, this.api = new y(e.endpoint, e.sessionToken, e.onError), this.transactionApi = new m(
|
|
94
|
+
e.endpoint,
|
|
95
|
+
e.sessionToken,
|
|
96
|
+
e.onError
|
|
97
|
+
), N(this);
|
|
94
98
|
}
|
|
95
99
|
get accountProfiles() {
|
|
96
100
|
const e = this.globalStore.appDataStore.clientCommunicationProfile;
|
|
@@ -131,7 +135,7 @@ class x {
|
|
|
131
135
|
deleteDevice = async (e) => {
|
|
132
136
|
try {
|
|
133
137
|
await this.api.deleteDevice(e);
|
|
134
|
-
const t = this.devices.findIndex((
|
|
138
|
+
const t = this.devices.findIndex((o) => o.guid === e);
|
|
135
139
|
return t >= 0 && l(() => {
|
|
136
140
|
this.devices.splice(t, 1);
|
|
137
141
|
}), { success: !0 };
|
|
@@ -203,9 +207,9 @@ class x {
|
|
|
203
207
|
};
|
|
204
208
|
updateDevice = async (e) => {
|
|
205
209
|
try {
|
|
206
|
-
const t = await this.api.updateDevice(e),
|
|
207
|
-
return
|
|
208
|
-
this.devices[
|
|
210
|
+
const t = await this.api.updateDevice(e), o = this.devices.findIndex((d) => d.guid === e.guid);
|
|
211
|
+
return o >= 0 && l(() => {
|
|
212
|
+
this.devices[o] = t;
|
|
209
213
|
}), { success: !0 };
|
|
210
214
|
} catch (t) {
|
|
211
215
|
return console.error(`Error updating device: ${t}`), { success: !1 };
|
|
@@ -213,9 +217,9 @@ class x {
|
|
|
213
217
|
};
|
|
214
218
|
updateNotificationProfile = async (e) => {
|
|
215
219
|
try {
|
|
216
|
-
const t = await this.api.updateNotificationProfile(e),
|
|
217
|
-
|
|
218
|
-
this.notificationProfiles[
|
|
220
|
+
const t = await this.api.updateNotificationProfile(e), o = this.notificationProfiles.findIndex((d) => d.guid === e.guid);
|
|
221
|
+
o >= 0 && l(() => {
|
|
222
|
+
this.notificationProfiles[o] = t;
|
|
219
223
|
});
|
|
220
224
|
} catch (t) {
|
|
221
225
|
console.error(`Error updating notification profile: ${t}`);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as T, A as e } from "./Fetch-
|
|
1
|
+
import { F as T, A as e } from "./Fetch-87LIQbEA.mjs";
|
|
2
2
|
class u {
|
|
3
3
|
fetchInstance;
|
|
4
|
-
constructor(t, n) {
|
|
5
|
-
this.fetchInstance = new T(t, n);
|
|
4
|
+
constructor(t, n, a) {
|
|
5
|
+
this.fetchInstance = new T(t, n, void 0, a);
|
|
6
6
|
}
|
|
7
7
|
addTag = async (t) => this.fetchInstance.post(e.TAGS, t).then((n) => n.tag);
|
|
8
8
|
addTagging = async (t) => this.fetchInstance.post(e.TAGGINGS, t).then((n) => n.tagging);
|
|
@@ -11,45 +11,45 @@ class u {
|
|
|
11
11
|
getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((t) => t.map((n) => n.tagging));
|
|
12
12
|
getTags = async () => this.fetchInstance.get(e.TAGS).then((t) => t.map((n) => n.tag));
|
|
13
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((
|
|
14
|
+
getTransactionsByDateRange = async (t, n) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${n}`).then((a) => a.map((s) => s.transaction));
|
|
15
15
|
// DEPRECATED
|
|
16
|
-
getTransactionsByAccountsAndDateRange = async (t, n,
|
|
16
|
+
getTransactionsByAccountsAndDateRange = async (t, n, a) => {
|
|
17
17
|
console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
|
|
18
|
-
const
|
|
19
|
-
(o,
|
|
18
|
+
const s = t.reduce(
|
|
19
|
+
(o, c, r) => `${o}account_guids[]=${c}${r !== t.length - 1 ? "&" : ""}`,
|
|
20
20
|
""
|
|
21
21
|
);
|
|
22
|
-
return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${
|
|
22
|
+
return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${a}?${s}`).then((o) => o.map((c) => c.transaction));
|
|
23
23
|
};
|
|
24
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((
|
|
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
26
|
// DEPRECATED
|
|
27
|
-
getTransactionsByCategoryAndDate = async (t, n,
|
|
28
|
-
`${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${
|
|
29
|
-
).then((
|
|
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
30
|
// DEPRECATED
|
|
31
|
-
getTransactionsByCategoryDateAndAccounts = async (t, n,
|
|
31
|
+
getTransactionsByCategoryDateAndAccounts = async (t, n, a, s) => {
|
|
32
32
|
console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
|
|
33
|
-
const o =
|
|
34
|
-
(
|
|
33
|
+
const o = s.reduce(
|
|
34
|
+
(c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
|
|
35
35
|
""
|
|
36
36
|
);
|
|
37
37
|
return this.fetchInstance.get(
|
|
38
|
-
`${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${
|
|
39
|
-
).then((
|
|
38
|
+
`${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${a}?${o}`
|
|
39
|
+
).then((c) => c.map((r) => r.transaction));
|
|
40
40
|
};
|
|
41
41
|
// DEPRECATED
|
|
42
|
-
getTransactionsByCategoriesDateAndAccounts = async (t, n,
|
|
42
|
+
getTransactionsByCategoriesDateAndAccounts = async (t, n, a, s) => {
|
|
43
43
|
console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
|
|
44
|
-
const o =
|
|
45
|
-
(
|
|
44
|
+
const o = s.reduce(
|
|
45
|
+
(c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
|
|
46
46
|
""
|
|
47
47
|
);
|
|
48
48
|
return this.fetchInstance.get(
|
|
49
49
|
`${e.TRANSACTIONS}/by_category_guids/${t.join(
|
|
50
50
|
"+"
|
|
51
|
-
)}/by_date/${n}/${
|
|
52
|
-
).then((
|
|
51
|
+
)}/by_date/${n}/${a}?${o}`
|
|
52
|
+
).then((c) => c.map((r) => r.transaction));
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* DEPRECATED
|
|
@@ -60,17 +60,17 @@ class u {
|
|
|
60
60
|
* @param endDate the end date
|
|
61
61
|
* @param accountGuids an optional list of account guids
|
|
62
62
|
*/
|
|
63
|
-
getTransactionsByTopLevelCategoryAndDate = async (t, n,
|
|
63
|
+
getTransactionsByTopLevelCategoryAndDate = async (t, n, a, s = []) => {
|
|
64
64
|
console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
|
|
65
|
-
let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${t}/by_date/${n}/${
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
(r, i, g) => `${r}account_guids[]=${i}${g !==
|
|
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
69
|
""
|
|
70
70
|
);
|
|
71
|
-
o += `?${
|
|
71
|
+
o += `?${c}`;
|
|
72
72
|
}
|
|
73
|
-
return this.fetchInstance.get(o).then((
|
|
73
|
+
return this.fetchInstance.get(o).then((c) => c.map((r) => r.transaction));
|
|
74
74
|
};
|
|
75
75
|
removeTag = async (t) => this.fetchInstance.delete(`${e.TAGS}/${t}`).then((n) => n);
|
|
76
76
|
removeTagging = async (t) => this.fetchInstance.delete(`${e.TAGGINGS}/${t}`).then((n) => n);
|
|
@@ -9,15 +9,15 @@ import { MerchantLogo as pe, Icon as S, Text as T, useTokens as ee, CategoryIcon
|
|
|
9
9
|
import B from "@mui/material/ListItemAvatar";
|
|
10
10
|
import M from "@mui/material/ListItemText";
|
|
11
11
|
import f from "@mui/material/Stack";
|
|
12
|
-
import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-
|
|
13
|
-
import { G as Be, g as v, u as A, f as L, l as xe, a as Fe, o as He } from "./hooks-
|
|
12
|
+
import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-BYkzrOdM.mjs";
|
|
13
|
+
import { G as Be, g as v, u as A, f as L, l as xe, a as Fe, o as He } from "./hooks-BhSK6dal.mjs";
|
|
14
14
|
import { f as te } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
15
15
|
import { Receipt as ze, Delete as oe, ChevronRight as Ue, Cancel as ie, Search as Xe, Edit as Ve, Flag as We } from "@mxenabled/mx-icons";
|
|
16
16
|
import { fromUnixTime as W } from "date-fns/fromUnixTime";
|
|
17
17
|
import { isSameDay as Ne } from "date-fns/isSameDay";
|
|
18
18
|
import { h as Ye } from "./DateUtil-BcuH7ErC.mjs";
|
|
19
19
|
import { L as Ie } from "./Loader-DUaFpDGv.mjs";
|
|
20
|
-
import { A as P } from "./WidgetContainer-
|
|
20
|
+
import { A as P } from "./WidgetContainer-CPBhSP3k.mjs";
|
|
21
21
|
import ne from "@mui/material/Paper";
|
|
22
22
|
import ce from "@mui/material/Button";
|
|
23
23
|
import je from "@mui/material/FormGroup";
|
|
@@ -30,14 +30,14 @@ import F from "@mui/material/ListItem";
|
|
|
30
30
|
import { a as V, f as Ee, D as Oe } from "./Dialog-CWW597AF.mjs";
|
|
31
31
|
import U from "@mui/material/ListItemButton";
|
|
32
32
|
import X from "@mui/material/ListItemIcon";
|
|
33
|
-
import { a as we } from "./CategorySelectorDrawer-
|
|
33
|
+
import { a as we } from "./CategorySelectorDrawer-CMorcKFW.mjs";
|
|
34
34
|
import { b as se } from "./Localization-2MODESHW.mjs";
|
|
35
35
|
import { getUnixTime as Ze } from "date-fns/getUnixTime";
|
|
36
36
|
import { D as de } from "./Drawer-kEE73B87.mjs";
|
|
37
37
|
import ye from "@mui/material/InputAdornment";
|
|
38
38
|
import Je from "@mui/material/Checkbox";
|
|
39
39
|
import ge from "@mui/material/Grid";
|
|
40
|
-
import { C as Qe } from "./CurrencyInput-
|
|
40
|
+
import { C as Qe } from "./CurrencyInput-C0wTgNV6.mjs";
|
|
41
41
|
import et from "@mui/material/Switch";
|
|
42
42
|
var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), re = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(re || {});
|
|
43
43
|
const tt = [
|