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

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 (106) hide show
  1. package/dist/{Account-B4CDD-zq.mjs → Account-BDXA6PWh.mjs} +1 -1
  2. package/dist/AccountDetailsContent-CUztd3-b.mjs +683 -0
  3. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-i3KFhNuo.mjs} +18 -18
  4. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-QZspYAji.mjs} +10 -12
  5. package/dist/AccountListItem-DX5upmCS.mjs +90 -0
  6. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-BcnDpyLL.mjs} +3 -3
  7. package/dist/{Accounts-CRUehOiy.mjs → Accounts-DXfZotRC.mjs} +1 -1
  8. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-Df2nII9u.mjs} +31 -31
  9. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  10. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  11. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +27 -27
  12. package/dist/{CategoryStore-MUwRWH9e.mjs → CategoryStore-DTgyAMM7.mjs} +2 -2
  13. package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-C5cR-nfQ.mjs} +4 -4
  14. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BIbTqYOH.mjs} +47 -48
  15. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +2 -2
  16. package/dist/CurrencyInput-BFKcs-_K.mjs +85 -0
  17. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  18. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-BbJB0nmu.mjs} +3 -3
  19. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  20. package/dist/{Drawer-BF40nbsH.mjs → Drawer-BEtCk82g.mjs} +17 -17
  21. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  22. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  23. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-DpWY3gVb.mjs} +4 -4
  24. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  25. package/dist/{Help-DBfsTkAi.mjs → Help-BnPXM_N2.mjs} +145 -124
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  28. package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
  29. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
  30. package/dist/Loader-DUaFpDGv.mjs +24 -0
  31. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-NpXHhO1n.mjs} +46 -46
  32. package/dist/MicroWidgetContainer-DEiRnYVa.mjs +45 -0
  33. package/dist/MiniWidgetContainer-CmXpTylX.mjs +56 -0
  34. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-lsuhEpn6.mjs} +4 -4
  35. package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-CNmJWVeI.mjs} +77 -77
  36. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +8 -8
  37. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-CqZh1SQa.mjs} +3 -3
  38. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BKcYmpv3.mjs} +77 -77
  39. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +1 -1
  40. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  41. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  42. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  43. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  44. package/dist/{SpendingData-DPQ96k3x.mjs → SpendingData-BuJ03S9d.mjs} +4 -4
  45. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CjX-hX2O.mjs} +12 -12
  46. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  47. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  48. package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
  49. package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-D-Q3BU9Z.mjs} +58 -41
  50. package/dist/{TrendsStore-_mRaFUdf.mjs → TrendsStore-BW9FGQeE.mjs} +37 -37
  51. package/dist/{User-BklmOUSd.mjs → User-wXzDI4M8.mjs} +107 -107
  52. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-C0832BMe.mjs} +233 -231
  53. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-BhQ1Kx2z.mjs} +36 -36
  54. package/dist/accounts/index.es.js +94 -94
  55. package/dist/analytics/index.es.js +27 -27
  56. package/dist/budgets/index.es.js +251 -250
  57. package/dist/cashflow/index.es.js +158 -157
  58. package/dist/categories/index.es.js +2 -2
  59. package/dist/common/components/Loader.d.ts +2 -1
  60. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  61. package/dist/common/components/barchart/Bar.d.ts +25 -0
  62. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  63. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  64. package/dist/common/components/barchart/Legend.d.ts +8 -0
  65. package/dist/common/components/barchart/Util.d.ts +42 -0
  66. package/dist/common/components/barchart/index.d.ts +1 -0
  67. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  68. package/dist/common/components/index.d.ts +1 -0
  69. package/dist/common/index.es.js +660 -395
  70. package/dist/common/utils/Theme.d.ts +3 -1
  71. package/dist/dashboard/index.es.js +21 -21
  72. package/dist/debts/components/DebtsChart.d.ts +2 -1
  73. package/dist/debts/index.es.js +440 -440
  74. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +3 -3
  75. package/dist/finstrong/index.es.js +118 -118
  76. package/dist/goals/index.es.js +380 -386
  77. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  78. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  79. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  80. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  81. package/dist/help/index.es.js +6 -6
  82. package/dist/investments/index.es.js +279 -278
  83. package/dist/merchants/index.es.js +7 -7
  84. package/dist/microinsights/index.es.js +1 -1
  85. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  86. package/dist/networth/index.es.js +185 -191
  87. package/dist/notifications/index.es.js +30 -30
  88. package/dist/recurringtransactions/index.es.js +85 -85
  89. package/dist/settings/index.es.js +270 -270
  90. package/dist/spending/index.es.js +44 -44
  91. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  92. package/dist/transactions/index.es.js +169 -168
  93. package/dist/trends/index.es.js +318 -317
  94. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-CFNF8766.mjs} +1 -1
  95. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  96. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  97. package/package.json +50 -45
  98. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  99. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  100. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  101. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  102. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  103. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  104. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  105. package/dist/SearchBox-B7km148n.mjs +0 -39
  106. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
