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