@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.
- package/CHANGELOG.md +4 -0
- package/dist/common/index.es.js +566 -531
- package/dist/common/utils/Theme.d.ts +102 -24
- package/dist/debts/components/DebtDrawer.d.ts +2 -1
- package/dist/debts/components/PaydownDrawer.d.ts +2 -1
- package/dist/debts/components/SnowballDrawer.d.ts +2 -1
- package/dist/debts/index.es.js +281 -278
- package/dist/transactions/index.es.js +254 -254
- package/package.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import { u as
|
|
3
|
-
import { B as
|
|
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
|
|
6
|
-
import { S as ee, D as
|
|
7
|
-
import { T as
|
|
8
|
-
import { e as
|
|
9
|
-
import { E as
|
|
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
|
|
11
|
+
import m from "react";
|
|
12
12
|
import { observer as S } from "mobx-react-lite";
|
|
13
|
-
import
|
|
14
|
-
import { DataGridPro as
|
|
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
|
|
17
|
-
import { Text as C, Icon as
|
|
18
|
-
import { g as
|
|
19
|
-
import { fromUnixTime as
|
|
20
|
-
import { f as
|
|
21
|
-
import
|
|
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
|
|
25
|
-
import { getUnixTime as
|
|
26
|
-
import { startOfMonth as
|
|
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
|
|
29
|
-
import { j as
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { ExpandMore as
|
|
34
|
-
import { C as
|
|
35
|
-
import { a as
|
|
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
|
|
38
|
-
import { u as
|
|
39
|
-
import { S as
|
|
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
|
|
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
|
-
] }),
|
|
45
|
-
const { associatedBeats:
|
|
46
|
-
return /* @__PURE__ */ _(
|
|
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 &&
|
|
51
|
+
l && o && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
|
|
52
52
|
] });
|
|
53
|
-
},
|
|
54
|
-
const { transactions:
|
|
53
|
+
}, yt = (t) => {
|
|
54
|
+
const { transactions: s } = x(), [o, a] = m.useState(!1);
|
|
55
55
|
return /* @__PURE__ */ _(
|
|
56
|
-
|
|
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(
|
|
67
|
-
/* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ?
|
|
68
|
-
!t.row.has_been_split &&
|
|
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
|
-
},
|
|
73
|
-
const
|
|
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 ?
|
|
77
|
+
"aria-label": i ? o.is_hidden : o.is_flagged,
|
|
78
78
|
tabIndex: t.tabIndex,
|
|
79
79
|
children: [
|
|
80
|
-
a && /* @__PURE__ */ e(
|
|
81
|
-
!a && i && /* @__PURE__ */ e(
|
|
82
|
-
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
-
] }),
|
|
109
|
+
] }), wt = ({
|
|
110
110
|
height: t = "100dvh",
|
|
111
|
-
onCategoryClick:
|
|
112
|
-
onRowClick:
|
|
111
|
+
onCategoryClick: s,
|
|
112
|
+
onRowClick: o
|
|
113
113
|
}) => {
|
|
114
|
-
const { transactions: a } = x(), { isCopyLoaded: i } = K(), { isLoading: l, sortedTransactions: d } =
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
() => d.map((
|
|
118
|
-
id:
|
|
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
|
-
...
|
|
120
|
+
...n
|
|
121
121
|
})),
|
|
122
122
|
[d]
|
|
123
|
-
),
|
|
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
|
|
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: (
|
|
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: (
|
|
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:
|
|
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: (
|
|
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: (
|
|
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:
|
|
174
|
+
renderCell: Ct,
|
|
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(Fe, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
|
|
181
|
+
ze,
|
|
182
182
|
{
|
|
183
|
-
columns:
|
|
183
|
+
columns: w,
|
|
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,
|
|
190
|
-
onCellClick:
|
|
191
|
-
rows:
|
|
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
|
-
},
|
|
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:
|
|
209
|
-
onClose:
|
|
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
|
-
},
|
|
220
|
-
const { visibleAccounts: t } = re(), { common:
|
|
221
|
-
() => t.filter((
|
|
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((
|
|
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
|
-
},
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
l({ ...a, transaction_type: Number(
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
},
|
|
238
|
-
l({ ...a, account_guid:
|
|
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__ */ _(
|
|
241
|
+
/* @__PURE__ */ _(D, { gap: 40, mx: 24, my: 32, children: [
|
|
242
242
|
/* @__PURE__ */ _(
|
|
243
|
-
|
|
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
|
-
|
|
249
|
+
ut,
|
|
250
250
|
{
|
|
251
251
|
allowDecimals: !0,
|
|
252
252
|
amount: d,
|
|
253
|
-
ariaLabel:
|
|
254
|
-
copy:
|
|
253
|
+
ariaLabel: o.amount_title,
|
|
254
|
+
copy: w,
|
|
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(
|
|
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:
|
|
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 ht = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
277
277
|
ee,
|
|
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,50 +289,50 @@ const ht = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
|
|
|
289
289
|
/* @__PURE__ */ e(
|
|
290
290
|
te,
|
|
291
291
|
{
|
|
292
|
-
label:
|
|
292
|
+
label: o.payee_title,
|
|
293
293
|
name: "payee",
|
|
294
|
-
onChange: (
|
|
294
|
+
onChange: (r) => N(r.target.value),
|
|
295
295
|
sx: { bgcolor: "background.paper" },
|
|
296
|
-
value:
|
|
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:
|
|
304
|
-
label:
|
|
305
|
-
onChange: (
|
|
306
|
-
placeholder:
|
|
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:
|
|
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(
|
|
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
|
-
},
|
|
322
|
-
const { addOrUpdateTransactionRule:
|
|
323
|
-
() => l.find((
|
|
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
|
-
),
|
|
326
|
-
await a({ ...
|
|
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
|
-
|
|
330
|
+
mt,
|
|
331
331
|
{
|
|
332
|
-
initialSelected:
|
|
332
|
+
initialSelected: s.category_guid,
|
|
333
333
|
onClose: t,
|
|
334
|
-
onSelect: (
|
|
335
|
-
showDrawer: !!
|
|
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
|
-
|
|
345
|
+
s.description
|
|
346
346
|
)
|
|
347
347
|
},
|
|
348
348
|
isOpen: !!d,
|
|
349
|
-
onClose: () =>
|
|
350
|
-
onPrimaryAction: () =>
|
|
351
|
-
onSecondaryAction: () =>
|
|
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(
|
|
354
|
+
children: /* @__PURE__ */ e(je, { variant: "Paragraph", children: ae(
|
|
355
355
|
i.actions_all_past_and_future,
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
s.description,
|
|
357
|
+
g?.name
|
|
358
358
|
) })
|
|
359
359
|
}
|
|
360
360
|
)
|
|
361
361
|
] });
|
|
362
|
-
},
|
|
362
|
+
}, Mt = S(Et), oe = 120, kt = ({
|
|
363
363
|
onBackClick: t,
|
|
364
|
-
height:
|
|
365
|
-
showInsights:
|
|
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:
|
|
369
|
-
displayedDateRange:
|
|
370
|
-
isCopyLoaded:
|
|
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:
|
|
373
|
-
setDisplayedDate:
|
|
374
|
-
setSelectedAccounts:
|
|
375
|
-
} = K(), { isDesktop:
|
|
376
|
-
addTransaction:
|
|
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:
|
|
378
|
+
loadAssociatedBeats: me,
|
|
379
379
|
setFilter: V,
|
|
380
|
-
sortedTransactionsWithSplits:
|
|
381
|
-
tags:
|
|
382
|
-
transactions:
|
|
383
|
-
updateTransaction:
|
|
384
|
-
} =
|
|
385
|
-
clearExpandedSplits:
|
|
386
|
-
isAmountValid:
|
|
387
|
-
manualTransaction:
|
|
388
|
-
searchValue:
|
|
389
|
-
setSearchValue:
|
|
390
|
-
setShowInsights:
|
|
391
|
-
updateManualTransaction:
|
|
392
|
-
} =
|
|
393
|
-
|
|
394
|
-
const c =
|
|
395
|
-
|
|
396
|
-
accounts: c.map((
|
|
397
|
-
custom: (
|
|
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
|
-
}),
|
|
400
|
-
}, [i]),
|
|
399
|
+
}), Ie(!0), u(T.TRANSACTIONS_VIEW);
|
|
400
|
+
}, [i]), m.useEffect(() => {
|
|
401
401
|
U && (V({
|
|
402
402
|
...j,
|
|
403
|
-
accounts:
|
|
404
|
-
dateRange: { start:
|
|
405
|
-
}),
|
|
406
|
-
}, [U,
|
|
407
|
-
|
|
408
|
-
}, [
|
|
409
|
-
const
|
|
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 ?
|
|
413
|
-
|
|
414
|
-
},
|
|
415
|
-
|
|
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
|
-
}),
|
|
419
|
-
}, Ne = () => {
|
|
420
|
-
Ge(me, _e), m(T.TRANSACTIONS_CLICK_EXPORT);
|
|
418
|
+
}), u(T.TRANSACTIONS_CLICK_SEARCH, { search_term: c });
|
|
421
419
|
}, Oe = () => {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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
|
-
),
|
|
430
|
-
},
|
|
431
|
-
J && await
|
|
432
|
-
},
|
|
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
|
-
|
|
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 (!
|
|
439
|
+
if (!N || !O || !U)
|
|
440
440
|
return /* @__PURE__ */ e(q, {});
|
|
441
441
|
const F = [];
|
|
442
|
-
return !d && (
|
|
442
|
+
return !d && (le || de) && F.push({
|
|
443
443
|
iconName: "open_in_new",
|
|
444
|
-
label:
|
|
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
|
-
|
|
451
|
+
pt,
|
|
452
452
|
{
|
|
453
|
-
...!
|
|
453
|
+
...!I && { accountOptions: i },
|
|
454
454
|
actions: F,
|
|
455
455
|
calendarActions: {
|
|
456
|
-
onRangeChanged:
|
|
456
|
+
onRangeChanged: De
|
|
457
457
|
},
|
|
458
|
-
onAccountsFilterClick: () =>
|
|
458
|
+
onAccountsFilterClick: () => u(T.ACCOUNTS_CLICK_FILTER),
|
|
459
459
|
onBackClick: t,
|
|
460
460
|
sx: a,
|
|
461
|
-
title:
|
|
461
|
+
title: n.transactions_title,
|
|
462
462
|
children: [
|
|
463
463
|
/* @__PURE__ */ e(A, { mt: 16, children: /* @__PURE__ */ e(
|
|
464
|
-
|
|
464
|
+
ht,
|
|
465
465
|
{
|
|
466
|
-
onChange:
|
|
467
|
-
placeholder:
|
|
468
|
-
searchValue:
|
|
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
|
-
[
|
|
476
|
-
[
|
|
475
|
+
[L.breakpoints.down("md")]: { display: "none" },
|
|
476
|
+
[L.breakpoints.up("md")]: { display: "block" }
|
|
477
477
|
},
|
|
478
478
|
children: /* @__PURE__ */ e(
|
|
479
|
-
|
|
479
|
+
It,
|
|
480
480
|
{
|
|
481
|
-
height: `calc(${
|
|
481
|
+
height: `calc(${s} - ${oe}px)`,
|
|
482
482
|
onCategoryClick: (c) => {
|
|
483
|
-
|
|
483
|
+
H(c), y(
|
|
484
484
|
"category"
|
|
485
485
|
/* Category */
|
|
486
486
|
);
|
|
487
487
|
},
|
|
488
488
|
onRowClick: (c) => {
|
|
489
|
-
|
|
489
|
+
H(c), y(
|
|
490
490
|
"transaction"
|
|
491
491
|
/* Transaction */
|
|
492
|
-
),
|
|
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
|
-
[
|
|
503
|
-
[
|
|
502
|
+
[L.breakpoints.down("md")]: { display: "block" },
|
|
503
|
+
[L.breakpoints.up("md")]: { display: "none" }
|
|
504
504
|
},
|
|
505
505
|
children: /* @__PURE__ */ e(
|
|
506
|
-
|
|
506
|
+
Ve,
|
|
507
507
|
{
|
|
508
|
-
height: `calc(${
|
|
508
|
+
height: `calc(${s} - ${oe}px)`,
|
|
509
509
|
onClick: (c) => {
|
|
510
|
-
|
|
510
|
+
H(c), y(
|
|
511
511
|
"transaction"
|
|
512
512
|
/* Transaction */
|
|
513
513
|
);
|
|
514
514
|
},
|
|
515
515
|
showHiddenTransactions: !0,
|
|
516
|
-
showInsights:
|
|
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:
|
|
524
|
+
ariaLabelClose: w.close_aria,
|
|
525
525
|
isOpen: W === "transaction" && !!b,
|
|
526
|
-
onClose:
|
|
527
|
-
title:
|
|
528
|
-
children: b && /* @__PURE__ */ e(
|
|
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
|
-
|
|
532
|
+
Mt,
|
|
533
533
|
{
|
|
534
534
|
onClose: () => {
|
|
535
|
-
|
|
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:
|
|
543
|
+
ariaLabelClose: w.close_aria,
|
|
544
544
|
isOpen: W === "addTransaction",
|
|
545
545
|
isPrimaryDisabled: !J,
|
|
546
546
|
onClose: () => y(""),
|
|
547
|
-
onPrimaryAction:
|
|
548
|
-
title:
|
|
549
|
-
children: /* @__PURE__ */ e(
|
|
547
|
+
onPrimaryAction: Me,
|
|
548
|
+
title: n.add_transaction_title,
|
|
549
|
+
children: /* @__PURE__ */ e(Ot, {})
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
552
|
/* @__PURE__ */ e(
|
|
553
|
-
|
|
553
|
+
Dt,
|
|
554
554
|
{
|
|
555
|
-
copy: { title:
|
|
556
|
-
isOpen:
|
|
555
|
+
copy: { title: n.add_manual_account },
|
|
556
|
+
isOpen: xe,
|
|
557
557
|
onClose: () => {
|
|
558
558
|
G(!1);
|
|
559
559
|
},
|
|
560
|
-
onPrimaryAction:
|
|
560
|
+
onPrimaryAction: ke
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
563
|
/* @__PURE__ */ e(
|
|
564
|
-
|
|
564
|
+
st,
|
|
565
565
|
{
|
|
566
|
-
onClose:
|
|
567
|
-
showConnectWidget:
|
|
568
|
-
title:
|
|
566
|
+
onClose: Le,
|
|
567
|
+
showConnectWidget: we,
|
|
568
|
+
title: n.add_manual_account
|
|
569
569
|
}
|
|
570
570
|
)
|
|
571
571
|
]
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
|
-
},
|
|
574
|
+
}, ga = S(kt);
|
|
575
575
|
export {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
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
|
};
|