@mx-cartographer/experiences 7.1.4-ram1-alpha-finstrong-credit-score-graph-check → 7.1.5
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-CpRTVIHg.mjs → Account-8IUM_CLv.mjs} +1 -1
- package/dist/{AccountDetailsContent-6aPMU6Hp.mjs → AccountDetailsContent-CuZSSAEc.mjs} +10 -10
- package/dist/{AccountDetailsHeader-BkUZYoV8.mjs → AccountDetailsHeader-BZBsIKdF.mjs} +8 -8
- package/dist/{AccountFields-DOLjKu5l.mjs → AccountFields-BD_0GT68.mjs} +5 -5
- package/dist/{AccountListItem-CTT5m4qx.mjs → AccountListItem-CllIBCao.mjs} +4 -4
- package/dist/{AccountStore-DTfpr3h0.mjs → AccountStore-BL0FE1QL.mjs} +15 -26
- package/dist/{Accounts-D0BmvNxn.mjs → Accounts-Bvc9TJaO.mjs} +1 -1
- package/dist/{BudgetUtil-D2Jcp-E-.mjs → BudgetUtil-psfk-Amb.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DomNyubP.mjs → CategorySelectorDrawer-BmenK5bu.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--gJHyp-S.mjs → ConnectDrawer-CPTXh70j.mjs} +2 -2
- package/dist/{ConnectionsDrawer-DabiwV9L.mjs → ConnectionsDrawer-Dkb4vBmt.mjs} +3 -3
- package/dist/{CurrencyInput-CC5cwVit.mjs → CurrencyInput-C4xNRL2W.mjs} +1 -1
- package/dist/{DateUtil-CBdcsyuk.mjs → DateUtil-BcuH7ErC.mjs} +3 -3
- package/dist/{DebtsStore-9aR2sTJQ.mjs → DebtsStore-D4grpB4m.mjs} +1 -1
- package/dist/{Dialog-BPTr3qHE.mjs → Dialog-CWW597AF.mjs} +2 -2
- package/dist/Drawer-kEE73B87.mjs +113 -0
- package/dist/{ExportCsvAction-Um-CDa4C.mjs → ExportCsvAction-CBJAfyAw.mjs} +3 -3
- package/dist/FinstrongStore-F2c607dj.mjs +101 -0
- package/dist/{GoalStore-CiBKZvTg.mjs → GoalStore-B5MZzPLZ.mjs} +3 -3
- package/dist/{Help-BZ8pIkkR.mjs → Help-CzBAsKA2.mjs} +2 -2
- package/dist/LineChart-B35qvXik.mjs +541 -0
- package/dist/{ListItemAction-DGaxy7oz.mjs → ListItemAction-DSrYDGAP.mjs} +10 -10
- package/dist/{ManageIncome-BaNgfwr5.mjs → ManageIncome-DUuT-yMV.mjs} +32 -34
- package/dist/{MicroWidgetContainer-C3iV1FBR.mjs → MicroWidgetContainer-C4QQHfD7.mjs} +1 -1
- package/dist/{MiniWidgetContainer-LtXXgZ6H.mjs → MiniWidgetContainer-DTQdRK-3.mjs} +1 -1
- package/dist/{NetWorthStore-MnpP5KEc.mjs → NetWorthStore-Do1Gk8Te.mjs} +2 -2
- package/dist/{NotificationSettings-Ckx8tgQj.mjs → NotificationSettings-BuShgjn6.mjs} +5 -5
- package/dist/{OriginalBalanceAction-CGZDUsCc.mjs → OriginalBalanceAction-BsxcvNEF.mjs} +3 -3
- package/dist/{RecurringSettings-DE4T4yQy.mjs → RecurringSettings-BVOt46uV.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-DRlrltGq.mjs → TransactionDetails-_cXLXTd3.mjs} +8 -11
- package/dist/{TransactionStore-D8MKYDMb.mjs → TransactionStore-B-Tq_YFE.mjs} +3 -3
- package/dist/{TrendsStore-DL3Vuh71.mjs → TrendsStore-ZZ8X36lJ.mjs} +14 -14
- package/dist/{User-BthIKO4w.mjs → User-DaJAQ09j.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-DTtQNV3D.mjs → ViewMoreMicroCard-664i7l19.mjs} +487 -533
- package/dist/{WidgetContainer-DJA1bxLn.mjs → WidgetContainer-DtPnPQZY.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 +12 -12
- package/dist/cashflow/index.es.js +11 -11
- 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 +0 -2
- package/dist/common/components/charts/linechart/CustomMark.d.ts +0 -2
- package/dist/common/components/drawer/Drawer.d.ts +0 -3
- package/dist/common/index.es.js +33 -33
- 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 -57
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-XqdHNe2V.mjs → exportTransactionsToCSV-D8TTNrrE.mjs} +2 -2
- package/dist/finstrong/api/FinstrongApi.d.ts +0 -5
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +1 -2
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -1
- 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 +1010 -2892
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -9
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -65
- 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-CBST3rkm.mjs → hooks-CE2TKk4a.mjs} +3 -3
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/components/beaticons/BeatIcon.d.ts +0 -2
- package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/components/microBeatCarousel/CarouselControls.d.ts +0 -2
- package/dist/microinsights/index.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -4
- 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 +373 -222
- package/dist/transactions/index.es.js +15 -15
- package/dist/trends/index.es.js +16 -16
- package/dist/{useAccountDisplayName-DH1CuQ9R.mjs → useAccountDisplayName-BXGkZN5B.mjs} +2 -2
- package/dist/{useInsightsEnabled-jdvS1ppf.mjs → useInsightsEnabled-DSnpkUq0.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Drawer-BEtCk82g.mjs +0 -163
- package/dist/FinstrongStore-CC4SrBjA.mjs +0 -436
- package/dist/LineChart-CE3oLBQ0.mjs +0 -566
- package/dist/SpendingLegend-D24CEkL3.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/CreditOverTimeGraph.d.ts +0 -1
- 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,192 @@
|
|
|
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 { f as
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { observer as x } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as nt } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
6
|
+
import D 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 mt from "@mui/material/styles/useTheme";
|
|
11
|
+
import { b as V } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
12
|
+
import { b } from "../Category-CevNQ03n.mjs";
|
|
13
|
+
import { Text as f, CategoryIcon as ht, CategoryIconVariants as ft } from "@mxenabled/mxui";
|
|
14
|
+
import { f as A } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
15
|
+
import yt from "@mui/material/Button";
|
|
16
|
+
import { useTheme as it } from "@mui/material";
|
|
17
|
+
import { u as w, b as R, m as z, d as rt, a as st, h as Ct, g as _t } from "../hooks-CE2TKk4a.mjs";
|
|
18
|
+
import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
19
|
+
import { D as bt } from "../Donut-1UMNcG67.mjs";
|
|
20
|
+
import { L as F } from "../Loader-DUaFpDGv.mjs";
|
|
21
|
+
import { M as St } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
22
|
+
import { startOfToday as U } from "date-fns/startOfToday";
|
|
23
|
+
import { T as Tt, a as Mt } from "../TransactionDetails-_cXLXTd3.mjs";
|
|
24
|
+
import Dt from "@mui/material/Collapse";
|
|
21
25
|
import B from "@mui/material/Divider";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
import q from "@mui/material/List";
|
|
27
|
+
import J from "@mui/material/ListItem";
|
|
28
|
+
import xt from "@mui/material/ListItemButton";
|
|
29
|
+
import { D as Q } from "../Drawer-kEE73B87.mjs";
|
|
30
|
+
import { A as Z, W as wt } from "../WidgetContainer-DtPnPQZY.mjs";
|
|
31
|
+
const j = 5, vt = (n, l, r) => r.reduce((i, c) => {
|
|
32
|
+
if (c.total > 0) {
|
|
33
|
+
const a = n.find((s) => s.guid === c.category_guid);
|
|
34
|
+
if (!a) return i;
|
|
35
|
+
const o = a.parent_guid ?? a.guid, e = n.find((s) => s.guid === o);
|
|
36
|
+
if (!e) return i;
|
|
37
|
+
const d = {
|
|
38
|
+
guid: a.guid,
|
|
39
|
+
name: a.guid === o ? `General ${a.name}` : a.name,
|
|
40
|
+
color: V(e.guid, l),
|
|
41
|
+
amount: c.total
|
|
42
|
+
}, u = i.find((s) => s.guid === o);
|
|
43
|
+
u ? (u.amount += c.total, u.categoryTotals?.push(d)) : i.push({
|
|
44
|
+
guid: o,
|
|
45
|
+
name: e.name,
|
|
46
|
+
color: V(e.guid, l),
|
|
47
|
+
categoryTotals: [d],
|
|
48
|
+
amount: c.total
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return i;
|
|
52
|
+
}, []), lt = (n, l, r, i) => {
|
|
53
|
+
const c = vt(n, r, i), a = c.filter(
|
|
54
|
+
(s) => s.guid !== b.INCOME && s.guid !== b.INVESTMENTS && s.guid !== b.TRANSFER
|
|
55
|
+
).sort((s, g) => g.amount - s.amount), o = a.reduce(
|
|
56
|
+
(s, g) => s + g.amount,
|
|
57
|
+
0
|
|
58
|
+
), e = a.length > j ? j : a.length, d = a.slice(0, e), u = d.map((s) => ({
|
|
59
|
+
id: s.guid,
|
|
60
|
+
color: V(s.guid, r),
|
|
61
|
+
label: s.name,
|
|
62
|
+
value: s.amount / o * 100
|
|
63
|
+
}));
|
|
64
|
+
if (a.length > 5) {
|
|
65
|
+
const s = a.slice(j, c.length), g = s.reduce(
|
|
66
|
+
(S, _) => S + _.amount,
|
|
67
|
+
0
|
|
68
|
+
);
|
|
69
|
+
d.push({
|
|
70
|
+
guid: "other",
|
|
71
|
+
color: r.palette.categories.others || "",
|
|
72
|
+
name: l.saving_goal_other,
|
|
73
|
+
categoryTotals: s,
|
|
74
|
+
amount: g
|
|
75
|
+
}), u.push({
|
|
76
|
+
id: "other",
|
|
77
|
+
color: r.palette.categories.others || "",
|
|
78
|
+
label: l.saving_goal_other,
|
|
79
|
+
value: g / o * 100
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
categoryData: d,
|
|
84
|
+
donutData: u,
|
|
85
|
+
totalAmount: o
|
|
86
|
+
};
|
|
87
|
+
}, dt = (n, l, r) => {
|
|
88
|
+
const i = n.filter(
|
|
89
|
+
(e) => e.guid === b.INCOME || e.parent_guid === b.INCOME
|
|
90
|
+
), c = l.filter((e) => i.some((d) => d.guid === e.category_guid)).sort((e, d) => e.total - d.total).map((e, d) => ({
|
|
91
|
+
guid: e.category_guid,
|
|
92
|
+
name: n.find((u) => u.guid === e.category_guid)?.name,
|
|
93
|
+
color: r[d],
|
|
94
|
+
categoryTotals: [],
|
|
95
|
+
amount: Math.abs(e.total)
|
|
96
|
+
})), a = c.reduce(
|
|
97
|
+
(e, d) => e + d.amount,
|
|
98
|
+
0
|
|
99
|
+
), o = c.map((e) => ({
|
|
100
|
+
id: e.guid,
|
|
101
|
+
color: e.color,
|
|
102
|
+
label: e.name,
|
|
103
|
+
value: e.amount / a * 100
|
|
104
|
+
}));
|
|
105
|
+
return {
|
|
106
|
+
categoryData: c,
|
|
107
|
+
donutData: o,
|
|
108
|
+
totalAmount: a
|
|
109
|
+
};
|
|
110
|
+
}, W = ({ amount: n, label: l }) => /* @__PURE__ */ m(C, { direction: "column", children: [
|
|
111
|
+
/* @__PURE__ */ t(f, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: l }),
|
|
112
|
+
/* @__PURE__ */ t(f, { variant: "XSmall", children: A(n, "0,0") })
|
|
113
|
+
] }), At = ({
|
|
114
|
+
data: n,
|
|
115
|
+
isIncome: l = !1,
|
|
116
|
+
onSelected: r,
|
|
117
|
+
onViewTransactions: i,
|
|
118
|
+
selectedId: c,
|
|
119
|
+
size: a = 150,
|
|
120
|
+
totalLabel: o,
|
|
121
|
+
variant: e = "mini"
|
|
122
|
+
}) => {
|
|
123
|
+
const { spending: d } = w(), u = it(), { isTablet: s } = ct(), g = p.useMemo(
|
|
124
|
+
() => c ? n.categoryData.find((v) => v.guid === c) : void 0,
|
|
125
|
+
[c]
|
|
126
|
+
), S = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), _ = () => {
|
|
127
|
+
i?.(c);
|
|
128
|
+
}, y = s ? 32 : 48;
|
|
129
|
+
return /* @__PURE__ */ t(bt, { data: S, onClick: r, selectedId: c, size: a, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ m(C, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: [
|
|
130
|
+
g && /* @__PURE__ */ m(
|
|
131
|
+
C,
|
|
132
|
+
{
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
gap: e === "mini" ? 0 : 8,
|
|
135
|
+
mb: e === "mini" ? 0 : 8,
|
|
136
|
+
mt: e === "mini" ? 0 : -16,
|
|
137
|
+
sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ t(
|
|
140
|
+
ht,
|
|
141
|
+
{
|
|
142
|
+
categoryGuid: l ? b.INCOME : g.guid,
|
|
143
|
+
size: e === "mini" ? 24 : y,
|
|
144
|
+
variant: ft.Transparent
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ t(f, { color: "secondary", noWrap: !0, variant: e === "mini" ? "Tiny" : "Body", children: g ? g.name : o })
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
!g && e === "full" && /* @__PURE__ */ t(f, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: o }),
|
|
152
|
+
/* @__PURE__ */ t(f, { variant: e === "mini" ? "H2" : "H1", children: g ? A(g.amount, "0,0") : A(n.totalAmount, "0,0") }),
|
|
153
|
+
!g && e === "mini" && /* @__PURE__ */ t(f, { color: "secondary", noWrap: !0, variant: "Tiny", children: o }),
|
|
154
|
+
e === "full" && /* @__PURE__ */ t(
|
|
155
|
+
yt,
|
|
156
|
+
{
|
|
157
|
+
"aria-label": `View ${g?.name || ""} Transactions`,
|
|
158
|
+
disabled: n.categoryData.length === 0,
|
|
159
|
+
onClick: _,
|
|
160
|
+
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
161
|
+
variant: "text",
|
|
162
|
+
children: d.view_transactions
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] }) }) });
|
|
166
|
+
}, O = x(At), tt = ({ data: n, onSelected: l, selectedId: r }) => /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((i) => /* @__PURE__ */ m(
|
|
167
|
+
C,
|
|
168
|
+
{
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
"aria-label": i.name,
|
|
171
|
+
"aria-selected": i.guid === r,
|
|
172
|
+
direction: "row",
|
|
173
|
+
gap: 8,
|
|
174
|
+
onClick: () => l(i.guid),
|
|
175
|
+
role: "button",
|
|
176
|
+
sx: { cursor: "pointer" },
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ t(D, { borderRadius: 4, height: 8, sx: { backgroundColor: i.color }, width: 8 }),
|
|
179
|
+
/* @__PURE__ */ t(f, { bold: i.guid === r, variant: "XSmall", children: i.name })
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
i.guid
|
|
183
|
+
)) }), Et = () => {
|
|
184
|
+
const n = mt(), { goals: l, spending: r } = w(), { selectedAccounts: i } = R(), {
|
|
34
185
|
categories: c,
|
|
35
|
-
dateRangeCategoryTotals:
|
|
36
|
-
dataRangeTotalsLoaded:
|
|
37
|
-
loadDateRangeCategoryTotals:
|
|
38
|
-
} =
|
|
186
|
+
dateRangeCategoryTotals: a,
|
|
187
|
+
dataRangeTotalsLoaded: o,
|
|
188
|
+
loadDateRangeCategoryTotals: e
|
|
189
|
+
} = z(), d = p.useMemo(
|
|
39
190
|
() => [
|
|
40
191
|
n.palette.chartMono.chartMono5,
|
|
41
192
|
n.palette.chartMono.chartMono4,
|
|
@@ -46,145 +197,145 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
46
197
|
],
|
|
47
198
|
[n]
|
|
48
199
|
);
|
|
49
|
-
|
|
50
|
-
|
|
200
|
+
p.useEffect(() => {
|
|
201
|
+
e(
|
|
51
202
|
i,
|
|
52
|
-
|
|
53
|
-
|
|
203
|
+
nt(/* @__PURE__ */ new Date()),
|
|
204
|
+
ot(/* @__PURE__ */ new Date())
|
|
54
205
|
).finally();
|
|
55
206
|
}, [i]);
|
|
56
|
-
const [
|
|
57
|
-
() =>
|
|
58
|
-
[c,
|
|
59
|
-
),
|
|
60
|
-
() =>
|
|
61
|
-
[c,
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
207
|
+
const [u, s] = p.useState(""), [g, S] = p.useState(0), _ = p.useMemo(
|
|
208
|
+
() => lt(c, l, n, a),
|
|
209
|
+
[c, a]
|
|
210
|
+
), y = p.useMemo(
|
|
211
|
+
() => dt(c, a, d),
|
|
212
|
+
[c, a, d]
|
|
213
|
+
), v = (E, L) => {
|
|
214
|
+
S(L), s("");
|
|
215
|
+
}, M = (E) => {
|
|
216
|
+
s(u === E ? "" : E);
|
|
66
217
|
};
|
|
67
|
-
return
|
|
68
|
-
/* @__PURE__ */
|
|
218
|
+
return o ? /* @__PURE__ */ m(D, { width: "100%", children: [
|
|
219
|
+
/* @__PURE__ */ m(at, { onChange: v, value: g, variant: "fullWidth", children: [
|
|
69
220
|
/* @__PURE__ */ t(
|
|
70
|
-
|
|
221
|
+
N,
|
|
71
222
|
{
|
|
72
223
|
label: /* @__PURE__ */ t(
|
|
73
|
-
|
|
224
|
+
W,
|
|
74
225
|
{
|
|
75
|
-
amount:
|
|
76
|
-
label:
|
|
226
|
+
amount: _.totalAmount,
|
|
227
|
+
label: r.spend_tab_title
|
|
77
228
|
}
|
|
78
229
|
)
|
|
79
230
|
}
|
|
80
231
|
),
|
|
81
232
|
/* @__PURE__ */ t(
|
|
82
|
-
|
|
233
|
+
N,
|
|
83
234
|
{
|
|
84
235
|
label: /* @__PURE__ */ t(
|
|
85
|
-
|
|
236
|
+
W,
|
|
86
237
|
{
|
|
87
|
-
amount:
|
|
88
|
-
label:
|
|
238
|
+
amount: y.totalAmount,
|
|
239
|
+
label: r.income_tab_title
|
|
89
240
|
}
|
|
90
241
|
)
|
|
91
242
|
}
|
|
92
243
|
)
|
|
93
244
|
] }),
|
|
94
|
-
|
|
245
|
+
g === 0 && /* @__PURE__ */ t(D, { children: /* @__PURE__ */ m(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
95
246
|
/* @__PURE__ */ t(
|
|
96
|
-
|
|
247
|
+
O,
|
|
97
248
|
{
|
|
98
|
-
data:
|
|
99
|
-
onSelected:
|
|
100
|
-
selectedId:
|
|
101
|
-
totalLabel:
|
|
249
|
+
data: _,
|
|
250
|
+
onSelected: M,
|
|
251
|
+
selectedId: u,
|
|
252
|
+
totalLabel: r.total_spending
|
|
102
253
|
}
|
|
103
254
|
),
|
|
104
255
|
/* @__PURE__ */ t(
|
|
105
|
-
|
|
256
|
+
tt,
|
|
106
257
|
{
|
|
107
|
-
data:
|
|
108
|
-
onSelected:
|
|
109
|
-
selectedId:
|
|
258
|
+
data: _,
|
|
259
|
+
onSelected: M,
|
|
260
|
+
selectedId: u
|
|
110
261
|
}
|
|
111
262
|
)
|
|
112
263
|
] }) }),
|
|
113
|
-
|
|
264
|
+
g === 1 && /* @__PURE__ */ t(D, { children: /* @__PURE__ */ m(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
114
265
|
/* @__PURE__ */ t(
|
|
115
|
-
|
|
266
|
+
O,
|
|
116
267
|
{
|
|
117
|
-
data:
|
|
268
|
+
data: y,
|
|
118
269
|
isIncome: !0,
|
|
119
|
-
onSelected:
|
|
120
|
-
selectedId:
|
|
121
|
-
totalLabel:
|
|
270
|
+
onSelected: M,
|
|
271
|
+
selectedId: u,
|
|
272
|
+
totalLabel: r.total_income
|
|
122
273
|
}
|
|
123
274
|
),
|
|
124
|
-
/* @__PURE__ */ t(
|
|
275
|
+
/* @__PURE__ */ t(tt, { data: y, onSelected: M, selectedId: u })
|
|
125
276
|
] }) })
|
|
126
|
-
] }) : /* @__PURE__ */ t(
|
|
127
|
-
},
|
|
128
|
-
const { visibleAccounts:
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
}, [
|
|
132
|
-
|
|
277
|
+
] }) : /* @__PURE__ */ t(F, { height: 250 });
|
|
278
|
+
}, It = x(Et), Lt = ({ onPrimaryCtaClick: n, sx: l = {} }) => {
|
|
279
|
+
const { visibleAccounts: r } = rt(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: a, setSelectedAccounts: o } = R();
|
|
280
|
+
return p.useEffect(() => {
|
|
281
|
+
o(r);
|
|
282
|
+
}, [r]), !c || !a ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
283
|
+
St,
|
|
133
284
|
{
|
|
134
285
|
className: "mx-exp-spending-miniwidget",
|
|
135
286
|
onPrimaryCtaClick: n,
|
|
136
287
|
primaryCtaLabel: i.primary_cta,
|
|
137
|
-
sx:
|
|
288
|
+
sx: l,
|
|
138
289
|
title: i.mini_title,
|
|
139
|
-
children: /* @__PURE__ */ t(
|
|
290
|
+
children: /* @__PURE__ */ t(It, {})
|
|
140
291
|
}
|
|
141
292
|
);
|
|
142
|
-
},
|
|
293
|
+
}, he = x(Lt), Nt = ({
|
|
143
294
|
data: n,
|
|
144
|
-
onSelected:
|
|
145
|
-
selectedId:
|
|
295
|
+
onSelected: l,
|
|
296
|
+
selectedId: r = "",
|
|
146
297
|
title: i
|
|
147
298
|
}) => {
|
|
148
|
-
const { spending: c } = w(),
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */ t(
|
|
299
|
+
const { spending: c } = w(), a = n.categoryData.find((o) => o.guid === r);
|
|
300
|
+
return /* @__PURE__ */ m(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
301
|
+
/* @__PURE__ */ t(f, { bold: !0, sx: { py: 12 }, children: `${i} ${c.by_category}` }),
|
|
151
302
|
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
152
|
-
/* @__PURE__ */ t(
|
|
303
|
+
/* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ m(p.Fragment, { children: [
|
|
153
304
|
/* @__PURE__ */ t(
|
|
154
|
-
|
|
305
|
+
J,
|
|
155
306
|
{
|
|
156
307
|
disableGutters: !0,
|
|
157
308
|
disablePadding: !0,
|
|
158
309
|
sx: {
|
|
159
310
|
minHeight: 44
|
|
160
311
|
},
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
-
|
|
312
|
+
children: /* @__PURE__ */ m(
|
|
313
|
+
xt,
|
|
163
314
|
{
|
|
164
|
-
"aria-expanded":
|
|
165
|
-
onClick: () =>
|
|
315
|
+
"aria-expanded": a?.guid === o.guid,
|
|
316
|
+
onClick: () => l(o.guid),
|
|
166
317
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
167
318
|
children: [
|
|
168
319
|
/* @__PURE__ */ t(
|
|
169
|
-
|
|
320
|
+
D,
|
|
170
321
|
{
|
|
171
322
|
borderRadius: 4,
|
|
172
323
|
flexShrink: 0,
|
|
173
324
|
height: 8,
|
|
174
|
-
sx: { backgroundColor:
|
|
325
|
+
sx: { backgroundColor: o.color, mr: 8 },
|
|
175
326
|
width: 8
|
|
176
327
|
}
|
|
177
328
|
),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
329
|
+
/* @__PURE__ */ m(
|
|
330
|
+
C,
|
|
180
331
|
{
|
|
181
332
|
alignItems: "center",
|
|
182
333
|
direction: "row",
|
|
183
334
|
justifyContent: "space-between",
|
|
184
335
|
width: "100%",
|
|
185
336
|
children: [
|
|
186
|
-
/* @__PURE__ */ t(
|
|
187
|
-
/* @__PURE__ */ t(
|
|
337
|
+
/* @__PURE__ */ t(f, { bold: r === o.guid, children: o.name }),
|
|
338
|
+
/* @__PURE__ */ t(f, { bold: r === o.guid, variant: "Body", children: A(o.amount, "0,0") })
|
|
188
339
|
]
|
|
189
340
|
}
|
|
190
341
|
)
|
|
@@ -194,50 +345,50 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
194
345
|
}
|
|
195
346
|
),
|
|
196
347
|
/* @__PURE__ */ t(B, {}),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
348
|
+
o.categoryTotals && o.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in: a?.guid === o.guid, unmountOnExit: !0, children: /* @__PURE__ */ m(q, { children: [
|
|
349
|
+
a?.categoryTotals?.map((e) => /* @__PURE__ */ t(
|
|
350
|
+
J,
|
|
200
351
|
{
|
|
201
352
|
sx: {
|
|
202
353
|
pl: 24,
|
|
203
354
|
pr: 8,
|
|
204
355
|
py: 0
|
|
205
356
|
},
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
|
|
357
|
+
children: /* @__PURE__ */ m(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
358
|
+
/* @__PURE__ */ m(f, { children: [
|
|
359
|
+
e.name,
|
|
209
360
|
" "
|
|
210
361
|
] }),
|
|
211
|
-
/* @__PURE__ */ t(
|
|
362
|
+
/* @__PURE__ */ t(f, { children: A(e.amount, "0,0") })
|
|
212
363
|
] })
|
|
213
364
|
},
|
|
214
|
-
|
|
365
|
+
e.guid
|
|
215
366
|
)),
|
|
216
367
|
/* @__PURE__ */ t(B, {})
|
|
217
368
|
] }) })
|
|
218
|
-
] },
|
|
219
|
-
/* @__PURE__ */ t(
|
|
369
|
+
] }, o.guid)) }),
|
|
370
|
+
/* @__PURE__ */ t(f, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${c.total}: ${A(n.totalAmount, "0,0")}` })
|
|
220
371
|
] });
|
|
221
|
-
},
|
|
372
|
+
}, Wt = x(Nt), Ot = ({
|
|
222
373
|
data: n,
|
|
223
|
-
onSelected:
|
|
224
|
-
onViewTransactions:
|
|
374
|
+
onSelected: l,
|
|
375
|
+
onViewTransactions: r,
|
|
225
376
|
selectedId: i,
|
|
226
377
|
title: c
|
|
227
378
|
}) => {
|
|
228
|
-
const { isDesktop:
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
|
|
379
|
+
const { isDesktop: a, isMobile: o } = ct(), { isLoadingCategoryTotals: e } = z(), { spending: d } = w();
|
|
380
|
+
return /* @__PURE__ */ m(
|
|
381
|
+
C,
|
|
231
382
|
{
|
|
232
|
-
alignItems:
|
|
233
|
-
direction:
|
|
383
|
+
alignItems: o ? "center" : "flex-start",
|
|
384
|
+
direction: o ? "column" : "row",
|
|
234
385
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
235
386
|
justifyContent: "center",
|
|
236
387
|
pt: 50,
|
|
237
388
|
px: 8,
|
|
238
389
|
children: [
|
|
239
|
-
|
|
240
|
-
|
|
390
|
+
e && /* @__PURE__ */ t(
|
|
391
|
+
O,
|
|
241
392
|
{
|
|
242
393
|
data: {
|
|
243
394
|
categoryData: [],
|
|
@@ -247,173 +398,173 @@ const R = ({ amount: n, label: r }) => /* @__PURE__ */ d(b, { direction: "column
|
|
|
247
398
|
onSelected: () => {
|
|
248
399
|
},
|
|
249
400
|
selectedId: "",
|
|
250
|
-
size:
|
|
401
|
+
size: a ? 400 : 300,
|
|
251
402
|
totalLabel: "Loading ...",
|
|
252
403
|
variant: "full"
|
|
253
404
|
}
|
|
254
405
|
),
|
|
255
|
-
!
|
|
256
|
-
|
|
406
|
+
!e && /* @__PURE__ */ t(
|
|
407
|
+
O,
|
|
257
408
|
{
|
|
258
409
|
data: n,
|
|
259
|
-
onSelected:
|
|
260
|
-
onViewTransactions:
|
|
410
|
+
onSelected: l,
|
|
411
|
+
onViewTransactions: r,
|
|
261
412
|
selectedId: i,
|
|
262
|
-
size:
|
|
263
|
-
totalLabel:
|
|
413
|
+
size: a ? 400 : 300,
|
|
414
|
+
totalLabel: d.total_amount,
|
|
264
415
|
variant: "full"
|
|
265
416
|
}
|
|
266
417
|
),
|
|
267
|
-
/* @__PURE__ */ t(
|
|
418
|
+
/* @__PURE__ */ t(Wt, { data: n, onSelected: l, selectedId: i, title: c })
|
|
268
419
|
]
|
|
269
420
|
}
|
|
270
421
|
);
|
|
271
|
-
},
|
|
422
|
+
}, et = x(Ot), Rt = (n) => [
|
|
272
423
|
n.palette.chartMono.chartMono5,
|
|
273
424
|
n.palette.chartMono.chartMono4,
|
|
274
425
|
n.palette.chartMono.chartMono3,
|
|
275
426
|
n.palette.chartMono.chartMono2,
|
|
276
427
|
n.palette.chartMono.chartMono1,
|
|
277
428
|
n.palette.chartMono.chartMono6
|
|
278
|
-
],
|
|
279
|
-
const n =
|
|
280
|
-
|
|
429
|
+
], Gt = () => {
|
|
430
|
+
const n = it(), { clientConfig: l } = st(), { categories: r, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: c } = z(), { goals: a, spending: o } = w(), { displayedDateRange: e, selectedAccounts: d, selectedAccountGuids: u } = R(), { setFilter: s, sortedTransactions: g } = Ct(), S = l?.master?.deep_link_params?.account_guids, _ = l?.master?.deep_link_params?.view, [y, v] = p.useState(""), [M, E] = p.useState(_ === "income" ? 1 : 0), [L, H] = p.useState(""), [gt, P] = p.useState(!1);
|
|
431
|
+
p.useEffect(() => {
|
|
281
432
|
c(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
433
|
+
d,
|
|
434
|
+
e.start,
|
|
435
|
+
e.end
|
|
285
436
|
).finally();
|
|
286
|
-
}, [
|
|
287
|
-
const
|
|
288
|
-
() =>
|
|
289
|
-
[
|
|
290
|
-
),
|
|
291
|
-
() =>
|
|
292
|
-
[
|
|
293
|
-
), k =
|
|
294
|
-
() =>
|
|
295
|
-
[
|
|
296
|
-
),
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
}, K = (
|
|
301
|
-
const
|
|
302
|
-
accounts:
|
|
303
|
-
dateRange:
|
|
437
|
+
}, [d, e]);
|
|
438
|
+
const G = p.useMemo(
|
|
439
|
+
() => lt(r, a, n, i),
|
|
440
|
+
[r, i]
|
|
441
|
+
), X = p.useMemo(
|
|
442
|
+
() => dt(r, i, Rt(n)),
|
|
443
|
+
[r, i]
|
|
444
|
+
), k = p.useMemo(
|
|
445
|
+
() => g.find((h) => h.guid === L),
|
|
446
|
+
[L, g]
|
|
447
|
+
), ut = (h, I) => {
|
|
448
|
+
E(I), v("");
|
|
449
|
+
}, Y = (h) => {
|
|
450
|
+
v(y === h || h === "0" ? "" : h);
|
|
451
|
+
}, K = (h) => {
|
|
452
|
+
const I = {
|
|
453
|
+
accounts: S || u,
|
|
454
|
+
dateRange: e
|
|
304
455
|
};
|
|
305
|
-
if (
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
...
|
|
310
|
-
custom: (
|
|
456
|
+
if (M === 0)
|
|
457
|
+
if (h === "other") {
|
|
458
|
+
const T = G.categoryData.find(($) => $.guid === "other");
|
|
459
|
+
s({
|
|
460
|
+
...I,
|
|
461
|
+
custom: ($) => !!T?.categoryTotals?.find((pt) => pt.guid === $.top_level_category_guid)
|
|
311
462
|
});
|
|
312
463
|
} else
|
|
313
|
-
|
|
314
|
-
...
|
|
315
|
-
custom: (
|
|
316
|
-
showSplits: !!
|
|
464
|
+
s({
|
|
465
|
+
...I,
|
|
466
|
+
custom: (T) => h ? T.top_level_category_guid === h : T.top_level_category_guid !== b.INCOME && T.top_level_category_guid !== b.INVESTMENTS && T.top_level_category_guid !== b.TRANSFER,
|
|
467
|
+
showSplits: !!h
|
|
317
468
|
});
|
|
318
469
|
else
|
|
319
|
-
|
|
320
|
-
...
|
|
321
|
-
custom: (
|
|
470
|
+
s({
|
|
471
|
+
...I,
|
|
472
|
+
custom: (T) => h ? T.category_guid === h : T.category_guid === b.INCOME || T.top_level_category_guid === b.INCOME
|
|
322
473
|
});
|
|
323
|
-
|
|
474
|
+
P(!0);
|
|
324
475
|
};
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
476
|
+
return /* @__PURE__ */ m(D, { children: [
|
|
477
|
+
/* @__PURE__ */ m(at, { onChange: ut, value: M, variant: "fullWidth", children: [
|
|
327
478
|
/* @__PURE__ */ t(
|
|
328
|
-
|
|
479
|
+
N,
|
|
329
480
|
{
|
|
330
481
|
label: /* @__PURE__ */ t(
|
|
331
|
-
|
|
482
|
+
W,
|
|
332
483
|
{
|
|
333
|
-
amount:
|
|
334
|
-
label:
|
|
484
|
+
amount: G.totalAmount,
|
|
485
|
+
label: o.spend_tab_title
|
|
335
486
|
}
|
|
336
487
|
)
|
|
337
488
|
}
|
|
338
489
|
),
|
|
339
490
|
/* @__PURE__ */ t(
|
|
340
|
-
|
|
491
|
+
N,
|
|
341
492
|
{
|
|
342
493
|
label: /* @__PURE__ */ t(
|
|
343
|
-
|
|
494
|
+
W,
|
|
344
495
|
{
|
|
345
|
-
amount:
|
|
346
|
-
label:
|
|
496
|
+
amount: X.totalAmount,
|
|
497
|
+
label: o.income_tab_title
|
|
347
498
|
}
|
|
348
499
|
)
|
|
349
500
|
}
|
|
350
501
|
)
|
|
351
502
|
] }),
|
|
352
|
-
|
|
353
|
-
|
|
503
|
+
M === 0 && /* @__PURE__ */ t(
|
|
504
|
+
et,
|
|
354
505
|
{
|
|
355
|
-
data:
|
|
356
|
-
onSelected:
|
|
506
|
+
data: G,
|
|
507
|
+
onSelected: Y,
|
|
357
508
|
onViewTransactions: K,
|
|
358
|
-
selectedId:
|
|
359
|
-
title:
|
|
509
|
+
selectedId: y,
|
|
510
|
+
title: o.spend_tab_title
|
|
360
511
|
}
|
|
361
512
|
),
|
|
362
|
-
|
|
363
|
-
|
|
513
|
+
M === 1 && /* @__PURE__ */ t(
|
|
514
|
+
et,
|
|
364
515
|
{
|
|
365
|
-
data:
|
|
366
|
-
onSelected:
|
|
516
|
+
data: X,
|
|
517
|
+
onSelected: Y,
|
|
367
518
|
onViewTransactions: K,
|
|
368
|
-
selectedId:
|
|
369
|
-
title:
|
|
519
|
+
selectedId: y,
|
|
520
|
+
title: o.income_tab_title
|
|
370
521
|
}
|
|
371
522
|
),
|
|
372
523
|
/* @__PURE__ */ t(
|
|
373
|
-
|
|
524
|
+
Q,
|
|
374
525
|
{
|
|
375
|
-
ariaLabelClose:
|
|
376
|
-
isOpen:
|
|
377
|
-
onClose: () =>
|
|
378
|
-
title:
|
|
379
|
-
children: /* @__PURE__ */ t(
|
|
526
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
527
|
+
isOpen: gt,
|
|
528
|
+
onClose: () => P(!1),
|
|
529
|
+
title: o.transactions_drawer_title,
|
|
530
|
+
children: /* @__PURE__ */ t(Tt, { onClick: H })
|
|
380
531
|
}
|
|
381
532
|
),
|
|
382
533
|
/* @__PURE__ */ t(
|
|
383
|
-
|
|
534
|
+
Q,
|
|
384
535
|
{
|
|
385
|
-
ariaLabelClose:
|
|
536
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
386
537
|
isOpen: !!k,
|
|
387
|
-
onClose: () =>
|
|
388
|
-
title:
|
|
389
|
-
children: k && /* @__PURE__ */ t(
|
|
538
|
+
onClose: () => H(""),
|
|
539
|
+
title: o.transaction_details_drawer_title,
|
|
540
|
+
children: k && /* @__PURE__ */ t(Mt, { transaction: k })
|
|
390
541
|
}
|
|
391
542
|
)
|
|
392
543
|
] });
|
|
393
|
-
},
|
|
394
|
-
const { visibleAccounts:
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}, [
|
|
398
|
-
|
|
544
|
+
}, kt = x(Gt), $t = ({ onBackClick: n, sx: l = {} }) => {
|
|
545
|
+
const { visibleAccounts: r } = rt(), { spending: i } = w(), { isCopyLoaded: c, isInitialized: a, setDisplayedDate: o, setSelectedAccounts: e } = R(), { onEvent: d } = _t(), { clientConfig: u } = st(), s = u?.master?.deep_link_params?.date_range, [g, S] = p.useState(!1);
|
|
546
|
+
p.useEffect(() => {
|
|
547
|
+
e(r);
|
|
548
|
+
}, [r]), p.useEffect(() => {
|
|
549
|
+
s && Array.isArray(s) && s.length === 2 ? o(s[0], s[1]) : o(nt(U()), ot(U())), S(!0), d(Z.SPENDING_VIEW);
|
|
399
550
|
}, []);
|
|
400
|
-
const
|
|
401
|
-
|
|
551
|
+
const _ = (y) => {
|
|
552
|
+
o(y[0], y[1]);
|
|
402
553
|
};
|
|
403
|
-
return !c || !
|
|
404
|
-
|
|
554
|
+
return !c || !a || !g ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
555
|
+
wt,
|
|
405
556
|
{
|
|
406
|
-
accountOptions:
|
|
407
|
-
calendarActions: { onRangeChanged:
|
|
408
|
-
onAccountsFilterClick: () =>
|
|
557
|
+
accountOptions: r,
|
|
558
|
+
calendarActions: { onRangeChanged: _ },
|
|
559
|
+
onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
|
|
409
560
|
onBackClick: n,
|
|
410
|
-
sx:
|
|
561
|
+
sx: l,
|
|
411
562
|
title: i.title,
|
|
412
|
-
children: /* @__PURE__ */ t(
|
|
563
|
+
children: /* @__PURE__ */ t(D, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(kt, {}) })
|
|
413
564
|
}
|
|
414
565
|
);
|
|
415
|
-
},
|
|
566
|
+
}, fe = x($t);
|
|
416
567
|
export {
|
|
417
|
-
|
|
418
|
-
|
|
568
|
+
he as SpendingMiniWidget,
|
|
569
|
+
fe as SpendingWidget
|
|
419
570
|
};
|