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

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 (104) hide show
  1. package/CHANGELOG.md +71 -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-DZ10CbWd.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-C1oyQCZK.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-7bVS7KXf.mjs → exportTransactionsToCSV-B8qpk5MU.mjs} +14 -13
  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 +282 -281
  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 +4 -4
  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/useAriaLive-B3_pRUio.mjs +0 -35
@@ -13,7 +13,7 @@ import { ChevronLeft as le } from "@mxenabled/mx-icons";
13
13
  import { Icon as T, Text as X, DateRangePicker as J, H1 as Ce, H3 as de } from "@mxenabled/mxui";
14
14
  import { u as Te } from "./useDimensions-27p2evRx.mjs";
15
15
  import { L as Ie } from "./Loader-DUaFpDGv.mjs";
16
- import { g as Ee, b as Re, u as ge, a as Ae, W as Se } from "./hooks-D6XlXHf4.mjs";
16
+ import { g as Ee, b as Re, u as ge, a as Ae, W as Se } from "./hooks-Cy8JnjCg.mjs";
17
17
  import { u as ie } from "./useScreenSize-B6JyS_Lj.mjs";
18
18
  import { addMonths as Q } from "date-fns/addMonths";
19
19
  import { addDays as ue } from "date-fns/addDays";
@@ -37,7 +37,7 @@ import Ke from "@mui/material/ToggleButtonGroup";
37
37
  import Ge from "@mui/material/styles/useTheme";
38
38
  import { f as K, D as G, a as Me } from "./Dialog-CWW597AF.mjs";
39
39
  import { D as We } from "./Drawer-kEE73B87.mjs";
