@mx-cartographer/experiences 9.4.25 → 9.4.27

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 (57) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/accounts/components/AccountListItem.es.js +6 -6
  3. package/dist/accounts/components/AccountsListCompact.es.js +6 -6
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js +8 -8
  5. package/dist/budgets/components/addbudget/RecalculateBudgetRow.es.js +5 -5
  6. package/dist/budgets/components/addbudget/UnbudgetedRow.es.js +6 -6
  7. package/dist/categories/components/CategoryRow.es.js +8 -8
  8. package/dist/common/components/DataRow.es.js +9 -9
  9. package/dist/common/components/GlobalAccountFilter.es.js +115 -90
  10. package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
  11. package/dist/common/components/ListItemRow.es.js +1 -1
  12. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +2 -1
  13. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js +114 -99
  14. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js.map +1 -1
  15. package/dist/common/components/globalaccountfilter/TriStateCheckbox.d.ts +17 -0
  16. package/dist/common/components/globalaccountfilter/TriStateCheckbox.es.js +18 -0
  17. package/dist/common/components/globalaccountfilter/TriStateCheckbox.es.js.map +1 -0
  18. package/dist/common/components/globalaccountfilter/selection.d.ts +17 -0
  19. package/dist/common/components/globalaccountfilter/selection.es.js +10 -0
  20. package/dist/common/components/globalaccountfilter/selection.es.js.map +1 -0
  21. package/dist/common/components/listitems/CollapseExpandListItem.es.js +4 -4
  22. package/dist/common/components/listitems/ToggleButtonListItem.es.js +8 -8
  23. package/dist/core/types/localization/AccountFilterCopy.d.ts +2 -2
  24. package/dist/finstrong/components/ProfileList.es.js +7 -7
  25. package/dist/finstrong/components/shared/Accounts.es.js +4 -4
  26. package/dist/goals/components/AccountSelectionDrawer.es.js +6 -6
  27. package/dist/goals/components/actions/AccountAction.es.js +4 -4
  28. package/dist/goals/components/actions/ChangeAccountAction.es.js +1 -1
  29. package/dist/goals/components/addgoal/AddGoalListItem.es.js +2 -2
  30. package/dist/goals/components/managegoals/CompleteListItem.es.js +6 -6
  31. package/dist/goals/components/managegoals/OngoingListItem.es.js +8 -8
  32. package/dist/help/components/requestsupport/PopularTopicsRow.es.js +8 -8
  33. package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.es.js +6 -6
  34. package/dist/insights/components/shared/MenuAction.es.js +4 -4
  35. package/dist/insights-v2/components/OverflowMenu.es.js +4 -4
  36. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -1
  37. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  38. package/dist/merchants/components/MerchantLookup.es.js +6 -6
  39. package/dist/networth/components/AssetsLiabilitiesDetail.es.js +1 -1
  40. package/dist/recurringtransactions/components/RecurrenceRow.es.js +6 -6
  41. package/dist/recurringtransactions/components/RecurringTransactionList.es.js +4 -4
  42. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.es.js +6 -6
  43. package/dist/settings/components/transactionrules/components/RuleListItem.es.js +4 -4
  44. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.es.js +5 -5
  45. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.es.js +9 -9
  46. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.es.js +9 -9
  47. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +9 -9
  48. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.es.js +9 -9
  49. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.es.js +9 -9
  50. package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.es.js +9 -9
  51. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.es.js +11 -11
  52. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.es.js +9 -9
  53. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.es.js +9 -9
  54. package/dist/transactions/components/shared/transactionlist/TransactionRow.es.js +4 -4
  55. package/dist/transactions/components/tagmanager/TagRow.es.js +4 -4
  56. package/dist/trends/components/CategoryDetails.es.js +4 -4
  57. package/package.json +1 -1
