@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.bb4

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.
Files changed (219) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
  3. package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
  4. package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
  6. package/dist/AccountListItem-wgmlex-_.mjs +90 -0
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
  12. package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
  13. package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
  14. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
  15. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
  16. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
  17. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
  18. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
  19. package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
  20. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  21. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
  22. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
  23. package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
  24. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  25. package/dist/Drawer-BF40nbsH.mjs +163 -0
  26. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  27. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
  28. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  29. package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
  30. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
  31. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  32. package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
  33. package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
  34. package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
  35. package/dist/LineChart-C1PxNf7P.mjs +581 -0
  36. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
  37. package/dist/Loader-Ckqi9Rx6.mjs +21 -0
  38. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
  39. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  40. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
  41. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
  42. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
  43. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
  44. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  45. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  46. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
  47. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
  48. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
  49. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
  50. package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
  51. package/dist/SearchBox-B7km148n.mjs +39 -0
  52. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
  53. package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
  54. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  55. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
  56. package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
  57. package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
  58. package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
  59. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  60. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  61. package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
  62. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
  63. package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
  64. package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
  65. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
  66. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
  67. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  68. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  69. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  70. package/dist/accounts/index.es.js +228 -221
  71. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  72. package/dist/analytics/index.es.js +27 -27
  73. package/dist/budgets/index.es.js +459 -462
  74. package/dist/cashflow/index.es.js +419 -428
  75. package/dist/categories/index.es.js +2 -2
  76. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  77. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  78. package/dist/common/components/Loader.d.ts +1 -2
  79. package/dist/common/components/Select.d.ts +4 -2
  80. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  81. package/dist/common/components/charts/LineChart.d.ts +12 -2
  82. package/dist/common/components/charts/index.d.ts +0 -3
  83. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  84. package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
  85. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  86. package/dist/common/components/drawer/Footer.d.ts +17 -0
  87. package/dist/common/components/index.d.ts +0 -1
  88. package/dist/common/hooks/index.d.ts +0 -1
  89. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  90. package/dist/common/index.es.js +402 -668
  91. package/dist/common/stores/GlobalStore.d.ts +7 -1
  92. package/dist/common/types/Finstrong.d.ts +54 -0
  93. package/dist/common/types/Global.d.ts +1 -0
  94. package/dist/common/types/Widgets.d.ts +1 -0
  95. package/dist/common/types/index.d.ts +1 -1
  96. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  97. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  98. package/dist/common/utils/Theme.d.ts +1 -3
  99. package/dist/dashboard/index.es.js +21 -21
  100. package/dist/debts/components/DebtsChart.d.ts +1 -2
  101. package/dist/debts/index.es.js +673 -665
  102. package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
  103. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  104. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  105. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  106. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  107. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  108. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  109. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  110. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  111. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  112. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  113. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  114. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  115. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  116. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  117. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  118. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  119. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  120. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  121. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  122. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  123. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  124. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  125. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  126. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  127. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  128. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  129. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  130. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  131. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  132. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  133. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  134. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  135. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  136. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  137. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  138. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  139. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  140. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  141. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  142. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  143. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  144. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  145. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  146. package/dist/finstrong/constants/index.d.ts +9 -0
  147. package/dist/finstrong/index.es.js +3175 -1067
  148. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  149. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  150. package/dist/goals/index.es.js +580 -570
  151. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  152. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  153. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  154. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  155. package/dist/help/index.es.js +6 -6
  156. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  157. package/dist/insights/index.es.js +1 -1
  158. package/dist/investments/index.es.js +537 -536
  159. package/dist/merchants/index.es.js +9 -9
  160. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  161. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  162. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  163. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  164. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  165. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  166. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  167. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  168. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  169. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  170. package/dist/microinsights/constants/App.d.ts +0 -1
  171. package/dist/microinsights/index.d.ts +3 -3
  172. package/dist/microinsights/index.es.js +7 -7
  173. package/dist/microinsights/interfaces.d.ts +0 -6
  174. package/dist/networth/components/NetWorthChange.d.ts +3 -1
  175. package/dist/networth/index.es.js +262 -254
  176. package/dist/notifications/index.es.js +90 -91
  177. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  178. package/dist/recurringtransactions/index.es.js +586 -562
  179. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  180. package/dist/settings/index.es.js +371 -365
  181. package/dist/spending/index.es.js +267 -419
  182. package/dist/spending/utils/SpendingData.d.ts +2 -1
  183. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  184. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  185. package/dist/transactions/index.es.js +231 -226
  186. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  187. package/dist/transactions/stores/UiStore.d.ts +0 -2
  188. package/dist/trends/index.es.js +988 -612
  189. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
  190. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
  191. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  192. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
  193. package/package.json +51 -56
  194. package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
  195. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  196. package/dist/AccountListItem-JFMZROh7.mjs +0 -90
  197. package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
  198. package/dist/Drawer-kEE73B87.mjs +0 -113
  199. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  200. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  201. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  202. package/dist/Loader-DUaFpDGv.mjs +0 -24
  203. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  204. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  205. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  206. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  207. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  208. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  209. package/dist/common/components/barchart/Bar.d.ts +0 -25
  210. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  211. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  212. package/dist/common/components/barchart/Legend.d.ts +0 -8
  213. package/dist/common/components/barchart/Util.d.ts +0 -42
  214. package/dist/common/components/barchart/index.d.ts +0 -1
  215. package/dist/common/hooks/usePrevious.d.ts +0 -2
  216. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  217. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  218. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  219. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -0,0 +1,451 @@
