@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega2
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 +50 -0
- package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
- package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-BF4QA-Lx.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
- package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
- package/dist/accounts/index.es.js +200 -197
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +703 -669
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +420 -404
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +3 -6
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/hooks/index.d.ts +2 -0
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +712 -436
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +93 -91
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +529 -527
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +876 -867
- package/dist/goals/index.es.js +526 -525
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
- package/dist/investments/index.es.js +534 -531
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +8 -8
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +101 -14
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +284 -285
- package/dist/notifications/index.es.js +95 -94
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +582 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
- package/dist/settings/index.es.js +340 -337
- package/dist/spending/index.es.js +281 -268
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +253 -255
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/transactions/stores/UiStore.d.ts +2 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +838 -793
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +57 -52
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/Accounts-CRUehOiy.mjs +0 -27
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/Drawer-BF40nbsH.mjs +0 -163
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/LineChart-C1PxNf7P.mjs +0 -581
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
- package/dist/TransactionStore-DbwAutwC.mjs +0 -671
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { makeAutoObservable as c, observable as f, runInAction as
|
|
2
|
-
import { fromUnixTime as
|
|
3
|
-
import { F as l, A as
|
|
1
|
+
import { makeAutoObservable as c, observable as f, runInAction as h } from "mobx";
|
|
2
|
+
import { fromUnixTime as o, isSameDay as d } from "date-fns";
|
|
3
|
+
import { F as l, A as a } from "./Fetch-DecPFeGU.mjs";
|
|
4
4
|
class s {
|
|
5
5
|
fetchInstance;
|
|
6
6
|
constructor(t, i, n) {
|
|
7
7
|
this.fetchInstance = new l(t, i, void 0, n);
|
|
8
8
|
}
|
|
9
|
-
getNotifications = () => this.fetchInstance.get(
|
|
9
|
+
getNotifications = () => this.fetchInstance.get(a.NOTIFICATIONS).then(
|
|
10
10
|
(t) => t.notifications.map((i) => i.notification)
|
|
11
11
|
).finally();
|
|
12
|
-
updateNotification = (t) => this.fetchInstance.put(`${
|
|
12
|
+
updateNotification = (t) => this.fetchInstance.put(`${a.NOTIFICATIONS}/${t.guid}`, {
|
|
13
13
|
guid: t.guid,
|
|
14
14
|
has_been_viewed: t.has_been_viewed
|
|
15
15
|
}).then((i) => i.notification).finally();
|
|
16
16
|
// Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
|
|
17
17
|
// A bug ticket has been filed to fix it, but should not require any changes here.
|
|
18
|
-
markAllAsViewed = (t) => this.fetchInstance.put(`${
|
|
18
|
+
markAllAsViewed = (t) => this.fetchInstance.put(`${a.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
|
|
19
19
|
}
|
|
20
20
|
const w = (e, t) => {
|
|
21
|
-
const i =
|
|
22
|
-
return !
|
|
21
|
+
const i = o(t[e].delivered_at), n = o(t[e - 1]?.delivered_at);
|
|
22
|
+
return !d(i, n);
|
|
23
23
|
};
|
|
24
24
|
function u(e) {
|
|
25
25
|
const i = Math.floor(Date.now() / 1e3);
|
|
@@ -33,7 +33,7 @@ class A {
|
|
|
33
33
|
api = new s("/", "");
|
|
34
34
|
isLoading = !0;
|
|
35
35
|
notifications = [];
|
|
36
|
-
|
|
36
|
+
recentNotifications = [];
|
|
37
37
|
constructor(t) {
|
|
38
38
|
this.globalStore = t, this.api = new s(
|
|
39
39
|
t.endpoint,
|
|
@@ -45,27 +45,19 @@ class A {
|
|
|
45
45
|
get newNotifications() {
|
|
46
46
|
return this.recentNotifications.filter((t) => !t.has_been_viewed);
|
|
47
47
|
}
|
|
48
|
-
get recentNotifications() {
|
|
49
|
-
return u(this.notifications);
|
|
50
|
-
}
|
|
51
|
-
setNotifications = (t) => {
|
|
52
|
-
this.notifications = t, this.notificationsLoaded = !0;
|
|
53
|
-
};
|
|
54
48
|
loadNotifications = async () => {
|
|
55
|
-
this.isLoading = !0;
|
|
56
49
|
try {
|
|
50
|
+
this.isLoading = !0;
|
|
57
51
|
const t = await this.api.getNotifications();
|
|
58
|
-
|
|
52
|
+
h(() => {
|
|
53
|
+
this.notifications = t, this.recentNotifications = u(t), this.isLoading = !1;
|
|
54
|
+
});
|
|
59
55
|
} catch (t) {
|
|
60
56
|
console.error(`Error occurred while loading notifications: ${t}`);
|
|
61
|
-
} finally {
|
|
62
|
-
d(() => {
|
|
63
|
-
this.isLoading = !1;
|
|
64
|
-
});
|
|
65
57
|
}
|
|
66
58
|
};
|
|
67
59
|
markAllAsViewed = async () => {
|
|
68
|
-
await this.api.markAllAsViewed();
|
|
60
|
+
this.notifications.forEach((t) => t.has_been_viewed = !0), await this.api.markAllAsViewed();
|
|
69
61
|
};
|
|
70
62
|
updateNotification = async (t) => {
|
|
71
63
|
t.has_been_viewed = !0, await this.api.updateNotification(t);
|
|
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import _ from "react";
|
|
3
3
|
import { observer as p } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/TextField";
|
|
5
|
-
import { L as y } from "./ListItemAction-
|
|
6
|
-
import { u as h, l as b } from "./hooks-
|
|
5
|
+
import { L as y } from "./ListItemAction-BxTkF6Tz.mjs";
|
|
6
|
+
import { u as h, l as b } from "./hooks-ZMp65DFz.mjs";
|
|
7
7
|
import { a as T, f as S } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
8
|
-
import { C as f } from "./CurrencyInput-
|
|
8
|
+
import { C as f } from "./CurrencyInput-itK0R3wV.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 };
|
|
@@ -39,7 +39,7 @@ const F = p(({ goal: e }) => {
|
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
}),
|
|
42
|
+
}), B = p(({ goal: e }) => {
|
|
43
43
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.monthly_payment ?? 0), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
44
44
|
const n = { ...e, monthly_payment: t };
|
|
45
45
|
e.monthly_payment = t, c ? l(n) : (await m({ ...e, monthly_payment: t }), r(a.alert_goal_updated_payment));
|
|
@@ -68,12 +68,12 @@ const F = p(({ goal: e }) => {
|
|
|
68
68
|
fullWidth: !0,
|
|
69
69
|
minAmount: 0,
|
|
70
70
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
71
|
-
sx: { ".MuiTypography-
|
|
71
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
}),
|
|
76
|
+
}), M = p(({ goal: e }) => {
|
|
77
77
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.initial_amount), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
78
78
|
const n = { ...e, initial_amount: t };
|
|
79
79
|
e.initial_amount = t, c ? l(n) : (await m({ ...e, initial_amount: t }), r(a.alert_goal_updated_balance));
|
|
@@ -102,7 +102,7 @@ const F = p(({ goal: e }) => {
|
|
|
102
102
|
fullWidth: !0,
|
|
103
103
|
minAmount: 0,
|
|
104
104
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
105
|
-
sx: { ".MuiTypography-
|
|
105
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
108
|
}
|
|
@@ -110,6 +110,6 @@ const F = p(({ goal: e }) => {
|
|
|
110
110
|
});
|
|
111
111
|
export {
|
|
112
112
|
F as I,
|
|
113
|
-
M,
|
|
114
|
-
|
|
113
|
+
B as M,
|
|
114
|
+
M as O
|
|
115
115
|
};
|
|
@@ -3,21 +3,21 @@ import u from "react";
|
|
|
3
3
|
import { observer as h } from "mobx-react-lite";
|
|
4
4
|
import c from "@mui/material/Box";
|
|
5
5
|
import p from "@mui/material/Tab";
|
|
6
|
-
import
|
|
6
|
+
import b from "@mui/material/Tabs";
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
|
-
import
|
|
8
|
+
import R from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
11
|
-
import { u as _, j as A, g as f } from "./hooks-
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactions-
|
|
13
|
-
import { A as m } from "./WidgetContainer-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-CaoQl609.mjs";
|
|
11
|
+
import { u as _, j as A, g as f } from "./hooks-ZMp65DFz.mjs";
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactions-BqijW_8S.mjs";
|
|
13
|
+
import { A as m } from "./WidgetContainer-CoFDmQRE.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
|
-
const { recurring: g } = _(), {
|
|
16
|
-
|
|
15
|
+
const { recurring: g } = _(), { repeatingTransactions: n } = A(), { onEvent: o } = f(), l = (r) => {
|
|
16
|
+
o(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
17
17
|
repeating_transaction_guid: r.guid
|
|
18
18
|
});
|
|
19
|
-
},
|
|
20
|
-
|
|
19
|
+
}, a = () => {
|
|
20
|
+
o(m.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
|
21
21
|
}, i = n.filter(
|
|
22
22
|
(r) => r.repeating_transaction_type !== y.Income && (r.transactions.length > 0 || r.recurrence_type === N.EveryYear)
|
|
23
23
|
);
|
|
@@ -29,7 +29,7 @@ const I = h(() => {
|
|
|
29
29
|
maxHeight: "calc(100vh - 109px)"
|
|
30
30
|
},
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(
|
|
32
|
+
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(R, { sx: { bgcolor: "background.paper" }, children: i.map((r, s) => /* @__PURE__ */ t(u.Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ e(C, { onClick: l, repeatingTransaction: r }),
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
35
|
d,
|
|
@@ -51,7 +51,7 @@ const I = h(() => {
|
|
|
51
51
|
py: 12,
|
|
52
52
|
textAlign: "right"
|
|
53
53
|
},
|
|
54
|
-
children: /* @__PURE__ */ e(S, { label: g.add_expense, onAddRecurringTransaction:
|
|
54
|
+
children: /* @__PURE__ */ e(S, { label: g.add_expense, onAddRecurringTransaction: a })
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] })
|
|
@@ -59,13 +59,13 @@ const I = h(() => {
|
|
|
59
59
|
}
|
|
60
60
|
) : /* @__PURE__ */ e(E, { zeroStateFor: "expenses" }) });
|
|
61
61
|
}), X = h(({ defaultSelectedTab: g = 0 }) => {
|
|
62
|
-
const [n,
|
|
62
|
+
const [n, o] = u.useState(g), { onEvent: l } = f(), { recurring: a } = _();
|
|
63
63
|
return /* @__PURE__ */ t(c, { bgcolor: "background.default", height: "100%", children: [
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
|
-
|
|
65
|
+
b,
|
|
66
66
|
{
|
|
67
67
|
onChange: (r, s) => {
|
|
68
|
-
|
|
68
|
+
o(s), l(
|
|
69
69
|
s === 0 ? "recurring_transactions_widget_manage_expenses" : "recurring_transactions_widget_edit_income"
|
|
70
70
|
);
|
|
71
71
|
},
|
|
@@ -73,8 +73,8 @@ const I = h(() => {
|
|
|
73
73
|
value: n,
|
|
74
74
|
variant: "fullWidth",
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */ e(p, { label:
|
|
77
|
-
/* @__PURE__ */ e(p, { label:
|
|
76
|
+
/* @__PURE__ */ e(p, { label: a.expenses }),
|
|
77
|
+
/* @__PURE__ */ e(p, { label: a.income })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
),
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as M, Fragment as B, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import P from "@mui/material/Avatar";
|
|
3
3
|
import w from "@mui/material/ListItem";
|
|
4
4
|
import L from "@mui/material/ListItemAvatar";
|
|
5
5
|
import U from "@mui/material/ListItemButton";
|
|
6
6
|
import G from "@mui/material/ListItemText";
|
|
7
|
-
import { Icon as I } from "@mxenabled/mxui";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { ExpandMore as
|
|
7
|
+
import { Icon as I, IconWeight as S } from "@mxenabled/mxui";
|
|
8
|
+
import C from "@mui/material/ListItemIcon";
|
|
9
|
+
import $ from "@mui/material/MenuItem";
|
|
10
|
+
import j from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as z } from "@mxenabled/mx-icons";
|
|
12
12
|
import { addDays as Q } from "date-fns/addDays";
|
|
13
13
|
import { addMonths as f } from "date-fns/addMonths";
|
|
14
14
|
import { addQuarters as A } from "date-fns/addQuarters";
|
|
15
|
-
import { addYears as
|
|
16
|
-
import { formatISO as
|
|
17
|
-
import { fromUnixTime as
|
|
15
|
+
import { addYears as K } from "date-fns/addYears";
|
|
16
|
+
import { formatISO as H } from "date-fns/formatISO";
|
|
17
|
+
import { fromUnixTime as V } from "date-fns/fromUnixTime";
|
|
18
18
|
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
19
19
|
import { isAfter as h } from "date-fns/isAfter";
|
|
20
20
|
import { isBefore as u } from "date-fns/isBefore";
|
|
21
|
-
import { isSameDay as
|
|
21
|
+
import { isSameDay as X } from "date-fns/isSameDay";
|
|
22
22
|
import { nextDay as E } from "date-fns/nextDay";
|
|
23
23
|
import { parseISO as J } from "date-fns/parseISO";
|
|
24
24
|
import { setDate as g } from "date-fns/setDate";
|
|
25
25
|
import { startOfToday as b } from "date-fns/startOfToday";
|
|
26
|
-
import { subDays as
|
|
27
|
-
import { subMonths as
|
|
26
|
+
import { subDays as D } from "date-fns/subDays";
|
|
27
|
+
import { subMonths as Z } from "date-fns/subMonths";
|
|
28
28
|
import { subQuarters as N } from "date-fns/subQuarters";
|
|
29
|
-
import { subYears as
|
|
30
|
-
import { lastDayOfMonth as
|
|
31
|
-
import { setDayOfYear as
|
|
32
|
-
import { g as
|
|
29
|
+
import { subYears as T } from "date-fns/subYears";
|
|
30
|
+
import { lastDayOfMonth as q } from "date-fns/lastDayOfMonth";
|
|
31
|
+
import { setDayOfYear as F } from "date-fns/setDayOfYear";
|
|
32
|
+
import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-CBdcsyuk.mjs";
|
|
33
33
|
import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
34
|
-
import { f as v, a as k } from "./Dialog-
|
|
34
|
+
import { f as v, a as k } from "./Dialog-BPTr3qHE.mjs";
|
|
35
35
|
import { b as l } from "./Localization-2MODESHW.mjs";
|
|
36
36
|
var s = /* @__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))(s || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), O = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(O || {}), Y = /* @__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))(Y || {});
|
|
37
|
-
const
|
|
37
|
+
const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
38
38
|
const o = /* @__PURE__ */ M(B, { children: [
|
|
39
|
-
/* @__PURE__ */ d(L, { children: /* @__PURE__ */ d(P, { sx: { bgcolor: "
|
|
39
|
+
/* @__PURE__ */ d(L, { children: /* @__PURE__ */ d(P, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ d(I, { name: e, sx: { color: "text.primary" }, weight: S.Dark }) }) }),
|
|
40
40
|
/* @__PURE__ */ d(
|
|
41
41
|
G,
|
|
42
42
|
{
|
|
43
43
|
primary: a,
|
|
44
|
-
primaryTypographyProps: { variant: "
|
|
44
|
+
primaryTypographyProps: { variant: "XSmall" },
|
|
45
45
|
secondary: n,
|
|
46
|
-
secondaryTypographyProps: { color: "text.default", variant: "
|
|
46
|
+
secondaryTypographyProps: { color: "text.default", variant: "Body", fontWeight: 600 }
|
|
47
47
|
}
|
|
48
48
|
)
|
|
49
49
|
] });
|
|
50
50
|
return t ? /* @__PURE__ */ d(w, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ M(U, { onClick: t, children: [
|
|
51
51
|
o,
|
|
52
|
-
/* @__PURE__ */ d(
|
|
52
|
+
/* @__PURE__ */ d(C, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
|
|
53
53
|
] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: o });
|
|
54
|
-
},
|
|
55
|
-
|
|
54
|
+
}, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n, ...o }) => /* @__PURE__ */ d(
|
|
55
|
+
j,
|
|
56
56
|
{
|
|
57
57
|
InputLabelProps: { shrink: !0 },
|
|
58
58
|
SelectProps: {
|
|
59
|
-
IconComponent: (c) => /* @__PURE__ */ d(
|
|
59
|
+
IconComponent: (c) => /* @__PURE__ */ d(z, { size: 20, sx: { mr: 4 }, ...c })
|
|
60
60
|
},
|
|
61
61
|
defaultValue: 0,
|
|
62
62
|
label: e,
|
|
@@ -67,13 +67,13 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
67
67
|
value: n,
|
|
68
68
|
variant: "outlined",
|
|
69
69
|
...o,
|
|
70
|
-
children: t.map((c) => /* @__PURE__ */ d(
|
|
70
|
+
children: t.map((c) => /* @__PURE__ */ d($, { value: c.id, children: c.label }, c.id))
|
|
71
71
|
}
|
|
72
|
-
),
|
|
72
|
+
), ce = (e) => {
|
|
73
73
|
if (!e) return "";
|
|
74
74
|
let a = e.user_name || e.feed_name || "";
|
|
75
75
|
return e.account_number && (a = `${a} *${e.account_number}`), a;
|
|
76
|
-
},
|
|
76
|
+
}, ie = (e, a) => {
|
|
77
77
|
const t = [], n = e.transactions.find(
|
|
78
78
|
(m) => m.repeating_transaction_guid === e.guid
|
|
79
79
|
);
|
|
@@ -85,7 +85,7 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
85
85
|
expectedDate: o,
|
|
86
86
|
frequency: e.recurrence_type,
|
|
87
87
|
institutionGuid: e.account?.institution_guid || "",
|
|
88
|
-
institutionName:
|
|
88
|
+
institutionName: ce(e.account),
|
|
89
89
|
merchantGuid: e.merchant_guid,
|
|
90
90
|
name: e.description,
|
|
91
91
|
recurrenceDay: e.recurrence_day,
|
|
@@ -97,102 +97,102 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
97
97
|
}, c = a.start, i = a.end;
|
|
98
98
|
switch (e.recurrence_type) {
|
|
99
99
|
case s.EveryWeek:
|
|
100
|
-
t.push(...
|
|
100
|
+
t.push(...ue(r, c, i));
|
|
101
101
|
break;
|
|
102
102
|
case s.EveryOtherWeek:
|
|
103
|
-
t.push(...
|
|
103
|
+
t.push(...de(r, c, i));
|
|
104
104
|
break;
|
|
105
105
|
case s.TwiceAMonth:
|
|
106
|
-
t.push(...
|
|
106
|
+
t.push(...me(r, c, i));
|
|
107
107
|
break;
|
|
108
108
|
case s.EveryMonth:
|
|
109
|
-
t.push(...
|
|
109
|
+
t.push(...le(r, c, i));
|
|
110
110
|
break;
|
|
111
111
|
case s.EveryOtherMonth:
|
|
112
|
-
t.push(...
|
|
112
|
+
t.push(...he(r, c, i));
|
|
113
113
|
break;
|
|
114
114
|
case s.EveryQuarter:
|
|
115
|
-
t.push(...
|
|
115
|
+
t.push(...fe(r, c, i));
|
|
116
116
|
break;
|
|
117
117
|
case s.EveryOtherQuarter:
|
|
118
|
-
t.push(...
|
|
118
|
+
t.push(...pe(r, c, i));
|
|
119
119
|
break;
|
|
120
120
|
case s.EveryYear:
|
|
121
|
-
t.push(...
|
|
121
|
+
t.push(...ye(r, c, i));
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
for (const m of t) {
|
|
125
|
-
const
|
|
126
|
-
(x) => x.repeating_transaction_guid === e.guid && x.date > y(
|
|
125
|
+
const _ = e.transactions.find(
|
|
126
|
+
(x) => x.repeating_transaction_guid === e.guid && x.date > y(D(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
|
|
127
127
|
);
|
|
128
|
-
|
|
128
|
+
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) : u(m.expectedDate, D(b(), 3)) && (m.status = p.Missed);
|
|
129
129
|
}
|
|
130
130
|
return t;
|
|
131
|
-
},
|
|
131
|
+
}, ue = (e, a, t) => {
|
|
132
132
|
const n = [];
|
|
133
133
|
let o = E(a, e.recurrenceDay);
|
|
134
134
|
for (; u(o, t); )
|
|
135
135
|
n.push({ ...e, expectedDate: o }), o = E(o, e.recurrenceDay);
|
|
136
136
|
return n;
|
|
137
|
-
},
|
|
137
|
+
}, de = (e, a, t) => {
|
|
138
138
|
const n = [], o = e.expectedDate;
|
|
139
139
|
if (u(o, t)) {
|
|
140
|
-
let r =
|
|
141
|
-
for (; h(r, a) ||
|
|
142
|
-
n.push({ ...e, expectedDate: r }), r =
|
|
140
|
+
let r = D(o, 14);
|
|
141
|
+
for (; h(r, a) || X(r, a); )
|
|
142
|
+
n.push({ ...e, expectedDate: r }), r = D(r, 14);
|
|
143
143
|
for (r = o; h(r, a) && u(r, t); )
|
|
144
144
|
n.push({ ...e, expectedDate: r }), r = Q(r, 14);
|
|
145
145
|
}
|
|
146
146
|
return n;
|
|
147
|
-
},
|
|
147
|
+
}, me = (e, a, t) => {
|
|
148
148
|
const n = [];
|
|
149
149
|
let o = g(a, e.recurrenceDay);
|
|
150
150
|
for (; u(o, t); )
|
|
151
151
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
152
|
-
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) :
|
|
152
|
+
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) : q(a);
|
|
153
153
|
for (; u(r, t); )
|
|
154
154
|
n.push({ ...e, expectedDate: r }), r = f(r, 1);
|
|
155
155
|
return n;
|
|
156
|
-
},
|
|
156
|
+
}, le = (e, a, t) => {
|
|
157
157
|
const n = [];
|
|
158
158
|
let o = g(a, e.recurrenceDay);
|
|
159
159
|
for (n.push({ ...e, expectedDate: o }), o = f(o, 1); u(o, t); )
|
|
160
160
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
161
161
|
return n;
|
|
162
|
-
},
|
|
162
|
+
}, he = (e, a, t) => {
|
|
163
163
|
const n = [], o = e.expectedDate;
|
|
164
|
-
let r = u(o, t) ? o :
|
|
164
|
+
let r = u(o, t) ? o : Z(o, 2);
|
|
165
165
|
for (; u(r, t); )
|
|
166
166
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = f(r, 2);
|
|
167
167
|
return n;
|
|
168
|
-
},
|
|
168
|
+
}, fe = (e, a, t) => {
|
|
169
169
|
const n = [], o = e.expectedDate;
|
|
170
170
|
let r = u(o, t) ? o : N(o, 1);
|
|
171
171
|
for (; u(r, t); )
|
|
172
172
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 1);
|
|
173
173
|
return n;
|
|
174
|
-
},
|
|
174
|
+
}, pe = (e, a, t) => {
|
|
175
175
|
const n = [], o = e.expectedDate;
|
|
176
176
|
let r = u(o, t) ? o : N(o, 2);
|
|
177
177
|
for (; u(r, t); )
|
|
178
178
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 2);
|
|
179
179
|
return n;
|
|
180
|
-
},
|
|
180
|
+
}, ye = (e, a, t) => {
|
|
181
181
|
const n = [], o = e.expectedDate;
|
|
182
|
-
let r = u(o, t) ? o :
|
|
182
|
+
let r = u(o, t) ? o : T(o, 1);
|
|
183
183
|
for (; u(r, t); )
|
|
184
|
-
h(r, a) && n.push({ ...e, expectedDate: r }), r =
|
|
184
|
+
h(r, a) && n.push({ ...e, expectedDate: r }), r = K(r, 1);
|
|
185
185
|
return n;
|
|
186
|
-
},
|
|
186
|
+
}, et = (e, a) => {
|
|
187
187
|
const t = [];
|
|
188
188
|
for (const n of e) {
|
|
189
|
-
const o =
|
|
189
|
+
const o = ie(n, a);
|
|
190
190
|
t.push(...o);
|
|
191
191
|
}
|
|
192
192
|
return t.sort(
|
|
193
193
|
(n, o) => y(n.occurredOnDate || n.expectedDate) - y(o.occurredOnDate || o.expectedDate)
|
|
194
194
|
);
|
|
195
|
-
},
|
|
195
|
+
}, tt = (e, a, t) => {
|
|
196
196
|
const n = [];
|
|
197
197
|
for (const o of a) {
|
|
198
198
|
const r = t.filter(
|
|
@@ -205,8 +205,8 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
return n;
|
|
208
|
-
},
|
|
209
|
-
const n =
|
|
208
|
+
}, rt = (e) => e.reduce((a, t) => {
|
|
209
|
+
const n = H(t.expectedDate, { representation: "date" }), o = a.find(
|
|
210
210
|
(r) => r.date.toString() === t.expectedDate.toString()
|
|
211
211
|
);
|
|
212
212
|
return o ? o.recurrences.push(t) : a.push({
|
|
@@ -214,8 +214,8 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
214
214
|
id: `date-${n}`,
|
|
215
215
|
recurrences: [t]
|
|
216
216
|
}), a;
|
|
217
|
-
}, []),
|
|
218
|
-
const n = E(b(), a.recurrence_day), o =
|
|
217
|
+
}, []), ot = (e, a, t) => {
|
|
218
|
+
const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day), c = a.second_recurrence_day ? W(a.second_recurrence_day) : "";
|
|
219
219
|
let i = t ? l(e.monthly_ordinal, r) : e.monthly;
|
|
220
220
|
switch (a.recurrence_type) {
|
|
221
221
|
case s.EveryQuarter:
|
|
@@ -250,43 +250,43 @@ const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
return i;
|
|
253
|
-
},
|
|
253
|
+
}, at = (e, a) => {
|
|
254
254
|
let t = a;
|
|
255
255
|
switch (e) {
|
|
256
256
|
case s.EveryWeek:
|
|
257
|
-
t =
|
|
257
|
+
t = ne(a);
|
|
258
258
|
break;
|
|
259
259
|
case s.EveryOtherWeek:
|
|
260
|
-
t =
|
|
260
|
+
t = ae(a);
|
|
261
261
|
break;
|
|
262
262
|
case s.EveryMonth:
|
|
263
|
-
t =
|
|
263
|
+
t = oe(a);
|
|
264
264
|
break;
|
|
265
265
|
case s.EveryOtherMonth:
|
|
266
|
-
t =
|
|
266
|
+
t = re(a);
|
|
267
267
|
break;
|
|
268
268
|
case s.EveryQuarter:
|
|
269
|
-
t =
|
|
269
|
+
t = te(a);
|
|
270
270
|
break;
|
|
271
271
|
case s.EveryOtherQuarter:
|
|
272
|
-
t =
|
|
272
|
+
t = ee(a);
|
|
273
273
|
break;
|
|
274
274
|
case s.EveryYear:
|
|
275
|
-
t =
|
|
275
|
+
t = R(a);
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
278
278
|
return t;
|
|
279
279
|
};
|
|
280
280
|
export {
|
|
281
|
-
|
|
281
|
+
Fe as D,
|
|
282
282
|
s as F,
|
|
283
283
|
Y as R,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
284
|
+
Re as S,
|
|
285
|
+
p as a,
|
|
286
|
+
et as b,
|
|
287
|
+
O as c,
|
|
288
|
+
tt as d,
|
|
289
|
+
at as e,
|
|
290
|
+
rt as f,
|
|
291
|
+
ot as g
|
|
292
292
|
};
|