@mx-cartographer/experiences 7.2.12-alpha-ram2-finstrong-testing → 7.2.12-alpha.san1
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 i, 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 G } from "date-fns/addYears";
|
|
11
|
+
import { differenceInDays as L } 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__ */ i(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(
|
|
57
57
|
U,
|
|
58
58
|
{
|
|
59
59
|
sx: {
|
|
@@ -63,8 +63,8 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
children: e.map((r, n) => /* @__PURE__ */ T($.Fragment, { children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ i(X, { secondaryAction: /* @__PURE__ */ i(P, {}), children: /* @__PURE__ */ T(j, { onClick: () => t(r.key), children: [
|
|
67
|
+
/* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
68
68
|
B,
|
|
69
69
|
{
|
|
70
70
|
sx: {
|
|
@@ -80,18 +80,18 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
80
80
|
children: r.icon
|
|
81
81
|
}
|
|
82
82
|
) }),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ i(
|
|
84
84
|
z,
|
|
85
85
|
{
|
|
86
|
-
primary: /* @__PURE__ */
|
|
87
|
-
secondary: /* @__PURE__ */
|
|
86
|
+
primary: /* @__PURE__ */ i(F, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
|
|
87
|
+
secondary: /* @__PURE__ */ i(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__ */ i(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), Gt = (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__ */ c(K, { sx: { bgcolor:
|
|
|
128
128
|
GOOD: "#FFC02C",
|
|
129
129
|
VERY_GOOD: "#29C76B",
|
|
130
130
|
EXCEPTIONAL: "#008A5A"
|
|
131
|
-
},
|
|
131
|
+
}, Lt = (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__ */ c(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((c, d) => c + d.value, 0);
|
|
148
148
|
let a = 0;
|
|
149
|
-
const s = e.map((
|
|
150
|
-
const d =
|
|
149
|
+
const s = e.map((c) => {
|
|
150
|
+
const d = c.value / o * t, p = r + a, f = p + d;
|
|
151
151
|
return a += d, {
|
|
152
|
-
...
|
|
152
|
+
...c,
|
|
153
153
|
startAngle: p,
|
|
154
154
|
endAngle: f
|
|
155
155
|
};
|
|
@@ -157,8 +157,8 @@ const q = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(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 c = Math.floor(n), d = n - c;
|
|
161
|
+
return c > r ? (a = e, s = t) : c === 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__ */ c(K, { sx: { bgcolor:
|
|
|
170
170
|
label: o,
|
|
171
171
|
value: a
|
|
172
172
|
}) => {
|
|
173
|
-
const s = !!a,
|
|
173
|
+
const s = !!a, c = s ? J(n, a) : e && W(e, t) || t;
|
|
174
174
|
return {
|
|
175
|
-
icon: s ? /* @__PURE__ */
|
|
175
|
+
icon: s ? /* @__PURE__ */ i(k, {}) : r,
|
|
176
176
|
isComplete: s,
|
|
177
177
|
key: n,
|
|
178
178
|
primaryText: o,
|
|
179
|
-
secondaryText:
|
|
179
|
+
secondaryText: c
|
|
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__ */ c(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: G,
|
|
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: L
|
|
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__ */ c(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(), c = et[n], d = rt[e];
|
|
241
|
+
if (!c || !d) return a;
|
|
242
|
+
const p = c(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,7 +284,6 @@ class te {
|
|
|
284
284
|
healthScoreChange;
|
|
285
285
|
healthScoreChangeReports = [];
|
|
286
286
|
peerScore = null;
|
|
287
|
-
isLoading = !1;
|
|
288
287
|
constructor(t) {
|
|
289
288
|
this.globalStore = t, this.api = new y(t.endpoint, t.sessionToken, t.onError), b(this);
|
|
290
289
|
}
|
|
@@ -378,10 +377,9 @@ class te {
|
|
|
378
377
|
};
|
|
379
378
|
getSpendingFeeTransactions = async () => {
|
|
380
379
|
try {
|
|
381
|
-
this.isLoading = !0;
|
|
382
380
|
const t = await this.api.getSpendingFeeTransactions(), r = ot(t);
|
|
383
381
|
l(() => {
|
|
384
|
-
this.allTransactions.spendingFee = r
|
|
382
|
+
this.allTransactions.spendingFee = r;
|
|
385
383
|
});
|
|
386
384
|
} catch (t) {
|
|
387
385
|
console.error(`Error occurred while getting spending fee transactions: ${t}`);
|
|
@@ -408,8 +406,8 @@ export {
|
|
|
408
406
|
vt as P,
|
|
409
407
|
Nt as a,
|
|
410
408
|
Pt as b,
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
Gt as c,
|
|
410
|
+
Lt as d,
|
|
413
411
|
g as e,
|
|
414
412
|
Zt as f,
|
|
415
413
|
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-CJBV4K5Y.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";
|