@mx-cartographer/experiences 7.0.28-alpha.mega1 → 7.0.28

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