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

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 (182) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-BDXA6PWh.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CUztd3-b.mjs} +87 -83
  4. package/dist/AccountDetailsHeader-i3KFhNuo.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-QZspYAji.mjs} +6 -6
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DX5upmCS.mjs} +5 -5
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-BcnDpyLL.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-DXfZotRC.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-Df2nII9u.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +23 -21
  13. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-DTgyAMM7.mjs} +12 -10
  14. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-C5cR-nfQ.mjs} +1 -1
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BIbTqYOH.mjs} +2 -2
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +3 -3
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-BFKcs-_K.mjs} +2 -2
  18. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  19. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  20. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-BbJB0nmu.mjs} +1 -1
  21. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  22. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  23. package/dist/Drawer-BEtCk82g.mjs +163 -0
  24. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  25. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  26. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  27. package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
  28. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-DpWY3gVb.mjs} +5 -5
  29. package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
  30. package/dist/LineChart-bc1D9xBE.mjs +581 -0
  31. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  32. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-NpXHhO1n.mjs} +177 -174
  33. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  34. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  35. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  36. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-lsuhEpn6.mjs} +2 -2
  37. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-CNmJWVeI.mjs} +241 -238
  38. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  39. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  40. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +4 -4
  41. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-CqZh1SQa.mjs} +17 -17
  42. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BKcYmpv3.mjs} +46 -45
  43. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +80 -73
  44. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  45. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  46. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  47. package/dist/SpendingLegend-CjX-hX2O.mjs +193 -0
  48. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  49. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  50. package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
  51. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-D-Q3BU9Z.mjs} +119 -121
  52. package/dist/TrendsStore-BW9FGQeE.mjs +182 -0
  53. package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
  54. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-C0832BMe.mjs} +702 -723
  55. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BhQ1Kx2z.mjs} +4 -4
  56. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  57. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  58. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  59. package/dist/accounts/index.es.js +229 -222
  60. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  61. package/dist/analytics/index.es.js +2 -2
  62. package/dist/budgets/index.es.js +380 -382
  63. package/dist/cashflow/index.es.js +405 -413
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  66. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  67. package/dist/common/components/Select.d.ts +4 -2
  68. package/dist/common/components/charts/LineChart.d.ts +12 -2
  69. package/dist/common/components/charts/index.d.ts +0 -3
  70. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  71. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  72. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  73. package/dist/common/components/drawer/Footer.d.ts +17 -0
  74. package/dist/common/hooks/index.d.ts +0 -1
  75. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  76. package/dist/common/index.es.js +320 -321
  77. package/dist/common/stores/GlobalStore.d.ts +7 -1
  78. package/dist/common/types/Finstrong.d.ts +54 -0
  79. package/dist/common/types/Global.d.ts +1 -0
  80. package/dist/common/types/Widgets.d.ts +1 -0
  81. package/dist/common/types/index.d.ts +1 -1
  82. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  83. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  84. package/dist/dashboard/index.es.js +2 -2
  85. package/dist/debts/index.es.js +506 -498
  86. package/dist/exportTransactionsToCSV-Cz2t0lmA.mjs +48 -0
  87. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  88. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  89. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  90. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  91. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  92. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  93. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  94. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  95. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  96. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  97. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  98. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  99. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  100. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  101. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  102. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  103. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  104. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  105. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  106. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  107. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  108. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  109. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  110. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  111. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  113. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  115. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  116. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  117. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  118. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  119. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  120. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  121. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  122. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  123. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  124. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  125. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  126. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  127. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  128. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  129. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  130. package/dist/finstrong/constants/index.d.ts +9 -0
  131. package/dist/finstrong/index.es.js +3171 -1063
  132. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  133. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  134. package/dist/goals/index.es.js +566 -562
  135. package/dist/help/index.es.js +3 -3
  136. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  137. package/dist/insights/index.es.js +1 -1
  138. package/dist/investments/index.es.js +437 -435
  139. package/dist/merchants/index.es.js +2 -2
  140. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  141. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  142. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  143. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  144. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  145. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  146. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  147. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  148. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  149. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  150. package/dist/microinsights/constants/App.d.ts +0 -1
  151. package/dist/microinsights/index.d.ts +3 -3
  152. package/dist/microinsights/index.es.js +7 -7
  153. package/dist/microinsights/interfaces.d.ts +0 -6
  154. package/dist/networth/index.es.js +188 -186
  155. package/dist/notifications/index.es.js +95 -96
  156. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  157. package/dist/recurringtransactions/index.es.js +584 -560
  158. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  159. package/dist/settings/index.es.js +286 -280
  160. package/dist/spending/index.es.js +269 -421
  161. package/dist/spending/utils/SpendingData.d.ts +2 -1
  162. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  163. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  164. package/dist/transactions/index.es.js +226 -220
  165. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  166. package/dist/transactions/stores/UiStore.d.ts +0 -2
  167. package/dist/trends/index.es.js +963 -586
  168. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CFNF8766.mjs} +2 -2
  169. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  170. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  171. package/package.json +7 -7
  172. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  173. package/dist/Drawer-kEE73B87.mjs +0 -113
  174. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  175. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  176. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  177. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  178. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  179. package/dist/common/hooks/usePrevious.d.ts +0 -2
  180. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  181. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  182. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,6 +1,6 @@
