@mx-cartographer/experiences 7.0.57-alpha.mega3 → 7.0.58-alpha.al0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/dist/cashflow/index.es.js +145 -141
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/localization/CashflowCopy.d.ts +2 -0
- package/dist/recurringtransactions/components/RecurringSettingsDrawer.d.ts +8 -0
- package/dist/recurringtransactions/index.d.ts +1 -0
- package/dist/recurringtransactions/index.es.js +243 -228
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as Z } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
5
5
|
import { endOfToday as de } from "date-fns/endOfToday";
|
|
6
6
|
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
@@ -8,18 +8,18 @@ import { startOfToday as ue } from "date-fns/startOfToday";
|
|
|
8
8
|
import { subDays as me } from "date-fns/subDays";
|
|
9
9
|
import ae from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as
|
|
12
|
-
import { M as
|
|
11
|
+
import { R as Ee } from "../RecurringSettings-qv7DNYac.mjs";
|
|
12
|
+
import { M as En } from "../RecurringSettings-qv7DNYac.mjs";
|
|
13
13
|
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Fe } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Ue } from "date-fns/isBefore";
|
|
16
16
|
import se from "@mui/material/Unstable_Grid2";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import Se from "@mui/material/IconButton";
|
|
18
|
+
import _e from "@mui/material/Tab";
|
|
19
19
|
import je from "@mui/material/Tabs";
|
|
20
|
-
import { Schedule as Ke, MonetizationOn as Ye, Cancel as
|
|
20
|
+
import { Schedule as Ke, MonetizationOn as Ye, Cancel as Ge, CheckCircle as Ne, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
|
|
21
21
|
import { Text as p, MerchantLogo as pe, InstitutionLogo as qe, H3 as Je, P as ce } from "@mxenabled/mxui";
|
|
22
|
-
import { getWeeksInMonth as
|
|
22
|
+
import { getWeeksInMonth as we } from "date-fns/getWeeksInMonth";
|
|
23
23
|
import ge 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";
|
|
@@ -27,30 +27,30 @@ import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProv
|
|
|
27
27
|
import { isSameDay as nt } from "date-fns/isSameDay";
|
|
28
28
|
import it from "@mui/material/Badge";
|
|
29
29
|
import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as
|
|
32
|
-
import { c as M, a as
|
|
30
|
+
import { I as q } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as D, b as U, j as I, g as J, p as Oe, d as he, h as fe } from "../hooks-CE2TKk4a.mjs";
|
|
32
|
+
import { c as M, a as S, g as Ie, f as ot } from "../RecurringTransactions-DTUx9VN1.mjs";
|
|
33
33
|
import { T as B } from "../RecurringTransactionsStore-Djo9IeDd.mjs";
|
|
34
|
-
import { R as
|
|
35
|
-
import { A as
|
|
34
|
+
import { R as Nn } from "../RecurringTransactionsStore-Djo9IeDd.mjs";
|
|
35
|
+
import { A as w, W as at } from "../WidgetContainer-B8MRJ5Y1.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import le from "@mui/material/Divider";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
38
|
+
import ve from "@mui/material/List";
|
|
39
|
+
import ke 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";
|
|
43
43
|
import ut from "@mui/material/ListItemText";
|
|
44
44
|
import { b as mt } from "../ManageIncome-BX7dzGF8.mjs";
|
|
45
|
-
import { c as
|
|
45
|
+
import { c as kn, M as Wn, S as $n } from "../ManageIncome-BX7dzGF8.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
-
import { D as
|
|
47
|
+
import { D as xe } from "../Drawer-kEE73B87.mjs";
|
|
48
48
|
import { b as N } from "../Localization-2MODESHW.mjs";
|
|
49
49
|
import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
|
|
50
50
|
import O from "@mui/material/Box";
|
|
51
|
-
import { S as
|
|
52
|
-
import { u as
|
|
53
|
-
import { L as
|
|
51
|
+
import { S as We } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as ye } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
+
import { L as F } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
56
|
import { M as ht } from "../MicroWidgetContainer-C4QQHfD7.mjs";
|
|
@@ -58,34 +58,34 @@ const Q = {
|
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
}, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0,
|
|
61
|
+
}, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...Q } }) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(
|
|
62
62
|
Ye,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
65
|
sx: { color: "categories.income", fontSize: n, ...Q }
|
|
66
66
|
}
|
|
67
|
-
) }),
|
|
67
|
+
) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ge, { color: "error", filled: !0, sx: { fontSize: n, ...Q } }) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...Q } }) }), ft = T(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring:
|
|
70
|
-
() => l.filter((d) =>
|
|
71
|
-
[
|
|
69
|
+
const { recurring: r } = D(), { selectedAccountGuids: o } = U(), { recurrences: l, setSelectedDay: m } = I(), s = h.useMemo(
|
|
70
|
+
() => l.filter((d) => o.includes(d.accountGuid)),
|
|
71
|
+
[o, l]
|
|
72
72
|
).filter(
|
|
73
73
|
(d) => nt(d.occurredOnDate || d.expectedDate, t)
|
|
74
74
|
), u = s.some(
|
|
75
|
-
(d) => d.type !== M.Income && d.status ===
|
|
75
|
+
(d) => d.type !== M.Income && d.status === S.Upcoming
|
|
76
76
|
), f = s.some(
|
|
77
|
-
(d) => d.type !== M.Income && d.status ===
|
|
77
|
+
(d) => d.type !== M.Income && d.status === S.Missed
|
|
78
78
|
), x = s.some(
|
|
79
|
-
(d) => d.type !== M.Income && d.status ===
|
|
79
|
+
(d) => d.type !== M.Income && d.status === S.Paid
|
|
80
80
|
), C = s.some((d) => d.type === M.Income), y = (u ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
82
|
it,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */
|
|
85
|
-
f && /* @__PURE__ */ e(
|
|
86
|
-
x && /* @__PURE__ */ e(
|
|
87
|
-
u && /* @__PURE__ */ e(
|
|
88
|
-
C && /* @__PURE__ */ e(
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ a(Z, { children: [
|
|
85
|
+
f && /* @__PURE__ */ e(Re, { isOffset: !0 }),
|
|
86
|
+
x && /* @__PURE__ */ e(Te, { isOffset: !0 }),
|
|
87
|
+
u && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
|
|
88
|
+
C && /* @__PURE__ */ e(be, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -99,10 +99,10 @@ const Q = {
|
|
|
99
99
|
rt,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
|
-
${x &&
|
|
103
|
-
${f &&
|
|
104
|
-
${u &&
|
|
105
|
-
${C &&
|
|
102
|
+
${x && r.paid},
|
|
103
|
+
${f && r.missed},
|
|
104
|
+
${u && r.upcoming},
|
|
105
|
+
${C && r.income}`,
|
|
106
106
|
day: t,
|
|
107
107
|
onClick: () => m(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
@@ -119,12 +119,12 @@ const Q = {
|
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), X = ({ icon: t, label: n }) => /* @__PURE__ */ a(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
124
|
/* @__PURE__ */ e(p, { variant: "XSmall", children: n })
|
|
125
|
-
] }), xt =
|
|
126
|
-
const { recurring: t } =
|
|
127
|
-
return /* @__PURE__ */
|
|
125
|
+
] }), xt = T(() => {
|
|
126
|
+
const { recurring: t } = D();
|
|
127
|
+
return /* @__PURE__ */ a(
|
|
128
128
|
c,
|
|
129
129
|
{
|
|
130
130
|
alignItems: "center",
|
|
@@ -134,21 +134,21 @@ 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(X, { icon: Ce, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(X, { icon: be, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(X, { icon: Re, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(X, { icon: Te, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange:
|
|
146
|
-
|
|
144
|
+
}), Me = 58, $e = T(() => {
|
|
145
|
+
const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange: r } = I(), [o, l] = h.useState(
|
|
146
|
+
we(/* @__PURE__ */ new Date()) * B + Me
|
|
147
147
|
), m = (s) => {
|
|
148
|
-
l(
|
|
148
|
+
l(we(s) * B + Me), r({
|
|
149
149
|
start: k(s),
|
|
150
150
|
end: z(s)
|
|
151
|
-
}), n(
|
|
151
|
+
}), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
152
|
}, g = /* @__PURE__ */ e(
|
|
153
153
|
et,
|
|
154
154
|
{
|
|
@@ -182,10 +182,10 @@ const Q = {
|
|
|
182
182
|
fontWeight: 600
|
|
183
183
|
},
|
|
184
184
|
"& .MuiDayCalendar-slideTransition": {
|
|
185
|
-
minHeight:
|
|
185
|
+
minHeight: o
|
|
186
186
|
},
|
|
187
187
|
"&.MuiDateCalendar-root": {
|
|
188
|
-
minHeight:
|
|
188
|
+
minHeight: o + B
|
|
189
189
|
},
|
|
190
190
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
191
191
|
height: B,
|
|
@@ -201,25 +201,25 @@ const Q = {
|
|
|
201
201
|
views: ["day"]
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ a(tt, { dateAdapter: Qe, children: [
|
|
205
205
|
i && g,
|
|
206
206
|
!i && g,
|
|
207
207
|
/* @__PURE__ */ e(xt, {})
|
|
208
208
|
] }) });
|
|
209
209
|
}), yt = (t) => {
|
|
210
210
|
if (t.type === M.Income)
|
|
211
|
-
return /* @__PURE__ */ e(
|
|
211
|
+
return /* @__PURE__ */ e(be, {});
|
|
212
212
|
switch (t.status) {
|
|
213
|
-
case
|
|
214
|
-
return /* @__PURE__ */ e(be, {});
|
|
215
|
-
case T.Paid:
|
|
213
|
+
case S.Missed:
|
|
216
214
|
return /* @__PURE__ */ e(Re, {});
|
|
215
|
+
case S.Paid:
|
|
216
|
+
return /* @__PURE__ */ e(Te, {});
|
|
217
217
|
default:
|
|
218
|
-
return /* @__PURE__ */ e(
|
|
218
|
+
return /* @__PURE__ */ e(Ce, {});
|
|
219
219
|
}
|
|
220
220
|
}, Ct = (t, n) => {
|
|
221
221
|
switch (t.status) {
|
|
222
|
-
case
|
|
222
|
+
case S.Paid:
|
|
223
223
|
return t.expectedDate ? N(
|
|
224
224
|
n.paid_on,
|
|
225
225
|
A(
|
|
@@ -227,12 +227,12 @@ const Q = {
|
|
|
227
227
|
E.MONTH_DAY
|
|
228
228
|
)
|
|
229
229
|
) : n.paid;
|
|
230
|
-
case
|
|
230
|
+
case S.Missed:
|
|
231
231
|
return N(
|
|
232
232
|
n.missed_on,
|
|
233
233
|
A(t.expectedDate, E.MONTH_DAY)
|
|
234
234
|
);
|
|
235
|
-
case
|
|
235
|
+
case S.Upcoming:
|
|
236
236
|
return N(
|
|
237
237
|
n.upcoming_on,
|
|
238
238
|
A(t.expectedDate, E.MONTH_DAY)
|
|
@@ -240,21 +240,21 @@ const Q = {
|
|
|
240
240
|
default:
|
|
241
241
|
return n.unknown;
|
|
242
242
|
}
|
|
243
|
-
},
|
|
243
|
+
}, Le = ({
|
|
244
244
|
recurrence: t,
|
|
245
245
|
isMini: n = !1,
|
|
246
246
|
onRecurrenceClick: i = () => {
|
|
247
247
|
},
|
|
248
|
-
showOrdinal:
|
|
248
|
+
showOrdinal: r = !1
|
|
249
249
|
}) => {
|
|
250
|
-
const { recurring:
|
|
250
|
+
const { recurring: o } = D(), { repeatingTransactions: l } = I(), [m, g] = h.useState(!1), s = h.useMemo(
|
|
251
251
|
() => l.find((b) => b.guid === t.repeatingTransactionGuid),
|
|
252
252
|
[t, l]
|
|
253
|
-
), u = t.type === M.Income, f = t.status ===
|
|
254
|
-
let y =
|
|
255
|
-
return x ? y =
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
253
|
+
), u = t.type === M.Income, f = t.status === S.Paid, x = t.status === S.Missed, C = t.status === S.Upcoming;
|
|
254
|
+
let y = o.paid?.toLowerCase();
|
|
255
|
+
return x ? y = o.missed?.toLowerCase() : C && (y = r ? Ie(o, s || {}, !0) : Ie(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
256
|
+
/* @__PURE__ */ a(ke, { disableGutters: !0, disablePadding: !0, children: [
|
|
257
|
+
/* @__PURE__ */ a(dt, { onClick: () => {
|
|
258
258
|
g(!0), i(t);
|
|
259
259
|
}, children: [
|
|
260
260
|
/* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
|
|
@@ -264,19 +264,19 @@ const Q = {
|
|
|
264
264
|
merchantGuid: t.merchantGuid
|
|
265
265
|
}
|
|
266
266
|
) }),
|
|
267
|
-
/* @__PURE__ */ e(ut, { children: /* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ e(ut, { children: /* @__PURE__ */ a(
|
|
268
268
|
c,
|
|
269
269
|
{
|
|
270
270
|
direction: "row",
|
|
271
271
|
gap: 4,
|
|
272
272
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
273
273
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ a(c, { direction: "column", width: "50%", children: [
|
|
275
275
|
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
|
|
276
|
-
/* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(c, { direction: "row", gap: 4, children: [
|
|
277
277
|
yt(t),
|
|
278
|
-
/* @__PURE__ */ e(p, { variant: "caption", children: Ct(t,
|
|
279
|
-
] }) : /* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: Ct(t, o) })
|
|
279
|
+
] }) : /* @__PURE__ */ a(Z, { children: [
|
|
280
280
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
281
281
|
qe,
|
|
282
282
|
{
|
|
@@ -288,12 +288,12 @@ const Q = {
|
|
|
288
288
|
/* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
289
289
|
] }) })
|
|
290
290
|
] }),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ a(c, { alignItems: "flex-end", width: "100%", children: [
|
|
292
|
+
/* @__PURE__ */ a(p, { bold: !0, color: u ? "success.main" : "text.primary", variant: "body1", children: [
|
|
293
293
|
u ? "+" : "",
|
|
294
294
|
L(t.amount, "0,0.00")
|
|
295
295
|
] }),
|
|
296
|
-
!n && /* @__PURE__ */
|
|
296
|
+
!n && /* @__PURE__ */ a(
|
|
297
297
|
c,
|
|
298
298
|
{
|
|
299
299
|
direction: "row",
|
|
@@ -305,8 +305,8 @@ const Q = {
|
|
|
305
305
|
width: "100%"
|
|
306
306
|
},
|
|
307
307
|
children: [
|
|
308
|
-
f && /* @__PURE__ */ e(
|
|
309
|
-
x && /* @__PURE__ */ e(
|
|
308
|
+
f && /* @__PURE__ */ e(Ne, { color: "success", filled: !0, size: 12 }),
|
|
309
|
+
x && /* @__PURE__ */ e(Ge, { color: "error", filled: !0, size: 12 }),
|
|
310
310
|
/* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
311
311
|
]
|
|
312
312
|
}
|
|
@@ -317,12 +317,12 @@ const Q = {
|
|
|
317
317
|
) })
|
|
318
318
|
] }),
|
|
319
319
|
/* @__PURE__ */ e(
|
|
320
|
-
|
|
320
|
+
xe,
|
|
321
321
|
{
|
|
322
|
-
ariaLabelClose:
|
|
322
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
323
323
|
isOpen: m,
|
|
324
324
|
onClose: () => g(!1),
|
|
325
|
-
title: t.type === M.Income ?
|
|
325
|
+
title: t.type === M.Income ? o.income_details : o.expense_details,
|
|
326
326
|
children: s && /* @__PURE__ */ e(
|
|
327
327
|
mt,
|
|
328
328
|
{
|
|
@@ -333,18 +333,18 @@ const Q = {
|
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
] });
|
|
336
|
-
}, H =
|
|
336
|
+
}, H = T(
|
|
337
337
|
({
|
|
338
338
|
recurrences: t,
|
|
339
339
|
isMini: n = !1,
|
|
340
340
|
onResetClick: i,
|
|
341
|
-
onRecurrenceClick:
|
|
342
|
-
sx:
|
|
341
|
+
onRecurrenceClick: r,
|
|
342
|
+
sx: o = {},
|
|
343
343
|
title: l
|
|
344
344
|
}) => {
|
|
345
|
-
const { recurring: m } =
|
|
346
|
-
return /* @__PURE__ */
|
|
347
|
-
l && /* @__PURE__ */
|
|
345
|
+
const { recurring: m } = D(), g = h.useMemo(() => ot(t), [t]);
|
|
346
|
+
return /* @__PURE__ */ a(c, { sx: { gap: 8, mt: 4, ...o }, children: [
|
|
347
|
+
l && /* @__PURE__ */ a(
|
|
348
348
|
c,
|
|
349
349
|
{
|
|
350
350
|
sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
|
|
@@ -354,27 +354,27 @@ const Q = {
|
|
|
354
354
|
]
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
|
-
t.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(
|
|
357
|
+
t.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(ve, { children: n ? t.map((s, u) => /* @__PURE__ */ a(h.Fragment, { children: [
|
|
358
358
|
/* @__PURE__ */ e(
|
|
359
|
-
|
|
359
|
+
Le,
|
|
360
360
|
{
|
|
361
361
|
isMini: n,
|
|
362
|
-
onRecurrenceClick:
|
|
362
|
+
onRecurrenceClick: r,
|
|
363
363
|
recurrence: s
|
|
364
364
|
}
|
|
365
365
|
),
|
|
366
366
|
/* @__PURE__ */ e(le, { sx: { mx: 24 } })
|
|
367
|
-
] }, `recurrence-${u}`)) : g.map((s, u) => /* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
|
|
367
|
+
] }, `recurrence-${u}`)) : g.map((s, u) => /* @__PURE__ */ a(h.Fragment, { children: [
|
|
368
|
+
/* @__PURE__ */ e(ke, { children: /* @__PURE__ */ e(
|
|
369
|
+
ve,
|
|
370
370
|
{
|
|
371
371
|
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
372
372
|
sx: { width: "100%" },
|
|
373
373
|
children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
|
|
374
|
-
|
|
374
|
+
Le,
|
|
375
375
|
{
|
|
376
376
|
isMini: n,
|
|
377
|
-
onRecurrenceClick:
|
|
377
|
+
onRecurrenceClick: r,
|
|
378
378
|
recurrence: f
|
|
379
379
|
}
|
|
380
380
|
) }, `day-recurrence-${x}`))
|
|
@@ -384,23 +384,23 @@ const Q = {
|
|
|
384
384
|
] }, `recurrence-${u}`)) })
|
|
385
385
|
] });
|
|
386
386
|
}
|
|
387
|
-
),
|
|
388
|
-
({ expected: t, isExpense: n = !0, missed: i, paid:
|
|
389
|
-
const g = ge(), { isSmallMobile: s } =
|
|
390
|
-
const x = [{ color: g.palette.success.main, percentage: `${
|
|
387
|
+
), Ae = T(
|
|
388
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: r, title: o, total: l, upcoming: m }) => {
|
|
389
|
+
const g = ge(), { isSmallMobile: s } = ye(), { recurring: u } = D(), f = h.useMemo(() => {
|
|
390
|
+
const x = [{ color: g.palette.success.main, percentage: `${r / t}` }];
|
|
391
391
|
return i && x.push({ color: g.palette.error.main, percentage: `${i / t}` }), x;
|
|
392
|
-
}, [
|
|
393
|
-
return /* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${
|
|
392
|
+
}, [r, t, i]);
|
|
393
|
+
return /* @__PURE__ */ a(c, { children: [
|
|
394
|
+
/* @__PURE__ */ a(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
395
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${o} (${l})` }),
|
|
396
396
|
/* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
397
397
|
] }),
|
|
398
|
-
/* @__PURE__ */ e(
|
|
399
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ e(We, { data: f, height: 12 }),
|
|
399
|
+
/* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
400
400
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
401
|
-
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(
|
|
401
|
+
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
402
402
|
/* @__PURE__ */ e(p, { variant: "caption", children: u.paid?.toLowerCase() }),
|
|
403
|
-
i !== void 0 && /* @__PURE__ */
|
|
403
|
+
i !== void 0 && /* @__PURE__ */ a(Z, { children: [
|
|
404
404
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
405
405
|
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
406
406
|
/* @__PURE__ */ e(p, { variant: "caption", children: u.missed?.toLowerCase() })
|
|
@@ -411,8 +411,8 @@ const Q = {
|
|
|
411
411
|
] })
|
|
412
412
|
] });
|
|
413
413
|
}
|
|
414
|
-
), bt =
|
|
415
|
-
const { recurring: t } =
|
|
414
|
+
), bt = T(() => {
|
|
415
|
+
const { recurring: t } = D(), { availableWidth: n } = Oe(), { isDesktop: i, isSmallMobile: r, isMobile: o } = ye(n), { onEvent: l } = J(), {
|
|
416
416
|
currentMonthExpenses: m,
|
|
417
417
|
currentMonthIncome: g,
|
|
418
418
|
dateRange: s,
|
|
@@ -424,34 +424,34 @@ const Q = {
|
|
|
424
424
|
paidIncomeTotal: d,
|
|
425
425
|
selectedDay: b,
|
|
426
426
|
selectedDayRecurrences: W,
|
|
427
|
-
setDateRange:
|
|
427
|
+
setDateRange: j,
|
|
428
428
|
upcomingExpenseTotal: te,
|
|
429
429
|
upcomingIncomeTotal: ne,
|
|
430
|
-
upcomingRecurrences:
|
|
431
|
-
} =
|
|
432
|
-
|
|
433
|
-
},
|
|
434
|
-
l(
|
|
430
|
+
upcomingRecurrences: K
|
|
431
|
+
} = I(), [$, _] = h.useState(0), ie = Ue(s.start, /* @__PURE__ */ new Date()), v = (R, oe) => {
|
|
432
|
+
_(oe);
|
|
433
|
+
}, Y = (R) => {
|
|
434
|
+
l(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
435
435
|
transaction_guid: R.transaction?.guid
|
|
436
436
|
});
|
|
437
|
-
},
|
|
438
|
-
l(
|
|
437
|
+
}, V = (R) => {
|
|
438
|
+
l(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
439
439
|
transaction_guid: R.transaction?.guid
|
|
440
440
|
});
|
|
441
441
|
}, P = () => {
|
|
442
442
|
const R = ze(s.start, 1);
|
|
443
|
-
|
|
443
|
+
j({
|
|
444
444
|
start: k(R),
|
|
445
445
|
end: z(R)
|
|
446
446
|
});
|
|
447
447
|
}, re = () => {
|
|
448
448
|
const R = Fe(s.start, 1);
|
|
449
|
-
|
|
449
|
+
j({
|
|
450
450
|
start: k(R),
|
|
451
451
|
end: z(R)
|
|
452
452
|
});
|
|
453
453
|
};
|
|
454
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ a(
|
|
455
455
|
se,
|
|
456
456
|
{
|
|
457
457
|
container: !0,
|
|
@@ -459,16 +459,16 @@ const Q = {
|
|
|
459
459
|
pt: 16
|
|
460
460
|
},
|
|
461
461
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ a(se, { md: !0, sm: 12, width: "100%", children: [
|
|
463
|
+
/* @__PURE__ */ a(c, { sx: { gap: 16, px: i ? 48 : 24 }, children: [
|
|
464
|
+
/* @__PURE__ */ a(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
465
465
|
/* @__PURE__ */ e(Je, { children: N(
|
|
466
466
|
t.header_title,
|
|
467
467
|
A(s.start, E.MONTH_LONG)
|
|
468
468
|
) }),
|
|
469
|
-
!i && /* @__PURE__ */
|
|
469
|
+
!i && /* @__PURE__ */ a(c, { direction: "row", gap: 4, children: [
|
|
470
470
|
/* @__PURE__ */ e(
|
|
471
|
-
|
|
471
|
+
Se,
|
|
472
472
|
{
|
|
473
473
|
color: "primary",
|
|
474
474
|
disabled: ie,
|
|
@@ -476,11 +476,11 @@ const Q = {
|
|
|
476
476
|
children: /* @__PURE__ */ e(Ve, {})
|
|
477
477
|
}
|
|
478
478
|
),
|
|
479
|
-
/* @__PURE__ */ e(
|
|
479
|
+
/* @__PURE__ */ e(Se, { color: "primary", onClick: P, children: /* @__PURE__ */ e(Xe, {}) })
|
|
480
480
|
] })
|
|
481
481
|
] }),
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
|
-
|
|
483
|
+
Ae,
|
|
484
484
|
{
|
|
485
485
|
expected: u,
|
|
486
486
|
missed: x,
|
|
@@ -491,7 +491,7 @@ const Q = {
|
|
|
491
491
|
}
|
|
492
492
|
),
|
|
493
493
|
/* @__PURE__ */ e(
|
|
494
|
-
|
|
494
|
+
Ae,
|
|
495
495
|
{
|
|
496
496
|
expected: f,
|
|
497
497
|
isExpense: !1,
|
|
@@ -504,49 +504,49 @@ const Q = {
|
|
|
504
504
|
i && /* @__PURE__ */ e(
|
|
505
505
|
H,
|
|
506
506
|
{
|
|
507
|
-
onRecurrenceClick:
|
|
508
|
-
recurrences:
|
|
507
|
+
onRecurrenceClick: Y,
|
|
508
|
+
recurrences: K,
|
|
509
509
|
title: t.upcoming_activity
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] }),
|
|
513
|
-
!i && /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
513
|
+
!i && /* @__PURE__ */ a(c, { sx: { px: o ? 0 : 24 }, children: [
|
|
514
|
+
/* @__PURE__ */ a(je, { onChange: v, value: $, variant: "fullWidth", children: [
|
|
515
515
|
/* @__PURE__ */ e(
|
|
516
|
-
|
|
516
|
+
_e,
|
|
517
517
|
{
|
|
518
|
-
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children:
|
|
518
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.upcoming : t.upcoming_activity })
|
|
519
519
|
}
|
|
520
520
|
),
|
|
521
521
|
/* @__PURE__ */ e(
|
|
522
|
-
|
|
522
|
+
_e,
|
|
523
523
|
{
|
|
524
|
-
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children:
|
|
524
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.past : t.past_transactions })
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
] }),
|
|
528
528
|
$ === 0 && /* @__PURE__ */ e(
|
|
529
529
|
H,
|
|
530
530
|
{
|
|
531
|
-
onRecurrenceClick:
|
|
532
|
-
recurrences:
|
|
531
|
+
onRecurrenceClick: Y,
|
|
532
|
+
recurrences: K
|
|
533
533
|
}
|
|
534
534
|
),
|
|
535
535
|
$ === 1 && /* @__PURE__ */ e(
|
|
536
536
|
H,
|
|
537
537
|
{
|
|
538
|
-
onRecurrenceClick:
|
|
538
|
+
onRecurrenceClick: V,
|
|
539
539
|
recurrences: C
|
|
540
540
|
}
|
|
541
541
|
)
|
|
542
542
|
] })
|
|
543
543
|
] }),
|
|
544
|
-
i && /* @__PURE__ */ e(se, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */ e(
|
|
544
|
+
i && /* @__PURE__ */ e(se, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ a(c, { gap: 24, children: [
|
|
545
|
+
/* @__PURE__ */ e($e, {}),
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
547
|
H,
|
|
548
548
|
{
|
|
549
|
-
onRecurrenceClick:
|
|
549
|
+
onRecurrenceClick: V,
|
|
550
550
|
recurrences: W || C,
|
|
551
551
|
title: b ? N(
|
|
552
552
|
t.day_transactions,
|
|
@@ -558,8 +558,8 @@ const Q = {
|
|
|
558
558
|
]
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
|
-
}),
|
|
562
|
-
const { accounts: i } = he(), { recurring:
|
|
561
|
+
}), wn = T(({ onBackClick: t, sx: n = {} }) => {
|
|
562
|
+
const { accounts: i } = he(), { recurring: r } = D(), { isCopyLoaded: o, isInitialized: l, selectedAccountGuids: m, setSelectedAccounts: g } = U(), { isDataLoaded: s, loadRepeatingTransactions: u, setDateRange: f } = I(), { setFilter: x } = fe(), { onEvent: C } = J(), { isMobile: y } = ye(), [d, b] = h.useState(!1);
|
|
563
563
|
return h.useEffect(() => {
|
|
564
564
|
g(i);
|
|
565
565
|
}, [i]), h.useEffect(() => {
|
|
@@ -567,55 +567,55 @@ const Q = {
|
|
|
567
567
|
dateRange: { start: me(ue(), 90), end: de() },
|
|
568
568
|
accounts: m
|
|
569
569
|
}), f({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), u().finally());
|
|
570
|
-
}, [l]),
|
|
570
|
+
}, [l]), o ? /* @__PURE__ */ a(
|
|
571
571
|
at,
|
|
572
572
|
{
|
|
573
573
|
accountOptions: i,
|
|
574
574
|
actions: [
|
|
575
575
|
{
|
|
576
|
-
label:
|
|
576
|
+
label: r.action_title,
|
|
577
577
|
iconName: "credit_card_gear",
|
|
578
578
|
onClick: () => {
|
|
579
|
-
b(!0), C(
|
|
579
|
+
b(!0), C(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
],
|
|
583
583
|
hasDivider: y,
|
|
584
|
-
onAccountsFilterClick: () => C(
|
|
584
|
+
onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
585
585
|
onBackClick: t,
|
|
586
586
|
sx: n,
|
|
587
|
-
title:
|
|
587
|
+
title: r.title,
|
|
588
588
|
children: [
|
|
589
|
-
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */
|
|
589
|
+
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ a(c, { direction: "column", p: 48, spacing: 24, children: [
|
|
590
590
|
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
591
591
|
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
592
592
|
/* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
|
|
593
593
|
] }),
|
|
594
594
|
/* @__PURE__ */ e(
|
|
595
|
-
|
|
595
|
+
xe,
|
|
596
596
|
{
|
|
597
|
-
ariaLabelClose:
|
|
597
|
+
ariaLabelClose: r.close_drawer_aria,
|
|
598
598
|
isOpen: d,
|
|
599
599
|
onClose: () => b(!1),
|
|
600
600
|
shouldShowHeaderBorders: !1,
|
|
601
|
-
title:
|
|
602
|
-
children: /* @__PURE__ */ e(
|
|
601
|
+
title: r.action_title,
|
|
602
|
+
children: /* @__PURE__ */ e(Ee, {})
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
]
|
|
606
606
|
}
|
|
607
|
-
) : /* @__PURE__ */ e(
|
|
608
|
-
}), Rt =
|
|
609
|
-
const { recurring: t } =
|
|
610
|
-
return /* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */ e(
|
|
607
|
+
) : /* @__PURE__ */ e(F, {});
|
|
608
|
+
}), Rt = T(() => {
|
|
609
|
+
const { recurring: t } = D(), { availableWidth: n } = Oe(), { selectedDay: i, selectedDayRecurrences: r, setSelectedDay: o, upcomingRecurrences: l } = I(), m = n < 750;
|
|
610
|
+
return /* @__PURE__ */ a(c, { flexDirection: m ? "column" : "row", width: "100%", children: [
|
|
611
|
+
/* @__PURE__ */ e($e, {}),
|
|
612
612
|
!m && /* @__PURE__ */ e(le, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
613
613
|
/* @__PURE__ */ e(
|
|
614
614
|
H,
|
|
615
615
|
{
|
|
616
616
|
isMini: !0,
|
|
617
|
-
onResetClick: i ? () =>
|
|
618
|
-
recurrences:
|
|
617
|
+
onResetClick: i ? () => o(i) : void 0,
|
|
618
|
+
recurrences: r || l.slice(0, 5),
|
|
619
619
|
sx: { width: m ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
620
620
|
title: i ? N(
|
|
621
621
|
t.day_transactions,
|
|
@@ -624,45 +624,45 @@ const Q = {
|
|
|
624
624
|
}
|
|
625
625
|
)
|
|
626
626
|
] });
|
|
627
|
-
}),
|
|
627
|
+
}), In = T(
|
|
628
628
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
629
|
-
const { accounts: i } = he(), { recurring:
|
|
629
|
+
const { accounts: i } = he(), { recurring: r } = D(), { setFilter: o } = fe(), { isDataLoaded: l, loadRepeatingTransactions: m } = I(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: u, selectedAccountGuids: f } = U();
|
|
630
630
|
return h.useEffect(() => {
|
|
631
631
|
s && u(i);
|
|
632
632
|
}, [s]), h.useEffect(() => {
|
|
633
|
-
f.length > 0 && (
|
|
633
|
+
f.length > 0 && (o({
|
|
634
634
|
dateRange: { start: me(ue(), 90), end: de() },
|
|
635
635
|
accounts: f
|
|
636
636
|
}), m().finally());
|
|
637
|
-
}, [f]), !g || !s ? /* @__PURE__ */ e(
|
|
637
|
+
}, [f]), !g || !s ? /* @__PURE__ */ e(F, {}) : /* @__PURE__ */ e(
|
|
638
638
|
pt,
|
|
639
639
|
{
|
|
640
640
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
641
641
|
onPrimaryCtaClick: t,
|
|
642
|
-
primaryCtaLabel:
|
|
643
|
-
subTitle:
|
|
642
|
+
primaryCtaLabel: r.primary_cta,
|
|
643
|
+
subTitle: r.sub_title,
|
|
644
644
|
sx: n,
|
|
645
|
-
title:
|
|
646
|
-
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(
|
|
645
|
+
title: r.mini_title,
|
|
646
|
+
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(F, {})
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
650
|
), Tt = ({
|
|
651
651
|
upcomingRecurrences: t,
|
|
652
652
|
maxLogos: n = 3
|
|
653
|
-
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i,
|
|
653
|
+
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, r) => /* @__PURE__ */ e(
|
|
654
654
|
pe,
|
|
655
655
|
{
|
|
656
656
|
categoryGuid: i.categoryGuid || "",
|
|
657
657
|
merchantGuid: i.merchantGuid || ""
|
|
658
658
|
},
|
|
659
|
-
`${i.categoryGuid}-${i.merchantGuid}-${
|
|
659
|
+
`${i.categoryGuid}-${i.merchantGuid}-${r}`
|
|
660
660
|
)) }), Dt = ({
|
|
661
661
|
upcomingRecurrences: t,
|
|
662
662
|
logoSize: n = 32,
|
|
663
663
|
maxLogos: i = 3
|
|
664
664
|
}) => {
|
|
665
|
-
const
|
|
665
|
+
const r = (o) => o * (n / 2);
|
|
666
666
|
return /* @__PURE__ */ e(
|
|
667
667
|
O,
|
|
668
668
|
{
|
|
@@ -670,12 +670,12 @@ const Q = {
|
|
|
670
670
|
position: "relative",
|
|
671
671
|
width: 64
|
|
672
672
|
},
|
|
673
|
-
children: t.map((
|
|
673
|
+
children: t.map((o, l) => l < i ? /* @__PURE__ */ e(
|
|
674
674
|
O,
|
|
675
675
|
{
|
|
676
676
|
sx: {
|
|
677
677
|
borderRadius: "4px",
|
|
678
|
-
left:
|
|
678
|
+
left: r(l),
|
|
679
679
|
outlineColor: "common.white",
|
|
680
680
|
outlineStyle: "solid",
|
|
681
681
|
outlineWidth: 2,
|
|
@@ -684,13 +684,13 @@ const Q = {
|
|
|
684
684
|
children: /* @__PURE__ */ e(
|
|
685
685
|
pe,
|
|
686
686
|
{
|
|
687
|
-
categoryGuid:
|
|
688
|
-
merchantGuid:
|
|
687
|
+
categoryGuid: o.categoryGuid || "",
|
|
688
|
+
merchantGuid: o.merchantGuid || "",
|
|
689
689
|
size: n
|
|
690
690
|
}
|
|
691
691
|
)
|
|
692
692
|
},
|
|
693
|
-
`${
|
|
693
|
+
`${o.categoryGuid}-${o.merchantGuid}-${l}`
|
|
694
694
|
) : null)
|
|
695
695
|
}
|
|
696
696
|
);
|
|
@@ -698,9 +698,9 @@ const Q = {
|
|
|
698
698
|
amount: t,
|
|
699
699
|
bgcolor: n,
|
|
700
700
|
isLargeScreen: i,
|
|
701
|
-
isSmallScreen:
|
|
702
|
-
label:
|
|
703
|
-
}) => /* @__PURE__ */
|
|
701
|
+
isSmallScreen: r,
|
|
702
|
+
label: o
|
|
703
|
+
}) => /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
704
704
|
/* @__PURE__ */ e(
|
|
705
705
|
O,
|
|
706
706
|
{
|
|
@@ -712,32 +712,32 @@ const Q = {
|
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
),
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
-
!
|
|
717
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
715
|
+
/* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
716
|
+
!r && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
717
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: o })
|
|
718
718
|
] })
|
|
719
|
-
] }),
|
|
720
|
-
const { recurring: t } =
|
|
721
|
-
return /* @__PURE__ */
|
|
719
|
+
] }), _t = T(() => {
|
|
720
|
+
const { recurring: t } = D();
|
|
721
|
+
return /* @__PURE__ */ a(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
722
722
|
/* @__PURE__ */ e(Ze, { size: 32 }),
|
|
723
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ a(c, { children: [
|
|
724
724
|
/* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
725
725
|
/* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
726
726
|
] })
|
|
727
727
|
] });
|
|
728
|
-
}), vn =
|
|
728
|
+
}), vn = T(
|
|
729
729
|
({ onCTAClick: t }) => {
|
|
730
|
-
const [n, i] = h.useState(!1), { onEvent:
|
|
730
|
+
const [n, i] = h.useState(!1), { onEvent: r } = J(), o = ge(), { accounts: l } = he(), [m, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: u, selectedAccountGuids: f, setSelectedAccounts: x } = U(), {
|
|
731
731
|
loadRepeatingTransactions: C,
|
|
732
732
|
upcomingRecurrences: y,
|
|
733
733
|
expenseTotal: d,
|
|
734
734
|
missedExpenseTotal: b,
|
|
735
735
|
paidExpenseTotal: W,
|
|
736
|
-
repeatingTransactions:
|
|
736
|
+
repeatingTransactions: j,
|
|
737
737
|
setDateRange: te,
|
|
738
738
|
upcomingExpenseTotal: ne,
|
|
739
|
-
isDataLoaded:
|
|
740
|
-
} =
|
|
739
|
+
isDataLoaded: K
|
|
740
|
+
} = I(), { setFilter: $ } = fe(), { recurring: _, budgets: ie } = D();
|
|
741
741
|
h.useEffect(() => {
|
|
742
742
|
x(l);
|
|
743
743
|
}, [l]), h.useEffect(() => {
|
|
@@ -746,63 +746,63 @@ const Q = {
|
|
|
746
746
|
accounts: f
|
|
747
747
|
}), te({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
748
748
|
}, [u]), h.useEffect(() => {
|
|
749
|
-
n &&
|
|
749
|
+
n && r(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
750
750
|
state: y.length > 0 ? "default" : "zeroState"
|
|
751
751
|
});
|
|
752
752
|
}, [n]);
|
|
753
|
-
const v = g <= 288,
|
|
753
|
+
const v = g <= 288, Y = g >= 450, V = h.useMemo(() => {
|
|
754
754
|
const G = [
|
|
755
|
-
{ color:
|
|
755
|
+
{ color: o.palette.success.main, percentage: `${W / d}` }
|
|
756
756
|
];
|
|
757
757
|
return b && G.push({
|
|
758
|
-
color:
|
|
758
|
+
color: o.palette.error.main,
|
|
759
759
|
percentage: `${b / d}`
|
|
760
760
|
}), G;
|
|
761
761
|
}, [
|
|
762
762
|
W,
|
|
763
763
|
d,
|
|
764
764
|
b,
|
|
765
|
-
|
|
766
|
-
|
|
765
|
+
o.palette.success.main,
|
|
766
|
+
o.palette.error.main
|
|
767
767
|
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
|
|
768
|
-
|
|
769
|
-
y.length > 0 ?
|
|
768
|
+
r(
|
|
769
|
+
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
770
770
|
), t();
|
|
771
771
|
};
|
|
772
|
-
if (!s || !n || !
|
|
773
|
-
const R = 32, oe = y.length > 0,
|
|
772
|
+
if (!s || !n || !K) return /* @__PURE__ */ e(F, { height: 100 });
|
|
773
|
+
const R = 32, oe = y.length > 0, Pe = () => oe ? v ? /* @__PURE__ */ e(
|
|
774
774
|
Dt,
|
|
775
775
|
{
|
|
776
776
|
logoSize: R,
|
|
777
777
|
maxLogos: 3,
|
|
778
778
|
upcomingRecurrences: y.slice(0, 3)
|
|
779
779
|
}
|
|
780
|
-
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: v ? 64 : 104 } }),
|
|
780
|
+
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: v ? 64 : 104 } }), Be = [
|
|
781
781
|
{
|
|
782
782
|
amount: W,
|
|
783
783
|
bgColor: "success.main",
|
|
784
|
-
label:
|
|
784
|
+
label: _.paid
|
|
785
785
|
},
|
|
786
786
|
{
|
|
787
787
|
amount: b,
|
|
788
788
|
bgColor: "error.main",
|
|
789
|
-
label:
|
|
789
|
+
label: _.missed
|
|
790
790
|
},
|
|
791
791
|
{
|
|
792
792
|
amount: ne,
|
|
793
793
|
bgColor: "border.light",
|
|
794
|
-
label:
|
|
794
|
+
label: _.upcoming
|
|
795
795
|
}
|
|
796
|
-
],
|
|
796
|
+
], De = !j?.length;
|
|
797
797
|
return /* @__PURE__ */ e(
|
|
798
798
|
ht,
|
|
799
799
|
{
|
|
800
800
|
className: "mx-recurring-transaction-microwidget",
|
|
801
|
-
ctaLabel:
|
|
801
|
+
ctaLabel: De ? ie.get_started_cta : _.primary_cta,
|
|
802
802
|
onCTAClick: re,
|
|
803
|
-
title:
|
|
804
|
-
children:
|
|
805
|
-
/* @__PURE__ */
|
|
803
|
+
title: _.recurring_expenses,
|
|
804
|
+
children: De ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ a(Z, { children: [
|
|
805
|
+
/* @__PURE__ */ a(
|
|
806
806
|
c,
|
|
807
807
|
{
|
|
808
808
|
ref: m,
|
|
@@ -811,7 +811,7 @@ const Q = {
|
|
|
811
811
|
justifyContent: "space-between"
|
|
812
812
|
},
|
|
813
813
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ a(
|
|
815
815
|
c,
|
|
816
816
|
{
|
|
817
817
|
sx: [
|
|
@@ -839,18 +839,18 @@ const Q = {
|
|
|
839
839
|
pr: 12
|
|
840
840
|
},
|
|
841
841
|
variant: "XSmall",
|
|
842
|
-
children:
|
|
842
|
+
children: _.expected
|
|
843
843
|
}
|
|
844
844
|
)
|
|
845
845
|
]
|
|
846
846
|
}
|
|
847
847
|
),
|
|
848
|
-
|
|
848
|
+
Pe()
|
|
849
849
|
]
|
|
850
850
|
}
|
|
851
851
|
),
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */ e(
|
|
852
|
+
/* @__PURE__ */ a(c, { sx: { pt: 12 }, children: [
|
|
853
|
+
/* @__PURE__ */ e(We, { data: V }),
|
|
854
854
|
/* @__PURE__ */ e(
|
|
855
855
|
c,
|
|
856
856
|
{
|
|
@@ -860,16 +860,16 @@ const Q = {
|
|
|
860
860
|
gap: 16,
|
|
861
861
|
mt: 4
|
|
862
862
|
},
|
|
863
|
-
children:
|
|
863
|
+
children: Be.map((G, He) => /* @__PURE__ */ e(
|
|
864
864
|
St,
|
|
865
865
|
{
|
|
866
866
|
amount: G.amount,
|
|
867
867
|
bgcolor: G.bgColor,
|
|
868
|
-
isLargeScreen:
|
|
868
|
+
isLargeScreen: Y,
|
|
869
869
|
isSmallScreen: v,
|
|
870
870
|
label: G.label
|
|
871
871
|
},
|
|
872
|
-
`recurrence-legend-${
|
|
872
|
+
`recurrence-legend-${He}`
|
|
873
873
|
))
|
|
874
874
|
}
|
|
875
875
|
)
|
|
@@ -878,15 +878,30 @@ const Q = {
|
|
|
878
878
|
}
|
|
879
879
|
);
|
|
880
880
|
}
|
|
881
|
+
), Mn = T(
|
|
882
|
+
({ isOpen: t, onClose: n }) => {
|
|
883
|
+
const { cashflow: i } = D(), { isCopyLoaded: r } = U();
|
|
884
|
+
return r ? /* @__PURE__ */ e(
|
|
885
|
+
xe,
|
|
886
|
+
{
|
|
887
|
+
ariaLabelClose: i.close_settings_aria,
|
|
888
|
+
isOpen: t,
|
|
889
|
+
onClose: n,
|
|
890
|
+
title: i.cashflow_settings,
|
|
891
|
+
children: /* @__PURE__ */ e(Ee, {})
|
|
892
|
+
}
|
|
893
|
+
) : /* @__PURE__ */ e(F, {});
|
|
894
|
+
}
|
|
881
895
|
);
|
|
882
896
|
export {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
897
|
+
kn as AddRecurringTransactionDetails,
|
|
898
|
+
En as ManageExpenses,
|
|
899
|
+
Wn as ManageIncome,
|
|
900
|
+
Ee as RecurringSettings,
|
|
901
|
+
Mn as RecurringSettingsDrawer,
|
|
887
902
|
vn as RecurringTransactionsMicroWidget,
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
903
|
+
In as RecurringTransactionsMiniWidget,
|
|
904
|
+
Nn as RecurringTransactionsStore,
|
|
905
|
+
wn as RecurringTransactionsWidget,
|
|
906
|
+
$n as SelectTransaction
|
|
892
907
|
};
|