@mx-cartographer/experiences 7.1.3 → 7.1.4-ram1-alpha-finstrong-credit-score-graph-check

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 (125) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-8IUM_CLv.mjs → Account-CpRTVIHg.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CuZSSAEc.mjs → AccountDetailsContent-6aPMU6Hp.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-BZBsIKdF.mjs → AccountDetailsHeader-BkUZYoV8.mjs} +8 -8
  5. package/dist/{AccountFields-BD_0GT68.mjs → AccountFields-DOLjKu5l.mjs} +5 -5
  6. package/dist/{AccountListItem-CllIBCao.mjs → AccountListItem-CTT5m4qx.mjs} +4 -4
  7. package/dist/{AccountStore-BL0FE1QL.mjs → AccountStore-DTfpr3h0.mjs} +26 -15
  8. package/dist/{Accounts-Bvc9TJaO.mjs → Accounts-D0BmvNxn.mjs} +1 -1
  9. package/dist/{BudgetUtil-psfk-Amb.mjs → BudgetUtil-D2Jcp-E-.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-BmenK5bu.mjs → CategorySelectorDrawer-DomNyubP.mjs} +3 -3
  11. package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-CPTXh70j.mjs → ConnectDrawer--gJHyp-S.mjs} +2 -2
  14. package/dist/{ConnectionsDrawer-Dkb4vBmt.mjs → ConnectionsDrawer-DabiwV9L.mjs} +3 -3
  15. package/dist/{CurrencyInput-C4xNRL2W.mjs → CurrencyInput-CC5cwVit.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-D4grpB4m.mjs → DebtsStore-9aR2sTJQ.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Drawer-BEtCk82g.mjs +163 -0
  20. package/dist/{ExportCsvAction-CBJAfyAw.mjs → ExportCsvAction-Um-CDa4C.mjs} +3 -3
  21. package/dist/FinstrongStore-CC4SrBjA.mjs +436 -0
  22. package/dist/{GoalStore-B5MZzPLZ.mjs → GoalStore-CiBKZvTg.mjs} +3 -3
  23. package/dist/{Help-CzBAsKA2.mjs → Help-BZ8pIkkR.mjs} +2 -2
  24. package/dist/LineChart-CE3oLBQ0.mjs +566 -0
  25. package/dist/{ListItemAction-DSrYDGAP.mjs → ListItemAction-DGaxy7oz.mjs} +10 -10
  26. package/dist/{ManageIncome-DUuT-yMV.mjs → ManageIncome-BaNgfwr5.mjs} +34 -32
  27. package/dist/{MicroWidgetContainer-C4QQHfD7.mjs → MicroWidgetContainer-C3iV1FBR.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-DTQdRK-3.mjs → MiniWidgetContainer-LtXXgZ6H.mjs} +1 -1
  29. package/dist/{NetWorthStore-Do1Gk8Te.mjs → NetWorthStore-MnpP5KEc.mjs} +2 -2
  30. package/dist/{NotificationSettings-BuShgjn6.mjs → NotificationSettings-Ckx8tgQj.mjs} +5 -5
  31. package/dist/{OriginalBalanceAction-BsxcvNEF.mjs → OriginalBalanceAction-CGZDUsCc.mjs} +3 -3
  32. package/dist/{RecurringSettings-BVOt46uV.mjs → RecurringSettings-DE4T4yQy.mjs} +4 -4
  33. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  34. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
  35. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  36. package/dist/SpendingLegend-D24CEkL3.mjs +170 -0
  37. package/dist/{TransactionDetails-_cXLXTd3.mjs → TransactionDetails-DRlrltGq.mjs} +11 -8
  38. package/dist/{TransactionStore-B-Tq_YFE.mjs → TransactionStore-D8MKYDMb.mjs} +3 -3
  39. package/dist/{TrendsStore-ZZ8X36lJ.mjs → TrendsStore-DL3Vuh71.mjs} +14 -14
  40. package/dist/{User-DaJAQ09j.mjs → User-BthIKO4w.mjs} +2 -2
  41. package/dist/{WidgetContainer-DtPnPQZY.mjs → WidgetContainer-DJA1bxLn.mjs} +4 -4
  42. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  43. package/dist/accounts/index.es.js +14 -14
  44. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/index.es.js +12 -12
  47. package/dist/cashflow/index.es.js +287 -295
  48. package/dist/categories/index.es.js +2 -2
  49. package/dist/common/components/Select.d.ts +4 -2
  50. package/dist/common/components/charts/LineChart.d.ts +2 -0
  51. package/dist/common/components/charts/linechart/CustomMark.d.ts +2 -0
  52. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  53. package/dist/common/components/drawer/Footer.d.ts +17 -0
  54. package/dist/common/index.es.js +33 -33
  55. package/dist/common/types/Finstrong.d.ts +50 -0
  56. package/dist/common/types/index.d.ts +1 -1
  57. package/dist/common/types/localization/FinstrongCopy.d.ts +57 -1
  58. package/dist/dashboard/index.es.js +2 -2
  59. package/dist/debts/index.es.js +11 -11
  60. package/dist/{exportTransactionsToCSV-D8TTNrrE.mjs → exportTransactionsToCSV-XqdHNe2V.mjs} +2 -2
  61. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  62. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +2 -1
  63. package/dist/finstrong/components/CreditOverTimeGraph.d.ts +1 -0
  64. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  65. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  66. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  67. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  68. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  69. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  70. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  71. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -1
  72. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  73. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  74. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  75. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  76. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  77. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  78. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  79. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  80. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  81. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  82. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  83. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  84. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  85. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  86. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  87. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  88. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  89. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +11 -0
  90. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  91. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  92. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  93. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  94. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  95. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  96. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  98. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  99. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  100. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  101. package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
  102. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  103. package/dist/finstrong/constants/index.d.ts +8 -0
  104. package/dist/finstrong/index.es.js +2899 -1017
  105. package/dist/finstrong/stores/FinstrongStore.d.ts +9 -1
  106. package/dist/finstrong/util/finstrongUtils.d.ts +65 -1
  107. package/dist/goals/index.es.js +14 -14
  108. package/dist/help/index.es.js +3 -3
  109. package/dist/{hooks-CE2TKk4a.mjs → hooks-CBST3rkm.mjs} +3 -3
  110. package/dist/investments/index.es.js +4 -4
  111. package/dist/merchants/index.es.js +1 -1
  112. package/dist/networth/index.es.js +34 -34
  113. package/dist/notifications/index.es.js +4 -4
  114. package/dist/recurringtransactions/index.es.js +13 -13
  115. package/dist/settings/index.es.js +8 -8
  116. package/dist/spending/index.es.js +222 -373
  117. package/dist/transactions/index.es.js +15 -15
  118. package/dist/trends/index.es.js +15 -15
  119. package/dist/{useAccountDisplayName-BXGkZN5B.mjs → useAccountDisplayName-DH1CuQ9R.mjs} +2 -2
  120. package/dist/{useInsightsEnabled-DSnpkUq0.mjs → useInsightsEnabled-jdvS1ppf.mjs} +1 -1
  121. package/package.json +1 -1
  122. package/dist/Drawer-kEE73B87.mjs +0 -113
  123. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  124. package/dist/LineChart-B35qvXik.mjs +0 -541
  125. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
@@ -1,12 +1,12 @@
1
1
  import { T as Ca } from "../TransactionApi-B3Tksf7L.mjs";
2
- import { u as P, C as He, D as Be, M as Pe, c as $e, T as Ve, a as We } from "../TransactionDetails-_cXLXTd3.mjs";
3
- import { B as ba, d as Ta, b as Aa } from "../TransactionDetails-_cXLXTd3.mjs";
4
- import { T as M } from "../User-DaJAQ09j.mjs";
5
- import { O as xa } from "../User-DaJAQ09j.mjs";
6
- import { S as ee, D as Ge } from "../TransactionStore-B-Tq_YFE.mjs";
7
- import { T as Ia } from "../TransactionStore-B-Tq_YFE.mjs";
8
- import { e as Ue } from "../exportTransactionsToCSV-D8TTNrrE.mjs";
9
- import { E as Da } from "../ExportCsvAction-CBJAfyAw.mjs";
2
+ import { u as P, C as He, D as Be, M as Pe, c as $e, T as Ve, a as We } from "../TransactionDetails-DRlrltGq.mjs";
3
+ import { B as ba, d as Ta, b as Aa } from "../TransactionDetails-DRlrltGq.mjs";
4
+ import { T as M } from "../User-BthIKO4w.mjs";
5
+ import { O as xa } from "../User-BthIKO4w.mjs";
6
+ import { S as ee, D as Ge } from "../TransactionStore-D8MKYDMb.mjs";
7
+ import { T as Ia } from "../TransactionStore-D8MKYDMb.mjs";
8
+ import { e as Ue } from "../exportTransactionsToCSV-XqdHNe2V.mjs";
9
+ import { E as Da } from "../ExportCsvAction-Um-CDa4C.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
11
11
  import m from "react";
12
12
  import { observer as S } from "mobx-react-lite";
@@ -15,9 +15,9 @@ import { DataGridPro as ze } from "@mui/x-data-grid-pro";
15
15
  import A from "@mui/material/Box";
16
16
  import { useTheme as Ke } from "@mui/material/styles";
17
17
  import { Text as C, Icon as B, MerchantLogo as qe, TextField as te, P as je } from "@mxenabled/mxui";
18
- import { h as $, u as x, b as K, d as re, m as Xe, a as Ye, g as Je, o as Qe } from "../hooks-CE2TKk4a.mjs";
18
+ import { h as $, u as x, b as K, d as re, m as Xe, a as Ye, g as Je, o as Qe } from "../hooks-CBST3rkm.mjs";
19
19
  import { fromUnixTime as Ze } from "date-fns/fromUnixTime";
20
- import { f as et, D as tt, a as se } from "../Dialog-CWW597AF.mjs";
20
+ import { f as et, a as tt, D as se } from "../Dialog-BPTr3qHE.mjs";
21
21
  import D from "@mui/material/Stack";
22
22
  import { f as ie } from "../NumberFormatting-Buh7u8Oi.mjs";
23
23
  import { L as q } from "../Loader-DUaFpDGv.mjs";
@@ -26,18 +26,18 @@ import { getUnixTime as nt } from "date-fns/getUnixTime";
26
26
  import { startOfMonth as ot } from "date-fns/startOfMonth";
27
27
  import { startOfToday as z } from "date-fns/startOfToday";
28
28
  import rt from "@mui/material/styles/useTheme";
29
- import { l as st } from "../ConnectDrawer-CPTXh70j.mjs";
29
+ import { l as st } from "../ConnectDrawer--gJHyp-S.mjs";
30
30
  import it from "@mui/material/Divider";
31
31
  import ct from "@mui/material/MenuItem";
32
32
  import lt from "@mui/material/RadioGroup";
33
33
  import { ExpandMore as dt } from "@mxenabled/mx-icons";
34
- import { C as ut } from "../CurrencyInput-C4xNRL2W.mjs";
35
- import { a as mt, u as _t } from "../CategorySelectorDrawer-BmenK5bu.mjs";
34
+ import { C as ut } from "../CurrencyInput-CC5cwVit.mjs";
35
+ import { a as mt, u as _t } from "../CategorySelectorDrawer-DomNyubP.mjs";
36
36
  import { b as ae } from "../Localization-2MODESHW.mjs";
37
- import { A as T, W as pt } from "../WidgetContainer-DtPnPQZY.mjs";
37
+ import { A as T, W as pt } from "../WidgetContainer-DJA1bxLn.mjs";
38
38
  import { u as gt } from "../useScreenSize-B6JyS_Lj.mjs";
39
39
  import { S as ht } from "../SearchBox-B2_zLv8-.mjs";
40
- import { D as ne } from "../Drawer-kEE73B87.mjs";
40
+ import { D as ne } from "../Drawer-BEtCk82g.mjs";
41
41
  const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small", children: [
42
42
  `${t.row.account}`,
43
43
  t.row.number && ` | ${t.row.number}`
@@ -7,31 +7,31 @@ import _ from "@mui/material/Stack";
7
7
  import me from "@mui/material/Button";
8
8
  import { addSeconds as ve } from "date-fns/addSeconds";
9
9
  import { differenceInCalendarMonths as pe } from "date-fns/differenceInCalendarMonths";
10
- import { a as Je, g as et, S as tt, L as Me } from "../TrendsStore-ZZ8X36lJ.mjs";
11
- import { T as mo } from "../TrendsStore-ZZ8X36lJ.mjs";
12
- import { i as nt, c as ot, d as st, e as rt, f as at, h as it, b as Ae, g as Re, j as De } from "../SpendingData-D5vsfYKo.mjs";
10
+ import { a as Je, g as et, S as tt, L as Me } from "../TrendsStore-DL3Vuh71.mjs";
11
+ import { T as mo } from "../TrendsStore-DL3Vuh71.mjs";
12
+ import { i as nt, c as ot, d as st, e as rt, f as at, h as it, b as Ae, g as Re, j as De } from "../SpendingData-BuJ03S9d.mjs";
13
13
  import ct from "@mui/material/ToggleButton";
14
14
  import lt from "@mui/material/ToggleButtonGroup";
15
- import { u as R, m as P, g as N, b as ee, h as ie, d as ce, v as te, f as Te, p as dt, a as ht } from "../hooks-CE2TKk4a.mjs";
15
+ import { u as R, m as P, g as N, b as ee, h as ie, d as ce, v as te, f as Te, p as dt, a as ht } from "../hooks-CBST3rkm.mjs";
16
16
  import { u as $ } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { f as q, D as z } from "../Dialog-CWW597AF.mjs";
17
+ import { f as q, a as z } from "../Dialog-BPTr3qHE.mjs";
18
18
  import { DataGridPro as ut } from "@mui/x-data-grid-pro";
19
19
  import { C as gt } from "../CurrencyText-kyC1aseI.mjs";
20
20
  import { b as mt } from "../Localization-2MODESHW.mjs";
21
21
  import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
22
22
  import { T as A, b as pt } from "../ViewMoreMicroCard-DTtQNV3D.mjs";
23
- import { A as y, W as ke } from "../WidgetContainer-DtPnPQZY.mjs";
23
+ import { A as y, W as ke } from "../WidgetContainer-DJA1bxLn.mjs";
24
24
  import { c as Ct } from "../Category-CevNQ03n.mjs";
25
- import { a as Ne, T as He } from "../TransactionDetails-_cXLXTd3.mjs";
26
- import { D as Ce } from "../Drawer-kEE73B87.mjs";
25
+ import { a as Ne, T as He } from "../TransactionDetails-DRlrltGq.mjs";
26
+ import { D as Ce } from "../Drawer-BEtCk82g.mjs";
27
27
  import { L as J } from "../Loader-DUaFpDGv.mjs";
28
28
  import { useTheme as We } from "@mui/material/styles";
29
- import { L as ye } from "../LineChart-B35qvXik.mjs";
30
- import { M as ft } from "../MiniWidgetContainer-DTQdRK-3.mjs";
29
+ import { L as ye } from "../LineChart-CE3oLBQ0.mjs";
30
+ import { M as ft } from "../MiniWidgetContainer-LtXXgZ6H.mjs";
31
31
  import { subMonths as Tt } from "date-fns";
32
32
  import { TrendingUp as yt, TrendingDown as _t, MultilineChart as bt, ExpandLess as St, ExpandMore as wt } from "@mxenabled/mx-icons";
33
33
  import { a as Dt, f as Z } from "../NumberFormatting-Buh7u8Oi.mjs";
34
- import { M as It } from "../MicroWidgetContainer-C4QQHfD7.mjs";
34
+ import { M as It } from "../MicroWidgetContainer-C3iV1FBR.mjs";
35
35
  import Et from "@mui/material/Collapse";
36
36
  import Lt from "@mui/material/List";
37
37
  import xt from "@mui/material/ListItem";
@@ -42,11 +42,11 @@ import Oe from "@mui/material/styles/useTheme";
42
42
  import Rt from "@mui/material/Divider";
43
43
  import { useTheme as kt, Stack as Nt } from "@mui/material";
44
44
  import Ht from "@mui/material/Paper";
45
- import { b as Wt } from "../CategoryUtil-BR3H5i6n.mjs";
46
- import { E as Ot } from "../ExportCsvAction-CBJAfyAw.mjs";
47
- import { u as Vt } from "../useInsightsEnabled-DSnpkUq0.mjs";
45
+ import { b as Wt } from "../CategoryUtil-DUM8NuGO.mjs";
46
+ import { E as Ot } from "../ExportCsvAction-Um-CDa4C.mjs";
47
+ import { u as Vt } from "../useInsightsEnabled-jdvS1ppf.mjs";
48
48
  import { E as Gt } from "../EmptyState-DA_lfRBv.mjs";
49
- import { l as Bt } from "../ConnectDrawer-CPTXh70j.mjs";
49
+ import { l as Bt } from "../ConnectDrawer--gJHyp-S.mjs";
50
50
  const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
51
51
  lt,
52
52
  {
@@ -1,6 +1,6 @@
1
1
  import s from "react";
2
- import { g as e } from "./ConnectDrawer-CPTXh70j.mjs";
3
- import { a as n } from "./hooks-CE2TKk4a.mjs";
2
+ import { g as e } from "./ConnectDrawer--gJHyp-S.mjs";
3
+ import { a as n } from "./hooks-CBST3rkm.mjs";
4
4
  const i = (o) => {
5
5
  const { config: a } = n();
6
6
  return s.useMemo(
@@ -1,5 +1,5 @@
1
1
  import { useState as n, useEffect as a } from "react";
2
- import { f as o } from "./hooks-CE2TKk4a.mjs";
2
+ import { f as o } from "./hooks-CBST3rkm.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": "7.1.3",
3
+ "version": "7.1.4-ram1-alpha-finstrong-credit-score-graph-check",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -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
- };