@mx-cartographer/experiences 7.0.2 → 7.0.4
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 +9 -0
- package/dist/ManageIncome-DG7a42eZ.mjs +574 -0
- package/dist/RecurringSettings-BkzYDzmO.mjs +81 -0
- package/dist/{RecurringTransactionsStore-BKLD3OWo.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +1 -1
- package/dist/RepeatingTransaction-BW4J-jeJ.mjs +291 -0
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +314 -313
- package/dist/common/index.es.js +3 -3
- package/dist/common/types/localization/RecurringCopy.d.ts +6 -0
- package/dist/finstrong/index.es.js +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/ManageIncome.d.ts +5 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringSettingsZeroState.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +10 -10
- package/package.json +1 -1
- package/dist/ManageIncome-B6kmMN_z.mjs +0 -527
- package/dist/RecurringSettings-Be1dzkMz.mjs +0 -57
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
package/dist/common/index.es.js
CHANGED
|
@@ -22,7 +22,7 @@ import { T as ot } from "../TransactionStore-DSyXtPek.mjs";
|
|
|
22
22
|
import { S as Vs } from "../TransactionStore-DSyXtPek.mjs";
|
|
23
23
|
import { T as Js } from "../TabContentContainer-j01JYR_7.mjs";
|
|
24
24
|
import { I as ea } from "../IconBacking-B9oC6uL2.mjs";
|
|
25
|
-
import { D as aa, F as ra, a as oa, c as na, R as ia, S as ca } from "../RepeatingTransaction-
|
|
25
|
+
import { D as aa, F as ra, a as oa, c as na, R as ia, S as ca } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
26
26
|
import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
27
27
|
import { I as la } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
28
28
|
import { b as it } from "../GoalStore-Drf76ell.mjs";
|
|
@@ -48,8 +48,8 @@ import { I as ja, P as Va, S as Za } from "../Account-BFol-JYA.mjs";
|
|
|
48
48
|
import { b as E } from "../Category-CevNQ03n.mjs";
|
|
49
49
|
import { C as tr, c as er, a as sr, P as ar } from "../Category-CevNQ03n.mjs";
|
|
50
50
|
import { C as or, f as nr, b as ir, a as cr, g as dr, i as lr } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
51
|
-
import { R as mt } from "../RecurringTransactionsStore-
|
|
52
|
-
import { S as hr, T as gr } from "../RecurringTransactionsStore-
|
|
51
|
+
import { R as mt } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
52
|
+
import { S as hr, T as gr } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
53
53
|
import { G as mr, A as _r, B as yr, W as fr, c as Sr, k as br, g as wr, t as xr, l as Cr, x as Dr, e as vr, w as Ar, u as Er, m as Tr, a as Br, j as Ir, y as Nr, s as Fr, b as Mr, q as $r, n as Rr, z as Ur, h as kr, r as Lr, f as Or, v as Gr, o as Hr, p as Pr } from "../hooks-02T565vf.mjs";
|
|
54
54
|
import { u as Wr } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
55
55
|
import { makeAutoObservable as m, runInAction as p, reaction as _t } from "mobx";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface RecurringCopy {
|
|
2
2
|
account: string;
|
|
3
|
+
action_title: string;
|
|
3
4
|
activity_payment_date: string;
|
|
4
5
|
activity_schedule: string;
|
|
5
6
|
add_expense: string;
|
|
@@ -71,6 +72,11 @@ export interface RecurringCopy {
|
|
|
71
72
|
recurrence_day_label: string;
|
|
72
73
|
recurrence_days_label: string;
|
|
73
74
|
recurring_expenses: string;
|
|
75
|
+
recurring_setting_zero_state_expenses_description: string;
|
|
76
|
+
recurring_setting_zero_state_expenses_title: string;
|
|
77
|
+
recurring_setting_zero_state_income_description: string;
|
|
78
|
+
recurring_setting_zero_state_income_title: string;
|
|
79
|
+
recurring_income: string;
|
|
74
80
|
reset: string;
|
|
75
81
|
second_day_of_the_month: string;
|
|
76
82
|
select_day_label: string;
|
|
@@ -30,7 +30,7 @@ import Ue from "@mui/material/AccordionSummary";
|
|
|
30
30
|
import Ve from "@mui/material/CardHeader";
|
|
31
31
|
import { u as Ye } from "../useDimensions-27p2evRx.mjs";
|
|
32
32
|
import { C as qe } from "../ConnectionsDrawer-Czp-E0-m.mjs";
|
|
33
|
-
import { R as Je } from "../RecurringSettings-
|
|
33
|
+
import { R as Je } from "../RecurringSettings-BkzYDzmO.mjs";
|
|
34
34
|
import Qe from "@mui/material/TextField";
|
|
35
35
|
import { u as xe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
36
36
|
import { a as Ze } from "../Dialog-CWW597AF.mjs";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
interface ManageIncomeProps {
|
|
2
|
+
forOverview?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const ManageIncome: (({ forOverview }: ManageIncomeProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
5
|
displayName: string;
|
|
3
6
|
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface RecurringSettingsZeroStateProps {
|
|
2
|
+
zeroStateFor: 'expenses' | 'income';
|
|
3
|
+
}
|
|
4
|
+
export declare const RecurringSettingsZeroState: (({ zeroStateFor }: RecurringSettingsZeroStateProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -8,8 +8,8 @@ import { startOfToday as le } from "date-fns/startOfToday";
|
|
|
8
8
|
import { subDays as de } from "date-fns/subDays";
|
|
9
9
|
import re from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as He } from "../RecurringSettings-
|
|
12
|
-
import { M as An } from "../RecurringSettings-
|
|
11
|
+
import { R as He } from "../RecurringSettings-BkzYDzmO.mjs";
|
|
12
|
+
import { M as An } from "../RecurringSettings-BkzYDzmO.mjs";
|
|
13
13
|
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Be } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Ue } from "date-fns/isBefore";
|
|
@@ -29,9 +29,9 @@ import nt from "@mui/material/Badge";
|
|
|
29
29
|
import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
|
|
30
30
|
import { I as Y } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
31
|
import { u as D, a as V, h as v, e as X, c as pe, f as ge, p as rt } from "../hooks-02T565vf.mjs";
|
|
32
|
-
import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-
|
|
33
|
-
import { T as P } from "../RecurringTransactionsStore-
|
|
34
|
-
import { R as Gn } from "../RecurringTransactionsStore-
|
|
32
|
+
import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
|
+
import { T as P } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
34
|
+
import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
35
35
|
import { A as _, W as at } from "../WidgetContainer-BG-fdDOf.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
37
|
import se from "@mui/material/Divider";
|
|
@@ -41,8 +41,8 @@ import ct from "@mui/material/ListSubheader";
|
|
|
41
41
|
import lt from "@mui/material/ListItemAvatar";
|
|
42
42
|
import dt from "@mui/material/ListItemButton";
|
|
43
43
|
import ut from "@mui/material/ListItemText";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
44
|
+
import { b as mt } from "../ManageIncome-DG7a42eZ.mjs";
|
|
45
|
+
import { c as On, M as kn, S as Wn } from "../ManageIncome-DG7a42eZ.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
47
|
import { D as Ae } from "../Drawer-kEE73B87.mjs";
|
|
48
48
|
import { b as N } from "../Localization-2MODESHW.mjs";
|
|
@@ -561,8 +561,8 @@ const Z = {
|
|
|
561
561
|
accountOptions: i,
|
|
562
562
|
actions: [
|
|
563
563
|
{
|
|
564
|
-
label: a.
|
|
565
|
-
iconName: "
|
|
564
|
+
label: a.action_title,
|
|
565
|
+
iconName: "credit_card",
|
|
566
566
|
onClick: () => {
|
|
567
567
|
d(!0), b(_.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
568
568
|
}
|
|
@@ -585,7 +585,7 @@ const Z = {
|
|
|
585
585
|
isOpen: y,
|
|
586
586
|
onClose: () => d(!1),
|
|
587
587
|
shouldShowHeaderBorders: !1,
|
|
588
|
-
title: a.
|
|
588
|
+
title: a.action_title,
|
|
589
589
|
children: /* @__PURE__ */ e(He, {})
|
|
590
590
|
}
|
|
591
591
|
)
|
package/package.json
CHANGED
|
@@ -1,527 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import u 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 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
|
-
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 he, b as pe } from "./TransactionDetails-D4B9DSWo.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 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
|
-
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-BG-fdDOf.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 { b as B } from "./Category-CevNQ03n.mjs";
|
|
35
|
-
import { T as ee } from "./Transaction-CyqrHmAA.mjs";
|
|
36
|
-
const te = ({
|
|
37
|
-
frequency: t,
|
|
38
|
-
firstDay: n,
|
|
39
|
-
secondDay: o,
|
|
40
|
-
onFrequencyChange: c,
|
|
41
|
-
onFirstDayChange: a,
|
|
42
|
-
onSecondDayChange: l
|
|
43
|
-
}) => {
|
|
44
|
-
const { recurring: r } = x(), d = u.useMemo(
|
|
45
|
-
() => [
|
|
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
|
-
],
|
|
55
|
-
[r]
|
|
56
|
-
), h = [
|
|
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
|
-
], p = [...Array(31).keys()].map((m) => ({
|
|
65
|
-
id: m + 1,
|
|
66
|
-
label: xe(m + 1)
|
|
67
|
-
}));
|
|
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
|
-
};
|
|
72
|
-
return /* @__PURE__ */ i(y, { gap: 24, sx: { m: 24 }, children: [
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
T,
|
|
75
|
-
{
|
|
76
|
-
label: r.frequency,
|
|
77
|
-
onChange: c,
|
|
78
|
-
options: d,
|
|
79
|
-
value: t
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
b && /* @__PURE__ */ e(
|
|
83
|
-
T,
|
|
84
|
-
{
|
|
85
|
-
label: r.day_of_the_week,
|
|
86
|
-
onChange: a,
|
|
87
|
-
options: h,
|
|
88
|
-
value: n
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
f && /* @__PURE__ */ e(
|
|
92
|
-
T,
|
|
93
|
-
{
|
|
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
|
-
value: n
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
t === s.TwiceAMonth && /* @__PURE__ */ e(
|
|
101
|
-
T,
|
|
102
|
-
{
|
|
103
|
-
label: r.second_day_of_the_month,
|
|
104
|
-
onChange: l,
|
|
105
|
-
options: S,
|
|
106
|
-
value: o || 0
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
t === s.EveryYear && /* @__PURE__ */ e(ve, { 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: 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
|
-
await o({
|
|
122
|
-
...t,
|
|
123
|
-
recurrence_type: r,
|
|
124
|
-
recurrence_day: h,
|
|
125
|
-
second_recurrence_day: C
|
|
126
|
-
}), l(!1);
|
|
127
|
-
}, f = () => {
|
|
128
|
-
l(!0), c(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_PAYMENT_SCHEDULE);
|
|
129
|
-
};
|
|
130
|
-
return /* @__PURE__ */ i(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: a,
|
|
145
|
-
onClose: () => l(!1),
|
|
146
|
-
onPrimaryAction: b,
|
|
147
|
-
title: n.payment_schedule,
|
|
148
|
-
children: /* @__PURE__ */ e(
|
|
149
|
-
te,
|
|
150
|
-
{
|
|
151
|
-
firstDay: h,
|
|
152
|
-
frequency: r,
|
|
153
|
-
onFirstDayChange: p,
|
|
154
|
-
onFrequencyChange: d,
|
|
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: 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
|
-
r({
|
|
167
|
-
accounts: c,
|
|
168
|
-
dateRange: { start: le(P(), 90), end: de(P()) },
|
|
169
|
-
custom: (_) => _.repeating_transaction_guid === n.guid
|
|
170
|
-
});
|
|
171
|
-
}, [n]);
|
|
172
|
-
const g = u.useMemo(
|
|
173
|
-
() => d.find((_) => _.guid === f),
|
|
174
|
-
[f, d]
|
|
175
|
-
), m = n.repeating_transaction_type === A.Income, R = async () => {
|
|
176
|
-
await l(n.guid), t();
|
|
177
|
-
}, M = () => {
|
|
178
|
-
b(!0), a(k.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
|
|
179
|
-
};
|
|
180
|
-
return /* @__PURE__ */ i(y, { bgcolor: "background.default", direction: "column", height: "100%", children: [
|
|
181
|
-
/* @__PURE__ */ i(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(w, { bold: !0, variant: "body1", children: p }),
|
|
192
|
-
/* @__PURE__ */ i(ae, { color: m ? "success.main" : "text.primary", sx: { my: 4 }, children: [
|
|
193
|
-
m ? "+" : "",
|
|
194
|
-
V(h, "0,0.00")
|
|
195
|
-
] }),
|
|
196
|
-
/* @__PURE__ */ e(w, { 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__ */ i(j, { sx: { bgcolor: "background.paper" }, children: [
|
|
202
|
-
n.account && /* @__PURE__ */ i(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__ */ i(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(w, { 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(w, { 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(), [c, a] = u.useState(!1), l = u.useMemo(
|
|
269
|
-
() => n.transactions.length === 0 ? "" : n.transactions[0].category_guid || "",
|
|
270
|
-
[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
|
-
}, children: [
|
|
276
|
-
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(
|
|
277
|
-
H,
|
|
278
|
-
{
|
|
279
|
-
categoryGuid: l,
|
|
280
|
-
merchantGuid: n.merchant_guid
|
|
281
|
-
}
|
|
282
|
-
) }),
|
|
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
|
-
] }) })
|
|
327
|
-
] }),
|
|
328
|
-
/* @__PURE__ */ e(
|
|
329
|
-
L,
|
|
330
|
-
{
|
|
331
|
-
ariaLabelClose: o.close_drawer_aria,
|
|
332
|
-
isOpen: c,
|
|
333
|
-
onClose: () => a(!1),
|
|
334
|
-
title: n.repeating_transaction_type === A.Income ? o.income_details : o.expense_details,
|
|
335
|
-
children: /* @__PURE__ */ e(
|
|
336
|
-
Ne,
|
|
337
|
-
{
|
|
338
|
-
onDeleted: () => a(!1),
|
|
339
|
-
recurringTransaction: n
|
|
340
|
-
}
|
|
341
|
-
)
|
|
342
|
-
}
|
|
343
|
-
)
|
|
344
|
-
] });
|
|
345
|
-
}
|
|
346
|
-
), Fe = D(
|
|
347
|
-
({
|
|
348
|
-
bgcolor: t = "background.default",
|
|
349
|
-
description: n,
|
|
350
|
-
onSearch: o,
|
|
351
|
-
onSelected: c
|
|
352
|
-
}) => {
|
|
353
|
-
const { recurring: a } = x(), { searchValue: l, setSearchValue: r } = ye();
|
|
354
|
-
return /* @__PURE__ */ i(y, { sx: { bgcolor: t, gap: 16, pt: 8 }, children: [
|
|
355
|
-
n && /* @__PURE__ */ e(se, { sx: { mx: 24 }, children: n }),
|
|
356
|
-
/* @__PURE__ */ e(
|
|
357
|
-
Re,
|
|
358
|
-
{
|
|
359
|
-
ariaLabel: a.select_transaction_search_aria,
|
|
360
|
-
cancelAriaLabel: a.select_transaction_search_cancel_aria,
|
|
361
|
-
onChange: (d) => {
|
|
362
|
-
r(d), o(d);
|
|
363
|
-
},
|
|
364
|
-
placeholder: a.select_transaction_search_placeholder,
|
|
365
|
-
searchValue: l
|
|
366
|
-
}
|
|
367
|
-
),
|
|
368
|
-
/* @__PURE__ */ e(X, { bgcolor: t, height: "auto", onClick: c, showLoader: !1 })
|
|
369
|
-
] });
|
|
370
|
-
}
|
|
371
|
-
), Ge = D(
|
|
372
|
-
({
|
|
373
|
-
bgcolor: t = "background.default",
|
|
374
|
-
firstDay: n,
|
|
375
|
-
secondDay: o,
|
|
376
|
-
frequency: c,
|
|
377
|
-
onFrequencyChange: a,
|
|
378
|
-
onFirstDayChange: l,
|
|
379
|
-
onSecondDayChange: r,
|
|
380
|
-
transaction: d
|
|
381
|
-
}) => {
|
|
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 })
|
|
387
|
-
] }),
|
|
388
|
-
/* @__PURE__ */ e(w, { bold: !0, sx: { mx: 24 }, variant: "Body", children: h.payment_schedule }),
|
|
389
|
-
/* @__PURE__ */ e(
|
|
390
|
-
te,
|
|
391
|
-
{
|
|
392
|
-
firstDay: n,
|
|
393
|
-
frequency: c,
|
|
394
|
-
onFirstDayChange: l,
|
|
395
|
-
onFrequencyChange: a,
|
|
396
|
-
onSecondDayChange: r,
|
|
397
|
-
secondDay: o
|
|
398
|
-
}
|
|
399
|
-
)
|
|
400
|
-
] });
|
|
401
|
-
}
|
|
402
|
-
), 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(
|
|
403
|
-
({
|
|
404
|
-
isIncome: t = !1,
|
|
405
|
-
label: n,
|
|
406
|
-
onAddRecurringTransaction: o = () => null
|
|
407
|
-
}) => {
|
|
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),
|
|
410
|
-
[S, r]
|
|
411
|
-
), ne = () => {
|
|
412
|
-
C(!0), l(t ? { ...a, custom: U } : { ...a, custom: Y });
|
|
413
|
-
}, re = async () => {
|
|
414
|
-
if (!_) {
|
|
415
|
-
W();
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
o();
|
|
419
|
-
const v = ce(f, Oe(_.date)), I = {
|
|
420
|
-
account_guid: _.account_guid,
|
|
421
|
-
amount: _.amount,
|
|
422
|
-
created_by: 0,
|
|
423
|
-
// User
|
|
424
|
-
merchant_guid: _.merchant_guid,
|
|
425
|
-
description: _.payee || _.description || _.feed_description,
|
|
426
|
-
predicted_occurs_on: Ae(v, { representation: "date" }),
|
|
427
|
-
recurrence_day: g,
|
|
428
|
-
recurrence_type: f,
|
|
429
|
-
repeating_transaction_type: t ? A.Income : A.Bill,
|
|
430
|
-
second_recurrence_day: R,
|
|
431
|
-
transaction_type: _.transaction_type,
|
|
432
|
-
user_guid: h.guid
|
|
433
|
-
};
|
|
434
|
-
await d(I, _), W();
|
|
435
|
-
}, W = () => {
|
|
436
|
-
b(""), C(!1);
|
|
437
|
-
};
|
|
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: [
|
|
441
|
-
/* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.main" } }),
|
|
442
|
-
/* @__PURE__ */ e(w, { bold: !0, sx: { color: "primary.main" }, variant: "Body", children: n })
|
|
443
|
-
] }),
|
|
444
|
-
/* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
445
|
-
] }) }) }) }),
|
|
446
|
-
/* @__PURE__ */ e(O, {}),
|
|
447
|
-
/* @__PURE__ */ e(
|
|
448
|
-
L,
|
|
449
|
-
{
|
|
450
|
-
ariaLabelClose: c.close_drawer_aria,
|
|
451
|
-
isOpen: p,
|
|
452
|
-
onClose: () => C(!1),
|
|
453
|
-
title: n,
|
|
454
|
-
children: /* @__PURE__ */ e(
|
|
455
|
-
Fe,
|
|
456
|
-
{
|
|
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)
|
|
462
|
-
});
|
|
463
|
-
},
|
|
464
|
-
onSelected: (v) => b(v)
|
|
465
|
-
}
|
|
466
|
-
)
|
|
467
|
-
}
|
|
468
|
-
),
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
L,
|
|
471
|
-
{
|
|
472
|
-
ariaLabelClose: c.close_drawer_aria,
|
|
473
|
-
isOpen: !!S,
|
|
474
|
-
onClose: () => b(""),
|
|
475
|
-
onPrimaryAction: re,
|
|
476
|
-
title: t ? c.income_details : c.expense_details,
|
|
477
|
-
children: _ && /* @__PURE__ */ e(
|
|
478
|
-
Ge,
|
|
479
|
-
{
|
|
480
|
-
firstDay: g,
|
|
481
|
-
frequency: f,
|
|
482
|
-
onFirstDayChange: m,
|
|
483
|
-
onFrequencyChange: E,
|
|
484
|
-
onSecondDayChange: M,
|
|
485
|
-
secondDay: R,
|
|
486
|
-
transaction: _
|
|
487
|
-
}
|
|
488
|
-
)
|
|
489
|
-
}
|
|
490
|
-
)
|
|
491
|
-
] });
|
|
492
|
-
}
|
|
493
|
-
), wt = D(() => {
|
|
494
|
-
const { recurring: t } = x(), { repeatingTransactions: n } = N(), { onEvent: o } = q(), c = (r) => {
|
|
495
|
-
o(k.RECURRING_TRANSACTIONS_CLICK_INCOME, {
|
|
496
|
-
repeating_transaction_guid: r.guid
|
|
497
|
-
});
|
|
498
|
-
}, a = () => {
|
|
499
|
-
o(k.RECURRING_TRANSACTIONS_CLICK_ADD_INCOME);
|
|
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)),
|
|
508
|
-
/* @__PURE__ */ e(
|
|
509
|
-
Ye,
|
|
510
|
-
{
|
|
511
|
-
isIncome: !0,
|
|
512
|
-
label: t.add_income,
|
|
513
|
-
onAddRecurringTransaction: a
|
|
514
|
-
}
|
|
515
|
-
)
|
|
516
|
-
] });
|
|
517
|
-
});
|
|
518
|
-
export {
|
|
519
|
-
Ye as A,
|
|
520
|
-
wt as M,
|
|
521
|
-
Me as R,
|
|
522
|
-
Fe as S,
|
|
523
|
-
Ne as a,
|
|
524
|
-
Ge as b,
|
|
525
|
-
U as c,
|
|
526
|
-
Be as i
|
|
527
|
-
};
|