@mx-cartographer/experiences 6.26.18-alpha.mega4 → 6.26.18-alpha.sms1
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/common/context/hooks.d.ts +13 -13
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/index.d.ts +22 -0
- package/dist/index.es.js +30335 -0
- package/dist/index.es.js.map +1 -0
- package/package.json +3 -155
- package/dist/Account-DM32_5k9.mjs +0 -30
- package/dist/AccountDetailsContent-B_qRSB8l.mjs +0 -677
- package/dist/AccountDetailsHeader-CAm6ADMq.mjs +0 -119
- package/dist/AccountFields-Bb4pds0q.mjs +0 -135
- package/dist/AccountListItem-G7iAesaO.mjs +0 -90
- package/dist/AccountStore-RSanus_m.mjs +0 -230
- package/dist/Accounts-BfAQRG8R.mjs +0 -9
- package/dist/BeatApi-DLu87ijw.mjs +0 -21
- package/dist/BeatStore-By4aGoRM.mjs +0 -81
- package/dist/BudgetUtil-DcqclhiQ.mjs +0 -101
- package/dist/CashflowStore-D9Dpuz7X.mjs +0 -91
- package/dist/Category-5S6uwuXz.mjs +0 -301
- package/dist/CategorySelectorDrawer-DgrePTRg.mjs +0 -397
- package/dist/CategoryStore-B5EW6I1d.mjs +0 -183
- package/dist/CategoryUtil-DRyruNgi.mjs +0 -78
- package/dist/ConnectDrawer-DPnfeIfn.mjs +0 -508
- package/dist/ConnectionsDrawer-BCzpuNsK.mjs +0 -52
- package/dist/CurrencyInput-DzsPiUsU.mjs +0 -83
- package/dist/CurrencyText-YUhH2caW.mjs +0 -20
- package/dist/DateUtil-BcuH7ErC.mjs +0 -48
- package/dist/DebtsStore-C6VcBnpG.mjs +0 -60
- package/dist/Dialog-CWW597AF.mjs +0 -123
- package/dist/Donut-1UMNcG67.mjs +0 -57
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/EmptyState-Dcb-o2tl.mjs +0 -55
- package/dist/Fetch-CkFKy79O.mjs +0 -116
- package/dist/FinstrongStore-mkALvztw.mjs +0 -101
- package/dist/GoalStore-DyCr4wNc.mjs +0 -263
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/Help-DhcC-C05.mjs +0 -320
- package/dist/Help-toqAK5eD.mjs +0 -3173
- package/dist/IconBacking-B9oC6uL2.mjs +0 -39
- package/dist/InvestmentUtil-jOyOgzIB.mjs +0 -134
- package/dist/LineChart-CQWu5KoO.mjs +0 -403
- package/dist/ListItemAction-Df3OPMOW.mjs +0 -69
- package/dist/Loader-Dp1P2gNw.mjs +0 -14
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/ManageIncome-BVt_XQbo.mjs +0 -535
- package/dist/MerchantStore-DVH-QOf0.mjs +0 -37
- package/dist/MicroWidgetContainer-DaLW43tE.mjs +0 -45
- package/dist/MiniWidgetContainer-BcNPxZt2.mjs +0 -39
- package/dist/NetWorthStore-DE8CQBMM.mjs +0 -150
- package/dist/Notification-AMGWM1Al.mjs +0 -78
- package/dist/NotificationSettings-CPZN0l8X.mjs +0 -667
- package/dist/NotificationStore-DHtSGySy.mjs +0 -67
- package/dist/NumberFormatting-CtWHhyBX.mjs +0 -40
- package/dist/OriginalBalanceAction-s9sUxofR.mjs +0 -115
- package/dist/RecurringSettings-DIEsympT.mjs +0 -57
- package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +0 -263
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SettingsStore-CE7jDVFL.mjs +0 -265
- package/dist/SingleSegmentDonut-BgbLgwHi.mjs +0 -69
- package/dist/SpendingData-ByFCw95X.mjs +0 -53
- package/dist/StatusBar-BK_uYHAB.mjs +0 -30
- package/dist/TabContentContainer-j01JYR_7.mjs +0 -21
- package/dist/Transaction-C-5-Iuab.mjs +0 -312
- package/dist/TransactionApi-DbbcjI2L.mjs +0 -86
- package/dist/TransactionDetails-B5qfs9Zh.mjs +0 -1283
- package/dist/TransactionStore-BWi6_2Ny.mjs +0 -669
- package/dist/TrendsStore-Borh98aN.mjs +0 -448
- package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +0 -1959
- package/dist/WidgetContainer-CmGNZW0M.mjs +0 -548
- package/dist/accounts/index.es.js +0 -752
- package/dist/analytics/index.es.js +0 -171
- package/dist/budgets/index.es.js +0 -1070
- package/dist/cashflow/index.es.js +0 -1098
- package/dist/categories/index.es.js +0 -9
- package/dist/common/index.es.js +0 -1451
- package/dist/dashboard/index.es.js +0 -181
- package/dist/debts/index.es.js +0 -1460
- package/dist/exportTransactionsToCSV-j4g8bdVZ.mjs +0 -47
- package/dist/finstrong/index.es.js +0 -1455
- package/dist/goals/index.es.js +0 -1209
- package/dist/help/index.es.js +0 -14
- package/dist/hooks-ClhFlg78.mjs +0 -71
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +0 -4
- package/dist/investments/index.es.js +0 -1638
- package/dist/merchants/index.es.js +0 -79
- package/dist/microinsights/index.es.js +0 -16
- package/dist/networth/index.es.js +0 -542
- package/dist/notifications/index.es.js +0 -192
- package/dist/recurringtransactions/index.es.js +0 -879
- package/dist/settings/index.es.js +0 -879
- package/dist/spending/index.es.js +0 -570
- package/dist/transactions/index.es.js +0 -587
- package/dist/trends/index.es.js +0 -1103
- package/dist/useCombineEvents-DaDBSR_1.mjs +0 -92
- package/dist/useDimensions-27p2evRx.mjs +0 -36
- package/dist/useScreenSize-B6JyS_Lj.mjs +0 -36
|
@@ -1,535 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import d from "react";
|
|
3
|
-
import { observer as D } from "mobx-react-lite";
|
|
4
|
-
import O from "@mui/material/Divider";
|
|
5
|
-
import j from "@mui/material/List";
|
|
6
|
-
import K from "@mui/material/ListItem";
|
|
7
|
-
import oe from "@mui/material/ListItemAvatar";
|
|
8
|
-
import Q from "@mui/material/ListItemButton";
|
|
9
|
-
import $ from "@mui/material/ListItemText";
|
|
10
|
-
import y from "@mui/material/Stack";
|
|
11
|
-
import { MerchantLogo as H, Text as v, H1 as ae, InstitutionLogo as ie, P as se, Icon as z } from "@mxenabled/mxui";
|
|
12
|
-
import { F as c, S as T, D as G, g as J, R as A, e as ce } from "./RepeatingTransaction-BPWfaB3f.mjs";
|
|
13
|
-
import { subDays as le } from "date-fns/subDays";
|
|
14
|
-
import { startOfToday as P } from "date-fns/startOfToday";
|
|
15
|
-
import { endOfMonth as de } from "date-fns/endOfMonth";
|
|
16
|
-
import ue from "@mui/material/Button";
|
|
17
|
-
import { Delete as _e } from "@mxenabled/mx-icons";
|
|
18
|
-
import { T as X, a as me, u as ye, S as pe, b as he } from "./TransactionDetails-B5qfs9Zh.mjs";
|
|
19
|
-
import { getDayOfYear as fe } from "date-fns/getDayOfYear";
|
|
20
|
-
import { setDayOfYear as ge } from "date-fns/setDayOfYear";
|
|
21
|
-
import { AdapterDateFns as Ce } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
22
|
-
import { DatePicker as be } from "@mui/x-date-pickers";
|
|
23
|
-
import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
|
|
24
|
-
import { u as x, f as N, g as q, a as ve, n as Z, o as Se } from "./hooks-ClhFlg78.mjs";
|
|
25
|
-
import { b as xe, f as V } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
26
|
-
import { D as L } from "./Drawer-kEE73B87.mjs";
|
|
27
|
-
import { A as k } from "./WidgetContainer-CmGNZW0M.mjs";
|
|
28
|
-
import { f as De, D as Ee, a as Ie } from "./Dialog-CWW597AF.mjs";
|
|
29
|
-
import { formatISO as Ae } from "date-fns/formatISO";
|
|
30
|
-
import { fromUnixTime as Oe } from "date-fns/fromUnixTime";
|
|
31
|
-
import Le from "@mui/material/Box";
|
|
32
|
-
import { S as Re } from "./SearchBox-B2_zLv8-.mjs";
|
|
33
|
-
import { h as Te } from "./DateUtil-BcuH7ErC.mjs";
|
|
34
|
-
import { c as B } from "./Category-5S6uwuXz.mjs";
|
|
35
|
-
import { T as ee } from "./Transaction-C-5-Iuab.mjs";
|
|
36
|
-
const te = ({
|
|
37
|
-
frequency: t,
|
|
38
|
-
firstDay: n,
|
|
39
|
-
secondDay: o,
|
|
40
|
-
onFrequencyChange: l,
|
|
41
|
-
onFirstDayChange: i,
|
|
42
|
-
onSecondDayChange: a
|
|
43
|
-
}) => {
|
|
44
|
-
const { recurring: r } = x(), u = d.useMemo(
|
|
45
|
-
() => [
|
|
46
|
-
{ id: c.EveryWeek, label: r.frequency_every_week },
|
|
47
|
-
{ id: c.EveryOtherWeek, label: r.frequency_every_other_week },
|
|
48
|
-
{ id: c.TwiceAMonth, label: r.frequency_twice_a_month },
|
|
49
|
-
{ id: c.EveryMonth, label: r.frequency_every_month },
|
|
50
|
-
{ id: c.EveryOtherMonth, label: r.frequency_every_other_month },
|
|
51
|
-
{ id: c.EveryQuarter, label: r.frequency_every_quarter },
|
|
52
|
-
{ id: c.EveryOtherQuarter, label: r.frequency_every_other_quarter },
|
|
53
|
-
{ id: c.EveryYear, label: r.frequency_every_year }
|
|
54
|
-
],
|
|
55
|
-
[r]
|
|
56
|
-
), p = [
|
|
57
|
-
{ id: 0, label: r.weekday_sunday },
|
|
58
|
-
{ id: 1, label: r.weekday_monday },
|
|
59
|
-
{ id: 2, label: r.weekday_tuesday },
|
|
60
|
-
{ id: 3, label: r.weekday_wednesday },
|
|
61
|
-
{ id: 4, label: r.weekday_thursday },
|
|
62
|
-
{ id: 5, label: r.weekday_friday },
|
|
63
|
-
{ id: 6, label: r.weekday_saturday }
|
|
64
|
-
], h = [...Array(31).keys()].map((m) => ({
|
|
65
|
-
id: m + 1,
|
|
66
|
-
label: xe(m + 1)
|
|
67
|
-
}));
|
|
68
|
-
h[30].label += ` (${r.last_day_of_month})`;
|
|
69
|
-
const C = h.slice(0, 15), S = h.slice(14), b = t === c.EveryWeek || t === c.EveryOtherWeek, f = t === c.TwiceAMonth || t === c.EveryMonth || t === c.EveryOtherMonth || t === c.EveryQuarter || t === c.EveryOtherQuarter, E = ge(P(), n), g = (m) => {
|
|
70
|
-
m && i(fe(m));
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ s(y, { gap: 24, sx: { m: 24 }, children: [
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
T,
|
|
75
|
-
{
|
|
76
|
-
label: r.frequency,
|
|
77
|
-
onChange: l,
|
|
78
|
-
options: u,
|
|
79
|
-
value: t
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
b && /* @__PURE__ */ e(
|
|
83
|
-
T,
|
|
84
|
-
{
|
|
85
|
-
label: r.day_of_the_week,
|
|
86
|
-
onChange: i,
|
|
87
|
-
options: p,
|
|
88
|
-
value: n
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
f && /* @__PURE__ */ e(
|
|
92
|
-
T,
|
|
93
|
-
{
|
|
94
|
-
label: t === c.TwiceAMonth ? r.first_day_of_the_month : r.day_of_the_month,
|
|
95
|
-
onChange: i,
|
|
96
|
-
options: t === c.TwiceAMonth ? C : h,
|
|
97
|
-
value: n
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
t === c.TwiceAMonth && /* @__PURE__ */ e(
|
|
101
|
-
T,
|
|
102
|
-
{
|
|
103
|
-
label: r.second_day_of_the_month,
|
|
104
|
-
onChange: a,
|
|
105
|
-
options: S,
|
|
106
|
-
value: o || 0
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
t === c.EveryYear && /* @__PURE__ */ e(we, { dateAdapter: Ce, children: /* @__PURE__ */ e(
|
|
110
|
-
be,
|
|
111
|
-
{
|
|
112
|
-
disablePast: !0,
|
|
113
|
-
label: r.next_payment_date,
|
|
114
|
-
onChange: g,
|
|
115
|
-
value: E
|
|
116
|
-
}
|
|
117
|
-
) })
|
|
118
|
-
] });
|
|
119
|
-
}, ke = D(({ repeatingTransaction: t }) => {
|
|
120
|
-
const { recurring: n } = x(), { updateRepeatingTransaction: o } = N(), { onEvent: l } = q(), [i, a] = d.useState(!1), [r, u] = d.useState(t.recurrence_type), [p, h] = d.useState(t.recurrence_day), [C, S] = d.useState(t.second_recurrence_day), b = async () => {
|
|
121
|
-
await o({
|
|
122
|
-
...t,
|
|
123
|
-
recurrence_type: r,
|
|
124
|
-
recurrence_day: p,
|
|
125
|
-
second_recurrence_day: C
|
|
126
|
-
}), a(!1);
|
|
127
|
-
}, f = () => {
|
|
128
|
-
a(!0), l(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_PAYMENT_SCHEDULE);
|
|
129
|
-
};
|
|
130
|
-
return /* @__PURE__ */ s(F, { children: [
|
|
131
|
-
/* @__PURE__ */ e(
|
|
132
|
-
G,
|
|
133
|
-
{
|
|
134
|
-
iconName: "sync",
|
|
135
|
-
label: n.activity_schedule,
|
|
136
|
-
onClick: f,
|
|
137
|
-
value: `${J(n, t, !0)}`
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
141
|
-
L,
|
|
142
|
-
{
|
|
143
|
-
ariaLabelClose: n.close_drawer_aria,
|
|
144
|
-
isOpen: i,
|
|
145
|
-
onClose: () => a(!1),
|
|
146
|
-
onPrimaryAction: b,
|
|
147
|
-
title: n.payment_schedule,
|
|
148
|
-
children: /* @__PURE__ */ e(
|
|
149
|
-
te,
|
|
150
|
-
{
|
|
151
|
-
firstDay: p,
|
|
152
|
-
frequency: r,
|
|
153
|
-
onFirstDayChange: h,
|
|
154
|
-
onFrequencyChange: u,
|
|
155
|
-
onSecondDayChange: S,
|
|
156
|
-
secondDay: C
|
|
157
|
-
}
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
)
|
|
161
|
-
] });
|
|
162
|
-
}), Ne = D(
|
|
163
|
-
({ onDeleted: t, recurringTransaction: n }) => {
|
|
164
|
-
const { recurring: o } = x(), { selectedAccountGuids: l } = ve(), { onEvent: i } = q(), { deleteRepeatingTransaction: a } = N(), { setFilter: r, transactions: u } = Z(), { amount: p, description: h, merchant_guid: C } = n, [S, b] = d.useState(!1), [f, E] = d.useState("");
|
|
165
|
-
d.useEffect(() => {
|
|
166
|
-
r({
|
|
167
|
-
accounts: l,
|
|
168
|
-
dateRange: { start: le(P(), 90), end: de(P()) },
|
|
169
|
-
custom: (_) => _.repeating_transaction_guid === n.guid
|
|
170
|
-
});
|
|
171
|
-
}, [n]);
|
|
172
|
-
const g = d.useMemo(
|
|
173
|
-
() => u.find((_) => _.guid === f),
|
|
174
|
-
[f, u]
|
|
175
|
-
), m = n.repeating_transaction_type === A.Income, R = async () => {
|
|
176
|
-
await a(n.guid), t();
|
|
177
|
-
}, M = () => {
|
|
178
|
-
b(!0), i(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
|
|
179
|
-
};
|
|
180
|
-
return /* @__PURE__ */ s(y, { bgcolor: "background.default", direction: "column", height: "100%", children: [
|
|
181
|
-
/* @__PURE__ */ s(y, { direction: "column", m: 24, children: [
|
|
182
|
-
/* @__PURE__ */ e(
|
|
183
|
-
H,
|
|
184
|
-
{
|
|
185
|
-
categoryGuid: g?.category_guid || "",
|
|
186
|
-
merchantGuid: C,
|
|
187
|
-
size: 64,
|
|
188
|
-
sx: { mb: 12 }
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ e(v, { bold: !0, variant: "body1", children: h }),
|
|
192
|
-
/* @__PURE__ */ s(ae, { color: m ? "success.main" : "text.primary", sx: { my: 4 }, children: [
|
|
193
|
-
m ? "+" : "",
|
|
194
|
-
V(p, "0,0.00")
|
|
195
|
-
] }),
|
|
196
|
-
/* @__PURE__ */ e(v, { color: "text.secondary", variant: "body2", children: `${o.next_payment_date}: ${De(
|
|
197
|
-
n.predicted_occurs_on,
|
|
198
|
-
Ee.MONTH_DAY_YEAR
|
|
199
|
-
)}` })
|
|
200
|
-
] }),
|
|
201
|
-
/* @__PURE__ */ s(j, { sx: { bgcolor: "background.paper" }, children: [
|
|
202
|
-
n.account && /* @__PURE__ */ s(F, { children: [
|
|
203
|
-
/* @__PURE__ */ e(
|
|
204
|
-
G,
|
|
205
|
-
{
|
|
206
|
-
iconName: "checkbook",
|
|
207
|
-
label: o.account,
|
|
208
|
-
value: n.account.institutionName || ""
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
/* @__PURE__ */ e(O, { variant: "inset" })
|
|
212
|
-
] }),
|
|
213
|
-
g?.category && /* @__PURE__ */ s(F, { children: [
|
|
214
|
-
/* @__PURE__ */ e(
|
|
215
|
-
G,
|
|
216
|
-
{
|
|
217
|
-
iconName: "monetization_on",
|
|
218
|
-
label: o.category,
|
|
219
|
-
value: g.category
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
/* @__PURE__ */ e(O, { variant: "inset" })
|
|
223
|
-
] }),
|
|
224
|
-
/* @__PURE__ */ e(ke, { repeatingTransaction: n }),
|
|
225
|
-
/* @__PURE__ */ e(O, {})
|
|
226
|
-
] }),
|
|
227
|
-
/* @__PURE__ */ e(
|
|
228
|
-
ue,
|
|
229
|
-
{
|
|
230
|
-
color: "error",
|
|
231
|
-
onClick: M,
|
|
232
|
-
startIcon: /* @__PURE__ */ e(_e, {}),
|
|
233
|
-
sx: { mx: 24, my: 16 },
|
|
234
|
-
variant: "text",
|
|
235
|
-
children: m ? o.delete_income_title : o.delete_expense_title
|
|
236
|
-
}
|
|
237
|
-
),
|
|
238
|
-
/* @__PURE__ */ e(v, { bold: !0, sx: { ml: 24, mt: 16 }, variant: "Body", children: o.paid_transactions }),
|
|
239
|
-
/* @__PURE__ */ e(X, { height: "30dvh", onClick: E }),
|
|
240
|
-
/* @__PURE__ */ e(
|
|
241
|
-
L,
|
|
242
|
-
{
|
|
243
|
-
ariaLabelClose: o.close_drawer_aria,
|
|
244
|
-
isOpen: !!f && !!g,
|
|
245
|
-
onClose: () => E(""),
|
|
246
|
-
title: o.transaction_details_drawer_title,
|
|
247
|
-
children: g && /* @__PURE__ */ e(me, { transaction: g })
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
/* @__PURE__ */ e(
|
|
251
|
-
Ie,
|
|
252
|
-
{
|
|
253
|
-
copy: {
|
|
254
|
-
title: m ? o.delete_income_title : o.delete_expense_title,
|
|
255
|
-
close_aria: o.close_drawer_aria
|
|
256
|
-
},
|
|
257
|
-
isOpen: S,
|
|
258
|
-
onClose: () => b(!1),
|
|
259
|
-
onPrimaryAction: R,
|
|
260
|
-
children: /* @__PURE__ */ e(v, { children: m ? o.delete_income_description : o.delete_expense_description })
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
] });
|
|
264
|
-
}
|
|
265
|
-
), Me = D(
|
|
266
|
-
({ onClick: t = () => {
|
|
267
|
-
}, repeatingTransaction: n }) => {
|
|
268
|
-
const { recurring: o } = x(), [l, i] = d.useState(!1), a = d.useMemo(
|
|
269
|
-
() => n.transactions.length === 0 ? "" : n.transactions[0].category_guid || "",
|
|
270
|
-
[n]
|
|
271
|
-
), r = n.account?.institutionName || "", u = n.repeating_transaction_type === A.Income, p = J(o, n, !0);
|
|
272
|
-
return /* @__PURE__ */ s(K, { disableGutters: !0, disablePadding: !0, children: [
|
|
273
|
-
/* @__PURE__ */ s(Q, { onClick: () => {
|
|
274
|
-
t(n), i(!0);
|
|
275
|
-
}, children: [
|
|
276
|
-
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
277
|
-
H,
|
|
278
|
-
{
|
|
279
|
-
categoryGuid: a,
|
|
280
|
-
merchantGuid: n.merchant_guid
|
|
281
|
-
}
|
|
282
|
-
) }),
|
|
283
|
-
/* @__PURE__ */ e($, { children: /* @__PURE__ */ s(
|
|
284
|
-
y,
|
|
285
|
-
{
|
|
286
|
-
direction: "row",
|
|
287
|
-
gap: 4,
|
|
288
|
-
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
289
|
-
children: [
|
|
290
|
-
/* @__PURE__ */ s(y, { direction: "column", width: "50%", children: [
|
|
291
|
-
/* @__PURE__ */ e(v, { bold: !0, variant: "body1", children: n.description }),
|
|
292
|
-
/* @__PURE__ */ s(y, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
293
|
-
n.account?.institution_guid && /* @__PURE__ */ e(
|
|
294
|
-
ie,
|
|
295
|
-
{
|
|
296
|
-
alt: r,
|
|
297
|
-
institutionGuid: n.account?.institution_guid,
|
|
298
|
-
size: 12
|
|
299
|
-
}
|
|
300
|
-
),
|
|
301
|
-
/* @__PURE__ */ e(v, { variant: "caption", children: r })
|
|
302
|
-
] })
|
|
303
|
-
] }),
|
|
304
|
-
/* @__PURE__ */ s(y, { alignItems: "flex-end", width: "100%", children: [
|
|
305
|
-
/* @__PURE__ */ s(
|
|
306
|
-
v,
|
|
307
|
-
{
|
|
308
|
-
bold: !0,
|
|
309
|
-
color: u ? "success.main" : "text.primary",
|
|
310
|
-
variant: "body1",
|
|
311
|
-
children: [
|
|
312
|
-
u ? "+" : "",
|
|
313
|
-
V(n.amount, "0,0.00")
|
|
314
|
-
]
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
/* @__PURE__ */ e(
|
|
318
|
-
y,
|
|
319
|
-
{
|
|
320
|
-
direction: "row",
|
|
321
|
-
sx: {
|
|
322
|
-
alignItems: "center",
|
|
323
|
-
gap: 6,
|
|
324
|
-
justifyContent: "flex-end",
|
|
325
|
-
textTransform: "uppercase",
|
|
326
|
-
width: "100%"
|
|
327
|
-
},
|
|
328
|
-
children: /* @__PURE__ */ e(v, { bold: !0, color: "text.secondary", variant: "caption", children: p })
|
|
329
|
-
}
|
|
330
|
-
)
|
|
331
|
-
] })
|
|
332
|
-
]
|
|
333
|
-
}
|
|
334
|
-
) })
|
|
335
|
-
] }),
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
L,
|
|
338
|
-
{
|
|
339
|
-
ariaLabelClose: o.close_drawer_aria,
|
|
340
|
-
isOpen: l,
|
|
341
|
-
onClose: () => i(!1),
|
|
342
|
-
title: n.repeating_transaction_type === A.Income ? o.income_details : o.expense_details,
|
|
343
|
-
children: /* @__PURE__ */ e(
|
|
344
|
-
Ne,
|
|
345
|
-
{
|
|
346
|
-
onDeleted: () => i(!1),
|
|
347
|
-
recurringTransaction: n
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
}
|
|
351
|
-
)
|
|
352
|
-
] });
|
|
353
|
-
}
|
|
354
|
-
), Fe = D(
|
|
355
|
-
({
|
|
356
|
-
bgcolor: t = "background.default",
|
|
357
|
-
description: n,
|
|
358
|
-
onSearch: o,
|
|
359
|
-
onSelected: l
|
|
360
|
-
}) => {
|
|
361
|
-
const { recurring: i } = x(), { searchValue: a, setSearchValue: r } = ye();
|
|
362
|
-
return /* @__PURE__ */ s(y, { sx: { bgcolor: t, gap: 16, pt: 8 }, children: [
|
|
363
|
-
n && /* @__PURE__ */ e(se, { sx: { mx: 24 }, children: n }),
|
|
364
|
-
/* @__PURE__ */ e(
|
|
365
|
-
Re,
|
|
366
|
-
{
|
|
367
|
-
ariaLabel: i.select_transaction_search_aria,
|
|
368
|
-
cancelAriaLabel: i.select_transaction_search_cancel_aria,
|
|
369
|
-
onChange: (u) => {
|
|
370
|
-
r(u), o(u);
|
|
371
|
-
},
|
|
372
|
-
placeholder: i.select_transaction_search_placeholder,
|
|
373
|
-
searchValue: a
|
|
374
|
-
}
|
|
375
|
-
),
|
|
376
|
-
/* @__PURE__ */ e(X, { bgcolor: t, height: "auto", onClick: l, showLoader: !1 })
|
|
377
|
-
] });
|
|
378
|
-
}
|
|
379
|
-
), Ge = D(
|
|
380
|
-
({
|
|
381
|
-
bgcolor: t = "background.default",
|
|
382
|
-
firstDay: n,
|
|
383
|
-
secondDay: o,
|
|
384
|
-
frequency: l,
|
|
385
|
-
onFrequencyChange: i,
|
|
386
|
-
onFirstDayChange: a,
|
|
387
|
-
onSecondDayChange: r,
|
|
388
|
-
transaction: u
|
|
389
|
-
}) => {
|
|
390
|
-
const { recurring: p } = x();
|
|
391
|
-
return /* @__PURE__ */ s(y, { bgcolor: t, gap: 24, height: "100%", children: [
|
|
392
|
-
/* @__PURE__ */ s(y, { children: [
|
|
393
|
-
/* @__PURE__ */ e(pe, { bgcolor: t, children: Te(u.date) }),
|
|
394
|
-
/* @__PURE__ */ e(he, { transaction: u })
|
|
395
|
-
] }),
|
|
396
|
-
/* @__PURE__ */ e(v, { bold: !0, sx: { mx: 24 }, variant: "Body", children: p.payment_schedule }),
|
|
397
|
-
/* @__PURE__ */ e(
|
|
398
|
-
te,
|
|
399
|
-
{
|
|
400
|
-
firstDay: n,
|
|
401
|
-
frequency: l,
|
|
402
|
-
onFirstDayChange: a,
|
|
403
|
-
onFrequencyChange: i,
|
|
404
|
-
onSecondDayChange: r,
|
|
405
|
-
secondDay: o
|
|
406
|
-
}
|
|
407
|
-
)
|
|
408
|
-
] });
|
|
409
|
-
}
|
|
410
|
-
), Y = (t) => t.top_level_category_guid !== B.INCOME && t.transaction_type === ee.DEBIT, Pe = (t, n) => Y(t) ? t.payee?.toLowerCase().includes(n.toLowerCase()) || t.description.toLowerCase().includes(n.toLowerCase()) || t.feed_description.toLowerCase().includes(n.toLowerCase()) : !1, U = (t) => t.top_level_category_guid === B.INCOME || t.top_level_category_guid === B.TRANSFER && t.transaction_type === ee.CREDIT, Be = (t, n) => U(t) ? t.payee?.toLowerCase().includes(n.toLowerCase()) || t.description?.toLowerCase().includes(n.toLowerCase()) || t.feed_description?.toLowerCase().includes(n.toLowerCase()) : !1, Ye = D(
|
|
411
|
-
({
|
|
412
|
-
isIncome: t = !1,
|
|
413
|
-
label: n,
|
|
414
|
-
onAddRecurringTransaction: o = () => null
|
|
415
|
-
}) => {
|
|
416
|
-
const { recurring: l } = x(), { filter: i, setFilter: a, transactions: r } = Z(), { addRepeatingTransaction: u } = N(), { user: p } = Se(), [h, C] = d.useState(!1), [S, b] = d.useState(""), [f, E] = d.useState(c.EveryMonth), [g, m] = d.useState(1), [R, M] = d.useState(15), _ = d.useMemo(
|
|
417
|
-
() => r.find((w) => w.guid === S),
|
|
418
|
-
[S, r]
|
|
419
|
-
), ne = () => {
|
|
420
|
-
C(!0), a(t ? { ...i, custom: U } : { ...i, custom: Y });
|
|
421
|
-
}, re = async () => {
|
|
422
|
-
if (!_) {
|
|
423
|
-
W();
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
o();
|
|
427
|
-
const w = ce(f, Oe(_.date)), I = {
|
|
428
|
-
account_guid: _.account_guid,
|
|
429
|
-
amount: _.amount,
|
|
430
|
-
created_by: 0,
|
|
431
|
-
// User
|
|
432
|
-
merchant_guid: _.merchant_guid,
|
|
433
|
-
description: _.payee || _.description || _.feed_description,
|
|
434
|
-
predicted_occurs_on: Ae(w, { representation: "date" }),
|
|
435
|
-
recurrence_day: g,
|
|
436
|
-
recurrence_type: f,
|
|
437
|
-
repeating_transaction_type: t ? A.Income : A.Bill,
|
|
438
|
-
second_recurrence_day: R,
|
|
439
|
-
transaction_type: _.transaction_type,
|
|
440
|
-
user_guid: p.guid
|
|
441
|
-
};
|
|
442
|
-
await u(I, _), W();
|
|
443
|
-
}, W = () => {
|
|
444
|
-
b(""), C(!1);
|
|
445
|
-
};
|
|
446
|
-
return /* @__PURE__ */ s(Le, { children: [
|
|
447
|
-
/* @__PURE__ */ e(K, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(Q, { onClick: ne, children: /* @__PURE__ */ e($, { children: /* @__PURE__ */ s(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
448
|
-
/* @__PURE__ */ s(y, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
449
|
-
/* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.main" } }),
|
|
450
|
-
/* @__PURE__ */ e(v, { bold: !0, sx: { color: "primary.main" }, variant: "Body", children: n })
|
|
451
|
-
] }),
|
|
452
|
-
/* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
453
|
-
] }) }) }) }),
|
|
454
|
-
/* @__PURE__ */ e(O, {}),
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
L,
|
|
457
|
-
{
|
|
458
|
-
ariaLabelClose: l.close_drawer_aria,
|
|
459
|
-
isOpen: h,
|
|
460
|
-
onClose: () => C(!1),
|
|
461
|
-
title: n,
|
|
462
|
-
children: /* @__PURE__ */ e(
|
|
463
|
-
Fe,
|
|
464
|
-
{
|
|
465
|
-
description: t ? l.add_income_description : l.add_expense_description,
|
|
466
|
-
onSearch: (w) => {
|
|
467
|
-
a({
|
|
468
|
-
...i,
|
|
469
|
-
custom: (I) => t ? w ? Be(I, w) : U(I) : w ? Pe(I, w) : Y(I)
|
|
470
|
-
});
|
|
471
|
-
},
|
|
472
|
-
onSelected: (w) => b(w)
|
|
473
|
-
}
|
|
474
|
-
)
|
|
475
|
-
}
|
|
476
|
-
),
|
|
477
|
-
/* @__PURE__ */ e(
|
|
478
|
-
L,
|
|
479
|
-
{
|
|
480
|
-
ariaLabelClose: l.close_drawer_aria,
|
|
481
|
-
isOpen: !!S,
|
|
482
|
-
onClose: () => b(""),
|
|
483
|
-
onPrimaryAction: re,
|
|
484
|
-
title: t ? l.income_details : l.expense_details,
|
|
485
|
-
children: _ && /* @__PURE__ */ e(
|
|
486
|
-
Ge,
|
|
487
|
-
{
|
|
488
|
-
firstDay: g,
|
|
489
|
-
frequency: f,
|
|
490
|
-
onFirstDayChange: m,
|
|
491
|
-
onFrequencyChange: E,
|
|
492
|
-
onSecondDayChange: M,
|
|
493
|
-
secondDay: R,
|
|
494
|
-
transaction: _
|
|
495
|
-
}
|
|
496
|
-
)
|
|
497
|
-
}
|
|
498
|
-
)
|
|
499
|
-
] });
|
|
500
|
-
}
|
|
501
|
-
), vt = D(() => {
|
|
502
|
-
const { recurring: t } = x(), { repeatingTransactions: n } = N(), { onEvent: o } = q(), l = (a) => {
|
|
503
|
-
o(k.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
|
504
|
-
repeating_transaction_guid: a.guid
|
|
505
|
-
});
|
|
506
|
-
}, i = () => {
|
|
507
|
-
o(k.RECURRING_TRANSACTIONS_CLICK_ADD_INCOME);
|
|
508
|
-
};
|
|
509
|
-
return /* @__PURE__ */ s(j, { sx: { bgcolor: "background.paper" }, children: [
|
|
510
|
-
n.filter(
|
|
511
|
-
(a) => a.repeating_transaction_type === A.Income && (a.transactions.length > 0 || a.recurrence_type === c.EveryYear)
|
|
512
|
-
).map((a, r) => /* @__PURE__ */ s(d.Fragment, { children: [
|
|
513
|
-
/* @__PURE__ */ e(Me, { onClick: l, repeatingTransaction: a }),
|
|
514
|
-
/* @__PURE__ */ e(O, { variant: r < n.length - 1 ? "inset" : "fullWidth" })
|
|
515
|
-
] }, a.guid)),
|
|
516
|
-
/* @__PURE__ */ e(
|
|
517
|
-
Ye,
|
|
518
|
-
{
|
|
519
|
-
isIncome: !0,
|
|
520
|
-
label: t.add_income,
|
|
521
|
-
onAddRecurringTransaction: i
|
|
522
|
-
}
|
|
523
|
-
)
|
|
524
|
-
] });
|
|
525
|
-
});
|
|
526
|
-
export {
|
|
527
|
-
Ye as A,
|
|
528
|
-
vt as M,
|
|
529
|
-
Me as R,
|
|
530
|
-
Fe as S,
|
|
531
|
-
Ne as a,
|
|
532
|
-
Ge as b,
|
|
533
|
-
U as c,
|
|
534
|
-
Be as i
|
|
535
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as m, runInAction as s } from "mobx";
|
|
2
|
-
import { F as p, A as c } from "./Fetch-CkFKy79O.mjs";
|
|
3
|
-
class h {
|
|
4
|
-
fetchInstance;
|
|
5
|
-
constructor(t, n) {
|
|
6
|
-
this.fetchInstance = new p(t, n);
|
|
7
|
-
}
|
|
8
|
-
getMerchants = async (t = [], n = [], r = 1, o = 25) => {
|
|
9
|
-
let a = c.MERCHANTS;
|
|
10
|
-
return a += `?page=${r}&per_page=${o}`, t.length && t.forEach((e) => a += `&fuzzy_name[]=${e}`), n.length && n.forEach((e) => a += `&guid[]=${e}`), this.fetchInstance.get(a).then((e) => e.merchants);
|
|
11
|
-
};
|
|
12
|
-
getMerchantByGuid = async (t) => this.fetchInstance.get(`${c.MERCHANTS}/${t}`).then((n) => n.merchant);
|
|
13
|
-
}
|
|
14
|
-
class l {
|
|
15
|
-
globalStore;
|
|
16
|
-
api = new h("/", "");
|
|
17
|
-
merchant = null;
|
|
18
|
-
merchants = [];
|
|
19
|
-
isLoading = !1;
|
|
20
|
-
constructor(t) {
|
|
21
|
-
this.globalStore = t, this.api = new h(t.endpoint, t.sessionToken), m(this);
|
|
22
|
-
}
|
|
23
|
-
loadMerchants = async (t = "") => {
|
|
24
|
-
this.isLoading = !0;
|
|
25
|
-
const n = await this.api.getMerchants([t]);
|
|
26
|
-
s(() => {
|
|
27
|
-
this.merchants = n, this.isLoading = !1;
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
loadMerchantByGuid = async (t) => {
|
|
31
|
-
const n = await this.api.getMerchantByGuid(t);
|
|
32
|
-
s(() => this.merchant = n);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
l as M
|
|
37
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as p, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import x from "@mui/material/Button";
|
|
3
|
-
import C from "@mui/material/Card";
|
|
4
|
-
import g from "@mui/material/CardContent";
|
|
5
|
-
import b from "@mui/material/CardHeader";
|
|
6
|
-
import { P as u, H3 as v } from "@mxenabled/mxui";
|
|
7
|
-
import { ChevronRight as W } from "@mxenabled/mx-icons";
|
|
8
|
-
import { u as M } from "./useDimensions-27p2evRx.mjs";
|
|
9
|
-
import { W as w } from "./hooks-ClhFlg78.mjs";
|
|
10
|
-
const H = ({
|
|
11
|
-
children: e,
|
|
12
|
-
className: o,
|
|
13
|
-
ctaLabel: n,
|
|
14
|
-
onCTAClick: a,
|
|
15
|
-
subHeader: t,
|
|
16
|
-
sx: s,
|
|
17
|
-
title: c,
|
|
18
|
-
variant: d = "borderless"
|
|
19
|
-
}) => {
|
|
20
|
-
const [m, { height: l, width: h }] = M(), i = /* @__PURE__ */ p(f, { children: [
|
|
21
|
-
/* @__PURE__ */ r(
|
|
22
|
-
b,
|
|
23
|
-
{
|
|
24
|
-
action: /* @__PURE__ */ r(
|
|
25
|
-
x,
|
|
26
|
-
{
|
|
27
|
-
endIcon: /* @__PURE__ */ r(W, { size: 20 }),
|
|
28
|
-
onClick: a,
|
|
29
|
-
size: "small",
|
|
30
|
-
variant: "text",
|
|
31
|
-
children: n
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
subheader: t && /* @__PURE__ */ r(u, { sx: { color: "text.secondary" }, variant: "body2", children: t }),
|
|
35
|
-
sx: { p: 0, pb: 8, width: "calc(100% - 8px)", "& .MuiCardHeader-action": { mt: 0 } },
|
|
36
|
-
title: /* @__PURE__ */ r(v, { sx: { width: "calc(100% - 10px)" }, children: c })
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ r(g, { ref: m, sx: { p: 0, ":last-child": { pb: 0 } }, children: /* @__PURE__ */ r(w, { availableHeight: l, availableWidth: h, children: e }) })
|
|
40
|
-
] });
|
|
41
|
-
return d === "borderless" ? i : /* @__PURE__ */ r(C, { className: o, sx: { alignItems: "center", p: 16, ...s }, children: i });
|
|
42
|
-
}, F = H;
|
|
43
|
-
export {
|
|
44
|
-
F as M
|
|
45
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import f from "@mui/material/Button";
|
|
3
|
-
import u from "@mui/material/Card";
|
|
4
|
-
import x from "@mui/material/CardHeader";
|
|
5
|
-
import g from "@mui/material/CardContent";
|
|
6
|
-
import b from "@mui/material/IconButton";
|
|
7
|
-
import { Icon as C, ChevronRight as v } from "@mxenabled/mx-icons";
|
|
8
|
-
import { Text as W, H3 as H } from "@mxenabled/mxui";
|
|
9
|
-
import { u as I } from "./useDimensions-27p2evRx.mjs";
|
|
10
|
-
import { W as M } from "./hooks-ClhFlg78.mjs";
|
|
11
|
-
const j = ({
|
|
12
|
-
className: t = "mx-cmn-mini-widget",
|
|
13
|
-
closeLabel: a,
|
|
14
|
-
children: m,
|
|
15
|
-
onClose: i,
|
|
16
|
-
onPrimaryCtaClick: o,
|
|
17
|
-
primaryCtaLabel: d = "",
|
|
18
|
-
subTitle: n = "",
|
|
19
|
-
sx: l = {},
|
|
20
|
-
title: e = ""
|
|
21
|
-
}) => {
|
|
22
|
-
const [s, { height: c, width: p }] = I();
|
|
23
|
-
return /* @__PURE__ */ h(u, { className: t, sx: { ...l }, children: [
|
|
24
|
-
/* @__PURE__ */ r(
|
|
25
|
-
x,
|
|
26
|
-
{
|
|
27
|
-
action: i ? /* @__PURE__ */ r(b, { "aria-label": a, onClick: i, children: /* @__PURE__ */ r(C, { name: "close", size: 24 }) }) : o && /* @__PURE__ */ r(f, { endIcon: /* @__PURE__ */ r(v, {}), onClick: o, children: /* @__PURE__ */ r(W, { bold: !0, variant: "Small", children: d }) }),
|
|
28
|
-
subheader: n || null,
|
|
29
|
-
subheaderTypographyProps: { variant: "Small" },
|
|
30
|
-
sx: { pb: 4 },
|
|
31
|
-
title: e ? /* @__PURE__ */ r(H, { sx: { pb: 4 }, children: e }) : null
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ r(g, { ref: s, sx: { p: 0 }, children: /* @__PURE__ */ r(M, { availableHeight: c, availableWidth: p, children: m }) })
|
|
35
|
-
] });
|
|
36
|
-
}, $ = j;
|
|
37
|
-
export {
|
|
38
|
-
$ as M
|
|
39
|
-
};
|