@mx-cartographer/experiences 7.5.1 → 7.5.3

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.
@@ -1,59 +1,59 @@
1
1
  import { T as Sa } from "../TransactionApi-CjBoLleL.mjs";
2
- import { b as W, C as Pe, D as We, M as $e, d as Ve, u as Ge, T as Ue, a as Fe } from "../TransactionDetails-m5PddMQn.mjs";
3
- import { B as wa, e as Ia, c as va } from "../TransactionDetails-m5PddMQn.mjs";
4
- import { T as M } from "../User-Cnlegl1N.mjs";
2
+ import { u as W, C as Pe, D as We, M as $e, c as Ve, T as Ge, a as Ue } from "../TransactionDetails-h9zr6QKo.mjs";
3
+ import { B as wa, d as Ia, b as va } from "../TransactionDetails-h9zr6QKo.mjs";
4
+ import { T as k } from "../User-Cnlegl1N.mjs";
5
5
  import { O as Na } from "../User-Cnlegl1N.mjs";
6
- import { S as ae, D as ze } from "../TransactionStore-PRlwE-TF.mjs";
6
+ import { S as ae, D as Fe } from "../TransactionStore-PRlwE-TF.mjs";
7
7
  import { T as Oa } from "../TransactionStore-PRlwE-TF.mjs";
8
- import { e as Ke } from "../exportTransactionsToCSV-DuAaI5XA.mjs";
9
- import { E as ka } from "../ExportCsvAction-Cglo8Mca.mjs";
10
- import { jsxs as _, jsx as e } from "react/jsx-runtime";
11
- import u from "react";
8
+ import { e as ze } from "../exportTransactionsToCSV-DuAaI5XA.mjs";
9
+ import { E as Ma } from "../ExportCsvAction-Cglo8Mca.mjs";
10
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
11
+ import m from "react";
12
12
  import { observer as x } from "mobx-react-lite";
13
- import qe from "@mui/material/Paper";
14
- import { DataGridPro as je } from "@mui/x-data-grid-pro";
13
+ import Ke from "@mui/material/Paper";
14
+ import { DataGridPro as qe } from "@mui/x-data-grid-pro";
15
15
  import S from "@mui/material/Box";
16
- import { useTheme as Xe } from "@mui/material/styles";
17
- import { Text as C, Icon as P, MerchantLogo as Ye, TextField as ne, P as Je } from "@mxenabled/mxui";
18
- import { h as $, u as w, b as j, d as se, m as Qe, a as Ze, g as et, o as tt } from "../hooks-ZMp65DFz.mjs";
19
- import { fromUnixTime as at } from "date-fns/fromUnixTime";
20
- import { f as nt, a as ot, D as ie } from "../Dialog-BPTr3qHE.mjs";
16
+ import { useTheme as je } from "@mui/material/styles";
17
+ import { Text as y, Icon as P, MerchantLogo as Xe, TextField as ne, P as Ye } from "@mxenabled/mxui";
18
+ import { h as $, u as w, b as j, d as se, m as Je, a as Qe, g as Ze, o as et } from "../hooks-ZMp65DFz.mjs";
19
+ import { fromUnixTime as tt } from "date-fns/fromUnixTime";
20
+ import { f as at, a as nt, D as ie } from "../Dialog-BPTr3qHE.mjs";
21
21
  import N from "@mui/material/Stack";
22
22
  import { f as ce } from "../NumberFormatting-DjTD0t3W.mjs";
23
23
  import { L as X } from "../Loader-DUaFpDGv.mjs";
24
- import { endOfMonth as rt } from "date-fns/endOfMonth";
25
- import { getUnixTime as st } from "date-fns/getUnixTime";
26
- import { startOfMonth as it } from "date-fns/startOfMonth";
24
+ import { endOfMonth as ot } from "date-fns/endOfMonth";
25
+ import { getUnixTime as rt } from "date-fns/getUnixTime";
26
+ import { startOfMonth as st } from "date-fns/startOfMonth";
27
27
  import { startOfToday as K } from "date-fns/startOfToday";
28
- import ct from "@mui/material/styles/useTheme";
29
- import { l as lt } from "../ConnectDrawer-BkvlItWx.mjs";
30
- import dt from "@mui/material/Divider";
31
- import ut from "@mui/material/MenuItem";
32
- import mt from "@mui/material/RadioGroup";
33
- import { ExpandMore as _t } from "@mxenabled/mx-icons";
34
- import { C as pt } from "../CurrencyInput-itK0R3wV.mjs";
35
- import { a as gt, u as ht } from "../CategorySelectorDrawer-B-I3kajA.mjs";
28
+ import it from "@mui/material/styles/useTheme";
29
+ import { l as ct } from "../ConnectDrawer-BkvlItWx.mjs";
30
+ import lt from "@mui/material/Divider";
31
+ import dt from "@mui/material/MenuItem";
32
+ import ut from "@mui/material/RadioGroup";
33
+ import { ExpandMore as mt } from "@mxenabled/mx-icons";
34
+ import { C as _t } from "../CurrencyInput-itK0R3wV.mjs";
35
+ import { a as pt, u as gt } from "../CategorySelectorDrawer-B-I3kajA.mjs";
36
36
  import { b as q } from "../Localization-2MODESHW.mjs";
