@mx-cartographer/experiences 7.2.9-alpha.san4 → 7.2.10
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/{Account-CBQnFO6w.mjs → Account-B-CuHOYf.mjs} +1 -1
- package/dist/{AccountDetailsContent-CmdOOZw1.mjs → AccountDetailsContent-DfzPOeMI.mjs} +10 -10
- package/dist/{AccountDetailsHeader-CaIoP_2Q.mjs → AccountDetailsHeader-vcy67tuH.mjs} +8 -8
- package/dist/{AccountFields-CLbLAhLf.mjs → AccountFields-cUP-9Hm6.mjs} +5 -5
- package/dist/{AccountListItem-CPm3572e.mjs → AccountListItem-DChcf3SN.mjs} +4 -4
- package/dist/{AccountStore-DttEGFeu.mjs → AccountStore-D6KiXA1B.mjs} +29 -40
- package/dist/{Accounts-B5Yr0e_o.mjs → Accounts-IeEtQjzA.mjs} +1 -1
- package/dist/{BudgetUtil-wjoNuj7B.mjs → BudgetUtil-B2ZXyw-g.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-ZO9N26Kx.mjs → CategorySelectorDrawer-DUe4lH5-.mjs} +3 -3
- package/dist/{CategoryStore-C1IfDPCE.mjs → CategoryStore-BCcpI3oJ.mjs} +1 -1
- package/dist/{CategoryUtil-DUM8NuGO.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
- package/dist/{ConnectDrawer-FyY0AWYQ.mjs → ConnectDrawer-DaFRU5st.mjs} +2 -2
- package/dist/{ConnectionsDrawer-Cd_rztVC.mjs → ConnectionsDrawer-DHJ7qdWL.mjs} +3 -3
- package/dist/{CurrencyInput-CBOkNlNP.mjs → CurrencyInput-CsCy7uaS.mjs} +1 -1
- package/dist/{DateUtil-CBdcsyuk.mjs → DateUtil-BcuH7ErC.mjs} +3 -3
- package/dist/{DebtsStore-DB5U2WMC.mjs → DebtsStore-z3VARSO6.mjs} +1 -1
- package/dist/{Dialog-BPTr3qHE.mjs → Dialog-CWW597AF.mjs} +2 -2
- package/dist/Drawer-kEE73B87.mjs +113 -0
- package/dist/{ExportCsvAction-DlGZfm4y.mjs → ExportCsvAction-sX8Rg4Ov.mjs} +3 -3
- package/dist/FinstrongStore-F2c607dj.mjs +101 -0
- package/dist/{GoalStore-deVLYr7n.mjs → GoalStore-TD0BfzWX.mjs} +3 -3
- package/dist/{Help-BnPXM_N2.mjs → Help-B6dIcujh.mjs} +2 -2
- package/dist/{LineChart-Ct9DNmhS.mjs → LineChart-D4GI7nVh.mjs} +181 -209
- package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-DHa3KJPs.mjs} +10 -10
- package/dist/{ManageIncome-DB_lKOIy.mjs → ManageIncome-D3n1EWxe.mjs} +61 -63
- package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-DpeqN9n3.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-D0gfmbaF.mjs} +1 -1
- package/dist/{NetWorthStore-CUz0bwVm.mjs → NetWorthStore-B_1oulrt.mjs} +2 -2
- package/dist/{NotificationSettings-Bfb3T7nN.mjs → NotificationSettings-BRm_EJZV.mjs} +5 -5
- package/dist/{OriginalBalanceAction-BLiU-7Lf.mjs → OriginalBalanceAction-CAaVbVMO.mjs} +3 -3
- package/dist/{RecurringSettings-dJJxtLyU.mjs → RecurringSettings-C28GrQcP.mjs} +4 -4
- package/dist/{RecurringTransactions-CngsRZ3K.mjs → RecurringTransactions-ej39mgA6.mjs} +44 -45
- package/dist/{RecurringTransactionsStore-C4RVULF8.mjs → RecurringTransactionsStore-DrzS1LmF.mjs} +1 -1
- package/dist/{SpendingData-BuJ03S9d.mjs → SpendingData-D5vsfYKo.mjs} +16 -16
- package/dist/{TransactionDetails-CJvE4LNC.mjs → TransactionDetails-BWffqew4.mjs} +8 -11
- package/dist/{TransactionStore-DvOEbOzL.mjs → TransactionStore-DxPLdF3B.mjs} +3 -3
- package/dist/{TrendsStore-BVNxGsE4.mjs → TrendsStore-DCYbpXPO.mjs} +14 -14
- package/dist/{User-wXzDI4M8.mjs → User-BQUxBeZV.mjs} +2 -2
- package/dist/{WidgetContainer-GoNq8wwm.mjs → WidgetContainer-C88Ecu2W.mjs} +4 -4
- package/dist/accounts/index.es.js +14 -14
- package/dist/accounts/stores/AccountStore.d.ts +0 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +12 -12
- package/dist/cashflow/index.es.js +44 -44
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Select.d.ts +2 -4
- package/dist/common/components/charts/LineChart.d.ts +2 -8
- package/dist/common/components/charts/linechart/CustomMark.d.ts +0 -4
- package/dist/common/components/drawer/Drawer.d.ts +0 -3
- package/dist/common/hooks/useAriaLive.d.ts +8 -0
- package/dist/common/index.es.js +33 -33
- package/dist/common/types/Finstrong.d.ts +0 -50
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +1 -58
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-hrNpJ77n.mjs → exportTransactionsToCSV-7bVS7KXf.mjs} +2 -2
- package/dist/finstrong/api/FinstrongApi.d.ts +0 -5
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +1 -3
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -4
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +3 -4
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/index.es.js +1055 -3130
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -9
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -58
- package/dist/finstrong/utils/Finstrong.d.ts +6 -0
- package/dist/goals/index.es.js +14 -14
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-C41HAxM5.mjs → hooks-D6XlXHf4.mjs} +3 -3
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +34 -34
- package/dist/notifications/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +13 -13
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +373 -222
- package/dist/transactions/index.es.js +307 -271
- package/dist/trends/index.es.js +94 -94
- package/dist/{useAccountDisplayName-B5O6hQ1B.mjs → useAccountDisplayName-BcRqfar8.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-DBpwEq10.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Drawer-BEtCk82g.mjs +0 -163
- package/dist/FinstrongStore-rVhw737g.mjs +0 -432
- package/dist/SpendingLegend-squvjEhu.mjs +0 -170
- package/dist/accounts/components/AccountsListCompact.d.ts +0 -10
- package/dist/common/components/drawer/Footer.d.ts +0 -17
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +0 -4
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +0 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +0 -10
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +0 -6
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +0 -4
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +0 -4
- package/dist/finstrong/components/ProgressBar.d.ts +0 -15
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +0 -4
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +0 -4
- package/dist/finstrong/components/StatusChip.d.ts +0 -5
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +0 -2
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +0 -11
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +0 -14
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +0 -8
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +0 -4
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +0 -4
- package/dist/finstrong/components/shared/Accounts.d.ts +0 -8
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +0 -25
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +0 -28
- package/dist/finstrong/components/shared/LineGraph.d.ts +0 -7
- package/dist/finstrong/components/shared/TotalCard.d.ts +0 -8
- package/dist/finstrong/components/shared/TransactionList.d.ts +0 -15
- package/dist/finstrong/components/shared/Transactions.d.ts +0 -11
- package/dist/finstrong/constants/index.d.ts +0 -8
package/dist/Drawer-BEtCk82g.mjs
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import u from "@mui/material/Box";
|
|
3
|
-
import s from "@mui/material/Stack";
|
|
4
|
-
import { H2 as y, Drawer as B } from "@mxenabled/mxui";
|
|
5
|
-
import x from "@mui/material/Button";
|
|
6
|
-
import v from "@mui/material/IconButton";
|
|
7
|
-
import { ArrowBack as j } from "@mxenabled/mx-icons";
|
|
8
|
-
const F = ({
|
|
9
|
-
footerStyles: e = {},
|
|
10
|
-
hasSecondaryAction: a = !0,
|
|
11
|
-
isPrimaryDisabled: t,
|
|
12
|
-
onPrimaryAction: o,
|
|
13
|
-
onSecondaryAction: n,
|
|
14
|
-
primaryButtonProps: l = {},
|
|
15
|
-
primaryColor: c = "primary",
|
|
16
|
-
primaryText: i = "Save",
|
|
17
|
-
secondaryColor: d = "primary",
|
|
18
|
-
secondaryText: p = "Cancel"
|
|
19
|
-
}) => /* @__PURE__ */ h(
|
|
20
|
-
s,
|
|
21
|
-
{
|
|
22
|
-
sx: {
|
|
23
|
-
bgcolor: "background.paper",
|
|
24
|
-
flexDirection: "row",
|
|
25
|
-
gap: 16,
|
|
26
|
-
justifyContent: "flex-end",
|
|
27
|
-
p: 24,
|
|
28
|
-
...e
|
|
29
|
-
},
|
|
30
|
-
children: [
|
|
31
|
-
a && /* @__PURE__ */ r(
|
|
32
|
-
x,
|
|
33
|
-
{
|
|
34
|
-
color: d,
|
|
35
|
-
onClick: n,
|
|
36
|
-
variant: o ? "outlined" : "contained",
|
|
37
|
-
children: p
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
o && /* @__PURE__ */ r(
|
|
41
|
-
x,
|
|
42
|
-
{
|
|
43
|
-
...l,
|
|
44
|
-
color: c,
|
|
45
|
-
disabled: t,
|
|
46
|
-
onClick: o,
|
|
47
|
-
variant: "contained",
|
|
48
|
-
children: i
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
), H = ({
|
|
54
|
-
ariaLabelClose: e,
|
|
55
|
-
onClose: a,
|
|
56
|
-
shouldShowBorders: t,
|
|
57
|
-
shouldShowShadow: o,
|
|
58
|
-
title: n
|
|
59
|
-
}) => /* @__PURE__ */ h(
|
|
60
|
-
s,
|
|
61
|
-
{
|
|
62
|
-
"aria-level": 1,
|
|
63
|
-
direction: "row",
|
|
64
|
-
role: "heading",
|
|
65
|
-
sx: {
|
|
66
|
-
alignItems: "center",
|
|
67
|
-
backgroundColor: "background.paper",
|
|
68
|
-
...t && {
|
|
69
|
-
borderBottom: 1,
|
|
70
|
-
borderTop: 1,
|
|
71
|
-
borderColor: "border.light"
|
|
72
|
-
},
|
|
73
|
-
...o && {
|
|
74
|
-
boxShadow: "0px 2px 8px 0px #6A73811F"
|
|
75
|
-
},
|
|
76
|
-
padding: "8px 8px 8px 8px"
|
|
77
|
-
},
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ r(v, { "aria-label": e, color: "primary", onClick: a, children: /* @__PURE__ */ r(j, { color: "primary", sx: { fontSize: 22 } }) }),
|
|
80
|
-
/* @__PURE__ */ r(
|
|
81
|
-
u,
|
|
82
|
-
{
|
|
83
|
-
sx: {
|
|
84
|
-
flexGrow: 1,
|
|
85
|
-
margin: "auto",
|
|
86
|
-
textAlign: "center"
|
|
87
|
-
},
|
|
88
|
-
children: /* @__PURE__ */ r(y, { bold: !0, variant: "Body", children: n })
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ r(u, { width: "44px" })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
), I = ({
|
|
95
|
-
ariaLabelClose: e = "Close",
|
|
96
|
-
children: a,
|
|
97
|
-
footerStyles: t = {},
|
|
98
|
-
hasSecondaryAction: o = !0,
|
|
99
|
-
id: n,
|
|
100
|
-
isOpen: l,
|
|
101
|
-
isPrimaryDisabled: c,
|
|
102
|
-
onClose: i,
|
|
103
|
-
onPrimaryAction: d,
|
|
104
|
-
onSecondaryAction: p,
|
|
105
|
-
primaryButtonProps: b,
|
|
106
|
-
primaryColor: m = "primary",
|
|
107
|
-
primaryText: g,
|
|
108
|
-
secondaryColor: w = "secondary",
|
|
109
|
-
secondaryText: f,
|
|
110
|
-
shouldShowHeaderBorders: k = !0,
|
|
111
|
-
shouldShowHeaderShadow: C = !1,
|
|
112
|
-
title: D,
|
|
113
|
-
...S
|
|
114
|
-
}) => /* @__PURE__ */ r(
|
|
115
|
-
B,
|
|
116
|
-
{
|
|
117
|
-
id: n,
|
|
118
|
-
isOpen: l,
|
|
119
|
-
onClose: i,
|
|
120
|
-
sx: {
|
|
121
|
-
"& .MuiDrawer-paper": {
|
|
122
|
-
backgroundColor: "background.default",
|
|
123
|
-
borderRadius: 0
|
|
124
|
-
},
|
|
125
|
-
height: "100%",
|
|
126
|
-
"& .MuiToolbar-root": {
|
|
127
|
-
backgroundColor: "background.paper"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
...S,
|
|
131
|
-
children: /* @__PURE__ */ h(s, { height: "100%", justifyContent: "space-between", children: [
|
|
132
|
-
/* @__PURE__ */ r(
|
|
133
|
-
H,
|
|
134
|
-
{
|
|
135
|
-
ariaLabelClose: e,
|
|
136
|
-
onClose: i,
|
|
137
|
-
shouldShowBorders: k,
|
|
138
|
-
shouldShowShadow: C,
|
|
139
|
-
title: D
|
|
140
|
-
}
|
|
141
|
-
),
|
|
142
|
-
/* @__PURE__ */ r(u, { height: "100%", overflow: "auto", children: a }),
|
|
143
|
-
d && /* @__PURE__ */ r(
|
|
144
|
-
F,
|
|
145
|
-
{
|
|
146
|
-
footerStyles: t,
|
|
147
|
-
hasSecondaryAction: o,
|
|
148
|
-
isPrimaryDisabled: c,
|
|
149
|
-
onPrimaryAction: d,
|
|
150
|
-
onSecondaryAction: p ?? i,
|
|
151
|
-
primaryButtonProps: b,
|
|
152
|
-
primaryColor: m,
|
|
153
|
-
primaryText: g,
|
|
154
|
-
secondaryColor: w,
|
|
155
|
-
secondaryText: f
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
] })
|
|
159
|
-
}
|
|
160
|
-
), q = I;
|
|
161
|
-
export {
|
|
162
|
-
q as D
|
|
163
|
-
};
|
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as b, runInAction as l } from "mobx";
|
|
2
|
-
import { format as R } from "date-fns/format";
|
|
3
|
-
import { fromUnixTime as D } from "date-fns/fromUnixTime";
|
|
4
|
-
import { getUnixTime as I } from "date-fns/getUnixTime";
|
|
5
|
-
import { subMonths as H } from "date-fns/subMonths";
|
|
6
|
-
import { F as x, A as h } from "./Fetch-87LIQbEA.mjs";
|
|
7
|
-
import { jsx as i, jsxs as T } from "react/jsx-runtime";
|
|
8
|
-
import { addDays as v } from "date-fns/addDays";
|
|
9
|
-
import { addMonths as M } from "date-fns/addMonths";
|
|
10
|
-
import { addYears as G } from "date-fns/addYears";
|
|
11
|
-
import { differenceInDays as L } from "date-fns/differenceInDays";
|
|
12
|
-
import { differenceInMonths as w } from "date-fns/differenceInMonths";
|
|
13
|
-
import { differenceInWeeks as A } from "date-fns/differenceInWeeks";
|
|
14
|
-
import { startOfToday as N } from "date-fns/startOfToday";
|
|
15
|
-
import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
|
|
16
|
-
import $ from "react";
|
|
17
|
-
import B from "@mui/material/Avatar";
|
|
18
|
-
import K from "@mui/material/Box";
|
|
19
|
-
import Y from "@mui/material/Divider";
|
|
20
|
-
import U from "@mui/material/List";
|
|
21
|
-
import X from "@mui/material/ListItem";
|
|
22
|
-
import V from "@mui/material/ListItemAvatar";
|
|
23
|
-
import j from "@mui/material/ListItemButton";
|
|
24
|
-
import z from "@mui/material/ListItemText";
|
|
25
|
-
import { Text as F } from "@mxenabled/mxui";
|
|
26
|
-
import { f as _, a as C } from "./Dialog-BPTr3qHE.mjs";
|
|
27
|
-
import { b as W } from "./Localization-2MODESHW.mjs";
|
|
28
|
-
const m = {
|
|
29
|
-
creditScore: {
|
|
30
|
-
poor: 600,
|
|
31
|
-
good: 720
|
|
32
|
-
},
|
|
33
|
-
daysOfCashOnHand: {
|
|
34
|
-
poor: 30,
|
|
35
|
-
good: 90
|
|
36
|
-
},
|
|
37
|
-
debtToIncomeRatio: {
|
|
38
|
-
poor: 40,
|
|
39
|
-
good: 30
|
|
40
|
-
},
|
|
41
|
-
emergencySavings: {
|
|
42
|
-
poor: 750,
|
|
43
|
-
good: 1e3
|
|
44
|
-
},
|
|
45
|
-
spendToIncomeRatio: {
|
|
46
|
-
poor: 110,
|
|
47
|
-
good: 100
|
|
48
|
-
}
|
|
49
|
-
}, S = {
|
|
50
|
-
GOOD: "Good",
|
|
51
|
-
FAIR: "Fair",
|
|
52
|
-
OFF_TRACK: "Off Track",
|
|
53
|
-
MISSING: "Missing"
|
|
54
|
-
};
|
|
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__ */ i(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(
|
|
57
|
-
U,
|
|
58
|
-
{
|
|
59
|
-
sx: {
|
|
60
|
-
"& .MuiListItemSecondaryAction-root": {
|
|
61
|
-
color: "text.primary",
|
|
62
|
-
pr: 24
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
children: e.map((r, n) => /* @__PURE__ */ T($.Fragment, { children: [
|
|
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
|
-
B,
|
|
69
|
-
{
|
|
70
|
-
sx: {
|
|
71
|
-
bgcolor: "primary.main",
|
|
72
|
-
...!r.isComplete && {
|
|
73
|
-
bgcolor: "transparent",
|
|
74
|
-
borderColor: "action.active",
|
|
75
|
-
borderStyle: "solid",
|
|
76
|
-
borderWidth: 1,
|
|
77
|
-
color: "action.active"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
children: r.icon
|
|
81
|
-
}
|
|
82
|
-
) }),
|
|
83
|
-
/* @__PURE__ */ i(
|
|
84
|
-
z,
|
|
85
|
-
{
|
|
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
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] }) }),
|
|
91
|
-
n < e.length - 1 && /* @__PURE__ */ i(Y, { sx: { color: "divider", ml: 68 } })
|
|
92
|
-
] }, r.key))
|
|
93
|
-
}
|
|
94
|
-
) }), vt = q, Mt = (e) => e * (180 / Math.PI), Gt = (e, t) => [
|
|
95
|
-
{
|
|
96
|
-
description: t.vulnerable_description,
|
|
97
|
-
max: 25,
|
|
98
|
-
scoreContent: t.accordion_details_text.vulnerable,
|
|
99
|
-
status: t.vulnerable
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
description: t.building_description,
|
|
103
|
-
max: 50,
|
|
104
|
-
scoreContent: t.accordion_details_text.building,
|
|
105
|
-
status: t.building
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
description: t.stable_description,
|
|
109
|
-
max: 75,
|
|
110
|
-
scoreContent: t.accordion_details_text.stable,
|
|
111
|
-
status: t.stable
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
description: t.strong_description,
|
|
115
|
-
max: 100,
|
|
116
|
-
scoreContent: t.accordion_details_text.strong,
|
|
117
|
-
status: t.strong
|
|
118
|
-
}
|
|
119
|
-
].find((o) => e > 0 && e <= o.max) || { status: t.insufficient_data, description: "", scoreContent: "" }, g = {
|
|
120
|
-
POOR: "#8C0E0E",
|
|
121
|
-
FAIR: "#E32727",
|
|
122
|
-
GOOD: "#FFB70D",
|
|
123
|
-
VERY_GOOD: "#0EA26C",
|
|
124
|
-
EXCEPTIONAL: "#005C3D"
|
|
125
|
-
}, u = {
|
|
126
|
-
POOR: "#B21C1C",
|
|
127
|
-
FAIR: "#FF3232",
|
|
128
|
-
GOOD: "#FFC02C",
|
|
129
|
-
VERY_GOOD: "#29C76B",
|
|
130
|
-
EXCEPTIONAL: "#008A5A"
|
|
131
|
-
}, Lt = (e, t, r) => e >= 300 && e < 580 ? {
|
|
132
|
-
status: r.poor,
|
|
133
|
-
color: t ? u.POOR : g.POOR
|
|
134
|
-
} : e >= 580 && e < 670 ? {
|
|
135
|
-
status: r.fair,
|
|
136
|
-
color: t ? u.FAIR : g.FAIR
|
|
137
|
-
} : e >= 670 && e < 740 ? {
|
|
138
|
-
status: r.good,
|
|
139
|
-
color: t ? u.GOOD : g.GOOD
|
|
140
|
-
} : e >= 740 && e < 800 ? {
|
|
141
|
-
status: r.very_good,
|
|
142
|
-
color: t ? u.VERY_GOOD : g.VERY_GOOD
|
|
143
|
-
} : e >= 800 && e <= 850 ? {
|
|
144
|
-
status: r.exceptional,
|
|
145
|
-
color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
|
|
146
|
-
} : { status: r.missing_data }, wt = (e, t, r, n) => {
|
|
147
|
-
const o = e.reduce((c, d) => c + d.value, 0);
|
|
148
|
-
let a = 0;
|
|
149
|
-
const s = e.map((c) => {
|
|
150
|
-
const d = c.value / o * t, p = r + a, f = p + d;
|
|
151
|
-
return a += d, {
|
|
152
|
-
...c,
|
|
153
|
-
startAngle: p,
|
|
154
|
-
endAngle: f
|
|
155
|
-
};
|
|
156
|
-
});
|
|
157
|
-
return [s[n].startAngle, s[n].endAngle];
|
|
158
|
-
}, Nt = (e, t, r, n, o) => {
|
|
159
|
-
let a = 0, s = 0;
|
|
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
|
-
}, Pt = (e, t, r = 0) => {
|
|
163
|
-
const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
|
|
164
|
-
return [n, o];
|
|
165
|
-
}, kt = ({
|
|
166
|
-
dynamicCopy: e,
|
|
167
|
-
fallbackLabel: t,
|
|
168
|
-
icon: r,
|
|
169
|
-
key: n,
|
|
170
|
-
label: o,
|
|
171
|
-
value: a
|
|
172
|
-
}) => {
|
|
173
|
-
const s = !!a, c = s ? J(n, a) : e && W(e, t) || t;
|
|
174
|
-
return {
|
|
175
|
-
icon: s ? /* @__PURE__ */ i(k, {}) : r,
|
|
176
|
-
isComplete: s,
|
|
177
|
-
key: n,
|
|
178
|
-
primaryText: o,
|
|
179
|
-
secondaryText: c
|
|
180
|
-
};
|
|
181
|
-
}, J = (e, t) => ({
|
|
182
|
-
[O.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
|
|
183
|
-
[O.MonthlyIncome]: (n) => `$${n}`
|
|
184
|
-
})[e]?.(t) ?? String(t), $t = (e) => e !== null ? Math.round(e * 100) : null, Bt = (e) => {
|
|
185
|
-
const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
|
|
186
|
-
return _(t, C.MONTH_SHORT);
|
|
187
|
-
}, Kt = (e) => {
|
|
188
|
-
const { good: t, poor: r } = m.daysOfCashOnHand;
|
|
189
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
190
|
-
}, Yt = (e) => {
|
|
191
|
-
const { good: t, poor: r } = m.emergencySavings;
|
|
192
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
193
|
-
}, Ut = (e) => {
|
|
194
|
-
const { good: t, poor: r } = m.spendToIncomeRatio;
|
|
195
|
-
return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
|
|
196
|
-
}, Xt = (e) => {
|
|
197
|
-
const { good: t, poor: r } = m.debtToIncomeRatio;
|
|
198
|
-
return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
|
|
199
|
-
}, Vt = (e) => {
|
|
200
|
-
const { good: t, poor: r } = m.creditScore;
|
|
201
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
202
|
-
}, Q = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", jt = (e, t) => {
|
|
203
|
-
const r = Q(e), n = {
|
|
204
|
-
GOOD: t.count_good_description,
|
|
205
|
-
OFF_TRACK: t.count_off_track_description,
|
|
206
|
-
MISSING: t.count_missing_description
|
|
207
|
-
};
|
|
208
|
-
return {
|
|
209
|
-
cardState: r,
|
|
210
|
-
description: n[r],
|
|
211
|
-
title: t.count_card_title
|
|
212
|
-
};
|
|
213
|
-
}, zt = (e) => ({
|
|
214
|
-
[S.GOOD]: { backgroundColor: "success.lighter", color: "success.dark" },
|
|
215
|
-
[S.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
|
|
216
|
-
[S.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
|
|
217
|
-
[S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
|
218
|
-
})[e], Z = 1, tt = 1, et = {
|
|
219
|
-
1: M,
|
|
220
|
-
2: G,
|
|
221
|
-
3: v
|
|
222
|
-
}, rt = {
|
|
223
|
-
1: w,
|
|
224
|
-
2: (e, t) => A(e, t) / 2,
|
|
225
|
-
3: A,
|
|
226
|
-
4: L
|
|
227
|
-
}, E = [
|
|
228
|
-
{ contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
|
|
229
|
-
{ contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
|
|
230
|
-
{ contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
|
|
231
|
-
], Wt = ({
|
|
232
|
-
contribution: e,
|
|
233
|
-
goalAmount: t,
|
|
234
|
-
goalPeriod: r,
|
|
235
|
-
targetPeriod: n,
|
|
236
|
-
totalSaved: o
|
|
237
|
-
}) => {
|
|
238
|
-
const a = t - o;
|
|
239
|
-
if (a <= 0) return 0;
|
|
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
|
-
return Math.max(a / (f || 1), 1);
|
|
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
|
-
const o = new Date(0, n.month - 1, 1);
|
|
246
|
-
return { x: _(o, C.MONTH_SHORT), y: n[t] };
|
|
247
|
-
}).reverse(), nt = (e) => e.sort((t, r) => t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
|
|
248
|
-
x: _(
|
|
249
|
-
new Date(0, t.monthly_health_score_average.month - 1, 1),
|
|
250
|
-
C.MONTH_SHORT
|
|
251
|
-
),
|
|
252
|
-
y: t.monthly_health_score_average.average_health_score
|
|
253
|
-
})), ot = (e) => e.sort((r, n) => n.transaction.date - r.transaction.date).map(({ transaction: r }) => ({
|
|
254
|
-
...r
|
|
255
|
-
}));
|
|
256
|
-
class y {
|
|
257
|
-
fetchInstance;
|
|
258
|
-
constructor(t, r, n) {
|
|
259
|
-
this.fetchInstance = new x(t, r, void 0, n);
|
|
260
|
-
}
|
|
261
|
-
calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
|
|
262
|
-
getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
|
|
263
|
-
getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
|
|
264
|
-
getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
|
|
265
|
-
getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
|
|
266
|
-
getHealthScoreChangeReports = async (t, r) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${r}`).then((n) => n);
|
|
267
|
-
getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((r) => r.average_health_score);
|
|
268
|
-
getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
|
|
269
|
-
getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
|
|
270
|
-
}
|
|
271
|
-
class te {
|
|
272
|
-
api = new y("/", "");
|
|
273
|
-
augmentedChartData = [];
|
|
274
|
-
averageHealthScores = [];
|
|
275
|
-
monthlySummaries = [];
|
|
276
|
-
allTransactions = {
|
|
277
|
-
income: [],
|
|
278
|
-
debtSpend: [],
|
|
279
|
-
spendingFee: [],
|
|
280
|
-
spend: []
|
|
281
|
-
};
|
|
282
|
-
globalStore;
|
|
283
|
-
healthScore = {};
|
|
284
|
-
healthScoreChange;
|
|
285
|
-
healthScoreChangeReports = [];
|
|
286
|
-
peerScore = null;
|
|
287
|
-
constructor(t) {
|
|
288
|
-
this.globalStore = t, this.api = new y(t.endpoint, t.sessionToken, t.onError), b(this);
|
|
289
|
-
}
|
|
290
|
-
calculateHealthScore = async () => {
|
|
291
|
-
try {
|
|
292
|
-
const t = await this.api.calculateHealthScore();
|
|
293
|
-
let r = 0;
|
|
294
|
-
await this.loadHealthScoreChangeReports();
|
|
295
|
-
const n = t?.health_score || 0, o = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
|
|
296
|
-
r = n - o, l(() => {
|
|
297
|
-
this.healthScore = t, this.healthScoreChange = r;
|
|
298
|
-
});
|
|
299
|
-
} catch (t) {
|
|
300
|
-
console.error("Error calculating health score:", t);
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
loadAverageHealthScores = async () => {
|
|
304
|
-
try {
|
|
305
|
-
const t = await this.api.getAverageHealthScores();
|
|
306
|
-
l(() => {
|
|
307
|
-
this.averageHealthScores = t;
|
|
308
|
-
});
|
|
309
|
-
} catch (t) {
|
|
310
|
-
console.error("Error loading average health scores:", t);
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
loadMonthlySummaries = async () => {
|
|
314
|
-
try {
|
|
315
|
-
const t = await this.api.getMonthlySummaries();
|
|
316
|
-
l(() => {
|
|
317
|
-
this.monthlySummaries = t;
|
|
318
|
-
});
|
|
319
|
-
} catch (t) {
|
|
320
|
-
console.error("Error loading monthly summaries:", t);
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
loadDebtSpend = async () => {
|
|
324
|
-
try {
|
|
325
|
-
const t = await this.api.getDebtSpend();
|
|
326
|
-
l(() => {
|
|
327
|
-
this.allTransactions.debtSpend = t;
|
|
328
|
-
});
|
|
329
|
-
} catch (t) {
|
|
330
|
-
console.error("Error loading debt spend:", t);
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
loadIncome = async () => {
|
|
334
|
-
try {
|
|
335
|
-
const t = await this.api.getIncome();
|
|
336
|
-
l(() => {
|
|
337
|
-
this.allTransactions.income = t;
|
|
338
|
-
});
|
|
339
|
-
} catch (t) {
|
|
340
|
-
console.error("Error loading income:", t);
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
loadHealthScoreChangeReports = async () => {
|
|
344
|
-
const t = I(H(/* @__PURE__ */ new Date(), 2)), r = I(/* @__PURE__ */ new Date());
|
|
345
|
-
try {
|
|
346
|
-
const n = await this.api.getHealthScoreChangeReports(
|
|
347
|
-
t,
|
|
348
|
-
r
|
|
349
|
-
);
|
|
350
|
-
l(() => {
|
|
351
|
-
this.healthScoreChangeReports = n;
|
|
352
|
-
});
|
|
353
|
-
} catch (n) {
|
|
354
|
-
console.error("Error loading health score change reports:", n);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
loadPeerScore = async () => {
|
|
358
|
-
const t = R(D(this.globalStore.appDataStore.user.birthday), "yyyy");
|
|
359
|
-
try {
|
|
360
|
-
const r = await this.api.getPeerScore(t);
|
|
361
|
-
l(() => {
|
|
362
|
-
this.peerScore = r;
|
|
363
|
-
});
|
|
364
|
-
} catch (r) {
|
|
365
|
-
console.error("Error loading peer score:", r);
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
loadAugmentedChartData = async () => {
|
|
369
|
-
try {
|
|
370
|
-
const t = await this.api.getAverageHealthScores();
|
|
371
|
-
l(() => {
|
|
372
|
-
this.augmentedChartData = nt(t);
|
|
373
|
-
});
|
|
374
|
-
} catch (t) {
|
|
375
|
-
console.error(`Error occurred while getting augmented chart data: ${t}`);
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
getSpendingFeeTransactions = async () => {
|
|
379
|
-
try {
|
|
380
|
-
const t = await this.api.getSpendingFeeTransactions(), r = ot(t);
|
|
381
|
-
l(() => {
|
|
382
|
-
this.allTransactions.spendingFee = r;
|
|
383
|
-
});
|
|
384
|
-
} catch (t) {
|
|
385
|
-
console.error(`Error occurred while getting spending fee transactions: ${t}`);
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
loadSpendTransactions = async () => {
|
|
389
|
-
try {
|
|
390
|
-
const t = await this.api.getStandardSpend();
|
|
391
|
-
l(() => {
|
|
392
|
-
this.allTransactions.spend = [...t];
|
|
393
|
-
});
|
|
394
|
-
} catch (t) {
|
|
395
|
-
console.error("Error loading spend transactions:", t);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
get spendAndDebtTransactions() {
|
|
399
|
-
return [...this.allTransactions.spend, ...this.allTransactions.debtSpend];
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
export {
|
|
403
|
-
O as A,
|
|
404
|
-
u as C,
|
|
405
|
-
te as F,
|
|
406
|
-
vt as P,
|
|
407
|
-
Nt as a,
|
|
408
|
-
Pt as b,
|
|
409
|
-
Gt as c,
|
|
410
|
-
Lt as d,
|
|
411
|
-
g as e,
|
|
412
|
-
Zt as f,
|
|
413
|
-
wt as g,
|
|
414
|
-
zt as h,
|
|
415
|
-
S as i,
|
|
416
|
-
Vt as j,
|
|
417
|
-
Qt as k,
|
|
418
|
-
Jt as l,
|
|
419
|
-
Wt as m,
|
|
420
|
-
qt as n,
|
|
421
|
-
Yt as o,
|
|
422
|
-
Q as p,
|
|
423
|
-
Kt as q,
|
|
424
|
-
Mt as r,
|
|
425
|
-
$t as s,
|
|
426
|
-
Bt as t,
|
|
427
|
-
jt as u,
|
|
428
|
-
Ut as v,
|
|
429
|
-
Xt as w,
|
|
430
|
-
kt as x,
|
|
431
|
-
y
|
|
432
|
-
};
|