@mx-cartographer/experiences 8.0.24 → 8.1.0
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 +8 -9
- package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
- package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
- package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
- package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
- package/dist/Analytics-CjZ0emfs.mjs +53 -0
- package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
- package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
- package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
- package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
- package/dist/CategoryApi-CogDFScz.mjs +29 -0
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
- package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
- package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
- package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
- package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
- package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
- package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
- package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
- package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
- package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
- package/dist/Goal-MFBpoOIC.mjs +29 -0
- package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
- package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
- package/dist/Localization-C_HZg9tJ.mjs +15 -0
- package/dist/Localization-CkQ49EKr.mjs +26 -0
- package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
- package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
- package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
- package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
- package/dist/NotificationApi-DF0obHoR.mjs +20 -0
- package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
- package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
- package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
- package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
- package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
- package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
- package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
- package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
- package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
- package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
- package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
- package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
- package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
- package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
- package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
- package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
- package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
- package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +63 -65
- package/dist/accounts/stores/AccountStore.d.ts +1 -1
- package/dist/budgets/index.es.js +11 -11
- package/dist/budgets/store/BudgetsStore.d.ts +1 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +428 -449
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/common/components/Error.d.ts +11 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/constants/index.d.ts +0 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +391 -492
- package/dist/common/stores/AppDataStore.d.ts +2 -2
- package/dist/common/stores/ConnectStore.d.ts +1 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +0 -9
- package/dist/common/utils/index.d.ts +1 -2
- package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
- package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
- package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
- package/dist/{common → core}/api/BannerApi.d.ts +1 -1
- package/dist/{common → core}/api/BeatApi.d.ts +2 -2
- package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
- package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
- package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
- package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
- package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
- package/dist/{help → core}/api/HelpApi.d.ts +2 -2
- package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
- package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
- package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
- package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
- package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
- package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
- package/dist/{common → core}/api/UserApi.d.ts +2 -2
- package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
- package/dist/core/api/index.d.ts +20 -0
- package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +90 -38
- package/dist/{common → core}/utils/Fetch.d.ts +1 -1
- package/dist/core/utils/Localization.d.ts +9 -0
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/debts/index.es.js +7 -7
- package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +16 -17
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +50 -51
- package/dist/goals/stores/GoalStore.d.ts +1 -1
- package/dist/help/index.es.js +2 -2
- package/dist/help/store/HelpStore.d.ts +1 -1
- package/dist/insights/index.es.js +6 -6
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/index.es.js +2 -2
- package/dist/investments/stores/HoldingStore.d.ts +1 -1
- package/dist/merchants/index.es.js +1 -1
- package/dist/merchants/stores/MerchantStore.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/networth/index.es.js +8 -8
- package/dist/networth/stores/NetWorthStore.d.ts +1 -1
- package/dist/notifications/index.es.js +5 -5
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/recurringtransactions/index.es.js +26 -25
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +65 -66
- package/dist/settings/stores/SettingsStore.d.ts +2 -2
- package/dist/spending/index.es.js +6 -6
- package/dist/transactions/index.d.ts +0 -1
- package/dist/transactions/index.es.js +22 -24
- package/dist/transactions/stores/TransactionStore.d.ts +3 -2
- package/dist/trends/index.es.js +14 -14
- package/package.json +1 -1
- package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
- package/dist/Goal-0loDagc5.mjs +0 -6
- package/dist/Localization-CPkpIwIx.mjs +0 -37
- package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
- package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
- package/dist/cashflow/api/CashflowApi.d.ts +0 -13
- package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
- package/dist/common/api/index.d.ts +0 -10
- package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
- package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { makeAutoObservable as
|
|
2
|
-
import { format as
|
|
1
|
+
import { makeAutoObservable as D, runInAction as d } from "mobx";
|
|
2
|
+
import { format as A } from "date-fns/format";
|
|
3
3
|
import { fromUnixTime as b } from "date-fns/fromUnixTime";
|
|
4
|
-
import { getUnixTime as
|
|
5
|
-
import { subMonths as
|
|
6
|
-
import { F as
|
|
4
|
+
import { getUnixTime as O } from "date-fns/getUnixTime";
|
|
5
|
+
import { subMonths as x } from "date-fns/subMonths";
|
|
6
|
+
import { F as T } from "./FinstrongApi-FpmsS_sy.mjs";
|
|
7
7
|
import { jsx as c, jsxs as C } from "react/jsx-runtime";
|
|
8
|
-
import { addDays as
|
|
9
|
-
import { addMonths as
|
|
10
|
-
import { addYears as
|
|
11
|
-
import { differenceInDays as
|
|
12
|
-
import { differenceInMonths as
|
|
13
|
-
import { differenceInWeeks as
|
|
14
|
-
import { startOfToday as
|
|
15
|
-
import { ChevronRight as P, Check as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { Text as
|
|
26
|
-
import { f as I, D as
|
|
27
|
-
import { b as
|
|
28
|
-
import { f as
|
|
29
|
-
const
|
|
8
|
+
import { addDays as v } from "date-fns/addDays";
|
|
9
|
+
import { addMonths as E } from "date-fns/addMonths";
|
|
10
|
+
import { addYears as M } from "date-fns/addYears";
|
|
11
|
+
import { differenceInDays as G } from "date-fns/differenceInDays";
|
|
12
|
+
import { differenceInMonths as N } from "date-fns/differenceInMonths";
|
|
13
|
+
import { differenceInWeeks as F } from "date-fns/differenceInWeeks";
|
|
14
|
+
import { startOfToday as w } from "date-fns/startOfToday";
|
|
15
|
+
import { ChevronRight as P, Check as H } from "@mxenabled/mx-icons";
|
|
16
|
+
import L from "react";
|
|
17
|
+
import k from "@mui/material/Avatar";
|
|
18
|
+
import z from "@mui/material/Box";
|
|
19
|
+
import K from "@mui/material/Divider";
|
|
20
|
+
import B from "@mui/material/List";
|
|
21
|
+
import Y from "@mui/material/ListItem";
|
|
22
|
+
import U from "@mui/material/ListItemAvatar";
|
|
23
|
+
import X from "@mui/material/ListItemButton";
|
|
24
|
+
import V from "@mui/material/ListItemText";
|
|
25
|
+
import { Text as y } from "@mxenabled/mxui";
|
|
26
|
+
import { f as I, D as _ } from "./DateFormats-CaOj_4eI.mjs";
|
|
27
|
+
import { b as W } from "./Localization-CkQ49EKr.mjs";
|
|
28
|
+
import { f as $ } from "./NumberFormatting-CyrvFgfd.mjs";
|
|
29
|
+
const h = {
|
|
30
30
|
creditScore: {
|
|
31
31
|
poor: 600,
|
|
32
32
|
good: 720
|
|
@@ -47,15 +47,15 @@ const m = {
|
|
|
47
47
|
poor: 110,
|
|
48
48
|
good: 100
|
|
49
49
|
}
|
|
50
|
-
},
|
|
50
|
+
}, p = {
|
|
51
51
|
GOOD: "GOOD",
|
|
52
52
|
FAIR: "FAIR",
|
|
53
53
|
OFF_TRACK: "OFF TRACK",
|
|
54
54
|
MISSING: "MISSING DATA"
|
|
55
55
|
};
|
|
56
|
-
var
|
|
57
|
-
const
|
|
58
|
-
|
|
56
|
+
var f = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(f || {});
|
|
57
|
+
const j = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(z, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
|
|
58
|
+
B,
|
|
59
59
|
{
|
|
60
60
|
sx: {
|
|
61
61
|
"& .MuiListItemSecondaryAction-root": {
|
|
@@ -63,10 +63,10 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
63
63
|
pr: 24
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
children: e.map((r, n) => /* @__PURE__ */ C(
|
|
67
|
-
/* @__PURE__ */ c(
|
|
68
|
-
/* @__PURE__ */ c(
|
|
69
|
-
|
|
66
|
+
children: e.map((r, n) => /* @__PURE__ */ C(L.Fragment, { children: [
|
|
67
|
+
/* @__PURE__ */ c(Y, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(X, { onClick: () => t(r.key), children: [
|
|
68
|
+
/* @__PURE__ */ c(U, { children: /* @__PURE__ */ c(
|
|
69
|
+
k,
|
|
70
70
|
{
|
|
71
71
|
sx: {
|
|
72
72
|
bgcolor: "primary.main",
|
|
@@ -82,17 +82,17 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
82
82
|
}
|
|
83
83
|
) }),
|
|
84
84
|
/* @__PURE__ */ c(
|
|
85
|
-
|
|
85
|
+
V,
|
|
86
86
|
{
|
|
87
|
-
primary: /* @__PURE__ */ c(
|
|
88
|
-
secondary: /* @__PURE__ */ c(
|
|
87
|
+
primary: /* @__PURE__ */ c(y, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
|
|
88
|
+
secondary: /* @__PURE__ */ c(y, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
] }) }),
|
|
92
|
-
/* @__PURE__ */ c(
|
|
92
|
+
/* @__PURE__ */ c(K, { sx: { color: "divider", ml: n === e.length - 1 ? 0 : 68 } })
|
|
93
93
|
] }, r.key))
|
|
94
94
|
}
|
|
95
|
-
) }),
|
|
95
|
+
) }), Mt = j, Gt = (e) => e * (180 / Math.PI), Nt = (e, t) => [
|
|
96
96
|
{
|
|
97
97
|
description: t.vulnerable_description,
|
|
98
98
|
max: 25,
|
|
@@ -129,7 +129,7 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
129
129
|
GOOD: "#FFC02C",
|
|
130
130
|
VERY_GOOD: "#29C76B",
|
|
131
131
|
EXCEPTIONAL: "#008A5A"
|
|
132
|
-
},
|
|
132
|
+
}, wt = (e, t, r) => e >= 300 && e < 580 ? {
|
|
133
133
|
status: r.poor,
|
|
134
134
|
color: t ? u.POOR : g.POOR
|
|
135
135
|
} : e >= 580 && e < 670 ? {
|
|
@@ -148,22 +148,22 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
148
148
|
const o = e.reduce((i, l) => i + l.value, 0);
|
|
149
149
|
let a = 0;
|
|
150
150
|
const s = e.map((i) => {
|
|
151
|
-
const l = i.value / o * t,
|
|
151
|
+
const l = i.value / o * t, m = r + a, S = m + l;
|
|
152
152
|
return a += l, {
|
|
153
153
|
...i,
|
|
154
|
-
startAngle:
|
|
155
|
-
endAngle:
|
|
154
|
+
startAngle: m,
|
|
155
|
+
endAngle: S
|
|
156
156
|
};
|
|
157
157
|
});
|
|
158
158
|
return [s[n].startAngle, s[n].endAngle];
|
|
159
|
-
},
|
|
159
|
+
}, Ht = (e, t, r, n, o) => {
|
|
160
160
|
let a = 0, s = 0;
|
|
161
161
|
const i = Math.floor(n), l = n - i;
|
|
162
162
|
return i > r ? (a = e, s = t) : i === r && l > 0 && (a = e, s = o), [a, s];
|
|
163
|
-
},
|
|
163
|
+
}, Lt = (e, t, r = 0) => {
|
|
164
164
|
const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
|
|
165
165
|
return [n, o];
|
|
166
|
-
},
|
|
166
|
+
}, kt = ({
|
|
167
167
|
dynamicCopy: e,
|
|
168
168
|
fallbackLabel: t,
|
|
169
169
|
icon: r,
|
|
@@ -171,37 +171,37 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
171
171
|
label: o,
|
|
172
172
|
value: a
|
|
173
173
|
}) => {
|
|
174
|
-
const s = !!a, i = s ?
|
|
174
|
+
const s = !!a, i = s ? q(n, a) : e && W(e, t) || t;
|
|
175
175
|
return {
|
|
176
|
-
icon: s ? /* @__PURE__ */ c(
|
|
176
|
+
icon: s ? /* @__PURE__ */ c(H, {}) : r,
|
|
177
177
|
isComplete: s,
|
|
178
178
|
key: n,
|
|
179
179
|
primaryText: o,
|
|
180
180
|
secondaryText: i
|
|
181
181
|
};
|
|
182
|
-
},
|
|
183
|
-
[
|
|
184
|
-
[
|
|
185
|
-
})[e]?.(t) ?? String(t),
|
|
182
|
+
}, q = (e, t) => ({
|
|
183
|
+
[f.DateOfBirth]: (n) => A(new Date(Number(n) * 1e3), "MMM d, yyyy"),
|
|
184
|
+
[f.MonthlyIncome]: (n) => $(Number(n), "0.00")
|
|
185
|
+
})[e]?.(t) ?? String(t), zt = (e) => e !== null ? Math.round(e * 100) : null, Kt = (e) => {
|
|
186
186
|
const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
|
|
187
|
-
return I(t,
|
|
187
|
+
return I(t, _.MONTH_SHORT);
|
|
188
|
+
}, Bt = (e) => {
|
|
189
|
+
const { good: t, poor: r } = h.daysOfCashOnHand;
|
|
190
|
+
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
188
191
|
}, Yt = (e) => {
|
|
189
|
-
const { good: t, poor: r } =
|
|
192
|
+
const { good: t, poor: r } = h.emergencySavings;
|
|
190
193
|
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
191
194
|
}, Ut = (e) => {
|
|
192
|
-
const { good: t, poor: r } =
|
|
193
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
194
|
-
}, Xt = (e) => {
|
|
195
|
-
const { good: t, poor: r } = m.spendToIncomeRatio;
|
|
195
|
+
const { good: t, poor: r } = h.spendToIncomeRatio;
|
|
196
196
|
return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
|
|
197
|
-
},
|
|
198
|
-
const { good: t, poor: r } =
|
|
197
|
+
}, Xt = (e) => {
|
|
198
|
+
const { good: t, poor: r } = h.debtToIncomeRatio;
|
|
199
199
|
return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
|
|
200
|
-
},
|
|
201
|
-
const { good: t, poor: r } =
|
|
200
|
+
}, Vt = (e) => {
|
|
201
|
+
const { good: t, poor: r } = h.creditScore;
|
|
202
202
|
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
203
|
-
},
|
|
204
|
-
const r =
|
|
203
|
+
}, J = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", Wt = (e, t) => {
|
|
204
|
+
const r = J(e), n = {
|
|
205
205
|
GOOD: t.count_good_description,
|
|
206
206
|
OFF_TRACK: t.count_off_track_description,
|
|
207
207
|
MISSING: t.count_missing_description
|
|
@@ -211,25 +211,25 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
211
211
|
description: n[r],
|
|
212
212
|
title: t.count_card_title
|
|
213
213
|
};
|
|
214
|
-
},
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
})[e],
|
|
220
|
-
1:
|
|
221
|
-
2:
|
|
222
|
-
3:
|
|
223
|
-
},
|
|
224
|
-
1:
|
|
225
|
-
2: (e, t) =>
|
|
226
|
-
3:
|
|
227
|
-
4:
|
|
228
|
-
},
|
|
214
|
+
}, $t = (e) => ({
|
|
215
|
+
[p.GOOD]: { backgroundColor: "success.lighter", color: "success.dark" },
|
|
216
|
+
[p.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
|
|
217
|
+
[p.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
|
|
218
|
+
[p.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
|
219
|
+
})[e], Q = 1, Z = 1, tt = {
|
|
220
|
+
1: E,
|
|
221
|
+
2: M,
|
|
222
|
+
3: v
|
|
223
|
+
}, et = {
|
|
224
|
+
1: N,
|
|
225
|
+
2: (e, t) => F(e, t) / 2,
|
|
226
|
+
3: F,
|
|
227
|
+
4: G
|
|
228
|
+
}, R = [
|
|
229
229
|
{ contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
|
|
230
230
|
{ contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
|
|
231
231
|
{ contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
|
|
232
|
-
],
|
|
232
|
+
], jt = ({
|
|
233
233
|
contribution: e,
|
|
234
234
|
goalAmount: t,
|
|
235
235
|
goalPeriod: r,
|
|
@@ -238,39 +238,24 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
238
238
|
}) => {
|
|
239
239
|
const a = t - o;
|
|
240
240
|
if (a <= 0) return 0;
|
|
241
|
-
const s =
|
|
241
|
+
const s = w(), i = tt[n], l = et[e];
|
|
242
242
|
if (!i || !l) return a;
|
|
243
|
-
const
|
|
244
|
-
return Math.max(a / (
|
|
245
|
-
},
|
|
246
|
-
x: I(new Date(0, n.month - 1, 1),
|
|
243
|
+
const m = i(s, r), S = l(m, s);
|
|
244
|
+
return Math.max(a / (S || 1), 1);
|
|
245
|
+
}, qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Jt = (e) => R.find((r) => e < r.upperLimit)?.targetAmount ?? Z, Qt = (e) => R.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? Q, Zt = (e, t) => [...e].sort((n, o) => n.year === o.year ? n.month - o.month : n.year - o.year).map((n) => ({
|
|
246
|
+
x: I(new Date(0, n.month - 1, 1), _.MONTH_SHORT),
|
|
247
247
|
y: n[t]
|
|
248
|
-
})),
|
|
248
|
+
})), rt = (e) => e.sort((t, r) => t.monthly_health_score_average.year !== r.monthly_health_score_average.year ? t.monthly_health_score_average.year - r.monthly_health_score_average.year : t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
|
|
249
249
|
x: I(
|
|
250
250
|
new Date(0, t.monthly_health_score_average.month - 1, 1),
|
|
251
|
-
|
|
251
|
+
_.MONTH_SHORT
|
|
252
252
|
),
|
|
253
253
|
y: Math.round(t.monthly_health_score_average.average_health_score)
|
|
254
|
-
})),
|
|
254
|
+
})), nt = (e) => e.map(({ transaction: r }) => ({
|
|
255
255
|
...r
|
|
256
256
|
})).sort((r, n) => n.date - r.date);
|
|
257
|
-
class
|
|
258
|
-
|
|
259
|
-
constructor(t, r, n) {
|
|
260
|
-
this.fetchInstance = new H(t, r, void 0, n);
|
|
261
|
-
}
|
|
262
|
-
calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
|
|
263
|
-
getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
|
|
264
|
-
getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
|
|
265
|
-
getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
|
|
266
|
-
getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
|
|
267
|
-
getHealthScoreChangeReports = async (t, r) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${r}`).then((n) => n);
|
|
268
|
-
getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((r) => r);
|
|
269
|
-
getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
|
|
270
|
-
getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
|
|
271
|
-
}
|
|
272
|
-
class re {
|
|
273
|
-
api = new F("/", "");
|
|
257
|
+
class te {
|
|
258
|
+
api = new T("/", "");
|
|
274
259
|
augmentedChartData = [];
|
|
275
260
|
averageHealthScores = [];
|
|
276
261
|
monthlySummaries = [];
|
|
@@ -286,7 +271,7 @@ class re {
|
|
|
286
271
|
isSpendingInitialized = !1;
|
|
287
272
|
isIncomeInitialized = !1;
|
|
288
273
|
constructor(t) {
|
|
289
|
-
this.globalStore = t, this.api = new
|
|
274
|
+
this.globalStore = t, this.api = new T(t.endpoint, t.sessionToken, t.onError), D(this);
|
|
290
275
|
}
|
|
291
276
|
setSpendingInitialized = (t) => {
|
|
292
277
|
this.isSpendingInitialized = t;
|
|
@@ -349,7 +334,7 @@ class re {
|
|
|
349
334
|
}
|
|
350
335
|
};
|
|
351
336
|
loadHealthScoreChangeReports = async () => {
|
|
352
|
-
const t =
|
|
337
|
+
const t = O(x(/* @__PURE__ */ new Date(), 2)), r = O(/* @__PURE__ */ new Date());
|
|
353
338
|
try {
|
|
354
339
|
const n = await this.api.getHealthScoreChangeReports(
|
|
355
340
|
t,
|
|
@@ -363,7 +348,7 @@ class re {
|
|
|
363
348
|
}
|
|
364
349
|
};
|
|
365
350
|
loadPeerScore = async () => {
|
|
366
|
-
const t =
|
|
351
|
+
const t = A(b(this.globalStore.appDataStore.user.birthday), "yyyy");
|
|
367
352
|
try {
|
|
368
353
|
const r = await this.api.getPeerScore(t);
|
|
369
354
|
d(() => {
|
|
@@ -377,7 +362,7 @@ class re {
|
|
|
377
362
|
try {
|
|
378
363
|
const t = await this.api.getAverageHealthScores();
|
|
379
364
|
d(() => {
|
|
380
|
-
this.augmentedChartData =
|
|
365
|
+
this.augmentedChartData = rt(t);
|
|
381
366
|
});
|
|
382
367
|
} catch (t) {
|
|
383
368
|
console.error(`Error occurred while getting augmented chart data: ${t}`);
|
|
@@ -385,7 +370,7 @@ class re {
|
|
|
385
370
|
};
|
|
386
371
|
getSpendingFeeTransactions = async () => {
|
|
387
372
|
try {
|
|
388
|
-
const t = await this.api.getSpendingFeeTransactions(), r =
|
|
373
|
+
const t = await this.api.getSpendingFeeTransactions(), r = nt(t);
|
|
389
374
|
d(() => {
|
|
390
375
|
this.spendingFeeTransactions = r;
|
|
391
376
|
});
|
|
@@ -419,33 +404,32 @@ class re {
|
|
|
419
404
|
};
|
|
420
405
|
}
|
|
421
406
|
export {
|
|
422
|
-
|
|
407
|
+
f as A,
|
|
423
408
|
u as C,
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
409
|
+
te as F,
|
|
410
|
+
Mt as P,
|
|
411
|
+
Ht as a,
|
|
412
|
+
Lt as b,
|
|
413
|
+
Nt as c,
|
|
414
|
+
wt as d,
|
|
430
415
|
g as e,
|
|
431
|
-
|
|
416
|
+
Zt as f,
|
|
432
417
|
Pt as g,
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
F as y
|
|
418
|
+
$t as h,
|
|
419
|
+
p as i,
|
|
420
|
+
Vt as j,
|
|
421
|
+
Qt as k,
|
|
422
|
+
Jt as l,
|
|
423
|
+
jt as m,
|
|
424
|
+
qt as n,
|
|
425
|
+
Yt as o,
|
|
426
|
+
J as p,
|
|
427
|
+
Bt as q,
|
|
428
|
+
Gt as r,
|
|
429
|
+
zt as s,
|
|
430
|
+
Xt as t,
|
|
431
|
+
Kt as u,
|
|
432
|
+
Ut as v,
|
|
433
|
+
Wt as w,
|
|
434
|
+
kt as x
|
|
451
435
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import c from "bowser";
|
|
2
|
+
import { F as a, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
|
|
3
|
+
class h {
|
|
4
|
+
fetchInstance;
|
|
5
|
+
constructor(t, s, n) {
|
|
6
|
+
this.fetchInstance = new a(t, s, void 0, n);
|
|
7
|
+
}
|
|
8
|
+
initializeAnalyticsSession = async (t, s) => {
|
|
9
|
+
const n = c.getParser(window.navigator.userAgent), { analytics_session: i } = await this.fetchInstance.post(e.ANALYTICS_SESSION, {
|
|
10
|
+
browser_name: n.getBrowserName() || "Unknown",
|
|
11
|
+
browser_version: n.getBrowserVersion() || "0.0.0",
|
|
12
|
+
is_first_visit: !1,
|
|
13
|
+
product_name: "Individual Widget",
|
|
14
|
+
product_version: t
|
|
15
|
+
});
|
|
16
|
+
return i ? (this.fetchInstance.post(e.ANALYTICS_FEATURE_VISITS, {
|
|
17
|
+
feature_visit: {
|
|
18
|
+
analytics_session_guid: i.guid,
|
|
19
|
+
feature_name: s || "Experiences",
|
|
20
|
+
is_first_visit: i.is_first_visit
|
|
21
|
+
}
|
|
22
|
+
}), { analytics_session: i }) : { analytics_session: null };
|
|
23
|
+
};
|
|
24
|
+
sendAnalyticEvent = async (t) => this.fetchInstance.post(e.ANALYTICS_EVENTS, t).catch((s) => {
|
|
25
|
+
throw s;
|
|
26
|
+
});
|
|
27
|
+
sendAnalyticsPageview = async (t) => this.fetchInstance.post(e.ANALYTICS_PAGEVIEWS, t).catch((s) => {
|
|
28
|
+
throw s;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
class A {
|
|
32
|
+
fetchInstance;
|
|
33
|
+
constructor(t, s, n) {
|
|
34
|
+
this.fetchInstance = new a(t, s, void 0, n);
|
|
35
|
+
}
|
|
36
|
+
getGlobalCopy = async (t, s) => this.fetchInstance.post(`${e.LOCALIZED_CONTENT}/${t}`, { translation_key: s }).then((n) => n);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
h as A,
|
|
40
|
+
A as G
|
|
41
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { F as A, A as s } from "./ApiEndpoints-C5IA97i7.mjs";
|
|
2
|
+
class h {
|
|
3
|
+
fetchInstance;
|
|
4
|
+
constructor(n, E, e) {
|
|
5
|
+
this.fetchInstance = new A(n, E, void 0, e);
|
|
6
|
+
}
|
|
7
|
+
addGoal = async (n) => this.fetchInstance.post(s.GOALS, n).then((E) => E.goal);
|
|
8
|
+
addRetirementGoal = async (n) => this.fetchInstance.post(s.RETIREMENT_GOALS, n).then((E) => E.retirement_goal);
|
|
9
|
+
addRetirementGoalAccount = async (n) => this.fetchInstance.post(s.RETIREMENT_GOAL_ACCOUNTS, n).then((E) => E.retirement_goal_account);
|
|
10
|
+
getGoalByGuid = async (n) => this.fetchInstance.get(`${s.GOALS}/${n}`).then((E) => E.goal);
|
|
11
|
+
getGoals = async () => this.fetchInstance.get(s.GOALS).then((n) => n.goals);
|
|
12
|
+
getMonthlyCashFlowProfile = async () => this.fetchInstance.get(s.MONTHLY_CASH_FLOW_PROFILE).then((n) => n.monthly_cash_flow_profile);
|
|
13
|
+
getRetirementGoals = async () => this.fetchInstance.get(s.RETIREMENT_GOALS).then((n) => n.retirement_goals);
|
|
14
|
+
getRetirementGoalAccounts = async () => this.fetchInstance.get(s.RETIREMENT_GOAL_ACCOUNTS).then((n) => n.retirement_goal_accounts);
|
|
15
|
+
removeGoal = async (n) => this.fetchInstance.delete(`${s.GOALS}/${n}`).then((E) => E);
|
|
16
|
+
removeRetirementGoal = async (n) => this.fetchInstance.delete(`${s.RETIREMENT_GOALS}/${n}`).then((E) => E);
|
|
17
|
+
removeRetirementGoalAccount = async (n) => this.fetchInstance.delete(`${s.RETIREMENT_GOAL_ACCOUNTS}/${n}`).then((E) => E);
|
|
18
|
+
reorderGoals = async (n) => this.fetchInstance.post(`${s.GOALS}/reposition`, { goals: n }).then((E) => E.goals);
|
|
19
|
+
updateGoal = async (n) => this.fetchInstance.put(`${s.GOALS}/${n.guid}`, n).then((E) => E.goal);
|
|
20
|
+
updateMonthlyCashFlowProfile = async (n) => this.fetchInstance.put(`${s.MONTHLY_CASH_FLOW_PROFILE}`, n).then((E) => E.monthly_cash_flow_profile);
|
|
21
|
+
updateRetirementGoal = async (n) => this.fetchInstance.put(`${s.RETIREMENT_GOALS}/${n.guid}`, n).then((E) => E.retirement_goal);
|
|
22
|
+
}
|
|
23
|
+
var r = /* @__PURE__ */ ((t) => (t[t.DEBT_TRACK = 1] = "DEBT_TRACK", t[t.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", t[t.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", t[t.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", t))(r || {}), _ = /* @__PURE__ */ ((t) => (t[t.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", t[t.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", t[t.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", t[t.ACTION = 4] = "ACTION", t))(_ || {}), R = /* @__PURE__ */ ((t) => (t[t.AUTOMOBILE = 1] = "AUTOMOBILE", t[t.COLLEGE = 2] = "COLLEGE", t[t.HOUSE = 3] = "HOUSE", t[t.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", t[t.VACATION = 5] = "VACATION", t[t.ELECTRONIC = 6] = "ELECTRONIC", t[t.OTHER = 7] = "OTHER", t[t.RETIREMENT = 8] = "RETIREMENT", t[t.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", t[t.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", t[t.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", t[t.CREDIT_CARD = 12] = "CREDIT_CARD", t[t.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", t[t.LOANS = 14] = "LOANS", t))(R || {});
|
|
24
|
+
export {
|
|
25
|
+
h as G,
|
|
26
|
+
R as M,
|
|
27
|
+
r as T,
|
|
28
|
+
_ as a
|
|
29
|
+
};
|