@@ -1,117 +1,132 @@
1
- import { useAccountStore as A, useGlobalCopyStore as G, useGlobalUiStore as L } from "../../context/hooks.es.js";
2
- import _ from "react";
3
- import { observer as F } from "mobx-react-lite";
4
- import M from "@mui/material/Stack";
5
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
6
- import P from "@mui/material/Divider";
7
- import h from "@mui/material/Checkbox";
8
- import p from "@mui/material/FormControlLabel";
9
- import g from "@mui/material/List";
10
- import m from "@mui/material/ListItem";
11
- import W from "@mui/material/ListItemButton";
12
- import j from "@mui/material/ListItemText";
13
- var J = F(({ allowedAccountTypes: i }) => {
14
- const { accountFilterMap: c, updateAccountFilterMap: a } = L(), { accounts: b, common: y } = G(), { account_filter: v } = y, { accountsByTypeMap: s } = A(), x = _.useMemo(() => Array.from(s.keys()).reduce((t, o) => {
15
- if (!i || i && i.includes(o)) {
16
- const r = s.get(o);
17
- r && t.push(...r);
18
- }
19
- return t;
20
- }, []), [s, i]), d = new Map(Array.from(c.entries()).filter(([t]) => x.some((o) => o.guid === t))), u = Array.from(d.values()).every((t) => t), C = Array.from(d.values()).some((t) => t), k = () => {
21
- for (const t of d.keys()) a(t, !u);
22
- }, S = (t) => {
23
- const o = s.get(t);
1
+ import { buildDynamicCopy as L } from "../../../core/utils/Localization.es.js";
2
+ import { useAccountStore as W, useGlobalCopyStore as B, useGlobalUiStore as H } from "../../context/hooks.es.js";
3
+ import { buildSelectionFilter as S, getSelectionCounts as I } from "./selection.es.js";
4
+ import { TriStateCheckbox as x } from "./TriStateCheckbox.es.js";
5
+ import { observer as M } from "mobx-react-lite";
6
+ import j from "@mui/material/Stack";
7
+ import { jsx as t, jsxs as C } from "react/jsx-runtime";
8
+ import D from "@mui/material/Box";
9
+ import N from "@mui/material/Divider";
10
+ import U from "@mui/material/Checkbox";
11
+ import g from "@mui/material/FormControlLabel";
12
+ import k from "@mui/material/List";
13
+ import a from "@mui/material/ListItem";
14
+ var T = M(({ allowedAccountTypes: n, announce: _ }) => {
15
+ const { accountFilterMap: i, updateAccountFilterMap: d } = H(), { accounts: h, common: A } = B(), { account_filter: p } = A, { accountsByTypeMap: m, detailedAccounts: b } = W(), s = S(i, b, n), u = s.size > 0 && Array.from(s.values()).every((e) => e), F = Array.from(s.values()).some((e) => e), f = () => {
16
+ const { selected: e, total: o } = I(S(i, b, n));
17
+ _?.(L(p.selection_announcement, String(e), String(o)));
18
+ }, G = () => {
19
+ for (const e of s.keys()) d(e, !u);
20
+ f();
21
+ }, P = (e) => {
22
+ if (n && !n.includes(e)) return;
23
+ const o = m.get(e);
24
24
  if (!o) return;
25
- const r = o.some((n) => c.get(n.guid));
26
- for (const n of o) a(n.guid, !r);
25
+ const c = o.every((l) => i.get(l.guid));
26
+ for (const l of o) d(l.guid, !c);
27
+ f();
27
28
  };
28
- return /* @__PURE__ */ f(g, {
29
- dense: !0,
29
+ return /* @__PURE__ */ t(D, {
30
+ "aria-label": h.title,
30
31
  id: "filter_accounts",
32
+ role: "region",
31
33
  sx: {
32
34
  overflowY: "scroll",
33
35
  maxHeight: 350,
34
36
  minWidth: 280
35
37
  },
36
- children: [/* @__PURE__ */ e(m, {
37
- disableGutters: !0,
38
- disablePadding: !0,
39
- sx: { py: 16 },
40
- children: /* @__PURE__ */ e(p, {
41
- control: /* @__PURE__ */ e(h, {
42
- checked: u,
43
- indeterminate: !u && C,
44
- onChange: k,
45
- size: "small"
46
- }),
47
- label: v.select_all_accounts,
48
- slotProps: { typography: {
49
- variant: "body1",
50
- fontWeight: "normal"
51
- } },
52
- sx: {
53
- width: "100%",
54
- m: 0,
55
- px: 8,
56
- "&:hover": { bgcolor: "action.hover" }
57
- }
58
- })
59
- }), Array.from(s.keys()).map((t) => {
60
- const o = s.get(t), r = i ? !i.includes(t) : !1, n = b.account_type_accounts[t];
61
- return /* @__PURE__ */ e(m, {
38
+ tabIndex: 0,
39
+ children: /* @__PURE__ */ C(k, {
40
+ dense: !0,
41
+ children: [/* @__PURE__ */ t(a, {
62
42
  disableGutters: !0,
63
43
  disablePadding: !0,
64
- children: /* @__PURE__ */ f(M, {
44
+ sx: { py: 16 },
45
+ children: /* @__PURE__ */ t(g, {
46
+ control: /* @__PURE__ */ t(x, {
47
+ checked: u,
48
+ indeterminate: !u && F,
49
+ onChange: G,
50
+ size: "small"
51
+ }),
52
+ label: p.select_all_accounts,
53
+ slotProps: { typography: {
54
+ variant: "body1",
55
+ fontWeight: "normal"
56
+ } },
65
57
  sx: {
66
- pb: 8,
67
- width: "100%"
68
- },
69
- children: [/* @__PURE__ */ e(P, {}), /* @__PURE__ */ e(g, {
70
- dense: !0,
71
- subheader: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(W, {
72
- disableGutters: !0,
73
- disabled: r,
74
- onClick: () => S(t),
75
- sx: {
76
- pl: 16,
77
- minHeight: 40,
78
- justifyContent: "left"
79
- },
80
- children: /* @__PURE__ */ e(j, {
81
- primary: n,
82
- slotProps: { primary: {
83
- variant: "body1",
84
- fontWeight: "bold"
85
- } }
86
- })
87
- }) }),
88
- children: o?.map((l) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(p, {
89
- control: /* @__PURE__ */ e(h, {
90
- checked: !!c.get(l.guid),
91
- disabled: r,
92
- onChange: () => a(l.guid, !c.get(l.guid)),
93
- size: "small"
94
- }),
95
- label: l.displayName,
96
- slotProps: { typography: {
97
- variant: "body1",
98
- fontWeight: "normal"
99
- } },
100
- sx: {
101
- width: "100%",
102
- m: 0,
103
- minHeight: 40,
104
- "&:hover": { bgcolor: "action.hover" }
105
- }
106
- }) }, l.guid))
107
- })]
58
+ width: "100%",
59
+ m: 0,
60
+ "&:hover": { bgcolor: "action.hover" }
61
+ }
108
62
  })
109
- }, t);
110
- })]
63
+ }), Array.from(m.keys()).map((e) => {
64
+ const o = m.get(e), c = n ? !n.includes(e) : !1, l = h.account_type_accounts[e], y = `account-filter-group-${e}`, v = !!o?.length && o.every((r) => i.get(r.guid)), z = !!o?.some((r) => i.get(r.guid));
65
+ return /* @__PURE__ */ t(a, {
66
+ disableGutters: !0,
67
+ disablePadding: !0,
68
+ children: /* @__PURE__ */ C(j, {
69
+ "aria-labelledby": y,
70
+ role: "group",
71
+ sx: {
72
+ pb: 8,
73
+ width: "100%"
74
+ },
75
+ children: [/* @__PURE__ */ t(N, {}), /* @__PURE__ */ t(k, {
76
+ dense: !0,
77
+ subheader: /* @__PURE__ */ t(a, {
78
+ disableGutters: !0,
79
+ disablePadding: !0,
80
+ children: /* @__PURE__ */ t(g, {
81
+ control: /* @__PURE__ */ t(x, {
82
+ checked: v,
83
+ disabled: c,
84
+ indeterminate: !v && z,
85
+ onChange: () => P(e),
86
+ size: "small"
87
+ }),
88
+ label: l,
89
+ slotProps: { typography: {
90
+ id: y,
91
+ variant: "body1",
92
+ fontWeight: "bold"
93
+ } },
94
+ sx: {
95
+ width: "100%",
96
+ m: 0,
97
+ minHeight: 40,
98
+ "&:hover": { bgcolor: "action.hover" }
99
+ }
100
+ })
101
+ }),
102
+ children: o?.map((r) => /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(g, {
103
+ control: /* @__PURE__ */ t(U, {
104
+ checked: !!i.get(r.guid),
105
+ disabled: c,
106
+ onChange: () => d(r.guid, !i.get(r.guid)),
107
+ size: "small"
108
+ }),
109
+ label: r.displayName,
110
+ slotProps: { typography: {
111
+ variant: "body1",
112
+ fontWeight: "normal"
113
+ } },
114
+ sx: {
115
+ width: "100%",
116
+ m: 0,
117
+ minHeight: 40,
118
+ "&:hover": { bgcolor: "action.hover" }
119
+ }
120
+ }) }, r.guid))
121
+ })]
122
+ })
123
+ }, e);
124
+ })]
125
+ })
111
126
  });
112
127
  });