37
- import { A, W as ft } from "../WidgetContainer-CoFDmQRE.mjs";
37
+ import { u as ht, A, W as ft } from "../WidgetContainer-30Dy7US7.mjs";
38
38
  import { u as Ct } from "../useScreenSize-B6JyS_Lj.mjs";
39
39
  import { u as yt } from "../useWidgetLoadTimer-hIOioiKx.mjs";
40
40
  import { S as bt } from "../SearchBox-B2_zLv8-.mjs";
41
41
  import { D as oe } from "../Drawer-By9V-B5L.mjs";
42
- const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small", children: [
42
+ const Tt = (t) => /* @__PURE__ */ p(y, { tabIndex: t.tabIndex, variant: "Small", children: [
43
43
  `${t.row.account}`,
44
44
  t.row.number && ` | ${t.row.number}`
45
45
  ] }), At = (t) => {
46
- const { associatedBeats: s } = $(), { showInsights: r } = W(), { amount: a, transaction_type: i } = t.row, l = s.find((p) => p.associated_transaction_guid === t.row.guid), d = i === M.CREDIT;
47
- return /* @__PURE__ */ _(N, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
48
- /* @__PURE__ */ _(C, { color: d ? "success.main" : "text.primary", variant: "Small", children: [
46
+ const { associatedBeats: s } = $(), { showInsights: o } = W(), { amount: a, transaction_type: i } = t.row, l = s.find((g) => g.associated_transaction_guid === t.row.guid), d = i === k.CREDIT;
47
+ return /* @__PURE__ */ p(N, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
48
+ /* @__PURE__ */ p(y, { color: d ? "success.main" : "text.primary", variant: "Small", children: [
49
49
  d ? "+" : "",
50
50
  ce(a, "0,0.00")
51
51
  ] }),
52
- l && r && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
52
+ l && o && /* @__PURE__ */ e(y, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
53
53
  ] });
54
54
  }, St = (t) => {
55
- const { transactions: s } = w(), [r, a] = u.useState(!1);
56
- return /* @__PURE__ */ _(
55
+ const { transactions: s } = w(), [o, a] = m.useState(!1);
56
+ return /* @__PURE__ */ p(
57
57
  N,
58
58
  {
59
59
  alignItems: "center",
@@ -65,22 +65,22 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
65
65
  width: "100%",
66
66
  children: [
67
67
  t.row.has_been_split && /* @__PURE__ */ e(P, { name: "call_split", size: 16 }),
68
- /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ? s.split_transaction_category_label : t.row.category }),
69
- !t.row.has_been_split && r && /* @__PURE__ */ e(P, { name: "edit", sx: { color: "action.active" } })
68
+ /* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ? s.split_transaction_category_label : t.row.category }),
69
+ !t.row.has_been_split && o && /* @__PURE__ */ e(P, { name: "edit", sx: { color: "action.active" } })
70
70
  ]
71
71
  }
72
72
  );
73
- }, xt = x(St), wt = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: nt(at(t.row.date), ot.MONTH_DAY) }), It = (t) => {
74
- const s = Xe(), { transactions: r } = w(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, h = !l && !!!d;
75
- return /* @__PURE__ */ _(
73
+ }, xt = x(St), wt = (t) => /* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "Small", children: at(tt(t.row.date), nt.MONTH_DAY) }), It = (t) => {
74
+ const s = je(), { transactions: o } = w(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, f = !l && !!!d;
75
+ return /* @__PURE__ */ p(
76
76
  S,
77
77
  {
78
- "aria-label": i ? r.is_hidden : r.is_flagged,
78
+ "aria-label": i ? o.is_hidden : o.is_flagged,
79
79
  tabIndex: t.tabIndex,
80
80
  children: [
81
81
  a && /* @__PURE__ */ e(P, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
82
82
  !a && i && /* @__PURE__ */ e(P, { name: "visibility_off", size: 16 }),
83
- h && /* @__PURE__ */ e(
83
+ f && /* @__PURE__ */ e(
84
84
  "svg",
85
85
  {
86
86
  "data-testid": "svg",
@@ -98,40 +98,42 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
98
98
  ]
99
99
  }
100
100
  );
101
- }, vt = x(It), O = (t) => /* @__PURE__ */ e(C, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), Dt = (t) => /* @__PURE__ */ _(N, { alignItems: "center", direction: "row", gap: 8, children: [
101
+ }, vt = x(It), O = (t) => /* @__PURE__ */ e(y, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), Dt = (t) => /* @__PURE__ */ p(N, { alignItems: "center", direction: "row", gap: 8, children: [
102
102
  /* @__PURE__ */ e(
103
- Ye,
103
+ Xe,
104
104
  {
105
105
  categoryGuid: t.row.top_level_category_guid || "",
106
106
  merchantGuid: t.row.merchant_guid || ""
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.payee })
109
+ /* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "Small", children: t.row.payee })
110
110
  ] }), Nt = ({
111
111
  height: t = "100dvh",
112
112
  onCategoryClick: s,
113
- onRowClick: r
113
+ onRowClick: o
114
114
  }) => {
115
- const { transactions: a } = w(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: h } = W();
116
- u.useEffect(() => () => p(), []);
117
- const f = u.useMemo(
118
- () => d.map((n) => ({
119
- id: n.guid,
115
+ const { transactions: a } = w(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: g, toggleSplit: f } = W();
116
+ m.useEffect(() => () => g(), []);
117
+ const C = m.useMemo(
118
+ () => d.map((r) => ({
119
+ id: r.guid,
120
120
  isHovering: !1,
121
- ...n
121
+ ...r
122
122
  })),
123
123
  [d]
124
- ), m = ({ row: { id: n, guid: g, has_been_split: T }, field: E }) => T ? h(n) : E === "category" ? s?.(g) : r?.(g);
124
+ ), u = ({ row: { id: r, guid: h, has_been_split: E }, field: n }) => E ? f(r) : n === "category" ? s?.(h) : o?.(h), I = (r, h) => {
125
+ h.key !== "Enter" && h.key !== " " || u(r);
126
+ };
125
127
  if (!i)
126
128
  return /* @__PURE__ */ e(X, {});
127
- const I = [
129
+ const _ = [
128
130
  {
129
131
  field: "flag",
130
132
  headerName: "",
131
133
  minWidth: 32,
132
134
  width: 32,
133
135
  sortable: !1,
134
- renderCell: (n) => /* @__PURE__ */ e(vt, { ...n }),
136
+ renderCell: (r) => /* @__PURE__ */ e(vt, { ...r }),
135
137
  renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": a.transaction_status, role: "presentation" })
136
138
  },
137
139
  {
@@ -139,7 +141,7 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
139
141
  headerName: a.date_title,
140
142
  width: 103,
141
143
  renderHeader: O,
142
- renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(wt, { ...n }),
144
+ renderCell: (r) => r.row.parent_guid ? null : /* @__PURE__ */ e(wt, { ...r }),
143
145
  sortingOrder: ["desc", "asc"]
144
146
  },
145
147
  {
@@ -156,7 +158,7 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
156
158
  headerName: a.category_title,
157
159
  flex: 0.25,
158
160
  renderHeader: O,
159
- renderCell: (n) => /* @__PURE__ */ e(xt, { ...n }),
161
+ renderCell: (r) => /* @__PURE__ */ e(xt, { ...r }),
160
162
  sortingOrder: ["asc", "desc"]
161
163
  },
162
164
  {
@@ -164,7 +166,7 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
164
166
  headerName: a.account_title,
165
167
  flex: 0.33,
166
168
  renderHeader: O,
167
- renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(Tt, { ...n }),
169
+ renderCell: (r) => r.row.parent_guid ? null : /* @__PURE__ */ e(Tt, { ...r }),
168
170
  sortingOrder: ["asc", "desc"]
169
171
  },
170
172
  {
@@ -178,18 +180,19 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
178
180
  sortingOrder: ["asc", "desc"]
179
181
  }
180
182
  ];
181
- return /* @__PURE__ */ e(qe, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
182
- je,
183
+ return /* @__PURE__ */ e(Ke, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
184
+ qe,
183
185
  {
184
- columns: I,
186
+ columns: _,
185
187
  disableColumnFilter: !0,
186
188
  disableColumnMenu: !0,
187
- getCellClassName: (n) => n.row.parent_guid ? "split-row" : "",
189
+ getCellClassName: (r) => r.row.parent_guid ? "split-row" : "",
188
190
  hideFooter: !0,
189
191
  initialState: { sorting: { sortModel: [{ field: "date", sort: "desc" }] } },
190
192
  loading: l,
191
- onCellClick: m,
192
- rows: f,
193
+ onCellClick: u,
194
+ onCellKeyDown: I,
195
+ rows: C,
193
196
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
194
197
  sx: {
195
198
  "& .split-row": {
@@ -198,89 +201,89 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
198
201
  }
199
202
  }
200
203
  ) });
201
- }, Et = x(Nt), Ot = ({ copy: t, isOpen: s, onClose: r, onPrimaryAction: a }) => {
204
+ }, Et = x(Nt), Ot = ({ copy: t, isOpen: s, onClose: o, onPrimaryAction: a }) => {
202
205
  const { common: i, transactions: l } = w(), { isCopyLoaded: d } = j();
203
- return d ? /* @__PURE__ */ _(
206
+ return d ? /* @__PURE__ */ p(
204
207
  ie,
205
208
  {
206
209
  copy: {
207
210
  title: t.title
208
211
  },
209
212
  isOpen: s,
210
- onClose: r,
213
+ onClose: o,
211
214
  onPrimaryAction: a,
212
215
  primaryText: l.add_manual_account,
213
216
  secondaryText: i.cancel_button,
214
217
  children: [
215
- /* @__PURE__ */ e(C, { component: "p", sx: { marginBottom: "20px" }, truncate: !1, children: l.add_account_modal_message }),
216
- /* @__PURE__ */ e(C, { component: "p", truncate: !1, children: l.add_account_modal_cta })
218
+ /* @__PURE__ */ e(y, { component: "p", sx: { marginBottom: "20px" }, truncate: !1, children: l.add_account_modal_message }),
219
+ /* @__PURE__ */ e(y, { component: "p", truncate: !1, children: l.add_account_modal_cta })
217
220
  ]
218
221
  }
219
222
  ) : /* @__PURE__ */ e(X, {});
220
- }, Mt = x(Ot), kt = () => {
221
- const { visibleAccounts: t } = se(), { common: s, transactions: r } = w(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = W(), [d, p] = u.useState(""), [h, f] = u.useState(""), m = u.useMemo(
222
- () => t.filter((o) => o.is_manual),
223
+ }, kt = x(Ot), Mt = () => {
224
+ const { visibleAccounts: t } = se(), { common: s, transactions: o } = w(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = W(), [d, g] = m.useState(""), [f, C] = m.useState(""), u = m.useMemo(
225
+ () => t.filter((n) => n.is_manual),
223
226
  [t]
224
- ).map((o) => ({
225
- label: `${o.name} | ${ce(o.balance, "0,0.00")}`,
226
- value: o.guid
227
+ ).map((n) => ({
228
+ label: `${n.name} | ${ce(n.balance, "0,0.00")}`,
229
+ value: n.guid
227
230
  })), I = {
228
231
  error_amount_is_invalid: s.currency_input.error_amount_is_invalid,
229
232
  error_amount_must_be_equal_to: s.currency_input.error_amount_must_be_equal_to,
230
233
  error_amount_must_be_less_than_or_equal_to: s.currency_input.error_amount_must_be_less_than_or_equal_to,
231
234
  enter_amount: s.currency_input.enter_amount
232
- }, n = (o) => {
233
- p(o), l({ ...a, amount: Number(o) });
234
- }, g = (o, k) => {
235
- l({ ...a, transaction_type: Number(k) });
236
- }, T = (o) => {
237
- f(o), l({ ...a, payee: o, description: o });
238
- }, E = (o) => {
239
- l({ ...a, account_guid: o });
235
+ }, _ = (n) => {
236
+ g(n), l({ ...a, amount: Number(n) });
237
+ }, r = (n, M) => {
238
+ l({ ...a, transaction_type: Number(M) });
239
+ }, h = (n) => {
240
+ C(n), l({ ...a, payee: n, description: n });
241
+ }, E = (n) => {
242
+ l({ ...a, account_guid: n });
240
243
  };
241
- return /* @__PURE__ */ _(S, { className: "mx-txn-manual-transaction-details", children: [
242
- /* @__PURE__ */ _(N, { gap: 40, mx: 24, my: 32, children: [
243
- /* @__PURE__ */ _(
244
+ return /* @__PURE__ */ p(S, { className: "mx-txn-manual-transaction-details", children: [
245
+ /* @__PURE__ */ p(N, { gap: 40, mx: 24, my: 32, children: [
246
+ /* @__PURE__ */ p(
244
247
  N,
245
248
  {
246
249
  direction: "row",
247
250
  sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
248
251
  children: [
249
252
  /* @__PURE__ */ e(
250
- pt,
253
+ _t,
251
254
  {
252
255
  allowDecimals: !0,
253
256
  amount: d,
254
- ariaLabel: r.amount_title,
257
+ ariaLabel: o.amount_title,
255
258
  copy: I,
256
259
  inputProps: {
257
260
  noValidate: !0
258
261
  },
259
- label: r.amount_title,
260
- setAmount: n,
262
+ label: o.amount_title,
263
+ setAmount: _,
261
264
  setHasValidInput: i,
262
265
  sx: { bgcolor: "background.paper" },
263
266
  type: "number"
264
267
  }
265
268
  ),
266
- /* @__PURE__ */ e(mt, { name: "TransactionType", onChange: g, row: !0, children: /* @__PURE__ */ _(N, { alignItems: "center", direction: "row", children: [
269
+ /* @__PURE__ */ e(ut, { name: "TransactionType", onChange: r, row: !0, children: /* @__PURE__ */ p(N, { alignItems: "center", direction: "row", children: [
267
270
  /* @__PURE__ */ e(
268
271
  ae,
269
272
  {
270
- checked: a.transaction_type === M.CREDIT,
271
- label: r.manual_transaction_credit_button_label,
273
+ checked: a.transaction_type === k.CREDIT,
274
+ label: o.manual_transaction_credit_button_label,
272
275
  sx: { ml: { xs: 0, sm: 8 } },
273
- tooltip: r.manual_transaction_credit_button_tooltip,
274
- value: M.CREDIT
276
+ tooltip: o.manual_transaction_credit_button_tooltip,
277
+ value: k.CREDIT
275
278
  }
276
279
  ),
277
280
  /* @__PURE__ */ e(
278
281
  ae,
279
282
  {
280
- checked: a.transaction_type === M.DEBIT,
281
- label: r.manual_transaction_debit_button_label,
282
- tooltip: r.manual_transaction_debit_button_tooltip,
283
- value: M.DEBIT
283
+ checked: a.transaction_type === k.DEBIT,
284
+ label: o.manual_transaction_debit_button_label,
285
+ tooltip: o.manual_transaction_debit_button_tooltip,
286
+ value: k.DEBIT
284
287
  }
285
288
  )
286
289
  ] }) })
@@ -290,49 +293,49 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
290
293
  /* @__PURE__ */ e(
291
294
  ne,
292
295
  {
293
- label: r.payee_title,
296
+ label: o.payee_title,
294
297
  name: "payee",
295
- onChange: (o) => T(o.target.value),
298
+ onChange: (n) => h(n.target.value),
296
299
  sx: { bgcolor: "background.paper" },
297
- value: h
300
+ value: f
298
301
  }
299
302
  ),
300
303
  /* @__PURE__ */ e(
301
304
  ne,
302
305
  {
303
306
  InputLabelProps: { shrink: !0 },
304
- SelectProps: { defaultValue: -1, IconComponent: _t },
305
- label: r.manual_transaction_select_an_account,
306
- onChange: (o) => E(o.target.value),
307
- placeholder: r.manual_transaction_select,
307
+ SelectProps: { defaultValue: -1, IconComponent: mt },
308
+ label: o.manual_transaction_select_an_account,
309
+ onChange: (n) => E(n.target.value),
310
+ placeholder: o.manual_transaction_select,
308
311
  select: !0,
309
312
  sx: { bgcolor: "background.paper" },
310
- children: m.map((o) => /* @__PURE__ */ e(ut, { value: o.value, children: o.label }, o.value))
313
+ children: u.map((n) => /* @__PURE__ */ e(dt, { value: n.value, children: n.label }, n.value))
311
314
  }
312
315
  )
313
316
  ] }),
314
- /* @__PURE__ */ e(dt, { light: !0 }),
315
- /* @__PURE__ */ _(S, { bgcolor: "background.paper", children: [
317
+ /* @__PURE__ */ e(lt, { light: !0 }),
318
+ /* @__PURE__ */ p(S, { bgcolor: "background.paper", children: [
316
319
  /* @__PURE__ */ e(Pe, { transaction: a }),
317
320
  /* @__PURE__ */ e(We, { transaction: a }),
318
321
  /* @__PURE__ */ e($e, { transaction: a }),
319
322
  /* @__PURE__ */ e(Ve, { transaction: a })
320
323
  ] })
321
324
  ] });
322
- }, Lt = x(kt), Rt = ({ onClose: t, transaction: s }) => {
323
- const { addOrUpdateTransactionRule: r, updateTransaction: a } = $(), { transactions: i } = w(), { categories: l } = Qe(), [d, p] = u.useState(""), h = u.useMemo(
324
- () => l.find((m) => m.guid === d),
325
+ }, Lt = x(Mt), Rt = ({ onClose: t, transaction: s }) => {
326
+ const { addOrUpdateTransactionRule: o, updateTransaction: a } = $(), { transactions: i } = w(), { categories: l } = Je(), [d, g] = m.useState(""), f = m.useMemo(
327
+ () => l.find((u) => u.guid === d),
325
328
  [d]
326
- ), f = async (m) => {
327
- await a({ ...s, category_guid: d }), m && await r(d, s), p(""), t();
329
+ ), C = async (u) => {
330
+ await a({ ...s, category_guid: d }), u && await o(d, s), g(""), t();
328
331
  };
329
- return /* @__PURE__ */ _(S, { className: "mx-txn-edit-category-action", children: [
332
+ return /* @__PURE__ */ p(S, { className: "mx-txn-edit-category-action", children: [
330
333
  /* @__PURE__ */ e(
331
- gt,
334
+ pt,
332
335
  {
333
336
  initialSelected: s.category_guid,
334
337
  onClose: t,
335
- onSelect: (m) => p(m),
338
+ onSelect: (u) => g(u),
336
339
  showDrawer: !!s,
337
340
  title: i.actions_select_a_category
338
341
  }
@@ -347,15 +350,15 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
347
350
  )
348
351
  },
349
352
  isOpen: !!d,
350
- onClose: () => f(!1),
351
- onPrimaryAction: () => f(!0),
352
- onSecondaryAction: () => f(!1),
353
+ onClose: () => C(!1),
354
+ onPrimaryAction: () => C(!0),
355
+ onSecondaryAction: () => C(!1),
353
356
  primaryText: i.actions_apply_to_all,
354
357
  secondaryText: i.actions_this_time_only,
355
- children: /* @__PURE__ */ e(Je, { variant: "Paragraph", children: q(
358
+ children: /* @__PURE__ */ e(Ye, { variant: "Paragraph", children: q(
356
359
  i.actions_all_past_and_future,
357
360
  s.description,
358
- h?.name
361
+ f?.name
359
362
  ) })
360
363
  }
361
364
  )
@@ -363,17 +366,17 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
363
366
  }, Ht = x(Rt), re = 120, Bt = ({
364
367
  onBackClick: t,
365
368
  height: s = "100dvh",
366
- showInsights: r = !1,
369
+ showInsights: o = !1,
367
370
  sx: a = {}
368
371
  }) => {
369
- const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: p, config: h } = Ze(), { setSearchValue: f } = ht(), { onEvent: m } = et(), { common: I, transactions: n } = w(), {
370
- displayedDateRange: g,
371
- isCopyLoaded: T,
372
+ const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: g, config: f } = Qe(), { setSearchValue: C } = gt(), { onEvent: u } = Ze(), { common: I, transactions: _ } = w(), {
373
+ displayedDateRange: r,
374
+ isCopyLoaded: h,
372
375
  isInitialized: E,
373
- selectedAccountGuids: o,
374
- setDisplayedDate: k,
376
+ selectedAccountGuids: n,
377
+ setDisplayedDate: M,
375
378
  setSelectedAccounts: le
376
- } = j(), { isDesktop: de, isTablet: ue } = Ct(), L = ct(), {
379
+ } = j(), { isDesktop: de, isTablet: ue } = Ct(), L = it(), {
377
380
  addTransaction: me,
378
381
  filter: Y,
379
382
  loadAssociatedBeats: _e,
@@ -390,75 +393,75 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
390
393
  setSearchValue: be,
391
394
  setShowInsights: Te,
392
395
  updateManualTransaction: Ae
393
- } = W(), { userProfile: Se } = tt(), [U, y] = u.useState(""), [J, H] = u.useState(""), [xe, F] = u.useState(!1), [we, Q] = u.useState(!1), [B, Ie] = u.useState(!1), { announce: ve, ariaLive: De } = Ge(), v = p?.transactions?.selected_account_guid;
396
+ } = W(), { userProfile: Se } = et(), [U, b] = m.useState(""), [J, H] = m.useState(""), [xe, F] = m.useState(!1), [we, Q] = m.useState(!1), [B, Ie] = m.useState(!1), { announce: ve, ariaLive: De } = ht(), v = g?.transactions?.selected_account_guid;
394
397
  yt({
395
398
  widgetName: "TransactionWidget",
396
399
  isLoaded: B
397
- }), u.useEffect(() => {
398
- const c = v ? [{ guid: v }] : i.filter((D) => !D.is_hidden), ee = it(K()), te = rt(K());
399
- v || le(c), k(ee, te), V({
400
+ }), m.useEffect(() => {
401
+ const c = v ? [{ guid: v }] : i.filter((D) => !D.is_hidden), ee = st(K()), te = ot(K());
402
+ v || le(c), M(ee, te), V({
400
403
  accounts: c.map((D) => D.guid),
401
404
  custom: (D) => !D.accountIsClosed && !D.accountIsHidden,
402
405
  dateRange: { start: ee, end: te }
403
- }), Ie(!0), m(A.TRANSACTIONS_VIEW);
404
- }, [i]), u.useEffect(() => {
406
+ }), Ie(!0), u(A.TRANSACTIONS_VIEW);
407
+ }, [i]), m.useEffect(() => {
405
408
  B && (V({
406
409
  ...Y,
407
- accounts: v ? [v] : o,
408
- dateRange: { start: g.start, end: g.end }
409
- }), _e(g.start).finally());
410
- }, [B, g, o]), u.useEffect(() => {
411
- Te(r);
412
- }, [r]), u.useEffect(() => {
413
- T && n.showing_transactions_count && ve(
410
+ accounts: v ? [v] : n,
411
+ dateRange: { start: r.start, end: r.end }
412
+ }), _e(r.start).finally());
413
+ }, [B, r, n]), m.useEffect(() => {
414
+ Te(o);
415
+ }, [o]), m.useEffect(() => {
416
+ h && _.showing_transactions_count && ve(
414
417
  q(
415
- n.showing_transactions_count,
418
+ _.showing_transactions_count,
416
419
  G.length
417
420
  )
418
421
  );
419
- }, [T, g, o, G, n]);
420
- const Ne = u.useMemo(
422
+ }, [h, r, n, G, _]);
423
+ const Ne = m.useMemo(
421
424
  () => i.filter((c) => c.is_manual),
422
425
  [i]
423
- ), b = J ? ge.find((c) => c.guid === J) : void 0, Z = Ce && !!R.payee && !!R.account_guid && !!R.category_guid, Ee = (c) => {
424
- fe(), k(c[0], c[1]);
426
+ ), T = J ? ge.find((c) => c.guid === J) : void 0, Z = Ce && !!R.payee && !!R.account_guid && !!R.category_guid, Ee = (c) => {
427
+ fe(), M(c[0], c[1]);
425
428
  }, Oe = (c) => {
426
429
  be(c), V({
427
430
  ...Y,
428
431
  searchTerm: c
429
- }), m(A.TRANSACTIONS_CLICK_SEARCH, { search_term: c });
430
- }, Me = () => {
431
- Ke(G, pe), m(A.TRANSACTIONS_CLICK_EXPORT);
432
+ }), u(A.TRANSACTIONS_CLICK_SEARCH, { search_term: c });
432
433
  }, ke = () => {
434
+ ze(G, pe), u(A.TRANSACTIONS_CLICK_EXPORT);
435
+ }, Me = () => {
433
436
  Ne.length > 0 ? (Ae({
434
- ...ze,
435
- date: st(K()),
437
+ ...Fe,
438
+ date: rt(K()),
436
439
  user_guid: Se?.user_guid || ""
437
- }), y(
440
+ }), b(
438
441
  "addTransaction"
439
442
  /* AddTransaction */
440
- ), m(A.TRANSACTIONS_CLICK_ADD)) : (F(!0), m(A.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
443
+ ), u(A.TRANSACTIONS_CLICK_ADD)) : (F(!0), u(A.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
441
444
  }, Le = async () => {
442
- Z && await me(R), y("");
445
+ Z && await me(R), b("");
443
446
  }, Re = () => {
444
447
  F(!1), Q(!0);
445
448
  }, He = async () => {
446
449
  Q(!1), await l();
447
450
  }, Be = async () => {
448
- b && !b.has_been_viewed && await he({ ...b, has_been_viewed: !0 }), y("");
451
+ T && !T.has_been_viewed && await he({ ...T, has_been_viewed: !0 }), b("");
449
452
  };
450
- if (!T || !E || !B)
453
+ if (!h || !E || !B)
451
454
  return /* @__PURE__ */ e(X, {});
452
455
  const z = [];
453
456
  return !d && (de || ue) && z.push({
454
457
  iconName: "open_in_new",
455
- label: n.export_csv_btn,
456
- onClick: Me
457
- }), h.show_connections_widget_in_master && z.push({
458
- iconName: "add",
459
- label: n.add_transaction_btn,
458
+ label: _.export_csv_btn,
460
459
  onClick: ke
461
- }), /* @__PURE__ */ _(
460
+ }), f.show_connections_widget_in_master && z.push({
461
+ iconName: "add",
462
+ label: _.add_transaction_btn,
463
+ onClick: Me
464
+ }), /* @__PURE__ */ p(
462
465
  ft,
463
466
  {
464
467
  ...!v && { accountOptions: i },
@@ -466,17 +469,17 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
466
469
  calendarActions: {
467
470
  onRangeChanged: Ee
468
471
  },
469
- onAccountsFilterClick: () => m(A.ACCOUNTS_CLICK_FILTER),
472
+ onAccountsFilterClick: () => u(A.ACCOUNTS_CLICK_FILTER),
470
473
  onBackClick: t,
471
474
  sx: a,
472
- title: n.transactions_title,
475
+ title: _.transactions_title,
473
476
  children: [
474
477
  De,
475
478
  /* @__PURE__ */ e(S, { mt: 16, children: /* @__PURE__ */ e(
476
479
  bt,
477
480
  {
478
481
  onChange: Oe,
479
- placeholder: n.action_bar_search_placeholder,
482
+ placeholder: _.action_bar_search_placeholder,
480
483
  searchValue: ye
481
484
  }
482
485
  ) }),
@@ -492,16 +495,16 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
492
495
  {
493
496
  height: `calc(${s} - ${re}px)`,
494
497
  onCategoryClick: (c) => {
495
- H(c), y(
498
+ H(c), b(
496
499
  "category"
497
500
  /* Category */
498
501
  );
499
502
  },
500
503
  onRowClick: (c) => {
501
- H(c), y(
504
+ H(c), b(
502
505
  "transaction"
503
506
  /* Transaction */
504
- ), m(A.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: c });
507
+ ), u(A.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: c });
505
508
  }
506
509
  }
507
510
  )
@@ -515,17 +518,17 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
515
518
  [L.breakpoints.up("md")]: { display: "none" }
516
519
  },
517
520
  children: /* @__PURE__ */ e(
518
- Ue,
521
+ Ge,
519
522
  {
520
523
  height: `calc(${s} - ${re}px)`,
521
524
  onClick: (c) => {
522
- H(c), y(
525
+ H(c), b(
523
526
  "transaction"
524
527
  /* Transaction */
525
528
  );
526
529
  },
527
530
  showHiddenTransactions: !0,
528
- showInsights: r
531
+ showInsights: o
529
532
  }
530
533
  )
531
534
  }
@@ -534,19 +537,19 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
534
537
  oe,
535
538
  {
536
539
  ariaLabelClose: I.close_aria,
537
- isOpen: U === "transaction" && !!b,
540
+ isOpen: U === "transaction" && !!T,
538
541
  onClose: Be,
539
- title: n.details_title,
540
- children: b && /* @__PURE__ */ e(Fe, { transaction: b })
542
+ title: _.details_title,
543
+ children: T && /* @__PURE__ */ e(Ue, { transaction: T })
541
544
  }
542
545
  ),
543
- b && U === "category" && /* @__PURE__ */ e(
546
+ T && U === "category" && /* @__PURE__ */ e(
544
547
  Ht,
545
548
  {
546
549
  onClose: () => {
547
- f(""), y(""), H("");
550
+ C(""), b(""), H("");
548
551
  },
549
- transaction: b
552
+ transaction: T
550
553
  }
551
554
  ),
552
555
  /* @__PURE__ */ e(
@@ -555,16 +558,16 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
555
558
  ariaLabelClose: I.close_aria,
556
559
  isOpen: U === "addTransaction",
557
560
  isPrimaryDisabled: !Z,
558
- onClose: () => y(""),
561
+ onClose: () => b(""),
559
562
  onPrimaryAction: Le,
560
- title: n.add_transaction_title,
563
+ title: _.add_transaction_title,
561
564
  children: /* @__PURE__ */ e(Lt, {})
562
565
  }
563
566
  ),
564
567
  /* @__PURE__ */ e(
565
- Mt,
568
+ kt,
566
569
  {
567
- copy: { title: n.add_manual_account },
570
+ copy: { title: _.add_manual_account },
568
571
  isOpen: xe,
569
572
  onClose: () => {
570
573
  F(!1);
@@ -573,11 +576,11 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
573
576
  }
574
577
  ),
575
578
  /* @__PURE__ */ e(
576
- lt,
579
+ ct,
577
580
  {
578
581
  onClose: He,
579
582
  showConnectWidget: we,
580
- title: n.add_manual_account
583
+ title: _.add_manual_account
581
584
  }
582
585
  )
583
586
  ]
@@ -585,18 +588,18 @@ const Tt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
585
588
  );
586
589
  }, ba = x(Bt);
587
590
  export {
588
- Mt as AddAccountModal,
591
+ kt as AddAccountModal,
589
592
  wa as BottomActions,
590
- ka as ExportCsvAction,
593
+ Ma as ExportCsvAction,
591
594
  Na as TRANSACTION_EVENTS,
592
595
  Ia as TopActions,
593
596
  Sa as TransactionApi,
594
- Fe as TransactionDetails,
595
- Ue as TransactionList,
597
+ Ue as TransactionDetails,
598
+ Ge as TransactionList,
596
599
  va as TransactionRow,
597
600
  Oa as TransactionStore,
598
601
  Et as TransactionTable,
599
602
  ba as TransactionWidget,
600
- Ke as exportTransactionsToCSV,
603
+ ze as exportTransactionsToCSV,
601
604
  W as useTransactionsUiStore
602
605
  };