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