@mx-cartographer/experiences 7.13.21 → 7.13.22-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/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-CG9VtEpj.mjs} +2 -2
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-BDFCEhSI.mjs} +2 -2
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-Bn1eH2EU.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-BCSxP3M3.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-tvJUjmwZ.mjs} +1 -1
- package/dist/{Connect-eYIWqCEr.mjs → Connect-CmjOgy5v.mjs} +1 -1
- package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-Be0RkL7I.mjs} +2 -2
- package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-yeD_PsY1.mjs} +2 -2
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-xu9UcYZR.mjs} +1 -1
- package/dist/DateRangeSelector-DE4UR77m.mjs +275 -0
- package/dist/{ExportCsvAction-izkIdXj5.mjs → ExportCsvAction-CLUDN8jI.mjs} +3 -3
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-BkUeAltd.mjs} +90 -96
- package/dist/{GoalStore-DB58sKTC.mjs → GoalStore-DMhiGiF4.mjs} +1 -1
- package/dist/{Help-D-laTbKu.mjs → Help-pcoNjCaF.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DIjY-HBq.mjs} +1 -1
- package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-BQIdxB-9.mjs} +1 -1
- package/dist/{ManageIncome-B1j-AzI1.mjs → ManageIncome-DWVaWpCT.mjs} +4 -4
- package/dist/{MicroWidgetContainer-B_EnfvCq.mjs → MicroWidgetContainer-CTMkXRJM.mjs} +1 -1
- package/dist/{MiniWidgetContainer-Bhkv-hpz.mjs → MiniWidgetContainer-BKPN3c-6.mjs} +1 -1
- package/dist/{NotificationSettings-C77J42Ue.mjs → NotificationSettings-O3iUw7-O.mjs} +32 -32
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-2lCGZTRv.mjs} +3 -3
- package/dist/{RecurringSettings-Dyj3i0ZJ.mjs → RecurringSettings-DNko1CD0.mjs} +2 -2
- package/dist/{SpendingLegend-BgjazduU.mjs → SpendingLegend-CGYqNtOp.mjs} +1 -1
- package/dist/{StatusIndicator-CIKUOoN_.mjs → StatusIndicator-CnDblSmc.mjs} +2 -2
- package/dist/{Transaction-CqjlF6SO.mjs → Transaction-Bd0myZzA.mjs} +1 -1
- package/dist/{TransactionDetails-CwqokbQo.mjs → TransactionDetails-DAB5arBD.mjs} +6 -6
- package/dist/{TransactionStore-rpqhGX8m.mjs → TransactionStore-hzVucfUK.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BWCe3UeO.mjs} +1 -1
- package/dist/WidgetContainer-BPeSl0Dj.mjs +180 -0
- package/dist/WidgetContainerV2-BjOelON7.mjs +127 -0
- package/dist/accounts/index.es.js +218 -219
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +408 -409
- package/dist/cashflow/index.es.js +227 -228
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +3 -2
- package/dist/common/components/WidgetContainerV2.d.ts +4 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +167 -164
- package/dist/dashboard/index.es.js +5 -5
- package/dist/debts/index.es.js +585 -586
- package/dist/{exportTransactionsToCSV-CdTF_RqL.mjs → exportTransactionsToCSV-CamFllci.mjs} +1 -1
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +641 -652
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +498 -499
- package/dist/help/index.es.js +8 -8
- package/dist/{hooks-BxkfR-Ff.mjs → hooks-DOWEalfb.mjs} +2 -2
- package/dist/insights/index.es.js +3 -3
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +448 -449
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +182 -196
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +240 -242
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/index.es.js +246 -248
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-DQc7zGqk.mjs} +1 -1
- package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DojdZhOg.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-DmYEMfRw.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-B7xDq2bM.mjs +0 -441
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import x from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as y } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as H } from "date-fns/endOfMonth";
|
|
5
5
|
import { endOfToday as J } from "date-fns/endOfToday";
|
|
6
6
|
import { startOfMonth as k } 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 Un } from "../RecurringSettings-
|
|
9
|
+
import { R as _e } from "../RecurringSettings-DNko1CD0.mjs";
|
|
10
|
+
import { M as Un } from "../RecurringSettings-DNko1CD0.mjs";
|
|
11
11
|
import { addMonths as He } from "date-fns/addMonths";
|
|
12
12
|
import { subMonths as $e } from "date-fns/subMonths";
|
|
13
13
|
import { isBefore as Be } from "date-fns/isBefore";
|
|
14
14
|
import q from "@mui/material/Unstable_Grid2";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
15
|
+
import ge from "@mui/material/IconButton";
|
|
16
|
+
import l from "@mui/material/Stack";
|
|
17
|
+
import he from "@mui/material/Tab";
|
|
18
18
|
import Fe from "@mui/material/Tabs";
|
|
19
|
-
import { Schedule as ze, MonetizationOn as Ue, Cancel as
|
|
20
|
-
import { Text as
|
|
21
|
-
import { getWeeksInMonth as
|
|
19
|
+
import { Schedule as ze, MonetizationOn as Ue, Cancel as De, CheckCircle as Se, ChevronLeft as Ye, ChevronRight as je, CurrencyExchange as Ke } from "@mxenabled/mx-icons";
|
|
20
|
+
import { Text as g, MerchantLogo as te, InstitutionLogo as Ve, H3 as qe, H2 as Ze, P as Z } from "@mxenabled/mxui";
|
|
21
|
+
import { getWeeksInMonth as fe } from "date-fns/getWeeksInMonth";
|
|
22
22
|
import { enCA as Xe } from "date-fns/locale/en-CA";
|
|
23
|
-
import { enUS as
|
|
23
|
+
import { enUS as xe } from "date-fns/locale/en-US";
|
|
24
24
|
import { es as Je } from "date-fns/locale/es";
|
|
25
25
|
import { fr as Qe } from "date-fns/locale/fr";
|
|
26
26
|
import { frCA as et } from "date-fns/locale/fr-CA";
|
|
@@ -32,8 +32,8 @@ import { isSameDay as it } from "date-fns/isSameDay";
|
|
|
32
32
|
import ot from "@mui/material/Badge";
|
|
33
33
|
import { PickersDay as at } from "@mui/x-date-pickers/PickersDay";
|
|
34
34
|
import { I as F } from "../IconBacking-B9oC6uL2.mjs";
|
|
35
|
-
import { u as
|
|
36
|
-
import { d as A, c as
|
|
35
|
+
import { u as C, b as z, i as I, f as U, p as we, h as re } from "../hooks-DOWEalfb.mjs";
|
|
36
|
+
import { d as A, c as T, g as be, f as st } from "../RecurringTransactions-tayG19Wn.mjs";
|
|
37
37
|
import { f as S, D as w } from "../DateFormats-BMpMrZpW.mjs";
|
|
38
38
|
import { T as G } from "../RecurringTransactionsStore-Dpl39vbj.mjs";
|
|
39
39
|
import { R as jn } from "../RecurringTransactionsStore-Dpl39vbj.mjs";
|
|
@@ -41,31 +41,31 @@ import { g as ct, L as W, b as N } from "../Localization-CPkpIwIx.mjs";
|
|
|
41
41
|
import { A as L } from "../Analytics-BYItVAe-.mjs";
|
|
42
42
|
import lt from "@mui/material/Button";
|
|
43
43
|
import X from "@mui/material/Divider";
|
|
44
|
-
import
|
|
45
|
-
import
|
|
44
|
+
import Ce from "@mui/material/List";
|
|
45
|
+
import Ie from "@mui/material/ListItem";
|
|
46
46
|
import dt from "@mui/material/ListSubheader";
|
|
47
47
|
import ut from "@mui/material/ListItemAvatar";
|
|
48
48
|
import mt from "@mui/material/ListItemButton";
|
|
49
49
|
import pt from "@mui/material/ListItemText";
|
|
50
|
-
import { b as gt } from "../ManageIncome-
|
|
51
|
-
import { c as Vn, M as qn, S as Zn } from "../ManageIncome-
|
|
50
|
+
import { b as gt } from "../ManageIncome-DWVaWpCT.mjs";
|
|
51
|
+
import { c as Vn, M as qn, S as Zn } from "../ManageIncome-DWVaWpCT.mjs";
|
|
52
52
|
import { f as E } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
53
53
|
import { D as ie } from "../Drawer-Bbe4AMB1.mjs";
|
|
54
54
|
import O from "@mui/material/Box";
|
|
55
|
-
import { S as
|
|
56
|
-
import { u as
|
|
55
|
+
import { S as Me } from "../StatusBar-BK_uYHAB.mjs";
|
|
56
|
+
import { u as Le } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
57
57
|
import { S as ve } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
58
|
-
import { u as
|
|
59
|
-
import { L as
|
|
60
|
-
import { W as ht } from "../
|
|
61
|
-
import { M as ft } from "../MiniWidgetContainer-
|
|
58
|
+
import { u as oe } from "../useWidgetLoadTimer-DmYEMfRw.mjs";
|
|
59
|
+
import { L as ae } from "../Loader-D3rjKx72.mjs";
|
|
60
|
+
import { W as ht } from "../WidgetContainerV2-BjOelON7.mjs";
|
|
61
|
+
import { M as ft } from "../MiniWidgetContainer-BKPN3c-6.mjs";
|
|
62
62
|
import { u as xt } from "../useDimensions-CeDR9V8N.mjs";
|
|
63
|
-
import { M as bt } from "../MicroWidgetContainer-
|
|
63
|
+
import { M as bt } from "../MicroWidgetContainer-CTMkXRJM.mjs";
|
|
64
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,
|
|
68
|
+
}, j = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
69
69
|
F,
|
|
70
70
|
{
|
|
71
71
|
backingSx: { backgroundColor: "background.paper" },
|
|
@@ -73,7 +73,7 @@ const Y = {
|
|
|
73
73
|
sx: { ...j(t) },
|
|
74
74
|
children: /* @__PURE__ */ e(ze, { color: "primary", filled: !0, sx: { fontSize: n, ...Y } })
|
|
75
75
|
}
|
|
76
|
-
),
|
|
76
|
+
), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
77
77
|
F,
|
|
78
78
|
{
|
|
79
79
|
backingSx: { backgroundColor: "background.paper" },
|
|
@@ -87,55 +87,55 @@ const Y = {
|
|
|
87
87
|
}
|
|
88
88
|
)
|
|
89
89
|
}
|
|
90
|
-
),
|
|
90
|
+
), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
91
91
|
F,
|
|
92
92
|
{
|
|
93
93
|
backingSx: { backgroundColor: "background.paper" },
|
|
94
94
|
size: n,
|
|
95
95
|
sx: { ...j(t) },
|
|
96
|
-
children: /* @__PURE__ */ e(
|
|
96
|
+
children: /* @__PURE__ */ e(De, { color: "error", filled: !0, sx: { fontSize: n, ...Y } })
|
|
97
97
|
}
|
|
98
|
-
),
|
|
98
|
+
), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
99
99
|
F,
|
|
100
100
|
{
|
|
101
101
|
backingSx: { backgroundColor: "background.paper" },
|
|
102
102
|
size: n,
|
|
103
103
|
sx: { ...j(t) },
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
104
|
+
children: /* @__PURE__ */ e(Se, { color: "success", filled: !0, sx: { fontSize: n, ...Y } })
|
|
105
105
|
}
|
|
106
|
-
), Ct =
|
|
106
|
+
), Ct = y(
|
|
107
107
|
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
108
|
-
const { recurring: o } =
|
|
108
|
+
const { recurring: o } = C(), { selectedAccountGuids: i } = z(), { recurrences: c, setSelectedDay: u } = I(), a = x.useMemo(
|
|
109
109
|
() => c.filter((f) => i.includes(f.accountGuid)),
|
|
110
110
|
[i, c]
|
|
111
111
|
).filter(
|
|
112
112
|
(f) => it(f.occurredOnDate || f.expectedDate, t)
|
|
113
|
-
),
|
|
114
|
-
(f) => f.type !== A.Income && f.status ===
|
|
113
|
+
), d = a.some(
|
|
114
|
+
(f) => f.type !== A.Income && f.status === T.Upcoming
|
|
115
115
|
), m = a.some(
|
|
116
|
-
(f) => f.type !== A.Income && f.status ===
|
|
117
|
-
),
|
|
118
|
-
(f) => f.type !== A.Income && f.status ===
|
|
119
|
-
),
|
|
120
|
-
|
|
116
|
+
(f) => f.type !== A.Income && f.status === T.Missed
|
|
117
|
+
), h = a.some(
|
|
118
|
+
(f) => f.type !== A.Income && f.status === T.Paid
|
|
119
|
+
), R = a.some((f) => f.type === A.Income), b = (d ? 1 : 0) + (m ? 1 : 0) + (h ? 1 : 0) + (R ? 1 : 0), v = [
|
|
120
|
+
h && o.paid,
|
|
121
121
|
m && o.missed,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
d && o.upcoming,
|
|
123
|
+
R && o.income
|
|
124
124
|
].filter(Boolean), M = v.length > 0 ? `${S(t, w.MONTH_DAY_YEAR)}, ${v.join(", ")}` : S(t, w.MONTH_DAY_YEAR);
|
|
125
125
|
return /* @__PURE__ */ e(
|
|
126
126
|
ot,
|
|
127
127
|
{
|
|
128
128
|
badgeContent: a.length > 0 && /* @__PURE__ */ s(B, { children: [
|
|
129
|
-
m && /* @__PURE__ */ e(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
m && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
130
|
+
h && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
131
|
+
d && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
132
|
+
R && /* @__PURE__ */ e(ce, { isOffset: !0 })
|
|
133
133
|
] }),
|
|
134
134
|
overlap: "circular",
|
|
135
135
|
sx: {
|
|
136
136
|
"& .MuiBadge-badge": {
|
|
137
137
|
padding: 0,
|
|
138
|
-
marginRight: `${(
|
|
138
|
+
marginRight: `${(b - 1) * 6 + 1}px`,
|
|
139
139
|
flexWrap: "nowrap"
|
|
140
140
|
}
|
|
141
141
|
},
|
|
@@ -159,13 +159,13 @@ const Y = {
|
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ s(
|
|
162
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ s(l, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
163
163
|
/* @__PURE__ */ e(t, {}),
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
] }), yt =
|
|
166
|
-
const { recurring: t } =
|
|
164
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: n })
|
|
165
|
+
] }), yt = y(() => {
|
|
166
|
+
const { recurring: t } = C();
|
|
167
167
|
return /* @__PURE__ */ s(
|
|
168
|
-
|
|
168
|
+
l,
|
|
169
169
|
{
|
|
170
170
|
alignItems: "center",
|
|
171
171
|
"aria-hidden": !0,
|
|
@@ -174,36 +174,36 @@ const Y = {
|
|
|
174
174
|
justifyContent: "center",
|
|
175
175
|
mt: 12,
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */ e($, { icon:
|
|
178
|
-
/* @__PURE__ */ e($, { icon:
|
|
179
|
-
/* @__PURE__ */ e($, { icon:
|
|
180
|
-
/* @__PURE__ */ e($, { icon:
|
|
177
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
178
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
179
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
180
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
181
181
|
]
|
|
182
182
|
}
|
|
183
183
|
);
|
|
184
|
-
}),
|
|
184
|
+
}), ye = 58, Rt = () => {
|
|
185
185
|
const t = ct();
|
|
186
186
|
return {
|
|
187
|
-
[W.EN_US]:
|
|
187
|
+
[W.EN_US]: xe,
|
|
188
188
|
[W.EN_CA]: Xe,
|
|
189
189
|
[W.FR]: Qe,
|
|
190
190
|
[W.FR_CA]: et,
|
|
191
191
|
[W.ES]: Je
|
|
192
|
-
}[t] ||
|
|
193
|
-
}, Ae =
|
|
194
|
-
const t = ne(), { onEvent: n } = U(), { recurring: r } =
|
|
195
|
-
|
|
192
|
+
}[t] || xe;
|
|
193
|
+
}, Ae = y(() => {
|
|
194
|
+
const t = ne(), { onEvent: n } = U(), { recurring: r } = C(), { selectedDay: o, setDateRange: i } = I(), [c, u] = x.useState(
|
|
195
|
+
fe(/* @__PURE__ */ new Date()) * G + ye
|
|
196
196
|
), p = (m) => {
|
|
197
|
-
u(
|
|
197
|
+
u(fe(m) * G + ye), i({
|
|
198
198
|
start: k(m),
|
|
199
199
|
end: H(m)
|
|
200
200
|
}), a(m), n(L.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
201
201
|
}, a = (m) => {
|
|
202
202
|
m && requestAnimationFrame(() => {
|
|
203
|
-
const
|
|
204
|
-
|
|
203
|
+
const h = document.getElementById("recurrence-list");
|
|
204
|
+
h?.setAttribute("tabindex", "-1"), h?.focus();
|
|
205
205
|
});
|
|
206
|
-
},
|
|
206
|
+
}, d = /* @__PURE__ */ e(
|
|
207
207
|
nt,
|
|
208
208
|
{
|
|
209
209
|
minDate: k(/* @__PURE__ */ new Date()),
|
|
@@ -260,26 +260,26 @@ const Y = {
|
|
|
260
260
|
views: ["day"]
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
|
-
return /* @__PURE__ */ e(
|
|
264
|
-
o &&
|
|
265
|
-
!o &&
|
|
266
|
-
/* @__PURE__ */ e(
|
|
263
|
+
return /* @__PURE__ */ e(l, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ s(rt, { adapterLocale: Rt(), dateAdapter: tt, children: [
|
|
264
|
+
o && d,
|
|
265
|
+
!o && d,
|
|
266
|
+
/* @__PURE__ */ e(g, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
267
267
|
/* @__PURE__ */ e(yt, {})
|
|
268
268
|
] }) });
|
|
269
|
-
}),
|
|
269
|
+
}), Tt = (t) => {
|
|
270
270
|
if (t.type === A.Income)
|
|
271
|
-
return /* @__PURE__ */ e(
|
|
271
|
+
return /* @__PURE__ */ e(ce, {});
|
|
272
272
|
switch (t.status) {
|
|
273
|
-
case
|
|
273
|
+
case T.Missed:
|
|
274
|
+
return /* @__PURE__ */ e(le, {});
|
|
275
|
+
case T.Paid:
|
|
274
276
|
return /* @__PURE__ */ e(de, {});
|
|
275
|
-
case D.Paid:
|
|
276
|
-
return /* @__PURE__ */ e(ue, {});
|
|
277
277
|
default:
|
|
278
|
-
return /* @__PURE__ */ e(
|
|
278
|
+
return /* @__PURE__ */ e(se, {});
|
|
279
279
|
}
|
|
280
|
-
},
|
|
280
|
+
}, _t = (t, n) => {
|
|
281
281
|
switch (t.status) {
|
|
282
|
-
case
|
|
282
|
+
case T.Paid:
|
|
283
283
|
return t.expectedDate ? N(
|
|
284
284
|
n.paid_on,
|
|
285
285
|
S(
|
|
@@ -287,12 +287,12 @@ const Y = {
|
|
|
287
287
|
w.MONTH_DAY
|
|
288
288
|
)
|
|
289
289
|
) : n.paid;
|
|
290
|
-
case
|
|
290
|
+
case T.Missed:
|
|
291
291
|
return N(
|
|
292
292
|
n.missed_on,
|
|
293
293
|
S(t.expectedDate, w.MONTH_DAY)
|
|
294
294
|
);
|
|
295
|
-
case
|
|
295
|
+
case T.Upcoming:
|
|
296
296
|
return N(
|
|
297
297
|
n.upcoming_on,
|
|
298
298
|
S(t.expectedDate, w.MONTH_DAY)
|
|
@@ -300,20 +300,20 @@ const Y = {
|
|
|
300
300
|
default:
|
|
301
301
|
return n.unknown;
|
|
302
302
|
}
|
|
303
|
-
},
|
|
303
|
+
}, Re = ({
|
|
304
304
|
recurrence: t,
|
|
305
305
|
isMini: n = !1,
|
|
306
306
|
onRecurrenceClick: r = () => {
|
|
307
307
|
},
|
|
308
308
|
showOrdinal: o = !1
|
|
309
309
|
}) => {
|
|
310
|
-
const { recurring: i } =
|
|
310
|
+
const { recurring: i } = C(), { detailedRepeatingTransactions: c } = I(), [u, p] = x.useState(!1), a = x.useMemo(
|
|
311
311
|
() => c.find((M) => M.guid === t.repeatingTransactionGuid),
|
|
312
312
|
[t, c]
|
|
313
|
-
),
|
|
314
|
-
let
|
|
315
|
-
return
|
|
316
|
-
/* @__PURE__ */ s(
|
|
313
|
+
), d = t.type === A.Income, m = t.status === T.Paid, h = t.status === T.Missed, R = t.status === T.Upcoming;
|
|
314
|
+
let b = i.paid?.toLowerCase();
|
|
315
|
+
return h ? b = i.missed?.toLowerCase() : R && (b = o ? be(i, a || {}, !0) : be(i, a || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
316
|
+
/* @__PURE__ */ s(Ie, { disableGutters: !0, disablePadding: !0, children: [
|
|
317
317
|
/* @__PURE__ */ s(mt, { onClick: () => {
|
|
318
318
|
p(!0), r(t);
|
|
319
319
|
}, children: [
|
|
@@ -325,17 +325,17 @@ const Y = {
|
|
|
325
325
|
}
|
|
326
326
|
) }),
|
|
327
327
|
/* @__PURE__ */ e(pt, { children: /* @__PURE__ */ s(
|
|
328
|
-
|
|
328
|
+
l,
|
|
329
329
|
{
|
|
330
330
|
direction: "row",
|
|
331
331
|
gap: 4,
|
|
332
332
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
333
333
|
children: [
|
|
334
|
-
/* @__PURE__ */ s(
|
|
335
|
-
/* @__PURE__ */ e(
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */ e(
|
|
334
|
+
/* @__PURE__ */ s(l, { direction: "column", width: "50%", children: [
|
|
335
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: t.name }),
|
|
336
|
+
/* @__PURE__ */ e(l, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ s(l, { direction: "row", gap: 4, children: [
|
|
337
|
+
Tt(t),
|
|
338
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: _t(t, i) })
|
|
339
339
|
] }) : /* @__PURE__ */ s(B, { children: [
|
|
340
340
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
341
341
|
Ve,
|
|
@@ -345,16 +345,16 @@ const Y = {
|
|
|
345
345
|
size: 12
|
|
346
346
|
}
|
|
347
347
|
),
|
|
348
|
-
/* @__PURE__ */ e(
|
|
348
|
+
/* @__PURE__ */ e(g, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
349
349
|
] }) })
|
|
350
350
|
] }),
|
|
351
|
-
/* @__PURE__ */ s(
|
|
352
|
-
/* @__PURE__ */ s(
|
|
353
|
-
|
|
351
|
+
/* @__PURE__ */ s(l, { alignItems: "flex-end", width: "100%", children: [
|
|
352
|
+
/* @__PURE__ */ s(g, { bold: !0, color: d ? "success.main" : "text.primary", variant: "body1", children: [
|
|
353
|
+
d ? "+" : "",
|
|
354
354
|
E(t.amount, "0,0.00")
|
|
355
355
|
] }),
|
|
356
356
|
!n && /* @__PURE__ */ s(
|
|
357
|
-
|
|
357
|
+
l,
|
|
358
358
|
{
|
|
359
359
|
direction: "row",
|
|
360
360
|
sx: {
|
|
@@ -365,9 +365,9 @@ const Y = {
|
|
|
365
365
|
width: "100%"
|
|
366
366
|
},
|
|
367
367
|
children: [
|
|
368
|
-
m && /* @__PURE__ */ e(
|
|
369
|
-
|
|
370
|
-
/* @__PURE__ */ e(
|
|
368
|
+
m && /* @__PURE__ */ e(Se, { color: "success", filled: !0, size: 12 }),
|
|
369
|
+
h && /* @__PURE__ */ e(De, { color: "error", filled: !0, size: 12 }),
|
|
370
|
+
/* @__PURE__ */ e(g, { bold: !0, color: "text.secondary", variant: "caption", children: b })
|
|
371
371
|
]
|
|
372
372
|
}
|
|
373
373
|
)
|
|
@@ -393,7 +393,7 @@ const Y = {
|
|
|
393
393
|
}
|
|
394
394
|
)
|
|
395
395
|
] });
|
|
396
|
-
}, P =
|
|
396
|
+
}, P = y(
|
|
397
397
|
({
|
|
398
398
|
recurrences: t,
|
|
399
399
|
isMini: n = !1,
|
|
@@ -402,10 +402,10 @@ const Y = {
|
|
|
402
402
|
sx: i = {},
|
|
403
403
|
title: c
|
|
404
404
|
}) => {
|
|
405
|
-
const { recurring: u } =
|
|
406
|
-
return /* @__PURE__ */ s(
|
|
405
|
+
const { recurring: u } = C(), p = x.useMemo(() => st(t), [t]);
|
|
406
|
+
return /* @__PURE__ */ s(l, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...i }, "tab-index": -1, children: [
|
|
407
407
|
c && /* @__PURE__ */ s(
|
|
408
|
-
|
|
408
|
+
l,
|
|
409
409
|
{
|
|
410
410
|
sx: {
|
|
411
411
|
alignItems: "center",
|
|
@@ -419,9 +419,9 @@ const Y = {
|
|
|
419
419
|
]
|
|
420
420
|
}
|
|
421
421
|
),
|
|
422
|
-
t.length === 0 ? /* @__PURE__ */ e(
|
|
422
|
+
t.length === 0 ? /* @__PURE__ */ e(g, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(Ce, { children: n ? t.map((a, d) => /* @__PURE__ */ s(x.Fragment, { children: [
|
|
423
423
|
/* @__PURE__ */ e(
|
|
424
|
-
|
|
424
|
+
Re,
|
|
425
425
|
{
|
|
426
426
|
isMini: n,
|
|
427
427
|
onRecurrenceClick: o,
|
|
@@ -429,91 +429,91 @@ const Y = {
|
|
|
429
429
|
}
|
|
430
430
|
),
|
|
431
431
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
432
|
-
] }, `recurrence-${
|
|
433
|
-
/* @__PURE__ */ e(
|
|
434
|
-
|
|
432
|
+
] }, `recurrence-${d}`)) : p.map((a, d) => /* @__PURE__ */ s(x.Fragment, { children: [
|
|
433
|
+
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(
|
|
434
|
+
Ce,
|
|
435
435
|
{
|
|
436
|
-
subheader: /* @__PURE__ */ e(dt, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(
|
|
436
|
+
subheader: /* @__PURE__ */ e(dt, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: S(a.date, w.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
437
437
|
sx: { width: "100%" },
|
|
438
|
-
children: a.recurrences.map((m,
|
|
439
|
-
|
|
438
|
+
children: a.recurrences.map((m, h) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
439
|
+
Re,
|
|
440
440
|
{
|
|
441
441
|
isMini: n,
|
|
442
442
|
onRecurrenceClick: o,
|
|
443
443
|
recurrence: m
|
|
444
444
|
}
|
|
445
|
-
) }, `day-recurrence-${
|
|
445
|
+
) }, `day-recurrence-${h}`))
|
|
446
446
|
}
|
|
447
447
|
) }, a.id),
|
|
448
448
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
449
|
-
] }, `recurrence-${
|
|
449
|
+
] }, `recurrence-${d}`)) })
|
|
450
450
|
] });
|
|
451
451
|
}
|
|
452
|
-
), Te =
|
|
452
|
+
), Te = y(
|
|
453
453
|
({ expected: t, isExpense: n = !0, missed: r, paid: o, title: i, total: c, upcoming: u }) => {
|
|
454
|
-
const p = ne(), { isSmallMobile: a } =
|
|
455
|
-
const
|
|
456
|
-
return r &&
|
|
454
|
+
const p = ne(), { isSmallMobile: a } = Le(), { recurring: d } = C(), m = x.useMemo(() => {
|
|
455
|
+
const h = [{ color: p.palette.success.main, percentage: `${o / t}` }];
|
|
456
|
+
return r && h.push({ color: p.palette.error.main, percentage: `${r / t}` }), h;
|
|
457
457
|
}, [o, t, r]);
|
|
458
|
-
return /* @__PURE__ */ s(
|
|
459
|
-
/* @__PURE__ */ s(
|
|
460
|
-
/* @__PURE__ */ e(
|
|
461
|
-
/* @__PURE__ */ e(
|
|
458
|
+
return /* @__PURE__ */ s(l, { children: [
|
|
459
|
+
/* @__PURE__ */ s(l, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
460
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: `${i} (${c})` }),
|
|
461
|
+
/* @__PURE__ */ e(g, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${E(t, "0,0.00")}` })
|
|
462
462
|
] }),
|
|
463
|
-
/* @__PURE__ */ e(
|
|
464
|
-
/* @__PURE__ */ s(
|
|
463
|
+
/* @__PURE__ */ e(Me, { data: m, height: 12 }),
|
|
464
|
+
/* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
465
465
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
466
|
-
!a && /* @__PURE__ */ e(
|
|
467
|
-
/* @__PURE__ */ e(
|
|
466
|
+
!a && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: E(o, "0,0.00") }),
|
|
467
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: d.paid?.toLowerCase() }),
|
|
468
468
|
r !== void 0 && /* @__PURE__ */ s(B, { children: [
|
|
469
469
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
470
|
-
!a && /* @__PURE__ */ e(
|
|
471
|
-
/* @__PURE__ */ e(
|
|
470
|
+
!a && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: E(r, "0,0.00") }),
|
|
471
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: d.missed?.toLowerCase() })
|
|
472
472
|
] }),
|
|
473
473
|
/* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
474
|
-
!a && /* @__PURE__ */ e(
|
|
475
|
-
/* @__PURE__ */ e(
|
|
474
|
+
!a && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: E(u, "0,0.00") }),
|
|
475
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: d.upcoming?.toLowerCase() })
|
|
476
476
|
] })
|
|
477
477
|
] });
|
|
478
478
|
}
|
|
479
|
-
),
|
|
480
|
-
const { recurring: t } =
|
|
479
|
+
), Dt = y(() => {
|
|
480
|
+
const { recurring: t } = C(), { availableWidth: n } = we(), { isDesktop: r, isSmallMobile: o, isMobile: i } = Le(n), { onEvent: c } = U(), {
|
|
481
481
|
currentMonthExpenses: u,
|
|
482
482
|
currentMonthIncome: p,
|
|
483
483
|
dateRange: a,
|
|
484
|
-
expenseTotal:
|
|
484
|
+
expenseTotal: d,
|
|
485
485
|
incomeTotal: m,
|
|
486
|
-
missedExpenseTotal:
|
|
487
|
-
pastRecurrences:
|
|
488
|
-
paidExpenseTotal:
|
|
486
|
+
missedExpenseTotal: h,
|
|
487
|
+
pastRecurrences: R,
|
|
488
|
+
paidExpenseTotal: b,
|
|
489
489
|
paidIncomeTotal: v,
|
|
490
490
|
selectedDay: M,
|
|
491
491
|
selectedDayRecurrences: f,
|
|
492
|
-
setDateRange:
|
|
492
|
+
setDateRange: D,
|
|
493
493
|
upcomingExpenseTotal: K,
|
|
494
494
|
upcomingIncomeTotal: Ee,
|
|
495
|
-
upcomingRecurrences:
|
|
496
|
-
} = I(), [V, Ne] = x.useState(0), Oe = Be(a.start, /* @__PURE__ */ new Date()), ke = (
|
|
495
|
+
upcomingRecurrences: ue
|
|
496
|
+
} = I(), [V, Ne] = x.useState(0), Oe = Be(a.start, /* @__PURE__ */ new Date()), ke = (_, Pe) => {
|
|
497
497
|
Ne(Pe);
|
|
498
|
-
},
|
|
498
|
+
}, me = (_) => {
|
|
499
499
|
c(L.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
500
|
-
transaction_guid:
|
|
500
|
+
transaction_guid: _.transaction?.guid
|
|
501
501
|
});
|
|
502
|
-
},
|
|
502
|
+
}, pe = (_) => {
|
|
503
503
|
c(L.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
504
|
-
transaction_guid:
|
|
504
|
+
transaction_guid: _.transaction?.guid
|
|
505
505
|
});
|
|
506
506
|
}, Ge = () => {
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
start: k(
|
|
510
|
-
end: H(
|
|
507
|
+
const _ = He(a.start, 1);
|
|
508
|
+
D({
|
|
509
|
+
start: k(_),
|
|
510
|
+
end: H(_)
|
|
511
511
|
});
|
|
512
512
|
}, We = () => {
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
start: k(
|
|
516
|
-
end: H(
|
|
513
|
+
const _ = $e(a.start, 1);
|
|
514
|
+
D({
|
|
515
|
+
start: k(_),
|
|
516
|
+
end: H(_)
|
|
517
517
|
});
|
|
518
518
|
};
|
|
519
519
|
return /* @__PURE__ */ s(
|
|
@@ -525,15 +525,15 @@ const Y = {
|
|
|
525
525
|
},
|
|
526
526
|
children: [
|
|
527
527
|
/* @__PURE__ */ s(q, { md: !0, sm: 12, width: "100%", children: [
|
|
528
|
-
/* @__PURE__ */ s(
|
|
529
|
-
/* @__PURE__ */ s(
|
|
528
|
+
/* @__PURE__ */ s(l, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
529
|
+
/* @__PURE__ */ s(l, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
530
530
|
/* @__PURE__ */ e(Ze, { variant: "h3", children: N(
|
|
531
531
|
t.header_title,
|
|
532
532
|
S(a.start, w.MONTH_LONG)
|
|
533
533
|
) }),
|
|
534
|
-
!r && /* @__PURE__ */ s(
|
|
534
|
+
!r && /* @__PURE__ */ s(l, { direction: "row", gap: 4, children: [
|
|
535
535
|
/* @__PURE__ */ e(
|
|
536
|
-
|
|
536
|
+
ge,
|
|
537
537
|
{
|
|
538
538
|
color: "primary",
|
|
539
539
|
disabled: Oe,
|
|
@@ -541,15 +541,15 @@ const Y = {
|
|
|
541
541
|
children: /* @__PURE__ */ e(Ye, {})
|
|
542
542
|
}
|
|
543
543
|
),
|
|
544
|
-
/* @__PURE__ */ e(
|
|
544
|
+
/* @__PURE__ */ e(ge, { color: "primary", onClick: Ge, children: /* @__PURE__ */ e(je, {}) })
|
|
545
545
|
] })
|
|
546
546
|
] }),
|
|
547
547
|
/* @__PURE__ */ e(
|
|
548
548
|
Te,
|
|
549
549
|
{
|
|
550
|
-
expected:
|
|
551
|
-
missed:
|
|
552
|
-
paid:
|
|
550
|
+
expected: d,
|
|
551
|
+
missed: h,
|
|
552
|
+
paid: b,
|
|
553
553
|
title: t.expenses,
|
|
554
554
|
total: u.length,
|
|
555
555
|
upcoming: K
|
|
@@ -569,50 +569,50 @@ const Y = {
|
|
|
569
569
|
r && /* @__PURE__ */ e(
|
|
570
570
|
P,
|
|
571
571
|
{
|
|
572
|
-
onRecurrenceClick:
|
|
573
|
-
recurrences:
|
|
572
|
+
onRecurrenceClick: me,
|
|
573
|
+
recurrences: ue,
|
|
574
574
|
title: t.upcoming_activity
|
|
575
575
|
}
|
|
576
576
|
)
|
|
577
577
|
] }),
|
|
578
|
-
!r && /* @__PURE__ */ s(
|
|
578
|
+
!r && /* @__PURE__ */ s(l, { sx: { px: i ? 0 : 24 }, children: [
|
|
579
579
|
/* @__PURE__ */ s(Fe, { onChange: ke, value: V, variant: "fullWidth", children: [
|
|
580
580
|
/* @__PURE__ */ e(
|
|
581
|
-
|
|
581
|
+
he,
|
|
582
582
|
{
|
|
583
|
-
label: /* @__PURE__ */ e(
|
|
583
|
+
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.upcoming : t.upcoming_activity })
|
|
584
584
|
}
|
|
585
585
|
),
|
|
586
586
|
/* @__PURE__ */ e(
|
|
587
|
-
|
|
587
|
+
he,
|
|
588
588
|
{
|
|
589
|
-
label: /* @__PURE__ */ e(
|
|
589
|
+
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.past : t.past_transactions })
|
|
590
590
|
}
|
|
591
591
|
)
|
|
592
592
|
] }),
|
|
593
593
|
V === 0 && /* @__PURE__ */ e(
|
|
594
594
|
P,
|
|
595
595
|
{
|
|
596
|
-
onRecurrenceClick:
|
|
597
|
-
recurrences:
|
|
596
|
+
onRecurrenceClick: me,
|
|
597
|
+
recurrences: ue
|
|
598
598
|
}
|
|
599
599
|
),
|
|
600
600
|
V === 1 && /* @__PURE__ */ e(
|
|
601
601
|
P,
|
|
602
602
|
{
|
|
603
|
-
onRecurrenceClick:
|
|
604
|
-
recurrences:
|
|
603
|
+
onRecurrenceClick: pe,
|
|
604
|
+
recurrences: R
|
|
605
605
|
}
|
|
606
606
|
)
|
|
607
607
|
] })
|
|
608
608
|
] }),
|
|
609
|
-
r && /* @__PURE__ */ e(q, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ s(
|
|
609
|
+
r && /* @__PURE__ */ e(q, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ s(l, { gap: 24, children: [
|
|
610
610
|
/* @__PURE__ */ e(Ae, {}),
|
|
611
611
|
/* @__PURE__ */ e(
|
|
612
612
|
P,
|
|
613
613
|
{
|
|
614
|
-
onRecurrenceClick:
|
|
615
|
-
recurrences: f ||
|
|
614
|
+
onRecurrenceClick: pe,
|
|
615
|
+
recurrences: f || R,
|
|
616
616
|
title: M ? N(
|
|
617
617
|
t.day_transactions,
|
|
618
618
|
S(M, w.MONTH_DAY)
|
|
@@ -623,54 +623,52 @@ const Y = {
|
|
|
623
623
|
]
|
|
624
624
|
}
|
|
625
625
|
);
|
|
626
|
-
}), Pn =
|
|
627
|
-
const { recurring:
|
|
628
|
-
return
|
|
626
|
+
}), Pn = y(({ onBackClick: t }) => {
|
|
627
|
+
const { recurring: n } = C(), { isInitialized: r, selectedAccountGuids: o } = z(), { isDataLoaded: i, loadRepeatingTransactionData: c, setDateRange: u } = I(), { setFilter: p } = re(), { onEvent: a } = U(), [d, m] = x.useState(!1);
|
|
628
|
+
return oe({
|
|
629
629
|
widgetName: "RecurringTransactionsWidget",
|
|
630
|
-
isLoaded:
|
|
630
|
+
isLoaded: i
|
|
631
631
|
}), x.useEffect(() => {
|
|
632
|
-
|
|
632
|
+
i || c().finally();
|
|
633
633
|
}, []), x.useEffect(() => {
|
|
634
|
-
|
|
634
|
+
p({
|
|
635
635
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
636
|
-
accounts:
|
|
637
|
-
}),
|
|
638
|
-
}, [
|
|
636
|
+
accounts: o
|
|
637
|
+
}), u({ start: k(/* @__PURE__ */ new Date()), end: H(/* @__PURE__ */ new Date()) });
|
|
638
|
+
}, [o]), r ? /* @__PURE__ */ s(
|
|
639
639
|
ht,
|
|
640
640
|
{
|
|
641
641
|
actions: [
|
|
642
642
|
{
|
|
643
|
-
label:
|
|
643
|
+
label: n.action_title,
|
|
644
644
|
iconName: "credit_card_gear",
|
|
645
645
|
onClick: () => {
|
|
646
|
-
|
|
646
|
+
m(!0), a(L.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
],
|
|
650
|
-
|
|
651
|
-
onAccountsFilterClick: () => l(L.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
650
|
+
onAccountsFilterClick: () => a(L.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
652
651
|
onBackClick: t,
|
|
653
|
-
|
|
654
|
-
title: r.title,
|
|
652
|
+
title: n.title,
|
|
655
653
|
children: [
|
|
656
|
-
|
|
654
|
+
i ? /* @__PURE__ */ e(Dt, {}) : /* @__PURE__ */ e(ve, { sx: { m: 48 }, variant: "list" }),
|
|
657
655
|
/* @__PURE__ */ e(
|
|
658
656
|
ie,
|
|
659
657
|
{
|
|
660
|
-
ariaLabelClose:
|
|
661
|
-
isOpen:
|
|
662
|
-
onClose: () =>
|
|
658
|
+
ariaLabelClose: n.close_drawer_aria,
|
|
659
|
+
isOpen: d,
|
|
660
|
+
onClose: () => m(!1),
|
|
663
661
|
shouldShowHeaderBorders: !1,
|
|
664
|
-
title:
|
|
662
|
+
title: n.action_title,
|
|
665
663
|
children: /* @__PURE__ */ e(_e, {})
|
|
666
664
|
}
|
|
667
665
|
)
|
|
668
666
|
]
|
|
669
667
|
}
|
|
670
|
-
) : /* @__PURE__ */ e(
|
|
671
|
-
}), St =
|
|
672
|
-
const { recurring: t } =
|
|
673
|
-
return /* @__PURE__ */ s(
|
|
668
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
669
|
+
}), St = y(() => {
|
|
670
|
+
const { recurring: t } = C(), { availableWidth: n } = we(), { selectedDay: r, selectedDayRecurrences: o, setSelectedDay: i, upcomingRecurrences: c } = I(), u = n < 750;
|
|
671
|
+
return /* @__PURE__ */ s(l, { flexDirection: u ? "column" : "row", width: "100%", children: [
|
|
674
672
|
/* @__PURE__ */ e(Ae, {}),
|
|
675
673
|
!u && /* @__PURE__ */ e(X, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
676
674
|
/* @__PURE__ */ e(
|
|
@@ -687,10 +685,10 @@ const Y = {
|
|
|
687
685
|
}
|
|
688
686
|
)
|
|
689
687
|
] });
|
|
690
|
-
}), Hn =
|
|
688
|
+
}), Hn = y(
|
|
691
689
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
692
|
-
const { recurring: r } =
|
|
693
|
-
return
|
|
690
|
+
const { recurring: r } = C(), { setFilter: o } = re(), { isDataLoaded: i, loadRepeatingTransactionData: c } = I(), { isInitialized: u, selectedAccountGuids: p } = z();
|
|
691
|
+
return oe({
|
|
694
692
|
widgetName: "RecurringTransactionsMiniWidget",
|
|
695
693
|
isLoaded: i
|
|
696
694
|
}), x.useEffect(() => {
|
|
@@ -712,13 +710,13 @@ const Y = {
|
|
|
712
710
|
title: r.mini_title,
|
|
713
711
|
children: i ? /* @__PURE__ */ e(St, {}) : /* @__PURE__ */ e(ve, { sx: { mx: 16 }, variant: "list" })
|
|
714
712
|
}
|
|
715
|
-
) : /* @__PURE__ */ e(
|
|
713
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
716
714
|
}
|
|
717
|
-
), wt =
|
|
718
|
-
const { recurring: t } =
|
|
719
|
-
return /* @__PURE__ */ s(
|
|
715
|
+
), wt = y(() => {
|
|
716
|
+
const { recurring: t } = C();
|
|
717
|
+
return /* @__PURE__ */ s(l, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
720
718
|
/* @__PURE__ */ e(Ke, { size: 32 }),
|
|
721
|
-
/* @__PURE__ */ s(
|
|
719
|
+
/* @__PURE__ */ s(l, { children: [
|
|
722
720
|
/* @__PURE__ */ e(Z, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
723
721
|
/* @__PURE__ */ e(Z, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
724
722
|
] })
|
|
@@ -729,7 +727,7 @@ const Y = {
|
|
|
729
727
|
isLargeScreen: r,
|
|
730
728
|
isSmallScreen: o,
|
|
731
729
|
label: i
|
|
732
|
-
}) => /* @__PURE__ */ s(
|
|
730
|
+
}) => /* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
733
731
|
/* @__PURE__ */ e(
|
|
734
732
|
O,
|
|
735
733
|
{
|
|
@@ -741,9 +739,9 @@ const Y = {
|
|
|
741
739
|
}
|
|
742
740
|
}
|
|
743
741
|
),
|
|
744
|
-
/* @__PURE__ */ s(
|
|
745
|
-
!o && /* @__PURE__ */ e(
|
|
746
|
-
/* @__PURE__ */ e(
|
|
742
|
+
/* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
743
|
+
!o && /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: E(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
744
|
+
/* @__PURE__ */ e(g, { variant: "caption", children: i })
|
|
747
745
|
] })
|
|
748
746
|
] }), Mt = ({
|
|
749
747
|
upcomingRecurrences: t,
|
|
@@ -785,42 +783,42 @@ const Y = {
|
|
|
785
783
|
}, Lt = ({
|
|
786
784
|
upcomingRecurrences: t,
|
|
787
785
|
maxLogos: n = 3
|
|
788
|
-
}) => /* @__PURE__ */ e(
|
|
786
|
+
}) => /* @__PURE__ */ e(l, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, o) => /* @__PURE__ */ e(
|
|
789
787
|
te,
|
|
790
788
|
{
|
|
791
789
|
categoryGuid: r.categoryGuid || "",
|
|
792
790
|
merchantGuid: r.merchantGuid || ""
|
|
793
791
|
},
|
|
794
792
|
`${r.categoryGuid}-${r.merchantGuid}-${o}`
|
|
795
|
-
)) }), vt =
|
|
793
|
+
)) }), vt = y(() => {
|
|
796
794
|
const t = ne(), [n, { width: r }] = xt(), {
|
|
797
795
|
upcomingRecurrences: o,
|
|
798
796
|
expenseTotal: i,
|
|
799
797
|
missedExpenseTotal: c,
|
|
800
798
|
paidExpenseTotal: u,
|
|
801
799
|
upcomingExpenseTotal: p
|
|
802
|
-
} = I(), { recurring: a } =
|
|
803
|
-
const
|
|
800
|
+
} = I(), { recurring: a } = C(), d = r <= 288, m = r >= 450, h = 32, R = o.length > 0, b = x.useMemo(() => E(i, i === 0 ? "0,0" : "0,0.00"), [i]), v = x.useMemo(() => {
|
|
801
|
+
const D = [
|
|
804
802
|
{ color: t.palette.success.main, percentage: `${u / i}` }
|
|
805
803
|
];
|
|
806
|
-
return c &&
|
|
804
|
+
return c && D.push({
|
|
807
805
|
color: t.palette.error.main,
|
|
808
806
|
percentage: `${c / i}`
|
|
809
|
-
}),
|
|
807
|
+
}), D;
|
|
810
808
|
}, [
|
|
811
809
|
u,
|
|
812
810
|
i,
|
|
813
811
|
c,
|
|
814
812
|
t.palette.success.main,
|
|
815
813
|
t.palette.error.main
|
|
816
|
-
]), M = () =>
|
|
814
|
+
]), M = () => R ? d ? /* @__PURE__ */ e(
|
|
817
815
|
Mt,
|
|
818
816
|
{
|
|
819
|
-
logoSize:
|
|
817
|
+
logoSize: h,
|
|
820
818
|
maxLogos: 3,
|
|
821
819
|
upcomingRecurrences: o.slice(0, 3)
|
|
822
820
|
}
|
|
823
|
-
) : /* @__PURE__ */ e(Lt, { maxLogos: 3, upcomingRecurrences: o.slice(0, 3) }) : /* @__PURE__ */ e(
|
|
821
|
+
) : /* @__PURE__ */ e(Lt, { maxLogos: 3, upcomingRecurrences: o.slice(0, 3) }) : /* @__PURE__ */ e(l, { sx: { width: d ? 64 : 104 } }), f = [
|
|
824
822
|
{
|
|
825
823
|
amount: u,
|
|
826
824
|
bgColor: "success.main",
|
|
@@ -838,12 +836,12 @@ const Y = {
|
|
|
838
836
|
}
|
|
839
837
|
];
|
|
840
838
|
return /* @__PURE__ */ s(B, { children: [
|
|
841
|
-
/* @__PURE__ */ s(
|
|
839
|
+
/* @__PURE__ */ s(l, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
842
840
|
/* @__PURE__ */ s(
|
|
843
|
-
|
|
841
|
+
l,
|
|
844
842
|
{
|
|
845
843
|
sx: [
|
|
846
|
-
|
|
844
|
+
b.length >= 10 && d ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
847
845
|
{
|
|
848
846
|
alignItems: "baseline",
|
|
849
847
|
overflow: "hidden",
|
|
@@ -853,11 +851,11 @@ const Y = {
|
|
|
853
851
|
],
|
|
854
852
|
children: [
|
|
855
853
|
/* @__PURE__ */ e(
|
|
856
|
-
|
|
854
|
+
g,
|
|
857
855
|
{
|
|
858
856
|
sx: { width: "100%" },
|
|
859
|
-
variant:
|
|
860
|
-
children:
|
|
857
|
+
variant: b.length >= 10 && d ? "h3" : "h2",
|
|
858
|
+
children: b
|
|
861
859
|
}
|
|
862
860
|
),
|
|
863
861
|
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children: a.expected })
|
|
@@ -866,10 +864,10 @@ const Y = {
|
|
|
866
864
|
),
|
|
867
865
|
M()
|
|
868
866
|
] }),
|
|
869
|
-
/* @__PURE__ */ s(
|
|
870
|
-
/* @__PURE__ */ e(
|
|
867
|
+
/* @__PURE__ */ s(l, { sx: { pt: 12 }, children: [
|
|
868
|
+
/* @__PURE__ */ e(Me, { data: v }),
|
|
871
869
|
/* @__PURE__ */ e(
|
|
872
|
-
|
|
870
|
+
l,
|
|
873
871
|
{
|
|
874
872
|
sx: {
|
|
875
873
|
alignItems: "center",
|
|
@@ -877,14 +875,14 @@ const Y = {
|
|
|
877
875
|
gap: 16,
|
|
878
876
|
mt: 4
|
|
879
877
|
},
|
|
880
|
-
children: f.map((
|
|
878
|
+
children: f.map((D, K) => /* @__PURE__ */ e(
|
|
881
879
|
It,
|
|
882
880
|
{
|
|
883
|
-
amount:
|
|
884
|
-
bgcolor:
|
|
881
|
+
amount: D.amount,
|
|
882
|
+
bgcolor: D.bgColor,
|
|
885
883
|
isLargeScreen: m,
|
|
886
|
-
isSmallScreen:
|
|
887
|
-
label:
|
|
884
|
+
isSmallScreen: d,
|
|
885
|
+
label: D.label
|
|
888
886
|
},
|
|
889
887
|
`recurrence-legend-${K}`
|
|
890
888
|
))
|
|
@@ -892,7 +890,7 @@ const Y = {
|
|
|
892
890
|
)
|
|
893
891
|
] })
|
|
894
892
|
] });
|
|
895
|
-
}), $n =
|
|
893
|
+
}), $n = y(
|
|
896
894
|
({ onCTAClick: t }) => {
|
|
897
895
|
const { onEvent: n } = U(), { isInitialized: r, selectedAccountGuids: o } = z(), {
|
|
898
896
|
loadRepeatingTransactionData: i,
|
|
@@ -900,8 +898,8 @@ const Y = {
|
|
|
900
898
|
repeatingTransactions: u,
|
|
901
899
|
setDateRange: p,
|
|
902
900
|
isDataLoaded: a
|
|
903
|
-
} = I(), { setFilter:
|
|
904
|
-
|
|
901
|
+
} = I(), { setFilter: d } = re(), { recurring: m, budgets: h } = C();
|
|
902
|
+
oe({
|
|
905
903
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
906
904
|
isLoaded: a
|
|
907
905
|
}), x.useEffect(() => {
|
|
@@ -911,32 +909,32 @@ const Y = {
|
|
|
911
909
|
});
|
|
912
910
|
});
|
|
913
911
|
}, []), x.useEffect(() => {
|
|
914
|
-
r && (
|
|
912
|
+
r && (d({
|
|
915
913
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
916
914
|
accounts: o
|
|
917
915
|
}), p({ start: k(/* @__PURE__ */ new Date()), end: H(/* @__PURE__ */ new Date()) }));
|
|
918
916
|
}, [r, o]);
|
|
919
|
-
const
|
|
917
|
+
const R = () => {
|
|
920
918
|
n(
|
|
921
919
|
c.length > 0 ? L.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : L.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
922
920
|
), t();
|
|
923
921
|
};
|
|
924
|
-
if (!r || !a) return /* @__PURE__ */ e(
|
|
925
|
-
const
|
|
922
|
+
if (!r || !a) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
923
|
+
const b = !u?.length;
|
|
926
924
|
return /* @__PURE__ */ e(
|
|
927
925
|
bt,
|
|
928
926
|
{
|
|
929
927
|
className: "mx-recurring-transaction-microwidget",
|
|
930
|
-
ctaLabel:
|
|
931
|
-
onCTAClick:
|
|
928
|
+
ctaLabel: b ? h.get_started_cta : m.primary_cta,
|
|
929
|
+
onCTAClick: R,
|
|
932
930
|
title: m.recurring_expenses,
|
|
933
|
-
children:
|
|
931
|
+
children: b ? /* @__PURE__ */ e(wt, {}) : /* @__PURE__ */ e(vt, {})
|
|
934
932
|
}
|
|
935
933
|
);
|
|
936
934
|
}
|
|
937
|
-
), Bn =
|
|
935
|
+
), Bn = y(
|
|
938
936
|
({ isOpen: t, onClose: n, selectedTab: r }) => {
|
|
939
|
-
const { cashflow: o } =
|
|
937
|
+
const { cashflow: o } = C();
|
|
940
938
|
return /* @__PURE__ */ e(
|
|
941
939
|
ie,
|
|
942
940
|
{
|