@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.1

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 (105) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
  4. package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
  8. package/dist/Accounts-UIlYCmHb.mjs +9 -0
  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-CXvenbdN.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
  13. package/dist/CategoryStore-BEdFs69_.mjs +183 -0
  14. package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
  18. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
  19. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DNSgmdyv.mjs} +3 -3
  20. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  21. package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
  22. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
  23. package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
  24. package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
  25. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
  26. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
  27. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  28. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
  29. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
  30. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
  31. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
  32. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  33. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
  34. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
  35. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
  36. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
  37. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  38. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  39. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  40. package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
  41. package/dist/TransactionStore-CtGTg0XS.mjs +677 -0
  42. package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
  43. package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
  44. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
  45. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
  46. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  48. package/dist/accounts/index.es.js +241 -203
  49. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  50. package/dist/accounts/utils/Accounts.d.ts +1 -2
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/index.es.js +500 -507
  53. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  54. package/dist/cashflow/index.es.js +384 -382
  55. package/dist/categories/index.es.js +2 -2
  56. package/dist/categories/stores/CategoryStore.d.ts +1 -5
  57. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  58. package/dist/common/components/charts/index.d.ts +0 -2
  59. package/dist/common/index.es.js +391 -376
  60. package/dist/common/stores/AppDataStore.d.ts +1 -3
  61. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  62. package/dist/common/stores/GlobalStore.d.ts +10 -4
  63. package/dist/common/stores/UserStore.d.ts +2 -3
  64. package/dist/common/types/Account.d.ts +6 -9
  65. package/dist/common/types/Global.d.ts +1 -0
  66. package/dist/dashboard/index.es.js +2 -2
  67. package/dist/debts/index.es.js +506 -498
  68. package/dist/exportTransactionsToCSV-C4PkIYP6.mjs +48 -0
  69. package/dist/finstrong/index.es.js +417 -415
  70. package/dist/goals/index.es.js +559 -557
  71. package/dist/goals/stores/GoalStore.d.ts +4 -17
  72. package/dist/help/index.es.js +3 -3
  73. package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
  74. package/dist/insights/index.es.js +1 -1
  75. package/dist/investments/index.es.js +437 -435
  76. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  77. package/dist/merchants/index.es.js +2 -2
  78. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  79. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
  80. package/dist/microinsights/index.es.js +1 -1
  81. package/dist/microinsights/interfaces.d.ts +0 -1
  82. package/dist/networth/index.es.js +176 -174
  83. package/dist/notifications/index.es.js +23 -23
  84. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  85. package/dist/recurringtransactions/index.es.js +175 -173
  86. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  87. package/dist/settings/index.es.js +285 -279
  88. package/dist/spending/index.es.js +328 -304
  89. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  90. package/dist/transactions/index.es.js +63 -64
  91. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  92. package/dist/trends/index.es.js +948 -583
  93. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
  94. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  95. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
  96. package/package.json +3 -3
  97. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  98. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  99. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  100. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  101. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  102. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  103. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  104. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  105. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
