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

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 (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-KpPw1phO.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,129 +1,129 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import s from "react";
3
- import { observer as g } from "mobx-react-lite";
4
- import B from "@mui/material/Stack";
5
- import { Text as V } from "@mxenabled/mxui";
6
- import { S as U } from "../SkeletonLoader-BaNboJjD.mjs";
7
- import N from "@mui/material/Box";
1
+ import { jsx as e, jsxs as r, Fragment as J } from "react/jsx-runtime";
2
+ import h from "react";
3
+ import { observer as v } from "mobx-react-lite";
4
+ import E from "@mui/material/Box";
8
5
  import y from "@mui/material/Divider";
9
- import E from "@mui/material/List";
6
+ import F from "@mui/material/List";
10
7
  import O from "@mui/material/ListSubheader";
11
- import x from "@mui/system/Stack";
8
+ import Z from "@mui/system/Stack";
9
+ import { Text as g } from "@mxenabled/mxui";
12
10
  import { useTheme as Q } from "@mui/material/styles";
13
- import { u as P, A as X } from "../AccountDetailsHeader-DRjFuyJT.mjs";
14
- import { L as e1 } from "../LineChart-C1PxNf7P.mjs";
15
- import { g as t1, a as l1, b as n1 } from "../SpendingData-DPQ96k3x.mjs";
16
- import { m as i1, u as v, b as S, d as F, g as G, a as o1, n as C1 } from "../hooks-C41HAxM5.mjs";
17
- import { A as W, l as j, m as d1 } from "../ConnectDrawer-DVp54lUH.mjs";
18
- import { F as C3, f as d3 } from "../ConnectDrawer-DVp54lUH.mjs";
19
- import { I as Y, P as $, S as K } from "../Account-B4CDD-zq.mjs";
20
- import { a as c1 } from "../AccountFields-Cl4KHoSj.mjs";
21
- import { g as s3, b as a3 } from "../AccountFields-Cl4KHoSj.mjs";
22
- import { A as T } from "../AccountListItem-wgmlex-_.mjs";
23
- import { A as s1 } from "../AccountDetailsContent-adZTkM52.mjs";
24
- import { u as u3 } from "../AccountDetailsContent-adZTkM52.mjs";
25
- import { D as a1 } from "../Drawer-BF40nbsH.mjs";
26
- import { f as I } from "../NumberFormatting-DjTD0t3W.mjs";
27
- import { A as b, W as r1 } from "../WidgetContainer-CDh9fjpR.mjs";
28
- import { C as u1 } from "../ConnectionsDrawer-Dsc04-4Z.mjs";
29
- import { L as D } from "../Loader-Ckqi9Rx6.mjs";
30
- import { u as z } from "../useScreenSize-B5afALev.mjs";
11
+ import { u as U, A as X } from "../AccountDetailsHeader-BkG3MNYo.mjs";
12
+ import { L as e1 } from "../LineChart-KpPw1phO.mjs";
13
+ import { g as t1, a as n1, b as l1 } from "../SpendingData-DQ1b9uqq.mjs";
14
+ import { m as i1, u as M, b as S, d as W, g as P, a as o1 } from "../hooks-ZMp65DFz.mjs";
15
+ import { A as I, l as G, m as C1 } from "../ConnectDrawer-BkvlItWx.mjs";
16
+ import { F as C3, M as d3 } from "../ConnectDrawer-BkvlItWx.mjs";
17
+ import { I as $, P as j, S as Y } from "../Account-CvR2-dSR.mjs";
18
+ import { a as d1 } from "../AccountFields-zCMqet85.mjs";
19
+ import { g as s3, b as a3 } from "../AccountFields-zCMqet85.mjs";
20
+ import { A as N } from "../AccountListItem-DHrz8Mml.mjs";
21
+ import { A as c1 } from "../AccountDetailsContent-CitErkuS.mjs";
22
+ import { u as L3 } from "../AccountDetailsContent-CitErkuS.mjs";
23
+ import { f as D } from "../NumberFormatting-DjTD0t3W.mjs";
24
+ import { D as s1 } from "../Drawer-By9V-B5L.mjs";
25
+ import { A as x, W as a1 } from "../WidgetContainer-CoFDmQRE.mjs";
26
+ import { C as r1 } from "../ConnectionsDrawer-VmuVFHbL.mjs";
27
+ import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
28
+ import { u as B } from "../useWidgetLoadTimer-hIOioiKx.mjs";
29
+ import { L as w } from "../Loader-DUaFpDGv.mjs";
31
30
  import L1 from "@mui/material/ListItem";
32
- import { M as q } from "../MiniWidgetContainer-CKzf_Ira.mjs";
33
- import { A as h3, a as H3 } from "../AccountStore-HbVblv86.mjs";
31
+ import { M as z } from "../MiniWidgetContainer-Bg02sF1Y.mjs";
32
+ import u1 from "@mui/material/Stack";
33
+ import { A as h3, a as H3 } from "../AccountStore-LgfBcYMe.mjs";
34
34
  const h1 = (o, C) => {
35
- const n = Y.includes(C) ? t1(o) : [], l = $.includes(C) ? l1(o) : [], u = K.includes(C) ? n1(o) : [];
36
- return [n, l, u].filter((i) => i.length > 0);
37
- }, H1 = (o, C, n) => {
38
- const [l, u] = o, i = l, L = u ?? l, d = [];
39
- if (i && L && Y.includes(C)) {
40
- const h = i[i.length - 1].y;
41
- d.push({ label: n.income_label, amount: h });
42
- } else if ($.includes(C)) {
43
- const h = i[i.length - 1].y;
44
- d.push({ label: n.payments_label, amount: h });
35
+ const l = $.includes(C) ? t1(o) : [], t = j.includes(C) ? n1(o) : [], L = Y.includes(C) ? l1(o) : [];
36
+ return [l, t, L].filter((i) => i.length > 0);
37
+ }, H1 = (o, C, l) => {
38
+ const [t, L] = o, i = t, d = L ?? t, s = [];
39
+ if (i && d && $.includes(C)) {
40
+ const c = i[i.length - 1].y;
41
+ s.push({ label: l.income_label, amount: c });
42
+ } else if (j.includes(C)) {
43
+ const c = i[i.length - 1].y;
44
+ s.push({ label: l.payments_label, amount: c });
45
45
  }
46
- if (L && K.includes(C)) {
47
- const h = L[L.length - 1].y;
48
- d.push({ label: n.spending_label, amount: h });
46
+ if (d && Y.includes(C)) {
47
+ const c = d[d.length - 1].y;
48
+ s.push({ label: l.spending_label, amount: c });
49
49
  }
50
- return d;
50
+ return s;
51
51
  }, p1 = () => {
52
- const o = Q(), { selectedAccount: C } = P(), { monthlyCategoryTotals: n } = i1(), { trends: l } = v(), u = [o.palette.chart?.chart1, o.palette.chart?.chart2], i = h1(n, C.account_type), L = H1(i, C.account_type, l), d = [W.LOAN, W.MORTGAGE].includes(C.account_type);
52
+ const o = Q(), { selectedAccount: C } = U(), { monthlyCategoryTotals: l } = i1(), { trends: t } = M(), L = [o.palette.chart?.chart1, o.palette.chart?.chart2], i = h1(l, C.account_type), d = H1(i, C.account_type, t), s = [I.LOAN, I.MORTGAGE].includes(C.account_type);
53
53
  return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
54
54
  e1,
55
55
  {
56
- colors: u,
56
+ colors: L,
57
57
  datasets: i,
58
58
  height: 185,
59
- labels: L,
60
- showAverage: d,
61
- showBars: d,
59
+ labels: d,
60
+ showAverage: s,
61
+ showBars: s,
62
62
  showLegend: !0,
63
63
  valueFormatterString: "0,0"
64
64
  }
65
65
  ) });
66
- }, f1 = g(p1), m1 = () => {
67
- const [o, C] = s.useState(""), { accounts: n } = v(), { selectedAccounts: l } = S(), { setSelectedAccount: u, setSelectedMember: i } = P(), { members: L } = F(), { onEvent: d } = G(), h = [...new Set(l.map((t) => t.account_type))], p = l.find((t) => o === t.guid), H = s.useMemo(
68
- () => l.filter((t) => t.is_hidden),
69
- [l]
70
- ), f = s.useMemo(
71
- () => l.filter((t) => t.is_closed),
72
- [l]
73
- ), M = H.reduce(
74
- (t, a) => (a.available_balance || a.balance || 0) + t,
66
+ }, m1 = v(p1), f1 = () => {
67
+ const [o, C] = h.useState(""), { accounts: l } = M(), { selectedAccounts: t } = S(), { setSelectedAccount: L, setSelectedMember: i } = U(), { members: d } = W(), { onEvent: s } = P(), c = [...new Set(t.map((n) => n.account_type))], H = t.find((n) => o === n.guid), p = h.useMemo(
68
+ () => t.filter((n) => n.is_hidden),
69
+ [t]
70
+ ), m = h.useMemo(
71
+ () => t.filter((n) => n.is_closed),
72
+ [t]
73
+ ), R = p.reduce(
74
+ (n, a) => (a.available_balance || a.balance || 0) + n,
75
75
  0
76
- ), R = c1(f, n);
77
- s.useEffect(() => {
78
- if (p) {
79
- u(p);
80
- const t = L.find((a) => a.guid === p?.member_guid) || {};
81
- t && i(t);
76
+ ), b = d1(m, l);
77
+ h.useEffect(() => {
78
+ if (H) {
79
+ L(H);
80
+ const n = d.find((a) => a.guid === H?.member_guid) || {};
81
+ n && i(n);
82
82
  }
83
- }, [p, o]);
84
- const _ = (t) => {
85
- C(t.guid), d(b.ACCOUNTS_CLICK_ACCOUNT, {
86
- account_guid: t.guid,
87
- account_type: t.account_type
83
+ }, [H, o]);
84
+ const _ = (n) => {
85
+ C(n.guid), s(x.ACCOUNTS_CLICK_ACCOUNT, {
86
+ account_guid: n.guid,
87
+ account_type: n.account_type
88
88
  });
89
- }, w = (t) => {
90
- const a = t === "hidden" ? H : f, A = t === "hidden" ? M : R, c = t === "hidden" ? n.account_hidden : n.account_closed;
91
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
92
- E,
89
+ }, V = (n) => {
90
+ const a = n === "hidden" ? p : m, k = n === "hidden" ? R : b, u = n === "hidden" ? l.account_hidden : l.account_closed;
91
+ return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
92
+ F,
93
93
  {
94
- "aria-label": c,
94
+ "aria-label": u,
95
95
  subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ r(
96
- x,
96
+ Z,
97
97
  {
98
98
  component: "span",
99
99
  direction: "row",
100
100
  sx: { justifyContent: "space-between", color: "grey.700" },
101
101
  children: [
102
- /* @__PURE__ */ e(V, { bold: !0, variant: "body1", children: c }),
103
- /* @__PURE__ */ e(V, { bold: !0, variant: "body1", children: I(A, "0,0.00") })
102
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: u }),
103
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: D(k, "0,0.00") })
104
104
  ]
105
105
  }
106
106
  ) }),
107
- children: /* @__PURE__ */ e(x, { children: a.map((m, Z, J) => {
108
- const k = Z === J.length - 1;
109
- return /* @__PURE__ */ r(s.Fragment, { children: [
107
+ children: /* @__PURE__ */ e(Z, { children: a.map((f, A, q) => {
108
+ const T = A === q.length - 1;
109
+ return /* @__PURE__ */ r(h.Fragment, { children: [
110
110
  /* @__PURE__ */ e(
111
- T,
111
+ N,
112
112
  {
113
- account: m,
114
- onRowClick: () => _(m),
113
+ account: f,
114
+ onRowClick: () => _(f),
115
115
  shouldShowConnectionStatus: !0
116
116
  }
117
117
  ),
118
- t === "hidden" ? /* @__PURE__ */ e(
118
+ n === "hidden" ? /* @__PURE__ */ e(
119
119
  y,
120
120
  {
121
121
  sx: {
122
- mb: k ? 24 : 4,
123
- ml: k ? 24 : 68
122
+ mb: T ? 24 : 4,
123
+ ml: T ? 24 : 68
124
124
  }
125
125
  }
126
- ) : !k && /* @__PURE__ */ e(
126
+ ) : !T && /* @__PURE__ */ e(
127
127
  y,
128
128
  {
129
129
  sx: {
@@ -132,170 +132,170 @@ const h1 = (o, C) => {
132
132
  }
133
133
  }
134
134
  )
135
- ] }, m.guid);
135
+ ] }, f.guid);
136
136
  }) })
137
137
  }
138
138
  ) });
139
139
  };
140
- return /* @__PURE__ */ r(N, { sx: { pt: 24 }, children: [
141
- h.map((t) => {
142
- const a = l.filter(
143
- (c) => c.account_type === t && !c.is_closed && !c.is_hidden
144
- ), A = a.reduce(
145
- (c, m) => (m.balance || 0) + c,
140
+ return /* @__PURE__ */ r(E, { sx: { pt: 24 }, children: [
141
+ c.map((n) => {
142
+ const a = t.filter(
143
+ (u) => u.account_type === n && !u.is_closed && !u.is_hidden
144
+ ), k = a.reduce(
145
+ (u, f) => (f.balance || 0) + u,
146
146
  0
147
147
  );
148
148
  return a.length === 0 ? null : /* @__PURE__ */ e(
149
- E,
149
+ F,
150
150
  {
151
- "aria-label": n.account_type_accounts[a[0]?.account_type],
151
+ "aria-label": l.account_type_accounts[a[0]?.account_type],
152
152
  subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ r(
153
- x,
153
+ Z,
154
154
  {
155
155
  component: "span",
156
156
  direction: "row",
157
157
  sx: { display: "flex", justifyContent: "space-between" },
158
158
  children: [
159
- /* @__PURE__ */ e(V, { bold: !0, variant: "body1", children: n.account_types[t] }),
160
- /* @__PURE__ */ e(V, { bold: !0, variant: "body1", children: I(A, "0,0.00") })
159
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: l.account_types[n] }),
160
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: D(k, "0,0.00") })
161
161
  ]
162
162
  }
163
163
  ) }),
164
- children: /* @__PURE__ */ e(x, { children: a.map((c) => {
165
- const m = l.indexOf(c) === l.length - 1, Z = a.indexOf(c) === a.length - 1;
166
- return /* @__PURE__ */ r(s.Fragment, { children: [
164
+ children: /* @__PURE__ */ e(Z, { children: a.map((u) => {
165
+ const f = t.indexOf(u) === t.length - 1, A = a.indexOf(u) === a.length - 1;
166
+ return /* @__PURE__ */ r(h.Fragment, { children: [
167
167
  /* @__PURE__ */ e(
168
- T,
168
+ N,
169
169
  {
170
- account: c,
171
- onRowClick: () => _(c),
170
+ account: u,
171
+ onRowClick: () => _(u),
172
172
  shouldShowConnectionStatus: !0
173
173
  }
174
174
  ),
175
- (!m || f.length > 0 || H.length > 0) && /* @__PURE__ */ e(
175
+ (!f || m.length > 0 || p.length > 0) && /* @__PURE__ */ e(
176
176
  y,
177
177
  {
178
178
  sx: {
179
- mb: Z ? 24 : 4,
180
- ml: Z ? 24 : 68
179
+ mb: A ? 24 : 4,
180
+ ml: A ? 24 : 68
181
181
  }
182
182
  }
183
183
  )
184
- ] }, c.guid);
184
+ ] }, u.guid);
185
185
  }) })
186
186
  },
187
- t
187
+ n
188
188
  );
189
189
  }),
190
- H.length > 0 && w("hidden"),
191
- f.length > 0 && w("closed"),
190
+ p.length > 0 && V("hidden"),
191
+ m.length > 0 && V("closed"),
192
192
  /* @__PURE__ */ r(
193
- a1,
193
+ s1,
194
194
  {
195
- ariaLabelClose: n.close_account_details_aria,
195
+ ariaLabelClose: l.close_account_details_aria,
196
196
  isOpen: !!o,
197
197
  onClose: () => C(""),
198
- title: n.account_details,
198
+ title: l.account_details,
199
199
  children: [
200
- /* @__PURE__ */ e(X, { ChartComponent: f1 }),
201
- /* @__PURE__ */ e(s1, {})
200
+ /* @__PURE__ */ e(X, { ChartComponent: m1 }),
201
+ /* @__PURE__ */ e(c1, {})
202
202
  ]
203
203
  }
204
204
  )
205
205
  ] });
206
- }, V1 = g(m1), g1 = ({ onBackClick: o, sx: C = {} }) => {
207
- const [n, l] = s.useState(!1), [u, i] = s.useState(!1), { config: L } = o1(), { detailedAccounts: d, isAccountDataLoaded: h, loadAccountData: p } = F(), { accounts: H, connect: f } = v(), { isInitialized: M, selectedAccountGuids: R, setSelectedAccounts: _ } = S(), { isDesktop: w } = z(), { onEvent: t } = G(), { onLoad: a } = C1();
208
- s.useEffect(() => {
209
- h || p().finally();
210
- }, []), s.useEffect(() => {
211
- _(d);
212
- }, [d]), s.useEffect(() => {
213
- h && a?.("AccountsWidget");
214
- }, [h]);
215
- const A = () => {
216
- l(!0), t(b.ACCOUNTS_CLICK_CONNECT);
217
- }, c = () => {
218
- i(!0), t(b.ACCOUNTS_CLICK_CONNECT);
206
+ }, V1 = v(f1), g1 = ({ onBackClick: o, sx: C = {} }) => {
207
+ const [l, t] = h.useState(!1), [L, i] = h.useState(!1), { config: d } = o1(), { accounts: s } = W(), { accounts: c, connect: H } = M(), { isCopyLoaded: p, isInitialized: m, setSelectedAccounts: R, selectedAccountGuids: b } = S(), { isDesktop: _ } = K(), { onEvent: V } = P();
208
+ B({
209
+ widgetName: "AccountsWidget",
210
+ isLoaded: m && p
211
+ }), h.useEffect(() => {
212
+ R(s);
213
+ }, [s]);
214
+ const n = () => {
215
+ t(!0), V(x.ACCOUNTS_CLICK_CONNECT);
216
+ }, a = () => {
217
+ i(!0), V(x.ACCOUNTS_CLICK_CONNECT);
219
218
  };
220
- return M ? /* @__PURE__ */ r(
221
- r1,
219
+ return p ? /* @__PURE__ */ e(
220
+ a1,
222
221
  {
223
- accountOptions: d,
224
- actions: L.show_connections_widget_in_master ? [
225
- { iconName: "add", label: H.add, onClick: A },
222
+ accountOptions: s,
223
+ actions: d.show_connections_widget_in_master ? [
224
+ { iconName: "add", label: c.add, onClick: n },
226
225
  {
227
226
  iconName: "credit_card_gear",
228
- label: H.manage,
229
- onClick: c
227
+ label: c.manage,
228
+ onClick: a
230
229
  }
231
230
  ] : [],
232
- onAccountsFilterClick: () => t(b.ACCOUNTS_CLICK_FILTER),
231
+ onAccountsFilterClick: () => V(x.ACCOUNTS_CLICK_FILTER),
233
232
  onBackClick: o,
234
233
  sx: C,
235
- title: H.title,
236
- children: [
237
- h ? /* @__PURE__ */ r(B, { sx: { px: w ? 24 : 12 }, children: [
238
- R.length < 1 && /* @__PURE__ */ e(V, { display: "flex", justifyContent: "center", my: 24, children: H.no_accounts }),
234
+ title: c.title,
235
+ children: m ? /* @__PURE__ */ r(J, { children: [
236
+ /* @__PURE__ */ r(E, { sx: { px: _ ? 24 : 12 }, children: [
237
+ b.length < 1 && /* @__PURE__ */ e(g, { display: "flex", justifyContent: "center", my: 24, children: c.no_accounts }),
239
238
  /* @__PURE__ */ e(V1, {})
240
- ] }) : /* @__PURE__ */ e(U, { sx: { px: w ? 48 : 24, pt: 24 }, variant: "list" }),
239
+ ] }),
241
240
  /* @__PURE__ */ e(
242
- j,
241
+ G,
243
242
  {
244
- onClose: () => l(!1),
245
- showConnectWidget: n,
246
- title: f.mini_title
243
+ onClose: () => t(!1),
244
+ showConnectWidget: l,
245
+ title: H.mini_title
247
246
  }
248
247
  ),
249
248
  /* @__PURE__ */ e(
250
- u1,
249
+ r1,
251
250
  {
252
251
  onClose: () => i(!1),
253
- showConnectionsWidget: u,
254
- title: H.manage_connections
252
+ showConnectionsWidget: L,
253
+ title: c.manage_connections
255
254
  }
256
255
  )
257
- ]
256
+ ] }) : /* @__PURE__ */ e(w, {})
258
257
  }
259
- ) : /* @__PURE__ */ e(D, {});
260
- }, t3 = g(g1), v1 = ({ onPrimaryCtaClick: o, sx: C }) => {
261
- const { visibleAccounts: n, isAccountDataLoaded: l, loadAccountData: u } = F(), { accounts: i } = v(), { isInitialized: L, selectedAccounts: d, setSelectedAccounts: h } = S(), { isDesktop: p } = z();
262
- s.useEffect(() => {
263
- l || u().finally();
264
- }, []), s.useEffect(() => {
265
- h(n);
266
- }, [n]);
267
- const H = s.useMemo(
268
- () => d1(d, p ? 5 : 3),
269
- [d, p]
258
+ ) : /* @__PURE__ */ e(w, {});
259
+ }, t3 = v(g1), v1 = ({ onPrimaryCtaClick: o, sx: C }) => {
260
+ const { visibleAccounts: l } = W(), { accounts: t } = M(), { isCopyLoaded: L, isInitialized: i, selectedAccounts: d, setSelectedAccounts: s } = S(), { isDesktop: c } = K();
261
+ B({
262
+ widgetName: "AccountsMiniWidget",
263
+ isLoaded: i
264
+ }), h.useEffect(() => {
265
+ s(l);
266
+ }, [l]);
267
+ const H = h.useMemo(
268
+ () => C1(d, c ? 5 : 3),
269
+ [d, c]
270
270
  );
271
271
  return L ? /* @__PURE__ */ e(
272
- q,
272
+ z,
273
273
  {
274
274
  className: "mx-exp-accounts-miniwidget",
275
275
  onPrimaryCtaClick: o,
276
- primaryCtaLabel: i.primary_cta,
276
+ primaryCtaLabel: t.primary_cta,
277
277
  sx: C,
278
- title: i.mini_title,
279
- children: l ? /* @__PURE__ */ r(E, { children: [
280
- d.length === 0 && /* @__PURE__ */ e(L1, { sx: { justifyContent: "center" }, children: i.no_accounts }),
281
- H.map((f, M) => {
282
- const R = H.indexOf(f) === H.length - 1;
283
- return /* @__PURE__ */ r(s.Fragment, { children: [
278
+ title: t.mini_title,
279
+ children: i ? /* @__PURE__ */ r(F, { children: [
280
+ d.length === 0 && /* @__PURE__ */ e(L1, { sx: { justifyContent: "center" }, children: t.no_accounts }),
281
+ H.map((p, m) => {
282
+ const R = H.indexOf(p) === H.length - 1;
283
+ return /* @__PURE__ */ r(h.Fragment, { children: [
284
284
  /* @__PURE__ */ e(
285
- T,
285
+ N,
286
286
  {
287
- account: f,
287
+ account: p,
288
288
  listItemProps: { sx: { px: 24 } },
289
289
  shouldShowConnectionStatus: !0
290
290
  }
291
291
  ),
292
292
  !R && /* @__PURE__ */ e(y, { "aria-hidden": "true", variant: "inset" })
293
- ] }, `account-item${M}`);
293
+ ] }, `account-item${m}`);
294
294
  })
295
- ] }) : /* @__PURE__ */ e(U, { sx: { px: 12, py: 8 }, variant: "list" })
295
+ ] }) : /* @__PURE__ */ e(w, {})
296
296
  }
297
- ) : /* @__PURE__ */ e(D, {});
298
- }, l3 = g(v1), M1 = () => /* @__PURE__ */ r(
297
+ ) : /* @__PURE__ */ e(w, {});
298
+ }, n3 = v(v1), M1 = () => /* @__PURE__ */ r(
299
299
  "svg",
300
300
  {
301
301
  fill: "none",
@@ -735,64 +735,67 @@ const h1 = (o, C) => {
735
735
  ]
736
736
  }
737
737
  ), R1 = () => {
738
- const { connect: o } = v();
739
- return /* @__PURE__ */ r(B, { alignItems: "center", direction: "column", m: 24, children: [
738
+ const { connect: o } = M();
739
+ return /* @__PURE__ */ r(u1, { alignItems: "center", direction: "column", m: 24, children: [
740
740
  /* @__PURE__ */ e(M1, {}),
741
741
  /* @__PURE__ */ e(
742
- V,
742
+ g,
743
743
  {
744
744
  sx: {
745
745
  whiteSpace: "wrap",
746
746
  mt: 16,
747
747
  textAlign: "center"
748
748
  },
749
- variant: "subtitle1",
749
+ variant: "Paragraph",
750
750
  children: o.mini_widget_content
751
751
  }
752
752
  )
753
753
  ] });
754
- }, w1 = g(R1), A1 = ({
754
+ }, w1 = v(R1), _1 = ({
755
755
  onPrimaryCtaClick: o = () => {
756
756
  },
757
757
  sx: C
758
758
  }) => {
759
- const { isCopyLoaded: n } = S(), { connect: l } = v(), [u, i] = s.useState(!1), L = () => {
759
+ const { isCopyLoaded: l } = S(), { connect: t } = M(), [L, i] = h.useState(!1), d = () => {
760
760
  i(!0), o();
761
761
  };
762
- return n ? /* @__PURE__ */ r(
763
- q,
762
+ return B({
763
+ widgetName: "ConnectMiniWidget",
764
+ isLoaded: l
765
+ }), l ? /* @__PURE__ */ r(
766
+ z,
764
767
  {
765
768
  className: "mx-exp-connect-miniwidget",
766
- onPrimaryCtaClick: L,
767
- primaryCtaLabel: l.primary_cta,
769
+ onPrimaryCtaClick: d,
770
+ primaryCtaLabel: t.primary_cta,
768
771
  sx: C,
769
- title: l.mini_title,
772
+ title: t.mini_title,
770
773
  children: [
771
774
  /* @__PURE__ */ e(w1, {}),
772
- u && /* @__PURE__ */ e(
773
- j,
775
+ L && /* @__PURE__ */ e(
776
+ G,
774
777
  {
775
778
  onClose: () => i(!1),
776
- showConnectWidget: u,
777
- title: l.mini_title
779
+ showConnectWidget: L,
780
+ title: t.mini_title
778
781
  }
779
782
  )
780
783
  ]
781
784
  }
782
- ) : /* @__PURE__ */ e(D, {});
783
- }, n3 = g(A1);
785
+ ) : /* @__PURE__ */ e(w, {});
786
+ }, l3 = v(_1);
784
787
  export {
785
788
  h3 as AccountApi,
786
- s1 as AccountDetailsContent,
789
+ c1 as AccountDetailsContent,
787
790
  X as AccountDetailsHeader,
788
791
  H3 as AccountStore,
789
- l3 as AccountsMiniWidget,
792
+ n3 as AccountsMiniWidget,
790
793
  t3 as AccountsWidget,
791
- n3 as ConnectMiniWidget,
794
+ l3 as ConnectMiniWidget,
792
795
  C3 as FieldType,
793
796
  d3 as MemberConnectionStatus,
794
797
  s3 as getAccountBalanceDetails,
795
798
  a3 as getAccountDetailFields,
796
- P as useAccountUiStore,
797
- u3 as useGetMergeableAccounts
799
+ U as useAccountUiStore,
800
+ L3 as useGetMergeableAccounts
798
801
  };
@@ -1,47 +1,44 @@
1
- import { Account, DetailedAccount, Institution, Member, GlobalStore } from '../../common';
1
+ import { Account, GlobalStore, Institution, Member } from '../../common';
2
2
  import { AccountApi } from '../api/AccountApi';
3
3
  import { UiStore } from './UiStore';
4
4
  export declare class AccountStore {
5
5
  globalStore: GlobalStore;
6
6
  api: AccountApi;
7
7
  accounts: Account[];
8
- accountsLoaded: boolean;
9
8
  institutions: Institution[];
10
- institutionsLoaded: boolean;
11
9
  members: Member[];
12
- membersLoaded: boolean;
13
10
  uiStore: UiStore;
14
11
  constructor(globalStore: GlobalStore);
15
- loadAccountData: () => Promise<void>;
16
- get isAccountDataLoaded(): boolean;
17
- get detailedAccounts(): DetailedAccount[];
18
- get cashAccounts(): DetailedAccount[];
12
+ loadAccountData: ({ accounts, institutions, }?: {
13
+ accounts?: Account[];
14
+ institutions?: Institution[];
15
+ }) => Promise<void>;
16
+ get cashAccounts(): Account[];
19
17
  get cashBalance(): number;
20
- get checkingAccounts(): DetailedAccount[];
21
- get debtAccounts(): DetailedAccount[];
22
- get finstrongAccounts(): DetailedAccount[];
23
- get investmentAccounts(): DetailedAccount[];
24
- get savingsAccounts(): DetailedAccount[];
18
+ get checkingAccounts(): Account[];
19
+ get debtAccounts(): Account[];
20
+ get finstrongAccounts(): Account[];
21
+ get investmentAccounts(): Account[];
22
+ get savingsAccounts(): Account[];
25
23
  get retirementAccounts(): Account[];
26
- get visibleAccounts(): DetailedAccount[];
27
- get visibleCashAccounts(): DetailedAccount[];
24
+ get visibleAccounts(): Account[];
25
+ get visibleCashAccounts(): Account[];
28
26
  get visibleCashBalance(): number;
29
- get visibleCheckingAccounts(): DetailedAccount[];
30
- get visibleDebtAccounts(): DetailedAccount[];
31
- get visibleFinstrongAccounts(): DetailedAccount[];
27
+ get visibleCheckingAccounts(): Account[];
28
+ get visibleDebtAccounts(): Account[];
29
+ get visibleFinstrongAccounts(): Account[];
32
30
  get visibleRetirementAccounts(): Account[];
33
- get visibleInvestmentAccounts(): DetailedAccount[];
34
- get visibleSavingsAccounts(): DetailedAccount[];
31
+ get visibleInvestmentAccounts(): Account[];
32
+ get visibleSavingsAccounts(): Account[];
35
33
  get savingsAndCheckingAccountsBalance(): number;
36
34
  get savingsAndCheckingAccounts(): Account[];
37
- setAccounts: (accounts: Account[]) => void;
38
- setMembers: (members: Member[]) => void;
39
- setInstitutions: (institutions: Institution[]) => void;
40
35
  addAccount: (account: Account) => Promise<void>;
41
- loadAccounts: () => Promise<void>;
42
- loadInstitutions: () => Promise<void>;
36
+ augmentAccounts: (accounts?: Account[]) => Account[];
37
+ loadAccounts: (accountsOverride?: Account[]) => Promise<void>;
38
+ loadInstitutions: (institutionsOverride?: Institution[]) => Promise<void>;
43
39
  loadMembers: () => Promise<void>;
44
40
  mergeAccounts: (accountGuids: string[]) => Promise<void>;
41
+ sortAccounts: (accounts?: Account[]) => Account[];
45
42
  refreshAccounts: () => Promise<void>;
46
43
  refreshMembers: () => Promise<void>;
47
44
  removeAccount: (accountGuid: string) => Promise<void>;
@@ -1,7 +1,6 @@
1
- import { Account, DetailedAccount, Institution, Member } from '../../common';
1
+ import { Account } from '../../common/types';
2
2
  export declare const isAccountLiability: (account: Account) => boolean;
3
3
  export declare const isManual: (account: Account) => boolean;
4
4
  export declare const usesCreditLimitField: (account: Account) => boolean;
5
5
  export declare const usesInterestRateField: (account: Account) => boolean;
6
6
  export declare const usesOriginalBalanceField: (account: Account) => boolean;
7
- export declare const augmentAccounts: (accounts: Account[], institutions: Institution[], members: Member[], shouldExcludeExternalAccounts: boolean) => DetailedAccount[];