@mx-cartographer/experiences 7.0.27-alpha-recurring-transactions-css-bug-ram8 → 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 +106 -103
- 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, {
|
|
@@ -467,7 +467,7 @@ const q = {
|
|
|
467
467
|
) }),
|
|
468
468
|
!i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
469
469
|
/* @__PURE__ */ e(
|
|
470
|
-
|
|
470
|
+
Te,
|
|
471
471
|
{
|
|
472
472
|
color: "primary",
|
|
473
473
|
disabled: I,
|
|
@@ -475,11 +475,11 @@ const q = {
|
|
|
475
475
|
children: /* @__PURE__ */ e(Ve, {})
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
|
-
/* @__PURE__ */ e(
|
|
478
|
+
/* @__PURE__ */ e(Te, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Xe, {}) })
|
|
479
479
|
] })
|
|
480
480
|
] }),
|
|
481
481
|
/* @__PURE__ */ e(
|
|
482
|
-
|
|
482
|
+
Me,
|
|
483
483
|
{
|
|
484
484
|
expected: s,
|
|
485
485
|
missed: f,
|
|
@@ -490,7 +490,7 @@ const q = {
|
|
|
490
490
|
}
|
|
491
491
|
),
|
|
492
492
|
/* @__PURE__ */ e(
|
|
493
|
-
|
|
493
|
+
Me,
|
|
494
494
|
{
|
|
495
495
|
expected: m,
|
|
496
496
|
isExpense: !1,
|
|
@@ -511,15 +511,15 @@ const q = {
|
|
|
511
511
|
!i && /* @__PURE__ */ o(c, { children: [
|
|
512
512
|
/* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
513
513
|
/* @__PURE__ */ e(
|
|
514
|
-
|
|
514
|
+
De,
|
|
515
515
|
{
|
|
516
|
-
label: /* @__PURE__ */ e(
|
|
516
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.upcoming : t.upcoming_activity })
|
|
517
517
|
}
|
|
518
518
|
),
|
|
519
519
|
/* @__PURE__ */ e(
|
|
520
|
-
|
|
520
|
+
De,
|
|
521
521
|
{
|
|
522
|
-
label: /* @__PURE__ */ e(
|
|
522
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.past : t.past_transactions })
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
525
|
] }),
|
|
@@ -557,15 +557,17 @@ const q = {
|
|
|
557
557
|
}
|
|
558
558
|
);
|
|
559
559
|
}), _n = T(({ onBackClick: t, sx: n = {} }) => {
|
|
560
|
-
const { accounts: i } =
|
|
561
|
-
|
|
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(() => {
|
|
562
562
|
u(i);
|
|
563
|
-
}, [i]),
|
|
563
|
+
}, [i]), g.useEffect(() => {
|
|
564
564
|
l && (x({
|
|
565
565
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
566
566
|
accounts: p
|
|
567
567
|
}), f({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), m().finally());
|
|
568
|
-
}, [l]), r
|
|
568
|
+
}, [l]), !r) return /* @__PURE__ */ e(K, {});
|
|
569
|
+
const { isMobile: S } = fe();
|
|
570
|
+
return /* @__PURE__ */ o(
|
|
569
571
|
at,
|
|
570
572
|
{
|
|
571
573
|
accountOptions: i,
|
|
@@ -578,6 +580,7 @@ const q = {
|
|
|
578
580
|
}
|
|
579
581
|
}
|
|
580
582
|
],
|
|
583
|
+
hasDivider: S,
|
|
581
584
|
onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
582
585
|
onBackClick: t,
|
|
583
586
|
sx: n,
|
|
@@ -589,7 +592,7 @@ const q = {
|
|
|
589
592
|
/* @__PURE__ */ e(oe, { height: 600, variant: "rounded", width: "100%" })
|
|
590
593
|
] }),
|
|
591
594
|
/* @__PURE__ */ e(
|
|
592
|
-
|
|
595
|
+
Ne,
|
|
593
596
|
{
|
|
594
597
|
ariaLabelClose: a.close_drawer_aria,
|
|
595
598
|
isOpen: y,
|
|
@@ -601,9 +604,9 @@ const q = {
|
|
|
601
604
|
)
|
|
602
605
|
]
|
|
603
606
|
}
|
|
604
|
-
)
|
|
607
|
+
);
|
|
605
608
|
}), Rt = T(() => {
|
|
606
|
-
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;
|
|
607
610
|
return /* @__PURE__ */ o(c, { flexDirection: p ? "column" : "row", width: "100%", children: [
|
|
608
611
|
/* @__PURE__ */ e(ke, {}),
|
|
609
612
|
!p && /* @__PURE__ */ e(ce, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
@@ -623,10 +626,10 @@ const q = {
|
|
|
623
626
|
] });
|
|
624
627
|
}), wn = T(
|
|
625
628
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
626
|
-
const { accounts: i } =
|
|
627
|
-
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(() => {
|
|
628
631
|
s && m(i);
|
|
629
|
-
}, [s]),
|
|
632
|
+
}, [s]), g.useEffect(() => {
|
|
630
633
|
f.length > 0 && (r({
|
|
631
634
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
632
635
|
accounts: f
|
|
@@ -710,8 +713,8 @@ const q = {
|
|
|
710
713
|
}
|
|
711
714
|
),
|
|
712
715
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
713
|
-
!a && /* @__PURE__ */ e(
|
|
714
|
-
/* @__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 })
|
|
715
718
|
] })
|
|
716
719
|
] }), It = T(() => {
|
|
717
720
|
const { recurring: t } = D();
|
|
@@ -724,7 +727,7 @@ const q = {
|
|
|
724
727
|
] });
|
|
725
728
|
}), vn = T(
|
|
726
729
|
({ onCTAClick: t }) => {
|
|
727
|
-
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(), {
|
|
728
731
|
loadRepeatingTransactions: C,
|
|
729
732
|
upcomingRecurrences: y,
|
|
730
733
|
expenseTotal: d,
|
|
@@ -734,20 +737,20 @@ const q = {
|
|
|
734
737
|
setDateRange: ee,
|
|
735
738
|
upcomingExpenseTotal: U,
|
|
736
739
|
isDataLoaded: $
|
|
737
|
-
} = v(), { setFilter: te } =
|
|
738
|
-
|
|
740
|
+
} = v(), { setFilter: te } = ge(), { recurring: I, budgets: ne } = D();
|
|
741
|
+
g.useEffect(() => {
|
|
739
742
|
x(l);
|
|
740
|
-
}, [l]),
|
|
743
|
+
}, [l]), g.useEffect(() => {
|
|
741
744
|
m && (te({
|
|
742
745
|
dateRange: { start: ue(de(), 90), end: le() },
|
|
743
746
|
accounts: f
|
|
744
747
|
}), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
745
|
-
}, [m]),
|
|
748
|
+
}, [m]), g.useEffect(() => {
|
|
746
749
|
n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
747
750
|
state: y.length > 0 ? "default" : "zeroState"
|
|
748
751
|
});
|
|
749
752
|
}, [n]);
|
|
750
|
-
const _ = u <= 288, F = u >= 450, ie =
|
|
753
|
+
const _ = u <= 288, F = u >= 450, ie = g.useMemo(() => {
|
|
751
754
|
const N = [
|
|
752
755
|
{ color: r.palette.success.main, percentage: `${G / d}` }
|
|
753
756
|
];
|
|
@@ -761,7 +764,7 @@ const q = {
|
|
|
761
764
|
S,
|
|
762
765
|
r.palette.success.main,
|
|
763
766
|
r.palette.error.main
|
|
764
|
-
]), P =
|
|
767
|
+
]), P = g.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), b = () => {
|
|
765
768
|
a(
|
|
766
769
|
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
767
770
|
), t();
|
|
@@ -790,15 +793,15 @@ const q = {
|
|
|
790
793
|
bgColor: "border.light",
|
|
791
794
|
label: I.upcoming
|
|
792
795
|
}
|
|
793
|
-
],
|
|
796
|
+
], Re = !Q?.length;
|
|
794
797
|
return /* @__PURE__ */ e(
|
|
795
|
-
|
|
798
|
+
gt,
|
|
796
799
|
{
|
|
797
800
|
className: "mx-recurring-transaction-microwidget",
|
|
798
|
-
ctaLabel:
|
|
801
|
+
ctaLabel: Re ? ne.get_started_cta : I.primary_cta,
|
|
799
802
|
onCTAClick: b,
|
|
800
803
|
title: I.recurring_expenses,
|
|
801
|
-
children:
|
|
804
|
+
children: Re ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(Y, { children: [
|
|
802
805
|
/* @__PURE__ */ o(
|
|
803
806
|
c,
|
|
804
807
|
{
|
|
@@ -822,7 +825,7 @@ const q = {
|
|
|
822
825
|
],
|
|
823
826
|
children: [
|
|
824
827
|
/* @__PURE__ */ e(
|
|
825
|
-
|
|
828
|
+
h,
|
|
826
829
|
{
|
|
827
830
|
sx: { width: "100%" },
|
|
828
831
|
variant: P.length >= 10 && _ ? "H3" : "H2",
|
|
@@ -847,7 +850,7 @@ const q = {
|
|
|
847
850
|
}
|
|
848
851
|
),
|
|
849
852
|
/* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
|
|
850
|
-
/* @__PURE__ */ e(
|
|
853
|
+
/* @__PURE__ */ e(Oe, { data: ie }),
|
|
851
854
|
/* @__PURE__ */ e(
|
|
852
855
|
c,
|
|
853
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",
|