@mx-cartographer/experiences 7.13.1 → 7.13.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/{LineChart-DBSlRSEm.mjs → LineChart-DBcA1UJI.mjs} +25 -25
- package/dist/{ManageIncome-QvqN555q.mjs → ManageIncome-6rzdF0hn.mjs} +1 -1
- package/dist/{RecurringSettings-DdOcok2e.mjs → RecurringSettings-DSsqb6FN.mjs} +1 -1
- package/dist/{TransactionDetails-BpcWeXNU.mjs → TransactionDetails-CBrqmEw1.mjs} +180 -168
- package/dist/{TrendsStore-st6GjDtg.mjs → TrendsStore-CYdTo7cN.mjs} +8 -8
- package/dist/{ViewMoreMicroCard-ApUBfGOX.mjs → ViewMoreMicroCard-D24H9kDm.mjs} +9 -8
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +2 -2
- package/dist/common/index.es.js +2 -2
- package/dist/finstrong/index.es.js +3 -3
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/index.es.js +2 -2
- package/dist/trends/TrendsWidget.d.ts +1 -1
- package/dist/trends/components/CategoryDetails.d.ts +3 -0
- package/dist/trends/index.es.js +636 -633
- package/package.json +1 -1
- package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
|
@@ -15,7 +15,7 @@ import ne from "@mui/material/IconButton";
|
|
|
15
15
|
import Le from "@mui/material/TextField";
|
|
16
16
|
import { u as pe } from "./useAriaLive-MkYebyUR.mjs";
|
|
17
17
|
import { O as y } from "./Transaction-CqjlF6SO.mjs";
|
|
18
|
-
import { u as
|
|
18
|
+
import { u as A, h as O, m as Ye, d as ze, l as we, g as w, b as je, o as qe } from "./hooks-BxkfR-Ff.mjs";
|
|
19
19
|
import { A as H } from "./Analytics-BYItVAe-.mjs";
|
|
20
20
|
import Xe from "@mui/material/ToggleButton";
|
|
21
21
|
import { ChevronRight as Re, Icon as D, Delete as _e, Cancel as me, Search as Je, Edit as Qe, Flag as Ze } from "@mxenabled/mx-icons";
|
|
@@ -30,7 +30,7 @@ import z from "@mui/material/ListItemIcon";
|
|
|
30
30
|
import { a as Pe } from "./CategorySelectorDrawer-DYHNBd2v.mjs";
|
|
31
31
|
import { b as et, T as tt, u as J } from "./StatusIndicator-CIKUOoN_.mjs";
|
|
32
32
|
import { D as X } from "./Dialog-Ck34yr-d.mjs";
|
|
33
|
-
import { b as
|
|
33
|
+
import { b as I } from "./Localization-CPkpIwIx.mjs";
|
|
34
34
|
import { getUnixTime as rt } from "date-fns/getUnixTime";
|
|
35
35
|
import { D as ie } from "./Drawer-Bbe4AMB1.mjs";
|
|
36
36
|
import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
@@ -66,7 +66,7 @@ const ut = [
|
|
|
66
66
|
iconColor: s,
|
|
67
67
|
icon: l
|
|
68
68
|
}) => {
|
|
69
|
-
const { budgets:
|
|
69
|
+
const { budgets: _ } = A();
|
|
70
70
|
return /* @__PURE__ */ e(d.Fragment, { children: /* @__PURE__ */ c(
|
|
71
71
|
F,
|
|
72
72
|
{
|
|
@@ -90,7 +90,7 @@ const ut = [
|
|
|
90
90
|
},
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ e(j, { bold: !0, variant: "subtitle1", children: st(t) }),
|
|
93
|
-
n && /* @__PURE__ */ e(oe, { endIcon: /* @__PURE__ */ e(Re, {}), onClick: n, sx: { height: 28 }, children: /* @__PURE__ */ e(x, { bold: !0, variant: "body2", children:
|
|
93
|
+
n && /* @__PURE__ */ e(oe, { endIcon: /* @__PURE__ */ e(Re, {}), onClick: n, sx: { height: 28 }, children: /* @__PURE__ */ e(x, { bold: !0, variant: "body2", children: _.spending_history }) })
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
),
|
|
@@ -104,11 +104,11 @@ const ut = [
|
|
|
104
104
|
] }),
|
|
105
105
|
completeColor: `${s}.main`,
|
|
106
106
|
icon: l,
|
|
107
|
-
label:
|
|
108
|
-
leftLabel:
|
|
107
|
+
label: _.spent_label,
|
|
108
|
+
leftLabel: I(_.percent_spent, o.toFixed()),
|
|
109
109
|
percentComplete: o,
|
|
110
|
-
rightLabel:
|
|
111
|
-
|
|
110
|
+
rightLabel: I(
|
|
111
|
+
_.balance_left,
|
|
112
112
|
q(a, "0,0.00")
|
|
113
113
|
),
|
|
114
114
|
sx: {
|
|
@@ -129,7 +129,7 @@ const ut = [
|
|
|
129
129
|
setCurrencyDialogAction: o,
|
|
130
130
|
renderingToast: a
|
|
131
131
|
}) => {
|
|
132
|
-
const { budgets: s, common: l } =
|
|
132
|
+
const { budgets: s, common: l } = A(), { sortedTransactions: _ } = O(), u = d.useMemo(() => _.reduce((h, S) => S.parent_guid ? h : h + S.amount, 0), [_]), { remainingAmount: p, spentPercentage: g, iconColor: m } = Ke(
|
|
133
133
|
u,
|
|
134
134
|
t.amount ?? 0
|
|
135
135
|
);
|
|
@@ -155,7 +155,7 @@ const ut = [
|
|
|
155
155
|
pr: 24
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
title:
|
|
158
|
+
title: I(s.details_type_title, t.merchant_name),
|
|
159
159
|
children: [
|
|
160
160
|
/* @__PURE__ */ e(
|
|
161
161
|
mt,
|
|
@@ -168,9 +168,9 @@ const ut = [
|
|
|
168
168
|
merchantGuid: n.merchant_guid || ""
|
|
169
169
|
}
|
|
170
170
|
),
|
|
171
|
-
iconColor:
|
|
171
|
+
iconColor: m,
|
|
172
172
|
remainingAmount: p,
|
|
173
|
-
spentPercentage:
|
|
173
|
+
spentPercentage: g,
|
|
174
174
|
startDate: n.date,
|
|
175
175
|
totalTransaction: u
|
|
176
176
|
}
|
|
@@ -183,14 +183,14 @@ const ut = [
|
|
|
183
183
|
}, gt = E(pt);
|
|
184
184
|
var Se = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.EDIT = "edit", t.DELETE = "delete", t))(Se || {});
|
|
185
185
|
const ht = E(({ transaction: t }) => {
|
|
186
|
-
const [n, i] = d.useState(null), [r, o] = d.useState(""), [a, s] = d.useState(!1), l = d.useRef(!1), [
|
|
187
|
-
addMerchantBudget:
|
|
188
|
-
updateMerchantBudget:
|
|
186
|
+
const [n, i] = d.useState(null), [r, o] = d.useState(""), [a, s] = d.useState(!1), l = d.useRef(!1), [_, u] = d.useState(null), p = U(), {
|
|
187
|
+
addMerchantBudget: g,
|
|
188
|
+
updateMerchantBudget: m,
|
|
189
189
|
deleteMerchantBudget: h,
|
|
190
|
-
getMerchantBudgetByMerchantGuid:
|
|
190
|
+
getMerchantBudgetByMerchantGuid: S,
|
|
191
191
|
alert: L,
|
|
192
192
|
setAlert: k
|
|
193
|
-
} = Ye(), { setFilter: f } = O(), { accounts: T } = ze(), R = p.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: b, common: Q } =
|
|
193
|
+
} = Ye(), { setFilter: f } = O(), { accounts: T } = ze(), R = p.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: b, common: Q } = A(), { announce: ge, ariaLive: he } = pe(), [Z, ee] = d.useState(!1), K = t?.merchant_guid ? S(t.merchant_guid) : void 0, te = () => {
|
|
194
194
|
u(n), i(null), o("");
|
|
195
195
|
}, ye = () => {
|
|
196
196
|
K ? ee(!0) : i(
|
|
@@ -199,14 +199,14 @@ const ht = E(({ transaction: t }) => {
|
|
|
199
199
|
);
|
|
200
200
|
}, C = {
|
|
201
201
|
create: {
|
|
202
|
-
content:
|
|
202
|
+
content: I(
|
|
203
203
|
b.create_budget_content,
|
|
204
204
|
/* @__PURE__ */ e("strong", { children: t.description }),
|
|
205
205
|
`${q(t.amount, "0,0.00")}`
|
|
206
206
|
),
|
|
207
207
|
title: b.dialog_create_budget_title,
|
|
208
208
|
primaryButtonText: b.dialog_primary_button_text,
|
|
209
|
-
errorAlertMessage:
|
|
209
|
+
errorAlertMessage: I(
|
|
210
210
|
b.alert_merchant_budget_not_created,
|
|
211
211
|
t.description
|
|
212
212
|
),
|
|
@@ -214,20 +214,20 @@ const ht = E(({ transaction: t }) => {
|
|
|
214
214
|
"create"
|
|
215
215
|
/* CREATE */
|
|
216
216
|
),
|
|
217
|
-
successAlertMessage:
|
|
217
|
+
successAlertMessage: I(
|
|
218
218
|
b.alert_budget_created,
|
|
219
219
|
t.description
|
|
220
220
|
),
|
|
221
|
-
apiTrigger: async () => await
|
|
221
|
+
apiTrigger: async () => await g(t.merchant_guid, Number(r))
|
|
222
222
|
},
|
|
223
223
|
edit: {
|
|
224
|
-
content:
|
|
224
|
+
content: I(
|
|
225
225
|
b.edit_budget_content,
|
|
226
226
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
227
227
|
),
|
|
228
228
|
title: b.details_edit_title,
|
|
229
229
|
primaryButtonText: b.add_save_button,
|
|
230
|
-
errorAlertMessage:
|
|
230
|
+
errorAlertMessage: I(
|
|
231
231
|
b.error_alert_edit_merchant_budget,
|
|
232
232
|
t.description
|
|
233
233
|
),
|
|
@@ -235,23 +235,23 @@ const ht = E(({ transaction: t }) => {
|
|
|
235
235
|
"edit"
|
|
236
236
|
/* EDIT */
|
|
237
237
|
),
|
|
238
|
-
successAlertMessage:
|
|
238
|
+
successAlertMessage: I(
|
|
239
239
|
b.success_alert_edit_merchant_budget,
|
|
240
240
|
t.description
|
|
241
241
|
),
|
|
242
|
-
apiTrigger: async () => await
|
|
242
|
+
apiTrigger: async () => await m({
|
|
243
243
|
...K,
|
|
244
244
|
amount: Number(r)
|
|
245
245
|
})
|
|
246
246
|
},
|
|
247
247
|
delete: {
|
|
248
|
-
content:
|
|
248
|
+
content: I(
|
|
249
249
|
b.delete_description,
|
|
250
250
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
251
251
|
),
|
|
252
252
|
title: b.delete_title,
|
|
253
253
|
primaryButtonText: b.details_delete_button,
|
|
254
|
-
errorAlertMessage:
|
|
254
|
+
errorAlertMessage: I(
|
|
255
255
|
b.error_alert_delete_merchant_budget,
|
|
256
256
|
t.description
|
|
257
257
|
),
|
|
@@ -259,7 +259,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
259
259
|
"delete"
|
|
260
260
|
/* DELETE */
|
|
261
261
|
),
|
|
262
|
-
successAlertMessage:
|
|
262
|
+
successAlertMessage: I(
|
|
263
263
|
b.success_alert_delete_merchant_budget,
|
|
264
264
|
t.description
|
|
265
265
|
),
|
|
@@ -282,7 +282,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
282
282
|
dateRange: M
|
|
283
283
|
});
|
|
284
284
|
}, [Z, t, T]);
|
|
285
|
-
const
|
|
285
|
+
const N = () => /* @__PURE__ */ e(
|
|
286
286
|
$e,
|
|
287
287
|
{
|
|
288
288
|
actionText: b.autogenerate_budgets_error_primary_button,
|
|
@@ -290,7 +290,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
290
290
|
closeAriaLabel: Q.close_aria,
|
|
291
291
|
handleClose: () => k(""),
|
|
292
292
|
message: L,
|
|
293
|
-
onActionClick: C[
|
|
293
|
+
onActionClick: C[_]?.errorRetryAction,
|
|
294
294
|
open: !!L,
|
|
295
295
|
severity: a ? "error" : "success",
|
|
296
296
|
showAction: a,
|
|
@@ -317,7 +317,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
317
317
|
isOpen: Z,
|
|
318
318
|
merchantBudget: K,
|
|
319
319
|
onClose: () => ee(!1),
|
|
320
|
-
renderingToast: () => L &&
|
|
320
|
+
renderingToast: () => L && N(),
|
|
321
321
|
setCurrencyDialogAction: (M) => {
|
|
322
322
|
M === "edit" && o(K?.amount.toString() || ""), i(M);
|
|
323
323
|
},
|
|
@@ -341,14 +341,14 @@ const ht = E(({ transaction: t }) => {
|
|
|
341
341
|
title: C[n].title
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
|
-
!!L &&
|
|
344
|
+
!!L && N()
|
|
345
345
|
] });
|
|
346
346
|
}), yt = ({ transaction: t }) => {
|
|
347
|
-
const { addOrUpdateTransactionRule: n, updateTransaction: i } = O(), { categories: r } = we(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: s } = J(), { transactions: l } =
|
|
348
|
-
await i({ ...t, category_guid:
|
|
347
|
+
const { addOrUpdateTransactionRule: n, updateTransaction: i } = O(), { categories: r } = we(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: s } = J(), { transactions: l } = A(), _ = U(), [u, p] = d.useState(!1), [g, m] = d.useState(""), h = async (T) => {
|
|
348
|
+
await i({ ...t, category_guid: g }), T && await n(g, t), m(""), o(H.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
349
349
|
transaction_guid: t.guid
|
|
350
350
|
});
|
|
351
|
-
},
|
|
351
|
+
}, S = (T) => {
|
|
352
352
|
if (t.is_manual && !t.guid) {
|
|
353
353
|
const R = r.find((b) => b.guid === T);
|
|
354
354
|
s({
|
|
@@ -358,14 +358,14 @@ const ht = E(({ transaction: t }) => {
|
|
|
358
358
|
top_level_category_guid: R?.parent_guid || T
|
|
359
359
|
});
|
|
360
360
|
} else
|
|
361
|
-
|
|
361
|
+
m(T);
|
|
362
362
|
L();
|
|
363
363
|
}, L = () => {
|
|
364
364
|
p(!1), a(!1);
|
|
365
365
|
}, k = d.useMemo(
|
|
366
|
-
() => r.find((T) => T.guid ===
|
|
367
|
-
[
|
|
368
|
-
), f =
|
|
366
|
+
() => r.find((T) => T.guid === g),
|
|
367
|
+
[g]
|
|
368
|
+
), f = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
369
369
|
return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
370
370
|
/* @__PURE__ */ c(
|
|
371
371
|
Y,
|
|
@@ -400,7 +400,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
400
400
|
{
|
|
401
401
|
initialSelected: t.category_guid,
|
|
402
402
|
onClose: L,
|
|
403
|
-
onSelect:
|
|
403
|
+
onSelect: S,
|
|
404
404
|
showDrawer: u,
|
|
405
405
|
title: l.actions_select_a_category
|
|
406
406
|
}
|
|
@@ -409,18 +409,18 @@ const ht = E(({ transaction: t }) => {
|
|
|
409
409
|
X,
|
|
410
410
|
{
|
|
411
411
|
copy: {
|
|
412
|
-
title:
|
|
412
|
+
title: I(
|
|
413
413
|
l.actions_apply_to_all_transaction_types,
|
|
414
414
|
t.description
|
|
415
415
|
)
|
|
416
416
|
},
|
|
417
|
-
isOpen: !!
|
|
418
|
-
onClose: () =>
|
|
417
|
+
isOpen: !!g,
|
|
418
|
+
onClose: () => m(""),
|
|
419
419
|
onPrimaryAction: () => h(!0),
|
|
420
420
|
onSecondaryAction: () => h(!1),
|
|
421
421
|
primaryText: l.actions_apply_to_all,
|
|
422
422
|
secondaryText: l.actions_this_time_only,
|
|
423
|
-
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children:
|
|
423
|
+
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: I(
|
|
424
424
|
l.actions_all_past_and_future,
|
|
425
425
|
t.description,
|
|
426
426
|
k?.name
|
|
@@ -429,21 +429,21 @@ const ht = E(({ transaction: t }) => {
|
|
|
429
429
|
)
|
|
430
430
|
] });
|
|
431
431
|
}, Tt = ({ transaction: t }) => {
|
|
432
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } =
|
|
433
|
-
p(rt(
|
|
434
|
-
},
|
|
432
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = A(), s = U(), [l, _] = d.useState(!1), [u, p] = d.useState(t.date), g = (S) => {
|
|
433
|
+
p(rt(S));
|
|
434
|
+
}, m = async () => {
|
|
435
435
|
if (t.is_manual && !t.guid) {
|
|
436
|
-
r({ ...t, date: u }),
|
|
436
|
+
r({ ...t, date: u }), _(!1);
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
await i({ ...t, date: u }), n(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }),
|
|
439
|
+
await i({ ...t, date: u }), n(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), _(!1);
|
|
440
440
|
}, h = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
441
441
|
return /* @__PURE__ */ c(B, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
|
|
442
442
|
/* @__PURE__ */ c(
|
|
443
443
|
Y,
|
|
444
444
|
{
|
|
445
445
|
onClick: () => {
|
|
446
|
-
n(y.ON_TRANSACTION_DATE_CLICK),
|
|
446
|
+
n(y.ON_TRANSACTION_DATE_CLICK), _(!0);
|
|
447
447
|
},
|
|
448
448
|
children: [
|
|
449
449
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
|
|
@@ -464,8 +464,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
464
464
|
{
|
|
465
465
|
ariaLabelClose: o.close_aria,
|
|
466
466
|
isOpen: l,
|
|
467
|
-
onClose: () =>
|
|
468
|
-
onPrimaryAction:
|
|
467
|
+
onClose: () => _(!1),
|
|
468
|
+
onPrimaryAction: m,
|
|
469
469
|
primaryText: o.save_button,
|
|
470
470
|
secondaryText: o.cancel_button,
|
|
471
471
|
title: a.date_edit_title,
|
|
@@ -478,7 +478,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
478
478
|
prevAria: a.date_prev_aria,
|
|
479
479
|
today: o.date_range_picker.today
|
|
480
480
|
},
|
|
481
|
-
onDateSelected:
|
|
481
|
+
onDateSelected: g,
|
|
482
482
|
selectionType: Ue.Single
|
|
483
483
|
}
|
|
484
484
|
) })
|
|
@@ -486,7 +486,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
486
486
|
)
|
|
487
487
|
] });
|
|
488
488
|
}, bt = ({ transaction: t }) => {
|
|
489
|
-
const { onEvent: n } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } =
|
|
489
|
+
const { onEvent: n } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = A(), [s, l] = d.useState(!1), _ = async () => {
|
|
490
490
|
await i(t.guid), n(y.ON_TRANSACTION_DELETE_DELETED);
|
|
491
491
|
};
|
|
492
492
|
return /* @__PURE__ */ c(F, { className: "mx-txn-delete", children: [
|
|
@@ -517,7 +517,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
517
517
|
onClose: () => {
|
|
518
518
|
r(!1), l(!1);
|
|
519
519
|
},
|
|
520
|
-
onPrimaryAction:
|
|
520
|
+
onPrimaryAction: _,
|
|
521
521
|
onSecondaryAction: () => n(y.ON_TRANSACTION_DELETE_CANCEL),
|
|
522
522
|
primaryText: o.delete_button,
|
|
523
523
|
secondaryText: o.cancel_button,
|
|
@@ -526,7 +526,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
526
526
|
)
|
|
527
527
|
] });
|
|
528
528
|
}, Ct = E(bt), xt = ({ transaction: t }) => {
|
|
529
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } =
|
|
529
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = A(), s = U(), [l, _] = d.useState(!1), u = async () => {
|
|
530
530
|
await i({ ...t, merchant_guid: "" }), n(H.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
531
531
|
transaction_guid: t.guid
|
|
532
532
|
});
|
|
@@ -536,7 +536,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
536
536
|
Y,
|
|
537
537
|
{
|
|
538
538
|
onClick: () => {
|
|
539
|
-
n(y.ON_TRANSACTION_DELETE_LOGO_CLICK),
|
|
539
|
+
n(y.ON_TRANSACTION_DELETE_LOGO_CLICK), _(!0);
|
|
540
540
|
},
|
|
541
541
|
children: [
|
|
542
542
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: p }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "delete", sx: { color: "text.primary" } }) }) }),
|
|
@@ -551,7 +551,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
551
551
|
copy: { title: a.merchant_logo_modal_title },
|
|
552
552
|
isOpen: l,
|
|
553
553
|
onClose: () => {
|
|
554
|
-
r(!1),
|
|
554
|
+
r(!1), _(!1);
|
|
555
555
|
},
|
|
556
556
|
onPrimaryAction: u,
|
|
557
557
|
onSecondaryAction: () => n(y.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
@@ -566,11 +566,11 @@ const ht = E(({ transaction: t }) => {
|
|
|
566
566
|
)
|
|
567
567
|
] }) });
|
|
568
568
|
}, ft = E(xt), At = ({ transaction: t }) => {
|
|
569
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } =
|
|
569
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = A(), s = U(), [l, _] = d.useState(!1), u = t.is_hidden, p = async () => {
|
|
570
570
|
await i({ ...t, is_hidden: !t.is_hidden }), n(
|
|
571
571
|
u ? y.ON_TRANSACTION_UNHIDDEN : y.ON_TRANSACTION_HIDDEN
|
|
572
572
|
);
|
|
573
|
-
},
|
|
573
|
+
}, g = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
574
574
|
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
|
|
575
575
|
/* @__PURE__ */ c(
|
|
576
576
|
Y,
|
|
@@ -585,11 +585,11 @@ const ht = E(({ transaction: t }) => {
|
|
|
585
585
|
{
|
|
586
586
|
transaction_guid: t.guid
|
|
587
587
|
}
|
|
588
|
-
),
|
|
588
|
+
), _(!0);
|
|
589
589
|
},
|
|
590
590
|
role: "switch",
|
|
591
591
|
children: [
|
|
592
|
-
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor:
|
|
592
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: g }, variant: "rounded", children: u ? /* @__PURE__ */ e(D, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(D, { name: "visibility", sx: { color: "text.primary" } }) }) }),
|
|
593
593
|
/* @__PURE__ */ e(
|
|
594
594
|
$,
|
|
595
595
|
{
|
|
@@ -618,7 +618,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
618
618
|
},
|
|
619
619
|
isOpen: l,
|
|
620
620
|
onClose: () => {
|
|
621
|
-
r(!1),
|
|
621
|
+
r(!1), _(!1);
|
|
622
622
|
},
|
|
623
623
|
onPrimaryAction: p,
|
|
624
624
|
onSecondaryAction: () => n(
|
|
@@ -650,26 +650,26 @@ const ht = E(({ transaction: t }) => {
|
|
|
650
650
|
] })
|
|
651
651
|
] });
|
|
652
652
|
}, Nt = ({ transaction: t }) => {
|
|
653
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } =
|
|
653
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = A(), s = U(), [l, _] = d.useState(!1), [u, p] = d.useState("");
|
|
654
654
|
d.useEffect(() => {
|
|
655
655
|
l && p(t.memo ? t.memo : "");
|
|
656
656
|
}, [l]);
|
|
657
|
-
const
|
|
657
|
+
const g = async () => {
|
|
658
658
|
if (t.is_manual && !t.guid) {
|
|
659
|
-
r({ ...t, memo: u }),
|
|
659
|
+
r({ ...t, memo: u }), _(!1);
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
|
-
await i({ ...t, memo: u }), n(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }),
|
|
663
|
-
},
|
|
662
|
+
await i({ ...t, memo: u }), n(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), _(!1);
|
|
663
|
+
}, m = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
664
664
|
return /* @__PURE__ */ c(B, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
|
|
665
665
|
/* @__PURE__ */ c(
|
|
666
666
|
Y,
|
|
667
667
|
{
|
|
668
668
|
onClick: () => {
|
|
669
|
-
n(y.ON_TRANSACTION_MEMO_CLICK),
|
|
669
|
+
n(y.ON_TRANSACTION_MEMO_CLICK), _(!0);
|
|
670
670
|
},
|
|
671
671
|
children: [
|
|
672
|
-
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor:
|
|
672
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: m }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "article", sx: { color: "text.primary" } }) }) }),
|
|
673
673
|
/* @__PURE__ */ e(
|
|
674
674
|
$,
|
|
675
675
|
{
|
|
@@ -695,8 +695,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
695
695
|
{
|
|
696
696
|
ariaLabelClose: o.close_aria,
|
|
697
697
|
isOpen: l,
|
|
698
|
-
onClose: () =>
|
|
699
|
-
onPrimaryAction:
|
|
698
|
+
onClose: () => _(!1),
|
|
699
|
+
onPrimaryAction: g,
|
|
700
700
|
title: a.memo_title,
|
|
701
701
|
children: [
|
|
702
702
|
/* @__PURE__ */ e(Ge, { transaction: t }),
|
|
@@ -725,11 +725,11 @@ const ht = E(({ transaction: t }) => {
|
|
|
725
725
|
onUpdateAmount: r,
|
|
726
726
|
split: o
|
|
727
727
|
}) => {
|
|
728
|
-
const { onEvent: a } = w(), { transactions: s } =
|
|
729
|
-
isNaN(Number(h)) || (
|
|
728
|
+
const { onEvent: a } = w(), { transactions: s } = A(), [l, _] = d.useState(`${o.amount}`), [u, p] = d.useState(!1), g = t === 0, m = (h) => {
|
|
729
|
+
isNaN(Number(h)) || (_(h), r(t, Number(h)));
|
|
730
730
|
};
|
|
731
731
|
return /* @__PURE__ */ c(F, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
732
|
-
/* @__PURE__ */ c(fe, { alignItems:
|
|
732
|
+
/* @__PURE__ */ c(fe, { alignItems: g ? "center" : "start", container: !0, children: [
|
|
733
733
|
/* @__PURE__ */ e(fe, { item: !0, xs: 7, children: /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
734
734
|
/* @__PURE__ */ e(
|
|
735
735
|
oe,
|
|
@@ -746,7 +746,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
746
746
|
/* @__PURE__ */ e(x, { variant: "body2", children: s.split_transaction_errors_select_category })
|
|
747
747
|
] }) })
|
|
748
748
|
] }) }),
|
|
749
|
-
/* @__PURE__ */ e(fe, { item: !0, xs: 5, children:
|
|
749
|
+
/* @__PURE__ */ e(fe, { item: !0, xs: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(x, { children: q(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
750
750
|
/* @__PURE__ */ c(v, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
751
751
|
/* @__PURE__ */ e(
|
|
752
752
|
ct,
|
|
@@ -756,7 +756,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
756
756
|
label: s.split_transaction_edit_split_amount,
|
|
757
757
|
minAmount: 0.01,
|
|
758
758
|
name: "split-amount-input",
|
|
759
|
-
setAmount:
|
|
759
|
+
setAmount: m,
|
|
760
760
|
sx: {
|
|
761
761
|
".MuiOutlinedInput-input": { p: 12 }
|
|
762
762
|
},
|
|
@@ -803,34 +803,34 @@ const ht = E(({ transaction: t }) => {
|
|
|
803
803
|
splits: o,
|
|
804
804
|
transaction: a
|
|
805
805
|
}) => {
|
|
806
|
-
const { transactions: s } =
|
|
806
|
+
const { transactions: s } = A(), { onEvent: l } = w(), [_, u] = d.useState(""), { announce: p, ariaLive: g } = pe();
|
|
807
807
|
return d.useEffect(() => {
|
|
808
808
|
if (o.length <= 1)
|
|
809
809
|
u(s.split_transaction_errors_min_splits), p(s.split_transaction_errors_min_splits);
|
|
810
810
|
else if (o[0].amount < 0) {
|
|
811
|
-
const
|
|
811
|
+
const m = I(
|
|
812
812
|
s.split_transaction_errors_totals_must_equal_amount,
|
|
813
813
|
q(a.amount, "0,0.00")
|
|
814
814
|
);
|
|
815
|
-
u(
|
|
815
|
+
u(m), p(m);
|
|
816
816
|
} else
|
|
817
817
|
u(""), p("");
|
|
818
818
|
}, [o]), /* @__PURE__ */ c(F, { className: "mx-txn-split-manager", children: [
|
|
819
|
-
|
|
820
|
-
o.map((
|
|
819
|
+
g,
|
|
820
|
+
o.map((m, h) => /* @__PURE__ */ e(
|
|
821
821
|
Et,
|
|
822
822
|
{
|
|
823
823
|
index: h,
|
|
824
824
|
onCategoryChanged: n,
|
|
825
825
|
onDeleteRow: i,
|
|
826
826
|
onUpdateAmount: r,
|
|
827
|
-
split:
|
|
827
|
+
split: m
|
|
828
828
|
},
|
|
829
829
|
h
|
|
830
830
|
)),
|
|
831
|
-
|
|
831
|
+
_ && /* @__PURE__ */ c(v, { bgcolor: "background.paper", color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
832
832
|
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
|
|
833
|
-
/* @__PURE__ */ e(x, { variant: "body2", children:
|
|
833
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: _ })
|
|
834
834
|
] }),
|
|
835
835
|
/* @__PURE__ */ e(F, { p: 16, children: /* @__PURE__ */ e(
|
|
836
836
|
oe,
|
|
@@ -844,13 +844,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
844
844
|
) })
|
|
845
845
|
] });
|
|
846
846
|
}, Ot = E(Dt), Lt = ({ transaction: t }) => {
|
|
847
|
-
const { onEvent: n } = w(), { announce: i, ariaLive: r } = pe(), { splitTransaction: o, unSplitTransaction: a } = O(), { common: s, transactions: l } =
|
|
847
|
+
const { onEvent: n } = w(), { announce: i, ariaLive: r } = pe(), { splitTransaction: o, unSplitTransaction: a } = O(), { common: s, transactions: l } = A(), { setShouldDisableDrawerScroll: _ } = J(), { categories: u } = we(), p = U(), g = {
|
|
848
848
|
...t,
|
|
849
849
|
amount: t.amount - 1,
|
|
850
850
|
guid: "",
|
|
851
851
|
has_been_split: !1,
|
|
852
852
|
parent_guid: t.guid
|
|
853
|
-
},
|
|
853
|
+
}, m = {
|
|
854
854
|
...t,
|
|
855
855
|
amount: 1,
|
|
856
856
|
category_guid: void 0,
|
|
@@ -859,36 +859,36 @@ const ht = E(({ transaction: t }) => {
|
|
|
859
859
|
has_been_split: !1,
|
|
860
860
|
parent_guid: t.guid,
|
|
861
861
|
top_level_category_guid: void 0
|
|
862
|
-
}, [h,
|
|
862
|
+
}, [h, S] = d.useState(!1), [L, k] = d.useState(!1), [f, T] = d.useState([]), R = () => {
|
|
863
863
|
const C = [...f];
|
|
864
|
-
C.push({ ...
|
|
865
|
-
|
|
864
|
+
C.push({ ...m }), C[0].amount -= 1, T(C), i(
|
|
865
|
+
I(
|
|
866
866
|
l.split_transaction_add_split_announcement,
|
|
867
867
|
C.length
|
|
868
868
|
)
|
|
869
869
|
);
|
|
870
870
|
}, b = (C) => {
|
|
871
871
|
if (C > 0) {
|
|
872
|
-
const P = f[C],
|
|
873
|
-
|
|
874
|
-
|
|
872
|
+
const P = f[C], N = [...f];
|
|
873
|
+
N.splice(C, 1), N[0].amount += P.amount, T(N), i(
|
|
874
|
+
I(l.split_transaction_delete_split_announcement, C + 1)
|
|
875
875
|
);
|
|
876
876
|
}
|
|
877
877
|
}, Q = (C, P) => {
|
|
878
|
-
const
|
|
879
|
-
|
|
878
|
+
const N = [...f];
|
|
879
|
+
N[C].amount = P, N[0].amount = t.amount - N.reduce(
|
|
880
880
|
(M, G, Te) => M + (Te !== 0 ? G.amount : 0),
|
|
881
881
|
0
|
|
882
|
-
), T(
|
|
882
|
+
), T(N);
|
|
883
883
|
}, ge = (C, P) => {
|
|
884
|
-
const
|
|
885
|
-
M && (
|
|
886
|
-
...
|
|
884
|
+
const N = [...f], M = u.find((G) => G.guid === P);
|
|
885
|
+
M && (N[C] = {
|
|
886
|
+
...N[C],
|
|
887
887
|
category_guid: P,
|
|
888
888
|
category: M.name,
|
|
889
889
|
top_level_category_guid: M.parent_guid || P
|
|
890
|
-
}, T(
|
|
891
|
-
|
|
890
|
+
}, T(N), i(
|
|
891
|
+
I(
|
|
892
892
|
l.split_transaction_select_category_announcement,
|
|
893
893
|
M.name,
|
|
894
894
|
C + 1
|
|
@@ -899,13 +899,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
899
899
|
k(!0);
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
T([{ ...
|
|
902
|
+
T([{ ...g }, { ...m }]), n(H.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
903
903
|
transaction_guid: t.guid
|
|
904
|
-
}),
|
|
904
|
+
}), S(!0);
|
|
905
905
|
}, Z = async () => {
|
|
906
|
-
n(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 }, f),
|
|
906
|
+
n(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 }, f), S(!1);
|
|
907
907
|
}, ee = async () => {
|
|
908
|
-
n(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ...
|
|
908
|
+
n(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ...g }, { ...m }]), S(!1);
|
|
909
909
|
}, K = async () => {
|
|
910
910
|
n(H.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
911
911
|
transaction_guid: t.guid
|
|
@@ -913,7 +913,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
913
913
|
const C = t.parent_guid ?? t.guid;
|
|
914
914
|
await a(C);
|
|
915
915
|
}, te = d.useMemo(() => {
|
|
916
|
-
const C = f.some((
|
|
916
|
+
const C = f.some((N) => !N.category_guid), P = f.some((N) => N.amount <= 0);
|
|
917
917
|
return C || P;
|
|
918
918
|
}, [f]), ye = p.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
919
919
|
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
@@ -962,7 +962,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
962
962
|
copy: { title: l.split_transaction_unsplit_title },
|
|
963
963
|
isOpen: L,
|
|
964
964
|
onClose: () => {
|
|
965
|
-
|
|
965
|
+
_(!1), k(!1);
|
|
966
966
|
},
|
|
967
967
|
onPrimaryAction: K,
|
|
968
968
|
onSecondaryAction: () => {
|
|
@@ -970,7 +970,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
970
970
|
},
|
|
971
971
|
primaryText: s.delete_button,
|
|
972
972
|
secondaryText: s.cancel_button,
|
|
973
|
-
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children:
|
|
973
|
+
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: I(
|
|
974
974
|
l.split_transaction_unsplit_description,
|
|
975
975
|
t.description
|
|
976
976
|
) })
|
|
@@ -978,15 +978,15 @@ const ht = E(({ transaction: t }) => {
|
|
|
978
978
|
)
|
|
979
979
|
] }) });
|
|
980
980
|
}, wt = E(Lt), Rt = () => {
|
|
981
|
-
const t = at(), { onEvent: n } = w(), { addTag: i } = O(), { transactions: r } =
|
|
981
|
+
const t = at(), { onEvent: n } = w(), { addTag: i } = O(), { transactions: r } = A(), [o, a] = d.useState(!1), [s, l] = d.useState(""), [_, u] = d.useState(""), p = d.useRef(null);
|
|
982
982
|
d.useEffect(() => {
|
|
983
983
|
o && p?.current?.focus();
|
|
984
984
|
}, [o]);
|
|
985
|
-
const
|
|
985
|
+
const g = () => {
|
|
986
986
|
n(
|
|
987
987
|
o ? y.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : y.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
988
988
|
), o || l(""), a(!o);
|
|
989
|
-
},
|
|
989
|
+
}, m = async () => {
|
|
990
990
|
n(y.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), a(!1);
|
|
991
991
|
};
|
|
992
992
|
return d.useEffect(() => {
|
|
@@ -1008,7 +1008,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1008
1008
|
{
|
|
1009
1009
|
"aria-expanded": o,
|
|
1010
1010
|
"aria-label": r.tags_add_tag_btn_aria,
|
|
1011
|
-
onClick:
|
|
1011
|
+
onClick: g,
|
|
1012
1012
|
children: r.tags_add_tag_btn
|
|
1013
1013
|
}
|
|
1014
1014
|
)
|
|
@@ -1021,7 +1021,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1021
1021
|
copy: { title: r.tags_add_tag_btn },
|
|
1022
1022
|
isOpen: o,
|
|
1023
1023
|
onClose: () => a(!1),
|
|
1024
|
-
onPrimaryAction:
|
|
1024
|
+
onPrimaryAction: m,
|
|
1025
1025
|
onSecondaryAction: () => a(!1),
|
|
1026
1026
|
children: [
|
|
1027
1027
|
/* @__PURE__ */ e(
|
|
@@ -1035,13 +1035,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
1035
1035
|
value: s
|
|
1036
1036
|
}
|
|
1037
1037
|
),
|
|
1038
|
-
/* @__PURE__ */ e(j, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children:
|
|
1038
|
+
/* @__PURE__ */ e(j, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: _ })
|
|
1039
1039
|
]
|
|
1040
1040
|
}
|
|
1041
1041
|
)
|
|
1042
1042
|
] });
|
|
1043
1043
|
}, Mt = E(Rt), kt = ({ onSearchValueChanged: t, searchValue: n }) => {
|
|
1044
|
-
const { common: i, transactions: r } =
|
|
1044
|
+
const { common: i, transactions: r } = A(), o = /* @__PURE__ */ e(
|
|
1045
1045
|
ne,
|
|
1046
1046
|
{
|
|
1047
1047
|
"aria-label": r.tags_cancel_search || "Search",
|
|
@@ -1065,18 +1065,18 @@ const ht = E(({ transaction: t }) => {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
) });
|
|
1067
1067
|
}, Pt = E(kt), Gt = ({ onTagChecked: t, selectedTags: n, tag: i }) => {
|
|
1068
|
-
const { onEvent: r } = w(), { removeTag: o, updateTag: a } = O(), { common: s, transactions: l } =
|
|
1069
|
-
r(y.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name:
|
|
1068
|
+
const { onEvent: r } = w(), { removeTag: o, updateTag: a } = O(), { common: s, transactions: l } = A(), [_, u] = d.useState(!1), [p, g] = d.useState(!1), [m, h] = d.useState(""), [S, L] = d.useState(""), k = async () => {
|
|
1069
|
+
r(y.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name: m }), u(!1);
|
|
1070
1070
|
}, f = async () => {
|
|
1071
|
-
r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid),
|
|
1071
|
+
r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), g(!1);
|
|
1072
1072
|
};
|
|
1073
1073
|
d.useEffect(() => {
|
|
1074
|
-
L(
|
|
1075
|
-
}, [
|
|
1074
|
+
L(m.length > 40 ? l.tags_error_name_must_be_40_chars : "");
|
|
1075
|
+
}, [m]);
|
|
1076
1076
|
const T = () => {
|
|
1077
1077
|
r(y.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), h(i.name), u(!0);
|
|
1078
1078
|
}, R = () => {
|
|
1079
|
-
r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK),
|
|
1079
|
+
r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), g(!0);
|
|
1080
1080
|
};
|
|
1081
1081
|
return /* @__PURE__ */ c(
|
|
1082
1082
|
B,
|
|
@@ -1129,7 +1129,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1129
1129
|
X,
|
|
1130
1130
|
{
|
|
1131
1131
|
copy: { title: "Update tag name" },
|
|
1132
|
-
isOpen:
|
|
1132
|
+
isOpen: _,
|
|
1133
1133
|
onClose: () => u(!1),
|
|
1134
1134
|
onPrimaryAction: k,
|
|
1135
1135
|
onSecondaryAction: () => u(!1),
|
|
@@ -1137,16 +1137,16 @@ const ht = E(({ transaction: t }) => {
|
|
|
1137
1137
|
/* @__PURE__ */ e(
|
|
1138
1138
|
ve,
|
|
1139
1139
|
{
|
|
1140
|
-
"aria-describedby":
|
|
1140
|
+
"aria-describedby": S ? "update-tag-error" : void 0,
|
|
1141
1141
|
"aria-label": l.tags_update_the_tag_name,
|
|
1142
1142
|
name: "update-tag",
|
|
1143
1143
|
onChange: (b) => h(b.target.value),
|
|
1144
1144
|
placeholder: "Tag name",
|
|
1145
1145
|
sx: { width: "100%" },
|
|
1146
|
-
value:
|
|
1146
|
+
value: m
|
|
1147
1147
|
}
|
|
1148
1148
|
),
|
|
1149
|
-
/* @__PURE__ */ e(j, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children:
|
|
1149
|
+
/* @__PURE__ */ e(j, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: S })
|
|
1150
1150
|
]
|
|
1151
1151
|
}
|
|
1152
1152
|
),
|
|
@@ -1155,7 +1155,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1155
1155
|
{
|
|
1156
1156
|
copy: { title: l.tags_delete_title },
|
|
1157
1157
|
isOpen: p,
|
|
1158
|
-
onClose: () =>
|
|
1158
|
+
onClose: () => g(!1),
|
|
1159
1159
|
onPrimaryAction: f,
|
|
1160
1160
|
onSecondaryAction: () => r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1161
1161
|
primaryText: s.delete_button,
|
|
@@ -1185,25 +1185,25 @@ const ht = E(({ transaction: t }) => {
|
|
|
1185
1185
|
] }, s.guid)) }) })
|
|
1186
1186
|
] });
|
|
1187
1187
|
}, Kt = E($t), Ft = ({ transaction: t }) => {
|
|
1188
|
-
const { onEvent: n } = w(), { tags: i, updateTaggings: r, updateTransaction: o } = O(), { common: a, transactions: s } =
|
|
1188
|
+
const { onEvent: n } = w(), { tags: i, updateTaggings: r, updateTransaction: o } = O(), { common: a, transactions: s } = A(), { updateManualTransaction: l } = J(), _ = U(), [u, p] = d.useState(!1), [g, m] = d.useState(t.tags);
|
|
1189
1189
|
d.useEffect(() => {
|
|
1190
|
-
|
|
1190
|
+
m(t.tags);
|
|
1191
1191
|
}, [u, t]);
|
|
1192
1192
|
const h = (f) => {
|
|
1193
|
-
const T = [...
|
|
1194
|
-
R >= 0 ? T.splice(R, 1) : T.push(f),
|
|
1195
|
-
},
|
|
1193
|
+
const T = [...g], R = g.indexOf(f);
|
|
1194
|
+
R >= 0 ? T.splice(R, 1) : T.push(f), m(T);
|
|
1195
|
+
}, S = async () => {
|
|
1196
1196
|
if (t.is_manual && !t.guid) {
|
|
1197
|
-
l({ ...t, tags:
|
|
1197
|
+
l({ ...t, tags: g }), p(!1);
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
1200
|
-
await r(
|
|
1200
|
+
await r(g, t.guid), await o({ ...t, tags: g }), n(H.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), p(!1);
|
|
1201
1201
|
}, L = d.useMemo(
|
|
1202
1202
|
() => t.tags.map(
|
|
1203
1203
|
(f, T, R) => `${i.find((b) => b.guid === f)?.name}${T < R.length - 1 ? " / " : ""}`
|
|
1204
1204
|
),
|
|
1205
1205
|
[i, t]
|
|
1206
|
-
), k =
|
|
1206
|
+
), k = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1207
1207
|
return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
1208
1208
|
/* @__PURE__ */ c(
|
|
1209
1209
|
Y,
|
|
@@ -1231,29 +1231,29 @@ const ht = E(({ transaction: t }) => {
|
|
|
1231
1231
|
ariaLabelClose: a.close_aria,
|
|
1232
1232
|
isOpen: u,
|
|
1233
1233
|
onClose: () => p(!1),
|
|
1234
|
-
onPrimaryAction:
|
|
1234
|
+
onPrimaryAction: S,
|
|
1235
1235
|
primaryText: a.save_button,
|
|
1236
1236
|
secondaryText: a.cancel_button,
|
|
1237
1237
|
title: s.tags_title,
|
|
1238
|
-
children: /* @__PURE__ */ e(Kt, { onTagChecked: h, selectedTags:
|
|
1238
|
+
children: /* @__PURE__ */ e(Kt, { onTagChecked: h, selectedTags: g })
|
|
1239
1239
|
}
|
|
1240
1240
|
)
|
|
1241
1241
|
] });
|
|
1242
1242
|
}, Ht = E(Ft), Ut = ({ transaction: t, viewOnly: n = !1 }) => {
|
|
1243
|
-
const { updateTransaction: i } = O(), { common: r, transactions: o } =
|
|
1243
|
+
const { updateTransaction: i } = O(), { common: r, transactions: o } = A(), { onEvent: a } = w(), { announce: s, ariaLive: l } = pe(), [_, u] = d.useState(!1), [p, g] = d.useState(""), m = d.useRef(null);
|
|
1244
1244
|
d.useEffect(() => {
|
|
1245
|
-
|
|
1246
|
-
}, [
|
|
1245
|
+
_ && (g(t.description), m?.current?.focus());
|
|
1246
|
+
}, [_]);
|
|
1247
1247
|
const h = () => {
|
|
1248
1248
|
u(!0), a(y.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
|
|
1249
|
-
},
|
|
1249
|
+
}, S = async () => {
|
|
1250
1250
|
a(H.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1251
1251
|
transaction_guid: t.guid
|
|
1252
1252
|
}), await i({ ...t, description: p }), u(!1), s(`${o.payee_title}: ${p}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
|
|
1253
1253
|
};
|
|
1254
1254
|
return /* @__PURE__ */ c(F, { className: "mx-txn-transaction-description", children: [
|
|
1255
1255
|
l,
|
|
1256
|
-
|
|
1256
|
+
_ ? /* @__PURE__ */ c(We, { row: !0, children: [
|
|
1257
1257
|
/* @__PURE__ */ e(
|
|
1258
1258
|
Le,
|
|
1259
1259
|
{
|
|
@@ -1262,8 +1262,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
1262
1262
|
inputProps: { maxLength: 140 },
|
|
1263
1263
|
label: o.payee_title,
|
|
1264
1264
|
name: o.payee_title,
|
|
1265
|
-
onChange: (L) =>
|
|
1266
|
-
ref:
|
|
1265
|
+
onChange: (L) => g(L.target.value),
|
|
1266
|
+
ref: m,
|
|
1267
1267
|
sx: {
|
|
1268
1268
|
backgroundColor: "background.paper",
|
|
1269
1269
|
".MuiOutlinedInput-root": { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
@@ -1277,7 +1277,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1277
1277
|
oe,
|
|
1278
1278
|
{
|
|
1279
1279
|
disabled: !p,
|
|
1280
|
-
onClick:
|
|
1280
|
+
onClick: S,
|
|
1281
1281
|
sx: {
|
|
1282
1282
|
borderTopLeftRadius: 0,
|
|
1283
1283
|
borderBottomLeftRadius: 0
|
|
@@ -1301,7 +1301,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1301
1301
|
] })
|
|
1302
1302
|
] });
|
|
1303
1303
|
}, Vt = E(Ut), Wt = ({ transaction: t }) => {
|
|
1304
|
-
const { updateTransaction: n } = O(), { transactions: i } =
|
|
1304
|
+
const { updateTransaction: n } = O(), { transactions: i } = A(), { onEvent: r } = w(), o = U(), a = o.palette.mode === "dark", s = async () => {
|
|
1305
1305
|
r(H.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await n({ ...t, is_flagged: !t.is_flagged });
|
|
1306
1306
|
};
|
|
1307
1307
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
@@ -1346,7 +1346,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1346
1346
|
] }),
|
|
1347
1347
|
/* @__PURE__ */ e(de, { variant: o })
|
|
1348
1348
|
] }) : null, zt = ({ transaction: t }) => {
|
|
1349
|
-
const { transactions: n } =
|
|
1349
|
+
const { transactions: n } = A(), { tags: i } = O(), r = d.useMemo(() => {
|
|
1350
1350
|
const o = new Map(i.map((a) => [a.guid, a.name]));
|
|
1351
1351
|
return t.tags.map((a) => o.get(a)).filter(Boolean).join(" / ");
|
|
1352
1352
|
}, [i, t.tags]);
|
|
@@ -1390,13 +1390,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
1390
1390
|
topActions: i = ut,
|
|
1391
1391
|
transaction: r
|
|
1392
1392
|
}) => {
|
|
1393
|
-
const { onEvent: o } = w(), { isCopyLoaded: a } = je(), { userFeatures: s } = qe(), l = U(),
|
|
1393
|
+
const { onEvent: o } = w(), { isCopyLoaded: a } = je(), { userFeatures: s } = qe(), { accounts: l } = A(), _ = U(), u = r?.number && r.number.length > 4;
|
|
1394
1394
|
if (d.useEffect(
|
|
1395
1395
|
() => o(H.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
|
|
1396
1396
|
[]
|
|
1397
1397
|
), !a)
|
|
1398
1398
|
return /* @__PURE__ */ e(dt, {});
|
|
1399
|
-
const
|
|
1399
|
+
const p = Ve(s, "MX_TXN_DETAILS_VIEW_ONLY"), g = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1400
1400
|
return /* @__PURE__ */ e(F, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ c(v, { children: [
|
|
1401
1401
|
/* @__PURE__ */ c(v, { gap: 12, p: 24, children: [
|
|
1402
1402
|
/* @__PURE__ */ e(ce, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
@@ -1407,37 +1407,49 @@ const ht = E(({ transaction: t }) => {
|
|
|
1407
1407
|
size: 64
|
|
1408
1408
|
}
|
|
1409
1409
|
) }),
|
|
1410
|
-
/* @__PURE__ */ e(Vt, { transaction: r, viewOnly:
|
|
1410
|
+
/* @__PURE__ */ e(Vt, { transaction: r, viewOnly: p }),
|
|
1411
1411
|
/* @__PURE__ */ c(v, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1412
1412
|
/* @__PURE__ */ c(j, { color: r.isIncome ? "success.main" : "text.primary", variant: "h1", children: [
|
|
1413
1413
|
r.isIncome ? "+" : "",
|
|
1414
1414
|
q(r.amount, "0,0.00")
|
|
1415
1415
|
] }),
|
|
1416
|
-
!
|
|
1416
|
+
!p && n && /* @__PURE__ */ e(Yt, { transaction: r })
|
|
1417
1417
|
] }),
|
|
1418
|
-
/* @__PURE__ */ c(v, { sx: { bgcolor:
|
|
1418
|
+
/* @__PURE__ */ c(v, { sx: { bgcolor: g, borderRadius: "4px", gap: 4, p: 8 }, children: [
|
|
1419
1419
|
/* @__PURE__ */ e(x, { bold: !0, children: `${r.account}
|
|
1420
|
-
${
|
|
1420
|
+
${u ? r.number : "•".repeat(4).concat(r.number ?? "")}` }),
|
|
1421
1421
|
/* @__PURE__ */ e(x, { bold: !0, variant: "tiny", children: r.feed_description })
|
|
1422
1422
|
] })
|
|
1423
1423
|
] }),
|
|
1424
|
-
/* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children:
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
/* @__PURE__ */ e(
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1424
|
+
/* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: p ? /* @__PURE__ */ e(jt, { transaction: r }) : /* @__PURE__ */ e(ue, { children: i.map((m, h) => /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1425
|
+
m === re.Category && /* @__PURE__ */ e(yt, { transaction: r }),
|
|
1426
|
+
m === re.Date && /* @__PURE__ */ e(Tt, { transaction: r }),
|
|
1427
|
+
m === re.Memo && /* @__PURE__ */ e(It, { transaction: r }),
|
|
1428
|
+
m === re.Tags && /* @__PURE__ */ e(Ht, { transaction: r }),
|
|
1429
|
+
/* @__PURE__ */ e(
|
|
1430
|
+
de,
|
|
1431
|
+
{
|
|
1432
|
+
component: "li",
|
|
1433
|
+
variant: h < i.length - 1 ? "inset" : "fullWidth"
|
|
1434
|
+
}
|
|
1435
|
+
)
|
|
1436
|
+
] }, m)) }) }),
|
|
1437
|
+
!p && t.length > 0 && /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1438
|
+
/* @__PURE__ */ e(x, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: l.actions }),
|
|
1433
1439
|
/* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ c(ue, { children: [
|
|
1434
|
-
t.map((
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
/* @__PURE__ */ e(
|
|
1440
|
-
|
|
1440
|
+
t.map((m, h) => /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1441
|
+
m === ae.MerchantBudget && /* @__PURE__ */ e(ht, { transaction: r }),
|
|
1442
|
+
m === ae.SplitTransaction && /* @__PURE__ */ e(wt, { transaction: r }),
|
|
1443
|
+
m === ae.HideTransaction && /* @__PURE__ */ e(St, { transaction: r }),
|
|
1444
|
+
m === ae.MerchantLogo && /* @__PURE__ */ e(ft, { transaction: r }),
|
|
1445
|
+
/* @__PURE__ */ e(
|
|
1446
|
+
de,
|
|
1447
|
+
{
|
|
1448
|
+
component: "li",
|
|
1449
|
+
variant: h < t.length - 1 ? "inset" : "fullWidth"
|
|
1450
|
+
}
|
|
1451
|
+
)
|
|
1452
|
+
] }, m)),
|
|
1441
1453
|
r.is_manual && !r.parent_guid && !r.has_been_split && /* @__PURE__ */ e(Ct, { transaction: r })
|
|
1442
1454
|
] }) })
|
|
1443
1455
|
] })
|