@mx-cartographer/experiences 9.0.3 → 9.0.4
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 +7 -0
- package/dist/{Account-BaJmiJAG.mjs → Account-DR7Plrqy.mjs} +10 -10
- package/dist/AccountDetailsDrawer-C8oJP3J4.mjs +921 -0
- package/dist/AccountDetailsHeader-ByGNPZpO.mjs +228 -0
- package/dist/{AccountUtils-T5_Odvos.mjs → AccountUtils-B8ZzWI-d.mjs} +3 -3
- package/dist/{Analytics-CzGzz_sE.mjs → Analytics-WeZYytR0.mjs} +3 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +26 -0
- package/dist/{CategorySelectorDrawer-8soGrhB8.mjs → CategorySelectorDrawer-BArJC27L.mjs} +1 -1
- package/dist/Connect-BH0Pt6zc.mjs +42 -0
- package/dist/{ConnectCard-CCep7Zqe.mjs → ConnectCard-Dwfgv24k.mjs} +1 -1
- package/dist/{ConnectDrawer-Cnjr3Ddg.mjs → ConnectDrawer-DytyIhaF.mjs} +8 -9
- package/dist/{ConnectionsDrawer-CtfPXk0M.mjs → ConnectionsDrawer-BHJPKXYF.mjs} +8 -9
- package/dist/{CurrencyInput-adTIRtL3.mjs → CurrencyInput-DaGEQaLW.mjs} +1 -1
- package/dist/DateUtil-CzBmbjmA.mjs +74 -0
- package/dist/{DebtUtils-DD3186U-.mjs → DebtUtils-i4pI2Uoe.mjs} +6 -6
- package/dist/{EmbeddedCard-DPwJjqMH.mjs → EmbeddedCard-CQpbZrmP.mjs} +4 -4
- package/dist/{Error-Dogaw2jO.mjs → Error-Dtw6yxkf.mjs} +1 -1
- package/dist/{ExportCsvAction-Bw02ZJEj.mjs → ExportCsvAction-bovG-NJr.mjs} +2 -2
- package/dist/{GlobalAccountFilter-7Cg2-9A5.mjs → GlobalAccountFilter-CYqzqmAd.mjs} +10 -10
- package/dist/{Help-DJ8PrVHX.mjs → Help-5klKVqkX.mjs} +2 -2
- package/dist/{LineChart-CejWS_rh.mjs → LineChart-CUfiH86G.mjs} +1 -1
- package/dist/{ListItemAction-CzZ8s39Z.mjs → ListItemAction-BqUCLj_w.mjs} +1 -1
- package/dist/{ListItemWrapper-B5r-YQQ_.mjs → ListItemWrapper-BHIbqx7E.mjs} +3 -3
- package/dist/ManageIncome-Cz6hvpdA.mjs +902 -0
- package/dist/{MicroWidgetContainer-CfKdQfhi.mjs → MicroWidgetContainer-B2NnKBgW.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BdPiUU-u.mjs → MiniWidgetContainer-Bmv_WeUd.mjs} +1 -1
- package/dist/{NetWorthUtils-DilGN1nW.mjs → NetWorthUtils-DfSH3z70.mjs} +2 -2
- package/dist/{NotificationSettings-B4JA5IKE.mjs → NotificationSettings-Ci89BBRI.mjs} +4 -4
- package/dist/{OriginalBalanceAction-BybTXDtO.mjs → OriginalBalanceAction-YrvxBYAl.mjs} +3 -3
- package/dist/{RecurringSettings-D2xbNb67.mjs → RecurringSettings-ClYjsmPz.mjs} +4 -4
- package/dist/RecurringTransactionsUtil-zOxq5pzY.mjs +298 -0
- package/dist/Select-CSpkK5cR.mjs +61 -0
- package/dist/{SpendingLegend-5Ct_FZ8o.mjs → SpendingLegend-Bn3DzGyK.mjs} +1 -1
- package/dist/TabContentContainer-B0eYJP5p.mjs +48 -0
- package/dist/{TransactionDetails-DctXr07p.mjs → TransactionDetails-DRN0GIaZ.mjs} +6 -6
- package/dist/{UserStore-CRpKQjpP.mjs → UserStore-DzWku3t0.mjs} +81 -40
- package/dist/{ViewMoreMicroCard-BD_MNc2z.mjs → ViewMoreMicroCard-Dxghxphh.mjs} +211 -231
- package/dist/{WidgetContainer-CmbU4CBH.mjs → WidgetContainer-D-LzIKFb.mjs} +3 -3
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +220 -1035
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +11 -11
- package/dist/cashflow/index.es.js +41 -41
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +82 -83
- package/dist/core/index.es.js +8 -8
- package/dist/core/stores/RecurringTransactionsStore.d.ts +27 -1
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/index.es.js +73 -73
- package/dist/finstrong/index.es.js +17 -17
- package/dist/goals/index.es.js +22 -23
- package/dist/help/index.es.js +4 -4
- package/dist/{hooks-BaO_gOI6.mjs → hooks-97sNJ_lf.mjs} +9 -9
- package/dist/insights/index.es.js +4 -4
- package/dist/investments/index.es.js +6 -6
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +12 -11
- package/dist/networth/index.es.js +9 -9
- package/dist/notifications/index.es.js +9 -9
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +6 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +402 -376
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/index.es.js +12 -12
- package/dist/trends/index.es.js +13 -13
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +23 -0
- package/dist/{useInsightsEnabled-DaNLPmUU.mjs → useInsightsEnabled-D5Sdm0TJ.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-CJb-RELP.mjs → useWidgetLoadTimer-B0tB-yzL.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
|
@@ -6,7 +6,7 @@ import g from "@mui/material/CardHeader";
|
|
|
6
6
|
import { H3 as u, P as v } from "@mxenabled/mxui";
|
|
7
7
|
import { ChevronRight as W } from "@mxenabled/mx-icons";
|
|
8
8
|
import { u as w } from "./useDimensions-CeDR9V8N.mjs";
|
|
9
|
-
import { W as H } from "./hooks-
|
|
9
|
+
import { W as H } from "./hooks-97sNJ_lf.mjs";
|
|
10
10
|
const D = ({
|
|
11
11
|
children: i,
|
|
12
12
|
className: o,
|
|
@@ -8,7 +8,7 @@ import H from "@mui/material/IconButton";
|
|
|
8
8
|
import { Icon as I, ChevronRight as W } from "@mxenabled/mx-icons";
|
|
9
9
|
import { H3 as y, Text as B, P as j } from "@mxenabled/mxui";
|
|
10
10
|
import { u as w } from "./useDimensions-CeDR9V8N.mjs";
|
|
11
|
-
import { W as M } from "./hooks-
|
|
11
|
+
import { W as M } from "./hooks-97sNJ_lf.mjs";
|
|
12
12
|
const J = ({
|
|
13
13
|
children: a,
|
|
14
14
|
className: m = "mx-cmn-mini-widget",
|
|
@@ -2,8 +2,8 @@ import { format as b } from "date-fns/format";
|
|
|
2
2
|
import { fromUnixTime as y } from "date-fns/fromUnixTime";
|
|
3
3
|
import { startOfMonth as _ } from "date-fns/startOfMonth";
|
|
4
4
|
import { subMonths as A } from "date-fns/subMonths";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { i as h } from "./AccountUtils-B8ZzWI-d.mjs";
|
|
6
|
+
import { A as M, a as T, b as N } from "./Account-DR7Plrqy.mjs";
|
|
7
7
|
const f = 13, W = (e, s) => e.filter((n) => {
|
|
8
8
|
const { is_closed: i, is_deleted: r, is_hidden: t, is_manual: o } = n;
|
|
9
9
|
return i || r || t ? !1 : o || !n.guid ? !0 : s.some((c) => e.some((g) => c.guid === g.member_guid));
|
|
@@ -16,11 +16,11 @@ import { LocalizationProvider as ae } from "@mui/x-date-pickers/LocalizationProv
|
|
|
16
16
|
import { AdapterDateFns as ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
17
17
|
import { b as le } from "./Localization-DnoVyBNK.mjs";
|
|
18
18
|
import { b as re, f as de } from "./NumberFormatting--XMeeBfr.mjs";
|
|
19
|
-
import { u as k, A as T, C as S,
|
|
19
|
+
import { u as k, A as T, C as S, c as J, f as me, i as q, a as he } from "./hooks-97sNJ_lf.mjs";
|
|
20
20
|
import { A as ue, N as b } from "./Notification-DTNYSd8P.mjs";
|
|
21
21
|
import { T as R, a as D } from "./ToggleListItem-Dl1lXNwj.mjs";
|
|
22
22
|
import { D as B } from "./Dialog-Bvd2n8hz.mjs";
|
|
23
|
-
import { C as _e } from "./CurrencyInput-
|
|
23
|
+
import { C as _e } from "./CurrencyInput-DaGEQaLW.mjs";
|
|
24
24
|
import { u as fe } from "./useScreenSize-mWpmnh5w.mjs";
|
|
25
25
|
import { D as K } from "./Drawer-BXqqBMxg.mjs";
|
|
26
26
|
import pe from "@mui/material/Collapse";
|
|
@@ -31,8 +31,8 @@ import j from "@mui/material/Button";
|
|
|
31
31
|
import U from "@mui/material/TextField";
|
|
32
32
|
import { u as be } from "./useDimensions-CeDR9V8N.mjs";
|
|
33
33
|
import { useTheme as Q } from "@mui/material/styles";
|
|
34
|
-
import { u as xe } from "./useInsightsEnabled-
|
|
35
|
-
import { u as Ce } from "./useWidgetLoadTimer-
|
|
34
|
+
import { u as xe } from "./useInsightsEnabled-D5Sdm0TJ.mjs";
|
|
35
|
+
import { u as Ce } from "./useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
36
36
|
import { L as ve } from "./Loader-CxeBwuPG.mjs";
|
|
37
37
|
const Te = C(() => {
|
|
38
38
|
const { common: n, settings: t } = k(), { sendEmailVerification: s } = T(), { user: l } = S(), i = Q(), [r, a] = f.useState(!1), o = () => {
|
|
@@ -3,9 +3,9 @@ import _ from "react";
|
|
|
3
3
|
import { observer as p } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/TextField";
|
|
5
5
|
import { a as T, f as S } from "./NumberFormatting--XMeeBfr.mjs";
|
|
6
|
-
import { u as y, k as h } from "./hooks-
|
|
7
|
-
import { L as b } from "./ListItemAction-
|
|
8
|
-
import { C as f } from "./CurrencyInput-
|
|
6
|
+
import { u as y, k as h } from "./hooks-97sNJ_lf.mjs";
|
|
7
|
+
import { L as b } from "./ListItemAction-BqUCLj_w.mjs";
|
|
8
|
+
import { C as f } from "./CurrencyInput-DaGEQaLW.mjs";
|
|
9
9
|
const F = p(({ goal: e }) => {
|
|
10
10
|
const { goals: n } = y(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = h(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
|
|
11
11
|
const a = { ...e, interest_rate: t };
|
|
@@ -7,10 +7,10 @@ import R from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
8
|
import b 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-
|
|
11
|
-
import { u as _,
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactionsUtil-
|
|
13
|
-
import { A as m } from "./Analytics-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-Cz6hvpdA.mjs";
|
|
11
|
+
import { u as _, h as A, f } from "./hooks-97sNJ_lf.mjs";
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactionsUtil-zOxq5pzY.mjs";
|
|
13
|
+
import { A as m } from "./Analytics-WeZYytR0.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
16
16
|
a(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { addDays as N } from "date-fns/addDays";
|
|
2
|
+
import { addMonths as l } from "date-fns/addMonths";
|
|
3
|
+
import { addQuarters as A } from "date-fns/addQuarters";
|
|
4
|
+
import { addWeeks as x } from "date-fns/addWeeks";
|
|
5
|
+
import { addYears as I } from "date-fns/addYears";
|
|
6
|
+
import { differenceInDays as $ } from "date-fns/differenceInDays";
|
|
7
|
+
import { formatISO as K } from "date-fns/formatISO";
|
|
8
|
+
import { fromUnixTime as C } from "date-fns/fromUnixTime";
|
|
9
|
+
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
10
|
+
import { isAfter as D } from "date-fns/isAfter";
|
|
11
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
12
|
+
import { isSameDay as H } from "date-fns/isSameDay";
|
|
13
|
+
import { lastDayOfMonth as j } from "date-fns/lastDayOfMonth";
|
|
14
|
+
import { nextDay as O } from "date-fns/nextDay";
|
|
15
|
+
import { parseISO as U } from "date-fns/parseISO";
|
|
16
|
+
import { setDate as k } from "date-fns/setDate";
|
|
17
|
+
import { setDay as z } from "date-fns/setDay";
|
|
18
|
+
import { setDayOfYear as B } from "date-fns/setDayOfYear";
|
|
19
|
+
import { startOfToday as b } from "date-fns/startOfToday";
|
|
20
|
+
import { subDays as Q } from "date-fns/subDays";
|
|
21
|
+
import { subMonths as J } from "date-fns/subMonths";
|
|
22
|
+
import { subQuarters as G } from "date-fns/subQuarters";
|
|
23
|
+
import { subWeeks as V } from "date-fns/subWeeks";
|
|
24
|
+
import { subYears as X } from "date-fns/subYears";
|
|
25
|
+
import { g as Z, a as q, b as F, c as R, d as T, e as ee, f as te, h as re, i as se } from "./DateUtil-CzBmbjmA.mjs";
|
|
26
|
+
import { b as Y } from "./NumberFormatting--XMeeBfr.mjs";
|
|
27
|
+
import { b as f } from "./Localization-DnoVyBNK.mjs";
|
|
28
|
+
import { f as E, D as M } from "./DateFormats-HudZ3Bjs.mjs";
|
|
29
|
+
var c = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(c || {}), _ = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(_ || {}), g = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(g || {}), P = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(P || {});
|
|
30
|
+
const ae = (e) => {
|
|
31
|
+
if (!e) return "";
|
|
32
|
+
let a = e.user_name || e.feed_name || "";
|
|
33
|
+
return e.account_number && (a = `${a} *${e.account_number}`), a;
|
|
34
|
+
}, oe = (e, a) => {
|
|
35
|
+
const r = [], o = e.recurrence_type === c.EveryYear, t = e.transactions.find(
|
|
36
|
+
(m) => m.repeating_transaction_guid === e.guid
|
|
37
|
+
);
|
|
38
|
+
if (!o && !t) return [];
|
|
39
|
+
const s = U(e.predicted_occurs_on), i = {
|
|
40
|
+
accountGuid: e.account?.guid || "",
|
|
41
|
+
amount: e.amount,
|
|
42
|
+
categoryGuid: t?.category_guid || "",
|
|
43
|
+
expectedDate: s,
|
|
44
|
+
frequency: e.recurrence_type,
|
|
45
|
+
institutionGuid: e.account?.institution_guid || "",
|
|
46
|
+
institutionName: ae(e.account),
|
|
47
|
+
merchantGuid: e.merchant_guid,
|
|
48
|
+
name: e.description,
|
|
49
|
+
recurrenceDay: e.recurrence_day,
|
|
50
|
+
repeatingTransactionGuid: e.guid,
|
|
51
|
+
secondRecurrenceDay: e.second_recurrence_day,
|
|
52
|
+
status: _.Upcoming,
|
|
53
|
+
type: e.repeating_transaction_type === P.Income ? g.Income : g.Expense,
|
|
54
|
+
transaction: void 0
|
|
55
|
+
}, n = a.start, d = a.end;
|
|
56
|
+
switch (e.recurrence_type) {
|
|
57
|
+
case c.EveryWeek:
|
|
58
|
+
r.push(...ne(i, n, d));
|
|
59
|
+
break;
|
|
60
|
+
case c.EveryOtherWeek:
|
|
61
|
+
r.push(...ce(i, n, d));
|
|
62
|
+
break;
|
|
63
|
+
case c.TwiceAMonth:
|
|
64
|
+
r.push(...ie(i, n, d));
|
|
65
|
+
break;
|
|
66
|
+
case c.EveryMonth:
|
|
67
|
+
r.push(...de(i, n, d));
|
|
68
|
+
break;
|
|
69
|
+
case c.EveryOtherMonth:
|
|
70
|
+
r.push(...ue(i, n, d));
|
|
71
|
+
break;
|
|
72
|
+
case c.EveryQuarter:
|
|
73
|
+
r.push(...me(i, n, d));
|
|
74
|
+
break;
|
|
75
|
+
case c.EveryOtherQuarter:
|
|
76
|
+
r.push(...he(i, n, d));
|
|
77
|
+
break;
|
|
78
|
+
case c.EveryYear:
|
|
79
|
+
r.push(...le(i, n, d));
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
const v = /* @__PURE__ */ new Set();
|
|
83
|
+
for (const m of r) {
|
|
84
|
+
const w = e.transactions.filter(
|
|
85
|
+
(h) => h.repeating_transaction_guid === e.guid && !v.has(h.guid)
|
|
86
|
+
), p = w.find(
|
|
87
|
+
(h) => h.date > y(Q(m.expectedDate, 5)) && h.date < y(N(m.expectedDate, 5))
|
|
88
|
+
) || w.reduce((h, W) => {
|
|
89
|
+
const S = Math.abs(W.date - y(m.expectedDate)), L = h ? Math.abs(h.date - y(m.expectedDate)) : 1 / 0;
|
|
90
|
+
return S < L ? W : h;
|
|
91
|
+
}, void 0);
|
|
92
|
+
p ? (v.add(p.guid), m.transaction = p, m.status = _.Paid, m.occurredOnDate = C(p.date)) : u(m.expectedDate, Q(b(), 3)) && (m.status = _.Missed);
|
|
93
|
+
}
|
|
94
|
+
return r;
|
|
95
|
+
}, ne = (e, a, r) => {
|
|
96
|
+
const o = [];
|
|
97
|
+
let t = O(a, e.recurrenceDay);
|
|
98
|
+
for (; u(t, r); )
|
|
99
|
+
o.push({ ...e, expectedDate: t }), t = O(t, e.recurrenceDay);
|
|
100
|
+
return o;
|
|
101
|
+
}, ce = (e, a, r) => {
|
|
102
|
+
const o = [];
|
|
103
|
+
let t = e.expectedDate;
|
|
104
|
+
if (u(t, a))
|
|
105
|
+
for (; u(t, a); )
|
|
106
|
+
t = x(t, 2);
|
|
107
|
+
else {
|
|
108
|
+
for (; D(t, a) || H(t, a); )
|
|
109
|
+
t = V(t, 2);
|
|
110
|
+
t = x(t, 2);
|
|
111
|
+
}
|
|
112
|
+
for (; u(t, r); )
|
|
113
|
+
o.push({ ...e, expectedDate: t }), t = N(t, 14);
|
|
114
|
+
return o;
|
|
115
|
+
}, ie = (e, a, r) => {
|
|
116
|
+
const o = [];
|
|
117
|
+
let t = k(a, e.recurrenceDay);
|
|
118
|
+
for (; u(t, r); )
|
|
119
|
+
o.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
120
|
+
let s = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? k(a, e.secondRecurrenceDay) : j(a);
|
|
121
|
+
for (; u(s, r); )
|
|
122
|
+
o.push({ ...e, expectedDate: s }), s = l(s, 1);
|
|
123
|
+
return o;
|
|
124
|
+
}, de = (e, a, r) => {
|
|
125
|
+
const o = [];
|
|
126
|
+
let t = k(a, e.recurrenceDay);
|
|
127
|
+
for (o.push({ ...e, expectedDate: t }), t = l(t, 1); u(t, r); )
|
|
128
|
+
o.push({ ...e, expectedDate: t }), t = l(t, 1);
|
|
129
|
+
return o;
|
|
130
|
+
}, ue = (e, a, r) => {
|
|
131
|
+
const o = [], t = e.expectedDate;
|
|
132
|
+
let s = u(t, r) ? t : J(t, 2);
|
|
133
|
+
for (; u(s, r); )
|
|
134
|
+
D(s, a) && o.push({ ...e, expectedDate: s }), s = l(s, 2);
|
|
135
|
+
return o;
|
|
136
|
+
}, me = (e, a, r) => {
|
|
137
|
+
const o = [], t = e.expectedDate;
|
|
138
|
+
let s = u(t, r) ? t : G(t, 1);
|
|
139
|
+
for (; u(s, r); )
|
|
140
|
+
D(s, a) && o.push({ ...e, expectedDate: s }), s = A(s, 1);
|
|
141
|
+
return o;
|
|
142
|
+
}, he = (e, a, r) => {
|
|
143
|
+
const o = [], t = e.expectedDate;
|
|
144
|
+
let s = u(t, r) ? t : G(t, 2);
|
|
145
|
+
for (; u(s, r); )
|
|
146
|
+
D(s, a) && o.push({ ...e, expectedDate: s }), s = A(s, 2);
|
|
147
|
+
return o;
|
|
148
|
+
}, le = (e, a, r) => {
|
|
149
|
+
const o = [], t = e.expectedDate;
|
|
150
|
+
let s = u(t, r) ? t : X(t, 1);
|
|
151
|
+
for (; u(s, r); )
|
|
152
|
+
D(s, a) && o.push({ ...e, expectedDate: s }), s = I(s, 1);
|
|
153
|
+
return o;
|
|
154
|
+
}, He = (e, a) => {
|
|
155
|
+
const r = [];
|
|
156
|
+
for (const o of e) {
|
|
157
|
+
const t = oe(o, a);
|
|
158
|
+
r.push(...t);
|
|
159
|
+
}
|
|
160
|
+
return r.sort(
|
|
161
|
+
(o, t) => y(o.occurredOnDate || o.expectedDate) - y(t.occurredOnDate || t.expectedDate)
|
|
162
|
+
);
|
|
163
|
+
}, je = (e, a, r) => {
|
|
164
|
+
const o = [];
|
|
165
|
+
for (const t of a) {
|
|
166
|
+
const s = r.filter(
|
|
167
|
+
(i) => i.repeating_transaction_guid === t.guid
|
|
168
|
+
);
|
|
169
|
+
r.length > 0 && o.push({
|
|
170
|
+
...t,
|
|
171
|
+
account: e.find((i) => i.guid === t.account_guid),
|
|
172
|
+
transactions: s
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return o;
|
|
176
|
+
}, ze = (e) => e.reduce((a, r) => {
|
|
177
|
+
const o = K(r.expectedDate, { representation: "date" }), t = a.find(
|
|
178
|
+
(s) => s.date.toString() === r.expectedDate.toString()
|
|
179
|
+
);
|
|
180
|
+
return t ? t.recurrences.push(r) : a.push({
|
|
181
|
+
date: r.expectedDate,
|
|
182
|
+
id: `date-${o}`,
|
|
183
|
+
recurrences: [r]
|
|
184
|
+
}), a;
|
|
185
|
+
}, []), Je = (e, a, r) => {
|
|
186
|
+
const o = O(b(), a.recurrence_day), t = B(b(), a.recurrence_day), s = Y(a.recurrence_day), i = a.second_recurrence_day ? Y(a.second_recurrence_day) : "";
|
|
187
|
+
let n = r ? f(e.monthly_ordinal, s) : e.monthly;
|
|
188
|
+
switch (a.recurrence_type) {
|
|
189
|
+
case c.EveryQuarter:
|
|
190
|
+
n = r ? f(e.quarterly_ordinal, s) : e.quarterly;
|
|
191
|
+
break;
|
|
192
|
+
case c.EveryWeek:
|
|
193
|
+
n = r ? f(
|
|
194
|
+
e.weekly_ordinal,
|
|
195
|
+
E(o, M.DAY_OF_WEEK)
|
|
196
|
+
) : e.weekly;
|
|
197
|
+
break;
|
|
198
|
+
case c.EveryYear:
|
|
199
|
+
n = r ? f(
|
|
200
|
+
e.anually_ordinal,
|
|
201
|
+
E(t, M.MONTH_DAY)
|
|
202
|
+
) : e.anually;
|
|
203
|
+
break;
|
|
204
|
+
case c.EveryOtherWeek:
|
|
205
|
+
n = r ? f(
|
|
206
|
+
e.every_other_week_ordinal,
|
|
207
|
+
E(o, M.DAY_OF_WEEK)
|
|
208
|
+
) : e.every_other_week;
|
|
209
|
+
break;
|
|
210
|
+
case c.EveryOtherMonth:
|
|
211
|
+
n = r ? f(e.every_other_month_ordinal, s) : e.every_other_month;
|
|
212
|
+
break;
|
|
213
|
+
case c.EveryOtherQuarter:
|
|
214
|
+
n = r ? f(e.every_other_quarter_ordinal, s) : e.every_other_quarter;
|
|
215
|
+
break;
|
|
216
|
+
case c.TwiceAMonth:
|
|
217
|
+
n = r ? f(e.twice_a_month_ordinal, s, i) : e.twice_a_month;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
return n;
|
|
221
|
+
}, fe = (e, a, r, o) => {
|
|
222
|
+
let t = a;
|
|
223
|
+
r !== void 0 && (e === c.EveryWeek || e === c.EveryOtherWeek ? t = z(a, r) : e === c.EveryYear ? t = B(a, r) : t = k(a, r));
|
|
224
|
+
let s = t;
|
|
225
|
+
switch (e) {
|
|
226
|
+
case c.EveryWeek:
|
|
227
|
+
s = re(t);
|
|
228
|
+
break;
|
|
229
|
+
case c.EveryOtherWeek:
|
|
230
|
+
s = te(t);
|
|
231
|
+
break;
|
|
232
|
+
case c.TwiceAMonth:
|
|
233
|
+
s = ee(
|
|
234
|
+
r ?? t.getDate(),
|
|
235
|
+
o ?? 28
|
|
236
|
+
);
|
|
237
|
+
break;
|
|
238
|
+
case c.EveryMonth:
|
|
239
|
+
s = T(t);
|
|
240
|
+
break;
|
|
241
|
+
case c.EveryOtherMonth:
|
|
242
|
+
s = R(t);
|
|
243
|
+
break;
|
|
244
|
+
case c.EveryQuarter:
|
|
245
|
+
s = F(t);
|
|
246
|
+
break;
|
|
247
|
+
case c.EveryOtherQuarter:
|
|
248
|
+
s = q(t);
|
|
249
|
+
break;
|
|
250
|
+
case c.EveryYear:
|
|
251
|
+
s = Z(t);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
return s;
|
|
255
|
+
}, Ve = (e, a) => {
|
|
256
|
+
const r = a.find(
|
|
257
|
+
(n) => n.repeatingTransactionGuid === e.guid && n.status === _.Upcoming
|
|
258
|
+
);
|
|
259
|
+
if (r) return r.expectedDate;
|
|
260
|
+
const o = (n) => a.some(
|
|
261
|
+
(d) => d.repeatingTransactionGuid === e.guid && d.status === _.Paid && Math.abs($(d.expectedDate, n)) <= 5
|
|
262
|
+
), t = {
|
|
263
|
+
[c.EveryWeek]: (n) => x(n, 1),
|
|
264
|
+
[c.EveryOtherWeek]: (n) => x(n, 2),
|
|
265
|
+
[c.TwiceAMonth]: (n) => {
|
|
266
|
+
const d = se(
|
|
267
|
+
e.recurrence_day,
|
|
268
|
+
e.second_recurrence_day ?? 28
|
|
269
|
+
);
|
|
270
|
+
return d.find((v) => D(v, n)) ?? d[d.length - 1];
|
|
271
|
+
},
|
|
272
|
+
[c.EveryMonth]: (n) => l(n, 1),
|
|
273
|
+
[c.EveryOtherMonth]: (n) => l(n, 2),
|
|
274
|
+
[c.EveryQuarter]: (n) => l(n, 3),
|
|
275
|
+
[c.EveryOtherQuarter]: (n) => l(n, 6),
|
|
276
|
+
[c.EveryYear]: (n) => I(n, 1)
|
|
277
|
+
}, s = fe(
|
|
278
|
+
e.recurrence_type,
|
|
279
|
+
U(e.predicted_occurs_on),
|
|
280
|
+
e.recurrence_day,
|
|
281
|
+
e.second_recurrence_day
|
|
282
|
+
);
|
|
283
|
+
if (!o(s)) return s;
|
|
284
|
+
const i = t[e.recurrence_type];
|
|
285
|
+
return i ? i(s) : s;
|
|
286
|
+
};
|
|
287
|
+
export {
|
|
288
|
+
c as F,
|
|
289
|
+
P as R,
|
|
290
|
+
_ as a,
|
|
291
|
+
g as b,
|
|
292
|
+
Ve as c,
|
|
293
|
+
fe as d,
|
|
294
|
+
ze as e,
|
|
295
|
+
je as f,
|
|
296
|
+
Je as g,
|
|
297
|
+
He as h
|
|
298
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as r, jsxs as l, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import u from "@mui/material/Avatar";
|
|
3
|
+
import s from "@mui/material/ListItem";
|
|
4
|
+
import h from "@mui/material/ListItemAvatar";
|
|
5
|
+
import p from "@mui/material/ListItemButton";
|
|
6
|
+
import f from "@mui/material/ListItemIcon";
|
|
7
|
+
import g from "@mui/material/ListItemText";
|
|
8
|
+
import { Icon as d } from "@mxenabled/mxui";
|
|
9
|
+
import x from "@mui/material/MenuItem";
|
|
10
|
+
import b from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as v } from "@mxenabled/mx-icons";
|
|
12
|
+
const G = ({
|
|
13
|
+
iconName: o,
|
|
14
|
+
label: a,
|
|
15
|
+
onClick: e,
|
|
16
|
+
showChevron: n = !0,
|
|
17
|
+
value: i
|
|
18
|
+
}) => {
|
|
19
|
+
const m = /* @__PURE__ */ l(c, { children: [
|
|
20
|
+
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(u, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ r(d, { name: o, sx: { color: "text.primary" } }) }) }),
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
g,
|
|
23
|
+
{
|
|
24
|
+
primary: a,
|
|
25
|
+
secondary: i,
|
|
26
|
+
slotProps: {
|
|
27
|
+
primary: { variant: "caption", fontWeight: "normal" },
|
|
28
|
+
secondary: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] });
|
|
33
|
+
return e ? /* @__PURE__ */ r(s, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(p, { onClick: e, children: [
|
|
34
|
+
m,
|
|
35
|
+
n && /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(d, { name: "chevron_right", size: 24 }) })
|
|
36
|
+
] }) }) : /* @__PURE__ */ r(s, { disableGutters: !1, disablePadding: !1, children: m });
|
|
37
|
+
}, M = ({ label: o, onChange: a, options: e, value: n, ...i }) => /* @__PURE__ */ r(
|
|
38
|
+
b,
|
|
39
|
+
{
|
|
40
|
+
defaultValue: 0,
|
|
41
|
+
label: o,
|
|
42
|
+
onChange: (t) => {
|
|
43
|
+
a(Number(t.target.value));
|
|
44
|
+
},
|
|
45
|
+
select: !0,
|
|
46
|
+
slotProps: {
|
|
47
|
+
inputLabel: { shrink: !0 },
|
|
48
|
+
select: {
|
|
49
|
+
IconComponent: (t) => /* @__PURE__ */ r(v, { size: 20, sx: { mr: 4 }, ...t })
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
value: n,
|
|
53
|
+
variant: "outlined",
|
|
54
|
+
...i,
|
|
55
|
+
children: e.map((t) => /* @__PURE__ */ r(x, { value: t.id, children: t.label }, t.id))
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
export {
|
|
59
|
+
G as D,
|
|
60
|
+
M as S
|
|
61
|
+
};
|
|
@@ -11,7 +11,7 @@ import { CategoryIcon as G, CategoryIconVariants as O, Text as y, P as $ } from
|
|
|
11
11
|
import { f as b } from "./NumberFormatting--XMeeBfr.mjs";
|
|
12
12
|
import { D as j } from "./Donut-SzzfZDHF.mjs";
|
|
13
13
|
import { u as R } from "./useAriaLive-MkYebyUR.mjs";
|
|
14
|
-
import { u as v } from "./hooks-
|
|
14
|
+
import { u as v } from "./hooks-97sNJ_lf.mjs";
|
|
15
15
|
import { u as V } from "./useScreenSize-mWpmnh5w.mjs";
|
|
16
16
|
const D = 5, B = (i, l, s, m) => m.reduce((o, n) => {
|
|
17
17
|
const r = i.find((u) => u.guid === n.category_guid);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { c as C } from "./Account-DR7Plrqy.mjs";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
const o = [
|
|
4
|
+
C.ANY,
|
|
5
|
+
C.CASH,
|
|
6
|
+
C.CHECKING,
|
|
7
|
+
C.DIGITAL_WALLET,
|
|
8
|
+
C.PREPAID,
|
|
9
|
+
C.SAVINGS
|
|
10
|
+
], D = [
|
|
11
|
+
C.CHECKING_LINE_OF_CREDIT,
|
|
12
|
+
C.CREDIT_CARD,
|
|
13
|
+
C.LINE_OF_CREDIT,
|
|
14
|
+
C.LOAN,
|
|
15
|
+
C.MORTGAGE
|
|
16
|
+
], r = [
|
|
17
|
+
C.ANY,
|
|
18
|
+
C.CASH,
|
|
19
|
+
C.CHECKING,
|
|
20
|
+
C.CHECKING_LINE_OF_CREDIT,
|
|
21
|
+
C.CREDIT_CARD,
|
|
22
|
+
C.DIGITAL_WALLET,
|
|
23
|
+
C.LINE_OF_CREDIT,
|
|
24
|
+
C.PREPAID,
|
|
25
|
+
C.SAVINGS
|
|
26
|
+
], G = ({
|
|
27
|
+
children: T,
|
|
28
|
+
index: E,
|
|
29
|
+
name: I,
|
|
30
|
+
value: A,
|
|
31
|
+
...N
|
|
32
|
+
}) => /* @__PURE__ */ _(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
"aria-labelledby": `${I}-tab-${E}`,
|
|
36
|
+
hidden: A !== E,
|
|
37
|
+
id: `${I}-tabpanel-${E}`,
|
|
38
|
+
role: "tabpanel",
|
|
39
|
+
...N,
|
|
40
|
+
children: A === E && T
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
export {
|
|
44
|
+
o as I,
|
|
45
|
+
D as P,
|
|
46
|
+
r as S,
|
|
47
|
+
G as T
|
|
48
|
+
};
|
|
@@ -22,9 +22,9 @@ import Xe from "@mui/material/FormGroup";
|
|
|
22
22
|
import ue from "@mui/material/IconButton";
|
|
23
23
|
import $e from "@mui/material/TextField";
|
|
24
24
|
import { u as Ae } from "./useAriaLive-MkYebyUR.mjs";
|
|
25
|
-
import { b as Ze, T as Je, u as ne, O as C, c as et, d as tt, E as at, C as nt } from "./EmbeddedCard-
|
|
26
|
-
import { u as O,
|
|
27
|
-
import { A as Y } from "./Analytics-
|
|
25
|
+
import { b as Ze, T as Je, u as ne, O as C, c as et, d as tt, E as at, C as nt } from "./EmbeddedCard-CQpbZrmP.mjs";
|
|
26
|
+
import { u as O, g as R, o as rt, c as ot, l as we, f as G, a as it, C as st } from "./hooks-97sNJ_lf.mjs";
|
|
27
|
+
import { A as Y } from "./Analytics-WeZYytR0.mjs";
|
|
28
28
|
import lt from "@mui/material/ToggleButton";
|
|
29
29
|
import { ChevronRight as Ke, Icon as P, Delete as fe, Cancel as Se, Search as ct, Edit as dt, Flag as ut } from "@mxenabled/mx-icons";
|
|
30
30
|
import { fromUnixTime as ve } from "date-fns/fromUnixTime";
|
|
@@ -37,15 +37,15 @@ import { BarChart as mt } from "@mui/x-charts";
|
|
|
37
37
|
import { L as _t } from "./Loader-CxeBwuPG.mjs";
|
|
38
38
|
import Q from "@mui/material/ListItemButton";
|
|
39
39
|
import X from "@mui/material/ListItemIcon";
|
|
40
|
-
import { b as Fe } from "./CategorySelectorDrawer-
|
|
40
|
+
import { b as Fe } from "./CategorySelectorDrawer-BArJC27L.mjs";
|
|
41
41
|
import { D as ae } from "./Dialog-Bvd2n8hz.mjs";
|
|
42
42
|
import { D as _e } from "./Drawer-BXqqBMxg.mjs";
|
|
43
43
|
import { b as gt, C as pt, a as ht } from "./CurrencyDialog-DumQCTPO.mjs";
|
|
44
44
|
import Pe from "@mui/material/InputAdornment";
|
|
45
45
|
import yt from "@mui/material/Checkbox";
|
|
46
|
-
import {
|
|
46
|
+
import { l as Tt } from "./DateUtil-CzBmbjmA.mjs";
|
|
47
47
|
import Ne from "@mui/material/Grid";
|
|
48
|
-
import { C as bt } from "./CurrencyInput-
|
|
48
|
+
import { C as bt } from "./CurrencyInput-DaGEQaLW.mjs";
|
|
49
49
|
import Ct from "@mui/material/Switch";
|
|
50
50
|
var de = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(de || {}), ie = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(ie || {});
|
|
51
51
|
const ft = [
|