@@ -1,4 +1,4 @@
1
- import { A as C } from "./ConnectDrawer-DVp54lUH.mjs";
1
+ import { A as C } from "./ConnectDrawer-BIbTqYOH.mjs";
2
2
  const I = [
3
3
  C.ANY,
4
4
  C.CASH,
@@ -0,0 +1,683 @@
1
+ import { jsxs as d, Fragment as g, jsx as t } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { observer as S } from "mobx-react-lite";
4
+ import H from "@mui/material/Tab";
5
+ import nt from "@mui/material/Tabs";
6
+ import $ from "@mui/material/List";
7
+ import Y from "@mui/material/ListSubheader";
8
+ import ot from "@mui/material/Switch";
9
+ import { Text as T, Icon as I, THEMES as G } from "@mxenabled/mxui";
10
+ import M from "@mui/material/Divider";
11
+ import v from "@mui/material/ListItem";
12
+ import N from "@mui/material/ListItemButton";
13
+ import w from "@mui/material/ListItemText";
14
+ import { u as E } from "./AccountDetailsHeader-i3KFhNuo.mjs";
15
+ import { d as z, u as y, g as O, h as X } from "./hooks-C41HAxM5.mjs";
16
+ import { A as at } from "./AccountListItem-DX5upmCS.mjs";
17
+ import { A as k } from "./WidgetContainer-BhQ1Kx2z.mjs";
18
+ import { D as V, f as B, a as K } from "./Dialog-BPTr3qHE.mjs";
19
+ import { b as h } from "./Localization-2MODESHW.mjs";
20
+ import { D as J } from "./Drawer-BEtCk82g.mjs";
21
+ import P from "@mui/material/ListItemAvatar";
22
+ import ct from "@mui/material/Stack";
23
+ import st from "@mui/material/styles/useTheme";
24
+ import { Error as q, CheckCircle as it, Language as rt } from "@mxenabled/mx-icons";
25
+ import { n as m, N as Q, l as Z, F as R } from "./ConnectDrawer-BIbTqYOH.mjs";
26
+ import { fromUnixTime as lt } from "date-fns/fromUnixTime";
27
+ import { isToday as dt } from "date-fns/isToday";
28
+ import { isYesterday as ut } from "date-fns/isYesterday";
29
+ import { I as F } from "./IconBacking-B9oC6uL2.mjs";
30
+ import { addMonths as _t } from "date-fns/addMonths";
31
+ import { alpha as mt } from "@mui/material/styles";
32
+ import { AdapterDateFns as pt } from "@mui/x-date-pickers/AdapterDateFnsV3";
33
+ import { DateCalendar as ht } from "@mui/x-date-pickers/DateCalendar";
34
+ import gt from "@mui/material/FormControl";
35
+ import Ct from "@mui/material/InputLabel";
36
+ import { LocalizationProvider as ft } from "@mui/x-date-pickers-pro";
37
+ import bt from "@mui/material/MenuItem";
38
+ import At from "@mui/material/Select";
39
+ import Tt from "@mui/material/TextField";
40
+ import { C as Dt } from "./CurrencyInput-BFKcs-_K.mjs";
41
+ import { b as St } from "./AccountFields-QZspYAji.mjs";
42
+ import Et from "@mui/material/Alert";
43
+ import yt from "@mui/material/AlertTitle";
44
+ import xt from "@mui/material/Link";
45
+ import wt from "@mui/material/Paper";
46
+ import { subDays as kt, startOfToday as It, endOfToday as Mt } from "date-fns";
47
+ import { T as vt, a as Lt } from "./TransactionDetails-5M2vfr59.mjs";
48
+ import { T as j } from "./TabContentContainer-j01JYR_7.mjs";
49
+ const U = ({
50
+ children: e,
51
+ isLast: o = !1,
52
+ onClick: n,
53
+ primaryText: c,
54
+ secondaryText: i
55
+ }) => /* @__PURE__ */ d(g, { children: [
56
+ /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ d(N, { onClick: n, children: [
57
+ /* @__PURE__ */ t(w, { primary: c, secondary: i }),
58
+ e
59
+ ] }) }),
60
+ /* @__PURE__ */ t(M, { sx: { ml: o ? 0 : 24 } })
61
+ ] }), Nt = () => {
62
+ const { accounts: e } = z(), { selectedAccount: o, selectedMember: n } = E();
63
+ return e.filter(
64
+ (c) => c.member_guid === n.guid && n.successfully_aggregated_at && c.guid !== o.guid
65
+ );
66
+ }, Ot = () => {
67
+ const [e, o] = u.useState(!1), [n, c] = u.useState(!1), [i, _] = u.useState(!1), [l, s] = u.useState({}), { selectedAccount: r } = E(), { mergeAccounts: f, updateAccount: b } = z(), { accounts: a } = y(), C = Nt(), { onEvent: D } = O(), { modifyTransactionByAccountGuid: x } = X(), L = async (A) => {
68
+ await b({
69
+ ...r,
70
+ ...A
71
+ }), "is_closed" in A && A.is_closed !== r.is_closed && x(r.guid, { accountIsClosed: A.is_closed });
72
+ }, p = () => {
73
+ f([r.guid, l.guid]).finally(
74
+ () => c(!1)
75
+ );
76
+ };
77
+ return /* @__PURE__ */ d(g, { children: [
78
+ /* @__PURE__ */ t(Y, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(T, { bold: !0, component: "h2", variant: "XSmall", children: a.actions }) }),
79
+ /* @__PURE__ */ t(
80
+ U,
81
+ {
82
+ onClick: () => {
83
+ L({ is_hidden: !r.is_hidden }), D(k.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: r.guid });
84
+ },
85
+ primaryText: r.is_hidden ? a.unhide_account : a.hide_Account,
86
+ secondaryText: r.is_hidden ? a.include_this_account : a.exclude_this_account,
87
+ children: /* @__PURE__ */ t(ot, { checked: r.is_hidden })
88
+ }
89
+ ),
90
+ /* @__PURE__ */ t(
91
+ U,
92
+ {
93
+ onClick: () => {
94
+ o(!0), D(k.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
95
+ account_guid: r.guid
96
+ });
97
+ },
98
+ primaryText: r.is_closed ? a.mark_as_open : a.mark_as_closed,
99
+ secondaryText: r.is_closed ? a.this_will_set_the_closed_account : a.this_will_set_the_account_balance_to_0,
100
+ children: /* @__PURE__ */ t(I, { name: "chevron_right" })
101
+ }
102
+ ),
103
+ C.length > 0 && /* @__PURE__ */ t(
104
+ U,
105
+ {
106
+ isLast: !0,
107
+ onClick: () => {
108
+ c(!0), D(k.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
109
+ account_guid: r.guid
110
+ });
111
+ },
112
+ primaryText: a.mark_as_duplicate,
113
+ secondaryText: a.if_a_connected_account_is_showing_up_twice,
114
+ children: /* @__PURE__ */ t(I, { name: "chevron_right" })
115
+ }
116
+ ),
117
+ /* @__PURE__ */ t(
118
+ V,
119
+ {
120
+ copy: {
121
+ close_aria: a.close_modal,
122
+ title: r.is_closed ? a.confirm_mark_as_open : a.confirm_mark_closed
123
+ },
124
+ isOpen: e,
125
+ onClose: () => {
126
+ o(!1);
127
+ },
128
+ onPrimaryAction: () => L({ is_closed: !r.is_closed }),
129
+ children: /* @__PURE__ */ t(T, { truncate: !1, children: h(
130
+ r.is_closed ? a.this_will_resume_updating_the_balance : a.this_will_set_the_balance_of_your_account,
131
+ r.name
132
+ ) })
133
+ }
134
+ ),
135
+ /* @__PURE__ */ t(
136
+ J,
137
+ {
138
+ ariaLabelClose: a.close_drawer,
139
+ isOpen: n,
140
+ onClose: () => c(!1),
141
+ title: a.mark_as_duplicate,
142
+ children: /* @__PURE__ */ t($, { children: C.map((A) => {
143
+ const et = C.indexOf(A) === C.length - 1;
144
+ return /* @__PURE__ */ d(u.Fragment, { children: [
145
+ /* @__PURE__ */ t(
146
+ at,
147
+ {
148
+ account: A,
149
+ onRowClick: () => {
150
+ _(!0), s(A);
151
+ }
152
+ }
153
+ ),
154
+ /* @__PURE__ */ t($, { sx: { ml: et ? 0 : 24 } })
155
+ ] }, A.guid);
156
+ }) })
157
+ }
158
+ ),
159
+ i && /* @__PURE__ */ d(
160
+ V,
161
+ {
162
+ copy: {
163
+ close_aria: a.close_modal,
164
+ title: a.confirm_merge
165
+ },
166
+ isOpen: i,
167
+ onClose: () => _(!1),
168
+ onPrimaryAction: p,
169
+ children: [
170
+ /* @__PURE__ */ t(T, { truncate: !1, children: h(
171
+ a.this_means_accounts_will_be_merged,
172
+ r.name,
173
+ l.name
174
+ ) }),
175
+ /* @__PURE__ */ t(T, { color: "error", sx: { mt: 24 }, children: a.this_action_cannot_be_undone })
176
+ ]
177
+ }
178
+ )
179
+ ] });
180
+ }, Pt = S(Ot), tt = (e, o) => {
181
+ const { connection_messages: n } = o;
182
+ switch (e.connection_status) {
183
+ case m.CHALLENGED:
184
+ return {
185
+ cta: n.challenged_cta,
186
+ main: h(
187
+ n.challenged_connection_description,
188
+ e.name
189
+ ),
190
+ statusName: o.connection_statuses[e.connection_status],
191
+ title: n.challenged_connection_title
192
+ };
193
+ case m.CLOSED:
194
+ return {
195
+ main: n.closed_connection_description,
196
+ statusName: o.connection_statuses[e.connection_status],
197
+ title: n.closed_connection_title
198
+ };
199
+ case m.DEGRADED:
200
+ return {
201
+ main: n.degraded_connection_description,
202
+ statusName: o.connection_statuses[e.connection_status],
203
+ title: n.degraded_connection_title
204
+ };
205
+ case m.DELAYED:
206
+ return {
207
+ main: h(
208
+ n.delayed_connection_description,
209
+ e.name
210
+ ),
211
+ statusName: o.connection_statuses[e.connection_status],
212
+ title: n.delayed_connection_title
213
+ };
214
+ case m.DENIED:
215
+ return {
216
+ cta: n.denied_cta,
217
+ main: h(
218
+ n.denied_connection_description,
219
+ e.name
220
+ ),
221
+ statusName: o.connection_statuses[e.connection_status],
222
+ title: n.denied_connection_title
223
+ };
224
+ case m.DISABLED:
225
+ return {
226
+ main: n.disabled_connection_description,
227
+ statusName: o.connection_statuses[e.connection_status],
228
+ title: n.disabled_connection_title
229
+ };
230
+ case m.DISCONNECTED:
231
+ return {
232
+ main: h(
233
+ n.disconnected_connection_description,
234
+ e.name
235
+ ),
236
+ statusName: o.connection_statuses[e.connection_status],
237
+ title: n.disconnected_connection_title
238
+ };
239
+ case m.DISCONTINUED:
240
+ return {
241
+ main: n.discontinued_connection_description,
242
+ statusName: o.connection_statuses[e.connection_status],
243
+ title: n.discontinued_connection_title
244
+ };
245
+ case m.EXPIRED:
246
+ return {
247
+ cta: n.expired_cta,
248
+ main: n.expired_connection_description,
249
+ statusName: o.connection_statuses[e.connection_status],
250
+ title: n.expired_connection_title
251
+ };
252
+ case m.FAILED:
253
+ return {
254
+ main: h(
255
+ n.failed_connection_description,
256
+ e.name
257
+ ),
258
+ statusName: o.connection_statuses[e.connection_status],
259
+ title: n.failed_connection_title
260
+ };
261
+ case m.IMPAIRED:
262
+ return {
263
+ cta: n.impaired_cta,
264
+ main: h(
265
+ n.impaired_connection_description,
266
+ e.name
267
+ ),
268
+ statusName: o.connection_statuses[e.connection_status],
269
+ title: n.impaired_connection_title
270
+ };
271
+ case m.IMPEDED:
272
+ return {
273
+ main: h(
274
+ n.impeded_connection_description,
275
+ e.name,
276
+ e.name
277
+ ),
278
+ statusName: o.connection_statuses[e.connection_status],
279
+ title: n.impeded_connection_title
280
+ };
281
+ case m.IMPORTED:
282
+ return {
283
+ cta: n.imported_cta,
284
+ main: h(
285
+ n.imported_connection_description,
286
+ e.name
287
+ ),
288
+ statusName: o.connection_statuses[e.connection_status],
289
+ title: n.imported_connection_title
290
+ };
291
+ case m.LOCKED:
292
+ return {
293
+ cta: n.locked_cta,
294
+ main: h(
295
+ n.locked_connection_description,
296
+ e.name
297
+ ),
298
+ statusName: o.connection_statuses[e.connection_status],
299
+ title: n.locked_connection_title
300
+ };
301
+ case m.PREVENTED:
302
+ return {
303
+ cta: n.prevented_cta,
304
+ main: n.prevented_connection_description,
305
+ statusName: o.connection_statuses[e.connection_status],
306
+ title: n.prevented_connection_title
307
+ };
308
+ case m.REJECTED:
309
+ return {
310
+ cta: n.rejected_cta,
311
+ main: n.rejected_connection_description,
312
+ statusName: o.connection_statuses[e.connection_status],
313
+ title: n.rejected_connection_title
314
+ };
315
+ default: {
316
+ const c = () => {
317
+ const i = e.successfully_aggregated_at ? lt(e.successfully_aggregated_at) : void 0, _ = i && B(i, K.TIME_STAMP_HOUR_MINUTE);
318
+ if (_)
319
+ return dt(i) ? h(o.last_updated_at, o.today, _) : ut(i) ? h(o.last_updated_at, o.yesterday, _) : h(
320
+ o.last_updated_at,
321
+ B(i, K.MONTH_DAY_YEAR),
322
+ _
323
+ );
324
+ };
325
+ return {
326
+ statusName: o.connection_statuses[6],
327
+ // Connected
328
+ title: c()
329
+ };
330
+ }
331
+ }
332
+ }, W = {
333
+ color: "background.default",
334
+ fontSize: 20,
335
+ gridRow: 1,
336
+ gridColumn: 1,
337
+ zIndex: 2
338
+ }, Rt = () => {
339
+ const [e, o] = u.useState(!1), {
340
+ palette: { mode: n }
341
+ } = st(), { selectedMember: c } = E(), { accounts: i, connect: _ } = y(), l = tt(c, _), s = Q.includes(c.connection_status) ? {
342
+ color: "error.main",
343
+ ctaCopy: l.cta ?? "",
344
+ icon: /* @__PURE__ */ t(q, { filled: !0, sx: { ...W } }),
345
+ mainMessage: l.statusName,
346
+ secondaryMessage: `${l.title}.`
347
+ } : {
348
+ color: "success.main",
349
+ icon: /* @__PURE__ */ t(it, { filled: !0, sx: { ...W } }),
350
+ mainMessage: l.statusName,
351
+ secondaryMessage: l.title
352
+ };
353
+ return /* @__PURE__ */ d(g, { children: [
354
+ /* @__PURE__ */ t(Y, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(T, { bold: !0, component: "h2", variant: "XSmall", children: i.connection_status }) }),
355
+ /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper" }, children: c.is_manual || !s.ctaCopy ? /* @__PURE__ */ d(ct, { alignItems: "center", direction: "row", px: 24, py: 12, children: [
356
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
357
+ /* @__PURE__ */ t(w, { primary: s.mainMessage, secondary: s.secondaryMessage })
358
+ ] }) : /* @__PURE__ */ d(N, { onClick: () => o(!0), children: [
359
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
360
+ /* @__PURE__ */ t(
361
+ w,
362
+ {
363
+ primary: s.mainMessage,
364
+ secondary: s.secondaryMessage && /* @__PURE__ */ d(g, { children: [
365
+ s.secondaryMessage,
366
+ " ",
367
+ /* @__PURE__ */ t(T, { bold: !0, sx: { color: "action.active" }, variant: "XSmall", children: s.ctaCopy })
368
+ ] })
369
+ }
370
+ ),
371
+ /* @__PURE__ */ t(I, { name: "chevron_right" })
372
+ ] }) }),
373
+ /* @__PURE__ */ t(M, { sx: { ml: c.is_manual || !c.institution_url ? 0 : 24 } }),
374
+ !c.is_manual && c.institution_url && /* @__PURE__ */ d(g, { children: [
375
+ /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ d(N, { component: "a", href: c.institution_url, target: "_blank", children: [
376
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(
377
+ F,
378
+ {
379
+ backingSx: {
380
+ backgroundColor: n === G.LIGHT ? "grey.300" : "grey.700",
381
+ borderRadius: 1
382
+ },
383
+ size: 32,
384
+ children: /* @__PURE__ */ t(
385
+ rt,
386
+ {
387
+ sx: {
388
+ ...W,
389
+ color: n === G.LIGHT ? "grey.900" : "common.white"
390
+ }
391
+ }
392
+ )
393
+ }
394
+ ) }),
395
+ /* @__PURE__ */ t(w, { primary: c.name, secondary: c.institution_url }),
396
+ /* @__PURE__ */ t(I, { name: "launch" })
397
+ ] }) }),
398
+ /* @__PURE__ */ t(M, {})
399
+ ] }),
400
+ e && /* @__PURE__ */ t(
401
+ Z,
402
+ {
403
+ loadWidgetProps: { current_member_guid: c.guid },
404
+ onClose: () => o(!1),
405
+ showConnectWidget: e,
406
+ title: i.manage_connection
407
+ }
408
+ )
409
+ ] });
410
+ }, Ft = S(Rt), Ut = ({ field: e, isOpen: o, onClose: n }) => {
411
+ const { updateAccount: c } = z(), { selectedAccount: i } = E(), { accounts: _ } = y(), [l, s] = u.useState(i[e.name]), [r, f] = u.useState(""), [b, a] = u.useState(!0), C = () => {
412
+ s(""), f(""), n();
413
+ }, D = () => {
414
+ switch (e.type) {
415
+ case R.Select:
416
+ return /* @__PURE__ */ d(gt, { fullWidth: !0, children: [
417
+ /* @__PURE__ */ t(Ct, { id: `${e.label}-select-label`, children: e.label }),
418
+ /* @__PURE__ */ t(
419
+ At,
420
+ {
421
+ id: `${e.label}-select`,
422
+ inputProps: {
423
+ sx: {
424
+ backgroundColor: "background.paper"
425
+ }
426
+ },
427
+ label: e.label,
428
+ labelId: `${e.label}-select-label`,
429
+ onChange: (p) => s(p.target.value),
430
+ placeholder: e.placeholder,
431
+ value: l,
432
+ children: e.options?.map((p) => /* @__PURE__ */ t(bt, { value: p.value, children: p.label }, p.value))
433
+ }
434
+ )
435
+ ] });
436
+ case R.Currency:
437
+ return /* @__PURE__ */ t(
438
+ Dt,
439
+ {
440
+ amount: l || "",
441
+ ariaLabel: e.placeholder,
442
+ fullWidth: !0,
443
+ label: e.label,
444
+ placeholder: e.placeholder,
445
+ setAmount: s,
446
+ setHasValidInput: a
447
+ }
448
+ );
449
+ case R.Date:
450
+ return /* @__PURE__ */ t(ft, { dateAdapter: pt, children: /* @__PURE__ */ t(
451
+ ht,
452
+ {
453
+ maxDate: _t(/* @__PURE__ */ new Date(), 1),
454
+ minDate: /* @__PURE__ */ new Date(),
455
+ onChange: (p) => {
456
+ i[e.name] && Number(i[e.name]) <= 31 ? s(p.getDate()) : s(p);
457
+ },
458
+ sx: {
459
+ "& .MuiPickersDay-today": {
460
+ color: "primary.lighter"
461
+ },
462
+ "& .MuiPickersArrowSwitcher-button": {
463
+ color: "primary.lighter",
464
+ "&:hover": {
465
+ backgroundColor: (p) => mt(p.palette.primary.light, 0.1)
466
+ }
467
+ }
468
+ },
469
+ views: ["day"]
470
+ }
471
+ ) });
472
+ default:
473
+ return /* @__PURE__ */ t(
474
+ Tt,
475
+ {
476
+ defaultValue: i[e.name],
477
+ error: !!r,
478
+ fullWidth: !0,
479
+ helperText: r,
480
+ inputProps: {
481
+ "aria-label": e.placeholder
482
+ },
483
+ onChange: L,
484
+ placeholder: e.placeholder
485
+ }
486
+ );
487
+ }
488
+ }, x = () => {
489
+ i[e.name] !== l && c({
490
+ ...i,
491
+ [e.name]: l
492
+ }), C();
493
+ }, L = (p) => {
494
+ s(p.target.value), e.validation && f(e.validation(p.target.value));
495
+ };
496
+ return /* @__PURE__ */ t(
497
+ V,
498
+ {
499
+ copy: {
500
+ close_aria: _.close_aria,
501
+ title: h(_.edit_field, e.label)
502
+ },
503
+ disablePrimaryButton: !!r || !b,
504
+ isOpen: o,
505
+ onClose: C,
506
+ onPrimaryAction: x,
507
+ primaryText: _.save,
508
+ children: D()
509
+ }
510
+ );
511
+ }, Wt = S(Ut), $t = () => {
512
+ const e = window.app?.config, { onEvent: o } = O(), { selectedAccount: n } = E(), { accounts: c } = y(), i = St(n, c), _ = n.member_is_managed_by_user || !n.member_is_managed_by_user && e.enable_renaming_home_accounts, [l, s] = u.useState(!1), [r, f] = u.useState(i[0]), b = i.filter(
513
+ (a) => _ || n[a.name] || n[a.name] === 0
514
+ );
515
+ return /* @__PURE__ */ d(g, { children: [
516
+ b.map((a) => {
517
+ const C = n[a.name] || n[a.name] === 0, D = b.indexOf(a) === b.length - 1, x = /* @__PURE__ */ t(
518
+ w,
519
+ {
520
+ disableTypography: !0,
521
+ primary: /* @__PURE__ */ t(T, { sx: { fontSize: 11 }, children: a.label }),
522
+ secondary: /* @__PURE__ */ t(T, { bold: !0, sx: { fontSize: 15 }, children: C ? a.valueFormatter(n[a.name]) : a.placeholder })
523
+ }
524
+ );
525
+ return /* @__PURE__ */ t(u.Fragment, { children: _ ? /* @__PURE__ */ d(g, { children: [
526
+ /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper", px: 0 }, children: /* @__PURE__ */ d(
527
+ N,
528
+ {
529
+ onClick: () => {
530
+ f(a), s(!0), a?.event && o(a.event, { account_guid: n.guid });
531
+ },
532
+ children: [
533
+ x,
534
+ /* @__PURE__ */ t(I, { name: "chevron_right" })
535
+ ]
536
+ }
537
+ ) }),
538
+ /* @__PURE__ */ t(M, { sx: { ml: D ? 0 : 24 } })
539
+ ] }) : C && /* @__PURE__ */ d(g, { children: [
540
+ /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper", px: 24 }, children: x }),
541
+ /* @__PURE__ */ t(M, { sx: { ml: D ? 0 : 24 } })
542
+ ] }) }, a.name);
543
+ }),
544
+ l && r && /* @__PURE__ */ t(
545
+ Wt,
546
+ {
547
+ field: r,
548
+ isOpen: l,
549
+ onClose: () => s(!1)
550
+ }
551
+ )
552
+ ] });
553
+ }, Vt = S($t), zt = () => {
554
+ const { onEvent: e } = O();
555
+ return u.useEffect(() => e(k.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ d($, { children: [
556
+ /* @__PURE__ */ t(Vt, {}),
557
+ /* @__PURE__ */ t(Ft, {}),
558
+ /* @__PURE__ */ t(Pt, {})
559
+ ] });
560
+ }, Ht = S(zt), Gt = ({ setTabValue: e }) => {
561
+ const [o, n] = u.useState(!1), { selectedMember: c } = E(), { accounts: i, connect: _ } = y(), l = c.connection_status && Q.includes(c.connection_status);
562
+ if (u.useEffect(() => {
563
+ l && e(1);
564
+ }, [l]), !l) return;
565
+ const s = tt(c, _);
566
+ return /* @__PURE__ */ d(g, { children: [
567
+ /* @__PURE__ */ t(
568
+ wt,
569
+ {
570
+ sx: {
571
+ mb: 16,
572
+ mt: 24,
573
+ mx: 24
574
+ },
575
+ children: /* @__PURE__ */ d(
576
+ Et,
577
+ {
578
+ icon: /* @__PURE__ */ t(q, { filled: !0 }),
579
+ severity: "error",
580
+ sx: {
581
+ borderLeft: 5,
582
+ borderTopLeftRadius: 6,
583
+ borderBottomLeftRadius: 6,
584
+ borderColor: "error.main",
585
+ color: "text.primary",
586
+ "&.MuiPaper-root": {
587
+ backgroundColor: "background.paper"
588
+ }
589
+ },
590
+ children: [
591
+ s.title && /* @__PURE__ */ t(yt, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: s.title }),
592
+ /* @__PURE__ */ t(T, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: s.main }),
593
+ s.cta && /* @__PURE__ */ t(
594
+ xt,
595
+ {
596
+ onClick: () => n(!0),
597
+ sx: { fontSize: 15, fontWeight: 600, ml: 0 },
598
+ children: s.cta
599
+ }
600
+ )
601
+ ]
602
+ }
603
+ )
604
+ }
605
+ ),
606
+ o && /* @__PURE__ */ t(
607
+ Z,
608
+ {
609
+ loadWidgetProps: { current_member_guid: c.guid },
610
+ onClose: () => n(!1),
611
+ showConnectWidget: o,
612
+ title: i.manage_connection
613
+ }
614
+ )
615
+ ] });
616
+ }, Bt = S(Gt), Kt = () => {
617
+ const [e, o] = u.useState(""), { onEvent: n } = O(), { selectedAccount: c } = E(), { accounts: i } = y(), { isTransactionDataLoaded: _, loadTransactionData: l, setFilter: s, sortedTransactions: r } = X();
618
+ u.useEffect(() => {
619
+ _ || l().finally();
620
+ }, []);
621
+ const f = u.useMemo(
622
+ () => r.find((b) => b.guid === e),
623
+ [e, r]
624
+ );
625
+ return u.useEffect(() => {
626
+ s({
627
+ dateRange: { start: kt(It(), 90), end: Mt() },
628
+ accounts: [c.guid]
629
+ });
630
+ }, [c]), u.useEffect(() => n(k.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), []), /* @__PURE__ */ d(g, { children: [
631
+ /* @__PURE__ */ t(vt, { onClick: o }),
632
+ f && /* @__PURE__ */ t(
633
+ J,
634
+ {
635
+ ariaLabelClose: i.close_drawer,
636
+ isOpen: !!e,
637
+ onClose: () => o(""),
638
+ title: i.transaction_drawer_title,
639
+ children: /* @__PURE__ */ t(Lt, { transaction: f })
640
+ }
641
+ )
642
+ ] });
643
+ }, jt = S(Kt), Yt = () => {
644
+ const [e, o] = u.useState(0), { accounts: n } = y();
645
+ return /* @__PURE__ */ d(g, { children: [
646
+ /* @__PURE__ */ t(Bt, { setTabValue: o }),
647
+ /* @__PURE__ */ d(
648
+ nt,
649
+ {
650
+ "aria-label": n.transactions_and_details_aria,
651
+ centered: !0,
652
+ onChange: (c, i) => o(i),
653
+ textColor: "primary",
654
+ value: e,
655
+ variant: "fullWidth",
656
+ children: [
657
+ /* @__PURE__ */ t(
658
+ H,
659
+ {
660
+ "aria-controls": "transaction-details-tabpanel-0",
661
+ id: "transaction-details-tab-0",
662
+ label: n.transactions
663
+ }
664
+ ),
665
+ /* @__PURE__ */ t(
666
+ H,
667
+ {
668
+ "aria-controls": "account-details-tabpanel-1",
669
+ id: "account-details-tab-1",
670
+ label: n.account_details
671
+ }
672
+ )
673
+ ]
674
+ }
675
+ ),
676
+ /* @__PURE__ */ t(j, { index: 0, name: "transaction-details", value: e, children: /* @__PURE__ */ t(jt, {}) }),
677
+ /* @__PURE__ */ t(j, { index: 1, name: "account-details", value: e, children: /* @__PURE__ */ t(Ht, {}) })
678
+ ] });
679
+ }, He = S(Yt);
680
+ export {
681
+ He as A,
682
+ Nt as u
683
+ };