package/CHANGELOG.md CHANGED
@@ -1,3 +1,78 @@
1
+ ## [7.3.1] - 12-09-2025
2
+
3
+ - **UPDATED** `SpendingWidget` to have an export csv button on transactions list
4
+
5
+ ## [7.3.0] - 12-09-2025
6
+
7
+ - **UPDATED** - Improved `X-Charts` chunk loading for better performance.
8
+
9
+ ## [7.2.30] - 12-09-2025
10
+
11
+ - **UPDATED** Bug Fixed - Account Type Edit Interactions - Low Account Balance
12
+
13
+ ## [7.2.29] - 12-08-2025
14
+
15
+ - **UPDATED** `InsightsMicroWidget` refactor list of beats into `BeatList` component
16
+
17
+ ## [7.2.28] - 12-08-2025
18
+
19
+ - **UPDATED** `InsightsMicroWidget` storybook to documention batcave settings
20
+
21
+ ## [7.2.27] - 12-08-2025
22
+
23
+ - **UPDATED** Clean up `shouldApplyNewAnimation` code
24
+
25
+ ## [7.2.26] - 12-08-2025
26
+
27
+ - **FIXED** - BUG Fixed - Inisghts Notifications Text Displays in Dark when in Dark mode
28
+
29
+ ## [7.2.25] - 12-04-2025
30
+
31
+ - **UPDATED** - `Fetch` to throw 401 error on `PUT` so that Insights can handle logging user out
32
+
33
+ ## [7.2.24] - 12-05-2025
34
+
35
+ - **FIXED** - `mark_all_as_viewd` API called after getting `notifications` api response in `Notifications List`.
36
+
37
+ ## [7.2.23] - 12-03-2025
38
+
39
+ - **UPDATED** - `GlobalStore` emits an update when a subscribed-to variable changes. Good for external libraries like Pulse.
40
+ - **UPDATED** - Ability to hide flag with prop `canFlagTransactions` in `TransactionDetails`
41
+ - **FIXED** - Lonely `Actions` header if no bottom actions in `TransactionDetails`
42
+
43
+ ## [7.2.22] - 12-03-2025
44
+
45
+ - **FIXED** - Aria annoounce for split row error messages
46
+ - **FIXED** - Aria label for add subcategory modal
47
+
48
+ ## [7.2.21] - 12-03-2025
49
+
50
+ - **FIXED** - Debts mobile view Bug Fix
51
+
52
+ ## [7.2.20] - 12-02-2025
53
+
54
+ - **FIXED** - Chart legend labels to show when amount is 0
55
+
56
+ ## [7.2.19] - 12-02-2025
57
+
58
+ - **FIXED** - Budget Bubbles tooltips to anchor on element
59
+
60
+ ## [7.2.18] - 12-02-2025
61
+
62
+ - **UPDATED** - Insights app bell icon has_been_viewed fixed
63
+
64
+ ## [7.2.17] - 12-01-2025
65
+
66
+ - **ADDED** - Load time tracking for full standalone widgets
67
+
68
+ ## [7.2.16] - 12-01-2025
69
+
70
+ - **FIXED** - Missing `Pending` column in CSV export
71
+
72
+ ## [7.2.15] - 11-25-2025
73
+
74
+ - **FIXED** - Next recurring transaction date displayed offset by one day
75
+
1
76
  ## [7.2.14] - 11-25-2025
2
77
 
3
78
  - **FIXED** - Removed border from embedded widgets
