@mx-cartographer/experiences 7.2.10 → 7.2.11
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/transactions/index.es.js +90 -90
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,16 +9,16 @@ import { e as ze } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
|
|
|
9
9
|
import { E as Oa } from "../ExportCsvAction-sX8Rg4Ov.mjs";
|
|
10
10
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
11
11
|
import c from "react";
|
|
12
|
-
import { observer as
|
|
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
15
|
import T from "@mui/material/Box";
|
|
16
16
|
import { useTheme as je } from "@mui/material/styles";
|
|
17
17
|
import { Text as C, Icon as P, MerchantLogo as Xe, TextField as ne, P as Ye } from "@mxenabled/mxui";
|
|
18
|
-
import { h as $, u as
|
|
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";
|
|
21
|
-
import
|
|
21
|
+
import N from "@mui/material/Stack";
|
|
22
22
|
import { f as ce } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
23
23
|
import { L as X } from "../Loader-DUaFpDGv.mjs";
|
|
24
24
|
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
@@ -34,7 +34,7 @@ import { ExpandMore as mt } from "@mxenabled/mx-icons";
|
|
|
34
34
|
import { C as _t } from "../CurrencyInput-CsCy7uaS.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 { A, W as ht } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
37
|
+
import { A as S, W as ht } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
38
38
|
import { u as ft } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
39
39
|
import { S as Ct } from "../SearchBox-B2_zLv8-.mjs";
|
|
40
40
|
import { D as oe } from "../Drawer-kEE73B87.mjs";
|
|
@@ -42,18 +42,18 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
42
42
|
`${t.row.account}`,
|
|
43
43
|
t.row.number && ` | ${t.row.number}`
|
|
44
44
|
] }), bt = (t) => {
|
|
45
|
-
const { associatedBeats: r } = $(), { showInsights:
|
|
46
|
-
return /* @__PURE__ */ _(
|
|
45
|
+
const { associatedBeats: r } = $(), { showInsights: o } = B(), { amount: a, transaction_type: i } = t.row, l = r.find((p) => p.associated_transaction_guid === t.row.guid), d = i === M.CREDIT;
|
|
46
|
+
return /* @__PURE__ */ _(N, { 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
|
ce(a, "0,0.00")
|
|
50
50
|
] }),
|
|
51
|
-
l &&
|
|
51
|
+
l && o && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
|
|
52
52
|
] });
|
|
53
53
|
}, Tt = (t) => {
|
|
54
|
-
const { transactions: r } =
|
|
54
|
+
const { transactions: r } = w(), [o, a] = c.useState(!1);
|
|
55
55
|
return /* @__PURE__ */ _(
|
|
56
|
-
|
|
56
|
+
N,
|
|
57
57
|
{
|
|
58
58
|
alignItems: "center",
|
|
59
59
|
direction: "row",
|
|
@@ -65,16 +65,16 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
65
65
|
children: [
|
|
66
66
|
t.row.has_been_split && /* @__PURE__ */ e(P, { name: "call_split", size: 16 }),
|
|
67
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 &&
|
|
68
|
+
!t.row.has_been_split && o && /* @__PURE__ */ e(P, { name: "edit", sx: { color: "action.active" } })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
}, At =
|
|
73
|
-
const r = je(), { transactions:
|
|
72
|
+
}, At = x(Tt), St = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: at(tt(t.row.date), nt.MONTH_DAY) }), xt = (t) => {
|
|
73
|
+
const r = je(), { transactions: o } = w(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, g = !l && !!!d;
|
|
74
74
|
return /* @__PURE__ */ _(
|
|
75
75
|
T,
|
|
76
76
|
{
|
|
77
|
-
"aria-label": i ?
|
|
77
|
+
"aria-label": i ? o.is_hidden : o.is_flagged,
|
|
78
78
|
tabIndex: t.tabIndex,
|
|
79
79
|
children: [
|
|
80
80
|
a && /* @__PURE__ */ e(P, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
@@ -97,7 +97,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
}, wt =
|
|
100
|
+
}, wt = x(xt), 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
101
|
/* @__PURE__ */ e(
|
|
102
102
|
Xe,
|
|
103
103
|
{
|
|
@@ -109,28 +109,28 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
109
109
|
] }), It = ({
|
|
110
110
|
height: t = "100dvh",
|
|
111
111
|
onCategoryClick: r,
|
|
112
|
-
onRowClick:
|
|
112
|
+
onRowClick: o
|
|
113
113
|
}) => {
|
|
114
|
-
const { transactions: a } =
|
|
114
|
+
const { transactions: a } = w(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: g } = B();
|
|
115
115
|
c.useEffect(() => () => p(), []);
|
|
116
116
|
const f = c.useMemo(
|
|
117
|
-
() => d.map((
|
|
118
|
-
id:
|
|
117
|
+
() => d.map((n) => ({
|
|
118
|
+
id: n.guid,
|
|
119
119
|
isHovering: !1,
|
|
120
|
-
...
|
|
120
|
+
...n
|
|
121
121
|
})),
|
|
122
122
|
[d]
|
|
123
|
-
), m = ({ row: { id:
|
|
123
|
+
), m = ({ row: { id: n, guid: h, has_been_split: A }, field: E }) => A ? g(n) : E === "category" ? r?.(h) : o?.(h);
|
|
124
124
|
if (!i)
|
|
125
125
|
return /* @__PURE__ */ e(X, {});
|
|
126
|
-
const
|
|
126
|
+
const v = [
|
|
127
127
|
{
|
|
128
128
|
field: "flag",
|
|
129
129
|
headerName: "",
|
|
130
130
|
minWidth: 32,
|
|
131
131
|
width: 32,
|
|
132
132
|
sortable: !1,
|
|
133
|
-
renderCell: (
|
|
133
|
+
renderCell: (n) => /* @__PURE__ */ e(wt, { ...n }),
|
|
134
134
|
renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": a.transaction_status, role: "presentation" })
|
|
135
135
|
},
|
|
136
136
|
{
|
|
@@ -138,7 +138,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
138
138
|
headerName: a.date_title,
|
|
139
139
|
width: 103,
|
|
140
140
|
renderHeader: O,
|
|
141
|
-
renderCell: (
|
|
141
|
+
renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(St, { ...n }),
|
|
142
142
|
sortingOrder: ["desc", "asc"]
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -155,7 +155,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
155
155
|
headerName: a.category_title,
|
|
156
156
|
flex: 0.25,
|
|
157
157
|
renderHeader: O,
|
|
158
|
-
renderCell: (
|
|
158
|
+
renderCell: (n) => /* @__PURE__ */ e(At, { ...n }),
|
|
159
159
|
sortingOrder: ["asc", "desc"]
|
|
160
160
|
},
|
|
161
161
|
{
|
|
@@ -163,7 +163,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
163
163
|
headerName: a.account_title,
|
|
164
164
|
flex: 0.33,
|
|
165
165
|
renderHeader: O,
|
|
166
|
-
renderCell: (
|
|
166
|
+
renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(yt, { ...n }),
|
|
167
167
|
sortingOrder: ["asc", "desc"]
|
|
168
168
|
},
|
|
169
169
|
{
|
|
@@ -180,10 +180,10 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
180
180
|
return /* @__PURE__ */ e(Ke, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
|
|
181
181
|
qe,
|
|
182
182
|
{
|
|
183
|
-
columns:
|
|
183
|
+
columns: v,
|
|
184
184
|
disableColumnFilter: !0,
|
|
185
185
|
disableColumnMenu: !0,
|
|
186
|
-
getCellClassName: (
|
|
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,
|
|
@@ -197,8 +197,8 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
) });
|
|
200
|
-
}, Dt =
|
|
201
|
-
const { common: i, transactions: l } =
|
|
200
|
+
}, Dt = x(It), Nt = ({ copy: t, isOpen: r, onClose: o, onPrimaryAction: a }) => {
|
|
201
|
+
const { common: i, transactions: l } = w(), { isCopyLoaded: d } = j();
|
|
202
202
|
return d ? /* @__PURE__ */ _(
|
|
203
203
|
ie,
|
|
204
204
|
{
|
|
@@ -206,7 +206,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
206
206
|
title: t.title
|
|
207
207
|
},
|
|
208
208
|
isOpen: r,
|
|
209
|
-
onClose:
|
|
209
|
+
onClose: o,
|
|
210
210
|
onPrimaryAction: a,
|
|
211
211
|
primaryText: l.add_manual_account,
|
|
212
212
|
secondaryText: i.cancel_button,
|
|
@@ -216,31 +216,31 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
216
216
|
]
|
|
217
217
|
}
|
|
218
218
|
) : /* @__PURE__ */ e(X, {});
|
|
219
|
-
}, Et =
|
|
220
|
-
const { visibleAccounts: t } = se(), { common: r, transactions:
|
|
219
|
+
}, Et = x(Nt), Ot = () => {
|
|
220
|
+
const { visibleAccounts: t } = se(), { common: r, transactions: o } = w(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = B(), [d, p] = c.useState(""), [g, f] = c.useState(""), m = c.useMemo(
|
|
221
221
|
() => t.filter((s) => s.is_manual),
|
|
222
222
|
[t]
|
|
223
223
|
).map((s) => ({
|
|
224
224
|
label: `${s.name} | ${ce(s.balance, "0,0.00")}`,
|
|
225
225
|
value: s.guid
|
|
226
|
-
})),
|
|
226
|
+
})), v = {
|
|
227
227
|
error_amount_is_invalid: r.currency_input.error_amount_is_invalid,
|
|
228
228
|
error_amount_must_be_equal_to: r.currency_input.error_amount_must_be_equal_to,
|
|
229
229
|
error_amount_must_be_less_than_or_equal_to: r.currency_input.error_amount_must_be_less_than_or_equal_to,
|
|
230
230
|
enter_amount: r.currency_input.enter_amount
|
|
231
|
-
},
|
|
231
|
+
}, n = (s) => {
|
|
232
232
|
p(s), l({ ...a, amount: Number(s) });
|
|
233
233
|
}, h = (s, k) => {
|
|
234
234
|
l({ ...a, transaction_type: Number(k) });
|
|
235
|
-
},
|
|
235
|
+
}, A = (s) => {
|
|
236
236
|
f(s), l({ ...a, payee: s, description: s });
|
|
237
237
|
}, E = (s) => {
|
|
238
238
|
l({ ...a, account_guid: s });
|
|
239
239
|
};
|
|
240
240
|
return /* @__PURE__ */ _(T, { className: "mx-txn-manual-transaction-details", children: [
|
|
241
|
-
/* @__PURE__ */ _(
|
|
241
|
+
/* @__PURE__ */ _(N, { gap: 40, mx: 24, my: 32, children: [
|
|
242
242
|
/* @__PURE__ */ _(
|
|
243
|
-
|
|
243
|
+
N,
|
|
244
244
|
{
|
|
245
245
|
direction: "row",
|
|
246
246
|
sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
|
|
@@ -250,26 +250,26 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
250
250
|
{
|
|
251
251
|
allowDecimals: !0,
|
|
252
252
|
amount: d,
|
|
253
|
-
ariaLabel:
|
|
254
|
-
copy:
|
|
253
|
+
ariaLabel: o.amount_title,
|
|
254
|
+
copy: v,
|
|
255
255
|
inputProps: {
|
|
256
256
|
noValidate: !0
|
|
257
257
|
},
|
|
258
|
-
label:
|
|
259
|
-
setAmount:
|
|
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(ut, { name: "TransactionType", onChange: h, row: !0, children: /* @__PURE__ */ _(
|
|
265
|
+
/* @__PURE__ */ e(ut, { name: "TransactionType", onChange: h, row: !0, children: /* @__PURE__ */ _(N, { alignItems: "center", direction: "row", children: [
|
|
266
266
|
/* @__PURE__ */ e(
|
|
267
267
|
ae,
|
|
268
268
|
{
|
|
269
269
|
checked: a.transaction_type === M.CREDIT,
|
|
270
|
-
label:
|
|
270
|
+
label: o.manual_transaction_credit_button_label,
|
|
271
271
|
sx: { ml: { xs: 0, sm: 8 } },
|
|
272
|
-
tooltip:
|
|
272
|
+
tooltip: o.manual_transaction_credit_button_tooltip,
|
|
273
273
|
value: M.CREDIT
|
|
274
274
|
}
|
|
275
275
|
),
|
|
@@ -277,8 +277,8 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
277
277
|
ae,
|
|
278
278
|
{
|
|
279
279
|
checked: a.transaction_type === M.DEBIT,
|
|
280
|
-
label:
|
|
281
|
-
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,9 +289,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
289
289
|
/* @__PURE__ */ e(
|
|
290
290
|
ne,
|
|
291
291
|
{
|
|
292
|
-
label:
|
|
292
|
+
label: o.payee_title,
|
|
293
293
|
name: "payee",
|
|
294
|
-
onChange: (s) =>
|
|
294
|
+
onChange: (s) => A(s.target.value),
|
|
295
295
|
sx: { bgcolor: "background.paper" },
|
|
296
296
|
value: g
|
|
297
297
|
}
|
|
@@ -301,9 +301,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
301
301
|
{
|
|
302
302
|
InputLabelProps: { shrink: !0 },
|
|
303
303
|
SelectProps: { defaultValue: -1, IconComponent: mt },
|
|
304
|
-
label:
|
|
304
|
+
label: o.manual_transaction_select_an_account,
|
|
305
305
|
onChange: (s) => E(s.target.value),
|
|
306
|
-
placeholder:
|
|
306
|
+
placeholder: o.manual_transaction_select,
|
|
307
307
|
select: !0,
|
|
308
308
|
sx: { bgcolor: "background.paper" },
|
|
309
309
|
children: m.map((s) => /* @__PURE__ */ e(dt, { value: s.value, children: s.label }, s.value))
|
|
@@ -318,12 +318,12 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
318
318
|
/* @__PURE__ */ e(We, { transaction: a })
|
|
319
319
|
] })
|
|
320
320
|
] });
|
|
321
|
-
}, Mt =
|
|
322
|
-
const { addOrUpdateTransactionRule:
|
|
321
|
+
}, Mt = x(Ot), kt = ({ onClose: t, transaction: r }) => {
|
|
322
|
+
const { addOrUpdateTransactionRule: o, updateTransaction: a } = $(), { transactions: i } = w(), { categories: l } = Je(), [d, p] = c.useState(""), g = c.useMemo(
|
|
323
323
|
() => l.find((m) => m.guid === d),
|
|
324
324
|
[d]
|
|
325
325
|
), f = async (m) => {
|
|
326
|
-
await a({ ...r, category_guid: d }), m && await
|
|
326
|
+
await a({ ...r, category_guid: d }), m && await o(d, r), p(""), t();
|
|
327
327
|
};
|
|
328
328
|
return /* @__PURE__ */ _(T, { className: "mx-txn-edit-category-action", children: [
|
|
329
329
|
/* @__PURE__ */ e(
|
|
@@ -359,9 +359,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
359
359
|
}
|
|
360
360
|
)
|
|
361
361
|
] });
|
|
362
|
-
}, Lt =
|
|
363
|
-
const [r,
|
|
364
|
-
g && i(g),
|
|
362
|
+
}, Lt = x(kt), Rt = (t = "polite") => {
|
|
363
|
+
const [r, o] = c.useState(""), [a, i] = c.useState(t), l = c.useCallback((p, g) => {
|
|
364
|
+
g && i(g), o(p);
|
|
365
365
|
}, []), d = c.useMemo(
|
|
366
366
|
() => /* @__PURE__ */ e(
|
|
367
367
|
T,
|
|
@@ -390,12 +390,12 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
390
390
|
}, re = 120, Ht = ({
|
|
391
391
|
onBackClick: t,
|
|
392
392
|
height: r = "100dvh",
|
|
393
|
-
showInsights:
|
|
393
|
+
showInsights: o = !1,
|
|
394
394
|
sx: a = {}
|
|
395
395
|
}) => {
|
|
396
|
-
const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: p, config: g } = Qe(), { setSearchValue: f } = gt(), { onEvent: m } = Ze(), { common:
|
|
396
|
+
const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: p, config: g } = Qe(), { setSearchValue: f } = gt(), { onEvent: m } = Ze(), { common: v, transactions: n } = w(), {
|
|
397
397
|
displayedDateRange: h,
|
|
398
|
-
isCopyLoaded:
|
|
398
|
+
isCopyLoaded: A,
|
|
399
399
|
isInitialized: E,
|
|
400
400
|
selectedAccountGuids: s,
|
|
401
401
|
setDisplayedDate: k,
|
|
@@ -417,30 +417,30 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
417
417
|
setSearchValue: be,
|
|
418
418
|
setShowInsights: Te,
|
|
419
419
|
updateManualTransaction: Ae
|
|
420
|
-
} = B(), { userProfile: Se } = et(), [G, y] = c.useState(""), [J, H] = c.useState(""), [xe, U] = c.useState(!1), [we, Q] = c.useState(!1), [F, ve] = c.useState(!1), { announce: Ie, ariaLive: De } = Rt(),
|
|
420
|
+
} = B(), { userProfile: Se } = et(), [G, y] = c.useState(""), [J, H] = c.useState(""), [xe, U] = c.useState(!1), [we, Q] = c.useState(!1), [F, ve] = c.useState(!1), { announce: Ie, ariaLive: De } = Rt(), I = p?.transactions?.selected_account_guid;
|
|
421
421
|
c.useEffect(() => {
|
|
422
|
-
const u =
|
|
423
|
-
|
|
424
|
-
accounts: u.map((
|
|
425
|
-
custom: (
|
|
422
|
+
const u = I ? [{ guid: I }] : i.filter((D) => !D.is_hidden), ee = st(K()), te = ot(K());
|
|
423
|
+
I || le(u), k(ee, te), V({
|
|
424
|
+
accounts: u.map((D) => D.guid),
|
|
425
|
+
custom: (D) => !D.accountIsClosed && !D.accountIsHidden,
|
|
426
426
|
dateRange: { start: ee, end: te }
|
|
427
|
-
}), ve(!0), m(
|
|
427
|
+
}), ve(!0), m(S.TRANSACTIONS_VIEW);
|
|
428
428
|
}, [i]), c.useEffect(() => {
|
|
429
429
|
F && (V({
|
|
430
430
|
...Y,
|
|
431
|
-
accounts:
|
|
431
|
+
accounts: I ? [I] : s,
|
|
432
432
|
dateRange: { start: h.start, end: h.end }
|
|
433
433
|
}), _e(h.start).finally());
|
|
434
434
|
}, [F, h, s]), c.useEffect(() => {
|
|
435
|
-
Te(
|
|
436
|
-
}, [
|
|
437
|
-
Ie(
|
|
435
|
+
Te(o);
|
|
436
|
+
}, [o]), c.useEffect(() => {
|
|
437
|
+
A && n.showing_transactions_count && Ie(
|
|
438
438
|
q(
|
|
439
|
-
|
|
439
|
+
n.showing_transactions_count,
|
|
440
440
|
W.length
|
|
441
441
|
)
|
|
442
442
|
);
|
|
443
|
-
}, [h, s, W]);
|
|
443
|
+
}, [A, h, s, W, n]);
|
|
444
444
|
const Ne = c.useMemo(
|
|
445
445
|
() => i.filter((u) => u.is_manual),
|
|
446
446
|
[i]
|
|
@@ -450,9 +450,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
450
450
|
be(u), V({
|
|
451
451
|
...Y,
|
|
452
452
|
searchTerm: u
|
|
453
|
-
}), m(
|
|
453
|
+
}), m(S.TRANSACTIONS_CLICK_SEARCH, { search_term: u });
|
|
454
454
|
}, Me = () => {
|
|
455
|
-
ze(W, pe), m(
|
|
455
|
+
ze(W, pe), m(S.TRANSACTIONS_CLICK_EXPORT);
|
|
456
456
|
}, ke = () => {
|
|
457
457
|
Ne.length > 0 ? (Ae({
|
|
458
458
|
...Fe,
|
|
@@ -461,7 +461,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
461
461
|
}), y(
|
|
462
462
|
"addTransaction"
|
|
463
463
|
/* AddTransaction */
|
|
464
|
-
), m(
|
|
464
|
+
), m(S.TRANSACTIONS_CLICK_ADD)) : (U(!0), m(S.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
|
|
465
465
|
}, Le = async () => {
|
|
466
466
|
Z && await me(R), y("");
|
|
467
467
|
}, Re = () => {
|
|
@@ -471,36 +471,36 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
471
471
|
}, Pe = async () => {
|
|
472
472
|
b && !b.has_been_viewed && await he({ ...b, has_been_viewed: !0 }), y("");
|
|
473
473
|
};
|
|
474
|
-
if (!
|
|
474
|
+
if (!A || !E || !F)
|
|
475
475
|
return /* @__PURE__ */ e(X, {});
|
|
476
476
|
const z = [];
|
|
477
477
|
return !d && (de || ue) && z.push({
|
|
478
478
|
iconName: "open_in_new",
|
|
479
|
-
label:
|
|
479
|
+
label: n.export_csv_btn,
|
|
480
480
|
onClick: Me
|
|
481
481
|
}), g.show_connections_widget_in_master && z.push({
|
|
482
482
|
iconName: "add",
|
|
483
|
-
label:
|
|
483
|
+
label: n.add_transaction_btn,
|
|
484
484
|
onClick: ke
|
|
485
485
|
}), /* @__PURE__ */ _(
|
|
486
486
|
ht,
|
|
487
487
|
{
|
|
488
|
-
...!
|
|
488
|
+
...!I && { accountOptions: i },
|
|
489
489
|
actions: z,
|
|
490
490
|
calendarActions: {
|
|
491
491
|
onRangeChanged: Ee
|
|
492
492
|
},
|
|
493
|
-
onAccountsFilterClick: () => m(
|
|
493
|
+
onAccountsFilterClick: () => m(S.ACCOUNTS_CLICK_FILTER),
|
|
494
494
|
onBackClick: t,
|
|
495
495
|
sx: a,
|
|
496
|
-
title:
|
|
496
|
+
title: n.transactions_title,
|
|
497
497
|
children: [
|
|
498
498
|
De,
|
|
499
499
|
/* @__PURE__ */ e(T, { mt: 16, children: /* @__PURE__ */ e(
|
|
500
500
|
Ct,
|
|
501
501
|
{
|
|
502
502
|
onChange: Oe,
|
|
503
|
-
placeholder:
|
|
503
|
+
placeholder: n.action_bar_search_placeholder,
|
|
504
504
|
searchValue: ye
|
|
505
505
|
}
|
|
506
506
|
) }),
|
|
@@ -525,7 +525,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
525
525
|
H(u), y(
|
|
526
526
|
"transaction"
|
|
527
527
|
/* Transaction */
|
|
528
|
-
), m(
|
|
528
|
+
), m(S.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: u });
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
)
|
|
@@ -549,7 +549,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
549
549
|
);
|
|
550
550
|
},
|
|
551
551
|
showHiddenTransactions: !0,
|
|
552
|
-
showInsights:
|
|
552
|
+
showInsights: o
|
|
553
553
|
}
|
|
554
554
|
)
|
|
555
555
|
}
|
|
@@ -557,10 +557,10 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
557
557
|
/* @__PURE__ */ e(
|
|
558
558
|
oe,
|
|
559
559
|
{
|
|
560
|
-
ariaLabelClose:
|
|
560
|
+
ariaLabelClose: v.close_aria,
|
|
561
561
|
isOpen: G === "transaction" && !!b,
|
|
562
562
|
onClose: Pe,
|
|
563
|
-
title:
|
|
563
|
+
title: n.details_title,
|
|
564
564
|
children: b && /* @__PURE__ */ e(Ue, { transaction: b })
|
|
565
565
|
}
|
|
566
566
|
),
|
|
@@ -576,19 +576,19 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
576
576
|
/* @__PURE__ */ e(
|
|
577
577
|
oe,
|
|
578
578
|
{
|
|
579
|
-
ariaLabelClose:
|
|
579
|
+
ariaLabelClose: v.close_aria,
|
|
580
580
|
isOpen: G === "addTransaction",
|
|
581
581
|
isPrimaryDisabled: !Z,
|
|
582
582
|
onClose: () => y(""),
|
|
583
583
|
onPrimaryAction: Le,
|
|
584
|
-
title:
|
|
584
|
+
title: n.add_transaction_title,
|
|
585
585
|
children: /* @__PURE__ */ e(Mt, {})
|
|
586
586
|
}
|
|
587
587
|
),
|
|
588
588
|
/* @__PURE__ */ e(
|
|
589
589
|
Et,
|
|
590
590
|
{
|
|
591
|
-
copy: { title:
|
|
591
|
+
copy: { title: n.add_manual_account },
|
|
592
592
|
isOpen: xe,
|
|
593
593
|
onClose: () => {
|
|
594
594
|
U(!1);
|
|
@@ -601,13 +601,13 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
601
601
|
{
|
|
602
602
|
onClose: He,
|
|
603
603
|
showConnectWidget: we,
|
|
604
|
-
title:
|
|
604
|
+
title: n.add_manual_account
|
|
605
605
|
}
|
|
606
606
|
)
|
|
607
607
|
]
|
|
608
608
|
}
|
|
609
609
|
);
|
|
610
|
-
}, Ca =
|
|
610
|
+
}, Ca = x(Ht);
|
|
611
611
|
export {
|
|
612
612
|
Et as AddAccountModal,
|
|
613
613
|
Sa as BottomActions,
|