@mx-cartographer/experiences 7.0.27-alpha-recurring-transactions-css-bug-ram7 → 7.0.27-alpha-recurring-transactions-css-bug-ram9
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 +107 -106
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import g from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as B } from "date-fns/endOfMonth";
|
|
5
5
|
import { endOfToday as le } from "date-fns/endOfToday";
|
|
@@ -14,12 +14,12 @@ import { addMonths as Be } from "date-fns/addMonths";
|
|
|
14
14
|
import { subMonths as Ue } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Fe } from "date-fns/isBefore";
|
|
16
16
|
import ae from "@mui/material/Unstable_Grid2";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import Te from "@mui/material/IconButton";
|
|
18
|
+
import De from "@mui/material/Tab";
|
|
19
19
|
import je from "@mui/material/Tabs";
|
|
20
|
-
import { Schedule as Ke, MonetizationOn as Ye, Cancel as
|
|
21
|
-
import { Text as
|
|
22
|
-
import { getWeeksInMonth as
|
|
20
|
+
import { Schedule as Ke, MonetizationOn as Ye, Cancel as Le, CheckCircle as Ae, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as h, MerchantLogo as me, InstitutionLogo as qe, H3 as Je, P as se } from "@mxenabled/mxui";
|
|
22
|
+
import { getWeeksInMonth as Se } from "date-fns/getWeeksInMonth";
|
|
23
23
|
import pe from "@mui/material/styles/useTheme";
|
|
24
24
|
import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
25
|
import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
|
|
@@ -28,15 +28,15 @@ 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
30
|
import { I as V } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
-
import { u as D, a as X, h as v, e as Z, p as
|
|
32
|
-
import { c as M, a as R, g as
|
|
31
|
+
import { u as D, a as X, h as v, e as Z, p as Ee, c as he, f as ge } from "../hooks-DkUqN6JE.mjs";
|
|
32
|
+
import { c as M, a as R, g as Ie, 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";
|
|
35
35
|
import { A as w, W as at } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import ce from "@mui/material/Divider";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
38
|
+
import _e from "@mui/material/List";
|
|
39
|
+
import Ge 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,29 +44,29 @@ 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 Ne } 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 Oe } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as fe } 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
|
-
import { u as
|
|
56
|
-
import { M as
|
|
55
|
+
import { u as ht } from "../useDimensions-27p2evRx.mjs";
|
|
56
|
+
import { M as gt } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
|
|
57
57
|
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,
|
|
61
|
+
}, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, xe = ({ 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 } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(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
|
-
) }),
|
|
67
|
+
) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Le, { color: "error", filled: !0, sx: { fontSize: n, ...q } }) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ae, { color: "success", filled: !0, sx: { fontSize: n, ...q } }) }), ft = T(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring: a } = D(), { selectedAccountGuids: r } = X(), { recurrences: l, setSelectedDay: p } = v(), s =
|
|
69
|
+
const { recurring: a } = D(), { selectedAccountGuids: r } = X(), { recurrences: l, setSelectedDay: p } = v(), s = g.useMemo(
|
|
70
70
|
() => l.filter((d) => r.includes(d.accountGuid)),
|
|
71
71
|
[r, l]
|
|
72
72
|
).filter(
|
|
@@ -82,10 +82,10 @@ const q = {
|
|
|
82
82
|
it,
|
|
83
83
|
{
|
|
84
84
|
badgeContent: s.length > 0 && /* @__PURE__ */ o(Y, { children: [
|
|
85
|
-
f && /* @__PURE__ */ e(
|
|
86
|
-
x && /* @__PURE__ */ e(
|
|
87
|
-
m && /* @__PURE__ */ e(
|
|
88
|
-
C && /* @__PURE__ */ e(
|
|
85
|
+
f && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
|
|
86
|
+
x && /* @__PURE__ */ e(be, { isOffset: !0 }),
|
|
87
|
+
m && /* @__PURE__ */ e(xe, { isOffset: !0 }),
|
|
88
|
+
C && /* @__PURE__ */ e(ye, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -121,7 +121,7 @@ const q = {
|
|
|
121
121
|
}
|
|
122
122
|
), j = ({ icon: t, label: n }) => /* @__PURE__ */ o(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(h, { variant: "XSmall", children: n })
|
|
125
125
|
] }), xt = T(() => {
|
|
126
126
|
const { recurring: t } = D();
|
|
127
127
|
return /* @__PURE__ */ o(
|
|
@@ -134,18 +134,18 @@ const q = {
|
|
|
134
134
|
justifyContent: "center",
|
|
135
135
|
mt: 12,
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(j, { icon:
|
|
138
|
-
/* @__PURE__ */ e(j, { icon:
|
|
139
|
-
/* @__PURE__ */ e(j, { icon:
|
|
140
|
-
/* @__PURE__ */ e(j, { icon:
|
|
137
|
+
/* @__PURE__ */ e(j, { icon: xe, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(j, { icon: ye, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(j, { icon: Ce, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(j, { icon: be, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t = pe(), { onEvent: n } = Z(), { selectedDay: i, setDateRange: a } = v(), [r, l] =
|
|
146
|
-
|
|
144
|
+
}), we = 58, ke = T(() => {
|
|
145
|
+
const t = pe(), { onEvent: n } = Z(), { selectedDay: i, setDateRange: a } = v(), [r, l] = g.useState(
|
|
146
|
+
Se(/* @__PURE__ */ new Date()) * H + we
|
|
147
147
|
), p = (s) => {
|
|
148
|
-
l(
|
|
148
|
+
l(Se(s) * H + we), a({
|
|
149
149
|
start: W(s),
|
|
150
150
|
end: B(s)
|
|
151
151
|
}), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
@@ -207,14 +207,14 @@ const q = {
|
|
|
207
207
|
] }) });
|
|
208
208
|
}), yt = (t) => {
|
|
209
209
|
if (t.type === M.Income)
|
|
210
|
-
return /* @__PURE__ */ e(
|
|
210
|
+
return /* @__PURE__ */ e(ye, {});
|
|
211
211
|
switch (t.status) {
|
|
212
212
|
case R.Missed:
|
|
213
|
-
return /* @__PURE__ */ e(ye, {});
|
|
214
|
-
case R.Paid:
|
|
215
213
|
return /* @__PURE__ */ e(Ce, {});
|
|
214
|
+
case R.Paid:
|
|
215
|
+
return /* @__PURE__ */ e(be, {});
|
|
216
216
|
default:
|
|
217
|
-
return /* @__PURE__ */ e(
|
|
217
|
+
return /* @__PURE__ */ e(xe, {});
|
|
218
218
|
}
|
|
219
219
|
}, Ct = (t, n) => {
|
|
220
220
|
switch (t.status) {
|
|
@@ -239,20 +239,20 @@ const q = {
|
|
|
239
239
|
default:
|
|
240
240
|
return n.unknown;
|
|
241
241
|
}
|
|
242
|
-
},
|
|
242
|
+
}, ve = ({
|
|
243
243
|
recurrence: t,
|
|
244
244
|
isMini: n = !1,
|
|
245
245
|
onRecurrenceClick: i = () => {
|
|
246
246
|
},
|
|
247
247
|
showOrdinal: a = !1
|
|
248
248
|
}) => {
|
|
249
|
-
const { recurring: r } = D(), { repeatingTransactions: l } = v(), [p, u] =
|
|
249
|
+
const { recurring: r } = D(), { repeatingTransactions: l } = v(), [p, u] = g.useState(!1), s = g.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
253
|
let y = r.paid?.toLowerCase();
|
|
254
|
-
return x ? y = r.missed?.toLowerCase() : C && (y = a ?
|
|
255
|
-
/* @__PURE__ */ o(
|
|
254
|
+
return x ? y = r.missed?.toLowerCase() : C && (y = a ? Ie(r, s || {}, !0) : Ie(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
255
|
+
/* @__PURE__ */ o(Ge, { disableGutters: !0, disablePadding: !0, children: [
|
|
256
256
|
/* @__PURE__ */ o(dt, { onClick: () => {
|
|
257
257
|
u(!0), i(t);
|
|
258
258
|
}, children: [
|
|
@@ -271,10 +271,10 @@ const q = {
|
|
|
271
271
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
272
272
|
children: [
|
|
273
273
|
/* @__PURE__ */ o(c, { direction: "column", width: "50%", children: [
|
|
274
|
-
/* @__PURE__ */ e(
|
|
274
|
+
/* @__PURE__ */ e(h, { 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(
|
|
277
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: Ct(t, r) })
|
|
278
278
|
] }) : /* @__PURE__ */ o(Y, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
280
|
qe,
|
|
@@ -284,11 +284,11 @@ const q = {
|
|
|
284
284
|
size: 12
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
|
-
/* @__PURE__ */ e(
|
|
287
|
+
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
288
288
|
] }) })
|
|
289
289
|
] }),
|
|
290
290
|
/* @__PURE__ */ o(c, { alignItems: "flex-end", width: "100%", children: [
|
|
291
|
-
/* @__PURE__ */ o(
|
|
291
|
+
/* @__PURE__ */ o(h, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
|
|
292
292
|
m ? "+" : "",
|
|
293
293
|
L(t.amount, "0,0.00")
|
|
294
294
|
] }),
|
|
@@ -304,9 +304,9 @@ const q = {
|
|
|
304
304
|
width: "100%"
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
f && /* @__PURE__ */ e(
|
|
308
|
-
x && /* @__PURE__ */ e(
|
|
309
|
-
/* @__PURE__ */ e(
|
|
307
|
+
f && /* @__PURE__ */ e(Ae, { color: "success", filled: !0, size: 12 }),
|
|
308
|
+
x && /* @__PURE__ */ e(Le, { color: "error", filled: !0, size: 12 }),
|
|
309
|
+
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
)
|
|
@@ -316,7 +316,7 @@ const q = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Ne,
|
|
320
320
|
{
|
|
321
321
|
ariaLabelClose: r.close_drawer_aria,
|
|
322
322
|
isOpen: p,
|
|
@@ -341,21 +341,21 @@ const q = {
|
|
|
341
341
|
sx: r = {},
|
|
342
342
|
title: l
|
|
343
343
|
}) => {
|
|
344
|
-
const { recurring: p } = D(), u =
|
|
344
|
+
const { recurring: p } = D(), u = g.useMemo(() => ot(t), [t]);
|
|
345
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
|
-
/* @__PURE__ */ e(
|
|
351
|
+
/* @__PURE__ */ e(h, { 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
|
),
|
|
356
|
-
t.length === 0 ? /* @__PURE__ */ e(
|
|
356
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: p.no_activities }) : /* @__PURE__ */ e(_e, { children: n ? t.map((s, m) => /* @__PURE__ */ o(g.Fragment, { children: [
|
|
357
357
|
/* @__PURE__ */ e(
|
|
358
|
-
|
|
358
|
+
ve,
|
|
359
359
|
{
|
|
360
360
|
isMini: n,
|
|
361
361
|
onRecurrenceClick: a,
|
|
@@ -363,14 +363,14 @@ const q = {
|
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
/* @__PURE__ */ e(ce, { sx: { mx: 24 } })
|
|
366
|
-
] }, `recurrence-${m}`)) : u.map((s, m) => /* @__PURE__ */ o(
|
|
367
|
-
/* @__PURE__ */ e(
|
|
368
|
-
|
|
366
|
+
] }, `recurrence-${m}`)) : u.map((s, m) => /* @__PURE__ */ o(g.Fragment, { children: [
|
|
367
|
+
/* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ e(
|
|
368
|
+
_e,
|
|
369
369
|
{
|
|
370
|
-
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(
|
|
370
|
+
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
371
371
|
sx: { width: "100%" },
|
|
372
|
-
children: s.recurrences.map((f, x) => /* @__PURE__ */ e(
|
|
373
|
-
|
|
372
|
+
children: s.recurrences.map((f, x) => /* @__PURE__ */ e(g.Fragment, { children: /* @__PURE__ */ e(
|
|
373
|
+
ve,
|
|
374
374
|
{
|
|
375
375
|
isMini: n,
|
|
376
376
|
onRecurrenceClick: a,
|
|
@@ -383,35 +383,35 @@ const q = {
|
|
|
383
383
|
] }, `recurrence-${m}`)) })
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
|
-
),
|
|
386
|
+
), Me = T(
|
|
387
387
|
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: p }) => {
|
|
388
|
-
const u = pe(), { isSmallMobile: s } =
|
|
388
|
+
const u = pe(), { isSmallMobile: s } = fe(), { recurring: m } = D(), f = g.useMemo(() => {
|
|
389
389
|
const x = [{ color: u.palette.success.main, percentage: `${a / t}` }];
|
|
390
390
|
return i && x.push({ color: u.palette.error.main, percentage: `${i / t}` }), x;
|
|
391
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(
|
|
395
|
-
/* @__PURE__ */ e(
|
|
394
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${r} (${l})` }),
|
|
395
|
+
/* @__PURE__ */ e(h, { 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(Oe, { 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
|
-
!s && /* @__PURE__ */ e(
|
|
401
|
-
/* @__PURE__ */ e(
|
|
400
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
|
|
401
|
+
/* @__PURE__ */ e(h, { 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(
|
|
405
|
-
/* @__PURE__ */ e(
|
|
404
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
405
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: m.missed?.toLowerCase() })
|
|
406
406
|
] }),
|
|
407
407
|
/* @__PURE__ */ e(k, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
408
|
-
!s && /* @__PURE__ */ e(
|
|
409
|
-
/* @__PURE__ */ e(
|
|
408
|
+
!s && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(p, "0,0.00") }),
|
|
409
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: m.upcoming })
|
|
410
410
|
] })
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
413
|
), bt = T(() => {
|
|
414
|
-
const { recurring: t } = D(), { availableWidth: n } =
|
|
414
|
+
const { recurring: t } = D(), { availableWidth: n } = Ee(), { isDesktop: i, isSmallMobile: a } = fe(n), { onEvent: r } = Z(), {
|
|
415
415
|
currentMonthExpenses: l,
|
|
416
416
|
currentMonthIncome: p,
|
|
417
417
|
dateRange: u,
|
|
@@ -427,7 +427,7 @@ const q = {
|
|
|
427
427
|
upcomingExpenseTotal: Q,
|
|
428
428
|
upcomingIncomeTotal: ee,
|
|
429
429
|
upcomingRecurrences: U
|
|
430
|
-
} = v(), [$, te] =
|
|
430
|
+
} = v(), [$, te] = g.useState(0), I = Fe(u.start, /* @__PURE__ */ new Date()), ne = (b, re) => {
|
|
431
431
|
te(re);
|
|
432
432
|
}, _ = (b) => {
|
|
433
433
|
r(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
@@ -456,9 +456,7 @@ const q = {
|
|
|
456
456
|
container: !0,
|
|
457
457
|
sx: {
|
|
458
458
|
pt: 16,
|
|
459
|
-
|
|
460
|
-
pr: i ? 24 : 16,
|
|
461
|
-
spacing: 24
|
|
459
|
+
px: i ? 48 : 24
|
|
462
460
|
},
|
|
463
461
|
children: [
|
|
464
462
|
/* @__PURE__ */ e(ae, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
|
|
@@ -469,7 +467,7 @@ const q = {
|
|
|
469
467
|
) }),
|
|
470
468
|
!i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
471
469
|
/* @__PURE__ */ e(
|
|
472
|
-
|
|
470
|
+
Te,
|
|
473
471
|
{
|
|
474
472
|
color: "primary",
|
|
475
473
|
disabled: I,
|
|
@@ -477,11 +475,11 @@ const q = {
|
|
|
477
475
|
children: /* @__PURE__ */ e(Ve, {})
|
|
478
476
|
}
|
|
479
477
|
),
|
|
480
|
-
/* @__PURE__ */ e(
|
|
478
|
+
/* @__PURE__ */ e(Te, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Xe, {}) })
|
|
481
479
|
] })
|
|
482
480
|
] }),
|
|
483
481
|
/* @__PURE__ */ e(
|
|
484
|
-
|
|
482
|
+
Me,
|
|
485
483
|
{
|
|
486
484
|
expected: s,
|
|
487
485
|
missed: f,
|
|
@@ -492,7 +490,7 @@ const q = {
|
|
|
492
490
|
}
|
|
493
491
|
),
|
|
494
492
|
/* @__PURE__ */ e(
|
|
495
|
-
|
|
493
|
+
Me,
|
|
496
494
|
{
|
|
497
495
|
expected: m,
|
|
498
496
|
isExpense: !1,
|
|
@@ -513,15 +511,15 @@ const q = {
|
|
|
513
511
|
!i && /* @__PURE__ */ o(c, { children: [
|
|
514
512
|
/* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
515
513
|
/* @__PURE__ */ e(
|
|
516
|
-
|
|
514
|
+
De,
|
|
517
515
|
{
|
|
518
|
-
label: /* @__PURE__ */ e(
|
|
516
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.upcoming : t.upcoming_activity })
|
|
519
517
|
}
|
|
520
518
|
),
|
|
521
519
|
/* @__PURE__ */ e(
|
|
522
|
-
|
|
520
|
+
De,
|
|
523
521
|
{
|
|
524
|
-
label: /* @__PURE__ */ e(
|
|
522
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.past : t.past_transactions })
|
|
525
523
|
}
|
|
526
524
|
)
|
|
527
525
|
] }),
|
|
@@ -559,15 +557,17 @@ const q = {
|
|
|
559
557
|
}
|
|
560
558
|
);
|
|
561
559
|
}), _n = T(({ onBackClick: t, sx: n = {} }) => {
|
|
562
|
-
const { accounts: i } =
|
|
563
|
-
|
|
560
|
+
const { accounts: i } = he(), { recurring: a } = D(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: p, setSelectedAccounts: u } = X(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = ge(), { onEvent: C } = Z(), [y, d] = g.useState(!1);
|
|
561
|
+
if (g.useEffect(() => {
|
|
564
562
|
u(i);
|
|
565
|
-
}, [i]),
|
|
563
|
+
}, [i]), g.useEffect(() => {
|
|
566
564
|
l && (x({
|
|
567
565
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
568
566
|
accounts: p
|
|
569
567
|
}), f({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), m().finally());
|
|
570
|
-
}, [l]), r
|
|
568
|
+
}, [l]), !r) return /* @__PURE__ */ e(K, {});
|
|
569
|
+
const { isMobile: S } = fe();
|
|
570
|
+
return /* @__PURE__ */ o(
|
|
571
571
|
at,
|
|
572
572
|
{
|
|
573
573
|
accountOptions: i,
|
|
@@ -580,6 +580,7 @@ const q = {
|
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
],
|
|
583
|
+
hasDivider: S,
|
|
583
584
|
onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
584
585
|
onBackClick: t,
|
|
585
586
|
sx: n,
|
|
@@ -591,7 +592,7 @@ const q = {
|
|
|
591
592
|
/* @__PURE__ */ e(oe, { height: 600, variant: "rounded", width: "100%" })
|
|
592
593
|
] }),
|
|
593
594
|
/* @__PURE__ */ e(
|
|
594
|
-
|
|
595
|
+
Ne,
|
|
595
596
|
{
|
|
596
597
|
ariaLabelClose: a.close_drawer_aria,
|
|
597
598
|
isOpen: y,
|
|
@@ -603,9 +604,9 @@ const q = {
|
|
|
603
604
|
)
|
|
604
605
|
]
|
|
605
606
|
}
|
|
606
|
-
)
|
|
607
|
+
);
|
|
607
608
|
}), Rt = T(() => {
|
|
608
|
-
const { recurring: t } = D(), { availableWidth: n } =
|
|
609
|
+
const { recurring: t } = D(), { availableWidth: n } = Ee(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = v(), p = n < 750;
|
|
609
610
|
return /* @__PURE__ */ o(c, { flexDirection: p ? "column" : "row", width: "100%", children: [
|
|
610
611
|
/* @__PURE__ */ e(ke, {}),
|
|
611
612
|
!p && /* @__PURE__ */ e(ce, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
@@ -625,10 +626,10 @@ const q = {
|
|
|
625
626
|
] });
|
|
626
627
|
}), wn = T(
|
|
627
628
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
628
|
-
const { accounts: i } =
|
|
629
|
-
return
|
|
629
|
+
const { accounts: i } = he(), { recurring: a } = D(), { setFilter: r } = ge(), { isDataLoaded: l, loadRepeatingTransactions: p } = v(), { isCopyLoaded: u, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = X();
|
|
630
|
+
return g.useEffect(() => {
|
|
630
631
|
s && m(i);
|
|
631
|
-
}, [s]),
|
|
632
|
+
}, [s]), g.useEffect(() => {
|
|
632
633
|
f.length > 0 && (r({
|
|
633
634
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
634
635
|
accounts: f
|
|
@@ -712,8 +713,8 @@ const q = {
|
|
|
712
713
|
}
|
|
713
714
|
),
|
|
714
715
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
715
|
-
!a && /* @__PURE__ */ e(
|
|
716
|
-
/* @__PURE__ */ e(
|
|
716
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
717
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: r })
|
|
717
718
|
] })
|
|
718
719
|
] }), It = T(() => {
|
|
719
720
|
const { recurring: t } = D();
|
|
@@ -726,7 +727,7 @@ const q = {
|
|
|
726
727
|
] });
|
|
727
728
|
}), vn = T(
|
|
728
729
|
({ onCTAClick: t }) => {
|
|
729
|
-
const [n, i] =
|
|
730
|
+
const [n, i] = g.useState(!1), { onEvent: a } = Z(), r = pe(), { accounts: l } = he(), [p, { width: u }] = ht(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: f, setSelectedAccounts: x } = X(), {
|
|
730
731
|
loadRepeatingTransactions: C,
|
|
731
732
|
upcomingRecurrences: y,
|
|
732
733
|
expenseTotal: d,
|
|
@@ -736,20 +737,20 @@ const q = {
|
|
|
736
737
|
setDateRange: ee,
|
|
737
738
|
upcomingExpenseTotal: U,
|
|
738
739
|
isDataLoaded: $
|
|
739
|
-
} = v(), { setFilter: te } =
|
|
740
|
-
|
|
740
|
+
} = v(), { setFilter: te } = ge(), { recurring: I, budgets: ne } = D();
|
|
741
|
+
g.useEffect(() => {
|
|
741
742
|
x(l);
|
|
742
|
-
}, [l]),
|
|
743
|
+
}, [l]), g.useEffect(() => {
|
|
743
744
|
m && (te({
|
|
744
745
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
745
746
|
accounts: f
|
|
746
747
|
}), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
747
|
-
}, [m]),
|
|
748
|
+
}, [m]), g.useEffect(() => {
|
|
748
749
|
n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
749
750
|
state: y.length > 0 ? "default" : "zeroState"
|
|
750
751
|
});
|
|
751
752
|
}, [n]);
|
|
752
|
-
const _ = u <= 288, F = u >= 450, ie =
|
|
753
|
+
const _ = u <= 288, F = u >= 450, ie = g.useMemo(() => {
|
|
753
754
|
const N = [
|
|
754
755
|
{ color: r.palette.success.main, percentage: `${G / d}` }
|
|
755
756
|
];
|
|
@@ -763,7 +764,7 @@ const q = {
|
|
|
763
764
|
S,
|
|
764
765
|
r.palette.success.main,
|
|
765
766
|
r.palette.error.main
|
|
766
|
-
]), P =
|
|
767
|
+
]), P = g.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), b = () => {
|
|
767
768
|
a(
|
|
768
769
|
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
769
770
|
), t();
|
|
@@ -792,15 +793,15 @@ const q = {
|
|
|
792
793
|
bgColor: "border.light",
|
|
793
794
|
label: I.upcoming
|
|
794
795
|
}
|
|
795
|
-
],
|
|
796
|
+
], Re = !Q?.length;
|
|
796
797
|
return /* @__PURE__ */ e(
|
|
797
|
-
|
|
798
|
+
gt,
|
|
798
799
|
{
|
|
799
800
|
className: "mx-recurring-transaction-microwidget",
|
|
800
|
-
ctaLabel:
|
|
801
|
+
ctaLabel: Re ? ne.get_started_cta : I.primary_cta,
|
|
801
802
|
onCTAClick: b,
|
|
802
803
|
title: I.recurring_expenses,
|
|
803
|
-
children:
|
|
804
|
+
children: Re ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(Y, { children: [
|
|
804
805
|
/* @__PURE__ */ o(
|
|
805
806
|
c,
|
|
806
807
|
{
|
|
@@ -824,7 +825,7 @@ const q = {
|
|
|
824
825
|
],
|
|
825
826
|
children: [
|
|
826
827
|
/* @__PURE__ */ e(
|
|
827
|
-
|
|
828
|
+
h,
|
|
828
829
|
{
|
|
829
830
|
sx: { width: "100%" },
|
|
830
831
|
variant: P.length >= 10 && _ ? "H3" : "H2",
|
|
@@ -849,7 +850,7 @@ const q = {
|
|
|
849
850
|
}
|
|
850
851
|
),
|
|
851
852
|
/* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
|
|
852
|
-
/* @__PURE__ */ e(
|
|
853
|
+
/* @__PURE__ */ e(Oe, { data: ie }),
|
|
853
854
|
/* @__PURE__ */ e(
|
|
854
855
|
c,
|
|
855
856
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "7.0.27-alpha-recurring-transactions-css-bug-
|
|
3
|
+
"version": "7.0.27-alpha-recurring-transactions-css-bug-ram9",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
5
|
"author": "MX",
|
|
6
6
|
"license": "MIT",
|