1
1
  import s from "react";
2
- import { g as e } from "./ConnectDrawer-BQNs-hjk.mjs";
3
- import { a as n } from "./hooks-D6XlXHf4.mjs";
2
+ import { g as e } from "./ConnectDrawer-BIbTqYOH.mjs";
3
+ import { a as n } from "./hooks-C41HAxM5.mjs";
4
4
  const i = (o) => {
5
5
  const { config: a } = n();
6
6
  return s.useMemo(
@@ -1,6 +1,6 @@
1
1
  import { getUnixTime as l } from "date-fns/getUnixTime";
2
2
  import A from "bowser";
3
- import { F as u, A as r } from "./Fetch-87LIQbEA.mjs";
3
+ import { F as u, A as r } from "./Fetch-DecPFeGU.mjs";
4
4
  import y from "react";
5
5
  const g = async (o, t, n = "1.0.0", s = "Experiences") => {
6
6
  const a = new _(o, t), { analytics_session: i } = await a.initializeAnalyticsSession(
@@ -1,5 +1,5 @@
1
1
  import { useState as n, useEffect as a } from "react";
2
- import { f as o } from "./hooks-D6XlXHf4.mjs";
2
+ import { f as o } from "./hooks-C41HAxM5.mjs";
3
3
  const f = () => {
4
4
  const { isInitialized: e, appDataStore: t } = o(), [s, i] = n(!1);
5
5
  return a(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "8.0.0-alpha.bb3",
3
+ "version": "8.0.0-alpha.sms1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -196,9 +196,9 @@
196
196
  "mobx-react-lite": "^4.1.0",
197
197
  "numeral": "^2.0.6",
198
198
  "posthog-js": "^1.230.1",
199
- "react": "^18.3.1",
200
- "react-dom": "^18.3.1",
201
- "react-intersection-observer": "^9.16.0",
199
+ "react": "^19.2.3",
200
+ "react-dom": "^19.2.3",
201
+ "react-intersection-observer": "^10.0.0",
202
202
  "uuid": "^11.1.0"
203
203
  },
204
204
  "devDependencies": {
@@ -222,8 +222,8 @@
222
222
  "@types/jest": "^29.5.14",
223
223
  "@types/numeral": "^2.0.5",
224
224
  "@types/prop-types": "^15.7.14",
225
- "@types/react": "^18.3.18",
226
- "@types/react-dom": "^18.3.5",
225
+ "@types/react": "^19.2.7",
226
+ "@types/react-dom": "^19.2.3",
227
227
  "@types/uuid": "^10.0.0",
228
228
  "@typescript-eslint/eslint-plugin": "^7.16.0",
229
229
  "@typescript-eslint/parser": "^7.16.0",
@@ -272,5 +272,5 @@
272
272
  "CHANGELOG.md",
273
273
  "README.md"
274
274
  ],
275
- "packageManager": "yarn@4.11.0"
275
+ "packageManager": "yarn@4.12.0"
276
276
  }
@@ -1,120 +0,0 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
- import { observer as p } from "mobx-react-lite";
3
- import d from "@mui/material/Stack";
4
- import { H3 as w, InstitutionLogo as I, Text as m, H2 as L } from "@mxenabled/mxui";
5
- import { g as v } from "./AccountFields-C9FlatNb.mjs";
6
- import h from "react";
7
- import { G as E, d as y, m as S, u as _, f as G } from "./hooks-D6XlXHf4.mjs";
8
- import O from "@mui/material/Card";
9
- import P from "@mui/material/CardContent";
10
- import M from "@mui/material/CardHeader";
11
- import { useTheme as B } from "@mui/material/styles";
12
- import { g as H, a as U, b as j } from "./SpendingData-D5vsfYKo.mjs";
13
- import { L as z } from "./LineChart-D4GI7nVh.mjs";
14
- import { I as f, P as g, S as C } from "./Account-Bxw0_4FU.mjs";
15
- import { A } from "./ConnectDrawer-BQNs-hjk.mjs";
16
- import { L as Y } from "./Loader-DUaFpDGv.mjs";
17
- import { f as R, D as $ } from "./Dialog-CWW597AF.mjs";
18
- import { u as k } from "./useAccountDisplayName-BUAApBIb.mjs";
19
- import { f as F } from "./NumberFormatting-Buh7u8Oi.mjs";
20
- const b = () => {
21
- if (!h.useContext(E))
22
- throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
23
- return y().uiStore;
24
- }, V = (o, n) => {
25
- const t = f.includes(n) ? H(o) : [], a = g.includes(n) ? U(o) : [], r = C.includes(n) ? j(o) : [];
26
- return [t, a, r].filter((s) => s.length > 0);
27
- }, W = (o, n, t) => {
28
- const [a, r] = o, s = a, c = r ?? a, i = [];
29
- if (s && c && f.includes(n)) {
30
- const l = s[s.length - 1].y;
31
- i.push({ label: t.income_label, amount: l });
32
- } else if (g.includes(n)) {
33
- const l = s[s.length - 1].y;
34
- i.push({ label: t.payments_label, amount: l });
35
- }
36
- if (c && C.includes(n)) {
37
- const l = c[c.length - 1].y;
38
- i.push({ label: t.spending_label, amount: l });
39
- }
40
- return i;
41
- }, q = () => {
42
- const o = B(), { selectedAccount: n } = b(), { monthlyCategoryTotals: t } = S(), { trends: a } = _(), r = [o.palette.chart?.chart1, o.palette.chart?.chart2], s = V(t, n.account_type), c = W(s, n.account_type, a), i = [A.LOAN, A.MORTGAGE].includes(n.account_type);
43
- return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
44
- z,
45
- {
46
- colors: r,
47
- datasets: s,
48
- height: 185,
49
- labels: c,
50
- showAverage: i,
51
- showBars: i,
52
- showLegend: !0,
53
- valueFormatterString: "0,0"
54
- }
55
- ) });
56
- }, J = p(q), K = ({ sx: o }) => {
57
- const { loadMonthlyCategoryTotals: n } = S(), { isInitialized: t } = G(), { selectedAccount: a } = b(), [r, s] = h.useState(!1);
58
- return h.useEffect(() => {
59
- t && n([a]).finally(() => {
60
- s(!0);
61
- });
62
- }, [t, a]), !t || !r ? /* @__PURE__ */ e(Y, {}) : /* @__PURE__ */ u(
63
- O,
64
- {
65
- sx: {
66
- "& .MuiCardContent-root:last-child": {
67
- pb: 0
68
- },
69
- ...o
70
- },
71
- children: [
72
- /* @__PURE__ */ e(
73
- M,
74
- {
75
- sx: { pb: 0 },
76
- title: /* @__PURE__ */ e(w, { sx: { pb: 4 }, children: R(/* @__PURE__ */ new Date(), $.MONTH_LONG) })
77
- }
78
- ),
79
- /* @__PURE__ */ e(P, { sx: { p: 0 }, children: /* @__PURE__ */ e(J, {}) })
80
- ]
81
- }
82
- );
83
- }, Q = p(K), X = ({ customDetailsChart: o }) => {
84
- const { institutions: n } = y(), { selectedAccount: t } = b(), { accounts: a } = _(), { firstSubtitle: r, firstValue: s, hasAvailableBalance: c, secondSubtitle: i, secondValue: l } = v(t, a), T = n.find(
85
- (N) => N.guid === t?.institution_guid
86
- ), D = [
87
- ...f,
88
- ...g,
89
- ...C
90
- ].includes(t.account_type), x = k(t);
91
- return /* @__PURE__ */ u(d, { bgcolor: "background.default", p: 24, children: [
92
- /* @__PURE__ */ u(d, { gap: 12, children: [
93
- /* @__PURE__ */ e(
94
- I,
95
- {
96
- alt: a.institution_logo_alt,
97
- institutionGuid: t.institution_guid || "",
98
- size: 64
99
- }
100
- ),
101
- /* @__PURE__ */ e(m, { variant: "Small", children: T?.name })
102
- ] }),
103
- /* @__PURE__ */ u(d, { gap: 8, mb: 24, mt: 4, children: [
104
- /* @__PURE__ */ e(L, { children: x }),
105
- /* @__PURE__ */ u(d, { direction: "row", justifyContent: "space-between", children: [
106
- /* @__PURE__ */ e(m, { bold: c, variant: "Body", children: r }),
107
- /* @__PURE__ */ e(m, { bold: !0, variant: "Body", children: F(s, "0,0.00") })
108
- ] }),
109
- /* @__PURE__ */ u(d, { direction: "row", justifyContent: "space-between", children: [
110
- /* @__PURE__ */ e(m, { variant: "Small", children: i }),
111
- /* @__PURE__ */ e(m, { variant: "Small", children: l })
112
- ] })
113
- ] }),
114
- D && /* @__PURE__ */ e(d, { children: o || /* @__PURE__ */ e(Q, {}) })
115
- ] });
116
- }, bt = p(X);
117
- export {
118
- bt as A,
119
- b as u
120
- };
@@ -1,113 +0,0 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import n from "@mui/material/Box";
3
- import c from "@mui/material/Stack";
4
- import { H2 as D, Drawer as S, Footer as y } from "@mxenabled/mxui";
5
- import B from "@mui/material/IconButton";
6
- import { ArrowBack as C } from "@mxenabled/mx-icons";
7
- const j = ({
8
- ariaLabelClose: o,
9
- onClose: e,
10
- shouldShowBorders: a,
11
- shouldShowShadow: t,
12
- title: i
13
- }) => /* @__PURE__ */ p(
14
- c,
15
- {
16
- "aria-level": 1,
17
- direction: "row",
18
- role: "heading",
19
- sx: {
20
- alignItems: "center",
21
- backgroundColor: "background.paper",
22
- ...a && {
23
- borderBottom: 1,
24
- borderTop: 1,
25
- borderColor: "border.light"
26
- },
27
- ...t && {
28
- boxShadow: "0px 2px 8px 0px #6A73811F"
29
- },
30
- padding: "8px 8px 8px 8px"
31
- },
32
- children: [
33
- /* @__PURE__ */ r(B, { "aria-label": o, color: "primary", onClick: e, children: /* @__PURE__ */ r(C, { color: "primary", sx: { fontSize: 22 } }) }),
34
- /* @__PURE__ */ r(
35
- n,
36
- {
37
- sx: {
38
- flexGrow: 1,
39
- margin: "auto",
40
- textAlign: "center"
41
- },
42
- children: /* @__PURE__ */ r(D, { bold: !0, variant: "Body", children: i })
43
- }
44
- ),
45
- /* @__PURE__ */ r(n, { width: "44px" })
46
- ]
47
- }
48
- ), v = ({
49
- ariaLabelClose: o = "Close",
50
- children: e,
51
- hasSecondaryAction: a = !0,
52
- id: t,
53
- isOpen: i,
54
- isPrimaryDisabled: h,
55
- onClose: d,
56
- onPrimaryAction: l,
57
- onSecondaryAction: u,
58
- primaryColor: s = "primary",
59
- primaryText: x,
60
- secondaryColor: m = "secondary",
61
- secondaryText: b,
62
- shouldShowHeaderBorders: w = !0,
63
- shouldShowHeaderShadow: g = !1,
64
- title: f,
65
- ...k
66
- }) => /* @__PURE__ */ r(
67
- S,
68
- {
69
- id: t,
70
- isOpen: i,
71
- onClose: d,
72
- sx: {
73
- "& .MuiDrawer-paper": {
74
- backgroundColor: "background.default",
75
- borderRadius: 0
76
- },
77
- height: "100%",
78
- "& .MuiToolbar-root": {
79
- backgroundColor: "background.paper"
80
- }
81
- },
82
- ...k,
83
- children: /* @__PURE__ */ p(c, { height: "100%", justifyContent: "space-between", children: [
84
- /* @__PURE__ */ r(
85
- j,
86
- {
87
- ariaLabelClose: o,
88
- onClose: d,
89
- shouldShowBorders: w,
90
- shouldShowShadow: g,
91
- title: f
92
- }
93
- ),
94
- /* @__PURE__ */ r(n, { height: "100%", overflow: "auto", children: e }),
95
- l && /* @__PURE__ */ r(
96
- y,
97
- {
98
- hasSecondaryAction: a,
99
- isPrimaryDisabled: h,
100
- onPrimaryAction: l,
101
- onSecondaryAction: u ?? d,
102
- primaryColor: s,
103
- primaryText: x,
104
- secondaryColor: m,
105
- secondaryText: b
106
- }
107
- )
108
- ] })
109
- }
110
- ), $ = v;
111
- export {
112
- $ as D
113
- };
@@ -1,101 +0,0 @@
1
- import { makeAutoObservable as l, runInAction as r } from "mobx";
2
- import { format as i } from "date-fns/format";
3
- import { fromUnixTime as g } from "date-fns/fromUnixTime";
4
- import { getUnixTime as s } from "date-fns/getUnixTime";
5
- import { subMonths as S } from "date-fns/subMonths";
6
- import { F as m, A as o } from "./Fetch-87LIQbEA.mjs";
7
- import { f as p, D as u } from "./Dialog-CWW597AF.mjs";
8
- class n {
9
- fetchInstance;
10
- constructor(e, t, a) {
11
- this.fetchInstance = new m(e, t, void 0, a);
12
- }
13
- calculateHealthScore = async () => this.fetchInstance.post(`${o.HEALTH_SCORES}/calculate`).then((e) => e.health_score);
14
- getAverageHealthScores = async () => this.fetchInstance.get(`${o.HEALTH_SCORES}/monthly_averages`).then((e) => e);
15
- getHealthScoreChangeReports = async (e, t) => this.fetchInstance.get(`${o.HEALTH_SCORES}/change_report/from/${e}/to/${t}`).then((a) => a);
16
- getPeerScore = async (e) => this.fetchInstance.get(`${o.HEALTH_SCORES}/average/${e}`).then((t) => t.average_health_score);
17
- }
18
- const y = (h) => h?.health_scores.map((e) => {
19
- const t = e.monthly_health_score_average, a = new Date(0, t.month - 1, 1);
20
- return {
21
- x: p(a, u.MONTH_SHORT),
22
- y: t.average_health_score,
23
- month: t.month
24
- // Keep original month for sorting
25
- };
26
- }).sort((e, t) => e.month - t.month).map((e) => ({ x: e.x, y: e.y }));
27
- class v {
28
- api = new n("/", "");
29
- augmentedChartData = [];
30
- averageHealthScores = [];
31
- globalStore;
32
- healthScore = {};
33
- healthScoreChange;
34
- healthScoreChangeReports = [];
35
- peerScore = null;
36
- constructor(e) {
37
- this.globalStore = e, this.api = new n(e.endpoint, e.sessionToken, e.onError), l(this);
38
- }
39
- calculateHealthScore = async () => {
40
- try {
41
- const e = await this.api.calculateHealthScore();
42
- let t = 0;
43
- await this.loadHealthScoreChangeReports();
44
- const a = e?.health_score || 0, c = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
45
- t = a - c, r(() => {
46
- this.healthScore = e, this.healthScoreChange = t;
47
- });
48
- } catch (e) {
49
- console.error("Error calculating health score:", e);
50
- }
51
- };
52
- loadAverageHealthScores = async () => {
53
- try {
54
- const e = await this.api.getAverageHealthScores();
55
- r(() => {
56
- this.averageHealthScores = e;
57
- });
58
- } catch (e) {
59
- console.error("Error loading average health scores:", e);
60
- }
61
- };
62
- loadHealthScoreChangeReports = async () => {
63
- const e = s(S(/* @__PURE__ */ new Date(), 2)), t = s(/* @__PURE__ */ new Date());
64
- try {
65
- const a = await this.api.getHealthScoreChangeReports(
66
- e,
67
- t
68
- );
69
- r(() => {
70
- this.healthScoreChangeReports = a;
71
- });
72
- } catch (a) {
73
- console.error("Error loading health score change reports:", a);
74
- }
75
- };
76
- loadPeerScore = async () => {
77
- const e = i(g(this.globalStore.appDataStore.user.birthday), "yyyy");
78
- try {
79
- const t = await this.api.getPeerScore(e);
80
- r(() => {
81
- this.peerScore = t;
82
- });
83
- } catch (t) {
84
- console.error("Error loading peer score:", t);
85
- }
86
- };
87
- loadAugmentedChartData = async () => {
88
- try {
89
- const e = await this.api.getAverageHealthScores();
90
- r(() => {
91
- this.augmentedChartData = y(e);
92
- });
93
- } catch (e) {
94
- console.error(`Error occurred while getting augmented chart data: ${e}`);
95
- }
96
- };
97
- }
98
- export {
99
- n as F,
100
- v as a
101
- };