40
- import { k as ye, l as xe } from "./ConnectDrawer-BQNs-hjk.mjs";
40
+ import { k as ye, l as xe } from "./ConnectDrawer-CbxHKlRv.mjs";
41
41
  const ve = {
42
42
  ACCOUNTS_CLICK_ACCOUNT: "accounts_widget_click_account",
43
43
  ACCOUNTS_CLICK_CONNECT: "accounts_widget_click_connect_accounts",
@@ -1,4 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { MiniWidgetProps } from '../../../../common';
3
- declare const _default: React.FunctionComponent<MiniWidgetProps>;
3
+ interface AccountDetailsChartProps extends MiniWidgetProps {
4
+ ChartComponent?: React.ComponentType;
5
+ }
6
+ declare const _default: React.FunctionComponent<AccountDetailsChartProps>;
4
7
  export default _default;
@@ -1,7 +1,8 @@
1
1
  interface AccountDetailsHeaderProps {
2
+ ChartComponent?: React.ComponentType;
2
3
  customDetailsChart?: React.ReactElement;
3
4
  }
4
- declare const _default: (({ customDetailsChart }: AccountDetailsHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
5
+ declare const _default: (({ customDetailsChart, ChartComponent, }: AccountDetailsHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
5
6
  displayName: string;
6
7
  };
7
8
  export default _default;
@@ -1,93 +1,129 @@
1
- import { jsxs as n, jsx as e, Fragment as G } from "react/jsx-runtime";
2
- import d from "react";
3
- import { observer as M } from "mobx-react-lite";
4
- import B from "@mui/material/Box";
5
- import A from "@mui/material/Divider";
6
- import E from "@mui/material/List";
1
+ import { jsx as e, jsxs as r, Fragment as q } 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";
5
+ import x from "@mui/material/Divider";
6
+ import F from "@mui/material/List";
7
7
  import O from "@mui/material/ListSubheader";
8
- import _ from "@mui/system/Stack";
9
- import { Text as v } from "@mxenabled/mxui";
10
- import { A as K } from "../AccountDetailsContent-CAM9y39M.mjs";
11
- import { u as D1 } from "../AccountDetailsContent-CAM9y39M.mjs";
12
- import { u as z, A as P } from "../AccountDetailsHeader-JtSX6Uf9.mjs";
13
- import { A as W } from "../AccountListItem-JFMZROh7.mjs";
14
- import { a as Y } from "../AccountFields-C9FlatNb.mjs";
15
- import { g as U1, b as $1 } from "../AccountFields-C9FlatNb.mjs";
16
- import { u as w, b as S, d as T, g as D, a as q } from "../hooks-D6XlXHf4.mjs";
8
+ import y from "@mui/system/Stack";
9
+ import { Text as g } from "@mxenabled/mxui";
10
+ import { useTheme as J } from "@mui/material/styles";
11
+ import { u as D, A as Q } from "../AccountDetailsHeader-jAFWoHj7.mjs";
12
+ import { L as X } from "../LineChart-eK4IQImU.mjs";
13
+ import { g as e1, a as t1, b as n1 } from "../SpendingData-D5vsfYKo.mjs";
14
+ import { m as l1, u as M, b, d as N, g as U, a as i1, n as o1 } from "../hooks-Cy8JnjCg.mjs";
15
+ import { A as W, l as P, m as C1 } from "../ConnectDrawer-CbxHKlRv.mjs";
16
+ import { F as o3, M as C3 } from "../ConnectDrawer-CbxHKlRv.mjs";
17
+ import { I as G, P as $, S as j } from "../Account-YwUMFz93.mjs";
18
+ import { a as d1 } from "../AccountFields-DPxMPBF0.mjs";
19
+ import { g as c3, b as s3 } from "../AccountFields-DPxMPBF0.mjs";
20
+ import { A as B } from "../AccountListItem-D6rWAreC.mjs";
21
+ import { A as c1 } from "../AccountDetailsContent-BgCST7mK.mjs";
22
+ import { u as r3 } from "../AccountDetailsContent-BgCST7mK.mjs";
17
23
  import { f as I } from "../NumberFormatting-Buh7u8Oi.mjs";
18
- import { D as J } from "../Drawer-kEE73B87.mjs";
19
- import { A as y, W as Q } from "../WidgetContainer-BHWANqT4.mjs";
20
- import { C as X } from "../ConnectionsDrawer-ByGQE7D5.mjs";
21
- import { u as N } from "../useScreenSize-B6JyS_Lj.mjs";
22
- import { L as g } from "../Loader-DUaFpDGv.mjs";
23
- import { l as U, m as e1 } from "../ConnectDrawer-BQNs-hjk.mjs";
24
- import { F as G1, f as K1 } from "../ConnectDrawer-BQNs-hjk.mjs";
25
- import t1 from "@mui/material/ListItem";
26
- import { M as $ } from "../MiniWidgetContainer-D0gfmbaF.mjs";
27
- import l1 from "@mui/material/Stack";
28
- import { A as P1, a as Y1 } from "../AccountStore-BgNOyMdp.mjs";
29
- const i1 = () => {
30
- const [c, H] = d.useState(""), { accounts: C } = w(), { selectedAccounts: l } = S(), { setSelectedAccount: h, setSelectedMember: r } = z(), { members: L } = T(), { onEvent: f } = D(), s = [...new Set(l.map((t) => t.account_type))], a = l.find((t) => c === t.guid), u = d.useMemo(
31
- () => l.filter((t) => t.is_hidden),
32
- [l]
33
- ), p = d.useMemo(
34
- () => l.filter((t) => t.is_closed),
35
- [l]
36
- ), R = u.reduce(
37
- (t, i) => (i.available_balance || i.balance || 0) + t,
24
+ import { D as s1 } from "../Drawer-kEE73B87.mjs";
25
+ import { A as S, W as a1 } from "../WidgetContainer-BnTgAfQn.mjs";
26
+ import { C as r1 } from "../ConnectionsDrawer-C6kanU7I.mjs";
27
+ import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
28
+ import { L as _ } from "../Loader-DUaFpDGv.mjs";
29
+ import L1 from "@mui/material/ListItem";
30
+ import { M as K } from "../MiniWidgetContainer-BdgBvpga.mjs";
31
+ import u1 from "@mui/material/Stack";
32
+ import { A as u3, a as h3 } from "../AccountStore-B5E98oM1.mjs";
33
+ const h1 = (i, o) => {
34
+ const l = G.includes(o) ? e1(i) : [], t = $.includes(o) ? t1(i) : [], L = j.includes(o) ? n1(i) : [];
35
+ return [l, t, L].filter((C) => C.length > 0);
36
+ }, H1 = (i, o, l) => {
37
+ const [t, L] = i, C = t, d = L ?? t, s = [];
38
+ if (C && d && G.includes(o)) {
39
+ const c = C[C.length - 1].y;
40
+ s.push({ label: l.income_label, amount: c });
41
+ } else if ($.includes(o)) {
42
+ const c = C[C.length - 1].y;
43
+ s.push({ label: l.payments_label, amount: c });
44
+ }
45
+ if (d && j.includes(o)) {
46
+ const c = d[d.length - 1].y;
47
+ s.push({ label: l.spending_label, amount: c });
48
+ }
49
+ return s;
50
+ }, p1 = () => {
51
+ const i = J(), { selectedAccount: o } = D(), { monthlyCategoryTotals: l } = l1(), { trends: t } = M(), L = [i.palette.chart?.chart1, i.palette.chart?.chart2], C = h1(l, o.account_type), d = H1(C, o.account_type, t), s = [W.LOAN, W.MORTGAGE].includes(o.account_type);
52
+ return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
53
+ X,
54
+ {
55
+ colors: L,
56
+ datasets: C,
57
+ height: 185,
58
+ labels: d,
59
+ showAverage: s,
60
+ showBars: s,
61
+ showLegend: !0,
62
+ valueFormatterString: "0,0"
63
+ }
64
+ ) });
65
+ }, f1 = v(p1), m1 = () => {
66
+ const [i, o] = h.useState(""), { accounts: l } = M(), { selectedAccounts: t } = b(), { setSelectedAccount: L, setSelectedMember: C } = D(), { members: d } = N(), { onEvent: s } = U(), c = [...new Set(t.map((n) => n.account_type))], p = t.find((n) => i === n.guid), H = h.useMemo(
67
+ () => t.filter((n) => n.is_hidden),
68
+ [t]
69
+ ), f = h.useMemo(
70
+ () => t.filter((n) => n.is_closed),
71
+ [t]
72
+ ), R = H.reduce(
73
+ (n, a) => (a.available_balance || a.balance || 0) + n,
38
74
  0
39
- ), b = Y(p, C);
40
- d.useEffect(() => {
41
- if (a) {
42
- h(a);
43
- const t = L.find((i) => i.guid === a?.member_guid) || {};
44
- t && r(t);
75
+ ), k = d1(f, l);
76
+ h.useEffect(() => {
77
+ if (p) {
78
+ L(p);
79
+ const n = d.find((a) => a.guid === p?.member_guid) || {};
80
+ n && C(n);
45
81
  }
46
- }, [a, c]);
47
- const Z = (t) => {
48
- H(t.guid), f(y.ACCOUNTS_CLICK_ACCOUNT, {
49
- account_guid: t.guid,
50
- account_type: t.account_type
82
+ }, [p, i]);
83
+ const Z = (n) => {
84
+ o(n.guid), s(S.ACCOUNTS_CLICK_ACCOUNT, {
85
+ account_guid: n.guid,
86
+ account_type: n.account_type
51
87
  });
52
- }, m = (t) => {
53
- const i = t === "hidden" ? u : p, k = t === "hidden" ? R : b, o = t === "hidden" ? C.account_hidden : C.account_closed;
54
- return /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
55
- E,
88
+ }, V = (n) => {
89
+ const a = n === "hidden" ? H : f, w = n === "hidden" ? R : k, u = n === "hidden" ? l.account_hidden : l.account_closed;
90
+ return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
91
+ F,
56
92
  {
57
- "aria-label": o,
58
- subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ n(
59
- _,
93
+ "aria-label": u,
94
+ subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ r(
95
+ y,
60
96
  {
61
97
  component: "span",
62
98
  direction: "row",
63
99
  sx: { justifyContent: "space-between", color: "grey.700" },
64
100
  children: [
65
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: o }),
66
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(k, "0,0.00") })
101
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: u }),
102
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: I(w, "0,0.00") })
67
103
  ]
68
104
  }
69
105
  ) }),
