@mx-cartographer/experiences 7.11.8 → 7.11.10
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
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
## [7.11.10] - 03-05-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Account Actions | toggle a11y
|
|
4
|
+
|
|
5
|
+
## [7.11.9] - 03-04-2026
|
|
6
|
+
|
|
7
|
+
- **FIXED** - `Debts` return to the top of the page when scrolling quickly
|
|
8
|
+
|
|
1
9
|
## [7.11.8] - 03-04-2026
|
|
2
10
|
|
|
3
|
-
- **UPDATED** - `categoryBudget` cta button
|
|
11
|
+
- **UPDATED** - `categoryBudget` cta button
|
|
4
12
|
|
|
5
13
|
## [7.11.7] - 03-04-2026
|
|
6
14
|
|
|
@@ -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/debts/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
|
|
|
2
2
|
import g from "react";
|
|
3
3
|
import { observer as v } from "mobx-react-lite";
|
|
4
4
|
import x from "@mui/material/Stack";
|
|
5
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as Y, Card as we, Stack as _, Box as W } from "@mui/material";
|
|
6
6
|
import { Text as l, P as Ce, H3 as Fe, InstitutionLogo as Le, Icon as ne } from "@mxenabled/mxui";
|
|
7
7
|
import { intervalToDuration as $e, formatDuration as He } from "date-fns";
|
|
8
8
|
import { addMonths as he } from "date-fns/addMonths";
|
|
@@ -12,11 +12,11 @@ import { a as P, M as Oe, I as We } from "../DebtsStore-BZqNLaqd.mjs";
|
|
|
12
12
|
import { D as ra } from "../DebtsStore-BZqNLaqd.mjs";
|
|
13
13
|
import { f as N, a as Ge } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
14
|
import { f as Q, D as ee } from "../DateFormats-Cs-NbEZ7.mjs";
|
|
15
|
-
import { G as je, v as te, u as C, l as
|
|
15
|
+
import { G as je, v as te, u as C, l as V, g as R, d as re, a as ze, b as Xe } from "../hooks-zu7yblbi.mjs";
|
|
16
16
|
import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
17
|
import { D as ie } from "../Drawer-DV4NTsFg.mjs";
|
|
18
18
|
import { b as E } from "../Localization-2MODESHW.mjs";
|
|
19
|
-
import { A as
|
|
19
|
+
import { A as Ye, u as Ve } from "../AccountDetailsHeader-BCi1WwkM.mjs";
|
|
20
20
|
import Ke from "@mui/material/Card";
|
|
21
21
|
import Ue from "@mui/material/CardContent";
|
|
22
22
|
import qe from "@mui/material/CardHeader";
|
|
@@ -160,7 +160,7 @@ const F = () => {
|
|
|
160
160
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
161
161
|
return te().uiStore;
|
|
162
162
|
}, xt = ({ debts: a, onClickCta: o, sx: r }) => {
|
|
163
|
-
const t =
|
|
163
|
+
const t = Y(), { isMobile: n } = K(), { debts: i } = C(), { selectedDebtPriority: c } = F(), { monthlyCashFlowProfile: d } = V(), { payoffDate: p, payoffSavings: h, payoffDuration: m } = g.useMemo(() => {
|
|
164
164
|
const w = d?.extra_payment ?? 0;
|
|
165
165
|
return gt(a, c, w);
|
|
166
166
|
}, [a, c, d]);
|
|
@@ -212,7 +212,7 @@ const F = () => {
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
}, wt = v(xt), Ct = ({ isOpen: a, onClose: o }) => {
|
|
215
|
-
const r =
|
|
215
|
+
const r = Y(), { debts: t } = C(), [n, i] = g.useState(!1);
|
|
216
216
|
return /* @__PURE__ */ e(
|
|
217
217
|
ie,
|
|
218
218
|
{
|
|
@@ -722,7 +722,7 @@ const Ae = ({
|
|
|
722
722
|
}
|
|
723
723
|
);
|
|
724
724
|
}, Tt = () => {
|
|
725
|
-
const a =
|
|
725
|
+
const a = Y(), { debts: o } = C(), { selectedDebtChartData: r } = F();
|
|
726
726
|
return /* @__PURE__ */ s($, { children: [
|
|
727
727
|
/* @__PURE__ */ s(
|
|
728
728
|
Ke,
|
|
@@ -749,7 +749,7 @@ const Ae = ({
|
|
|
749
749
|
)
|
|
750
750
|
] });
|
|
751
751
|
}, At = v(Tt), Et = () => {
|
|
752
|
-
const a =
|
|
752
|
+
const a = Y(), { onEvent: o } = R(), { debts: r } = C(), { selectedDebtChartData: t, showCompleted: n, showError: i } = F();
|
|
753
753
|
return g.useEffect(() => o(D.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(Se, { children: i || n ? /* @__PURE__ */ e(
|
|
754
754
|
l,
|
|
755
755
|
{
|
|
@@ -1017,13 +1017,13 @@ const Ae = ({
|
|
|
1017
1017
|
onClose: o,
|
|
1018
1018
|
title: r.details_title,
|
|
1019
1019
|
children: /* @__PURE__ */ s(x, { bgcolor: "background.default", children: [
|
|
1020
|
-
/* @__PURE__ */ e(
|
|
1020
|
+
/* @__PURE__ */ e(Ye, { customDetailsChart: i }),
|
|
1021
1021
|
/* @__PURE__ */ e($t, {})
|
|
1022
1022
|
] })
|
|
1023
1023
|
}
|
|
1024
1024
|
);
|
|
1025
1025
|
}, Ot = v(() => {
|
|
1026
|
-
const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } =
|
|
1026
|
+
const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = R(), [n, i] = g.useState(o?.extra_payment ?? 0), c = n < 0 || n > 9999999999e-2, d = async () => {
|
|
1027
1027
|
o && (await r({ ...o, extra_payment: n }), o.extra_payment = n, t(D.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
1028
1028
|
user_guid: o?.user_guid
|
|
1029
1029
|
}));
|
|
@@ -1057,7 +1057,7 @@ const Ae = ({
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}), Wt = () => {
|
|
1060
|
-
const { debts: a } = C(), { totalMonthlyPayments: o } = te(), { monthlyCashFlowProfile: r } =
|
|
1060
|
+
const { debts: a } = C(), { totalMonthlyPayments: o } = te(), { monthlyCashFlowProfile: r } = V(), t = o + Number(r?.extra_payment);
|
|
1061
1061
|
return /* @__PURE__ */ s(x, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
1062
1062
|
/* @__PURE__ */ s(x, { p: 24, children: [
|
|
1063
1063
|
/* @__PURE__ */ s(x, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
@@ -1100,14 +1100,14 @@ function zt(a, o) {
|
|
|
1100
1100
|
function Xt(a) {
|
|
1101
1101
|
return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
|
|
1102
1102
|
}
|
|
1103
|
-
const
|
|
1103
|
+
const Yt = (a) => {
|
|
1104
1104
|
const o = {
|
|
1105
1105
|
text: "#121417",
|
|
1106
1106
|
background: "#FFB252"
|
|
1107
1107
|
};
|
|
1108
1108
|
return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
|
|
1109
|
-
},
|
|
1110
|
-
const o = String(a.formattedValue), r =
|
|
1109
|
+
}, Vt = (a) => {
|
|
1110
|
+
const o = String(a.formattedValue), r = Yt(o);
|
|
1111
1111
|
return /* @__PURE__ */ e(
|
|
1112
1112
|
le,
|
|
1113
1113
|
{
|
|
@@ -1147,14 +1147,14 @@ const Vt = (a) => {
|
|
|
1147
1147
|
onHoverRow: t,
|
|
1148
1148
|
onClickRow: n
|
|
1149
1149
|
}) => {
|
|
1150
|
-
const i =
|
|
1150
|
+
const i = Y(), { onEvent: c } = R(), { isMobile: d } = K(), { debts: p, common: h } = C(), [m, w] = g.useState([
|
|
1151
1151
|
{ field: "priority", sort: "asc" }
|
|
1152
1152
|
]), b = [
|
|
1153
1153
|
{
|
|
1154
1154
|
field: "priority",
|
|
1155
1155
|
headerName: p.table_column_priority,
|
|
1156
1156
|
renderHeader: j,
|
|
1157
|
-
renderCell:
|
|
1157
|
+
renderCell: Vt,
|
|
1158
1158
|
sortComparator: zt,
|
|
1159
1159
|
sortable: !0,
|
|
1160
1160
|
hideSortIcons: !0,
|
|
@@ -1258,10 +1258,11 @@ const Vt = (a) => {
|
|
|
1258
1258
|
le,
|
|
1259
1259
|
{
|
|
1260
1260
|
sx: {
|
|
1261
|
-
height: "
|
|
1261
|
+
height: "auto",
|
|
1262
1262
|
width: "100%",
|
|
1263
1263
|
mt: "15px",
|
|
1264
1264
|
overflowX: "auto",
|
|
1265
|
+
overflowY: "visible",
|
|
1265
1266
|
boxShadow: "none",
|
|
1266
1267
|
...a
|
|
1267
1268
|
},
|
|
@@ -1463,7 +1464,7 @@ const Vt = (a) => {
|
|
|
1463
1464
|
onClickHandler: o ? r : void 0,
|
|
1464
1465
|
primaryButton: o ? a.connect_accounts : void 0
|
|
1465
1466
|
}), tr = v(({ disabled: a, onClick: o }) => {
|
|
1466
|
-
const { debts: r } = C(), { isDesktop: t } = K(), { totalMonthlyPayments: n } = te(), { monthlyCashFlowProfile: i } =
|
|
1467
|
+
const { debts: r } = C(), { isDesktop: t } = K(), { totalMonthlyPayments: n } = te(), { monthlyCashFlowProfile: i } = V(), c = n + Number(i?.extra_payment), d = t ? r.paydown_button_long : r.paydown_button_short;
|
|
1467
1468
|
return /* @__PURE__ */ e(
|
|
1468
1469
|
De,
|
|
1469
1470
|
{
|
|
@@ -1480,12 +1481,12 @@ const Vt = (a) => {
|
|
|
1480
1481
|
}), rr = ({ onBackClick: a, sx: o }) => {
|
|
1481
1482
|
const { isDesktop: r, isMobile: t } = K(), { connect: n, debts: i } = C(), { onEvent: c } = R(), {
|
|
1482
1483
|
config: { show_connections_widget_in_master: d }
|
|
1483
|
-
} = ze(), { isInitialized: p } = Xe(), { setSelectedAccount: h } =
|
|
1484
|
+
} = ze(), { isInitialized: p } = Xe(), { setSelectedAccount: h } = Ve(), { selectedDebtPriority: m, setSelectedDebtChartData: w } = F(), {
|
|
1484
1485
|
isAccountDataLoaded: b,
|
|
1485
1486
|
loadAccountData: B,
|
|
1486
1487
|
detailedAccounts: M,
|
|
1487
1488
|
visibleDebtAccounts: I
|
|
1488
|
-
} = re(), { isAllGoalDataLoaded: S, loadGoalData: T, monthlyCashFlowProfile: H } =
|
|
1489
|
+
} = re(), { isAllGoalDataLoaded: S, loadGoalData: T, monthlyCashFlowProfile: H } = V(), { debts: y } = te(), [u, f] = g.useState(!1), [A, k] = g.useState(!1), [L, z] = g.useState(!1), [U, Ee] = g.useState(""), [Ie, ce] = g.useState(!1);
|
|
1489
1490
|
pt({
|
|
1490
1491
|
widgetName: "DebtsWidget",
|
|
1491
1492
|
isLoaded: S
|