@@ -1,4 +1,4 @@
1
- import { A as C } from "./ConnectDrawer-BQNs-hjk.mjs";
1
+ import { A as C } from "./ConnectDrawer-CbxHKlRv.mjs";
2
2
  const I = [
3
3
  C.ANY,
4
4
  C.CASH,
@@ -11,10 +11,10 @@ import M from "@mui/material/Divider";
11
11
  import v from "@mui/material/ListItem";
12
12
  import N from "@mui/material/ListItemButton";
13
13
  import w from "@mui/material/ListItemText";
14
- import { u as D } from "./AccountDetailsHeader-JtSX6Uf9.mjs";
15
- import { d as z, u as E, g as O, h as X } from "./hooks-D6XlXHf4.mjs";
16
- import { A as at } from "./AccountListItem-JFMZROh7.mjs";
17
- import { A as k } from "./WidgetContainer-BHWANqT4.mjs";
14
+ import { u as D } from "./AccountDetailsHeader-jAFWoHj7.mjs";
15
+ import { d as z, u as E, g as O, h as X } from "./hooks-Cy8JnjCg.mjs";
16
+ import { A as at } from "./AccountListItem-D6rWAreC.mjs";
17
+ import { A as k } from "./WidgetContainer-BnTgAfQn.mjs";
18
18
  import { a as V, f as B, D as K } from "./Dialog-CWW597AF.mjs";
19
19
  import { b as h } from "./Localization-2MODESHW.mjs";
20
20
  import { D as J } from "./Drawer-kEE73B87.mjs";
@@ -22,7 +22,7 @@ import P from "@mui/material/ListItemAvatar";
22
22
  import ct from "@mui/material/Stack";
23
23
  import st from "@mui/material/styles/useTheme";
24
24
  import { Error as q, CheckCircle as it, Language as rt } from "@mxenabled/mx-icons";
25
- import { n as m, N as Q, l as Z, F as R } from "./ConnectDrawer-BQNs-hjk.mjs";
25
+ import { n as m, N as Q, l as Z, F as R } from "./ConnectDrawer-CbxHKlRv.mjs";
26
26
  import { fromUnixTime as lt } from "date-fns/fromUnixTime";
27
27
  import { isToday as dt } from "date-fns/isToday";
28
28
  import { isYesterday as ut } from "date-fns/isYesterday";
@@ -37,14 +37,14 @@ import { LocalizationProvider as ft } from "@mui/x-date-pickers-pro";
37
37
  import bt from "@mui/material/MenuItem";
38
38
  import At from "@mui/material/Select";
39
39
  import Tt from "@mui/material/TextField";
40
- import { C as St } from "./CurrencyInput-DUsQbkXb.mjs";
41
- import { b as Dt } from "./AccountFields-C9FlatNb.mjs";
40
+ import { C as St } from "./CurrencyInput-lSC7oPDg.mjs";
41
+ import { b as Dt } from "./AccountFields-DPxMPBF0.mjs";
42
42
  import Et from "@mui/material/Alert";
43
43
  import yt from "@mui/material/AlertTitle";
44
44
  import xt from "@mui/material/Link";
45
45
  import wt from "@mui/material/Paper";
46
46
  import { subDays as kt, startOfToday as It, endOfToday as Mt } from "date-fns";
47
- import { T as vt, a as Lt } from "./TransactionDetails-oP1eSuiS.mjs";
47
+ import { T as vt, a as Lt } from "./TransactionDetails-BUoNbsu-.mjs";
48
48
  import { T as j } from "./TabContentContainer-j01JYR_7.mjs";
49
49
  const U = ({
50
50
  children: e,
@@ -0,0 +1,87 @@
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { observer as m } from "mobx-react-lite";
3
+ import e from "@mui/material/Stack";
4
+ import { H3 as _, InstitutionLogo as x, Text as a, H2 as T } from "@mxenabled/mxui";
5
+ import d from "react";
6
+ import { G as D, d as f, m as N, f as w, u as E } from "./hooks-Cy8JnjCg.mjs";
7
+ import { g as I } from "./AccountFields-DPxMPBF0.mjs";
8
+ import G from "@mui/material/Card";
9
+ import v from "@mui/material/CardContent";
10
+ import O from "@mui/material/CardHeader";
11
+ import { L as H } from "./Loader-DUaFpDGv.mjs";
12
+ import { f as M, D as P } from "./Dialog-CWW597AF.mjs";
13
+ import { I as L, P as U, S as j } from "./Account-YwUMFz93.mjs";
14
+ import { u as z } from "./useAccountDisplayName-D6sQsNNQ.mjs";
15
+ import { f as B } from "./NumberFormatting-Buh7u8Oi.mjs";
16
+ const p = () => {
17
+ if (!d.useContext(D))
18
+ throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
19
+ return f().uiStore;
20
+ }, Y = ({ sx: n, ChartComponent: s }) => {
21
+ const { loadMonthlyCategoryTotals: c } = N(), { isInitialized: o } = w(), { selectedAccount: r } = p(), [l, u] = d.useState(!1);
22
+ return d.useEffect(() => {
23
+ o && c([r]).finally(() => {
24
+ u(!0);
25
+ });
26
+ }, [o, r]), !o || !l ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ i(
27
+ G,
28
+ {
29
+ sx: {
30
+ "& .MuiCardContent-root:last-child": {
31
+ pb: 0
32
+ },
33
+ ...n
34
+ },
35
+ children: [
36
+ /* @__PURE__ */ t(
37
+ O,
38
+ {
39
+ sx: { pb: 0 },
40
+ title: /* @__PURE__ */ t(_, { sx: { pb: 4 }, children: M(/* @__PURE__ */ new Date(), P.MONTH_LONG) })
41
+ }
42
+ ),
43
+ /* @__PURE__ */ t(v, { sx: { p: 0 }, children: s ? /* @__PURE__ */ t(s, {}) : null })
44
+ ]
45
+ }
46
+ );
47
+ }, k = m(Y), R = ({
48
+ customDetailsChart: n,
49
+ ChartComponent: s
50
+ }) => {
51
+ const { institutions: c } = f(), { selectedAccount: o } = p(), { accounts: r } = E(), { firstSubtitle: l, firstValue: u, hasAvailableBalance: C, secondSubtitle: h, secondValue: S } = I(o, r), b = c.find(
52
+ (y) => y.guid === o?.institution_guid
53
+ ), A = [
54
+ ...L,
55
+ ...U,
56
+ ...j
57
+ ].includes(o.account_type), g = z(o);
58
+ return /* @__PURE__ */ i(e, { bgcolor: "background.default", p: 24, children: [
59
+ /* @__PURE__ */ i(e, { gap: 12, children: [
60
+ /* @__PURE__ */ t(
61
+ x,
62
+ {
63
+ alt: r.institution_logo_alt,
64
+ institutionGuid: o.institution_guid || "",
65
+ size: 64
66
+ }
67
+ ),
68
+ /* @__PURE__ */ t(a, { variant: "Small", children: b?.name })
69
+ ] }),
70
+ /* @__PURE__ */ i(e, { gap: 8, mb: 24, mt: 4, children: [
71
+ /* @__PURE__ */ t(T, { children: g }),
72
+ /* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
73
+ /* @__PURE__ */ t(a, { bold: C, variant: "Body", children: l }),
74
+ /* @__PURE__ */ t(a, { bold: !0, variant: "Body", children: B(u, "0,0.00") })
75
+ ] }),
76
+ /* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
77
+ /* @__PURE__ */ t(a, { variant: "Small", children: h }),
78
+ /* @__PURE__ */ t(a, { variant: "Small", children: S })
79
+ ] })
80
+ ] }),
81
+ A && /* @__PURE__ */ t(e, { children: n || /* @__PURE__ */ t(k, { ChartComponent: s }) })
82
+ ] });
83
+ }, rt = m(R);
84
+ export {
85
+ rt as A,
86
+ p as u
87
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { Icon as p, Text as y } from "@mxenabled/mxui";
3
- import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-BQNs-hjk.mjs";
4
- import { i as T, u as D, a as A, b as g, c as O } from "./Accounts-BRf_YeTf.mjs";
3
+ import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-CbxHKlRv.mjs";
4
+ import { i as T, u as D, a as A, b as g, c as O } from "./Accounts-UIlYCmHb.mjs";
5
5
  import { f as _, i as b, a as N, b as S } from "./NumberFormatting-Buh7u8Oi.mjs";
6
6
  import { b as i } from "./Localization-2MODESHW.mjs";
7
7
  import { f as o, D as f } from "./Dialog-CWW597AF.mjs";
@@ -4,16 +4,16 @@ import I from "@mui/material/Badge";
4
4
  import m from "@mui/material/Box";
5
5
  import S from "@mui/material/ListItem";
6
6
  import v from "@mui/material/ListItemAvatar";
7
- import C from "@mui/material/ListItemButton";
8
- import _ from "@mui/material/ListItemText";
7
+ import _ from "@mui/material/ListItemButton";
8
+ import C from "@mui/material/ListItemText";
9
9
  import B from "@mui/material/styles/useTheme";
10
10
  import { InstitutionLogo as L, Text as o } from "@mxenabled/mxui";
11
11
  import { Error as A } from "@mxenabled/mx-icons";
12
12
  import { I as j } from "./IconBacking-B9oC6uL2.mjs";
13
- import { g as T } from "./AccountFields-C9FlatNb.mjs";
14
- import { u as X } from "./useAccountDisplayName-BUAApBIb.mjs";
15
- import { u as $ } from "./hooks-D6XlXHf4.mjs";
16
- import { C as d } from "./ConnectDrawer-BQNs-hjk.mjs";
13
+ import { g as T } from "./AccountFields-DPxMPBF0.mjs";
14
+ import { u as X } from "./useAccountDisplayName-D6sQsNNQ.mjs";
15
+ import { d } from "./ConnectDrawer-CbxHKlRv.mjs";
16
+ import { u as $ } from "./hooks-Cy8JnjCg.mjs";
17
17
  import { f as k } from "./NumberFormatting-Buh7u8Oi.mjs";
18
18
  const w = {
19
19
  gridRow: 1,
@@ -45,7 +45,7 @@ const w = {
45
45
  }
46
46
  ) }),