1
+ import { makeAutoObservable as D, runInAction as d } from "mobx";
2
+ import { format as R } from "date-fns/format";
3
+ import { fromUnixTime as b } from "date-fns/fromUnixTime";
4
+ import { getUnixTime as _ } from "date-fns/getUnixTime";
5
+ import { subMonths as H } from "date-fns/subMonths";
6
+ import { F as x, A as h } from "./Fetch-DecPFeGU.mjs";
7
+ import { jsx as c, jsxs as C } 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 z from "@mui/material/Avatar";
18
+ import K from "@mui/material/Box";
19
+ import B from "@mui/material/Divider";
20
+ import Y from "@mui/material/List";
21
+ import U from "@mui/material/ListItem";
22
+ import X from "@mui/material/ListItemAvatar";
23
+ import V from "@mui/material/ListItemButton";
24
+ import W from "@mui/material/ListItemText";
25
+ import { Text as y } from "@mxenabled/mxui";
26
+ import { f as O, a as T } from "./Dialog-CDV0kKxj.mjs";
27
+ import { b as j } from "./Localization-2MODESHW.mjs";
28
+ import { f as q } from "./NumberFormatting-DjTD0t3W.mjs";
29
+ const m = {
30
+ creditScore: {
31
+ poor: 600,
32
+ good: 720
33
+ },
34
+ daysOfCashOnHand: {
35
+ poor: 30,
36
+ good: 90
37
+ },
38
+ debtToIncomeRatio: {
39
+ poor: 40,
40
+ good: 30
41
+ },
42
+ emergencySavings: {
43
+ poor: 750,
44
+ good: 1e3
45
+ },
46
+ spendToIncomeRatio: {
47
+ poor: 110,
48
+ good: 100
49
+ }
50
+ }, S = {
51
+ GOOD: "GOOD",
52
+ FAIR: "FAIR",
53
+ OFF_TRACK: "OFF TRACK",
54
+ MISSING: "MISSING DATA"
55
+ };
56
+ var I = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(I || {});
57
+ const Mt = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
58
+ Y,
59
+ {
60
+ sx: {
61
+ "& .MuiListItemSecondaryAction-root": {
62
+ color: "text.primary",
63
+ pr: 24
64
+ }
65
+ },
66
+ children: e.map((n, r) => /* @__PURE__ */ C($.Fragment, { children: [
67
+ /* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(n.key), children: [
68
+ /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
69
+ z,
70
+ {
71
+ sx: {
72
+ bgcolor: "primary.main",
73
+ ...!n.isComplete && {
74
+ bgcolor: "transparent",
75
+ borderColor: "action.active",
76
+ borderStyle: "solid",
77
+ borderWidth: 1,
78
+ color: "action.active"
79
+ }
80
+ },
81
+ children: n.icon
82
+ }
83
+ ) }),
84
+ /* @__PURE__ */ c(
85
+ W,
86
+ {
87
+ primary: /* @__PURE__ */ c(y, { sx: { color: "text.secondary" }, variant: "caption", children: n.primaryText }),
88
+ secondary: /* @__PURE__ */ c(y, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: n.secondaryText })
89
+ }
90
+ )
91
+ ] }) }),
92
+ r < e.length - 1 && /* @__PURE__ */ c(B, { sx: { color: "divider", ml: 68 } })
93
+ ] }, n.key))
94
+ }
95
+ ) }), Gt = (e) => e * (180 / Math.PI), Lt = (e, t) => [
96
+ {
97
+ description: t.vulnerable_description,
98
+ max: 25,
99
+ scoreContent: t.accordion_details_text.vulnerable,
100
+ status: t.vulnerable
101
+ },
102
+ {
103
+ description: t.building_description,
104
+ max: 50,
105
+ scoreContent: t.accordion_details_text.building,
106
+ status: t.building
107
+ },
108
+ {
109
+ description: t.stable_description,
110
+ max: 75,
111
+ scoreContent: t.accordion_details_text.stable,
112
+ status: t.stable
113
+ },
114
+ {
115
+ description: t.strong_description,
116
+ max: 100,
117
+ scoreContent: t.accordion_details_text.strong,
118
+ status: t.strong
119
+ }
120
+ ].find((o) => e > 0 && e <= o.max) || { status: t.insufficient_data, description: "", scoreContent: "" }, g = {
121
+ POOR: "#8C0E0E",
122
+ FAIR: "#E32727",
123
+ GOOD: "#FFB70D",
124
+ VERY_GOOD: "#0EA26C",
125
+ EXCEPTIONAL: "#005C3D"
126
+ }, u = {
127
+ POOR: "#B21C1C",
128
+ FAIR: "#FF3232",
129
+ GOOD: "#FFC02C",
130
+ VERY_GOOD: "#29C76B",
131
+ EXCEPTIONAL: "#008A5A"
132
+ }, wt = (e, t, n) => e >= 300 && e < 580 ? {
133
+ status: n.poor,
134
+ color: t ? u.POOR : g.POOR
135
+ } : e >= 580 && e < 670 ? {
136
+ status: n.fair,
137
+ color: t ? u.FAIR : g.FAIR
138
+ } : e >= 670 && e < 740 ? {
139
+ status: n.good,
140
+ color: t ? u.GOOD : g.GOOD
141
+ } : e >= 740 && e < 800 ? {
142
+ status: n.very_good,
143
+ color: t ? u.VERY_GOOD : g.VERY_GOOD
144
+ } : e >= 800 && e <= 850 ? {
145
+ status: n.exceptional,
146
+ color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
147
+ } : { status: n.missing_data }, Nt = (e, t, n, r) => {
148
+ const o = e.reduce((i, l) => i + l.value, 0);
149
+ let a = 0;
150
+ const s = e.map((i) => {
151
+ const l = i.value / o * t, p = n + a, f = p + l;
152
+ return a += l, {
153
+ ...i,
154
+ startAngle: p,
155
+ endAngle: f
156
+ };
157
+ });
158
+ return [s[r].startAngle, s[r].endAngle];
159
+ }, Pt = (e, t, n, r, o) => {
160
+ let a = 0, s = 0;
161
+ const i = Math.floor(r), l = r - i;
162
+ return i > n ? (a = e, s = t) : i === n && l > 0 && (a = e, s = o), [a, s];
163
+ }, kt = (e, t, n = 0) => {
164
+ const r = e * Math.sin(t - n), o = -e * Math.cos(t - n);
165
+ return [r, o];
166
+ }, $t = ({
167
+ dynamicCopy: e,
168
+ fallbackLabel: t,
169
+ icon: n,
170
+ key: r,
171
+ label: o,
172
+ value: a
173
+ }) => {
174
+ const s = !!a, i = s ? J(r, a) : e && j(e, t) || t;
175
+ return {
176
+ icon: s ? /* @__PURE__ */ c(k, {}) : n,
177
+ isComplete: s,
178
+ key: r,
179
+ primaryText: o,
180
+ secondaryText: i
181
+ };
182
+ }, J = (e, t) => ({
183
+ [I.DateOfBirth]: (r) => R(new Date(Number(r) * 1e3), "MMM d, yyyy"),
184
+ [I.MonthlyIncome]: (r) => q(Number(r), "0.00")
185
+ })[e]?.(t) ?? String(t), zt = (e) => e !== null ? Math.round(e * 100) : null, Kt = (e) => {
186
+ const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
187
+ return O(t, T.MONTH_SHORT);
188
+ }, Bt = (e) => {
189
+ const { good: t, poor: n } = m.daysOfCashOnHand;
190
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
191
+ }, Yt = (e) => {
192
+ const { good: t, poor: n } = m.emergencySavings;
193
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
194
+ }, Ut = (e) => {
195
+ const { good: t, poor: n } = m.spendToIncomeRatio;
196
+ return e === null ? "MISSING" : e < t ? "GOOD" : e < n ? "FAIR" : "OFF_TRACK";
197
+ }, Xt = (e) => {
198
+ const { good: t, poor: n } = m.debtToIncomeRatio;
199
+ return e === null ? "MISSING" : e <= t ? "GOOD" : e <= n ? "FAIR" : "OFF_TRACK";
200
+ }, Vt = (e) => {
201
+ const { good: t, poor: n } = m.creditScore;
202
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= n ? "FAIR" : "OFF_TRACK";
203
+ }, Q = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", Wt = (e, t) => {
204
+ const n = Q(e), r = {
205
+ GOOD: t.count_good_description,
206
+ OFF_TRACK: t.count_off_track_description,
207
+ MISSING: t.count_missing_description
208
+ };
209
+ return {
210
+ cardState: n,
211
+ description: r[n],
212
+ title: t.count_card_title
213
+ };
214
+ }, jt = (e) => ({
215
+ [S.GOOD]: { backgroundColor: "success.light", color: "success.dark" },
216
+ [S.FAIR]: { backgroundColor: "warning.light", color: "warning.dark" },
217
+ [S.OFF_TRACK]: { backgroundColor: "error.light", color: "error.dark" },
218
+ [S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
219
+ })[e], Z = 1, tt = 1, et = {
220
+ 1: M,
221
+ 2: G,
222
+ 3: v
223
+ }, nt = {
224
+ 1: w,
225
+ 2: (e, t) => A(e, t) / 2,
226
+ 3: A,
227
+ 4: L
228
+ }, E = [
229
+ { contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
230
+ { contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
231
+ { contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
232
+ ], qt = ({
233
+ contribution: e,
234
+ goalAmount: t,
235
+ goalPeriod: n,
236
+ targetPeriod: r,
237
+ totalSaved: o
238
+ }) => {
239
+ const a = t - o;
240
+ if (a <= 0) return 0;
241
+ const s = N(), i = et[r], l = nt[e];
242
+ if (!i || !l) return a;
243
+ const p = i(s, n), f = l(p, s);
244
+ return Math.max(a / (f || 1), 1);
245
+ }, Jt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Qt = (e) => E.find((n) => e < n.upperLimit)?.targetAmount ?? tt, Zt = (e) => E.find((r) => e < r.upperLimit)?.contributionPeriodIndex ?? Z, te = (e, t) => [...e].sort((r, o) => r.year === o.year ? r.month - o.month : r.year - o.year).map((r) => ({
246
+ x: O(new Date(0, r.month - 1, 1), T.MONTH_SHORT),
247
+ y: r[t]
248
+ })), rt = (e) => e.sort((t, n) => t.monthly_health_score_average.month - n.monthly_health_score_average.month).map((t) => ({
249
+ x: O(
250
+ new Date(0, t.monthly_health_score_average.month - 1, 1),
251
+ T.MONTH_SHORT
252
+ ),
253
+ y: Math.round(t.monthly_health_score_average.average_health_score)
254
+ })), ot = (e) => e.map(({ transaction: n }) => ({
255
+ ...n
256
+ })).sort((n, r) => r.date - n.date);
257
+ class F {
258
+ fetchInstance;
259
+ constructor(t, n, r) {
260
+ this.fetchInstance = new x(t, n, void 0, r);
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, n) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${n}`).then((r) => r);
268
+ getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((n) => n);
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 ee {
273
+ api = new F("/", "");
274
+ augmentedChartData = [];
275
+ averageHealthScores = [];
276
+ monthlySummaries = [];
277
+ incomeTransactions = [];
278
+ debtSpendTransactions = [];
279
+ spendingFeeTransactions = [];
280
+ spendTransactions = [];
281
+ globalStore;
282
+ healthScore = {};
283
+ healthScoreChange;
284
+ healthScoreChangeReports = [];
285
+ peerScore = null;
286
+ isSpendingInitialized = !1;
287
+ isIncomeInitialized = !1;
288
+ constructor(t) {
289
+ this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), D(this);
290
+ }
291
+ setSpendingInitialized = (t) => {
292
+ this.isSpendingInitialized = t;
293
+ };
294
+ setIncomeInitialized = (t) => {
295
+ this.isIncomeInitialized = t;
296
+ };
297
+ calculateHealthScore = async () => {
298
+ try {
299
+ const t = await this.api.calculateHealthScore();
300
+ let n = 0;
301
+ await this.loadHealthScoreChangeReports();
302
+ const r = t?.health_score || 0, o = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
303
+ n = r - o, d(() => {
304
+ this.healthScore = t, this.healthScoreChange = n;
305
+ });
306
+ } catch (t) {
307
+ console.error("Error calculating health score:", t);
308
+ }
309
+ };
310
+ loadAverageHealthScores = async () => {
311
+ try {
312
+ const t = await this.api.getAverageHealthScores();
313
+ d(() => {
314
+ this.averageHealthScores = t;
315
+ });
316
+ } catch (t) {
317
+ console.error("Error loading average health scores:", t);
318
+ }
319
+ };
320
+ loadMonthlySummaries = async () => {
321
+ try {
322
+ const t = await this.api.getMonthlySummaries();
323
+ d(() => {
324
+ this.monthlySummaries = t;
325
+ });
326
+ } catch (t) {
327
+ console.error("Error loading monthly summaries:", t);
328
+ }
329
+ };
330
+ loadDebtSpend = async () => {
331
+ try {
332
+ const t = await this.api.getDebtSpend();
333
+ d(() => {
334
+ this.debtSpendTransactions = t;
335
+ });
336
+ } catch (t) {
337
+ console.error("Error loading debt spend:", t);
338
+ }
339
+ };
340
+ loadIncome = async () => {
341
+ this.setIncomeInitialized(!1);
342
+ try {
343
+ const t = await this.api.getIncome();
344
+ d(() => {
345
+ this.incomeTransactions = t, this.setIncomeInitialized(!0);
346
+ });
347
+ } catch (t) {
348
+ console.error("Error loading income:", t);
349
+ }
350
+ };
351
+ loadHealthScoreChangeReports = async () => {
352
+ const t = _(H(/* @__PURE__ */ new Date(), 2)), n = _(/* @__PURE__ */ new Date());
353
+ try {
354
+ const r = await this.api.getHealthScoreChangeReports(
355
+ t,
356
+ n
357
+ );
358
+ d(() => {
359
+ this.healthScoreChangeReports = r;
360
+ });
361
+ } catch (r) {
362
+ console.error("Error loading health score change reports:", r);
363
+ }
364
+ };
365
+ loadPeerScore = async () => {
366
+ const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
367
+ try {
368
+ const n = await this.api.getPeerScore(t);
369
+ d(() => {
370
+ this.peerScore = n;
371
+ });
372
+ } catch (n) {
373
+ console.error("Error loading peer score:", n);
374
+ }
375
+ };
376
+ loadAugmentedChartData = async () => {
377
+ try {
378
+ const t = await this.api.getAverageHealthScores();
379
+ d(() => {
380
+ this.augmentedChartData = rt(t);
381
+ });
382
+ } catch (t) {
383
+ console.error(`Error occurred while getting augmented chart data: ${t}`);
384
+ }
385
+ };
386
+ getSpendingFeeTransactions = async () => {
387
+ try {
388
+ const t = await this.api.getSpendingFeeTransactions(), n = ot(t);
389
+ d(() => {
390
+ this.spendingFeeTransactions = n;
391
+ });
392
+ } catch (t) {
393
+ console.error(`Error occurred while getting spending fee transactions: ${t}`);
394
+ }
395
+ };
396
+ loadSpendTransactions = async () => {
397
+ this.setSpendingInitialized(!1);
398
+ try {
399
+ const t = await this.api.getStandardSpend();
400
+ d(() => {
401
+ this.spendTransactions = [...t], this.setSpendingInitialized(!0);
402
+ });
403
+ } catch (t) {
404
+ console.error("Error loading spend transactions:", t);
405
+ }
406
+ };
407
+ get spendAndDebtTransactions() {
408
+ return [...this.spendTransactions, ...this.debtSpendTransactions];
409
+ }
410
+ get allTransactions() {
411
+ return {
412
+ income: this.incomeTransactions,
413
+ debtSpend: this.debtSpendTransactions,
414
+ spendingFee: this.spendingFeeTransactions,
415
+ spend: this.spendTransactions
416
+ };
417
+ }
418
+ handleFinstrongWidgetPrimaryCtaClick = (t) => () => {
419
+ };
420
+ }
421
+ export {
422
+ I as A,
423
+ u as C,
424
+ ee as F,
425
+ Mt as P,
426
+ Pt as a,
427
+ kt as b,
428
+ Lt as c,
429
+ wt as d,
430
+ g as e,
431
+ te as f,
432
+ Nt as g,
433
+ jt as h,
434
+ S as i,
435
+ Vt as j,
436
+ Zt as k,
437
+ Qt as l,
438
+ qt as m,
439
+ Jt as n,
440
+ Yt as o,
441
+ Q as p,
442
+ Bt as q,
443
+ Gt as r,
444
+ zt as s,
445
+ Xt as t,
446
+ Kt as u,
447
+ Ut as v,
448
+ Wt as w,
449
+ $t as x,
450
+ F as y
451
+ };
@@ -7,16 +7,16 @@ import O from "@mui/material/CardHeader";
7
7
  import w from "@mui/material/Stack";
8
8
  import { AccountBalance as S, ChevronRight as L } from "@mxenabled/mx-icons";
9
9
  import { Text as g } from "@mxenabled/mxui";
10
- import { l as y } from "./ConnectDrawer-BQNs-hjk.mjs";
11
- import { a as b } from "./hooks-D6XlXHf4.mjs";
10
+ import { l as y } from "./ConnectDrawer-DVp54lUH.mjs";
11
+ import { a as b } from "./hooks-C41HAxM5.mjs";
12
12
  import { makeAutoObservable as D, runInAction as E } from "mobx";
13
- import { F as v, A as i } from "./Fetch-87LIQbEA.mjs";
13
+ import { F as v, A as i } from "./Fetch-DecPFeGU.mjs";
14
14
  import { fromUnixTime as G } from "date-fns/fromUnixTime";
15
15
  import { addYears as F } from "date-fns/addYears";
16
16
  import { getUnixTime as x } from "date-fns/getUnixTime";
17
17
  import { b as d } from "./Localization-2MODESHW.mjs";
18
- import { a as K } from "./NumberFormatting-Buh7u8Oi.mjs";
19
- import { f as B, D as P } from "./Dialog-CWW597AF.mjs";
18
+ import { a as K } from "./NumberFormatting-DjTD0t3W.mjs";
19
+ import { f as B, a as P } from "./Dialog-CDV0kKxj.mjs";
20
20
  var a = /* @__PURE__ */ ((e) => (e[e.DEBT_TRACK = 1] = "DEBT_TRACK", e[e.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", e[e.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", e[e.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", e))(a || {}), $ = /* @__PURE__ */ ((e) => (e[e.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", e[e.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", e[e.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", e[e.ACTION = 4] = "ACTION", e))($ || {}), c = /* @__PURE__ */ ((e) => (e[e.AUTOMOBILE = 1] = "AUTOMOBILE", e[e.COLLEGE = 2] = "COLLEGE", e[e.HOUSE = 3] = "HOUSE", e[e.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", e[e.VACATION = 5] = "VACATION", e[e.ELECTRONIC = 6] = "ELECTRONIC", e[e.OTHER = 7] = "OTHER", e[e.RETIREMENT = 8] = "RETIREMENT", e[e.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", e[e.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", e[e.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", e[e.CREDIT_CARD = 12] = "CREDIT_CARD", e[e.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", e[e.LOANS = 14] = "LOANS", e))(c || {});
21
21
  const at = ({ description: e, label: t, title: o }) => {
22
22
  const { config: r } = b(), [n, s] = u.useState(!1);
@@ -27,11 +27,11 @@ const at = ({ description: e, label: t, title: o }) => {
27
27
  {
28
28
  avatar: /* @__PURE__ */ l(S, {}),
29
29
  sx: { ".MuiCardHeader-avatar": { mr: 8 } },
30
- title: /* @__PURE__ */ l(g, { bold: !0, variant: "Body", children: o })
30
+ title: /* @__PURE__ */ l(g, { bold: !0, variant: "body1", children: o })
31
31
  }
32
32
  ),
33
33
  /* @__PURE__ */ l(N, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ _(w, { alignItems: "flex-start", spacing: 2, children: [
34
- /* @__PURE__ */ l(g, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: e }),
34
+ /* @__PURE__ */ l(g, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: e }),
35
35
  r.show_connections_widget_in_master && /* @__PURE__ */ l(
36
36
  T,
37
37
  {
@@ -0,0 +1,6 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Text as r } from "@mxenabled/mxui";
3
+ const i = (e) => /* @__PURE__ */ o(r, { fontWeight: 600, variant: "body2", children: e.colDef.headerName });
4
+ export {
5
+ i as H
6
+ };