@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug
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 +18 -0
- package/dist/Account-BiB1F8lL.mjs +118 -0
- package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
- package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
- package/dist/AccountStore-BbPWe2C9.mjs +244 -0
- package/dist/Accounts-M-LTzStv.mjs +27 -0
- package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
- package/dist/CategoryUtil-meuejJqP.mjs +80 -0
- package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
- package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
- package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
- package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
- package/dist/GoalStore-B4LVt_kH.mjs +422 -0
- package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
- package/dist/NetWorthStore-yV43kJro.mjs +168 -0
- package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
- package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
- package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
- package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
- package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
- package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
- package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
- package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
- package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
- package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
- package/dist/accounts/index.es.js +421 -391
- package/dist/accounts/stores/AccountStore.d.ts +30 -23
- package/dist/accounts/utils/Accounts.d.ts +2 -1
- package/dist/budgets/index.es.js +546 -540
- package/dist/budgets/store/BudgetsStore.d.ts +1 -0
- package/dist/cashflow/index.es.js +444 -457
- package/dist/categories/index.es.js +1 -1
- package/dist/categories/stores/CategoryStore.d.ts +10 -5
- package/dist/categories/util/CategoryUtil.d.ts +3 -2
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +459 -445
- package/dist/common/stores/AppDataStore.d.ts +3 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +10 -6
- package/dist/common/stores/UserStore.d.ts +3 -2
- package/dist/common/types/Account.d.ts +9 -6
- package/dist/dashboard/index.es.js +84 -116
- package/dist/debts/index.es.js +417 -413
- package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
- package/dist/finstrong/index.es.js +1167 -1110
- package/dist/goals/index.es.js +618 -598
- package/dist/goals/stores/GoalStore.d.ts +19 -4
- package/dist/help/index.es.js +13 -13
- package/dist/investments/index.es.js +330 -325
- package/dist/investments/stores/HoldingStore.d.ts +1 -0
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +423 -433
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +90 -91
- package/dist/notifications/stores/NotificationStore.d.ts +3 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +543 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
- package/dist/settings/index.es.js +253 -248
- package/dist/spending/index.es.js +282 -301
- package/dist/transactions/index.es.js +269 -263
- package/dist/transactions/stores/TransactionStore.d.ts +26 -77
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +708 -699
- package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
- package/package.json +3 -3
- package/dist/AccountStore-CWFzg8-E.mjs +0 -260
- package/dist/Accounts-CWt-NRq8.mjs +0 -9
- package/dist/CategoryUtil-DZflYFam.mjs +0 -78
- package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
- package/dist/GoalStore-C7ahxxLi.mjs +0 -364
- package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
- package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
- package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { endOfMonth as
|
|
5
|
-
import { endOfToday as
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import { observer as C } from "mobx-react-lite";
|
|
4
|
+
import { endOfMonth as W } from "date-fns/endOfMonth";
|
|
5
|
+
import { endOfToday as Z } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as G } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as J } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as Q } from "date-fns/subDays";
|
|
9
|
+
import { R as Te } from "../RecurringSettings-Bmnnpb48.mjs";
|
|
10
|
+
import { M as vn } from "../RecurringSettings-Bmnnpb48.mjs";
|
|
11
|
+
import { addMonths as We } from "date-fns/addMonths";
|
|
12
|
+
import { subMonths as $e } from "date-fns/subMonths";
|
|
13
|
+
import { isBefore as Be } from "date-fns/isBefore";
|
|
14
|
+
import V from "@mui/material/Unstable_Grid2";
|
|
15
|
+
import ge from "@mui/material/IconButton";
|
|
10
16
|
import l from "@mui/material/Stack";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
|
|
53
|
-
import { u as be } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
54
|
-
import { L as V } from "../Loader-DUaFpDGv.mjs";
|
|
55
|
-
import { M as gt } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
56
|
-
import { u as ht } from "../useDimensions-27p2evRx.mjs";
|
|
57
|
-
import { M as ft } from "../MicroWidgetContainer-B2hO9rOG.mjs";
|
|
58
|
-
const Q = {
|
|
17
|
+
import he from "@mui/material/Tab";
|
|
18
|
+
import Pe from "@mui/material/Tabs";
|
|
19
|
+
import { Schedule as He, MonetizationOn as ze, Cancel as De, CheckCircle as we, ChevronLeft as Fe, ChevronRight as Ue, CurrencyExchange as je } from "@mxenabled/mx-icons";
|
|
20
|
+
import { Text as h, MerchantLogo as ee, InstitutionLogo as Ke, H3 as Ye, P as X } from "@mxenabled/mxui";
|
|
21
|
+
import { getWeeksInMonth as fe } from "date-fns/getWeeksInMonth";
|
|
22
|
+
import te from "@mui/material/styles/useTheme";
|
|
23
|
+
import { AdapterDateFns as Ve } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
24
|
+
import { DateCalendar as Xe } from "@mui/x-date-pickers/DateCalendar";
|
|
25
|
+
import { LocalizationProvider as qe } from "@mui/x-date-pickers/LocalizationProvider";
|
|
26
|
+
import { isSameDay as Ze } from "date-fns/isSameDay";
|
|
27
|
+
import Je from "@mui/material/Badge";
|
|
28
|
+
import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
|
|
29
|
+
import { I as P } from "../IconBacking-B9oC6uL2.mjs";
|
|
30
|
+
import { u as R, b as H, j as _, g as z, p as _e, h as ne } from "../hooks-ZMp65DFz.mjs";
|
|
31
|
+
import { d as I, c as T, g as xe, f as et } from "../RepeatingTransaction-miZVnk_A.mjs";
|
|
32
|
+
import { T as O } from "../RecurringTransactionsStore-BQBEJOPP.mjs";
|
|
33
|
+
import { R as An } from "../RecurringTransactionsStore-BQBEJOPP.mjs";
|
|
34
|
+
import { A as S, W as tt } from "../WidgetContainer-BbPS3Yxz.mjs";
|
|
35
|
+
import nt from "@mui/material/Button";
|
|
36
|
+
import q from "@mui/material/Divider";
|
|
37
|
+
import be from "@mui/material/List";
|
|
38
|
+
import Se from "@mui/material/ListItem";
|
|
39
|
+
import it from "@mui/material/ListSubheader";
|
|
40
|
+
import rt from "@mui/material/ListItemAvatar";
|
|
41
|
+
import ot from "@mui/material/ListItemButton";
|
|
42
|
+
import at from "@mui/material/ListItemText";
|
|
43
|
+
import { b as st } from "../ManageIncome-CL3hv8i9.mjs";
|
|
44
|
+
import { c as Nn, M as Gn, S as On } from "../ManageIncome-CL3hv8i9.mjs";
|
|
45
|
+
import { f as M } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
46
|
+
import { D as ie } from "../Drawer-DV4NTsFg.mjs";
|
|
47
|
+
import { b as E } from "../Localization-2MODESHW.mjs";
|
|
48
|
+
import { f as v, D as L } from "../Dialog-B4PI-_bL.mjs";
|
|
49
|
+
import N from "@mui/material/Box";
|
|
50
|
+
import { S as Ie } from "../StatusBar-BK_uYHAB.mjs";
|
|
51
|
+
import { u as re } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
52
|
+
import { S as Me } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
53
|
+
import { u as oe } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
54
|
+
import { L as ae } from "../Loader-DUaFpDGv.mjs";
|
|
55
|
+
import { M as ct } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
56
|
+
import { u as lt } from "../useDimensions-27p2evRx.mjs";
|
|
57
|
+
import { M as dt } from "../MicroWidgetContainer-B2hO9rOG.mjs";
|
|
58
|
+
const F = {
|
|
59
59
|
gridRow: 1,
|
|
60
60
|
gridColumn: 1,
|
|
61
61
|
zIndex: 2
|
|
62
|
-
},
|
|
63
|
-
|
|
62
|
+
}, U = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(P, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(He, { color: "primary", filled: !0, sx: { fontSize: n, ...F } }) }), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(P, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(
|
|
63
|
+
ze,
|
|
64
64
|
{
|
|
65
65
|
filled: !0,
|
|
66
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
66
|
+
sx: { color: "categories.income", fontSize: n, ...F }
|
|
67
67
|
}
|
|
68
|
-
) }),
|
|
68
|
+
) }), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(P, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(De, { color: "error", filled: !0, sx: { fontSize: n, ...F } }) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(P, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...F } }) }), ut = C(
|
|
69
69
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
70
|
-
const { recurring:
|
|
71
|
-
() => c.filter((
|
|
72
|
-
[
|
|
70
|
+
const { recurring: o } = R(), { selectedAccountGuids: r } = H(), { recurrences: c, setSelectedDay: u } = _(), s = x.useMemo(
|
|
71
|
+
() => c.filter((f) => r.includes(f.accountGuid)),
|
|
72
|
+
[r, c]
|
|
73
73
|
).filter(
|
|
74
|
-
(
|
|
74
|
+
(f) => Ze(f.occurredOnDate || f.expectedDate, t)
|
|
75
|
+
), d = s.some(
|
|
76
|
+
(f) => f.type !== I.Income && f.status === T.Upcoming
|
|
75
77
|
), m = s.some(
|
|
76
|
-
(
|
|
77
|
-
),
|
|
78
|
-
(
|
|
79
|
-
),
|
|
80
|
-
(d) => d.type !== v.Income && d.status === D.Paid
|
|
81
|
-
), b = s.some((d) => d.type === v.Income), y = (m ? 1 : 0) + (u ? 1 : 0) + (x ? 1 : 0) + (b ? 1 : 0);
|
|
78
|
+
(f) => f.type !== I.Income && f.status === T.Missed
|
|
79
|
+
), g = s.some(
|
|
80
|
+
(f) => f.type !== I.Income && f.status === T.Paid
|
|
81
|
+
), b = s.some((f) => f.type === I.Income), y = (d ? 1 : 0) + (m ? 1 : 0) + (g ? 1 : 0) + (b ? 1 : 0);
|
|
82
82
|
return /* @__PURE__ */ e(
|
|
83
|
-
|
|
83
|
+
Je,
|
|
84
84
|
{
|
|
85
|
-
badgeContent: s.length > 0 && /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
b && /* @__PURE__ */ e(
|
|
85
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ a(B, { children: [
|
|
86
|
+
m && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
87
|
+
g && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
88
|
+
d && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
89
|
+
b && /* @__PURE__ */ e(ce, { isOffset: !0 })
|
|
90
90
|
] }),
|
|
91
91
|
overlap: "circular",
|
|
92
92
|
sx: {
|
|
@@ -97,15 +97,15 @@ const Q = {
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
children: /* @__PURE__ */ e(
|
|
100
|
-
|
|
100
|
+
Qe,
|
|
101
101
|
{
|
|
102
102
|
"aria-label": `
|
|
103
|
-
${
|
|
104
|
-
${
|
|
105
|
-
${
|
|
106
|
-
${b &&
|
|
103
|
+
${g && o.paid},
|
|
104
|
+
${m && o.missed},
|
|
105
|
+
${d && o.upcoming},
|
|
106
|
+
${b && o.income}`,
|
|
107
107
|
day: t,
|
|
108
|
-
onClick: () =>
|
|
108
|
+
onClick: () => u(t),
|
|
109
109
|
outsideCurrentMonth: n,
|
|
110
110
|
sx: {
|
|
111
111
|
"&.MuiPickersDay-root": {
|
|
@@ -120,12 +120,12 @@ const Q = {
|
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
|
-
),
|
|
123
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ a(l, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
124
124
|
/* @__PURE__ */ e(t, {}),
|
|
125
|
-
/* @__PURE__ */ e(
|
|
126
|
-
] }),
|
|
127
|
-
const { recurring: t } =
|
|
128
|
-
return /* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ e(h, { variant: "XSmall", children: n })
|
|
126
|
+
] }), mt = C(() => {
|
|
127
|
+
const { recurring: t } = R();
|
|
128
|
+
return /* @__PURE__ */ a(
|
|
129
129
|
l,
|
|
130
130
|
{
|
|
131
131
|
alignItems: "center",
|
|
@@ -135,35 +135,35 @@ const Q = {
|
|
|
135
135
|
justifyContent: "center",
|
|
136
136
|
mt: 12,
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
/* @__PURE__ */ e(
|
|
141
|
-
/* @__PURE__ */ e(
|
|
138
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
139
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
140
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
141
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
|
-
}),
|
|
146
|
-
const t =
|
|
147
|
-
|
|
148
|
-
),
|
|
149
|
-
c(
|
|
150
|
-
start:
|
|
151
|
-
end:
|
|
152
|
-
}),
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
145
|
+
}), ye = 58, ve = C(() => {
|
|
146
|
+
const t = te(), { onEvent: n } = z(), { selectedDay: i, setDateRange: o } = _(), [r, c] = x.useState(
|
|
147
|
+
fe(/* @__PURE__ */ new Date()) * O + ye
|
|
148
|
+
), u = (m) => {
|
|
149
|
+
c(fe(m) * O + ye), o({
|
|
150
|
+
start: G(m),
|
|
151
|
+
end: W(m)
|
|
152
|
+
}), p(m), n(S.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
153
|
+
}, p = (m) => {
|
|
154
|
+
m && requestAnimationFrame(() => {
|
|
155
|
+
const g = document.getElementById("recurrence-list");
|
|
156
|
+
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
157
157
|
});
|
|
158
158
|
}, s = /* @__PURE__ */ e(
|
|
159
|
-
|
|
159
|
+
Xe,
|
|
160
160
|
{
|
|
161
|
-
minDate:
|
|
162
|
-
onChange:
|
|
163
|
-
onMonthChange:
|
|
161
|
+
minDate: G(/* @__PURE__ */ new Date()),
|
|
162
|
+
onChange: p,
|
|
163
|
+
onMonthChange: u,
|
|
164
164
|
showDaysOutsideCurrentMonth: !0,
|
|
165
165
|
slots: {
|
|
166
|
-
day:
|
|
166
|
+
day: ut
|
|
167
167
|
},
|
|
168
168
|
sx: {
|
|
169
169
|
"& .MuiPickersArrowSwitcher-button": {
|
|
@@ -189,14 +189,14 @@ const Q = {
|
|
|
189
189
|
fontWeight: 600
|
|
190
190
|
},
|
|
191
191
|
"& .MuiDayCalendar-slideTransition": {
|
|
192
|
-
minHeight:
|
|
192
|
+
minHeight: r
|
|
193
193
|
},
|
|
194
194
|
"&.MuiDateCalendar-root": {
|
|
195
|
-
minHeight:
|
|
195
|
+
minHeight: r + O
|
|
196
196
|
},
|
|
197
197
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
198
|
-
height:
|
|
199
|
-
width:
|
|
198
|
+
height: O,
|
|
199
|
+
width: O,
|
|
200
200
|
margin: 0
|
|
201
201
|
},
|
|
202
202
|
"& .MuiDayCalendar-weekDayLabel": {
|
|
@@ -208,7 +208,7 @@ const Q = {
|
|
|
208
208
|
views: ["day"]
|
|
209
209
|
}
|
|
210
210
|
);
|
|
211
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ a(
|
|
212
212
|
l,
|
|
213
213
|
{
|
|
214
214
|
"aria-describedby": "calendar-description",
|
|
@@ -233,102 +233,102 @@ const Q = {
|
|
|
233
233
|
children: "Calendar filter for recurring transactions list. Filter by month or select specific date."
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ a(qe, { dateAdapter: Ve, children: [
|
|
237
237
|
i && s,
|
|
238
238
|
!i && s,
|
|
239
|
-
/* @__PURE__ */ e(
|
|
239
|
+
/* @__PURE__ */ e(mt, {})
|
|
240
240
|
] })
|
|
241
241
|
]
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
|
-
}),
|
|
245
|
-
if (t.type ===
|
|
246
|
-
return /* @__PURE__ */ e(
|
|
244
|
+
}), pt = (t) => {
|
|
245
|
+
if (t.type === I.Income)
|
|
246
|
+
return /* @__PURE__ */ e(ce, {});
|
|
247
247
|
switch (t.status) {
|
|
248
|
-
case
|
|
249
|
-
return /* @__PURE__ */ e(
|
|
250
|
-
case
|
|
251
|
-
return /* @__PURE__ */ e(
|
|
248
|
+
case T.Missed:
|
|
249
|
+
return /* @__PURE__ */ e(le, {});
|
|
250
|
+
case T.Paid:
|
|
251
|
+
return /* @__PURE__ */ e(de, {});
|
|
252
252
|
default:
|
|
253
|
-
return /* @__PURE__ */ e(
|
|
253
|
+
return /* @__PURE__ */ e(se, {});
|
|
254
254
|
}
|
|
255
|
-
},
|
|
255
|
+
}, gt = (t, n) => {
|
|
256
256
|
switch (t.status) {
|
|
257
|
-
case
|
|
258
|
-
return t.expectedDate ?
|
|
257
|
+
case T.Paid:
|
|
258
|
+
return t.expectedDate ? E(
|
|
259
259
|
n.paid_on,
|
|
260
|
-
|
|
260
|
+
v(
|
|
261
261
|
t.occurredOnDate || t.expectedDate,
|
|
262
|
-
|
|
262
|
+
L.MONTH_DAY
|
|
263
263
|
)
|
|
264
264
|
) : n.paid;
|
|
265
|
-
case
|
|
266
|
-
return
|
|
265
|
+
case T.Missed:
|
|
266
|
+
return E(
|
|
267
267
|
n.missed_on,
|
|
268
|
-
|
|
268
|
+
v(t.expectedDate, L.MONTH_DAY)
|
|
269
269
|
);
|
|
270
|
-
case
|
|
271
|
-
return
|
|
270
|
+
case T.Upcoming:
|
|
271
|
+
return E(
|
|
272
272
|
n.upcoming_on,
|
|
273
|
-
|
|
273
|
+
v(t.expectedDate, L.MONTH_DAY)
|
|
274
274
|
);
|
|
275
275
|
default:
|
|
276
276
|
return n.unknown;
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, Ce = ({
|
|
279
279
|
recurrence: t,
|
|
280
280
|
isMini: n = !1,
|
|
281
281
|
onRecurrenceClick: i = () => {
|
|
282
282
|
},
|
|
283
|
-
showOrdinal:
|
|
283
|
+
showOrdinal: o = !1
|
|
284
284
|
}) => {
|
|
285
|
-
const { recurring:
|
|
286
|
-
() => c.find((
|
|
285
|
+
const { recurring: r } = R(), { detailedRepeatingTransactions: c } = _(), [u, p] = x.useState(!1), s = x.useMemo(
|
|
286
|
+
() => c.find((A) => A.guid === t.repeatingTransactionGuid),
|
|
287
287
|
[t, c]
|
|
288
|
-
),
|
|
289
|
-
let y =
|
|
290
|
-
return
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
|
|
288
|
+
), d = t.type === I.Income, m = t.status === T.Paid, g = t.status === T.Missed, b = t.status === T.Upcoming;
|
|
289
|
+
let y = r.paid?.toLowerCase();
|
|
290
|
+
return g ? y = r.missed?.toLowerCase() : b && (y = o ? xe(r, s || {}, !0) : xe(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
291
|
+
/* @__PURE__ */ a(Se, { disableGutters: !0, disablePadding: !0, children: [
|
|
292
|
+
/* @__PURE__ */ a(ot, { onClick: () => {
|
|
293
|
+
p(!0), i(t);
|
|
294
294
|
}, children: [
|
|
295
|
-
/* @__PURE__ */ e(
|
|
296
|
-
|
|
295
|
+
/* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(
|
|
296
|
+
ee,
|
|
297
297
|
{
|
|
298
298
|
categoryGuid: t.categoryGuid,
|
|
299
299
|
merchantGuid: t.merchantGuid
|
|
300
300
|
}
|
|
301
301
|
) }),
|
|
302
|
-
/* @__PURE__ */ e(
|
|
302
|
+
/* @__PURE__ */ e(at, { children: /* @__PURE__ */ a(
|
|
303
303
|
l,
|
|
304
304
|
{
|
|
305
305
|
direction: "row",
|
|
306
306
|
gap: 4,
|
|
307
307
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
308
308
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */ e(
|
|
311
|
-
/* @__PURE__ */ e(l, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */
|
|
312
|
-
|
|
313
|
-
/* @__PURE__ */ e(
|
|
314
|
-
] }) : /* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ a(l, { direction: "column", width: "50%", children: [
|
|
310
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
311
|
+
/* @__PURE__ */ e(l, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(l, { direction: "row", gap: 4, children: [
|
|
312
|
+
pt(t),
|
|
313
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: gt(t, r) })
|
|
314
|
+
] }) : /* @__PURE__ */ a(B, { children: [
|
|
315
315
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
316
|
-
|
|
316
|
+
Ke,
|
|
317
317
|
{
|
|
318
318
|
alt: `${t.institutionName} institution logo`,
|
|
319
319
|
institutionGuid: t.institutionGuid,
|
|
320
320
|
size: 12
|
|
321
321
|
}
|
|
322
322
|
),
|
|
323
|
-
/* @__PURE__ */ e(
|
|
323
|
+
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
324
324
|
] }) })
|
|
325
325
|
] }),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
|
|
329
|
-
|
|
326
|
+
/* @__PURE__ */ a(l, { alignItems: "flex-end", width: "100%", children: [
|
|
327
|
+
/* @__PURE__ */ a(h, { bold: !0, color: d ? "success.main" : "text.primary", variant: "body1", children: [
|
|
328
|
+
d ? "+" : "",
|
|
329
|
+
M(t.amount, "0,0.00")
|
|
330
330
|
] }),
|
|
331
|
-
!n && /* @__PURE__ */
|
|
331
|
+
!n && /* @__PURE__ */ a(
|
|
332
332
|
l,
|
|
333
333
|
{
|
|
334
334
|
direction: "row",
|
|
@@ -340,9 +340,9 @@ const Q = {
|
|
|
340
340
|
width: "100%"
|
|
341
341
|
},
|
|
342
342
|
children: [
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
/* @__PURE__ */ e(
|
|
343
|
+
m && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
344
|
+
g && /* @__PURE__ */ e(De, { color: "error", filled: !0, size: 12 }),
|
|
345
|
+
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
346
346
|
]
|
|
347
347
|
}
|
|
348
348
|
)
|
|
@@ -352,34 +352,34 @@ const Q = {
|
|
|
352
352
|
) })
|
|
353
353
|
] }),
|
|
354
354
|
/* @__PURE__ */ e(
|
|
355
|
-
|
|
355
|
+
ie,
|
|
356
356
|
{
|
|
357
|
-
ariaLabelClose:
|
|
358
|
-
isOpen:
|
|
359
|
-
onClose: () =>
|
|
360
|
-
title: t.type ===
|
|
357
|
+
ariaLabelClose: r.close_drawer_aria,
|
|
358
|
+
isOpen: u,
|
|
359
|
+
onClose: () => p(!1),
|
|
360
|
+
title: t.type === I.Income ? r.income_details : r.expense_details,
|
|
361
361
|
children: s && /* @__PURE__ */ e(
|
|
362
|
-
|
|
362
|
+
st,
|
|
363
363
|
{
|
|
364
|
-
onDeleted: () =>
|
|
364
|
+
onDeleted: () => p(!1),
|
|
365
365
|
recurringTransaction: s
|
|
366
366
|
}
|
|
367
367
|
)
|
|
368
368
|
}
|
|
369
369
|
)
|
|
370
370
|
] });
|
|
371
|
-
},
|
|
371
|
+
}, k = C(
|
|
372
372
|
({
|
|
373
373
|
recurrences: t,
|
|
374
374
|
isMini: n = !1,
|
|
375
375
|
onResetClick: i,
|
|
376
|
-
onRecurrenceClick:
|
|
377
|
-
sx:
|
|
376
|
+
onRecurrenceClick: o,
|
|
377
|
+
sx: r = {},
|
|
378
378
|
title: c
|
|
379
379
|
}) => {
|
|
380
|
-
const { recurring:
|
|
381
|
-
return /* @__PURE__ */
|
|
382
|
-
c && /* @__PURE__ */
|
|
380
|
+
const { recurring: u } = R(), p = x.useMemo(() => et(t), [t]);
|
|
381
|
+
return /* @__PURE__ */ a(l, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...r }, "tab-index": -1, children: [
|
|
382
|
+
c && /* @__PURE__ */ a(
|
|
383
383
|
l,
|
|
384
384
|
{
|
|
385
385
|
sx: {
|
|
@@ -389,208 +389,208 @@ const Q = {
|
|
|
389
389
|
px: 24
|
|
390
390
|
},
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */ e(
|
|
393
|
-
i && /* @__PURE__ */ e(
|
|
392
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: c }),
|
|
393
|
+
i && /* @__PURE__ */ e(nt, { onClick: i, size: "small", variant: "text", children: u.reset })
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
),
|
|
397
|
-
t.length === 0 ? /* @__PURE__ */ e(
|
|
397
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(be, { children: n ? t.map((s, d) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
398
398
|
/* @__PURE__ */ e(
|
|
399
|
-
|
|
399
|
+
Ce,
|
|
400
400
|
{
|
|
401
401
|
isMini: n,
|
|
402
|
-
onRecurrenceClick:
|
|
402
|
+
onRecurrenceClick: o,
|
|
403
403
|
recurrence: s
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
/* @__PURE__ */ e(
|
|
407
|
-
] }, `recurrence-${
|
|
408
|
-
/* @__PURE__ */ e(
|
|
409
|
-
|
|
406
|
+
/* @__PURE__ */ e(q, { sx: { mx: 24 } })
|
|
407
|
+
] }, `recurrence-${d}`)) : p.map((s, d) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
408
|
+
/* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(
|
|
409
|
+
be,
|
|
410
410
|
{
|
|
411
|
-
subheader: /* @__PURE__ */ e(
|
|
411
|
+
subheader: /* @__PURE__ */ e(it, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: v(s.date, L.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
412
412
|
sx: { width: "100%" },
|
|
413
|
-
children: s.recurrences.map((
|
|
414
|
-
|
|
413
|
+
children: s.recurrences.map((m, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
414
|
+
Ce,
|
|
415
415
|
{
|
|
416
416
|
isMini: n,
|
|
417
|
-
onRecurrenceClick:
|
|
418
|
-
recurrence:
|
|
417
|
+
onRecurrenceClick: o,
|
|
418
|
+
recurrence: m
|
|
419
419
|
}
|
|
420
|
-
) }, `day-recurrence-${
|
|
420
|
+
) }, `day-recurrence-${g}`))
|
|
421
421
|
}
|
|
422
422
|
) }, s.id),
|
|
423
|
-
/* @__PURE__ */ e(
|
|
424
|
-
] }, `recurrence-${
|
|
423
|
+
/* @__PURE__ */ e(q, { sx: { mx: 24 } })
|
|
424
|
+
] }, `recurrence-${d}`)) })
|
|
425
425
|
] });
|
|
426
426
|
}
|
|
427
|
-
),
|
|
428
|
-
({ expected: t, isExpense: n = !0, missed: i, paid:
|
|
429
|
-
const
|
|
430
|
-
const
|
|
431
|
-
return i &&
|
|
432
|
-
}, [
|
|
433
|
-
return /* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */ e(
|
|
436
|
-
/* @__PURE__ */ e(
|
|
427
|
+
), Re = C(
|
|
428
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: o, title: r, total: c, upcoming: u }) => {
|
|
429
|
+
const p = te(), { isSmallMobile: s } = re(), { recurring: d } = R(), m = x.useMemo(() => {
|
|
430
|
+
const g = [{ color: p.palette.success.main, percentage: `${o / t}` }];
|
|
431
|
+
return i && g.push({ color: p.palette.error.main, percentage: `${i / t}` }), g;
|
|
432
|
+
}, [o, t, i]);
|
|
433
|
+
return /* @__PURE__ */ a(l, { children: [
|
|
434
|
+
/* @__PURE__ */ a(l, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
435
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${r} (${c})` }),
|
|
436
|
+
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${M(t, "0,0.00")}` })
|
|
437
437
|
] }),
|
|
438
|
-
/* @__PURE__ */ e(
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */ e(
|
|
441
|
-
!s && /* @__PURE__ */ e(
|
|
442
|
-
/* @__PURE__ */ e(
|
|
443
|
-
i !== void 0 && /* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */ e(
|
|
445
|
-
!s && /* @__PURE__ */ e(
|
|
446
|
-
/* @__PURE__ */ e(
|
|
438
|
+
/* @__PURE__ */ e(Ie, { data: m, height: 12 }),
|
|
439
|
+
/* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
440
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
441
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: M(o, "0,0.00") }),
|
|
442
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: d.paid?.toLowerCase() }),
|
|
443
|
+
i !== void 0 && /* @__PURE__ */ a(B, { children: [
|
|
444
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
445
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: M(i, "0,0.00") }),
|
|
446
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: d.missed?.toLowerCase() })
|
|
447
447
|
] }),
|
|
448
|
-
/* @__PURE__ */ e(
|
|
449
|
-
!s && /* @__PURE__ */ e(
|
|
450
|
-
/* @__PURE__ */ e(
|
|
448
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
449
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: M(u, "0,0.00") }),
|
|
450
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: d.upcoming })
|
|
451
451
|
] })
|
|
452
452
|
] });
|
|
453
453
|
}
|
|
454
|
-
),
|
|
455
|
-
const { recurring: t } =
|
|
456
|
-
currentMonthExpenses:
|
|
457
|
-
currentMonthIncome:
|
|
454
|
+
), ht = C(() => {
|
|
455
|
+
const { recurring: t } = R(), { availableWidth: n } = _e(), { isDesktop: i, isSmallMobile: o, isMobile: r } = re(n), { onEvent: c } = z(), {
|
|
456
|
+
currentMonthExpenses: u,
|
|
457
|
+
currentMonthIncome: p,
|
|
458
458
|
dateRange: s,
|
|
459
|
-
expenseTotal:
|
|
460
|
-
incomeTotal:
|
|
461
|
-
missedExpenseTotal:
|
|
459
|
+
expenseTotal: d,
|
|
460
|
+
incomeTotal: m,
|
|
461
|
+
missedExpenseTotal: g,
|
|
462
462
|
pastRecurrences: b,
|
|
463
463
|
paidExpenseTotal: y,
|
|
464
|
-
paidIncomeTotal:
|
|
465
|
-
selectedDay:
|
|
466
|
-
selectedDayRecurrences:
|
|
467
|
-
setDateRange:
|
|
468
|
-
upcomingExpenseTotal:
|
|
469
|
-
upcomingIncomeTotal:
|
|
470
|
-
upcomingRecurrences:
|
|
471
|
-
} =
|
|
472
|
-
|
|
473
|
-
},
|
|
474
|
-
c(
|
|
475
|
-
transaction_guid:
|
|
464
|
+
paidIncomeTotal: f,
|
|
465
|
+
selectedDay: A,
|
|
466
|
+
selectedDayRecurrences: j,
|
|
467
|
+
setDateRange: w,
|
|
468
|
+
upcomingExpenseTotal: K,
|
|
469
|
+
upcomingIncomeTotal: Le,
|
|
470
|
+
upcomingRecurrences: ue
|
|
471
|
+
} = _(), [Y, Ae] = x.useState(0), Ee = Be(s.start, /* @__PURE__ */ new Date()), Ne = (D, ke) => {
|
|
472
|
+
Ae(ke);
|
|
473
|
+
}, me = (D) => {
|
|
474
|
+
c(S.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
475
|
+
transaction_guid: D.transaction?.guid
|
|
476
476
|
});
|
|
477
|
-
},
|
|
478
|
-
c(
|
|
479
|
-
transaction_guid:
|
|
477
|
+
}, pe = (D) => {
|
|
478
|
+
c(S.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
479
|
+
transaction_guid: D.transaction?.guid
|
|
480
480
|
});
|
|
481
|
-
},
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
start:
|
|
485
|
-
end:
|
|
481
|
+
}, Ge = () => {
|
|
482
|
+
const D = We(s.start, 1);
|
|
483
|
+
w({
|
|
484
|
+
start: G(D),
|
|
485
|
+
end: W(D)
|
|
486
486
|
});
|
|
487
|
-
},
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
start:
|
|
491
|
-
end:
|
|
487
|
+
}, Oe = () => {
|
|
488
|
+
const D = $e(s.start, 1);
|
|
489
|
+
w({
|
|
490
|
+
start: G(D),
|
|
491
|
+
end: W(D)
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
|
-
return /* @__PURE__ */
|
|
495
|
-
|
|
494
|
+
return /* @__PURE__ */ a(
|
|
495
|
+
V,
|
|
496
496
|
{
|
|
497
497
|
container: !0,
|
|
498
498
|
sx: {
|
|
499
499
|
pt: 16
|
|
500
500
|
},
|
|
501
501
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
-
/* @__PURE__ */ e(
|
|
502
|
+
/* @__PURE__ */ a(V, { md: !0, sm: 12, width: "100%", children: [
|
|
503
|
+
/* @__PURE__ */ a(l, { sx: { gap: 16, px: i ? 48 : 24 }, children: [
|
|
504
|
+
/* @__PURE__ */ a(l, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
505
|
+
/* @__PURE__ */ e(Ye, { children: E(
|
|
506
506
|
t.header_title,
|
|
507
|
-
|
|
507
|
+
v(s.start, L.MONTH_LONG)
|
|
508
508
|
) }),
|
|
509
|
-
!i && /* @__PURE__ */
|
|
509
|
+
!i && /* @__PURE__ */ a(l, { direction: "row", gap: 4, children: [
|
|
510
510
|
/* @__PURE__ */ e(
|
|
511
|
-
|
|
511
|
+
ge,
|
|
512
512
|
{
|
|
513
513
|
color: "primary",
|
|
514
|
-
disabled:
|
|
515
|
-
onClick:
|
|
516
|
-
children: /* @__PURE__ */ e(
|
|
514
|
+
disabled: Ee,
|
|
515
|
+
onClick: Oe,
|
|
516
|
+
children: /* @__PURE__ */ e(Fe, {})
|
|
517
517
|
}
|
|
518
518
|
),
|
|
519
|
-
/* @__PURE__ */ e(
|
|
519
|
+
/* @__PURE__ */ e(ge, { color: "primary", onClick: Ge, children: /* @__PURE__ */ e(Ue, {}) })
|
|
520
520
|
] })
|
|
521
521
|
] }),
|
|
522
522
|
/* @__PURE__ */ e(
|
|
523
|
-
|
|
523
|
+
Re,
|
|
524
524
|
{
|
|
525
|
-
expected:
|
|
526
|
-
missed:
|
|
525
|
+
expected: d,
|
|
526
|
+
missed: g,
|
|
527
527
|
paid: y,
|
|
528
528
|
title: t.expenses,
|
|
529
|
-
total:
|
|
530
|
-
upcoming:
|
|
529
|
+
total: u.length,
|
|
530
|
+
upcoming: K
|
|
531
531
|
}
|
|
532
532
|
),
|
|
533
533
|
/* @__PURE__ */ e(
|
|
534
|
-
|
|
534
|
+
Re,
|
|
535
535
|
{
|
|
536
|
-
expected:
|
|
536
|
+
expected: m,
|
|
537
537
|
isExpense: !1,
|
|
538
|
-
paid:
|
|
538
|
+
paid: f,
|
|
539
539
|
title: t.deposits,
|
|
540
|
-
total:
|
|
541
|
-
upcoming:
|
|
540
|
+
total: p.length,
|
|
541
|
+
upcoming: Le
|
|
542
542
|
}
|
|
543
543
|
),
|
|
544
544
|
i && /* @__PURE__ */ e(
|
|
545
|
-
|
|
545
|
+
k,
|
|
546
546
|
{
|
|
547
|
-
onRecurrenceClick:
|
|
548
|
-
recurrences:
|
|
547
|
+
onRecurrenceClick: me,
|
|
548
|
+
recurrences: ue,
|
|
549
549
|
title: t.upcoming_activity
|
|
550
550
|
}
|
|
551
551
|
)
|
|
552
552
|
] }),
|
|
553
|
-
!i && /* @__PURE__ */
|
|
554
|
-
/* @__PURE__ */
|
|
553
|
+
!i && /* @__PURE__ */ a(l, { sx: { px: r ? 0 : 24 }, children: [
|
|
554
|
+
/* @__PURE__ */ a(Pe, { onChange: Ne, value: Y, variant: "fullWidth", children: [
|
|
555
555
|
/* @__PURE__ */ e(
|
|
556
|
-
|
|
556
|
+
he,
|
|
557
557
|
{
|
|
558
|
-
label: /* @__PURE__ */ e(
|
|
558
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.upcoming : t.upcoming_activity })
|
|
559
559
|
}
|
|
560
560
|
),
|
|
561
561
|
/* @__PURE__ */ e(
|
|
562
|
-
|
|
562
|
+
he,
|
|
563
563
|
{
|
|
564
|
-
label: /* @__PURE__ */ e(
|
|
564
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.past : t.past_transactions })
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
] }),
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
Y === 0 && /* @__PURE__ */ e(
|
|
569
|
+
k,
|
|
570
570
|
{
|
|
571
|
-
onRecurrenceClick:
|
|
572
|
-
recurrences:
|
|
571
|
+
onRecurrenceClick: me,
|
|
572
|
+
recurrences: ue
|
|
573
573
|
}
|
|
574
574
|
),
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
Y === 1 && /* @__PURE__ */ e(
|
|
576
|
+
k,
|
|
577
577
|
{
|
|
578
|
-
onRecurrenceClick:
|
|
578
|
+
onRecurrenceClick: pe,
|
|
579
579
|
recurrences: b
|
|
580
580
|
}
|
|
581
581
|
)
|
|
582
582
|
] })
|
|
583
583
|
] }),
|
|
584
|
-
i && /* @__PURE__ */ e(
|
|
585
|
-
/* @__PURE__ */ e(
|
|
584
|
+
i && /* @__PURE__ */ e(V, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ a(l, { gap: 24, children: [
|
|
585
|
+
/* @__PURE__ */ e(ve, {}),
|
|
586
586
|
/* @__PURE__ */ e(
|
|
587
|
-
|
|
587
|
+
k,
|
|
588
588
|
{
|
|
589
|
-
onRecurrenceClick:
|
|
590
|
-
recurrences:
|
|
591
|
-
title:
|
|
589
|
+
onRecurrenceClick: pe,
|
|
590
|
+
recurrences: j || b,
|
|
591
|
+
title: A ? E(
|
|
592
592
|
t.day_transactions,
|
|
593
|
-
A
|
|
593
|
+
v(A, L.MONTH_DAY)
|
|
594
594
|
) : t.past_transactions
|
|
595
595
|
}
|
|
596
596
|
)
|
|
@@ -598,359 +598,340 @@ const Q = {
|
|
|
598
598
|
]
|
|
599
599
|
}
|
|
600
600
|
);
|
|
601
|
-
}),
|
|
602
|
-
const {
|
|
603
|
-
return
|
|
601
|
+
}), Dn = C(({ onBackClick: t, sx: n = {} }) => {
|
|
602
|
+
const { recurring: i } = R(), { isInitialized: o, selectedAccountGuids: r } = H(), { isDataLoaded: c, loadRepeatingTransactionData: u, setDateRange: p } = _(), { setFilter: s } = ne(), { onEvent: d } = z(), { isMobile: m } = re(), [g, b] = x.useState(!1);
|
|
603
|
+
return oe({
|
|
604
604
|
widgetName: "RecurringTransactionsWidget",
|
|
605
|
-
isLoaded:
|
|
606
|
-
}),
|
|
607
|
-
|
|
608
|
-
}, [
|
|
609
|
-
|
|
610
|
-
dateRange: { start:
|
|
611
|
-
accounts:
|
|
612
|
-
}),
|
|
613
|
-
}, [
|
|
614
|
-
|
|
605
|
+
isLoaded: c
|
|
606
|
+
}), x.useEffect(() => {
|
|
607
|
+
c || u().finally();
|
|
608
|
+
}, []), x.useEffect(() => {
|
|
609
|
+
s({
|
|
610
|
+
dateRange: { start: Q(J(), 90), end: Z() },
|
|
611
|
+
accounts: r
|
|
612
|
+
}), p({ start: G(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) });
|
|
613
|
+
}, [r]), o ? /* @__PURE__ */ a(
|
|
614
|
+
tt,
|
|
615
615
|
{
|
|
616
|
-
accountOptions: i,
|
|
617
616
|
actions: [
|
|
618
617
|
{
|
|
619
|
-
label:
|
|
618
|
+
label: i.action_title,
|
|
620
619
|
iconName: "credit_card_gear",
|
|
621
620
|
onClick: () => {
|
|
622
|
-
|
|
621
|
+
b(!0), d(S.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
623
622
|
}
|
|
624
623
|
}
|
|
625
624
|
],
|
|
626
|
-
hasDivider:
|
|
627
|
-
onAccountsFilterClick: () =>
|
|
625
|
+
hasDivider: m,
|
|
626
|
+
onAccountsFilterClick: () => d(S.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
628
627
|
onBackClick: t,
|
|
629
628
|
sx: n,
|
|
630
|
-
title:
|
|
629
|
+
title: i.title,
|
|
631
630
|
children: [
|
|
632
|
-
c
|
|
633
|
-
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
634
|
-
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
635
|
-
/* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
|
|
636
|
-
] }),
|
|
631
|
+
c ? /* @__PURE__ */ e(ht, {}) : /* @__PURE__ */ e(Me, { sx: { m: 48 }, variant: "list" }),
|
|
637
632
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
633
|
+
ie,
|
|
639
634
|
{
|
|
640
|
-
ariaLabelClose:
|
|
641
|
-
isOpen:
|
|
642
|
-
onClose: () =>
|
|
635
|
+
ariaLabelClose: i.close_drawer_aria,
|
|
636
|
+
isOpen: g,
|
|
637
|
+
onClose: () => b(!1),
|
|
643
638
|
shouldShowHeaderBorders: !1,
|
|
644
|
-
title:
|
|
645
|
-
children: /* @__PURE__ */ e(
|
|
639
|
+
title: i.action_title,
|
|
640
|
+
children: /* @__PURE__ */ e(Te, {})
|
|
646
641
|
}
|
|
647
642
|
)
|
|
648
643
|
]
|
|
649
644
|
}
|
|
650
|
-
) : /* @__PURE__ */ e(
|
|
651
|
-
}),
|
|
652
|
-
const { recurring: t } =
|
|
653
|
-
return /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */ e(
|
|
655
|
-
!
|
|
645
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
646
|
+
}), ft = C(() => {
|
|
647
|
+
const { recurring: t } = R(), { availableWidth: n } = _e(), { selectedDay: i, selectedDayRecurrences: o, setSelectedDay: r, upcomingRecurrences: c } = _(), u = n < 750;
|
|
648
|
+
return /* @__PURE__ */ a(l, { flexDirection: u ? "column" : "row", width: "100%", children: [
|
|
649
|
+
/* @__PURE__ */ e(ve, {}),
|
|
650
|
+
!u && /* @__PURE__ */ e(q, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
656
651
|
/* @__PURE__ */ e(
|
|
657
|
-
|
|
652
|
+
k,
|
|
658
653
|
{
|
|
659
654
|
isMini: !0,
|
|
660
|
-
onResetClick: i ? () =>
|
|
661
|
-
recurrences:
|
|
662
|
-
sx: { width:
|
|
663
|
-
title: i ?
|
|
655
|
+
onResetClick: i ? () => r(i) : void 0,
|
|
656
|
+
recurrences: o || c.slice(0, 5),
|
|
657
|
+
sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
658
|
+
title: i ? E(
|
|
664
659
|
t.day_transactions,
|
|
665
|
-
|
|
660
|
+
v(i, L.MONTH_DAY)
|
|
666
661
|
) : t.upcoming_activity
|
|
667
662
|
}
|
|
668
663
|
)
|
|
669
664
|
] });
|
|
670
|
-
}),
|
|
665
|
+
}), wn = C(
|
|
671
666
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
672
|
-
const {
|
|
673
|
-
return
|
|
667
|
+
const { recurring: i } = R(), { setFilter: o } = ne(), { isDataLoaded: r, loadRepeatingTransactionData: c } = _(), { isInitialized: u, selectedAccountGuids: p } = H();
|
|
668
|
+
return oe({
|
|
674
669
|
widgetName: "RecurringTransactionsMiniWidget",
|
|
675
|
-
isLoaded:
|
|
676
|
-
}),
|
|
677
|
-
|
|
678
|
-
}, [
|
|
679
|
-
|
|
680
|
-
dateRange: { start:
|
|
681
|
-
accounts:
|
|
682
|
-
})
|
|
683
|
-
}, [
|
|
684
|
-
|
|
670
|
+
isLoaded: r
|
|
671
|
+
}), x.useEffect(() => {
|
|
672
|
+
r || c().finally();
|
|
673
|
+
}, []), x.useEffect(() => {
|
|
674
|
+
p.length > 0 && o({
|
|
675
|
+
dateRange: { start: Q(J(), 90), end: Z() },
|
|
676
|
+
accounts: p
|
|
677
|
+
});
|
|
678
|
+
}, [p]), u ? /* @__PURE__ */ e(
|
|
679
|
+
ct,
|
|
685
680
|
{
|
|
686
681
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
687
682
|
onPrimaryCtaClick: t,
|
|
688
|
-
primaryCtaLabel:
|
|
689
|
-
subTitle:
|
|
683
|
+
primaryCtaLabel: i.primary_cta,
|
|
684
|
+
subTitle: i.sub_title,
|
|
690
685
|
sx: n,
|
|
691
|
-
title:
|
|
692
|
-
children:
|
|
686
|
+
title: i.mini_title,
|
|
687
|
+
children: r ? /* @__PURE__ */ e(ft, {}) : /* @__PURE__ */ e(Me, { sx: { mx: 16 }, variant: "list" })
|
|
693
688
|
}
|
|
694
|
-
);
|
|
689
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
695
690
|
}
|
|
696
|
-
),
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
|
|
691
|
+
), xt = C(() => {
|
|
692
|
+
const { recurring: t } = R();
|
|
693
|
+
return /* @__PURE__ */ a(l, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
694
|
+
/* @__PURE__ */ e(je, { size: 32 }),
|
|
695
|
+
/* @__PURE__ */ a(l, { children: [
|
|
696
|
+
/* @__PURE__ */ e(X, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
697
|
+
/* @__PURE__ */ e(X, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
698
|
+
] })
|
|
699
|
+
] });
|
|
700
|
+
}), bt = ({
|
|
701
|
+
amount: t,
|
|
702
|
+
bgcolor: n,
|
|
703
|
+
isLargeScreen: i,
|
|
704
|
+
isSmallScreen: o,
|
|
705
|
+
label: r
|
|
706
|
+
}) => /* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
707
|
+
/* @__PURE__ */ e(
|
|
708
|
+
N,
|
|
709
|
+
{
|
|
710
|
+
sx: {
|
|
711
|
+
borderRadius: "2px",
|
|
712
|
+
bgcolor: n,
|
|
713
|
+
height: 8,
|
|
714
|
+
width: 8
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
/* @__PURE__ */ a(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
719
|
+
!o && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: M(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
720
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: r })
|
|
721
|
+
] })
|
|
722
|
+
] }), yt = ({
|
|
707
723
|
upcomingRecurrences: t,
|
|
708
724
|
logoSize: n = 32,
|
|
709
725
|
maxLogos: i = 3
|
|
710
726
|
}) => {
|
|
711
|
-
const
|
|
727
|
+
const o = (r) => r * (n / 2);
|
|
712
728
|
return /* @__PURE__ */ e(
|
|
713
|
-
|
|
729
|
+
N,
|
|
714
730
|
{
|
|
715
731
|
sx: {
|
|
716
732
|
position: "relative",
|
|
717
733
|
width: 64
|
|
718
734
|
},
|
|
719
|
-
children: t.map((
|
|
720
|
-
|
|
735
|
+
children: t.map((r, c) => c < i ? /* @__PURE__ */ e(
|
|
736
|
+
N,
|
|
721
737
|
{
|
|
722
738
|
sx: {
|
|
723
739
|
borderRadius: "4px",
|
|
724
|
-
left:
|
|
740
|
+
left: o(c),
|
|
725
741
|
outlineColor: "common.white",
|
|
726
742
|
outlineStyle: "solid",
|
|
727
743
|
outlineWidth: 2,
|
|
728
744
|
position: "absolute"
|
|
729
745
|
},
|
|
730
746
|
children: /* @__PURE__ */ e(
|
|
731
|
-
|
|
747
|
+
ee,
|
|
732
748
|
{
|
|
733
|
-
categoryGuid:
|
|
734
|
-
merchantGuid:
|
|
749
|
+
categoryGuid: r.categoryGuid || "",
|
|
750
|
+
merchantGuid: r.merchantGuid || "",
|
|
735
751
|
size: n
|
|
736
752
|
}
|
|
737
753
|
)
|
|
738
754
|
},
|
|
739
|
-
`${
|
|
755
|
+
`${r.categoryGuid}-${r.merchantGuid}-${c}`
|
|
740
756
|
) : null)
|
|
741
757
|
}
|
|
742
758
|
);
|
|
743
|
-
},
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
759
|
+
}, Ct = ({
|
|
760
|
+
upcomingRecurrences: t,
|
|
761
|
+
maxLogos: n = 3
|
|
762
|
+
}) => /* @__PURE__ */ e(l, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, o) => /* @__PURE__ */ e(
|
|
763
|
+
ee,
|
|
764
|
+
{
|
|
765
|
+
categoryGuid: i.categoryGuid || "",
|
|
766
|
+
merchantGuid: i.merchantGuid || ""
|
|
767
|
+
},
|
|
768
|
+
`${i.categoryGuid}-${i.merchantGuid}-${o}`
|
|
769
|
+
)) }), Rt = C(() => {
|
|
770
|
+
const t = te(), [n, { width: i }] = lt(), {
|
|
771
|
+
upcomingRecurrences: o,
|
|
772
|
+
expenseTotal: r,
|
|
773
|
+
missedExpenseTotal: c,
|
|
774
|
+
paidExpenseTotal: u,
|
|
775
|
+
upcomingExpenseTotal: p
|
|
776
|
+
} = _(), { recurring: s } = R(), d = i <= 288, m = i >= 450, g = 32, b = o.length > 0, y = x.useMemo(() => M(r, r === 0 ? "0,0" : "0,0.00"), [r]), f = x.useMemo(() => {
|
|
777
|
+
const w = [
|
|
778
|
+
{ color: t.palette.success.main, percentage: `${u / r}` }
|
|
779
|
+
];
|
|
780
|
+
return c && w.push({
|
|
781
|
+
color: t.palette.error.main,
|
|
782
|
+
percentage: `${c / r}`
|
|
783
|
+
}), w;
|
|
784
|
+
}, [
|
|
785
|
+
u,
|
|
786
|
+
r,
|
|
787
|
+
c,
|
|
788
|
+
t.palette.success.main,
|
|
789
|
+
t.palette.error.main
|
|
790
|
+
]), A = () => b ? d ? /* @__PURE__ */ e(
|
|
791
|
+
yt,
|
|
752
792
|
{
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
height: 8,
|
|
757
|
-
width: 8
|
|
758
|
-
}
|
|
793
|
+
logoSize: g,
|
|
794
|
+
maxLogos: 3,
|
|
795
|
+
upcomingRecurrences: o.slice(0, 3)
|
|
759
796
|
}
|
|
760
|
-
),
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
797
|
+
) : /* @__PURE__ */ e(Ct, { maxLogos: 3, upcomingRecurrences: o.slice(0, 3) }) : /* @__PURE__ */ e(l, { sx: { width: d ? 64 : 104 } }), j = [
|
|
798
|
+
{
|
|
799
|
+
amount: u,
|
|
800
|
+
bgColor: "success.main",
|
|
801
|
+
label: s.paid
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
amount: c,
|
|
805
|
+
bgColor: "error.main",
|
|
806
|
+
label: s.missed
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
amount: p,
|
|
810
|
+
bgColor: "border.light",
|
|
811
|
+
label: s.upcoming
|
|
812
|
+
}
|
|
813
|
+
];
|
|
814
|
+
return /* @__PURE__ */ a(B, { children: [
|
|
815
|
+
/* @__PURE__ */ a(l, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
816
|
+
/* @__PURE__ */ a(
|
|
817
|
+
l,
|
|
818
|
+
{
|
|
819
|
+
sx: [
|
|
820
|
+
y.length >= 10 && d ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
821
|
+
{
|
|
822
|
+
alignItems: "baseline",
|
|
823
|
+
overflow: "hidden",
|
|
824
|
+
textOverflow: "ellipsis",
|
|
825
|
+
whiteSpace: "nowrap"
|
|
826
|
+
}
|
|
827
|
+
],
|
|
828
|
+
children: [
|
|
829
|
+
/* @__PURE__ */ e(
|
|
830
|
+
h,
|
|
831
|
+
{
|
|
832
|
+
sx: { width: "100%" },
|
|
833
|
+
variant: y.length >= 10 && d ? "H3" : "H2",
|
|
834
|
+
children: y
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
/* @__PURE__ */ e(X, { sx: { pr: 12 }, variant: "XSmall", children: s.expected })
|
|
838
|
+
]
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
A()
|
|
842
|
+
] }),
|
|
843
|
+
/* @__PURE__ */ a(l, { sx: { pt: 12 }, children: [
|
|
844
|
+
/* @__PURE__ */ e(Ie, { data: f }),
|
|
845
|
+
/* @__PURE__ */ e(
|
|
846
|
+
l,
|
|
847
|
+
{
|
|
848
|
+
sx: {
|
|
849
|
+
alignItems: "center",
|
|
850
|
+
flexDirection: "row",
|
|
851
|
+
gap: 16,
|
|
852
|
+
mt: 4
|
|
853
|
+
},
|
|
854
|
+
children: j.map((w, K) => /* @__PURE__ */ e(
|
|
855
|
+
bt,
|
|
856
|
+
{
|
|
857
|
+
amount: w.amount,
|
|
858
|
+
bgcolor: w.bgColor,
|
|
859
|
+
isLargeScreen: m,
|
|
860
|
+
isSmallScreen: d,
|
|
861
|
+
label: w.label
|
|
862
|
+
},
|
|
863
|
+
`recurrence-legend-${K}`
|
|
864
|
+
))
|
|
865
|
+
}
|
|
866
|
+
)
|
|
772
867
|
] })
|
|
773
868
|
] });
|
|
774
|
-
}),
|
|
869
|
+
}), _n = C(
|
|
775
870
|
({ onCTAClick: t }) => {
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
upcomingRecurrences:
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
upcomingExpenseTotal: ne,
|
|
785
|
-
isDataLoaded: $
|
|
786
|
-
} = I(), { setFilter: B } = fe(), { recurring: S, budgets: ie } = w();
|
|
787
|
-
be({
|
|
871
|
+
const { onEvent: n } = z(), { isInitialized: i, selectedAccountGuids: o } = H(), {
|
|
872
|
+
loadRepeatingTransactionData: r,
|
|
873
|
+
upcomingRecurrences: c,
|
|
874
|
+
repeatingTransactions: u,
|
|
875
|
+
setDateRange: p,
|
|
876
|
+
isDataLoaded: s
|
|
877
|
+
} = _(), { setFilter: d } = ne(), { recurring: m, budgets: g } = R();
|
|
878
|
+
oe({
|
|
788
879
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
789
|
-
isLoaded:
|
|
790
|
-
}),
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
accounts: u
|
|
796
|
-
}), te({ start: k(/* @__PURE__ */ new Date()), end: F(/* @__PURE__ */ new Date()) }), b().finally(), i(!0));
|
|
797
|
-
}, [m]), f.useEffect(() => {
|
|
798
|
-
n && r(_.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
799
|
-
state: y.length > 0 ? "default" : "zeroState"
|
|
880
|
+
isLoaded: s
|
|
881
|
+
}), x.useEffect(() => {
|
|
882
|
+
s || r().finally(() => {
|
|
883
|
+
n(S.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
884
|
+
state: c.length > 0 ? "default" : "zeroState"
|
|
885
|
+
});
|
|
800
886
|
});
|
|
801
|
-
}, [
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}, [
|
|
811
|
-
W,
|
|
812
|
-
d,
|
|
813
|
-
C,
|
|
814
|
-
a.palette.success.main,
|
|
815
|
-
a.palette.error.main
|
|
816
|
-
]), P = f.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
|
|
817
|
-
r(
|
|
818
|
-
y.length > 0 ? _.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : _.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
887
|
+
}, []), x.useEffect(() => {
|
|
888
|
+
i && (d({
|
|
889
|
+
dateRange: { start: Q(J(), 90), end: Z() },
|
|
890
|
+
accounts: o
|
|
891
|
+
}), p({ start: G(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) }));
|
|
892
|
+
}, [i, o]);
|
|
893
|
+
const b = () => {
|
|
894
|
+
n(
|
|
895
|
+
c.length > 0 ? S.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : S.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
819
896
|
), t();
|
|
820
897
|
};
|
|
821
|
-
if (!
|
|
822
|
-
const
|
|
823
|
-
Dt,
|
|
824
|
-
{
|
|
825
|
-
logoSize: R,
|
|
826
|
-
maxLogos: 3,
|
|
827
|
-
upcomingRecurrences: y.slice(0, 3)
|
|
828
|
-
}
|
|
829
|
-
) : /* @__PURE__ */ e(wt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(l, { sx: { width: M ? 64 : 104 } }), ze = [
|
|
830
|
-
{
|
|
831
|
-
amount: W,
|
|
832
|
-
bgColor: "success.main",
|
|
833
|
-
label: S.paid
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
amount: C,
|
|
837
|
-
bgColor: "error.main",
|
|
838
|
-
label: S.missed
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
amount: ne,
|
|
842
|
-
bgColor: "border.light",
|
|
843
|
-
label: S.upcoming
|
|
844
|
-
}
|
|
845
|
-
], De = !U?.length;
|
|
898
|
+
if (!i || !s) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
899
|
+
const y = !u?.length;
|
|
846
900
|
return /* @__PURE__ */ e(
|
|
847
|
-
|
|
901
|
+
dt,
|
|
848
902
|
{
|
|
849
903
|
className: "mx-recurring-transaction-microwidget",
|
|
850
|
-
ctaLabel:
|
|
851
|
-
onCTAClick:
|
|
852
|
-
title:
|
|
853
|
-
children:
|
|
854
|
-
/* @__PURE__ */ o(
|
|
855
|
-
l,
|
|
856
|
-
{
|
|
857
|
-
ref: p,
|
|
858
|
-
sx: {
|
|
859
|
-
flexDirection: "row",
|
|
860
|
-
justifyContent: "space-between"
|
|
861
|
-
},
|
|
862
|
-
children: [
|
|
863
|
-
/* @__PURE__ */ o(
|
|
864
|
-
l,
|
|
865
|
-
{
|
|
866
|
-
sx: [
|
|
867
|
-
P.length >= 10 && M ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
868
|
-
{
|
|
869
|
-
alignItems: "baseline",
|
|
870
|
-
overflow: "hidden",
|
|
871
|
-
textOverflow: "ellipsis",
|
|
872
|
-
whiteSpace: "nowrap"
|
|
873
|
-
}
|
|
874
|
-
],
|
|
875
|
-
children: [
|
|
876
|
-
/* @__PURE__ */ e(
|
|
877
|
-
g,
|
|
878
|
-
{
|
|
879
|
-
sx: { width: "100%" },
|
|
880
|
-
variant: P.length >= 10 && M ? "H3" : "H2",
|
|
881
|
-
children: P
|
|
882
|
-
}
|
|
883
|
-
),
|
|
884
|
-
/* @__PURE__ */ e(
|
|
885
|
-
ce,
|
|
886
|
-
{
|
|
887
|
-
sx: {
|
|
888
|
-
pr: 12
|
|
889
|
-
},
|
|
890
|
-
variant: "XSmall",
|
|
891
|
-
children: S.expected
|
|
892
|
-
}
|
|
893
|
-
)
|
|
894
|
-
]
|
|
895
|
-
}
|
|
896
|
-
),
|
|
897
|
-
Pe()
|
|
898
|
-
]
|
|
899
|
-
}
|
|
900
|
-
),
|
|
901
|
-
/* @__PURE__ */ o(l, { sx: { pt: 12 }, children: [
|
|
902
|
-
/* @__PURE__ */ e($e, { data: K }),
|
|
903
|
-
/* @__PURE__ */ e(
|
|
904
|
-
l,
|
|
905
|
-
{
|
|
906
|
-
sx: {
|
|
907
|
-
alignItems: "center",
|
|
908
|
-
flexDirection: "row",
|
|
909
|
-
gap: 16,
|
|
910
|
-
mt: 4
|
|
911
|
-
},
|
|
912
|
-
children: ze.map((N, He) => /* @__PURE__ */ e(
|
|
913
|
-
St,
|
|
914
|
-
{
|
|
915
|
-
amount: N.amount,
|
|
916
|
-
bgcolor: N.bgColor,
|
|
917
|
-
isLargeScreen: j,
|
|
918
|
-
isSmallScreen: M,
|
|
919
|
-
label: N.label
|
|
920
|
-
},
|
|
921
|
-
`recurrence-legend-${He}`
|
|
922
|
-
))
|
|
923
|
-
}
|
|
924
|
-
)
|
|
925
|
-
] })
|
|
926
|
-
] })
|
|
904
|
+
ctaLabel: y ? g.get_started_cta : m.primary_cta,
|
|
905
|
+
onCTAClick: b,
|
|
906
|
+
title: m.recurring_expenses,
|
|
907
|
+
children: y ? /* @__PURE__ */ e(xt, {}) : /* @__PURE__ */ e(Rt, {})
|
|
927
908
|
}
|
|
928
909
|
);
|
|
929
910
|
}
|
|
930
|
-
),
|
|
911
|
+
), Sn = C(
|
|
931
912
|
({ isOpen: t, onClose: n, selectedTab: i }) => {
|
|
932
|
-
const { cashflow:
|
|
913
|
+
const { cashflow: o } = R();
|
|
933
914
|
return /* @__PURE__ */ e(
|
|
934
|
-
|
|
915
|
+
ie,
|
|
935
916
|
{
|
|
936
|
-
ariaLabelClose:
|
|
917
|
+
ariaLabelClose: o.close_settings_aria,
|
|
937
918
|
isOpen: t,
|
|
938
919
|
onClose: n,
|
|
939
|
-
title:
|
|
940
|
-
children: /* @__PURE__ */ e(
|
|
920
|
+
title: o.cashflow_settings,
|
|
921
|
+
children: /* @__PURE__ */ e(Te, { defaultSelectedTab: i })
|
|
941
922
|
}
|
|
942
923
|
);
|
|
943
924
|
}
|
|
944
925
|
);
|
|
945
926
|
export {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
927
|
+
Nn as AddRecurringTransactionDetails,
|
|
928
|
+
vn as ManageExpenses,
|
|
929
|
+
Gn as ManageIncome,
|
|
930
|
+
Te as RecurringSettings,
|
|
931
|
+
Sn as RecurringSettingsDrawer,
|
|
932
|
+
_n as RecurringTransactionsMicroWidget,
|
|
933
|
+
wn as RecurringTransactionsMiniWidget,
|
|
934
|
+
An as RecurringTransactionsStore,
|
|
935
|
+
Dn as RecurringTransactionsWidget,
|
|
936
|
+
On as SelectTransaction
|
|
956
937
|
};
|