@mx-cartographer/experiences 7.11.9 → 7.11.11
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 +8 -0
- package/dist/{ManageIncome-C389-HAc.mjs → ManageIncome-Bx6Uw4fv.mjs} +1 -1
- package/dist/{RecurringSettings-CLtfXCFT.mjs → RecurringSettings-DYx5S95u.mjs} +2 -2
- package/dist/RecurringTransactions-C8Cy-9DA.mjs +302 -0
- package/dist/{RecurringTransactionsStore-Ce7p6L0E.mjs → RecurringTransactionsStore-DH8DEIAz.mjs} +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
- package/dist/accounts/index.es.js +91 -89
- package/dist/budgets/index.es.js +1 -1
- package/dist/cashflow/index.es.js +3 -3
- package/dist/common/index.es.js +3 -3
- package/dist/finstrong/index.es.js +3 -3
- package/dist/recurringtransactions/index.es.js +7 -7
- package/package.json +1 -1
- package/dist/RecurringTransactions-B_I4_FGO.mjs +0 -296
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [7.11.11] - 03-04-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Issue with including bi-weekly recurrences in past months
|
|
4
|
+
|
|
5
|
+
## [7.11.10] - 03-04-2026
|
|
6
|
+
|
|
7
|
+
- **FIXED** - Account Actions | toggle a11y
|
|
8
|
+
|
|
1
9
|
## [7.11.9] - 03-04-2026
|
|
2
10
|
|
|
3
11
|
- **FIXED** - `Debts` return to the top of the page when scrolling quickly
|
|
@@ -10,7 +10,7 @@ import se from "@mui/material/ListItem";
|
|
|
10
10
|
import ce from "@mui/material/ListItemAvatar";
|
|
11
11
|
import le from "@mui/material/ListItemButton";
|
|
12
12
|
import de from "@mui/material/ListItemText";
|
|
13
|
-
import { F as d, S as M, D as z, g as $, R as T, e as _e } from "./RecurringTransactions-
|
|
13
|
+
import { F as d, S as M, D as z, g as $, R as T, e as _e } from "./RecurringTransactions-C8Cy-9DA.mjs";
|
|
14
14
|
import { subDays as X } from "date-fns/subDays";
|
|
15
15
|
import { startOfToday as E } from "date-fns/startOfToday";
|
|
16
16
|
import { endOfMonth as ue } from "date-fns/endOfMonth";
|
|
@@ -7,9 +7,9 @@ import R from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
8
|
import b from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-Bx6Uw4fv.mjs";
|
|
11
11
|
import { u as _, j as A, g as f } from "./hooks-zu7yblbi.mjs";
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactions-
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactions-C8Cy-9DA.mjs";
|
|
13
13
|
import { A as m } from "./Analytics-i5h6BxR1.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { jsxs as O, Fragment as L, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import U from "@mui/material/Avatar";
|
|
3
|
+
import M from "@mui/material/ListItem";
|
|
4
|
+
import G from "@mui/material/ListItemAvatar";
|
|
5
|
+
import S from "@mui/material/ListItemButton";
|
|
6
|
+
import C from "@mui/material/ListItemText";
|
|
7
|
+
import { Icon as w, IconWeight as $ } from "@mxenabled/mxui";
|
|
8
|
+
import j from "@mui/material/ListItemIcon";
|
|
9
|
+
import z from "@mui/material/MenuItem";
|
|
10
|
+
import K from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as H } from "@mxenabled/mx-icons";
|
|
12
|
+
import { addDays as A } from "date-fns/addDays";
|
|
13
|
+
import { addMonths as h } from "date-fns/addMonths";
|
|
14
|
+
import { addQuarters as Y } from "date-fns/addQuarters";
|
|
15
|
+
import { addWeeks as W } from "date-fns/addWeeks";
|
|
16
|
+
import { addYears as V } from "date-fns/addYears";
|
|
17
|
+
import { formatISO as X } from "date-fns/formatISO";
|
|
18
|
+
import { fromUnixTime as J } from "date-fns/fromUnixTime";
|
|
19
|
+
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
20
|
+
import { isAfter as f } from "date-fns/isAfter";
|
|
21
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
22
|
+
import { isSameDay as Z } from "date-fns/isSameDay";
|
|
23
|
+
import { lastDayOfMonth as T } from "date-fns/lastDayOfMonth";
|
|
24
|
+
import { nextDay as E } from "date-fns/nextDay";
|
|
25
|
+
import { parseISO as F } from "date-fns/parseISO";
|
|
26
|
+
import { setDate as D } from "date-fns/setDate";
|
|
27
|
+
import { setDay as R } from "date-fns/setDay";
|
|
28
|
+
import { setDayOfYear as N } from "date-fns/setDayOfYear";
|
|
29
|
+
import { startOfToday as g } from "date-fns/startOfToday";
|
|
30
|
+
import { subDays as I } from "date-fns/subDays";
|
|
31
|
+
import { subMonths as q } from "date-fns/subMonths";
|
|
32
|
+
import { subQuarters as B } from "date-fns/subQuarters";
|
|
33
|
+
import { subWeeks as ee } from "date-fns/subWeeks";
|
|
34
|
+
import { subYears as te } from "date-fns/subYears";
|
|
35
|
+
import { g as re, a as oe, b as ae, c as se, d as ne, e as ce, f as ie } from "./DateUtil-CVXVMbjf.mjs";
|
|
36
|
+
import { b as Q } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
37
|
+
import { b as l } from "./Localization-2MODESHW.mjs";
|
|
38
|
+
import { f as x, D as k } from "./DateFormats-Cs-NbEZ7.mjs";
|
|
39
|
+
const ue = ({ iconName: e, label: a, onClick: r, value: o }) => {
|
|
40
|
+
const t = /* @__PURE__ */ O(L, { children: [
|
|
41
|
+
/* @__PURE__ */ d(G, { children: /* @__PURE__ */ d(U, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ d(w, { name: e, sx: { color: "text.primary" }, weight: $.Dark }) }) }),
|
|
42
|
+
/* @__PURE__ */ d(
|
|
43
|
+
C,
|
|
44
|
+
{
|
|
45
|
+
primary: a,
|
|
46
|
+
primaryTypographyProps: { variant: "XSmall" },
|
|
47
|
+
secondary: o,
|
|
48
|
+
secondaryTypographyProps: { color: "text.default", variant: "Body", fontWeight: 600 }
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] });
|
|
52
|
+
return r ? /* @__PURE__ */ d(M, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ O(S, { onClick: r, children: [
|
|
53
|
+
t,
|
|
54
|
+
/* @__PURE__ */ d(j, { children: /* @__PURE__ */ d(w, { name: "chevron_right", size: 24 }) })
|
|
55
|
+
] }) }) : /* @__PURE__ */ d(M, { disableGutters: !1, disablePadding: !1, children: t });
|
|
56
|
+
}, at = ue, st = ({ label: e, onChange: a, options: r, value: o, ...t }) => /* @__PURE__ */ d(
|
|
57
|
+
K,
|
|
58
|
+
{
|
|
59
|
+
InputLabelProps: { shrink: !0 },
|
|
60
|
+
SelectProps: {
|
|
61
|
+
IconComponent: (c) => /* @__PURE__ */ d(H, { size: 20, sx: { mr: 4 }, ...c })
|
|
62
|
+
},
|
|
63
|
+
defaultValue: 0,
|
|
64
|
+
label: e,
|
|
65
|
+
onChange: (c) => {
|
|
66
|
+
a(Number(c.target.value));
|
|
67
|
+
},
|
|
68
|
+
select: !0,
|
|
69
|
+
value: o,
|
|
70
|
+
variant: "outlined",
|
|
71
|
+
...t,
|
|
72
|
+
children: r.map((c) => /* @__PURE__ */ d(z, { value: c.id, children: c.label }, c.id))
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
var n = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(n || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), b = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(b || {}), P = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(P || {});
|
|
76
|
+
const de = (e) => {
|
|
77
|
+
if (!e) return "";
|
|
78
|
+
let a = e.user_name || e.feed_name || "";
|
|
79
|
+
return e.account_number && (a = `${a} *${e.account_number}`), a;
|
|
80
|
+
}, me = (e, a) => {
|
|
81
|
+
const r = [], o = e.transactions.find(
|
|
82
|
+
(m) => m.repeating_transaction_guid === e.guid
|
|
83
|
+
);
|
|
84
|
+
if (!o) return [];
|
|
85
|
+
const t = F(e.predicted_occurs_on), s = {
|
|
86
|
+
accountGuid: e.account?.guid || "",
|
|
87
|
+
amount: e.amount,
|
|
88
|
+
categoryGuid: o.category_guid || "",
|
|
89
|
+
expectedDate: t,
|
|
90
|
+
frequency: e.recurrence_type,
|
|
91
|
+
institutionGuid: e.account?.institution_guid || "",
|
|
92
|
+
institutionName: de(e.account),
|
|
93
|
+
merchantGuid: e.merchant_guid,
|
|
94
|
+
name: e.description,
|
|
95
|
+
recurrenceDay: e.recurrence_day,
|
|
96
|
+
repeatingTransactionGuid: e.guid,
|
|
97
|
+
secondRecurrenceDay: e.second_recurrence_day,
|
|
98
|
+
status: p.Upcoming,
|
|
99
|
+
type: e.repeating_transaction_type === P.Income ? b.Income : b.Expense,
|
|
100
|
+
transaction: void 0
|
|
101
|
+
}, c = a.start, i = a.end;
|
|
102
|
+
switch (e.recurrence_type) {
|
|
103
|
+
case n.EveryWeek:
|
|
104
|
+
r.push(...le(s, c, i));
|
|
105
|
+
break;
|
|
106
|
+
case n.EveryOtherWeek:
|
|
107
|
+
r.push(...he(s, c, i));
|
|
108
|
+
break;
|
|
109
|
+
case n.TwiceAMonth:
|
|
110
|
+
r.push(...fe(s, c, i));
|
|
111
|
+
break;
|
|
112
|
+
case n.EveryMonth:
|
|
113
|
+
r.push(...pe(s, c, i));
|
|
114
|
+
break;
|
|
115
|
+
case n.EveryOtherMonth:
|
|
116
|
+
r.push(...ye(s, c, i));
|
|
117
|
+
break;
|
|
118
|
+
case n.EveryQuarter:
|
|
119
|
+
r.push(...De(s, c, i));
|
|
120
|
+
break;
|
|
121
|
+
case n.EveryOtherQuarter:
|
|
122
|
+
r.push(..._e(s, c, i));
|
|
123
|
+
break;
|
|
124
|
+
case n.EveryYear:
|
|
125
|
+
r.push(...ve(s, c, i));
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
for (const m of r) {
|
|
129
|
+
const _ = e.transactions.find(
|
|
130
|
+
(v) => v.repeating_transaction_guid === e.guid && v.date > y(I(m.expectedDate, 5)) && v.date < y(A(m.expectedDate, 5))
|
|
131
|
+
);
|
|
132
|
+
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = J(_.date)) : u(m.expectedDate, I(g(), 3)) && (m.status = p.Missed);
|
|
133
|
+
}
|
|
134
|
+
return r;
|
|
135
|
+
}, le = (e, a, r) => {
|
|
136
|
+
const o = [];
|
|
137
|
+
let t = E(a, e.recurrenceDay);
|
|
138
|
+
for (; u(t, r); )
|
|
139
|
+
o.push({ ...e, expectedDate: t }), t = E(t, e.recurrenceDay);
|
|
140
|
+
return o;
|
|
141
|
+
}, he = (e, a, r) => {
|
|
142
|
+
const o = [];
|
|
143
|
+
let t = e.expectedDate;
|
|
144
|
+
if (u(t, a))
|
|
145
|
+
for (; u(t, a); )
|
|
146
|
+
t = W(t, 2);
|
|
147
|
+
else {
|
|
148
|
+
for (; f(t, a) || Z(t, a); )
|
|
149
|
+
t = ee(t, 2);
|
|
150
|
+
t = W(t, 2);
|
|
151
|
+
}
|
|
152
|
+
for (; u(t, r); )
|
|
153
|
+
o.push({ ...e, expectedDate: t }), t = A(t, 14);
|
|
154
|
+
return o;
|
|
155
|
+
}, fe = (e, a, r) => {
|
|
156
|
+
const o = [];
|
|
157
|
+
let t = D(a, e.recurrenceDay);
|
|
158
|
+
for (; u(t, r); )
|
|
159
|
+
o.push({ ...e, expectedDate: t }), t = h(t, 1);
|
|
160
|
+
let s = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(a, e.secondRecurrenceDay) : T(a);
|
|
161
|
+
for (; u(s, r); )
|
|
162
|
+
o.push({ ...e, expectedDate: s }), s = h(s, 1);
|
|
163
|
+
return o;
|
|
164
|
+
}, pe = (e, a, r) => {
|
|
165
|
+
const o = [];
|
|
166
|
+
let t = D(a, e.recurrenceDay);
|
|
167
|
+
for (o.push({ ...e, expectedDate: t }), t = h(t, 1); u(t, r); )
|
|
168
|
+
o.push({ ...e, expectedDate: t }), t = h(t, 1);
|
|
169
|
+
return o;
|
|
170
|
+
}, ye = (e, a, r) => {
|
|
171
|
+
const o = [], t = e.expectedDate;
|
|
172
|
+
let s = u(t, r) ? t : q(t, 2);
|
|
173
|
+
for (; u(s, r); )
|
|
174
|
+
f(s, a) && o.push({ ...e, expectedDate: s }), s = h(s, 2);
|
|
175
|
+
return o;
|
|
176
|
+
}, De = (e, a, r) => {
|
|
177
|
+
const o = [], t = e.expectedDate;
|
|
178
|
+
let s = u(t, r) ? t : B(t, 1);
|
|
179
|
+
for (; u(s, r); )
|
|
180
|
+
f(s, a) && o.push({ ...e, expectedDate: s }), s = Y(s, 1);
|
|
181
|
+
return o;
|
|
182
|
+
}, _e = (e, a, r) => {
|
|
183
|
+
const o = [], t = e.expectedDate;
|
|
184
|
+
let s = u(t, r) ? t : B(t, 2);
|
|
185
|
+
for (; u(s, r); )
|
|
186
|
+
f(s, a) && o.push({ ...e, expectedDate: s }), s = Y(s, 2);
|
|
187
|
+
return o;
|
|
188
|
+
}, ve = (e, a, r) => {
|
|
189
|
+
const o = [], t = e.expectedDate;
|
|
190
|
+
let s = u(t, r) ? t : te(t, 1);
|
|
191
|
+
for (; u(s, r); )
|
|
192
|
+
f(s, a) && o.push({ ...e, expectedDate: s }), s = V(s, 1);
|
|
193
|
+
return o;
|
|
194
|
+
}, nt = (e, a) => {
|
|
195
|
+
const r = [];
|
|
196
|
+
for (const o of e) {
|
|
197
|
+
const t = me(o, a);
|
|
198
|
+
r.push(...t);
|
|
199
|
+
}
|
|
200
|
+
return r.sort(
|
|
201
|
+
(o, t) => y(o.occurredOnDate || o.expectedDate) - y(t.occurredOnDate || t.expectedDate)
|
|
202
|
+
);
|
|
203
|
+
}, ct = (e, a, r) => {
|
|
204
|
+
const o = [];
|
|
205
|
+
for (const t of a) {
|
|
206
|
+
const s = r.filter(
|
|
207
|
+
(c) => c.repeating_transaction_guid === t.guid
|
|
208
|
+
);
|
|
209
|
+
r.length > 0 && o.push({
|
|
210
|
+
...t,
|
|
211
|
+
account: e.find((c) => c.guid === t.account_guid),
|
|
212
|
+
transactions: s
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
return o;
|
|
216
|
+
}, it = (e) => e.reduce((a, r) => {
|
|
217
|
+
const o = X(r.expectedDate, { representation: "date" }), t = a.find(
|
|
218
|
+
(s) => s.date.toString() === r.expectedDate.toString()
|
|
219
|
+
);
|
|
220
|
+
return t ? t.recurrences.push(r) : a.push({
|
|
221
|
+
date: r.expectedDate,
|
|
222
|
+
id: `date-${o}`,
|
|
223
|
+
recurrences: [r]
|
|
224
|
+
}), a;
|
|
225
|
+
}, []), ut = (e, a, r) => {
|
|
226
|
+
const o = E(g(), a.recurrence_day), t = N(g(), a.recurrence_day), s = Q(a.recurrence_day), c = a.second_recurrence_day ? Q(a.second_recurrence_day) : "";
|
|
227
|
+
let i = r ? l(e.monthly_ordinal, s) : e.monthly;
|
|
228
|
+
switch (a.recurrence_type) {
|
|
229
|
+
case n.EveryQuarter:
|
|
230
|
+
i = r ? l(e.quarterly_ordinal, s) : e.quarterly;
|
|
231
|
+
break;
|
|
232
|
+
case n.EveryWeek:
|
|
233
|
+
i = r ? l(
|
|
234
|
+
e.weekly_ordinal,
|
|
235
|
+
x(o, k.DAY_OF_WEEK)
|
|
236
|
+
) : e.weekly;
|
|
237
|
+
break;
|
|
238
|
+
case n.EveryYear:
|
|
239
|
+
i = r ? l(
|
|
240
|
+
e.anually_ordinal,
|
|
241
|
+
x(t, k.MONTH_DAY)
|
|
242
|
+
) : e.anually;
|
|
243
|
+
break;
|
|
244
|
+
case n.EveryOtherWeek:
|
|
245
|
+
i = r ? l(
|
|
246
|
+
e.every_other_week_ordinal,
|
|
247
|
+
x(o, k.DAY_OF_WEEK)
|
|
248
|
+
) : e.every_other_week;
|
|
249
|
+
break;
|
|
250
|
+
case n.EveryOtherMonth:
|
|
251
|
+
i = r ? l(e.every_other_month_ordinal, s) : e.every_other_month;
|
|
252
|
+
break;
|
|
253
|
+
case n.EveryOtherQuarter:
|
|
254
|
+
i = r ? l(e.every_other_quarter_ordinal, s) : e.every_other_quarter;
|
|
255
|
+
break;
|
|
256
|
+
case n.TwiceAMonth:
|
|
257
|
+
i = r ? l(e.twice_a_month_ordinal, s, c) : e.twice_a_month;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
return i;
|
|
261
|
+
}, dt = (e, a, r) => {
|
|
262
|
+
let o = a;
|
|
263
|
+
r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? o = R(a, r) : e === n.EveryYear ? o = N(a, r) : o = D(a, r));
|
|
264
|
+
let t = o;
|
|
265
|
+
switch (e) {
|
|
266
|
+
case n.EveryWeek:
|
|
267
|
+
t = ie(o);
|
|
268
|
+
break;
|
|
269
|
+
case n.EveryOtherWeek:
|
|
270
|
+
t = ce(o);
|
|
271
|
+
break;
|
|
272
|
+
case n.EveryMonth:
|
|
273
|
+
t = ne(o);
|
|
274
|
+
break;
|
|
275
|
+
case n.EveryOtherMonth:
|
|
276
|
+
t = se(o);
|
|
277
|
+
break;
|
|
278
|
+
case n.EveryQuarter:
|
|
279
|
+
t = ae(o);
|
|
280
|
+
break;
|
|
281
|
+
case n.EveryOtherQuarter:
|
|
282
|
+
t = oe(o);
|
|
283
|
+
break;
|
|
284
|
+
case n.EveryYear:
|
|
285
|
+
t = re(o);
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
return t;
|
|
289
|
+
};
|
|
290
|
+
export {
|
|
291
|
+
at as D,
|
|
292
|
+
n as F,
|
|
293
|
+
P as R,
|
|
294
|
+
st as S,
|
|
295
|
+
ct as a,
|
|
296
|
+
nt as b,
|
|
297
|
+
p as c,
|
|
298
|
+
b as d,
|
|
299
|
+
dt as e,
|
|
300
|
+
it as f,
|
|
301
|
+
ut as g
|
|
302
|
+
};
|
package/dist/{RecurringTransactionsStore-Ce7p6L0E.mjs → RecurringTransactionsStore-DH8DEIAz.mjs}
RENAMED
|
@@ -8,7 +8,7 @@ import { startOfMonth as y } from "date-fns/startOfMonth";
|
|
|
8
8
|
import { startOfToday as i } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as I } from "date-fns/subDays";
|
|
10
10
|
import { F as x, A as o } from "./Fetch-C67go-m2.mjs";
|
|
11
|
-
import { a as u, b as A, c as r, d } from "./RecurringTransactions-
|
|
11
|
+
import { a as u, b as A, c as r, d } from "./RecurringTransactions-C8Cy-9DA.mjs";
|
|
12
12
|
var E = /* @__PURE__ */ ((a) => (a.Small = "small", a.Medium = "medium", a.Large = "large", a))(E || {});
|
|
13
13
|
const G = 44;
|
|
14
14
|
class h {
|
|
@@ -13,15 +13,15 @@ import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
|
|
|
13
13
|
import { u as R, A as x1 } from "../AccountDetailsHeader-BCi1WwkM.mjs";
|
|
14
14
|
import { L as w1 } from "../LineChart-Pu3pKqtQ.mjs";
|
|
15
15
|
import { g as b1, a as S1, b as R1 } from "../SpendingData-C3bN-37j.mjs";
|
|
16
|
-
import { m as T1, u as y, d as k, g as
|
|
16
|
+
import { m as T1, u as y, d as k, g as I, h as m1, b as G, a as E1 } from "../hooks-zu7yblbi.mjs";
|
|
17
17
|
import { A as N, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
|
|
18
18
|
import { I as _1, P as L1, S as f1 } from "../Account-DuOz1a27.mjs";
|
|
19
19
|
import { a as D1, b as k1 } from "../AccountFields-C-sby5mF.mjs";
|
|
20
20
|
import { g as i2 } from "../AccountFields-C-sby5mF.mjs";
|
|
21
21
|
import { A as U } from "../AccountListItem-Ceuh5WKe.mjs";
|
|
22
22
|
import a1 from "@mui/material/Tab";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import I1 from "@mui/material/Tabs";
|
|
24
|
+
import Z1 from "@mui/material/Switch";
|
|
25
25
|
import D from "@mui/material/ListItem";
|
|
26
26
|
import $ from "@mui/material/ListItemButton";
|
|
27
27
|
import O from "@mui/material/ListItemText";
|
|
@@ -73,15 +73,15 @@ const d3 = (t, o) => {
|
|
|
73
73
|
}, u3 = (t, o, n) => {
|
|
74
74
|
const [i, c] = t, l = i, u = c ?? i, a = [];
|
|
75
75
|
if (l && u && _1.includes(o)) {
|
|
76
|
-
const
|
|
77
|
-
a.push({ label: n.income_label, amount:
|
|
76
|
+
const r = l[l.length - 1].y;
|
|
77
|
+
a.push({ label: n.income_label, amount: r });
|
|
78
78
|
} else if (L1.includes(o)) {
|
|
79
|
-
const
|
|
80
|
-
a.push({ label: n.payments_label, amount:
|
|
79
|
+
const r = l[l.length - 1].y;
|
|
80
|
+
a.push({ label: n.payments_label, amount: r });
|
|
81
81
|
}
|
|
82
82
|
if (u && f1.includes(o)) {
|
|
83
|
-
const
|
|
84
|
-
a.push({ label: n.spending_label, amount:
|
|
83
|
+
const r = u[u.length - 1].y;
|
|
84
|
+
a.push({ label: n.spending_label, amount: r });
|
|
85
85
|
}
|
|
86
86
|
return a;
|
|
87
87
|
}, C3 = () => {
|
|
@@ -106,30 +106,31 @@ const d3 = (t, o) => {
|
|
|
106
106
|
}
|
|
107
107
|
) });
|
|
108
108
|
}, h3 = V(C3), J = ({
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
ariaPressed: t,
|
|
110
|
+
children: o,
|
|
111
|
+
isLast: n = !1,
|
|
112
|
+
onClick: i,
|
|
113
|
+
primaryText: c,
|
|
114
|
+
secondaryText: l
|
|
114
115
|
}) => /* @__PURE__ */ C(x, { children: [
|
|
115
|
-
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ C($, { onClick:
|
|
116
|
-
/* @__PURE__ */ e(O, { primary:
|
|
117
|
-
|
|
116
|
+
/* @__PURE__ */ e(D, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ C($, { "aria-pressed": t, onClick: i, children: [
|
|
117
|
+
/* @__PURE__ */ e(O, { primary: c, secondary: l }),
|
|
118
|
+
o
|
|
118
119
|
] }) }),
|
|
119
|
-
/* @__PURE__ */ e(b, { sx: { ml:
|
|
120
|
+
/* @__PURE__ */ e(b, { sx: { ml: n ? 0 : 24 } })
|
|
120
121
|
] }), m3 = () => {
|
|
121
122
|
const { accounts: t } = k(), { selectedAccount: o, selectedMember: n } = R();
|
|
122
123
|
return t.filter(
|
|
123
124
|
(i) => i.member_guid === n.guid && n.successfully_aggregated_at && i.guid !== o.guid
|
|
124
125
|
);
|
|
125
126
|
}, p3 = () => {
|
|
126
|
-
const [t, o] = h.useState(!1), [n, i] = h.useState(!1), [c, l] = h.useState(!1), [u, a] = h.useState({}), { selectedAccount:
|
|
127
|
+
const [t, o] = h.useState(!1), [n, i] = h.useState(!1), [c, l] = h.useState(!1), [u, a] = h.useState({}), { selectedAccount: r } = R(), { mergeAccounts: m, updateAccount: _ } = k(), { accounts: s } = y(), H = m3(), { onEvent: v } = I(), { modifyTransactionByAccountGuid: M } = m1(), w = async (p) => {
|
|
127
128
|
await _({
|
|
128
|
-
...
|
|
129
|
+
...r,
|
|
129
130
|
...p
|
|
130
|
-
}), "is_closed" in p && p.is_closed !==
|
|
131
|
-
},
|
|
132
|
-
m([
|
|
131
|
+
}), "is_closed" in p && p.is_closed !== r.is_closed && M(r.guid, { accountIsClosed: p.is_closed });
|
|
132
|
+
}, d = () => {
|
|
133
|
+
m([r.guid, u.guid]).finally(
|
|
133
134
|
() => i(!1)
|
|
134
135
|
);
|
|
135
136
|
};
|
|
@@ -138,12 +139,13 @@ const d3 = (t, o) => {
|
|
|
138
139
|
/* @__PURE__ */ e(
|
|
139
140
|
J,
|
|
140
141
|
{
|
|
142
|
+
ariaPressed: r.is_hidden,
|
|
141
143
|
onClick: () => {
|
|
142
|
-
w({ is_hidden: !
|
|
144
|
+
w({ is_hidden: !r.is_hidden }), v(S.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: r.guid });
|
|
143
145
|
},
|
|
144
|
-
primaryText:
|
|
145
|
-
secondaryText:
|
|
146
|
-
children: /* @__PURE__ */ e(
|
|
146
|
+
primaryText: r.is_hidden ? s.unhide_account : s.hide_Account,
|
|
147
|
+
secondaryText: r.is_hidden ? s.include_this_account : s.exclude_this_account,
|
|
148
|
+
children: /* @__PURE__ */ e(Z1, { "aria-hidden": !0, checked: r.is_hidden, tabIndex: -1 })
|
|
147
149
|
}
|
|
148
150
|
),
|
|
149
151
|
/* @__PURE__ */ e(
|
|
@@ -151,11 +153,11 @@ const d3 = (t, o) => {
|
|
|
151
153
|
{
|
|
152
154
|
onClick: () => {
|
|
153
155
|
o(!0), v(S.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
|
|
154
|
-
account_guid:
|
|
156
|
+
account_guid: r.guid
|
|
155
157
|
});
|
|
156
158
|
},
|
|
157
|
-
primaryText:
|
|
158
|
-
secondaryText:
|
|
159
|
+
primaryText: r.is_closed ? s.mark_as_open : s.mark_as_closed,
|
|
160
|
+
secondaryText: r.is_closed ? s.this_will_set_the_closed_account : s.this_will_set_the_account_balance_to_0,
|
|
159
161
|
children: /* @__PURE__ */ e(F, { name: "chevron_right" })
|
|
160
162
|
}
|
|
161
163
|
),
|
|
@@ -165,7 +167,7 @@ const d3 = (t, o) => {
|
|
|
165
167
|
isLast: !0,
|
|
166
168
|
onClick: () => {
|
|
167
169
|
i(!0), v(S.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
|
|
168
|
-
account_guid:
|
|
170
|
+
account_guid: r.guid
|
|
169
171
|
});
|
|
170
172
|
},
|
|
171
173
|
primaryText: s.mark_as_duplicate,
|
|
@@ -178,16 +180,16 @@ const d3 = (t, o) => {
|
|
|
178
180
|
{
|
|
179
181
|
copy: {
|
|
180
182
|
close_aria: s.close_modal,
|
|
181
|
-
title:
|
|
183
|
+
title: r.is_closed ? s.confirm_mark_as_open : s.confirm_mark_closed
|
|
182
184
|
},
|
|
183
185
|
isOpen: t,
|
|
184
186
|
onClose: () => {
|
|
185
187
|
o(!1);
|
|
186
188
|
},
|
|
187
|
-
onPrimaryAction: () => w({ is_closed: !
|
|
189
|
+
onPrimaryAction: () => w({ is_closed: !r.is_closed }),
|
|
188
190
|
children: /* @__PURE__ */ e(g, { truncate: !1, children: f(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
r.is_closed ? s.this_will_resume_updating_the_balance : s.this_will_set_the_balance_of_your_account,
|
|
192
|
+
r.name
|
|
191
193
|
) })
|
|
192
194
|
}
|
|
193
195
|
),
|
|
@@ -199,7 +201,7 @@ const d3 = (t, o) => {
|
|
|
199
201
|
onClose: () => i(!1),
|
|
200
202
|
title: s.mark_as_duplicate,
|
|
201
203
|
children: /* @__PURE__ */ e(E, { children: H.map((p) => {
|
|
202
|
-
const
|
|
204
|
+
const Z = H.indexOf(p) === H.length - 1;
|
|
203
205
|
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
204
206
|
/* @__PURE__ */ e(
|
|
205
207
|
U,
|
|
@@ -210,7 +212,7 @@ const d3 = (t, o) => {
|
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
214
|
),
|
|
213
|
-
/* @__PURE__ */ e(E, { sx: { ml:
|
|
215
|
+
/* @__PURE__ */ e(E, { sx: { ml: Z ? 0 : 24 } })
|
|
214
216
|
] }, p.guid);
|
|
215
217
|
}) })
|
|
216
218
|
}
|
|
@@ -224,11 +226,11 @@ const d3 = (t, o) => {
|
|
|
224
226
|
},
|
|
225
227
|
isOpen: c,
|
|
226
228
|
onClose: () => l(!1),
|
|
227
|
-
onPrimaryAction:
|
|
229
|
+
onPrimaryAction: d,
|
|
228
230
|
children: [
|
|
229
231
|
/* @__PURE__ */ e(g, { truncate: !1, children: f(
|
|
230
232
|
s.this_means_accounts_will_be_merged,
|
|
231
|
-
|
|
233
|
+
r.name,
|
|
232
234
|
u.name
|
|
233
235
|
) }),
|
|
234
236
|
/* @__PURE__ */ e(g, { color: "error", sx: { mt: 24 }, children: s.this_action_cannot_be_undone })
|
|
@@ -467,7 +469,7 @@ const d3 = (t, o) => {
|
|
|
467
469
|
)
|
|
468
470
|
] });
|
|
469
471
|
}, f3 = V(L3), g3 = ({ field: t, isOpen: o, onClose: n }) => {
|
|
470
|
-
const { updateAccount: i } = k(), { selectedAccount: c } = R(), { accounts: l } = y(), [u, a] = h.useState(c[t.name]), [
|
|
472
|
+
const { updateAccount: i } = k(), { selectedAccount: c } = R(), { accounts: l } = y(), [u, a] = h.useState(c[t.name]), [r, m] = h.useState(""), [_, s] = h.useState(!0), H = () => {
|
|
471
473
|
a(""), m(""), n();
|
|
472
474
|
}, v = () => {
|
|
473
475
|
switch (t.type) {
|
|
@@ -485,10 +487,10 @@ const d3 = (t, o) => {
|
|
|
485
487
|
},
|
|
486
488
|
label: t.label,
|
|
487
489
|
labelId: `${t.label}-select-label`,
|
|
488
|
-
onChange: (
|
|
490
|
+
onChange: (d) => a(d.target.value),
|
|
489
491
|
placeholder: t.placeholder,
|
|
490
492
|
value: u,
|
|
491
|
-
children: t.options?.map((
|
|
493
|
+
children: t.options?.map((d) => /* @__PURE__ */ e(j1, { value: d.value, children: d.label }, d.value))
|
|
492
494
|
}
|
|
493
495
|
)
|
|
494
496
|
] });
|
|
@@ -511,8 +513,8 @@ const d3 = (t, o) => {
|
|
|
511
513
|
{
|
|
512
514
|
maxDate: U1(/* @__PURE__ */ new Date(), 1),
|
|
513
515
|
minDate: /* @__PURE__ */ new Date(),
|
|
514
|
-
onChange: (
|
|
515
|
-
c[t.name] && Number(c[t.name]) <= 31 ? a(
|
|
516
|
+
onChange: (d) => {
|
|
517
|
+
c[t.name] && Number(c[t.name]) <= 31 ? a(d.getDate()) : a(d);
|
|
516
518
|
},
|
|
517
519
|
sx: {
|
|
518
520
|
"& .MuiPickersDay-today": {
|
|
@@ -521,7 +523,7 @@ const d3 = (t, o) => {
|
|
|
521
523
|
"& .MuiPickersArrowSwitcher-button": {
|
|
522
524
|
color: "primary.lighter",
|
|
523
525
|
"&:hover": {
|
|
524
|
-
backgroundColor: (
|
|
526
|
+
backgroundColor: (d) => y1(d.palette.primary.light, 0.1)
|
|
525
527
|
}
|
|
526
528
|
}
|
|
527
529
|
},
|
|
@@ -533,9 +535,9 @@ const d3 = (t, o) => {
|
|
|
533
535
|
J1,
|
|
534
536
|
{
|
|
535
537
|
defaultValue: c[t.name],
|
|
536
|
-
error: !!
|
|
538
|
+
error: !!r,
|
|
537
539
|
fullWidth: !0,
|
|
538
|
-
helperText:
|
|
540
|
+
helperText: r,
|
|
539
541
|
inputProps: {
|
|
540
542
|
"aria-label": t.placeholder
|
|
541
543
|
},
|
|
@@ -549,8 +551,8 @@ const d3 = (t, o) => {
|
|
|
549
551
|
...c,
|
|
550
552
|
[t.name]: u
|
|
551
553
|
}), H();
|
|
552
|
-
}, w = (
|
|
553
|
-
a(
|
|
554
|
+
}, w = (d) => {
|
|
555
|
+
a(d.target.value), t.validation && m(t.validation(d.target.value));
|
|
554
556
|
};
|
|
555
557
|
return /* @__PURE__ */ e(
|
|
556
558
|
Q,
|
|
@@ -559,7 +561,7 @@ const d3 = (t, o) => {
|
|
|
559
561
|
close_aria: l.close_aria,
|
|
560
562
|
title: f(l.edit_field, t.label)
|
|
561
563
|
},
|
|
562
|
-
disablePrimaryButton: !!
|
|
564
|
+
disablePrimaryButton: !!r || !_,
|
|
563
565
|
isOpen: o,
|
|
564
566
|
onClose: H,
|
|
565
567
|
onPrimaryAction: M,
|
|
@@ -575,7 +577,7 @@ const d3 = (t, o) => {
|
|
|
575
577
|
}
|
|
576
578
|
);
|
|
577
579
|
}, H3 = V(g3), A3 = () => {
|
|
578
|
-
const t = window.app?.config, { onEvent: o } =
|
|
580
|
+
const t = window.app?.config, { onEvent: o } = I(), { selectedAccount: n } = R(), { accounts: i } = y(), c = D1(n, i), l = n.member_is_managed_by_user || !n.member_is_managed_by_user && t.enable_renaming_home_accounts, [u, a] = h.useState(!1), [r, m] = h.useState(c[0]), _ = c.filter(
|
|
579
581
|
(s) => l || n[s.name] || n[s.name] === 0
|
|
580
582
|
);
|
|
581
583
|
return /* @__PURE__ */ C(x, { children: [
|
|
@@ -607,17 +609,17 @@ const d3 = (t, o) => {
|
|
|
607
609
|
/* @__PURE__ */ e(b, { sx: { ml: v ? 0 : 24 } })
|
|
608
610
|
] }) }, s.name);
|
|
609
611
|
}),
|
|
610
|
-
u &&
|
|
612
|
+
u && r && /* @__PURE__ */ e(
|
|
611
613
|
H3,
|
|
612
614
|
{
|
|
613
|
-
field:
|
|
615
|
+
field: r,
|
|
614
616
|
isOpen: u,
|
|
615
617
|
onClose: () => a(!1)
|
|
616
618
|
}
|
|
617
619
|
)
|
|
618
620
|
] });
|
|
619
621
|
}, V3 = V(A3), v3 = () => {
|
|
620
|
-
const { onEvent: t } =
|
|
622
|
+
const { onEvent: t } = I();
|
|
621
623
|
return h.useEffect(() => t(S.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ C(E, { children: [
|
|
622
624
|
/* @__PURE__ */ e(V3, {}),
|
|
623
625
|
/* @__PURE__ */ e(f3, {}),
|
|
@@ -681,13 +683,13 @@ const d3 = (t, o) => {
|
|
|
681
683
|
)
|
|
682
684
|
] });
|
|
683
685
|
}, x3 = V(y3), w3 = () => {
|
|
684
|
-
const [t, o] = h.useState(""), { onEvent: n } =
|
|
686
|
+
const [t, o] = h.useState(""), { onEvent: n } = I(), { selectedAccount: i } = R(), { accounts: c } = y(), { isTransactionDataLoaded: l, loadTransactionData: u, setFilter: a, sortedTransactions: r } = m1();
|
|
685
687
|
h.useEffect(() => {
|
|
686
688
|
l || u().finally();
|
|
687
689
|
}, []);
|
|
688
690
|
const m = h.useMemo(
|
|
689
|
-
() =>
|
|
690
|
-
[t,
|
|
691
|
+
() => r.find((_) => _.guid === t),
|
|
692
|
+
[t, r]
|
|
691
693
|
);
|
|
692
694
|
return h.useEffect(() => {
|
|
693
695
|
a({
|
|
@@ -712,7 +714,7 @@ const d3 = (t, o) => {
|
|
|
712
714
|
return /* @__PURE__ */ C(x, { children: [
|
|
713
715
|
/* @__PURE__ */ e(x3, { setTabValue: o }),
|
|
714
716
|
/* @__PURE__ */ C(
|
|
715
|
-
|
|
717
|
+
I1,
|
|
716
718
|
{
|
|
717
719
|
"aria-label": n.transactions_and_details_aria,
|
|
718
720
|
centered: !0,
|
|
@@ -744,30 +746,30 @@ const d3 = (t, o) => {
|
|
|
744
746
|
/* @__PURE__ */ e(r1, { index: 1, name: "account-details", value: t, children: /* @__PURE__ */ e(M3, {}) })
|
|
745
747
|
] });
|
|
746
748
|
}, R3 = V(S3), T3 = () => {
|
|
747
|
-
const [t, o] = h.useState(""), { accounts: n } = y(), { allSelectedAccounts: i } = G(), { setSelectedAccount: c, setSelectedMember: l } = R(), { members: u } = k(), { onEvent: a } =
|
|
748
|
-
() => i.filter((
|
|
749
|
+
const [t, o] = h.useState(""), { accounts: n } = y(), { allSelectedAccounts: i } = G(), { setSelectedAccount: c, setSelectedMember: l } = R(), { members: u } = k(), { onEvent: a } = I(), r = [...new Set(i.map((d) => d.account_type))], m = i.find((d) => t === d.guid), _ = h.useMemo(
|
|
750
|
+
() => i.filter((d) => d.is_hidden),
|
|
749
751
|
[i]
|
|
750
752
|
), s = h.useMemo(
|
|
751
|
-
() => i.filter((
|
|
753
|
+
() => i.filter((d) => d.is_closed),
|
|
752
754
|
[i]
|
|
753
755
|
), H = _.reduce(
|
|
754
|
-
(
|
|
756
|
+
(d, p) => (p.available_balance || p.balance || 0) + d,
|
|
755
757
|
0
|
|
756
758
|
), v = k1(s, n);
|
|
757
759
|
h.useEffect(() => {
|
|
758
760
|
if (m) {
|
|
759
761
|
c(m);
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
+
const d = u.find((p) => p.guid === m?.member_guid) || {};
|
|
763
|
+
d && l(d);
|
|
762
764
|
}
|
|
763
765
|
}, [m, t]);
|
|
764
|
-
const M = (
|
|
765
|
-
o(
|
|
766
|
-
account_guid:
|
|
767
|
-
account_type:
|
|
766
|
+
const M = (d) => {
|
|
767
|
+
o(d.guid), a(S.ACCOUNTS_CLICK_ACCOUNT, {
|
|
768
|
+
account_guid: d.guid,
|
|
769
|
+
account_type: d.account_type
|
|
768
770
|
});
|
|
769
|
-
}, w = (
|
|
770
|
-
const p =
|
|
771
|
+
}, w = (d) => {
|
|
772
|
+
const p = d === "hidden" ? _ : s, Z = d === "hidden" ? H : v, A = d === "hidden" ? n.account_hidden : n.account_closed;
|
|
771
773
|
return /* @__PURE__ */ e(c1, { children: /* @__PURE__ */ e(
|
|
772
774
|
E,
|
|
773
775
|
{
|
|
@@ -780,7 +782,7 @@ const d3 = (t, o) => {
|
|
|
780
782
|
sx: { justifyContent: "space-between", color: "grey.700" },
|
|
781
783
|
children: [
|
|
782
784
|
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: A }),
|
|
783
|
-
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(
|
|
785
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(Z, "0,0.00") })
|
|
784
786
|
]
|
|
785
787
|
}
|
|
786
788
|
) }),
|
|
@@ -795,7 +797,7 @@ const d3 = (t, o) => {
|
|
|
795
797
|
shouldShowConnectionStatus: !0
|
|
796
798
|
}
|
|
797
799
|
),
|
|
798
|
-
|
|
800
|
+
d === "hidden" ? /* @__PURE__ */ e(
|
|
799
801
|
b,
|
|
800
802
|
{
|
|
801
803
|
sx: {
|
|
@@ -818,10 +820,10 @@ const d3 = (t, o) => {
|
|
|
818
820
|
) });
|
|
819
821
|
};
|
|
820
822
|
return /* @__PURE__ */ C(c1, { sx: { pt: 24 }, children: [
|
|
821
|
-
|
|
823
|
+
r.map((d) => {
|
|
822
824
|
const p = i.filter(
|
|
823
|
-
(A) => A.account_type ===
|
|
824
|
-
),
|
|
825
|
+
(A) => A.account_type === d && !A.is_closed && !A.is_hidden
|
|
826
|
+
), Z = p.reduce(
|
|
825
827
|
(A, T) => (T.balance || 0) + A,
|
|
826
828
|
0
|
|
827
829
|
);
|
|
@@ -836,8 +838,8 @@ const d3 = (t, o) => {
|
|
|
836
838
|
direction: "row",
|
|
837
839
|
sx: { display: "flex", justifyContent: "space-between" },
|
|
838
840
|
children: [
|
|
839
|
-
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: n.account_types[
|
|
840
|
-
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(
|
|
841
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: n.account_types[d] }),
|
|
842
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: d1(Z, "0,0.00") })
|
|
841
843
|
]
|
|
842
844
|
}
|
|
843
845
|
) }),
|
|
@@ -864,7 +866,7 @@ const d3 = (t, o) => {
|
|
|
864
866
|
] }, A.guid);
|
|
865
867
|
}) })
|
|
866
868
|
},
|
|
867
|
-
|
|
869
|
+
d
|
|
868
870
|
);
|
|
869
871
|
}),
|
|
870
872
|
_.length > 0 && w("hidden"),
|
|
@@ -884,16 +886,16 @@ const d3 = (t, o) => {
|
|
|
884
886
|
)
|
|
885
887
|
] });
|
|
886
888
|
}, E3 = V(T3), D3 = ({ onBackClick: t, sx: o = {} }) => {
|
|
887
|
-
const [n, i] = h.useState(!1), [c, l] = h.useState(!1), { config: u } = E1(), { isAccountDataLoaded: a, loadAccountData:
|
|
889
|
+
const [n, i] = h.useState(!1), [c, l] = h.useState(!1), { config: u } = E1(), { isAccountDataLoaded: a, loadAccountData: r } = k(), { accounts: m, connect: _ } = y(), { isInitialized: s, selectedAccountGuids: H } = G(), { isDesktop: v } = H1(), { onEvent: M } = I();
|
|
888
890
|
n1({
|
|
889
891
|
widgetName: "AccountsWidget",
|
|
890
892
|
isLoaded: a
|
|
891
893
|
}), h.useEffect(() => {
|
|
892
|
-
a ||
|
|
894
|
+
a || r().finally();
|
|
893
895
|
}, []);
|
|
894
896
|
const w = () => {
|
|
895
897
|
i(!0), M(S.ACCOUNTS_CLICK_CONNECT);
|
|
896
|
-
},
|
|
898
|
+
}, d = () => {
|
|
897
899
|
l(!0), M(S.ACCOUNTS_CLICK_CONNECT);
|
|
898
900
|
};
|
|
899
901
|
return s ? /* @__PURE__ */ C(
|
|
@@ -904,7 +906,7 @@ const d3 = (t, o) => {
|
|
|
904
906
|
{
|
|
905
907
|
iconName: "credit_card_gear",
|
|
906
908
|
label: m.manage,
|
|
907
|
-
onClick:
|
|
909
|
+
onClick: d
|
|
908
910
|
}
|
|
909
911
|
] : [],
|
|
910
912
|
onAccountsFilterClick: () => M(S.ACCOUNTS_CLICK_FILTER),
|
|
@@ -946,15 +948,15 @@ function k3(t) {
|
|
|
946
948
|
externalAccounts: C1(n)
|
|
947
949
|
};
|
|
948
950
|
}
|
|
949
|
-
function
|
|
951
|
+
function I3(t, o) {
|
|
950
952
|
const { heldAccounts: n, externalAccounts: i } = k3(t), c = n.slice(0, o);
|
|
951
953
|
return c.length < o && c.push(...i.slice(0, o - c.length)), c;
|
|
952
954
|
}
|
|
953
|
-
const
|
|
955
|
+
const Z3 = {
|
|
954
956
|
[N.CHECKING]: 1,
|
|
955
957
|
[N.SAVINGS]: 2,
|
|
956
958
|
[N.CREDIT_CARD]: 3
|
|
957
|
-
}, u1 = (t) =>
|
|
959
|
+
}, u1 = (t) => Z3[t] ?? t + 100, C1 = (t) => t.sort((o, n) => {
|
|
958
960
|
const i = u1(o.account_type), c = u1(n.account_type), l = i - c;
|
|
959
961
|
if (l !== 0) return l;
|
|
960
962
|
const u = o.name ?? o.feed_name ?? "", a = n.name ?? n.feed_name ?? "";
|
|
@@ -967,8 +969,8 @@ const I3 = {
|
|
|
967
969
|
}), h.useEffect(() => {
|
|
968
970
|
n || i().finally();
|
|
969
971
|
}, []);
|
|
970
|
-
const
|
|
971
|
-
() =>
|
|
972
|
+
const r = h.useMemo(
|
|
973
|
+
() => I3(u, a ? 5 : 3),
|
|
972
974
|
[u, a]
|
|
973
975
|
);
|
|
974
976
|
return l ? /* @__PURE__ */ e(
|
|
@@ -981,8 +983,8 @@ const I3 = {
|
|
|
981
983
|
title: c.mini_title,
|
|
982
984
|
children: n ? /* @__PURE__ */ C(E, { children: [
|
|
983
985
|
u.length === 0 && /* @__PURE__ */ e(D, { sx: { justifyContent: "center" }, children: c.no_accounts }),
|
|
984
|
-
|
|
985
|
-
const s =
|
|
986
|
+
r.map((m, _) => {
|
|
987
|
+
const s = r.indexOf(m) === r.length - 1;
|
|
986
988
|
return /* @__PURE__ */ C(h.Fragment, { children: [
|
|
987
989
|
/* @__PURE__ */ e(
|
|
988
990
|
U,
|
package/dist/budgets/index.es.js
CHANGED
|
@@ -46,7 +46,7 @@ import { u as it, b as ct } from "../CategorySelectorDrawer-BMmxw2oY.mjs";
|
|
|
46
46
|
import We from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as lt } from "date-fns/subDays";
|
|
48
48
|
import dt from "@mui/material/IconButton";
|
|
49
|
-
import { M as ut } from "../ManageIncome-
|
|
49
|
+
import { M as ut } from "../ManageIncome-Bx6Uw4fv.mjs";
|
|
50
50
|
import { u as He } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
51
51
|
import { W as mt } from "../WidgetContainer-sC5KLXHI.mjs";
|
|
52
52
|
import { u as gt } from "../BudgetUtil-CTpLz9lw.mjs";
|
|
@@ -18,7 +18,7 @@ import { b as $ } from "../Localization-2MODESHW.mjs";
|
|
|
18
18
|
import { M as Je } from "../MiniWidgetContainer-DhEx4qKi.mjs";
|
|
19
19
|
import { E as Ze } from "../EmptyState-DHAkGsjk.mjs";
|
|
20
20
|
import { u as Oe } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
21
|
-
import { R as et } from "../RecurringSettings-
|
|
21
|
+
import { R as et } from "../RecurringSettings-DYx5S95u.mjs";
|
|
22
22
|
import tt from "@mui/material/Tabs";
|
|
23
23
|
import ye from "@mui/material/Tab";
|
|
24
24
|
import { getUnixTime as z } from "date-fns/getUnixTime";
|
|
@@ -36,7 +36,7 @@ import { alpha as at, keyframes as it } from "@mui/material/styles";
|
|
|
36
36
|
import { DataGridPro as rt } from "@mui/x-data-grid-pro";
|
|
37
37
|
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
38
38
|
import G from "@mui/material/Button";
|
|
39
|
-
import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-
|
|
39
|
+
import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-Bx6Uw4fv.mjs";
|
|
40
40
|
import { D as Ge } from "../Drawer-DV4NTsFg.mjs";
|
|
41
41
|
import { subDays as Me } from "date-fns/subDays";
|
|
42
42
|
import { endOfToday as mt } from "date-fns/endOfToday";
|
|
@@ -47,7 +47,7 @@ import { formatISO as ht } from "date-fns/formatISO";
|
|
|
47
47
|
import { fromUnixTime as De } from "date-fns/fromUnixTime";
|
|
48
48
|
import { startOfMonth as pt } from "date-fns/startOfMonth";
|
|
49
49
|
import { S as ft, a as gt } from "../TransactionList-BibbhhS9.mjs";
|
|
50
|
-
import { F as bt, R as ve, e as Ae } from "../RecurringTransactions-
|
|
50
|
+
import { F as bt, R as ve, e as Ae } from "../RecurringTransactions-C8Cy-9DA.mjs";
|
|
51
51
|
import { h as xt } from "../DateUtil-CVXVMbjf.mjs";
|
|
52
52
|
import { F as Ct, A as j } from "../Fetch-C67go-m2.mjs";
|
|
53
53
|
const V = () => {
|
package/dist/common/index.es.js
CHANGED
|
@@ -23,7 +23,7 @@ import { T as W } from "../TransactionStore-Cv-7GLPT.mjs";
|
|
|
23
23
|
import { S as ds } from "../TransactionStore-Cv-7GLPT.mjs";
|
|
24
24
|
import { T as hs } from "../TabContentContainer-j01JYR_7.mjs";
|
|
25
25
|
import { I as ps } from "../IconBacking-B9oC6uL2.mjs";
|
|
26
|
-
import { D as fs, F as ms, c as ys, d as Ss, R as bs, S as ws } from "../RecurringTransactions-
|
|
26
|
+
import { D as fs, F as ms, c as ys, d as Ss, R as bs, S as ws } from "../RecurringTransactions-C8Cy-9DA.mjs";
|
|
27
27
|
import { C as q } from "../CashflowStore-DEdQJU5i.mjs";
|
|
28
28
|
import { I as Ds } from "../CashflowStore-DEdQJU5i.mjs";
|
|
29
29
|
import { d as Y } from "../GoalStore-XHAvX1lP.mjs";
|
|
@@ -49,8 +49,8 @@ import { I as dr, P as lr, S as hr } from "../Account-DuOz1a27.mjs";
|
|
|
49
49
|
import { b as f } from "../Category-CevNQ03n.mjs";
|
|
50
50
|
import { C as pr, c as _r, a as fr, P as mr } from "../Category-CevNQ03n.mjs";
|
|
51
51
|
import { C as Sr, f as br, b as wr, a as Cr, g as Dr, i as Ar } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
52
|
-
import { R as V } from "../RecurringTransactionsStore-
|
|
53
|
-
import { S as xr, T as Tr } from "../RecurringTransactionsStore-
|
|
52
|
+
import { R as V } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
|
|
53
|
+
import { S as xr, T as Tr } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
|
|
54
54
|
import { G as Br, C as vr, D as Mr, W as kr, d as Nr, a as Ur, i as Lr, t as Or, m as Pr, v as Rr, w as $r, g as Fr, y as Gr, u as Hr, f as Wr, b as qr, l as Yr, z as Qr, s as Kr, x as zr, c as jr, q as Vr, n as Xr, A as Zr, j as Jr, r as to, h as eo, B as so, o as ro, p as oo } from "../hooks-zu7yblbi.mjs";
|
|
55
55
|
import { u as io } from "../useAccountDisplayName-CxYB0Wpw.mjs";
|
|
56
56
|
import { u as co } from "../useInsightsEnabled-CYLDtNYt.mjs";
|
|
@@ -37,7 +37,7 @@ import $n from "@mui/material/ListItemButton";
|
|
|
37
37
|
import En from "@mui/material/ListSubheader";
|
|
38
38
|
import { f as W } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
39
39
|
import { b as V } from "../Localization-2MODESHW.mjs";
|
|
40
|
-
import { S as it, F as Mt, e as zn, R as Dt } from "../RecurringTransactions-
|
|
40
|
+
import { S as it, F as Mt, e as zn, R as Dt } from "../RecurringTransactions-C8Cy-9DA.mjs";
|
|
41
41
|
import { A as He } from "../Account-BiB1F8lL.mjs";
|
|
42
42
|
import { S as Gn } from "../StatusBar-BK_uYHAB.mjs";
|
|
43
43
|
import { h as It } from "../DateUtil-CVXVMbjf.mjs";
|
|
@@ -56,10 +56,10 @@ import { formatISO as oo } from "date-fns/formatISO";
|
|
|
56
56
|
import { fromUnixTime as ro } from "date-fns/fromUnixTime";
|
|
57
57
|
import { startOfToday as st } from "date-fns/startOfToday";
|
|
58
58
|
import { subDays as ao } from "date-fns/subDays";
|
|
59
|
-
import { c as io, d as ct, S as so, i as co } from "../ManageIncome-
|
|
59
|
+
import { c as io, d as ct, S as so, i as co } from "../ManageIncome-Bx6Uw4fv.mjs";
|
|
60
60
|
import { LocalizationProvider as lo, DatePicker as po, StaticDatePicker as _o } from "@mui/x-date-pickers";
|
|
61
61
|
import { AdapterDateFns as Ot } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
62
|
-
import { R as uo } from "../RecurringSettings-
|
|
62
|
+
import { R as uo } from "../RecurringSettings-DYx5S95u.mjs";
|
|
63
63
|
import { LocalizationProvider as ho } from "@mui/x-date-pickers/LocalizationProvider";
|
|
64
64
|
import { format as mo } from "date-fns/format";
|
|
65
65
|
import go from "@mui/lab/Timeline";
|
|
@@ -6,8 +6,8 @@ import { endOfToday as Z } from "date-fns/endOfToday";
|
|
|
6
6
|
import { startOfMonth as G } from "date-fns/startOfMonth";
|
|
7
7
|
import { startOfToday as J } from "date-fns/startOfToday";
|
|
8
8
|
import { subDays as Q } from "date-fns/subDays";
|
|
9
|
-
import { R as Te } from "../RecurringSettings-
|
|
10
|
-
import { M as Ln } from "../RecurringSettings-
|
|
9
|
+
import { R as Te } from "../RecurringSettings-DYx5S95u.mjs";
|
|
10
|
+
import { M as Ln } from "../RecurringSettings-DYx5S95u.mjs";
|
|
11
11
|
import { addMonths as $e } from "date-fns/addMonths";
|
|
12
12
|
import { subMonths as Be } from "date-fns/subMonths";
|
|
13
13
|
import { isBefore as Pe } from "date-fns/isBefore";
|
|
@@ -28,9 +28,9 @@ import Je from "@mui/material/Badge";
|
|
|
28
28
|
import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
|
|
29
29
|
import { I as P } from "../IconBacking-B9oC6uL2.mjs";
|
|
30
30
|
import { u as R, b as H, j as _, g as z, p as Se, h as ne } from "../hooks-zu7yblbi.mjs";
|
|
31
|
-
import { d as I, c as T, g as xe, f as et } from "../RecurringTransactions-
|
|
32
|
-
import { T as O } from "../RecurringTransactionsStore-
|
|
33
|
-
import { R as En } from "../RecurringTransactionsStore-
|
|
31
|
+
import { d as I, c as T, g as xe, f as et } from "../RecurringTransactions-C8Cy-9DA.mjs";
|
|
32
|
+
import { T as O } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
|
|
33
|
+
import { R as En } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
|
|
34
34
|
import { A as S } from "../Analytics-i5h6BxR1.mjs";
|
|
35
35
|
import tt from "@mui/material/Button";
|
|
36
36
|
import q from "@mui/material/Divider";
|
|
@@ -40,8 +40,8 @@ import nt from "@mui/material/ListSubheader";
|
|
|
40
40
|
import rt from "@mui/material/ListItemAvatar";
|
|
41
41
|
import it from "@mui/material/ListItemButton";
|
|
42
42
|
import ot from "@mui/material/ListItemText";
|
|
43
|
-
import { b as at } from "../ManageIncome-
|
|
44
|
-
import { c as Gn, M as On, S as kn } from "../ManageIncome-
|
|
43
|
+
import { b as at } from "../ManageIncome-Bx6Uw4fv.mjs";
|
|
44
|
+
import { c as Gn, M as On, S as kn } from "../ManageIncome-Bx6Uw4fv.mjs";
|
|
45
45
|
import { f as M } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
46
46
|
import { D as re } from "../Drawer-DV4NTsFg.mjs";
|
|
47
47
|
import { b as E } from "../Localization-2MODESHW.mjs";
|
package/package.json
CHANGED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { jsxs as M, Fragment as P, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import L from "@mui/material/Avatar";
|
|
3
|
-
import w from "@mui/material/ListItem";
|
|
4
|
-
import U from "@mui/material/ListItemAvatar";
|
|
5
|
-
import G from "@mui/material/ListItemButton";
|
|
6
|
-
import S from "@mui/material/ListItemText";
|
|
7
|
-
import { Icon as I, IconWeight as C } from "@mxenabled/mxui";
|
|
8
|
-
import $ from "@mui/material/ListItemIcon";
|
|
9
|
-
import j from "@mui/material/MenuItem";
|
|
10
|
-
import z from "@mui/material/TextField";
|
|
11
|
-
import { ExpandMore as K } from "@mxenabled/mx-icons";
|
|
12
|
-
import { addDays as Q } from "date-fns/addDays";
|
|
13
|
-
import { addMonths as f } from "date-fns/addMonths";
|
|
14
|
-
import { addQuarters as A } from "date-fns/addQuarters";
|
|
15
|
-
import { addYears as H } from "date-fns/addYears";
|
|
16
|
-
import { formatISO as V } from "date-fns/formatISO";
|
|
17
|
-
import { fromUnixTime as X } from "date-fns/fromUnixTime";
|
|
18
|
-
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
19
|
-
import { isAfter as h } from "date-fns/isAfter";
|
|
20
|
-
import { isBefore as u } from "date-fns/isBefore";
|
|
21
|
-
import { isSameDay as J } from "date-fns/isSameDay";
|
|
22
|
-
import { lastDayOfMonth as Z } from "date-fns/lastDayOfMonth";
|
|
23
|
-
import { nextDay as g } from "date-fns/nextDay";
|
|
24
|
-
import { parseISO as T } from "date-fns/parseISO";
|
|
25
|
-
import { setDate as D } from "date-fns/setDate";
|
|
26
|
-
import { setDay as F } from "date-fns/setDay";
|
|
27
|
-
import { setDayOfYear as Y } from "date-fns/setDayOfYear";
|
|
28
|
-
import { startOfToday as b } from "date-fns/startOfToday";
|
|
29
|
-
import { subDays as _ } from "date-fns/subDays";
|
|
30
|
-
import { subMonths as R } from "date-fns/subMonths";
|
|
31
|
-
import { subQuarters as N } from "date-fns/subQuarters";
|
|
32
|
-
import { subYears as q } from "date-fns/subYears";
|
|
33
|
-
import { g as ee, a as te, b as re, c as oe, d as ae, e as se, f as ne } from "./DateUtil-CVXVMbjf.mjs";
|
|
34
|
-
import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
35
|
-
import { b as l } from "./Localization-2MODESHW.mjs";
|
|
36
|
-
import { f as k, D as E } from "./DateFormats-Cs-NbEZ7.mjs";
|
|
37
|
-
const ce = ({ iconName: e, label: s, onClick: r, value: a }) => {
|
|
38
|
-
const t = /* @__PURE__ */ M(P, { children: [
|
|
39
|
-
/* @__PURE__ */ d(U, { children: /* @__PURE__ */ d(L, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ d(I, { name: e, sx: { color: "text.primary" }, weight: C.Dark }) }) }),
|
|
40
|
-
/* @__PURE__ */ d(
|
|
41
|
-
S,
|
|
42
|
-
{
|
|
43
|
-
primary: s,
|
|
44
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
45
|
-
secondary: a,
|
|
46
|
-
secondaryTypographyProps: { color: "text.default", variant: "Body", fontWeight: 600 }
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
] });
|
|
50
|
-
return r ? /* @__PURE__ */ d(w, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ M(G, { onClick: r, children: [
|
|
51
|
-
t,
|
|
52
|
-
/* @__PURE__ */ d($, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
|
|
53
|
-
] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: t });
|
|
54
|
-
}, et = ce, tt = ({ label: e, onChange: s, options: r, value: a, ...t }) => /* @__PURE__ */ d(
|
|
55
|
-
z,
|
|
56
|
-
{
|
|
57
|
-
InputLabelProps: { shrink: !0 },
|
|
58
|
-
SelectProps: {
|
|
59
|
-
IconComponent: (c) => /* @__PURE__ */ d(K, { size: 20, sx: { mr: 4 }, ...c })
|
|
60
|
-
},
|
|
61
|
-
defaultValue: 0,
|
|
62
|
-
label: e,
|
|
63
|
-
onChange: (c) => {
|
|
64
|
-
s(Number(c.target.value));
|
|
65
|
-
},
|
|
66
|
-
select: !0,
|
|
67
|
-
value: a,
|
|
68
|
-
variant: "outlined",
|
|
69
|
-
...t,
|
|
70
|
-
children: r.map((c) => /* @__PURE__ */ d(j, { value: c.id, children: c.label }, c.id))
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
var n = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(n || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), O = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(O || {}), B = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(B || {});
|
|
74
|
-
const ie = (e) => {
|
|
75
|
-
if (!e) return "";
|
|
76
|
-
let s = e.user_name || e.feed_name || "";
|
|
77
|
-
return e.account_number && (s = `${s} *${e.account_number}`), s;
|
|
78
|
-
}, ue = (e, s) => {
|
|
79
|
-
const r = [], a = e.transactions.find(
|
|
80
|
-
(m) => m.repeating_transaction_guid === e.guid
|
|
81
|
-
);
|
|
82
|
-
if (!a) return [];
|
|
83
|
-
const t = T(e.predicted_occurs_on), o = {
|
|
84
|
-
accountGuid: e.account?.guid || "",
|
|
85
|
-
amount: e.amount,
|
|
86
|
-
categoryGuid: a.category_guid || "",
|
|
87
|
-
expectedDate: t,
|
|
88
|
-
frequency: e.recurrence_type,
|
|
89
|
-
institutionGuid: e.account?.institution_guid || "",
|
|
90
|
-
institutionName: ie(e.account),
|
|
91
|
-
merchantGuid: e.merchant_guid,
|
|
92
|
-
name: e.description,
|
|
93
|
-
recurrenceDay: e.recurrence_day,
|
|
94
|
-
repeatingTransactionGuid: e.guid,
|
|
95
|
-
secondRecurrenceDay: e.second_recurrence_day,
|
|
96
|
-
status: p.Upcoming,
|
|
97
|
-
type: e.repeating_transaction_type === B.Income ? O.Income : O.Expense,
|
|
98
|
-
transaction: void 0
|
|
99
|
-
}, c = s.start, i = s.end;
|
|
100
|
-
switch (e.recurrence_type) {
|
|
101
|
-
case n.EveryWeek:
|
|
102
|
-
r.push(...de(o, c, i));
|
|
103
|
-
break;
|
|
104
|
-
case n.EveryOtherWeek:
|
|
105
|
-
r.push(...me(o, c, i));
|
|
106
|
-
break;
|
|
107
|
-
case n.TwiceAMonth:
|
|
108
|
-
r.push(...le(o, c, i));
|
|
109
|
-
break;
|
|
110
|
-
case n.EveryMonth:
|
|
111
|
-
r.push(...he(o, c, i));
|
|
112
|
-
break;
|
|
113
|
-
case n.EveryOtherMonth:
|
|
114
|
-
r.push(...fe(o, c, i));
|
|
115
|
-
break;
|
|
116
|
-
case n.EveryQuarter:
|
|
117
|
-
r.push(...pe(o, c, i));
|
|
118
|
-
break;
|
|
119
|
-
case n.EveryOtherQuarter:
|
|
120
|
-
r.push(...ye(o, c, i));
|
|
121
|
-
break;
|
|
122
|
-
case n.EveryYear:
|
|
123
|
-
r.push(...De(o, c, i));
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
for (const m of r) {
|
|
127
|
-
const v = e.transactions.find(
|
|
128
|
-
(x) => x.repeating_transaction_guid === e.guid && x.date > y(_(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
|
|
129
|
-
);
|
|
130
|
-
v ? (m.transaction = v, m.status = p.Paid, m.occurredOnDate = X(v.date)) : u(m.expectedDate, _(b(), 3)) && (m.status = p.Missed);
|
|
131
|
-
}
|
|
132
|
-
return r;
|
|
133
|
-
}, de = (e, s, r) => {
|
|
134
|
-
const a = [];
|
|
135
|
-
let t = g(s, e.recurrenceDay);
|
|
136
|
-
for (; u(t, r); )
|
|
137
|
-
a.push({ ...e, expectedDate: t }), t = g(t, e.recurrenceDay);
|
|
138
|
-
return a;
|
|
139
|
-
}, me = (e, s, r) => {
|
|
140
|
-
const a = [], t = e.expectedDate;
|
|
141
|
-
if (u(t, r)) {
|
|
142
|
-
let o = _(t, 14);
|
|
143
|
-
for (; h(o, s) || J(o, s); )
|
|
144
|
-
a.push({ ...e, expectedDate: o }), o = _(o, 14);
|
|
145
|
-
for (o = t; h(o, s) && u(o, r); )
|
|
146
|
-
a.push({ ...e, expectedDate: o }), o = Q(o, 14);
|
|
147
|
-
}
|
|
148
|
-
return a;
|
|
149
|
-
}, le = (e, s, r) => {
|
|
150
|
-
const a = [];
|
|
151
|
-
let t = D(s, e.recurrenceDay);
|
|
152
|
-
for (; u(t, r); )
|
|
153
|
-
a.push({ ...e, expectedDate: t }), t = f(t, 1);
|
|
154
|
-
let o = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(s, e.secondRecurrenceDay) : Z(s);
|
|
155
|
-
for (; u(o, r); )
|
|
156
|
-
a.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
157
|
-
return a;
|
|
158
|
-
}, he = (e, s, r) => {
|
|
159
|
-
const a = [];
|
|
160
|
-
let t = D(s, e.recurrenceDay);
|
|
161
|
-
for (a.push({ ...e, expectedDate: t }), t = f(t, 1); u(t, r); )
|
|
162
|
-
a.push({ ...e, expectedDate: t }), t = f(t, 1);
|
|
163
|
-
return a;
|
|
164
|
-
}, fe = (e, s, r) => {
|
|
165
|
-
const a = [], t = e.expectedDate;
|
|
166
|
-
let o = u(t, r) ? t : R(t, 2);
|
|
167
|
-
for (; u(o, r); )
|
|
168
|
-
h(o, s) && a.push({ ...e, expectedDate: o }), o = f(o, 2);
|
|
169
|
-
return a;
|
|
170
|
-
}, pe = (e, s, r) => {
|
|
171
|
-
const a = [], t = e.expectedDate;
|
|
172
|
-
let o = u(t, r) ? t : N(t, 1);
|
|
173
|
-
for (; u(o, r); )
|
|
174
|
-
h(o, s) && a.push({ ...e, expectedDate: o }), o = A(o, 1);
|
|
175
|
-
return a;
|
|
176
|
-
}, ye = (e, s, r) => {
|
|
177
|
-
const a = [], t = e.expectedDate;
|
|
178
|
-
let o = u(t, r) ? t : N(t, 2);
|
|
179
|
-
for (; u(o, r); )
|
|
180
|
-
h(o, s) && a.push({ ...e, expectedDate: o }), o = A(o, 2);
|
|
181
|
-
return a;
|
|
182
|
-
}, De = (e, s, r) => {
|
|
183
|
-
const a = [], t = e.expectedDate;
|
|
184
|
-
let o = u(t, r) ? t : q(t, 1);
|
|
185
|
-
for (; u(o, r); )
|
|
186
|
-
h(o, s) && a.push({ ...e, expectedDate: o }), o = H(o, 1);
|
|
187
|
-
return a;
|
|
188
|
-
}, rt = (e, s) => {
|
|
189
|
-
const r = [];
|
|
190
|
-
for (const a of e) {
|
|
191
|
-
const t = ue(a, s);
|
|
192
|
-
r.push(...t);
|
|
193
|
-
}
|
|
194
|
-
return r.sort(
|
|
195
|
-
(a, t) => y(a.occurredOnDate || a.expectedDate) - y(t.occurredOnDate || t.expectedDate)
|
|
196
|
-
);
|
|
197
|
-
}, ot = (e, s, r) => {
|
|
198
|
-
const a = [];
|
|
199
|
-
for (const t of s) {
|
|
200
|
-
const o = r.filter(
|
|
201
|
-
(c) => c.repeating_transaction_guid === t.guid
|
|
202
|
-
);
|
|
203
|
-
r.length > 0 && a.push({
|
|
204
|
-
...t,
|
|
205
|
-
account: e.find((c) => c.guid === t.account_guid),
|
|
206
|
-
transactions: o
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
return a;
|
|
210
|
-
}, at = (e) => e.reduce((s, r) => {
|
|
211
|
-
const a = V(r.expectedDate, { representation: "date" }), t = s.find(
|
|
212
|
-
(o) => o.date.toString() === r.expectedDate.toString()
|
|
213
|
-
);
|
|
214
|
-
return t ? t.recurrences.push(r) : s.push({
|
|
215
|
-
date: r.expectedDate,
|
|
216
|
-
id: `date-${a}`,
|
|
217
|
-
recurrences: [r]
|
|
218
|
-
}), s;
|
|
219
|
-
}, []), st = (e, s, r) => {
|
|
220
|
-
const a = g(b(), s.recurrence_day), t = Y(b(), s.recurrence_day), o = W(s.recurrence_day), c = s.second_recurrence_day ? W(s.second_recurrence_day) : "";
|
|
221
|
-
let i = r ? l(e.monthly_ordinal, o) : e.monthly;
|
|
222
|
-
switch (s.recurrence_type) {
|
|
223
|
-
case n.EveryQuarter:
|
|
224
|
-
i = r ? l(e.quarterly_ordinal, o) : e.quarterly;
|
|
225
|
-
break;
|
|
226
|
-
case n.EveryWeek:
|
|
227
|
-
i = r ? l(
|
|
228
|
-
e.weekly_ordinal,
|
|
229
|
-
k(a, E.DAY_OF_WEEK)
|
|
230
|
-
) : e.weekly;
|
|
231
|
-
break;
|
|
232
|
-
case n.EveryYear:
|
|
233
|
-
i = r ? l(
|
|
234
|
-
e.anually_ordinal,
|
|
235
|
-
k(t, E.MONTH_DAY)
|
|
236
|
-
) : e.anually;
|
|
237
|
-
break;
|
|
238
|
-
case n.EveryOtherWeek:
|
|
239
|
-
i = r ? l(
|
|
240
|
-
e.every_other_week_ordinal,
|
|
241
|
-
k(a, E.DAY_OF_WEEK)
|
|
242
|
-
) : e.every_other_week;
|
|
243
|
-
break;
|
|
244
|
-
case n.EveryOtherMonth:
|
|
245
|
-
i = r ? l(e.every_other_month_ordinal, o) : e.every_other_month;
|
|
246
|
-
break;
|
|
247
|
-
case n.EveryOtherQuarter:
|
|
248
|
-
i = r ? l(e.every_other_quarter_ordinal, o) : e.every_other_quarter;
|
|
249
|
-
break;
|
|
250
|
-
case n.TwiceAMonth:
|
|
251
|
-
i = r ? l(e.twice_a_month_ordinal, o, c) : e.twice_a_month;
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
return i;
|
|
255
|
-
}, nt = (e, s, r) => {
|
|
256
|
-
let a = s;
|
|
257
|
-
r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? a = F(s, r) : e === n.EveryYear ? a = Y(s, r) : a = D(s, r));
|
|
258
|
-
let t = a;
|
|
259
|
-
switch (e) {
|
|
260
|
-
case n.EveryWeek:
|
|
261
|
-
t = ne(a);
|
|
262
|
-
break;
|
|
263
|
-
case n.EveryOtherWeek:
|
|
264
|
-
t = se(a);
|
|
265
|
-
break;
|
|
266
|
-
case n.EveryMonth:
|
|
267
|
-
t = ae(a);
|
|
268
|
-
break;
|
|
269
|
-
case n.EveryOtherMonth:
|
|
270
|
-
t = oe(a);
|
|
271
|
-
break;
|
|
272
|
-
case n.EveryQuarter:
|
|
273
|
-
t = re(a);
|
|
274
|
-
break;
|
|
275
|
-
case n.EveryOtherQuarter:
|
|
276
|
-
t = te(a);
|
|
277
|
-
break;
|
|
278
|
-
case n.EveryYear:
|
|
279
|
-
t = ee(a);
|
|
280
|
-
break;
|
|
281
|
-
}
|
|
282
|
-
return t;
|
|
283
|
-
};
|
|
284
|
-
export {
|
|
285
|
-
et as D,
|
|
286
|
-
n as F,
|
|
287
|
-
B as R,
|
|
288
|
-
tt as S,
|
|
289
|
-
ot as a,
|
|
290
|
-
rt as b,
|
|
291
|
-
p as c,
|
|
292
|
-
O as d,
|
|
293
|
-
nt as e,
|
|
294
|
-
at as f,
|
|
295
|
-
st as g
|
|
296
|
-
};
|