@mx-cartographer/experiences 7.0.25-alpha-recurring-transactions-css-bug-ram5 → 7.0.25-alpha-recurring-transactions-css-bug-ram6
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/dist/recurringtransactions/index.es.js +121 -121
- package/package.json +1 -1
|
@@ -8,27 +8,27 @@ import { startOfToday as de } from "date-fns/startOfToday";
|
|
|
8
8
|
import { subDays as ue } from "date-fns/subDays";
|
|
9
9
|
import oe from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as
|
|
11
|
+
import { R as ze } from "../RecurringSettings-Dj29piAQ.mjs";
|
|
12
12
|
import { M as An } from "../RecurringSettings-Dj29piAQ.mjs";
|
|
13
|
-
import { addMonths as
|
|
14
|
-
import { subMonths as
|
|
15
|
-
import { isBefore as
|
|
13
|
+
import { addMonths as Be } from "date-fns/addMonths";
|
|
14
|
+
import { subMonths as Ue } from "date-fns/subMonths";
|
|
15
|
+
import { isBefore as Fe } from "date-fns/isBefore";
|
|
16
16
|
import ae from "@mui/material/Unstable_Grid2";
|
|
17
17
|
import Re from "@mui/material/IconButton";
|
|
18
18
|
import Te from "@mui/material/Tab";
|
|
19
|
-
import
|
|
20
|
-
import { Schedule as
|
|
21
|
-
import { Text as g, MerchantLogo as me, InstitutionLogo as
|
|
19
|
+
import je from "@mui/material/Tabs";
|
|
20
|
+
import { Schedule as Ke, MonetizationOn as Ye, Cancel as Me, CheckCircle as Le, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as g, MerchantLogo as me, InstitutionLogo as qe, H3 as Je, P as se } from "@mxenabled/mxui";
|
|
22
22
|
import { getWeeksInMonth as De } from "date-fns/getWeeksInMonth";
|
|
23
23
|
import pe from "@mui/material/styles/useTheme";
|
|
24
|
-
import { AdapterDateFns as
|
|
25
|
-
import { DateCalendar as
|
|
26
|
-
import { LocalizationProvider as
|
|
27
|
-
import { isSameDay as
|
|
28
|
-
import
|
|
29
|
-
import { PickersDay as
|
|
24
|
+
import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
|
+
import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
|
|
26
|
+
import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
27
|
+
import { isSameDay as nt } from "date-fns/isSameDay";
|
|
28
|
+
import it from "@mui/material/Badge";
|
|
29
|
+
import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
|
|
30
30
|
import { I as V } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
-
import { u as D, a as X, h as v, e as Z,
|
|
31
|
+
import { u as D, a as X, h as v, e as Z, p as Ae, c as ge, f as he } from "../hooks-DkUqN6JE.mjs";
|
|
32
32
|
import { c as M, a as R, g as Se, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
33
|
import { T as H } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
34
34
|
import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
@@ -36,7 +36,7 @@ import { A as _, W as at } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import ce from "@mui/material/Divider";
|
|
38
38
|
import Ie from "@mui/material/List";
|
|
39
|
-
import
|
|
39
|
+
import Ee from "@mui/material/ListItem";
|
|
40
40
|
import ct from "@mui/material/ListSubheader";
|
|
41
41
|
import lt from "@mui/material/ListItemAvatar";
|
|
42
42
|
import dt from "@mui/material/ListItemButton";
|
|
@@ -44,12 +44,12 @@ import ut from "@mui/material/ListItemText";
|
|
|
44
44
|
import { b as mt } from "../ManageIncome-DbsiKUoO.mjs";
|
|
45
45
|
import { c as On, M as kn, S as Wn } from "../ManageIncome-DbsiKUoO.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
-
import { D as
|
|
47
|
+
import { D as Ge } from "../Drawer-kEE73B87.mjs";
|
|
48
48
|
import { b as O } from "../Localization-2MODESHW.mjs";
|
|
49
49
|
import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
|
|
50
50
|
import k from "@mui/material/Box";
|
|
51
|
-
import { S as
|
|
52
|
-
import { u as
|
|
51
|
+
import { S as Ne } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as Oe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
53
|
import { L as K } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
@@ -58,19 +58,19 @@ const q = {
|
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
}, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, fe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
|
|
62
|
-
|
|
61
|
+
}, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, fe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...q } }) }), xe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
|
|
62
|
+
Ye,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
65
|
sx: { color: "categories.income", fontSize: n, ...q }
|
|
66
66
|
}
|
|
67
67
|
) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Me, { color: "error", filled: !0, sx: { fontSize: n, ...q } }) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Le, { color: "success", filled: !0, sx: { fontSize: n, ...q } }) }), ft = T(
|
|
68
|
-
({ day: t, outsideCurrentMonth: n, ...
|
|
69
|
-
const { recurring: a } = D(), { selectedAccountGuids:
|
|
70
|
-
() => l.filter((d) =>
|
|
71
|
-
[
|
|
68
|
+
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
+
const { recurring: a } = D(), { selectedAccountGuids: r } = X(), { recurrences: l, setSelectedDay: p } = v(), s = h.useMemo(
|
|
70
|
+
() => l.filter((d) => r.includes(d.accountGuid)),
|
|
71
|
+
[r, l]
|
|
72
72
|
).filter(
|
|
73
|
-
(d) =>
|
|
73
|
+
(d) => nt(d.occurredOnDate || d.expectedDate, t)
|
|
74
74
|
), m = s.some(
|
|
75
75
|
(d) => d.type !== M.Income && d.status === R.Upcoming
|
|
76
76
|
), f = s.some(
|
|
@@ -79,7 +79,7 @@ const q = {
|
|
|
79
79
|
(d) => d.type !== M.Income && d.status === R.Paid
|
|
80
80
|
), C = s.some((d) => d.type === M.Income), y = (m ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
it,
|
|
83
83
|
{
|
|
84
84
|
badgeContent: s.length > 0 && /* @__PURE__ */ o(Y, { children: [
|
|
85
85
|
f && /* @__PURE__ */ e(ye, { isOffset: !0 }),
|
|
@@ -96,7 +96,7 @@ const q = {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
rt,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
102
|
${x && a.paid},
|
|
@@ -113,7 +113,7 @@ const q = {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
...
|
|
116
|
+
...i
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
}
|
|
@@ -141,8 +141,8 @@ const q = {
|
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}), we = 58,
|
|
145
|
-
const t = pe(), { onEvent: n } = Z(), { selectedDay:
|
|
144
|
+
}), we = 58, ke = T(() => {
|
|
145
|
+
const t = pe(), { onEvent: n } = Z(), { selectedDay: i, setDateRange: a } = v(), [r, l] = h.useState(
|
|
146
146
|
De(/* @__PURE__ */ new Date()) * H + we
|
|
147
147
|
), p = (s) => {
|
|
148
148
|
l(De(s) * H + we), a({
|
|
@@ -150,7 +150,7 @@ const q = {
|
|
|
150
150
|
end: B(s)
|
|
151
151
|
}), n(_.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
152
|
}, u = /* @__PURE__ */ e(
|
|
153
|
-
|
|
153
|
+
et,
|
|
154
154
|
{
|
|
155
155
|
minDate: W(/* @__PURE__ */ new Date()),
|
|
156
156
|
onMonthChange: p,
|
|
@@ -181,10 +181,10 @@ const q = {
|
|
|
181
181
|
fontWeight: 600
|
|
182
182
|
},
|
|
183
183
|
"& .MuiDayCalendar-slideTransition": {
|
|
184
|
-
minHeight:
|
|
184
|
+
minHeight: r
|
|
185
185
|
},
|
|
186
186
|
"&.MuiDateCalendar-root": {
|
|
187
|
-
minHeight:
|
|
187
|
+
minHeight: r + H
|
|
188
188
|
},
|
|
189
189
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
190
190
|
height: H,
|
|
@@ -196,13 +196,13 @@ const q = {
|
|
|
196
196
|
fontSize: t.typography.body2.fontSize
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
|
-
value:
|
|
199
|
+
value: i,
|
|
200
200
|
views: ["day"]
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(
|
|
204
|
-
|
|
205
|
-
!
|
|
203
|
+
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(tt, { dateAdapter: Qe, children: [
|
|
204
|
+
i && u,
|
|
205
|
+
!i && u,
|
|
206
206
|
/* @__PURE__ */ e(xt, {})
|
|
207
207
|
] }) });
|
|
208
208
|
}), yt = (t) => {
|
|
@@ -242,19 +242,19 @@ const q = {
|
|
|
242
242
|
}, _e = ({
|
|
243
243
|
recurrence: t,
|
|
244
244
|
isMini: n = !1,
|
|
245
|
-
onRecurrenceClick:
|
|
245
|
+
onRecurrenceClick: i = () => {
|
|
246
246
|
},
|
|
247
247
|
showOrdinal: a = !1
|
|
248
248
|
}) => {
|
|
249
|
-
const { recurring:
|
|
249
|
+
const { recurring: r } = D(), { repeatingTransactions: l } = v(), [p, u] = h.useState(!1), s = h.useMemo(
|
|
250
250
|
() => l.find((S) => S.guid === t.repeatingTransactionGuid),
|
|
251
251
|
[t, l]
|
|
252
252
|
), m = t.type === M.Income, f = t.status === R.Paid, x = t.status === R.Missed, C = t.status === R.Upcoming;
|
|
253
|
-
let y =
|
|
254
|
-
return x ? y =
|
|
255
|
-
/* @__PURE__ */ o(
|
|
253
|
+
let y = r.paid?.toLowerCase();
|
|
254
|
+
return x ? y = r.missed?.toLowerCase() : C && (y = a ? Se(r, s || {}, !0) : Se(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
255
|
+
/* @__PURE__ */ o(Ee, { disableGutters: !0, disablePadding: !0, children: [
|
|
256
256
|
/* @__PURE__ */ o(dt, { onClick: () => {
|
|
257
|
-
u(!0),
|
|
257
|
+
u(!0), i(t);
|
|
258
258
|
}, children: [
|
|
259
259
|
/* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
|
|
260
260
|
me,
|
|
@@ -274,10 +274,10 @@ const q = {
|
|
|
274
274
|
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: t.name }),
|
|
275
275
|
/* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
276
276
|
yt(t),
|
|
277
|
-
/* @__PURE__ */ e(g, { variant: "caption", children: Ct(t,
|
|
277
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: Ct(t, r) })
|
|
278
278
|
] }) : /* @__PURE__ */ o(Y, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
qe,
|
|
281
281
|
{
|
|
282
282
|
alt: t.institutionName,
|
|
283
283
|
institutionGuid: t.institutionGuid,
|
|
@@ -316,12 +316,12 @@ const q = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Ge,
|
|
320
320
|
{
|
|
321
|
-
ariaLabelClose:
|
|
321
|
+
ariaLabelClose: r.close_drawer_aria,
|
|
322
322
|
isOpen: p,
|
|
323
323
|
onClose: () => u(!1),
|
|
324
|
-
title: t.type === M.Income ?
|
|
324
|
+
title: t.type === M.Income ? r.income_details : r.expense_details,
|
|
325
325
|
children: s && /* @__PURE__ */ e(
|
|
326
326
|
mt,
|
|
327
327
|
{
|
|
@@ -336,20 +336,20 @@ const q = {
|
|
|
336
336
|
({
|
|
337
337
|
recurrences: t,
|
|
338
338
|
isMini: n = !1,
|
|
339
|
-
onResetClick:
|
|
339
|
+
onResetClick: i,
|
|
340
340
|
onRecurrenceClick: a,
|
|
341
|
-
sx:
|
|
341
|
+
sx: r = {},
|
|
342
342
|
title: l
|
|
343
343
|
}) => {
|
|
344
344
|
const { recurring: p } = D(), u = h.useMemo(() => ot(t), [t]);
|
|
345
|
-
return /* @__PURE__ */ o(c, { sx: { gap: 8, mt: 4, ...
|
|
345
|
+
return /* @__PURE__ */ o(c, { sx: { gap: 8, mt: 4, ...r }, children: [
|
|
346
346
|
l && /* @__PURE__ */ o(
|
|
347
347
|
c,
|
|
348
348
|
{
|
|
349
349
|
sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
|
|
350
350
|
children: [
|
|
351
351
|
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: l }),
|
|
352
|
-
|
|
352
|
+
i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children: p.reset })
|
|
353
353
|
]
|
|
354
354
|
}
|
|
355
355
|
),
|
|
@@ -364,7 +364,7 @@ const q = {
|
|
|
364
364
|
),
|
|
365
365
|
/* @__PURE__ */ e(ce, { sx: { mx: 24 } })
|
|
366
366
|
] }, `recurrence-${m}`)) : u.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
367
|
-
/* @__PURE__ */ e(
|
|
367
|
+
/* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ e(
|
|
368
368
|
Ie,
|
|
369
369
|
{
|
|
370
370
|
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
@@ -384,24 +384,24 @@ const q = {
|
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
386
|
), ve = T(
|
|
387
|
-
({ expected: t, isExpense: n = !0, missed:
|
|
388
|
-
const u = pe(), { isSmallMobile: s } =
|
|
387
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: p }) => {
|
|
388
|
+
const u = pe(), { isSmallMobile: s } = Oe(), { recurring: m } = D(), f = h.useMemo(() => {
|
|
389
389
|
const x = [{ color: u.palette.success.main, percentage: `${a / t}` }];
|
|
390
|
-
return
|
|
391
|
-
}, [a, t,
|
|
390
|
+
return i && x.push({ color: u.palette.error.main, percentage: `${i / t}` }), x;
|
|
391
|
+
}, [a, t, i]);
|
|
392
392
|
return /* @__PURE__ */ o(c, { children: [
|
|
393
393
|
/* @__PURE__ */ o(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
394
|
-
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: `${
|
|
394
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: `${r} (${l})` }),
|
|
395
395
|
/* @__PURE__ */ e(g, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
396
396
|
] }),
|
|
397
|
-
/* @__PURE__ */ e(
|
|
397
|
+
/* @__PURE__ */ e(Ne, { data: f, height: 12 }),
|
|
398
398
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
399
399
|
/* @__PURE__ */ e(k, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
400
400
|
!s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
|
|
401
401
|
/* @__PURE__ */ e(g, { variant: "caption", children: m.paid?.toLowerCase() }),
|
|
402
|
-
|
|
402
|
+
i !== void 0 && /* @__PURE__ */ o(Y, { children: [
|
|
403
403
|
/* @__PURE__ */ e(k, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
404
|
-
!s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(
|
|
404
|
+
!s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
405
405
|
/* @__PURE__ */ e(g, { variant: "caption", children: m.missed?.toLowerCase() })
|
|
406
406
|
] }),
|
|
407
407
|
/* @__PURE__ */ e(k, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
@@ -411,7 +411,7 @@ const q = {
|
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
413
|
), bt = T(() => {
|
|
414
|
-
const { recurring: t } = D(), {
|
|
414
|
+
const { recurring: t } = D(), { availableWidth: n } = Ae(), { isDesktop: i, isSmallMobile: a } = Oe(n), { onEvent: r } = Z(), {
|
|
415
415
|
currentMonthExpenses: l,
|
|
416
416
|
currentMonthIncome: p,
|
|
417
417
|
dateRange: u,
|
|
@@ -427,24 +427,24 @@ const q = {
|
|
|
427
427
|
upcomingExpenseTotal: Q,
|
|
428
428
|
upcomingIncomeTotal: ee,
|
|
429
429
|
upcomingRecurrences: U
|
|
430
|
-
} = v(), [$, te] = h.useState(0), I =
|
|
430
|
+
} = v(), [$, te] = h.useState(0), I = Fe(u.start, /* @__PURE__ */ new Date()), ne = (b, re) => {
|
|
431
431
|
te(re);
|
|
432
432
|
}, w = (b) => {
|
|
433
|
-
|
|
433
|
+
r(_.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
434
434
|
transaction_guid: b.transaction?.guid
|
|
435
435
|
});
|
|
436
436
|
}, F = (b) => {
|
|
437
|
-
|
|
437
|
+
r(_.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
438
|
transaction_guid: b.transaction?.guid
|
|
439
439
|
});
|
|
440
440
|
}, ie = () => {
|
|
441
|
-
const b =
|
|
441
|
+
const b = Be(u.start, 1);
|
|
442
442
|
G({
|
|
443
443
|
start: W(b),
|
|
444
444
|
end: B(b)
|
|
445
445
|
});
|
|
446
446
|
}, P = () => {
|
|
447
|
-
const b =
|
|
447
|
+
const b = Ue(u.start, 1);
|
|
448
448
|
G({
|
|
449
449
|
start: W(b),
|
|
450
450
|
end: B(b)
|
|
@@ -456,28 +456,28 @@ const q = {
|
|
|
456
456
|
container: !0,
|
|
457
457
|
sx: {
|
|
458
458
|
pt: 16,
|
|
459
|
-
pl:
|
|
460
|
-
pr:
|
|
459
|
+
pl: i ? 48 : 24,
|
|
460
|
+
pr: i ? 24 : 16,
|
|
461
461
|
spacing: 24
|
|
462
462
|
},
|
|
463
463
|
children: [
|
|
464
464
|
/* @__PURE__ */ e(ae, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
|
|
465
465
|
/* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
466
|
-
/* @__PURE__ */ e(
|
|
466
|
+
/* @__PURE__ */ e(Je, { children: O(
|
|
467
467
|
t.header_title,
|
|
468
468
|
A(u.start, E.MONTH_LONG)
|
|
469
469
|
) }),
|
|
470
|
-
!
|
|
470
|
+
!i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
471
471
|
/* @__PURE__ */ e(
|
|
472
472
|
Re,
|
|
473
473
|
{
|
|
474
474
|
color: "primary",
|
|
475
475
|
disabled: I,
|
|
476
476
|
onClick: P,
|
|
477
|
-
children: /* @__PURE__ */ e(
|
|
477
|
+
children: /* @__PURE__ */ e(Ve, {})
|
|
478
478
|
}
|
|
479
479
|
),
|
|
480
|
-
/* @__PURE__ */ e(Re, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(
|
|
480
|
+
/* @__PURE__ */ e(Re, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Xe, {}) })
|
|
481
481
|
] })
|
|
482
482
|
] }),
|
|
483
483
|
/* @__PURE__ */ e(
|
|
@@ -502,7 +502,7 @@ const q = {
|
|
|
502
502
|
upcoming: ee
|
|
503
503
|
}
|
|
504
504
|
),
|
|
505
|
-
|
|
505
|
+
i && /* @__PURE__ */ e(
|
|
506
506
|
z,
|
|
507
507
|
{
|
|
508
508
|
onRecurrenceClick: w,
|
|
@@ -510,8 +510,8 @@ const q = {
|
|
|
510
510
|
title: t.upcoming_activity
|
|
511
511
|
}
|
|
512
512
|
),
|
|
513
|
-
!
|
|
514
|
-
/* @__PURE__ */ o(
|
|
513
|
+
!i && /* @__PURE__ */ o(c, { children: [
|
|
514
|
+
/* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
515
515
|
/* @__PURE__ */ e(
|
|
516
516
|
Te,
|
|
517
517
|
{
|
|
@@ -541,8 +541,8 @@ const q = {
|
|
|
541
541
|
)
|
|
542
542
|
] })
|
|
543
543
|
] }) }),
|
|
544
|
-
|
|
545
|
-
/* @__PURE__ */ e(
|
|
544
|
+
i && /* @__PURE__ */ e(ae, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
545
|
+
/* @__PURE__ */ e(ke, {}),
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
547
|
z,
|
|
548
548
|
{
|
|
@@ -559,18 +559,18 @@ const q = {
|
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
561
|
}), wn = T(({ onBackClick: t, sx: n = {} }) => {
|
|
562
|
-
const { accounts:
|
|
562
|
+
const { accounts: i } = ge(), { recurring: a } = D(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: p, setSelectedAccounts: u } = X(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = he(), { onEvent: C } = Z(), [y, d] = h.useState(!1);
|
|
563
563
|
return h.useEffect(() => {
|
|
564
|
-
u(
|
|
565
|
-
}, [
|
|
564
|
+
u(i);
|
|
565
|
+
}, [i]), h.useEffect(() => {
|
|
566
566
|
l && (x({
|
|
567
567
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
568
568
|
accounts: p
|
|
569
569
|
}), f({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), m().finally());
|
|
570
|
-
}, [l]),
|
|
570
|
+
}, [l]), r ? /* @__PURE__ */ o(
|
|
571
571
|
at,
|
|
572
572
|
{
|
|
573
|
-
accountOptions:
|
|
573
|
+
accountOptions: i,
|
|
574
574
|
actions: [
|
|
575
575
|
{
|
|
576
576
|
label: a.action_title,
|
|
@@ -591,45 +591,45 @@ const q = {
|
|
|
591
591
|
/* @__PURE__ */ e(oe, { height: 600, variant: "rounded", width: "100%" })
|
|
592
592
|
] }),
|
|
593
593
|
/* @__PURE__ */ e(
|
|
594
|
-
|
|
594
|
+
Ge,
|
|
595
595
|
{
|
|
596
596
|
ariaLabelClose: a.close_drawer_aria,
|
|
597
597
|
isOpen: y,
|
|
598
598
|
onClose: () => d(!1),
|
|
599
599
|
shouldShowHeaderBorders: !1,
|
|
600
600
|
title: a.action_title,
|
|
601
|
-
children: /* @__PURE__ */ e(
|
|
601
|
+
children: /* @__PURE__ */ e(ze, {})
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
]
|
|
605
605
|
}
|
|
606
606
|
) : /* @__PURE__ */ e(K, {});
|
|
607
607
|
}), Rt = T(() => {
|
|
608
|
-
const { recurring: t } = D(), { availableWidth: n } =
|
|
608
|
+
const { recurring: t } = D(), { availableWidth: n } = Ae(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = v(), p = n < 750;
|
|
609
609
|
return /* @__PURE__ */ o(c, { flexDirection: p ? "column" : "row", width: "100%", children: [
|
|
610
|
-
/* @__PURE__ */ e(
|
|
610
|
+
/* @__PURE__ */ e(ke, {}),
|
|
611
611
|
!p && /* @__PURE__ */ e(ce, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
612
612
|
/* @__PURE__ */ e(
|
|
613
613
|
z,
|
|
614
614
|
{
|
|
615
615
|
isMini: !0,
|
|
616
|
-
onResetClick:
|
|
616
|
+
onResetClick: i ? () => r(i) : void 0,
|
|
617
617
|
recurrences: a || l.slice(0, 5),
|
|
618
618
|
sx: { width: p ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
619
|
-
title:
|
|
619
|
+
title: i ? O(
|
|
620
620
|
t.day_transactions,
|
|
621
|
-
A(
|
|
621
|
+
A(i, E.MONTH_DAY)
|
|
622
622
|
) : t.upcoming_activity
|
|
623
623
|
}
|
|
624
624
|
)
|
|
625
625
|
] });
|
|
626
626
|
}), _n = T(
|
|
627
627
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
628
|
-
const { accounts:
|
|
628
|
+
const { accounts: i } = ge(), { recurring: a } = D(), { setFilter: r } = he(), { isDataLoaded: l, loadRepeatingTransactions: p } = v(), { isCopyLoaded: u, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = X();
|
|
629
629
|
return h.useEffect(() => {
|
|
630
|
-
s && m(
|
|
630
|
+
s && m(i);
|
|
631
631
|
}, [s]), h.useEffect(() => {
|
|
632
|
-
f.length > 0 && (
|
|
632
|
+
f.length > 0 && (r({
|
|
633
633
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
634
634
|
accounts: f
|
|
635
635
|
}), p().finally());
|
|
@@ -649,19 +649,19 @@ const q = {
|
|
|
649
649
|
), Tt = ({
|
|
650
650
|
upcomingRecurrences: t,
|
|
651
651
|
maxLogos: n = 3
|
|
652
|
-
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((
|
|
652
|
+
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, a) => /* @__PURE__ */ e(
|
|
653
653
|
me,
|
|
654
654
|
{
|
|
655
|
-
categoryGuid:
|
|
656
|
-
merchantGuid:
|
|
655
|
+
categoryGuid: i.categoryGuid || "",
|
|
656
|
+
merchantGuid: i.merchantGuid || ""
|
|
657
657
|
},
|
|
658
|
-
`${
|
|
658
|
+
`${i.categoryGuid}-${i.merchantGuid}-${a}`
|
|
659
659
|
)) }), Dt = ({
|
|
660
660
|
upcomingRecurrences: t,
|
|
661
661
|
logoSize: n = 32,
|
|
662
|
-
maxLogos:
|
|
662
|
+
maxLogos: i = 3
|
|
663
663
|
}) => {
|
|
664
|
-
const a = (
|
|
664
|
+
const a = (r) => r * (n / 2);
|
|
665
665
|
return /* @__PURE__ */ e(
|
|
666
666
|
k,
|
|
667
667
|
{
|
|
@@ -669,7 +669,7 @@ const q = {
|
|
|
669
669
|
position: "relative",
|
|
670
670
|
width: 64
|
|
671
671
|
},
|
|
672
|
-
children: t.map((
|
|
672
|
+
children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
|
|
673
673
|
k,
|
|
674
674
|
{
|
|
675
675
|
sx: {
|
|
@@ -683,22 +683,22 @@ const q = {
|
|
|
683
683
|
children: /* @__PURE__ */ e(
|
|
684
684
|
me,
|
|
685
685
|
{
|
|
686
|
-
categoryGuid:
|
|
687
|
-
merchantGuid:
|
|
686
|
+
categoryGuid: r.categoryGuid || "",
|
|
687
|
+
merchantGuid: r.merchantGuid || "",
|
|
688
688
|
size: n
|
|
689
689
|
}
|
|
690
690
|
)
|
|
691
691
|
},
|
|
692
|
-
`${
|
|
692
|
+
`${r.categoryGuid}-${r.merchantGuid}-${l}`
|
|
693
693
|
) : null)
|
|
694
694
|
}
|
|
695
695
|
);
|
|
696
696
|
}, St = ({
|
|
697
697
|
amount: t,
|
|
698
698
|
bgcolor: n,
|
|
699
|
-
isLargeScreen:
|
|
699
|
+
isLargeScreen: i,
|
|
700
700
|
isSmallScreen: a,
|
|
701
|
-
label:
|
|
701
|
+
label: r
|
|
702
702
|
}) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
703
703
|
/* @__PURE__ */ e(
|
|
704
704
|
k,
|
|
@@ -712,13 +712,13 @@ const q = {
|
|
|
712
712
|
}
|
|
713
713
|
),
|
|
714
714
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
715
|
-
!a && /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: L(t, t === 0 || !
|
|
716
|
-
/* @__PURE__ */ e(g, { variant: "caption", children:
|
|
715
|
+
!a && /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
716
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: r })
|
|
717
717
|
] })
|
|
718
718
|
] }), It = T(() => {
|
|
719
719
|
const { recurring: t } = D();
|
|
720
720
|
return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
721
|
-
/* @__PURE__ */ e(
|
|
721
|
+
/* @__PURE__ */ e(Ze, { size: 32 }),
|
|
722
722
|
/* @__PURE__ */ o(c, { children: [
|
|
723
723
|
/* @__PURE__ */ e(se, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
724
724
|
/* @__PURE__ */ e(se, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
@@ -726,7 +726,7 @@ const q = {
|
|
|
726
726
|
] });
|
|
727
727
|
}), vn = T(
|
|
728
728
|
({ onCTAClick: t }) => {
|
|
729
|
-
const [n,
|
|
729
|
+
const [n, i] = h.useState(!1), { onEvent: a } = Z(), r = pe(), { accounts: l } = ge(), [p, { width: u }] = gt(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: f, setSelectedAccounts: x } = X(), {
|
|
730
730
|
loadRepeatingTransactions: C,
|
|
731
731
|
upcomingRecurrences: y,
|
|
732
732
|
expenseTotal: d,
|
|
@@ -743,7 +743,7 @@ const q = {
|
|
|
743
743
|
m && (te({
|
|
744
744
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
745
745
|
accounts: f
|
|
746
|
-
}), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(),
|
|
746
|
+
}), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
747
747
|
}, [m]), h.useEffect(() => {
|
|
748
748
|
n && a(_.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
749
749
|
state: y.length > 0 ? "default" : "zeroState"
|
|
@@ -751,32 +751,32 @@ const q = {
|
|
|
751
751
|
}, [n]);
|
|
752
752
|
const w = u <= 288, F = u >= 450, ie = h.useMemo(() => {
|
|
753
753
|
const N = [
|
|
754
|
-
{ color:
|
|
754
|
+
{ color: r.palette.success.main, percentage: `${G / d}` }
|
|
755
755
|
];
|
|
756
756
|
return S && N.push({
|
|
757
|
-
color:
|
|
757
|
+
color: r.palette.error.main,
|
|
758
758
|
percentage: `${S / d}`
|
|
759
759
|
}), N;
|
|
760
760
|
}, [
|
|
761
761
|
G,
|
|
762
762
|
d,
|
|
763
763
|
S,
|
|
764
|
-
|
|
765
|
-
|
|
764
|
+
r.palette.success.main,
|
|
765
|
+
r.palette.error.main
|
|
766
766
|
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), b = () => {
|
|
767
767
|
a(
|
|
768
768
|
y.length > 0 ? _.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : _.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
769
769
|
), t();
|
|
770
770
|
};
|
|
771
771
|
if (!s || !n || !$) return /* @__PURE__ */ e(K, { height: 100 });
|
|
772
|
-
const re = 32,
|
|
772
|
+
const re = 32, We = y.length > 0, $e = () => We ? w ? /* @__PURE__ */ e(
|
|
773
773
|
Dt,
|
|
774
774
|
{
|
|
775
775
|
logoSize: re,
|
|
776
776
|
maxLogos: 3,
|
|
777
777
|
upcomingRecurrences: y.slice(0, 3)
|
|
778
778
|
}
|
|
779
|
-
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: w ? 64 : 104 } }),
|
|
779
|
+
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: w ? 64 : 104 } }), Pe = [
|
|
780
780
|
{
|
|
781
781
|
amount: G,
|
|
782
782
|
bgColor: "success.main",
|
|
@@ -844,12 +844,12 @@ const q = {
|
|
|
844
844
|
]
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
|
-
|
|
847
|
+
$e()
|
|
848
848
|
]
|
|
849
849
|
}
|
|
850
850
|
),
|
|
851
851
|
/* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
|
|
852
|
-
/* @__PURE__ */ e(
|
|
852
|
+
/* @__PURE__ */ e(Ne, { data: ie }),
|
|
853
853
|
/* @__PURE__ */ e(
|
|
854
854
|
c,
|
|
855
855
|
{
|
|
@@ -859,7 +859,7 @@ const q = {
|
|
|
859
859
|
gap: 16,
|
|
860
860
|
mt: 4
|
|
861
861
|
},
|
|
862
|
-
children:
|
|
862
|
+
children: Pe.map((N, He) => /* @__PURE__ */ e(
|
|
863
863
|
St,
|
|
864
864
|
{
|
|
865
865
|
amount: N.amount,
|
|
@@ -868,7 +868,7 @@ const q = {
|
|
|
868
868
|
isSmallScreen: w,
|
|
869
869
|
label: N.label
|
|
870
870
|
},
|
|
871
|
-
`recurrence-legend-${
|
|
871
|
+
`recurrence-legend-${He}`
|
|
872
872
|
))
|
|
873
873
|
}
|
|
874
874
|
)
|
|
@@ -882,7 +882,7 @@ export {
|
|
|
882
882
|
On as AddRecurringTransactionDetails,
|
|
883
883
|
An as ManageExpenses,
|
|
884
884
|
kn as ManageIncome,
|
|
885
|
-
|
|
885
|
+
ze as RecurringSettings,
|
|
886
886
|
vn as RecurringTransactionsMicroWidget,
|
|
887
887
|
_n as RecurringTransactionsMiniWidget,
|
|
888
888
|
Gn as RecurringTransactionsStore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "7.0.25-alpha-recurring-transactions-css-bug-
|
|
3
|
+
"version": "7.0.25-alpha-recurring-transactions-css-bug-ram6",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
5
|
"author": "MX",
|
|
6
6
|
"license": "MIT",
|