@mx-cartographer/experiences 9.0.11 → 9.0.12
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 +4 -0
- package/dist/debts/index.es.js +24 -24
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/debts/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import y from "@mui/material/Stack";
|
|
|
5
5
|
import { useTheme as j, Card as ge, Stack as u, Box as W } from "@mui/material";
|
|
6
6
|
import { Text as i, P as xe, H3 as Be, InstitutionLogo as Pe, Icon as ne } from "@mxenabled/mxui";
|
|
7
7
|
import { intervalToDuration as Re, formatDuration as Le } from "date-fns";
|
|
8
|
-
import { s as Fe, D as
|
|
8
|
+
import { s as Fe, D as $, t as $e, b as Oe } from "../DebtUtils-i4pI2Uoe.mjs";
|
|
9
9
|
import { f as I, a as We } from "../NumberFormatting--XMeeBfr.mjs";
|
|
10
10
|
import { f as J, D as Q } from "../DateFormats-HudZ3Bjs.mjs";
|
|
11
11
|
import { G as Ge, q as ee, u as w, k as V, f as k, c as te, i as He, a as ze } from "../hooks-97sNJ_lf.mjs";
|
|
@@ -56,7 +56,7 @@ function ht(r, n, o = 0) {
|
|
|
56
56
|
let m = !1;
|
|
57
57
|
for (const [v, x] of t.entries()) {
|
|
58
58
|
if (x.balance <= 0.01 || x.is_impossible) continue;
|
|
59
|
-
const
|
|
59
|
+
const F = (x.interest_rate ?? 0) / 100 / 12, N = x.balance * F;
|
|
60
60
|
let A = x.monthly_payment ?? 0;
|
|
61
61
|
v === 0 && o && (A += o), x.balance += N;
|
|
62
62
|
const E = Math.min(x.balance, A + s);
|
|
@@ -525,10 +525,10 @@ const De = ({
|
|
|
525
525
|
}), x = v.reduce(
|
|
526
526
|
(p, g) => p + (g.dataset[0]?.y ?? 0),
|
|
527
527
|
0
|
|
528
|
-
),
|
|
528
|
+
), L = m.map((p, g) => {
|
|
529
529
|
const D = g / (m.length - 1), M = x * (1 - D);
|
|
530
530
|
return { x: p, y: M };
|
|
531
|
-
}),
|
|
531
|
+
}), F = Math.ceil(x / 100) * 100, N = m, A = v.map((p, g) => {
|
|
532
532
|
const D = 1 - g / v.length * 0.5, M = gt(ft, D);
|
|
533
533
|
return {
|
|
534
534
|
id: `debt-${g}`,
|
|
@@ -546,7 +546,7 @@ const De = ({
|
|
|
546
546
|
A.push({
|
|
547
547
|
id: "payoff-line",
|
|
548
548
|
label: "Payoff Line",
|
|
549
|
-
data:
|
|
549
|
+
data: L.map((p) => p.y),
|
|
550
550
|
color: c.palette.grey[700],
|
|
551
551
|
curve: "linear",
|
|
552
552
|
type: "line",
|
|
@@ -632,7 +632,7 @@ const De = ({
|
|
|
632
632
|
yAxis: [
|
|
633
633
|
{
|
|
634
634
|
min: 0,
|
|
635
|
-
max:
|
|
635
|
+
max: F,
|
|
636
636
|
disableTicks: !0,
|
|
637
637
|
valueFormatter: (p) => I(p, "0a")
|
|
638
638
|
}
|
|
@@ -1148,7 +1148,7 @@ const Wt = (r) => {
|
|
|
1148
1148
|
minWidth: 122,
|
|
1149
1149
|
flex: 0.6
|
|
1150
1150
|
}
|
|
1151
|
-
],
|
|
1151
|
+
], L = [
|
|
1152
1152
|
...x.slice(0, 3),
|
|
1153
1153
|
{
|
|
1154
1154
|
field: "chevron",
|
|
@@ -1162,7 +1162,7 @@ const Wt = (r) => {
|
|
|
1162
1162
|
headerAlign: "right",
|
|
1163
1163
|
width: 20
|
|
1164
1164
|
}
|
|
1165
|
-
],
|
|
1165
|
+
], F = f.useMemo(() => n.map((_, p) => ({
|
|
1166
1166
|
..._,
|
|
1167
1167
|
id: p,
|
|
1168
1168
|
priority: Ot(_)
|
|
@@ -1173,7 +1173,7 @@ const Wt = (r) => {
|
|
|
1173
1173
|
c || N(_);
|
|
1174
1174
|
}, E = (_) => {
|
|
1175
1175
|
c && N(_);
|
|
1176
|
-
}, Y = (_) =>
|
|
1176
|
+
}, Y = (_) => F.find((p) => p.guid === _)?.id;
|
|
1177
1177
|
return /* @__PURE__ */ e(
|
|
1178
1178
|
le,
|
|
1179
1179
|
{
|
|
@@ -1189,7 +1189,7 @@ const Wt = (r) => {
|
|
|
1189
1189
|
children: /* @__PURE__ */ e(
|
|
1190
1190
|
ot,
|
|
1191
1191
|
{
|
|
1192
|
-
columns: c ?
|
|
1192
|
+
columns: c ? L : x,
|
|
1193
1193
|
disableColumnFilter: !0,
|
|
1194
1194
|
disableColumnMenu: !0,
|
|
1195
1195
|
hideFooter: !0,
|
|
@@ -1200,7 +1200,7 @@ const Wt = (r) => {
|
|
|
1200
1200
|
onSortModelChange: (_) => {
|
|
1201
1201
|
v(_), d(S.DEBTS_CLICK_TABLE_SORT);
|
|
1202
1202
|
},
|
|
1203
|
-
rows:
|
|
1203
|
+
rows: F,
|
|
1204
1204
|
slotProps: {
|
|
1205
1205
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1206
1206
|
row: {
|
|
@@ -1259,19 +1259,19 @@ const Wt = (r) => {
|
|
|
1259
1259
|
}, Vt = C(({ buttonEl: r, onClose: n }) => {
|
|
1260
1260
|
const { onEvent: o } = k(), { debts: t } = w(), { selectedDebtPriority: a, setSelectedDebtPriority: s } = P(), d = !!r, c = [
|
|
1261
1261
|
{
|
|
1262
|
-
priority:
|
|
1262
|
+
priority: $.FASTEST_PAYOFF_FIRST,
|
|
1263
1263
|
text: t.priority_sort_fastest_payoff
|
|
1264
1264
|
},
|
|
1265
1265
|
{
|
|
1266
|
-
priority:
|
|
1266
|
+
priority: $.HIGHEST_INTEREST,
|
|
1267
1267
|
text: t.priority_sort_highest_interest
|
|
1268
1268
|
},
|
|
1269
1269
|
{
|
|
1270
|
-
priority:
|
|
1270
|
+
priority: $.LOWEST_BALANCE,
|
|
1271
1271
|
text: t.priority_sort_lowest_balance
|
|
1272
1272
|
},
|
|
1273
1273
|
{
|
|
1274
|
-
priority:
|
|
1274
|
+
priority: $.HIGHEST_BALANCE,
|
|
1275
1275
|
text: t.priority_sort_highest_balance
|
|
1276
1276
|
}
|
|
1277
1277
|
], b = (h) => {
|
|
@@ -1325,10 +1325,10 @@ const Wt = (r) => {
|
|
|
1325
1325
|
}, b = () => {
|
|
1326
1326
|
d(null);
|
|
1327
1327
|
}, h = !!s, m = f.useMemo(() => ({
|
|
1328
|
-
[
|
|
1329
|
-
[
|
|
1330
|
-
[
|
|
1331
|
-
[
|
|
1328
|
+
[$.FASTEST_PAYOFF_FIRST]: t.priority_sort_fastest_payoff,
|
|
1329
|
+
[$.HIGHEST_INTEREST]: t.priority_sort_highest_interest,
|
|
1330
|
+
[$.HIGHEST_BALANCE]: t.priority_sort_highest_balance,
|
|
1331
|
+
[$.LOWEST_BALANCE]: t.priority_sort_lowest_balance
|
|
1332
1332
|
})[a] ?? t.priority_sort_lowest_balance, [a]);
|
|
1333
1333
|
return /* @__PURE__ */ l(u, { children: [
|
|
1334
1334
|
/* @__PURE__ */ e(
|
|
@@ -1362,21 +1362,21 @@ const Wt = (r) => {
|
|
|
1362
1362
|
const { isDesktop: t, isMobile: a } = ae(), { connect: s, debts: d } = w(), { onEvent: c } = k(), {
|
|
1363
1363
|
config: { show_connections_widget_in_master: b }
|
|
1364
1364
|
} = He(), { isInitialized: h } = ze(), { setSelectedAccount: m } = Ve(), { selectedDebtPriority: v, setSelectedDebtChartData: x } = P(), {
|
|
1365
|
-
isAccountDataLoaded:
|
|
1366
|
-
loadAccountData:
|
|
1365
|
+
isAccountDataLoaded: L,
|
|
1366
|
+
loadAccountData: F,
|
|
1367
1367
|
detailedAccounts: N,
|
|
1368
1368
|
visibleDebtAccounts: A
|
|
1369
1369
|
} = te(), { isAllGoalDataLoaded: E, loadGoalData: Y, monthlyCashFlowProfile: _ } = V(), { debts: p } = ee(), [g, D] = f.useState(!1), [M, B] = f.useState(!1), [K, ce] = f.useState(!1), [U, Se] = f.useState(""), [Ae, de] = f.useState(!1);
|
|
1370
1370
|
st({
|
|
1371
1371
|
widgetName: "DebtsWidget",
|
|
1372
|
-
isLoaded: E
|
|
1372
|
+
isLoaded: L && E
|
|
1373
1373
|
});
|
|
1374
1374
|
const q = f.useMemo(() => {
|
|
1375
1375
|
const O = _?.extra_payment ?? 0;
|
|
1376
1376
|
return $e(p, v, O);
|
|
1377
1377
|
}, [p, v, _]);
|
|
1378
1378
|
f.useEffect(() => {
|
|
1379
|
-
|
|
1379
|
+
L || F().finally(), c(S.DEBTS_VIEW);
|
|
1380
1380
|
}, []), f.useEffect(() => {
|
|
1381
1381
|
h && Y().finally();
|
|
1382
1382
|
}, [h]);
|
|
@@ -1388,7 +1388,7 @@ const Wt = (r) => {
|
|
|
1388
1388
|
}, Ie = () => {
|
|
1389
1389
|
B(!0), c(S.DEBTS_CLICK_PAYDOWN);
|
|
1390
1390
|
};
|
|
1391
|
-
if (!h || !E)
|
|
1391
|
+
if (!h || !L || !E)
|
|
1392
1392
|
return /* @__PURE__ */ e(ct, {});
|
|
1393
1393
|
const Me = N.length === 0, ke = A.length === 0, Ne = p.length === 0, X = Me || ke || Ne, Z = Oe(
|
|
1394
1394
|
d,
|