113
128
  export {
114
- J as GlobalAccountFilterList
129
+ T as GlobalAccountFilterList
115
130
  };
116
131
 
117
132
  //# sourceMappingURL=GlobalAccountFilterList.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalAccountFilterList.es.js","names":[],"sources":["../../../../src/common/components/globalaccountfilter/GlobalAccountFilterList.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport CheckBox from '@mui/material/Checkbox'\nimport Divider from '@mui/material/Divider'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\n\nimport { useAccountStore, useGlobalCopyStore, useGlobalUiStore } from '../../context'\nimport { AccountType, type DetailedAccount } from '../../../core'\n\nexport interface GlobalAccountFilterListProps {\n allowedAccountTypes: AccountType[] | undefined\n}\n\nexport const GlobalAccountFilterList = observer(\n ({ allowedAccountTypes }: GlobalAccountFilterListProps) => {\n const { accountFilterMap, updateAccountFilterMap } = useGlobalUiStore()\n const { accounts: accountsCopy, common: commonCopy } = useGlobalCopyStore()\n const { account_filter: copy } = commonCopy\n\n const { accountsByTypeMap } = useAccountStore()\n\n // Allowed accounts\n const allowedAccounts = React.useMemo(\n () =>\n Array.from(accountsByTypeMap.keys()).reduce((acc: DetailedAccount[], accountType) => {\n if (\n !allowedAccountTypes ||\n (allowedAccountTypes && allowedAccountTypes.includes(accountType))\n ) {\n const accounts = accountsByTypeMap.get(accountType)\n if (accounts) {\n acc.push(...accounts)\n }\n }\n return acc\n }, []),\n [accountsByTypeMap, allowedAccountTypes],\n )\n\n // Filters the selection to include only allowed accounts\n const selectionFilter = new Map<string, boolean>(\n Array.from(accountFilterMap.entries()).filter(([guid]) => {\n return allowedAccounts.some((account) => account.guid === guid)\n }),\n )\n\n const allSelected = Array.from(selectionFilter.values()).every((isSelected) => isSelected)\n const someSelected = Array.from(selectionFilter.values()).some((isSelected) => isSelected)\n\n const handleSelectAllClick = () => {\n for (const guid of selectionFilter.keys()) {\n updateAccountFilterMap(guid, !allSelected)\n }\n }\n\n const handleSelectAccountTypeClick = (accountType: AccountType) => {\n const accounts = accountsByTypeMap.get(accountType)\n if (!accounts) return\n\n const someAccountsSelected = accounts.some((account) => accountFilterMap.get(account.guid))\n for (const account of accounts) {\n updateAccountFilterMap(account.guid, !someAccountsSelected)\n }\n }\n\n return (\n <List\n dense={true}\n id=\"filter_accounts\"\n sx={{ overflowY: 'scroll', maxHeight: 350, minWidth: 280 }}\n >\n {/* Select All Checkbox */}\n <ListItem disableGutters={true} disablePadding={true} sx={{ py: 16 }}>\n <FormControlLabel\n control={\n <CheckBox\n checked={allSelected}\n indeterminate={!allSelected && someSelected}\n onChange={handleSelectAllClick}\n size=\"small\"\n />\n }\n label={copy.select_all_accounts}\n slotProps={{ typography: { variant: 'body1', fontWeight: 'normal' } }}\n sx={{ width: '100%', m: 0, px: 8, '&:hover': { bgcolor: 'action.hover' } }}\n />\n </ListItem>\n\n {Array.from(accountsByTypeMap.keys()).map((accountType) => {\n const accounts = accountsByTypeMap.get(accountType)\n const disabled = allowedAccountTypes ? !allowedAccountTypes.includes(accountType) : false\n const typeName = accountsCopy.account_type_accounts[accountType]\n\n return (\n // Account Type Header\n <ListItem disableGutters={true} disablePadding={true} key={accountType}>\n <Stack sx={{ pb: 8, width: '100%' }}>\n <Divider />\n <List\n dense={true}\n subheader={\n <ListItem>\n <ListItemButton\n disableGutters={true}\n disabled={disabled}\n onClick={() => handleSelectAccountTypeClick(accountType)}\n sx={{ pl: 16, minHeight: 40, justifyContent: 'left' }}\n >\n <ListItemText\n primary={typeName}\n slotProps={{ primary: { variant: 'body1', fontWeight: 'bold' } }}\n />\n </ListItemButton>\n </ListItem>\n }\n >\n {accounts?.map((account) => (\n // Account Checkbox\n <ListItem key={account.guid}>\n <FormControlLabel\n control={\n <CheckBox\n checked={!!accountFilterMap.get(account.guid)}\n disabled={disabled}\n onChange={() =>\n updateAccountFilterMap(\n account.guid,\n !accountFilterMap.get(account.guid),\n )\n }\n size=\"small\"\n />\n }\n label={account.displayName}\n slotProps={{ typography: { variant: 'body1', fontWeight: 'normal' } }}\n sx={{\n width: '100%',\n m: 0,\n minHeight: 40,\n '&:hover': { bgcolor: 'action.hover' },\n }}\n />\n </ListItem>\n ))}\n </List>\n </Stack>\n </ListItem>\n )\n })}\n </List>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAa,IAA0B,EAAA,CACpC,EAAE,qBAAA,EAAA,MAAwD;AACzD,QAAM,EAAE,kBAAA,GAAkB,wBAAA,EAAA,IAA2B,EAAiB,GAChE,EAAE,UAAU,GAAc,QAAQ,EAAA,IAAe,EAAmB,GACpE,EAAE,gBAAgB,EAAA,IAAS,GAE3B,EAAE,mBAAA,EAAA,IAAsB,EAAgB,GAGxC,IAAkB,EAAM,QAAA,MAE1B,MAAM,KAAK,EAAkB,KAAK,CAAC,EAAE,OAAA,CAAQ,GAAwB,MAAgB;AACnF,QACE,CAAC,KACA,KAAuB,EAAoB,SAAS,CAAW,GAChE;AACA,YAAM,IAAW,EAAkB,IAAI,CAAW;AAClD,MAAI,KACF,EAAI,KAAK,GAAG,CAAQ;AAAA,IAExB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC,GACP,CAAC,GAAmB,CAAmB,CACzC,GAGM,IAAkB,IAAI,IAC1B,MAAM,KAAK,EAAiB,QAAQ,CAAC,EAAE,OAAA,CAAQ,CAAC,CAAA,MACvC,EAAgB,KAAA,CAAM,MAAY,EAAQ,SAAS,CAAI,CAC/D,CACH,GAEM,IAAc,MAAM,KAAK,EAAgB,OAAO,CAAC,EAAE,MAAA,CAAO,MAAe,CAAU,GACnF,IAAe,MAAM,KAAK,EAAgB,OAAO,CAAC,EAAE,KAAA,CAAM,MAAe,CAAU,GAEnF,IAAA,MAA6B;AACjC,eAAW,KAAQ,EAAgB,KAAK,EACtC,CAAA,EAAuB,GAAM,CAAC,CAAW;A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nDiD,CAmDjD;AAAA,IAEd,CAAC,CACG;AAAA;AAEV,CACF"}
