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