@mx-cartographer/experiences 7.0.0-alpha.mega1 → 7.0.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 +17 -0
- package/dist/{Account-DY6nxO7y.mjs → Account-BFol-JYA.mjs} +1 -1
- package/dist/{AccountDetailsContent-DvPs81kL.mjs → AccountDetailsContent-Do3z1FnQ.mjs} +8 -8
- package/dist/{AccountDetailsHeader-W2U7ZVm_.mjs → AccountDetailsHeader-DnEyQMpX.mjs} +12 -12
- package/dist/{AccountFields-DAVcbZy5.mjs → AccountFields-CeHZrIQe.mjs} +2 -2
- package/dist/{AccountListItem-DFlbdcmT.mjs → AccountListItem-C7JzYpqf.mjs} +3 -3
- package/dist/{AccountStore-CU7qV3vg.mjs → AccountStore-Cu3GoLh-.mjs} +1 -1
- package/dist/{Accounts-BLlrQA5m.mjs → Accounts-BuYXUMhP.mjs} +1 -1
- package/dist/{BudgetUtil-Ci1TN0J5.mjs → BudgetUtil-spowPvBM.mjs} +2 -2
- package/dist/{Category-5S6uwuXz.mjs → Category-CevNQ03n.mjs} +4 -4
- package/dist/{CategorySelectorDrawer-rHyHHYuh.mjs → CategorySelectorDrawer-Dyzb3UDU.mjs} +1 -1
- package/dist/{CategoryStore-B5EW6I1d.mjs → CategoryStore-BOyzQjQp.mjs} +2 -2
- package/dist/{CategoryUtil-DRyruNgi.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
- package/dist/{ConnectDrawer-D9cR5phc.mjs → ConnectDrawer-WfKHsHSF.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BzGqljSp.mjs → ConnectionsDrawer-Czp-E0-m.mjs} +2 -2
- package/dist/{CurrencyInput-D74cemI2.mjs → CurrencyInput-CSZjO22Z.mjs} +1 -1
- package/dist/{DebtsStore-S0l9kr0r.mjs → DebtsStore-D9holN8L.mjs} +1 -1
- package/dist/ExportCsvAction-dpvaZxbS.mjs +24 -0
- package/dist/{GoalStore-DioeeL-s.mjs → GoalStore-Drf76ell.mjs} +4 -4
- package/dist/{Help-DpYRO8oA.mjs → Help-DRUwVDvo.mjs} +1 -1
- package/dist/{LineChart-CcyX38kK.mjs → LineChart-CYiUS-px.mjs} +88 -85
- package/dist/{ListItemAction-BabpYivr.mjs → ListItemAction-BzmbPuNp.mjs} +1 -1
- package/dist/{ManageIncome-ndMuhJMG.mjs → ManageIncome-B6kmMN_z.mjs} +178 -186
- package/dist/{MicroWidgetContainer-CsvHLYKX.mjs → MicroWidgetContainer-DmYiksbT.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BoOp-A05.mjs → MiniWidgetContainer-DqKQNubH.mjs} +1 -1
- package/dist/{NetWorthStore-PD-RUe09.mjs → NetWorthStore-BK1_NbXW.mjs} +2 -2
- package/dist/{Notification-AMGWM1Al.mjs → Notification-ByMBpJ5u.mjs} +33 -22
- package/dist/{NotificationSettings-VhHuMAFU.mjs → NotificationSettings-BznqGVQ2.mjs} +35 -34
- package/dist/{OriginalBalanceAction-D39mx6uE.mjs → OriginalBalanceAction-CSu5brQE.mjs} +3 -3
- package/dist/RecurringSettings-Be1dzkMz.mjs +57 -0
- package/dist/ResponsiveButton-DZFp78fJ.mjs +45 -0
- package/dist/{SettingsStore-CE7jDVFL.mjs → SettingsStore-B4gi6oOw.mjs} +1 -1
- package/dist/{SpendingData-BkrxzHdr.mjs → SpendingData-D5vsfYKo.mjs} +5 -5
- package/dist/{Transaction-CA0FW2Ij.mjs → Transaction-CyqrHmAA.mjs} +1 -1
- package/dist/{TransactionDetails-WBHFmbxL.mjs → TransactionDetails-D4B9DSWo.mjs} +421 -417
- package/dist/{TransactionStore-CeLdmVnC.mjs → TransactionStore-DSyXtPek.mjs} +8 -8
- package/dist/TrendsStore-DR8etTL2.mjs +547 -0
- package/dist/{ViewMoreMicroCard-CAPFNz-J.mjs → ViewMoreMicroCard-BZI5VMNW.mjs} +476 -468
- package/dist/{WidgetContainer-DWCusxYI.mjs → WidgetContainer-BG-fdDOf.mjs} +110 -104
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/components/listitems/ToggleButtonListItem.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +16 -10
- package/dist/common/index.es.js +432 -469
- package/dist/dashboard/index.es.js +13 -13
- package/dist/debts/index.es.js +66 -66
- package/dist/{exportTransactionsToCSV-CmwsKl2D.mjs → exportTransactionsToCSV-BlVifaOG.mjs} +2 -2
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +32 -32
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-30y_BLwc.mjs → hooks-02T565vf.mjs} +10 -10
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +1 -0
- package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +1 -0
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +9 -9
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +25 -25
- package/dist/spending/index.es.js +13 -13
- package/dist/transactions/components/shared/TransactionList.d.ts +2 -0
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +5 -1
- package/dist/transactions/index.d.ts +1 -0
- package/dist/transactions/index.es.js +143 -141
- package/dist/trends/constants/TrendsWidget.d.ts +3 -0
- package/dist/trends/index.es.js +576 -635
- package/package.json +1 -1
- package/dist/RecurringSettings-D_HnMYZP.mjs +0 -57
- package/dist/TrendsStore-BHJUapXF.mjs +0 -487
- package/dist/index.d.ts +0 -0
- package/dist/trends/components/TransactionsList.d.ts +0 -7
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
1
|
+
import { jsxs as i, jsx as e, Fragment as F } from "react/jsx-runtime";
|
2
|
+
import u from "react";
|
3
3
|
import { observer as D } from "mobx-react-lite";
|
4
4
|
import O from "@mui/material/Divider";
|
5
5
|
import j from "@mui/material/List";
|
@@ -8,52 +8,52 @@ import oe from "@mui/material/ListItemAvatar";
|
|
8
8
|
import Q from "@mui/material/ListItemButton";
|
9
9
|
import $ from "@mui/material/ListItemText";
|
10
10
|
import y from "@mui/material/Stack";
|
11
|
-
import { MerchantLogo as H, Text as
|
12
|
-
import { F as
|
11
|
+
import { MerchantLogo as H, Text as w, H1 as ae, InstitutionLogo as ie, P as se, Icon as z } from "@mxenabled/mxui";
|
12
|
+
import { F as s, S as T, D as G, g as J, R as A, e as ce } from "./RepeatingTransaction-BPWfaB3f.mjs";
|
13
13
|
import { subDays as le } from "date-fns/subDays";
|
14
14
|
import { startOfToday as P } from "date-fns/startOfToday";
|
15
15
|
import { endOfMonth as de } from "date-fns/endOfMonth";
|
16
16
|
import ue from "@mui/material/Button";
|
17
17
|
import { Delete as _e } from "@mxenabled/mx-icons";
|
18
|
-
import { T as X, a as me, u as ye, S as
|
18
|
+
import { T as X, a as me, u as ye, S as he, b as pe } from "./TransactionDetails-D4B9DSWo.mjs";
|
19
19
|
import { getDayOfYear as fe } from "date-fns/getDayOfYear";
|
20
20
|
import { setDayOfYear as ge } from "date-fns/setDayOfYear";
|
21
21
|
import { AdapterDateFns as Ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
22
22
|
import { DatePicker as be } from "@mui/x-date-pickers";
|
23
|
-
import { LocalizationProvider as
|
24
|
-
import { u as x,
|
23
|
+
import { LocalizationProvider as ve } from "@mui/x-date-pickers/LocalizationProvider";
|
24
|
+
import { u as x, h as N, e as q, a as we, f as Z, o as Se } from "./hooks-02T565vf.mjs";
|
25
25
|
import { b as xe, f as V } from "./NumberFormatting-CtWHhyBX.mjs";
|
26
26
|
import { D as L } from "./Drawer-kEE73B87.mjs";
|
27
|
-
import { A as k } from "./WidgetContainer-
|
27
|
+
import { A as k } from "./WidgetContainer-BG-fdDOf.mjs";
|
28
28
|
import { f as De, D as Ee, a as Ie } from "./Dialog-CWW597AF.mjs";
|
29
29
|
import { formatISO as Ae } from "date-fns/formatISO";
|
30
30
|
import { fromUnixTime as Oe } from "date-fns/fromUnixTime";
|
31
31
|
import Le from "@mui/material/Box";
|
32
32
|
import { S as Re } from "./SearchBox-B2_zLv8-.mjs";
|
33
33
|
import { h as Te } from "./DateUtil-BcuH7ErC.mjs";
|
34
|
-
import {
|
35
|
-
import { T as ee } from "./Transaction-
|
34
|
+
import { b as B } from "./Category-CevNQ03n.mjs";
|
35
|
+
import { T as ee } from "./Transaction-CyqrHmAA.mjs";
|
36
36
|
const te = ({
|
37
37
|
frequency: t,
|
38
38
|
firstDay: n,
|
39
39
|
secondDay: o,
|
40
|
-
onFrequencyChange:
|
41
|
-
onFirstDayChange:
|
42
|
-
onSecondDayChange:
|
40
|
+
onFrequencyChange: c,
|
41
|
+
onFirstDayChange: a,
|
42
|
+
onSecondDayChange: l
|
43
43
|
}) => {
|
44
|
-
const { recurring: r } = x(),
|
44
|
+
const { recurring: r } = x(), d = u.useMemo(
|
45
45
|
() => [
|
46
|
-
{ id:
|
47
|
-
{ id:
|
48
|
-
{ id:
|
49
|
-
{ id:
|
50
|
-
{ id:
|
51
|
-
{ id:
|
52
|
-
{ id:
|
53
|
-
{ id:
|
46
|
+
{ id: s.EveryWeek, label: r.frequency_every_week },
|
47
|
+
{ id: s.EveryOtherWeek, label: r.frequency_every_other_week },
|
48
|
+
{ id: s.TwiceAMonth, label: r.frequency_twice_a_month },
|
49
|
+
{ id: s.EveryMonth, label: r.frequency_every_month },
|
50
|
+
{ id: s.EveryOtherMonth, label: r.frequency_every_other_month },
|
51
|
+
{ id: s.EveryQuarter, label: r.frequency_every_quarter },
|
52
|
+
{ id: s.EveryOtherQuarter, label: r.frequency_every_other_quarter },
|
53
|
+
{ id: s.EveryYear, label: r.frequency_every_year }
|
54
54
|
],
|
55
55
|
[r]
|
56
|
-
),
|
56
|
+
), h = [
|
57
57
|
{ id: 0, label: r.weekday_sunday },
|
58
58
|
{ id: 1, label: r.weekday_monday },
|
59
59
|
{ id: 2, label: r.weekday_tuesday },
|
@@ -61,21 +61,21 @@ const te = ({
|
|
61
61
|
{ id: 4, label: r.weekday_thursday },
|
62
62
|
{ id: 5, label: r.weekday_friday },
|
63
63
|
{ id: 6, label: r.weekday_saturday }
|
64
|
-
],
|
64
|
+
], p = [...Array(31).keys()].map((m) => ({
|
65
65
|
id: m + 1,
|
66
66
|
label: xe(m + 1)
|
67
67
|
}));
|
68
|
-
|
69
|
-
const C =
|
70
|
-
m &&
|
68
|
+
p[30].label += ` (${r.last_day_of_month})`;
|
69
|
+
const C = p.slice(0, 15), S = p.slice(14), b = t === s.EveryWeek || t === s.EveryOtherWeek, f = t === s.TwiceAMonth || t === s.EveryMonth || t === s.EveryOtherMonth || t === s.EveryQuarter || t === s.EveryOtherQuarter, E = ge(P(), n), g = (m) => {
|
70
|
+
m && a(fe(m));
|
71
71
|
};
|
72
|
-
return /* @__PURE__ */
|
72
|
+
return /* @__PURE__ */ i(y, { gap: 24, sx: { m: 24 }, children: [
|
73
73
|
/* @__PURE__ */ e(
|
74
74
|
T,
|
75
75
|
{
|
76
76
|
label: r.frequency,
|
77
|
-
onChange:
|
78
|
-
options:
|
77
|
+
onChange: c,
|
78
|
+
options: d,
|
79
79
|
value: t
|
80
80
|
}
|
81
81
|
),
|
@@ -83,30 +83,30 @@ const te = ({
|
|
83
83
|
T,
|
84
84
|
{
|
85
85
|
label: r.day_of_the_week,
|
86
|
-
onChange:
|
87
|
-
options:
|
86
|
+
onChange: a,
|
87
|
+
options: h,
|
88
88
|
value: n
|
89
89
|
}
|
90
90
|
),
|
91
91
|
f && /* @__PURE__ */ e(
|
92
92
|
T,
|
93
93
|
{
|
94
|
-
label: t ===
|
95
|
-
onChange:
|
96
|
-
options: t ===
|
94
|
+
label: t === s.TwiceAMonth ? r.first_day_of_the_month : r.day_of_the_month,
|
95
|
+
onChange: a,
|
96
|
+
options: t === s.TwiceAMonth ? C : p,
|
97
97
|
value: n
|
98
98
|
}
|
99
99
|
),
|
100
|
-
t ===
|
100
|
+
t === s.TwiceAMonth && /* @__PURE__ */ e(
|
101
101
|
T,
|
102
102
|
{
|
103
103
|
label: r.second_day_of_the_month,
|
104
|
-
onChange:
|
104
|
+
onChange: l,
|
105
105
|
options: S,
|
106
106
|
value: o || 0
|
107
107
|
}
|
108
108
|
),
|
109
|
-
t ===
|
109
|
+
t === s.EveryYear && /* @__PURE__ */ e(ve, { dateAdapter: Ce, children: /* @__PURE__ */ e(
|
110
110
|
be,
|
111
111
|
{
|
112
112
|
disablePast: !0,
|
@@ -117,17 +117,17 @@ const te = ({
|
|
117
117
|
) })
|
118
118
|
] });
|
119
119
|
}, ke = D(({ repeatingTransaction: t }) => {
|
120
|
-
const { recurring: n } = x(), { updateRepeatingTransaction: o } = N(), { onEvent:
|
120
|
+
const { recurring: n } = x(), { updateRepeatingTransaction: o } = N(), { onEvent: c } = q(), [a, l] = u.useState(!1), [r, d] = u.useState(t.recurrence_type), [h, p] = u.useState(t.recurrence_day), [C, S] = u.useState(t.second_recurrence_day), b = async () => {
|
121
121
|
await o({
|
122
122
|
...t,
|
123
123
|
recurrence_type: r,
|
124
|
-
recurrence_day:
|
124
|
+
recurrence_day: h,
|
125
125
|
second_recurrence_day: C
|
126
|
-
}),
|
126
|
+
}), l(!1);
|
127
127
|
}, f = () => {
|
128
|
-
|
128
|
+
l(!0), c(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_PAYMENT_SCHEDULE);
|
129
129
|
};
|
130
|
-
return /* @__PURE__ */
|
130
|
+
return /* @__PURE__ */ i(F, { children: [
|
131
131
|
/* @__PURE__ */ e(
|
132
132
|
G,
|
133
133
|
{
|
@@ -141,17 +141,17 @@ const te = ({
|
|
141
141
|
L,
|
142
142
|
{
|
143
143
|
ariaLabelClose: n.close_drawer_aria,
|
144
|
-
isOpen:
|
145
|
-
onClose: () =>
|
144
|
+
isOpen: a,
|
145
|
+
onClose: () => l(!1),
|
146
146
|
onPrimaryAction: b,
|
147
147
|
title: n.payment_schedule,
|
148
148
|
children: /* @__PURE__ */ e(
|
149
149
|
te,
|
150
150
|
{
|
151
|
-
firstDay:
|
151
|
+
firstDay: h,
|
152
152
|
frequency: r,
|
153
|
-
onFirstDayChange:
|
154
|
-
onFrequencyChange:
|
153
|
+
onFirstDayChange: p,
|
154
|
+
onFrequencyChange: d,
|
155
155
|
onSecondDayChange: S,
|
156
156
|
secondDay: C
|
157
157
|
}
|
@@ -161,24 +161,24 @@ const te = ({
|
|
161
161
|
] });
|
162
162
|
}), Ne = D(
|
163
163
|
({ onDeleted: t, recurringTransaction: n }) => {
|
164
|
-
const { recurring: o } = x(), { selectedAccountGuids:
|
165
|
-
|
164
|
+
const { recurring: o } = x(), { selectedAccountGuids: c } = we(), { onEvent: a } = q(), { deleteRepeatingTransaction: l } = N(), { setFilter: r, transactions: d } = Z(), { amount: h, description: p, merchant_guid: C } = n, [S, b] = u.useState(!1), [f, E] = u.useState("");
|
165
|
+
u.useEffect(() => {
|
166
166
|
r({
|
167
|
-
accounts:
|
167
|
+
accounts: c,
|
168
168
|
dateRange: { start: le(P(), 90), end: de(P()) },
|
169
169
|
custom: (_) => _.repeating_transaction_guid === n.guid
|
170
170
|
});
|
171
171
|
}, [n]);
|
172
|
-
const g =
|
173
|
-
() =>
|
174
|
-
[f,
|
172
|
+
const g = u.useMemo(
|
173
|
+
() => d.find((_) => _.guid === f),
|
174
|
+
[f, d]
|
175
175
|
), m = n.repeating_transaction_type === A.Income, R = async () => {
|
176
|
-
await
|
176
|
+
await l(n.guid), t();
|
177
177
|
}, M = () => {
|
178
|
-
b(!0),
|
178
|
+
b(!0), a(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
|
179
179
|
};
|
180
|
-
return /* @__PURE__ */
|
181
|
-
/* @__PURE__ */
|
180
|
+
return /* @__PURE__ */ i(y, { bgcolor: "background.default", direction: "column", height: "100%", children: [
|
181
|
+
/* @__PURE__ */ i(y, { direction: "column", m: 24, children: [
|
182
182
|
/* @__PURE__ */ e(
|
183
183
|
H,
|
184
184
|
{
|
@@ -188,18 +188,18 @@ const te = ({
|
|
188
188
|
sx: { mb: 12 }
|
189
189
|
}
|
190
190
|
),
|
191
|
-
/* @__PURE__ */ e(
|
192
|
-
/* @__PURE__ */
|
191
|
+
/* @__PURE__ */ e(w, { bold: !0, variant: "body1", children: p }),
|
192
|
+
/* @__PURE__ */ i(ae, { color: m ? "success.main" : "text.primary", sx: { my: 4 }, children: [
|
193
193
|
m ? "+" : "",
|
194
|
-
V(
|
194
|
+
V(h, "0,0.00")
|
195
195
|
] }),
|
196
|
-
/* @__PURE__ */ e(
|
196
|
+
/* @__PURE__ */ e(w, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${De(
|
197
197
|
n.predicted_occurs_on,
|
198
198
|
Ee.MONTH_DAY_YEAR
|
199
199
|
)}` })
|
200
200
|
] }),
|
201
|
-
/* @__PURE__ */
|
202
|
-
n.account && /* @__PURE__ */
|
201
|
+
/* @__PURE__ */ i(j, { sx: { bgcolor: "background.paper" }, children: [
|
202
|
+
n.account && /* @__PURE__ */ i(F, { children: [
|
203
203
|
/* @__PURE__ */ e(
|
204
204
|
G,
|
205
205
|
{
|
@@ -210,7 +210,7 @@ const te = ({
|
|
210
210
|
),
|
211
211
|
/* @__PURE__ */ e(O, { variant: "inset" })
|
212
212
|
] }),
|
213
|
-
g?.category && /* @__PURE__ */
|
213
|
+
g?.category && /* @__PURE__ */ i(F, { children: [
|
214
214
|
/* @__PURE__ */ e(
|
215
215
|
G,
|
216
216
|
{
|
@@ -235,7 +235,7 @@ const te = ({
|
|
235
235
|
children: m ? o.delete_income_title : o.delete_expense_title
|
236
236
|
}
|
237
237
|
),
|
238
|
-
/* @__PURE__ */ e(
|
238
|
+
/* @__PURE__ */ e(w, { bold: !0, sx: { ml: 24, mt: 16 }, variant: "Body", children: o.paid_transactions }),
|
239
239
|
/* @__PURE__ */ e(X, { height: "30dvh", onClick: E }),
|
240
240
|
/* @__PURE__ */ e(
|
241
241
|
L,
|
@@ -257,7 +257,7 @@ const te = ({
|
|
257
257
|
isOpen: S,
|
258
258
|
onClose: () => b(!1),
|
259
259
|
onPrimaryAction: R,
|
260
|
-
children: /* @__PURE__ */ e(
|
260
|
+
children: /* @__PURE__ */ e(w, { children: m ? o.delete_income_description : o.delete_expense_description })
|
261
261
|
}
|
262
262
|
)
|
263
263
|
] });
|
@@ -265,85 +265,77 @@ const te = ({
|
|
265
265
|
), Me = D(
|
266
266
|
({ onClick: t = () => {
|
267
267
|
}, repeatingTransaction: n }) => {
|
268
|
-
const { recurring: o } = x(), [
|
268
|
+
const { recurring: o } = x(), [c, a] = u.useState(!1), l = u.useMemo(
|
269
269
|
() => n.transactions.length === 0 ? "" : n.transactions[0].category_guid || "",
|
270
270
|
[n]
|
271
|
-
), r = n.account?.institutionName || "",
|
272
|
-
return /* @__PURE__ */
|
273
|
-
/* @__PURE__ */
|
274
|
-
t(n),
|
271
|
+
), r = n.account?.institutionName || "", d = n.repeating_transaction_type === A.Income, h = J(o, n, !0);
|
272
|
+
return /* @__PURE__ */ i(K, { disableGutters: !0, disablePadding: !0, children: [
|
273
|
+
/* @__PURE__ */ i(Q, { onClick: () => {
|
274
|
+
t(n), a(!0);
|
275
275
|
}, children: [
|
276
276
|
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
277
277
|
H,
|
278
278
|
{
|
279
|
-
categoryGuid:
|
279
|
+
categoryGuid: l,
|
280
280
|
merchantGuid: n.merchant_guid
|
281
281
|
}
|
282
282
|
) }),
|
283
|
-
/* @__PURE__ */ e($, { children: /* @__PURE__ */
|
284
|
-
y,
|
285
|
-
|
286
|
-
direction: "row",
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
},
|
328
|
-
children: /* @__PURE__ */ e(v, { bold: !0, color: "text.secondary", variant: "caption", children: p })
|
329
|
-
}
|
330
|
-
)
|
331
|
-
] })
|
332
|
-
]
|
333
|
-
}
|
334
|
-
) })
|
283
|
+
/* @__PURE__ */ e($, { children: /* @__PURE__ */ i(y, { direction: "row", gap: 4, sx: { justifyContent: "space-between" }, children: [
|
284
|
+
/* @__PURE__ */ i(y, { direction: "column", sx: { width: "50%" }, children: [
|
285
|
+
/* @__PURE__ */ e(w, { bold: !0, variant: "body1", children: n.description }),
|
286
|
+
/* @__PURE__ */ i(y, { alignItems: "center", direction: "row", gap: 6, children: [
|
287
|
+
n.account?.institution_guid && /* @__PURE__ */ e(
|
288
|
+
ie,
|
289
|
+
{
|
290
|
+
alt: r,
|
291
|
+
institutionGuid: n.account?.institution_guid,
|
292
|
+
size: 12
|
293
|
+
}
|
294
|
+
),
|
295
|
+
/* @__PURE__ */ e(w, { variant: "caption", children: r })
|
296
|
+
] })
|
297
|
+
] }),
|
298
|
+
/* @__PURE__ */ i(y, { alignItems: "flex-end", sx: { width: "50%" }, children: [
|
299
|
+
/* @__PURE__ */ i(
|
300
|
+
w,
|
301
|
+
{
|
302
|
+
bold: !0,
|
303
|
+
color: d ? "success.main" : "text.primary",
|
304
|
+
variant: "body1",
|
305
|
+
children: [
|
306
|
+
d ? "+" : "",
|
307
|
+
V(n.amount, "0,0.00")
|
308
|
+
]
|
309
|
+
}
|
310
|
+
),
|
311
|
+
/* @__PURE__ */ e(
|
312
|
+
y,
|
313
|
+
{
|
314
|
+
direction: "row",
|
315
|
+
sx: {
|
316
|
+
alignItems: "center",
|
317
|
+
gap: 6,
|
318
|
+
justifyContent: "flex-end",
|
319
|
+
textTransform: "uppercase",
|
320
|
+
width: "100%"
|
321
|
+
},
|
322
|
+
children: /* @__PURE__ */ e(w, { bold: !0, color: "text.secondary", variant: "caption", children: h })
|
323
|
+
}
|
324
|
+
)
|
325
|
+
] })
|
326
|
+
] }) })
|
335
327
|
] }),
|
336
328
|
/* @__PURE__ */ e(
|
337
329
|
L,
|
338
330
|
{
|
339
331
|
ariaLabelClose: o.close_drawer_aria,
|
340
|
-
isOpen:
|
341
|
-
onClose: () =>
|
332
|
+
isOpen: c,
|
333
|
+
onClose: () => a(!1),
|
342
334
|
title: n.repeating_transaction_type === A.Income ? o.income_details : o.expense_details,
|
343
335
|
children: /* @__PURE__ */ e(
|
344
336
|
Ne,
|
345
337
|
{
|
346
|
-
onDeleted: () =>
|
338
|
+
onDeleted: () => a(!1),
|
347
339
|
recurringTransaction: n
|
348
340
|
}
|
349
341
|
)
|
@@ -356,24 +348,24 @@ const te = ({
|
|
356
348
|
bgcolor: t = "background.default",
|
357
349
|
description: n,
|
358
350
|
onSearch: o,
|
359
|
-
onSelected:
|
351
|
+
onSelected: c
|
360
352
|
}) => {
|
361
|
-
const { recurring:
|
362
|
-
return /* @__PURE__ */
|
353
|
+
const { recurring: a } = x(), { searchValue: l, setSearchValue: r } = ye();
|
354
|
+
return /* @__PURE__ */ i(y, { sx: { bgcolor: t, gap: 16, pt: 8 }, children: [
|
363
355
|
n && /* @__PURE__ */ e(se, { sx: { mx: 24 }, children: n }),
|
364
356
|
/* @__PURE__ */ e(
|
365
357
|
Re,
|
366
358
|
{
|
367
|
-
ariaLabel:
|
368
|
-
cancelAriaLabel:
|
369
|
-
onChange: (
|
370
|
-
r(
|
359
|
+
ariaLabel: a.select_transaction_search_aria,
|
360
|
+
cancelAriaLabel: a.select_transaction_search_cancel_aria,
|
361
|
+
onChange: (d) => {
|
362
|
+
r(d), o(d);
|
371
363
|
},
|
372
|
-
placeholder:
|
373
|
-
searchValue:
|
364
|
+
placeholder: a.select_transaction_search_placeholder,
|
365
|
+
searchValue: l
|
374
366
|
}
|
375
367
|
),
|
376
|
-
/* @__PURE__ */ e(X, { bgcolor: t, height: "auto", onClick:
|
368
|
+
/* @__PURE__ */ e(X, { bgcolor: t, height: "auto", onClick: c, showLoader: !1 })
|
377
369
|
] });
|
378
370
|
}
|
379
371
|
), Ge = D(
|
@@ -381,26 +373,26 @@ const te = ({
|
|
381
373
|
bgcolor: t = "background.default",
|
382
374
|
firstDay: n,
|
383
375
|
secondDay: o,
|
384
|
-
frequency:
|
385
|
-
onFrequencyChange:
|
386
|
-
onFirstDayChange:
|
376
|
+
frequency: c,
|
377
|
+
onFrequencyChange: a,
|
378
|
+
onFirstDayChange: l,
|
387
379
|
onSecondDayChange: r,
|
388
|
-
transaction:
|
380
|
+
transaction: d
|
389
381
|
}) => {
|
390
|
-
const { recurring:
|
391
|
-
return /* @__PURE__ */
|
392
|
-
/* @__PURE__ */
|
393
|
-
/* @__PURE__ */ e(
|
394
|
-
/* @__PURE__ */ e(
|
382
|
+
const { recurring: h } = x();
|
383
|
+
return /* @__PURE__ */ i(y, { bgcolor: t, gap: 24, height: "100%", children: [
|
384
|
+
/* @__PURE__ */ i(y, { children: [
|
385
|
+
/* @__PURE__ */ e(he, { bgcolor: t, children: Te(d.date) }),
|
386
|
+
/* @__PURE__ */ e(pe, { transaction: d })
|
395
387
|
] }),
|
396
|
-
/* @__PURE__ */ e(
|
388
|
+
/* @__PURE__ */ e(w, { bold: !0, sx: { mx: 24 }, variant: "Body", children: h.payment_schedule }),
|
397
389
|
/* @__PURE__ */ e(
|
398
390
|
te,
|
399
391
|
{
|
400
392
|
firstDay: n,
|
401
|
-
frequency:
|
402
|
-
onFirstDayChange:
|
403
|
-
onFrequencyChange:
|
393
|
+
frequency: c,
|
394
|
+
onFirstDayChange: l,
|
395
|
+
onFrequencyChange: a,
|
404
396
|
onSecondDayChange: r,
|
405
397
|
secondDay: o
|
406
398
|
}
|
@@ -413,41 +405,41 @@ const te = ({
|
|
413
405
|
label: n,
|
414
406
|
onAddRecurringTransaction: o = () => null
|
415
407
|
}) => {
|
416
|
-
const { recurring:
|
417
|
-
() => r.find((
|
408
|
+
const { recurring: c } = x(), { filter: a, setFilter: l, transactions: r } = Z(), { addRepeatingTransaction: d } = N(), { user: h } = Se(), [p, C] = u.useState(!1), [S, b] = u.useState(""), [f, E] = u.useState(s.EveryMonth), [g, m] = u.useState(1), [R, M] = u.useState(15), _ = u.useMemo(
|
409
|
+
() => r.find((v) => v.guid === S),
|
418
410
|
[S, r]
|
419
411
|
), ne = () => {
|
420
|
-
C(!0),
|
412
|
+
C(!0), l(t ? { ...a, custom: U } : { ...a, custom: Y });
|
421
413
|
}, re = async () => {
|
422
414
|
if (!_) {
|
423
415
|
W();
|
424
416
|
return;
|
425
417
|
}
|
426
418
|
o();
|
427
|
-
const
|
419
|
+
const v = ce(f, Oe(_.date)), I = {
|
428
420
|
account_guid: _.account_guid,
|
429
421
|
amount: _.amount,
|
430
422
|
created_by: 0,
|
431
423
|
// User
|
432
424
|
merchant_guid: _.merchant_guid,
|
433
425
|
description: _.payee || _.description || _.feed_description,
|
434
|
-
predicted_occurs_on: Ae(
|
426
|
+
predicted_occurs_on: Ae(v, { representation: "date" }),
|
435
427
|
recurrence_day: g,
|
436
428
|
recurrence_type: f,
|
437
429
|
repeating_transaction_type: t ? A.Income : A.Bill,
|
438
430
|
second_recurrence_day: R,
|
439
431
|
transaction_type: _.transaction_type,
|
440
|
-
user_guid:
|
432
|
+
user_guid: h.guid
|
441
433
|
};
|
442
|
-
await
|
434
|
+
await d(I, _), W();
|
443
435
|
}, W = () => {
|
444
436
|
b(""), C(!1);
|
445
437
|
};
|
446
|
-
return /* @__PURE__ */
|
447
|
-
/* @__PURE__ */ e(K, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(Q, { onClick: ne, children: /* @__PURE__ */ e($, { children: /* @__PURE__ */
|
448
|
-
/* @__PURE__ */
|
438
|
+
return /* @__PURE__ */ i(Le, { children: [
|
439
|
+
/* @__PURE__ */ e(K, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(Q, { onClick: ne, children: /* @__PURE__ */ e($, { children: /* @__PURE__ */ i(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
440
|
+
/* @__PURE__ */ i(y, { alignItems: "center", direction: "row", gap: 8, children: [
|
449
441
|
/* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.main" } }),
|
450
|
-
/* @__PURE__ */ e(
|
442
|
+
/* @__PURE__ */ e(w, { bold: !0, sx: { color: "primary.main" }, variant: "Body", children: n })
|
451
443
|
] }),
|
452
444
|
/* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
453
445
|
] }) }) }) }),
|
@@ -455,21 +447,21 @@ const te = ({
|
|
455
447
|
/* @__PURE__ */ e(
|
456
448
|
L,
|
457
449
|
{
|
458
|
-
ariaLabelClose:
|
459
|
-
isOpen:
|
450
|
+
ariaLabelClose: c.close_drawer_aria,
|
451
|
+
isOpen: p,
|
460
452
|
onClose: () => C(!1),
|
461
453
|
title: n,
|
462
454
|
children: /* @__PURE__ */ e(
|
463
455
|
Fe,
|
464
456
|
{
|
465
|
-
description: t ?
|
466
|
-
onSearch: (
|
467
|
-
|
468
|
-
...
|
469
|
-
custom: (I) => t ?
|
457
|
+
description: t ? c.add_income_description : c.add_expense_description,
|
458
|
+
onSearch: (v) => {
|
459
|
+
l({
|
460
|
+
...a,
|
461
|
+
custom: (I) => t ? v ? Be(I, v) : U(I) : v ? Pe(I, v) : Y(I)
|
470
462
|
});
|
471
463
|
},
|
472
|
-
onSelected: (
|
464
|
+
onSelected: (v) => b(v)
|
473
465
|
}
|
474
466
|
)
|
475
467
|
}
|
@@ -477,11 +469,11 @@ const te = ({
|
|
477
469
|
/* @__PURE__ */ e(
|
478
470
|
L,
|
479
471
|
{
|
480
|
-
ariaLabelClose:
|
472
|
+
ariaLabelClose: c.close_drawer_aria,
|
481
473
|
isOpen: !!S,
|
482
474
|
onClose: () => b(""),
|
483
475
|
onPrimaryAction: re,
|
484
|
-
title: t ?
|
476
|
+
title: t ? c.income_details : c.expense_details,
|
485
477
|
children: _ && /* @__PURE__ */ e(
|
486
478
|
Ge,
|
487
479
|
{
|
@@ -498,34 +490,34 @@ const te = ({
|
|
498
490
|
)
|
499
491
|
] });
|
500
492
|
}
|
501
|
-
),
|
502
|
-
const { recurring: t } = x(), { repeatingTransactions: n } = N(), { onEvent: o } = q(),
|
493
|
+
), wt = D(() => {
|
494
|
+
const { recurring: t } = x(), { repeatingTransactions: n } = N(), { onEvent: o } = q(), c = (r) => {
|
503
495
|
o(k.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
504
|
-
repeating_transaction_guid:
|
496
|
+
repeating_transaction_guid: r.guid
|
505
497
|
});
|
506
|
-
},
|
498
|
+
}, a = () => {
|
507
499
|
o(k.RECURRING_TRANSACTIONS_CLICK_ADD_INCOME);
|
508
|
-
}
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
/* @__PURE__ */ e(Me, { onClick:
|
514
|
-
/* @__PURE__ */ e(O, { variant:
|
515
|
-
] },
|
500
|
+
}, l = n.filter(
|
501
|
+
(r) => r.repeating_transaction_type === A.Income && (r.transactions.length > 0 || r.recurrence_type === s.EveryYear)
|
502
|
+
);
|
503
|
+
return /* @__PURE__ */ i(j, { sx: { bgcolor: "background.paper" }, children: [
|
504
|
+
l.map((r, d) => /* @__PURE__ */ i(u.Fragment, { children: [
|
505
|
+
/* @__PURE__ */ e(Me, { onClick: c, repeatingTransaction: r }),
|
506
|
+
/* @__PURE__ */ e(O, { variant: d < l.length - 1 ? "inset" : "fullWidth" })
|
507
|
+
] }, r.guid)),
|
516
508
|
/* @__PURE__ */ e(
|
517
509
|
Ye,
|
518
510
|
{
|
519
511
|
isIncome: !0,
|
520
512
|
label: t.add_income,
|
521
|
-
onAddRecurringTransaction:
|
513
|
+
onAddRecurringTransaction: a
|
522
514
|
}
|
523
515
|
)
|
524
516
|
] });
|
525
517
|
});
|
526
518
|
export {
|
527
519
|
Ye as A,
|
528
|
-
|
520
|
+
wt as M,
|
529
521
|
Me as R,
|
530
522
|
Fe as S,
|
531
523
|
Ne as a,
|
@@ -6,7 +6,7 @@ import b from "@mui/material/CardHeader";
|
|
6
6
|
import { P as u, H3 as v } from "@mxenabled/mxui";
|
7
7
|
import { ChevronRight as W } from "@mxenabled/mx-icons";
|
8
8
|
import { u as M } from "./useDimensions-27p2evRx.mjs";
|
9
|
-
import { W as w } from "./hooks-
|
9
|
+
import { W as w } from "./hooks-02T565vf.mjs";
|
10
10
|
const H = ({
|
11
11
|
children: e,
|
12
12
|
className: o,
|