1
+ {"version":3,"file":"GlobalAccountFilterList.es.js","names":[],"sources":["../../../../src/common/components/globalaccountfilter/GlobalAccountFilterList.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport CheckBox from '@mui/material/Checkbox'\nimport Divider from '@mui/material/Divider'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport Stack from '@mui/material/Stack'\n\nimport { useAccountStore, useGlobalCopyStore, useGlobalUiStore } from '../../context'\nimport { AccountType } from '../../../core'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\n\nimport { buildSelectionFilter, getSelectionCounts } from './selection'\nimport { TriStateCheckbox } from './TriStateCheckbox'\n\nexport interface GlobalAccountFilterListProps {\n allowedAccountTypes: AccountType[] | undefined\n announce?: (message: string) => void\n}\n\nexport const GlobalAccountFilterList = observer(\n ({ allowedAccountTypes, announce }: GlobalAccountFilterListProps) => {\n const { accountFilterMap, updateAccountFilterMap } = useGlobalUiStore()\n const { accounts: accountsCopy, common: commonCopy } = useGlobalCopyStore()\n const { account_filter: copy } = commonCopy\n\n const { accountsByTypeMap, detailedAccounts } = useAccountStore()\n\n // Only the accounts this widget is allowed to show drive the select-all\n // state and the announced counts.\n const selectionFilter = buildSelectionFilter(\n accountFilterMap,\n detailedAccounts,\n allowedAccountTypes,\n )\n\n // `every` is vacuously true on an empty set, which would render Select All\n // checked when no account is selectable. Mirrors the per-group guard below.\n const allSelected =\n selectionFilter.size > 0 &&\n Array.from(selectionFilter.values()).every((isSelected) => isSelected)\n const someSelected = Array.from(selectionFilter.values()).some((isSelected) => isSelected)\n\n // Bulk changes move many checkboxes at once, so the resulting count is\n // announced rather than left to the individual checkbox states. This is\n // also what conveys the tri-state to screen readers that handle\n // aria-checked=\"mixed\" poorly.\n const announceSelection = () => {\n const { selected, total } = getSelectionCounts(\n buildSelectionFilter(accountFilterMap, detailedAccounts, allowedAccountTypes),\n )\n\n announce?.(\n buildDynamicCopy(copy.selection_announcement, String(selected), String(total)) as string,\n )\n }\n\n const handleSelectAllClick = () => {\n for (const guid of selectionFilter.keys()) {\n updateAccountFilterMap(guid, !allSelected)\n }\n\n announceSelection()\n }\n\n const handleSelectAccountTypeClick = (accountType: AccountType) => {\n if (allowedAccountTypes && !allowedAccountTypes.includes(accountType)) return\n\n const accounts = accountsByTypeMap.get(accountType)\n if (!accounts) return\n\n const allAccountsSelected = accounts.every((account) => accountFilterMap.get(account.guid))\n for (const account of accounts) {\n updateAccountFilterMap(account.guid, !allAccountsSelected)\n }\n\n announceSelection()\n }\n\n return (\n <Box\n // Named for the content it holds, not the dialog it sits in -- the paper\n // already announces \"Filter accounts\", so reusing that here made screen\n // readers say the same name twice on entry.\n aria-label={accountsCopy.title}\n id=\"filter_accounts\"\n role=\"region\"\n sx={{ overflowY: 'scroll', maxHeight: 350, minWidth: 280 }}\n tabIndex={0}\n >\n <List dense={true}>\n {/* Select All Checkbox */}\n <ListItem disableGutters={true} disablePadding={true} sx={{ py: 16 }}>\n <FormControlLabel\n control={\n <TriStateCheckbox\n checked={allSelected}\n indeterminate={!allSelected && someSelected}\n onChange={handleSelectAllClick}\n size=\"small\"\n />\n }\n label={copy.select_all_accounts}\n slotProps={{ typography: { variant: 'body1', fontWeight: 'normal' } }}\n sx={{ width: '100%', m: 0, '&:hover': { bgcolor: 'action.hover' } }}\n />\n </ListItem>\n\n {Array.from(accountsByTypeMap.keys()).map((accountType) => {\n const accounts = accountsByTypeMap.get(accountType)\n const disabled = allowedAccountTypes\n ? !allowedAccountTypes.includes(accountType)\n : false\n const typeName = accountsCopy.account_type_accounts[accountType]\n const headingId = `account-filter-group-${accountType}`\n\n const typeAllSelected =\n !!accounts?.length && accounts.every((account) => accountFilterMap.get(account.guid))\n const typeSomeSelected = !!accounts?.some((account) =>\n accountFilterMap.get(account.guid),\n )\n\n return (\n // Account Type Group\n <ListItem disableGutters={true} disablePadding={true} key={accountType}>\n <Stack aria-labelledby={headingId} role=\"group\" sx={{ pb: 8, width: '100%' }}>\n <Divider />\n <List\n dense={true}\n subheader={\n // Account Type Checkbox — toggles every account of this type\n <ListItem disableGutters={true} disablePadding={true}>\n <FormControlLabel\n control={\n <TriStateCheckbox\n checked={typeAllSelected}\n disabled={disabled}\n indeterminate={!typeAllSelected && typeSomeSelected}\n onChange={() => handleSelectAccountTypeClick(accountType)}\n size=\"small\"\n />\n }\n label={typeName}\n slotProps={{\n typography: { id: headingId, variant: 'body1', fontWeight: 'bold' },\n }}\n sx={{\n width: '100%',\n m: 0,\n minHeight: 40,\n '&:hover': { bgcolor: 'action.hover' },\n }}\n />\n </ListItem>\n }\n >\n {accounts?.map((account) => (\n // Account Checkbox\n <ListItem key={account.guid}>\n <FormControlLabel\n control={\n <CheckBox\n checked={!!accountFilterMap.get(account.guid)}\n disabled={disabled}\n onChange={() =>\n updateAccountFilterMap(\n account.guid,\n !accountFilterMap.get(account.guid),\n )\n }\n size=\"small\"\n />\n }\n label={account.displayName}\n slotProps={{ typography: { variant: 'body1', fontWeight: 'normal' } }}\n sx={{\n width: '100%',\n m: 0,\n minHeight: 40,\n '&:hover': { bgcolor: 'action.hover' },\n }}\n />\n </ListItem>\n ))}\n </List>\n </Stack>\n </ListItem>\n )\n })}\n </List>\n </Box>\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;AAsBA,IAAa,IAA0B,EAAA,CACpC,EAAE,qBAAA,GAAqB,UAAA,EAAA,MAA6C;AACnE,QAAM,EAAE,kBAAA,GAAkB,wBAAA,EAAA,IAA2B,EAAiB,GAChE,EAAE,UAAU,GAAc,QAAQ,EAAA,IAAe,EAAmB,GACpE,EAAE,gBAAgB,EAAA,IAAS,GAE3B,EAAE,mBAAA,GAAmB,kBAAA,EAAA,IAAqB,EAAgB,GAI1D,IAAkB,EACtB,GACA,GACA,CACF,GAIM,IACJ,EAAgB,OAAO,KACvB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,CAAC,KAAmB;AAAA,oBACnC,UAAA,MAAgB,EAA6B,CAAW;AAAA,oBACxD,MAAK;AAAA,kBACN,CAAA;AAAA,kBAEH,OAAO;AAAA,kBACP,WAAW,EACT,YAAY;AAAA,oBAAE,IAAI;AAAA,oBAAW,SAAS;AAAA,oBAAS,YAAY;AAAA,kBAAO,EACpE;AAAA,kBACA,IAAI;AAAA,oBACF,OAAO;AAAA,oBACP,GAAG;AAAA,oBACH,WAAW;AAAA,oBACX,WAAW,EAAE,SAAS,eAAe;AAAA,kBACvC;AAAA,gBACD,CAAA;AAAA,cACO,CAAA;AAAA,cAGX,UAAA,GAAU,IAAA,CAAK,MAEd,gBAAA,EAAC,GAAD,EAAA,UACE,gBAAA,EAAC,GAAD;AAAA,gBACE,SACE,gBAAA,EAAC,GAAD;AAAA,kBACE,SAAS,CAAC,CAAC,EAAiB,IAAI,EAAQ,IAAI;AAAA,kBAClC,UAAA;AAAA,kBACV,UAAA,MACE,EACE,EAAQ,MACR,CAAC,EAAiB,IAAI,EAAQ,IAAI,CACpC;AAAA,kBAEF,MAAK;AAAA,gBACN,CAAA;AAAA,gBAEH,OAAO,EAAQ;AAAA,gBACf,WAAW,EAAE,YAAY;AAAA,kBAAE,SAAS;AAAA,kBAAS,YAAY;AAAA,gBAAS,EAAE;AAAA,gBACpE,IAAI;AAAA,kBACF,OAAO;AAAA,kBACP,GAAG;AAAA,kBACH,WAAW;AAAA,kBACX,WAAW,EAAE,SAAS,eAAe;AAAA,gBACvC;AAAA,cACD,CAAA,EACO,GAxBK,EAAQ,IAwBb,CACX;AAAA,YACG,CAAA,CACD;AAAA;QACC,GA9DiD,CA8DjD;AAAA,MAEd,CAAC,CACG;AAAA;EACH,CAAA;AAET,CACF"}
@@ -0,0 +1,17 @@
1
+ import { CheckboxProps } from '@mui/material/Checkbox';
2
+ /**
3
+ * A checkbox whose mixed state is expressed the way HTML defines it.
4
+ *
5
+ * MUI's `indeterminate` prop swaps the icon and stamps `aria-checked="mixed"` on
6
+ * the input, but deliberately does NOT set the native `indeterminate` property
7
+ * (there is no HTML attribute for it -- it is settable only from JS). That
8
+ * leaves the input's real state "unchecked" while ARIA claims "mixed", which
9
+ * axe flags as a conformance violation and which leaves the announcement
10
+ * dependent on assistive tech honouring the override.
11
+ *
12
+ * Setting the native property is the host-language mechanism: HTML-AAM maps it
13
+ * to the "mixed" checked state, so screen readers read it off the element
14
+ * itself. A callback ref (rather than an effect) keeps it in sync both when the
15
+ * value changes and when the input remounts.
16
+ */
17
+ export declare const TriStateCheckbox: ({ indeterminate, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import f from "react";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import c from "@mui/material/Checkbox";
4
+ var x = ({ indeterminate: o = !1, ...t }) => {
5
+ const e = f.useCallback((r) => {
6
+ r && (r.indeterminate = o);
7
+ }, [o]);
8
+ return /* @__PURE__ */ a(c, {
9
+ ...t,
10
+ indeterminate: o,
11
+ inputRef: e
12
+ });
13
+ };
14
+ export {
15
+ x as TriStateCheckbox
16
+ };
17
+
18
+ //# sourceMappingURL=TriStateCheckbox.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriStateCheckbox.es.js","names":[],"sources":["../../../../src/common/components/globalaccountfilter/TriStateCheckbox.tsx"],"sourcesContent":["import React from 'react'\n\nimport CheckBox from '@mui/material/Checkbox'\nimport type { CheckboxProps } from '@mui/material/Checkbox'\n\n/**\n * A checkbox whose mixed state is expressed the way HTML defines it.\n *\n * MUI's `indeterminate` prop swaps the icon and stamps `aria-checked=\"mixed\"` on\n * the input, but deliberately does NOT set the native `indeterminate` property\n * (there is no HTML attribute for it -- it is settable only from JS). That\n * leaves the input's real state \"unchecked\" while ARIA claims \"mixed\", which\n * axe flags as a conformance violation and which leaves the announcement\n * dependent on assistive tech honouring the override.\n *\n * Setting the native property is the host-language mechanism: HTML-AAM maps it\n * to the \"mixed\" checked state, so screen readers read it off the element\n * itself. A callback ref (rather than an effect) keeps it in sync both when the\n * value changes and when the input remounts.\n */\nexport const TriStateCheckbox = ({ indeterminate = false, ...props }: CheckboxProps) => {\n const setInputRef = React.useCallback(\n (input: HTMLInputElement | null) => {\n if (input) {\n input.indeterminate = indeterminate\n }\n },\n [indeterminate],\n )\n\n return <CheckBox {...props} indeterminate={indeterminate} inputRef={setInputRef} />\n}\n"],"mappings":";;;AAoBA,IAAa,IAAA,CAAoB,EAAE,eAAA,IAAgB,IAAO,GAAG,EAAA,MAA2B;AACtF,QAAM,IAAc,EAAM,YAAA,CACvB,MAAmC;AAClC,IAAI,MACF,EAAM,gBAAgB;AAAA,EAE1B,GACA,CAAC,CAAa,CAChB;AAEA,SAAO,gBAAA,EAAC,GAAD;AAAA,IAAU,GAAI;AAAA,IAAsB,eAAA;AAAA,IAAe,UAAU;AAAA,EAAc,CAAA;AACpF"}
@@ -0,0 +1,17 @@
1
+ import { AccountType, DetailedAccount } from '../../../core';
2
+ /**
3
+ * Builds the selection state for the accounts a widget actually renders.
4
+ *
5
+ * Derives from the account list rather than from `accountFilterMap`: the map is
6
+ * seeded from `visibleAccounts` (which drops closed/hidden accounts) while the
7
+ * list renders `detailedAccounts` (which keeps them). Starting from the map
8
+ * therefore under-counted the checkboxes on screen, and the total *grew* as soon
9
+ * as a bulk toggle wrote one of the missing guids into the map. Accounts with no
10
+ * map entry default to unselected, so `total` always equals the number of
11
+ * rendered checkboxes and stays stable across clicks.
12
+ */
13
+ export declare const buildSelectionFilter: (accountFilterMap: Map<string, boolean>, accounts: DetailedAccount[], allowedAccountTypes: AccountType[] | undefined) => Map<string, boolean>;
14
+ export declare const getSelectionCounts: (selectionFilter: Map<string, boolean>) => {
15
+ selected: number;
16
+ total: number;
17
+ };
@@ -0,0 +1,10 @@
1
+ var r = (e, l, i) => new Map(l.filter((t) => !i || i.includes(t.account_type)).map((t) => [t.guid, !!e.get(t.guid)])), a = (e) => ({
2
+ selected: Array.from(e.values()).filter(Boolean).length,
3
+ total: e.size
4
+ });
5
+ export {
6
+ r as buildSelectionFilter,
7
+ a as getSelectionCounts
8
+ };
9
+
10
+ //# sourceMappingURL=selection.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.es.js","names":[],"sources":["../../../../src/common/components/globalaccountfilter/selection.ts"],"sourcesContent":["import type { AccountType, DetailedAccount } from '../../../core'\n\n/**\n * Builds the selection state for the accounts a widget actually renders.\n *\n * Derives from the account list rather than from `accountFilterMap`: the map is\n * seeded from `visibleAccounts` (which drops closed/hidden accounts) while the\n * list renders `detailedAccounts` (which keeps them). Starting from the map\n * therefore under-counted the checkboxes on screen, and the total *grew* as soon\n * as a bulk toggle wrote one of the missing guids into the map. Accounts with no\n * map entry default to unselected, so `total` always equals the number of\n * rendered checkboxes and stays stable across clicks.\n */\nexport const buildSelectionFilter = (\n accountFilterMap: Map<string, boolean>,\n accounts: DetailedAccount[],\n allowedAccountTypes: AccountType[] | undefined,\n): Map<string, boolean> =>\n new Map(\n accounts\n .filter(\n (account) => !allowedAccountTypes || allowedAccountTypes.includes(account.account_type),\n )\n .map((account) => [account.guid, !!accountFilterMap.get(account.guid)]),\n )\n\nexport const getSelectionCounts = (selectionFilter: Map<string, boolean>) => ({\n selected: Array.from(selectionFilter.values()).filter(Boolean).length,\n total: selectionFilter.size,\n})\n"],"mappings":"AAaA,IAAa,IAAA,CACX,GACA,GACA,MAEA,IAAI,IACF,EACG,OAAA,CACE,MAAY,CAAC,KAAuB,EAAoB,SAAS,EAAQ,YAAY,CACxF,EACC,IAAA,CAAK,MAAY,CAAC,EAAQ,MAAM,CAAC,CAAC,EAAiB,IAAI,EAAQ,IAAI,CAAC,CAAC,CAC1E,GAEW,IAAA,CAAsB,OAA2C;AAAA,EAC5E,UAAU,MAAM,KAAK,EAAgB,OAAO,CAAC,EAAE,OAAO,OAAO,EAAE;AAAA,EAC/D,OAAO,EAAgB;AACzB"}
@@ -7,8 +7,8 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
7
7
  import { useTheme as l } from "@mui/material/styles";
8
8
  import c from "@mui/material/ListItem";
9
9
  import f from "@mui/material/ListItemButton";
10
- import x from "@mui/material/ListItemText";
11
- import d from "@mui/material/ListItemIcon";
10
+ import x from "@mui/material/ListItemIcon";
11
+ import d from "@mui/material/ListItemText";
12
12
  var V = m(({ isExpanded: t, onClick: o }) => {
13
13
  const e = l();
14
14
  return /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(f, {
@@ -20,11 +20,11 @@ var V = m(({ isExpanded: t, onClick: o }) => {
20
20
  flexDirection: "row",
21
21
  alignItems: "center"
22
22
  },
23
- children: [/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(n, {
23
+ children: [/* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(n, {
24
24
  bold: !0,
25
25
  variant: "body2",
26
26
  children: t ? "View less" : "View more"
27
- }) }), /* @__PURE__ */ r(d, {
27
+ }) }), /* @__PURE__ */ r(x, {
28
28
  sx: { color: e.palette.primary.main },
29
29
  children: t ? /* @__PURE__ */ r(s, {}) : /* @__PURE__ */ r(a, { sx: {
30
30
  transition: "transform 0.3s ease-in-out",
@@ -3,10 +3,10 @@ import e from "@mui/material/Stack";
3
3
  import { Text as m } from "@mxenabled/mxui";
4
4
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
5
  import h from "@mui/material/ListItem";
6
- import f from "@mui/material/ListItemButton";
7
- import x from "@mui/material/ListItemText";
8
- import I from "@mui/material/ListItemAvatar";
9
- import L from "@mui/material/ListItemIcon";
6
+ import f from "@mui/material/ListItemAvatar";
7
+ import x from "@mui/material/ListItemButton";
8
+ import I from "@mui/material/ListItemIcon";
9
+ import L from "@mui/material/ListItemText";
10
10
  import y from "@mui/material/Switch";
11
11
  var b = ({ avatar: o, endIcon: r, isChecked: c, isDisabled: i = !1, isPrimaryTextBold: s = !1, onClick: l, onToggle: p, primaryText: a, secondaryText: d }) => /* @__PURE__ */ t(h, {
12
12
  secondaryAction: /* @__PURE__ */ t(y, {
@@ -17,11 +17,11 @@ var b = ({ avatar: o, endIcon: r, isChecked: c, isDisabled: i = !1, isPrimaryTex
17
17
  "& .MuiListItemSecondaryAction-root": { right: r ? 64 : 24 },
18
18
  "& .MuiListItemButton-root": { pr: 24 }
19
19
  },
20
- children: /* @__PURE__ */ n(f, {
20
+ children: /* @__PURE__ */ n(x, {
21
21
  onClick: i ? void 0 : () => l(),
22
22
  children: [
23
- o && /* @__PURE__ */ t(I, { children: o }),
24
- /* @__PURE__ */ t(x, {
23
+ o && /* @__PURE__ */ t(f, { children: o }),
24
+ /* @__PURE__ */ t(L, {
25
25
  slotProps: { primary: { fontWeight: 400 } },
26
26
  children: /* @__PURE__ */ t(e, {
27
27
  alignItems: "center",
@@ -43,7 +43,7 @@ var b = ({ avatar: o, endIcon: r, isChecked: c, isDisabled: i = !1, isPrimaryTex
43
43
  })
44
44
  })
45
45
  }),
46
- !i && r && /* @__PURE__ */ t(L, { children: r })
46
+ !i && r && /* @__PURE__ */ t(I, { children: r })
47
47
  ]
48
48
  })
49
49
  });
@@ -1,8 +1,8 @@
1
1
  export interface AccountFilterCopy {
2
2
  account_type_accounts: string;
3
- filter_button_aria: string;
4
- filter_button_generic_aria: string;
3
+ applied_announcement: string;
5
4
  select_all_accounts: string;
5
+ selection_announcement: string;
6
6
  title: string;
7
7
  toggle_account_type_accounts: string;
8
8
  unselect_all_accounts: string;
@@ -6,10 +6,10 @@ import d from "@mui/material/Box";
6
6
  import l from "@mui/material/Divider";
7
7
  import s from "@mui/material/List";
8
8
  import p from "@mui/material/ListItem";
9
- import f from "@mui/material/ListItemButton";
10
- import h from "@mui/material/ListItemText";
11
- import x from "@mui/material/Avatar";
12
- import y from "@mui/material/ListItemAvatar";
9
+ import f from "@mui/material/Avatar";
10
+ import h from "@mui/material/ListItemAvatar";
11
+ import x from "@mui/material/ListItemButton";
12
+ import y from "@mui/material/ListItemText";
13
13
  var j = /* @__PURE__ */ (function(o) {
14
14
  return o.Connections = "connections", o.CreditScore = "credit_score", o.DateOfBirth = "date_of_birth", o.MonthlyIncome = "monthly_income", o;
15
15
  })({}), D = ({ list: o, onClickItem: n }) => /* @__PURE__ */ r(d, {
@@ -21,9 +21,9 @@ var j = /* @__PURE__ */ (function(o) {
21
21
  } },
22
22
  children: o.map((t, c) => /* @__PURE__ */ e(a.Fragment, { children: [/* @__PURE__ */ r(p, {
23
23
  secondaryAction: /* @__PURE__ */ r(m, {}),
24
- children: /* @__PURE__ */ e(f, {
24
+ children: /* @__PURE__ */ e(x, {
25
25
  onClick: () => n(t.key),
26
- children: [/* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(x, {
26
+ children: [/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(f, {
27
27
  sx: {
28
28
  bgcolor: "primary.main",
29
29
  ...!t.isComplete && {
@@ -35,7 +35,7 @@ var j = /* @__PURE__ */ (function(o) {
35
35
  }
36
36
  },
37
37
  children: t.icon
38
- }) }), /* @__PURE__ */ r(h, {
38
+ }) }), /* @__PURE__ */ r(y, {
39
39
  primary: /* @__PURE__ */ r(i, {
40
40
  sx: { color: "text.secondary" },
41
41
  variant: "caption",
@@ -15,8 +15,8 @@ import { useTheme as T } from "@mui/material/styles";
15
15
  import a from "@mui/material/Box";
16
16
  import j from "@mui/material/Divider";
17
17
  import z from "@mui/material/ListItem";
18
- import N from "@mui/material/ListItemText";
19
- import P from "@mui/material/ListItemAvatar";
18
+ import N from "@mui/material/ListItemAvatar";
19
+ import P from "@mui/material/ListItemText";
20
20
  var W = ({ loadAccounts: i, loadMoreLabel: y }) => {
21
21
  const b = T(), { config: m } = D(), { connect: v, finstrong: l } = h(), { accounts: x } = h(), { selectedAccounts: u } = $(), [C, p] = r.useState(!1), [A, d] = r.useState(!1), n = r.useMemo(() => u.filter((e) => i ? i.includes(e.account_type) : !0), [u, i]), f = r.useMemo(() => n.slice(0, 3), [n]), w = (e) => {
22
22
  const { firstValue: c } = O(e, x, m.display_available_balance_in_accounts);
@@ -30,11 +30,11 @@ var W = ({ loadAccounts: i, loadMoreLabel: y }) => {
30
30
  children: f.map((e, c) => /* @__PURE__ */ o(r.Fragment, { children: [/* @__PURE__ */ o(z, {
31
31
  sx: { px: 24 },
32
32
  children: [
33
- /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(G, {
33
+ /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(G, {
34
34
  alt: "MX",
35
35
  institutionGuid: e.institution_guid ?? ""
36
36
  }) }),
37
- /* @__PURE__ */ t(N, {
37
+ /* @__PURE__ */ t(P, {
38
38
  primary: `${I(e, { allowNickname: m?.show_account_nicknames_in_master })}
39
39
  ${e.account_number ? ` *${e.account_number}` : ""}`,
40
40
  slotProps: { primary: {
@@ -10,9 +10,9 @@ import a from "@mui/material/Divider";
10
10
  import I from "@mui/material/Checkbox";
11
11
  import v from "@mui/material/List";
12
12
  import S from "@mui/material/ListItem";
13
- import D from "@mui/material/ListItemButton";
14
- import j from "@mui/material/ListItemText";
15
- import B from "@mui/material/ListItemAvatar";
13
+ import D from "@mui/material/ListItemAvatar";
14
+ import j from "@mui/material/ListItemButton";
15
+ import B from "@mui/material/ListItemText";
16
16
  var O = ({ accounts: s, isOpen: d, onClose: p, onSave: f, title: u }) => {
17
17
  const { goals: m, common: g } = b(), { config: c } = y(), [e, h] = l.useState([]), _ = (t) => {
18
18
  const r = e.findIndex((C) => C.guid === t.guid), i = [...e];
@@ -26,14 +26,14 @@ var O = ({ accounts: s, isOpen: d, onClose: p, onSave: f, title: u }) => {
26
26
  title: u,
27
27
  children: [/* @__PURE__ */ n(v, {
28
28
  sx: { bgcolor: "background.white" },
29
- children: [/* @__PURE__ */ o(a, { variant: "fullWidth" }), s.map((t, r) => /* @__PURE__ */ n(l.Fragment, { children: [/* @__PURE__ */ o(S, { children: /* @__PURE__ */ n(D, {
29
+ children: [/* @__PURE__ */ o(a, { variant: "fullWidth" }), s.map((t, r) => /* @__PURE__ */ n(l.Fragment, { children: [/* @__PURE__ */ o(S, { children: /* @__PURE__ */ n(j, {
30
30
  onClick: () => _(t),
31
31
  children: [
32
- /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(L, {
32
+ /* @__PURE__ */ o(D, { children: /* @__PURE__ */ o(L, {
33
33
  alt: t?.name || "",
34
34
  institutionGuid: t?.institution_guid || ""
35
35
  }) }),
36
- /* @__PURE__ */ o(j, {
36
+ /* @__PURE__ */ o(B, {
37
37
  primary: x(t, { allowNickname: c?.show_account_nicknames_in_master }),
38
38
  secondary: w(t.balance || 0, "0,0.00")
39
39
  }),
@@ -3,8 +3,8 @@ import { formatCurrency as m } from "../../../core/utils/NumberFormatting.es.js"
3
3
  import { InstitutionLogo as e } from "@mxenabled/mxui";
4
4
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
5
  import s from "@mui/material/ListItem";
6
- import p from "@mui/material/ListItemText";
7
- import a from "@mui/material/ListItemAvatar";
6
+ import p from "@mui/material/ListItemAvatar";
7
+ import a from "@mui/material/ListItemText";
8
8
  var g = ({ account: r }) => {
9
9
  const i = o(r);
10
10
  return /* @__PURE__ */ n(s, {
@@ -12,10 +12,10 @@ var g = ({ account: r }) => {
12
12
  bgcolor: "background.paper",
13
13
  p: 24
14
14
  },
15
- children: [/* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(e, {
15
+ children: [/* @__PURE__ */ t(p, { children: /* @__PURE__ */ t(e, {
16
16
  alt: r.name || "",
17
17
  institutionGuid: r.institution_guid || ""
18
- }) }), /* @__PURE__ */ t(p, {
18
+ }) }), /* @__PURE__ */ t(a, {
19
19
  primary: i,
20
20
  secondary: m(r.balance || 0, "0,0.00")
21
21
  })]
@@ -11,9 +11,9 @@ import { AddBox as P, ChevronRight as s } from "@mxenabled/mx-icons";
11
11
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
12
12
  import y from "@mui/material/List";
13
13
  import l from "@mui/material/ListItem";
14
+ import C from "@mui/material/ListItemAvatar";
14
15
  import d from "@mui/material/ListItemButton";
15
16
  import m from "@mui/material/ListItemText";
16
- import C from "@mui/material/ListItemAvatar";
17
17
  var tt = ({ goal: o }) => {
18
18
  const { visibleCheckingAccounts: p, visibleSavingsAccounts: u } = L(), { accounts: g, goals: i } = j(), { config: A } = B(), { setAlert: v, setSelectedGoal: k, updateGoal: G } = D(), h = !o.guid, [I, r] = T.useState(!1), _ = async ({ balance: e, guid: S }) => {
19
19
  const f = {
@@ -7,11 +7,11 @@ import { jsx as r, jsxs as m } from "react/jsx-runtime";
7
7
  import A from "@mui/material/Divider";
8
8
  import d from "@mui/material/List";
9
9
  import f from "@mui/material/ListItem";
10
- import h from "@mui/material/ListItemButton";
11
- import x from "@mui/material/ListItemText";
12
10
  import M from "@mui/material/Avatar";
13
11
  import N from "@mui/material/ListItemAvatar";
12
+ import h from "@mui/material/ListItemButton";
14
13
  import O from "@mui/material/ListItemIcon";
14
+ import x from "@mui/material/ListItemText";
15
15
  import j from "@mui/material/Collapse";
16
16
  var W = ({ goalType: T, onClick: n }) => {
17
17
  const { goals: E } = u(), { bgcolor: I, icon: b, label: y, description: R, subTypes: a, type: o } = T, [i, L] = v.useState(!1), t = a.length > 0;
@@ -8,18 +8,18 @@ import { CheckCircle as p } from "@mxenabled/mx-icons";
8
8
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
9
9
  import { fromUnixTime as d } from "date-fns/fromUnixTime";
10
10
  import f from "@mui/material/ListItem";
11
- import u from "@mui/material/ListItemButton";
12
- import y from "@mui/material/ListItemText";
13
- import b from "@mui/material/ListItemAvatar";
11
+ import u from "@mui/material/ListItemAvatar";
12
+ import y from "@mui/material/ListItemButton";
13
+ import b from "@mui/material/ListItemText";
14
14
  var D = ({ goal: t }) => {
15
15
  const { goals: m } = a();
16
- return /* @__PURE__ */ r(f, { children: /* @__PURE__ */ o(u, {
16
+ return /* @__PURE__ */ r(f, { children: /* @__PURE__ */ o(y, {
17
17
  disableRipple: !0,
18
18
  sx: {
19
19
  ":hover": { backgroundColor: "unset" },
20
20
  cursor: "default"
21
21
  },
22
- children: [/* @__PURE__ */ r(b, {
22
+ children: [/* @__PURE__ */ r(u, {
23
23
  sx: {
24
24
  alignItems: "center",
25
25
  display: "flex",
@@ -30,7 +30,7 @@ var D = ({ goal: t }) => {
30
30
  filled: !0,
31
31
  size: 20
32
32
  })
33
- }), /* @__PURE__ */ r(y, {
33
+ }), /* @__PURE__ */ r(b, {
34
34
  slotProps: { primary: { variant: "body1" } },
35
35
  children: /* @__PURE__ */ o(i, {
36
36
  alignItems: "center",