@mx-cartographer/experiences 9.0.2 → 9.1.0-alpha.bb1
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/dist/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-PKlh8caU.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,605 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as xa, b as Aa } from "../TransactionDetails-DctXr07p.mjs";
|
|
3
|
-
import { u as B, T as Ge } from "../EmbeddedCard-DPwJjqMH.mjs";
|
|
4
|
-
import { a as Sa } from "../EmbeddedCard-DPwJjqMH.mjs";
|
|
5
|
-
import { E as va } from "../ExportCsvAction-Bw02ZJEj.mjs";
|
|
6
|
-
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
7
|
-
import u from "react";
|
|
8
|
-
import { observer as D } from "mobx-react-lite";
|
|
9
|
-
import Ve from "@mui/material/Paper";
|
|
10
|
-
import { DataGridPro as Fe } from "@mui/x-data-grid-pro";
|
|
11
|
-
import { h as H, u as v, g as ne, b as K, d as oe, l as Ue, a as Ke, C as ze } from "../hooks-BaO_gOI6.mjs";
|
|
12
|
-
import { L as z } from "../Loader-CxeBwuPG.mjs";
|
|
13
|
-
import { Text as y, Icon as R, MerchantLogo as qe, TextField as Z, P as Ye } from "@mxenabled/mxui";
|
|
14
|
-
import w from "@mui/material/Stack";
|
|
15
|
-
import { f as re } from "../NumberFormatting--XMeeBfr.mjs";
|
|
16
|
-
import { T as k, e as je, D as Xe } from "../TransactionUtils-BphBJBbU.mjs";
|
|
17
|
-
import S from "@mui/material/Box";
|
|
18
|
-
import { useTheme as ie } from "@mui/material/styles";
|
|
19
|
-
import { fromUnixTime as Je } from "date-fns/fromUnixTime";
|
|
20
|
-
import { f as Qe, D as Ze } from "../DateFormats-HudZ3Bjs.mjs";
|
|
21
|
-
import { A } from "../Analytics-CzGzz_sE.mjs";
|
|
22
|
-
import { endOfMonth as et } from "date-fns/endOfMonth";
|
|
23
|
-
import { getUnixTime as tt } from "date-fns/getUnixTime";
|
|
24
|
-
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
25
|
-
import { startOfToday as F } from "date-fns/startOfToday";
|
|
26
|
-
import { b as U } from "../Localization-DnoVyBNK.mjs";
|
|
27
|
-
import { C as nt } from "../ConnectDrawer-Cnjr3Ddg.mjs";
|
|
28
|
-
import ot from "@mui/material/Divider";
|
|
29
|
-
import rt from "@mui/material/MenuItem";
|
|
30
|
-
import it from "@mui/material/RadioGroup";
|
|
31
|
-
import { ExpandMore as st } from "@mxenabled/mx-icons";
|
|
32
|
-
import { C as ct } from "../CurrencyInput-adTIRtL3.mjs";
|
|
33
|
-
import { S as ee } from "../SelectionBox-B4xELRgp.mjs";
|
|
34
|
-
import { D as se } from "../Dialog-Bvd2n8hz.mjs";
|
|
35
|
-
import { b as lt, u as dt } from "../CategorySelectorDrawer-8soGrhB8.mjs";
|
|
36
|
-
import { u as ut } from "../useAriaLive-MkYebyUR.mjs";
|
|
37
|
-
import { S as mt } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
38
|
-
import { u as _t } from "../useScreenSize-mWpmnh5w.mjs";
|
|
39
|
-
import { u as pt } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
40
|
-
import { W as gt } from "../WidgetContainer-CmbU4CBH.mjs";
|
|
41
|
-
import { S as ht } from "../SearchBox-Cpgu_gdO.mjs";
|
|
42
|
-
import { D as te } from "../Drawer-BXqqBMxg.mjs";
|
|
43
|
-
const ft = (t) => /* @__PURE__ */ m(y, { tabIndex: t.tabIndex, variant: "body2", children: [
|
|
44
|
-
`${t.row.account}`,
|
|
45
|
-
t.row.number && ` | ${t.row.number}`
|
|
46
|
-
] }), Ct = (t) => {
|
|
47
|
-
const { associatedBeats: r } = H(), { showInsights: i } = B(), { amount: a, transaction_type: s } = t.row, c = r.find((p) => p.associated_transaction_guid === t.row.guid), l = s === k.CREDIT;
|
|
48
|
-
return /* @__PURE__ */ m(w, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
|
|
49
|
-
/* @__PURE__ */ m(y, { bold: l, color: l ? "success.main" : "text.primary", variant: "body2", children: [
|
|
50
|
-
l ? "+" : "",
|
|
51
|
-
re(a, "0,0.00")
|
|
52
|
-
] }),
|
|
53
|
-
c && i && /* @__PURE__ */ e(y, { bold: !0, color: "primary.light", variant: "caption", children: c.short_title })
|
|
54
|
-
] });
|
|
55
|
-
}, yt = (t) => {
|
|
56
|
-
const { transactions: r } = v(), [i, a] = u.useState(!1);
|
|
57
|
-
return /* @__PURE__ */ m(
|
|
58
|
-
w,
|
|
59
|
-
{
|
|
60
|
-
alignItems: "center",
|
|
61
|
-
direction: "row",
|
|
62
|
-
gap: 8,
|
|
63
|
-
height: "100%",
|
|
64
|
-
onMouseEnter: () => a(!0),
|
|
65
|
-
onMouseLeave: () => a(!1),
|
|
66
|
-
width: "100%",
|
|
67
|
-
children: [
|
|
68
|
-
t.row.has_been_split && /* @__PURE__ */ e(R, { name: "call_split", size: 16 }),
|
|
69
|
-
/* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "body2", children: t.row.has_been_split ? r.split_transaction_category_label : t.row.category }),
|
|
70
|
-
!t.row.has_been_split && i && /* @__PURE__ */ e(R, { name: "edit", sx: { color: "action.active" } })
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}, bt = D(yt), Tt = (t) => /* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "body2", children: Qe(Je(t.row.date), Ze.MONTH_DAY) }), xt = (t) => {
|
|
75
|
-
const r = ie(), i = r.palette.mode === "dark", { transactions: a } = v(), { is_flagged: s, is_hidden: c, has_been_viewed: l, parent_guid: p } = t.row, f = !l && !!!p;
|
|
76
|
-
return /* @__PURE__ */ m(
|
|
77
|
-
S,
|
|
78
|
-
{
|
|
79
|
-
"aria-label": c ? a.is_excluded : a.is_flagged,
|
|
80
|
-
tabIndex: t.tabIndex,
|
|
81
|
-
children: [
|
|
82
|
-
s && /* @__PURE__ */ e(
|
|
83
|
-
R,
|
|
84
|
-
{
|
|
85
|
-
fill: !0,
|
|
86
|
-
name: "flag",
|
|
87
|
-
size: 16,
|
|
88
|
-
sx: { color: i ? "primary.main" : "warning.dark" }
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
!s && c && /* @__PURE__ */ e(R, { name: "visibility_off", size: 16 }),
|
|
92
|
-
f && /* @__PURE__ */ e(
|
|
93
|
-
"svg",
|
|
94
|
-
{
|
|
95
|
-
"data-testid": "svg",
|
|
96
|
-
style: {
|
|
97
|
-
display: "inline-block",
|
|
98
|
-
height: 16,
|
|
99
|
-
fill: r.palette.primary.light,
|
|
100
|
-
verticalAlign: "middle",
|
|
101
|
-
width: 16
|
|
102
|
-
},
|
|
103
|
-
viewBox: "0 0 512 512",
|
|
104
|
-
children: /* @__PURE__ */ e("circle", { cx: "256", cy: "256", r: "60" })
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}, At = D(xt), E = (t) => /* @__PURE__ */ e(y, { fontWeight: 600, variant: "body2", children: t.colDef.headerName }), wt = (t) => /* @__PURE__ */ m(w, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
qe,
|
|
113
|
-
{
|
|
114
|
-
categoryGuid: t.row.top_level_category_guid || "",
|
|
115
|
-
merchantGuid: t.row.merchant_guid || ""
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ m(w, { alignItems: "flex-start", direction: "column", children: [
|
|
119
|
-
/* @__PURE__ */ e(y, { tabIndex: t.tabIndex, variant: "body2", children: t.row.payee }),
|
|
120
|
-
t.row.is_hidden && /* @__PURE__ */ e(y, { variant: "caption", children: t.excludedText })
|
|
121
|
-
] })
|
|
122
|
-
] }), St = ({
|
|
123
|
-
height: t = "100dvh",
|
|
124
|
-
onCategoryClick: r,
|
|
125
|
-
onRowClick: i
|
|
126
|
-
}) => {
|
|
127
|
-
const { onEvent: a } = ne(), { transactions: s } = v(), { isCopyLoaded: c } = K(), { isLoading: l, sortedTransactions: p } = H(), { clearExpandedSplits: b, toggleSplit: f } = B();
|
|
128
|
-
u.useEffect(() => () => b(), []);
|
|
129
|
-
const C = u.useMemo(
|
|
130
|
-
() => p.map((o) => ({
|
|
131
|
-
id: o.guid,
|
|
132
|
-
isHovering: !1,
|
|
133
|
-
...o
|
|
134
|
-
})),
|
|
135
|
-
[p]
|
|
136
|
-
), h = ({ row: { id: o, guid: _, has_been_split: n }, field: N }) => n ? f(o) : N === "category" ? (a(A.TRANSACTIONS_TABLE_CLICK_CATEGORY, { guid: _ }), r?.(_)) : i?.(_), I = (o, _) => {
|
|
137
|
-
_.key !== "Enter" && _.key !== " " || h(o);
|
|
138
|
-
};
|
|
139
|
-
if (!c)
|
|
140
|
-
return /* @__PURE__ */ e(z, {});
|
|
141
|
-
const g = [
|
|
142
|
-
{
|
|
143
|
-
field: "flag",
|
|
144
|
-
headerName: "",
|
|
145
|
-
minWidth: 32,
|
|
146
|
-
width: 32,
|
|
147
|
-
sortable: !1,
|
|
148
|
-
renderCell: (o) => /* @__PURE__ */ e(At, { ...o }),
|
|
149
|
-
renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": s.transaction_status, role: "presentation" })
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
field: "date",
|
|
153
|
-
headerName: s.date_title,
|
|
154
|
-
width: 103,
|
|
155
|
-
renderHeader: E,
|
|
156
|
-
renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(Tt, { ...o }),
|
|
157
|
-
sortingOrder: ["desc", "asc"]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
cellClassName: "vertical-align-center",
|
|
161
|
-
field: "payee",
|
|
162
|
-
headerName: s.payee_title,
|
|
163
|
-
flex: 0.33,
|
|
164
|
-
renderHeader: E,
|
|
165
|
-
renderCell: (o) => /* @__PURE__ */ e(wt, { ...o, excludedText: s.is_excluded }),
|
|
166
|
-
sortingOrder: ["asc", "desc"]
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
field: "category",
|
|
170
|
-
headerName: s.category_title,
|
|
171
|
-
flex: 0.25,
|
|
172
|
-
renderHeader: E,
|
|
173
|
-
renderCell: (o) => /* @__PURE__ */ e(bt, { ...o }),
|
|
174
|
-
sortingOrder: ["asc", "desc"]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
field: "account",
|
|
178
|
-
headerName: s.account_title,
|
|
179
|
-
flex: 0.33,
|
|
180
|
-
renderHeader: E,
|
|
181
|
-
renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(ft, { ...o }),
|
|
182
|
-
sortingOrder: ["asc", "desc"]
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
field: "amount",
|
|
186
|
-
headerName: s.amount_title,
|
|
187
|
-
flex: 0.25,
|
|
188
|
-
renderHeader: E,
|
|
189
|
-
renderCell: Ct,
|
|
190
|
-
align: "right",
|
|
191
|
-
headerAlign: "right",
|
|
192
|
-
sortingOrder: ["asc", "desc"]
|
|
193
|
-
}
|
|
194
|
-
];
|
|
195
|
-
return /* @__PURE__ */ e(Ve, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
|
|
196
|
-
Fe,
|
|
197
|
-
{
|
|
198
|
-
columns: g,
|
|
199
|
-
disableColumnFilter: !0,
|
|
200
|
-
disableColumnMenu: !0,
|
|
201
|
-
getCellClassName: (o) => o.row.parent_guid ? "split-row" : o.row.is_hidden ? "excluded-row" : "",
|
|
202
|
-
hideFooter: !0,
|
|
203
|
-
initialState: { sorting: { sortModel: [{ field: "date", sort: "desc" }] } },
|
|
204
|
-
loading: l,
|
|
205
|
-
onCellClick: h,
|
|
206
|
-
onCellKeyDown: I,
|
|
207
|
-
rows: C,
|
|
208
|
-
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
209
|
-
sx: {
|
|
210
|
-
"& .split-row": {
|
|
211
|
-
bgcolor: "background.default"
|
|
212
|
-
},
|
|
213
|
-
"& .excluded-row": {
|
|
214
|
-
bgcolor: "grey.50",
|
|
215
|
-
color: "text.secondary"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
) });
|
|
220
|
-
}, Dt = D(St), vt = () => {
|
|
221
|
-
const { visibleAccounts: t } = oe(), { common: r, transactions: i } = v(), { manualTransaction: a, setIsAmountValid: s, updateManualTransaction: c } = B(), [l, p] = u.useState(""), [b, f] = u.useState(""), C = u.useMemo(
|
|
222
|
-
() => t.filter((n) => n.is_manual),
|
|
223
|
-
[t]
|
|
224
|
-
).map((n) => ({
|
|
225
|
-
label: `${n.name} | ${re(n.balance, "0,0.00")}`,
|
|
226
|
-
value: n.guid
|
|
227
|
-
})), h = {
|
|
228
|
-
error_amount_is_invalid: r.currency_input.error_amount_is_invalid,
|
|
229
|
-
error_amount_must_be_equal_to: r.currency_input.error_amount_must_be_equal_to,
|
|
230
|
-
error_amount_must_be_less_than_or_equal_to: r.currency_input.error_amount_must_be_less_than_or_equal_to,
|
|
231
|
-
enter_amount: r.currency_input.enter_amount
|
|
232
|
-
}, I = (n) => {
|
|
233
|
-
p(n), c({ ...a, amount: Number(n) });
|
|
234
|
-
}, g = (n, N) => {
|
|
235
|
-
c({ ...a, transaction_type: Number(N) });
|
|
236
|
-
}, o = (n) => {
|
|
237
|
-
f(n), c({ ...a, payee: n, description: n });
|
|
238
|
-
}, _ = (n) => {
|
|
239
|
-
c({ ...a, account_guid: n });
|
|
240
|
-
};
|
|
241
|
-
return /* @__PURE__ */ m(S, { className: "mx-txn-manual-transaction-details", children: [
|
|
242
|
-
/* @__PURE__ */ m(w, { gap: 40, mx: 24, my: 32, children: [
|
|
243
|
-
/* @__PURE__ */ m(
|
|
244
|
-
w,
|
|
245
|
-
{
|
|
246
|
-
direction: "row",
|
|
247
|
-
sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
|
|
248
|
-
children: [
|
|
249
|
-
/* @__PURE__ */ e(
|
|
250
|
-
ct,
|
|
251
|
-
{
|
|
252
|
-
allowDecimals: !0,
|
|
253
|
-
amount: l,
|
|
254
|
-
ariaLabel: i.amount_title,
|
|
255
|
-
copy: h,
|
|
256
|
-
label: i.amount_title,
|
|
257
|
-
setAmount: I,
|
|
258
|
-
setHasValidInput: s,
|
|
259
|
-
sx: { bgcolor: "background.paper" },
|
|
260
|
-
type: "number"
|
|
261
|
-
}
|
|
262
|
-
),
|
|
263
|
-
/* @__PURE__ */ e(it, { name: "TransactionType", onChange: g, row: !0, children: /* @__PURE__ */ m(w, { alignItems: "center", direction: "row", children: [
|
|
264
|
-
/* @__PURE__ */ e(
|
|
265
|
-
ee,
|
|
266
|
-
{
|
|
267
|
-
checked: a.transaction_type === k.CREDIT,
|
|
268
|
-
label: i.manual_transaction_credit_button_label,
|
|
269
|
-
sx: { ml: { xs: 0, sm: 8 } },
|
|
270
|
-
tooltip: i.manual_transaction_credit_button_tooltip,
|
|
271
|
-
value: k.CREDIT
|
|
272
|
-
}
|
|
273
|
-
),
|
|
274
|
-
/* @__PURE__ */ e(
|
|
275
|
-
ee,
|
|
276
|
-
{
|
|
277
|
-
checked: a.transaction_type === k.DEBIT,
|
|
278
|
-
label: i.manual_transaction_debit_button_label,
|
|
279
|
-
tooltip: i.manual_transaction_debit_button_tooltip,
|
|
280
|
-
value: k.DEBIT
|
|
281
|
-
}
|
|
282
|
-
)
|
|
283
|
-
] }) })
|
|
284
|
-
]
|
|
285
|
-
}
|
|
286
|
-
),
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
-
Z,
|
|
289
|
-
{
|
|
290
|
-
label: i.payee_title,
|
|
291
|
-
name: "payee",
|
|
292
|
-
onChange: (n) => o(n.target.value),
|
|
293
|
-
sx: { bgcolor: "background.paper" },
|
|
294
|
-
value: b
|
|
295
|
-
}
|
|
296
|
-
),
|
|
297
|
-
/* @__PURE__ */ e(
|
|
298
|
-
Z,
|
|
299
|
-
{
|
|
300
|
-
label: i.manual_transaction_select_an_account,
|
|
301
|
-
onChange: (n) => _(n.target.value),
|
|
302
|
-
placeholder: i.manual_transaction_select,
|
|
303
|
-
select: !0,
|
|
304
|
-
slotProps: {
|
|
305
|
-
inputLabel: { shrink: !0 },
|
|
306
|
-
select: { defaultValue: -1, IconComponent: st }
|
|
307
|
-
},
|
|
308
|
-
sx: { bgcolor: "background.paper" },
|
|
309
|
-
children: C.map((n) => /* @__PURE__ */ e(rt, { value: n.value, children: n.label }, n.value))
|
|
310
|
-
}
|
|
311
|
-
)
|
|
312
|
-
] }),
|
|
313
|
-
/* @__PURE__ */ e(ot, { light: !0 }),
|
|
314
|
-
/* @__PURE__ */ m(S, { bgcolor: "background.paper", children: [
|
|
315
|
-
/* @__PURE__ */ e(Be, { transaction: a }),
|
|
316
|
-
/* @__PURE__ */ e(He, { transaction: a }),
|
|
317
|
-
/* @__PURE__ */ e(Pe, { transaction: a }),
|
|
318
|
-
/* @__PURE__ */ e(We, { transaction: a })
|
|
319
|
-
] })
|
|
320
|
-
] });
|
|
321
|
-
}, It = D(vt), Nt = ({ copy: t, isOpen: r, onClose: i, onPrimaryAction: a }) => {
|
|
322
|
-
const { common: s, transactions: c } = v(), { isCopyLoaded: l } = K();
|
|
323
|
-
return l ? /* @__PURE__ */ m(
|
|
324
|
-
se,
|
|
325
|
-
{
|
|
326
|
-
copy: {
|
|
327
|
-
title: t.title
|
|
328
|
-
},
|
|
329
|
-
isOpen: r,
|
|
330
|
-
onClose: i,
|
|
331
|
-
onPrimaryAction: a,
|
|
332
|
-
primaryText: c.add_manual_account,
|
|
333
|
-
secondaryText: s.cancel_button,
|
|
334
|
-
children: [
|
|
335
|
-
/* @__PURE__ */ e(y, { component: "p", sx: { marginBottom: "20px" }, truncate: !1, children: c.add_account_modal_message }),
|
|
336
|
-
/* @__PURE__ */ e(y, { component: "p", truncate: !1, children: c.add_account_modal_cta })
|
|
337
|
-
]
|
|
338
|
-
}
|
|
339
|
-
) : /* @__PURE__ */ e(z, {});
|
|
340
|
-
}, Et = D(Nt), kt = ({ onClose: t, transaction: r }) => {
|
|
341
|
-
const { addOrUpdateTransactionRule: i, updateTransaction: a } = H(), { transactions: s } = v(), { categories: c } = Ue(), [l, p] = u.useState(""), b = u.useMemo(
|
|
342
|
-
() => c.find((C) => C.guid === l),
|
|
343
|
-
[l]
|
|
344
|
-
), f = async (C) => {
|
|
345
|
-
await a({ ...r, category_guid: l }), C && await i(l, r), p(""), t();
|
|
346
|
-
};
|
|
347
|
-
return /* @__PURE__ */ m(S, { className: "mx-txn-edit-category-action", children: [
|
|
348
|
-
/* @__PURE__ */ e(
|
|
349
|
-
lt,
|
|
350
|
-
{
|
|
351
|
-
initialSelected: r.category_guid,
|
|
352
|
-
onClose: t,
|
|
353
|
-
onSelect: (C) => p(C),
|
|
354
|
-
showDrawer: !!r,
|
|
355
|
-
title: s.actions_select_a_category
|
|
356
|
-
}
|
|
357
|
-
),
|
|
358
|
-
/* @__PURE__ */ e(
|
|
359
|
-
se,
|
|
360
|
-
{
|
|
361
|
-
copy: {
|
|
362
|
-
title: U(
|
|
363
|
-
s.actions_apply_to_all_transaction_types,
|
|
364
|
-
r.description
|
|
365
|
-
)
|
|
366
|
-
},
|
|
367
|
-
isOpen: !!l,
|
|
368
|
-
onClose: () => f(!1),
|
|
369
|
-
onPrimaryAction: () => f(!0),
|
|
370
|
-
onSecondaryAction: () => f(!1),
|
|
371
|
-
primaryText: s.actions_apply_to_all,
|
|
372
|
-
secondaryText: s.actions_this_time_only,
|
|
373
|
-
children: /* @__PURE__ */ e(Ye, { variant: "subtitle1", children: U(
|
|
374
|
-
s.actions_all_past_and_future,
|
|
375
|
-
r.description,
|
|
376
|
-
b?.name
|
|
377
|
-
) })
|
|
378
|
-
}
|
|
379
|
-
)
|
|
380
|
-
] });
|
|
381
|
-
}, Ot = D(kt), ae = 120, Lt = ({
|
|
382
|
-
onBackClick: t,
|
|
383
|
-
onMenuClick: r,
|
|
384
|
-
height: i = "100dvh",
|
|
385
|
-
showInsights: a = !1,
|
|
386
|
-
sx: s = {}
|
|
387
|
-
}) => {
|
|
388
|
-
const { manualAccounts: c, refreshAccounts: l } = oe(), { is_mobile_webview: p, clientConfig: b, config: f } = Ke(), { setSearchValue: C } = dt(), { onEvent: h } = ne(), { common: I, transactions: g } = v(), { displayedDateRange: o, isInitialized: _, selectedAccountGuids: n, setDisplayedDate: N } = K(), { isDesktop: ce, isTablet: le } = _t(), O = ie(), {
|
|
389
|
-
addTransaction: de,
|
|
390
|
-
filter: ue,
|
|
391
|
-
isTransactionDataLoaded: P,
|
|
392
|
-
loadTransactionData: me,
|
|
393
|
-
setFilter: q,
|
|
394
|
-
sortedTransactions: Y,
|
|
395
|
-
sortedTransactionsWithSplits: _e,
|
|
396
|
-
tags: pe,
|
|
397
|
-
detailedTransactions: ge,
|
|
398
|
-
updateTransaction: he
|
|
399
|
-
} = H(), {
|
|
400
|
-
clearExpandedSplits: fe,
|
|
401
|
-
isAmountValid: Ce,
|
|
402
|
-
manualTransaction: L,
|
|
403
|
-
searchValue: j,
|
|
404
|
-
setSearchValue: ye,
|
|
405
|
-
setShowInsights: be,
|
|
406
|
-
updateManualTransaction: Te
|
|
407
|
-
} = B(), { userProfile: xe } = ze(), [W, T] = u.useState(""), [X, M] = u.useState(""), [Ae, $] = u.useState(!1), [we, J] = u.useState(!1), { announce: Se, ariaLive: De } = ut(), G = b?.transactions?.selected_account_guid;
|
|
408
|
-
pt({
|
|
409
|
-
widgetName: "TransactionWidget",
|
|
410
|
-
isLoaded: P
|
|
411
|
-
}), u.useEffect(() => {
|
|
412
|
-
P || me().finally();
|
|
413
|
-
const d = at(F()), Re = et(F());
|
|
414
|
-
N(d, Re), h(A.TRANSACTIONS_VIEW);
|
|
415
|
-
}, []), u.useEffect(() => {
|
|
416
|
-
_ && q({
|
|
417
|
-
accounts: G ? [G] : n,
|
|
418
|
-
dateRange: { start: o.start, end: o.end },
|
|
419
|
-
searchTerm: j
|
|
420
|
-
});
|
|
421
|
-
}, [_, o, n]), u.useEffect(() => {
|
|
422
|
-
be(a);
|
|
423
|
-
}, [a]), u.useEffect(() => {
|
|
424
|
-
_ && Se(
|
|
425
|
-
U(g.showing_transactions_count, Y.length)
|
|
426
|
-
);
|
|
427
|
-
}, [_, Y]);
|
|
428
|
-
const x = X ? ge.find((d) => d.guid === X) : void 0, Q = Ce && !!L.payee && !!L.account_guid && !!L.category_guid, ve = (d) => {
|
|
429
|
-
fe(), N(d[0], d[1]);
|
|
430
|
-
}, Ie = (d) => {
|
|
431
|
-
ye(d), q({
|
|
432
|
-
...ue,
|
|
433
|
-
searchTerm: d
|
|
434
|
-
}), h(A.TRANSACTIONS_CLICK_SEARCH, { search_term: d });
|
|
435
|
-
}, Ne = () => {
|
|
436
|
-
je(_e, pe), h(A.TRANSACTIONS_CLICK_EXPORT);
|
|
437
|
-
}, Ee = () => {
|
|
438
|
-
c.length > 0 ? (Te({
|
|
439
|
-
...Xe,
|
|
440
|
-
date: tt(F()),
|
|
441
|
-
user_guid: xe?.user_guid || ""
|
|
442
|
-
}), T(
|
|
443
|
-
"addTransaction"
|
|
444
|
-
/* AddTransaction */
|
|
445
|
-
), h(A.TRANSACTIONS_CLICK_ADD)) : ($(!0), h(A.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
|
|
446
|
-
}, ke = async () => {
|
|
447
|
-
Q && await de(L), T("");
|
|
448
|
-
}, Oe = () => {
|
|
449
|
-
$(!1), J(!0);
|
|
450
|
-
}, Le = async () => {
|
|
451
|
-
J(!1), await l();
|
|
452
|
-
}, Me = async () => {
|
|
453
|
-
x && !x.has_been_viewed && await he({ ...x, has_been_viewed: !0 }), T("");
|
|
454
|
-
};
|
|
455
|
-
if (!_)
|
|
456
|
-
return /* @__PURE__ */ e(z, {});
|
|
457
|
-
const V = [];
|
|
458
|
-
return !p && (ce || le) && V.push({
|
|
459
|
-
iconName: "open_in_new",
|
|
460
|
-
label: g.export_csv_btn,
|
|
461
|
-
onClick: Ne
|
|
462
|
-
}), f.show_connections_widget_in_master && V.push({
|
|
463
|
-
iconName: "add",
|
|
464
|
-
label: g.add_transaction_btn,
|
|
465
|
-
onClick: Ee
|
|
466
|
-
}), /* @__PURE__ */ m(
|
|
467
|
-
gt,
|
|
468
|
-
{
|
|
469
|
-
actions: V,
|
|
470
|
-
calendarActions: {
|
|
471
|
-
onRangeChanged: ve
|
|
472
|
-
},
|
|
473
|
-
hasDivider: !0,
|
|
474
|
-
onAccountsFilterClick: () => h(A.ACCOUNTS_CLICK_FILTER),
|
|
475
|
-
onBackClick: t,
|
|
476
|
-
onMenuClick: r,
|
|
477
|
-
showAccountFilter: !G,
|
|
478
|
-
sx: s,
|
|
479
|
-
title: g.transactions_title,
|
|
480
|
-
children: [
|
|
481
|
-
P ? /* @__PURE__ */ m(w, { children: [
|
|
482
|
-
De,
|
|
483
|
-
/* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(
|
|
484
|
-
ht,
|
|
485
|
-
{
|
|
486
|
-
onChange: Ie,
|
|
487
|
-
placeholder: g.action_bar_search_placeholder,
|
|
488
|
-
searchValue: j
|
|
489
|
-
}
|
|
490
|
-
) }),
|
|
491
|
-
/* @__PURE__ */ e(
|
|
492
|
-
S,
|
|
493
|
-
{
|
|
494
|
-
sx: {
|
|
495
|
-
[O.breakpoints.down("md")]: { display: "none" },
|
|
496
|
-
[O.breakpoints.up("md")]: { display: "block" }
|
|
497
|
-
},
|
|
498
|
-
children: /* @__PURE__ */ e(
|
|
499
|
-
Dt,
|
|
500
|
-
{
|
|
501
|
-
height: `calc(${i} - ${ae}px)`,
|
|
502
|
-
onCategoryClick: (d) => {
|
|
503
|
-
M(d), T(
|
|
504
|
-
"category"
|
|
505
|
-
/* Category */
|
|
506
|
-
);
|
|
507
|
-
},
|
|
508
|
-
onRowClick: (d) => {
|
|
509
|
-
M(d), T(
|
|
510
|
-
"transaction"
|
|
511
|
-
/* Transaction */
|
|
512
|
-
), h(A.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: d });
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
)
|
|
516
|
-
}
|
|
517
|
-
),
|
|
518
|
-
/* @__PURE__ */ e(
|
|
519
|
-
S,
|
|
520
|
-
{
|
|
521
|
-
sx: {
|
|
522
|
-
[O.breakpoints.down("md")]: { display: "block" },
|
|
523
|
-
[O.breakpoints.up("md")]: { display: "none" }
|
|
524
|
-
},
|
|
525
|
-
children: /* @__PURE__ */ e(
|
|
526
|
-
Ge,
|
|
527
|
-
{
|
|
528
|
-
height: `calc(${i} - ${ae}px)`,
|
|
529
|
-
onClick: (d) => {
|
|
530
|
-
M(d), T(
|
|
531
|
-
"transaction"
|
|
532
|
-
/* Transaction */
|
|
533
|
-
);
|
|
534
|
-
},
|
|
535
|
-
showInsights: a
|
|
536
|
-
}
|
|
537
|
-
)
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
] }) : /* @__PURE__ */ e(mt, { sx: { m: 48 }, variant: "list" }),
|
|
541
|
-
/* @__PURE__ */ e(
|
|
542
|
-
te,
|
|
543
|
-
{
|
|
544
|
-
ariaLabelClose: I.close_aria,
|
|
545
|
-
isOpen: W === "transaction" && !!x,
|
|
546
|
-
onClose: Me,
|
|
547
|
-
title: g.details_title,
|
|
548
|
-
children: x && /* @__PURE__ */ e($e, { transaction: x })
|
|
549
|
-
}
|
|
550
|
-
),
|
|
551
|
-
x && W === "category" && /* @__PURE__ */ e(
|
|
552
|
-
Ot,
|
|
553
|
-
{
|
|
554
|
-
onClose: () => {
|
|
555
|
-
C(""), T(""), M("");
|
|
556
|
-
},
|
|
557
|
-
transaction: x
|
|
558
|
-
}
|
|
559
|
-
),
|
|
560
|
-
/* @__PURE__ */ e(
|
|
561
|
-
te,
|
|
562
|
-
{
|
|
563
|
-
ariaLabelClose: I.close_aria,
|
|
564
|
-
isOpen: W === "addTransaction",
|
|
565
|
-
isPrimaryDisabled: !Q,
|
|
566
|
-
onClose: () => T(""),
|
|
567
|
-
onPrimaryAction: ke,
|
|
568
|
-
title: g.add_transaction_title,
|
|
569
|
-
children: /* @__PURE__ */ e(It, {})
|
|
570
|
-
}
|
|
571
|
-
),
|
|
572
|
-
/* @__PURE__ */ e(
|
|
573
|
-
Et,
|
|
574
|
-
{
|
|
575
|
-
copy: { title: g.add_manual_account },
|
|
576
|
-
isOpen: Ae,
|
|
577
|
-
onClose: () => {
|
|
578
|
-
$(!1);
|
|
579
|
-
},
|
|
580
|
-
onPrimaryAction: Oe
|
|
581
|
-
}
|
|
582
|
-
),
|
|
583
|
-
/* @__PURE__ */ e(
|
|
584
|
-
nt,
|
|
585
|
-
{
|
|
586
|
-
onClose: Le,
|
|
587
|
-
showConnectWidget: we,
|
|
588
|
-
title: g.add_manual_account
|
|
589
|
-
}
|
|
590
|
-
)
|
|
591
|
-
]
|
|
592
|
-
}
|
|
593
|
-
);
|
|
594
|
-
}, ya = D(Lt);
|
|
1
|
+
import { $t as s, Qt as t, an as n, c as o, in as i, on as r, rn as c, s as e, sn as T } from "../accounts-DkyAiLpg.mjs";
|
|
595
2
|
export {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
3
|
+
r as BottomActions,
|
|
4
|
+
i as ExportCsvAction,
|
|
5
|
+
T as TopActions,
|
|
6
|
+
o as TransactionDetails,
|
|
7
|
+
s as TransactionList,
|
|
8
|
+
c as TransactionRow,
|
|
9
|
+
t as TransactionTable,
|
|
10
|
+
e as TransactionWidget,
|
|
11
|
+
n as useTransactionsUiStore
|
|
605
12
|
};
|