@mx-cartographer/experiences 7.6.2 → 7.6.3
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/finstrong/index.es.js +51 -46
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ import { g as gn, a as yn, r as Je, b as bn, c as He, d as ht, C as we, e as ke,
|
|
|
9
9
|
import { y as bi, F as fi } from "../FinstrongStore-DzK8bMoz.mjs";
|
|
10
10
|
import * as nt from "d3";
|
|
11
11
|
import { observer as v } from "mobx-react-lite";
|
|
12
|
-
import { u as S, b as
|
|
12
|
+
import { u as S, b as U, a as Ne, o as ee, z as F, p as An, d as Se, m as je, f as Tn, j as Ke, h as On, i as Rn } from "../hooks-ZMp65DFz.mjs";
|
|
13
13
|
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import m from "react";
|
|
15
15
|
import P from "@mui/material/Button";
|
|
@@ -122,7 +122,7 @@ const Mo = ({
|
|
|
122
122
|
x2: i - c * 0.8 * Math.cos(Math.PI / 1.35),
|
|
123
123
|
y1: l + c * 0.8 * Math.sin(Math.PI / 1.35),
|
|
124
124
|
y2: l - c * 0.8 * Math.sin(Math.PI / 1.35),
|
|
125
|
-
children: w.map((B,
|
|
125
|
+
children: w.map((B, Y) => /* @__PURE__ */ e("stop", { offset: B.offset, stopColor: B.color }, Y))
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
@@ -141,7 +141,7 @@ const Mo = ({
|
|
|
141
141
|
footerRightContent: u,
|
|
142
142
|
isFinacialStrengthGraph: y = !1
|
|
143
143
|
}) => {
|
|
144
|
-
const f = G(), w = -Math.PI / 1.35, x = Math.PI / 1.35, D = x - w, C = D / (i - s), g = (o - s) * C, b = w + g + 0.02, L = n !== "SM" ? 0.1 : 0.12, B = t,
|
|
144
|
+
const f = G(), w = -Math.PI / 1.35, x = Math.PI / 1.35, D = x - w, C = D / (i - s), g = (o - s) * C, b = w + g + 0.02, L = n !== "SM" ? 0.1 : 0.12, B = t, Y = t * (1 - L), T = B * 2, $ = T / 2, z = T / 2, pe = (Y + B) / 2, ve = o !== 25 && o !== 50 && o !== 75 && o !== 100 ? 0 : 0.12, [Q, X] = bn(pe, b, ve), _e = o / 25, H = {
|
|
145
145
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
146
146
|
M: { markerSize: 8, healthScoreFontSize: 48 },
|
|
147
147
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
@@ -172,7 +172,7 @@ const Mo = ({
|
|
|
172
172
|
series: [
|
|
173
173
|
{
|
|
174
174
|
data: r,
|
|
175
|
-
innerRadius:
|
|
175
|
+
innerRadius: Y,
|
|
176
176
|
outerRadius: B,
|
|
177
177
|
startAngle: Math.round(Je(w)),
|
|
178
178
|
// Use Math.degrees to convert
|
|
@@ -182,17 +182,17 @@ const Mo = ({
|
|
|
182
182
|
],
|
|
183
183
|
skipAnimation: !0,
|
|
184
184
|
slots: {
|
|
185
|
-
pieArc: (
|
|
185
|
+
pieArc: (q) => /* @__PURE__ */ e(
|
|
186
186
|
Mo,
|
|
187
187
|
{
|
|
188
|
-
arcColor:
|
|
188
|
+
arcColor: q.color,
|
|
189
189
|
arcRadius: t,
|
|
190
190
|
arcStartAngle: w,
|
|
191
191
|
centerX: $,
|
|
192
192
|
centerY: z,
|
|
193
|
-
dataIndex:
|
|
193
|
+
dataIndex: q.dataIndex,
|
|
194
194
|
dialScoreData: r,
|
|
195
|
-
innerArcRadius:
|
|
195
|
+
innerArcRadius: Y,
|
|
196
196
|
isFinacialStrengthGraph: y,
|
|
197
197
|
outterArcRadius: B,
|
|
198
198
|
progressEndAngle: b,
|
|
@@ -402,7 +402,7 @@ const Mo = ({
|
|
|
402
402
|
value: 12,
|
|
403
403
|
color: c ? we.EXCEPTIONAL : ke.EXCEPTIONAL
|
|
404
404
|
}
|
|
405
|
-
], { finstrong: d } = S(), { isCopyLoaded: h } =
|
|
405
|
+
], { finstrong: d } = S(), { isCopyLoaded: h } = U();
|
|
406
406
|
if (!h) return /* @__PURE__ */ e(te, {});
|
|
407
407
|
const { status: u, color: y = "none" } = ht(
|
|
408
408
|
n,
|
|
@@ -701,7 +701,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
701
701
|
title: h,
|
|
702
702
|
drawerType: u
|
|
703
703
|
}) => {
|
|
704
|
-
const { finstrong: y } = S(), { isCopyLoaded: f } =
|
|
704
|
+
const { finstrong: y } = S(), { isCopyLoaded: f } = U();
|
|
705
705
|
return f ? /* @__PURE__ */ e(oe, { isOpen: l, onClose: _, title: i || y.key_indicators, children: /* @__PURE__ */ a(p, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
706
706
|
(h || s) && /* @__PURE__ */ a(
|
|
707
707
|
p,
|
|
@@ -748,7 +748,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
748
748
|
shouldShowBalance: o = !0,
|
|
749
749
|
loadAccounts: n
|
|
750
750
|
}) => {
|
|
751
|
-
const { config: r } = Ne(), { accounts: s } = S(), { selectedAccounts: i } =
|
|
751
|
+
const { config: r } = Ne(), { accounts: s } = S(), { selectedAccounts: i } = U(), l = m.useCallback(
|
|
752
752
|
(_) => {
|
|
753
753
|
t?.(_);
|
|
754
754
|
},
|
|
@@ -799,7 +799,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
799
799
|
);
|
|
800
800
|
}) }) : null;
|
|
801
801
|
}, Lt = v(Po), Wo = ({ loadAccounts: t, loadMoreLabel: o }) => {
|
|
802
|
-
const n = G(), { config: r } = Ne(), { connect: s, finstrong: i } = S(), { accounts: l } = S(), { selectedAccounts: c } =
|
|
802
|
+
const n = G(), { config: r } = Ne(), { connect: s, finstrong: i } = S(), { accounts: l } = S(), { selectedAccounts: c } = U(), [_, d] = m.useState(!1), [h, u] = m.useState(!1), y = m.useMemo(
|
|
803
803
|
() => c.filter(
|
|
804
804
|
(x) => t ? t.includes(x.account_type) : !0
|
|
805
805
|
),
|
|
@@ -2478,7 +2478,7 @@ const $o = ({ total: t }) => {
|
|
|
2478
2478
|
/* @__PURE__ */ e(ce, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(wr, {}) })
|
|
2479
2479
|
] });
|
|
2480
2480
|
}, Mr = v(kr), Dr = ({ onClick: t }) => {
|
|
2481
|
-
const { finstrong: o } = S(), { isCopyLoaded: n } =
|
|
2481
|
+
const { finstrong: o } = S(), { isCopyLoaded: n } = U();
|
|
2482
2482
|
return n ? /* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2483
2483
|
/* @__PURE__ */ e(pt, { size: 48 }),
|
|
2484
2484
|
/* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
@@ -2634,9 +2634,9 @@ const $o = ({ total: t }) => {
|
|
|
2634
2634
|
step: O.ConnectAccounts,
|
|
2635
2635
|
type: "main"
|
|
2636
2636
|
}, Pr = ({ isOpen: t, onClose: o }) => {
|
|
2637
|
-
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } = F(), { finstrong: s } = S(), { setSelectedAccounts: i } =
|
|
2637
|
+
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } = F(), { finstrong: s } = S(), { setSelectedAccounts: i } = U(), { addRepeatingTransaction: l, setDateRange: c } = Ke(), { filter: _, setFilter: d, transactions: h } = On(), { user: u, userProfile: y, updateUser: f, updateUserProfile: w } = ee(), [x, D] = m.useState(u.credit_score || 0), [C, g] = m.useState(
|
|
2638
2638
|
it
|
|
2639
|
-
), [b, L] = m.useState(1), [B,
|
|
2639
|
+
), [b, L] = m.useState(1), [B, Y] = m.useState(wt.EveryMonth), [T, $] = m.useState([]), [z, pe] = m.useState(!1), [ve, Q] = m.useState(!1), [X, _e] = m.useState(u.birthday), [H, he] = m.useState(15), [N, ae] = m.useState("");
|
|
2640
2640
|
m.useEffect(() => {
|
|
2641
2641
|
c({ start: Dt(rt()), end: It(rt()) });
|
|
2642
2642
|
}, []), m.useEffect(() => {
|
|
@@ -2657,19 +2657,19 @@ const $o = ({ total: t }) => {
|
|
|
2657
2657
|
[O.MonthlyIncome]: !!N,
|
|
2658
2658
|
[O.Birthday]: !!u.birthday || !!X,
|
|
2659
2659
|
[O.CreditScore]: !!u.credit_score || !!x
|
|
2660
|
-
})[C.step], [x, C, X, N, u]),
|
|
2660
|
+
})[C.step], [x, C, X, N, u]), q = n.length > 0, $t = m.useMemo(() => {
|
|
2661
2661
|
const { step: A } = C;
|
|
2662
2662
|
let R = 0;
|
|
2663
|
-
return A >= O.MonthlyIncome &&
|
|
2664
|
-
}, [C.step,
|
|
2663
|
+
return A >= O.MonthlyIncome && q && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (u.birthday || u.credit_score) && R++, R;
|
|
2664
|
+
}, [C.step, q, T.length, u.birthday, u.credit_score]), zt = (A) => {
|
|
2665
2665
|
d({
|
|
2666
2666
|
..._,
|
|
2667
2667
|
custom: (R) => A ? ao(R, A) : at(R)
|
|
2668
2668
|
});
|
|
2669
2669
|
}, Et = {
|
|
2670
2670
|
[O.ConnectAccounts]: {
|
|
2671
|
-
main:
|
|
2672
|
-
mainActionContent:
|
|
2671
|
+
main: q ? /* @__PURE__ */ e(Lt, { shouldShowBalance: !1 }) : null,
|
|
2672
|
+
mainActionContent: q ? s.onboarding_next : s.onboarding_add_accounts,
|
|
2673
2673
|
primaryText: s.connect_your_accounts,
|
|
2674
2674
|
secondaryText: s.onboarding_connect_your_accounts_secondary
|
|
2675
2675
|
},
|
|
@@ -2689,7 +2689,7 @@ const $o = ({ total: t }) => {
|
|
|
2689
2689
|
});
|
|
2690
2690
|
},
|
|
2691
2691
|
setFirstDay: L,
|
|
2692
|
-
setFrequency:
|
|
2692
|
+
setFrequency: Y,
|
|
2693
2693
|
setSecondDay: he,
|
|
2694
2694
|
transaction: De
|
|
2695
2695
|
}
|
|
@@ -2746,7 +2746,7 @@ const $o = ({ total: t }) => {
|
|
|
2746
2746
|
]);
|
|
2747
2747
|
break;
|
|
2748
2748
|
case O.ConnectAccounts:
|
|
2749
|
-
if (!
|
|
2749
|
+
if (!q) {
|
|
2750
2750
|
Q(!0);
|
|
2751
2751
|
return;
|
|
2752
2752
|
}
|
|
@@ -2796,8 +2796,8 @@ const $o = ({ total: t }) => {
|
|
|
2796
2796
|
}
|
|
2797
2797
|
}, me = Et[C.step], Ie = C.step === O.ConnectAccounts, Kt = {
|
|
2798
2798
|
fullWidth: !0,
|
|
2799
|
-
...Ie && !
|
|
2800
|
-
}, Vt = !Ie || Ie && !
|
|
2799
|
+
...Ie && !q && { startIcon: /* @__PURE__ */ e(_t, {}) }
|
|
2800
|
+
}, Vt = !Ie || Ie && !q;
|
|
2801
2801
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2802
2802
|
/* @__PURE__ */ e(
|
|
2803
2803
|
oe,
|
|
@@ -3131,7 +3131,7 @@ const $o = ({ total: t }) => {
|
|
|
3131
3131
|
) })
|
|
3132
3132
|
] });
|
|
3133
3133
|
}, jr = v(Nr), Kr = ({ isOpen: t, onClose: o }) => {
|
|
3134
|
-
const n = G(), { finstrong: r } = S(), { isCopyLoaded: s, isInitialized: i } =
|
|
3134
|
+
const n = G(), { finstrong: r } = S(), { isCopyLoaded: s, isInitialized: i } = U(), { augmentedChartData: l, healthScore: c, healthScoreChangeReports: _, peerScore: d } = F();
|
|
3135
3135
|
if (!s || !i) return /* @__PURE__ */ e(te, {});
|
|
3136
3136
|
const h = He(c.health_score || 0, r), u = _.slice().reverse();
|
|
3137
3137
|
return /* @__PURE__ */ e(
|
|
@@ -3252,7 +3252,7 @@ const $o = ({ total: t }) => {
|
|
|
3252
3252
|
] })
|
|
3253
3253
|
] });
|
|
3254
3254
|
}, Yr = ({ isOpen: t, onClose: o }) => {
|
|
3255
|
-
const { finstrong: n } = S(), { isCopyLoaded: r } =
|
|
3255
|
+
const { finstrong: n } = S(), { isCopyLoaded: r } = U();
|
|
3256
3256
|
return r ? /* @__PURE__ */ e(oe, { isOpen: t, onClose: o, title: n.score_rubric, children: /* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", gap: 36, height: "100%", p: 24 }, children: [
|
|
3257
3257
|
/* @__PURE__ */ a(p, { sx: { gap: 20 }, children: [
|
|
3258
3258
|
/* @__PURE__ */ a(p, { sx: { gap: 8 }, children: [
|
|
@@ -3332,7 +3332,7 @@ const $o = ({ total: t }) => {
|
|
|
3332
3332
|
] })
|
|
3333
3333
|
] }) }) : /* @__PURE__ */ e(te, {});
|
|
3334
3334
|
}, qr = v(Yr), Ur = v(() => {
|
|
3335
|
-
const [t, o] = m.useState(!1), n = G(), [r, { width: s }] = St(), { finstrong: i } = S(), { isCopyLoaded: l, isInitialized: c } =
|
|
3335
|
+
const [t, o] = m.useState(!1), n = G(), [r, { width: s }] = St(), { finstrong: i } = S(), { isCopyLoaded: l, isInitialized: c } = U(), { healthScore: _, healthScoreChange: d } = F(), h = n.palette.mode === "dark", u = He(_?.health_score, i);
|
|
3336
3336
|
return !l || !c ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ a(V, { ref: r, sx: { p: 16, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3337
3337
|
/* @__PURE__ */ e(
|
|
3338
3338
|
vo,
|
|
@@ -3440,7 +3440,7 @@ const $o = ({ total: t }) => {
|
|
|
3440
3440
|
loadMonthlySummaries: w,
|
|
3441
3441
|
loadPeerScore: x,
|
|
3442
3442
|
peerScore: D
|
|
3443
|
-
} = d, { finstrong: C, connect: g } = S(), { isCopyLoaded: b, isInitialized: L } =
|
|
3443
|
+
} = d, { finstrong: C, connect: g } = S(), { isCopyLoaded: b, isInitialized: L } = U(), { loadRepeatingTransactions: B } = Ke(), { isSmallMobile: Y } = Ye(), T = G(), { userProfile: $ } = ee(), [z, pe] = m.useState(!1), [ve, Q] = m.useState(!1), [X, _e] = m.useState(!1), [H, he] = m.useState(!1);
|
|
3444
3444
|
if (wo({
|
|
3445
3445
|
widgetName: "FinstrongWidget",
|
|
3446
3446
|
isLoaded: z
|
|
@@ -3479,8 +3479,8 @@ const $o = ({ total: t }) => {
|
|
|
3479
3479
|
flexDirection: { md: "row" },
|
|
3480
3480
|
gap: 24,
|
|
3481
3481
|
justifyContent: "center",
|
|
3482
|
-
pt:
|
|
3483
|
-
px:
|
|
3482
|
+
pt: Y ? 16 : 24,
|
|
3483
|
+
px: Y ? 16 : 48
|
|
3484
3484
|
},
|
|
3485
3485
|
children: [
|
|
3486
3486
|
/* @__PURE__ */ a(p, { sx: { gap: 24, width: { md: 432 }, height: "100%" }, children: [
|
|
@@ -3494,22 +3494,27 @@ const $o = ({ total: t }) => {
|
|
|
3494
3494
|
}
|
|
3495
3495
|
)
|
|
3496
3496
|
] }),
|
|
3497
|
-
/* @__PURE__ */ e(p, {
|
|
3498
|
-
/* @__PURE__ */ a(
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
{
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3497
|
+
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ a(V, { sx: { height: "100%", p: 16 }, children: [
|
|
3498
|
+
/* @__PURE__ */ a(
|
|
3499
|
+
p,
|
|
3500
|
+
{
|
|
3501
|
+
direction: "row",
|
|
3502
|
+
sx: { alignItems: "center", gap: 12, justifyContent: "space-between" },
|
|
3503
|
+
children: [
|
|
3504
|
+
/* @__PURE__ */ e(K, { children: C.key_indicators }),
|
|
3505
|
+
/* @__PURE__ */ e(
|
|
3506
|
+
P,
|
|
3507
|
+
{
|
|
3508
|
+
endIcon: /* @__PURE__ */ e(J, {}),
|
|
3509
|
+
onClick: () => _e(!0),
|
|
3510
|
+
size: "small",
|
|
3511
|
+
variant: "text",
|
|
3512
|
+
children: /* @__PURE__ */ e(I, { bold: !0, sx: { flexShrink: 0 }, variant: "body2", children: C.whats_changed })
|
|
3513
|
+
}
|
|
3514
|
+
)
|
|
3515
|
+
]
|
|
3516
|
+
}
|
|
3517
|
+
),
|
|
3513
3518
|
h.length ? /* @__PURE__ */ e(
|
|
3514
3519
|
Ve,
|
|
3515
3520
|
{
|