@mx-cartographer/experiences 6.26.32 → 7.0.0-alpha.mega1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Account-DY6nxO7y.mjs +30 -0
  3. package/dist/AccountDetailsContent-DvPs81kL.mjs +677 -0
  4. package/dist/AccountDetailsHeader-W2U7ZVm_.mjs +119 -0
  5. package/dist/AccountFields-DAVcbZy5.mjs +135 -0
  6. package/dist/AccountListItem-DFlbdcmT.mjs +90 -0
  7. package/dist/AccountStore-CU7qV3vg.mjs +230 -0
  8. package/dist/Accounts-BLlrQA5m.mjs +9 -0
  9. package/dist/BeatApi-DLu87ijw.mjs +21 -0
  10. package/dist/BeatStore-By4aGoRM.mjs +81 -0
  11. package/dist/BudgetUtil-Ci1TN0J5.mjs +101 -0
  12. package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
  13. package/dist/Category-5S6uwuXz.mjs +301 -0
  14. package/dist/CategorySelectorDrawer-rHyHHYuh.mjs +397 -0
  15. package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
  16. package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
  17. package/dist/ConnectDrawer-D9cR5phc.mjs +508 -0
  18. package/dist/ConnectionsDrawer-BzGqljSp.mjs +52 -0
  19. package/dist/CurrencyInput-D74cemI2.mjs +83 -0
  20. package/dist/CurrencyText-YUhH2caW.mjs +20 -0
  21. package/dist/DateUtil-BcuH7ErC.mjs +48 -0
  22. package/dist/DebtsStore-S0l9kr0r.mjs +60 -0
  23. package/dist/Dialog-CWW597AF.mjs +123 -0
  24. package/dist/Donut-1UMNcG67.mjs +57 -0
  25. package/dist/Drawer-kEE73B87.mjs +113 -0
  26. package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
  27. package/dist/Fetch-CkFKy79O.mjs +116 -0
  28. package/dist/FinstrongStore-mkALvztw.mjs +101 -0
  29. package/dist/GoalStore-DioeeL-s.mjs +263 -0
  30. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  31. package/dist/Help-DhcC-C05.mjs +320 -0
  32. package/dist/Help-DpYRO8oA.mjs +3181 -0
  33. package/dist/IconBacking-B9oC6uL2.mjs +39 -0
  34. package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
  35. package/dist/LineChart-CcyX38kK.mjs +499 -0
  36. package/dist/ListItemAction-BabpYivr.mjs +69 -0
  37. package/dist/Loader-Dp1P2gNw.mjs +14 -0
  38. package/dist/Localization-2MODESHW.mjs +30 -0
  39. package/dist/ManageIncome-ndMuhJMG.mjs +535 -0
  40. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  41. package/dist/MicroWidgetContainer-CsvHLYKX.mjs +45 -0
  42. package/dist/MiniWidgetContainer-BoOp-A05.mjs +39 -0
  43. package/dist/NetWorthStore-PD-RUe09.mjs +150 -0
  44. package/dist/Notification-AMGWM1Al.mjs +78 -0
  45. package/dist/NotificationSettings-VhHuMAFU.mjs +667 -0
  46. package/dist/NotificationStore-DHtSGySy.mjs +67 -0
  47. package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
  48. package/dist/OriginalBalanceAction-D39mx6uE.mjs +115 -0
  49. package/dist/RecurringSettings-D_HnMYZP.mjs +57 -0
  50. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
  51. package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
  52. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  53. package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
  54. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
  55. package/dist/SpendingData-BkrxzHdr.mjs +55 -0
  56. package/dist/StatusBar-BK_uYHAB.mjs +30 -0
  57. package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
  58. package/dist/Transaction-CA0FW2Ij.mjs +312 -0
  59. package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
  60. package/dist/TransactionDetails-WBHFmbxL.mjs +1283 -0
  61. package/dist/TransactionStore-CeLdmVnC.mjs +669 -0
  62. package/dist/TrendsStore-BHJUapXF.mjs +487 -0
  63. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
  64. package/dist/WidgetContainer-DWCusxYI.mjs +556 -0
  65. package/dist/accounts/index.es.js +752 -0
  66. package/dist/analytics/index.es.js +171 -0
  67. package/dist/budgets/index.es.js +1075 -0
  68. package/dist/cashflow/index.es.js +1098 -0
  69. package/dist/categories/index.es.js +9 -0
  70. package/dist/common/context/hooks.d.ts +13 -13
  71. package/dist/common/index.es.js +1451 -0
  72. package/dist/dashboard/index.es.js +181 -0
  73. package/dist/debts/index.es.js +1460 -0
  74. package/dist/exportTransactionsToCSV-CmwsKl2D.mjs +47 -0
  75. package/dist/finstrong/index.es.js +1455 -0
  76. package/dist/goals/index.es.js +1209 -0
  77. package/dist/help/components/content/section/index.d.ts +15 -15
  78. package/dist/help/index.es.js +14 -0
  79. package/dist/hooks-30y_BLwc.mjs +71 -0
  80. package/dist/index.d.ts +0 -22
  81. package/dist/insights/index.d.ts +1 -0
  82. package/dist/insights/index.es.js +4 -0
  83. package/dist/investments/index.es.js +1638 -0
  84. package/dist/merchants/index.es.js +79 -0
  85. package/dist/microinsights/index.es.js +16 -0
  86. package/dist/networth/index.es.js +576 -0
  87. package/dist/notifications/index.es.js +192 -0
  88. package/dist/recurringtransactions/index.es.js +879 -0
  89. package/dist/settings/index.es.js +879 -0
  90. package/dist/spending/index.es.js +570 -0
  91. package/dist/transactions/index.es.js +587 -0
  92. package/dist/trends/index.es.js +1086 -0
  93. package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
  94. package/dist/useDimensions-27p2evRx.mjs +36 -0
  95. package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
  96. package/package.json +155 -3
  97. package/dist/index.es.js +0 -30508
  98. package/dist/index.es.js.map +0 -1
