@mx-cartographer/experiences 7.11.23 → 7.12.0
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 +11 -0
- package/dist/{CategorySelectorDrawer-5n6Pil_E.mjs → CategorySelectorDrawer-wfUTIbLR.mjs} +1 -1
- package/dist/Dialog-Ck34yr-d.mjs +63 -0
- package/dist/{ListItemAction-CfXGuY7a.mjs → ListItemAction-4KB7P75M.mjs} +1 -1
- package/dist/{ManageIncome-y-37mN2m.mjs → ManageIncome-4Colv0Oz.mjs} +2 -2
- package/dist/{NotificationSettings-DCbMa5mg.mjs → NotificationSettings-BH2yOwTB.mjs} +1 -1
- package/dist/{OriginalBalanceAction-CW_xOa6Z.mjs → OriginalBalanceAction-BM6rT_Cn.mjs} +1 -1
- package/dist/{RecurringSettings-BGMZxsCb.mjs → RecurringSettings-DI1hZYMK.mjs} +1 -1
- package/dist/{TransactionDetails-BGdUTqhq.mjs → TransactionDetails-pYMs84EF.mjs} +2 -2
- package/dist/{WidgetContainer-BSCjBupR.mjs → WidgetContainer-Ud1mWn0G.mjs} +1 -1
- package/dist/accounts/index.es.js +3 -3
- package/dist/budgets/index.es.js +5 -5
- package/dist/cashflow/index.es.js +3 -3
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +3 -3
- package/dist/common/types/localization/RecurringCopy.d.ts +1 -0
- package/dist/debts/index.es.js +3 -3
- package/dist/finstrong/index.es.js +4 -4
- package/dist/goals/index.es.js +235 -216
- package/dist/help/index.es.js +1 -1
- package/dist/insights/components/index.d.ts +2 -0
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
- package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
- package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
- package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
- package/dist/insights/index.es.js +1137 -1018
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +303 -329
- package/dist/settings/index.es.js +5 -5
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/Dialog-DdCwLgrl.mjs +0 -60
|
@@ -1,97 +1,102 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import x from "react";
|
|
3
|
-
import { observer as
|
|
4
|
-
import { endOfMonth as
|
|
3
|
+
import { observer as R } from "mobx-react-lite";
|
|
4
|
+
import { endOfMonth as B } from "date-fns/endOfMonth";
|
|
5
5
|
import { endOfToday as J } from "date-fns/endOfToday";
|
|
6
6
|
import { startOfMonth as G } from "date-fns/startOfMonth";
|
|
7
7
|
import { startOfToday as Q } from "date-fns/startOfToday";
|
|
8
8
|
import { subDays as ee } from "date-fns/subDays";
|
|
9
|
-
import { R as _e } from "../RecurringSettings-
|
|
10
|
-
import { M as
|
|
11
|
-
import { addMonths as
|
|
9
|
+
import { R as _e } from "../RecurringSettings-DI1hZYMK.mjs";
|
|
10
|
+
import { M as Un } from "../RecurringSettings-DI1hZYMK.mjs";
|
|
11
|
+
import { addMonths as Be } from "date-fns/addMonths";
|
|
12
12
|
import { subMonths as Pe } from "date-fns/subMonths";
|
|
13
|
-
import { isBefore as
|
|
13
|
+
import { isBefore as $e } from "date-fns/isBefore";
|
|
14
14
|
import X from "@mui/material/Unstable_Grid2";
|
|
15
15
|
import he from "@mui/material/IconButton";
|
|
16
|
-
import
|
|
16
|
+
import d from "@mui/material/Stack";
|
|
17
17
|
import fe from "@mui/material/Tab";
|
|
18
|
-
import
|
|
19
|
-
import { Schedule as
|
|
20
|
-
import { Text as h, MerchantLogo as te, InstitutionLogo as
|
|
18
|
+
import Fe from "@mui/material/Tabs";
|
|
19
|
+
import { Schedule as ze, MonetizationOn as Ue, Cancel as Se, CheckCircle as we, ChevronLeft as Ye, ChevronRight as je, CurrencyExchange as Ke } from "@mxenabled/mx-icons";
|
|
20
|
+
import { Text as h, MerchantLogo as te, InstitutionLogo as Ve, H3 as Xe, H2 as qe, P as q } from "@mxenabled/mxui";
|
|
21
21
|
import { getWeeksInMonth as xe } from "date-fns/getWeeksInMonth";
|
|
22
|
-
import { enCA as
|
|
22
|
+
import { enCA as Ze } from "date-fns/locale/en-CA";
|
|
23
23
|
import { enUS as be } from "date-fns/locale/en-US";
|
|
24
|
-
import { es as
|
|
25
|
-
import { fr as
|
|
26
|
-
import { frCA as
|
|
24
|
+
import { es as Je } from "date-fns/locale/es";
|
|
25
|
+
import { fr as Qe } from "date-fns/locale/fr";
|
|
26
|
+
import { frCA as et } from "date-fns/locale/fr-CA";
|
|
27
27
|
import ne from "@mui/material/styles/useTheme";
|
|
28
|
-
import { AdapterDateFns as
|
|
29
|
-
import { DateCalendar as
|
|
30
|
-
import { LocalizationProvider as
|
|
31
|
-
import { isSameDay as
|
|
32
|
-
import
|
|
33
|
-
import { PickersDay as
|
|
34
|
-
import { I as
|
|
35
|
-
import { u as
|
|
36
|
-
import { d as
|
|
37
|
-
import {
|
|
28
|
+
import { AdapterDateFns as tt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
29
|
+
import { DateCalendar as nt } from "@mui/x-date-pickers/DateCalendar";
|
|
30
|
+
import { LocalizationProvider as rt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
31
|
+
import { isSameDay as it } from "date-fns/isSameDay";
|
|
32
|
+
import ot from "@mui/material/Badge";
|
|
33
|
+
import { PickersDay as at } from "@mui/x-date-pickers/PickersDay";
|
|
34
|
+
import { I as F } from "../IconBacking-B9oC6uL2.mjs";
|
|
35
|
+
import { u as C, b as z, i as I, g as U, p as Ie, h as re } from "../hooks-BxkfR-Ff.mjs";
|
|
36
|
+
import { d as A, c as T, g as ye, f as st } from "../RecurringTransactions-CYNpe_RS.mjs";
|
|
37
|
+
import { f as S, D as w } from "../DateFormats-BMpMrZpW.mjs";
|
|
38
|
+
import { T as k } from "../RecurringTransactionsStore-BD-OfVZ-.mjs";
|
|
38
39
|
import { R as jn } from "../RecurringTransactionsStore-BD-OfVZ-.mjs";
|
|
39
|
-
import { g as
|
|
40
|
-
import { A as
|
|
41
|
-
import
|
|
40
|
+
import { g as ct, L as W, b as N } from "../Localization-CPkpIwIx.mjs";
|
|
41
|
+
import { A as L } from "../Analytics-i5h6BxR1.mjs";
|
|
42
|
+
import lt from "@mui/material/Button";
|
|
42
43
|
import Z from "@mui/material/Divider";
|
|
43
44
|
import Ce from "@mui/material/List";
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import { b as
|
|
50
|
-
import { c as
|
|
51
|
-
import { f as
|
|
45
|
+
import Me from "@mui/material/ListItem";
|
|
46
|
+
import dt from "@mui/material/ListSubheader";
|
|
47
|
+
import mt from "@mui/material/ListItemAvatar";
|
|
48
|
+
import ut from "@mui/material/ListItemButton";
|
|
49
|
+
import pt from "@mui/material/ListItemText";
|
|
50
|
+
import { b as gt } from "../ManageIncome-4Colv0Oz.mjs";
|
|
51
|
+
import { c as Vn, M as Xn, S as qn } from "../ManageIncome-4Colv0Oz.mjs";
|
|
52
|
+
import { f as E } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
52
53
|
import { D as ie } from "../Drawer-DV4NTsFg.mjs";
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import { S as ve } from "../StatusBar-BK_uYHAB.mjs";
|
|
54
|
+
import O from "@mui/material/Box";
|
|
55
|
+
import { S as Le } from "../StatusBar-BK_uYHAB.mjs";
|
|
56
56
|
import { u as oe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
57
|
-
import { S as
|
|
57
|
+
import { S as ve } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
58
58
|
import { u as ae } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
59
59
|
import { L as se } from "../Loader-D3rjKx72.mjs";
|
|
60
|
-
import { W as
|
|
61
|
-
import { M as
|
|
62
|
-
import { u as
|
|
63
|
-
import { M as
|
|
64
|
-
const
|
|
60
|
+
import { W as ht } from "../WidgetContainer-Ud1mWn0G.mjs";
|
|
61
|
+
import { M as ft } from "../MiniWidgetContainer-Cu72GNsE.mjs";
|
|
62
|
+
import { u as xt } from "../useDimensions-CeDR9V8N.mjs";
|
|
63
|
+
import { M as bt } from "../MicroWidgetContainer-B_EnfvCq.mjs";
|
|
64
|
+
const Y = {
|
|
65
65
|
gridRow: 1,
|
|
66
66
|
gridColumn: 1,
|
|
67
67
|
zIndex: 2
|
|
68
|
-
}, j = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
69
|
-
|
|
68
|
+
}, j = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(F, { size: n, sx: { ...j(t) }, children: /* @__PURE__ */ e(ze, { color: "primary", filled: !0, sx: { fontSize: n, ...Y } }) }), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(F, { size: n, sx: { ...j(t) }, children: /* @__PURE__ */ e(
|
|
69
|
+
Ue,
|
|
70
70
|
{
|
|
71
71
|
filled: !0,
|
|
72
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
72
|
+
sx: { color: "categories.income", fontSize: n, ...Y }
|
|
73
73
|
}
|
|
74
|
-
) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
74
|
+
) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(F, { size: n, sx: { ...j(t) }, children: /* @__PURE__ */ e(Se, { color: "error", filled: !0, sx: { fontSize: n, ...Y } }) }), me = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(F, { size: n, sx: { ...j(t) }, children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...Y } }) }), yt = R(
|
|
75
75
|
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
76
|
-
const { recurring: o } =
|
|
76
|
+
const { recurring: o } = C(), { selectedAccountGuids: i } = z(), { recurrences: c, setSelectedDay: m } = I(), a = x.useMemo(
|
|
77
77
|
() => c.filter((f) => i.includes(f.accountGuid)),
|
|
78
78
|
[i, c]
|
|
79
79
|
).filter(
|
|
80
|
-
(f) =>
|
|
81
|
-
),
|
|
82
|
-
(f) => f.type !==
|
|
83
|
-
), u =
|
|
84
|
-
(f) => f.type !==
|
|
85
|
-
), g =
|
|
86
|
-
(f) => f.type !==
|
|
87
|
-
), b =
|
|
80
|
+
(f) => it(f.occurredOnDate || f.expectedDate, t)
|
|
81
|
+
), l = a.some(
|
|
82
|
+
(f) => f.type !== A.Income && f.status === T.Upcoming
|
|
83
|
+
), u = a.some(
|
|
84
|
+
(f) => f.type !== A.Income && f.status === T.Missed
|
|
85
|
+
), g = a.some(
|
|
86
|
+
(f) => f.type !== A.Income && f.status === T.Paid
|
|
87
|
+
), b = a.some((f) => f.type === A.Income), y = (l ? 1 : 0) + (u ? 1 : 0) + (g ? 1 : 0) + (b ? 1 : 0), v = [
|
|
88
|
+
g && o.paid,
|
|
89
|
+
u && o.missed,
|
|
90
|
+
l && o.upcoming,
|
|
91
|
+
b && o.income
|
|
92
|
+
].filter(Boolean), M = v.length > 0 ? `${S(t, w.MONTH_DAY_YEAR)}, ${v.join(", ")}` : S(t, w.MONTH_DAY_YEAR);
|
|
88
93
|
return /* @__PURE__ */ e(
|
|
89
|
-
|
|
94
|
+
ot,
|
|
90
95
|
{
|
|
91
|
-
badgeContent:
|
|
96
|
+
badgeContent: a.length > 0 && /* @__PURE__ */ s($, { children: [
|
|
92
97
|
u && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
93
98
|
g && /* @__PURE__ */ e(me, { isOffset: !0 }),
|
|
94
|
-
|
|
99
|
+
l && /* @__PURE__ */ e(ce, { isOffset: !0 }),
|
|
95
100
|
b && /* @__PURE__ */ e(le, { isOffset: !0 })
|
|
96
101
|
] }),
|
|
97
102
|
overlap: "circular",
|
|
@@ -103,13 +108,9 @@ const U = {
|
|
|
103
108
|
}
|
|
104
109
|
},
|
|
105
110
|
children: /* @__PURE__ */ e(
|
|
106
|
-
|
|
111
|
+
at,
|
|
107
112
|
{
|
|
108
|
-
"aria-label":
|
|
109
|
-
${g && o.paid},
|
|
110
|
-
${u && o.missed},
|
|
111
|
-
${d && o.upcoming},
|
|
112
|
-
${b && o.income}`,
|
|
113
|
+
"aria-label": M,
|
|
113
114
|
day: t,
|
|
114
115
|
onClick: () => m(t),
|
|
115
116
|
outsideCurrentMonth: n,
|
|
@@ -126,13 +127,13 @@ const U = {
|
|
|
126
127
|
}
|
|
127
128
|
);
|
|
128
129
|
}
|
|
129
|
-
),
|
|
130
|
+
), P = ({ icon: t, label: n }) => /* @__PURE__ */ s(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
130
131
|
/* @__PURE__ */ e(t, {}),
|
|
131
132
|
/* @__PURE__ */ e(h, { variant: "XSmall", children: n })
|
|
132
|
-
] }),
|
|
133
|
-
const { recurring: t } =
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
|
|
133
|
+
] }), Ct = R(() => {
|
|
134
|
+
const { recurring: t } = C();
|
|
135
|
+
return /* @__PURE__ */ s(
|
|
136
|
+
d,
|
|
136
137
|
{
|
|
137
138
|
alignItems: "center",
|
|
138
139
|
"aria-hidden": !0,
|
|
@@ -141,44 +142,44 @@ const U = {
|
|
|
141
142
|
justifyContent: "center",
|
|
142
143
|
mt: 12,
|
|
143
144
|
children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
/* @__PURE__ */ e(
|
|
145
|
+
/* @__PURE__ */ e(P, { icon: ce, label: t.expense }),
|
|
146
|
+
/* @__PURE__ */ e(P, { icon: le, label: t.income }),
|
|
147
|
+
/* @__PURE__ */ e(P, { icon: de, label: t.missed }),
|
|
148
|
+
/* @__PURE__ */ e(P, { icon: me, label: t.paid })
|
|
148
149
|
]
|
|
149
150
|
}
|
|
150
151
|
);
|
|
151
|
-
}), Re = 58,
|
|
152
|
-
const t =
|
|
152
|
+
}), Re = 58, Rt = () => {
|
|
153
|
+
const t = ct();
|
|
153
154
|
return {
|
|
154
|
-
[
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
[
|
|
155
|
+
[W.EN_US]: be,
|
|
156
|
+
[W.EN_CA]: Ze,
|
|
157
|
+
[W.FR]: Qe,
|
|
158
|
+
[W.FR_CA]: et,
|
|
159
|
+
[W.ES]: Je
|
|
159
160
|
}[t] || be;
|
|
160
|
-
},
|
|
161
|
-
const t = ne(), { onEvent: n } =
|
|
162
|
-
xe(/* @__PURE__ */ new Date()) *
|
|
163
|
-
),
|
|
164
|
-
|
|
161
|
+
}, Ae = R(() => {
|
|
162
|
+
const t = ne(), { onEvent: n } = U(), { recurring: r } = C(), { selectedDay: o, setDateRange: i } = I(), [c, m] = x.useState(
|
|
163
|
+
xe(/* @__PURE__ */ new Date()) * k + Re
|
|
164
|
+
), p = (u) => {
|
|
165
|
+
m(xe(u) * k + Re), i({
|
|
165
166
|
start: G(u),
|
|
166
|
-
end:
|
|
167
|
-
}),
|
|
168
|
-
},
|
|
167
|
+
end: B(u)
|
|
168
|
+
}), a(u), n(L.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
169
|
+
}, a = (u) => {
|
|
169
170
|
u && requestAnimationFrame(() => {
|
|
170
171
|
const g = document.getElementById("recurrence-list");
|
|
171
172
|
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
172
173
|
});
|
|
173
|
-
},
|
|
174
|
-
|
|
174
|
+
}, l = /* @__PURE__ */ e(
|
|
175
|
+
nt,
|
|
175
176
|
{
|
|
176
177
|
minDate: G(/* @__PURE__ */ new Date()),
|
|
177
|
-
onChange:
|
|
178
|
-
onMonthChange:
|
|
178
|
+
onChange: a,
|
|
179
|
+
onMonthChange: p,
|
|
179
180
|
showDaysOutsideCurrentMonth: !0,
|
|
180
181
|
slots: {
|
|
181
|
-
day:
|
|
182
|
+
day: yt
|
|
182
183
|
},
|
|
183
184
|
sx: {
|
|
184
185
|
"& .MuiPickersArrowSwitcher-button": {
|
|
@@ -204,14 +205,14 @@ const U = {
|
|
|
204
205
|
fontWeight: 600
|
|
205
206
|
},
|
|
206
207
|
"& .MuiDayCalendar-slideTransition": {
|
|
207
|
-
minHeight:
|
|
208
|
+
minHeight: c
|
|
208
209
|
},
|
|
209
210
|
"&.MuiDateCalendar-root": {
|
|
210
|
-
minHeight:
|
|
211
|
+
minHeight: c + k
|
|
211
212
|
},
|
|
212
213
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
213
|
-
height:
|
|
214
|
-
width:
|
|
214
|
+
height: k,
|
|
215
|
+
width: k,
|
|
215
216
|
margin: 0
|
|
216
217
|
},
|
|
217
218
|
"& .MuiDayCalendar-weekDayLabel": {
|
|
@@ -220,45 +221,18 @@ const U = {
|
|
|
220
221
|
},
|
|
221
222
|
textTransform: "capitalize"
|
|
222
223
|
},
|
|
223
|
-
value:
|
|
224
|
+
value: o,
|
|
224
225
|
views: ["day"]
|
|
225
226
|
}
|
|
226
227
|
);
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
l,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
id: "calendar-label",
|
|
238
|
-
style: {
|
|
239
|
-
position: "absolute",
|
|
240
|
-
width: "1px",
|
|
241
|
-
height: "1px",
|
|
242
|
-
padding: 0,
|
|
243
|
-
margin: "-1px",
|
|
244
|
-
overflow: "hidden",
|
|
245
|
-
clip: "rect(0, 0, 0, 0)",
|
|
246
|
-
whiteSpace: "nowrap",
|
|
247
|
-
border: 0
|
|
248
|
-
},
|
|
249
|
-
children: "Calendar filter for recurring transactions list. Filter by month or select specific date."
|
|
250
|
-
}
|
|
251
|
-
),
|
|
252
|
-
/* @__PURE__ */ a(nt, { adapterLocale: Ct(), dateAdapter: et, children: [
|
|
253
|
-
r && s,
|
|
254
|
-
!r && s,
|
|
255
|
-
/* @__PURE__ */ e(yt, {})
|
|
256
|
-
] })
|
|
257
|
-
]
|
|
258
|
-
}
|
|
259
|
-
);
|
|
260
|
-
}), Rt = (t) => {
|
|
261
|
-
if (t.type === I.Income)
|
|
228
|
+
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ s(rt, { adapterLocale: Rt(), dateAdapter: tt, children: [
|
|
229
|
+
o && l,
|
|
230
|
+
!o && l,
|
|
231
|
+
/* @__PURE__ */ e(h, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
232
|
+
/* @__PURE__ */ e(Ct, {})
|
|
233
|
+
] }) });
|
|
234
|
+
}), Tt = (t) => {
|
|
235
|
+
if (t.type === A.Income)
|
|
262
236
|
return /* @__PURE__ */ e(le, {});
|
|
263
237
|
switch (t.status) {
|
|
264
238
|
case T.Missed:
|
|
@@ -268,25 +242,25 @@ const U = {
|
|
|
268
242
|
default:
|
|
269
243
|
return /* @__PURE__ */ e(ce, {});
|
|
270
244
|
}
|
|
271
|
-
},
|
|
245
|
+
}, Dt = (t, n) => {
|
|
272
246
|
switch (t.status) {
|
|
273
247
|
case T.Paid:
|
|
274
|
-
return t.expectedDate ?
|
|
248
|
+
return t.expectedDate ? N(
|
|
275
249
|
n.paid_on,
|
|
276
|
-
|
|
250
|
+
S(
|
|
277
251
|
t.occurredOnDate || t.expectedDate,
|
|
278
|
-
|
|
252
|
+
w.MONTH_DAY
|
|
279
253
|
)
|
|
280
254
|
) : n.paid;
|
|
281
255
|
case T.Missed:
|
|
282
|
-
return
|
|
256
|
+
return N(
|
|
283
257
|
n.missed_on,
|
|
284
|
-
|
|
258
|
+
S(t.expectedDate, w.MONTH_DAY)
|
|
285
259
|
);
|
|
286
260
|
case T.Upcoming:
|
|
287
|
-
return
|
|
261
|
+
return N(
|
|
288
262
|
n.upcoming_on,
|
|
289
|
-
|
|
263
|
+
S(t.expectedDate, w.MONTH_DAY)
|
|
290
264
|
);
|
|
291
265
|
default:
|
|
292
266
|
return n.unknown;
|
|
@@ -298,38 +272,38 @@ const U = {
|
|
|
298
272
|
},
|
|
299
273
|
showOrdinal: o = !1
|
|
300
274
|
}) => {
|
|
301
|
-
const { recurring: i } =
|
|
302
|
-
() => c.find((
|
|
275
|
+
const { recurring: i } = C(), { detailedRepeatingTransactions: c } = I(), [m, p] = x.useState(!1), a = x.useMemo(
|
|
276
|
+
() => c.find((M) => M.guid === t.repeatingTransactionGuid),
|
|
303
277
|
[t, c]
|
|
304
|
-
),
|
|
278
|
+
), l = t.type === A.Income, u = t.status === T.Paid, g = t.status === T.Missed, b = t.status === T.Upcoming;
|
|
305
279
|
let y = i.paid?.toLowerCase();
|
|
306
|
-
return g ? y = i.missed?.toLowerCase() : b && (y = o ? ye(i,
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
280
|
+
return g ? y = i.missed?.toLowerCase() : b && (y = o ? ye(i, a || {}, !0) : ye(i, a || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
281
|
+
/* @__PURE__ */ s(Me, { disableGutters: !0, disablePadding: !0, children: [
|
|
282
|
+
/* @__PURE__ */ s(ut, { onClick: () => {
|
|
309
283
|
p(!0), r(t);
|
|
310
284
|
}, children: [
|
|
311
|
-
/* @__PURE__ */ e(
|
|
285
|
+
/* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(
|
|
312
286
|
te,
|
|
313
287
|
{
|
|
314
288
|
categoryGuid: t.categoryGuid,
|
|
315
289
|
merchantGuid: t.merchantGuid
|
|
316
290
|
}
|
|
317
291
|
) }),
|
|
318
|
-
/* @__PURE__ */ e(
|
|
319
|
-
|
|
292
|
+
/* @__PURE__ */ e(pt, { children: /* @__PURE__ */ s(
|
|
293
|
+
d,
|
|
320
294
|
{
|
|
321
295
|
direction: "row",
|
|
322
296
|
gap: 4,
|
|
323
297
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
324
298
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ s(d, { direction: "column", width: "50%", children: [
|
|
326
300
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
|
|
329
|
-
/* @__PURE__ */ e(h, { variant: "caption", children:
|
|
330
|
-
] }) : /* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ s(d, { direction: "row", gap: 4, children: [
|
|
302
|
+
Tt(t),
|
|
303
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: Dt(t, i) })
|
|
304
|
+
] }) : /* @__PURE__ */ s($, { children: [
|
|
331
305
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
332
|
-
|
|
306
|
+
Ve,
|
|
333
307
|
{
|
|
334
308
|
alt: `${t.institutionName} institution logo`,
|
|
335
309
|
institutionGuid: t.institutionGuid,
|
|
@@ -339,13 +313,13 @@ const U = {
|
|
|
339
313
|
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
340
314
|
] }) })
|
|
341
315
|
] }),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
|
|
345
|
-
|
|
316
|
+
/* @__PURE__ */ s(d, { alignItems: "flex-end", width: "100%", children: [
|
|
317
|
+
/* @__PURE__ */ s(h, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
|
|
318
|
+
l ? "+" : "",
|
|
319
|
+
E(t.amount, "0,0.00")
|
|
346
320
|
] }),
|
|
347
|
-
!n && /* @__PURE__ */
|
|
348
|
-
|
|
321
|
+
!n && /* @__PURE__ */ s(
|
|
322
|
+
d,
|
|
349
323
|
{
|
|
350
324
|
direction: "row",
|
|
351
325
|
sx: {
|
|
@@ -356,8 +330,8 @@ const U = {
|
|
|
356
330
|
width: "100%"
|
|
357
331
|
},
|
|
358
332
|
children: [
|
|
359
|
-
u && /* @__PURE__ */ e(
|
|
360
|
-
g && /* @__PURE__ */ e(
|
|
333
|
+
u && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
334
|
+
g && /* @__PURE__ */ e(Se, { color: "error", filled: !0, size: 12 }),
|
|
361
335
|
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
362
336
|
]
|
|
363
337
|
}
|
|
@@ -373,18 +347,18 @@ const U = {
|
|
|
373
347
|
ariaLabelClose: i.close_drawer_aria,
|
|
374
348
|
isOpen: m,
|
|
375
349
|
onClose: () => p(!1),
|
|
376
|
-
title: t.type ===
|
|
377
|
-
children:
|
|
378
|
-
|
|
350
|
+
title: t.type === A.Income ? i.income_details : i.expense_details,
|
|
351
|
+
children: a && /* @__PURE__ */ e(
|
|
352
|
+
gt,
|
|
379
353
|
{
|
|
380
354
|
onDeleted: () => p(!1),
|
|
381
|
-
recurringTransaction:
|
|
355
|
+
recurringTransaction: a
|
|
382
356
|
}
|
|
383
357
|
)
|
|
384
358
|
}
|
|
385
359
|
)
|
|
386
360
|
] });
|
|
387
|
-
},
|
|
361
|
+
}, H = R(
|
|
388
362
|
({
|
|
389
363
|
recurrences: t,
|
|
390
364
|
isMini: n = !1,
|
|
@@ -393,10 +367,10 @@ const U = {
|
|
|
393
367
|
sx: i = {},
|
|
394
368
|
title: c
|
|
395
369
|
}) => {
|
|
396
|
-
const { recurring: m } =
|
|
397
|
-
return /* @__PURE__ */
|
|
398
|
-
c && /* @__PURE__ */
|
|
399
|
-
|
|
370
|
+
const { recurring: m } = C(), p = x.useMemo(() => st(t), [t]);
|
|
371
|
+
return /* @__PURE__ */ s(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...i }, "tab-index": -1, children: [
|
|
372
|
+
c && /* @__PURE__ */ s(
|
|
373
|
+
d,
|
|
400
374
|
{
|
|
401
375
|
sx: {
|
|
402
376
|
alignItems: "center",
|
|
@@ -405,28 +379,28 @@ const U = {
|
|
|
405
379
|
px: 24
|
|
406
380
|
},
|
|
407
381
|
children: [
|
|
408
|
-
/* @__PURE__ */ e(
|
|
409
|
-
r && /* @__PURE__ */ e(
|
|
382
|
+
/* @__PURE__ */ e(Xe, { bold: !0, variant: "body1", children: c }),
|
|
383
|
+
r && /* @__PURE__ */ e(lt, { onClick: r, size: "small", variant: "text", children: m.reset })
|
|
410
384
|
]
|
|
411
385
|
}
|
|
412
386
|
),
|
|
413
|
-
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { children: n ? t.map((
|
|
387
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { children: n ? t.map((a, l) => /* @__PURE__ */ s(x.Fragment, { children: [
|
|
414
388
|
/* @__PURE__ */ e(
|
|
415
389
|
Te,
|
|
416
390
|
{
|
|
417
391
|
isMini: n,
|
|
418
392
|
onRecurrenceClick: o,
|
|
419
|
-
recurrence:
|
|
393
|
+
recurrence: a
|
|
420
394
|
}
|
|
421
395
|
),
|
|
422
396
|
/* @__PURE__ */ e(Z, { sx: { mx: 24 } })
|
|
423
|
-
] }, `recurrence-${
|
|
424
|
-
/* @__PURE__ */ e(
|
|
397
|
+
] }, `recurrence-${l}`)) : p.map((a, l) => /* @__PURE__ */ s(x.Fragment, { children: [
|
|
398
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
|
|
425
399
|
Ce,
|
|
426
400
|
{
|
|
427
|
-
subheader: /* @__PURE__ */ e(
|
|
401
|
+
subheader: /* @__PURE__ */ e(dt, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: S(a.date, w.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
428
402
|
sx: { width: "100%" },
|
|
429
|
-
children:
|
|
403
|
+
children: a.recurrences.map((u, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
430
404
|
Te,
|
|
431
405
|
{
|
|
432
406
|
isMini: n,
|
|
@@ -435,79 +409,79 @@ const U = {
|
|
|
435
409
|
}
|
|
436
410
|
) }, `day-recurrence-${g}`))
|
|
437
411
|
}
|
|
438
|
-
) },
|
|
412
|
+
) }, a.id),
|
|
439
413
|
/* @__PURE__ */ e(Z, { sx: { mx: 24 } })
|
|
440
|
-
] }, `recurrence-${
|
|
414
|
+
] }, `recurrence-${l}`)) })
|
|
441
415
|
] });
|
|
442
416
|
}
|
|
443
|
-
), De =
|
|
417
|
+
), De = R(
|
|
444
418
|
({ expected: t, isExpense: n = !0, missed: r, paid: o, title: i, total: c, upcoming: m }) => {
|
|
445
|
-
const p = ne(), { isSmallMobile:
|
|
419
|
+
const p = ne(), { isSmallMobile: a } = oe(), { recurring: l } = C(), u = x.useMemo(() => {
|
|
446
420
|
const g = [{ color: p.palette.success.main, percentage: `${o / t}` }];
|
|
447
421
|
return r && g.push({ color: p.palette.error.main, percentage: `${r / t}` }), g;
|
|
448
422
|
}, [o, t, r]);
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ s(d, { children: [
|
|
424
|
+
/* @__PURE__ */ s(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
451
425
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${i} (${c})` }),
|
|
452
|
-
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${
|
|
426
|
+
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${E(t, "0,0.00")}` })
|
|
453
427
|
] }),
|
|
454
|
-
/* @__PURE__ */ e(
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */ e(
|
|
457
|
-
!
|
|
458
|
-
/* @__PURE__ */ e(h, { variant: "caption", children:
|
|
459
|
-
r !== void 0 && /* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */ e(
|
|
461
|
-
!
|
|
462
|
-
/* @__PURE__ */ e(h, { variant: "caption", children:
|
|
428
|
+
/* @__PURE__ */ e(Le, { data: u, height: 12 }),
|
|
429
|
+
/* @__PURE__ */ s(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
430
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
431
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: E(o, "0,0.00") }),
|
|
432
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
433
|
+
r !== void 0 && /* @__PURE__ */ s($, { children: [
|
|
434
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
435
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: E(r, "0,0.00") }),
|
|
436
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
463
437
|
] }),
|
|
464
|
-
/* @__PURE__ */ e(
|
|
465
|
-
!
|
|
466
|
-
/* @__PURE__ */ e(h, { variant: "caption", children:
|
|
438
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
439
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: E(m, "0,0.00") }),
|
|
440
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming })
|
|
467
441
|
] })
|
|
468
442
|
] });
|
|
469
443
|
}
|
|
470
|
-
),
|
|
471
|
-
const { recurring: t } =
|
|
444
|
+
), _t = R(() => {
|
|
445
|
+
const { recurring: t } = C(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: o, isMobile: i } = oe(n), { onEvent: c } = U(), {
|
|
472
446
|
currentMonthExpenses: m,
|
|
473
447
|
currentMonthIncome: p,
|
|
474
|
-
dateRange:
|
|
475
|
-
expenseTotal:
|
|
448
|
+
dateRange: a,
|
|
449
|
+
expenseTotal: l,
|
|
476
450
|
incomeTotal: u,
|
|
477
451
|
missedExpenseTotal: g,
|
|
478
452
|
pastRecurrences: b,
|
|
479
453
|
paidExpenseTotal: y,
|
|
480
|
-
paidIncomeTotal:
|
|
481
|
-
selectedDay:
|
|
482
|
-
selectedDayRecurrences:
|
|
454
|
+
paidIncomeTotal: v,
|
|
455
|
+
selectedDay: M,
|
|
456
|
+
selectedDayRecurrences: f,
|
|
483
457
|
setDateRange: _,
|
|
484
|
-
upcomingExpenseTotal:
|
|
485
|
-
upcomingIncomeTotal:
|
|
458
|
+
upcomingExpenseTotal: K,
|
|
459
|
+
upcomingIncomeTotal: Ee,
|
|
486
460
|
upcomingRecurrences: ue
|
|
487
|
-
} =
|
|
488
|
-
|
|
461
|
+
} = I(), [V, Ne] = x.useState(0), Oe = $e(a.start, /* @__PURE__ */ new Date()), Ge = (D, He) => {
|
|
462
|
+
Ne(He);
|
|
489
463
|
}, pe = (D) => {
|
|
490
|
-
c(
|
|
464
|
+
c(L.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
491
465
|
transaction_guid: D.transaction?.guid
|
|
492
466
|
});
|
|
493
467
|
}, ge = (D) => {
|
|
494
|
-
c(
|
|
468
|
+
c(L.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
495
469
|
transaction_guid: D.transaction?.guid
|
|
496
470
|
});
|
|
497
|
-
},
|
|
498
|
-
const D =
|
|
471
|
+
}, ke = () => {
|
|
472
|
+
const D = Be(a.start, 1);
|
|
499
473
|
_({
|
|
500
474
|
start: G(D),
|
|
501
|
-
end:
|
|
475
|
+
end: B(D)
|
|
502
476
|
});
|
|
503
|
-
},
|
|
504
|
-
const D = Pe(
|
|
477
|
+
}, We = () => {
|
|
478
|
+
const D = Pe(a.start, 1);
|
|
505
479
|
_({
|
|
506
480
|
start: G(D),
|
|
507
|
-
end:
|
|
481
|
+
end: B(D)
|
|
508
482
|
});
|
|
509
483
|
};
|
|
510
|
-
return /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ s(
|
|
511
485
|
X,
|
|
512
486
|
{
|
|
513
487
|
container: !0,
|
|
@@ -515,35 +489,35 @@ const U = {
|
|
|
515
489
|
pt: 16
|
|
516
490
|
},
|
|
517
491
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */ e(
|
|
492
|
+
/* @__PURE__ */ s(X, { md: !0, sm: 12, width: "100%", children: [
|
|
493
|
+
/* @__PURE__ */ s(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
494
|
+
/* @__PURE__ */ s(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
495
|
+
/* @__PURE__ */ e(qe, { variant: "h3", children: N(
|
|
522
496
|
t.header_title,
|
|
523
|
-
|
|
497
|
+
S(a.start, w.MONTH_LONG)
|
|
524
498
|
) }),
|
|
525
|
-
!r && /* @__PURE__ */
|
|
499
|
+
!r && /* @__PURE__ */ s(d, { direction: "row", gap: 4, children: [
|
|
526
500
|
/* @__PURE__ */ e(
|
|
527
501
|
he,
|
|
528
502
|
{
|
|
529
503
|
color: "primary",
|
|
530
504
|
disabled: Oe,
|
|
531
|
-
onClick:
|
|
532
|
-
children: /* @__PURE__ */ e(
|
|
505
|
+
onClick: We,
|
|
506
|
+
children: /* @__PURE__ */ e(Ye, {})
|
|
533
507
|
}
|
|
534
508
|
),
|
|
535
|
-
/* @__PURE__ */ e(he, { color: "primary", onClick:
|
|
509
|
+
/* @__PURE__ */ e(he, { color: "primary", onClick: ke, children: /* @__PURE__ */ e(je, {}) })
|
|
536
510
|
] })
|
|
537
511
|
] }),
|
|
538
512
|
/* @__PURE__ */ e(
|
|
539
513
|
De,
|
|
540
514
|
{
|
|
541
|
-
expected:
|
|
515
|
+
expected: l,
|
|
542
516
|
missed: g,
|
|
543
517
|
paid: y,
|
|
544
518
|
title: t.expenses,
|
|
545
519
|
total: m.length,
|
|
546
|
-
upcoming:
|
|
520
|
+
upcoming: K
|
|
547
521
|
}
|
|
548
522
|
),
|
|
549
523
|
/* @__PURE__ */ e(
|
|
@@ -551,14 +525,14 @@ const U = {
|
|
|
551
525
|
{
|
|
552
526
|
expected: u,
|
|
553
527
|
isExpense: !1,
|
|
554
|
-
paid:
|
|
528
|
+
paid: v,
|
|
555
529
|
title: t.deposits,
|
|
556
530
|
total: p.length,
|
|
557
|
-
upcoming:
|
|
531
|
+
upcoming: Ee
|
|
558
532
|
}
|
|
559
533
|
),
|
|
560
534
|
r && /* @__PURE__ */ e(
|
|
561
|
-
|
|
535
|
+
H,
|
|
562
536
|
{
|
|
563
537
|
onRecurrenceClick: pe,
|
|
564
538
|
recurrences: ue,
|
|
@@ -566,8 +540,8 @@ const U = {
|
|
|
566
540
|
}
|
|
567
541
|
)
|
|
568
542
|
] }),
|
|
569
|
-
!r && /* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
543
|
+
!r && /* @__PURE__ */ s(d, { sx: { px: i ? 0 : 24 }, children: [
|
|
544
|
+
/* @__PURE__ */ s(Fe, { onChange: Ge, value: V, variant: "fullWidth", children: [
|
|
571
545
|
/* @__PURE__ */ e(
|
|
572
546
|
fe,
|
|
573
547
|
{
|
|
@@ -582,14 +556,14 @@ const U = {
|
|
|
582
556
|
)
|
|
583
557
|
] }),
|
|
584
558
|
V === 0 && /* @__PURE__ */ e(
|
|
585
|
-
|
|
559
|
+
H,
|
|
586
560
|
{
|
|
587
561
|
onRecurrenceClick: pe,
|
|
588
562
|
recurrences: ue
|
|
589
563
|
}
|
|
590
564
|
),
|
|
591
565
|
V === 1 && /* @__PURE__ */ e(
|
|
592
|
-
|
|
566
|
+
H,
|
|
593
567
|
{
|
|
594
568
|
onRecurrenceClick: ge,
|
|
595
569
|
recurrences: b
|
|
@@ -597,16 +571,16 @@ const U = {
|
|
|
597
571
|
)
|
|
598
572
|
] })
|
|
599
573
|
] }),
|
|
600
|
-
r && /* @__PURE__ */ e(X, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */ e(
|
|
574
|
+
r && /* @__PURE__ */ e(X, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ s(d, { gap: 24, children: [
|
|
575
|
+
/* @__PURE__ */ e(Ae, {}),
|
|
602
576
|
/* @__PURE__ */ e(
|
|
603
|
-
|
|
577
|
+
H,
|
|
604
578
|
{
|
|
605
579
|
onRecurrenceClick: ge,
|
|
606
|
-
recurrences:
|
|
607
|
-
title:
|
|
580
|
+
recurrences: f || b,
|
|
581
|
+
title: M ? N(
|
|
608
582
|
t.day_transactions,
|
|
609
|
-
|
|
583
|
+
S(M, w.MONTH_DAY)
|
|
610
584
|
) : t.past_transactions
|
|
611
585
|
}
|
|
612
586
|
)
|
|
@@ -614,37 +588,37 @@ const U = {
|
|
|
614
588
|
]
|
|
615
589
|
}
|
|
616
590
|
);
|
|
617
|
-
}),
|
|
618
|
-
const { recurring: r } =
|
|
591
|
+
}), Hn = R(({ onBackClick: t, sx: n = {} }) => {
|
|
592
|
+
const { recurring: r } = C(), { isInitialized: o, selectedAccountGuids: i } = z(), { isDataLoaded: c, loadRepeatingTransactionData: m, setDateRange: p } = I(), { setFilter: a } = re(), { onEvent: l } = U(), { isMobile: u } = oe(), [g, b] = x.useState(!1);
|
|
619
593
|
return ae({
|
|
620
594
|
widgetName: "RecurringTransactionsWidget",
|
|
621
595
|
isLoaded: c
|
|
622
596
|
}), x.useEffect(() => {
|
|
623
597
|
c || m().finally();
|
|
624
598
|
}, []), x.useEffect(() => {
|
|
625
|
-
|
|
599
|
+
a({
|
|
626
600
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
627
601
|
accounts: i
|
|
628
|
-
}), p({ start: G(/* @__PURE__ */ new Date()), end:
|
|
629
|
-
}, [i]), o ? /* @__PURE__ */
|
|
630
|
-
|
|
602
|
+
}), p({ start: G(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) });
|
|
603
|
+
}, [i]), o ? /* @__PURE__ */ s(
|
|
604
|
+
ht,
|
|
631
605
|
{
|
|
632
606
|
actions: [
|
|
633
607
|
{
|
|
634
608
|
label: r.action_title,
|
|
635
609
|
iconName: "credit_card_gear",
|
|
636
610
|
onClick: () => {
|
|
637
|
-
b(!0),
|
|
611
|
+
b(!0), l(L.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
638
612
|
}
|
|
639
613
|
}
|
|
640
614
|
],
|
|
641
615
|
hasDivider: u,
|
|
642
|
-
onAccountsFilterClick: () =>
|
|
616
|
+
onAccountsFilterClick: () => l(L.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
643
617
|
onBackClick: t,
|
|
644
618
|
sx: n,
|
|
645
619
|
title: r.title,
|
|
646
620
|
children: [
|
|
647
|
-
c ? /* @__PURE__ */ e(
|
|
621
|
+
c ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ e(ve, { sx: { m: 48 }, variant: "list" }),
|
|
648
622
|
/* @__PURE__ */ e(
|
|
649
623
|
ie,
|
|
650
624
|
{
|
|
@@ -659,28 +633,28 @@ const U = {
|
|
|
659
633
|
]
|
|
660
634
|
}
|
|
661
635
|
) : /* @__PURE__ */ e(se, {});
|
|
662
|
-
}),
|
|
663
|
-
const { recurring: t } =
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */ e(
|
|
636
|
+
}), St = R(() => {
|
|
637
|
+
const { recurring: t } = C(), { availableWidth: n } = Ie(), { selectedDay: r, selectedDayRecurrences: o, setSelectedDay: i, upcomingRecurrences: c } = I(), m = n < 750;
|
|
638
|
+
return /* @__PURE__ */ s(d, { flexDirection: m ? "column" : "row", width: "100%", children: [
|
|
639
|
+
/* @__PURE__ */ e(Ae, {}),
|
|
666
640
|
!m && /* @__PURE__ */ e(Z, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
667
641
|
/* @__PURE__ */ e(
|
|
668
|
-
|
|
642
|
+
H,
|
|
669
643
|
{
|
|
670
644
|
isMini: !0,
|
|
671
645
|
onResetClick: r ? () => i(r) : void 0,
|
|
672
646
|
recurrences: o || c.slice(0, 5),
|
|
673
647
|
sx: { width: m ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
674
|
-
title: r ?
|
|
648
|
+
title: r ? N(
|
|
675
649
|
t.day_transactions,
|
|
676
|
-
|
|
650
|
+
S(r, w.MONTH_DAY)
|
|
677
651
|
) : t.upcoming_activity
|
|
678
652
|
}
|
|
679
653
|
)
|
|
680
654
|
] });
|
|
681
|
-
}),
|
|
655
|
+
}), Bn = R(
|
|
682
656
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
683
|
-
const { recurring: r } =
|
|
657
|
+
const { recurring: r } = C(), { setFilter: o } = re(), { isDataLoaded: i, loadRepeatingTransactionData: c } = I(), { isInitialized: m, selectedAccountGuids: p } = z();
|
|
684
658
|
return ae({
|
|
685
659
|
widgetName: "RecurringTransactionsMiniWidget",
|
|
686
660
|
isLoaded: i
|
|
@@ -692,7 +666,7 @@ const U = {
|
|
|
692
666
|
accounts: p
|
|
693
667
|
});
|
|
694
668
|
}, [p]), m ? /* @__PURE__ */ e(
|
|
695
|
-
|
|
669
|
+
ft,
|
|
696
670
|
{
|
|
697
671
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
698
672
|
onPrimaryCtaClick: t,
|
|
@@ -700,28 +674,28 @@ const U = {
|
|
|
700
674
|
subTitle: r.sub_title,
|
|
701
675
|
sx: n,
|
|
702
676
|
title: r.mini_title,
|
|
703
|
-
children: i ? /* @__PURE__ */ e(
|
|
677
|
+
children: i ? /* @__PURE__ */ e(St, {}) : /* @__PURE__ */ e(ve, { sx: { mx: 16 }, variant: "list" })
|
|
704
678
|
}
|
|
705
679
|
) : /* @__PURE__ */ e(se, {});
|
|
706
680
|
}
|
|
707
|
-
), wt =
|
|
708
|
-
const { recurring: t } =
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */ e(
|
|
711
|
-
/* @__PURE__ */
|
|
681
|
+
), wt = R(() => {
|
|
682
|
+
const { recurring: t } = C();
|
|
683
|
+
return /* @__PURE__ */ s(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
684
|
+
/* @__PURE__ */ e(Ke, { size: 32 }),
|
|
685
|
+
/* @__PURE__ */ s(d, { children: [
|
|
712
686
|
/* @__PURE__ */ e(q, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
713
687
|
/* @__PURE__ */ e(q, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
714
688
|
] })
|
|
715
689
|
] });
|
|
716
|
-
}),
|
|
690
|
+
}), It = ({
|
|
717
691
|
amount: t,
|
|
718
692
|
bgcolor: n,
|
|
719
693
|
isLargeScreen: r,
|
|
720
694
|
isSmallScreen: o,
|
|
721
695
|
label: i
|
|
722
|
-
}) => /* @__PURE__ */
|
|
696
|
+
}) => /* @__PURE__ */ s(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
723
697
|
/* @__PURE__ */ e(
|
|
724
|
-
|
|
698
|
+
O,
|
|
725
699
|
{
|
|
726
700
|
sx: {
|
|
727
701
|
borderRadius: "2px",
|
|
@@ -731,25 +705,25 @@ const U = {
|
|
|
731
705
|
}
|
|
732
706
|
}
|
|
733
707
|
),
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
!o && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children:
|
|
708
|
+
/* @__PURE__ */ s(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
709
|
+
!o && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: E(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
736
710
|
/* @__PURE__ */ e(h, { variant: "caption", children: i })
|
|
737
711
|
] })
|
|
738
|
-
] }),
|
|
712
|
+
] }), Mt = ({
|
|
739
713
|
upcomingRecurrences: t,
|
|
740
714
|
logoSize: n = 32,
|
|
741
715
|
maxLogos: r = 3
|
|
742
716
|
}) => {
|
|
743
717
|
const o = (i) => i * (n / 2);
|
|
744
718
|
return /* @__PURE__ */ e(
|
|
745
|
-
|
|
719
|
+
O,
|
|
746
720
|
{
|
|
747
721
|
sx: {
|
|
748
722
|
position: "relative",
|
|
749
723
|
width: 64
|
|
750
724
|
},
|
|
751
725
|
children: t.map((i, c) => c < r ? /* @__PURE__ */ e(
|
|
752
|
-
|
|
726
|
+
O,
|
|
753
727
|
{
|
|
754
728
|
sx: {
|
|
755
729
|
borderRadius: "4px",
|
|
@@ -772,24 +746,24 @@ const U = {
|
|
|
772
746
|
) : null)
|
|
773
747
|
}
|
|
774
748
|
);
|
|
775
|
-
},
|
|
749
|
+
}, Lt = ({
|
|
776
750
|
upcomingRecurrences: t,
|
|
777
751
|
maxLogos: n = 3
|
|
778
|
-
}) => /* @__PURE__ */ e(
|
|
752
|
+
}) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, o) => /* @__PURE__ */ e(
|
|
779
753
|
te,
|
|
780
754
|
{
|
|
781
755
|
categoryGuid: r.categoryGuid || "",
|
|
782
756
|
merchantGuid: r.merchantGuid || ""
|
|
783
757
|
},
|
|
784
758
|
`${r.categoryGuid}-${r.merchantGuid}-${o}`
|
|
785
|
-
)) }),
|
|
786
|
-
const t = ne(), [n, { width: r }] =
|
|
759
|
+
)) }), vt = R(() => {
|
|
760
|
+
const t = ne(), [n, { width: r }] = xt(), {
|
|
787
761
|
upcomingRecurrences: o,
|
|
788
762
|
expenseTotal: i,
|
|
789
763
|
missedExpenseTotal: c,
|
|
790
764
|
paidExpenseTotal: m,
|
|
791
765
|
upcomingExpenseTotal: p
|
|
792
|
-
} =
|
|
766
|
+
} = I(), { recurring: a } = C(), l = r <= 288, u = r >= 450, g = 32, b = o.length > 0, y = x.useMemo(() => E(i, i === 0 ? "0,0" : "0,0.00"), [i]), v = x.useMemo(() => {
|
|
793
767
|
const _ = [
|
|
794
768
|
{ color: t.palette.success.main, percentage: `${m / i}` }
|
|
795
769
|
];
|
|
@@ -803,37 +777,37 @@ const U = {
|
|
|
803
777
|
c,
|
|
804
778
|
t.palette.success.main,
|
|
805
779
|
t.palette.error.main
|
|
806
|
-
]),
|
|
807
|
-
|
|
780
|
+
]), M = () => b ? l ? /* @__PURE__ */ e(
|
|
781
|
+
Mt,
|
|
808
782
|
{
|
|
809
783
|
logoSize: g,
|
|
810
784
|
maxLogos: 3,
|
|
811
785
|
upcomingRecurrences: o.slice(0, 3)
|
|
812
786
|
}
|
|
813
|
-
) : /* @__PURE__ */ e(
|
|
787
|
+
) : /* @__PURE__ */ e(Lt, { maxLogos: 3, upcomingRecurrences: o.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), f = [
|
|
814
788
|
{
|
|
815
789
|
amount: m,
|
|
816
790
|
bgColor: "success.main",
|
|
817
|
-
label:
|
|
791
|
+
label: a.paid
|
|
818
792
|
},
|
|
819
793
|
{
|
|
820
794
|
amount: c,
|
|
821
795
|
bgColor: "error.main",
|
|
822
|
-
label:
|
|
796
|
+
label: a.missed
|
|
823
797
|
},
|
|
824
798
|
{
|
|
825
799
|
amount: p,
|
|
826
800
|
bgColor: "border.light",
|
|
827
|
-
label:
|
|
801
|
+
label: a.upcoming
|
|
828
802
|
}
|
|
829
803
|
];
|
|
830
|
-
return /* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
|
|
804
|
+
return /* @__PURE__ */ s($, { children: [
|
|
805
|
+
/* @__PURE__ */ s(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
806
|
+
/* @__PURE__ */ s(
|
|
807
|
+
d,
|
|
834
808
|
{
|
|
835
809
|
sx: [
|
|
836
|
-
y.length >= 10 &&
|
|
810
|
+
y.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
837
811
|
{
|
|
838
812
|
alignItems: "baseline",
|
|
839
813
|
overflow: "hidden",
|
|
@@ -846,20 +820,20 @@ const U = {
|
|
|
846
820
|
h,
|
|
847
821
|
{
|
|
848
822
|
sx: { width: "100%" },
|
|
849
|
-
variant: y.length >= 10 &&
|
|
823
|
+
variant: y.length >= 10 && l ? "H3" : "H2",
|
|
850
824
|
children: y
|
|
851
825
|
}
|
|
852
826
|
),
|
|
853
|
-
/* @__PURE__ */ e(q, { sx: { pr: 12 }, variant: "XSmall", children:
|
|
827
|
+
/* @__PURE__ */ e(q, { sx: { pr: 12 }, variant: "XSmall", children: a.expected })
|
|
854
828
|
]
|
|
855
829
|
}
|
|
856
830
|
),
|
|
857
|
-
|
|
831
|
+
M()
|
|
858
832
|
] }),
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */ e(
|
|
833
|
+
/* @__PURE__ */ s(d, { sx: { pt: 12 }, children: [
|
|
834
|
+
/* @__PURE__ */ e(Le, { data: v }),
|
|
861
835
|
/* @__PURE__ */ e(
|
|
862
|
-
|
|
836
|
+
d,
|
|
863
837
|
{
|
|
864
838
|
sx: {
|
|
865
839
|
alignItems: "center",
|
|
@@ -867,66 +841,66 @@ const U = {
|
|
|
867
841
|
gap: 16,
|
|
868
842
|
mt: 4
|
|
869
843
|
},
|
|
870
|
-
children:
|
|
871
|
-
|
|
844
|
+
children: f.map((_, K) => /* @__PURE__ */ e(
|
|
845
|
+
It,
|
|
872
846
|
{
|
|
873
847
|
amount: _.amount,
|
|
874
848
|
bgcolor: _.bgColor,
|
|
875
849
|
isLargeScreen: u,
|
|
876
|
-
isSmallScreen:
|
|
850
|
+
isSmallScreen: l,
|
|
877
851
|
label: _.label
|
|
878
852
|
},
|
|
879
|
-
`recurrence-legend-${
|
|
853
|
+
`recurrence-legend-${K}`
|
|
880
854
|
))
|
|
881
855
|
}
|
|
882
856
|
)
|
|
883
857
|
] })
|
|
884
858
|
] });
|
|
885
|
-
}),
|
|
859
|
+
}), Pn = R(
|
|
886
860
|
({ onCTAClick: t }) => {
|
|
887
|
-
const { onEvent: n } =
|
|
861
|
+
const { onEvent: n } = U(), { isInitialized: r, selectedAccountGuids: o } = z(), {
|
|
888
862
|
loadRepeatingTransactionData: i,
|
|
889
863
|
upcomingRecurrences: c,
|
|
890
864
|
repeatingTransactions: m,
|
|
891
865
|
setDateRange: p,
|
|
892
|
-
isDataLoaded:
|
|
893
|
-
} =
|
|
866
|
+
isDataLoaded: a
|
|
867
|
+
} = I(), { setFilter: l } = re(), { recurring: u, budgets: g } = C();
|
|
894
868
|
ae({
|
|
895
869
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
896
|
-
isLoaded:
|
|
870
|
+
isLoaded: a
|
|
897
871
|
}), x.useEffect(() => {
|
|
898
|
-
|
|
899
|
-
n(
|
|
872
|
+
a || i().finally(() => {
|
|
873
|
+
n(L.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
900
874
|
state: c.length > 0 ? "default" : "zeroState"
|
|
901
875
|
});
|
|
902
876
|
});
|
|
903
877
|
}, []), x.useEffect(() => {
|
|
904
|
-
r && (
|
|
878
|
+
r && (l({
|
|
905
879
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
906
880
|
accounts: o
|
|
907
|
-
}), p({ start: G(/* @__PURE__ */ new Date()), end:
|
|
881
|
+
}), p({ start: G(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }));
|
|
908
882
|
}, [r, o]);
|
|
909
883
|
const b = () => {
|
|
910
884
|
n(
|
|
911
|
-
c.length > 0 ?
|
|
885
|
+
c.length > 0 ? L.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : L.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
912
886
|
), t();
|
|
913
887
|
};
|
|
914
|
-
if (!r || !
|
|
888
|
+
if (!r || !a) return /* @__PURE__ */ e(se, { height: 100 });
|
|
915
889
|
const y = !m?.length;
|
|
916
890
|
return /* @__PURE__ */ e(
|
|
917
|
-
|
|
891
|
+
bt,
|
|
918
892
|
{
|
|
919
893
|
className: "mx-recurring-transaction-microwidget",
|
|
920
894
|
ctaLabel: y ? g.get_started_cta : u.primary_cta,
|
|
921
895
|
onCTAClick: b,
|
|
922
896
|
title: u.recurring_expenses,
|
|
923
|
-
children: y ? /* @__PURE__ */ e(wt, {}) : /* @__PURE__ */ e(
|
|
897
|
+
children: y ? /* @__PURE__ */ e(wt, {}) : /* @__PURE__ */ e(vt, {})
|
|
924
898
|
}
|
|
925
899
|
);
|
|
926
900
|
}
|
|
927
|
-
),
|
|
901
|
+
), $n = R(
|
|
928
902
|
({ isOpen: t, onClose: n, selectedTab: r }) => {
|
|
929
|
-
const { cashflow: o } =
|
|
903
|
+
const { cashflow: o } = C();
|
|
930
904
|
return /* @__PURE__ */ e(
|
|
931
905
|
ie,
|
|
932
906
|
{
|
|
@@ -940,14 +914,14 @@ const U = {
|
|
|
940
914
|
}
|
|
941
915
|
);
|
|
942
916
|
export {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
917
|
+
Vn as AddRecurringTransactionDetails,
|
|
918
|
+
Un as ManageExpenses,
|
|
919
|
+
Xn as ManageIncome,
|
|
946
920
|
_e as RecurringSettings,
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
921
|
+
$n as RecurringSettingsDrawer,
|
|
922
|
+
Pn as RecurringTransactionsMicroWidget,
|
|
923
|
+
Bn as RecurringTransactionsMiniWidget,
|
|
950
924
|
jn as RecurringTransactionsStore,
|
|
951
|
-
|
|
952
|
-
|
|
925
|
+
Hn as RecurringTransactionsWidget,
|
|
926
|
+
qn as SelectTransaction
|
|
953
927
|
};
|