@mx-cartographer/experiences 9.0.13 → 9.0.14-alpha.al0
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 +6 -0
- package/dist/ManageIncome-BadwsHRL.mjs +905 -0
- package/dist/{RecurringSettings-fr6qhQ7f.mjs → RecurringSettings-CGZiV-Ie.mjs} +2 -2
- package/dist/{RecurringTransactionsUtil-zOxq5pzY.mjs → RecurringTransactionsUtil-CHWmqvW5.mjs} +40 -40
- package/dist/{UserStore-66-vYoey.mjs → UserStore-C1fdL3Iu.mjs} +5 -3
- package/dist/budgets/index.es.js +1 -1
- package/dist/cashflow/index.es.js +3 -3
- package/dist/common/index.es.js +1 -1
- package/dist/core/index.es.js +2 -2
- package/dist/core/stores/RecurringTransactionsStore.d.ts +2 -0
- package/dist/finstrong/index.es.js +3 -3
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +3 -1
- package/dist/recurringtransactions/index.es.js +341 -331
- package/package.json +1 -1
- package/dist/ManageIncome-CPy6xnnI.mjs +0 -902
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import x from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
5
5
|
import { endOfToday as J } from "date-fns/endOfToday";
|
|
6
6
|
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
7
|
import { startOfToday as Q } from "date-fns/startOfToday";
|
|
8
8
|
import { subDays as ee } from "date-fns/subDays";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { R as
|
|
12
|
-
import { M as
|
|
13
|
-
import { addMonths as
|
|
14
|
-
import { subMonths as
|
|
15
|
-
import { isBefore as
|
|
9
|
+
import $e from "@mui/material/Alert";
|
|
10
|
+
import Fe from "@mui/material/Snackbar";
|
|
11
|
+
import { R as _e } from "../RecurringSettings-CGZiV-Ie.mjs";
|
|
12
|
+
import { M as Jn } from "../RecurringSettings-CGZiV-Ie.mjs";
|
|
13
|
+
import { addMonths as Ue } from "date-fns/addMonths";
|
|
14
|
+
import { subMonths as Ye } from "date-fns/subMonths";
|
|
15
|
+
import { isBefore as je } from "date-fns/isBefore";
|
|
16
16
|
import q from "@mui/material/Grid";
|
|
17
|
-
import
|
|
17
|
+
import he from "@mui/material/IconButton";
|
|
18
18
|
import d from "@mui/material/Stack";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { Cancel as
|
|
22
|
-
import { Text as h, MerchantLogo as te, InstitutionLogo as
|
|
23
|
-
import { g as
|
|
24
|
-
import { getWeeksInMonth as
|
|
25
|
-
import { enCA as
|
|
26
|
-
import { enUS as
|
|
27
|
-
import { es as
|
|
28
|
-
import { fr as
|
|
29
|
-
import { frCA as
|
|
19
|
+
import fe from "@mui/material/Tab";
|
|
20
|
+
import Ke from "@mui/material/Tabs";
|
|
21
|
+
import { Cancel as Se, CheckCircle as we, Schedule as Ve, MonetizationOn as qe, ChevronLeft as Ze, ChevronRight as Xe, CurrencyExchange as Je } from "@mxenabled/mx-icons";
|
|
22
|
+
import { Text as h, MerchantLogo as te, InstitutionLogo as Qe, H3 as et, H2 as tt, P as Z } from "@mxenabled/mxui";
|
|
23
|
+
import { g as nt, L as O, b as N } from "../Localization-DnoVyBNK.mjs";
|
|
24
|
+
import { getWeeksInMonth as xe } from "date-fns/getWeeksInMonth";
|
|
25
|
+
import { enCA as rt } from "date-fns/locale/en-CA";
|
|
26
|
+
import { enUS as be } from "date-fns/locale/en-US";
|
|
27
|
+
import { es as it } from "date-fns/locale/es";
|
|
28
|
+
import { fr as ot } from "date-fns/locale/fr";
|
|
29
|
+
import { frCA as at } from "date-fns/locale/fr-CA";
|
|
30
30
|
import { useTheme as ne } from "@mui/material/styles";
|
|
31
|
-
import { AdapterDateFns as
|
|
32
|
-
import { DateCalendar as
|
|
33
|
-
import { LocalizationProvider as
|
|
34
|
-
import { isSameDay as
|
|
35
|
-
import
|
|
36
|
-
import { PickersDay as
|
|
31
|
+
import { AdapterDateFns as st } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
32
|
+
import { DateCalendar as ct } from "@mui/x-date-pickers/DateCalendar";
|
|
33
|
+
import { LocalizationProvider as lt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
34
|
+
import { isSameDay as dt } from "date-fns/isSameDay";
|
|
35
|
+
import ut from "@mui/material/Badge";
|
|
36
|
+
import { PickersDay as mt } from "@mui/x-date-pickers/PickersDay";
|
|
37
37
|
import { I as F } from "../IconBacking-DgT8DCeh.mjs";
|
|
38
|
-
import { u as b, a as U, h as _, f as Y, D as
|
|
39
|
-
import { b as E, a as D, g as
|
|
38
|
+
import { u as b, a as U, h as _, f as Y, D as Ie, g as re } from "../hooks-97sNJ_lf.mjs";
|
|
39
|
+
import { b as E, a as D, g as Ce, e as pt, R as gt } from "../RecurringTransactionsUtil-CHWmqvW5.mjs";
|
|
40
40
|
import { f as I, D as M } from "../DateFormats-HudZ3Bjs.mjs";
|
|
41
41
|
import { T as W } from "../Sizes-DISGrlUg.mjs";
|
|
42
42
|
import { A as v } from "../Analytics-WeZYytR0.mjs";
|
|
43
|
-
import
|
|
43
|
+
import ht from "@mui/material/Button";
|
|
44
44
|
import X from "@mui/material/Divider";
|
|
45
45
|
import ye from "@mui/material/List";
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
46
|
+
import Me from "@mui/material/ListItem";
|
|
47
|
+
import ft from "@mui/material/ListSubheader";
|
|
48
|
+
import xt from "@mui/material/ListItemAvatar";
|
|
49
|
+
import bt from "@mui/material/ListItemButton";
|
|
50
|
+
import Ct from "@mui/material/ListItemText";
|
|
51
51
|
import { f as L } from "../NumberFormatting--XMeeBfr.mjs";
|
|
52
52
|
import G from "@mui/material/Box";
|
|
53
|
-
import { u as
|
|
54
|
-
import { S as
|
|
55
|
-
import { d as yt } from "../ManageIncome-
|
|
56
|
-
import { c as
|
|
53
|
+
import { u as ve } from "../useScreenSize-mWpmnh5w.mjs";
|
|
54
|
+
import { S as Le } from "../StatusBar-CPfSXe80.mjs";
|
|
55
|
+
import { d as yt } from "../ManageIncome-BadwsHRL.mjs";
|
|
56
|
+
import { c as er, M as tr, S as nr } from "../ManageIncome-BadwsHRL.mjs";
|
|
57
57
|
import { D as ie } from "../Drawer-DsnW2o0v.mjs";
|
|
58
|
-
import { S as
|
|
58
|
+
import { S as Ae } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
59
59
|
import { u as oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
60
60
|
import { L as ae } from "../Loader-CxeBwuPG.mjs";
|
|
61
|
-
import { W as
|
|
62
|
-
import { M as
|
|
63
|
-
import { u as
|
|
64
|
-
import { M as
|
|
61
|
+
import { W as Rt } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
62
|
+
import { M as Tt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
63
|
+
import { u as Dt } from "../useDimensions-CeDR9V8N.mjs";
|
|
64
|
+
import { M as _t } from "../MicroWidgetContainer-B2NnKBgW.mjs";
|
|
65
65
|
const j = {
|
|
66
66
|
gridRow: 1,
|
|
67
67
|
gridColumn: 1,
|
|
@@ -72,7 +72,7 @@ const j = {
|
|
|
72
72
|
backingSx: { backgroundColor: "background.paper" },
|
|
73
73
|
size: n,
|
|
74
74
|
sx: { ...K(t) },
|
|
75
|
-
children: /* @__PURE__ */ e(
|
|
75
|
+
children: /* @__PURE__ */ e(Ve, { color: "primary", filled: !0, sx: { fontSize: n, ...j } })
|
|
76
76
|
}
|
|
77
77
|
), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
78
78
|
F,
|
|
@@ -81,7 +81,7 @@ const j = {
|
|
|
81
81
|
size: n,
|
|
82
82
|
sx: { ...K(t) },
|
|
83
83
|
children: /* @__PURE__ */ e(
|
|
84
|
-
|
|
84
|
+
qe,
|
|
85
85
|
{
|
|
86
86
|
filled: !0,
|
|
87
87
|
sx: { color: "categories.income", fontSize: n, ...j }
|
|
@@ -94,7 +94,7 @@ const j = {
|
|
|
94
94
|
backingSx: { backgroundColor: "background.paper" },
|
|
95
95
|
size: n,
|
|
96
96
|
sx: { ...K(t) },
|
|
97
|
-
children: /* @__PURE__ */ e(
|
|
97
|
+
children: /* @__PURE__ */ e(Se, { color: "error", filled: !0, sx: { fontSize: n, ...j } })
|
|
98
98
|
}
|
|
99
99
|
), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
100
100
|
F,
|
|
@@ -102,50 +102,50 @@ const j = {
|
|
|
102
102
|
backingSx: { backgroundColor: "background.paper" },
|
|
103
103
|
size: n,
|
|
104
104
|
sx: { ...K(t) },
|
|
105
|
-
children: /* @__PURE__ */ e(
|
|
105
|
+
children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...j } })
|
|
106
106
|
}
|
|
107
|
-
),
|
|
107
|
+
), St = T(
|
|
108
108
|
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
109
|
-
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences:
|
|
110
|
-
() =>
|
|
111
|
-
[o,
|
|
109
|
+
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences: s, setSelectedDay: m } = _(), c = x.useMemo(
|
|
110
|
+
() => s.filter((f) => o.includes(f.accountGuid)),
|
|
111
|
+
[o, s]
|
|
112
112
|
).filter(
|
|
113
|
-
(f) =>
|
|
114
|
-
), l =
|
|
113
|
+
(f) => dt(f.occurredOnDate || f.expectedDate, t)
|
|
114
|
+
), l = c.some(
|
|
115
115
|
(f) => f.type !== E.Income && f.status === D.Upcoming
|
|
116
|
-
),
|
|
116
|
+
), u = c.some(
|
|
117
117
|
(f) => f.type !== E.Income && f.status === D.Missed
|
|
118
|
-
), g =
|
|
118
|
+
), g = c.some(
|
|
119
119
|
(f) => f.type !== E.Income && f.status === D.Paid
|
|
120
|
-
),
|
|
120
|
+
), C = c.some((f) => f.type === E.Income), y = (l ? 1 : 0) + (u ? 1 : 0) + (g ? 1 : 0) + (C ? 1 : 0), S = [
|
|
121
121
|
g && i.paid,
|
|
122
|
-
|
|
122
|
+
u && i.missed,
|
|
123
123
|
l && i.upcoming,
|
|
124
|
-
|
|
124
|
+
C && i.income
|
|
125
125
|
].filter(Boolean), A = S.length > 0 ? `${I(t, M.MONTH_DAY_YEAR)}, ${S.join(", ")}` : I(t, M.MONTH_DAY_YEAR);
|
|
126
126
|
return /* @__PURE__ */ e(
|
|
127
|
-
|
|
127
|
+
ut,
|
|
128
128
|
{
|
|
129
|
-
badgeContent:
|
|
130
|
-
|
|
129
|
+
badgeContent: c.length > 0 && /* @__PURE__ */ a($, { children: [
|
|
130
|
+
u && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
131
131
|
g && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
132
132
|
l && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
133
|
-
|
|
133
|
+
C && /* @__PURE__ */ e(ce, { isOffset: !0 })
|
|
134
134
|
] }),
|
|
135
135
|
overlap: "circular",
|
|
136
136
|
sx: {
|
|
137
137
|
"& .MuiBadge-badge": {
|
|
138
138
|
padding: 0,
|
|
139
|
-
marginRight: `${(
|
|
139
|
+
marginRight: `${(y - 1) * 6 + 1}px`,
|
|
140
140
|
flexWrap: "nowrap"
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
children: /* @__PURE__ */ e(
|
|
144
|
-
|
|
144
|
+
mt,
|
|
145
145
|
{
|
|
146
146
|
"aria-label": A,
|
|
147
147
|
day: t,
|
|
148
|
-
onClick: () =>
|
|
148
|
+
onClick: () => m(t),
|
|
149
149
|
outsideCurrentMonth: n,
|
|
150
150
|
sx: {
|
|
151
151
|
"&.MuiPickersDay-root": {
|
|
@@ -160,12 +160,12 @@ const j = {
|
|
|
160
160
|
}
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
|
-
), B = ({ icon: t, label: n }) => /* @__PURE__ */
|
|
163
|
+
), B = ({ icon: t, label: n }) => /* @__PURE__ */ a(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
164
164
|
/* @__PURE__ */ e(t, {}),
|
|
165
165
|
/* @__PURE__ */ e(h, { variant: "caption", children: n })
|
|
166
|
-
] }),
|
|
166
|
+
] }), wt = T(() => {
|
|
167
167
|
const { recurring: t } = b();
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ a(
|
|
169
169
|
d,
|
|
170
170
|
{
|
|
171
171
|
alignItems: "center",
|
|
@@ -182,37 +182,37 @@ const j = {
|
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
);
|
|
185
|
-
}),
|
|
186
|
-
const t =
|
|
185
|
+
}), Re = 58, It = () => {
|
|
186
|
+
const t = nt();
|
|
187
187
|
return {
|
|
188
|
-
[O.EN_US]:
|
|
189
|
-
[O.EN_CA]:
|
|
190
|
-
[O.FR]:
|
|
191
|
-
[O.FR_CA]:
|
|
192
|
-
[O.ES]:
|
|
193
|
-
}[t] ||
|
|
194
|
-
},
|
|
195
|
-
const t = ne(), { onEvent: n } = Y(), { recurring: r } = b(), { selectedDay: i, setDateRange: o } = _(), [
|
|
196
|
-
|
|
197
|
-
),
|
|
198
|
-
|
|
199
|
-
start: k(
|
|
200
|
-
end: z(
|
|
201
|
-
}),
|
|
202
|
-
},
|
|
203
|
-
|
|
188
|
+
[O.EN_US]: be,
|
|
189
|
+
[O.EN_CA]: rt,
|
|
190
|
+
[O.FR]: ot,
|
|
191
|
+
[O.FR_CA]: at,
|
|
192
|
+
[O.ES]: it
|
|
193
|
+
}[t] || be;
|
|
194
|
+
}, Ee = T(() => {
|
|
195
|
+
const t = ne(), { onEvent: n } = Y(), { recurring: r } = b(), { selectedDay: i, setDateRange: o } = _(), [s, m] = x.useState(
|
|
196
|
+
xe(/* @__PURE__ */ new Date()) * W + Re
|
|
197
|
+
), p = (u) => {
|
|
198
|
+
m(xe(u) * W + Re), o({
|
|
199
|
+
start: k(u),
|
|
200
|
+
end: z(u)
|
|
201
|
+
}), c(u), n(v.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
202
|
+
}, c = (u) => {
|
|
203
|
+
u && requestAnimationFrame(() => {
|
|
204
204
|
const g = document.getElementById("recurrence-list");
|
|
205
205
|
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
206
206
|
});
|
|
207
207
|
}, l = /* @__PURE__ */ e(
|
|
208
|
-
|
|
208
|
+
ct,
|
|
209
209
|
{
|
|
210
210
|
minDate: k(/* @__PURE__ */ new Date()),
|
|
211
|
-
onChange:
|
|
212
|
-
onMonthChange:
|
|
211
|
+
onChange: c,
|
|
212
|
+
onMonthChange: p,
|
|
213
213
|
showDaysOutsideCurrentMonth: !0,
|
|
214
214
|
slots: {
|
|
215
|
-
day:
|
|
215
|
+
day: St
|
|
216
216
|
},
|
|
217
217
|
sx: {
|
|
218
218
|
"& .MuiPickersArrowSwitcher-button": {
|
|
@@ -238,10 +238,10 @@ const j = {
|
|
|
238
238
|
fontWeight: 600
|
|
239
239
|
},
|
|
240
240
|
"& .MuiDayCalendar-slideTransition": {
|
|
241
|
-
minHeight:
|
|
241
|
+
minHeight: s
|
|
242
242
|
},
|
|
243
243
|
"&.MuiDateCalendar-root": {
|
|
244
|
-
minHeight:
|
|
244
|
+
minHeight: s + W
|
|
245
245
|
},
|
|
246
246
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
247
247
|
height: W,
|
|
@@ -261,13 +261,13 @@ const j = {
|
|
|
261
261
|
views: ["day"]
|
|
262
262
|
}
|
|
263
263
|
);
|
|
264
|
-
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ a(lt, { adapterLocale: It(), dateAdapter: st, children: [
|
|
265
265
|
i && l,
|
|
266
266
|
!i && l,
|
|
267
267
|
/* @__PURE__ */ e(h, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
268
|
-
/* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ e(wt, {})
|
|
269
269
|
] }) });
|
|
270
|
-
}),
|
|
270
|
+
}), Mt = (t) => {
|
|
271
271
|
if (t.type === E.Income)
|
|
272
272
|
return /* @__PURE__ */ e(ce, {});
|
|
273
273
|
switch (t.status) {
|
|
@@ -278,7 +278,7 @@ const j = {
|
|
|
278
278
|
default:
|
|
279
279
|
return /* @__PURE__ */ e(se, {});
|
|
280
280
|
}
|
|
281
|
-
},
|
|
281
|
+
}, vt = (t, n) => {
|
|
282
282
|
switch (t.status) {
|
|
283
283
|
case D.Paid:
|
|
284
284
|
return t.expectedDate ? N(
|
|
@@ -301,44 +301,44 @@ const j = {
|
|
|
301
301
|
default:
|
|
302
302
|
return n.unknown;
|
|
303
303
|
}
|
|
304
|
-
},
|
|
304
|
+
}, Te = ({
|
|
305
305
|
recurrence: t,
|
|
306
306
|
isMini: n = !1,
|
|
307
307
|
onRecurrenceClick: r = () => {
|
|
308
308
|
},
|
|
309
309
|
showOrdinal: i = !1
|
|
310
310
|
}) => {
|
|
311
|
-
const { recurring: o } = b(), { detailedRepeatingTransactions:
|
|
312
|
-
() =>
|
|
313
|
-
[t,
|
|
314
|
-
),
|
|
311
|
+
const { recurring: o } = b(), { detailedRepeatingTransactions: s } = _(), m = x.useMemo(
|
|
312
|
+
() => s.find((y) => y.guid === t.repeatingTransactionGuid),
|
|
313
|
+
[t, s]
|
|
314
|
+
), p = t.type === E.Income, c = t.status === D.Paid, l = t.status === D.Missed, u = t.status === D.Upcoming;
|
|
315
315
|
let g = o.paid?.toLowerCase();
|
|
316
|
-
return l ? g = o.missed?.toLowerCase() :
|
|
317
|
-
/* @__PURE__ */ e(
|
|
316
|
+
return l ? g = o.missed?.toLowerCase() : u && (g = i ? Ce(o, m || {}, !0) : Ce(o, m || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
317
|
+
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ a(bt, { onClick: () => {
|
|
318
318
|
r(t);
|
|
319
319
|
}, children: [
|
|
320
|
-
/* @__PURE__ */ e(
|
|
320
|
+
/* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(
|
|
321
321
|
te,
|
|
322
322
|
{
|
|
323
323
|
categoryGuid: t.categoryGuid,
|
|
324
324
|
merchantGuid: t.merchantGuid
|
|
325
325
|
}
|
|
326
326
|
) }),
|
|
327
|
-
/* @__PURE__ */ e(
|
|
327
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ a(
|
|
328
328
|
d,
|
|
329
329
|
{
|
|
330
330
|
direction: "row",
|
|
331
331
|
gap: 4,
|
|
332
332
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
333
333
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ a(d, { direction: "column", width: "50%", children: [
|
|
335
335
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
336
|
-
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */ e(h, { variant: "caption", children:
|
|
339
|
-
] }) : /* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
|
|
337
|
+
Mt(t),
|
|
338
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: vt(t, o) })
|
|
339
|
+
] }) : /* @__PURE__ */ a($, { children: [
|
|
340
340
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
341
|
-
|
|
341
|
+
Qe,
|
|
342
342
|
{
|
|
343
343
|
alt: `${t.institutionName} institution logo`,
|
|
344
344
|
institutionGuid: t.institutionGuid,
|
|
@@ -348,12 +348,12 @@ const j = {
|
|
|
348
348
|
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
349
349
|
] }) })
|
|
350
350
|
] }),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
351
|
+
/* @__PURE__ */ a(d, { alignItems: "flex-end", width: "100%", children: [
|
|
352
|
+
/* @__PURE__ */ a(h, { bold: !0, color: p ? "success.main" : "text.primary", variant: "body1", children: [
|
|
353
|
+
p ? "+" : "",
|
|
354
354
|
L(t.amount, "0,0.00")
|
|
355
355
|
] }),
|
|
356
|
-
!n && /* @__PURE__ */
|
|
356
|
+
!n && /* @__PURE__ */ a(
|
|
357
357
|
d,
|
|
358
358
|
{
|
|
359
359
|
direction: "row",
|
|
@@ -365,8 +365,8 @@ const j = {
|
|
|
365
365
|
width: "100%"
|
|
366
366
|
},
|
|
367
367
|
children: [
|
|
368
|
-
|
|
369
|
-
l && /* @__PURE__ */ e(
|
|
368
|
+
c && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
369
|
+
l && /* @__PURE__ */ e(Se, { color: "error", filled: !0, size: 12 }),
|
|
370
370
|
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: g })
|
|
371
371
|
]
|
|
372
372
|
}
|
|
@@ -376,18 +376,18 @@ const j = {
|
|
|
376
376
|
}
|
|
377
377
|
) })
|
|
378
378
|
] }) });
|
|
379
|
-
}, P =
|
|
379
|
+
}, P = T(
|
|
380
380
|
({
|
|
381
381
|
recurrences: t,
|
|
382
382
|
isMini: n = !1,
|
|
383
383
|
onResetClick: r,
|
|
384
384
|
onRecurrenceClick: i,
|
|
385
385
|
sx: o = {},
|
|
386
|
-
title:
|
|
386
|
+
title: s
|
|
387
387
|
}) => {
|
|
388
|
-
const { recurring:
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
|
|
388
|
+
const { recurring: m } = b(), p = x.useMemo(() => pt(t), [t]);
|
|
389
|
+
return /* @__PURE__ */ a(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, "tab-index": -1, children: [
|
|
390
|
+
s && /* @__PURE__ */ a(
|
|
391
391
|
d,
|
|
392
392
|
{
|
|
393
393
|
sx: {
|
|
@@ -397,128 +397,137 @@ const j = {
|
|
|
397
397
|
px: 24
|
|
398
398
|
},
|
|
399
399
|
children: [
|
|
400
|
-
/* @__PURE__ */ e(
|
|
401
|
-
r && /* @__PURE__ */ e(
|
|
400
|
+
/* @__PURE__ */ e(et, { bold: !0, variant: "body1", children: s }),
|
|
401
|
+
r && /* @__PURE__ */ e(ht, { onClick: r, size: "small", variant: "text", children: m.reset })
|
|
402
402
|
]
|
|
403
403
|
}
|
|
404
404
|
),
|
|
405
|
-
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children:
|
|
405
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(ye, { children: n ? t.map((c, l) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
406
406
|
/* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
Te,
|
|
408
408
|
{
|
|
409
409
|
isMini: n,
|
|
410
410
|
onRecurrenceClick: i,
|
|
411
|
-
recurrence:
|
|
411
|
+
recurrence: c
|
|
412
412
|
}
|
|
413
413
|
),
|
|
414
414
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
415
|
-
] }, `recurrence-${l}`)) :
|
|
416
|
-
/* @__PURE__ */ e(
|
|
415
|
+
] }, `recurrence-${l}`)) : p.map((c, l) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
416
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
|
|
417
417
|
ye,
|
|
418
418
|
{
|
|
419
|
-
subheader: /* @__PURE__ */ e(
|
|
419
|
+
subheader: /* @__PURE__ */ e(ft, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: I(c.date, M.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
420
420
|
sx: { width: "100%" },
|
|
421
|
-
children:
|
|
422
|
-
|
|
421
|
+
children: c.recurrences.map((u, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
422
|
+
Te,
|
|
423
423
|
{
|
|
424
424
|
isMini: n,
|
|
425
425
|
onRecurrenceClick: i,
|
|
426
|
-
recurrence:
|
|
426
|
+
recurrence: u
|
|
427
427
|
}
|
|
428
428
|
) }, `day-recurrence-${g}`))
|
|
429
429
|
}
|
|
430
|
-
) },
|
|
430
|
+
) }, c.id),
|
|
431
431
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
432
432
|
] }, `recurrence-${l}`)) })
|
|
433
433
|
] });
|
|
434
434
|
}
|
|
435
|
-
),
|
|
436
|
-
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total:
|
|
437
|
-
const
|
|
438
|
-
const g = [{ color:
|
|
439
|
-
return r && g.push({ color:
|
|
435
|
+
), De = T(
|
|
436
|
+
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: s, upcoming: m }) => {
|
|
437
|
+
const p = ne(), { isSmallMobile: c } = ve(), { recurring: l } = b(), u = x.useMemo(() => {
|
|
438
|
+
const g = [{ color: p.palette.success.main, percentage: `${i / t}` }];
|
|
439
|
+
return r && g.push({ color: p.palette.error.main, percentage: `${r / t}` }), g;
|
|
440
440
|
}, [i, t, r]);
|
|
441
|
-
return /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${
|
|
441
|
+
return /* @__PURE__ */ a(d, { children: [
|
|
442
|
+
/* @__PURE__ */ a(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
443
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${s})` }),
|
|
444
444
|
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
445
445
|
] }),
|
|
446
|
-
/* @__PURE__ */ e(
|
|
447
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ e(Le, { data: u, height: 12 }),
|
|
447
|
+
/* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
448
448
|
/* @__PURE__ */ e(G, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
449
|
-
!
|
|
449
|
+
!c && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
450
450
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
451
|
-
r !== void 0 && /* @__PURE__ */
|
|
451
|
+
r !== void 0 && /* @__PURE__ */ a($, { children: [
|
|
452
452
|
/* @__PURE__ */ e(G, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
453
|
-
!
|
|
453
|
+
!c && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
454
454
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
455
455
|
] }),
|
|
456
456
|
/* @__PURE__ */ e(G, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
457
|
-
!
|
|
457
|
+
!c && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
|
|
458
458
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming?.toLowerCase() })
|
|
459
459
|
] })
|
|
460
460
|
] });
|
|
461
461
|
}
|
|
462
|
-
),
|
|
463
|
-
const { recurring: t } = b(), {
|
|
462
|
+
), Ne = T(() => {
|
|
463
|
+
const { recurring: t } = b(), {
|
|
464
|
+
selectedRecurrence: n,
|
|
465
|
+
selectedRepeatingTransaction: r,
|
|
466
|
+
setSelectedRecurrence: i,
|
|
467
|
+
setSelectedRepeatingTransactionGuid: o
|
|
468
|
+
} = _(), s = () => {
|
|
469
|
+
o(null), i(null);
|
|
470
|
+
};
|
|
464
471
|
return /* @__PURE__ */ e(
|
|
465
472
|
ie,
|
|
466
473
|
{
|
|
467
474
|
ariaLabelClose: t.close_drawer_aria,
|
|
468
|
-
isOpen: !!
|
|
469
|
-
onClose:
|
|
470
|
-
title:
|
|
471
|
-
children:
|
|
475
|
+
isOpen: !!r,
|
|
476
|
+
onClose: s,
|
|
477
|
+
title: r?.repeating_transaction_type === gt.Income ? t.income_details : t.expense_details,
|
|
478
|
+
children: r && /* @__PURE__ */ e(
|
|
472
479
|
yt,
|
|
473
480
|
{
|
|
474
|
-
onDeleted:
|
|
475
|
-
recurringTransaction:
|
|
481
|
+
onDeleted: s,
|
|
482
|
+
recurringTransaction: r,
|
|
483
|
+
selectedRecurrence: n
|
|
476
484
|
}
|
|
477
485
|
)
|
|
478
486
|
}
|
|
479
487
|
);
|
|
480
|
-
}),
|
|
481
|
-
const { recurring: t } = b(), { availableWidth: n } =
|
|
482
|
-
currentMonthExpenses:
|
|
483
|
-
currentMonthIncome:
|
|
484
|
-
dateRange:
|
|
488
|
+
}), Lt = T(() => {
|
|
489
|
+
const { recurring: t } = b(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: i, isMobile: o } = ve(n), { onEvent: s } = Y(), {
|
|
490
|
+
currentMonthExpenses: m,
|
|
491
|
+
currentMonthIncome: p,
|
|
492
|
+
dateRange: c,
|
|
485
493
|
expenseTotal: l,
|
|
486
|
-
incomeTotal:
|
|
494
|
+
incomeTotal: u,
|
|
487
495
|
missedExpenseTotal: g,
|
|
488
|
-
pastRecurrences:
|
|
489
|
-
paidExpenseTotal:
|
|
496
|
+
pastRecurrences: C,
|
|
497
|
+
paidExpenseTotal: y,
|
|
490
498
|
paidIncomeTotal: S,
|
|
491
499
|
selectedDay: A,
|
|
492
500
|
selectedDayRecurrences: f,
|
|
493
501
|
setDateRange: w,
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
502
|
+
setSelectedRecurrence: H,
|
|
503
|
+
setSelectedRepeatingTransactionGuid: ue,
|
|
504
|
+
upcomingExpenseTotal: Ge,
|
|
505
|
+
upcomingIncomeTotal: ke,
|
|
506
|
+
upcomingRecurrences: me
|
|
507
|
+
} = _(), [V, Oe] = x.useState(0), We = je(c.start, /* @__PURE__ */ new Date()), Pe = (R, Be) => {
|
|
508
|
+
Oe(Be);
|
|
509
|
+
}, pe = (R) => {
|
|
510
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
511
|
+
transaction_guid: R.transaction?.guid
|
|
503
512
|
});
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
transaction_guid:
|
|
513
|
+
}, ge = (R) => {
|
|
514
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
515
|
+
transaction_guid: R.transaction?.guid
|
|
507
516
|
});
|
|
508
|
-
},
|
|
509
|
-
const
|
|
517
|
+
}, ze = () => {
|
|
518
|
+
const R = Ue(c.start, 1);
|
|
510
519
|
w({
|
|
511
|
-
start: k(
|
|
512
|
-
end: z(
|
|
520
|
+
start: k(R),
|
|
521
|
+
end: z(R)
|
|
513
522
|
});
|
|
514
|
-
},
|
|
515
|
-
const
|
|
523
|
+
}, He = () => {
|
|
524
|
+
const R = Ye(c.start, 1);
|
|
516
525
|
w({
|
|
517
|
-
start: k(
|
|
518
|
-
end: z(
|
|
526
|
+
start: k(R),
|
|
527
|
+
end: z(R)
|
|
519
528
|
});
|
|
520
529
|
};
|
|
521
|
-
return /* @__PURE__ */
|
|
530
|
+
return /* @__PURE__ */ a(
|
|
522
531
|
q,
|
|
523
532
|
{
|
|
524
533
|
container: !0,
|
|
@@ -526,67 +535,67 @@ const j = {
|
|
|
526
535
|
pt: 16
|
|
527
536
|
},
|
|
528
537
|
children: [
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */ e(
|
|
538
|
+
/* @__PURE__ */ a(q, { size: { sm: 12, md: "grow" }, width: "100%", children: [
|
|
539
|
+
/* @__PURE__ */ a(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
540
|
+
/* @__PURE__ */ a(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
541
|
+
/* @__PURE__ */ e(tt, { variant: "h3", children: N(
|
|
533
542
|
t.header_title,
|
|
534
|
-
I(
|
|
543
|
+
I(c.start, M.MONTH_LONG)
|
|
535
544
|
) }),
|
|
536
|
-
!r && /* @__PURE__ */
|
|
545
|
+
!r && /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
|
|
537
546
|
/* @__PURE__ */ e(
|
|
538
|
-
|
|
547
|
+
he,
|
|
539
548
|
{
|
|
540
549
|
color: "primary",
|
|
541
|
-
disabled:
|
|
542
|
-
onClick:
|
|
543
|
-
children: /* @__PURE__ */ e(
|
|
550
|
+
disabled: We,
|
|
551
|
+
onClick: He,
|
|
552
|
+
children: /* @__PURE__ */ e(Ze, {})
|
|
544
553
|
}
|
|
545
554
|
),
|
|
546
|
-
/* @__PURE__ */ e(
|
|
555
|
+
/* @__PURE__ */ e(he, { color: "primary", onClick: ze, children: /* @__PURE__ */ e(Xe, {}) })
|
|
547
556
|
] })
|
|
548
557
|
] }),
|
|
549
558
|
/* @__PURE__ */ e(
|
|
550
|
-
|
|
559
|
+
De,
|
|
551
560
|
{
|
|
552
561
|
expected: l,
|
|
553
562
|
missed: g,
|
|
554
|
-
paid:
|
|
563
|
+
paid: y,
|
|
555
564
|
title: t.expenses,
|
|
556
|
-
total:
|
|
557
|
-
upcoming:
|
|
565
|
+
total: m.length,
|
|
566
|
+
upcoming: Ge
|
|
558
567
|
}
|
|
559
568
|
),
|
|
560
569
|
/* @__PURE__ */ e(
|
|
561
|
-
|
|
570
|
+
De,
|
|
562
571
|
{
|
|
563
|
-
expected:
|
|
572
|
+
expected: u,
|
|
564
573
|
isExpense: !1,
|
|
565
574
|
paid: S,
|
|
566
575
|
title: t.deposits,
|
|
567
|
-
total:
|
|
568
|
-
upcoming:
|
|
576
|
+
total: p.length,
|
|
577
|
+
upcoming: ke
|
|
569
578
|
}
|
|
570
579
|
),
|
|
571
580
|
r && /* @__PURE__ */ e(
|
|
572
581
|
P,
|
|
573
582
|
{
|
|
574
|
-
onRecurrenceClick:
|
|
575
|
-
recurrences:
|
|
583
|
+
onRecurrenceClick: pe,
|
|
584
|
+
recurrences: me,
|
|
576
585
|
title: t.upcoming_activity
|
|
577
586
|
}
|
|
578
587
|
)
|
|
579
588
|
] }),
|
|
580
|
-
!r && /* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
589
|
+
!r && /* @__PURE__ */ a(d, { sx: { px: o ? 0 : 24 }, children: [
|
|
590
|
+
/* @__PURE__ */ a(Ke, { onChange: Pe, value: V, variant: "fullWidth", children: [
|
|
582
591
|
/* @__PURE__ */ e(
|
|
583
|
-
|
|
592
|
+
fe,
|
|
584
593
|
{
|
|
585
594
|
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
|
|
586
595
|
}
|
|
587
596
|
),
|
|
588
597
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
598
|
+
fe,
|
|
590
599
|
{
|
|
591
600
|
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
|
|
592
601
|
}
|
|
@@ -595,26 +604,26 @@ const j = {
|
|
|
595
604
|
V === 0 && /* @__PURE__ */ e(
|
|
596
605
|
P,
|
|
597
606
|
{
|
|
598
|
-
onRecurrenceClick:
|
|
599
|
-
recurrences:
|
|
607
|
+
onRecurrenceClick: pe,
|
|
608
|
+
recurrences: me
|
|
600
609
|
}
|
|
601
610
|
),
|
|
602
611
|
V === 1 && /* @__PURE__ */ e(
|
|
603
612
|
P,
|
|
604
613
|
{
|
|
605
|
-
onRecurrenceClick:
|
|
606
|
-
recurrences:
|
|
614
|
+
onRecurrenceClick: ge,
|
|
615
|
+
recurrences: C
|
|
607
616
|
}
|
|
608
617
|
)
|
|
609
618
|
] })
|
|
610
619
|
] }),
|
|
611
|
-
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */ e(
|
|
620
|
+
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ a(d, { gap: 24, children: [
|
|
621
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
613
622
|
/* @__PURE__ */ e(
|
|
614
623
|
P,
|
|
615
624
|
{
|
|
616
|
-
onRecurrenceClick:
|
|
617
|
-
recurrences: f ||
|
|
625
|
+
onRecurrenceClick: ge,
|
|
626
|
+
recurrences: f || C,
|
|
618
627
|
title: A ? N(
|
|
619
628
|
t.day_transactions,
|
|
620
629
|
I(A, M.MONTH_DAY)
|
|
@@ -622,89 +631,90 @@ const j = {
|
|
|
622
631
|
}
|
|
623
632
|
)
|
|
624
633
|
] }) }),
|
|
625
|
-
/* @__PURE__ */ e(
|
|
634
|
+
/* @__PURE__ */ e(Ne, {})
|
|
626
635
|
]
|
|
627
636
|
}
|
|
628
637
|
);
|
|
629
|
-
}),
|
|
638
|
+
}), jn = T(
|
|
630
639
|
({ onBackClick: t, onMenuClick: n, sx: r = {} }) => {
|
|
631
|
-
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids:
|
|
640
|
+
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids: s } = U(), { alert: m, isDataLoaded: p, loadRepeatingTransactionData: c, setAlert: l, setDateRange: u } = _(), { setFilter: g } = re(), { onEvent: C } = Y(), [y, S] = x.useState(!1);
|
|
632
641
|
return oe({
|
|
633
642
|
widgetName: "RecurringTransactionsWidget",
|
|
634
|
-
isLoaded:
|
|
643
|
+
isLoaded: p
|
|
635
644
|
}), x.useEffect(() => {
|
|
636
|
-
|
|
645
|
+
p || c().finally();
|
|
637
646
|
}, []), x.useEffect(() => {
|
|
638
647
|
g({
|
|
639
648
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
640
|
-
accounts:
|
|
641
|
-
}),
|
|
642
|
-
}, [
|
|
643
|
-
|
|
649
|
+
accounts: s
|
|
650
|
+
}), u({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) });
|
|
651
|
+
}, [s]), o ? /* @__PURE__ */ a(
|
|
652
|
+
Rt,
|
|
644
653
|
{
|
|
645
654
|
actions: [
|
|
646
655
|
{
|
|
647
656
|
label: i.action_title,
|
|
648
657
|
iconName: "credit_card_gear",
|
|
649
658
|
onClick: () => {
|
|
650
|
-
S(!0),
|
|
659
|
+
S(!0), C(v.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
651
660
|
}
|
|
652
661
|
}
|
|
653
662
|
],
|
|
654
663
|
hasDivider: !0,
|
|
655
|
-
onAccountsFilterClick: () =>
|
|
664
|
+
onAccountsFilterClick: () => C(v.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
656
665
|
onBackClick: t,
|
|
657
666
|
onMenuClick: n,
|
|
658
667
|
sx: r,
|
|
659
668
|
title: i.title,
|
|
660
669
|
children: [
|
|
661
|
-
|
|
670
|
+
p ? /* @__PURE__ */ e(Lt, {}) : /* @__PURE__ */ e(Ae, { sx: { m: 48 }, variant: "list" }),
|
|
662
671
|
/* @__PURE__ */ e(
|
|
663
672
|
ie,
|
|
664
673
|
{
|
|
665
674
|
ariaLabelClose: i.close_drawer_aria,
|
|
666
|
-
isOpen:
|
|
675
|
+
isOpen: y,
|
|
667
676
|
onClose: () => S(!1),
|
|
668
677
|
shouldShowHeaderBorders: !1,
|
|
669
678
|
title: i.action_title,
|
|
670
|
-
children: /* @__PURE__ */ e(
|
|
679
|
+
children: /* @__PURE__ */ e(_e, {})
|
|
671
680
|
}
|
|
672
681
|
),
|
|
673
682
|
/* @__PURE__ */ e(
|
|
674
|
-
|
|
683
|
+
Fe,
|
|
675
684
|
{
|
|
676
685
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
677
686
|
autoHideDuration: 3500,
|
|
678
687
|
onClose: () => l(""),
|
|
679
|
-
open: !!
|
|
680
|
-
children: /* @__PURE__ */ e(
|
|
688
|
+
open: !!m.message,
|
|
689
|
+
children: /* @__PURE__ */ e($e, { onClose: () => l(""), severity: m.severity, variant: "filled", children: m.message })
|
|
681
690
|
}
|
|
682
691
|
)
|
|
683
692
|
]
|
|
684
693
|
}
|
|
685
694
|
) : /* @__PURE__ */ e(ae, {});
|
|
686
695
|
}
|
|
687
|
-
),
|
|
688
|
-
const { recurring: t } = b(), { availableWidth: n } =
|
|
696
|
+
), At = T(() => {
|
|
697
|
+
const { recurring: t } = b(), { availableWidth: n } = Ie(), {
|
|
689
698
|
selectedDay: r,
|
|
690
699
|
selectedDayRecurrences: i,
|
|
691
700
|
setSelectedDay: o,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
setSelectedRecurrence: s,
|
|
702
|
+
setSelectedRepeatingTransactionGuid: m,
|
|
703
|
+
upcomingRecurrences: p
|
|
704
|
+
} = _(), c = (u) => {
|
|
705
|
+
m(u.repeatingTransactionGuid), s(u);
|
|
706
|
+
}, l = n < 750;
|
|
707
|
+
return /* @__PURE__ */ a(d, { flexDirection: l ? "column" : "row", width: "100%", children: [
|
|
708
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
709
|
+
!l && /* @__PURE__ */ e(X, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
700
710
|
/* @__PURE__ */ e(
|
|
701
711
|
P,
|
|
702
712
|
{
|
|
703
713
|
isMini: !0,
|
|
704
|
-
onRecurrenceClick:
|
|
714
|
+
onRecurrenceClick: c,
|
|
705
715
|
onResetClick: r ? () => o(r) : void 0,
|
|
706
|
-
recurrences: i ||
|
|
707
|
-
sx: { width:
|
|
716
|
+
recurrences: i || p.slice(0, 5),
|
|
717
|
+
sx: { width: l ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
708
718
|
title: r ? N(
|
|
709
719
|
t.day_transactions,
|
|
710
720
|
I(r, M.MONTH_DAY)
|
|
@@ -712,21 +722,21 @@ const j = {
|
|
|
712
722
|
}
|
|
713
723
|
)
|
|
714
724
|
] });
|
|
715
|
-
}),
|
|
725
|
+
}), Kn = T(
|
|
716
726
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
717
|
-
const { recurring: r } = b(), { setFilter: i } = re(), { isDataLoaded: o, loadRepeatingTransactionData:
|
|
727
|
+
const { recurring: r } = b(), { setFilter: i } = re(), { isDataLoaded: o, loadRepeatingTransactionData: s } = _(), { isInitialized: m, selectedAccountGuids: p } = U();
|
|
718
728
|
return oe({
|
|
719
729
|
widgetName: "RecurringTransactionsMiniWidget",
|
|
720
730
|
isLoaded: o
|
|
721
731
|
}), x.useEffect(() => {
|
|
722
|
-
o ||
|
|
732
|
+
o || s().finally();
|
|
723
733
|
}, []), x.useEffect(() => {
|
|
724
|
-
|
|
734
|
+
p.length > 0 && i({
|
|
725
735
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
726
|
-
accounts:
|
|
736
|
+
accounts: p
|
|
727
737
|
});
|
|
728
|
-
}, [
|
|
729
|
-
|
|
738
|
+
}, [p]), m ? /* @__PURE__ */ a(
|
|
739
|
+
Tt,
|
|
730
740
|
{
|
|
731
741
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
732
742
|
onPrimaryCtaClick: t,
|
|
@@ -736,28 +746,28 @@ const j = {
|
|
|
736
746
|
sx: n,
|
|
737
747
|
title: r.mini_title,
|
|
738
748
|
children: [
|
|
739
|
-
o ? /* @__PURE__ */ e(
|
|
740
|
-
/* @__PURE__ */ e(
|
|
749
|
+
o ? /* @__PURE__ */ e(At, {}) : /* @__PURE__ */ e(Ae, { sx: { mx: 16 }, variant: "list" }),
|
|
750
|
+
/* @__PURE__ */ e(Ne, {})
|
|
741
751
|
]
|
|
742
752
|
}
|
|
743
753
|
) : /* @__PURE__ */ e(ae, {});
|
|
744
754
|
}
|
|
745
|
-
),
|
|
755
|
+
), Et = T(() => {
|
|
746
756
|
const { recurring: t } = b();
|
|
747
|
-
return /* @__PURE__ */
|
|
748
|
-
/* @__PURE__ */ e(
|
|
749
|
-
/* @__PURE__ */
|
|
757
|
+
return /* @__PURE__ */ a(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
758
|
+
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
759
|
+
/* @__PURE__ */ a(d, { children: [
|
|
750
760
|
/* @__PURE__ */ e(Z, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
751
761
|
/* @__PURE__ */ e(Z, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
752
762
|
] })
|
|
753
763
|
] });
|
|
754
|
-
}),
|
|
764
|
+
}), Nt = ({
|
|
755
765
|
amount: t,
|
|
756
766
|
bgcolor: n,
|
|
757
767
|
isLargeScreen: r,
|
|
758
768
|
isSmallScreen: i,
|
|
759
769
|
label: o
|
|
760
|
-
}) => /* @__PURE__ */
|
|
770
|
+
}) => /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
761
771
|
/* @__PURE__ */ e(
|
|
762
772
|
G,
|
|
763
773
|
{
|
|
@@ -769,11 +779,11 @@ const j = {
|
|
|
769
779
|
}
|
|
770
780
|
}
|
|
771
781
|
),
|
|
772
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
773
783
|
!i && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: L(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
774
784
|
/* @__PURE__ */ e(h, { variant: "caption", children: o })
|
|
775
785
|
] })
|
|
776
|
-
] }),
|
|
786
|
+
] }), Gt = ({
|
|
777
787
|
upcomingRecurrences: t,
|
|
778
788
|
logoSize: n = 32,
|
|
779
789
|
maxLogos: r = 3
|
|
@@ -786,12 +796,12 @@ const j = {
|
|
|
786
796
|
position: "relative",
|
|
787
797
|
width: 64
|
|
788
798
|
},
|
|
789
|
-
children: t.map((o,
|
|
799
|
+
children: t.map((o, s) => s < r ? /* @__PURE__ */ e(
|
|
790
800
|
G,
|
|
791
801
|
{
|
|
792
802
|
sx: {
|
|
793
803
|
borderRadius: "4px",
|
|
794
|
-
left: i(
|
|
804
|
+
left: i(s),
|
|
795
805
|
outlineColor: "common.white",
|
|
796
806
|
outlineStyle: "solid",
|
|
797
807
|
outlineWidth: 2,
|
|
@@ -806,11 +816,11 @@ const j = {
|
|
|
806
816
|
}
|
|
807
817
|
)
|
|
808
818
|
},
|
|
809
|
-
`${o.categoryGuid}-${o.merchantGuid}-${
|
|
819
|
+
`${o.categoryGuid}-${o.merchantGuid}-${s}`
|
|
810
820
|
) : null)
|
|
811
821
|
}
|
|
812
822
|
);
|
|
813
|
-
},
|
|
823
|
+
}, kt = ({
|
|
814
824
|
upcomingRecurrences: t,
|
|
815
825
|
maxLogos: n = 3
|
|
816
826
|
}) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, i) => /* @__PURE__ */ e(
|
|
@@ -820,58 +830,58 @@ const j = {
|
|
|
820
830
|
merchantGuid: r.merchantGuid || ""
|
|
821
831
|
},
|
|
822
832
|
`${r.categoryGuid}-${r.merchantGuid}-${i}`
|
|
823
|
-
)) }),
|
|
824
|
-
const t = ne(), [n, { width: r }] =
|
|
833
|
+
)) }), Ot = T(() => {
|
|
834
|
+
const t = ne(), [n, { width: r }] = Dt(), {
|
|
825
835
|
upcomingRecurrences: i,
|
|
826
836
|
expenseTotal: o,
|
|
827
|
-
missedExpenseTotal:
|
|
828
|
-
paidExpenseTotal:
|
|
829
|
-
upcomingExpenseTotal:
|
|
830
|
-
} = _(), { recurring:
|
|
837
|
+
missedExpenseTotal: s,
|
|
838
|
+
paidExpenseTotal: m,
|
|
839
|
+
upcomingExpenseTotal: p
|
|
840
|
+
} = _(), { recurring: c } = b(), l = r <= 288, u = r >= 450, g = 32, C = i.length > 0, y = x.useMemo(() => L(o, o === 0 ? "0,0" : "0,0.00"), [o]), S = x.useMemo(() => {
|
|
831
841
|
const w = [
|
|
832
|
-
{ color: t.palette.success.main, percentage: `${
|
|
842
|
+
{ color: t.palette.success.main, percentage: `${m / o}` }
|
|
833
843
|
];
|
|
834
|
-
return
|
|
844
|
+
return s && w.push({
|
|
835
845
|
color: t.palette.error.main,
|
|
836
|
-
percentage: `${
|
|
846
|
+
percentage: `${s / o}`
|
|
837
847
|
}), w;
|
|
838
848
|
}, [
|
|
839
|
-
|
|
849
|
+
m,
|
|
840
850
|
o,
|
|
841
|
-
|
|
851
|
+
s,
|
|
842
852
|
t.palette.success.main,
|
|
843
853
|
t.palette.error.main
|
|
844
|
-
]), A = () =>
|
|
845
|
-
|
|
854
|
+
]), A = () => C ? l ? /* @__PURE__ */ e(
|
|
855
|
+
Gt,
|
|
846
856
|
{
|
|
847
857
|
logoSize: g,
|
|
848
858
|
maxLogos: 3,
|
|
849
859
|
upcomingRecurrences: i.slice(0, 3)
|
|
850
860
|
}
|
|
851
|
-
) : /* @__PURE__ */ e(
|
|
861
|
+
) : /* @__PURE__ */ e(kt, { maxLogos: 3, upcomingRecurrences: i.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), f = [
|
|
852
862
|
{
|
|
853
|
-
amount:
|
|
863
|
+
amount: m,
|
|
854
864
|
bgColor: "success.main",
|
|
855
|
-
label:
|
|
865
|
+
label: c.paid
|
|
856
866
|
},
|
|
857
867
|
{
|
|
858
|
-
amount:
|
|
868
|
+
amount: s,
|
|
859
869
|
bgColor: "error.main",
|
|
860
|
-
label:
|
|
870
|
+
label: c.missed
|
|
861
871
|
},
|
|
862
872
|
{
|
|
863
|
-
amount:
|
|
873
|
+
amount: p,
|
|
864
874
|
bgColor: "neutral.light",
|
|
865
|
-
label:
|
|
875
|
+
label: c.upcoming
|
|
866
876
|
}
|
|
867
877
|
];
|
|
868
|
-
return /* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ a($, { children: [
|
|
879
|
+
/* @__PURE__ */ a(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
880
|
+
/* @__PURE__ */ a(
|
|
871
881
|
d,
|
|
872
882
|
{
|
|
873
883
|
sx: [
|
|
874
|
-
|
|
884
|
+
y.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
875
885
|
{
|
|
876
886
|
alignItems: "baseline",
|
|
877
887
|
overflow: "hidden",
|
|
@@ -884,18 +894,18 @@ const j = {
|
|
|
884
894
|
h,
|
|
885
895
|
{
|
|
886
896
|
sx: { width: "100%" },
|
|
887
|
-
variant:
|
|
888
|
-
children:
|
|
897
|
+
variant: y.length >= 10 && l ? "h3" : "h2",
|
|
898
|
+
children: y
|
|
889
899
|
}
|
|
890
900
|
),
|
|
891
|
-
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children:
|
|
901
|
+
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children: c.expected })
|
|
892
902
|
]
|
|
893
903
|
}
|
|
894
904
|
),
|
|
895
905
|
A()
|
|
896
906
|
] }),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */ e(
|
|
907
|
+
/* @__PURE__ */ a(d, { sx: { pt: 12 }, children: [
|
|
908
|
+
/* @__PURE__ */ e(Le, { data: S }),
|
|
899
909
|
/* @__PURE__ */ e(
|
|
900
910
|
d,
|
|
901
911
|
{
|
|
@@ -906,11 +916,11 @@ const j = {
|
|
|
906
916
|
mt: 4
|
|
907
917
|
},
|
|
908
918
|
children: f.map((w, H) => /* @__PURE__ */ e(
|
|
909
|
-
|
|
919
|
+
Nt,
|
|
910
920
|
{
|
|
911
921
|
amount: w.amount,
|
|
912
922
|
bgcolor: w.bgColor,
|
|
913
|
-
isLargeScreen:
|
|
923
|
+
isLargeScreen: u,
|
|
914
924
|
isSmallScreen: l,
|
|
915
925
|
label: w.label
|
|
916
926
|
},
|
|
@@ -920,49 +930,49 @@ const j = {
|
|
|
920
930
|
)
|
|
921
931
|
] })
|
|
922
932
|
] });
|
|
923
|
-
}),
|
|
933
|
+
}), Vn = T(
|
|
924
934
|
({ onCTAClick: t }) => {
|
|
925
935
|
const { onEvent: n } = Y(), { isInitialized: r, selectedAccountGuids: i } = U(), {
|
|
926
936
|
loadRepeatingTransactionData: o,
|
|
927
|
-
upcomingRecurrences:
|
|
928
|
-
repeatingTransactions:
|
|
929
|
-
setDateRange:
|
|
930
|
-
isDataLoaded:
|
|
931
|
-
} = _(), { setFilter: l } = re(), { recurring:
|
|
937
|
+
upcomingRecurrences: s,
|
|
938
|
+
repeatingTransactions: m,
|
|
939
|
+
setDateRange: p,
|
|
940
|
+
isDataLoaded: c
|
|
941
|
+
} = _(), { setFilter: l } = re(), { recurring: u, budgets: g } = b();
|
|
932
942
|
oe({
|
|
933
943
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
934
|
-
isLoaded:
|
|
944
|
+
isLoaded: c
|
|
935
945
|
}), x.useEffect(() => {
|
|
936
|
-
|
|
946
|
+
c || o().finally(() => {
|
|
937
947
|
n(v.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
938
|
-
state:
|
|
948
|
+
state: s.length > 0 ? "default" : "zeroState"
|
|
939
949
|
});
|
|
940
950
|
});
|
|
941
951
|
}, []), x.useEffect(() => {
|
|
942
952
|
r && (l({
|
|
943
953
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
944
954
|
accounts: i
|
|
945
|
-
}),
|
|
955
|
+
}), p({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }));
|
|
946
956
|
}, [r, i]);
|
|
947
|
-
const
|
|
957
|
+
const C = () => {
|
|
948
958
|
n(
|
|
949
|
-
|
|
959
|
+
s.length > 0 ? v.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : v.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
950
960
|
), t();
|
|
951
961
|
};
|
|
952
|
-
if (!r || !
|
|
953
|
-
const
|
|
962
|
+
if (!r || !c) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
963
|
+
const y = !m?.length;
|
|
954
964
|
return /* @__PURE__ */ e(
|
|
955
|
-
|
|
965
|
+
_t,
|
|
956
966
|
{
|
|
957
967
|
className: "mx-recurring-transaction-microwidget",
|
|
958
|
-
ctaLabel:
|
|
959
|
-
onCTAClick:
|
|
960
|
-
title:
|
|
961
|
-
children:
|
|
968
|
+
ctaLabel: y ? g.get_started_cta : u.primary_cta,
|
|
969
|
+
onCTAClick: C,
|
|
970
|
+
title: u.recurring_expenses,
|
|
971
|
+
children: y ? /* @__PURE__ */ e(Et, {}) : /* @__PURE__ */ e(Ot, {})
|
|
962
972
|
}
|
|
963
973
|
);
|
|
964
974
|
}
|
|
965
|
-
),
|
|
975
|
+
), qn = T(
|
|
966
976
|
({ isOpen: t, onClose: n, selectedTab: r }) => {
|
|
967
977
|
const { cashflow: i } = b();
|
|
968
978
|
return /* @__PURE__ */ e(
|
|
@@ -972,19 +982,19 @@ const j = {
|
|
|
972
982
|
isOpen: t,
|
|
973
983
|
onClose: n,
|
|
974
984
|
title: i.cashflow_settings,
|
|
975
|
-
children: /* @__PURE__ */ e(
|
|
985
|
+
children: /* @__PURE__ */ e(_e, { defaultSelectedTab: r })
|
|
976
986
|
}
|
|
977
987
|
);
|
|
978
988
|
}
|
|
979
989
|
);
|
|
980
990
|
export {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
991
|
+
er as AddRecurringTransactionDetails,
|
|
992
|
+
Jn as ManageExpenses,
|
|
993
|
+
tr as ManageIncome,
|
|
994
|
+
_e as RecurringSettings,
|
|
995
|
+
qn as RecurringSettingsDrawer,
|
|
996
|
+
Vn as RecurringTransactionsMicroWidget,
|
|
997
|
+
Kn as RecurringTransactionsMiniWidget,
|
|
998
|
+
jn as RecurringTransactionsWidget,
|
|
999
|
+
nr as SelectTransaction
|
|
990
1000
|
};
|