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