@mx-cartographer/experiences 7.0.37-alpha-recurring-transactions-divider-padding-ram1 → 7.0.37-alpha-recurring-transactions-divider-padding-ram2
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 +299 -299
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as Y } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { observer as D } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as B } from "date-fns/endOfMonth";
|
|
5
|
-
import { endOfToday as
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
5
|
+
import { endOfToday as le } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as W } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as de } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as ue } from "date-fns/subDays";
|
|
9
|
+
import oe from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as
|
|
11
|
+
import { R as He } from "../RecurringSettings-DHPyexin.mjs";
|
|
12
12
|
import { M as An } from "../RecurringSettings-DHPyexin.mjs";
|
|
13
|
-
import { addMonths as
|
|
14
|
-
import { subMonths as
|
|
15
|
-
import { isBefore as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { Schedule as
|
|
21
|
-
import { Text as
|
|
22
|
-
import { getWeeksInMonth as
|
|
23
|
-
import
|
|
24
|
-
import { AdapterDateFns as
|
|
25
|
-
import { DateCalendar as
|
|
26
|
-
import { LocalizationProvider as
|
|
27
|
-
import { isSameDay as
|
|
28
|
-
import
|
|
29
|
-
import { PickersDay as
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as S, a as
|
|
32
|
-
import { c as
|
|
13
|
+
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
|
+
import { subMonths as Be } from "date-fns/subMonths";
|
|
15
|
+
import { isBefore as Ue } from "date-fns/isBefore";
|
|
16
|
+
import ae from "@mui/material/Unstable_Grid2";
|
|
17
|
+
import Te from "@mui/material/IconButton";
|
|
18
|
+
import De from "@mui/material/Tab";
|
|
19
|
+
import Fe from "@mui/material/Tabs";
|
|
20
|
+
import { Schedule as je, MonetizationOn as Ke, Cancel as Le, CheckCircle as Ae, ChevronLeft as Ye, ChevronRight as Ve, CurrencyExchange as Xe } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as g, MerchantLogo as me, InstitutionLogo as Ze, H3 as qe, P as se } from "@mxenabled/mxui";
|
|
22
|
+
import { getWeeksInMonth as Se } from "date-fns/getWeeksInMonth";
|
|
23
|
+
import pe from "@mui/material/styles/useTheme";
|
|
24
|
+
import { AdapterDateFns as Je } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
|
+
import { DateCalendar as Qe } from "@mui/x-date-pickers/DateCalendar";
|
|
26
|
+
import { LocalizationProvider as et } from "@mui/x-date-pickers/LocalizationProvider";
|
|
27
|
+
import { isSameDay as tt } from "date-fns/isSameDay";
|
|
28
|
+
import nt from "@mui/material/Badge";
|
|
29
|
+
import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
+
import { I as V } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as S, a as X, i as M, f as Z, c as ge, g as he, p as rt } from "../hooks-BAAimqdq.mjs";
|
|
32
|
+
import { c as v, a as T, g as Ie, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
33
|
import { T as H } from "../RecurringTransactionsStore-DeLXfuC4.mjs";
|
|
34
34
|
import { R as Gn } from "../RecurringTransactionsStore-DeLXfuC4.mjs";
|
|
35
|
-
import { A as
|
|
35
|
+
import { A as w, W as at } from "../WidgetContainer-ztkGgdIH.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
37
|
+
import ce from "@mui/material/Divider";
|
|
38
|
+
import _e from "@mui/material/List";
|
|
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,48 +44,48 @@ import ut from "@mui/material/ListItemText";
|
|
|
44
44
|
import { b as mt } from "../ManageIncome-BaZyK1CD.mjs";
|
|
45
45
|
import { c as On, M as kn, S as Wn } from "../ManageIncome-BaZyK1CD.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
-
import { D as
|
|
48
|
-
import { b as
|
|
47
|
+
import { D as Ge } from "../Drawer-kEE73B87.mjs";
|
|
48
|
+
import { b as O } from "../Localization-2MODESHW.mjs";
|
|
49
49
|
import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
|
|
50
|
-
import
|
|
51
|
-
import { S as
|
|
52
|
-
import { u as
|
|
53
|
-
import { L as
|
|
50
|
+
import k from "@mui/material/Box";
|
|
51
|
+
import { S as Ne } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as fe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
+
import { L as K } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-BhHaL8eb.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
56
|
import { M as ht } from "../MicroWidgetContainer-Dpu8VDSP.mjs";
|
|
57
|
-
const
|
|
57
|
+
const q = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
},
|
|
62
|
-
|
|
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(je, { 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
|
+
Ke,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
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 = D(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring: a } = S(), { selectedAccountGuids: r } =
|
|
69
|
+
const { recurring: a } = S(), { selectedAccountGuids: r } = X(), { recurrences: l, setSelectedDay: p } = M(), s = h.useMemo(
|
|
70
70
|
() => l.filter((d) => r.includes(d.accountGuid)),
|
|
71
71
|
[r, l]
|
|
72
72
|
).filter(
|
|
73
|
-
(d) =>
|
|
74
|
-
),
|
|
75
|
-
(d) => d.type !==
|
|
73
|
+
(d) => tt(d.occurredOnDate || d.expectedDate, t)
|
|
74
|
+
), m = s.some(
|
|
75
|
+
(d) => d.type !== v.Income && d.status === T.Upcoming
|
|
76
76
|
), f = s.some(
|
|
77
|
-
(d) => d.type !==
|
|
77
|
+
(d) => d.type !== v.Income && d.status === T.Missed
|
|
78
78
|
), x = s.some(
|
|
79
|
-
(d) => d.type !==
|
|
80
|
-
), C = s.some((d) => d.type ===
|
|
79
|
+
(d) => d.type !== v.Income && d.status === T.Paid
|
|
80
|
+
), C = s.some((d) => d.type === v.Income), y = (m ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
nt,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */ o(
|
|
85
|
-
f && /* @__PURE__ */ e(
|
|
86
|
-
x && /* @__PURE__ */ e(
|
|
87
|
-
|
|
88
|
-
C && /* @__PURE__ */ e(
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ o(Y, { children: [
|
|
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: {
|
|
@@ -96,15 +96,15 @@ const Q = {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
it,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
102
|
${x && a.paid},
|
|
103
103
|
${f && a.missed},
|
|
104
|
-
${
|
|
104
|
+
${m && a.upcoming},
|
|
105
105
|
${C && a.income}`,
|
|
106
106
|
day: t,
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => p(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
109
109
|
sx: {
|
|
110
110
|
"&.MuiPickersDay-root": {
|
|
@@ -119,9 +119,9 @@ const Q = {
|
|
|
119
119
|
}
|
|
120
120
|
);
|
|
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(g, { variant: "XSmall", children: n })
|
|
125
125
|
] }), xt = D(() => {
|
|
126
126
|
const { recurring: t } = S();
|
|
127
127
|
return /* @__PURE__ */ o(
|
|
@@ -134,26 +134,26 @@ 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(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 =
|
|
146
|
-
|
|
147
|
-
),
|
|
148
|
-
l(
|
|
149
|
-
start:
|
|
144
|
+
}), we = 58, Oe = D(() => {
|
|
145
|
+
const t = pe(), { onEvent: n } = Z(), { selectedDay: i, setDateRange: a } = M(), [r, l] = h.useState(
|
|
146
|
+
Se(/* @__PURE__ */ new Date()) * H + we
|
|
147
|
+
), p = (s) => {
|
|
148
|
+
l(Se(s) * H + we), a({
|
|
149
|
+
start: W(s),
|
|
150
150
|
end: B(s)
|
|
151
|
-
}), n(
|
|
152
|
-
},
|
|
153
|
-
|
|
151
|
+
}), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
|
+
}, u = /* @__PURE__ */ e(
|
|
153
|
+
Qe,
|
|
154
154
|
{
|
|
155
|
-
minDate:
|
|
156
|
-
onMonthChange:
|
|
155
|
+
minDate: W(/* @__PURE__ */ new Date()),
|
|
156
|
+
onMonthChange: p,
|
|
157
157
|
showDaysOutsideCurrentMonth: !0,
|
|
158
158
|
slots: {
|
|
159
159
|
day: ft
|
|
@@ -200,26 +200,26 @@ const Q = {
|
|
|
200
200
|
views: ["day"]
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(
|
|
204
|
-
i &&
|
|
205
|
-
!i &&
|
|
203
|
+
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(et, { dateAdapter: Je, children: [
|
|
204
|
+
i && u,
|
|
205
|
+
!i && u,
|
|
206
206
|
/* @__PURE__ */ e(xt, {})
|
|
207
207
|
] }) });
|
|
208
208
|
}), yt = (t) => {
|
|
209
|
-
if (t.type ===
|
|
210
|
-
return /* @__PURE__ */ e(
|
|
209
|
+
if (t.type === v.Income)
|
|
210
|
+
return /* @__PURE__ */ e(ye, {});
|
|
211
211
|
switch (t.status) {
|
|
212
212
|
case T.Missed:
|
|
213
|
-
return /* @__PURE__ */ e(
|
|
213
|
+
return /* @__PURE__ */ e(Ce, {});
|
|
214
214
|
case T.Paid:
|
|
215
|
-
return /* @__PURE__ */ e(
|
|
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) {
|
|
221
221
|
case T.Paid:
|
|
222
|
-
return t.expectedDate ?
|
|
222
|
+
return t.expectedDate ? O(
|
|
223
223
|
n.paid_on,
|
|
224
224
|
A(
|
|
225
225
|
t.occurredOnDate || t.expectedDate,
|
|
@@ -227,12 +227,12 @@ const Q = {
|
|
|
227
227
|
)
|
|
228
228
|
) : n.paid;
|
|
229
229
|
case T.Missed:
|
|
230
|
-
return
|
|
230
|
+
return O(
|
|
231
231
|
n.missed_on,
|
|
232
232
|
A(t.expectedDate, E.MONTH_DAY)
|
|
233
233
|
);
|
|
234
234
|
case T.Upcoming:
|
|
235
|
-
return
|
|
235
|
+
return O(
|
|
236
236
|
n.upcoming_on,
|
|
237
237
|
A(t.expectedDate, E.MONTH_DAY)
|
|
238
238
|
);
|
|
@@ -246,18 +246,18 @@ const Q = {
|
|
|
246
246
|
},
|
|
247
247
|
showOrdinal: a = !1
|
|
248
248
|
}) => {
|
|
249
|
-
const { recurring: r } = S(), { repeatingTransactions: l } =
|
|
250
|
-
() => l.find((
|
|
249
|
+
const { recurring: r } = S(), { repeatingTransactions: l } = M(), [p, u] = h.useState(!1), s = h.useMemo(
|
|
250
|
+
() => l.find((R) => R.guid === t.repeatingTransactionGuid),
|
|
251
251
|
[t, l]
|
|
252
|
-
),
|
|
252
|
+
), m = t.type === v.Income, f = t.status === T.Paid, x = t.status === T.Missed, C = t.status === T.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(Ee, { disableGutters: !0, disablePadding: !0, children: [
|
|
256
256
|
/* @__PURE__ */ o(dt, { onClick: () => {
|
|
257
|
-
|
|
257
|
+
u(!0), i(t);
|
|
258
258
|
}, children: [
|
|
259
259
|
/* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
|
|
260
|
-
|
|
260
|
+
me,
|
|
261
261
|
{
|
|
262
262
|
categoryGuid: t.categoryGuid,
|
|
263
263
|
merchantGuid: t.merchantGuid
|
|
@@ -271,25 +271,25 @@ 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(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(
|
|
278
|
-
] }) : /* @__PURE__ */ o(
|
|
277
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: Ct(t, r) })
|
|
278
|
+
] }) : /* @__PURE__ */ o(Y, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
Ze,
|
|
281
281
|
{
|
|
282
282
|
alt: t.institutionName,
|
|
283
283
|
institutionGuid: t.institutionGuid,
|
|
284
284
|
size: 12
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
|
-
/* @__PURE__ */ e(
|
|
287
|
+
/* @__PURE__ */ e(g, { 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(
|
|
292
|
-
|
|
291
|
+
/* @__PURE__ */ o(g, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
|
|
292
|
+
m ? "+" : "",
|
|
293
293
|
L(t.amount, "0,0.00")
|
|
294
294
|
] }),
|
|
295
295
|
!n && /* @__PURE__ */ o(
|
|
@@ -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(g, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
)
|
|
@@ -316,16 +316,16 @@ const Q = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Ge,
|
|
320
320
|
{
|
|
321
321
|
ariaLabelClose: r.close_drawer_aria,
|
|
322
|
-
isOpen:
|
|
323
|
-
onClose: () =>
|
|
324
|
-
title: t.type ===
|
|
322
|
+
isOpen: p,
|
|
323
|
+
onClose: () => u(!1),
|
|
324
|
+
title: t.type === v.Income ? r.income_details : r.expense_details,
|
|
325
325
|
children: s && /* @__PURE__ */ e(
|
|
326
326
|
mt,
|
|
327
327
|
{
|
|
328
|
-
onDeleted: () =>
|
|
328
|
+
onDeleted: () => u(!1),
|
|
329
329
|
recurringTransaction: s
|
|
330
330
|
}
|
|
331
331
|
)
|
|
@@ -341,19 +341,19 @@ const Q = {
|
|
|
341
341
|
sx: r = {},
|
|
342
342
|
title: l
|
|
343
343
|
}) => {
|
|
344
|
-
const { recurring:
|
|
344
|
+
const { recurring: p } = S(), u = h.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(
|
|
352
|
-
i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children:
|
|
351
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: l }),
|
|
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(g, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: p.no_activities }) : /* @__PURE__ */ e(_e, { children: n ? t.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
357
357
|
/* @__PURE__ */ e(
|
|
358
358
|
Me,
|
|
359
359
|
{
|
|
@@ -362,12 +362,12 @@ const Q = {
|
|
|
362
362
|
recurrence: s
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */ e(
|
|
366
|
-
] }, `recurrence-${
|
|
367
|
-
/* @__PURE__ */ e(
|
|
368
|
-
|
|
365
|
+
/* @__PURE__ */ e(ce, { sx: { mx: 24 } })
|
|
366
|
+
] }, `recurrence-${m}`)) : u.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
367
|
+
/* @__PURE__ */ e(Ee, { 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(g, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
371
371
|
sx: { width: "100%" },
|
|
372
372
|
children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
|
|
373
373
|
Me,
|
|
@@ -379,177 +379,177 @@ const Q = {
|
|
|
379
379
|
) }, `day-recurrence-${x}`))
|
|
380
380
|
}
|
|
381
381
|
) }, s.id),
|
|
382
|
-
/* @__PURE__ */ e(
|
|
383
|
-
] }, `recurrence-${
|
|
382
|
+
/* @__PURE__ */ e(ce, { sx: { mx: 24 } })
|
|
383
|
+
] }, `recurrence-${m}`)) })
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
|
-
),
|
|
387
|
-
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming:
|
|
388
|
-
const
|
|
389
|
-
const x = [{ color:
|
|
390
|
-
return i && x.push({ color:
|
|
386
|
+
), ve = D(
|
|
387
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: p }) => {
|
|
388
|
+
const u = pe(), { isSmallMobile: s } = fe(), { recurring: m } = S(), f = h.useMemo(() => {
|
|
389
|
+
const x = [{ color: u.palette.success.main, percentage: `${a / t}` }];
|
|
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(g, { bold: !0, variant: "body1", children: `${r} (${l})` }),
|
|
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
|
-
/* @__PURE__ */ e(
|
|
400
|
-
!s && /* @__PURE__ */ e(
|
|
401
|
-
/* @__PURE__ */ e(
|
|
402
|
-
i !== void 0 && /* @__PURE__ */ o(
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
-
!s && /* @__PURE__ */ e(
|
|
405
|
-
/* @__PURE__ */ e(
|
|
399
|
+
/* @__PURE__ */ e(k, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
400
|
+
!s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
|
|
401
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: m.paid?.toLowerCase() }),
|
|
402
|
+
i !== void 0 && /* @__PURE__ */ o(Y, { children: [
|
|
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(i, "0,0.00") }),
|
|
405
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: m.missed?.toLowerCase() })
|
|
406
406
|
] }),
|
|
407
|
-
/* @__PURE__ */ e(
|
|
408
|
-
!s && /* @__PURE__ */ e(
|
|
409
|
-
/* @__PURE__ */ e(
|
|
407
|
+
/* @__PURE__ */ e(k, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
408
|
+
!s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(p, "0,0.00") }),
|
|
409
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: m.upcoming })
|
|
410
410
|
] })
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
413
|
), bt = D(() => {
|
|
414
|
-
const { recurring: t } = S(), {
|
|
415
|
-
currentMonthExpenses:
|
|
416
|
-
currentMonthIncome:
|
|
417
|
-
dateRange:
|
|
418
|
-
expenseTotal:
|
|
419
|
-
incomeTotal:
|
|
420
|
-
missedExpenseTotal:
|
|
421
|
-
pastRecurrences:
|
|
422
|
-
paidExpenseTotal:
|
|
423
|
-
paidIncomeTotal:
|
|
424
|
-
selectedDay:
|
|
425
|
-
selectedDayRecurrences:
|
|
426
|
-
setDateRange:
|
|
427
|
-
upcomingExpenseTotal:
|
|
428
|
-
upcomingIncomeTotal:
|
|
429
|
-
upcomingRecurrences:
|
|
430
|
-
} =
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
transaction_guid:
|
|
414
|
+
const { recurring: t } = S(), { isDesktop: n, isSmallMobile: i, isMobile: a } = fe(), { onEvent: r } = Z(), {
|
|
415
|
+
currentMonthExpenses: l,
|
|
416
|
+
currentMonthIncome: p,
|
|
417
|
+
dateRange: u,
|
|
418
|
+
expenseTotal: s,
|
|
419
|
+
incomeTotal: m,
|
|
420
|
+
missedExpenseTotal: f,
|
|
421
|
+
pastRecurrences: x,
|
|
422
|
+
paidExpenseTotal: C,
|
|
423
|
+
paidIncomeTotal: y,
|
|
424
|
+
selectedDay: d,
|
|
425
|
+
selectedDayRecurrences: R,
|
|
426
|
+
setDateRange: G,
|
|
427
|
+
upcomingExpenseTotal: Q,
|
|
428
|
+
upcomingIncomeTotal: ee,
|
|
429
|
+
upcomingRecurrences: U
|
|
430
|
+
} = M(), [$, te] = h.useState(0), I = Ue(u.start, /* @__PURE__ */ new Date()), ne = (b, re) => {
|
|
431
|
+
te(re);
|
|
432
|
+
}, _ = (b) => {
|
|
433
|
+
r(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
434
|
+
transaction_guid: b.transaction?.guid
|
|
435
435
|
});
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
transaction_guid:
|
|
436
|
+
}, F = (b) => {
|
|
437
|
+
r(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
|
+
transaction_guid: b.transaction?.guid
|
|
439
439
|
});
|
|
440
|
-
},
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
start:
|
|
444
|
-
end: B(
|
|
440
|
+
}, ie = () => {
|
|
441
|
+
const b = ze(u.start, 1);
|
|
442
|
+
G({
|
|
443
|
+
start: W(b),
|
|
444
|
+
end: B(b)
|
|
445
445
|
});
|
|
446
|
-
},
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
start:
|
|
450
|
-
end: B(
|
|
446
|
+
}, P = () => {
|
|
447
|
+
const b = Be(u.start, 1);
|
|
448
|
+
G({
|
|
449
|
+
start: W(b),
|
|
450
|
+
end: B(b)
|
|
451
451
|
});
|
|
452
452
|
};
|
|
453
453
|
return /* @__PURE__ */ o(
|
|
454
|
-
|
|
454
|
+
ae,
|
|
455
455
|
{
|
|
456
456
|
container: !0,
|
|
457
457
|
sx: {
|
|
458
458
|
pt: 16
|
|
459
459
|
},
|
|
460
460
|
children: [
|
|
461
|
-
/* @__PURE__ */ o(
|
|
462
|
-
/* @__PURE__ */ o(c, { sx: { gap: 16, px:
|
|
461
|
+
/* @__PURE__ */ o(ae, { md: !0, sm: 12, width: "100%", children: [
|
|
462
|
+
/* @__PURE__ */ o(c, { sx: { gap: 16, px: n ? 48 : 24 }, children: [
|
|
463
463
|
/* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
464
|
-
/* @__PURE__ */ e(
|
|
464
|
+
/* @__PURE__ */ e(qe, { children: O(
|
|
465
465
|
t.header_title,
|
|
466
|
-
A(
|
|
466
|
+
A(u.start, E.MONTH_LONG)
|
|
467
467
|
) }),
|
|
468
|
-
!
|
|
468
|
+
!n && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
469
469
|
/* @__PURE__ */ e(
|
|
470
|
-
|
|
470
|
+
Te,
|
|
471
471
|
{
|
|
472
472
|
color: "primary",
|
|
473
|
-
disabled:
|
|
474
|
-
onClick:
|
|
475
|
-
children: /* @__PURE__ */ e(
|
|
473
|
+
disabled: I,
|
|
474
|
+
onClick: P,
|
|
475
|
+
children: /* @__PURE__ */ e(Ye, {})
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
|
-
/* @__PURE__ */ e(
|
|
478
|
+
/* @__PURE__ */ e(Te, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Ve, {}) })
|
|
479
479
|
] })
|
|
480
480
|
] }),
|
|
481
481
|
/* @__PURE__ */ e(
|
|
482
|
-
|
|
482
|
+
ve,
|
|
483
483
|
{
|
|
484
|
-
expected:
|
|
485
|
-
missed:
|
|
486
|
-
paid:
|
|
484
|
+
expected: s,
|
|
485
|
+
missed: f,
|
|
486
|
+
paid: C,
|
|
487
487
|
title: t.expenses,
|
|
488
|
-
total:
|
|
489
|
-
upcoming:
|
|
488
|
+
total: l.length,
|
|
489
|
+
upcoming: Q
|
|
490
490
|
}
|
|
491
491
|
),
|
|
492
492
|
/* @__PURE__ */ e(
|
|
493
|
-
|
|
493
|
+
ve,
|
|
494
494
|
{
|
|
495
|
-
expected:
|
|
495
|
+
expected: m,
|
|
496
496
|
isExpense: !1,
|
|
497
|
-
paid:
|
|
497
|
+
paid: y,
|
|
498
498
|
title: t.deposits,
|
|
499
|
-
total:
|
|
500
|
-
upcoming:
|
|
499
|
+
total: p.length,
|
|
500
|
+
upcoming: ee
|
|
501
501
|
}
|
|
502
502
|
),
|
|
503
|
-
|
|
503
|
+
n && /* @__PURE__ */ e(
|
|
504
504
|
z,
|
|
505
505
|
{
|
|
506
|
-
onRecurrenceClick:
|
|
507
|
-
recurrences:
|
|
506
|
+
onRecurrenceClick: _,
|
|
507
|
+
recurrences: U,
|
|
508
508
|
title: t.upcoming_activity
|
|
509
509
|
}
|
|
510
510
|
)
|
|
511
511
|
] }),
|
|
512
|
-
!
|
|
513
|
-
/* @__PURE__ */ o(
|
|
512
|
+
!n && /* @__PURE__ */ o(c, { sx: { px: a ? 0 : 24 }, children: [
|
|
513
|
+
/* @__PURE__ */ o(Fe, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
514
514
|
/* @__PURE__ */ e(
|
|
515
|
-
|
|
515
|
+
De,
|
|
516
516
|
{
|
|
517
|
-
label: /* @__PURE__ */ e(
|
|
517
|
+
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
520
|
/* @__PURE__ */ e(
|
|
521
|
-
|
|
521
|
+
De,
|
|
522
522
|
{
|
|
523
|
-
label: /* @__PURE__ */ e(
|
|
523
|
+
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
|
|
524
524
|
}
|
|
525
525
|
)
|
|
526
526
|
] }),
|
|
527
527
|
$ === 0 && /* @__PURE__ */ e(
|
|
528
528
|
z,
|
|
529
529
|
{
|
|
530
|
-
onRecurrenceClick:
|
|
531
|
-
recurrences:
|
|
530
|
+
onRecurrenceClick: _,
|
|
531
|
+
recurrences: U
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
534
|
$ === 1 && /* @__PURE__ */ e(
|
|
535
535
|
z,
|
|
536
536
|
{
|
|
537
|
-
onRecurrenceClick:
|
|
538
|
-
recurrences:
|
|
537
|
+
onRecurrenceClick: F,
|
|
538
|
+
recurrences: x
|
|
539
539
|
}
|
|
540
540
|
)
|
|
541
541
|
] })
|
|
542
542
|
] }),
|
|
543
|
-
|
|
544
|
-
/* @__PURE__ */ e(
|
|
543
|
+
n && /* @__PURE__ */ e(ae, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
544
|
+
/* @__PURE__ */ e(Oe, {}),
|
|
545
545
|
/* @__PURE__ */ e(
|
|
546
546
|
z,
|
|
547
547
|
{
|
|
548
|
-
onRecurrenceClick:
|
|
549
|
-
recurrences:
|
|
550
|
-
title:
|
|
548
|
+
onRecurrenceClick: F,
|
|
549
|
+
recurrences: R || x,
|
|
550
|
+
title: d ? O(
|
|
551
551
|
t.day_transactions,
|
|
552
|
-
A(
|
|
552
|
+
A(d, E.MONTH_DAY)
|
|
553
553
|
) : t.past_transactions
|
|
554
554
|
}
|
|
555
555
|
)
|
|
@@ -558,14 +558,14 @@ const Q = {
|
|
|
558
558
|
}
|
|
559
559
|
);
|
|
560
560
|
}), _n = D(({ onBackClick: t, sx: n = {} }) => {
|
|
561
|
-
const { accounts: i } =
|
|
561
|
+
const { accounts: i } = ge(), { recurring: a } = S(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: p, setSelectedAccounts: u } = X(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = M(), { setFilter: x } = he(), { onEvent: C } = Z(), { isMobile: y } = fe(), [d, R] = h.useState(!1);
|
|
562
562
|
return h.useEffect(() => {
|
|
563
|
-
|
|
563
|
+
u(i);
|
|
564
564
|
}, [i]), h.useEffect(() => {
|
|
565
565
|
l && (x({
|
|
566
|
-
dateRange: { start:
|
|
567
|
-
accounts:
|
|
568
|
-
}), f({ start:
|
|
566
|
+
dateRange: { start: ue(de(), 90), end: le() },
|
|
567
|
+
accounts: p
|
|
568
|
+
}), f({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), m().finally());
|
|
569
569
|
}, [l]), r ? /* @__PURE__ */ o(
|
|
570
570
|
at,
|
|
571
571
|
{
|
|
@@ -575,48 +575,48 @@ const Q = {
|
|
|
575
575
|
label: a.action_title,
|
|
576
576
|
iconName: "credit_card_gear",
|
|
577
577
|
onClick: () => {
|
|
578
|
-
|
|
578
|
+
R(!0), C(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
],
|
|
582
582
|
hasDivider: y,
|
|
583
|
-
onAccountsFilterClick: () => C(
|
|
583
|
+
onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
584
584
|
onBackClick: t,
|
|
585
585
|
sx: n,
|
|
586
586
|
title: a.title,
|
|
587
587
|
children: [
|
|
588
588
|
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ o(c, { direction: "column", p: 48, spacing: 24, children: [
|
|
589
|
-
/* @__PURE__ */ e(
|
|
590
|
-
/* @__PURE__ */ e(
|
|
591
|
-
/* @__PURE__ */ e(
|
|
589
|
+
/* @__PURE__ */ e(oe, { height: 100, variant: "rounded", width: "100%" }),
|
|
590
|
+
/* @__PURE__ */ e(oe, { height: 100, variant: "rounded", width: "100%" }),
|
|
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: d,
|
|
598
|
-
onClose: () =>
|
|
598
|
+
onClose: () => R(!1),
|
|
599
599
|
shouldShowHeaderBorders: !1,
|
|
600
600
|
title: a.action_title,
|
|
601
|
-
children: /* @__PURE__ */ e(
|
|
601
|
+
children: /* @__PURE__ */ e(He, {})
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
]
|
|
605
605
|
}
|
|
606
|
-
) : /* @__PURE__ */ e(
|
|
606
|
+
) : /* @__PURE__ */ e(K, {});
|
|
607
607
|
}), Rt = D(() => {
|
|
608
|
-
const { recurring: t } = S(), { availableWidth: n } =
|
|
609
|
-
return /* @__PURE__ */ o(c, { flexDirection:
|
|
610
|
-
/* @__PURE__ */ e(
|
|
611
|
-
!
|
|
608
|
+
const { recurring: t } = S(), { availableWidth: n } = rt(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = M(), p = n < 750;
|
|
609
|
+
return /* @__PURE__ */ o(c, { flexDirection: p ? "column" : "row", width: "100%", children: [
|
|
610
|
+
/* @__PURE__ */ e(Oe, {}),
|
|
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
616
|
onResetClick: i ? () => r(i) : void 0,
|
|
617
617
|
recurrences: a || l.slice(0, 5),
|
|
618
|
-
sx: { width:
|
|
619
|
-
title: i ?
|
|
618
|
+
sx: { width: p ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
619
|
+
title: i ? O(
|
|
620
620
|
t.day_transactions,
|
|
621
621
|
A(i, E.MONTH_DAY)
|
|
622
622
|
) : t.upcoming_activity
|
|
@@ -625,15 +625,15 @@ const Q = {
|
|
|
625
625
|
] });
|
|
626
626
|
}), wn = D(
|
|
627
627
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
628
|
-
const { accounts: i } =
|
|
628
|
+
const { accounts: i } = ge(), { recurring: a } = S(), { setFilter: r } = he(), { isDataLoaded: l, loadRepeatingTransactions: p } = M(), { isCopyLoaded: u, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = X();
|
|
629
629
|
return h.useEffect(() => {
|
|
630
|
-
s &&
|
|
630
|
+
s && m(i);
|
|
631
631
|
}, [s]), h.useEffect(() => {
|
|
632
632
|
f.length > 0 && (r({
|
|
633
|
-
dateRange: { start:
|
|
633
|
+
dateRange: { start: ue(de(), 90), end: le() },
|
|
634
634
|
accounts: f
|
|
635
|
-
}),
|
|
636
|
-
}, [f]), !
|
|
635
|
+
}), p().finally());
|
|
636
|
+
}, [f]), !u || !s ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ e(
|
|
637
637
|
pt,
|
|
638
638
|
{
|
|
639
639
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
@@ -642,7 +642,7 @@ const Q = {
|
|
|
642
642
|
subTitle: a.sub_title,
|
|
643
643
|
sx: n,
|
|
644
644
|
title: a.mini_title,
|
|
645
|
-
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(
|
|
645
|
+
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(K, {})
|
|
646
646
|
}
|
|
647
647
|
);
|
|
648
648
|
}
|
|
@@ -650,7 +650,7 @@ const Q = {
|
|
|
650
650
|
upcomingRecurrences: t,
|
|
651
651
|
maxLogos: n = 3
|
|
652
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
655
|
categoryGuid: i.categoryGuid || "",
|
|
656
656
|
merchantGuid: i.merchantGuid || ""
|
|
@@ -663,14 +663,14 @@ const Q = {
|
|
|
663
663
|
}) => {
|
|
664
664
|
const a = (r) => r * (n / 2);
|
|
665
665
|
return /* @__PURE__ */ e(
|
|
666
|
-
|
|
666
|
+
k,
|
|
667
667
|
{
|
|
668
668
|
sx: {
|
|
669
669
|
position: "relative",
|
|
670
670
|
width: 64
|
|
671
671
|
},
|
|
672
672
|
children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
|
|
673
|
-
|
|
673
|
+
k,
|
|
674
674
|
{
|
|
675
675
|
sx: {
|
|
676
676
|
borderRadius: "4px",
|
|
@@ -681,7 +681,7 @@ const Q = {
|
|
|
681
681
|
position: "absolute"
|
|
682
682
|
},
|
|
683
683
|
children: /* @__PURE__ */ e(
|
|
684
|
-
|
|
684
|
+
me,
|
|
685
685
|
{
|
|
686
686
|
categoryGuid: r.categoryGuid || "",
|
|
687
687
|
merchantGuid: r.merchantGuid || "",
|
|
@@ -701,7 +701,7 @@ const Q = {
|
|
|
701
701
|
label: r
|
|
702
702
|
}) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
703
703
|
/* @__PURE__ */ e(
|
|
704
|
-
|
|
704
|
+
k,
|
|
705
705
|
{
|
|
706
706
|
sx: {
|
|
707
707
|
borderRadius: "2px",
|
|
@@ -712,99 +712,99 @@ const Q = {
|
|
|
712
712
|
}
|
|
713
713
|
),
|
|
714
714
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
715
|
-
!a && /* @__PURE__ */ e(
|
|
716
|
-
/* @__PURE__ */ e(
|
|
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 = D(() => {
|
|
719
719
|
const { recurring: t } = S();
|
|
720
720
|
return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
721
|
-
/* @__PURE__ */ e(
|
|
721
|
+
/* @__PURE__ */ e(Xe, { size: 32 }),
|
|
722
722
|
/* @__PURE__ */ o(c, { children: [
|
|
723
|
-
/* @__PURE__ */ e(
|
|
724
|
-
/* @__PURE__ */ e(
|
|
723
|
+
/* @__PURE__ */ e(se, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
724
|
+
/* @__PURE__ */ e(se, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
725
725
|
] })
|
|
726
726
|
] });
|
|
727
|
-
}),
|
|
727
|
+
}), Mn = D(
|
|
728
728
|
({ onCTAClick: t }) => {
|
|
729
|
-
const [n, i] = h.useState(!1), { onEvent: a } =
|
|
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,
|
|
733
|
-
missedExpenseTotal:
|
|
734
|
-
paidExpenseTotal:
|
|
735
|
-
repeatingTransactions:
|
|
736
|
-
setDateRange:
|
|
737
|
-
upcomingExpenseTotal:
|
|
738
|
-
isDataLoaded:
|
|
739
|
-
} =
|
|
733
|
+
missedExpenseTotal: R,
|
|
734
|
+
paidExpenseTotal: G,
|
|
735
|
+
repeatingTransactions: Q,
|
|
736
|
+
setDateRange: ee,
|
|
737
|
+
upcomingExpenseTotal: U,
|
|
738
|
+
isDataLoaded: $
|
|
739
|
+
} = M(), { setFilter: te } = he(), { recurring: I, budgets: ne } = S();
|
|
740
740
|
h.useEffect(() => {
|
|
741
741
|
x(l);
|
|
742
742
|
}, [l]), h.useEffect(() => {
|
|
743
|
-
|
|
744
|
-
dateRange: { start:
|
|
743
|
+
m && (te({
|
|
744
|
+
dateRange: { start: ue(de(), 90), end: le() },
|
|
745
745
|
accounts: f
|
|
746
|
-
}),
|
|
747
|
-
}, [
|
|
748
|
-
n && a(
|
|
746
|
+
}), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
747
|
+
}, [m]), h.useEffect(() => {
|
|
748
|
+
n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
749
749
|
state: y.length > 0 ? "default" : "zeroState"
|
|
750
750
|
});
|
|
751
751
|
}, [n]);
|
|
752
|
-
const
|
|
753
|
-
const
|
|
754
|
-
{ color: r.palette.success.main, percentage: `${
|
|
752
|
+
const _ = u <= 288, F = u >= 450, ie = h.useMemo(() => {
|
|
753
|
+
const N = [
|
|
754
|
+
{ color: r.palette.success.main, percentage: `${G / d}` }
|
|
755
755
|
];
|
|
756
|
-
return
|
|
756
|
+
return R && N.push({
|
|
757
757
|
color: r.palette.error.main,
|
|
758
|
-
percentage: `${
|
|
759
|
-
}),
|
|
758
|
+
percentage: `${R / d}`
|
|
759
|
+
}), N;
|
|
760
760
|
}, [
|
|
761
|
-
|
|
761
|
+
G,
|
|
762
762
|
d,
|
|
763
|
-
|
|
763
|
+
R,
|
|
764
764
|
r.palette.success.main,
|
|
765
765
|
r.palette.error.main
|
|
766
|
-
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]),
|
|
766
|
+
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), b = () => {
|
|
767
767
|
a(
|
|
768
|
-
y.length > 0 ?
|
|
768
|
+
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
769
769
|
), t();
|
|
770
770
|
};
|
|
771
|
-
if (!s || !n ||
|
|
772
|
-
const
|
|
771
|
+
if (!s || !n || !$) return /* @__PURE__ */ e(K, { height: 100 });
|
|
772
|
+
const re = 32, ke = y.length > 0, We = () => ke ? _ ? /* @__PURE__ */ e(
|
|
773
773
|
Dt,
|
|
774
774
|
{
|
|
775
|
-
logoSize:
|
|
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:
|
|
779
|
+
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: _ ? 64 : 104 } }), $e = [
|
|
780
780
|
{
|
|
781
|
-
amount:
|
|
781
|
+
amount: G,
|
|
782
782
|
bgColor: "success.main",
|
|
783
783
|
label: I.paid
|
|
784
784
|
},
|
|
785
785
|
{
|
|
786
|
-
amount:
|
|
786
|
+
amount: R,
|
|
787
787
|
bgColor: "error.main",
|
|
788
788
|
label: I.missed
|
|
789
789
|
},
|
|
790
790
|
{
|
|
791
|
-
amount:
|
|
791
|
+
amount: U,
|
|
792
792
|
bgColor: "border.light",
|
|
793
793
|
label: I.upcoming
|
|
794
794
|
}
|
|
795
|
-
],
|
|
795
|
+
], Re = !Q?.length;
|
|
796
796
|
return /* @__PURE__ */ e(
|
|
797
797
|
ht,
|
|
798
798
|
{
|
|
799
799
|
className: "mx-recurring-transaction-microwidget",
|
|
800
|
-
ctaLabel:
|
|
801
|
-
onCTAClick:
|
|
800
|
+
ctaLabel: Re ? ne.get_started_cta : I.primary_cta,
|
|
801
|
+
onCTAClick: b,
|
|
802
802
|
title: I.recurring_expenses,
|
|
803
|
-
children:
|
|
803
|
+
children: Re ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(Y, { children: [
|
|
804
804
|
/* @__PURE__ */ o(
|
|
805
805
|
c,
|
|
806
806
|
{
|
|
807
|
-
ref:
|
|
807
|
+
ref: p,
|
|
808
808
|
sx: {
|
|
809
809
|
flexDirection: "row",
|
|
810
810
|
justifyContent: "space-between"
|
|
@@ -814,7 +814,7 @@ const Q = {
|
|
|
814
814
|
c,
|
|
815
815
|
{
|
|
816
816
|
sx: [
|
|
817
|
-
P.length >= 10 &&
|
|
817
|
+
P.length >= 10 && _ ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
818
818
|
{
|
|
819
819
|
alignItems: "baseline",
|
|
820
820
|
overflow: "hidden",
|
|
@@ -824,15 +824,15 @@ const Q = {
|
|
|
824
824
|
],
|
|
825
825
|
children: [
|
|
826
826
|
/* @__PURE__ */ e(
|
|
827
|
-
|
|
827
|
+
g,
|
|
828
828
|
{
|
|
829
829
|
sx: { width: "100%" },
|
|
830
|
-
variant: P.length >= 10 &&
|
|
830
|
+
variant: P.length >= 10 && _ ? "H3" : "H2",
|
|
831
831
|
children: P
|
|
832
832
|
}
|
|
833
833
|
),
|
|
834
834
|
/* @__PURE__ */ e(
|
|
835
|
-
|
|
835
|
+
se,
|
|
836
836
|
{
|
|
837
837
|
sx: {
|
|
838
838
|
pr: 12
|
|
@@ -844,12 +844,12 @@ const Q = {
|
|
|
844
844
|
]
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
|
-
|
|
847
|
+
We()
|
|
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,16 +859,16 @@ const Q = {
|
|
|
859
859
|
gap: 16,
|
|
860
860
|
mt: 4
|
|
861
861
|
},
|
|
862
|
-
children:
|
|
862
|
+
children: $e.map((N, Pe) => /* @__PURE__ */ e(
|
|
863
863
|
St,
|
|
864
864
|
{
|
|
865
|
-
amount:
|
|
866
|
-
bgcolor:
|
|
867
|
-
isLargeScreen:
|
|
868
|
-
isSmallScreen:
|
|
869
|
-
label:
|
|
865
|
+
amount: N.amount,
|
|
866
|
+
bgcolor: N.bgColor,
|
|
867
|
+
isLargeScreen: F,
|
|
868
|
+
isSmallScreen: _,
|
|
869
|
+
label: N.label
|
|
870
870
|
},
|
|
871
|
-
`recurrence-legend-${
|
|
871
|
+
`recurrence-legend-${Pe}`
|
|
872
872
|
))
|
|
873
873
|
}
|
|
874
874
|
)
|
|
@@ -882,8 +882,8 @@ export {
|
|
|
882
882
|
On as AddRecurringTransactionDetails,
|
|
883
883
|
An as ManageExpenses,
|
|
884
884
|
kn as ManageIncome,
|
|
885
|
-
|
|
886
|
-
|
|
885
|
+
He as RecurringSettings,
|
|
886
|
+
Mn as RecurringTransactionsMicroWidget,
|
|
887
887
|
wn as RecurringTransactionsMiniWidget,
|
|
888
888
|
Gn as RecurringTransactionsStore,
|
|
889
889
|
_n as RecurringTransactionsWidget,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "7.0.37-alpha-recurring-transactions-divider-padding-
|
|
3
|
+
"version": "7.0.37-alpha-recurring-transactions-divider-padding-ram2",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
5
|
"author": "MX",
|
|
6
6
|
"license": "MIT",
|