70
- children: /* @__PURE__ */ e(_, { children: i.map((V, x, j) => {
71
- const F = x === j.length - 1;
72
- return /* @__PURE__ */ n(d.Fragment, { children: [
106
+ children: /* @__PURE__ */ e(y, { children: a.map((m, A, z) => {
107
+ const T = A === z.length - 1;
108
+ return /* @__PURE__ */ r(h.Fragment, { children: [
73
109
  /* @__PURE__ */ e(
74
- W,
110
+ B,
75
111
  {
76
- account: V,
77
- onRowClick: () => Z(V),
112
+ account: m,
113
+ onRowClick: () => Z(m),
78
114
  shouldShowConnectionStatus: !0
79
115
  }
80
116
  ),
81
- t === "hidden" ? /* @__PURE__ */ e(
82
- A,
117
+ n === "hidden" ? /* @__PURE__ */ e(
118
+ x,
83
119
  {
84
120
  sx: {
85
- mb: F ? 24 : 4,
86
- ml: F ? 24 : 68
121
+ mb: T ? 24 : 4,
122
+ ml: T ? 24 : 68
87
123
  }
88
124
  }
89
- ) : !F && /* @__PURE__ */ e(
90
- A,
125
+ ) : !T && /* @__PURE__ */ e(
126
+ x,
91
127
  {
92
128
  sx: {
93
129
  mb: 4,
@@ -95,164 +131,166 @@ const i1 = () => {
95
131
  }
96
132
  }
97
133
  )
98
- ] }, V.guid);
134
+ ] }, m.guid);
99
135
  }) })
100
136
  }
101
137
  ) });
102
138
  };
103
- return /* @__PURE__ */ n(B, { sx: { pt: 24 }, children: [
104
- s.map((t) => {
105
- const i = l.filter(
106
- (o) => o.account_type === t && !o.is_closed && !o.is_hidden
107
- ), k = i.reduce(
108
- (o, V) => (V.balance || 0) + o,
139
+ return /* @__PURE__ */ r(E, { sx: { pt: 24 }, children: [
140
+ c.map((n) => {
141
+ const a = t.filter(
142
+ (u) => u.account_type === n && !u.is_closed && !u.is_hidden
143
+ ), w = a.reduce(
144
+ (u, m) => (m.balance || 0) + u,
109
145
  0
110
146
  );
111
- return i.length === 0 ? null : /* @__PURE__ */ e(
112
- E,
147
+ return a.length === 0 ? null : /* @__PURE__ */ e(
148
+ F,
113
149
  {
114
- "aria-label": C.account_type_accounts[i[0]?.account_type],
115
- subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ n(
116
- _,
150
+ "aria-label": l.account_type_accounts[a[0]?.account_type],
151
+ subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ r(
152
+ y,
117
153
  {
118
154
  component: "span",
119
155
  direction: "row",
120
156
  sx: { display: "flex", justifyContent: "space-between" },
121
157
  children: [
122
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: C.account_types[t] }),
123
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(k, "0,0.00") })
158
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: l.account_types[n] }),
159
+ /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: I(w, "0,0.00") })
124
160
  ]
125
161
  }
126
162
  ) }),
127
- children: /* @__PURE__ */ e(_, { children: i.map((o) => {
128
- const V = l.indexOf(o) === l.length - 1, x = i.indexOf(o) === i.length - 1;
129
- return /* @__PURE__ */ n(d.Fragment, { children: [
163
+ children: /* @__PURE__ */ e(y, { children: a.map((u) => {
164
+ const m = t.indexOf(u) === t.length - 1, A = a.indexOf(u) === a.length - 1;
165
+ return /* @__PURE__ */ r(h.Fragment, { children: [
130
166
  /* @__PURE__ */ e(
131
- W,
167
+ B,
132
168
  {
133
- account: o,
134
- onRowClick: () => Z(o),
169
+ account: u,
170
+ onRowClick: () => Z(u),
135
171
  shouldShowConnectionStatus: !0
136
172
  }
137
173
  ),
138
- (!V || p.length > 0 || u.length > 0) && /* @__PURE__ */ e(
139
- A,
174
+ (!m || f.length > 0 || H.length > 0) && /* @__PURE__ */ e(
175
+ x,
140
176
  {
141
177
  sx: {
142
- mb: x ? 24 : 4,
143
- ml: x ? 24 : 68
178
+ mb: A ? 24 : 4,
179
+ ml: A ? 24 : 68
144
180
  }
145
181
  }
146
182
  )
147
- ] }, o.guid);
183
+ ] }, u.guid);
148
184
  }) })
149
185
  },
150
- t
186
+ n
151
187
  );
152
188
  }),
153
- u.length > 0 && m("hidden"),
154
- p.length > 0 && m("closed"),
155
- /* @__PURE__ */ n(
156
- J,
189
+ H.length > 0 && V("hidden"),
190
+ f.length > 0 && V("closed"),
191
+ /* @__PURE__ */ r(
192
+ s1,
157
193
  {
158
- ariaLabelClose: C.close_account_details_aria,
159
- isOpen: !!c,
160
- onClose: () => H(""),
161
- title: C.account_details,
194
+ ariaLabelClose: l.close_account_details_aria,
195
+ isOpen: !!i,
196
+ onClose: () => o(""),
197
+ title: l.account_details,
162
198
  children: [
163
- /* @__PURE__ */ e(P, {}),
164
- /* @__PURE__ */ e(K, {})
199
+ /* @__PURE__ */ e(Q, { ChartComponent: f1 }),
200
+ /* @__PURE__ */ e(c1, {})
165
201
  ]
166
202
  }
167
203
  )
168
204
  ] });
169
- }, n1 = M(i1), C1 = ({ onBackClick: c, sx: H = {} }) => {
170
- const [C, l] = d.useState(!1), [h, r] = d.useState(!1), { config: L } = q(), { accounts: f } = T(), { accounts: s, connect: a } = w(), { isCopyLoaded: u, isInitialized: p, setSelectedAccounts: R, selectedAccountGuids: b } = S(), { isDesktop: Z } = N(), { onEvent: m } = D();
171
- d.useEffect(() => {
172
- R(f);
173
- }, [f]);
174
- const t = () => {
175
- l(!0), m(y.ACCOUNTS_CLICK_CONNECT);
176
- }, i = () => {
177
- r(!0), m(y.ACCOUNTS_CLICK_CONNECT);
205
+ }, V1 = v(m1), g1 = ({ onBackClick: i, sx: o = {} }) => {
206
+ const [l, t] = h.useState(!1), [L, C] = h.useState(!1), { config: d } = i1(), { accounts: s } = N(), { accounts: c, connect: p } = M(), { isCopyLoaded: H, isInitialized: f, setSelectedAccounts: R, selectedAccountGuids: k } = b(), { isDesktop: Z } = Y(), { onEvent: V } = U(), { onLoad: n } = o1();
207
+ h.useEffect(() => {
208
+ R(s);
209
+ }, [s]), h.useEffect(() => {
210
+ f && H && n?.("AccountsWidget");
211
+ }, [f, H]);
212
+ const a = () => {
213
+ t(!0), V(S.ACCOUNTS_CLICK_CONNECT);
214
+ }, w = () => {
215
+ C(!0), V(S.ACCOUNTS_CLICK_CONNECT);
178
216
  };
179
- return u ? /* @__PURE__ */ e(
180
- Q,
217
+ return H ? /* @__PURE__ */ e(
218
+ a1,
181
219
  {
182
- accountOptions: f,
183
- actions: L.show_connections_widget_in_master ? [
184
- { iconName: "add", label: s.add, onClick: t },
220
+ accountOptions: s,
221
+ actions: d.show_connections_widget_in_master ? [
222
+ { iconName: "add", label: c.add, onClick: a },
185
223
  {
186
224
  iconName: "credit_card_gear",
187
- label: s.manage,
188
- onClick: i
225
+ label: c.manage,
226
+ onClick: w
189
227
  }
190
228
  ] : [],
191
- onAccountsFilterClick: () => m(y.ACCOUNTS_CLICK_FILTER),
192
- onBackClick: c,
193
- sx: H,
194
- title: s.title,
195
- children: p ? /* @__PURE__ */ n(G, { children: [
196
- /* @__PURE__ */ n(B, { sx: { px: Z ? 24 : 12 }, children: [
197
- b.length < 1 && /* @__PURE__ */ e(v, { display: "flex", justifyContent: "center", my: 24, children: s.no_accounts }),
198
- /* @__PURE__ */ e(n1, {})
229
+ onAccountsFilterClick: () => V(S.ACCOUNTS_CLICK_FILTER),
230
+ onBackClick: i,
231
+ sx: o,
232
+ title: c.title,
233
+ children: f ? /* @__PURE__ */ r(q, { children: [
234
+ /* @__PURE__ */ r(E, { sx: { px: Z ? 24 : 12 }, children: [
235
+ k.length < 1 && /* @__PURE__ */ e(g, { display: "flex", justifyContent: "center", my: 24, children: c.no_accounts }),
236
+ /* @__PURE__ */ e(V1, {})
199
237
  ] }),
200
238
  /* @__PURE__ */ e(
201
- U,
239
+ P,
202
240
  {
203
- onClose: () => l(!1),
204
- showConnectWidget: C,
205
- title: a.mini_title
241
+ onClose: () => t(!1),
242
+ showConnectWidget: l,
243
+ title: p.mini_title
206
244
  }
207
245
  ),
208
246
  /* @__PURE__ */ e(
209
- X,
247
+ r1,
210
248
  {
211
- onClose: () => r(!1),
212
- showConnectionsWidget: h,
213
- title: s.manage_connections
249
+ onClose: () => C(!1),
250
+ showConnectionsWidget: L,
251
+ title: c.manage_connections
214
252
  }
215
253
  )
216
- ] }) : /* @__PURE__ */ e(g, {})
254
+ ] }) : /* @__PURE__ */ e(_, {})
217
255
  }
218
- ) : /* @__PURE__ */ e(g, {});
219
- }, E1 = M(C1), o1 = ({ onPrimaryCtaClick: c, sx: H }) => {
220
- const { visibleAccounts: C } = T(), { accounts: l } = w(), { isCopyLoaded: h, isInitialized: r, selectedAccounts: L, setSelectedAccounts: f } = S(), { isDesktop: s } = N();
221
- d.useEffect(() => {
222
- f(C);
223
- }, [C]);
224
- const a = d.useMemo(
225
- () => e1(L, s ? 5 : 3),
226
- [L, s]
256
+ ) : /* @__PURE__ */ e(_, {});
257
+ }, e3 = v(g1), v1 = ({ onPrimaryCtaClick: i, sx: o }) => {
258
+ const { visibleAccounts: l } = N(), { accounts: t } = M(), { isCopyLoaded: L, isInitialized: C, selectedAccounts: d, setSelectedAccounts: s } = b(), { isDesktop: c } = Y();
259
+ h.useEffect(() => {
260
+ s(l);
261
+ }, [l]);
262
+ const p = h.useMemo(
263
+ () => C1(d, c ? 5 : 3),
264
+ [d, c]
227
265
  );
228
- return h ? /* @__PURE__ */ e(
229
- $,
266
+ return L ? /* @__PURE__ */ e(
267
+ K,
230
268
  {
231
269
  className: "mx-exp-accounts-miniwidget",
232
- onPrimaryCtaClick: c,
233
- primaryCtaLabel: l.primary_cta,
234
- sx: H,
235
- title: l.mini_title,
236
- children: r ? /* @__PURE__ */ n(E, { children: [
237
- L.length === 0 && /* @__PURE__ */ e(t1, { sx: { justifyContent: "center" }, children: l.no_accounts }),
238
- a.map((u, p) => {
239
- const R = a.indexOf(u) === a.length - 1;
240
- return /* @__PURE__ */ n(d.Fragment, { children: [
270
+ onPrimaryCtaClick: i,
271
+ primaryCtaLabel: t.primary_cta,
272
+ sx: o,
273
+ title: t.mini_title,
274
+ children: C ? /* @__PURE__ */ r(F, { children: [
275
+ d.length === 0 && /* @__PURE__ */ e(L1, { sx: { justifyContent: "center" }, children: t.no_accounts }),
276
+ p.map((H, f) => {
277
+ const R = p.indexOf(H) === p.length - 1;
278
+ return /* @__PURE__ */ r(h.Fragment, { children: [
241
279
  /* @__PURE__ */ e(
242
- W,
280
+ B,
243
281
  {
244
- account: u,
282
+ account: H,
245
283
  listItemProps: { sx: { px: 24 } },
246
284
  shouldShowConnectionStatus: !0
247
285
  }
248
286
  ),
249
- !R && /* @__PURE__ */ e(A, { "aria-hidden": "true", variant: "inset" })
250
- ] }, `account-item${p}`);
287
+ !R && /* @__PURE__ */ e(x, { "aria-hidden": "true", variant: "inset" })
288
+ ] }, `account-item${f}`);
251
289
  })
252
- ] }) : /* @__PURE__ */ e(g, {})
290
+ ] }) : /* @__PURE__ */ e(_, {})
253
291
  }
254
- ) : /* @__PURE__ */ e(g, {});
255
- }, W1 = M(o1), d1 = () => /* @__PURE__ */ n(
292
+ ) : /* @__PURE__ */ e(_, {});
293
+ }, t3 = v(v1), M1 = () => /* @__PURE__ */ r(
256
294
  "svg",
257
295
  {
258
296
  fill: "none",
@@ -260,7 +298,7 @@ const i1 = () => {
260
298
  viewBox: "0 0 272 66",
261
299
  xmlns: "http://www.w3.org/2000/svg",
262
300
  children: [
263
- /* @__PURE__ */ n("g", { opacity: "0.35", children: [
301
+ /* @__PURE__ */ r("g", { opacity: "0.35", children: [
264
302
  /* @__PURE__ */ e("rect", { fill: "#CD1141", height: "40.3437", rx: "2.81371", width: "39.6876", x: "19.6553" }),
265
303
  /* @__PURE__ */ e(
266
304
  "path",
@@ -546,7 +584,7 @@ const i1 = () => {
546
584
  children: /* @__PURE__ */ e("rect", { fill: "white", height: "47.5848", rx: "3.31025", width: "46.8064", x: "113.168", y: "18.1035" })
547
585
  }
548
586
  ),
549
- /* @__PURE__ */ n("g", { mask: "url(#mask1_6197_80303)", children: [
587
+ /* @__PURE__ */ r("g", { mask: "url(#mask1_6197_80303)", children: [
550
588
  /* @__PURE__ */ e(
551
589
  "mask",
552
590
  {
@@ -691,12 +729,12 @@ const i1 = () => {
691
729
  )
692
730
  ]
693
731
  }
694
- ), c1 = () => {
695
- const { connect: c } = w();
696
- return /* @__PURE__ */ n(l1, { alignItems: "center", direction: "column", m: 24, children: [
697
- /* @__PURE__ */ e(d1, {}),
732
+ ), R1 = () => {
733
+ const { connect: i } = M();
734
+ return /* @__PURE__ */ r(u1, { alignItems: "center", direction: "column", m: 24, children: [
735
+ /* @__PURE__ */ e(M1, {}),
698
736
  /* @__PURE__ */ e(
699
- v,
737
+ g,
700
738
  {
701
739
  sx: {
702
740
  whiteSpace: "wrap",
@@ -704,52 +742,52 @@ const i1 = () => {
704
742
  textAlign: "center"
705
743
  },
706
744
  variant: "Paragraph",
707
- children: c.mini_widget_content
745
+ children: i.mini_widget_content
708
746
  }
709
747
  )
710
748
  ] });
711
- }, s1 = M(c1), a1 = ({
712
- onPrimaryCtaClick: c = () => {
749
+ }, w1 = v(R1), _1 = ({
750
+ onPrimaryCtaClick: i = () => {
713
751
  },
714
- sx: H
752
+ sx: o
715
753
  }) => {
716
- const { isCopyLoaded: C } = S(), { connect: l } = w(), [h, r] = d.useState(!1), L = () => {
717
- r(!0), c();
754
+ const { isCopyLoaded: l } = b(), { connect: t } = M(), [L, C] = h.useState(!1), d = () => {
755
+ C(!0), i();
718
756
  };
719
- return C ? /* @__PURE__ */ n(
720
- $,
757
+ return l ? /* @__PURE__ */ r(
758
+ K,
721
759
  {
722
760
  className: "mx-exp-connect-miniwidget",
723
- onPrimaryCtaClick: L,
724
- primaryCtaLabel: l.primary_cta,
725
- sx: H,
726
- title: l.mini_title,
761
+ onPrimaryCtaClick: d,
762
+ primaryCtaLabel: t.primary_cta,
763
+ sx: o,
764
+ title: t.mini_title,
727
765
  children: [
728
- /* @__PURE__ */ e(s1, {}),
729
- h && /* @__PURE__ */ e(
730
- U,
766
+ /* @__PURE__ */ e(w1, {}),
767
+ L && /* @__PURE__ */ e(
768
+ P,
731
769
  {
732
- onClose: () => r(!1),
733
- showConnectWidget: h,
734
- title: l.mini_title
770
+ onClose: () => C(!1),
771
+ showConnectWidget: L,
772
+ title: t.mini_title
735
773
  }
736
774
  )
737
775
  ]
738
776
  }
739
- ) : /* @__PURE__ */ e(g, {});
740
- }, T1 = M(a1);
777
+ ) : /* @__PURE__ */ e(_, {});
778
+ }, n3 = v(_1);
741
779
  export {
742
- P1 as AccountApi,
743
- K as AccountDetailsContent,
744
- P as AccountDetailsHeader,
745
- Y1 as AccountStore,
746
- W1 as AccountsMiniWidget,
747
- E1 as AccountsWidget,
748
- T1 as ConnectMiniWidget,
749
- G1 as FieldType,
750
- K1 as MemberConnectionStatus,
751
- U1 as getAccountBalanceDetails,
752
- $1 as getAccountDetailFields,
753
- z as useAccountUiStore,
754
- D1 as useGetMergeableAccounts
780
+ u3 as AccountApi,
781
+ c1 as AccountDetailsContent,
782
+ Q as AccountDetailsHeader,
783
+ h3 as AccountStore,
784
+ t3 as AccountsMiniWidget,
785
+ e3 as AccountsWidget,
786
+ n3 as ConnectMiniWidget,
787
+ o3 as FieldType,
788
+ C3 as MemberConnectionStatus,
789
+ c3 as getAccountBalanceDetails,
790
+ s3 as getAccountDetailFields,
791
+ D as useAccountUiStore,
792
+ r3 as useGetMergeableAccounts
755
793
  };