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