@mx-cartographer/experiences 7.5.1 → 7.5.3
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 +8 -0
- package/dist/{AccountDetailsContent-CitErkuS.mjs → AccountDetailsContent-DXogTJJn.mjs} +2 -2
- package/dist/{ManageIncome-CaoQl609.mjs → ManageIncome-DPXl28ZY.mjs} +2 -2
- package/dist/MicroWidgetContainer-B2hO9rOG.mjs +45 -0
- package/dist/MiniWidgetContainer-98-hKFqm.mjs +56 -0
- package/dist/{RecurringSettings-B4ybrS0B.mjs → RecurringSettings-DU2d5dlv.mjs} +2 -2
- package/dist/{SpendingLegend-CDO060GT.mjs → SpendingLegend-Dl2rjD7E.mjs} +1 -1
- package/dist/{TransactionDetails-m5PddMQn.mjs → TransactionDetails-h9zr6QKo.mjs} +488 -511
- package/dist/{WidgetContainer-CoFDmQRE.mjs → WidgetContainer-30Dy7US7.mjs} +288 -253
- package/dist/accounts/index.es.js +4 -4
- package/dist/analytics/index.es.js +1 -1
- package/dist/budgets/index.es.js +4 -4
- package/dist/cashflow/index.es.js +5 -5
- package/dist/common/index.es.js +3 -3
- package/dist/debts/index.es.js +1 -1
- package/dist/finstrong/index.es.js +5 -5
- package/dist/goals/index.es.js +3 -3
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +29 -24
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +191 -188
- package/dist/trends/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +0 -52
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +0 -71
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
3
|
import { observer as A } from "mobx-react-lite";
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import
|
|
4
|
+
import { useVirtualizer as Pe } from "@tanstack/react-virtual";
|
|
5
|
+
import O from "@mui/material/Box";
|
|
6
6
|
import J from "@mui/material/Divider";
|
|
7
7
|
import Q from "@mui/material/List";
|
|
8
|
-
import { MerchantLogo as ge, Icon as C, Text as
|
|
8
|
+
import { MerchantLogo as ge, Icon as C, Text as y, useTokens as te, CategoryIcon as he, CategoryIconVariants as be, IconWeight as D, P as ce, H1 as Ae, TextField as Te } from "@mxenabled/mxui";
|
|
9
9
|
import $ from "@mui/material/ListItemAvatar";
|
|
10
10
|
import M from "@mui/material/ListItemText";
|
|
11
11
|
import b from "@mui/material/Stack";
|
|
12
|
-
import { T as
|
|
13
|
-
import { G as
|
|
12
|
+
import { T as Ge, L as Me, O as T, C as Ke, b as $e, i as Be } from "./User-Cnlegl1N.mjs";
|
|
13
|
+
import { G as Fe, h as v, u as N, g as w, m as xe, b as He, o as ze } from "./hooks-ZMp65DFz.mjs";
|
|
14
14
|
import { f as ae } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
15
|
-
import { Receipt as
|
|
15
|
+
import { Receipt as Ue, Delete as ie, ChevronRight as Xe, Cancel as se, Search as Ve, Edit as We, Flag as Ye } from "@mxenabled/mx-icons";
|
|
16
16
|
import { fromUnixTime as Y } from "date-fns/fromUnixTime";
|
|
17
17
|
import { isSameDay as Ne } from "date-fns/isSameDay";
|
|
18
|
-
import { h as
|
|
18
|
+
import { h as je } from "./DateUtil-CBdcsyuk.mjs";
|
|
19
19
|
import { L as Ie } from "./Loader-DUaFpDGv.mjs";
|
|
20
|
-
import { A as P } from "./WidgetContainer-
|
|
20
|
+
import { A as P, u as De } from "./WidgetContainer-30Dy7US7.mjs";
|
|
21
21
|
import re from "@mui/material/Paper";
|
|
22
22
|
import de from "@mui/material/Button";
|
|
23
|
-
import
|
|
23
|
+
import qe from "@mui/material/FormGroup";
|
|
24
24
|
import ee from "@mui/material/IconButton";
|
|
25
25
|
import ve from "@mui/material/TextField";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
26
|
+
import Ze from "@mui/material/ToggleButton";
|
|
27
|
+
import Ee from "@mui/material/styles/useTheme";
|
|
28
28
|
import z from "@mui/material/Avatar";
|
|
29
29
|
import B from "@mui/material/ListItem";
|
|
30
|
-
import { D as W, f as
|
|
30
|
+
import { D as W, f as Oe, a as we } from "./Dialog-BPTr3qHE.mjs";
|
|
31
31
|
import U from "@mui/material/ListItemButton";
|
|
32
32
|
import X from "@mui/material/ListItemIcon";
|
|
33
|
-
import { a as
|
|
33
|
+
import { a as Le } from "./CategorySelectorDrawer-B-I3kajA.mjs";
|
|
34
34
|
import { b as le } from "./Localization-2MODESHW.mjs";
|
|
35
|
-
import { getUnixTime as
|
|
36
|
-
import { D as
|
|
35
|
+
import { getUnixTime as Je } from "date-fns/getUnixTime";
|
|
36
|
+
import { D as _e } from "./Drawer-By9V-B5L.mjs";
|
|
37
37
|
import ye from "@mui/material/InputAdornment";
|
|
38
|
-
import
|
|
38
|
+
import Qe from "@mui/material/Checkbox";
|
|
39
39
|
import pe from "@mui/material/Grid";
|
|
40
|
-
import { C as
|
|
41
|
-
import
|
|
40
|
+
import { C as et } from "./CurrencyInput-itK0R3wV.mjs";
|
|
41
|
+
import tt from "@mui/material/Switch";
|
|
42
42
|
var Z = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(Z || {}), oe = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(oe || {});
|
|
43
|
-
const
|
|
43
|
+
const at = [
|
|
44
44
|
0,
|
|
45
45
|
1,
|
|
46
46
|
2,
|
|
47
47
|
3
|
|
48
48
|
/* Tags */
|
|
49
|
-
],
|
|
49
|
+
], nt = [
|
|
50
50
|
0,
|
|
51
51
|
1,
|
|
52
52
|
2
|
|
53
53
|
/* MerchantLogo */
|
|
54
54
|
], G = () => {
|
|
55
|
-
if (!
|
|
55
|
+
if (!_.useContext(Fe))
|
|
56
56
|
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
|
57
|
-
return
|
|
57
|
+
return v().uiStore;
|
|
58
58
|
};
|
|
59
|
-
function
|
|
59
|
+
function rt() {
|
|
60
60
|
return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const r =
|
|
62
|
+
function ot(t) {
|
|
63
|
+
const r = rt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), i = window.parent || window.opener || !1;
|
|
64
64
|
return i && i.postMessage && r ? (i.postMessage(t, r), !0) : !1;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
66
|
+
function it(t) {
|
|
67
|
+
return ot({
|
|
68
68
|
metadata: { beat_guid: t },
|
|
69
69
|
mx: !0,
|
|
70
70
|
type: "mx/moneyDashboard/insightOnTransaction"
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
const { associatedBeats: i } =
|
|
73
|
+
const st = ({ transaction: t, onClick: r }) => {
|
|
74
|
+
const { associatedBeats: i } = v(), { expandedSplits: n } = G(), { transactions: o } = N(), { showInsights: a } = G(), l = t.transaction_type === Ge.CREDIT, c = _.useMemo(() => i.find((d) => d.associated_transaction_guid === t.guid), [i, t]);
|
|
75
75
|
return (
|
|
76
76
|
//TODO: implement common/components/ListItemRow.tsx
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
/* @__PURE__ */ s(
|
|
78
|
+
Me,
|
|
79
79
|
{
|
|
80
|
-
clickEventName:
|
|
80
|
+
clickEventName: T.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
81
81
|
onClick: r ? () => r(t.guid) : void 0,
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */ e($, { children: t.parent_guid &&
|
|
83
|
+
/* @__PURE__ */ e($, { children: t.parent_guid && n.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
|
|
84
84
|
ge,
|
|
85
85
|
{
|
|
86
86
|
categoryGuid: t.top_level_category_guid || "",
|
|
@@ -91,40 +91,40 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
91
91
|
M,
|
|
92
92
|
{
|
|
93
93
|
disableTypography: !0,
|
|
94
|
-
secondary: /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
secondary: /* @__PURE__ */ s(b, { direction: "row", justifyContent: "space-between", children: [
|
|
95
|
+
/* @__PURE__ */ s(b, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
96
96
|
t.is_flagged && /* @__PURE__ */ e(C, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
97
97
|
t.is_hidden && /* @__PURE__ */ e(C, { name: "visibility_off", size: 16 }),
|
|
98
98
|
t.has_been_split && /* @__PURE__ */ e(C, { name: "call_split", size: 16 }),
|
|
99
|
-
/* @__PURE__ */ e(
|
|
99
|
+
/* @__PURE__ */ e(y, { variant: "XSmall", children: t.has_been_split ? o.split_transaction_category_label : t.category })
|
|
100
100
|
] }),
|
|
101
|
-
c &&
|
|
102
|
-
|
|
101
|
+
c && a && /* @__PURE__ */ e(
|
|
102
|
+
y,
|
|
103
103
|
{
|
|
104
104
|
bold: !0,
|
|
105
105
|
color: "action.active",
|
|
106
106
|
onClick: (d) => {
|
|
107
|
-
d.stopPropagation(), d.preventDefault(),
|
|
107
|
+
d.stopPropagation(), d.preventDefault(), it(c.guid);
|
|
108
108
|
},
|
|
109
109
|
variant: "XSmall",
|
|
110
110
|
children: c.short_title
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ s(b, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
115
|
+
/* @__PURE__ */ s(y, { bold: !0, variant: "Body", children: [
|
|
116
116
|
t.is_hidden && o.hide_trnx_cancel_hidden_note,
|
|
117
117
|
t.payee || t.description || t.feed_description
|
|
118
118
|
] }),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
|
|
119
|
+
/* @__PURE__ */ s(
|
|
120
|
+
y,
|
|
121
121
|
{
|
|
122
122
|
bold: !0,
|
|
123
|
-
color:
|
|
123
|
+
color: l ? "success.main" : "text.primary",
|
|
124
124
|
sx: { flexShrink: 0 },
|
|
125
125
|
variant: "Body",
|
|
126
126
|
children: [
|
|
127
|
-
|
|
127
|
+
l ? "+" : "",
|
|
128
128
|
ae(t.amount, "0,0.00")
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -136,56 +136,56 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
138
|
);
|
|
139
|
-
},
|
|
139
|
+
}, lt = A(st), ct = ({
|
|
140
140
|
bgcolor: t = "background.default",
|
|
141
141
|
children: r
|
|
142
|
-
}) => /* @__PURE__ */ e(
|
|
143
|
-
const i = te(), { transactions:
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
t && /* @__PURE__ */ e(
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
r && /* @__PURE__ */ e(
|
|
142
|
+
}) => /* @__PURE__ */ e(O, { display: "inline-block", sx: { bgcolor: t, py: 6, width: "100%" }, children: /* @__PURE__ */ e(y, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), dt = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
|
|
143
|
+
const i = te(), { transactions: n } = N();
|
|
144
|
+
return /* @__PURE__ */ s(b, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
|
|
145
|
+
t && /* @__PURE__ */ e(Ue, { color: "secondary", sx: { fontSize: 32 } }),
|
|
146
|
+
/* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: n.zero_state_no_transactions }),
|
|
147
|
+
r && /* @__PURE__ */ e(y, { color: "secondary", variant: "XSmall", children: n.zero_state_there_are_no_transactions })
|
|
148
148
|
] });
|
|
149
|
-
},
|
|
150
|
-
const i = Y(r[t].date),
|
|
151
|
-
return !Ne(i,
|
|
149
|
+
}, _t = A(dt), Se = (t, r) => {
|
|
150
|
+
const i = Y(r[t].date), n = Y(r[t - 1]?.date);
|
|
151
|
+
return !Ne(i, n);
|
|
152
152
|
}, ut = (t, r) => {
|
|
153
|
-
const i = Y(r[t].date),
|
|
154
|
-
return Ne(i,
|
|
155
|
-
}, Ce = 65, fe = 32,
|
|
153
|
+
const i = Y(r[t].date), n = Y(r[t + 1]?.date);
|
|
154
|
+
return Ne(i, n);
|
|
155
|
+
}, Ce = 65, fe = 32, mt = ({
|
|
156
156
|
bgcolor: t,
|
|
157
157
|
filter: r,
|
|
158
158
|
height: i = "calc(100dvh - 36px)",
|
|
159
|
-
loader:
|
|
159
|
+
loader: n = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
|
|
160
160
|
onClick: o,
|
|
161
|
-
showInsights:
|
|
162
|
-
showLoader:
|
|
161
|
+
showInsights: a = !1,
|
|
162
|
+
showLoader: l = !1,
|
|
163
163
|
showHiddenTransactions: c = !1,
|
|
164
164
|
transaction: d,
|
|
165
|
-
width:
|
|
166
|
-
zeroState: m = /* @__PURE__ */ e(
|
|
165
|
+
width: u = "100%",
|
|
166
|
+
zeroState: m = /* @__PURE__ */ e(_t, {})
|
|
167
167
|
}) => {
|
|
168
|
-
const { isLoading: p, sortedTransactions: S } =
|
|
169
|
-
const L = r ? S.filter(r) : S,
|
|
170
|
-
return c ?
|
|
171
|
-
}, [S, c]), { clearExpandedSplits:
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
f(
|
|
168
|
+
const { isLoading: p, sortedTransactions: S } = v(), h = _.useMemo(() => {
|
|
169
|
+
const L = r ? S.filter(r) : S, k = d ?? L;
|
|
170
|
+
return c ? k : k.filter((V) => !V.is_hidden);
|
|
171
|
+
}, [S, c]), { clearExpandedSplits: g, setShowInsights: I, toggleSplit: f } = G(), { onEvent: R } = w(), F = (L) => {
|
|
172
|
+
const k = h.find((V) => V.guid === L);
|
|
173
|
+
if (k?.has_been_split) {
|
|
174
|
+
f(k.guid);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
|
|
178
|
-
account_guid:
|
|
177
|
+
R(P.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
178
|
+
account_guid: k?.account_guid,
|
|
179
179
|
transaction_guid: L
|
|
180
180
|
}), o?.(L);
|
|
181
|
-
}, j =
|
|
182
|
-
count:
|
|
181
|
+
}, j = _.useRef(null), K = Pe({
|
|
182
|
+
count: h.length,
|
|
183
183
|
getScrollElement: () => j.current,
|
|
184
|
-
estimateSize: (L) => Ce + (Se(L,
|
|
184
|
+
estimateSize: (L) => Ce + (Se(L, h) ? fe : 0),
|
|
185
185
|
overscan: 5
|
|
186
186
|
});
|
|
187
|
-
return
|
|
188
|
-
|
|
187
|
+
return _.useEffect(() => K.measure(), [h]), _.useEffect(() => I(a), [a]), _.useEffect(() => () => g(), []), /* @__PURE__ */ e(Q, { sx: { width: u }, children: /* @__PURE__ */ e(O, { height: i, overflow: "auto", ref: j, width: u, children: /* @__PURE__ */ s(
|
|
188
|
+
O,
|
|
189
189
|
{
|
|
190
190
|
height: (
|
|
191
191
|
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
@@ -194,12 +194,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
194
194
|
position: "relative",
|
|
195
195
|
width: "100%",
|
|
196
196
|
children: [
|
|
197
|
-
(p ||
|
|
198
|
-
!p && !
|
|
199
|
-
!p && !
|
|
200
|
-
const
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
|
|
197
|
+
(p || l) && n,
|
|
198
|
+
!p && !l && K.getVirtualItems().length === 0 && m,
|
|
199
|
+
!p && !l && K.getVirtualItems().length > 0 && K.getVirtualItems().map((L) => {
|
|
200
|
+
const k = h[L.index], V = Se(L.index, h), ue = ut(L.index, h), x = Ce + (V ? fe : 0);
|
|
201
|
+
return /* @__PURE__ */ s(
|
|
202
|
+
O,
|
|
203
203
|
{
|
|
204
204
|
sx: {
|
|
205
205
|
height: x,
|
|
@@ -209,52 +209,52 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
209
209
|
bgcolor: "background.paper"
|
|
210
210
|
},
|
|
211
211
|
children: [
|
|
212
|
-
V && /* @__PURE__ */ e(
|
|
212
|
+
V && /* @__PURE__ */ e(ct, { bgcolor: t, children: je(k.date) }),
|
|
213
213
|
/* @__PURE__ */ e(
|
|
214
|
-
|
|
214
|
+
lt,
|
|
215
215
|
{
|
|
216
216
|
...o && { onClick: F },
|
|
217
|
-
transaction:
|
|
217
|
+
transaction: k
|
|
218
218
|
}
|
|
219
219
|
),
|
|
220
|
-
/* @__PURE__ */ e(J, { sx: { ml:
|
|
220
|
+
/* @__PURE__ */ e(J, { sx: { ml: ue ? 68 : 0 } })
|
|
221
221
|
]
|
|
222
222
|
},
|
|
223
|
-
|
|
223
|
+
k.guid
|
|
224
224
|
);
|
|
225
225
|
})
|
|
226
226
|
]
|
|
227
227
|
}
|
|
228
228
|
) }) });
|
|
229
|
-
},
|
|
230
|
-
const { addOrUpdateTransactionRule: r, updateTransaction: i } =
|
|
229
|
+
}, ka = A(mt), pt = ({ transaction: t }) => {
|
|
230
|
+
const { addOrUpdateTransactionRule: r, updateTransaction: i } = v(), { categories: n } = xe(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: l } = G(), { transactions: c } = N(), [d, u] = _.useState(!1), [m, p] = _.useState(""), S = async (f) => {
|
|
231
231
|
await i({ ...t, category_guid: m }), f && await r(m, t), p(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
232
232
|
transaction_guid: t.guid
|
|
233
233
|
});
|
|
234
|
-
},
|
|
234
|
+
}, h = (f) => {
|
|
235
235
|
if (t.is_manual && !t.guid) {
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const R = n.find((F) => F.guid === f);
|
|
237
|
+
l({
|
|
238
238
|
...t,
|
|
239
|
-
category:
|
|
239
|
+
category: R?.name,
|
|
240
240
|
category_guid: f,
|
|
241
|
-
top_level_category_guid:
|
|
241
|
+
top_level_category_guid: R?.parent_guid || f
|
|
242
242
|
});
|
|
243
243
|
} else
|
|
244
244
|
p(f);
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
}, I =
|
|
249
|
-
() =>
|
|
245
|
+
g();
|
|
246
|
+
}, g = () => {
|
|
247
|
+
u(!1), a(!1);
|
|
248
|
+
}, I = _.useMemo(
|
|
249
|
+
() => n.find((f) => f.guid === m),
|
|
250
250
|
[m]
|
|
251
251
|
);
|
|
252
|
-
return /* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
252
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
253
|
+
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
254
254
|
U,
|
|
255
255
|
{
|
|
256
256
|
onClick: () => {
|
|
257
|
-
o(
|
|
257
|
+
o(T.ON_TRANSACTION_CATEGORY_CLICK), u(!0);
|
|
258
258
|
},
|
|
259
259
|
children: [
|
|
260
260
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
@@ -271,7 +271,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
271
271
|
{
|
|
272
272
|
primary: c.category_title,
|
|
273
273
|
primaryTypographyProps: { variant: "XSmall" },
|
|
274
|
-
secondary: /* @__PURE__ */ e(
|
|
274
|
+
secondary: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category ?? c.actions_select_a_category })
|
|
275
275
|
}
|
|
276
276
|
),
|
|
277
277
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -279,11 +279,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
279
279
|
}
|
|
280
280
|
) }),
|
|
281
281
|
/* @__PURE__ */ e(
|
|
282
|
-
|
|
282
|
+
Le,
|
|
283
283
|
{
|
|
284
284
|
initialSelected: t.category_guid,
|
|
285
|
-
onClose:
|
|
286
|
-
onSelect:
|
|
285
|
+
onClose: g,
|
|
286
|
+
onSelect: h,
|
|
287
287
|
showDrawer: d,
|
|
288
288
|
title: c.actions_select_a_category
|
|
289
289
|
}
|
|
@@ -311,31 +311,31 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] });
|
|
314
|
-
},
|
|
315
|
-
const r = te(), { onEvent: i } =
|
|
316
|
-
m(
|
|
314
|
+
}, gt = ({ transaction: t }) => {
|
|
315
|
+
const r = te(), { onEvent: i } = w(), { updateTransaction: n } = v(), { updateManualTransaction: o } = G(), { common: a, transactions: l } = N(), [c, d] = _.useState(!1), [u, m] = _.useState(t.date), p = (h) => {
|
|
316
|
+
m(Je(h));
|
|
317
317
|
}, S = async () => {
|
|
318
318
|
if (t.is_manual && !t.guid) {
|
|
319
|
-
o({ ...t, date:
|
|
319
|
+
o({ ...t, date: u }), d(!1);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
|
-
await
|
|
322
|
+
await n({ ...t, date: u }), i(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), d(!1);
|
|
323
323
|
};
|
|
324
|
-
return /* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ s(O, { className: "mx-txn-date-action", children: [
|
|
325
|
+
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
326
326
|
U,
|
|
327
327
|
{
|
|
328
328
|
onClick: () => {
|
|
329
|
-
i(
|
|
329
|
+
i(T.ON_TRANSACTION_DATE_CLICK), d(!0);
|
|
330
330
|
},
|
|
331
331
|
children: [
|
|
332
332
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
333
333
|
/* @__PURE__ */ e(
|
|
334
334
|
M,
|
|
335
335
|
{
|
|
336
|
-
primary:
|
|
336
|
+
primary: l.date_title,
|
|
337
337
|
primaryTypographyProps: { variant: "XSmall" },
|
|
338
|
-
secondary: /* @__PURE__ */ e(
|
|
338
|
+
secondary: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: Oe(Y(t.date), we.YEAR_MONTH_DAY) })
|
|
339
339
|
}
|
|
340
340
|
),
|
|
341
341
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -343,49 +343,49 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
343
343
|
}
|
|
344
344
|
) }),
|
|
345
345
|
/* @__PURE__ */ e(
|
|
346
|
-
|
|
346
|
+
_e,
|
|
347
347
|
{
|
|
348
|
-
ariaLabelClose:
|
|
348
|
+
ariaLabelClose: a.close_aria,
|
|
349
349
|
isOpen: c,
|
|
350
350
|
onClose: () => d(!1),
|
|
351
351
|
onPrimaryAction: S,
|
|
352
|
-
primaryText:
|
|
353
|
-
secondaryText:
|
|
354
|
-
title:
|
|
352
|
+
primaryText: a.save_button,
|
|
353
|
+
secondaryText: a.cancel_button,
|
|
354
|
+
title: l.date_edit_title,
|
|
355
355
|
children: /* @__PURE__ */ e(b, { alignItems: "center", mt: r.Spacing.XXLarge, children: /* @__PURE__ */ e(
|
|
356
|
-
|
|
356
|
+
Ke,
|
|
357
357
|
{
|
|
358
|
-
beginDate: Y(
|
|
358
|
+
beginDate: Y(u),
|
|
359
359
|
copy: {
|
|
360
|
-
nextAria:
|
|
361
|
-
prevAria:
|
|
362
|
-
today:
|
|
360
|
+
nextAria: l.date_next_aria,
|
|
361
|
+
prevAria: l.date_prev_aria,
|
|
362
|
+
today: a.date_range_picker.today
|
|
363
363
|
},
|
|
364
364
|
onDateSelected: p,
|
|
365
|
-
selectionType:
|
|
365
|
+
selectionType: $e.Single
|
|
366
366
|
}
|
|
367
367
|
) })
|
|
368
368
|
}
|
|
369
369
|
)
|
|
370
370
|
] });
|
|
371
|
-
},
|
|
372
|
-
const { onEvent: r } =
|
|
373
|
-
await i(t.guid), r(
|
|
371
|
+
}, ht = ({ transaction: t }) => {
|
|
372
|
+
const { onEvent: r } = w(), { removeTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = N(), [l, c] = _.useState(!1), d = async () => {
|
|
373
|
+
await i(t.guid), r(T.ON_TRANSACTION_DELETE_DELETED);
|
|
374
374
|
};
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ s(O, { className: "mx-txn-delete", children: [
|
|
376
|
+
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
377
377
|
U,
|
|
378
378
|
{
|
|
379
379
|
onClick: () => {
|
|
380
|
-
r(
|
|
380
|
+
r(T.ON_TRANSACTION_DELETE_CLICK), n(!0), c(!0);
|
|
381
381
|
},
|
|
382
382
|
children: [
|
|
383
383
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { variant: "rounded", children: /* @__PURE__ */ e(ie, { color: "secondary", fontSize: "small" }) }) }),
|
|
384
384
|
/* @__PURE__ */ e(
|
|
385
385
|
M,
|
|
386
386
|
{
|
|
387
|
-
primary:
|
|
388
|
-
secondary:
|
|
387
|
+
primary: a.manual_transaction_delete_title,
|
|
388
|
+
secondary: a.manual_transaction_delete_subtitle
|
|
389
389
|
}
|
|
390
390
|
),
|
|
391
391
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(ie, {}) })
|
|
@@ -395,73 +395,73 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
395
395
|
/* @__PURE__ */ e(
|
|
396
396
|
W,
|
|
397
397
|
{
|
|
398
|
-
copy: { title:
|
|
399
|
-
isOpen:
|
|
398
|
+
copy: { title: a.manual_transaction_delete_title },
|
|
399
|
+
isOpen: l,
|
|
400
400
|
onClose: () => {
|
|
401
|
-
|
|
401
|
+
n(!1), c(!1);
|
|
402
402
|
},
|
|
403
403
|
onPrimaryAction: d,
|
|
404
|
-
onSecondaryAction: () => r(
|
|
404
|
+
onSecondaryAction: () => r(T.ON_TRANSACTION_DELETE_CANCEL),
|
|
405
405
|
primaryText: o.delete_button,
|
|
406
406
|
secondaryText: o.cancel_button,
|
|
407
|
-
children: /* @__PURE__ */ e(
|
|
407
|
+
children: /* @__PURE__ */ e(y, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.manual_transaction_delete_description })
|
|
408
408
|
}
|
|
409
409
|
)
|
|
410
410
|
] });
|
|
411
|
-
},
|
|
412
|
-
const { onEvent: r } =
|
|
411
|
+
}, Tt = A(ht), yt = ({ transaction: t }) => {
|
|
412
|
+
const { onEvent: r } = w(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = N(), [l, c] = _.useState(!1), d = async () => {
|
|
413
413
|
await i({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
414
414
|
transaction_guid: t.guid
|
|
415
415
|
});
|
|
416
416
|
};
|
|
417
|
-
return /* @__PURE__ */
|
|
418
|
-
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ s(O, { className: "mx-txn-delete-logo", children: [
|
|
418
|
+
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
419
419
|
U,
|
|
420
420
|
{
|
|
421
421
|
onClick: () => {
|
|
422
|
-
r(
|
|
422
|
+
r(T.ON_TRANSACTION_DELETE_LOGO_CLICK), c(!0);
|
|
423
423
|
},
|
|
424
424
|
children: [
|
|
425
425
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
426
|
-
/* @__PURE__ */ e(M, { primary:
|
|
426
|
+
/* @__PURE__ */ e(M, { primary: a.merchant_logo_title, secondary: a.merchant_logo_desc }),
|
|
427
427
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
428
428
|
]
|
|
429
429
|
}
|
|
430
430
|
) }),
|
|
431
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ s(
|
|
432
432
|
W,
|
|
433
433
|
{
|
|
434
|
-
copy: { title:
|
|
435
|
-
isOpen:
|
|
434
|
+
copy: { title: a.merchant_logo_modal_title },
|
|
435
|
+
isOpen: l,
|
|
436
436
|
onClose: () => {
|
|
437
|
-
|
|
437
|
+
n(!1), c(!1);
|
|
438
438
|
},
|
|
439
439
|
onPrimaryAction: d,
|
|
440
|
-
onSecondaryAction: () => r(
|
|
440
|
+
onSecondaryAction: () => r(T.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
441
441
|
primaryText: o.delete_button,
|
|
442
442
|
secondaryText: o.cancel_button,
|
|
443
|
-
title:
|
|
443
|
+
title: a.merchant_logo_modal_title,
|
|
444
444
|
children: [
|
|
445
|
-
/* @__PURE__ */ e(
|
|
446
|
-
/* @__PURE__ */ e(
|
|
445
|
+
/* @__PURE__ */ e(y, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.merchant_logo_modal_desc }),
|
|
446
|
+
/* @__PURE__ */ e(y, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${a.merchant_logo_modal_desc_bold}` })
|
|
447
447
|
]
|
|
448
448
|
}
|
|
449
449
|
)
|
|
450
450
|
] });
|
|
451
|
-
},
|
|
452
|
-
const { onEvent: r } =
|
|
451
|
+
}, St = A(yt), Ct = ({ transaction: t }) => {
|
|
452
|
+
const { onEvent: r } = w(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = N(), [l, c] = _.useState(!1), d = t.is_hidden, u = async () => {
|
|
453
453
|
await i({ ...t, is_hidden: !t.is_hidden }), r(
|
|
454
|
-
d ?
|
|
454
|
+
d ? T.ON_TRANSACTION_UNHIDDEN : T.ON_TRANSACTION_HIDDEN
|
|
455
455
|
);
|
|
456
456
|
};
|
|
457
|
-
return /* @__PURE__ */
|
|
458
|
-
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ s(O, { className: "mx-txn-hide-transaction", children: [
|
|
458
|
+
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
459
459
|
U,
|
|
460
460
|
{
|
|
461
461
|
"aria-checked": d,
|
|
462
462
|
onClick: () => {
|
|
463
463
|
r(
|
|
464
|
-
d ?
|
|
464
|
+
d ? T.ON_TRANSACTION_UNHIDE_CLICK : T.ON_TRANSACTION_HIDE_CLICK
|
|
465
465
|
), r(
|
|
466
466
|
d ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
|
467
467
|
{
|
|
@@ -482,12 +482,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
483
|
M,
|
|
484
484
|
{
|
|
485
|
-
primary: d ?
|
|
486
|
-
secondary: d ?
|
|
485
|
+
primary: d ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx,
|
|
486
|
+
secondary: d ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding
|
|
487
487
|
}
|
|
488
488
|
),
|
|
489
489
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
490
|
-
|
|
490
|
+
tt,
|
|
491
491
|
{
|
|
492
492
|
checked: d,
|
|
493
493
|
id: "hide-transaction",
|
|
@@ -502,74 +502,74 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
502
502
|
W,
|
|
503
503
|
{
|
|
504
504
|
copy: {
|
|
505
|
-
title: d ?
|
|
505
|
+
title: d ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx
|
|
506
506
|
},
|
|
507
|
-
isOpen:
|
|
507
|
+
isOpen: l,
|
|
508
508
|
onClose: () => {
|
|
509
|
-
|
|
509
|
+
n(!1), c(!1);
|
|
510
510
|
},
|
|
511
|
-
onPrimaryAction:
|
|
511
|
+
onPrimaryAction: u,
|
|
512
512
|
onSecondaryAction: () => r(
|
|
513
|
-
d ?
|
|
513
|
+
d ? T.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : T.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
|
514
514
|
),
|
|
515
515
|
primaryText: d ? o.unhide_button : o.hide_button,
|
|
516
516
|
secondaryText: o.cancel_button,
|
|
517
|
-
children: /* @__PURE__ */ e(
|
|
517
|
+
children: /* @__PURE__ */ e(y, { truncate: !1, variant: "Paragraph", children: d ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding })
|
|
518
518
|
}
|
|
519
519
|
)
|
|
520
520
|
] });
|
|
521
|
-
},
|
|
522
|
-
const { amount: r, description: i, isIncome:
|
|
523
|
-
return /* @__PURE__ */
|
|
521
|
+
}, ft = A(Ct), Re = ({ transaction: t }) => {
|
|
522
|
+
const { amount: r, description: i, isIncome: n, merchant_guid: o, payee: a, top_level_category_guid: l } = t;
|
|
523
|
+
return /* @__PURE__ */ s(b, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
524
524
|
/* @__PURE__ */ e(
|
|
525
525
|
ge,
|
|
526
526
|
{
|
|
527
|
-
categoryGuid:
|
|
527
|
+
categoryGuid: l || "",
|
|
528
528
|
merchantGuid: o || "",
|
|
529
529
|
size: 64
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */ e(
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
|
|
532
|
+
/* @__PURE__ */ s(b, { overflow: "hidden'", children: [
|
|
533
|
+
/* @__PURE__ */ e(y, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || a }),
|
|
534
|
+
/* @__PURE__ */ s(Ae, { color: n ? "success.main" : "text.primary", truncate: !0, children: [
|
|
535
|
+
n ? "+" : "",
|
|
536
536
|
ae(r, "0,0.00")
|
|
537
537
|
] })
|
|
538
538
|
] })
|
|
539
539
|
] });
|
|
540
|
-
},
|
|
541
|
-
const { onEvent: r } =
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}, [
|
|
540
|
+
}, bt = ({ transaction: t }) => {
|
|
541
|
+
const { onEvent: r } = w(), { updateTransaction: i } = v(), { updateManualTransaction: n } = G(), { common: o, transactions: a } = N(), [l, c] = _.useState(!1), [d, u] = _.useState("");
|
|
542
|
+
_.useEffect(() => {
|
|
543
|
+
l && u(t.memo ? t.memo : "");
|
|
544
|
+
}, [l]);
|
|
545
545
|
const m = async () => {
|
|
546
546
|
if (t.is_manual && !t.guid) {
|
|
547
|
-
|
|
547
|
+
n({ ...t, memo: d }), c(!1);
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
550
|
await i({ ...t, memo: d }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), c(!1);
|
|
551
551
|
};
|
|
552
|
-
return /* @__PURE__ */
|
|
553
|
-
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ s("div", { className: "mx-txn-memo-action", children: [
|
|
553
|
+
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
554
554
|
U,
|
|
555
555
|
{
|
|
556
556
|
onClick: () => {
|
|
557
|
-
r(
|
|
557
|
+
r(T.ON_TRANSACTION_MEMO_CLICK), c(!0);
|
|
558
558
|
},
|
|
559
559
|
children: [
|
|
560
560
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
561
561
|
/* @__PURE__ */ e(
|
|
562
562
|
M,
|
|
563
563
|
{
|
|
564
|
-
primary:
|
|
564
|
+
primary: a.memo_title,
|
|
565
565
|
primaryTypographyProps: { variant: "XSmall" },
|
|
566
566
|
secondary: /* @__PURE__ */ e(
|
|
567
|
-
|
|
567
|
+
y,
|
|
568
568
|
{
|
|
569
569
|
bold: !0,
|
|
570
570
|
sx: { overflowWrap: "break-word", whiteSpace: "wrap" },
|
|
571
571
|
variant: "Body",
|
|
572
|
-
children: t.memo ? t.memo :
|
|
572
|
+
children: t.memo ? t.memo : a.memo_desc
|
|
573
573
|
}
|
|
574
574
|
)
|
|
575
575
|
}
|
|
@@ -578,26 +578,26 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
578
578
|
]
|
|
579
579
|
}
|
|
580
580
|
) }),
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
|
|
581
|
+
/* @__PURE__ */ s(
|
|
582
|
+
_e,
|
|
583
583
|
{
|
|
584
584
|
ariaLabelClose: o.close_aria,
|
|
585
|
-
isOpen:
|
|
585
|
+
isOpen: l,
|
|
586
586
|
onClose: () => c(!1),
|
|
587
587
|
onPrimaryAction: m,
|
|
588
|
-
title:
|
|
588
|
+
title: a.memo_title,
|
|
589
589
|
children: [
|
|
590
|
-
/* @__PURE__ */ e(
|
|
590
|
+
/* @__PURE__ */ e(Re, { transaction: t }),
|
|
591
591
|
/* @__PURE__ */ e(
|
|
592
592
|
ve,
|
|
593
593
|
{
|
|
594
|
-
"aria-label":
|
|
594
|
+
"aria-label": a.memo_desc_aria,
|
|
595
595
|
focused: !0,
|
|
596
596
|
fullWidth: !0,
|
|
597
597
|
multiline: !0,
|
|
598
598
|
name: "memo",
|
|
599
|
-
onChange: (p) =>
|
|
600
|
-
placeholder:
|
|
599
|
+
onChange: (p) => u(p.target.value),
|
|
600
|
+
placeholder: a.memo_desc,
|
|
601
601
|
rows: 4,
|
|
602
602
|
sx: { px: 16 },
|
|
603
603
|
value: d
|
|
@@ -607,89 +607,61 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
607
607
|
}
|
|
608
608
|
)
|
|
609
609
|
] });
|
|
610
|
-
},
|
|
611
|
-
const [r, i] = u.useState(""), [a, o] = u.useState(t), n = u.useCallback((c, d) => {
|
|
612
|
-
d && o(d), i(c);
|
|
613
|
-
}, []), s = u.useMemo(
|
|
614
|
-
() => /* @__PURE__ */ e(
|
|
615
|
-
v,
|
|
616
|
-
{
|
|
617
|
-
"aria-atomic": "true",
|
|
618
|
-
"aria-live": a,
|
|
619
|
-
role: a === "assertive" ? "alert" : "status",
|
|
620
|
-
sx: {
|
|
621
|
-
position: "absolute",
|
|
622
|
-
width: "1px",
|
|
623
|
-
height: "1px",
|
|
624
|
-
padding: 0,
|
|
625
|
-
margin: "-1px",
|
|
626
|
-
overflow: "hidden",
|
|
627
|
-
clip: "rect(0 0 0 0)",
|
|
628
|
-
clipPath: "inset(50%)",
|
|
629
|
-
whiteSpace: "nowrap",
|
|
630
|
-
border: 0
|
|
631
|
-
},
|
|
632
|
-
children: r
|
|
633
|
-
}
|
|
634
|
-
),
|
|
635
|
-
[r, a]
|
|
636
|
-
);
|
|
637
|
-
return { announce: n, ariaLive: s };
|
|
638
|
-
}, xt = ({
|
|
610
|
+
}, At = A(bt), xt = ({
|
|
639
611
|
index: t,
|
|
640
612
|
onDeleteRow: r,
|
|
641
613
|
onCategoryChanged: i,
|
|
642
|
-
onUpdateAmount:
|
|
614
|
+
onUpdateAmount: n,
|
|
643
615
|
split: o
|
|
644
616
|
}) => {
|
|
645
|
-
const
|
|
646
|
-
isNaN(Number(
|
|
617
|
+
const a = te(), { onEvent: l } = w(), { transactions: c } = N(), [d, u] = _.useState(`${o.amount}`), [m, p] = _.useState(!1), S = t === 0, h = (g) => {
|
|
618
|
+
isNaN(Number(g)) || (u(g), n(t, Number(g)));
|
|
647
619
|
};
|
|
648
|
-
return /* @__PURE__ */
|
|
649
|
-
|
|
620
|
+
return /* @__PURE__ */ s(
|
|
621
|
+
O,
|
|
650
622
|
{
|
|
651
623
|
bgcolor: "background.paper",
|
|
652
624
|
className: "mx-txn-split-manager-row",
|
|
653
|
-
pb:
|
|
654
|
-
px:
|
|
625
|
+
pb: a.Spacing.Tiny,
|
|
626
|
+
px: a.Spacing.XSmall,
|
|
655
627
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
/* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ s(pe, { alignItems: S ? "center" : "start", container: !0, children: [
|
|
629
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */ s(b, { alignItems: "start", children: [
|
|
658
630
|
/* @__PURE__ */ e(
|
|
659
631
|
de,
|
|
660
632
|
{
|
|
661
|
-
endIcon: /* @__PURE__ */ e(
|
|
633
|
+
endIcon: /* @__PURE__ */ e(Xe, {}),
|
|
662
634
|
onClick: () => p(!0),
|
|
663
635
|
startIcon: /* @__PURE__ */ e(he, { categoryGuid: o.top_level_category_guid }),
|
|
664
|
-
sx: { px:
|
|
636
|
+
sx: { px: a.Spacing.Small, py: a.Spacing.XSmall },
|
|
665
637
|
children: o.category
|
|
666
638
|
}
|
|
667
639
|
),
|
|
668
|
-
/* @__PURE__ */ e(
|
|
640
|
+
/* @__PURE__ */ e(O, { children: !o.category_guid && /* @__PURE__ */ s(
|
|
669
641
|
b,
|
|
670
642
|
{
|
|
671
643
|
color: "error.main",
|
|
672
644
|
direction: "row",
|
|
673
|
-
gap:
|
|
674
|
-
p:
|
|
645
|
+
gap: a.Spacing.XSmall,
|
|
646
|
+
p: a.Spacing.Small,
|
|
675
647
|
children: [
|
|
676
|
-
/* @__PURE__ */ e(se, { sx: { fontSize:
|
|
677
|
-
/* @__PURE__ */ e(
|
|
648
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(se, { sx: { fontSize: a.FontSize.Body } }) }),
|
|
649
|
+
/* @__PURE__ */ e(y, { variant: "Small", children: c.split_transaction_errors_select_category })
|
|
678
650
|
]
|
|
679
651
|
}
|
|
680
652
|
) })
|
|
681
653
|
] }) }),
|
|
682
|
-
/* @__PURE__ */ e(pe, { item: !0, xs: 5, children: S ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(
|
|
683
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 5, children: S ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(y, { children: ae(o.amount, "0,0.00") }) }) : /* @__PURE__ */ s(b, { alignItems: "start", children: [
|
|
655
|
+
/* @__PURE__ */ s(b, { alignItems: "start", direction: "row", gap: a.Spacing.XSmall, children: [
|
|
684
656
|
/* @__PURE__ */ e(
|
|
685
|
-
|
|
657
|
+
et,
|
|
686
658
|
{
|
|
687
659
|
amount: d,
|
|
688
660
|
ariaLabel: c.split_transaction_edit_split_amount,
|
|
689
661
|
name: "split-amount-input",
|
|
690
|
-
setAmount:
|
|
662
|
+
setAmount: h,
|
|
691
663
|
sx: {
|
|
692
|
-
".MuiOutlinedInput-input": { p:
|
|
664
|
+
".MuiOutlinedInput-input": { p: a.Spacing.Small }
|
|
693
665
|
},
|
|
694
666
|
type: "number"
|
|
695
667
|
}
|
|
@@ -700,35 +672,35 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
700
672
|
"aria-label": c.split_transaction_delete_split_btn,
|
|
701
673
|
color: "secondary",
|
|
702
674
|
onClick: () => {
|
|
703
|
-
|
|
675
|
+
l(T.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
|
|
704
676
|
},
|
|
705
677
|
sx: { w: 44, h: 44 },
|
|
706
678
|
children: /* @__PURE__ */ e(ie, {})
|
|
707
679
|
}
|
|
708
680
|
)
|
|
709
681
|
] }),
|
|
710
|
-
!d && /* @__PURE__ */
|
|
682
|
+
!d && /* @__PURE__ */ s(
|
|
711
683
|
b,
|
|
712
684
|
{
|
|
713
685
|
color: "error.main",
|
|
714
686
|
direction: "row",
|
|
715
|
-
gap:
|
|
716
|
-
py:
|
|
687
|
+
gap: a.Spacing.XSmall,
|
|
688
|
+
py: a.Spacing.Small,
|
|
717
689
|
children: [
|
|
718
|
-
/* @__PURE__ */ e(se, { sx: { fontSize:
|
|
719
|
-
/* @__PURE__ */ e(
|
|
690
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(se, { sx: { fontSize: a.FontSize.Body } }) }),
|
|
691
|
+
/* @__PURE__ */ e(y, { variant: "Small", children: c.split_transaction_errors_enter_an_amount })
|
|
720
692
|
]
|
|
721
693
|
}
|
|
722
694
|
)
|
|
723
695
|
] }) })
|
|
724
696
|
] }),
|
|
725
697
|
/* @__PURE__ */ e(
|
|
726
|
-
|
|
698
|
+
Le,
|
|
727
699
|
{
|
|
728
700
|
initialSelected: o.category_guid,
|
|
729
701
|
onClose: () => p(!1),
|
|
730
|
-
onSelect: (
|
|
731
|
-
i(t,
|
|
702
|
+
onSelect: (g) => {
|
|
703
|
+
i(t, g), p(!1);
|
|
732
704
|
},
|
|
733
705
|
showDrawer: m,
|
|
734
706
|
title: c.actions_select_a_category
|
|
@@ -741,91 +713,91 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
741
713
|
onAddSplit: t,
|
|
742
714
|
onCategoryChanged: r,
|
|
743
715
|
onDeleteSplit: i,
|
|
744
|
-
onUpdateAmount:
|
|
716
|
+
onUpdateAmount: n,
|
|
745
717
|
splits: o,
|
|
746
|
-
transaction:
|
|
718
|
+
transaction: a
|
|
747
719
|
}) => {
|
|
748
|
-
const
|
|
749
|
-
return
|
|
720
|
+
const l = te(), { transactions: c } = N(), { onEvent: d } = w(), [u, m] = _.useState(""), { announce: p, ariaLive: S } = De();
|
|
721
|
+
return _.useEffect(() => {
|
|
750
722
|
if (o.length <= 1)
|
|
751
723
|
m(c.split_transaction_errors_min_splits), p(c.split_transaction_errors_min_splits);
|
|
752
724
|
else if (o[0].amount < 0) {
|
|
753
|
-
const
|
|
725
|
+
const h = le(
|
|
754
726
|
c.split_transaction_errors_totals_must_equal_amount,
|
|
755
|
-
ae(
|
|
727
|
+
ae(a.amount, "0,0.00")
|
|
756
728
|
);
|
|
757
|
-
m(
|
|
729
|
+
m(h), p(h);
|
|
758
730
|
} else
|
|
759
731
|
m(""), p("");
|
|
760
|
-
}, [o]), /* @__PURE__ */
|
|
761
|
-
o.map((
|
|
732
|
+
}, [o]), /* @__PURE__ */ s(O, { className: "mx-txn-split-manager", children: [
|
|
733
|
+
o.map((h, g) => /* @__PURE__ */ e(
|
|
762
734
|
Nt,
|
|
763
735
|
{
|
|
764
|
-
index:
|
|
736
|
+
index: g,
|
|
765
737
|
onCategoryChanged: r,
|
|
766
738
|
onDeleteRow: i,
|
|
767
|
-
onUpdateAmount:
|
|
768
|
-
split:
|
|
739
|
+
onUpdateAmount: n,
|
|
740
|
+
split: h
|
|
769
741
|
},
|
|
770
|
-
|
|
742
|
+
g
|
|
771
743
|
)),
|
|
772
|
-
|
|
744
|
+
u && /* @__PURE__ */ s(
|
|
773
745
|
b,
|
|
774
746
|
{
|
|
775
747
|
color: "error.main",
|
|
776
748
|
direction: "row",
|
|
777
|
-
gap:
|
|
778
|
-
p:
|
|
749
|
+
gap: l.Spacing.XSmall,
|
|
750
|
+
p: l.Spacing.Medium,
|
|
779
751
|
children: [
|
|
780
|
-
/* @__PURE__ */ e(se, { sx: { fontSize:
|
|
781
|
-
/* @__PURE__ */ e(
|
|
752
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(se, { sx: { fontSize: l.FontSize.Body } }) }),
|
|
753
|
+
/* @__PURE__ */ e(y, { variant: "Small", children: u }),
|
|
782
754
|
S
|
|
783
755
|
]
|
|
784
756
|
}
|
|
785
757
|
),
|
|
786
|
-
/* @__PURE__ */ e(
|
|
758
|
+
/* @__PURE__ */ e(O, { p: l.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
787
759
|
de,
|
|
788
760
|
{
|
|
789
761
|
"aria-label": c.split_transaction_add_split_btn,
|
|
790
762
|
onClick: () => {
|
|
791
|
-
d(
|
|
763
|
+
d(T.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
792
764
|
},
|
|
793
765
|
children: c.split_transaction_add_split_btn
|
|
794
766
|
}
|
|
795
767
|
) })
|
|
796
768
|
] });
|
|
797
|
-
},
|
|
798
|
-
const { onEvent: r } =
|
|
769
|
+
}, Dt = A(It), vt = ({ transaction: t }) => {
|
|
770
|
+
const { onEvent: r } = w(), { splitTransaction: i, unSplitTransaction: n } = v(), { common: o, transactions: a } = N(), { setShouldDisableDrawerScroll: l } = G(), { categories: c } = xe(), d = {
|
|
799
771
|
...t,
|
|
800
772
|
amount: t.amount - 1,
|
|
801
773
|
guid: "",
|
|
802
774
|
has_been_split: !1,
|
|
803
775
|
parent_guid: t.guid
|
|
804
|
-
},
|
|
776
|
+
}, u = {
|
|
805
777
|
...t,
|
|
806
778
|
amount: 1,
|
|
807
779
|
category_guid: void 0,
|
|
808
|
-
category:
|
|
780
|
+
category: a.split_transaction_select_category_btn,
|
|
809
781
|
guid: "",
|
|
810
782
|
has_been_split: !1,
|
|
811
783
|
parent_guid: t.guid,
|
|
812
784
|
top_level_category_guid: void 0
|
|
813
|
-
}, [m, p] =
|
|
814
|
-
const x = [...
|
|
815
|
-
x.push({ ...
|
|
816
|
-
},
|
|
785
|
+
}, [m, p] = _.useState(!1), [S, h] = _.useState(!1), [g, I] = _.useState([]), f = () => {
|
|
786
|
+
const x = [...g];
|
|
787
|
+
x.push({ ...u }), x[0].amount -= 1, I(x);
|
|
788
|
+
}, R = (x) => {
|
|
817
789
|
if (x > 0) {
|
|
818
|
-
const H =
|
|
790
|
+
const H = g[x], E = [...g];
|
|
819
791
|
E.splice(x, 1), E[0].amount += H.amount, I(E);
|
|
820
792
|
}
|
|
821
793
|
}, F = (x, H) => {
|
|
822
|
-
const E = [...
|
|
794
|
+
const E = [...g];
|
|
823
795
|
E[x].amount = H, E[0].amount = t.amount - E.reduce(
|
|
824
796
|
(q, me, ke) => q + (ke !== 0 ? me.amount : 0),
|
|
825
797
|
0
|
|
826
798
|
), I(E);
|
|
827
799
|
}, j = (x, H) => {
|
|
828
|
-
const E = [...
|
|
800
|
+
const E = [...g], q = c.find((me) => me.guid === H);
|
|
829
801
|
q && (E[x] = {
|
|
830
802
|
...E[x],
|
|
831
803
|
category_guid: H,
|
|
@@ -834,59 +806,59 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
834
806
|
}, I(E));
|
|
835
807
|
}, K = () => {
|
|
836
808
|
if (t.parent_guid || t.has_been_split) {
|
|
837
|
-
|
|
809
|
+
h(!0);
|
|
838
810
|
return;
|
|
839
811
|
}
|
|
840
|
-
I([{ ...d }, { ...
|
|
812
|
+
I([{ ...d }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
841
813
|
transaction_guid: t.guid
|
|
842
814
|
}), p(!0);
|
|
843
815
|
}, L = async () => {
|
|
844
|
-
r(
|
|
845
|
-
},
|
|
846
|
-
r(
|
|
816
|
+
r(T.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, g), p(!1);
|
|
817
|
+
}, k = async () => {
|
|
818
|
+
r(T.ON_TRANSACTION_SPLIT_CANCEL_CLICK), I([{ ...d }, { ...u }]), p(!1);
|
|
847
819
|
}, V = async () => {
|
|
848
820
|
r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
849
821
|
transaction_guid: t.guid
|
|
850
822
|
});
|
|
851
823
|
const x = t.parent_guid ?? t.guid;
|
|
852
|
-
await
|
|
853
|
-
},
|
|
854
|
-
const x =
|
|
824
|
+
await n(x);
|
|
825
|
+
}, ue = _.useMemo(() => {
|
|
826
|
+
const x = g.some((E) => !E.category_guid), H = g.some((E) => E.amount <= 0);
|
|
855
827
|
return x || H;
|
|
856
|
-
}, [
|
|
857
|
-
return /* @__PURE__ */
|
|
858
|
-
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
828
|
+
}, [g]);
|
|
829
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
830
|
+
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(U, { onClick: K, children: [
|
|
859
831
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
860
832
|
/* @__PURE__ */ e(
|
|
861
833
|
M,
|
|
862
834
|
{
|
|
863
|
-
primary: t.has_been_split || t.parent_guid ?
|
|
864
|
-
secondary: t.has_been_split || t.parent_guid ?
|
|
835
|
+
primary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_title : a.split_transaction_title,
|
|
836
|
+
secondary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_subtitle : a.split_transaction_desc
|
|
865
837
|
}
|
|
866
838
|
),
|
|
867
839
|
/* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(C, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
868
840
|
] }) }),
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
|
|
841
|
+
/* @__PURE__ */ s(
|
|
842
|
+
_e,
|
|
871
843
|
{
|
|
872
844
|
ariaLabelClose: o.close_aria,
|
|
873
845
|
isOpen: m,
|
|
874
|
-
isPrimaryDisabled:
|
|
875
|
-
onClose:
|
|
846
|
+
isPrimaryDisabled: ue,
|
|
847
|
+
onClose: k,
|
|
876
848
|
onPrimaryAction: L,
|
|
877
849
|
primaryText: o.save_button,
|
|
878
850
|
secondaryText: o.cancel_button,
|
|
879
|
-
title:
|
|
851
|
+
title: a.split_transaction_title,
|
|
880
852
|
children: [
|
|
881
|
-
/* @__PURE__ */ e(
|
|
853
|
+
/* @__PURE__ */ e(Re, { transaction: t }),
|
|
882
854
|
/* @__PURE__ */ e(
|
|
883
|
-
|
|
855
|
+
Dt,
|
|
884
856
|
{
|
|
885
857
|
onAddSplit: f,
|
|
886
858
|
onCategoryChanged: j,
|
|
887
|
-
onDeleteSplit:
|
|
859
|
+
onDeleteSplit: R,
|
|
888
860
|
onUpdateAmount: F,
|
|
889
|
-
splits:
|
|
861
|
+
splits: g,
|
|
890
862
|
transaction: t
|
|
891
863
|
}
|
|
892
864
|
)
|
|
@@ -896,40 +868,40 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
896
868
|
/* @__PURE__ */ e(
|
|
897
869
|
W,
|
|
898
870
|
{
|
|
899
|
-
copy: { title:
|
|
871
|
+
copy: { title: a.split_transaction_unsplit_title },
|
|
900
872
|
isOpen: S,
|
|
901
873
|
onClose: () => {
|
|
902
|
-
|
|
874
|
+
l(!1), h(!1);
|
|
903
875
|
},
|
|
904
876
|
onPrimaryAction: V,
|
|
905
877
|
onSecondaryAction: () => {
|
|
906
|
-
r(
|
|
878
|
+
r(T.ON_TRANSACTION_UNSPLIT_CANCEL);
|
|
907
879
|
},
|
|
908
880
|
primaryText: o.delete_button,
|
|
909
881
|
secondaryText: o.cancel_button,
|
|
910
882
|
children: /* @__PURE__ */ e(ce, { variant: "Paragraph", children: le(
|
|
911
|
-
|
|
883
|
+
a.split_transaction_unsplit_description,
|
|
912
884
|
t.description
|
|
913
885
|
) })
|
|
914
886
|
}
|
|
915
887
|
)
|
|
916
888
|
] });
|
|
917
|
-
},
|
|
918
|
-
const t =
|
|
919
|
-
|
|
889
|
+
}, Et = A(vt), Ot = () => {
|
|
890
|
+
const t = Ee(), { onEvent: r } = w(), { addTag: i } = v(), { transactions: n } = N(), [o, a] = _.useState(!1), [l, c] = _.useState(""), [d, u] = _.useState(""), m = _.useRef(null);
|
|
891
|
+
_.useEffect(() => {
|
|
920
892
|
o && m?.current?.focus();
|
|
921
893
|
}, [o]);
|
|
922
894
|
const p = () => {
|
|
923
895
|
r(
|
|
924
|
-
o ?
|
|
925
|
-
), o || c(""),
|
|
896
|
+
o ? T.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : T.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
897
|
+
), o || c(""), a(!o);
|
|
926
898
|
}, S = async () => {
|
|
927
|
-
r(
|
|
899
|
+
r(T.ON_TRANSACTION_TAGS_TAG_ADDED), await i(l), a(!1);
|
|
928
900
|
};
|
|
929
|
-
return
|
|
930
|
-
|
|
931
|
-
}, [
|
|
932
|
-
/* @__PURE__ */
|
|
901
|
+
return _.useEffect(() => {
|
|
902
|
+
u(l.length > 40 ? n.tags_error_name_must_be_40_chars : "");
|
|
903
|
+
}, [l]), /* @__PURE__ */ s(O, { className: "mx-txn-tag-manager-header", children: [
|
|
904
|
+
/* @__PURE__ */ s(
|
|
933
905
|
b,
|
|
934
906
|
{
|
|
935
907
|
alignItems: "center",
|
|
@@ -939,37 +911,37 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
939
911
|
px: 24,
|
|
940
912
|
py: 16,
|
|
941
913
|
children: [
|
|
942
|
-
/* @__PURE__ */ e(
|
|
914
|
+
/* @__PURE__ */ e(y, { bold: !0, children: n.tags_your_tags }),
|
|
943
915
|
/* @__PURE__ */ e(
|
|
944
916
|
de,
|
|
945
917
|
{
|
|
946
918
|
"aria-expanded": o,
|
|
947
|
-
"aria-label":
|
|
919
|
+
"aria-label": n.tags_add_tag_btn_aria,
|
|
948
920
|
onClick: p,
|
|
949
|
-
children:
|
|
921
|
+
children: n.tags_add_tag_btn
|
|
950
922
|
}
|
|
951
923
|
)
|
|
952
924
|
]
|
|
953
925
|
}
|
|
954
926
|
),
|
|
955
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ s(
|
|
956
928
|
W,
|
|
957
929
|
{
|
|
958
|
-
copy: { title:
|
|
930
|
+
copy: { title: n.tags_add_tag_btn },
|
|
959
931
|
isOpen: o,
|
|
960
|
-
onClose: () =>
|
|
932
|
+
onClose: () => a(!1),
|
|
961
933
|
onPrimaryAction: S,
|
|
962
|
-
onSecondaryAction: () =>
|
|
934
|
+
onSecondaryAction: () => a(!1),
|
|
963
935
|
children: [
|
|
964
936
|
/* @__PURE__ */ e(
|
|
965
937
|
Te,
|
|
966
938
|
{
|
|
967
|
-
"aria-label":
|
|
939
|
+
"aria-label": n.tags_placeholder,
|
|
968
940
|
name: "add-tag",
|
|
969
|
-
onChange: (
|
|
970
|
-
placeholder:
|
|
941
|
+
onChange: (h) => c(h.target.value),
|
|
942
|
+
placeholder: n.tags_placeholder,
|
|
971
943
|
sx: { width: "100%" },
|
|
972
|
-
value:
|
|
944
|
+
value: l
|
|
973
945
|
}
|
|
974
946
|
),
|
|
975
947
|
/* @__PURE__ */ e(ce, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: d })
|
|
@@ -977,58 +949,58 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
977
949
|
}
|
|
978
950
|
)
|
|
979
951
|
] });
|
|
980
|
-
},
|
|
981
|
-
const { common: i, transactions:
|
|
952
|
+
}, wt = A(Ot), Lt = ({ onSearchValueChanged: t, searchValue: r }) => {
|
|
953
|
+
const { common: i, transactions: n } = N(), o = te(), a = /* @__PURE__ */ e(
|
|
982
954
|
ee,
|
|
983
955
|
{
|
|
984
|
-
"aria-label":
|
|
956
|
+
"aria-label": n.tags_cancel_search || "Search",
|
|
985
957
|
onClick: () => t(""),
|
|
986
958
|
children: /* @__PURE__ */ e(se, {})
|
|
987
959
|
}
|
|
988
960
|
);
|
|
989
|
-
return /* @__PURE__ */ e(
|
|
961
|
+
return /* @__PURE__ */ e(O, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
990
962
|
Te,
|
|
991
963
|
{
|
|
992
964
|
InputProps: {
|
|
993
|
-
startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(
|
|
994
|
-
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ?
|
|
965
|
+
startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(Ve, { color: "disabled" }) }),
|
|
966
|
+
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? a : null })
|
|
995
967
|
},
|
|
996
968
|
"aria-label": i.search_aria,
|
|
997
969
|
name: "search",
|
|
998
|
-
onChange: (
|
|
970
|
+
onChange: (l) => t(l.target.value),
|
|
999
971
|
placeholder: i.search_placeholder,
|
|
1000
972
|
sx: { bgcolor: "background.paper", width: "100%" },
|
|
1001
973
|
value: r
|
|
1002
974
|
}
|
|
1003
975
|
) });
|
|
1004
|
-
},
|
|
1005
|
-
const { onEvent:
|
|
1006
|
-
|
|
1007
|
-
},
|
|
1008
|
-
|
|
976
|
+
}, Rt = A(Lt), kt = ({ onTagChecked: t, selectedTags: r, tag: i }) => {
|
|
977
|
+
const { onEvent: n } = w(), { removeTag: o, updateTag: a } = v(), { common: l, transactions: c } = N(), [d, u] = _.useState(!1), [m, p] = _.useState(!1), [S, h] = _.useState(""), [g, I] = _.useState(""), f = async () => {
|
|
978
|
+
n(T.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name: S }), u(!1);
|
|
979
|
+
}, R = async () => {
|
|
980
|
+
n(T.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
|
|
1009
981
|
};
|
|
1010
|
-
|
|
982
|
+
_.useEffect(() => {
|
|
1011
983
|
I(S.length > 40 ? c.tags_error_name_must_be_40_chars : "");
|
|
1012
984
|
}, [S]);
|
|
1013
985
|
const F = () => {
|
|
1014
|
-
|
|
986
|
+
n(T.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), h(i.name), u(!0);
|
|
1015
987
|
}, j = () => {
|
|
1016
|
-
|
|
988
|
+
n(T.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
|
|
1017
989
|
};
|
|
1018
|
-
return /* @__PURE__ */
|
|
990
|
+
return /* @__PURE__ */ s(
|
|
1019
991
|
B,
|
|
1020
992
|
{
|
|
1021
993
|
className: "mx-txn-transaction-manager-row",
|
|
1022
994
|
disableGutters: !0,
|
|
1023
995
|
disablePadding: !0,
|
|
1024
|
-
secondaryAction: !i.is_default_tag && /* @__PURE__ */
|
|
996
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ s(b, { direction: "row", children: [
|
|
1025
997
|
/* @__PURE__ */ e(
|
|
1026
998
|
ee,
|
|
1027
999
|
{
|
|
1028
1000
|
"aria-label": `Edit ${i.name} tag`,
|
|
1029
1001
|
color: "secondary",
|
|
1030
1002
|
onClick: F,
|
|
1031
|
-
children: /* @__PURE__ */ e(
|
|
1003
|
+
children: /* @__PURE__ */ e(We, { color: "secondary" })
|
|
1032
1004
|
}
|
|
1033
1005
|
),
|
|
1034
1006
|
/* @__PURE__ */ e(
|
|
@@ -1042,40 +1014,40 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1042
1014
|
)
|
|
1043
1015
|
] }),
|
|
1044
1016
|
children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ s(
|
|
1046
1018
|
U,
|
|
1047
1019
|
{
|
|
1048
1020
|
"aria-checked": r.includes(i.guid),
|
|
1049
1021
|
onClick: () => t(i.guid),
|
|
1050
1022
|
role: "checkbox",
|
|
1051
1023
|
children: [
|
|
1052
|
-
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
|
|
1024
|
+
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Qe, { checked: r.includes(i.guid), edge: "start", tabIndex: -1 }) }),
|
|
1053
1025
|
/* @__PURE__ */ e(M, { children: i.name })
|
|
1054
1026
|
]
|
|
1055
1027
|
}
|
|
1056
1028
|
),
|
|
1057
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ s(
|
|
1058
1030
|
W,
|
|
1059
1031
|
{
|
|
1060
1032
|
copy: { title: "Update tag name" },
|
|
1061
1033
|
isOpen: d,
|
|
1062
|
-
onClose: () =>
|
|
1034
|
+
onClose: () => u(!1),
|
|
1063
1035
|
onPrimaryAction: f,
|
|
1064
|
-
onSecondaryAction: () =>
|
|
1036
|
+
onSecondaryAction: () => u(!1),
|
|
1065
1037
|
children: [
|
|
1066
1038
|
/* @__PURE__ */ e(
|
|
1067
1039
|
Te,
|
|
1068
1040
|
{
|
|
1069
|
-
"aria-describedby":
|
|
1041
|
+
"aria-describedby": g ? "update-tag-error" : void 0,
|
|
1070
1042
|
"aria-label": c.tags_update_the_tag_name,
|
|
1071
1043
|
name: "update-tag",
|
|
1072
|
-
onChange: (K) =>
|
|
1044
|
+
onChange: (K) => h(K.target.value),
|
|
1073
1045
|
placeholder: "Tag name",
|
|
1074
1046
|
sx: { width: "100%" },
|
|
1075
1047
|
value: S
|
|
1076
1048
|
}
|
|
1077
1049
|
),
|
|
1078
|
-
/* @__PURE__ */ e(ce, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children:
|
|
1050
|
+
/* @__PURE__ */ e(ce, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: g })
|
|
1079
1051
|
]
|
|
1080
1052
|
}
|
|
1081
1053
|
),
|
|
@@ -1085,69 +1057,69 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1085
1057
|
copy: { title: c.tags_delete_title },
|
|
1086
1058
|
isOpen: m,
|
|
1087
1059
|
onClose: () => p(!1),
|
|
1088
|
-
onPrimaryAction:
|
|
1089
|
-
onSecondaryAction: () =>
|
|
1090
|
-
primaryText:
|
|
1091
|
-
secondaryText:
|
|
1092
|
-
children: /* @__PURE__ */ e(
|
|
1060
|
+
onPrimaryAction: R,
|
|
1061
|
+
onSecondaryAction: () => n(T.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1062
|
+
primaryText: l.delete_button,
|
|
1063
|
+
secondaryText: l.cancel_button,
|
|
1064
|
+
children: /* @__PURE__ */ e(y, { truncate: !1, children: c.tags_deleting_this_tag_will_remove_it })
|
|
1093
1065
|
}
|
|
1094
1066
|
)
|
|
1095
1067
|
]
|
|
1096
1068
|
}
|
|
1097
1069
|
);
|
|
1098
|
-
}, Pt = A(
|
|
1099
|
-
const { tags: i } =
|
|
1100
|
-
(
|
|
1070
|
+
}, Pt = A(kt), Gt = ({ selectedTags: t, onTagChecked: r }) => {
|
|
1071
|
+
const { tags: i } = v(), [n, o] = _.useState(""), a = i.filter(
|
|
1072
|
+
(l) => l.name.toLowerCase().includes(n.toLowerCase())
|
|
1101
1073
|
);
|
|
1102
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ s("div", { className: "mx-txn-tag-manager", children: [
|
|
1103
1075
|
/* @__PURE__ */ e(
|
|
1104
|
-
|
|
1076
|
+
Rt,
|
|
1105
1077
|
{
|
|
1106
|
-
onSearchValueChanged: (
|
|
1107
|
-
searchValue:
|
|
1078
|
+
onSearchValueChanged: (l) => o(l),
|
|
1079
|
+
searchValue: n
|
|
1108
1080
|
}
|
|
1109
1081
|
),
|
|
1110
|
-
/* @__PURE__ */ e(
|
|
1111
|
-
/* @__PURE__ */ e(re, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(Q, { children:
|
|
1112
|
-
/* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag:
|
|
1082
|
+
/* @__PURE__ */ e(wt, {}),
|
|
1083
|
+
/* @__PURE__ */ e(re, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(Q, { children: a.map((l) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1084
|
+
/* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag: l }),
|
|
1113
1085
|
/* @__PURE__ */ e(J, { sx: { ml: 24 } })
|
|
1114
|
-
] },
|
|
1086
|
+
] }, l.guid)) }) })
|
|
1115
1087
|
] });
|
|
1116
1088
|
}, Mt = A(Gt), Kt = ({ transaction: t }) => {
|
|
1117
|
-
const { onEvent: r } =
|
|
1118
|
-
|
|
1089
|
+
const { onEvent: r } = w(), { tags: i, updateTaggings: n, updateTransaction: o } = v(), { common: a, transactions: l } = N(), { updateManualTransaction: c } = G(), [d, u] = _.useState(!1), [m, p] = _.useState(t.tags);
|
|
1090
|
+
_.useEffect(() => {
|
|
1119
1091
|
p(t.tags);
|
|
1120
1092
|
}, [d, t]);
|
|
1121
1093
|
const S = (I) => {
|
|
1122
|
-
const f = [...m],
|
|
1123
|
-
|
|
1124
|
-
},
|
|
1094
|
+
const f = [...m], R = m.indexOf(I);
|
|
1095
|
+
R >= 0 ? f.splice(R, 1) : f.push(I), p(f);
|
|
1096
|
+
}, h = async () => {
|
|
1125
1097
|
if (t.is_manual && !t.guid) {
|
|
1126
|
-
c({ ...t, tags: m }),
|
|
1098
|
+
c({ ...t, tags: m }), u(!1);
|
|
1127
1099
|
return;
|
|
1128
1100
|
}
|
|
1129
|
-
await
|
|
1130
|
-
},
|
|
1101
|
+
await n(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
|
|
1102
|
+
}, g = _.useMemo(
|
|
1131
1103
|
() => t.tags.map(
|
|
1132
|
-
(I, f,
|
|
1104
|
+
(I, f, R) => `${i.find((F) => F.guid === I)?.name}${f < R.length - 1 ? " / " : ""}`
|
|
1133
1105
|
),
|
|
1134
1106
|
[i, t]
|
|
1135
1107
|
);
|
|
1136
|
-
return /* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
1108
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1109
|
+
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
1138
1110
|
U,
|
|
1139
1111
|
{
|
|
1140
1112
|
onClick: () => {
|
|
1141
|
-
r(
|
|
1113
|
+
r(T.ON_TRANSACTION_TAGS_CLICK), u(!0);
|
|
1142
1114
|
},
|
|
1143
1115
|
children: [
|
|
1144
1116
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
1145
1117
|
/* @__PURE__ */ e(
|
|
1146
1118
|
M,
|
|
1147
1119
|
{
|
|
1148
|
-
primary:
|
|
1120
|
+
primary: l.tags_title,
|
|
1149
1121
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1150
|
-
secondary: /* @__PURE__ */ e(
|
|
1122
|
+
secondary: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? g : l.tags_desc })
|
|
1151
1123
|
}
|
|
1152
1124
|
),
|
|
1153
1125
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -1155,82 +1127,88 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1155
1127
|
}
|
|
1156
1128
|
) }),
|
|
1157
1129
|
/* @__PURE__ */ e(
|
|
1158
|
-
|
|
1130
|
+
_e,
|
|
1159
1131
|
{
|
|
1160
|
-
ariaLabelClose:
|
|
1132
|
+
ariaLabelClose: a.close_aria,
|
|
1161
1133
|
isOpen: d,
|
|
1162
|
-
onClose: () =>
|
|
1163
|
-
onPrimaryAction:
|
|
1164
|
-
primaryText:
|
|
1165
|
-
secondaryText:
|
|
1166
|
-
title:
|
|
1134
|
+
onClose: () => u(!1),
|
|
1135
|
+
onPrimaryAction: h,
|
|
1136
|
+
primaryText: a.save_button,
|
|
1137
|
+
secondaryText: a.cancel_button,
|
|
1138
|
+
title: l.tags_title,
|
|
1167
1139
|
children: /* @__PURE__ */ e(Mt, { onTagChecked: S, selectedTags: m })
|
|
1168
1140
|
}
|
|
1169
1141
|
)
|
|
1170
1142
|
] });
|
|
1171
1143
|
}, $t = A(Kt), Bt = ({ transaction: t, viewOnly: r = !1 }) => {
|
|
1172
|
-
const { updateTransaction: i } =
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
}, [
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1144
|
+
const { updateTransaction: i } = v(), { common: n, transactions: o } = N(), { onEvent: a } = w(), { announce: l, ariaLive: c } = De(), [d, u] = _.useState(!1), [m, p] = _.useState(""), S = _.useRef(null);
|
|
1145
|
+
_.useEffect(() => {
|
|
1146
|
+
d && (p(t.description), S?.current?.focus());
|
|
1147
|
+
}, [d]);
|
|
1148
|
+
const h = async () => {
|
|
1149
|
+
a(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1178
1150
|
transaction_guid: t.guid
|
|
1179
|
-
}), await i({ ...t, description:
|
|
1151
|
+
}), await i({ ...t, description: m }), u(!1), l(`${o.payee_title}: ${m}`);
|
|
1180
1152
|
};
|
|
1181
|
-
return /* @__PURE__ */
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1153
|
+
return /* @__PURE__ */ s(O, { className: "mx-txn-transaction-description", children: [
|
|
1154
|
+
c,
|
|
1155
|
+
d ? /* @__PURE__ */ s(qe, { row: !0, children: [
|
|
1156
|
+
/* @__PURE__ */ e(
|
|
1157
|
+
ve,
|
|
1158
|
+
{
|
|
1159
|
+
"aria-label": o.payee_title,
|
|
1160
|
+
label: o.payee_title,
|
|
1161
|
+
name: o.payee_title,
|
|
1162
|
+
onChange: (g) => p(g.target.value),
|
|
1163
|
+
ref: S,
|
|
1164
|
+
sx: {
|
|
1165
|
+
backgroundColor: "background.paper",
|
|
1166
|
+
".MuiOutlinedInput-root": { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
1167
|
+
".MuiOutlinedInput-input": { p: 11 },
|
|
1168
|
+
width: 250
|
|
1169
|
+
},
|
|
1170
|
+
value: m
|
|
1171
|
+
}
|
|
1172
|
+
),
|
|
1173
|
+
/* @__PURE__ */ e(
|
|
1174
|
+
de,
|
|
1175
|
+
{
|
|
1176
|
+
disabled: !m,
|
|
1177
|
+
onClick: h,
|
|
1178
|
+
sx: {
|
|
1179
|
+
borderTopLeftRadius: 0,
|
|
1180
|
+
borderBottomLeftRadius: 0
|
|
1181
|
+
},
|
|
1182
|
+
variant: "outlined",
|
|
1183
|
+
children: n.save_button
|
|
1184
|
+
}
|
|
1185
|
+
)
|
|
1186
|
+
] }) : /* @__PURE__ */ s(b, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1187
|
+
/* @__PURE__ */ e(y, { bold: !0, children: t.description }),
|
|
1188
|
+
!r && /* @__PURE__ */ e(
|
|
1189
|
+
ee,
|
|
1190
|
+
{
|
|
1191
|
+
"aria-label": o.payee_edit,
|
|
1192
|
+
onClick: () => {
|
|
1193
|
+
u(!0), a(T.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
|
1194
|
+
},
|
|
1195
|
+
sx: { color: "action.active" },
|
|
1196
|
+
children: /* @__PURE__ */ e(C, { name: "create", size: 22 })
|
|
1197
|
+
}
|
|
1198
|
+
)
|
|
1199
|
+
] })
|
|
1200
|
+
] });
|
|
1223
1201
|
}, Ft = A(Bt), Ht = ({ transaction: t }) => {
|
|
1224
|
-
const { updateTransaction: r } =
|
|
1225
|
-
|
|
1202
|
+
const { updateTransaction: r } = v(), { transactions: i } = N(), { onEvent: n } = w(), o = Ee(), a = async () => {
|
|
1203
|
+
n(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1226
1204
|
};
|
|
1227
1205
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1228
|
-
|
|
1206
|
+
Ze,
|
|
1229
1207
|
{
|
|
1230
1208
|
"aria-label": i.flag_btn_aria,
|
|
1231
1209
|
"aria-pressed": t.is_flagged,
|
|
1232
1210
|
color: "warning",
|
|
1233
|
-
onClick:
|
|
1211
|
+
onClick: a,
|
|
1234
1212
|
selected: t.is_flagged,
|
|
1235
1213
|
sx: {
|
|
1236
1214
|
borderRadius: 6,
|
|
@@ -1249,11 +1227,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1249
1227
|
}
|
|
1250
1228
|
},
|
|
1251
1229
|
value: "flagged",
|
|
1252
|
-
children: /* @__PURE__ */ e(
|
|
1230
|
+
children: /* @__PURE__ */ e(Ye, { color: "inherit" })
|
|
1253
1231
|
}
|
|
1254
1232
|
) });
|
|
1255
|
-
}, zt = A(Ht), ne = (t, r, i,
|
|
1256
|
-
/* @__PURE__ */
|
|
1233
|
+
}, zt = A(Ht), ne = (t, r, i, n = !0, o = "inset") => n ? /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1234
|
+
/* @__PURE__ */ s(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
1257
1235
|
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1258
1236
|
/* @__PURE__ */ e(
|
|
1259
1237
|
M,
|
|
@@ -1266,11 +1244,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1266
1244
|
] }),
|
|
1267
1245
|
/* @__PURE__ */ e(J, { variant: o })
|
|
1268
1246
|
] }) : null, Ut = ({ transaction: t }) => {
|
|
1269
|
-
const { transactions: r } = N(), { tags: i } =
|
|
1270
|
-
const o = new Map(i.map((
|
|
1271
|
-
return t.tags.map((
|
|
1247
|
+
const { transactions: r } = N(), { tags: i } = v(), n = _.useMemo(() => {
|
|
1248
|
+
const o = new Map(i.map((a) => [a.guid, a.name]));
|
|
1249
|
+
return t.tags.map((a) => o.get(a)).filter(Boolean).join(" / ");
|
|
1272
1250
|
}, [i, t.tags]);
|
|
1273
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ s(Q, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1274
1252
|
ne(
|
|
1275
1253
|
/* @__PURE__ */ e(
|
|
1276
1254
|
he,
|
|
@@ -1282,99 +1260,98 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1282
1260
|
}
|
|
1283
1261
|
),
|
|
1284
1262
|
r.category_title,
|
|
1285
|
-
/* @__PURE__ */ e(
|
|
1263
|
+
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category ?? r.actions_select_a_category })
|
|
1286
1264
|
),
|
|
1287
1265
|
ne(
|
|
1288
1266
|
/* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1289
1267
|
r.date_title,
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1268
|
+
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: Oe(Y(t.date), we.YEAR_MONTH_DAY) })
|
|
1291
1269
|
),
|
|
1292
1270
|
ne(
|
|
1293
1271
|
/* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1294
1272
|
r.memo_title,
|
|
1295
|
-
/* @__PURE__ */ e(
|
|
1273
|
+
/* @__PURE__ */ e(y, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "Body", children: t.memo ?? r.memo_desc }),
|
|
1296
1274
|
!!t.memo,
|
|
1297
1275
|
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1298
1276
|
),
|
|
1299
1277
|
ne(
|
|
1300
1278
|
/* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1301
1279
|
r.tags_title,
|
|
1302
|
-
/* @__PURE__ */ e(
|
|
1280
|
+
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.tags?.length ? n : r.tags_desc }),
|
|
1303
1281
|
!!t.tags?.length,
|
|
1304
1282
|
"fullWidth"
|
|
1305
1283
|
)
|
|
1306
1284
|
] });
|
|
1307
1285
|
}, Xt = A(Ut), Vt = ({
|
|
1308
|
-
bottomActions: t =
|
|
1286
|
+
bottomActions: t = nt,
|
|
1309
1287
|
canFlagTransaction: r = !0,
|
|
1310
|
-
topActions: i =
|
|
1311
|
-
transaction:
|
|
1288
|
+
topActions: i = at,
|
|
1289
|
+
transaction: n
|
|
1312
1290
|
}) => {
|
|
1313
|
-
const { onEvent: o } =
|
|
1314
|
-
if (
|
|
1315
|
-
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid:
|
|
1291
|
+
const { onEvent: o } = w(), { isCopyLoaded: a } = He(), { userFeatures: l } = ze(), c = n?.number && n.number.length > 4;
|
|
1292
|
+
if (_.useEffect(
|
|
1293
|
+
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
|
|
1316
1294
|
[]
|
|
1317
|
-
), !
|
|
1295
|
+
), !a)
|
|
1318
1296
|
return /* @__PURE__ */ e(Ie, {});
|
|
1319
|
-
const d =
|
|
1320
|
-
return /* @__PURE__ */ e(
|
|
1321
|
-
/* @__PURE__ */
|
|
1297
|
+
const d = Be(l, "MX_TXN_DETAILS_VIEW_ONLY");
|
|
1298
|
+
return /* @__PURE__ */ e(O, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ s(b, { children: [
|
|
1299
|
+
/* @__PURE__ */ s(b, { gap: 12, p: 24, children: [
|
|
1322
1300
|
/* @__PURE__ */ e(re, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1323
1301
|
ge,
|
|
1324
1302
|
{
|
|
1325
|
-
categoryGuid:
|
|
1326
|
-
merchantGuid:
|
|
1303
|
+
categoryGuid: n.top_level_category_guid || "",
|
|
1304
|
+
merchantGuid: n.merchant_guid || "",
|
|
1327
1305
|
size: 64
|
|
1328
1306
|
}
|
|
1329
1307
|
) }),
|
|
1330
|
-
/* @__PURE__ */ e(Ft, { transaction:
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
|
|
1334
|
-
ae(
|
|
1308
|
+
/* @__PURE__ */ e(Ft, { transaction: n, viewOnly: d }),
|
|
1309
|
+
/* @__PURE__ */ s(b, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1310
|
+
/* @__PURE__ */ s(Ae, { color: n.isIncome ? "success.main" : "text.primary", children: [
|
|
1311
|
+
n.isIncome ? "+" : "",
|
|
1312
|
+
ae(n.amount, "0,0.00")
|
|
1335
1313
|
] }),
|
|
1336
|
-
!d && r && /* @__PURE__ */ e(zt, { transaction:
|
|
1314
|
+
!d && r && /* @__PURE__ */ e(zt, { transaction: n })
|
|
1337
1315
|
] }),
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
/* @__PURE__ */ e(
|
|
1340
|
-
${c ?
|
|
1341
|
-
/* @__PURE__ */ e(
|
|
1316
|
+
/* @__PURE__ */ s(b, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1317
|
+
/* @__PURE__ */ e(y, { bold: !0, children: `${n.account}
|
|
1318
|
+
${c ? n.number : "•".repeat(4).concat(n.number ?? "")}` }),
|
|
1319
|
+
/* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Tiny", children: n.feed_description })
|
|
1342
1320
|
] })
|
|
1343
1321
|
] }),
|
|
1344
|
-
/* @__PURE__ */ e(re, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(Xt, { transaction:
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1322
|
+
/* @__PURE__ */ e(re, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(Xt, { transaction: n }) : /* @__PURE__ */ e(Q, { children: i.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1323
|
+
u === Z.Category && /* @__PURE__ */ e(pt, { transaction: n }),
|
|
1324
|
+
u === Z.Date && /* @__PURE__ */ e(gt, { transaction: n }),
|
|
1325
|
+
u === Z.Memo && /* @__PURE__ */ e(At, { transaction: n }),
|
|
1326
|
+
u === Z.Tags && /* @__PURE__ */ e($t, { transaction: n }),
|
|
1349
1327
|
/* @__PURE__ */ e(J, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
|
|
1350
|
-
] },
|
|
1351
|
-
!d && t.length > 0 && /* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */ e(
|
|
1353
|
-
/* @__PURE__ */ e(re, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */
|
|
1354
|
-
t.map((
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1328
|
+
] }, u)) }) }),
|
|
1329
|
+
!d && t.length > 0 && /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1330
|
+
/* @__PURE__ */ e(y, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1331
|
+
/* @__PURE__ */ e(re, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ s(Q, { children: [
|
|
1332
|
+
t.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1333
|
+
u === oe.SplitTransaction && /* @__PURE__ */ e(Et, { transaction: n }),
|
|
1334
|
+
u === oe.HideTransaction && /* @__PURE__ */ e(ft, { transaction: n }),
|
|
1335
|
+
u === oe.MerchantLogo && /* @__PURE__ */ e(St, { transaction: n }),
|
|
1358
1336
|
/* @__PURE__ */ e(J, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
|
|
1359
|
-
] },
|
|
1360
|
-
|
|
1337
|
+
] }, u)),
|
|
1338
|
+
n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(Tt, { transaction: n })
|
|
1361
1339
|
] }) })
|
|
1362
1340
|
] })
|
|
1363
1341
|
] }) });
|
|
1364
1342
|
}, Pa = A(Vt);
|
|
1365
1343
|
export {
|
|
1366
1344
|
oe as B,
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1345
|
+
pt as C,
|
|
1346
|
+
gt as D,
|
|
1347
|
+
At as M,
|
|
1348
|
+
ct as S,
|
|
1349
|
+
ka as T,
|
|
1372
1350
|
Pa as a,
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
Z as e,
|
|
1351
|
+
lt as b,
|
|
1352
|
+
$t as c,
|
|
1353
|
+
Z as d,
|
|
1377
1354
|
ut as h,
|
|
1378
1355
|
Se as s,
|
|
1379
|
-
|
|
1356
|
+
G as u
|
|
1380
1357
|
};
|