@mx-cartographer/experiences 9.0.15 → 9.0.16-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 +4 -0
- package/dist/{AccountDetailsDrawer-BRA7SYQ_.mjs → AccountDetailsDrawer-CZPeLsCq.mjs} +2 -2
- package/dist/{EmbeddedCard-BxgB26dd.mjs → EmbeddedCard-DH8vQ3qN.mjs} +183 -181
- package/dist/{ExportCsvAction-BV69DnpC.mjs → ExportCsvAction-C9KWH3Az.mjs} +1 -1
- package/dist/ListItemWrapper-DRse79Iu.mjs +43 -0
- package/dist/{ManageIncome-Dn9Y3Z2U.mjs → ManageIncome-Dcsnnz86.mjs} +7 -7
- package/dist/{RecurringSettings-BWlg0zsv.mjs → RecurringSettings-D8hBbXV_.mjs} +1 -1
- package/dist/{TransactionDetails-DQ_eE7M4.mjs → TransactionDetails-roZ5xLq8.mjs} +1 -1
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +4 -4
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/index.es.js +1 -1
- package/dist/finstrong/index.es.js +4 -4
- package/dist/insights/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +121 -111
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +3 -3
- package/package.json +1 -1
- package/dist/ListItemWrapper-BHIbqx7E.mjs +0 -42
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import x from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
@@ -6,10 +6,10 @@ 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
|
|
9
|
+
import Be from "@mui/material/Alert";
|
|
10
10
|
import Fe from "@mui/material/Snackbar";
|
|
11
|
-
import { R as _e } from "../RecurringSettings-
|
|
12
|
-
import { M as Jn } from "../RecurringSettings-
|
|
11
|
+
import { R as _e } from "../RecurringSettings-D8hBbXV_.mjs";
|
|
12
|
+
import { M as Jn } from "../RecurringSettings-D8hBbXV_.mjs";
|
|
13
13
|
import { addMonths as Ue } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Ye } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as je } from "date-fns/isBefore";
|
|
@@ -20,7 +20,7 @@ import fe from "@mui/material/Tab";
|
|
|
20
20
|
import Ke from "@mui/material/Tabs";
|
|
21
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
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
|
|
23
|
+
import { g as nt, L as O, b as G } from "../Localization-DnoVyBNK.mjs";
|
|
24
24
|
import { getWeeksInMonth as xe } from "date-fns/getWeeksInMonth";
|
|
25
25
|
import { enCA as rt } from "date-fns/locale/en-CA";
|
|
26
26
|
import { enUS as be } from "date-fns/locale/en-US";
|
|
@@ -49,11 +49,11 @@ import xt from "@mui/material/ListItemAvatar";
|
|
|
49
49
|
import bt from "@mui/material/ListItemButton";
|
|
50
50
|
import yt from "@mui/material/ListItemText";
|
|
51
51
|
import { f as L } from "../NumberFormatting--XMeeBfr.mjs";
|
|
52
|
-
import
|
|
52
|
+
import N from "@mui/material/Box";
|
|
53
53
|
import { u as ve } from "../useScreenSize-mWpmnh5w.mjs";
|
|
54
54
|
import { S as Le } from "../StatusBar-CPfSXe80.mjs";
|
|
55
|
-
import { d as Ct } from "../ManageIncome-
|
|
56
|
-
import { c as er, M as tr, S as nr } from "../ManageIncome-
|
|
55
|
+
import { d as Ct } from "../ManageIncome-Dcsnnz86.mjs";
|
|
56
|
+
import { c as er, M as tr, S as nr } from "../ManageIncome-Dcsnnz86.mjs";
|
|
57
57
|
import { D as ie } from "../Drawer-DsnW2o0v.mjs";
|
|
58
58
|
import { S as Ae } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
59
59
|
import { u as oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
@@ -106,18 +106,18 @@ const j = {
|
|
|
106
106
|
}
|
|
107
107
|
), St = T(
|
|
108
108
|
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
109
|
-
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences: s, setSelectedDay: m } = _(),
|
|
109
|
+
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences: s, setSelectedDay: m } = _(), a = x.useMemo(
|
|
110
110
|
() => s.filter((f) => o.includes(f.accountGuid)),
|
|
111
111
|
[o, s]
|
|
112
112
|
).filter(
|
|
113
113
|
(f) => dt(f.occurredOnDate || f.expectedDate, t)
|
|
114
|
-
), l =
|
|
114
|
+
), l = a.some(
|
|
115
115
|
(f) => f.type !== E.Income && f.status === D.Upcoming
|
|
116
|
-
), u =
|
|
116
|
+
), u = a.some(
|
|
117
117
|
(f) => f.type !== E.Income && f.status === D.Missed
|
|
118
|
-
), g =
|
|
118
|
+
), g = a.some(
|
|
119
119
|
(f) => f.type !== E.Income && f.status === D.Paid
|
|
120
|
-
), y =
|
|
120
|
+
), y = a.some((f) => f.type === E.Income), C = (l ? 1 : 0) + (u ? 1 : 0) + (g ? 1 : 0) + (y ? 1 : 0), S = [
|
|
121
121
|
g && i.paid,
|
|
122
122
|
u && i.missed,
|
|
123
123
|
l && i.upcoming,
|
|
@@ -126,7 +126,7 @@ const j = {
|
|
|
126
126
|
return /* @__PURE__ */ e(
|
|
127
127
|
ut,
|
|
128
128
|
{
|
|
129
|
-
badgeContent:
|
|
129
|
+
badgeContent: a.length > 0 && /* @__PURE__ */ c(B, { children: [
|
|
130
130
|
u && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
131
131
|
g && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
132
132
|
l && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
@@ -163,12 +163,12 @@ const j = {
|
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
),
|
|
166
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ c(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
167
167
|
/* @__PURE__ */ e(t, {}),
|
|
168
168
|
/* @__PURE__ */ e(h, { variant: "caption", children: n })
|
|
169
169
|
] }), wt = T(() => {
|
|
170
170
|
const { recurring: t } = b();
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ c(
|
|
172
172
|
d,
|
|
173
173
|
{
|
|
174
174
|
alignItems: "center",
|
|
@@ -178,10 +178,10 @@ const j = {
|
|
|
178
178
|
justifyContent: "center",
|
|
179
179
|
mt: 12,
|
|
180
180
|
children: [
|
|
181
|
-
/* @__PURE__ */ e(
|
|
182
|
-
/* @__PURE__ */ e(
|
|
183
|
-
/* @__PURE__ */ e(
|
|
184
|
-
/* @__PURE__ */ e(
|
|
181
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
182
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
183
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
184
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
);
|
|
@@ -201,8 +201,8 @@ const j = {
|
|
|
201
201
|
m(xe(u) * W + Re), o({
|
|
202
202
|
start: k(u),
|
|
203
203
|
end: z(u)
|
|
204
|
-
}),
|
|
205
|
-
},
|
|
204
|
+
}), a(u), n(v.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
205
|
+
}, a = (u) => {
|
|
206
206
|
u && requestAnimationFrame(() => {
|
|
207
207
|
const g = document.getElementById("recurrence-list");
|
|
208
208
|
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
@@ -211,7 +211,7 @@ const j = {
|
|
|
211
211
|
ct,
|
|
212
212
|
{
|
|
213
213
|
minDate: k(/* @__PURE__ */ new Date()),
|
|
214
|
-
onChange:
|
|
214
|
+
onChange: a,
|
|
215
215
|
onMonthChange: p,
|
|
216
216
|
showDaysOutsideCurrentMonth: !0,
|
|
217
217
|
slots: {
|
|
@@ -264,7 +264,7 @@ const j = {
|
|
|
264
264
|
views: ["day"]
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
|
-
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ c(lt, { adapterLocale: It(), dateAdapter: st, children: [
|
|
268
268
|
i && l,
|
|
269
269
|
!i && l,
|
|
270
270
|
/* @__PURE__ */ e(h, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
@@ -284,7 +284,7 @@ const j = {
|
|
|
284
284
|
}, vt = (t, n) => {
|
|
285
285
|
switch (t.status) {
|
|
286
286
|
case D.Paid:
|
|
287
|
-
return t.expectedDate ?
|
|
287
|
+
return t.expectedDate ? G(
|
|
288
288
|
n.paid_on,
|
|
289
289
|
I(
|
|
290
290
|
t.occurredOnDate || t.expectedDate,
|
|
@@ -292,12 +292,12 @@ const j = {
|
|
|
292
292
|
)
|
|
293
293
|
) : n.paid;
|
|
294
294
|
case D.Missed:
|
|
295
|
-
return
|
|
295
|
+
return G(
|
|
296
296
|
n.missed_on,
|
|
297
297
|
I(t.expectedDate, M.MONTH_DAY)
|
|
298
298
|
);
|
|
299
299
|
case D.Upcoming:
|
|
300
|
-
return
|
|
300
|
+
return G(
|
|
301
301
|
n.upcoming_on,
|
|
302
302
|
I(t.expectedDate, M.MONTH_DAY)
|
|
303
303
|
);
|
|
@@ -314,10 +314,10 @@ const j = {
|
|
|
314
314
|
const { recurring: o } = b(), { detailedRepeatingTransactions: s } = _(), m = x.useMemo(
|
|
315
315
|
() => s.find((C) => C.guid === t.repeatingTransactionGuid),
|
|
316
316
|
[t, s]
|
|
317
|
-
), p = t.type === E.Income,
|
|
317
|
+
), p = t.type === E.Income, a = t.status === D.Paid, l = t.status === D.Missed, u = t.status === D.Upcoming;
|
|
318
318
|
let g = o.paid?.toLowerCase();
|
|
319
319
|
return l ? g = o.missed?.toLowerCase() : u && (g = i ? ye(o, m || {}, !0) : ye(o, m || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
320
|
-
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(bt, { onClick: () => {
|
|
321
321
|
r(t);
|
|
322
322
|
}, children: [
|
|
323
323
|
/* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(
|
|
@@ -327,23 +327,23 @@ const j = {
|
|
|
327
327
|
merchantGuid: t.merchantGuid
|
|
328
328
|
}
|
|
329
329
|
) }),
|
|
330
|
-
/* @__PURE__ */ e(yt, { children: /* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ e(yt, { children: /* @__PURE__ */ c(
|
|
331
331
|
d,
|
|
332
332
|
{
|
|
333
333
|
direction: "row",
|
|
334
334
|
gap: 4,
|
|
335
335
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
336
336
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ c(d, { direction: "column", width: "50%", children: [
|
|
338
338
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
339
|
-
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
340
340
|
Mt(t),
|
|
341
341
|
/* @__PURE__ */ e(h, { variant: "caption", children: vt(t, o) })
|
|
342
|
-
] }) : /* @__PURE__ */
|
|
342
|
+
] }) : /* @__PURE__ */ c(B, { children: [
|
|
343
343
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
344
344
|
Qe,
|
|
345
345
|
{
|
|
346
|
-
alt:
|
|
346
|
+
alt: "",
|
|
347
347
|
institutionGuid: t.institutionGuid,
|
|
348
348
|
size: 12
|
|
349
349
|
}
|
|
@@ -351,12 +351,12 @@ const j = {
|
|
|
351
351
|
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
352
352
|
] }) })
|
|
353
353
|
] }),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ c(d, { alignItems: "flex-end", width: "100%", children: [
|
|
355
|
+
/* @__PURE__ */ c(h, { bold: !0, color: p ? "success.main" : "text.primary", variant: "body1", children: [
|
|
356
356
|
p ? "+" : "",
|
|
357
357
|
L(t.amount, "0,0.00")
|
|
358
358
|
] }),
|
|
359
|
-
!n && /* @__PURE__ */
|
|
359
|
+
!n && /* @__PURE__ */ c(
|
|
360
360
|
d,
|
|
361
361
|
{
|
|
362
362
|
direction: "row",
|
|
@@ -368,7 +368,7 @@ const j = {
|
|
|
368
368
|
width: "100%"
|
|
369
369
|
},
|
|
370
370
|
children: [
|
|
371
|
-
|
|
371
|
+
a && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
372
372
|
l && /* @__PURE__ */ e(Se, { color: "error", filled: !0, size: 12 }),
|
|
373
373
|
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: g })
|
|
374
374
|
]
|
|
@@ -389,8 +389,8 @@ const j = {
|
|
|
389
389
|
title: s
|
|
390
390
|
}) => {
|
|
391
391
|
const { recurring: m } = b(), p = x.useMemo(() => pt(t), [t]);
|
|
392
|
-
return /* @__PURE__ */
|
|
393
|
-
s && /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ c(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, tabIndex: -1, children: [
|
|
393
|
+
s && /* @__PURE__ */ c(
|
|
394
394
|
d,
|
|
395
395
|
{
|
|
396
396
|
sx: {
|
|
@@ -405,23 +405,33 @@ const j = {
|
|
|
405
405
|
]
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
|
-
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { children: n ? t.map((
|
|
408
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { "aria-label": s, children: n ? t.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
409
409
|
/* @__PURE__ */ e(
|
|
410
410
|
Te,
|
|
411
411
|
{
|
|
412
412
|
isMini: n,
|
|
413
413
|
onRecurrenceClick: i,
|
|
414
|
-
recurrence:
|
|
414
|
+
recurrence: a
|
|
415
415
|
}
|
|
416
416
|
),
|
|
417
417
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
418
|
-
] }, `recurrence-${l}`)) : p.map((
|
|
418
|
+
] }, `recurrence-${l}`)) : p.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
419
419
|
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
|
|
420
420
|
Ce,
|
|
421
421
|
{
|
|
422
|
-
|
|
422
|
+
"aria-labelledby": `date-group-header-${a.id}`,
|
|
423
|
+
subheader: /* @__PURE__ */ e(
|
|
424
|
+
ft,
|
|
425
|
+
{
|
|
426
|
+
"aria-hidden": "true",
|
|
427
|
+
id: `date-group-header-${a.id}`,
|
|
428
|
+
role: "presentation",
|
|
429
|
+
sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 },
|
|
430
|
+
children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: I(a.date, M.DAY_OF_WEEK_MONTH_DAY) })
|
|
431
|
+
}
|
|
432
|
+
),
|
|
423
433
|
sx: { width: "100%" },
|
|
424
|
-
children:
|
|
434
|
+
children: a.recurrences.map((u, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
425
435
|
Te,
|
|
426
436
|
{
|
|
427
437
|
isMini: n,
|
|
@@ -430,39 +440,39 @@ const j = {
|
|
|
430
440
|
}
|
|
431
441
|
) }, `day-recurrence-${g}`))
|
|
432
442
|
}
|
|
433
|
-
) },
|
|
443
|
+
) }, a.id),
|
|
434
444
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
435
445
|
] }, `recurrence-${l}`)) })
|
|
436
446
|
] });
|
|
437
447
|
}
|
|
438
448
|
), De = T(
|
|
439
449
|
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: s, upcoming: m }) => {
|
|
440
|
-
const p = ne(), { isSmallMobile:
|
|
450
|
+
const p = ne(), { isSmallMobile: a } = ve(), { recurring: l } = b(), u = x.useMemo(() => {
|
|
441
451
|
const g = [{ color: p.palette.success.main, percentage: `${i / t}` }];
|
|
442
452
|
return r && g.push({ color: p.palette.error.main, percentage: `${r / t}` }), g;
|
|
443
453
|
}, [i, t, r]);
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ c(d, { children: [
|
|
455
|
+
/* @__PURE__ */ c(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
446
456
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${s})` }),
|
|
447
457
|
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
448
458
|
] }),
|
|
449
459
|
/* @__PURE__ */ e(Le, { data: u, height: 12 }),
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */ e(
|
|
452
|
-
!
|
|
460
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
461
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
462
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
453
463
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
454
|
-
r !== void 0 && /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
!
|
|
464
|
+
r !== void 0 && /* @__PURE__ */ c(B, { children: [
|
|
465
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
466
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
457
467
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
458
468
|
] }),
|
|
459
|
-
/* @__PURE__ */ e(
|
|
460
|
-
!
|
|
469
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
470
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
|
|
461
471
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming?.toLowerCase() })
|
|
462
472
|
] })
|
|
463
473
|
] });
|
|
464
474
|
}
|
|
465
|
-
),
|
|
475
|
+
), Ge = T(() => {
|
|
466
476
|
const { recurring: t } = b(), {
|
|
467
477
|
selectedRecurrence: n,
|
|
468
478
|
selectedRepeatingTransaction: r,
|
|
@@ -492,7 +502,7 @@ const j = {
|
|
|
492
502
|
const { recurring: t } = b(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: i, isMobile: o } = ve(n), { onEvent: s } = Y(), {
|
|
493
503
|
currentMonthExpenses: m,
|
|
494
504
|
currentMonthIncome: p,
|
|
495
|
-
dateRange:
|
|
505
|
+
dateRange: a,
|
|
496
506
|
expenseTotal: l,
|
|
497
507
|
incomeTotal: u,
|
|
498
508
|
missedExpenseTotal: g,
|
|
@@ -504,11 +514,11 @@ const j = {
|
|
|
504
514
|
setDateRange: w,
|
|
505
515
|
setSelectedRecurrence: H,
|
|
506
516
|
setSelectedRepeatingTransactionGuid: ue,
|
|
507
|
-
upcomingExpenseTotal:
|
|
517
|
+
upcomingExpenseTotal: Ne,
|
|
508
518
|
upcomingIncomeTotal: ke,
|
|
509
519
|
upcomingRecurrences: me
|
|
510
|
-
} = _(), [V, Oe] = x.useState(0), We = je(
|
|
511
|
-
Oe(
|
|
520
|
+
} = _(), [V, Oe] = x.useState(0), We = je(a.start, /* @__PURE__ */ new Date()), Pe = (R, $e) => {
|
|
521
|
+
Oe($e);
|
|
512
522
|
}, pe = (R) => {
|
|
513
523
|
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
514
524
|
transaction_guid: R.transaction?.guid
|
|
@@ -518,19 +528,19 @@ const j = {
|
|
|
518
528
|
transaction_guid: R.transaction?.guid
|
|
519
529
|
});
|
|
520
530
|
}, ze = () => {
|
|
521
|
-
const R = Ue(
|
|
531
|
+
const R = Ue(a.start, 1);
|
|
522
532
|
w({
|
|
523
533
|
start: k(R),
|
|
524
534
|
end: z(R)
|
|
525
535
|
});
|
|
526
536
|
}, He = () => {
|
|
527
|
-
const R = Ye(
|
|
537
|
+
const R = Ye(a.start, 1);
|
|
528
538
|
w({
|
|
529
539
|
start: k(R),
|
|
530
540
|
end: z(R)
|
|
531
541
|
});
|
|
532
542
|
};
|
|
533
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ c(
|
|
534
544
|
q,
|
|
535
545
|
{
|
|
536
546
|
container: !0,
|
|
@@ -538,14 +548,14 @@ const j = {
|
|
|
538
548
|
pt: 16
|
|
539
549
|
},
|
|
540
550
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */ e(tt, { variant: "h3", children:
|
|
551
|
+
/* @__PURE__ */ c(q, { size: { sm: 12, md: "grow" }, width: "100%", children: [
|
|
552
|
+
/* @__PURE__ */ c(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
553
|
+
/* @__PURE__ */ c(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
554
|
+
/* @__PURE__ */ e(tt, { variant: "h3", children: G(
|
|
545
555
|
t.header_title,
|
|
546
|
-
I(
|
|
556
|
+
I(a.start, M.MONTH_LONG)
|
|
547
557
|
) }),
|
|
548
|
-
!r && /* @__PURE__ */
|
|
558
|
+
!r && /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
549
559
|
/* @__PURE__ */ e(
|
|
550
560
|
he,
|
|
551
561
|
{
|
|
@@ -566,7 +576,7 @@ const j = {
|
|
|
566
576
|
paid: C,
|
|
567
577
|
title: t.expenses,
|
|
568
578
|
total: m.length,
|
|
569
|
-
upcoming:
|
|
579
|
+
upcoming: Ne
|
|
570
580
|
}
|
|
571
581
|
),
|
|
572
582
|
/* @__PURE__ */ e(
|
|
@@ -589,8 +599,8 @@ const j = {
|
|
|
589
599
|
}
|
|
590
600
|
)
|
|
591
601
|
] }),
|
|
592
|
-
!r && /* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
602
|
+
!r && /* @__PURE__ */ c(d, { sx: { px: o ? 0 : 24 }, children: [
|
|
603
|
+
/* @__PURE__ */ c(Ke, { onChange: Pe, value: V, variant: "fullWidth", children: [
|
|
594
604
|
/* @__PURE__ */ e(
|
|
595
605
|
fe,
|
|
596
606
|
{
|
|
@@ -620,38 +630,38 @@ const j = {
|
|
|
620
630
|
)
|
|
621
631
|
] })
|
|
622
632
|
] }),
|
|
623
|
-
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */
|
|
633
|
+
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ c(d, { gap: 24, children: [
|
|
624
634
|
/* @__PURE__ */ e(Ee, {}),
|
|
625
635
|
/* @__PURE__ */ e(
|
|
626
636
|
P,
|
|
627
637
|
{
|
|
628
638
|
onRecurrenceClick: ge,
|
|
629
639
|
recurrences: f || y,
|
|
630
|
-
title: A ?
|
|
640
|
+
title: A ? G(
|
|
631
641
|
t.day_transactions,
|
|
632
642
|
I(A, M.MONTH_DAY)
|
|
633
643
|
) : t.past_transactions
|
|
634
644
|
}
|
|
635
645
|
)
|
|
636
646
|
] }) }),
|
|
637
|
-
/* @__PURE__ */ e(
|
|
647
|
+
/* @__PURE__ */ e(Ge, {})
|
|
638
648
|
]
|
|
639
649
|
}
|
|
640
650
|
);
|
|
641
651
|
}), jn = T(
|
|
642
652
|
({ onBackClick: t, onMenuClick: n, sx: r = {} }) => {
|
|
643
|
-
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids: s } = U(), { alert: m, isDataLoaded: p, loadRepeatingTransactionData:
|
|
653
|
+
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids: s } = U(), { alert: m, isDataLoaded: p, loadRepeatingTransactionData: a, setAlert: l, setDateRange: u } = _(), { setFilter: g } = re(), { onEvent: y } = Y(), [C, S] = x.useState(!1);
|
|
644
654
|
return oe({
|
|
645
655
|
widgetName: "RecurringTransactionsWidget",
|
|
646
656
|
isLoaded: p
|
|
647
657
|
}), x.useEffect(() => {
|
|
648
|
-
p ||
|
|
658
|
+
p || a().finally();
|
|
649
659
|
}, []), x.useEffect(() => {
|
|
650
660
|
g({
|
|
651
661
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
652
662
|
accounts: s
|
|
653
663
|
}), u({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) });
|
|
654
|
-
}, [s]), o ? /* @__PURE__ */
|
|
664
|
+
}, [s]), o ? /* @__PURE__ */ c(
|
|
655
665
|
Rt,
|
|
656
666
|
{
|
|
657
667
|
actions: [
|
|
@@ -689,7 +699,7 @@ const j = {
|
|
|
689
699
|
autoHideDuration: 3500,
|
|
690
700
|
onClose: () => l(""),
|
|
691
701
|
open: !!m.message,
|
|
692
|
-
children: /* @__PURE__ */ e(
|
|
702
|
+
children: /* @__PURE__ */ e(Be, { onClose: () => l(""), severity: m.severity, variant: "filled", children: m.message })
|
|
693
703
|
}
|
|
694
704
|
)
|
|
695
705
|
]
|
|
@@ -704,21 +714,21 @@ const j = {
|
|
|
704
714
|
setSelectedRecurrence: s,
|
|
705
715
|
setSelectedRepeatingTransactionGuid: m,
|
|
706
716
|
upcomingRecurrences: p
|
|
707
|
-
} = _(),
|
|
717
|
+
} = _(), a = (u) => {
|
|
708
718
|
m(u.repeatingTransactionGuid), s(u);
|
|
709
719
|
}, l = n < 750;
|
|
710
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ c(d, { flexDirection: l ? "column" : "row", width: "100%", children: [
|
|
711
721
|
/* @__PURE__ */ e(Ee, {}),
|
|
712
722
|
!l && /* @__PURE__ */ e(X, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
713
723
|
/* @__PURE__ */ e(
|
|
714
724
|
P,
|
|
715
725
|
{
|
|
716
726
|
isMini: !0,
|
|
717
|
-
onRecurrenceClick:
|
|
727
|
+
onRecurrenceClick: a,
|
|
718
728
|
onResetClick: r ? () => o(r) : void 0,
|
|
719
729
|
recurrences: i || p.slice(0, 5),
|
|
720
730
|
sx: { width: l ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
721
|
-
title: r ?
|
|
731
|
+
title: r ? G(
|
|
722
732
|
t.day_transactions,
|
|
723
733
|
I(r, M.MONTH_DAY)
|
|
724
734
|
) : t.upcoming_activity
|
|
@@ -738,7 +748,7 @@ const j = {
|
|
|
738
748
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
739
749
|
accounts: p
|
|
740
750
|
});
|
|
741
|
-
}, [p]), m ? /* @__PURE__ */
|
|
751
|
+
}, [p]), m ? /* @__PURE__ */ c(
|
|
742
752
|
Tt,
|
|
743
753
|
{
|
|
744
754
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
@@ -750,29 +760,29 @@ const j = {
|
|
|
750
760
|
title: r.mini_title,
|
|
751
761
|
children: [
|
|
752
762
|
o ? /* @__PURE__ */ e(At, {}) : /* @__PURE__ */ e(Ae, { sx: { mx: 16 }, variant: "list" }),
|
|
753
|
-
/* @__PURE__ */ e(
|
|
763
|
+
/* @__PURE__ */ e(Ge, {})
|
|
754
764
|
]
|
|
755
765
|
}
|
|
756
766
|
) : /* @__PURE__ */ e(ae, {});
|
|
757
767
|
}
|
|
758
768
|
), Et = T(() => {
|
|
759
769
|
const { recurring: t } = b();
|
|
760
|
-
return /* @__PURE__ */
|
|
770
|
+
return /* @__PURE__ */ c(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
761
771
|
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
762
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ c(d, { children: [
|
|
763
773
|
/* @__PURE__ */ e(Z, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
764
774
|
/* @__PURE__ */ e(Z, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
765
775
|
] })
|
|
766
776
|
] });
|
|
767
|
-
}),
|
|
777
|
+
}), Gt = ({
|
|
768
778
|
amount: t,
|
|
769
779
|
bgcolor: n,
|
|
770
780
|
isLargeScreen: r,
|
|
771
781
|
isSmallScreen: i,
|
|
772
782
|
label: o
|
|
773
|
-
}) => /* @__PURE__ */
|
|
783
|
+
}) => /* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
774
784
|
/* @__PURE__ */ e(
|
|
775
|
-
|
|
785
|
+
N,
|
|
776
786
|
{
|
|
777
787
|
sx: {
|
|
778
788
|
borderRadius: "2px",
|
|
@@ -782,25 +792,25 @@ const j = {
|
|
|
782
792
|
}
|
|
783
793
|
}
|
|
784
794
|
),
|
|
785
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
786
796
|
!i && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: L(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
787
797
|
/* @__PURE__ */ e(h, { variant: "caption", children: o })
|
|
788
798
|
] })
|
|
789
|
-
] }),
|
|
799
|
+
] }), Nt = ({
|
|
790
800
|
upcomingRecurrences: t,
|
|
791
801
|
logoSize: n = 32,
|
|
792
802
|
maxLogos: r = 3
|
|
793
803
|
}) => {
|
|
794
804
|
const i = (o) => o * (n / 2);
|
|
795
805
|
return /* @__PURE__ */ e(
|
|
796
|
-
|
|
806
|
+
N,
|
|
797
807
|
{
|
|
798
808
|
sx: {
|
|
799
809
|
position: "relative",
|
|
800
810
|
width: 64
|
|
801
811
|
},
|
|
802
812
|
children: t.map((o, s) => s < r ? /* @__PURE__ */ e(
|
|
803
|
-
|
|
813
|
+
N,
|
|
804
814
|
{
|
|
805
815
|
sx: {
|
|
806
816
|
borderRadius: "4px",
|
|
@@ -840,7 +850,7 @@ const j = {
|
|
|
840
850
|
missedExpenseTotal: s,
|
|
841
851
|
paidExpenseTotal: m,
|
|
842
852
|
upcomingExpenseTotal: p
|
|
843
|
-
} = _(), { recurring:
|
|
853
|
+
} = _(), { recurring: a } = b(), l = r <= 288, u = r >= 450, g = 32, y = i.length > 0, C = x.useMemo(() => L(o, o === 0 ? "0,0" : "0,0.00"), [o]), S = x.useMemo(() => {
|
|
844
854
|
const w = [
|
|
845
855
|
{ color: t.palette.success.main, percentage: `${m / o}` }
|
|
846
856
|
];
|
|
@@ -855,7 +865,7 @@ const j = {
|
|
|
855
865
|
t.palette.success.main,
|
|
856
866
|
t.palette.error.main
|
|
857
867
|
]), A = () => y ? l ? /* @__PURE__ */ e(
|
|
858
|
-
|
|
868
|
+
Nt,
|
|
859
869
|
{
|
|
860
870
|
logoSize: g,
|
|
861
871
|
maxLogos: 3,
|
|
@@ -865,22 +875,22 @@ const j = {
|
|
|
865
875
|
{
|
|
866
876
|
amount: m,
|
|
867
877
|
bgColor: "success.main",
|
|
868
|
-
label:
|
|
878
|
+
label: a.paid
|
|
869
879
|
},
|
|
870
880
|
{
|
|
871
881
|
amount: s,
|
|
872
882
|
bgColor: "error.main",
|
|
873
|
-
label:
|
|
883
|
+
label: a.missed
|
|
874
884
|
},
|
|
875
885
|
{
|
|
876
886
|
amount: p,
|
|
877
887
|
bgColor: "neutral.light",
|
|
878
|
-
label:
|
|
888
|
+
label: a.upcoming
|
|
879
889
|
}
|
|
880
890
|
];
|
|
881
|
-
return /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
891
|
+
return /* @__PURE__ */ c(B, { children: [
|
|
892
|
+
/* @__PURE__ */ c(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
893
|
+
/* @__PURE__ */ c(
|
|
884
894
|
d,
|
|
885
895
|
{
|
|
886
896
|
sx: [
|
|
@@ -901,13 +911,13 @@ const j = {
|
|
|
901
911
|
children: C
|
|
902
912
|
}
|
|
903
913
|
),
|
|
904
|
-
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children:
|
|
914
|
+
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children: a.expected })
|
|
905
915
|
]
|
|
906
916
|
}
|
|
907
917
|
),
|
|
908
918
|
A()
|
|
909
919
|
] }),
|
|
910
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ c(d, { sx: { pt: 12 }, children: [
|
|
911
921
|
/* @__PURE__ */ e(Le, { data: S }),
|
|
912
922
|
/* @__PURE__ */ e(
|
|
913
923
|
d,
|
|
@@ -919,7 +929,7 @@ const j = {
|
|
|
919
929
|
mt: 4
|
|
920
930
|
},
|
|
921
931
|
children: f.map((w, H) => /* @__PURE__ */ e(
|
|
922
|
-
|
|
932
|
+
Gt,
|
|
923
933
|
{
|
|
924
934
|
amount: w.amount,
|
|
925
935
|
bgcolor: w.bgColor,
|
|
@@ -940,13 +950,13 @@ const j = {
|
|
|
940
950
|
upcomingRecurrences: s,
|
|
941
951
|
repeatingTransactions: m,
|
|
942
952
|
setDateRange: p,
|
|
943
|
-
isDataLoaded:
|
|
953
|
+
isDataLoaded: a
|
|
944
954
|
} = _(), { setFilter: l } = re(), { recurring: u, budgets: g } = b();
|
|
945
955
|
oe({
|
|
946
956
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
947
|
-
isLoaded:
|
|
957
|
+
isLoaded: a
|
|
948
958
|
}), x.useEffect(() => {
|
|
949
|
-
|
|
959
|
+
a || o().finally(() => {
|
|
950
960
|
n(v.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
951
961
|
state: s.length > 0 ? "default" : "zeroState"
|
|
952
962
|
});
|
|
@@ -962,7 +972,7 @@ const j = {
|
|
|
962
972
|
s.length > 0 ? v.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : v.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
963
973
|
), t();
|
|
964
974
|
};
|
|
965
|
-
if (!r || !
|
|
975
|
+
if (!r || !a) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
966
976
|
const C = !m?.length;
|
|
967
977
|
return /* @__PURE__ */ e(
|
|
968
978
|
_t,
|