@mx-cartographer/experiences 8.2.0-alpha.bb0 → 8.2.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 +8 -0
- package/dist/{Account-BTOmbrEK.mjs → Account-BaJmiJAG.mjs} +2 -2
- package/dist/{Account-DC2d-cjn.mjs → Account-BxHMlV9R.mjs} +1 -1
- package/dist/{AccountDetailsHeader-IDZ6GTT0.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +17 -17
- package/dist/{AccountFields-BRAl-Hro.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
- package/dist/{AccountListItem-B8koowMf.mjs → AccountListItem-BYyeeCf6.mjs} +5 -5
- package/dist/{AccountUtils-Bc-SndzX.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
- package/dist/{Analytics-vgPYa2Zt.mjs → Analytics-CkYXKvco.mjs} +1 -1
- package/dist/{BudgetUtil-CGchXaek.mjs → BudgetUtil-Bg2AQJpQ.mjs} +3 -3
- package/dist/{CategorySelectorDrawer-nHEBR24E.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +1 -1
- package/dist/{CurrencyDialog-C7r7JqVu.mjs → CurrencyDialog-d4dL7vA5.mjs} +1 -1
- package/dist/{CurrencyInput-BUd8mAcE.mjs → CurrencyInput-B59ugxPN.mjs} +2 -2
- package/dist/{CurrencyText-Dd3NxFYY.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
- package/dist/{DateFormats-BSktnUw6.mjs → DateFormats-HudZ3Bjs.mjs} +1 -1
- package/dist/{DateUtil-Bdm-ZxFw.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
- package/dist/{DebtUtils-DPn1cXKG.mjs → DebtUtils-DD3186U-.mjs} +1 -1
- package/dist/{EmbeddedCard-CAY_HJjE.mjs → EmbeddedCard-BNl3quCs.mjs} +4 -4
- package/dist/{ExportCsvAction-DzeJOb_g.mjs → ExportCsvAction-hDprC41l.mjs} +2 -2
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
- package/dist/{GoalsUtil-B-Z6fq_t.mjs → GoalsUtil-C9EnLWvC.mjs} +3 -3
- package/dist/{Help-HoxJgoVt.mjs → Help-BSQm9o29.mjs} +1 -1
- package/dist/{LineChart-DNynWPGz.mjs → LineChart-CejWS_rh.mjs} +1 -1
- package/dist/Localization-DnoVyBNK.mjs +38 -0
- package/dist/{ManageIncome-C_FjST7B.mjs → ManageIncome-DwylSiWs.mjs} +41 -41
- package/dist/{NetWorthUtils-CyVz9bUn.mjs → NetWorthUtils-DilGN1nW.mjs} +2 -2
- package/dist/{NotificationSettings-B8pH9TOv.mjs → NotificationSettings-CCg-Tml2.mjs} +6 -6
- package/dist/{NumberFormatting-Dnk0YyfZ.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
- package/dist/{OriginalBalanceAction-BEBuqeS1.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +2 -2
- package/dist/{RecurringSettings-eQb1AS5x.mjs → RecurringSettings-CPXLW6AR.mjs} +2 -2
- package/dist/{RecurringTransactionsUtil-DbMNqEu_.mjs → RecurringTransactionsUtil-B3rLEx_g.mjs} +6 -6
- package/dist/{SpendingData-CktOElG1.mjs → SpendingData-PKlh8caU.mjs} +1 -1
- package/dist/{SpendingLegend-CM5L_1Ka.mjs → SpendingLegend-BmkEr9Nh.mjs} +56 -56
- package/dist/{TransactionDetails-BP-sFltN.mjs → TransactionDetails-CbBSxdOi.mjs} +9 -9
- package/dist/{TransactionUtils-CvJW9wDu.mjs → TransactionUtils-BphBJBbU.mjs} +8 -8
- package/dist/UserStore-CRpKQjpP.mjs +3002 -0
- package/dist/{ViewMoreMicroCard-DWOpU5L8.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +3 -3
- package/dist/{WidgetContainer-CAgbD0ZS.mjs → WidgetContainer-DalWyz5A.mjs} +1 -1
- package/dist/accounts/index.es.js +25 -25
- package/dist/budgets/index.es.js +11 -11
- package/dist/cashflow/index.es.js +12 -12
- package/dist/categories/index.es.js +1 -1
- package/dist/common/context/hooks.d.ts +1 -1
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.es.js +148 -136
- package/dist/core/index.es.js +104 -3061
- package/dist/core/utils/Localization.d.ts +1 -0
- package/dist/debts/index.es.js +9 -9
- package/dist/finstrong/index.es.js +13 -13
- package/dist/goals/index.es.js +8 -8
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +5 -5
- package/dist/investments/index.es.js +3 -3
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +37 -37
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +139 -139
- package/dist/transactions/index.es.js +12 -12
- package/dist/trends/index.es.js +12 -12
- package/package.json +1 -1
- package/dist/AnalyticsApi-DwgSyZ6m.mjs +0 -102
- package/dist/GlobalCopyApi-C75qVBk6.mjs +0 -30
- package/dist/Localization-Li21_krp.mjs +0 -37
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import c from "react";
|
|
3
3
|
import { observer as I } from "mobx-react-lite";
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
4
|
+
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as it } from "date-fns/endOfMonth";
|
|
6
6
|
import L from "@mui/material/Box";
|
|
7
7
|
import y from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import $ from "@mui/material/Tab";
|
|
9
|
+
import rt from "@mui/material/Tabs";
|
|
10
10
|
import _t from "@mui/material/styles/useTheme";
|
|
11
|
-
import { g as
|
|
11
|
+
import { g as st, a as lt, S as B, b as q } from "../SpendingLegend-BmkEr9Nh.mjs";
|
|
12
12
|
import { Text as T, Icon as bt } from "@mxenabled/mxui";
|
|
13
|
-
import { f as
|
|
14
|
-
import { u as A, l as
|
|
15
|
-
import { u as
|
|
16
|
-
import { L as
|
|
13
|
+
import { f as k } from "../NumberFormatting--XMeeBfr.mjs";
|
|
14
|
+
import { u as A, l as R, d as ct, b as P, a as H, h as dt, g as yt } from "../hooks-BaO_gOI6.mjs";
|
|
15
|
+
import { u as gt } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
16
|
+
import { L as pt } from "../Loader-CxeBwuPG.mjs";
|
|
17
17
|
import { M as Ct } from "../MiniWidgetContainer-BdPiUU-u.mjs";
|
|
18
|
-
import { startOfToday as
|
|
18
|
+
import { startOfToday as J } from "date-fns/startOfToday";
|
|
19
19
|
import St from "@mui/material/Button";
|
|
20
20
|
import { useTheme as Tt } from "@mui/material";
|
|
21
|
-
import { e as Mt } from "../TransactionUtils-
|
|
22
|
-
import { T as Dt } from "../EmbeddedCard-
|
|
23
|
-
import { T as xt } from "../TransactionDetails-
|
|
21
|
+
import { e as Mt } from "../TransactionUtils-BphBJBbU.mjs";
|
|
22
|
+
import { T as Dt } from "../EmbeddedCard-BNl3quCs.mjs";
|
|
23
|
+
import { T as xt } from "../TransactionDetails-CbBSxdOi.mjs";
|
|
24
24
|
import vt from "@mui/material/Collapse";
|
|
25
25
|
import wt from "@mui/material/Divider";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
26
|
+
import Q from "@mui/material/List";
|
|
27
|
+
import X from "@mui/material/ListItem";
|
|
28
|
+
import Z from "@mui/material/ListItemButton";
|
|
29
29
|
import { u as Lt } from "../useScreenSize-CeFhWTt_.mjs";
|
|
30
|
-
import { D as
|
|
30
|
+
import { D as tt } from "../Drawer-XPaLYjiO.mjs";
|
|
31
31
|
import { C as w } from "../Category-DEKZGLYe.mjs";
|
|
32
|
-
import { parseISO as
|
|
33
|
-
import { A as
|
|
34
|
-
import { W as It } from "../WidgetContainer-
|
|
35
|
-
const
|
|
32
|
+
import { parseISO as et } from "date-fns/parseISO";
|
|
33
|
+
import { A as nt } from "../Analytics-CzGzz_sE.mjs";
|
|
34
|
+
import { W as It } from "../WidgetContainer-DalWyz5A.mjs";
|
|
35
|
+
const G = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
|
|
36
36
|
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
|
|
37
|
-
/* @__PURE__ */ t(T, { variant: "caption", children:
|
|
37
|
+
/* @__PURE__ */ t(T, { variant: "caption", children: k(n, o === "mini" ? "0,0" : "0,0.00") })
|
|
38
38
|
] }), At = () => {
|
|
39
|
-
const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } =
|
|
39
|
+
const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } = R(), g = c.useMemo(
|
|
40
40
|
() => [
|
|
41
41
|
n.palette.chartMono.chartMono5,
|
|
42
42
|
n.palette.chartMono.chartMono4,
|
|
@@ -46,57 +46,57 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
46
46
|
n.palette.chartMono.chartMono6
|
|
47
47
|
],
|
|
48
48
|
[n]
|
|
49
|
-
), [e, r] =
|
|
50
|
-
() =>
|
|
49
|
+
), [e, r] = c.useState(""), [s, b] = c.useState(0), u = c.useMemo(
|
|
50
|
+
() => st(a, d, n, i),
|
|
51
51
|
[a, i]
|
|
52
|
-
), h =
|
|
53
|
-
() =>
|
|
52
|
+
), h = c.useMemo(
|
|
53
|
+
() => lt(a, i, g),
|
|
54
54
|
[a, i, g]
|
|
55
|
-
), M = (
|
|
56
|
-
b(
|
|
57
|
-
},
|
|
58
|
-
r(e ===
|
|
55
|
+
), M = (_, D) => {
|
|
56
|
+
b(D), r("");
|
|
57
|
+
}, f = (_) => {
|
|
58
|
+
r(e === _ ? "" : _);
|
|
59
59
|
};
|
|
60
60
|
return /* @__PURE__ */ p(L, { width: "100%", children: [
|
|
61
61
|
/* @__PURE__ */ p(
|
|
62
|
-
|
|
62
|
+
rt,
|
|
63
63
|
{
|
|
64
64
|
"aria-label": o.mini_title,
|
|
65
65
|
onChange: M,
|
|
66
66
|
sx: { touchAction: "manipulation" },
|
|
67
|
-
value:
|
|
67
|
+
value: s,
|
|
68
68
|
variant: "fullWidth",
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ t(
|
|
71
|
-
|
|
71
|
+
$,
|
|
72
72
|
{
|
|
73
73
|
"aria-controls": "spending-tabpanel",
|
|
74
74
|
id: "spending-tab",
|
|
75
75
|
label: /* @__PURE__ */ t(
|
|
76
|
-
|
|
76
|
+
G,
|
|
77
77
|
{
|
|
78
78
|
amount: u.totalAmount,
|
|
79
79
|
label: o.spend_tab_title,
|
|
80
80
|
variant: "mini"
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
tabIndex:
|
|
83
|
+
tabIndex: s === 0 ? 0 : -1
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
86
|
/* @__PURE__ */ t(
|
|
87
|
-
|
|
87
|
+
$,
|
|
88
88
|
{
|
|
89
89
|
"aria-controls": "income-tabpanel",
|
|
90
90
|
id: "income-tab",
|
|
91
91
|
label: /* @__PURE__ */ t(
|
|
92
|
-
|
|
92
|
+
G,
|
|
93
93
|
{
|
|
94
94
|
amount: h.totalAmount,
|
|
95
95
|
label: o.income_tab_title,
|
|
96
96
|
variant: "mini"
|
|
97
97
|
}
|
|
98
98
|
),
|
|
99
|
-
tabIndex:
|
|
99
|
+
tabIndex: s === 1 ? 0 : -1
|
|
100
100
|
}
|
|
101
101
|
)
|
|
102
102
|
]
|
|
@@ -106,20 +106,20 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
106
106
|
L,
|
|
107
107
|
{
|
|
108
108
|
"aria-labelledby": "spending-tab",
|
|
109
|
-
hidden:
|
|
109
|
+
hidden: s !== 0,
|
|
110
110
|
id: "spending-tabpanel",
|
|
111
111
|
role: "tabpanel",
|
|
112
112
|
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
113
113
|
/* @__PURE__ */ t(
|
|
114
|
-
|
|
114
|
+
B,
|
|
115
115
|
{
|
|
116
116
|
data: u,
|
|
117
|
-
onSelected:
|
|
117
|
+
onSelected: f,
|
|
118
118
|
selectedId: e,
|
|
119
119
|
totalLabel: o.total_spending
|
|
120
120
|
}
|
|
121
121
|
),
|
|
122
|
-
/* @__PURE__ */ t(
|
|
122
|
+
/* @__PURE__ */ t(q, { data: u, onSelected: f, selectedId: e })
|
|
123
123
|
] })
|
|
124
124
|
}
|
|
125
125
|
),
|
|
@@ -127,50 +127,50 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
127
127
|
L,
|
|
128
128
|
{
|
|
129
129
|
"aria-labelledby": "income-tab",
|
|
130
|
-
hidden:
|
|
130
|
+
hidden: s !== 1,
|
|
131
131
|
id: "income-tabpanel",
|
|
132
132
|
role: "tabpanel",
|
|
133
133
|
children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
134
134
|
/* @__PURE__ */ t(
|
|
135
|
-
|
|
135
|
+
B,
|
|
136
136
|
{
|
|
137
137
|
data: h,
|
|
138
138
|
isIncome: !0,
|
|
139
|
-
onSelected:
|
|
139
|
+
onSelected: f,
|
|
140
140
|
selectedId: e,
|
|
141
141
|
totalLabel: o.total_income
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
/* @__PURE__ */ t(
|
|
144
|
+
/* @__PURE__ */ t(q, { data: h, onSelected: f, selectedId: e })
|
|
145
145
|
] })
|
|
146
146
|
}
|
|
147
147
|
)
|
|
148
148
|
] });
|
|
149
149
|
}, Et = I(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
150
|
-
const { isAccountDataLoaded: o, loadAccountData: a } =
|
|
151
|
-
return
|
|
150
|
+
const { isAccountDataLoaded: o, loadAccountData: a } = ct(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = R(), { spending: s } = A(), { isInitialized: b, selectedAccounts: u } = P();
|
|
151
|
+
return gt({
|
|
152
152
|
widgetName: "SpendingMiniWidget",
|
|
153
153
|
isLoaded: i
|
|
154
|
-
}),
|
|
154
|
+
}), c.useEffect(() => {
|
|
155
155
|
o || a().finally(), g || e().finally();
|
|
156
|
-
}, []),
|
|
156
|
+
}, []), c.useEffect(() => {
|
|
157
157
|
r(
|
|
158
158
|
u,
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
at(/* @__PURE__ */ new Date()),
|
|
160
|
+
it(/* @__PURE__ */ new Date())
|
|
161
161
|
).finally();
|
|
162
162
|
}, [u]), b ? /* @__PURE__ */ t(
|
|
163
163
|
Ct,
|
|
164
164
|
{
|
|
165
165
|
className: "mx-exp-spending-miniwidget",
|
|
166
166
|
onPrimaryCtaClick: n,
|
|
167
|
-
primaryCtaLabel:
|
|
168
|
-
primaryCtaLabelAria:
|
|
167
|
+
primaryCtaLabel: s.primary_cta,
|
|
168
|
+
primaryCtaLabelAria: s.primary_cta_aria,
|
|
169
169
|
sx: { height: "100%", ...d },
|
|
170
|
-
title:
|
|
170
|
+
title: s.mini_title,
|
|
171
171
|
children: /* @__PURE__ */ t(Et, {})
|
|
172
172
|
}
|
|
173
|
-
) : /* @__PURE__ */ t(
|
|
173
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
174
174
|
}, Ce = I(Wt), Rt = ({
|
|
175
175
|
data: n,
|
|
176
176
|
onSelected: d,
|
|
@@ -181,9 +181,9 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
181
181
|
return /* @__PURE__ */ p(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
182
182
|
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${a} ${i.by_category}` }),
|
|
183
183
|
/* @__PURE__ */ t(wt, { "aria-hidden": "true" }),
|
|
184
|
-
/* @__PURE__ */ t(
|
|
184
|
+
/* @__PURE__ */ t(Q, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ p(c.Fragment, { children: [
|
|
185
185
|
/* @__PURE__ */ t(
|
|
186
|
-
|
|
186
|
+
X,
|
|
187
187
|
{
|
|
188
188
|
disableGutters: !0,
|
|
189
189
|
disablePadding: !0,
|
|
@@ -193,7 +193,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
193
193
|
minHeight: 44
|
|
194
194
|
},
|
|
195
195
|
children: /* @__PURE__ */ p(
|
|
196
|
-
|
|
196
|
+
Z,
|
|
197
197
|
{
|
|
198
198
|
"aria-expanded": g?.guid === e.guid,
|
|
199
199
|
id: `spending-list-category-${e.guid}`,
|
|
@@ -221,7 +221,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
221
221
|
width: "100%",
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ t(T, { bold: o === e.guid, children: e.name }),
|
|
224
|
-
/* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children:
|
|
224
|
+
/* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: k(e.amount, "0,0.00") })
|
|
225
225
|
]
|
|
226
226
|
}
|
|
227
227
|
)
|
|
@@ -230,15 +230,15 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
230
230
|
)
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(vt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ t(
|
|
234
|
-
|
|
233
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(vt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ t(Q, { sx: { borderBottom: 1, borderColor: "divider" }, children: g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
|
|
234
|
+
X,
|
|
235
235
|
{
|
|
236
236
|
sx: {
|
|
237
237
|
pl: 12,
|
|
238
238
|
py: 0
|
|
239
239
|
},
|
|
240
240
|
children: /* @__PURE__ */ t(
|
|
241
|
-
|
|
241
|
+
Z,
|
|
242
242
|
{
|
|
243
243
|
id: `spending-list-subcategory-${r.guid}`,
|
|
244
244
|
onClick: () => d(r.guid, !0),
|
|
@@ -248,7 +248,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
248
248
|
r.name,
|
|
249
249
|
" "
|
|
250
250
|
] }),
|
|
251
|
-
/* @__PURE__ */ t(T, { children:
|
|
251
|
+
/* @__PURE__ */ t(T, { children: k(r.amount, "0,0.00") })
|
|
252
252
|
] })
|
|
253
253
|
}
|
|
254
254
|
)
|
|
@@ -256,7 +256,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
256
256
|
r.guid
|
|
257
257
|
)) }) })
|
|
258
258
|
] }, e.guid)) }),
|
|
259
|
-
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${
|
|
259
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${k(n.totalAmount, "0,0.00")}` })
|
|
260
260
|
] });
|
|
261
261
|
}, Nt = I(Rt), Ot = ({
|
|
262
262
|
data: n,
|
|
@@ -265,7 +265,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
265
265
|
selectedId: a,
|
|
266
266
|
title: i
|
|
267
267
|
}) => {
|
|
268
|
-
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } =
|
|
268
|
+
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = R(), { spending: s } = A();
|
|
269
269
|
return /* @__PURE__ */ p(
|
|
270
270
|
y,
|
|
271
271
|
{
|
|
@@ -277,7 +277,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
277
277
|
px: 8,
|
|
278
278
|
children: [
|
|
279
279
|
r && /* @__PURE__ */ t(
|
|
280
|
-
|
|
280
|
+
B,
|
|
281
281
|
{
|
|
282
282
|
data: {
|
|
283
283
|
categoryData: [],
|
|
@@ -293,7 +293,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
295
|
!r && /* @__PURE__ */ t(
|
|
296
|
-
|
|
296
|
+
B,
|
|
297
297
|
{
|
|
298
298
|
data: n,
|
|
299
299
|
onSelected: (h) => {
|
|
@@ -302,7 +302,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
302
302
|
onViewTransactions: o,
|
|
303
303
|
selectedId: a,
|
|
304
304
|
size: g ? 400 : 300,
|
|
305
|
-
totalLabel:
|
|
305
|
+
totalLabel: s.total_amount,
|
|
306
306
|
variant: "full"
|
|
307
307
|
}
|
|
308
308
|
),
|
|
@@ -310,7 +310,7 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
|
-
},
|
|
313
|
+
}, ot = I(Ot), kt = (n) => [
|
|
314
314
|
n.palette.chartMono.chartMono5,
|
|
315
315
|
n.palette.chartMono.chartMono4,
|
|
316
316
|
n.palette.chartMono.chartMono3,
|
|
@@ -318,85 +318,85 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
318
318
|
n.palette.chartMono.chartMono1,
|
|
319
319
|
n.palette.chartMono.chartMono6
|
|
320
320
|
], $t = () => {
|
|
321
|
-
const n = Tt(), { is_mobile_webview: d } =
|
|
321
|
+
const n = Tt(), { is_mobile_webview: d } = H(), { clientConfig: o } = H(), { categories: a, dateRangeCategoryTotals: i } = R(), {
|
|
322
322
|
goals: g,
|
|
323
323
|
spending: e,
|
|
324
324
|
transactions: r
|
|
325
|
-
} = A(), { displayedDateRange:
|
|
325
|
+
} = A(), { displayedDateRange: s, selectedAccountGuids: b } = P(), {
|
|
326
326
|
setFilter: u,
|
|
327
327
|
sortedTransactions: h,
|
|
328
328
|
sortedTransactionsWithSplits: M,
|
|
329
|
-
tags:
|
|
330
|
-
} =
|
|
331
|
-
() =>
|
|
329
|
+
tags: f
|
|
330
|
+
} = dt(), _ = o?.master?.deep_link_params?.account_guids, D = o?.master?.deep_link_params?.view, [x, N] = c.useState(""), [v, C] = c.useState(D === "income" ? 1 : 0), [E, W] = c.useState(""), [O, j] = c.useState(!1), F = c.useMemo(
|
|
331
|
+
() => st(a, g, n, i),
|
|
332
332
|
[a, i]
|
|
333
|
-
),
|
|
334
|
-
() =>
|
|
333
|
+
), K = c.useMemo(
|
|
334
|
+
() => lt(a, i, kt(n)),
|
|
335
335
|
[a, i]
|
|
336
|
-
),
|
|
337
|
-
() => h.find((
|
|
336
|
+
), V = c.useMemo(
|
|
337
|
+
() => h.find((l) => l.guid === E),
|
|
338
338
|
[E, h]
|
|
339
|
-
), ut = (
|
|
340
|
-
C(S),
|
|
341
|
-
},
|
|
342
|
-
S ? mt(
|
|
343
|
-
}, mt = (
|
|
339
|
+
), ut = (l, S) => {
|
|
340
|
+
C(S), N("");
|
|
341
|
+
}, U = (l, S = !1) => {
|
|
342
|
+
S ? mt(l) : N(x === l || l === "0" ? "" : l);
|
|
343
|
+
}, mt = (l) => {
|
|
344
344
|
u({
|
|
345
345
|
...{
|
|
346
|
-
accounts:
|
|
347
|
-
dateRange:
|
|
346
|
+
accounts: _ || b,
|
|
347
|
+
dateRange: s
|
|
348
348
|
},
|
|
349
|
-
custom: (m) =>
|
|
349
|
+
custom: (m) => x === "other" ? m.top_level_category_guid === l : m.category_guid === l,
|
|
350
350
|
showSplits: !0
|
|
351
|
-
}),
|
|
352
|
-
},
|
|
351
|
+
}), j(!0);
|
|
352
|
+
}, Y = (l) => {
|
|
353
353
|
const S = {
|
|
354
|
-
accounts:
|
|
355
|
-
dateRange:
|
|
354
|
+
accounts: _ || b,
|
|
355
|
+
dateRange: s
|
|
356
356
|
};
|
|
357
357
|
if (v === 0)
|
|
358
|
-
if (
|
|
359
|
-
const m =
|
|
358
|
+
if (l === "other") {
|
|
359
|
+
const m = F.categoryData.find((z) => z.guid === "other");
|
|
360
360
|
u({
|
|
361
361
|
...S,
|
|
362
|
-
custom: (
|
|
362
|
+
custom: (z) => !!m?.categoryTotals?.find((ft) => ft.guid === z.top_level_category_guid)
|
|
363
363
|
});
|
|
364
364
|
} else
|
|
365
365
|
u({
|
|
366
366
|
...S,
|
|
367
|
-
custom: (m) =>
|
|
368
|
-
showSplits: !!
|
|
367
|
+
custom: (m) => l ? m.top_level_category_guid === l : m.top_level_category_guid !== w.INCOME && m.category_guid !== w.INCOME && m.top_level_category_guid !== w.INVESTMENTS && m.top_level_category_guid !== w.TRANSFER,
|
|
368
|
+
showSplits: !!l
|
|
369
369
|
});
|
|
370
370
|
else
|
|
371
371
|
u({
|
|
372
372
|
...S,
|
|
373
|
-
custom: (m) =>
|
|
373
|
+
custom: (m) => l ? m.category_guid === l : m.category_guid === w.INCOME || m.top_level_category_guid === w.INCOME
|
|
374
374
|
});
|
|
375
|
-
|
|
375
|
+
j(!0);
|
|
376
376
|
}, ht = () => {
|
|
377
|
-
Mt(M,
|
|
377
|
+
Mt(M, f);
|
|
378
378
|
};
|
|
379
379
|
return /* @__PURE__ */ p(L, { children: [
|
|
380
|
-
/* @__PURE__ */ p(
|
|
380
|
+
/* @__PURE__ */ p(rt, { onChange: ut, value: v, variant: "fullWidth", children: [
|
|
381
381
|
/* @__PURE__ */ t(
|
|
382
|
-
|
|
382
|
+
$,
|
|
383
383
|
{
|
|
384
384
|
label: /* @__PURE__ */ t(
|
|
385
|
-
|
|
385
|
+
G,
|
|
386
386
|
{
|
|
387
|
-
amount:
|
|
387
|
+
amount: F.totalAmount,
|
|
388
388
|
label: e.spend_tab_title
|
|
389
389
|
}
|
|
390
390
|
)
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
393
|
/* @__PURE__ */ t(
|
|
394
|
-
|
|
394
|
+
$,
|
|
395
395
|
{
|
|
396
396
|
label: /* @__PURE__ */ t(
|
|
397
|
-
|
|
397
|
+
G,
|
|
398
398
|
{
|
|
399
|
-
amount:
|
|
399
|
+
amount: K.totalAmount,
|
|
400
400
|
label: e.income_tab_title
|
|
401
401
|
}
|
|
402
402
|
)
|
|
@@ -404,31 +404,31 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
404
404
|
)
|
|
405
405
|
] }),
|
|
406
406
|
v === 0 && /* @__PURE__ */ t(
|
|
407
|
-
|
|
407
|
+
ot,
|
|
408
408
|
{
|
|
409
|
-
data:
|
|
410
|
-
onSelected:
|
|
411
|
-
onViewTransactions:
|
|
412
|
-
selectedId:
|
|
409
|
+
data: F,
|
|
410
|
+
onSelected: U,
|
|
411
|
+
onViewTransactions: Y,
|
|
412
|
+
selectedId: x,
|
|
413
413
|
title: e.spend_tab_title
|
|
414
414
|
}
|
|
415
415
|
),
|
|
416
416
|
v === 1 && /* @__PURE__ */ t(
|
|
417
|
-
|
|
417
|
+
ot,
|
|
418
418
|
{
|
|
419
|
-
data:
|
|
420
|
-
onSelected:
|
|
421
|
-
onViewTransactions:
|
|
422
|
-
selectedId:
|
|
419
|
+
data: K,
|
|
420
|
+
onSelected: U,
|
|
421
|
+
onViewTransactions: Y,
|
|
422
|
+
selectedId: x,
|
|
423
423
|
title: e.income_tab_title
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
426
|
/* @__PURE__ */ t(
|
|
427
|
-
|
|
427
|
+
tt,
|
|
428
428
|
{
|
|
429
429
|
ariaLabelClose: e.close_drawer_aria,
|
|
430
|
-
isOpen:
|
|
431
|
-
onClose: () =>
|
|
430
|
+
isOpen: O,
|
|
431
|
+
onClose: () => j(!1),
|
|
432
432
|
title: e.transactions_drawer_title,
|
|
433
433
|
children: /* @__PURE__ */ p(y, { children: [
|
|
434
434
|
!d && h.length > 0 && /* @__PURE__ */ t(y, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
@@ -440,51 +440,51 @@ const $ = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y,
|
|
|
440
440
|
children: r.export_csv_btn
|
|
441
441
|
}
|
|
442
442
|
) }),
|
|
443
|
-
/* @__PURE__ */ t(Dt, { onClick:
|
|
443
|
+
/* @__PURE__ */ t(Dt, { onClick: W })
|
|
444
444
|
] })
|
|
445
445
|
}
|
|
446
446
|
),
|
|
447
447
|
/* @__PURE__ */ t(
|
|
448
|
-
|
|
448
|
+
tt,
|
|
449
449
|
{
|
|
450
450
|
ariaLabelClose: e.close_drawer_aria,
|
|
451
|
-
isOpen: !!
|
|
452
|
-
onClose: () =>
|
|
451
|
+
isOpen: !!V,
|
|
452
|
+
onClose: () => W(""),
|
|
453
453
|
title: e.transaction_details_drawer_title,
|
|
454
|
-
children:
|
|
454
|
+
children: V && /* @__PURE__ */ t(xt, { transaction: V })
|
|
455
455
|
}
|
|
456
456
|
)
|
|
457
457
|
] });
|
|
458
458
|
}, Bt = I($t), Gt = ({ onBackClick: n, onMenuClick: d, sx: o = {} }) => {
|
|
459
|
-
const { isAccountDataLoaded: a, loadAccountData: i } =
|
|
460
|
-
|
|
459
|
+
const { isAccountDataLoaded: a, loadAccountData: i } = ct(), { categoriesLoaded: g, dateRangeTotalsLoaded: e, loadCategories: r, loadDateRangeCategoryTotals: s } = R(), { isTransactionDataLoaded: b, loadTransactionData: u } = dt(), { spending: h } = A(), { displayedDateRange: M, isInitialized: f, setDisplayedDate: _, selectedAccounts: D } = P(), { onEvent: x } = yt(), { clientConfig: N } = H();
|
|
460
|
+
gt({
|
|
461
461
|
widgetName: "SpendingWidget",
|
|
462
462
|
isLoaded: e
|
|
463
|
-
}),
|
|
464
|
-
const C =
|
|
465
|
-
|
|
466
|
-
}, []),
|
|
467
|
-
|
|
468
|
-
|
|
463
|
+
}), c.useEffect(() => {
|
|
464
|
+
const C = N?.master?.deep_link_params, E = C?.date_range ? [et(C.date_range.from), et(C.date_range.to)] : [at(J()), it(J())], W = E[0], O = E[1];
|
|
465
|
+
_(W, O), a || i().finally(), g || r().finally(), b || u().finally(), f && s(D, W, O).finally(), x(nt.SPENDING_VIEW);
|
|
466
|
+
}, []), c.useEffect(() => {
|
|
467
|
+
f && s(
|
|
468
|
+
D,
|
|
469
469
|
M.start,
|
|
470
470
|
M.end
|
|
471
471
|
).finally();
|
|
472
|
-
}, [M,
|
|
472
|
+
}, [M, f, D]);
|
|
473
473
|
const v = (C) => {
|
|
474
|
-
|
|
474
|
+
_(C[0], C[1]);
|
|
475
475
|
};
|
|
476
|
-
return
|
|
476
|
+
return f ? /* @__PURE__ */ t(
|
|
477
477
|
It,
|
|
478
478
|
{
|
|
479
479
|
calendarActions: { onRangeChanged: v },
|
|
480
|
-
onAccountsFilterClick: () =>
|
|
480
|
+
onAccountsFilterClick: () => x(nt.SPENDING_CLICK_FILTER),
|
|
481
481
|
onBackClick: n,
|
|
482
482
|
onMenuClick: d,
|
|
483
483
|
sx: o,
|
|
484
484
|
title: h.title,
|
|
485
485
|
children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
486
486
|
}
|
|
487
|
-
) : /* @__PURE__ */ t(
|
|
487
|
+
) : /* @__PURE__ */ t(pt, {});
|
|
488
488
|
}, Se = I(Gt);
|
|
489
489
|
export {
|
|
490
490
|
Ce as SpendingMiniWidget,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Re, D as Be, M as He, a as Pe, T as $e } from "../TransactionDetails-
|
|
2
|
-
import { B as wa, b as Sa } from "../TransactionDetails-
|
|
3
|
-
import { u as B, T as Ve } from "../EmbeddedCard-
|
|
4
|
-
import { a as va } from "../EmbeddedCard-
|
|
5
|
-
import { E as Na } from "../ExportCsvAction-
|
|
1
|
+
import { C as Re, D as Be, M as He, a as Pe, T as $e } from "../TransactionDetails-CbBSxdOi.mjs";
|
|
2
|
+
import { B as wa, b as Sa } from "../TransactionDetails-CbBSxdOi.mjs";
|
|
3
|
+
import { u as B, T as Ve } from "../EmbeddedCard-BNl3quCs.mjs";
|
|
4
|
+
import { a as va } from "../EmbeddedCard-BNl3quCs.mjs";
|
|
5
|
+
import { E as Na } from "../ExportCsvAction-hDprC41l.mjs";
|
|
6
6
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
7
7
|
import u from "react";
|
|
8
8
|
import { observer as D } from "mobx-react-lite";
|
|
@@ -12,33 +12,33 @@ import { h as H, u as v, g as ne, b as K, d as oe, l as Fe, a as Ue, C as Ke } f
|
|
|
12
12
|
import { L as z } from "../Loader-CxeBwuPG.mjs";
|
|
13
13
|
import { Text as y, Icon as R, MerchantLogo as ze, TextField as Z, P as qe } from "@mxenabled/mxui";
|
|
14
14
|
import w from "@mui/material/Stack";
|
|
15
|
-
import { f as re } from "../NumberFormatting
|
|
16
|
-
import { T as k, e as Ye, D as je } from "../TransactionUtils-
|
|
15
|
+
import { f as re } from "../NumberFormatting--XMeeBfr.mjs";
|
|
16
|
+
import { T as k, e as Ye, D as je } from "../TransactionUtils-BphBJBbU.mjs";
|
|
17
17
|
import S from "@mui/material/Box";
|
|
18
18
|
import { useTheme as Xe } from "@mui/material/styles";
|
|
19
19
|
import { fromUnixTime as Je } from "date-fns/fromUnixTime";
|
|
20
|
-
import { f as Qe, D as Ze } from "../DateFormats-
|
|
20
|
+
import { f as Qe, D as Ze } from "../DateFormats-HudZ3Bjs.mjs";
|
|
21
21
|
import { A } from "../Analytics-CzGzz_sE.mjs";
|
|
22
22
|
import { endOfMonth as et } from "date-fns/endOfMonth";
|
|
23
23
|
import { getUnixTime as tt } from "date-fns/getUnixTime";
|
|
24
24
|
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
25
25
|
import { startOfToday as F } from "date-fns/startOfToday";
|
|
26
26
|
import nt from "@mui/material/styles/useTheme";
|
|
27
|
+
import { b as U } from "../Localization-DnoVyBNK.mjs";
|
|
27
28
|
import { C as ot } from "../ConnectDrawer-DgfsTpyW.mjs";
|
|
28
29
|
import rt from "@mui/material/Divider";
|
|
29
30
|
import it from "@mui/material/MenuItem";
|
|
30
31
|
import st from "@mui/material/RadioGroup";
|
|
31
32
|
import { ExpandMore as ct } from "@mxenabled/mx-icons";
|
|
32
|
-
import { C as lt } from "../CurrencyInput-
|
|
33
|
+
import { C as lt } from "../CurrencyInput-B59ugxPN.mjs";
|
|
33
34
|
import { S as ee } from "../SelectionBox-Bx2a5rh4.mjs";
|
|
34
35
|
import { D as ie } from "../Dialog-iLlBR8TG.mjs";
|
|
35
|
-
import { b as dt, u as ut } from "../CategorySelectorDrawer-
|
|
36
|
-
import { b as U } from "../Localization-Li21_krp.mjs";
|
|
36
|
+
import { b as dt, u as ut } from "../CategorySelectorDrawer-Cu1ohxeM.mjs";
|
|
37
37
|
import { u as mt } from "../useAriaLive-MkYebyUR.mjs";
|
|
38
38
|
import { S as _t } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
39
39
|
import { u as pt } from "../useScreenSize-CeFhWTt_.mjs";
|
|
40
40
|
import { u as gt } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
41
|
-
import { W as ht } from "../WidgetContainer-
|
|
41
|
+
import { W as ht } from "../WidgetContainer-DalWyz5A.mjs";
|
|
42
42
|
import { S as ft } from "../SearchBox-CwDgvWVJ.mjs";
|
|
43
43
|
import { D as te } from "../Drawer-XPaLYjiO.mjs";
|
|
44
44
|
const Ct = (t) => /* @__PURE__ */ m(y, { tabIndex: t.tabIndex, variant: "body2", children: [
|