@mx-cartographer/experiences 7.2.12-alpha-ram1-finstrong-testing → 7.2.12-alpha-ram2-finstrong-testing
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.
|
@@ -4,11 +4,11 @@ import { fromUnixTime as D } from "date-fns/fromUnixTime";
|
|
|
4
4
|
import { getUnixTime as I } from "date-fns/getUnixTime";
|
|
5
5
|
import { subMonths as H } from "date-fns/subMonths";
|
|
6
6
|
import { F as x, A as h } from "./Fetch-87LIQbEA.mjs";
|
|
7
|
-
import { jsx as
|
|
7
|
+
import { jsx as c, jsxs as T } from "react/jsx-runtime";
|
|
8
8
|
import { addDays as v } from "date-fns/addDays";
|
|
9
9
|
import { addMonths as M } from "date-fns/addMonths";
|
|
10
|
-
import { addYears as
|
|
11
|
-
import { differenceInDays as
|
|
10
|
+
import { addYears as L } from "date-fns/addYears";
|
|
11
|
+
import { differenceInDays as G } from "date-fns/differenceInDays";
|
|
12
12
|
import { differenceInMonths as w } from "date-fns/differenceInMonths";
|
|
13
13
|
import { differenceInWeeks as A } from "date-fns/differenceInWeeks";
|
|
14
14
|
import { startOfToday as N } from "date-fns/startOfToday";
|
|
@@ -53,7 +53,7 @@ const m = {
|
|
|
53
53
|
MISSING: "Missing"
|
|
54
54
|
};
|
|
55
55
|
var O = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(O || {});
|
|
56
|
-
const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */
|
|
56
|
+
const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
|
|
57
57
|
U,
|
|
58
58
|
{
|
|
59
59
|
sx: {
|
|
@@ -63,8 +63,8 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
children: e.map((r, n) => /* @__PURE__ */ T($.Fragment, { children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ c(X, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ T(j, { onClick: () => t(r.key), children: [
|
|
67
|
+
/* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
68
68
|
B,
|
|
69
69
|
{
|
|
70
70
|
sx: {
|
|
@@ -80,18 +80,18 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
80
80
|
children: r.icon
|
|
81
81
|
}
|
|
82
82
|
) }),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ c(
|
|
84
84
|
z,
|
|
85
85
|
{
|
|
86
|
-
primary: /* @__PURE__ */
|
|
87
|
-
secondary: /* @__PURE__ */
|
|
86
|
+
primary: /* @__PURE__ */ c(F, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
|
|
87
|
+
secondary: /* @__PURE__ */ c(F, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
|
|
88
88
|
}
|
|
89
89
|
)
|
|
90
90
|
] }) }),
|
|
91
|
-
n < e.length - 1 && /* @__PURE__ */
|
|
91
|
+
n < e.length - 1 && /* @__PURE__ */ c(Y, { sx: { color: "divider", ml: 68 } })
|
|
92
92
|
] }, r.key))
|
|
93
93
|
}
|
|
94
|
-
) }), vt = q, Mt = (e) => e * (180 / Math.PI),
|
|
94
|
+
) }), vt = q, Mt = (e) => e * (180 / Math.PI), Lt = (e, t) => [
|
|
95
95
|
{
|
|
96
96
|
description: t.vulnerable_description,
|
|
97
97
|
max: 25,
|
|
@@ -128,7 +128,7 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
128
128
|
GOOD: "#FFC02C",
|
|
129
129
|
VERY_GOOD: "#29C76B",
|
|
130
130
|
EXCEPTIONAL: "#008A5A"
|
|
131
|
-
},
|
|
131
|
+
}, Gt = (e, t, r) => e >= 300 && e < 580 ? {
|
|
132
132
|
status: r.poor,
|
|
133
133
|
color: t ? u.POOR : g.POOR
|
|
134
134
|
} : e >= 580 && e < 670 ? {
|
|
@@ -144,12 +144,12 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
144
144
|
status: r.exceptional,
|
|
145
145
|
color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
|
|
146
146
|
} : { status: r.missing_data }, wt = (e, t, r, n) => {
|
|
147
|
-
const o = e.reduce((
|
|
147
|
+
const o = e.reduce((i, d) => i + d.value, 0);
|
|
148
148
|
let a = 0;
|
|
149
|
-
const s = e.map((
|
|
150
|
-
const d =
|
|
149
|
+
const s = e.map((i) => {
|
|
150
|
+
const d = i.value / o * t, p = r + a, f = p + d;
|
|
151
151
|
return a += d, {
|
|
152
|
-
...
|
|
152
|
+
...i,
|
|
153
153
|
startAngle: p,
|
|
154
154
|
endAngle: f
|
|
155
155
|
};
|
|
@@ -157,8 +157,8 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
157
157
|
return [s[n].startAngle, s[n].endAngle];
|
|
158
158
|
}, Nt = (e, t, r, n, o) => {
|
|
159
159
|
let a = 0, s = 0;
|
|
160
|
-
const
|
|
161
|
-
return
|
|
160
|
+
const i = Math.floor(n), d = n - i;
|
|
161
|
+
return i > r ? (a = e, s = t) : i === r && d > 0 && (a = e, s = o), [a, s];
|
|
162
162
|
}, Pt = (e, t, r = 0) => {
|
|
163
163
|
const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
|
|
164
164
|
return [n, o];
|
|
@@ -170,13 +170,13 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
170
170
|
label: o,
|
|
171
171
|
value: a
|
|
172
172
|
}) => {
|
|
173
|
-
const s = !!a,
|
|
173
|
+
const s = !!a, i = s ? J(n, a) : e && W(e, t) || t;
|
|
174
174
|
return {
|
|
175
|
-
icon: s ? /* @__PURE__ */
|
|
175
|
+
icon: s ? /* @__PURE__ */ c(k, {}) : r,
|
|
176
176
|
isComplete: s,
|
|
177
177
|
key: n,
|
|
178
178
|
primaryText: o,
|
|
179
|
-
secondaryText:
|
|
179
|
+
secondaryText: i
|
|
180
180
|
};
|
|
181
181
|
}, J = (e, t) => ({
|
|
182
182
|
[O.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
|
|
@@ -217,13 +217,13 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
217
217
|
[S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
|
218
218
|
})[e], Z = 1, tt = 1, et = {
|
|
219
219
|
1: M,
|
|
220
|
-
2:
|
|
220
|
+
2: L,
|
|
221
221
|
3: v
|
|
222
222
|
}, rt = {
|
|
223
223
|
1: w,
|
|
224
224
|
2: (e, t) => A(e, t) / 2,
|
|
225
225
|
3: A,
|
|
226
|
-
4:
|
|
226
|
+
4: G
|
|
227
227
|
}, E = [
|
|
228
228
|
{ contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
|
|
229
229
|
{ contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
|
|
@@ -237,9 +237,9 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ i(K, { sx: { bgcolor:
|
|
|
237
237
|
}) => {
|
|
238
238
|
const a = t - o;
|
|
239
239
|
if (a <= 0) return 0;
|
|
240
|
-
const s = N(),
|
|
241
|
-
if (!
|
|
242
|
-
const p =
|
|
240
|
+
const s = N(), i = et[n], d = rt[e];
|
|
241
|
+
if (!i || !d) return a;
|
|
242
|
+
const p = i(s, r), f = d(p, s);
|
|
243
243
|
return Math.max(a / (f || 1), 1);
|
|
244
244
|
}, qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Jt = (e) => E.find((r) => e < r.upperLimit)?.targetAmount ?? tt, Qt = (e) => E.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? Z, Zt = (e, t) => e.map((n) => {
|
|
245
245
|
const o = new Date(0, n.month - 1, 1);
|
|
@@ -284,6 +284,7 @@ class te {
|
|
|
284
284
|
healthScoreChange;
|
|
285
285
|
healthScoreChangeReports = [];
|
|
286
286
|
peerScore = null;
|
|
287
|
+
isLoading = !1;
|
|
287
288
|
constructor(t) {
|
|
288
289
|
this.globalStore = t, this.api = new y(t.endpoint, t.sessionToken, t.onError), b(this);
|
|
289
290
|
}
|
|
@@ -377,9 +378,10 @@ class te {
|
|
|
377
378
|
};
|
|
378
379
|
getSpendingFeeTransactions = async () => {
|
|
379
380
|
try {
|
|
381
|
+
this.isLoading = !0;
|
|
380
382
|
const t = await this.api.getSpendingFeeTransactions(), r = ot(t);
|
|
381
383
|
l(() => {
|
|
382
|
-
this.allTransactions.spendingFee = r;
|
|
384
|
+
this.allTransactions.spendingFee = r, this.isLoading = !1;
|
|
383
385
|
});
|
|
384
386
|
} catch (t) {
|
|
385
387
|
console.error(`Error occurred while getting spending fee transactions: ${t}`);
|
|
@@ -406,8 +408,8 @@ export {
|
|
|
406
408
|
vt as P,
|
|
407
409
|
Nt as a,
|
|
408
410
|
Pt as b,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
+
Lt as c,
|
|
412
|
+
Gt as d,
|
|
411
413
|
g as e,
|
|
412
414
|
Zt as f,
|
|
413
415
|
wt as g,
|
package/dist/common/index.es.js
CHANGED
|
@@ -64,7 +64,7 @@ import { startOfToday as U } from "date-fns/startOfToday";
|
|
|
64
64
|
import { f as bt, a as wt, b as L } from "../BudgetUtil-wjoNuj7B.mjs";
|
|
65
65
|
import { g as ta, e as ea, c as sa, d as ra, i as oa } from "../BudgetUtil-wjoNuj7B.mjs";
|
|
66
66
|
import { a as xt } from "../DebtsStore-DB5U2WMC.mjs";
|
|
67
|
-
import { F as Ct } from "../FinstrongStore-
|
|
67
|
+
import { F as Ct } from "../FinstrongStore-D7r-rru1.mjs";
|
|
68
68
|
import { A as vt, m as Dt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
69
69
|
import { M as Tt } from "../MerchantStore-DrFvsUyy.mjs";
|
|
70
70
|
import { N as Bt } from "../NetWorthStore-CUz0bwVm.mjs";
|