@@ -0,0 +1,587 @@
1
+ import { T as _a } from "../TransactionApi-DbbcjI2L.mjs";
2
+ import { u as H, C as Ee, D as Me, M as ke, c as Le, T as Re, a as He } from "../TransactionDetails-WBHFmbxL.mjs";
3
+ import { B as ga, d as ha, b as Ca } from "../TransactionDetails-WBHFmbxL.mjs";
4
+ import { T as E } from "../Transaction-CA0FW2Ij.mjs";
5
+ import { O as ya } from "../Transaction-CA0FW2Ij.mjs";
6
+ import { S as Z, D as Be } from "../TransactionStore-CeLdmVnC.mjs";
7
+ import { T as Ta } from "../TransactionStore-CeLdmVnC.mjs";
8
+ import { e as Pe } from "../exportTransactionsToCSV-CmwsKl2D.mjs";
9
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
10
+ import m from "react";
11
+ import { observer as S } from "mobx-react-lite";
12
+ import $e from "@mui/material/Paper";
13
+ import { DataGridPro as Ve } from "@mui/x-data-grid-pro";
14
+ import A from "@mui/material/Box";
15
+ import { useTheme as We } from "@mui/material/styles";
16
+ import { Text as C, Icon as R, MerchantLogo as Ge, TextField as ee, P as Ue } from "@mxenabled/mxui";
17
+ import { n as B, u as x, a as z, c as oe, k as Fe, j as ze, g as Ke, o as je } from "../hooks-30y_BLwc.mjs";
18
+ import { fromUnixTime as qe } from "date-fns/fromUnixTime";
19
+ import { f as Xe, D as Ye, a as re } from "../Dialog-CWW597AF.mjs";
20
+ import N from "@mui/material/Stack";
21
+ import { f as se } from "../NumberFormatting-CtWHhyBX.mjs";
22
+ import { L as K } from "../Loader-Dp1P2gNw.mjs";
23
+ import { endOfMonth as Je } from "date-fns/endOfMonth";
24
+ import { getUnixTime as Qe } from "date-fns/getUnixTime";
25
+ import { startOfMonth as Ze } from "date-fns/startOfMonth";
26
+ import { startOfToday as F } from "date-fns/startOfToday";
27
+ import et from "@mui/material/styles/useTheme";
28
+ import { j as tt } from "../ConnectDrawer-D9cR5phc.mjs";
29
+ import at from "@mui/material/Divider";
30
+ import nt from "@mui/material/MenuItem";
31
+ import ot from "@mui/material/RadioGroup";
32
+ import rt from "@mui/icons-material/ExpandMore";
33
+ import { C as st } from "../CurrencyInput-D74cemI2.mjs";
34
+ import { a as it, u as ct } from "../CategorySelectorDrawer-rHyHHYuh.mjs";
35
+ import { b as te } from "../Localization-2MODESHW.mjs";
36
+ import { A as T, W as lt } from "../WidgetContainer-DWCusxYI.mjs";
37
+ import { u as dt } from "../useScreenSize-B6JyS_Lj.mjs";
38
+ import { S as ut } from "../SearchBox-B2_zLv8-.mjs";
39
+ import { D as ae } from "../Drawer-kEE73B87.mjs";
40
+ const mt = (t) => /* @__PURE__ */ p(C, { tabIndex: t.tabIndex, variant: "Small", children: [
41
+ `${t.row.account}`,
42
+ t.row.number && ` | ${t.row.number}`
43
+ ] }), _t = (t) => {
44
+ const { associatedBeats: r } = B(), { showInsights: n } = H(), { amount: a, transaction_type: s } = t.row, l = r.find((g) => g.associated_transaction_guid === t.row.guid), d = s === E.CREDIT;
45
+ return /* @__PURE__ */ p(N, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
46
+ /* @__PURE__ */ p(C, { color: d ? "success.main" : "text.primary", variant: "Small", children: [
47
+ d ? "+" : "",
48
+ se(a, "0,0.00")
49
+ ] }),
50
+ l && n && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
51
+ ] });
52
+ }, pt = (t) => {
53
+ const { transactions: r } = x(), [n, a] = m.useState(!1);
54
+ return /* @__PURE__ */ p(
55
+ N,
56
+ {
57
+ alignItems: "center",
58
+ direction: "row",
59
+ gap: 8,
60
+ height: "100%",
61
+ onMouseEnter: () => a(!0),
62
+ onMouseLeave: () => a(!1),
63
+ width: "100%",
64
+ children: [
65
+ t.row.has_been_split && /* @__PURE__ */ e(R, { name: "call_split", size: 16 }),
66
+ /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ? r.split_transaction_category_label : t.row.category }),
67
+ !t.row.has_been_split && n && /* @__PURE__ */ e(R, { name: "edit", sx: { color: "action.active" } })
68
+ ]
69
+ }
70
+ );
71
+ }, gt = S(pt), ht = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: Xe(qe(t.row.date), Ye.MONTH_DAY) }), Ct = (t) => {
72
+ const r = We(), { transactions: n } = x(), { is_flagged: a, is_hidden: s, has_been_viewed: l, parent_guid: d } = t.row, _ = !l && !!!d;
73
+ return /* @__PURE__ */ p(
74
+ A,
75
+ {
76
+ "aria-label": s ? n.is_hidden : n.is_flagged,
77
+ tabIndex: t.tabIndex,
78
+ children: [
79
+ a && /* @__PURE__ */ e(R, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
80
+ !a && s && /* @__PURE__ */ e(R, { name: "visibility_off", size: 16 }),
81
+ _ && /* @__PURE__ */ e(
82
+ "svg",
83
+ {
84
+ "data-testid": "svg",
85
+ style: {
86
+ display: "inline-block",
87
+ height: 16,
88
+ fill: r.palette.primary.light,
89
+ verticalAlign: "middle",
90
+ width: 16
91
+ },
92
+ viewBox: "0 0 512 512",
93
+ children: /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "60" })
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }, ft = S(Ct), O = (t) => /* @__PURE__ */ e(C, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), yt = (t) => /* @__PURE__ */ p(N, { alignItems: "center", direction: "row", gap: 8, children: [
100
+ /* @__PURE__ */ e(
101
+ Ge,
102
+ {
103
+ categoryGuid: t.row.top_level_category_guid || "",
104
+ merchantGuid: t.row.merchant_guid || ""
105
+ }
106
+ ),
107
+ /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.payee })
108
+ ] }), bt = ({
109
+ height: t = "100dvh",
110
+ onCategoryClick: r,
111
+ onRowClick: n
112
+ }) => {
113
+ const { transactions: a } = x(), { isCopyLoaded: s } = z(), { isLoading: l, sortedTransactions: d } = B(), { clearExpandedSplits: g, toggleSplit: _ } = H();
114
+ m.useEffect(() => () => g(), []);
115
+ const h = m.useMemo(
116
+ () => d.map((i) => ({
117
+ id: i.guid,
118
+ isHovering: !1,
119
+ ...i
120
+ })),
121
+ [d]
122
+ ), u = ({ row: { id: i, guid: w, has_been_split: I }, field: v }) => I ? _(i) : v === "category" ? r?.(w) : n?.(w);
123
+ if (!s)
124
+ return /* @__PURE__ */ e(K, {});
125
+ const f = [
126
+ {
127
+ field: "flag",
128
+ headerName: "",
129
+ minWidth: 32,
130
+ width: 32,
131
+ sortable: !1,
132
+ renderCell: (i) => /* @__PURE__ */ e(ft, { ...i }),
133
+ renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": a.transaction_status, role: "presentation" })
134
+ },
135
+ {
136
+ field: "date",
137
+ headerName: a.date_title,
138
+ width: 103,
139
+ renderHeader: O,
140
+ renderCell: (i) => i.row.parent_guid ? null : /* @__PURE__ */ e(ht, { ...i }),
141
+ sortingOrder: ["desc", "asc"]
142
+ },
143
+ {
144
+ cellClassName: "vertical-align-center",
145
+ field: "payee",
146
+ headerName: a.payee_title,
147
+ flex: 0.33,
148
+ renderHeader: O,
149
+ renderCell: yt,
150
+ sortingOrder: ["asc", "desc"]
151
+ },
152
+ {
153
+ field: "category",
154
+ headerName: a.category_title,
155
+ flex: 0.25,
156
+ renderHeader: O,
157
+ renderCell: (i) => /* @__PURE__ */ e(gt, { ...i }),
158
+ sortingOrder: ["asc", "desc"]
159
+ },
160
+ {
161
+ field: "account",
162
+ headerName: a.account_title,
163
+ flex: 0.33,
164
+ renderHeader: O,
165
+ renderCell: (i) => i.row.parent_guid ? null : /* @__PURE__ */ e(mt, { ...i }),
166
+ sortingOrder: ["asc", "desc"]
167
+ },
168
+ {
169
+ field: "amount",
170
+ headerName: a.amount_title,
171
+ flex: 0.25,
172
+ renderHeader: O,
173
+ renderCell: _t,
174
+ align: "right",
175
+ headerAlign: "right",
176
+ sortingOrder: ["asc", "desc"]
177
+ }
178
+ ];
179
+ return /* @__PURE__ */ e($e, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
180
+ Ve,
181
+ {
182
+ columns: f,
183
+ disableColumnFilter: !0,
184
+ disableColumnMenu: !0,
185
+ getCellClassName: (i) => i.row.parent_guid ? "split-row" : "",
186
+ hideFooter: !0,
187
+ initialState: { sorting: { sortModel: [{ field: "date", sort: "desc" }] } },
188
+ loading: l,
189
+ onCellClick: u,
190
+ rows: h,
191
+ slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
192
+ sx: {
193
+ "& .split-row": {
194
+ bgcolor: "background.default"
195
+ }
196
+ }
197
+ }
198
+ ) });
199
+ }, Tt = S(bt), At = ({ copy: t, isOpen: r, onClose: n, onPrimaryAction: a }) => {
200
+ const { common: s, transactions: l } = x(), { isCopyLoaded: d } = z();
201
+ return d ? /* @__PURE__ */ p(
202
+ re,
203
+ {
204
+ copy: {
205
+ title: t.title
206
+ },
207
+ isOpen: r,
208
+ onClose: n,
209
+ onPrimaryAction: a,
210
+ primaryText: l.add_manual_account,
211
+ secondaryText: s.cancel_button,
212
+ children: [
213
+ /* @__PURE__ */ e(C, { component: "p", sx: { marginBottom: "20px" }, truncate: !1, children: l.add_account_modal_message }),
214
+ /* @__PURE__ */ e(C, { component: "p", truncate: !1, children: l.add_account_modal_cta })
215
+ ]
216
+ }
217
+ ) : /* @__PURE__ */ e(K, {});
218
+ }, St = S(At), xt = () => {
219
+ const { visibleAccounts: t } = oe(), { common: r, transactions: n } = x(), { manualTransaction: a, setIsAmountValid: s, updateManualTransaction: l } = H(), [d, g] = m.useState(""), [_, h] = m.useState(""), u = m.useMemo(
220
+ () => t.filter((o) => o.is_manual),
221
+ [t]
222
+ ).map((o) => ({
223
+ label: `${o.name} | ${se(o.balance, "0,0.00")}`,
224
+ value: o.guid
225
+ })), f = {
226
+ error_amount_is_invalid: r.currency_input.error_amount_is_invalid,
227
+ error_amount_must_be_equal_to: r.currency_input.error_amount_must_be_equal_to,
228
+ error_amount_must_be_less_than_or_equal_to: r.currency_input.error_amount_must_be_less_than_or_equal_to,
229
+ enter_amount: r.currency_input.enter_amount
230
+ }, i = (o) => {
231
+ g(o), l({ ...a, amount: Number(o) });
232
+ }, w = (o, P) => {
233
+ l({ ...a, transaction_type: Number(P) });
234
+ }, I = (o) => {
235
+ h(o), l({ ...a, payee: o, description: o });
236
+ }, v = (o) => {
237
+ l({ ...a, account_guid: o });
238
+ };
239
+ return /* @__PURE__ */ p(A, { className: "mx-txn-manual-transaction-details", children: [
240
+ /* @__PURE__ */ p(N, { gap: 40, mx: 24, my: 32, children: [
241
+ /* @__PURE__ */ p(
242
+ N,
243
+ {
244
+ direction: "row",
245
+ sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
246
+ children: [
247
+ /* @__PURE__ */ e(
248
+ st,
249
+ {
250
+ allowDecimals: !0,
251
+ amount: d,
252
+ ariaLabel: n.amount_title,
253
+ copy: f,
254
+ inputProps: {
255
+ noValidate: !0
256
+ },
257
+ label: n.amount_title,
258
+ setAmount: i,
259
+ setHasValidInput: s,
260
+ sx: { bgcolor: "background.paper" },
261
+ type: "number"
262
+ }
263
+ ),
264
+ /* @__PURE__ */ e(ot, { name: "TransactionType", onChange: w, row: !0, children: /* @__PURE__ */ p(N, { alignItems: "center", direction: "row", children: [
265
+ /* @__PURE__ */ e(
266
+ Z,
267
+ {
268
+ checked: a.transaction_type === E.CREDIT,
269
+ label: n.manual_transaction_credit_button_label,
270
+ sx: { ml: { xs: 0, sm: 8 } },
271
+ tooltip: n.manual_transaction_credit_button_tooltip,
272
+ value: E.CREDIT
273
+ }
274
+ ),
275
+ /* @__PURE__ */ e(
276
+ Z,
277
+ {
278
+ checked: a.transaction_type === E.DEBIT,
279
+ label: n.manual_transaction_debit_button_label,
280
+ tooltip: n.manual_transaction_debit_button_tooltip,
281
+ value: E.DEBIT
282
+ }
283
+ )
284
+ ] }) })
285
+ ]
286
+ }
287
+ ),
288
+ /* @__PURE__ */ e(
289
+ ee,
290
+ {
291
+ label: n.payee_title,
292
+ name: "payee",
293
+ onChange: (o) => I(o.target.value),
294
+ sx: { bgcolor: "background.paper" },
295
+ value: _
296
+ }
297
+ ),
298
+ /* @__PURE__ */ e(
299
+ ee,
300
+ {
301
+ InputLabelProps: { shrink: !0 },
302
+ SelectProps: { defaultValue: -1, IconComponent: rt },
303
+ label: n.manual_transaction_select_an_account,
304
+ onChange: (o) => v(o.target.value),
305
+ placeholder: n.manual_transaction_select,
306
+ select: !0,
307
+ sx: { bgcolor: "background.paper" },
308
+ children: u.map((o) => /* @__PURE__ */ e(nt, { value: o.value, children: o.label }, o.value))
309
+ }
310
+ )
311
+ ] }),
312
+ /* @__PURE__ */ e(at, { light: !0 }),
313
+ /* @__PURE__ */ p(A, { bgcolor: "background.paper", children: [
314
+ /* @__PURE__ */ e(Ee, { transaction: a }),
315
+ /* @__PURE__ */ e(Me, { transaction: a }),
316
+ /* @__PURE__ */ e(ke, { transaction: a }),
317
+ /* @__PURE__ */ e(Le, { transaction: a })
318
+ ] })
319
+ ] });
320
+ }, wt = S(xt), It = ({ onClose: t, transaction: r }) => {
321
+ const { addOrUpdateTransactionRule: n, updateTransaction: a } = B(), { transactions: s } = x(), { categories: l } = Fe(), [d, g] = m.useState(""), _ = m.useMemo(
322
+ () => l.find((u) => u.guid === d),
323
+ [d]
324
+ ), h = async (u) => {
325
+ await a({ ...r, category_guid: d }), u && await n(d, r), g(""), t();
326
+ };
327
+ return /* @__PURE__ */ p(A, { className: "mx-txn-edit-category-action", children: [
328
+ /* @__PURE__ */ e(
329
+ it,
330
+ {
331
+ initialSelected: r.category_guid,
332
+ onClose: t,
333
+ onSelect: (u) => g(u),
334
+ showDrawer: !!r,
335
+ title: s.actions_select_a_category
336
+ }
337
+ ),
338
+ /* @__PURE__ */ e(
339
+ re,
340
+ {
341
+ copy: {
342
+ title: te(
343
+ s.actions_apply_to_all_transaction_types,
344
+ r.description
345
+ )
346
+ },
347
+ isOpen: !!d,
348
+ onClose: () => h(!1),
349
+ onPrimaryAction: () => h(!0),
350
+ onSecondaryAction: () => h(!1),
351
+ primaryText: s.actions_apply_to_all,
352
+ secondaryText: s.actions_this_time_only,
353
+ children: /* @__PURE__ */ e(Ue, { variant: "Paragraph", children: te(
354
+ s.actions_all_past_and_future,
355
+ r.description,
356
+ _?.name
357
+ ) })
358
+ }
359
+ )
360
+ ] });
361
+ }, vt = S(It), ne = 120, Dt = ({
362
+ onBackClick: t,
363
+ height: r = "100dvh",
364
+ showInsights: n = !1,
365
+ sx: a = {}
366
+ }) => {
367
+ const { visibleAccounts: s, refreshAccounts: l } = oe(), { is_mobile_webview: d } = ze(), { setSearchValue: g } = ct(), { onEvent: _ } = Ke(), { common: h, transactions: u } = x(), {
368
+ displayedDateRange: f,
369
+ isCopyLoaded: i,
370
+ isInitialized: w,
371
+ selectedAccountGuids: I,
372
+ setDisplayedDate: v,
373
+ setSelectedAccounts: o
374
+ } = z(), { isDesktop: P } = dt(), M = et(), {
375
+ addTransaction: ie,
376
+ filter: j,
377
+ loadAssociatedBeats: ce,
378
+ setFilter: $,
379
+ sortedTransactionsWithSplits: le,
380
+ tags: de,
381
+ transactions: ue,
382
+ updateTransaction: me
383
+ } = B(), {
384
+ manualTransaction: k,
385
+ isAmountValid: _e,
386
+ searchValue: pe,
387
+ setSearchValue: ge,
388
+ setShowInsights: he,
389
+ updateManualTransaction: Ce
390
+ } = H(), { userProfile: fe } = je(), [V, y] = m.useState(""), [q, L] = m.useState(""), [ye, W] = m.useState(!1), [be, X] = m.useState(!1), [G, Te] = m.useState(!1);
391
+ m.useEffect(() => {
392
+ const c = s.filter((D) => !D.is_hidden), J = Ze(F()), Q = Je(F());
393
+ o(c), v(J, Q), $({
394
+ accounts: c.map((D) => D.guid),
395
+ custom: (D) => !D.accountIsClosed && !D.accountIsHidden,
396
+ dateRange: { start: J, end: Q }
397
+ }), Te(!0), _(T.TRANSACTIONS_VIEW);
398
+ }, [s]), m.useEffect(() => {
399
+ G && ($({
400
+ ...j,
401
+ accounts: I,
402
+ dateRange: { start: f.start, end: f.end }
403
+ }), ce(f.start).finally());
404
+ }, [G, f, I]), m.useEffect(() => {
405
+ he(n);
406
+ }, [n]);
407
+ const Ae = m.useMemo(
408
+ () => s.filter((c) => c.is_manual),
409
+ [s]
410
+ ), b = q ? ue.find((c) => c.guid === q) : void 0, Y = _e && !!k.payee && !!k.account_guid && !!k.category_guid, Se = (c) => {
411
+ v(c[0], c[1]);
412
+ }, xe = (c) => {
413
+ ge(c), $({
414
+ ...j,
415
+ searchTerm: c
416
+ }), _(T.TRANSACTIONS_CLICK_SEARCH, { search_term: c });
417
+ }, we = () => {
418
+ Pe(le, de), _(T.TRANSACTIONS_CLICK_EXPORT);
419
+ }, Ie = () => {
420
+ Ae.length > 0 ? (Ce({
421
+ ...Be,
422
+ date: Qe(F()),
423
+ user_guid: fe?.user_guid || ""
424
+ }), y(
425
+ "addTransaction"
426
+ /* AddTransaction */
427
+ ), _(T.TRANSACTIONS_CLICK_ADD)) : (W(!0), _(T.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
428
+ }, ve = async () => {
429
+ Y && await ie(k), y("");
430
+ }, De = () => {
431
+ W(!1), X(!0);
432
+ }, Ne = async () => {
433
+ X(!1), await l();
434
+ }, Oe = async () => {
435
+ b && !b.has_been_viewed && await me({ ...b, has_been_viewed: !0 }), y("");
436
+ };
437
+ if (!i || !w || !G)
438
+ return /* @__PURE__ */ e(K, {});
439
+ const U = [];
440
+ return !d && P && U.push({
441
+ iconName: "open_in_new",
442
+ label: u.export_csv_btn,
443
+ onClick: we
444
+ }), U.push({
445
+ iconName: "add",
446
+ label: u.add_transaction_btn,
447
+ onClick: Ie
448
+ }), /* @__PURE__ */ p(
449
+ lt,
450
+ {
451
+ accountOptions: s,
452
+ actions: U,
453
+ calendarActions: {
454
+ onRangeChanged: Se
455
+ },
456
+ onAccountsFilterClick: () => _(T.ACCOUNTS_CLICK_FILTER),
457
+ onBackClick: t,
458
+ sx: a,
459
+ title: u.transactions_title,
460
+ children: [
461
+ /* @__PURE__ */ e(A, { mt: 16, children: /* @__PURE__ */ e(
462
+ ut,
463
+ {
464
+ onChange: xe,
465
+ placeholder: u.action_bar_search_placeholder,
466
+ searchValue: pe
467
+ }
468
+ ) }),
469
+ /* @__PURE__ */ e(
470
+ A,
471
+ {
472
+ sx: {
473
+ [M.breakpoints.down("md")]: { display: "none" },
474
+ [M.breakpoints.up("md")]: { display: "block" }
475
+ },
476
+ children: /* @__PURE__ */ e(
477
+ Tt,
478
+ {
479
+ height: `calc(${r} - ${ne}px)`,
480
+ onCategoryClick: (c) => {
481
+ L(c), y(
482
+ "category"
483
+ /* Category */
484
+ );
485
+ },
486
+ onRowClick: (c) => {
487
+ L(c), y(
488
+ "transaction"
489
+ /* Transaction */
490
+ ), _(T.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: c });
491
+ }
492
+ }
493
+ )
494
+ }
495
+ ),
496
+ /* @__PURE__ */ e(
497
+ A,
498
+ {
499
+ sx: {
500
+ [M.breakpoints.down("md")]: { display: "block" },
501
+ [M.breakpoints.up("md")]: { display: "none" }
502
+ },
503
+ children: /* @__PURE__ */ e(
504
+ Re,
505
+ {
506
+ height: `calc(${r} - ${ne}px)`,
507
+ onClick: (c) => {
508
+ L(c), y(
509
+ "transaction"
510
+ /* Transaction */
511
+ );
512
+ },
513
+ showHiddenTransactions: !0,
514
+ showInsights: n
515
+ }
516
+ )
517
+ }
518
+ ),
519
+ /* @__PURE__ */ e(
520
+ ae,
521
+ {
522
+ ariaLabelClose: h.close_aria,
523
+ isOpen: V === "transaction" && !!b,
524
+ onClose: Oe,
525
+ title: u.details_title,
526
+ children: b && /* @__PURE__ */ e(He, { transaction: b })
527
+ }
528
+ ),
529
+ b && V === "category" && /* @__PURE__ */ e(
530
+ vt,
531
+ {
532
+ onClose: () => {
533
+ g(""), y(""), L("");
534
+ },
535
+ transaction: b
536
+ }
537
+ ),
538
+ /* @__PURE__ */ e(
539
+ ae,
540
+ {
541
+ ariaLabelClose: h.close_aria,
542
+ isOpen: V === "addTransaction",
543
+ isPrimaryDisabled: !Y,
544
+ onClose: () => y(""),
545
+ onPrimaryAction: ve,
546
+ title: u.add_transaction_title,
547
+ children: /* @__PURE__ */ e(wt, {})
548
+ }
549
+ ),
550
+ /* @__PURE__ */ e(
551
+ St,
552
+ {
553
+ copy: { title: u.add_manual_account },
554
+ isOpen: ye,
555
+ onClose: () => {
556
+ W(!1);
557
+ },
558
+ onPrimaryAction: De
559
+ }
560
+ ),
561
+ /* @__PURE__ */ e(
562
+ tt,
563
+ {
564
+ onClose: Ne,
565
+ showConnectWidget: be,
566
+ title: u.add_manual_account
567
+ }
568
+ )
569
+ ]
570
+ }
571
+ );
572
+ }, da = S(Dt);
573
+ export {
574
+ St as AddAccountModal,
575
+ ga as BottomActions,
576
+ ya as TRANSACTION_EVENTS,
577
+ ha as TopActions,
578
+ _a as TransactionApi,
579
+ He as TransactionDetails,
580
+ Re as TransactionList,
581
+ Ca as TransactionRow,
582
+ Ta as TransactionStore,
583
+ Tt as TransactionTable,
584
+ da as TransactionWidget,
585
+ Pe as exportTransactionsToCSV,
586
+ H as useTransactionsUiStore
587
+ };