@mx-cartographer/experiences 7.11.6 → 7.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-JlrX0MwM.mjs} +1 -1
- package/dist/{AccountDetailsHeader-hDo7gojQ.mjs → AccountDetailsHeader-BCi1WwkM.mjs} +2 -2
- package/dist/{AccountListItem-CjeAlrPC.mjs → AccountListItem-Ceuh5WKe.mjs} +2 -2
- package/dist/{AccountStore-DdGz1ig2.mjs → AccountStore-CSLinWGm.mjs} +2 -2
- package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-B7yMnwRX.mjs} +1 -1
- package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C3njaxFy.mjs} +1 -1
- package/dist/BudgetUtil-CTpLz9lw.mjs +101 -0
- package/dist/{CategorySelectorDrawer-zT9pFvTa.mjs → CategorySelectorDrawer-BMmxw2oY.mjs} +1 -1
- package/dist/{CategoryStore-Cg6hsxza.mjs → CategoryStore-BC1Dbefp.mjs} +1 -1
- package/dist/{Connect-Dg9HlAWv.mjs → Connect-Df7iVTcV.mjs} +1 -1
- package/dist/{ConnectDrawer-BLwcW0Oe.mjs → ConnectDrawer-CVt-8rPJ.mjs} +2 -2
- package/dist/{ConnectionsDrawer-UQTh9UEc.mjs → ConnectionsDrawer-c7HaKeRj.mjs} +2 -2
- package/dist/{CurrencyInput-PMOAH5R3.mjs → CurrencyInput-CDY0awYV.mjs} +1 -1
- package/dist/{ExportCsvAction-B5Ra5duE.mjs → ExportCsvAction-BSK-EZ4D.mjs} +3 -3
- package/dist/{Fetch-DecPFeGU.mjs → Fetch-C67go-m2.mjs} +1 -0
- package/dist/{FinstrongStore-DBSoLGSE.mjs → FinstrongStore-93XvOWQr.mjs} +1 -1
- package/dist/{GlobalAccountFilter-C8mpfudV.mjs → GlobalAccountFilter-B3v8E_rC.mjs} +1 -1
- package/dist/{GoalStore-DzOZ0je_.mjs → GoalStore-XHAvX1lP.mjs} +2 -2
- package/dist/{Help-HjHBZzI9.mjs → Help-BBxespai.mjs} +1 -1
- package/dist/{LineChart-Dlp9RAJz.mjs → LineChart-Pu3pKqtQ.mjs} +1 -1
- package/dist/{ListItemAction-BDnpuLln.mjs → ListItemAction-5YhgdUZW.mjs} +1 -1
- package/dist/{ManageIncome-C05btqU-.mjs → ManageIncome-C389-HAc.mjs} +10 -10
- package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-DeeJLKfx.mjs} +1 -1
- package/dist/{MicroWidgetContainer-jvYZ5bb6.mjs → MicroWidgetContainer-CMES42I1.mjs} +1 -1
- package/dist/{MiniWidgetContainer-B4gbUTJ2.mjs → MiniWidgetContainer-DhEx4qKi.mjs} +1 -1
- package/dist/{NetWorthStore-yV43kJro.mjs → NetWorthStore-iebGdvTb.mjs} +1 -1
- package/dist/{NotificationSettings-BYv2INpX.mjs → NotificationSettings-BSaCGB8x.mjs} +4 -4
- package/dist/{NotificationStore-DBs11ZBH.mjs → NotificationStore-CUhig4c1.mjs} +1 -1
- package/dist/{OriginalBalanceAction-CRevNVIM.mjs → OriginalBalanceAction-Bq4utJ1f.mjs} +3 -3
- package/dist/{RecurringSettings-B0SSXpiK.mjs → RecurringSettings-CLtfXCFT.mjs} +2 -2
- package/dist/{RecurringTransactionsStore-DAX5ozGz.mjs → RecurringTransactionsStore-Ce7p6L0E.mjs} +1 -1
- package/dist/{SettingsStore-BqPjOIWk.mjs → SettingsStore-tK6INBFP.mjs} +2 -2
- package/dist/{SpendingLegend-D91UDDIu.mjs → SpendingLegend-bMrPWOGJ.mjs} +1 -1
- package/dist/{Transaction-BNO5Yz-B.mjs → Transaction-BR682Yj5.mjs} +1 -1
- package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-BnjVP2x2.mjs} +1 -1
- package/dist/TransactionDetails-Cedp4OOg.mjs +1260 -0
- package/dist/{TransactionList-DrtItQUk.mjs → TransactionList-BibbhhS9.mjs} +2 -2
- package/dist/{TransactionStore-DYXYuq5s.mjs → TransactionStore-Cv-7GLPT.mjs} +4 -4
- package/dist/User-CCSM9p05.mjs +368 -0
- package/dist/{ViewMoreMicroCard-BCYgXtiG.mjs → ViewMoreMicroCard-C4QiAZz4.mjs} +3 -3
- package/dist/{WidgetContainer-BEpJCqAV.mjs → WidgetContainer-sC5KLXHI.mjs} +2 -2
- package/dist/accounts/index.es.js +14 -14
- package/dist/analytics/index.es.js +11 -11
- package/dist/budgets/api/BudgetsApi.d.ts +1 -0
- package/dist/budgets/index.es.js +25 -24
- package/dist/budgets/store/BudgetsStore.d.ts +7 -0
- package/dist/cashflow/index.es.js +9 -9
- package/dist/categories/index.es.js +2 -2
- package/dist/common/constants/ApiEndpoints.d.ts +1 -0
- package/dist/common/index.es.js +277 -253
- package/dist/common/stores/GlobalStore.d.ts +3 -1
- package/dist/common/types/Budget.d.ts +8 -0
- package/dist/common/types/localization/BudgetsCopy.d.ts +5 -0
- package/dist/common/types/localization/CommonCopy.d.ts +2 -0
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/index.es.js +8 -8
- package/dist/{exportTransactionsToCSV-DC2YMFft.mjs → exportTransactionsToCSV-YXwmzmUp.mjs} +1 -1
- package/dist/finstrong/index.es.js +12 -12
- package/dist/goals/index.es.js +10 -10
- package/dist/help/index.es.js +4 -4
- package/dist/{hooks-0kWPTHNb.mjs → hooks-zu7yblbi.mjs} +3 -3
- package/dist/insights/index.es.js +4 -4
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +8 -8
- package/dist/notifications/index.es.js +11 -11
- package/dist/recurringtransactions/index.es.js +102 -102
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +3 -1
- package/dist/transactions/index.es.js +17 -17
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-BQfelpG3.mjs → useAccountDisplayName-CxYB0Wpw.mjs} +1 -1
- package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-C6fkIgHW.mjs} +1 -1
- package/dist/{useInsightsEnabled-bDCTNOJS.mjs → useInsightsEnabled-CYLDtNYt.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-yzSfT9dS.mjs → useWidgetLoadTimer-Bmgv_UeH.mjs} +1 -1
- package/package.json +1 -1
- package/dist/BudgetUtil-C71e-szt.mjs +0 -236
- package/dist/TransactionDetails-Cym3mIjc.mjs +0 -1181
- package/dist/User-C8w4H0cj.mjs +0 -237
|
@@ -1,1181 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import _ from "react";
|
|
3
|
-
import { observer as N } from "mobx-react-lite";
|
|
4
|
-
import B from "@mui/material/Box";
|
|
5
|
-
import te from "@mui/material/Divider";
|
|
6
|
-
import ae from "@mui/material/List";
|
|
7
|
-
import Z from "@mui/material/Paper";
|
|
8
|
-
import f from "@mui/material/Stack";
|
|
9
|
-
import { useTheme as F } from "@mui/material/styles";
|
|
10
|
-
import { CategoryIcon as me, CategoryIconVariants as he, Text as T, P as X, MerchantLogo as ye, TextField as ue, Icon as ee, IconWeight as ce } from "@mxenabled/mxui";
|
|
11
|
-
import { C as ke, a as Pe, i as Me } from "./User-C8w4H0cj.mjs";
|
|
12
|
-
import oe from "@mui/material/Button";
|
|
13
|
-
import Ge from "@mui/material/FormGroup";
|
|
14
|
-
import J from "@mui/material/IconButton";
|
|
15
|
-
import Te from "@mui/material/TextField";
|
|
16
|
-
import { u as pe } from "./useAriaLive-MkYebyUR.mjs";
|
|
17
|
-
import { O as h } from "./Transaction-BNO5Yz-B.mjs";
|
|
18
|
-
import { h as O, m as Ce, g as v, u as I, b as Ke, o as $e } from "./hooks-0kWPTHNb.mjs";
|
|
19
|
-
import { A as k } from "./Analytics-i5h6BxR1.mjs";
|
|
20
|
-
import Be from "@mui/material/ToggleButton";
|
|
21
|
-
import Se from "@mui/material/styles/useTheme";
|
|
22
|
-
import { Icon as A, Delete as re, ChevronRight as Fe, Cancel as ne, Search as He, Edit as Ue, Flag as Ve } from "@mxenabled/mx-icons";
|
|
23
|
-
import { fromUnixTime as _e } from "date-fns/fromUnixTime";
|
|
24
|
-
import P from "@mui/material/Avatar";
|
|
25
|
-
import L from "@mui/material/ListItem";
|
|
26
|
-
import M from "@mui/material/ListItemAvatar";
|
|
27
|
-
import w from "@mui/material/ListItemText";
|
|
28
|
-
import { f as be, D as xe } from "./DateFormats-Cs-NbEZ7.mjs";
|
|
29
|
-
import G from "@mui/material/ListItemButton";
|
|
30
|
-
import K from "@mui/material/ListItemIcon";
|
|
31
|
-
import { a as fe } from "./CategorySelectorDrawer-zT9pFvTa.mjs";
|
|
32
|
-
import { u as V } from "./TransactionList-DrtItQUk.mjs";
|
|
33
|
-
import { D as U } from "./Dialog-DdCwLgrl.mjs";
|
|
34
|
-
import { b as W } from "./Localization-2MODESHW.mjs";
|
|
35
|
-
import { getUnixTime as ze } from "date-fns/getUnixTime";
|
|
36
|
-
import { D as ie } from "./Drawer-DV4NTsFg.mjs";
|
|
37
|
-
import { f as se } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
38
|
-
import ge from "@mui/material/InputAdornment";
|
|
39
|
-
import We from "@mui/material/Checkbox";
|
|
40
|
-
import de from "@mui/material/Grid";
|
|
41
|
-
import { C as Ye } from "./CurrencyInput-PMOAH5R3.mjs";
|
|
42
|
-
import Xe from "@mui/material/Switch";
|
|
43
|
-
import { L as je } from "./Loader-D3rjKx72.mjs";
|
|
44
|
-
var j = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(j || {}), q = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(q || {});
|
|
45
|
-
const qe = [
|
|
46
|
-
0,
|
|
47
|
-
1,
|
|
48
|
-
2,
|
|
49
|
-
3
|
|
50
|
-
/* Tags */
|
|
51
|
-
], Je = [
|
|
52
|
-
1,
|
|
53
|
-
2,
|
|
54
|
-
3
|
|
55
|
-
/* MerchantLogo */
|
|
56
|
-
], Qe = ({ transaction: t }) => {
|
|
57
|
-
const { addOrUpdateTransactionRule: o, updateTransaction: i } = O(), { categories: a } = Ce(), { onEvent: r } = v(), { setShouldDisableDrawerScroll: n, updateManualTransaction: l } = V(), { transactions: c } = I(), u = F(), [d, p] = _.useState(!1), [m, g] = _.useState(""), y = async (C) => {
|
|
58
|
-
await i({ ...t, category_guid: m }), C && await o(m, t), g(""), r(k.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
59
|
-
transaction_guid: t.guid
|
|
60
|
-
});
|
|
61
|
-
}, E = (C) => {
|
|
62
|
-
if (t.is_manual && !t.guid) {
|
|
63
|
-
const D = a.find((z) => z.guid === C);
|
|
64
|
-
l({
|
|
65
|
-
...t,
|
|
66
|
-
category: D?.name,
|
|
67
|
-
category_guid: C,
|
|
68
|
-
top_level_category_guid: D?.parent_guid || C
|
|
69
|
-
});
|
|
70
|
-
} else
|
|
71
|
-
g(C);
|
|
72
|
-
R();
|
|
73
|
-
}, R = () => {
|
|
74
|
-
p(!1), n(!1);
|
|
75
|
-
}, H = _.useMemo(
|
|
76
|
-
() => a.find((C) => C.guid === m),
|
|
77
|
-
[m]
|
|
78
|
-
), S = u.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
79
|
-
return /* @__PURE__ */ s(L, { disableGutters: !0, disablePadding: !0, children: [
|
|
80
|
-
/* @__PURE__ */ s(
|
|
81
|
-
G,
|
|
82
|
-
{
|
|
83
|
-
onClick: () => {
|
|
84
|
-
r(h.ON_TRANSACTION_CATEGORY_CLICK), p(!0);
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: S }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
88
|
-
me,
|
|
89
|
-
{
|
|
90
|
-
categoryGuid: t.top_level_category_guid,
|
|
91
|
-
size: 24,
|
|
92
|
-
sx: { color: "text.primary" },
|
|
93
|
-
variant: he.Transparent
|
|
94
|
-
}
|
|
95
|
-
) }) }),
|
|
96
|
-
/* @__PURE__ */ e(
|
|
97
|
-
w,
|
|
98
|
-
{
|
|
99
|
-
primary: c.category_title,
|
|
100
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
101
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: t.category ?? c.actions_select_a_category })
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
fe,
|
|
110
|
-
{
|
|
111
|
-
initialSelected: t.category_guid,
|
|
112
|
-
onClose: R,
|
|
113
|
-
onSelect: E,
|
|
114
|
-
showDrawer: d,
|
|
115
|
-
title: c.actions_select_a_category
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
U,
|
|
120
|
-
{
|
|
121
|
-
copy: {
|
|
122
|
-
title: W(
|
|
123
|
-
c.actions_apply_to_all_transaction_types,
|
|
124
|
-
t.description
|
|
125
|
-
)
|
|
126
|
-
},
|
|
127
|
-
isOpen: !!m,
|
|
128
|
-
onClose: () => g(""),
|
|
129
|
-
onPrimaryAction: () => y(!0),
|
|
130
|
-
onSecondaryAction: () => y(!1),
|
|
131
|
-
primaryText: c.actions_apply_to_all,
|
|
132
|
-
secondaryText: c.actions_this_time_only,
|
|
133
|
-
children: /* @__PURE__ */ e(X, { variant: "Paragraph", children: W(
|
|
134
|
-
c.actions_all_past_and_future,
|
|
135
|
-
t.description,
|
|
136
|
-
H?.name
|
|
137
|
-
) })
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] });
|
|
141
|
-
}, Ze = ({ transaction: t }) => {
|
|
142
|
-
const { onEvent: o } = v(), { updateTransaction: i } = O(), { updateManualTransaction: a } = V(), { common: r, transactions: n } = I(), l = F(), [c, u] = _.useState(!1), [d, p] = _.useState(t.date), m = (E) => {
|
|
143
|
-
p(ze(E));
|
|
144
|
-
}, g = async () => {
|
|
145
|
-
if (t.is_manual && !t.guid) {
|
|
146
|
-
a({ ...t, date: d }), u(!1);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
await i({ ...t, date: d }), o(k.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), u(!1);
|
|
150
|
-
}, y = l.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
151
|
-
return /* @__PURE__ */ s(L, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
|
|
152
|
-
/* @__PURE__ */ s(
|
|
153
|
-
G,
|
|
154
|
-
{
|
|
155
|
-
onClick: () => {
|
|
156
|
-
o(h.ON_TRANSACTION_DATE_CLICK), u(!0);
|
|
157
|
-
},
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: y }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
|
|
160
|
-
/* @__PURE__ */ e(
|
|
161
|
-
w,
|
|
162
|
-
{
|
|
163
|
-
primary: n.date_title,
|
|
164
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
165
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: be(_e(t.date), xe.YEAR_MONTH_DAY) })
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
-
ie,
|
|
174
|
-
{
|
|
175
|
-
ariaLabelClose: r.close_aria,
|
|
176
|
-
isOpen: c,
|
|
177
|
-
onClose: () => u(!1),
|
|
178
|
-
onPrimaryAction: g,
|
|
179
|
-
primaryText: r.save_button,
|
|
180
|
-
secondaryText: r.cancel_button,
|
|
181
|
-
title: n.date_edit_title,
|
|
182
|
-
children: /* @__PURE__ */ e(f, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
183
|
-
ke,
|
|
184
|
-
{
|
|
185
|
-
beginDate: _e(d),
|
|
186
|
-
copy: {
|
|
187
|
-
nextAria: n.date_next_aria,
|
|
188
|
-
prevAria: n.date_prev_aria,
|
|
189
|
-
today: r.date_range_picker.today
|
|
190
|
-
},
|
|
191
|
-
onDateSelected: m,
|
|
192
|
-
selectionType: Pe.Single
|
|
193
|
-
}
|
|
194
|
-
) })
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
] });
|
|
198
|
-
}, et = ({ transaction: t }) => {
|
|
199
|
-
const { onEvent: o } = v(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: a } = V(), { common: r, transactions: n } = I(), [l, c] = _.useState(!1), u = async () => {
|
|
200
|
-
await i(t.guid), o(h.ON_TRANSACTION_DELETE_DELETED);
|
|
201
|
-
};
|
|
202
|
-
return /* @__PURE__ */ s(B, { className: "mx-txn-delete", children: [
|
|
203
|
-
t && /* @__PURE__ */ e(L, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
204
|
-
G,
|
|
205
|
-
{
|
|
206
|
-
onClick: () => {
|
|
207
|
-
o(h.ON_TRANSACTION_DELETE_CLICK), a(!0), c(!0);
|
|
208
|
-
},
|
|
209
|
-
children: [
|
|
210
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { variant: "rounded", children: /* @__PURE__ */ e(re, { color: "secondary", fontSize: "small" }) }) }),
|
|
211
|
-
/* @__PURE__ */ e(
|
|
212
|
-
w,
|
|
213
|
-
{
|
|
214
|
-
primary: n.manual_transaction_delete_title,
|
|
215
|
-
secondary: n.manual_transaction_delete_subtitle
|
|
216
|
-
}
|
|
217
|
-
),
|
|
218
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(re, {}) })
|
|
219
|
-
]
|
|
220
|
-
}
|
|
221
|
-
) }),
|
|
222
|
-
/* @__PURE__ */ e(
|
|
223
|
-
U,
|
|
224
|
-
{
|
|
225
|
-
copy: { title: n.manual_transaction_delete_title },
|
|
226
|
-
isOpen: l,
|
|
227
|
-
onClose: () => {
|
|
228
|
-
a(!1), c(!1);
|
|
229
|
-
},
|
|
230
|
-
onPrimaryAction: u,
|
|
231
|
-
onSecondaryAction: () => o(h.ON_TRANSACTION_DELETE_CANCEL),
|
|
232
|
-
primaryText: r.delete_button,
|
|
233
|
-
secondaryText: r.cancel_button,
|
|
234
|
-
children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.manual_transaction_delete_description })
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
] });
|
|
238
|
-
}, tt = N(et), at = ({ transaction: t }) => {
|
|
239
|
-
const { onEvent: o } = v(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: a } = V(), { common: r, transactions: n } = I(), l = F(), [c, u] = _.useState(!1), d = async () => {
|
|
240
|
-
await i({ ...t, merchant_guid: "" }), o(k.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
241
|
-
transaction_guid: t.guid
|
|
242
|
-
});
|
|
243
|
-
}, p = l.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
244
|
-
return /* @__PURE__ */ e(_.Fragment, { children: t && /* @__PURE__ */ s(L, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
|
|
245
|
-
/* @__PURE__ */ s(
|
|
246
|
-
G,
|
|
247
|
-
{
|
|
248
|
-
onClick: () => {
|
|
249
|
-
o(h.ON_TRANSACTION_DELETE_LOGO_CLICK), u(!0);
|
|
250
|
-
},
|
|
251
|
-
children: [
|
|
252
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: p }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "delete", sx: { color: "text.primary" } }) }) }),
|
|
253
|
-
/* @__PURE__ */ e(w, { primary: n.merchant_logo_title, secondary: n.merchant_logo_desc }),
|
|
254
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
),
|
|
258
|
-
/* @__PURE__ */ s(
|
|
259
|
-
U,
|
|
260
|
-
{
|
|
261
|
-
copy: { title: n.merchant_logo_modal_title },
|
|
262
|
-
isOpen: c,
|
|
263
|
-
onClose: () => {
|
|
264
|
-
a(!1), u(!1);
|
|
265
|
-
},
|
|
266
|
-
onPrimaryAction: d,
|
|
267
|
-
onSecondaryAction: () => o(h.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
268
|
-
primaryText: r.delete_button,
|
|
269
|
-
secondaryText: r.cancel_button,
|
|
270
|
-
title: n.merchant_logo_modal_title,
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.merchant_logo_modal_desc }),
|
|
273
|
-
/* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${n.merchant_logo_modal_desc_bold}` })
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
)
|
|
277
|
-
] }) });
|
|
278
|
-
}, rt = N(at), nt = ({ transaction: t }) => {
|
|
279
|
-
const { onEvent: o } = v(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: a } = V(), { common: r, transactions: n } = I(), l = F(), [c, u] = _.useState(!1), d = t.is_hidden, p = async () => {
|
|
280
|
-
await i({ ...t, is_hidden: !t.is_hidden }), o(
|
|
281
|
-
d ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
|
|
282
|
-
);
|
|
283
|
-
}, m = l.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
284
|
-
return /* @__PURE__ */ e(_.Fragment, { children: t && /* @__PURE__ */ s(L, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
|
|
285
|
-
/* @__PURE__ */ s(
|
|
286
|
-
G,
|
|
287
|
-
{
|
|
288
|
-
"aria-checked": d,
|
|
289
|
-
"aria-labelledby": "hide-transaction-text",
|
|
290
|
-
onClick: () => {
|
|
291
|
-
o(
|
|
292
|
-
d ? h.ON_TRANSACTION_UNHIDE_CLICK : h.ON_TRANSACTION_HIDE_CLICK
|
|
293
|
-
), o(
|
|
294
|
-
d ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
|
295
|
-
{
|
|
296
|
-
transaction_guid: t.guid
|
|
297
|
-
}
|
|
298
|
-
), u(!0);
|
|
299
|
-
},
|
|
300
|
-
role: "switch",
|
|
301
|
-
children: [
|
|
302
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: m }, variant: "rounded", children: d ? /* @__PURE__ */ e(A, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(A, { name: "visibility", sx: { color: "text.primary" } }) }) }),
|
|
303
|
-
/* @__PURE__ */ e(
|
|
304
|
-
w,
|
|
305
|
-
{
|
|
306
|
-
id: "hide-transaction-text",
|
|
307
|
-
primary: d ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
|
|
308
|
-
secondary: d ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding
|
|
309
|
-
}
|
|
310
|
-
),
|
|
311
|
-
/* @__PURE__ */ e(K, { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
312
|
-
Xe,
|
|
313
|
-
{
|
|
314
|
-
checked: d,
|
|
315
|
-
inputProps: { tabIndex: -1 },
|
|
316
|
-
sx: { pointerEvents: "none" },
|
|
317
|
-
tabIndex: -1
|
|
318
|
-
}
|
|
319
|
-
) })
|
|
320
|
-
]
|
|
321
|
-
}
|
|
322
|
-
),
|
|
323
|
-
/* @__PURE__ */ e(
|
|
324
|
-
U,
|
|
325
|
-
{
|
|
326
|
-
copy: {
|
|
327
|
-
title: d ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
|
|
328
|
-
},
|
|
329
|
-
isOpen: c,
|
|
330
|
-
onClose: () => {
|
|
331
|
-
a(!1), u(!1);
|
|
332
|
-
},
|
|
333
|
-
onPrimaryAction: p,
|
|
334
|
-
onSecondaryAction: () => o(
|
|
335
|
-
d ? h.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : h.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
|
336
|
-
),
|
|
337
|
-
primaryText: d ? r.unhide_button : r.hide_button,
|
|
338
|
-
secondaryText: r.cancel_button,
|
|
339
|
-
children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: d ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
|
|
340
|
-
}
|
|
341
|
-
)
|
|
342
|
-
] }) });
|
|
343
|
-
}, ot = N(nt), Ae = ({ transaction: t }) => {
|
|
344
|
-
const { amount: o, description: i, isIncome: a, merchant_guid: r, payee: n, top_level_category_guid: l } = t;
|
|
345
|
-
return /* @__PURE__ */ s(f, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
346
|
-
/* @__PURE__ */ e(
|
|
347
|
-
ye,
|
|
348
|
-
{
|
|
349
|
-
categoryGuid: l || "",
|
|
350
|
-
merchantGuid: r || "",
|
|
351
|
-
size: 64
|
|
352
|
-
}
|
|
353
|
-
),
|
|
354
|
-
/* @__PURE__ */ s(f, { overflow: "hidden'", children: [
|
|
355
|
-
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || n }),
|
|
356
|
-
/* @__PURE__ */ s(X, { color: a ? "success.main" : "text.primary", truncate: !0, variant: "H1", children: [
|
|
357
|
-
a ? "+" : "",
|
|
358
|
-
se(o, "0,0.00")
|
|
359
|
-
] })
|
|
360
|
-
] })
|
|
361
|
-
] });
|
|
362
|
-
}, it = ({ transaction: t }) => {
|
|
363
|
-
const { onEvent: o } = v(), { updateTransaction: i } = O(), { updateManualTransaction: a } = V(), { common: r, transactions: n } = I(), l = F(), [c, u] = _.useState(!1), [d, p] = _.useState("");
|
|
364
|
-
_.useEffect(() => {
|
|
365
|
-
c && p(t.memo ? t.memo : "");
|
|
366
|
-
}, [c]);
|
|
367
|
-
const m = async () => {
|
|
368
|
-
if (t.is_manual && !t.guid) {
|
|
369
|
-
a({ ...t, memo: d }), u(!1);
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
await i({ ...t, memo: d }), o(k.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), u(!1);
|
|
373
|
-
}, g = l.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
374
|
-
return /* @__PURE__ */ s(L, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
|
|
375
|
-
/* @__PURE__ */ s(
|
|
376
|
-
G,
|
|
377
|
-
{
|
|
378
|
-
onClick: () => {
|
|
379
|
-
o(h.ON_TRANSACTION_MEMO_CLICK), u(!0);
|
|
380
|
-
},
|
|
381
|
-
children: [
|
|
382
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "article", sx: { color: "text.primary" } }) }) }),
|
|
383
|
-
/* @__PURE__ */ e(
|
|
384
|
-
w,
|
|
385
|
-
{
|
|
386
|
-
primary: n.memo_title,
|
|
387
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
388
|
-
secondary: /* @__PURE__ */ e(
|
|
389
|
-
T,
|
|
390
|
-
{
|
|
391
|
-
bold: !0,
|
|
392
|
-
sx: { overflowWrap: "break-word", whiteSpace: "wrap", color: "text.primary" },
|
|
393
|
-
variant: "Body",
|
|
394
|
-
children: t.memo ? t.memo : n.memo_desc
|
|
395
|
-
}
|
|
396
|
-
)
|
|
397
|
-
}
|
|
398
|
-
),
|
|
399
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
400
|
-
]
|
|
401
|
-
}
|
|
402
|
-
),
|
|
403
|
-
/* @__PURE__ */ s(
|
|
404
|
-
ie,
|
|
405
|
-
{
|
|
406
|
-
ariaLabelClose: r.close_aria,
|
|
407
|
-
isOpen: c,
|
|
408
|
-
onClose: () => u(!1),
|
|
409
|
-
onPrimaryAction: m,
|
|
410
|
-
title: n.memo_title,
|
|
411
|
-
children: [
|
|
412
|
-
/* @__PURE__ */ e(Ae, { transaction: t }),
|
|
413
|
-
/* @__PURE__ */ e(
|
|
414
|
-
Te,
|
|
415
|
-
{
|
|
416
|
-
"aria-label": n.memo_desc_aria,
|
|
417
|
-
focused: !0,
|
|
418
|
-
multiline: !0,
|
|
419
|
-
name: "memo",
|
|
420
|
-
onChange: (y) => p(y.target.value),
|
|
421
|
-
placeholder: n.memo_desc,
|
|
422
|
-
rows: 4,
|
|
423
|
-
sx: { mx: 16, width: "calc(100% - 32px)" },
|
|
424
|
-
value: d
|
|
425
|
-
}
|
|
426
|
-
)
|
|
427
|
-
]
|
|
428
|
-
}
|
|
429
|
-
)
|
|
430
|
-
] });
|
|
431
|
-
}, st = N(it), lt = ({
|
|
432
|
-
index: t,
|
|
433
|
-
onDeleteRow: o,
|
|
434
|
-
onCategoryChanged: i,
|
|
435
|
-
onUpdateAmount: a,
|
|
436
|
-
split: r
|
|
437
|
-
}) => {
|
|
438
|
-
const { onEvent: n } = v(), { transactions: l } = I(), [c, u] = _.useState(`${r.amount}`), [d, p] = _.useState(!1), m = t === 0, g = (y) => {
|
|
439
|
-
isNaN(Number(y)) || (u(y), a(t, Number(y)));
|
|
440
|
-
};
|
|
441
|
-
return /* @__PURE__ */ s(B, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
442
|
-
/* @__PURE__ */ s(de, { alignItems: m ? "center" : "start", container: !0, children: [
|
|
443
|
-
/* @__PURE__ */ e(de, { item: !0, xs: 7, children: /* @__PURE__ */ s(f, { alignItems: "start", children: [
|
|
444
|
-
/* @__PURE__ */ e(
|
|
445
|
-
oe,
|
|
446
|
-
{
|
|
447
|
-
endIcon: /* @__PURE__ */ e(Fe, {}),
|
|
448
|
-
onClick: () => p(!0),
|
|
449
|
-
startIcon: /* @__PURE__ */ e(me, { categoryGuid: r.top_level_category_guid }),
|
|
450
|
-
sx: { px: 12, py: 8 },
|
|
451
|
-
children: r.category
|
|
452
|
-
}
|
|
453
|
-
),
|
|
454
|
-
/* @__PURE__ */ e(B, { children: !r.category_guid && /* @__PURE__ */ s(f, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
|
|
455
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ne, { sx: { fontSize: 15 } }) }),
|
|
456
|
-
/* @__PURE__ */ e(T, { variant: "Small", children: l.split_transaction_errors_select_category })
|
|
457
|
-
] }) })
|
|
458
|
-
] }) }),
|
|
459
|
-
/* @__PURE__ */ e(de, { item: !0, xs: 5, children: m ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: se(r.amount, "0,0.00") }) }) : /* @__PURE__ */ s(f, { alignItems: "start", children: [
|
|
460
|
-
/* @__PURE__ */ s(f, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
461
|
-
/* @__PURE__ */ e(
|
|
462
|
-
Ye,
|
|
463
|
-
{
|
|
464
|
-
amount: c,
|
|
465
|
-
ariaLabel: l.split_transaction_edit_split_amount,
|
|
466
|
-
minAmount: 0.01,
|
|
467
|
-
name: "split-amount-input",
|
|
468
|
-
setAmount: g,
|
|
469
|
-
sx: {
|
|
470
|
-
".MuiOutlinedInput-input": { p: 12 }
|
|
471
|
-
},
|
|
472
|
-
type: "number"
|
|
473
|
-
}
|
|
474
|
-
),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
476
|
-
J,
|
|
477
|
-
{
|
|
478
|
-
"aria-label": l.split_transaction_delete_split_btn,
|
|
479
|
-
color: "secondary",
|
|
480
|
-
onClick: () => {
|
|
481
|
-
n(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), o(t);
|
|
482
|
-
},
|
|
483
|
-
sx: { w: 44, h: 44 },
|
|
484
|
-
children: /* @__PURE__ */ e(re, {})
|
|
485
|
-
}
|
|
486
|
-
)
|
|
487
|
-
] }),
|
|
488
|
-
!c && /* @__PURE__ */ s(f, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
|
|
489
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ne, { sx: { fontSize: 15 } }) }),
|
|
490
|
-
/* @__PURE__ */ e(T, { variant: "Small", children: l.split_transaction_errors_enter_an_amount })
|
|
491
|
-
] })
|
|
492
|
-
] }) })
|
|
493
|
-
] }),
|
|
494
|
-
/* @__PURE__ */ e(
|
|
495
|
-
fe,
|
|
496
|
-
{
|
|
497
|
-
initialSelected: r.category_guid,
|
|
498
|
-
onClose: () => p(!1),
|
|
499
|
-
onSelect: (y) => {
|
|
500
|
-
i(t, y), p(!1);
|
|
501
|
-
},
|
|
502
|
-
showDrawer: d,
|
|
503
|
-
title: l.actions_select_a_category
|
|
504
|
-
}
|
|
505
|
-
)
|
|
506
|
-
] });
|
|
507
|
-
}, ct = N(lt), dt = ({
|
|
508
|
-
onAddSplit: t,
|
|
509
|
-
onCategoryChanged: o,
|
|
510
|
-
onDeleteSplit: i,
|
|
511
|
-
onUpdateAmount: a,
|
|
512
|
-
splits: r,
|
|
513
|
-
transaction: n
|
|
514
|
-
}) => {
|
|
515
|
-
const { transactions: l } = I(), { onEvent: c } = v(), [u, d] = _.useState(""), { announce: p, ariaLive: m } = pe();
|
|
516
|
-
return _.useEffect(() => {
|
|
517
|
-
if (r.length <= 1)
|
|
518
|
-
d(l.split_transaction_errors_min_splits), p(l.split_transaction_errors_min_splits);
|
|
519
|
-
else if (r[0].amount < 0) {
|
|
520
|
-
const g = W(
|
|
521
|
-
l.split_transaction_errors_totals_must_equal_amount,
|
|
522
|
-
se(n.amount, "0,0.00")
|
|
523
|
-
);
|
|
524
|
-
d(g), p(g);
|
|
525
|
-
} else
|
|
526
|
-
d(""), p("");
|
|
527
|
-
}, [r]), /* @__PURE__ */ s(B, { className: "mx-txn-split-manager", children: [
|
|
528
|
-
m,
|
|
529
|
-
r.map((g, y) => /* @__PURE__ */ e(
|
|
530
|
-
ct,
|
|
531
|
-
{
|
|
532
|
-
index: y,
|
|
533
|
-
onCategoryChanged: o,
|
|
534
|
-
onDeleteRow: i,
|
|
535
|
-
onUpdateAmount: a,
|
|
536
|
-
split: g
|
|
537
|
-
},
|
|
538
|
-
y
|
|
539
|
-
)),
|
|
540
|
-
u && /* @__PURE__ */ s(f, { color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
541
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ne, { sx: { fontSize: 15 } }) }),
|
|
542
|
-
/* @__PURE__ */ e(T, { variant: "Small", children: u })
|
|
543
|
-
] }),
|
|
544
|
-
/* @__PURE__ */ e(B, { p: 16, children: /* @__PURE__ */ e(
|
|
545
|
-
oe,
|
|
546
|
-
{
|
|
547
|
-
"aria-label": l.split_transaction_add_split_btn,
|
|
548
|
-
onClick: () => {
|
|
549
|
-
c(h.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
550
|
-
},
|
|
551
|
-
children: l.split_transaction_add_split_btn
|
|
552
|
-
}
|
|
553
|
-
) })
|
|
554
|
-
] });
|
|
555
|
-
}, _t = N(dt), mt = ({ transaction: t }) => {
|
|
556
|
-
const { onEvent: o } = v(), { announce: i, ariaLive: a } = pe(), { splitTransaction: r, unSplitTransaction: n } = O(), { common: l, transactions: c } = I(), { setShouldDisableDrawerScroll: u } = V(), { categories: d } = Ce(), p = F(), m = {
|
|
557
|
-
...t,
|
|
558
|
-
amount: t.amount - 1,
|
|
559
|
-
guid: "",
|
|
560
|
-
has_been_split: !1,
|
|
561
|
-
parent_guid: t.guid
|
|
562
|
-
}, g = {
|
|
563
|
-
...t,
|
|
564
|
-
amount: 1,
|
|
565
|
-
category_guid: void 0,
|
|
566
|
-
category: c.split_transaction_select_category_btn,
|
|
567
|
-
guid: "",
|
|
568
|
-
has_been_split: !1,
|
|
569
|
-
parent_guid: t.guid,
|
|
570
|
-
top_level_category_guid: void 0
|
|
571
|
-
}, [y, E] = _.useState(!1), [R, H] = _.useState(!1), [S, C] = _.useState([]), D = () => {
|
|
572
|
-
const b = [...S];
|
|
573
|
-
b.push({ ...g }), b[0].amount -= 1, C(b), i(
|
|
574
|
-
W(
|
|
575
|
-
c.split_transaction_add_split_announcement,
|
|
576
|
-
b.length
|
|
577
|
-
)
|
|
578
|
-
);
|
|
579
|
-
}, z = (b) => {
|
|
580
|
-
if (b > 0) {
|
|
581
|
-
const $ = S[b], x = [...S];
|
|
582
|
-
x.splice(b, 1), x[0].amount += $.amount, C(x), i(
|
|
583
|
-
W(c.split_transaction_delete_split_announcement, b + 1)
|
|
584
|
-
);
|
|
585
|
-
}
|
|
586
|
-
}, Ne = (b, $) => {
|
|
587
|
-
const x = [...S];
|
|
588
|
-
x[b].amount = $, x[0].amount = t.amount - x.reduce(
|
|
589
|
-
(Y, le, Re) => Y + (Re !== 0 ? le.amount : 0),
|
|
590
|
-
0
|
|
591
|
-
), C(x);
|
|
592
|
-
}, Ie = (b, $) => {
|
|
593
|
-
const x = [...S], Y = d.find((le) => le.guid === $);
|
|
594
|
-
Y && (x[b] = {
|
|
595
|
-
...x[b],
|
|
596
|
-
category_guid: $,
|
|
597
|
-
category: Y.name,
|
|
598
|
-
top_level_category_guid: Y.parent_guid || $
|
|
599
|
-
}, C(x), i(
|
|
600
|
-
W(
|
|
601
|
-
c.split_transaction_select_category_announcement,
|
|
602
|
-
Y.name,
|
|
603
|
-
b + 1
|
|
604
|
-
)
|
|
605
|
-
));
|
|
606
|
-
}, ve = () => {
|
|
607
|
-
if (t.parent_guid || t.has_been_split) {
|
|
608
|
-
H(!0);
|
|
609
|
-
return;
|
|
610
|
-
}
|
|
611
|
-
C([{ ...m }, { ...g }]), o(k.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
612
|
-
transaction_guid: t.guid
|
|
613
|
-
}), E(!0);
|
|
614
|
-
}, Ee = async () => {
|
|
615
|
-
o(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await r({ ...t, has_been_split: !0 }, S), E(!1);
|
|
616
|
-
}, Oe = async () => {
|
|
617
|
-
o(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), C([{ ...m }, { ...g }]), E(!1);
|
|
618
|
-
}, De = async () => {
|
|
619
|
-
o(k.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
620
|
-
transaction_guid: t.guid
|
|
621
|
-
});
|
|
622
|
-
const b = t.parent_guid ?? t.guid;
|
|
623
|
-
await n(b);
|
|
624
|
-
}, Le = _.useMemo(() => {
|
|
625
|
-
const b = S.some((x) => !x.category_guid), $ = S.some((x) => x.amount <= 0);
|
|
626
|
-
return b || $;
|
|
627
|
-
}, [S]), we = p.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
628
|
-
return /* @__PURE__ */ e(_.Fragment, { children: t && /* @__PURE__ */ s(L, { disableGutters: !0, disablePadding: !0, children: [
|
|
629
|
-
/* @__PURE__ */ s(G, { onClick: ve, children: [
|
|
630
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: we }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "call_split", sx: { color: "text.primary" } }) }) }),
|
|
631
|
-
/* @__PURE__ */ e(
|
|
632
|
-
w,
|
|
633
|
-
{
|
|
634
|
-
primary: t.has_been_split || t.parent_guid ? c.split_transaction_unsplit_title : c.split_transaction_title,
|
|
635
|
-
secondary: t.has_been_split || t.parent_guid ? c.split_transaction_unsplit_subtitle : c.split_transaction_desc
|
|
636
|
-
}
|
|
637
|
-
),
|
|
638
|
-
/* @__PURE__ */ e(K, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(A, { name: "delete" }) : /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
639
|
-
] }),
|
|
640
|
-
/* @__PURE__ */ s(
|
|
641
|
-
ie,
|
|
642
|
-
{
|
|
643
|
-
ariaLabelClose: l.close_aria,
|
|
644
|
-
isOpen: y,
|
|
645
|
-
isPrimaryDisabled: Le,
|
|
646
|
-
onClose: Oe,
|
|
647
|
-
onPrimaryAction: Ee,
|
|
648
|
-
primaryText: l.save_button,
|
|
649
|
-
secondaryText: l.cancel_button,
|
|
650
|
-
title: c.split_transaction_title,
|
|
651
|
-
children: [
|
|
652
|
-
a,
|
|
653
|
-
/* @__PURE__ */ e(Ae, { transaction: t }),
|
|
654
|
-
/* @__PURE__ */ e(
|
|
655
|
-
_t,
|
|
656
|
-
{
|
|
657
|
-
onAddSplit: D,
|
|
658
|
-
onCategoryChanged: Ie,
|
|
659
|
-
onDeleteSplit: z,
|
|
660
|
-
onUpdateAmount: Ne,
|
|
661
|
-
splits: S,
|
|
662
|
-
transaction: t
|
|
663
|
-
}
|
|
664
|
-
)
|
|
665
|
-
]
|
|
666
|
-
}
|
|
667
|
-
),
|
|
668
|
-
/* @__PURE__ */ e(
|
|
669
|
-
U,
|
|
670
|
-
{
|
|
671
|
-
copy: { title: c.split_transaction_unsplit_title },
|
|
672
|
-
isOpen: R,
|
|
673
|
-
onClose: () => {
|
|
674
|
-
u(!1), H(!1);
|
|
675
|
-
},
|
|
676
|
-
onPrimaryAction: De,
|
|
677
|
-
onSecondaryAction: () => {
|
|
678
|
-
o(h.ON_TRANSACTION_UNSPLIT_CANCEL);
|
|
679
|
-
},
|
|
680
|
-
primaryText: l.delete_button,
|
|
681
|
-
secondaryText: l.cancel_button,
|
|
682
|
-
children: /* @__PURE__ */ e(X, { variant: "Paragraph", children: W(
|
|
683
|
-
c.split_transaction_unsplit_description,
|
|
684
|
-
t.description
|
|
685
|
-
) })
|
|
686
|
-
}
|
|
687
|
-
)
|
|
688
|
-
] }) });
|
|
689
|
-
}, ut = N(mt), pt = () => {
|
|
690
|
-
const t = Se(), { onEvent: o } = v(), { addTag: i } = O(), { transactions: a } = I(), [r, n] = _.useState(!1), [l, c] = _.useState(""), [u, d] = _.useState(""), p = _.useRef(null);
|
|
691
|
-
_.useEffect(() => {
|
|
692
|
-
r && p?.current?.focus();
|
|
693
|
-
}, [r]);
|
|
694
|
-
const m = () => {
|
|
695
|
-
o(
|
|
696
|
-
r ? h.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : h.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
697
|
-
), r || c(""), n(!r);
|
|
698
|
-
}, g = async () => {
|
|
699
|
-
o(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(l), n(!1);
|
|
700
|
-
};
|
|
701
|
-
return _.useEffect(() => {
|
|
702
|
-
d(l.length > 40 ? a.tags_error_name_must_be_40_chars : "");
|
|
703
|
-
}, [l]), /* @__PURE__ */ s(B, { className: "mx-txn-tag-manager-header", children: [
|
|
704
|
-
/* @__PURE__ */ s(
|
|
705
|
-
f,
|
|
706
|
-
{
|
|
707
|
-
alignItems: "center",
|
|
708
|
-
bgcolor: t.palette.background.default,
|
|
709
|
-
direction: "row",
|
|
710
|
-
justifyContent: "space-between",
|
|
711
|
-
px: 24,
|
|
712
|
-
py: 16,
|
|
713
|
-
children: [
|
|
714
|
-
/* @__PURE__ */ e(T, { bold: !0, children: a.tags_your_tags }),
|
|
715
|
-
/* @__PURE__ */ e(
|
|
716
|
-
oe,
|
|
717
|
-
{
|
|
718
|
-
"aria-expanded": r,
|
|
719
|
-
"aria-label": a.tags_add_tag_btn_aria,
|
|
720
|
-
onClick: m,
|
|
721
|
-
children: a.tags_add_tag_btn
|
|
722
|
-
}
|
|
723
|
-
)
|
|
724
|
-
]
|
|
725
|
-
}
|
|
726
|
-
),
|
|
727
|
-
/* @__PURE__ */ s(
|
|
728
|
-
U,
|
|
729
|
-
{
|
|
730
|
-
copy: { title: a.tags_add_tag_btn },
|
|
731
|
-
isOpen: r,
|
|
732
|
-
onClose: () => n(!1),
|
|
733
|
-
onPrimaryAction: g,
|
|
734
|
-
onSecondaryAction: () => n(!1),
|
|
735
|
-
children: [
|
|
736
|
-
/* @__PURE__ */ e(
|
|
737
|
-
ue,
|
|
738
|
-
{
|
|
739
|
-
"aria-label": a.tags_placeholder,
|
|
740
|
-
name: "add-tag",
|
|
741
|
-
onChange: (y) => c(y.target.value),
|
|
742
|
-
placeholder: a.tags_placeholder,
|
|
743
|
-
sx: { width: "100%" },
|
|
744
|
-
value: l
|
|
745
|
-
}
|
|
746
|
-
),
|
|
747
|
-
/* @__PURE__ */ e(X, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: u })
|
|
748
|
-
]
|
|
749
|
-
}
|
|
750
|
-
)
|
|
751
|
-
] });
|
|
752
|
-
}, gt = N(pt), ht = ({ onSearchValueChanged: t, searchValue: o }) => {
|
|
753
|
-
const { common: i, transactions: a } = I(), r = /* @__PURE__ */ e(
|
|
754
|
-
J,
|
|
755
|
-
{
|
|
756
|
-
"aria-label": a.tags_cancel_search || "Search",
|
|
757
|
-
onClick: () => t(""),
|
|
758
|
-
children: /* @__PURE__ */ e(ne, {})
|
|
759
|
-
}
|
|
760
|
-
);
|
|
761
|
-
return /* @__PURE__ */ e(B, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
|
|
762
|
-
ue,
|
|
763
|
-
{
|
|
764
|
-
InputProps: {
|
|
765
|
-
startAdornment: /* @__PURE__ */ e(ge, { position: "start", children: /* @__PURE__ */ e(He, { color: "disabled" }) }),
|
|
766
|
-
endAdornment: /* @__PURE__ */ e(ge, { position: "end", sx: { padding: 0 }, children: o ? r : null })
|
|
767
|
-
},
|
|
768
|
-
"aria-label": i.search_aria,
|
|
769
|
-
name: "search",
|
|
770
|
-
onChange: (n) => t(n.target.value),
|
|
771
|
-
placeholder: i.search_placeholder,
|
|
772
|
-
sx: { bgcolor: "background.paper", width: "100%" },
|
|
773
|
-
value: o
|
|
774
|
-
}
|
|
775
|
-
) });
|
|
776
|
-
}, yt = N(ht), Tt = ({ onTagChecked: t, selectedTags: o, tag: i }) => {
|
|
777
|
-
const { onEvent: a } = v(), { removeTag: r, updateTag: n } = O(), { common: l, transactions: c } = I(), [u, d] = _.useState(!1), [p, m] = _.useState(!1), [g, y] = _.useState(""), [E, R] = _.useState(""), H = async () => {
|
|
778
|
-
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await n({ ...i, name: g }), d(!1);
|
|
779
|
-
}, S = async () => {
|
|
780
|
-
a(h.ON_TRANSACTION_TAGS_TAG_DELETED), await r(i.guid), m(!1);
|
|
781
|
-
};
|
|
782
|
-
_.useEffect(() => {
|
|
783
|
-
R(g.length > 40 ? c.tags_error_name_must_be_40_chars : "");
|
|
784
|
-
}, [g]);
|
|
785
|
-
const C = () => {
|
|
786
|
-
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), y(i.name), d(!0);
|
|
787
|
-
}, D = () => {
|
|
788
|
-
a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), m(!0);
|
|
789
|
-
};
|
|
790
|
-
return /* @__PURE__ */ s(
|
|
791
|
-
L,
|
|
792
|
-
{
|
|
793
|
-
className: "mx-txn-transaction-manager-row",
|
|
794
|
-
disableGutters: !0,
|
|
795
|
-
disablePadding: !0,
|
|
796
|
-
secondaryAction: !i.is_default_tag && /* @__PURE__ */ s(f, { direction: "row", children: [
|
|
797
|
-
/* @__PURE__ */ e(
|
|
798
|
-
J,
|
|
799
|
-
{
|
|
800
|
-
"aria-label": `Edit ${i.name} tag`,
|
|
801
|
-
color: "secondary",
|
|
802
|
-
onClick: C,
|
|
803
|
-
children: /* @__PURE__ */ e(Ue, { color: "secondary" })
|
|
804
|
-
}
|
|
805
|
-
),
|
|
806
|
-
/* @__PURE__ */ e(
|
|
807
|
-
J,
|
|
808
|
-
{
|
|
809
|
-
"aria-label": `Delete ${i.name} tag`,
|
|
810
|
-
color: "secondary",
|
|
811
|
-
onClick: D,
|
|
812
|
-
children: /* @__PURE__ */ e(re, { color: "secondary" })
|
|
813
|
-
}
|
|
814
|
-
)
|
|
815
|
-
] }),
|
|
816
|
-
children: [
|
|
817
|
-
/* @__PURE__ */ s(
|
|
818
|
-
G,
|
|
819
|
-
{
|
|
820
|
-
"aria-checked": o.includes(i.guid),
|
|
821
|
-
onClick: () => t(i.guid),
|
|
822
|
-
role: "checkbox",
|
|
823
|
-
children: [
|
|
824
|
-
/* @__PURE__ */ e(K, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
|
|
825
|
-
We,
|
|
826
|
-
{
|
|
827
|
-
"aria-hidden": !0,
|
|
828
|
-
checked: o.includes(i.guid),
|
|
829
|
-
edge: "start",
|
|
830
|
-
tabIndex: -1
|
|
831
|
-
}
|
|
832
|
-
) }),
|
|
833
|
-
/* @__PURE__ */ e(w, { children: i.name })
|
|
834
|
-
]
|
|
835
|
-
}
|
|
836
|
-
),
|
|
837
|
-
/* @__PURE__ */ s(
|
|
838
|
-
U,
|
|
839
|
-
{
|
|
840
|
-
copy: { title: "Update tag name" },
|
|
841
|
-
isOpen: u,
|
|
842
|
-
onClose: () => d(!1),
|
|
843
|
-
onPrimaryAction: H,
|
|
844
|
-
onSecondaryAction: () => d(!1),
|
|
845
|
-
children: [
|
|
846
|
-
/* @__PURE__ */ e(
|
|
847
|
-
ue,
|
|
848
|
-
{
|
|
849
|
-
"aria-describedby": E ? "update-tag-error" : void 0,
|
|
850
|
-
"aria-label": c.tags_update_the_tag_name,
|
|
851
|
-
name: "update-tag",
|
|
852
|
-
onChange: (z) => y(z.target.value),
|
|
853
|
-
placeholder: "Tag name",
|
|
854
|
-
sx: { width: "100%" },
|
|
855
|
-
value: g
|
|
856
|
-
}
|
|
857
|
-
),
|
|
858
|
-
/* @__PURE__ */ e(X, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: E })
|
|
859
|
-
]
|
|
860
|
-
}
|
|
861
|
-
),
|
|
862
|
-
/* @__PURE__ */ e(
|
|
863
|
-
U,
|
|
864
|
-
{
|
|
865
|
-
copy: { title: c.tags_delete_title },
|
|
866
|
-
isOpen: p,
|
|
867
|
-
onClose: () => m(!1),
|
|
868
|
-
onPrimaryAction: S,
|
|
869
|
-
onSecondaryAction: () => a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
870
|
-
primaryText: l.delete_button,
|
|
871
|
-
secondaryText: l.cancel_button,
|
|
872
|
-
children: /* @__PURE__ */ e(T, { truncate: !1, children: c.tags_deleting_this_tag_will_remove_it })
|
|
873
|
-
}
|
|
874
|
-
)
|
|
875
|
-
]
|
|
876
|
-
}
|
|
877
|
-
);
|
|
878
|
-
}, Ct = N(Tt), St = ({ selectedTags: t, onTagChecked: o }) => {
|
|
879
|
-
const { tags: i } = O(), [a, r] = _.useState(""), n = i.filter(
|
|
880
|
-
(l) => l.name.toLowerCase().includes(a.toLowerCase())
|
|
881
|
-
);
|
|
882
|
-
return /* @__PURE__ */ s("div", { className: "mx-txn-tag-manager", children: [
|
|
883
|
-
/* @__PURE__ */ e(
|
|
884
|
-
yt,
|
|
885
|
-
{
|
|
886
|
-
onSearchValueChanged: (l) => r(l),
|
|
887
|
-
searchValue: a
|
|
888
|
-
}
|
|
889
|
-
),
|
|
890
|
-
/* @__PURE__ */ e(gt, {}),
|
|
891
|
-
/* @__PURE__ */ e(Z, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(ae, { children: n.map((l) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
892
|
-
/* @__PURE__ */ e(Ct, { onTagChecked: o, selectedTags: t, tag: l }),
|
|
893
|
-
/* @__PURE__ */ e(te, { sx: { ml: 24 } })
|
|
894
|
-
] }, l.guid)) }) })
|
|
895
|
-
] });
|
|
896
|
-
}, bt = N(St), xt = ({ transaction: t }) => {
|
|
897
|
-
const { onEvent: o } = v(), { tags: i, updateTaggings: a, updateTransaction: r } = O(), { common: n, transactions: l } = I(), { updateManualTransaction: c } = V(), u = F(), [d, p] = _.useState(!1), [m, g] = _.useState(t.tags);
|
|
898
|
-
_.useEffect(() => {
|
|
899
|
-
g(t.tags);
|
|
900
|
-
}, [d, t]);
|
|
901
|
-
const y = (S) => {
|
|
902
|
-
const C = [...m], D = m.indexOf(S);
|
|
903
|
-
D >= 0 ? C.splice(D, 1) : C.push(S), g(C);
|
|
904
|
-
}, E = async () => {
|
|
905
|
-
if (t.is_manual && !t.guid) {
|
|
906
|
-
c({ ...t, tags: m }), p(!1);
|
|
907
|
-
return;
|
|
908
|
-
}
|
|
909
|
-
await a(m, t.guid), await r({ ...t, tags: m }), o(k.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), p(!1);
|
|
910
|
-
}, R = _.useMemo(
|
|
911
|
-
() => t.tags.map(
|
|
912
|
-
(S, C, D) => `${i.find((z) => z.guid === S)?.name}${C < D.length - 1 ? " / " : ""}`
|
|
913
|
-
),
|
|
914
|
-
[i, t]
|
|
915
|
-
), H = u.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
916
|
-
return /* @__PURE__ */ s(L, { disableGutters: !0, disablePadding: !0, children: [
|
|
917
|
-
/* @__PURE__ */ s(
|
|
918
|
-
G,
|
|
919
|
-
{
|
|
920
|
-
onClick: () => {
|
|
921
|
-
o(h.ON_TRANSACTION_TAGS_CLICK), p(!0);
|
|
922
|
-
},
|
|
923
|
-
children: [
|
|
924
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: H }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
w,
|
|
927
|
-
{
|
|
928
|
-
primary: l.tags_title,
|
|
929
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
930
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: t.tags?.length > 0 ? R : l.tags_desc })
|
|
931
|
-
}
|
|
932
|
-
),
|
|
933
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
934
|
-
]
|
|
935
|
-
}
|
|
936
|
-
),
|
|
937
|
-
/* @__PURE__ */ e(
|
|
938
|
-
ie,
|
|
939
|
-
{
|
|
940
|
-
ariaLabelClose: n.close_aria,
|
|
941
|
-
isOpen: d,
|
|
942
|
-
onClose: () => p(!1),
|
|
943
|
-
onPrimaryAction: E,
|
|
944
|
-
primaryText: n.save_button,
|
|
945
|
-
secondaryText: n.cancel_button,
|
|
946
|
-
title: l.tags_title,
|
|
947
|
-
children: /* @__PURE__ */ e(bt, { onTagChecked: y, selectedTags: m })
|
|
948
|
-
}
|
|
949
|
-
)
|
|
950
|
-
] });
|
|
951
|
-
}, ft = N(xt), At = ({ transaction: t, viewOnly: o = !1 }) => {
|
|
952
|
-
const { updateTransaction: i } = O(), { common: a, transactions: r } = I(), { onEvent: n } = v(), { announce: l, ariaLive: c } = pe(), [u, d] = _.useState(!1), [p, m] = _.useState(""), g = _.useRef(null);
|
|
953
|
-
_.useEffect(() => {
|
|
954
|
-
u && (m(t.description), g?.current?.focus());
|
|
955
|
-
}, [u]);
|
|
956
|
-
const y = () => {
|
|
957
|
-
d(!0), n(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
|
|
958
|
-
}, E = async () => {
|
|
959
|
-
n(k.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
960
|
-
transaction_guid: t.guid
|
|
961
|
-
}), await i({ ...t, description: p }), d(!1), l(`${r.payee_title}: ${p}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
|
|
962
|
-
};
|
|
963
|
-
return /* @__PURE__ */ s(B, { className: "mx-txn-transaction-description", children: [
|
|
964
|
-
c,
|
|
965
|
-
u ? /* @__PURE__ */ s(Ge, { row: !0, children: [
|
|
966
|
-
/* @__PURE__ */ e(
|
|
967
|
-
Te,
|
|
968
|
-
{
|
|
969
|
-
"aria-label": r.payee_title,
|
|
970
|
-
id: "transaction-description-input",
|
|
971
|
-
inputProps: { maxLength: 140 },
|
|
972
|
-
label: r.payee_title,
|
|
973
|
-
name: r.payee_title,
|
|
974
|
-
onChange: (R) => m(R.target.value),
|
|
975
|
-
ref: g,
|
|
976
|
-
sx: {
|
|
977
|
-
backgroundColor: "background.paper",
|
|
978
|
-
".MuiOutlinedInput-root": { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
979
|
-
".MuiOutlinedInput-input": { p: 11 },
|
|
980
|
-
width: 250
|
|
981
|
-
},
|
|
982
|
-
value: p
|
|
983
|
-
}
|
|
984
|
-
),
|
|
985
|
-
/* @__PURE__ */ e(
|
|
986
|
-
oe,
|
|
987
|
-
{
|
|
988
|
-
disabled: !p,
|
|
989
|
-
onClick: E,
|
|
990
|
-
sx: {
|
|
991
|
-
borderTopLeftRadius: 0,
|
|
992
|
-
borderBottomLeftRadius: 0
|
|
993
|
-
},
|
|
994
|
-
variant: "outlined",
|
|
995
|
-
children: a.save_button
|
|
996
|
-
}
|
|
997
|
-
)
|
|
998
|
-
] }) : /* @__PURE__ */ s(f, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
999
|
-
/* @__PURE__ */ e(T, { bold: !0, children: t.description }),
|
|
1000
|
-
!o && /* @__PURE__ */ e(
|
|
1001
|
-
J,
|
|
1002
|
-
{
|
|
1003
|
-
"aria-label": r.payee_edit,
|
|
1004
|
-
id: "transaction-description-edit-button",
|
|
1005
|
-
onClick: y,
|
|
1006
|
-
sx: { color: "action.active" },
|
|
1007
|
-
children: /* @__PURE__ */ e(ee, { name: "create", size: 22 })
|
|
1008
|
-
}
|
|
1009
|
-
)
|
|
1010
|
-
] })
|
|
1011
|
-
] });
|
|
1012
|
-
}, Nt = N(At), It = ({ transaction: t }) => {
|
|
1013
|
-
const { updateTransaction: o } = O(), { transactions: i } = I(), { onEvent: a } = v(), r = Se(), n = async () => {
|
|
1014
|
-
a(k.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await o({ ...t, is_flagged: !t.is_flagged });
|
|
1015
|
-
};
|
|
1016
|
-
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1017
|
-
Be,
|
|
1018
|
-
{
|
|
1019
|
-
"aria-label": i.flag_btn_aria,
|
|
1020
|
-
"aria-pressed": t.is_flagged,
|
|
1021
|
-
color: "warning",
|
|
1022
|
-
onClick: n,
|
|
1023
|
-
selected: t.is_flagged,
|
|
1024
|
-
sx: {
|
|
1025
|
-
borderRadius: 6,
|
|
1026
|
-
color: r.palette.secondary.main,
|
|
1027
|
-
"&.Mui-selected": {
|
|
1028
|
-
color: r.palette.common.white,
|
|
1029
|
-
backgroundColor: r.palette.warning.dark,
|
|
1030
|
-
":hover": {
|
|
1031
|
-
color: r.palette.common.white,
|
|
1032
|
-
backgroundColor: r.palette.warning.main
|
|
1033
|
-
}
|
|
1034
|
-
},
|
|
1035
|
-
":hover": {
|
|
1036
|
-
color: r.palette.warning.contrastText,
|
|
1037
|
-
backgroundColor: r.palette.warning.light
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
value: "flagged",
|
|
1041
|
-
children: /* @__PURE__ */ e(Ve, { color: "inherit" })
|
|
1042
|
-
}
|
|
1043
|
-
) });
|
|
1044
|
-
}, vt = N(It), Q = (t, o, i, a = !0, r = "inset") => a ? /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1045
|
-
/* @__PURE__ */ s(L, { disableGutters: !0, disablePadding: !0, children: [
|
|
1046
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1047
|
-
/* @__PURE__ */ e(
|
|
1048
|
-
w,
|
|
1049
|
-
{
|
|
1050
|
-
primary: o,
|
|
1051
|
-
primaryTypographyProps: { variant: "XSmall" },
|
|
1052
|
-
secondary: i
|
|
1053
|
-
}
|
|
1054
|
-
)
|
|
1055
|
-
] }),
|
|
1056
|
-
/* @__PURE__ */ e(te, { variant: r })
|
|
1057
|
-
] }) : null, Et = ({ transaction: t }) => {
|
|
1058
|
-
const { transactions: o } = I(), { tags: i } = O(), a = _.useMemo(() => {
|
|
1059
|
-
const r = new Map(i.map((n) => [n.guid, n.name]));
|
|
1060
|
-
return t.tags.map((n) => r.get(n)).filter(Boolean).join(" / ");
|
|
1061
|
-
}, [i, t.tags]);
|
|
1062
|
-
return /* @__PURE__ */ s(ae, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1063
|
-
Q(
|
|
1064
|
-
/* @__PURE__ */ e(
|
|
1065
|
-
me,
|
|
1066
|
-
{
|
|
1067
|
-
categoryGuid: t.top_level_category_guid,
|
|
1068
|
-
size: 24,
|
|
1069
|
-
sx: { color: "text.primary" },
|
|
1070
|
-
variant: he.Transparent
|
|
1071
|
-
}
|
|
1072
|
-
),
|
|
1073
|
-
o.category_title,
|
|
1074
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? o.actions_select_a_category })
|
|
1075
|
-
),
|
|
1076
|
-
Q(
|
|
1077
|
-
/* @__PURE__ */ e(ee, { name: "calendar_month", sx: { color: "text.primary" }, weight: ce.Dark }),
|
|
1078
|
-
o.date_title,
|
|
1079
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: be(_e(t.date), xe.YEAR_MONTH_DAY) })
|
|
1080
|
-
),
|
|
1081
|
-
Q(
|
|
1082
|
-
/* @__PURE__ */ e(ee, { name: "article", sx: { color: "text.primary" }, weight: ce.Dark }),
|
|
1083
|
-
o.memo_title,
|
|
1084
|
-
/* @__PURE__ */ e(T, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "Body", children: t.memo ?? o.memo_desc }),
|
|
1085
|
-
!!t.memo,
|
|
1086
|
-
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1087
|
-
),
|
|
1088
|
-
Q(
|
|
1089
|
-
/* @__PURE__ */ e(ee, { name: "local_offer", sx: { color: "text.primary" }, weight: ce.Dark }),
|
|
1090
|
-
o.tags_title,
|
|
1091
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? a : o.tags_desc }),
|
|
1092
|
-
!!t.tags?.length,
|
|
1093
|
-
"fullWidth"
|
|
1094
|
-
)
|
|
1095
|
-
] });
|
|
1096
|
-
}, Ot = N(Et), Dt = ({ transaction: t }) => {
|
|
1097
|
-
const o = {
|
|
1098
|
-
add_merchant_budget_primary_text: "Merchant Budget",
|
|
1099
|
-
add_merchant_budget_secondary_text: "Add a Merchant Budget"
|
|
1100
|
-
}, a = F().palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1101
|
-
return /* @__PURE__ */ e(_.Fragment, { children: t && /* @__PURE__ */ e(L, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(G, { onClick: () => {
|
|
1102
|
-
}, children: [
|
|
1103
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(P, { sx: { bgcolor: a }, variant: "rounded", children: /* @__PURE__ */ e(A, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
|
|
1104
|
-
/* @__PURE__ */ e(
|
|
1105
|
-
w,
|
|
1106
|
-
{
|
|
1107
|
-
primary: o.add_merchant_budget_primary_text,
|
|
1108
|
-
primaryTypographyProps: { variant: "caption" },
|
|
1109
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: o.add_merchant_budget_secondary_text })
|
|
1110
|
-
}
|
|
1111
|
-
),
|
|
1112
|
-
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(A, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
1113
|
-
] }) }) });
|
|
1114
|
-
}, Lt = ({
|
|
1115
|
-
bottomActions: t = Je,
|
|
1116
|
-
canFlagTransaction: o = !0,
|
|
1117
|
-
topActions: i = qe,
|
|
1118
|
-
transaction: a
|
|
1119
|
-
}) => {
|
|
1120
|
-
const { onEvent: r } = v(), { isCopyLoaded: n } = Ke(), { userFeatures: l } = $e(), c = F(), u = a?.number && a.number.length > 4;
|
|
1121
|
-
if (_.useEffect(
|
|
1122
|
-
() => r(k.TRANSACTION_DETAILS_VIEW, { transaction_guid: a.guid }),
|
|
1123
|
-
[]
|
|
1124
|
-
), !n)
|
|
1125
|
-
return /* @__PURE__ */ e(je, {});
|
|
1126
|
-
const d = Me(l, "MX_TXN_DETAILS_VIEW_ONLY"), p = c.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1127
|
-
return /* @__PURE__ */ e(B, { className: "mx-txn-transaction-details", width: "100%", children: a && /* @__PURE__ */ s(f, { children: [
|
|
1128
|
-
/* @__PURE__ */ s(f, { gap: 12, p: 24, children: [
|
|
1129
|
-
/* @__PURE__ */ e(Z, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1130
|
-
ye,
|
|
1131
|
-
{
|
|
1132
|
-
categoryGuid: a.top_level_category_guid || "",
|
|
1133
|
-
merchantGuid: a.merchant_guid || "",
|
|
1134
|
-
size: 64
|
|
1135
|
-
}
|
|
1136
|
-
) }),
|
|
1137
|
-
/* @__PURE__ */ e(Nt, { transaction: a, viewOnly: d }),
|
|
1138
|
-
/* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1139
|
-
/* @__PURE__ */ s(X, { color: a.isIncome ? "success.main" : "text.primary", variant: "H1", children: [
|
|
1140
|
-
a.isIncome ? "+" : "",
|
|
1141
|
-
se(a.amount, "0,0.00")
|
|
1142
|
-
] }),
|
|
1143
|
-
!d && o && /* @__PURE__ */ e(vt, { transaction: a })
|
|
1144
|
-
] }),
|
|
1145
|
-
/* @__PURE__ */ s(f, { sx: { bgcolor: p, borderRadius: "4px", gap: 4, p: 8 }, children: [
|
|
1146
|
-
/* @__PURE__ */ e(T, { bold: !0, children: `${a.account}
|
|
1147
|
-
${u ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
|
|
1148
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Tiny", children: a.feed_description })
|
|
1149
|
-
] })
|
|
1150
|
-
] }),
|
|
1151
|
-
/* @__PURE__ */ e(Z, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(Ot, { transaction: a }) : /* @__PURE__ */ e(ae, { children: i.map((m, g) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1152
|
-
m === j.Category && /* @__PURE__ */ e(Qe, { transaction: a }),
|
|
1153
|
-
m === j.Date && /* @__PURE__ */ e(Ze, { transaction: a }),
|
|
1154
|
-
m === j.Memo && /* @__PURE__ */ e(st, { transaction: a }),
|
|
1155
|
-
m === j.Tags && /* @__PURE__ */ e(ft, { transaction: a }),
|
|
1156
|
-
/* @__PURE__ */ e(te, { variant: g < i.length - 1 ? "inset" : "fullWidth" })
|
|
1157
|
-
] }, m)) }) }),
|
|
1158
|
-
!d && t.length > 0 && /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1159
|
-
/* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1160
|
-
/* @__PURE__ */ e(Z, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ s(ae, { children: [
|
|
1161
|
-
t.map((m, g) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1162
|
-
m === q.MerchantBudget && /* @__PURE__ */ e(Dt, { transaction: a }),
|
|
1163
|
-
m === q.SplitTransaction && /* @__PURE__ */ e(ut, { transaction: a }),
|
|
1164
|
-
m === q.HideTransaction && /* @__PURE__ */ e(ot, { transaction: a }),
|
|
1165
|
-
m === q.MerchantLogo && /* @__PURE__ */ e(rt, { transaction: a }),
|
|
1166
|
-
/* @__PURE__ */ e(te, { variant: g < t.length - 1 ? "inset" : "fullWidth" })
|
|
1167
|
-
] }, m)),
|
|
1168
|
-
a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(tt, { transaction: a })
|
|
1169
|
-
] }) })
|
|
1170
|
-
] })
|
|
1171
|
-
] }) });
|
|
1172
|
-
}, ba = N(Lt);
|
|
1173
|
-
export {
|
|
1174
|
-
q as B,
|
|
1175
|
-
Qe as C,
|
|
1176
|
-
Ze as D,
|
|
1177
|
-
st as M,
|
|
1178
|
-
ba as T,
|
|
1179
|
-
ft as a,
|
|
1180
|
-
j as b
|
|
1181
|
-
};
|