@mx-cartographer/experiences 7.2.12-alpha.san1 → 7.2.13
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/{Account-CBQnFO6w.mjs → Account-B-CuHOYf.mjs} +1 -1
- package/dist/{AccountDetailsContent-BkurfGCr.mjs → AccountDetailsContent-bqByD9ea.mjs} +10 -10
- package/dist/{AccountDetailsHeader-CaIoP_2Q.mjs → AccountDetailsHeader-vcy67tuH.mjs} +8 -8
- package/dist/{AccountFields-CLbLAhLf.mjs → AccountFields-cUP-9Hm6.mjs} +5 -5
- package/dist/{AccountListItem-CPm3572e.mjs → AccountListItem-DChcf3SN.mjs} +4 -4
- package/dist/{AccountStore-DttEGFeu.mjs → AccountStore-D6KiXA1B.mjs} +29 -40
- package/dist/{Accounts-B5Yr0e_o.mjs → Accounts-IeEtQjzA.mjs} +1 -1
- package/dist/{BudgetUtil-wjoNuj7B.mjs → BudgetUtil-B2ZXyw-g.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-ZO9N26Kx.mjs → CategorySelectorDrawer-DUe4lH5-.mjs} +3 -3
- package/dist/{CategoryStore-C1IfDPCE.mjs → CategoryStore-BCcpI3oJ.mjs} +1 -1
- package/dist/{CategoryUtil-DUM8NuGO.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
- package/dist/{ConnectDrawer-FyY0AWYQ.mjs → ConnectDrawer-DaFRU5st.mjs} +2 -2
- package/dist/{ConnectionsDrawer-Cd_rztVC.mjs → ConnectionsDrawer-DHJ7qdWL.mjs} +3 -3
- package/dist/{CurrencyInput-xH-hqry9.mjs → CurrencyInput-DUsQbkXb.mjs} +1 -1
- package/dist/{DateUtil-CBdcsyuk.mjs → DateUtil-BcuH7ErC.mjs} +3 -3
- package/dist/{DebtsStore-DB5U2WMC.mjs → DebtsStore-z3VARSO6.mjs} +1 -1
- package/dist/{Dialog-BPTr3qHE.mjs → Dialog-CWW597AF.mjs} +2 -2
- package/dist/Donut-oaQFlbit.mjs +86 -0
- package/dist/Drawer-kEE73B87.mjs +113 -0
- package/dist/{ExportCsvAction-DlGZfm4y.mjs → ExportCsvAction-sX8Rg4Ov.mjs} +3 -3
- package/dist/FinstrongStore-F2c607dj.mjs +101 -0
- package/dist/{GoalStore-deVLYr7n.mjs → GoalStore-TD0BfzWX.mjs} +3 -3
- package/dist/{Help-BnPXM_N2.mjs → Help-B6dIcujh.mjs} +2 -2
- package/dist/{LineChart-Ct9DNmhS.mjs → LineChart-D4GI7nVh.mjs} +181 -209
- package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-DHa3KJPs.mjs} +10 -10
- package/dist/{ManageIncome-CqNstpx_.mjs → ManageIncome-CQPFKdYB.mjs} +61 -63
- package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-DpeqN9n3.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-D0gfmbaF.mjs} +1 -1
- package/dist/{NetWorthStore-CUz0bwVm.mjs → NetWorthStore-B_1oulrt.mjs} +2 -2
- package/dist/{NotificationSettings-BKKuULAd.mjs → NotificationSettings-DqrkNMod.mjs} +5 -5
- package/dist/{OriginalBalanceAction-CCmnsd7y.mjs → OriginalBalanceAction-CWuVvRq9.mjs} +3 -3
- package/dist/{RecurringSettings-DfAMEAuh.mjs → RecurringSettings-DDaGTnfz.mjs} +4 -4
- package/dist/{RecurringTransactions-CngsRZ3K.mjs → RecurringTransactions-ej39mgA6.mjs} +44 -45
- package/dist/{RecurringTransactionsStore-C4RVULF8.mjs → RecurringTransactionsStore-DrzS1LmF.mjs} +1 -1
- package/dist/{SpendingData-BuJ03S9d.mjs → SpendingData-D5vsfYKo.mjs} +16 -16
- package/dist/{TransactionDetails-CabNHK_I.mjs → TransactionDetails-DW7T0W0z.mjs} +8 -11
- package/dist/{TransactionStore-DvOEbOzL.mjs → TransactionStore-DxPLdF3B.mjs} +3 -3
- package/dist/{TrendsStore-BVNxGsE4.mjs → TrendsStore-DCYbpXPO.mjs} +14 -14
- package/dist/{User-wXzDI4M8.mjs → User-BQUxBeZV.mjs} +2 -2
- package/dist/{WidgetContainer-GoNq8wwm.mjs → WidgetContainer-C88Ecu2W.mjs} +4 -4
- package/dist/accounts/index.es.js +14 -14
- package/dist/accounts/stores/AccountStore.d.ts +0 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +456 -431
- package/dist/cashflow/index.es.js +44 -44
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Select.d.ts +2 -4
- package/dist/common/components/charts/LineChart.d.ts +2 -8
- package/dist/common/components/charts/linechart/CustomMark.d.ts +0 -4
- package/dist/common/components/drawer/Drawer.d.ts +0 -3
- package/dist/common/index.es.js +34 -34
- package/dist/common/types/Finstrong.d.ts +0 -50
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +1 -58
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-hrNpJ77n.mjs → exportTransactionsToCSV-7bVS7KXf.mjs} +2 -2
- package/dist/finstrong/api/FinstrongApi.d.ts +0 -5
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +1 -3
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -4
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +3 -4
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/index.es.js +1055 -3130
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -9
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -58
- package/dist/finstrong/utils/Finstrong.d.ts +6 -0
- package/dist/goals/index.es.js +14 -14
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-C41HAxM5.mjs → hooks-D6XlXHf4.mjs} +3 -3
- package/dist/investments/index.es.js +5 -5
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +34 -34
- package/dist/notifications/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +13 -13
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +463 -260
- package/dist/transactions/index.es.js +174 -201
- package/dist/trends/index.es.js +94 -94
- package/dist/{useAccountDisplayName-B5O6hQ1B.mjs → useAccountDisplayName-BcRqfar8.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-DBpwEq10.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Donut-1UMNcG67.mjs +0 -57
- package/dist/Drawer-BEtCk82g.mjs +0 -163
- package/dist/FinstrongStore-CJBV4K5Y.mjs +0 -432
- package/dist/SpendingLegend-squvjEhu.mjs +0 -170
- package/dist/accounts/components/AccountsListCompact.d.ts +0 -10
- package/dist/common/components/drawer/Footer.d.ts +0 -17
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +0 -4
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +0 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +0 -10
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +0 -6
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +0 -4
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +0 -4
- package/dist/finstrong/components/ProgressBar.d.ts +0 -15
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +0 -4
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +0 -4
- package/dist/finstrong/components/StatusChip.d.ts +0 -5
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +0 -2
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +0 -11
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +0 -14
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +0 -8
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +0 -4
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +0 -4
- package/dist/finstrong/components/shared/Accounts.d.ts +0 -8
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +0 -25
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +0 -28
- package/dist/finstrong/components/shared/LineGraph.d.ts +0 -7
- package/dist/finstrong/components/shared/TotalCard.d.ts +0 -8
- package/dist/finstrong/components/shared/TransactionList.d.ts +0 -15
- package/dist/finstrong/components/shared/Transactions.d.ts +0 -11
- package/dist/finstrong/constants/index.d.ts +0 -8
|
@@ -1,41 +1,218 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
1
|
+
import { jsxs as h, jsx as t, Fragment as mt } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { observer as v } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as nt } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
6
|
+
import x from "@mui/material/Box";
|
|
7
|
+
import C from "@mui/material/Stack";
|
|
8
|
+
import N from "@mui/material/Tab";
|
|
9
|
+
import at from "@mui/material/Tabs";
|
|
10
|
+
import ht from "@mui/material/styles/useTheme";
|
|
11
|
+
import { b as V } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
12
|
+
import { b as S } from "../Category-CevNQ03n.mjs";
|
|
13
|
+
import { Text as y, CategoryIcon as ft, CategoryIconVariants as yt } from "@mxenabled/mxui";
|
|
14
|
+
import { f as w } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
15
|
+
import { u as bt } from "../useAriaLive-B3_pRUio.mjs";
|
|
16
|
+
import Ct from "@mui/material/Button";
|
|
17
|
+
import { useTheme as it } from "@mui/material";
|
|
18
|
+
import { u as I, b as R, m as z, d as rt, a as st, h as _t, g as St } from "../hooks-D6XlXHf4.mjs";
|
|
19
|
+
import { u as lt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
20
|
+
import { D as Tt } from "../Donut-oaQFlbit.mjs";
|
|
21
|
+
import { L as F } from "../Loader-DUaFpDGv.mjs";
|
|
22
|
+
import { M as Mt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
|
|
23
|
+
import { startOfToday as U } from "date-fns/startOfToday";
|
|
24
|
+
import { T as Dt, a as xt } from "../TransactionDetails-DW7T0W0z.mjs";
|
|
25
|
+
import wt from "@mui/material/Collapse";
|
|
21
26
|
import B from "@mui/material/Divider";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
import q from "@mui/material/List";
|
|
28
|
+
import J from "@mui/material/ListItem";
|
|
29
|
+
import vt from "@mui/material/ListItemButton";
|
|
30
|
+
import { D as Q } from "../Drawer-kEE73B87.mjs";
|
|
31
|
+
import { A as Z, W as It } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
32
|
+
const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
33
|
+
if (a.total > 0) {
|
|
34
|
+
const i = n.find((s) => s.guid === a.category_guid);
|
|
35
|
+
if (!i) return l;
|
|
36
|
+
const o = i.parent_guid ?? i.guid, e = n.find((s) => s.guid === o);
|
|
37
|
+
if (!e) return l;
|
|
38
|
+
const d = {
|
|
39
|
+
guid: i.guid,
|
|
40
|
+
name: i.guid === o ? `General ${i.name}` : i.name,
|
|
41
|
+
color: V(e.guid, c),
|
|
42
|
+
amount: a.total
|
|
43
|
+
}, u = l.find((s) => s.guid === o);
|
|
44
|
+
u ? (u.amount += a.total, u.categoryTotals?.push(d)) : l.push({
|
|
45
|
+
guid: o,
|
|
46
|
+
name: e.name,
|
|
47
|
+
color: V(e.guid, c),
|
|
48
|
+
categoryTotals: [d],
|
|
49
|
+
amount: a.total
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return l;
|
|
53
|
+
}, []), ct = (n, c, r, l) => {
|
|
54
|
+
const a = Et(n, r, l), i = a.filter(
|
|
55
|
+
(s) => s.guid !== S.INCOME && s.guid !== S.INVESTMENTS && s.guid !== S.TRANSFER
|
|
56
|
+
).sort((s, m) => m.amount - s.amount), o = i.reduce(
|
|
57
|
+
(s, m) => s + m.amount,
|
|
58
|
+
0
|
|
59
|
+
), e = i.length > j ? j : i.length, d = i.slice(0, e), u = d.map((s) => ({
|
|
60
|
+
id: s.guid,
|
|
61
|
+
color: V(s.guid, r),
|
|
62
|
+
label: s.name,
|
|
63
|
+
value: s.amount / o * 100
|
|
64
|
+
}));
|
|
65
|
+
if (i.length > 5) {
|
|
66
|
+
const s = i.slice(j, a.length), m = s.reduce(
|
|
67
|
+
(T, g) => T + g.amount,
|
|
68
|
+
0
|
|
69
|
+
);
|
|
70
|
+
d.push({
|
|
71
|
+
guid: "other",
|
|
72
|
+
color: r.palette.categories.others || "",
|
|
73
|
+
name: c.saving_goal_other,
|
|
74
|
+
categoryTotals: s,
|
|
75
|
+
amount: m
|
|
76
|
+
}), u.push({
|
|
77
|
+
id: "other",
|
|
78
|
+
color: r.palette.categories.others || "",
|
|
79
|
+
label: c.saving_goal_other,
|
|
80
|
+
value: m / o * 100
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
categoryData: d,
|
|
85
|
+
donutData: u,
|
|
86
|
+
totalAmount: o
|
|
87
|
+
};
|
|
88
|
+
}, dt = (n, c, r) => {
|
|
89
|
+
const l = n.filter(
|
|
90
|
+
(e) => e.guid === S.INCOME || e.parent_guid === S.INCOME
|
|
91
|
+
), a = c.filter((e) => l.some((d) => d.guid === e.category_guid)).sort((e, d) => e.total - d.total).map((e, d) => ({
|
|
92
|
+
guid: e.category_guid,
|
|
93
|
+
name: n.find((u) => u.guid === e.category_guid)?.name,
|
|
94
|
+
color: r[d],
|
|
95
|
+
categoryTotals: [],
|
|
96
|
+
amount: Math.abs(e.total)
|
|
97
|
+
})), i = a.reduce(
|
|
98
|
+
(e, d) => e + d.amount,
|
|
99
|
+
0
|
|
100
|
+
), o = a.map((e) => ({
|
|
101
|
+
id: e.guid,
|
|
102
|
+
color: e.color,
|
|
103
|
+
label: e.name,
|
|
104
|
+
value: e.amount / i * 100
|
|
105
|
+
}));
|
|
106
|
+
return {
|
|
107
|
+
categoryData: a,
|
|
108
|
+
donutData: o,
|
|
109
|
+
totalAmount: i
|
|
110
|
+
};
|
|
111
|
+
}, W = ({ amount: n, label: c }) => /* @__PURE__ */ h(C, { direction: "column", children: [
|
|
112
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: c }),
|
|
113
|
+
/* @__PURE__ */ t(y, { variant: "XSmall", children: w(n, "0,0") })
|
|
114
|
+
] }), At = ({
|
|
115
|
+
data: n,
|
|
116
|
+
isIncome: c = !1,
|
|
117
|
+
onSelected: r,
|
|
118
|
+
onViewTransactions: l,
|
|
119
|
+
selectedId: a,
|
|
120
|
+
size: i = 150,
|
|
121
|
+
totalLabel: o,
|
|
122
|
+
variant: e = "mini"
|
|
123
|
+
}) => {
|
|
124
|
+
const { spending: d } = I(), u = it(), { isTablet: s } = lt(), { announce: m, ariaLive: T } = bt(), g = p.useMemo(
|
|
125
|
+
() => a ? n.categoryData.find((D) => D.guid === a) : void 0,
|
|
126
|
+
[a]
|
|
127
|
+
);
|
|
128
|
+
p.useEffect(() => {
|
|
129
|
+
if (g) {
|
|
130
|
+
const D = w(g.amount, "0,0");
|
|
131
|
+
m(`${g.name}: ${D}`);
|
|
132
|
+
}
|
|
133
|
+
}, [g, m]);
|
|
134
|
+
const b = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), E = () => {
|
|
135
|
+
l?.(a);
|
|
136
|
+
}, _ = s ? 32 : 48;
|
|
137
|
+
return /* @__PURE__ */ h(mt, { children: [
|
|
138
|
+
T,
|
|
139
|
+
/* @__PURE__ */ t(Tt, { data: b, onClick: r, selectedId: a, size: i, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(C, { alignItems: "center", justifyContent: "center", minHeight: i, minWidth: i, children: [
|
|
140
|
+
g && /* @__PURE__ */ h(
|
|
141
|
+
C,
|
|
142
|
+
{
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
gap: e === "mini" ? 0 : 8,
|
|
145
|
+
mb: e === "mini" ? 0 : 8,
|
|
146
|
+
mt: e === "mini" ? 0 : -16,
|
|
147
|
+
sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ t(
|
|
150
|
+
ft,
|
|
151
|
+
{
|
|
152
|
+
categoryGuid: c ? S.INCOME : g.guid,
|
|
153
|
+
size: e === "mini" ? 24 : _,
|
|
154
|
+
variant: yt.Transparent
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ t(
|
|
158
|
+
y,
|
|
159
|
+
{
|
|
160
|
+
color: "secondary",
|
|
161
|
+
noWrap: !0,
|
|
162
|
+
variant: e === "mini" ? "Tiny" : "Body",
|
|
163
|
+
children: g ? g.name : o
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
!g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: o }),
|
|
170
|
+
/* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ? w(g.amount, "0,0") : w(n.totalAmount, "0,0") }),
|
|
171
|
+
!g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children: o }),
|
|
172
|
+
e === "full" && /* @__PURE__ */ t(
|
|
173
|
+
Ct,
|
|
174
|
+
{
|
|
175
|
+
"aria-label": `View ${g?.name || ""} Transactions`,
|
|
176
|
+
disabled: n.categoryData.length === 0,
|
|
177
|
+
onClick: E,
|
|
178
|
+
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
179
|
+
variant: "text",
|
|
180
|
+
children: d.view_transactions
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
] }) }) })
|
|
184
|
+
] });
|
|
185
|
+
}, O = v(At), tt = ({ data: n, onSelected: c, selectedId: r }) => {
|
|
186
|
+
const l = (a, i) => {
|
|
187
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), c(i));
|
|
188
|
+
};
|
|
189
|
+
return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((a) => /* @__PURE__ */ h(
|
|
190
|
+
C,
|
|
191
|
+
{
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
"aria-label": a.name,
|
|
194
|
+
"aria-pressed": a.guid === r,
|
|
195
|
+
direction: "row",
|
|
196
|
+
gap: 8,
|
|
197
|
+
onClick: () => c(a.guid),
|
|
198
|
+
onKeyDown: (i) => l(i, a.guid),
|
|
199
|
+
role: "button",
|
|
200
|
+
sx: { cursor: "pointer" },
|
|
201
|
+
tabIndex: 0,
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ t(x, { borderRadius: 4, height: 8, sx: { backgroundColor: a.color }, width: 8 }),
|
|
204
|
+
/* @__PURE__ */ t(y, { bold: a.guid === r, variant: "XSmall", children: a.name })
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
a.guid
|
|
208
|
+
)) });
|
|
209
|
+
}, Lt = () => {
|
|
210
|
+
const n = ht(), { goals: c, spending: r } = I(), { selectedAccounts: l } = R(), {
|
|
211
|
+
categories: a,
|
|
212
|
+
dateRangeCategoryTotals: i,
|
|
213
|
+
dataRangeTotalsLoaded: o,
|
|
214
|
+
loadDateRangeCategoryTotals: e
|
|
215
|
+
} = z(), d = p.useMemo(
|
|
39
216
|
() => [
|
|
40
217
|
n.palette.chartMono.chartMono5,
|
|
41
218
|
n.palette.chartMono.chartMono4,
|
|
@@ -46,145 +223,171 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
46
223
|
],
|
|
47
224
|
[n]
|
|
48
225
|
);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
226
|
+
p.useEffect(() => {
|
|
227
|
+
e(
|
|
228
|
+
l,
|
|
229
|
+
nt(/* @__PURE__ */ new Date()),
|
|
230
|
+
ot(/* @__PURE__ */ new Date())
|
|
54
231
|
).finally();
|
|
55
|
-
}, [
|
|
56
|
-
const [
|
|
57
|
-
() =>
|
|
58
|
-
[
|
|
59
|
-
),
|
|
60
|
-
() =>
|
|
61
|
-
[
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
}, _ = (
|
|
65
|
-
|
|
232
|
+
}, [l]);
|
|
233
|
+
const [u, s] = p.useState(""), [m, T] = p.useState(0), g = p.useMemo(
|
|
234
|
+
() => ct(a, c, n, i),
|
|
235
|
+
[a, i]
|
|
236
|
+
), b = p.useMemo(
|
|
237
|
+
() => dt(a, i, d),
|
|
238
|
+
[a, i, d]
|
|
239
|
+
), E = (D, L) => {
|
|
240
|
+
T(L), s("");
|
|
241
|
+
}, _ = (D) => {
|
|
242
|
+
s(u === D ? "" : D);
|
|
66
243
|
};
|
|
67
|
-
return
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
244
|
+
return o ? /* @__PURE__ */ h(x, { width: "100%", children: [
|
|
245
|
+
/* @__PURE__ */ h(
|
|
246
|
+
at,
|
|
247
|
+
{
|
|
248
|
+
"aria-label": r.mini_title,
|
|
249
|
+
onChange: E,
|
|
250
|
+
value: m,
|
|
251
|
+
variant: "fullWidth",
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ t(
|
|
254
|
+
N,
|
|
74
255
|
{
|
|
75
|
-
|
|
76
|
-
|
|
256
|
+
"aria-controls": "spending-tabpanel",
|
|
257
|
+
id: "spending-tab",
|
|
258
|
+
label: /* @__PURE__ */ t(
|
|
259
|
+
W,
|
|
260
|
+
{
|
|
261
|
+
amount: g.totalAmount,
|
|
262
|
+
label: r.spend_tab_title
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
tabIndex: m === 0 ? 0 : -1
|
|
77
266
|
}
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/* @__PURE__ */ t(
|
|
82
|
-
W,
|
|
83
|
-
{
|
|
84
|
-
label: /* @__PURE__ */ t(
|
|
85
|
-
R,
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ t(
|
|
269
|
+
N,
|
|
86
270
|
{
|
|
87
|
-
|
|
88
|
-
|
|
271
|
+
"aria-controls": "income-tabpanel",
|
|
272
|
+
id: "income-tab",
|
|
273
|
+
label: /* @__PURE__ */ t(
|
|
274
|
+
W,
|
|
275
|
+
{
|
|
276
|
+
amount: b.totalAmount,
|
|
277
|
+
label: r.income_tab_title
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
tabIndex: m === 1 ? 0 : -1
|
|
89
281
|
}
|
|
90
282
|
)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
/* @__PURE__ */ t(
|
|
287
|
+
x,
|
|
288
|
+
{
|
|
289
|
+
"aria-labelledby": "spending-tab",
|
|
290
|
+
hidden: m !== 0,
|
|
291
|
+
id: "spending-tabpanel",
|
|
292
|
+
role: "tabpanel",
|
|
293
|
+
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
294
|
+
/* @__PURE__ */ t(
|
|
295
|
+
O,
|
|
296
|
+
{
|
|
297
|
+
data: g,
|
|
298
|
+
onSelected: _,
|
|
299
|
+
selectedId: u,
|
|
300
|
+
totalLabel: r.total_spending
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
/* @__PURE__ */ t(tt, { data: g, onSelected: _, selectedId: u })
|
|
304
|
+
] })
|
|
305
|
+
}
|
|
306
|
+
),
|
|
307
|
+
/* @__PURE__ */ t(
|
|
308
|
+
x,
|
|
309
|
+
{
|
|
310
|
+
"aria-labelledby": "income-tab",
|
|
311
|
+
hidden: m !== 1,
|
|
312
|
+
id: "income-tabpanel",
|
|
313
|
+
role: "tabpanel",
|
|
314
|
+
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
315
|
+
/* @__PURE__ */ t(
|
|
316
|
+
O,
|
|
317
|
+
{
|
|
318
|
+
data: b,
|
|
319
|
+
isIncome: !0,
|
|
320
|
+
onSelected: _,
|
|
321
|
+
selectedId: u,
|
|
322
|
+
totalLabel: r.total_income
|
|
323
|
+
}
|
|
324
|
+
),
|
|
325
|
+
/* @__PURE__ */ t(tt, { data: b, onSelected: _, selectedId: u })
|
|
326
|
+
] })
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
] }) : /* @__PURE__ */ t(F, { height: 250 });
|
|
330
|
+
}, Nt = v(Lt), Wt = ({ onPrimaryCtaClick: n, sx: c = {} }) => {
|
|
331
|
+
const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setSelectedAccounts: o } = R();
|
|
332
|
+
return p.useEffect(() => {
|
|
333
|
+
o(r);
|
|
334
|
+
}, [r]), !a || !i ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
335
|
+
Mt,
|
|
133
336
|
{
|
|
134
337
|
className: "mx-exp-spending-miniwidget",
|
|
135
338
|
onPrimaryCtaClick: n,
|
|
136
|
-
primaryCtaLabel:
|
|
137
|
-
sx:
|
|
138
|
-
title:
|
|
139
|
-
children: /* @__PURE__ */ t(
|
|
339
|
+
primaryCtaLabel: l.primary_cta,
|
|
340
|
+
sx: c,
|
|
341
|
+
title: l.mini_title,
|
|
342
|
+
children: /* @__PURE__ */ t(Nt, {})
|
|
140
343
|
}
|
|
141
344
|
);
|
|
142
|
-
},
|
|
345
|
+
}, be = v(Wt), Ot = ({
|
|
143
346
|
data: n,
|
|
144
|
-
onSelected:
|
|
145
|
-
selectedId:
|
|
146
|
-
title:
|
|
347
|
+
onSelected: c,
|
|
348
|
+
selectedId: r = "",
|
|
349
|
+
title: l
|
|
147
350
|
}) => {
|
|
148
|
-
const { spending:
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${
|
|
351
|
+
const { spending: a } = I(), i = n.categoryData.find((o) => o.guid === r);
|
|
352
|
+
return /* @__PURE__ */ h(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
353
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${a.by_category}` }),
|
|
151
354
|
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
152
|
-
/* @__PURE__ */ t(
|
|
355
|
+
/* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ h(p.Fragment, { children: [
|
|
153
356
|
/* @__PURE__ */ t(
|
|
154
|
-
|
|
357
|
+
J,
|
|
155
358
|
{
|
|
156
359
|
disableGutters: !0,
|
|
157
360
|
disablePadding: !0,
|
|
158
361
|
sx: {
|
|
159
362
|
minHeight: 44
|
|
160
363
|
},
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
-
|
|
364
|
+
children: /* @__PURE__ */ h(
|
|
365
|
+
vt,
|
|
163
366
|
{
|
|
164
|
-
"aria-expanded":
|
|
165
|
-
onClick: () =>
|
|
367
|
+
"aria-expanded": i?.guid === o.guid,
|
|
368
|
+
onClick: () => c(o.guid),
|
|
166
369
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
167
370
|
children: [
|
|
168
371
|
/* @__PURE__ */ t(
|
|
169
|
-
|
|
372
|
+
x,
|
|
170
373
|
{
|
|
171
374
|
borderRadius: 4,
|
|
172
375
|
flexShrink: 0,
|
|
173
376
|
height: 8,
|
|
174
|
-
sx: { backgroundColor:
|
|
377
|
+
sx: { backgroundColor: o.color, mr: 8 },
|
|
175
378
|
width: 8
|
|
176
379
|
}
|
|
177
380
|
),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
381
|
+
/* @__PURE__ */ h(
|
|
382
|
+
C,
|
|
180
383
|
{
|
|
181
384
|
alignItems: "center",
|
|
182
385
|
direction: "row",
|
|
183
386
|
justifyContent: "space-between",
|
|
184
387
|
width: "100%",
|
|
185
388
|
children: [
|
|
186
|
-
/* @__PURE__ */ t(y, { bold:
|
|
187
|
-
/* @__PURE__ */ t(y, { bold:
|
|
389
|
+
/* @__PURE__ */ t(y, { bold: r === o.guid, children: o.name }),
|
|
390
|
+
/* @__PURE__ */ t(y, { bold: r === o.guid, variant: "Body", children: w(o.amount, "0,0") })
|
|
188
391
|
]
|
|
189
392
|
}
|
|
190
393
|
)
|
|
@@ -194,50 +397,50 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
194
397
|
}
|
|
195
398
|
),
|
|
196
399
|
/* @__PURE__ */ t(B, {}),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
400
|
+
o.categoryTotals && o.categoryTotals.length > 0 && /* @__PURE__ */ t(wt, { in: i?.guid === o.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(q, { children: [
|
|
401
|
+
i?.categoryTotals?.map((e) => /* @__PURE__ */ t(
|
|
402
|
+
J,
|
|
200
403
|
{
|
|
201
404
|
sx: {
|
|
202
405
|
pl: 24,
|
|
203
406
|
pr: 8,
|
|
204
407
|
py: 0
|
|
205
408
|
},
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
|
|
409
|
+
children: /* @__PURE__ */ h(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
410
|
+
/* @__PURE__ */ h(y, { children: [
|
|
411
|
+
e.name,
|
|
209
412
|
" "
|
|
210
413
|
] }),
|
|
211
|
-
/* @__PURE__ */ t(y, { children:
|
|
414
|
+
/* @__PURE__ */ t(y, { children: w(e.amount, "0,0") })
|
|
212
415
|
] })
|
|
213
416
|
},
|
|
214
|
-
|
|
417
|
+
e.guid
|
|
215
418
|
)),
|
|
216
419
|
/* @__PURE__ */ t(B, {})
|
|
217
420
|
] }) })
|
|
218
|
-
] },
|
|
219
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${
|
|
421
|
+
] }, o.guid)) }),
|
|
422
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${a.total}: ${w(n.totalAmount, "0,0")}` })
|
|
220
423
|
] });
|
|
221
|
-
},
|
|
424
|
+
}, Rt = v(Ot), kt = ({
|
|
222
425
|
data: n,
|
|
223
|
-
onSelected:
|
|
224
|
-
onViewTransactions:
|
|
225
|
-
selectedId:
|
|
226
|
-
title:
|
|
426
|
+
onSelected: c,
|
|
427
|
+
onViewTransactions: r,
|
|
428
|
+
selectedId: l,
|
|
429
|
+
title: a
|
|
227
430
|
}) => {
|
|
228
|
-
const { isDesktop:
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
|
|
431
|
+
const { isDesktop: i, isMobile: o } = lt(), { isLoadingCategoryTotals: e } = z(), { spending: d } = I();
|
|
432
|
+
return /* @__PURE__ */ h(
|
|
433
|
+
C,
|
|
231
434
|
{
|
|
232
|
-
alignItems:
|
|
233
|
-
direction:
|
|
435
|
+
alignItems: o ? "center" : "flex-start",
|
|
436
|
+
direction: o ? "column" : "row",
|
|
234
437
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
235
438
|
justifyContent: "center",
|
|
236
439
|
pt: 50,
|
|
237
440
|
px: 8,
|
|
238
441
|
children: [
|
|
239
|
-
|
|
240
|
-
|
|
442
|
+
e && /* @__PURE__ */ t(
|
|
443
|
+
O,
|
|
241
444
|
{
|
|
242
445
|
data: {
|
|
243
446
|
categoryData: [],
|
|
@@ -247,173 +450,173 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
247
450
|
onSelected: () => {
|
|
248
451
|
},
|
|
249
452
|
selectedId: "",
|
|
250
|
-
size:
|
|
453
|
+
size: i ? 400 : 300,
|
|
251
454
|
totalLabel: "Loading ...",
|
|
252
455
|
variant: "full"
|
|
253
456
|
}
|
|
254
457
|
),
|
|
255
|
-
!
|
|
256
|
-
|
|
458
|
+
!e && /* @__PURE__ */ t(
|
|
459
|
+
O,
|
|
257
460
|
{
|
|
258
461
|
data: n,
|
|
259
|
-
onSelected:
|
|
260
|
-
onViewTransactions:
|
|
261
|
-
selectedId:
|
|
262
|
-
size:
|
|
263
|
-
totalLabel:
|
|
462
|
+
onSelected: c,
|
|
463
|
+
onViewTransactions: r,
|
|
464
|
+
selectedId: l,
|
|
465
|
+
size: i ? 400 : 300,
|
|
466
|
+
totalLabel: d.total_amount,
|
|
264
467
|
variant: "full"
|
|
265
468
|
}
|
|
266
469
|
),
|
|
267
|
-
/* @__PURE__ */ t(
|
|
470
|
+
/* @__PURE__ */ t(Rt, { data: n, onSelected: c, selectedId: l, title: a })
|
|
268
471
|
]
|
|
269
472
|
}
|
|
270
473
|
);
|
|
271
|
-
},
|
|
474
|
+
}, et = v(kt), $t = (n) => [
|
|
272
475
|
n.palette.chartMono.chartMono5,
|
|
273
476
|
n.palette.chartMono.chartMono4,
|
|
274
477
|
n.palette.chartMono.chartMono3,
|
|
275
478
|
n.palette.chartMono.chartMono2,
|
|
276
479
|
n.palette.chartMono.chartMono1,
|
|
277
480
|
n.palette.chartMono.chartMono6
|
|
278
|
-
],
|
|
279
|
-
const n =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
481
|
+
], Gt = () => {
|
|
482
|
+
const n = it(), { clientConfig: c } = st(), { categories: r, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: a } = z(), { goals: i, spending: o } = I(), { displayedDateRange: e, selectedAccounts: d, selectedAccountGuids: u } = R(), { setFilter: s, sortedTransactions: m } = _t(), T = c?.master?.deep_link_params?.account_guids, g = c?.master?.deep_link_params?.view, [b, E] = p.useState(""), [_, D] = p.useState(g === "income" ? 1 : 0), [L, H] = p.useState(""), [gt, P] = p.useState(!1);
|
|
483
|
+
p.useEffect(() => {
|
|
484
|
+
a(
|
|
485
|
+
d,
|
|
486
|
+
e.start,
|
|
487
|
+
e.end
|
|
285
488
|
).finally();
|
|
286
|
-
}, [
|
|
287
|
-
const
|
|
288
|
-
() =>
|
|
289
|
-
[
|
|
290
|
-
),
|
|
291
|
-
() =>
|
|
292
|
-
[
|
|
293
|
-
),
|
|
294
|
-
() =>
|
|
295
|
-
[
|
|
296
|
-
),
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
const
|
|
302
|
-
accounts:
|
|
303
|
-
dateRange:
|
|
489
|
+
}, [d, e]);
|
|
490
|
+
const k = p.useMemo(
|
|
491
|
+
() => ct(r, i, n, l),
|
|
492
|
+
[r, l]
|
|
493
|
+
), K = p.useMemo(
|
|
494
|
+
() => dt(r, l, $t(n)),
|
|
495
|
+
[r, l]
|
|
496
|
+
), $ = p.useMemo(
|
|
497
|
+
() => m.find((f) => f.guid === L),
|
|
498
|
+
[L, m]
|
|
499
|
+
), ut = (f, A) => {
|
|
500
|
+
D(A), E("");
|
|
501
|
+
}, X = (f) => {
|
|
502
|
+
E(b === f || f === "0" ? "" : f);
|
|
503
|
+
}, Y = (f) => {
|
|
504
|
+
const A = {
|
|
505
|
+
accounts: T || u,
|
|
506
|
+
dateRange: e
|
|
304
507
|
};
|
|
305
508
|
if (_ === 0)
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
...
|
|
310
|
-
custom: (G) => !!
|
|
509
|
+
if (f === "other") {
|
|
510
|
+
const M = k.categoryData.find((G) => G.guid === "other");
|
|
511
|
+
s({
|
|
512
|
+
...A,
|
|
513
|
+
custom: (G) => !!M?.categoryTotals?.find((pt) => pt.guid === G.top_level_category_guid)
|
|
311
514
|
});
|
|
312
515
|
} else
|
|
313
|
-
|
|
314
|
-
...
|
|
315
|
-
custom: (
|
|
316
|
-
showSplits: !!
|
|
516
|
+
s({
|
|
517
|
+
...A,
|
|
518
|
+
custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !== S.INCOME && M.top_level_category_guid !== S.INVESTMENTS && M.top_level_category_guid !== S.TRANSFER,
|
|
519
|
+
showSplits: !!f
|
|
317
520
|
});
|
|
318
521
|
else
|
|
319
|
-
|
|
320
|
-
...
|
|
321
|
-
custom: (
|
|
522
|
+
s({
|
|
523
|
+
...A,
|
|
524
|
+
custom: (M) => f ? M.category_guid === f : M.category_guid === S.INCOME || M.top_level_category_guid === S.INCOME
|
|
322
525
|
});
|
|
323
|
-
|
|
526
|
+
P(!0);
|
|
324
527
|
};
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
528
|
+
return /* @__PURE__ */ h(x, { children: [
|
|
529
|
+
/* @__PURE__ */ h(at, { onChange: ut, value: _, variant: "fullWidth", children: [
|
|
327
530
|
/* @__PURE__ */ t(
|
|
328
|
-
|
|
531
|
+
N,
|
|
329
532
|
{
|
|
330
533
|
label: /* @__PURE__ */ t(
|
|
331
|
-
|
|
534
|
+
W,
|
|
332
535
|
{
|
|
333
|
-
amount:
|
|
334
|
-
label:
|
|
536
|
+
amount: k.totalAmount,
|
|
537
|
+
label: o.spend_tab_title
|
|
335
538
|
}
|
|
336
539
|
)
|
|
337
540
|
}
|
|
338
541
|
),
|
|
339
542
|
/* @__PURE__ */ t(
|
|
340
|
-
|
|
543
|
+
N,
|
|
341
544
|
{
|
|
342
545
|
label: /* @__PURE__ */ t(
|
|
343
|
-
|
|
546
|
+
W,
|
|
344
547
|
{
|
|
345
|
-
amount:
|
|
346
|
-
label:
|
|
548
|
+
amount: K.totalAmount,
|
|
549
|
+
label: o.income_tab_title
|
|
347
550
|
}
|
|
348
551
|
)
|
|
349
552
|
}
|
|
350
553
|
)
|
|
351
554
|
] }),
|
|
352
555
|
_ === 0 && /* @__PURE__ */ t(
|
|
353
|
-
|
|
556
|
+
et,
|
|
354
557
|
{
|
|
355
|
-
data:
|
|
356
|
-
onSelected:
|
|
357
|
-
onViewTransactions:
|
|
358
|
-
selectedId:
|
|
359
|
-
title:
|
|
558
|
+
data: k,
|
|
559
|
+
onSelected: X,
|
|
560
|
+
onViewTransactions: Y,
|
|
561
|
+
selectedId: b,
|
|
562
|
+
title: o.spend_tab_title
|
|
360
563
|
}
|
|
361
564
|
),
|
|
362
565
|
_ === 1 && /* @__PURE__ */ t(
|
|
363
|
-
|
|
566
|
+
et,
|
|
364
567
|
{
|
|
365
|
-
data:
|
|
366
|
-
onSelected:
|
|
367
|
-
onViewTransactions:
|
|
368
|
-
selectedId:
|
|
369
|
-
title:
|
|
568
|
+
data: K,
|
|
569
|
+
onSelected: X,
|
|
570
|
+
onViewTransactions: Y,
|
|
571
|
+
selectedId: b,
|
|
572
|
+
title: o.income_tab_title
|
|
370
573
|
}
|
|
371
574
|
),
|
|
372
575
|
/* @__PURE__ */ t(
|
|
373
|
-
|
|
576
|
+
Q,
|
|
374
577
|
{
|
|
375
|
-
ariaLabelClose:
|
|
376
|
-
isOpen:
|
|
377
|
-
onClose: () =>
|
|
378
|
-
title:
|
|
379
|
-
children: /* @__PURE__ */ t(
|
|
578
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
579
|
+
isOpen: gt,
|
|
580
|
+
onClose: () => P(!1),
|
|
581
|
+
title: o.transactions_drawer_title,
|
|
582
|
+
children: /* @__PURE__ */ t(Dt, { onClick: H })
|
|
380
583
|
}
|
|
381
584
|
),
|
|
382
585
|
/* @__PURE__ */ t(
|
|
383
|
-
|
|
586
|
+
Q,
|
|
384
587
|
{
|
|
385
|
-
ariaLabelClose:
|
|
386
|
-
isOpen:
|
|
387
|
-
onClose: () =>
|
|
388
|
-
title:
|
|
389
|
-
children:
|
|
588
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
589
|
+
isOpen: !!$,
|
|
590
|
+
onClose: () => H(""),
|
|
591
|
+
title: o.transaction_details_drawer_title,
|
|
592
|
+
children: $ && /* @__PURE__ */ t(xt, { transaction: $ })
|
|
390
593
|
}
|
|
391
594
|
)
|
|
392
595
|
] });
|
|
393
|
-
},
|
|
394
|
-
const { visibleAccounts:
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}, [
|
|
398
|
-
|
|
596
|
+
}, Bt = v(Gt), jt = ({ onBackClick: n, sx: c = {} }) => {
|
|
597
|
+
const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setDisplayedDate: o, setSelectedAccounts: e } = R(), { onEvent: d } = St(), { clientConfig: u } = st(), s = u?.master?.deep_link_params?.date_range, [m, T] = p.useState(!1);
|
|
598
|
+
p.useEffect(() => {
|
|
599
|
+
e(r);
|
|
600
|
+
}, [r]), p.useEffect(() => {
|
|
601
|
+
s && Array.isArray(s) && s.length === 2 ? o(s[0], s[1]) : o(nt(U()), ot(U())), T(!0), d(Z.SPENDING_VIEW);
|
|
399
602
|
}, []);
|
|
400
|
-
const
|
|
401
|
-
|
|
603
|
+
const g = (b) => {
|
|
604
|
+
o(b[0], b[1]);
|
|
402
605
|
};
|
|
403
|
-
return !
|
|
404
|
-
|
|
606
|
+
return !a || !i || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
607
|
+
It,
|
|
405
608
|
{
|
|
406
|
-
accountOptions:
|
|
407
|
-
calendarActions: { onRangeChanged:
|
|
408
|
-
onAccountsFilterClick: () =>
|
|
609
|
+
accountOptions: r,
|
|
610
|
+
calendarActions: { onRangeChanged: g },
|
|
611
|
+
onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
|
|
409
612
|
onBackClick: n,
|
|
410
|
-
sx:
|
|
411
|
-
title:
|
|
412
|
-
children: /* @__PURE__ */ t(
|
|
613
|
+
sx: c,
|
|
614
|
+
title: l.title,
|
|
615
|
+
children: /* @__PURE__ */ t(x, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
|
|
413
616
|
}
|
|
414
617
|
);
|
|
415
|
-
},
|
|
618
|
+
}, Ce = v(jt);
|
|
416
619
|
export {
|
|
417
|
-
|
|
418
|
-
|
|
620
|
+
be as SpendingMiniWidget,
|
|
621
|
+
Ce as SpendingWidget
|
|
419
622
|
};
|