47
47
  /* @__PURE__ */ e(
48
- _,
48
+ C,
49
49
  {
50
50
  disableTypography: !0,
51
51
  primary: /* @__PURE__ */ r(
@@ -81,7 +81,7 @@ const w = {
81
81
  {
82
82
  sx: { backgroundColor: "background.paper", color: t.is_closed ? "grey.700" : "" },
83
83
  ...c,
84
- children: s ? /* @__PURE__ */ e(C, { alignItems: "flex-start", onClick: s, sx: { px: 24 }, children: a }) : a
84
+ children: s ? /* @__PURE__ */ e(_, { alignItems: "flex-start", onClick: s, sx: { px: 24 }, children: a }) : a
85
85
  }
86
86
  );
87
87
  }, Z = b(M);
@@ -1,12 +1,11 @@
1
- import { makeAutoObservable as l, runInAction as a } from "mobx";
2
- import { i as A } from "./User-BQUxBeZV.mjs";
3
- import { F as g, A as i } from "./Fetch-87LIQbEA.mjs";
4
- import { d as m } from "./Accounts-BRf_YeTf.mjs";
5
- import { A as c, j as u } from "./ConnectDrawer-BQNs-hjk.mjs";
6
- class d {
1
+ import { makeAutoObservable as A, runInAction as a } from "mobx";
2
+ import { i as f } from "./User-Bj34_i8g.mjs";
3
+ import { F as p, A as i } from "./Fetch-DecPFeGU.mjs";
4
+ import { A as c, h as d, d as h, E as y, i as I, j as b } from "./ConnectDrawer-CbxHKlRv.mjs";
5
+ class _ {
7
6
  fetchInstance;
8
- constructor(t, e, s) {
9
- this.fetchInstance = new g(t, e, void 0, s);
7
+ constructor(t, e, n) {
8
+ this.fetchInstance = new p(t, e, void 0, n);
10
9
  }
11
10
  createAccount = async (t) => this.fetchInstance.post(i.ACCOUNTS, t).then((e) => e.account).catch((e) => e);
12
11
  deleteAccount = async (t) => this.fetchInstance.delete(`${i.ACCOUNTS}/${t}`).catch((e) => e);
@@ -18,42 +17,35 @@ class d {
18
17
  refreshAllMembers = async () => this.fetchInstance.get(`${i.MEMBERS}/refresh_all`).then((t) => t).catch((t) => t);
19
18
  updateAccount = async (t) => this.fetchInstance.put(`${i.ACCOUNTS}/${t.guid}`, t).then((e) => e.account).catch((e) => e);
20
19
  }
21
- class p {
20
+ class E {
22
21
  isLoading = !1;
23
22
  selectedAccount = {};
24
23
  selectedMember = {};
25
24
  constructor() {
26
- l(this);
25
+ A(this);
27
26
  }
28
27
  setIsLoading = (t) => this.isLoading = t;
29
28
  setSelectedAccount = (t) => this.selectedAccount = t;
30
29
  setSelectedMember = (t) => this.selectedMember = t;
31
30
  }
32
- class E {
31
+ class T {
33
32
  globalStore;
34
- api = new d("/", "");
33
+ api = new _("/", "");
35
34
  accounts = [];
36
- accountsLoaded = !1;
37
35
  institutions = [];
38
- institutionsLoaded = !1;
39
36
  members = [];
40
- membersLoaded = !1;
41
37
  uiStore;
42
38
  constructor(t) {
43
- this.globalStore = t, this.uiStore = new p(), this.api = new d(t.endpoint, t.sessionToken, t.onError), l(this);
39
+ this.globalStore = t, this.uiStore = new E(), this.api = new _(t.endpoint, t.sessionToken, t.onError), A(this);
44
40
  }
45
- loadAccountData = async () => {
46
- await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
41
+ loadAccountData = async ({
42
+ accounts: t,
43
+ institutions: e
44
+ } = {}) => {
45
+ await Promise.all([this.loadAccounts(t), this.loadInstitutions(e)]);
47
46
  };
48
- get isAccountDataLoaded() {
49
- return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
50
- }
51
- get detailedAccounts() {
52
- const t = this.globalStore.userStore.userFeatures, e = A(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS");
53
- return m(this.accounts, this.institutions, this.members, e);
54
- }
55
47
  get cashAccounts() {
56
- return this.detailedAccounts.filter(
48
+ return this.accounts.filter(
57
49
  (t) => t.account_type === c.CASH || t.account_type === c.CHECKING || t.account_type === c.PREPAID || t.account_type === c.SAVINGS || t.account_type === c.CHECKING_LINE_OF_CREDIT
58
50
  );
59
51
  }
@@ -61,10 +53,10 @@ class E {
61
53
  return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
62
54
  }
63
55
  get checkingAccounts() {
64
- return this.detailedAccounts.filter((t) => t.account_type === c.CHECKING);
56
+ return this.accounts.filter((t) => t.account_type === c.CHECKING);
65
57
  }
66
58
  get debtAccounts() {
67
- return this.detailedAccounts.filter(
59
+ return this.accounts.filter(
68
60
  (t) => t.account_type === c.CREDIT_CARD || t.account_type === c.LOAN || t.account_type === c.MORTGAGE || t.account_type === c.LINE_OF_CREDIT || t.account_type === c.CHECKING_LINE_OF_CREDIT
69
61
  );
70
62
  }
@@ -75,23 +67,23 @@ class E {
75
67
  c.CREDIT_CARD,
76
68
  c.INVESTMENT
77
69
  ]);
78
- return this.detailedAccounts.filter((e) => t.has(e.account_type));
70
+ return this.accounts.filter((e) => t.has(e.account_type));
79
71
  }
80
72
  get investmentAccounts() {
81
- return this.detailedAccounts.filter(
73
+ return this.accounts.filter(
82
74
  (t) => t.account_type === c.INVESTMENT
83
75
  );
84
76
  }
85
77
  get savingsAccounts() {
86
- return this.detailedAccounts.filter((t) => t.account_type === c.SAVINGS);
78
+ return this.accounts.filter((t) => t.account_type === c.SAVINGS);
87
79
  }
88
80
  get retirementAccounts() {
89
- return this.detailedAccounts.filter(
90
- (t) => t.account_type === c.INVESTMENT || t.account_type === c.SAVINGS || t.account_type === c.CHECKING || t.account_type === c.CASH || t.account_type === c.PROPERTY || t.account_type === c.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
81
+ return this.accounts.filter(
82
+ (t) => t.account_type === c.INVESTMENT || t.account_type === c.SAVINGS || t.account_type === c.CHECKING || t.account_type === c.CASH || t.account_type === c.PROPERTY || t.account_type === c.INSURANCE && (t.account_subtype === d.WHOLE_LIFE || t.account_subtype === d.UNIVERSAL_LIFE || t.account_subtype === d.VARIABLE_UNIVERSAL_LIFE)
91
83
  );
92
84
  }
93
85
  get visibleAccounts() {
94
- return this.detailedAccounts.filter((t) => !t.is_hidden);
86
+ return this.accounts.filter((t) => !t.is_hidden);
95
87
  }
96
88
  get visibleCashAccounts() {
97
89
  return this.cashAccounts.filter((t) => !t.is_hidden);
@@ -119,15 +111,6 @@ class E {
119
111
  get visibleSavingsAccounts() {
120
112
  return this.savingsAccounts.filter((t) => !t.is_hidden);
121
113
  }
122
- setAccounts = (t) => {
123
- this.accounts = t, this.accountsLoaded = !0;
124
- };
125
- setMembers = (t) => {
126
- this.members = t, this.membersLoaded = !0;
127
- };
128
- setInstitutions = (t) => {
129
- this.institutions = t, this.institutionsLoaded = !0;
130
- };
131
114
  addAccount = async (t) => {
132
115
  try {
133
116
  const e = await this.api.createAccount(t);
@@ -138,45 +121,77 @@ class E {
138
121
  console.error(`Error occurred while adding an account: ${e}`);
139
122
  }
140
123
  };
141
- loadAccounts = async () => {
124
+ augmentAccounts = (t = this.accounts) => {
125
+ const e = [], n = this.globalStore.userStore.userFeatures, s = f(
126
+ n,
127
+ "MD_EXCLUDE_EXTERNAL_ACCOUNTS"
128
+ );
129
+ for (const r of t) {
130
+ if (s && r.member_is_managed_by_user) continue;
131
+ const o = this.members.find((g) => g.guid === r.member_guid);
132
+ if (!o) continue;
133
+ let u = h.Connected;
134
+ y.includes(o.connection_status) ? u = h.Error : I.includes(o.connection_status) ? u = h.Processing : b.includes(o.connection_status) && (u = h.RequiresMfa);
135
+ const m = [
136
+ r.user_name || r.feed_name || "",
137
+ r.account_number ? `*${r.account_number}` : ""
138
+ ].join(" ").trim();
139
+ e.push({
140
+ ...r,
141
+ connectionStatus: u,
142
+ institutionName: m,
143
+ memberName: o.name
144
+ }), o.connectionStatus = u;
145
+ }
146
+ return e;
147
+ };
148
+ loadAccounts = async (t) => {
149
+ await this.loadMembers();
142
150
  try {
143
- const t = await this.api.getAccounts();
144
- this.setAccounts(t);
145
- } catch (t) {
146
- console.error(`Error occurred while loading accounts: ${t}`);
151
+ const e = t || await this.api.getAccounts();
152
+ a(() => {
153
+ this.accounts = this.sortAccounts(this.augmentAccounts(e));
154
+ });
155
+ } catch (e) {
156
+ console.error(`Error occurred while loading accounts: ${e}`);
147
157
  }
148
158
  };
149
- loadInstitutions = async () => {
159
+ loadInstitutions = async (t) => {
150
160
  try {
151
- const t = await this.api.getInstitutions();
152
- this.setInstitutions(t);
153
- } catch (t) {
154
- console.error(`Error occurred while loading institutions: ${t}`);
161
+ const e = t || await this.api.getInstitutions();
162
+ a(() => {
163
+ this.institutions = e;
164
+ });
165
+ } catch (e) {
166
+ console.error(`Error occurred while loading institutions: ${e}`);
155
167
  }
156
168
  };
157
169
  loadMembers = async () => {
158
170
  try {
159
171
  const t = await this.api.getMembers();
160
- this.setMembers(t);
172
+ a(() => {
173
+ this.members = t;
174
+ });
161
175
  } catch (t) {
162
176
  console.error(`Error occurred while loading members: ${t}`);
163
177
  }
164
178
  };
165
179
  mergeAccounts = async (t) => {
166
180
  try {
167
- const e = await this.api.mergeAccounts(t), s = e[Object.keys(e)[0]];
181
+ const e = await this.api.mergeAccounts(t), n = e[Object.keys(e)[0]];
168
182
  a(() => {
169
- const n = this.accounts.findIndex((o) => o.guid === t[1]);
170
- this.accounts.splice(n, 1);
183
+ const s = this.accounts.findIndex((o) => o.guid === t[1]);
184
+ this.accounts.splice(s, 1);
171
185
  const r = this.accounts.findIndex((o) => o.guid === t[0]);
172
- this.accounts.splice(r, 1, s);
186
+ this.accounts.splice(r, 1, n);
173
187
  });
174
188
  } catch (e) {
175
189
  console.error(`Error occurred while merging accounts: ${e}`);
176
190
  }
177
191
  };
192
+ sortAccounts = (t = this.accounts) => t.sort((e, n) => e.account_type > n.account_type ? 1 : e.account_type < n.account_type ? -1 : (e.name || "") > (n.name || "") ? 1 : (e.name || "") < (n.name || "") ? -1 : 0);
178
193
  refreshAccounts = async () => {
179
- this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions(), this.loadMembers()]), this.uiStore.setIsLoading(!1);
194
+ this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions()]), this.uiStore.setIsLoading(!1);
180
195
  };
181
196
  refreshMembers = async () => {
182
197
  try {
@@ -187,37 +202,48 @@ class E {
187
202
  };
188
203
  removeAccount = async (t) => {
189
204
  try {
190
- await this.api.deleteAccount(t);
191
- const e = this.accounts.findIndex((s) => s.guid === t);
192
- this.accounts.splice(e, 1);
205
+ await this.api.deleteAccount(t), a(() => {
206
+ const e = this.accounts.findIndex((n) => n.guid === t);
207
+ this.accounts.splice(e, 1);
208
+ });
193
209
  } catch (e) {
194
210
  console.error(`Error occurred while removing an account: ${e}`);
195
211
  }
196
212
  };
197
213
  updateAccount = async (t) => {
198
214
  try {
199
- const e = await this.api.updateAccount(t), s = this.accounts.findIndex(
200
- (n) => n.guid === e.guid
201
- );
202
- this.accounts.splice(s, 1, e);
215
+ const e = await this.api.updateAccount(t);
216
+ a(() => {
217
+ const n = this.accounts.findIndex(
218
+ (s) => s.guid === e.guid
219
+ );
220
+ this.accounts.splice(n, 1, e), this.accounts = this.augmentAccounts(this.accounts);
221
+ });
203
222
  } catch (e) {
204
223
  console.error(`Error occurred while updating account: ${e}`);
205
224
  }
206
225
  };
207
226
  updateAccountBalance = (t, e) => {
208
- const s = this.accounts.find((n) => n.guid === t);
209
- s && a(() => {
210
- s.balance = (s.balance || 0) + e;
227
+ const n = this.accounts.find((s) => s.guid === t);
228
+ n && a(() => {
229
+ n.balance = (n.balance || 0) + e;
211
230
  });
212
231
  };
213
232
  updateAccountFiltering = async (t, e) => {
214
- for (const s of t) {
215
- const n = this.accounts.find((r) => r.guid === s);
216
- n && (n.is_excluded_from_accounts = e, await this.updateAccount(n));
233
+ for (const n of t) {
234
+ const s = this.accounts.find((r) => r.guid === n);
235
+ if (s) {
236
+ s.is_excluded_from_accounts = e, s.is_excluded_from_budgets = e, s.is_excluded_from_cash_flow = e, s.is_excluded_from_debts = e, s.is_excluded_from_goals = e, s.is_excluded_from_investments = e, s.is_excluded_from_net_worth = e, s.is_excluded_from_spending = e, s.is_excluded_from_transactions = e, s.is_excluded_from_trends = e;
237
+ try {
238
+ this.updateAccount(s);
239
+ } catch (r) {
240
+ console.error(`Failed to update account ${n} (added):`, r);
241
+ }
242
+ }
217
243
  }
218
244
  };
219
245
  }
220
246
  export {
221
- d as A,
222
- E as a
247
+ _ as A,
248
+ T as a
223
249
  };
@@ -0,0 +1,9 @@
1
+ import { A as _ } from "./ConnectDrawer-CbxHKlRv.mjs";
2
+ const s = (t) => t && (t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CHECKING_LINE_OF_CREDIT), p = (t) => t.is_manual || !t.guid, E = (t) => t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.CHECKING_LINE_OF_CREDIT, a = (t) => t.account_type === _.SAVINGS || t.account_type === _.CHECKING || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE, y = (t) => t.account_type === _.LOAN || t.account_type === _.MORTGAGE;
3
+ export {
4
+ s as a,
5
+ E as b,
6
+ y as c,
7
+ p as i,
8
+ a as u
9
+ };
@@ -1,4 +1,4 @@
1
- import { F as c, A as s } from "./Fetch-87LIQbEA.mjs";
1
+ import { F as c, A as s } from "./Fetch-DecPFeGU.mjs";
2
2
  class i {
3
3
  fetchInstance;
4
4
  constructor(t, e, n) {
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as c, runInAction as r } from "mobx";
2
- import { B as l } from "./BeatApi-DhJpgCLz.mjs";
2
+ import { B as l } from "./BeatApi-De2IaqH2.mjs";
3
3
  function d(t, e, s, i = "asc") {
4
4
  const a = i === "desc" ? -1 : 1;
5
5
  return [...t, ...e].sort((_, n) => _[s] < n[s] ? -1 * a : _[s] > n[s] ? 1 * a : 0);
@@ -1,4 +1,4 @@
1
- import { i as _ } from "./hooks-D6XlXHf4.mjs";
1
+ import { i as _ } from "./hooks-Cy8JnjCg.mjs";
2
2
  import { b as d } from "./Category-CevNQ03n.mjs";
3
3
  import { b as f } from "./Localization-2MODESHW.mjs";
4
4
  import { f as l } from "./NumberFormatting-Buh7u8Oi.mjs";