@mx-cartographer/experiences 7.0.59-alpha.al1 → 7.0.59
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 +5 -1
- package/dist/{EmptyState-w2yYDuKG.mjs → EmptyState-DsXpMcro.mjs} +26 -24
- package/dist/budgets/index.es.js +1 -1
- package/dist/cashflow/index.es.js +143 -142
- package/dist/common/components/EmptyState.d.ts +1 -0
- package/dist/common/index.es.js +1 -1
- package/dist/goals/index.es.js +1 -1
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/index.es.js +10 -10
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +107 -107
- package/dist/trends/index.es.js +351 -350
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as X } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
@@ -27,8 +27,8 @@ import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProv
|
|
|
27
27
|
import { isSameDay as nt } from "date-fns/isSameDay";
|
|
28
28
|
import it from "@mui/material/Badge";
|
|
29
29
|
import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as D, b as
|
|
30
|
+
import { I as Z } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as D, b as q, j as I, g as J, p as Oe, d as he, h as fe } from "../hooks-CE2TKk4a.mjs";
|
|
32
32
|
import { c as M, a as S, g as Ie, f as ot } from "../RecurringTransactions-DTUx9VN1.mjs";
|
|
33
33
|
import { T as B } from "../RecurringTransactionsStore-Djo9IeDd.mjs";
|
|
34
34
|
import { R as Nn } from "../RecurringTransactionsStore-Djo9IeDd.mjs";
|
|
@@ -50,7 +50,7 @@ import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
|
|
|
50
50
|
import O from "@mui/material/Box";
|
|
51
51
|
import { S as We } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
52
|
import { u as ye } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
-
import { L as
|
|
53
|
+
import { L as V } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
56
|
import { M as ht } from "../MicroWidgetContainer-C4QQHfD7.mjs";
|
|
@@ -58,17 +58,17 @@ const Q = {
|
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
}, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
61
|
+
}, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...Q } }) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(
|
|
62
62
|
Ye,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
65
|
sx: { color: "categories.income", fontSize: n, ...Q }
|
|
66
66
|
}
|
|
67
|
-
) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
67
|
+
) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ge, { color: "error", filled: !0, sx: { fontSize: n, ...Q } }) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...Q } }) }), ft = T(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring:
|
|
70
|
-
() => l.filter((d) =>
|
|
71
|
-
[
|
|
69
|
+
const { recurring: r } = D(), { selectedAccountGuids: o } = q(), { recurrences: l, setSelectedDay: m } = I(), s = h.useMemo(
|
|
70
|
+
() => l.filter((d) => o.includes(d.accountGuid)),
|
|
71
|
+
[o, l]
|
|
72
72
|
).filter(
|
|
73
73
|
(d) => nt(d.occurredOnDate || d.expectedDate, t)
|
|
74
74
|
), u = s.some(
|
|
@@ -81,7 +81,7 @@ const Q = {
|
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
82
|
it,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */ a(
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ a(X, { children: [
|
|
85
85
|
f && /* @__PURE__ */ e(Re, { isOffset: !0 }),
|
|
86
86
|
x && /* @__PURE__ */ e(Te, { isOffset: !0 }),
|
|
87
87
|
u && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
|
|
@@ -99,10 +99,10 @@ const Q = {
|
|
|
99
99
|
rt,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
|
-
${x &&
|
|
103
|
-
${f &&
|
|
104
|
-
${u &&
|
|
105
|
-
${C &&
|
|
102
|
+
${x && r.paid},
|
|
103
|
+
${f && r.missed},
|
|
104
|
+
${u && r.upcoming},
|
|
105
|
+
${C && r.income}`,
|
|
106
106
|
day: t,
|
|
107
107
|
onClick: () => m(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
@@ -119,7 +119,7 @@ const Q = {
|
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), Y = ({ icon: t, label: n }) => /* @__PURE__ */ a(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
124
|
/* @__PURE__ */ e(p, { variant: "XSmall", children: n })
|
|
125
125
|
] }), xt = T(() => {
|
|
@@ -134,18 +134,18 @@ const Q = {
|
|
|
134
134
|
justifyContent: "center",
|
|
135
135
|
mt: 12,
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
/* @__PURE__ */ e(
|
|
137
|
+
/* @__PURE__ */ e(Y, { icon: Ce, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(Y, { icon: be, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(Y, { icon: Re, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(Y, { icon: Te, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}), Me = 58, $e = T(() => {
|
|
145
|
-
const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange:
|
|
145
|
+
const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange: r } = I(), [o, l] = h.useState(
|
|
146
146
|
we(/* @__PURE__ */ new Date()) * B + Me
|
|
147
147
|
), m = (s) => {
|
|
148
|
-
l(we(s) * B + Me),
|
|
148
|
+
l(we(s) * B + Me), r({
|
|
149
149
|
start: k(s),
|
|
150
150
|
end: z(s)
|
|
151
151
|
}), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
@@ -182,10 +182,10 @@ const Q = {
|
|
|
182
182
|
fontWeight: 600
|
|
183
183
|
},
|
|
184
184
|
"& .MuiDayCalendar-slideTransition": {
|
|
185
|
-
minHeight:
|
|
185
|
+
minHeight: o
|
|
186
186
|
},
|
|
187
187
|
"&.MuiDateCalendar-root": {
|
|
188
|
-
minHeight:
|
|
188
|
+
minHeight: o + B
|
|
189
189
|
},
|
|
190
190
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
191
191
|
height: B,
|
|
@@ -245,14 +245,14 @@ const Q = {
|
|
|
245
245
|
isMini: n = !1,
|
|
246
246
|
onRecurrenceClick: i = () => {
|
|
247
247
|
},
|
|
248
|
-
showOrdinal:
|
|
248
|
+
showOrdinal: r = !1
|
|
249
249
|
}) => {
|
|
250
|
-
const { recurring:
|
|
250
|
+
const { recurring: o } = D(), { repeatingTransactions: l } = I(), [m, g] = h.useState(!1), s = h.useMemo(
|
|
251
251
|
() => l.find((b) => b.guid === t.repeatingTransactionGuid),
|
|
252
252
|
[t, l]
|
|
253
253
|
), u = t.type === M.Income, f = t.status === S.Paid, x = t.status === S.Missed, C = t.status === S.Upcoming;
|
|
254
|
-
let y =
|
|
255
|
-
return x ? y =
|
|
254
|
+
let y = o.paid?.toLowerCase();
|
|
255
|
+
return x ? y = o.missed?.toLowerCase() : C && (y = r ? Ie(o, s || {}, !0) : Ie(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
256
256
|
/* @__PURE__ */ a(ke, { disableGutters: !0, disablePadding: !0, children: [
|
|
257
257
|
/* @__PURE__ */ a(dt, { onClick: () => {
|
|
258
258
|
g(!0), i(t);
|
|
@@ -275,8 +275,8 @@ const Q = {
|
|
|
275
275
|
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
|
|
276
276
|
/* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(c, { direction: "row", gap: 4, children: [
|
|
277
277
|
yt(t),
|
|
278
|
-
/* @__PURE__ */ e(p, { variant: "caption", children: Ct(t,
|
|
279
|
-
] }) : /* @__PURE__ */ a(
|
|
278
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: Ct(t, o) })
|
|
279
|
+
] }) : /* @__PURE__ */ a(X, { children: [
|
|
280
280
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
281
281
|
qe,
|
|
282
282
|
{
|
|
@@ -319,10 +319,10 @@ const Q = {
|
|
|
319
319
|
/* @__PURE__ */ e(
|
|
320
320
|
xe,
|
|
321
321
|
{
|
|
322
|
-
ariaLabelClose:
|
|
322
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
323
323
|
isOpen: m,
|
|
324
324
|
onClose: () => g(!1),
|
|
325
|
-
title: t.type === M.Income ?
|
|
325
|
+
title: t.type === M.Income ? o.income_details : o.expense_details,
|
|
326
326
|
children: s && /* @__PURE__ */ e(
|
|
327
327
|
mt,
|
|
328
328
|
{
|
|
@@ -338,12 +338,12 @@ const Q = {
|
|
|
338
338
|
recurrences: t,
|
|
339
339
|
isMini: n = !1,
|
|
340
340
|
onResetClick: i,
|
|
341
|
-
onRecurrenceClick:
|
|
342
|
-
sx:
|
|
341
|
+
onRecurrenceClick: r,
|
|
342
|
+
sx: o = {},
|
|
343
343
|
title: l
|
|
344
344
|
}) => {
|
|
345
345
|
const { recurring: m } = D(), g = h.useMemo(() => ot(t), [t]);
|
|
346
|
-
return /* @__PURE__ */ a(c, { sx: { gap: 8, mt: 4, ...
|
|
346
|
+
return /* @__PURE__ */ a(c, { sx: { gap: 8, mt: 4, ...o }, children: [
|
|
347
347
|
l && /* @__PURE__ */ a(
|
|
348
348
|
c,
|
|
349
349
|
{
|
|
@@ -359,7 +359,7 @@ const Q = {
|
|
|
359
359
|
Le,
|
|
360
360
|
{
|
|
361
361
|
isMini: n,
|
|
362
|
-
onRecurrenceClick:
|
|
362
|
+
onRecurrenceClick: r,
|
|
363
363
|
recurrence: s
|
|
364
364
|
}
|
|
365
365
|
),
|
|
@@ -374,7 +374,7 @@ const Q = {
|
|
|
374
374
|
Le,
|
|
375
375
|
{
|
|
376
376
|
isMini: n,
|
|
377
|
-
onRecurrenceClick:
|
|
377
|
+
onRecurrenceClick: r,
|
|
378
378
|
recurrence: f
|
|
379
379
|
}
|
|
380
380
|
) }, `day-recurrence-${x}`))
|
|
@@ -385,22 +385,22 @@ const Q = {
|
|
|
385
385
|
] });
|
|
386
386
|
}
|
|
387
387
|
), Ae = T(
|
|
388
|
-
({ expected: t, isExpense: n = !0, missed: i, paid:
|
|
388
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: r, title: o, total: l, upcoming: m }) => {
|
|
389
389
|
const g = ge(), { isSmallMobile: s } = ye(), { recurring: u } = D(), f = h.useMemo(() => {
|
|
390
|
-
const x = [{ color: g.palette.success.main, percentage: `${
|
|
390
|
+
const x = [{ color: g.palette.success.main, percentage: `${r / t}` }];
|
|
391
391
|
return i && x.push({ color: g.palette.error.main, percentage: `${i / t}` }), x;
|
|
392
|
-
}, [
|
|
392
|
+
}, [r, t, i]);
|
|
393
393
|
return /* @__PURE__ */ a(c, { children: [
|
|
394
394
|
/* @__PURE__ */ a(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
395
|
-
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${
|
|
395
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${o} (${l})` }),
|
|
396
396
|
/* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
397
397
|
] }),
|
|
398
398
|
/* @__PURE__ */ e(We, { data: f, height: 12 }),
|
|
399
399
|
/* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
400
400
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
401
|
-
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(
|
|
401
|
+
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
402
402
|
/* @__PURE__ */ e(p, { variant: "caption", children: u.paid?.toLowerCase() }),
|
|
403
|
-
i !== void 0 && /* @__PURE__ */ a(
|
|
403
|
+
i !== void 0 && /* @__PURE__ */ a(X, { children: [
|
|
404
404
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
405
405
|
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
406
406
|
/* @__PURE__ */ e(p, { variant: "caption", children: u.missed?.toLowerCase() })
|
|
@@ -412,7 +412,7 @@ const Q = {
|
|
|
412
412
|
] });
|
|
413
413
|
}
|
|
414
414
|
), bt = T(() => {
|
|
415
|
-
const { recurring: t } = D(), { availableWidth: n } = Oe(), { isDesktop: i, isSmallMobile:
|
|
415
|
+
const { recurring: t } = D(), { availableWidth: n } = Oe(), { isDesktop: i, isSmallMobile: r, isMobile: o } = ye(n), { onEvent: l } = J(), {
|
|
416
416
|
currentMonthExpenses: m,
|
|
417
417
|
currentMonthIncome: g,
|
|
418
418
|
dateRange: s,
|
|
@@ -424,29 +424,29 @@ const Q = {
|
|
|
424
424
|
paidIncomeTotal: d,
|
|
425
425
|
selectedDay: b,
|
|
426
426
|
selectedDayRecurrences: W,
|
|
427
|
-
setDateRange:
|
|
427
|
+
setDateRange: F,
|
|
428
428
|
upcomingExpenseTotal: te,
|
|
429
429
|
upcomingIncomeTotal: ne,
|
|
430
|
-
upcomingRecurrences:
|
|
430
|
+
upcomingRecurrences: U
|
|
431
431
|
} = I(), [$, _] = h.useState(0), ie = Ue(s.start, /* @__PURE__ */ new Date()), v = (R, oe) => {
|
|
432
432
|
_(oe);
|
|
433
|
-
},
|
|
433
|
+
}, j = (R) => {
|
|
434
434
|
l(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
435
435
|
transaction_guid: R.transaction?.guid
|
|
436
436
|
});
|
|
437
|
-
},
|
|
437
|
+
}, K = (R) => {
|
|
438
438
|
l(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
439
439
|
transaction_guid: R.transaction?.guid
|
|
440
440
|
});
|
|
441
441
|
}, P = () => {
|
|
442
442
|
const R = ze(s.start, 1);
|
|
443
|
-
|
|
443
|
+
F({
|
|
444
444
|
start: k(R),
|
|
445
445
|
end: z(R)
|
|
446
446
|
});
|
|
447
447
|
}, re = () => {
|
|
448
448
|
const R = Fe(s.start, 1);
|
|
449
|
-
|
|
449
|
+
F({
|
|
450
450
|
start: k(R),
|
|
451
451
|
end: z(R)
|
|
452
452
|
});
|
|
@@ -504,38 +504,38 @@ const Q = {
|
|
|
504
504
|
i && /* @__PURE__ */ e(
|
|
505
505
|
H,
|
|
506
506
|
{
|
|
507
|
-
onRecurrenceClick:
|
|
508
|
-
recurrences:
|
|
507
|
+
onRecurrenceClick: j,
|
|
508
|
+
recurrences: U,
|
|
509
509
|
title: t.upcoming_activity
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] }),
|
|
513
|
-
!i && /* @__PURE__ */ a(c, { sx: { px:
|
|
513
|
+
!i && /* @__PURE__ */ a(c, { sx: { px: o ? 0 : 24 }, children: [
|
|
514
514
|
/* @__PURE__ */ a(je, { onChange: v, value: $, variant: "fullWidth", children: [
|
|
515
515
|
/* @__PURE__ */ e(
|
|
516
516
|
_e,
|
|
517
517
|
{
|
|
518
|
-
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children:
|
|
518
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.upcoming : t.upcoming_activity })
|
|
519
519
|
}
|
|
520
520
|
),
|
|
521
521
|
/* @__PURE__ */ e(
|
|
522
522
|
_e,
|
|
523
523
|
{
|
|
524
|
-
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children:
|
|
524
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.past : t.past_transactions })
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
] }),
|
|
528
528
|
$ === 0 && /* @__PURE__ */ e(
|
|
529
529
|
H,
|
|
530
530
|
{
|
|
531
|
-
onRecurrenceClick:
|
|
532
|
-
recurrences:
|
|
531
|
+
onRecurrenceClick: j,
|
|
532
|
+
recurrences: U
|
|
533
533
|
}
|
|
534
534
|
),
|
|
535
535
|
$ === 1 && /* @__PURE__ */ e(
|
|
536
536
|
H,
|
|
537
537
|
{
|
|
538
|
-
onRecurrenceClick:
|
|
538
|
+
onRecurrenceClick: K,
|
|
539
539
|
recurrences: C
|
|
540
540
|
}
|
|
541
541
|
)
|
|
@@ -546,7 +546,7 @@ const Q = {
|
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
547
|
H,
|
|
548
548
|
{
|
|
549
|
-
onRecurrenceClick:
|
|
549
|
+
onRecurrenceClick: K,
|
|
550
550
|
recurrences: W || C,
|
|
551
551
|
title: b ? N(
|
|
552
552
|
t.day_transactions,
|
|
@@ -559,7 +559,7 @@ const Q = {
|
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
561
|
}), wn = T(({ onBackClick: t, sx: n = {} }) => {
|
|
562
|
-
const { accounts: i } = he(), { recurring:
|
|
562
|
+
const { accounts: i } = he(), { recurring: r } = D(), { isCopyLoaded: o, isInitialized: l, selectedAccountGuids: m, setSelectedAccounts: g } = q(), { isDataLoaded: s, loadRepeatingTransactions: u, setDateRange: f } = I(), { setFilter: x } = fe(), { onEvent: C } = J(), { isMobile: y } = ye(), [d, b] = h.useState(!1);
|
|
563
563
|
return h.useEffect(() => {
|
|
564
564
|
g(i);
|
|
565
565
|
}, [i]), h.useEffect(() => {
|
|
@@ -567,13 +567,13 @@ const Q = {
|
|
|
567
567
|
dateRange: { start: me(ue(), 90), end: de() },
|
|
568
568
|
accounts: m
|
|
569
569
|
}), f({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), u().finally());
|
|
570
|
-
}, [l]),
|
|
570
|
+
}, [l]), o ? /* @__PURE__ */ a(
|
|
571
571
|
at,
|
|
572
572
|
{
|
|
573
573
|
accountOptions: i,
|
|
574
574
|
actions: [
|
|
575
575
|
{
|
|
576
|
-
label:
|
|
576
|
+
label: r.action_title,
|
|
577
577
|
iconName: "credit_card_gear",
|
|
578
578
|
onClick: () => {
|
|
579
579
|
b(!0), C(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
@@ -584,7 +584,7 @@ const Q = {
|
|
|
584
584
|
onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
585
585
|
onBackClick: t,
|
|
586
586
|
sx: n,
|
|
587
|
-
title:
|
|
587
|
+
title: r.title,
|
|
588
588
|
children: [
|
|
589
589
|
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ a(c, { direction: "column", p: 48, spacing: 24, children: [
|
|
590
590
|
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
@@ -594,19 +594,19 @@ const Q = {
|
|
|
594
594
|
/* @__PURE__ */ e(
|
|
595
595
|
xe,
|
|
596
596
|
{
|
|
597
|
-
ariaLabelClose:
|
|
597
|
+
ariaLabelClose: r.close_drawer_aria,
|
|
598
598
|
isOpen: d,
|
|
599
599
|
onClose: () => b(!1),
|
|
600
600
|
shouldShowHeaderBorders: !1,
|
|
601
|
-
title:
|
|
601
|
+
title: r.action_title,
|
|
602
602
|
children: /* @__PURE__ */ e(Ee, {})
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
]
|
|
606
606
|
}
|
|
607
|
-
) : /* @__PURE__ */ e(
|
|
607
|
+
) : /* @__PURE__ */ e(V, {});
|
|
608
608
|
}), Rt = T(() => {
|
|
609
|
-
const { recurring: t } = D(), { availableWidth: n } = Oe(), { selectedDay: i, selectedDayRecurrences:
|
|
609
|
+
const { recurring: t } = D(), { availableWidth: n } = Oe(), { selectedDay: i, selectedDayRecurrences: r, setSelectedDay: o, upcomingRecurrences: l } = I(), m = n < 750;
|
|
610
610
|
return /* @__PURE__ */ a(c, { flexDirection: m ? "column" : "row", width: "100%", children: [
|
|
611
611
|
/* @__PURE__ */ e($e, {}),
|
|
612
612
|
!m && /* @__PURE__ */ e(le, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
@@ -614,8 +614,8 @@ const Q = {
|
|
|
614
614
|
H,
|
|
615
615
|
{
|
|
616
616
|
isMini: !0,
|
|
617
|
-
onResetClick: i ? () =>
|
|
618
|
-
recurrences:
|
|
617
|
+
onResetClick: i ? () => o(i) : void 0,
|
|
618
|
+
recurrences: r || l.slice(0, 5),
|
|
619
619
|
sx: { width: m ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
620
620
|
title: i ? N(
|
|
621
621
|
t.day_transactions,
|
|
@@ -626,43 +626,43 @@ const Q = {
|
|
|
626
626
|
] });
|
|
627
627
|
}), In = T(
|
|
628
628
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
629
|
-
const { accounts: i } = he(), { recurring:
|
|
629
|
+
const { accounts: i } = he(), { recurring: r } = D(), { setFilter: o } = fe(), { isDataLoaded: l, loadRepeatingTransactions: m } = I(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: u, selectedAccountGuids: f } = q();
|
|
630
630
|
return h.useEffect(() => {
|
|
631
631
|
s && u(i);
|
|
632
632
|
}, [s]), h.useEffect(() => {
|
|
633
|
-
f.length > 0 && (
|
|
633
|
+
f.length > 0 && (o({
|
|
634
634
|
dateRange: { start: me(ue(), 90), end: de() },
|
|
635
635
|
accounts: f
|
|
636
636
|
}), m().finally());
|
|
637
|
-
}, [f]), !g || !s ? /* @__PURE__ */ e(
|
|
637
|
+
}, [f]), !g || !s ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(
|
|
638
638
|
pt,
|
|
639
639
|
{
|
|
640
640
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
641
641
|
onPrimaryCtaClick: t,
|
|
642
|
-
primaryCtaLabel:
|
|
643
|
-
subTitle:
|
|
642
|
+
primaryCtaLabel: r.primary_cta,
|
|
643
|
+
subTitle: r.sub_title,
|
|
644
644
|
sx: n,
|
|
645
|
-
title:
|
|
646
|
-
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(
|
|
645
|
+
title: r.mini_title,
|
|
646
|
+
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(V, {})
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
650
|
), Tt = ({
|
|
651
651
|
upcomingRecurrences: t,
|
|
652
652
|
maxLogos: n = 3
|
|
653
|
-
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i,
|
|
653
|
+
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, r) => /* @__PURE__ */ e(
|
|
654
654
|
pe,
|
|
655
655
|
{
|
|
656
656
|
categoryGuid: i.categoryGuid || "",
|
|
657
657
|
merchantGuid: i.merchantGuid || ""
|
|
658
658
|
},
|
|
659
|
-
`${i.categoryGuid}-${i.merchantGuid}-${
|
|
659
|
+
`${i.categoryGuid}-${i.merchantGuid}-${r}`
|
|
660
660
|
)) }), Dt = ({
|
|
661
661
|
upcomingRecurrences: t,
|
|
662
662
|
logoSize: n = 32,
|
|
663
663
|
maxLogos: i = 3
|
|
664
664
|
}) => {
|
|
665
|
-
const
|
|
665
|
+
const r = (o) => o * (n / 2);
|
|
666
666
|
return /* @__PURE__ */ e(
|
|
667
667
|
O,
|
|
668
668
|
{
|
|
@@ -670,12 +670,12 @@ const Q = {
|
|
|
670
670
|
position: "relative",
|
|
671
671
|
width: 64
|
|
672
672
|
},
|
|
673
|
-
children: t.map((
|
|
673
|
+
children: t.map((o, l) => l < i ? /* @__PURE__ */ e(
|
|
674
674
|
O,
|
|
675
675
|
{
|
|
676
676
|
sx: {
|
|
677
677
|
borderRadius: "4px",
|
|
678
|
-
left:
|
|
678
|
+
left: r(l),
|
|
679
679
|
outlineColor: "common.white",
|
|
680
680
|
outlineStyle: "solid",
|
|
681
681
|
outlineWidth: 2,
|
|
@@ -684,13 +684,13 @@ const Q = {
|
|
|
684
684
|
children: /* @__PURE__ */ e(
|
|
685
685
|
pe,
|
|
686
686
|
{
|
|
687
|
-
categoryGuid:
|
|
688
|
-
merchantGuid:
|
|
687
|
+
categoryGuid: o.categoryGuid || "",
|
|
688
|
+
merchantGuid: o.merchantGuid || "",
|
|
689
689
|
size: n
|
|
690
690
|
}
|
|
691
691
|
)
|
|
692
692
|
},
|
|
693
|
-
`${
|
|
693
|
+
`${o.categoryGuid}-${o.merchantGuid}-${l}`
|
|
694
694
|
) : null)
|
|
695
695
|
}
|
|
696
696
|
);
|
|
@@ -698,8 +698,8 @@ const Q = {
|
|
|
698
698
|
amount: t,
|
|
699
699
|
bgcolor: n,
|
|
700
700
|
isLargeScreen: i,
|
|
701
|
-
isSmallScreen:
|
|
702
|
-
label:
|
|
701
|
+
isSmallScreen: r,
|
|
702
|
+
label: o
|
|
703
703
|
}) => /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
704
704
|
/* @__PURE__ */ e(
|
|
705
705
|
O,
|
|
@@ -713,8 +713,8 @@ const Q = {
|
|
|
713
713
|
}
|
|
714
714
|
),
|
|
715
715
|
/* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
716
|
-
!
|
|
717
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
716
|
+
!r && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
717
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: o })
|
|
718
718
|
] })
|
|
719
719
|
] }), _t = T(() => {
|
|
720
720
|
const { recurring: t } = D();
|
|
@@ -727,16 +727,16 @@ const Q = {
|
|
|
727
727
|
] });
|
|
728
728
|
}), vn = T(
|
|
729
729
|
({ onCTAClick: t }) => {
|
|
730
|
-
const [n, i] = h.useState(!1), { onEvent:
|
|
730
|
+
const [n, i] = h.useState(!1), { onEvent: r } = J(), o = ge(), { accounts: l } = he(), [m, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: u, selectedAccountGuids: f, setSelectedAccounts: x } = q(), {
|
|
731
731
|
loadRepeatingTransactions: C,
|
|
732
732
|
upcomingRecurrences: y,
|
|
733
733
|
expenseTotal: d,
|
|
734
734
|
missedExpenseTotal: b,
|
|
735
735
|
paidExpenseTotal: W,
|
|
736
|
-
repeatingTransactions:
|
|
736
|
+
repeatingTransactions: F,
|
|
737
737
|
setDateRange: te,
|
|
738
738
|
upcomingExpenseTotal: ne,
|
|
739
|
-
isDataLoaded:
|
|
739
|
+
isDataLoaded: U
|
|
740
740
|
} = I(), { setFilter: $ } = fe(), { recurring: _, budgets: ie } = D();
|
|
741
741
|
h.useEffect(() => {
|
|
742
742
|
x(l);
|
|
@@ -746,30 +746,30 @@ const Q = {
|
|
|
746
746
|
accounts: f
|
|
747
747
|
}), te({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
748
748
|
}, [u]), h.useEffect(() => {
|
|
749
|
-
n &&
|
|
749
|
+
n && r(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
750
750
|
state: y.length > 0 ? "default" : "zeroState"
|
|
751
751
|
});
|
|
752
752
|
}, [n]);
|
|
753
|
-
const v = g <= 288,
|
|
753
|
+
const v = g <= 288, j = g >= 450, K = h.useMemo(() => {
|
|
754
754
|
const G = [
|
|
755
|
-
{ color:
|
|
755
|
+
{ color: o.palette.success.main, percentage: `${W / d}` }
|
|
756
756
|
];
|
|
757
757
|
return b && G.push({
|
|
758
|
-
color:
|
|
758
|
+
color: o.palette.error.main,
|
|
759
759
|
percentage: `${b / d}`
|
|
760
760
|
}), G;
|
|
761
761
|
}, [
|
|
762
762
|
W,
|
|
763
763
|
d,
|
|
764
764
|
b,
|
|
765
|
-
|
|
766
|
-
|
|
765
|
+
o.palette.success.main,
|
|
766
|
+
o.palette.error.main
|
|
767
767
|
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
|
|
768
|
-
|
|
768
|
+
r(
|
|
769
769
|
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
770
770
|
), t();
|
|
771
771
|
};
|
|
772
|
-
if (!s || !n || !
|
|
772
|
+
if (!s || !n || !U) return /* @__PURE__ */ e(V, { height: 100 });
|
|
773
773
|
const R = 32, oe = y.length > 0, Pe = () => oe ? v ? /* @__PURE__ */ e(
|
|
774
774
|
Dt,
|
|
775
775
|
{
|
|
@@ -793,7 +793,7 @@ const Q = {
|
|
|
793
793
|
bgColor: "border.light",
|
|
794
794
|
label: _.upcoming
|
|
795
795
|
}
|
|
796
|
-
], De = !
|
|
796
|
+
], De = !F?.length;
|
|
797
797
|
return /* @__PURE__ */ e(
|
|
798
798
|
ht,
|
|
799
799
|
{
|
|
@@ -801,7 +801,7 @@ const Q = {
|
|
|
801
801
|
ctaLabel: De ? ie.get_started_cta : _.primary_cta,
|
|
802
802
|
onCTAClick: re,
|
|
803
803
|
title: _.recurring_expenses,
|
|
804
|
-
children: De ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ a(
|
|
804
|
+
children: De ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ a(X, { children: [
|
|
805
805
|
/* @__PURE__ */ a(
|
|
806
806
|
c,
|
|
807
807
|
{
|
|
@@ -850,7 +850,7 @@ const Q = {
|
|
|
850
850
|
}
|
|
851
851
|
),
|
|
852
852
|
/* @__PURE__ */ a(c, { sx: { pt: 12 }, children: [
|
|
853
|
-
/* @__PURE__ */ e(We, { data:
|
|
853
|
+
/* @__PURE__ */ e(We, { data: K }),
|
|
854
854
|
/* @__PURE__ */ e(
|
|
855
855
|
c,
|
|
856
856
|
{
|
|
@@ -865,7 +865,7 @@ const Q = {
|
|
|
865
865
|
{
|
|
866
866
|
amount: G.amount,
|
|
867
867
|
bgcolor: G.bgColor,
|
|
868
|
-
isLargeScreen:
|
|
868
|
+
isLargeScreen: j,
|
|
869
869
|
isSmallScreen: v,
|
|
870
870
|
label: G.label
|
|
871
871
|
},
|
|
@@ -880,17 +880,17 @@ const Q = {
|
|
|
880
880
|
}
|
|
881
881
|
), Mn = T(
|
|
882
882
|
({ isOpen: t, onClose: n, selectedTab: i }) => {
|
|
883
|
-
const { cashflow:
|
|
884
|
-
return
|
|
883
|
+
const { cashflow: r } = D();
|
|
884
|
+
return /* @__PURE__ */ e(
|
|
885
885
|
xe,
|
|
886
886
|
{
|
|
887
|
-
ariaLabelClose:
|
|
887
|
+
ariaLabelClose: r.close_settings_aria,
|
|
888
888
|
isOpen: t,
|
|
889
889
|
onClose: n,
|
|
890
|
-
title:
|
|
890
|
+
title: r.cashflow_settings,
|
|
891
891
|
children: /* @__PURE__ */ e(Ee, { defaultSelectedTab: i })
|
|
892
892
|
}
|
|
893
|
-
)
|
|
893
|
+
);
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
896
|
export {
|