@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
package/dist/budgets/index.es.js
CHANGED
|
@@ -1,122 +1,123 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, jsx as e, Fragment as je } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { observer as I } from "mobx-react-lite";
|
|
4
|
-
import { endOfMonth as
|
|
5
|
-
import { startOfMonth as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { Text as y, CategoryIcon as
|
|
10
|
-
import
|
|
11
|
-
import { u as w, i as D, j as
|
|
4
|
+
import { endOfMonth as ge } from "date-fns/endOfMonth";
|
|
5
|
+
import { startOfMonth as J } from "date-fns/startOfMonth";
|
|
6
|
+
import H from "@mui/material/Box";
|
|
7
|
+
import B from "@mui/material/Stack";
|
|
8
|
+
import ee from "@mui/material/styles/useTheme";
|
|
9
|
+
import { Text as y, CategoryIcon as W, Icon as P, H1 as ze, H3 as ve } from "@mxenabled/mxui";
|
|
10
|
+
import K from "@mui/material/List";
|
|
11
|
+
import { u as w, i as D, j as te, m as U, q as ne, g as X, b as oe, h as ae, a as Ue, d as Ae } from "../hooks-D6XlXHf4.mjs";
|
|
12
12
|
import { f as T } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { b as
|
|
20
|
-
import { D as
|
|
13
|
+
import Te from "@mui/material/Button";
|
|
14
|
+
import re from "@mui/material/Divider";
|
|
15
|
+
import V from "@mui/material/ListItem";
|
|
16
|
+
import se from "@mui/material/ListItemAvatar";
|
|
17
|
+
import Y from "@mui/material/ListItemButton";
|
|
18
|
+
import Z from "@mui/material/ListItemText";
|
|
19
|
+
import { b as R } from "../Localization-2MODESHW.mjs";
|
|
20
|
+
import { D as $ } from "../Drawer-kEE73B87.mjs";
|
|
21
21
|
import Fe from "@mui/material/ListItemSecondaryAction";
|
|
22
|
-
import { C as He } from "../CurrencyInput-
|
|
23
|
-
import {
|
|
24
|
-
import { C as We } from "../ConnectionsDrawer-
|
|
22
|
+
import { C as He } from "../CurrencyInput-DUsQbkXb.mjs";
|
|
23
|
+
import { a as j } from "../Dialog-CWW597AF.mjs";
|
|
24
|
+
import { C as We } from "../ConnectionsDrawer-DHJ7qdWL.mjs";
|
|
25
25
|
import * as O from "d3";
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import Je from "@mui/material/
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
import he from "@mui/material/
|
|
43
|
-
import
|
|
44
|
-
import { S as
|
|
45
|
-
import {
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import rt from "
|
|
49
|
-
import
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
26
|
+
import Ke from "@mui/material/Tooltip";
|
|
27
|
+
import { useTheme as Xe } from "@mui/material/styles";
|
|
28
|
+
import { u as ie } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
29
|
+
import { L as z } from "../Loader-DUaFpDGv.mjs";
|
|
30
|
+
import { E as ue } from "../EmptyState-DA_lfRBv.mjs";
|
|
31
|
+
import { A as k, W as Ve } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
32
|
+
import { u as Ye } from "../BudgetUtil-B2ZXyw-g.mjs";
|
|
33
|
+
import { M as Ze } from "../MiniWidgetContainer-D0gfmbaF.mjs";
|
|
34
|
+
import { isAfter as qe } from "date-fns/isAfter";
|
|
35
|
+
import { startOfToday as q } from "date-fns/startOfToday";
|
|
36
|
+
import Je from "@mui/material/Alert";
|
|
37
|
+
import Qe from "@mui/material/Snackbar";
|
|
38
|
+
import _e from "@mui/material/Tab";
|
|
39
|
+
import et from "@mui/material/Tabs";
|
|
40
|
+
import { e as tt } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
|
|
41
|
+
import { T as we, a as nt } from "../TransactionDetails-DW7T0W0z.mjs";
|
|
42
|
+
import he from "@mui/material/Card";
|
|
43
|
+
import fe from "@mui/material/CardContent";
|
|
44
|
+
import { S as pe } from "../StatusBar-BK_uYHAB.mjs";
|
|
45
|
+
import { S as De } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
46
|
+
import { u as ot, b as at } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
|
|
47
|
+
import Ie from "@mui/material/CardHeader";
|
|
48
|
+
import { subDays as rt } from "date-fns/subDays";
|
|
49
|
+
import st from "@mui/material/IconButton";
|
|
50
|
+
import { M as it } from "../ManageIncome-CQPFKdYB.mjs";
|
|
51
|
+
const ct = I(() => {
|
|
52
|
+
const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = te(), s = i - o;
|
|
53
|
+
return /* @__PURE__ */ g(B, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
54
|
+
/* @__PURE__ */ g(B, { alignItems: "center", children: [
|
|
54
55
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(i, "0,0") }),
|
|
55
56
|
/* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.projected_income })
|
|
56
57
|
] }),
|
|
57
58
|
/* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ g(B, { alignItems: "center", children: [
|
|
59
60
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(o, "0,0") }),
|
|
60
61
|
/* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.budgeted })
|
|
61
62
|
] }),
|
|
62
63
|
/* @__PURE__ */ e(y, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ g(B, { alignItems: "center", children: [
|
|
64
65
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: T(s, "0,0") }),
|
|
65
66
|
/* @__PURE__ */ e(y, { color: "secondary", variant: "Small", children: t.remaining })
|
|
66
67
|
] })
|
|
67
68
|
] });
|
|
68
|
-
}),
|
|
69
|
+
}), lt = I(
|
|
69
70
|
({ category: t }) => {
|
|
70
71
|
const { budgets: o } = w(), { budgets: i } = D(), s = l.useMemo(() => {
|
|
71
|
-
const a = i.find((c) => c.category_guid === t.guid), n = T(t.totalAverageAmount, "0,0"), r = a ?
|
|
72
|
+
const a = i.find((c) => c.category_guid === t.guid), n = T(t.totalAverageAmount, "0,0"), r = a ? R(o.recalculate_previous_budget, T(a.amount, "0,0")) : o.recalculate_new_budget;
|
|
72
73
|
return `${n} - ${r}`;
|
|
73
74
|
}, [o, i]);
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
/* @__PURE__ */ e(
|
|
77
|
-
/* @__PURE__ */ e(
|
|
75
|
+
return /* @__PURE__ */ g(l.Fragment, { children: [
|
|
76
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { children: [
|
|
77
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
|
|
78
|
+
/* @__PURE__ */ e(Z, { primary: t.name, secondary: s })
|
|
78
79
|
] }) }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(re, {})
|
|
80
81
|
] }, t.guid);
|
|
81
82
|
}
|
|
82
|
-
),
|
|
83
|
-
const { budgets: o, common: i } = w(), { spendCategories: s } =
|
|
83
|
+
), dt = ({ onRecalculateBudgets: t }) => {
|
|
84
|
+
const { budgets: o, common: i } = w(), { spendCategories: s } = U(), { recalculateBudgets: a, setAlert: n } = D(), [r, c] = l.useState(!1), d = s.filter((u) => u.totalAverageAmount > 0), m = async () => {
|
|
84
85
|
await a(d), c(!1), n(o.alert_recalculated_budgets), t?.();
|
|
85
86
|
};
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */ e(
|
|
87
|
+
return /* @__PURE__ */ g(l.Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ e(Te, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
|
|
88
89
|
/* @__PURE__ */ e(y, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
|
|
89
90
|
/* @__PURE__ */ e(
|
|
90
|
-
|
|
91
|
+
$,
|
|
91
92
|
{
|
|
92
93
|
ariaLabelClose: i.close_aria,
|
|
93
94
|
isOpen: r,
|
|
94
95
|
onClose: () => c(!1),
|
|
95
|
-
onPrimaryAction:
|
|
96
|
+
onPrimaryAction: m,
|
|
96
97
|
title: o.recalculate_title,
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ g(B, { children: [
|
|
99
|
+
/* @__PURE__ */ g(B, { mx: 24, my: 16, children: [
|
|
99
100
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
|
|
100
101
|
/* @__PURE__ */ e(y, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
|
|
101
102
|
] }),
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
+
/* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: d.map((u) => /* @__PURE__ */ e(lt, { category: u }, u.guid)) }) })
|
|
103
104
|
] })
|
|
104
105
|
}
|
|
105
106
|
)
|
|
106
107
|
] });
|
|
107
|
-
},
|
|
108
|
+
}, ce = ({
|
|
108
109
|
amount: t,
|
|
109
110
|
categoryName: o,
|
|
110
111
|
onAmountChanged: i
|
|
111
112
|
}) => {
|
|
112
|
-
const { budgets: s } = w(), { totalBudgeted: a } = D(), { incomeTotal: n } =
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */ e(y, { children:
|
|
113
|
+
const { budgets: s } = w(), { totalBudgeted: a } = D(), { incomeTotal: n } = te(), r = n - a;
|
|
114
|
+
return /* @__PURE__ */ g(B, { gap: 16, children: [
|
|
115
|
+
/* @__PURE__ */ g(B, { children: [
|
|
116
|
+
/* @__PURE__ */ e(y, { children: R(
|
|
116
117
|
s.add_description_top,
|
|
117
118
|
T(r, "0,0")
|
|
118
119
|
) }),
|
|
119
|
-
/* @__PURE__ */ e(y, { children:
|
|
120
|
+
/* @__PURE__ */ e(y, { children: R(s.add_description_bottom, o) })
|
|
120
121
|
] }),
|
|
121
122
|
/* @__PURE__ */ e(
|
|
122
123
|
He,
|
|
@@ -130,24 +131,24 @@ const it = I(() => {
|
|
|
130
131
|
}
|
|
131
132
|
)
|
|
132
133
|
] });
|
|
133
|
-
},
|
|
134
|
+
}, ut = I(({ category: t, onAddBudget: o }) => {
|
|
134
135
|
const { budgets: i, common: s } = w(), [a, n] = l.useState(!1), [r, c] = l.useState(
|
|
135
136
|
`${t.totalAmount === 0 ? "" : t.totalAmount}`
|
|
136
137
|
);
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
138
|
+
return /* @__PURE__ */ g(l.Fragment, { children: [
|
|
139
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => n(!0), children: [
|
|
140
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid }) }),
|
|
140
141
|
/* @__PURE__ */ e(
|
|
141
|
-
|
|
142
|
+
Z,
|
|
142
143
|
{
|
|
143
144
|
primary: t.name,
|
|
144
145
|
secondary: T(t.totalAmount, "0,0")
|
|
145
146
|
}
|
|
146
147
|
),
|
|
147
|
-
/* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(
|
|
148
|
+
/* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(P, { name: "add", size: 20 }) })
|
|
148
149
|
] }) }, t.guid),
|
|
149
150
|
/* @__PURE__ */ e(
|
|
150
|
-
|
|
151
|
+
j,
|
|
151
152
|
{
|
|
152
153
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
153
154
|
disablePrimaryButton: Number(r) <= 0,
|
|
@@ -155,27 +156,27 @@ const it = I(() => {
|
|
|
155
156
|
onClose: () => n(!1),
|
|
156
157
|
onPrimaryAction: () => o(t, Number(r)),
|
|
157
158
|
primaryText: i.add_save_button,
|
|
158
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(ce, { amount: r, categoryName: t.name, onAmountChanged: c })
|
|
159
160
|
}
|
|
160
161
|
)
|
|
161
162
|
] });
|
|
162
|
-
}),
|
|
163
|
+
}), Ee = I(({ onRecalculateBudgets: t }) => {
|
|
163
164
|
const { budgets: o } = w(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = D(), n = async (r, c) => {
|
|
164
|
-
await i(r, c), s(
|
|
165
|
+
await i(r, c), s(R(o.alert_budget_created, r.name));
|
|
165
166
|
};
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */ e(
|
|
168
|
-
/* @__PURE__ */ e(
|
|
169
|
-
|
|
167
|
+
return /* @__PURE__ */ g(B, { children: [
|
|
168
|
+
/* @__PURE__ */ e(ct, {}),
|
|
169
|
+
/* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
|
|
170
|
+
ut,
|
|
170
171
|
{
|
|
171
172
|
category: r,
|
|
172
173
|
onAddBudget: n
|
|
173
174
|
},
|
|
174
175
|
r.guid
|
|
175
176
|
)) }) }),
|
|
176
|
-
/* @__PURE__ */ e(
|
|
177
|
+
/* @__PURE__ */ e(dt, { onRecalculateBudgets: t })
|
|
177
178
|
] });
|
|
178
|
-
}),
|
|
179
|
+
}), Ce = 5, Oe = 100, Q = 25, mt = (t) => {
|
|
179
180
|
const o = (a) => {
|
|
180
181
|
a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
|
|
181
182
|
}, i = (a) => {
|
|
@@ -184,14 +185,14 @@ const it = I(() => {
|
|
|
184
185
|
a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
|
|
185
186
|
};
|
|
186
187
|
return O.drag().on("start", o).on("drag", i).on("end", s);
|
|
187
|
-
},
|
|
188
|
+
}, gt = (t) => {
|
|
188
189
|
let o = t.transaction_total / t.amount;
|
|
189
190
|
o < 0 ? o = 0 : o > 1 && (o = 1);
|
|
190
|
-
const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius -
|
|
191
|
+
const i = o * 2 * Math.PI, s = O.interpolate(0, i), a = O.arc().cornerRadius(5).innerRadius(t.radius - Ce * 2).outerRadius(t.radius - Ce).startAngle(0).endAngle(0);
|
|
191
192
|
return (n) => (a.endAngle(s(n)), a(t) || "");
|
|
192
|
-
},
|
|
193
|
-
O.selectAll(".bubble").call(
|
|
194
|
-
},
|
|
193
|
+
}, pt = (t) => {
|
|
194
|
+
O.selectAll(".bubble").call(mt(t));
|
|
195
|
+
}, Be = (t, o, i) => Math.min(Math.max(t, o), i), ht = (t, o, i) => {
|
|
195
196
|
t.alpha(1).restart().force(
|
|
196
197
|
"x",
|
|
197
198
|
O.forceX().x(i / 2).strength(0.01)
|
|
@@ -201,18 +202,18 @@ const it = I(() => {
|
|
|
201
202
|
).on("tick", () => {
|
|
202
203
|
const s = t.nodes();
|
|
203
204
|
s.forEach((a) => {
|
|
204
|
-
const n = a.radius ??
|
|
205
|
-
a.x =
|
|
205
|
+
const n = a.radius ?? Q;
|
|
206
|
+
a.x = Be(a.x ?? 0, n, i - n), a.y = Be(a.y ?? 0, n, o - n);
|
|
206
207
|
}), O.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
|
|
207
208
|
});
|
|
208
|
-
},
|
|
209
|
+
}, Me = (t, o) => O.scaleLinear().domain([t, o]).range([Q, Oe]), ft = (t) => {
|
|
209
210
|
const o = t.reduce((n, r) => {
|
|
210
211
|
const c = Math.max(r.transaction_total, r.amount);
|
|
211
212
|
return c > n ? c : n;
|
|
212
213
|
}, 0), i = t.reduce((n, r) => {
|
|
213
214
|
const c = Math.max(r.transaction_total, r.amount);
|
|
214
215
|
return c < n ? c : n;
|
|
215
|
-
}, o), s =
|
|
216
|
+
}, o), s = Me(i, o), a = t.map((n) => {
|
|
216
217
|
const r = s(Math.max(n.transaction_total, n.amount)) || 25;
|
|
217
218
|
return {
|
|
218
219
|
...n,
|
|
@@ -220,25 +221,25 @@ const it = I(() => {
|
|
|
220
221
|
};
|
|
221
222
|
});
|
|
222
223
|
return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((n) => n.radius + 2).strength(0.7));
|
|
223
|
-
},
|
|
224
|
-
const a = Math.PI *
|
|
225
|
-
let u =
|
|
226
|
-
if (a <
|
|
227
|
-
const
|
|
228
|
-
u = Math.min(
|
|
224
|
+
}, bt = (t, o, i) => {
|
|
225
|
+
const a = Math.PI * Q ** 2 * t, n = i < 400 || o < 300, r = n ? 40 : 20, c = Math.max(100, i - r), d = Math.max(100, o - r), m = c * d;
|
|
226
|
+
let u = Q;
|
|
227
|
+
if (a < m) {
|
|
228
|
+
const f = Math.sqrt(m / (t * Math.PI)), h = Math.min(c, d) / 4;
|
|
229
|
+
u = Math.min(Oe, f, h);
|
|
229
230
|
}
|
|
230
231
|
return n && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
|
|
231
|
-
},
|
|
232
|
-
const { maxRadius: n, minRadius: r } =
|
|
232
|
+
}, yt = (t, o, i, s, a) => {
|
|
233
|
+
const { maxRadius: n, minRadius: r } = bt(t, o, a);
|
|
233
234
|
return O.scaleLinear().domain([s, i]).range([r, n]);
|
|
234
|
-
},
|
|
235
|
-
const n = o.map((
|
|
236
|
-
return t.map((
|
|
237
|
-
...
|
|
238
|
-
radius: d(Math.max(
|
|
235
|
+
}, _t = (t, o, i = !1, s, a) => {
|
|
236
|
+
const n = o.map((m) => Math.max(m.transaction_total, m.amount)), r = Math.min(...n), c = Math.max(...n), d = i ? yt(t.length, s, c, r, a) : Me(r, c);
|
|
237
|
+
return t.map((m) => ({
|
|
238
|
+
...m,
|
|
239
|
+
radius: d(Math.max(m.transaction_total, m.amount))
|
|
239
240
|
}));
|
|
240
|
-
}, Se = 5,
|
|
241
|
-
const o =
|
|
241
|
+
}, Se = 5, Ct = 2e3, Bt = ({ bubble: t }) => {
|
|
242
|
+
const o = ee(), {
|
|
242
243
|
amount: i,
|
|
243
244
|
guid: s,
|
|
244
245
|
budgetColors: { mercury: a },
|
|
@@ -246,9 +247,9 @@ const it = I(() => {
|
|
|
246
247
|
transaction_total: r
|
|
247
248
|
} = t, c = `mercury-${s}`;
|
|
248
249
|
l.useEffect(() => {
|
|
249
|
-
O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(
|
|
250
|
+
O.select(`.${c}`).selectAll(".status").remove(), O.select(`.${c}`).append("path").transition().duration(Ct).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => gt(t));
|
|
250
251
|
}, [i, n, r]);
|
|
251
|
-
const d = O.arc().innerRadius((
|
|
252
|
+
const d = O.arc().innerRadius((m) => m - 2 * Se).outerRadius((m) => m - Se).startAngle(0).endAngle(2 * Math.PI);
|
|
252
253
|
return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
|
|
253
254
|
"path",
|
|
254
255
|
{
|
|
@@ -256,10 +257,10 @@ const it = I(() => {
|
|
|
256
257
|
style: { fill: o.palette.common.white, fillOpacity: 0.35 }
|
|
257
258
|
}
|
|
258
259
|
) });
|
|
259
|
-
}, St = l.memo(
|
|
260
|
-
function
|
|
260
|
+
}, St = l.memo(Bt), G = 75, me = 50;
|
|
261
|
+
function xt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
261
262
|
} }) {
|
|
262
|
-
const [s, a] = l.useState(!1), { availableWidth:
|
|
263
|
+
const [s, a] = l.useState(!1), n = Xe(), { availableWidth: r } = ne(), c = l.useMemo(() => {
|
|
263
264
|
if (t)
|
|
264
265
|
return {
|
|
265
266
|
amount: t.amount,
|
|
@@ -271,144 +272,168 @@ function Bt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
271
272
|
}, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
|
|
272
273
|
if (!t) return;
|
|
273
274
|
const {
|
|
274
|
-
budgetColors: { background:
|
|
275
|
-
category: { icon:
|
|
276
|
-
guid:
|
|
277
|
-
description:
|
|
275
|
+
budgetColors: { background: d, text: m },
|
|
276
|
+
category: { icon: u, name: _ },
|
|
277
|
+
guid: f,
|
|
278
|
+
description: h,
|
|
278
279
|
radius: p,
|
|
279
|
-
x:
|
|
280
|
-
y:
|
|
281
|
-
} = t,
|
|
282
|
-
let
|
|
283
|
-
p >
|
|
284
|
-
let
|
|
285
|
-
p <=
|
|
286
|
-
const
|
|
280
|
+
x: S,
|
|
281
|
+
y: b
|
|
282
|
+
} = t, C = r < 400 ? -8 : -12;
|
|
283
|
+
let v = C, A = C;
|
|
284
|
+
p > G ? (v = -14, A = -45) : p > me && (A = -32);
|
|
285
|
+
let x = 32;
|
|
286
|
+
p <= G && (x = r < 400 ? 16 : 24);
|
|
287
|
+
const E = `${t.category.name}: ${h}`, M = {
|
|
287
288
|
modifiers: [
|
|
288
289
|
{
|
|
289
290
|
name: "offset",
|
|
290
291
|
options: { offset: [0, 15] }
|
|
291
292
|
}
|
|
292
293
|
]
|
|
294
|
+
}, N = (L) => {
|
|
295
|
+
(L.key === "Enter" || L.key === " ") && (L.preventDefault(), i(t));
|
|
296
|
+
}, F = () => {
|
|
297
|
+
a(!0);
|
|
298
|
+
}, le = () => {
|
|
299
|
+
a(!1);
|
|
293
300
|
};
|
|
294
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ g(
|
|
295
302
|
"g",
|
|
296
303
|
{
|
|
304
|
+
"aria-label": `${_} - ${h}`,
|
|
297
305
|
className: "bubble",
|
|
298
|
-
id: `bubble-${
|
|
306
|
+
id: `bubble-${f}`,
|
|
307
|
+
onBlur: le,
|
|
299
308
|
onClick: () => i(t),
|
|
309
|
+
onFocus: F,
|
|
310
|
+
onKeyDown: N,
|
|
300
311
|
onMouseEnter: () => a(!0),
|
|
301
312
|
onMouseLeave: () => a(!1),
|
|
313
|
+
role: "button",
|
|
302
314
|
style: { cursor: o ? "pointer" : "default" },
|
|
315
|
+
tabIndex: 0,
|
|
303
316
|
textAnchor: "middle",
|
|
304
|
-
x:
|
|
305
|
-
y:
|
|
317
|
+
x: S,
|
|
318
|
+
y: b,
|
|
306
319
|
children: [
|
|
320
|
+
/* @__PURE__ */ e("style", { children: `
|
|
321
|
+
.bubble:focus,
|
|
322
|
+
.bubble:focus-visible {
|
|
323
|
+
outline: none;
|
|
324
|
+
}
|
|
325
|
+
.bubble:focus circle,
|
|
326
|
+
.bubble:focus-visible circle {
|
|
327
|
+
stroke: ${n.palette.primary.main};
|
|
328
|
+
stroke-width: 3;
|
|
329
|
+
stroke-opacity: 0.8;
|
|
330
|
+
}
|
|
331
|
+
` }),
|
|
307
332
|
/* @__PURE__ */ e(
|
|
308
|
-
|
|
333
|
+
Ke,
|
|
309
334
|
{
|
|
310
335
|
followCursor: !0,
|
|
311
336
|
open: s,
|
|
312
|
-
slotProps: { popper:
|
|
313
|
-
title:
|
|
314
|
-
children: /* @__PURE__ */ e("circle", { fill:
|
|
337
|
+
slotProps: { popper: M },
|
|
338
|
+
title: E,
|
|
339
|
+
children: /* @__PURE__ */ e("circle", { fill: d, id: `circle-${f}`, r: p })
|
|
315
340
|
}
|
|
316
341
|
),
|
|
317
|
-
/* @__PURE__ */ e("svg", { x:
|
|
318
|
-
p >
|
|
342
|
+
/* @__PURE__ */ e("svg", { x: v, y: A, children: /* @__PURE__ */ e(P, { name: u, size: x, sx: { fill: m } }) }),
|
|
343
|
+
p > G && /* @__PURE__ */ e(
|
|
319
344
|
y,
|
|
320
345
|
{
|
|
321
346
|
bold: !0,
|
|
322
347
|
component: "text",
|
|
323
|
-
id: `budget-category-${
|
|
324
|
-
sx: { fill:
|
|
348
|
+
id: `budget-category-${f}`,
|
|
349
|
+
sx: { fill: m },
|
|
325
350
|
variant: "Small",
|
|
326
351
|
y: 4,
|
|
327
|
-
children:
|
|
352
|
+
children: _
|
|
328
353
|
}
|
|
329
354
|
),
|
|
330
|
-
p >
|
|
355
|
+
p > me && /* @__PURE__ */ e(
|
|
331
356
|
y,
|
|
332
357
|
{
|
|
333
358
|
bold: !0,
|
|
334
359
|
component: "text",
|
|
335
|
-
id: `budget-description-${
|
|
336
|
-
sx: { fill:
|
|
360
|
+
id: `budget-description-${f}-1`,
|
|
361
|
+
sx: { fill: m },
|
|
337
362
|
variant: "Body",
|
|
338
|
-
y: p <=
|
|
339
|
-
children: p <=
|
|
363
|
+
y: p <= G ? 12 : 24,
|
|
364
|
+
children: p <= G ? h.split(" ")[0] : h
|
|
340
365
|
}
|
|
341
366
|
),
|
|
342
|
-
p <=
|
|
367
|
+
p <= G && p > me && /* @__PURE__ */ e(
|
|
343
368
|
y,
|
|
344
369
|
{
|
|
345
370
|
component: "text",
|
|
346
|
-
id: `budget-description-${
|
|
347
|
-
sx: { fill:
|
|
371
|
+
id: `budget-description-${f}-2`,
|
|
372
|
+
sx: { fill: m },
|
|
348
373
|
variant: "XSmall",
|
|
349
374
|
y: 28,
|
|
350
|
-
children:
|
|
375
|
+
children: h.split(" ")[1]
|
|
351
376
|
}
|
|
352
377
|
),
|
|
353
|
-
/* @__PURE__ */ e(St, { bubble:
|
|
378
|
+
/* @__PURE__ */ e(St, { bubble: c })
|
|
354
379
|
]
|
|
355
380
|
},
|
|
356
|
-
|
|
381
|
+
f
|
|
357
382
|
);
|
|
358
383
|
}
|
|
359
|
-
const
|
|
384
|
+
const vt = ({
|
|
360
385
|
height: t,
|
|
361
386
|
width: o,
|
|
362
387
|
isDraggable: i = !1,
|
|
363
388
|
onClick: s = () => {
|
|
364
389
|
}
|
|
365
390
|
}) => {
|
|
366
|
-
const [a, n] = l.useState([]), r = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(),
|
|
367
|
-
const u = r.current,
|
|
391
|
+
const [a, n] = l.useState([]), r = l.useRef(null), c = l.useRef(!1), { detailedBudgets: d } = D(), m = l.useCallback(() => {
|
|
392
|
+
const u = r.current, _ = ft(d), f = _.nodes();
|
|
368
393
|
if (u) {
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
vx:
|
|
374
|
-
vy:
|
|
375
|
-
x:
|
|
376
|
-
y:
|
|
394
|
+
const h = u.nodes(), p = new Map(h.map((S) => [S.guid, S]));
|
|
395
|
+
f.forEach((S) => {
|
|
396
|
+
const b = p.get(S.guid);
|
|
397
|
+
b && Object.assign(S, {
|
|
398
|
+
vx: b.vx,
|
|
399
|
+
vy: b.vy,
|
|
400
|
+
x: b.x,
|
|
401
|
+
y: b.y
|
|
377
402
|
});
|
|
378
403
|
});
|
|
379
404
|
}
|
|
380
|
-
r.current =
|
|
405
|
+
r.current = _, c.current = !1, n(f);
|
|
381
406
|
}, [d]);
|
|
382
407
|
return l.useEffect(() => {
|
|
383
|
-
|
|
384
|
-
}, [
|
|
408
|
+
m();
|
|
409
|
+
}, [m]), l.useEffect(() => () => {
|
|
385
410
|
r.current && (r.current.stop(), r.current = null);
|
|
386
411
|
}, []), l.useEffect(() => {
|
|
387
412
|
const u = r.current;
|
|
388
413
|
if (!u) return;
|
|
389
|
-
const
|
|
390
|
-
u.nodes(
|
|
391
|
-
|
|
392
|
-
}, 0), n([...
|
|
393
|
-
}, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(
|
|
394
|
-
},
|
|
414
|
+
const _ = u.nodes(), f = o > 0 && o < 450 || t > 0 && t < 300, h = _t(_, d, f, t, o);
|
|
415
|
+
u.nodes(h), ht(u, t, o), i && setTimeout(() => {
|
|
416
|
+
pt(u);
|
|
417
|
+
}, 0), n([...h]);
|
|
418
|
+
}, [t, o, i, d]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(o), children: a.map((u) => /* @__PURE__ */ e(xt, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
|
|
419
|
+
}, At = I(vt), Tt = ({
|
|
395
420
|
isMiniWidget: t = !1,
|
|
396
421
|
onConnectAccountsClick: o,
|
|
397
422
|
createBudgetOnClick: i
|
|
398
423
|
}) => {
|
|
399
|
-
const { recalculateBudgets: s } = D(), { spendCategories: a } =
|
|
400
|
-
|
|
401
|
-
const { data: C, isSuccess: v } = await s(
|
|
402
|
-
|
|
424
|
+
const { recalculateBudgets: s } = D(), { spendCategories: a } = U(), { budgets: n } = w(), { availableWidth: r } = ne(), { isMobile: c } = ie(r), d = t && c, [m, u] = l.useState(!1), [_, f] = l.useState(!1), [h, p] = l.useState(!1), S = l.useMemo(() => [...a.filter((C) => C.totalAverageAmount > 0)], [a]), b = async () => {
|
|
425
|
+
p(!0);
|
|
426
|
+
const { data: C, isSuccess: v } = await s(S);
|
|
427
|
+
p(!1), v ? (C.length === 0 && f(!0), u(!1)) : u(!0);
|
|
403
428
|
};
|
|
404
|
-
return
|
|
405
|
-
|
|
429
|
+
return h ? /* @__PURE__ */ e(z, {}) : m ? /* @__PURE__ */ e(
|
|
430
|
+
ue,
|
|
406
431
|
{
|
|
407
432
|
header: n.autogenerate_budgets_error_header,
|
|
408
433
|
icon: "error",
|
|
409
434
|
iconColor: "#4D4D4D",
|
|
410
435
|
onClick: (C) => {
|
|
411
|
-
C === "primary" ?
|
|
436
|
+
C === "primary" ? b() : i();
|
|
412
437
|
},
|
|
413
438
|
primaryButton: n.autogenerate_budgets_error_primary_button,
|
|
414
439
|
secondaryButton: n.zero_state_generate_budgets_secondary_button,
|
|
@@ -422,8 +447,8 @@ const xt = ({
|
|
|
422
447
|
...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
|
|
423
448
|
}
|
|
424
449
|
}
|
|
425
|
-
) : /* @__PURE__ */ e(je, { children:
|
|
426
|
-
|
|
450
|
+
) : /* @__PURE__ */ e(je, { children: _ ? /* @__PURE__ */ e(
|
|
451
|
+
ue,
|
|
427
452
|
{
|
|
428
453
|
header: n.zero_state_generate_budgets_header,
|
|
429
454
|
icon: "error",
|
|
@@ -448,13 +473,13 @@ const xt = ({
|
|
|
448
473
|
}
|
|
449
474
|
}
|
|
450
475
|
) : /* @__PURE__ */ e(
|
|
451
|
-
|
|
476
|
+
ue,
|
|
452
477
|
{
|
|
453
478
|
header: n.create_budgets_title,
|
|
454
479
|
icon: "bubble_chart",
|
|
455
480
|
iconColor: "#1A1A1A",
|
|
456
481
|
onClick: (C) => {
|
|
457
|
-
C === "primary" ?
|
|
482
|
+
C === "primary" ? b() : i();
|
|
458
483
|
},
|
|
459
484
|
primaryButton: n.empty_state_primary_button,
|
|
460
485
|
secondaryButton: t ? void 0 : n.empty_state_secondary_button,
|
|
@@ -473,7 +498,7 @@ const xt = ({
|
|
|
473
498
|
}
|
|
474
499
|
}
|
|
475
500
|
) });
|
|
476
|
-
},
|
|
501
|
+
}, Re = I(
|
|
477
502
|
({
|
|
478
503
|
createBudgetOnClick: t = () => {
|
|
479
504
|
},
|
|
@@ -483,41 +508,41 @@ const xt = ({
|
|
|
483
508
|
shouldShowZeroState: a,
|
|
484
509
|
unavailableWidth: n = 24
|
|
485
510
|
}) => {
|
|
486
|
-
const { onEvent: r } = X(), { setSelectedBudget: c } = D(), { isLoadingCategoryTotals: d } =
|
|
487
|
-
c(v), r(
|
|
511
|
+
const { onEvent: r } = X(), { setSelectedBudget: c } = D(), { isLoadingCategoryTotals: d } = U(), { isInitialized: m } = oe(), { accounts: u } = w(), { availableWidth: _ } = ne(), { isMobile: f } = ie(), [h, p] = l.useState(!1), S = l.useMemo(() => _ - n, [_]), b = (v) => {
|
|
512
|
+
c(v), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
488
513
|
budget_category: v.category.name,
|
|
489
514
|
click_type: "bubble"
|
|
490
515
|
});
|
|
491
516
|
}, C = () => {
|
|
492
|
-
|
|
517
|
+
p(!0), r(k.ACCOUNTS_CLICK_CONNECT);
|
|
493
518
|
};
|
|
494
|
-
return d ? /* @__PURE__ */ e(
|
|
495
|
-
|
|
519
|
+
return d ? /* @__PURE__ */ e(B, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(S), children: /* @__PURE__ */ e(z, {}) }) : /* @__PURE__ */ g(
|
|
520
|
+
H,
|
|
496
521
|
{
|
|
497
|
-
ml: a ||
|
|
522
|
+
ml: a || f ? 0 : 24,
|
|
498
523
|
sx: { alignSelf: "center", ...s && { height: "100%" } },
|
|
499
524
|
children: [
|
|
500
|
-
a || !
|
|
501
|
-
|
|
525
|
+
a || !m ? /* @__PURE__ */ e(
|
|
526
|
+
Tt,
|
|
502
527
|
{
|
|
503
528
|
createBudgetOnClick: t,
|
|
504
529
|
isMiniWidget: s,
|
|
505
530
|
onConnectAccountsClick: C
|
|
506
531
|
}
|
|
507
532
|
) : /* @__PURE__ */ e(
|
|
508
|
-
|
|
533
|
+
At,
|
|
509
534
|
{
|
|
510
535
|
height: o,
|
|
511
536
|
isDraggable: i,
|
|
512
|
-
onClick:
|
|
513
|
-
width:
|
|
537
|
+
onClick: b,
|
|
538
|
+
width: S
|
|
514
539
|
}
|
|
515
540
|
),
|
|
516
541
|
/* @__PURE__ */ e(
|
|
517
542
|
We,
|
|
518
543
|
{
|
|
519
|
-
onClose: () =>
|
|
520
|
-
showConnectionsWidget:
|
|
544
|
+
onClose: () => p(!1),
|
|
545
|
+
showConnectionsWidget: h,
|
|
521
546
|
title: u.manage_connections
|
|
522
547
|
}
|
|
523
548
|
)
|
|
@@ -525,13 +550,13 @@ const xt = ({
|
|
|
525
550
|
}
|
|
526
551
|
);
|
|
527
552
|
}
|
|
528
|
-
),
|
|
553
|
+
), wt = ({
|
|
529
554
|
budgetsCopy: t,
|
|
530
555
|
difference: o,
|
|
531
556
|
handleAddClick: i,
|
|
532
557
|
shouldShowZeroState: s
|
|
533
558
|
}) => {
|
|
534
|
-
const { availableHeight: a = 0 } =
|
|
559
|
+
const { availableHeight: a = 0 } = ne(), n = l.useRef(null);
|
|
535
560
|
l.useEffect(() => {
|
|
536
561
|
a > 0 && n.current === null && (n.current = a);
|
|
537
562
|
}, [a]);
|
|
@@ -539,9 +564,9 @@ const xt = ({
|
|
|
539
564
|
const c = n.current ?? a;
|
|
540
565
|
return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
|
|
541
566
|
}, [a]);
|
|
542
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ g(B, { sx: { height: "100%", justifyContent: "space-between" }, children: [
|
|
543
568
|
/* @__PURE__ */ e(
|
|
544
|
-
|
|
569
|
+
Re,
|
|
545
570
|
{
|
|
546
571
|
createBudgetOnClick: i,
|
|
547
572
|
height: r,
|
|
@@ -549,55 +574,55 @@ const xt = ({
|
|
|
549
574
|
shouldShowZeroState: s
|
|
550
575
|
}
|
|
551
576
|
),
|
|
552
|
-
!s && /* @__PURE__ */
|
|
577
|
+
!s && /* @__PURE__ */ g(H, { ml: 16, children: [
|
|
553
578
|
/* @__PURE__ */ e(y, { bold: !0, color: o < 0 ? "error.main" : "success.main", children: T(Math.abs(o), "0,0") }),
|
|
554
579
|
/* @__PURE__ */ e(y, { children: o < 0 ? t.overspent_in_budgets : t.left_in_budgets })
|
|
555
580
|
] })
|
|
556
581
|
] });
|
|
557
|
-
},
|
|
558
|
-
const o =
|
|
559
|
-
|
|
560
|
-
}, v = () =>
|
|
582
|
+
}, Dt = (t) => {
|
|
583
|
+
const o = ee(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = D(), { budgets: c, common: d } = w(), { isCopyLoaded: m, isInitialized: u, selectedAccounts: _ } = oe(), { reloadCategoryTotals: f } = U(), h = Ye(), p = s.length === 0, [S, b] = l.useState(!1), C = () => {
|
|
584
|
+
b(!0), i(k.BUDGETS_CLICK_ADD);
|
|
585
|
+
}, v = () => b(!1);
|
|
561
586
|
return l.useEffect(() => {
|
|
562
587
|
r(o);
|
|
563
588
|
}, [o]), l.useEffect(() => {
|
|
564
|
-
u && !a && _
|
|
589
|
+
u && !a && f(_, J(/* @__PURE__ */ new Date()), ge(/* @__PURE__ */ new Date())).then(
|
|
565
590
|
() => {
|
|
566
591
|
n().finally();
|
|
567
592
|
}
|
|
568
593
|
);
|
|
569
|
-
}, [u,
|
|
570
|
-
|
|
594
|
+
}, [u, _]), m ? /* @__PURE__ */ g(
|
|
595
|
+
Ze,
|
|
571
596
|
{
|
|
572
597
|
contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
|
|
573
|
-
primaryCtaLabel:
|
|
598
|
+
primaryCtaLabel: p ? c.get_started_cta : c.details_cta,
|
|
574
599
|
sx: { height: "100%" },
|
|
575
600
|
title: c.budgets_title,
|
|
576
601
|
...t,
|
|
577
602
|
children: [
|
|
578
603
|
a ? /* @__PURE__ */ e(
|
|
579
|
-
|
|
604
|
+
wt,
|
|
580
605
|
{
|
|
581
606
|
budgetsCopy: c,
|
|
582
|
-
difference:
|
|
607
|
+
difference: h,
|
|
583
608
|
handleAddClick: C,
|
|
584
|
-
shouldShowZeroState:
|
|
609
|
+
shouldShowZeroState: p
|
|
585
610
|
}
|
|
586
|
-
) : /* @__PURE__ */ e(
|
|
611
|
+
) : /* @__PURE__ */ e(z, {}),
|
|
587
612
|
/* @__PURE__ */ e(
|
|
588
|
-
|
|
613
|
+
$,
|
|
589
614
|
{
|
|
590
615
|
ariaLabelClose: d.close_aria,
|
|
591
|
-
isOpen:
|
|
592
|
-
onClose: () =>
|
|
616
|
+
isOpen: S,
|
|
617
|
+
onClose: () => b(!1),
|
|
593
618
|
title: c.add_new_title,
|
|
594
|
-
children: /* @__PURE__ */ e(
|
|
619
|
+
children: /* @__PURE__ */ e(Ee, { onRecalculateBudgets: v })
|
|
595
620
|
}
|
|
596
621
|
)
|
|
597
622
|
]
|
|
598
623
|
}
|
|
599
|
-
) : /* @__PURE__ */ e(
|
|
600
|
-
},
|
|
624
|
+
) : /* @__PURE__ */ e(z, {});
|
|
625
|
+
}, Ln = I(Dt), Le = ({ budget: t }) => {
|
|
601
626
|
const {
|
|
602
627
|
amount: o,
|
|
603
628
|
budgetColors: { background: i },
|
|
@@ -611,20 +636,20 @@ const xt = ({
|
|
|
611
636
|
percentage: `${n}%`
|
|
612
637
|
}
|
|
613
638
|
];
|
|
614
|
-
return /* @__PURE__ */ e(
|
|
615
|
-
/* @__PURE__ */ e(
|
|
639
|
+
return /* @__PURE__ */ e(he, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ g(B, { alignItems: "center", gap: 16, children: [
|
|
640
|
+
/* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
|
|
616
641
|
/* @__PURE__ */ e(ze, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
|
|
617
642
|
/* @__PURE__ */ e(y, { bold: !0, variant: "XSmall", children: s }),
|
|
618
|
-
/* @__PURE__ */ e(
|
|
643
|
+
/* @__PURE__ */ e(pe, { data: c, height: 10 })
|
|
619
644
|
] }) }) });
|
|
620
|
-
},
|
|
645
|
+
}, It = I(() => {
|
|
621
646
|
const { budgets: t } = w();
|
|
622
|
-
return /* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */ e(
|
|
647
|
+
return /* @__PURE__ */ g(B, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
648
|
+
/* @__PURE__ */ e(P, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
624
649
|
/* @__PURE__ */ e(y, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
|
|
625
650
|
/* @__PURE__ */ e(y, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
|
|
626
651
|
] });
|
|
627
|
-
}),
|
|
652
|
+
}), Et = I(({ budget: t }) => {
|
|
628
653
|
const {
|
|
629
654
|
amount: o,
|
|
630
655
|
budgetColors: { background: i },
|
|
@@ -632,266 +657,266 @@ const xt = ({
|
|
|
632
657
|
percentage: a,
|
|
633
658
|
transaction_total: n
|
|
634
659
|
} = t, { setSelectedSubBudget: r } = D();
|
|
635
|
-
return /* @__PURE__ */ e(
|
|
636
|
-
/* @__PURE__ */ e(
|
|
660
|
+
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => r(t), children: [
|
|
661
|
+
/* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(De, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
|
|
637
662
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
663
|
+
Z,
|
|
639
664
|
{
|
|
640
|
-
primary: /* @__PURE__ */ e(
|
|
641
|
-
secondary: /* @__PURE__ */ e(
|
|
665
|
+
primary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }) }),
|
|
666
|
+
secondary: /* @__PURE__ */ e(B, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
|
|
642
667
|
${T(n, "0,0")} /
|
|
643
668
|
${T(o, "0,0")}
|
|
644
669
|
` }) })
|
|
645
670
|
}
|
|
646
671
|
)
|
|
647
672
|
] }) });
|
|
648
|
-
}),
|
|
649
|
-
const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: n } =
|
|
673
|
+
}), Ot = I(({ category: t, parentBudget: o }) => {
|
|
674
|
+
const { budgets: i, common: s } = w(), { setExpandedGuid: a, setOnSelect: n } = ot(), { addBudget: r } = D(), [c, d] = l.useState(!1), [m, u] = l.useState(!1), [_, f] = l.useState(""), [h, p] = l.useState(void 0);
|
|
650
675
|
l.useEffect(() => {
|
|
651
676
|
n((C) => {
|
|
652
677
|
const v = t.subCategories.find((A) => A.guid === C);
|
|
653
|
-
v && (
|
|
678
|
+
v && (p(v), f(`${v.currentAmount === 0 ? "" : v.currentAmount}`), u(!0));
|
|
654
679
|
});
|
|
655
680
|
}, []);
|
|
656
|
-
const
|
|
681
|
+
const S = () => {
|
|
657
682
|
a(t.guid), d(!0);
|
|
658
|
-
},
|
|
659
|
-
|
|
683
|
+
}, b = async () => {
|
|
684
|
+
h && Number(_) > 0 && (await r(h, Number(_), o.guid), u(!1), d(!1), p(void 0));
|
|
660
685
|
};
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */ e(
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */ e(
|
|
686
|
+
return /* @__PURE__ */ g(H, { children: [
|
|
687
|
+
/* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: S, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ g(B, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
688
|
+
/* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
689
|
+
/* @__PURE__ */ e(P, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
|
|
665
690
|
/* @__PURE__ */ e(y, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
|
|
666
691
|
] }),
|
|
667
|
-
/* @__PURE__ */ e(
|
|
692
|
+
/* @__PURE__ */ e(P, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
668
693
|
] }) }) }) }),
|
|
669
|
-
/* @__PURE__ */ e(
|
|
694
|
+
/* @__PURE__ */ e(re, {}),
|
|
670
695
|
/* @__PURE__ */ e(
|
|
671
|
-
|
|
696
|
+
$,
|
|
672
697
|
{
|
|
673
698
|
ariaLabelClose: s.close_aria,
|
|
674
699
|
isOpen: c,
|
|
675
700
|
onClose: () => d(!1),
|
|
676
701
|
title: i.add_sub_budget_title,
|
|
677
|
-
children: /* @__PURE__ */ e(
|
|
702
|
+
children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(at, { category: t, subCategories: t.subCategories }) })
|
|
678
703
|
}
|
|
679
704
|
),
|
|
680
705
|
/* @__PURE__ */ e(
|
|
681
|
-
|
|
706
|
+
j,
|
|
682
707
|
{
|
|
683
708
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
684
|
-
disablePrimaryButton: Number(
|
|
685
|
-
isOpen:
|
|
709
|
+
disablePrimaryButton: Number(_) <= 0,
|
|
710
|
+
isOpen: m,
|
|
686
711
|
onClose: () => u(!1),
|
|
687
|
-
onPrimaryAction:
|
|
712
|
+
onPrimaryAction: b,
|
|
688
713
|
primaryText: i.add_save_button,
|
|
689
714
|
children: /* @__PURE__ */ e(
|
|
690
|
-
|
|
715
|
+
ce,
|
|
691
716
|
{
|
|
692
|
-
amount:
|
|
693
|
-
categoryName:
|
|
694
|
-
onAmountChanged:
|
|
717
|
+
amount: _,
|
|
718
|
+
categoryName: h?.name || "",
|
|
719
|
+
onAmountChanged: f
|
|
695
720
|
}
|
|
696
721
|
)
|
|
697
722
|
}
|
|
698
723
|
)
|
|
699
724
|
] });
|
|
700
|
-
}),
|
|
701
|
-
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: d } = D(), { filter:
|
|
725
|
+
}), Mt = I(({ budget: t }) => {
|
|
726
|
+
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = w(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: d } = D(), { filter: m, setFilter: u } = ae(), [_, f] = l.useState(!1), [h, p] = l.useState(!1), [S, b] = l.useState("");
|
|
702
727
|
l.useEffect(() => {
|
|
703
|
-
r && (
|
|
704
|
-
...
|
|
728
|
+
r && (b(`${r.amount}`), u({
|
|
729
|
+
...m,
|
|
705
730
|
custom: (x) => x.category_guid === r.category_guid
|
|
706
731
|
}));
|
|
707
732
|
}, [r]);
|
|
708
733
|
const C = async () => {
|
|
709
734
|
r && await d({
|
|
710
735
|
...r,
|
|
711
|
-
amount: Number(
|
|
736
|
+
amount: Number(S)
|
|
712
737
|
});
|
|
713
738
|
}, v = async () => {
|
|
714
|
-
r && await n(r.guid),
|
|
739
|
+
r && await n(r.guid), p(!1), A();
|
|
715
740
|
}, A = () => {
|
|
716
741
|
u({
|
|
717
|
-
...
|
|
742
|
+
...m,
|
|
718
743
|
custom: (x) => x.category_guid === t.category_guid || x.top_level_category_guid === t.category_guid
|
|
719
744
|
}), c(void 0);
|
|
720
745
|
};
|
|
721
|
-
return /* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
i.length === 0 ? /* @__PURE__ */ e(
|
|
724
|
-
/* @__PURE__ */ e(
|
|
725
|
-
/* @__PURE__ */ e(
|
|
746
|
+
return /* @__PURE__ */ g(l.Fragment, { children: [
|
|
747
|
+
/* @__PURE__ */ g(K, { sx: { bgcolor: "background.paper" }, children: [
|
|
748
|
+
i.length === 0 ? /* @__PURE__ */ e(It, {}) : i.map((x) => /* @__PURE__ */ g(l.Fragment, { children: [
|
|
749
|
+
/* @__PURE__ */ e(Et, { budget: x }),
|
|
750
|
+
/* @__PURE__ */ e(re, {})
|
|
726
751
|
] }, x.guid)),
|
|
727
|
-
/* @__PURE__ */ e(
|
|
752
|
+
/* @__PURE__ */ e(Ot, { category: o, parentBudget: t })
|
|
728
753
|
] }),
|
|
729
754
|
/* @__PURE__ */ e(
|
|
730
|
-
|
|
755
|
+
$,
|
|
731
756
|
{
|
|
732
757
|
ariaLabelClose: a.close_aria,
|
|
733
758
|
isOpen: !!r,
|
|
734
759
|
onClose: A,
|
|
735
|
-
onPrimaryAction: () =>
|
|
736
|
-
onSecondaryAction: () =>
|
|
760
|
+
onPrimaryAction: () => f(!0),
|
|
761
|
+
onSecondaryAction: () => p(!0),
|
|
737
762
|
primaryText: s.details_edit_button,
|
|
738
763
|
secondaryText: s.details_delete_button,
|
|
739
764
|
title: s.details_title,
|
|
740
|
-
children: r && /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */ e(
|
|
742
|
-
/* @__PURE__ */ e(
|
|
765
|
+
children: r && /* @__PURE__ */ g(B, { gap: 24, children: [
|
|
766
|
+
/* @__PURE__ */ e(Le, { budget: r }),
|
|
767
|
+
/* @__PURE__ */ e(we, { height: "100%" })
|
|
743
768
|
] })
|
|
744
769
|
}
|
|
745
770
|
),
|
|
746
|
-
r && /* @__PURE__ */
|
|
771
|
+
r && /* @__PURE__ */ g(l.Fragment, { children: [
|
|
747
772
|
/* @__PURE__ */ e(
|
|
748
|
-
|
|
773
|
+
j,
|
|
749
774
|
{
|
|
750
775
|
copy: { close_aria: a.close_aria, title: s.details_edit_title },
|
|
751
|
-
disablePrimaryButton: Number(
|
|
752
|
-
isOpen:
|
|
753
|
-
onClose: () =>
|
|
776
|
+
disablePrimaryButton: Number(S) <= 0,
|
|
777
|
+
isOpen: _,
|
|
778
|
+
onClose: () => f(!1),
|
|
754
779
|
onPrimaryAction: C,
|
|
755
780
|
primaryText: s.edit_save_button,
|
|
756
781
|
children: /* @__PURE__ */ e(
|
|
757
|
-
|
|
782
|
+
ce,
|
|
758
783
|
{
|
|
759
|
-
amount:
|
|
784
|
+
amount: S,
|
|
760
785
|
categoryName: r.category.name,
|
|
761
|
-
onAmountChanged:
|
|
786
|
+
onAmountChanged: b
|
|
762
787
|
}
|
|
763
788
|
)
|
|
764
789
|
}
|
|
765
790
|
),
|
|
766
791
|
/* @__PURE__ */ e(
|
|
767
|
-
|
|
792
|
+
j,
|
|
768
793
|
{
|
|
769
794
|
copy: { close_aria: a.close_aria, title: s.delete_title },
|
|
770
|
-
isOpen:
|
|
771
|
-
onClose: () =>
|
|
795
|
+
isOpen: h,
|
|
796
|
+
onClose: () => p(!1),
|
|
772
797
|
onPrimaryAction: v,
|
|
773
798
|
primaryColor: "error",
|
|
774
799
|
primaryText: "Delete",
|
|
775
800
|
secondaryColor: "secondary",
|
|
776
|
-
children: /* @__PURE__ */ e(y, { variant: "Paragraph", children:
|
|
801
|
+
children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: R(s.delete_description, r.category.name) })
|
|
777
802
|
}
|
|
778
803
|
)
|
|
779
804
|
] })
|
|
780
805
|
] });
|
|
781
|
-
}),
|
|
782
|
-
const { is_mobile_webview: o } = Ue(), { setAlert: i } = D(), { budgets: s, common: a, transactions: n } = w(), { isDesktop: r, isSmallTablet: c, isTablet: d } =
|
|
783
|
-
sortedTransactions:
|
|
806
|
+
}), Rt = I(({ budget: t }) => {
|
|
807
|
+
const { is_mobile_webview: o } = Ue(), { setAlert: i } = D(), { budgets: s, common: a, transactions: n } = w(), { isDesktop: r, isSmallTablet: c, isTablet: d } = ie(), {
|
|
808
|
+
sortedTransactions: m,
|
|
784
809
|
sortedTransactionsWithSplits: u,
|
|
785
|
-
tags:
|
|
786
|
-
} =
|
|
787
|
-
() =>
|
|
788
|
-
[
|
|
810
|
+
tags: _
|
|
811
|
+
} = ae(), [f, h] = l.useState(0), [p, S] = l.useState(""), b = l.useMemo(
|
|
812
|
+
() => m.find((x) => x.guid === p),
|
|
813
|
+
[p, m]
|
|
789
814
|
), C = (x, E) => {
|
|
790
|
-
|
|
815
|
+
h(E);
|
|
791
816
|
}, v = () => {
|
|
792
|
-
|
|
793
|
-
}, A =
|
|
794
|
-
return /* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */ e(
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
|
|
817
|
+
tt(u, _), i(s.alert_csv_downloaded);
|
|
818
|
+
}, A = m.length > 0 && !o && (r || d && !c);
|
|
819
|
+
return /* @__PURE__ */ g(B, { gap: 24, children: [
|
|
820
|
+
/* @__PURE__ */ e(Le, { budget: t }),
|
|
821
|
+
/* @__PURE__ */ g(B, { children: [
|
|
822
|
+
/* @__PURE__ */ g(
|
|
823
|
+
et,
|
|
799
824
|
{
|
|
800
825
|
onChange: C,
|
|
801
826
|
sx: { width: "100%" },
|
|
802
827
|
textColor: "primary",
|
|
803
|
-
value:
|
|
828
|
+
value: f,
|
|
804
829
|
variant: "fullWidth",
|
|
805
830
|
children: [
|
|
806
|
-
/* @__PURE__ */ e(
|
|
807
|
-
/* @__PURE__ */ e(
|
|
831
|
+
/* @__PURE__ */ e(_e, { label: s.details_transactions_tab }),
|
|
832
|
+
/* @__PURE__ */ e(_e, { label: s.details_subbudgets_tab })
|
|
808
833
|
]
|
|
809
834
|
}
|
|
810
835
|
),
|
|
811
|
-
|
|
812
|
-
A && /* @__PURE__ */ e(
|
|
813
|
-
|
|
836
|
+
f === 0 && /* @__PURE__ */ g(B, { children: [
|
|
837
|
+
A && /* @__PURE__ */ e(B, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
|
|
838
|
+
Te,
|
|
814
839
|
{
|
|
815
840
|
onClick: v,
|
|
816
|
-
startIcon: /* @__PURE__ */ e(
|
|
841
|
+
startIcon: /* @__PURE__ */ e(P, { name: "ios_share" }),
|
|
817
842
|
variant: "text",
|
|
818
843
|
children: n.export_csv_btn
|
|
819
844
|
}
|
|
820
845
|
) }),
|
|
821
|
-
/* @__PURE__ */ e(
|
|
846
|
+
/* @__PURE__ */ e(we, { height: "100%", onClick: S })
|
|
822
847
|
] }),
|
|
823
|
-
|
|
848
|
+
f === 1 && /* @__PURE__ */ e(Mt, { budget: t }),
|
|
824
849
|
/* @__PURE__ */ e(
|
|
825
|
-
|
|
850
|
+
$,
|
|
826
851
|
{
|
|
827
852
|
ariaLabelClose: a.close_aria,
|
|
828
|
-
isOpen: !!
|
|
829
|
-
onClose: () =>
|
|
853
|
+
isOpen: !!b,
|
|
854
|
+
onClose: () => S(""),
|
|
830
855
|
title: s.details_transaction_drawer,
|
|
831
|
-
children:
|
|
856
|
+
children: b && /* @__PURE__ */ e(nt, { transaction: b })
|
|
832
857
|
}
|
|
833
858
|
)
|
|
834
859
|
] })
|
|
835
860
|
] });
|
|
836
|
-
}),
|
|
837
|
-
const { selectedAccountGuids: t } =
|
|
861
|
+
}), Lt = I(() => {
|
|
862
|
+
const { selectedAccountGuids: t } = oe(), { budgets: o, common: i } = w(), {
|
|
838
863
|
dateRange: s,
|
|
839
864
|
deleteBudget: a,
|
|
840
865
|
selectedBudget: n,
|
|
841
866
|
selectedSubBudget: r,
|
|
842
867
|
setAlert: c,
|
|
843
868
|
setSelectedBudget: d,
|
|
844
|
-
updateBudget:
|
|
845
|
-
} = D(), { setFilter: u } =
|
|
869
|
+
updateBudget: m
|
|
870
|
+
} = D(), { setFilter: u } = ae(), [_, f] = l.useState(!1), [h, p] = l.useState(!1), [S, b] = l.useState(!1), [C, v] = l.useState("");
|
|
846
871
|
l.useEffect(() => {
|
|
847
|
-
n && !r && (v(`${n.amount}`),
|
|
872
|
+
n && !r && (v(`${n.amount}`), f(!0), u({
|
|
848
873
|
accounts: t,
|
|
849
874
|
dateRange: s,
|
|
850
|
-
custom: (
|
|
875
|
+
custom: (M) => M.category_guid === n.category_guid || M.top_level_category_guid === n.category_guid,
|
|
851
876
|
showSplits: !0
|
|
852
877
|
}));
|
|
853
878
|
}, [n]);
|
|
854
879
|
const A = async () => {
|
|
855
|
-
n && (await
|
|
880
|
+
n && (await m({
|
|
856
881
|
...n,
|
|
857
882
|
amount: Number(C),
|
|
858
883
|
percentage: n.category.totalAmount / Number(C) * 100
|
|
859
|
-
}), c(
|
|
884
|
+
}), c(R(o.alert_budget_updated, n.category.name)));
|
|
860
885
|
}, x = async () => {
|
|
861
|
-
n && (await a(n.guid), c(
|
|
886
|
+
n && (await a(n.guid), c(R(o.alert_budget_deleted, n.category.name))), b(!1), E();
|
|
862
887
|
}, E = () => {
|
|
863
|
-
|
|
888
|
+
f(!1), setTimeout(() => {
|
|
864
889
|
d(void 0);
|
|
865
890
|
}, 250);
|
|
866
891
|
};
|
|
867
892
|
if (n)
|
|
868
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ g(l.Fragment, { children: [
|
|
869
894
|
/* @__PURE__ */ e(
|
|
870
|
-
|
|
895
|
+
$,
|
|
871
896
|
{
|
|
872
897
|
ariaLabelClose: i.close_aria,
|
|
873
|
-
isOpen:
|
|
898
|
+
isOpen: _,
|
|
874
899
|
onClose: E,
|
|
875
|
-
onPrimaryAction: () =>
|
|
876
|
-
onSecondaryAction: () =>
|
|
900
|
+
onPrimaryAction: () => p(!0),
|
|
901
|
+
onSecondaryAction: () => b(!0),
|
|
877
902
|
primaryText: o.details_edit_button,
|
|
878
903
|
secondaryColor: "error",
|
|
879
904
|
secondaryText: o.details_delete_button,
|
|
880
905
|
title: o.details_title,
|
|
881
|
-
children: /* @__PURE__ */ e(
|
|
906
|
+
children: /* @__PURE__ */ e(Rt, { budget: n })
|
|
882
907
|
}
|
|
883
908
|
),
|
|
884
909
|
/* @__PURE__ */ e(
|
|
885
|
-
|
|
910
|
+
j,
|
|
886
911
|
{
|
|
887
912
|
copy: { close_aria: i.close_aria, title: o.details_edit_title },
|
|
888
913
|
disablePrimaryButton: Number(C) <= 0,
|
|
889
|
-
isOpen:
|
|
890
|
-
onClose: () =>
|
|
914
|
+
isOpen: h,
|
|
915
|
+
onClose: () => p(!1),
|
|
891
916
|
onPrimaryAction: A,
|
|
892
917
|
primaryText: o.edit_save_button,
|
|
893
918
|
children: /* @__PURE__ */ e(
|
|
894
|
-
|
|
919
|
+
ce,
|
|
895
920
|
{
|
|
896
921
|
amount: C,
|
|
897
922
|
categoryName: n.category.name,
|
|
@@ -901,20 +926,20 @@ const xt = ({
|
|
|
901
926
|
}
|
|
902
927
|
),
|
|
903
928
|
/* @__PURE__ */ e(
|
|
904
|
-
|
|
929
|
+
j,
|
|
905
930
|
{
|
|
906
931
|
copy: { close_aria: i.close_aria, title: o.delete_title },
|
|
907
|
-
isOpen:
|
|
908
|
-
onClose: () =>
|
|
932
|
+
isOpen: S,
|
|
933
|
+
onClose: () => b(!1),
|
|
909
934
|
onPrimaryAction: x,
|
|
910
935
|
primaryColor: "error",
|
|
911
936
|
primaryText: o.details_delete_button,
|
|
912
937
|
secondaryColor: "secondary",
|
|
913
|
-
children: /* @__PURE__ */ e(y, { variant: "Paragraph", children:
|
|
938
|
+
children: /* @__PURE__ */ e(y, { variant: "Paragraph", children: R(o.delete_description, n.category.name) })
|
|
914
939
|
}
|
|
915
940
|
)
|
|
916
941
|
] });
|
|
917
|
-
}),
|
|
942
|
+
}), kt = ({ budget: t, onClick: o }) => {
|
|
918
943
|
const {
|
|
919
944
|
amount: i,
|
|
920
945
|
budgetColors: { background: s, description: a },
|
|
@@ -922,58 +947,58 @@ const xt = ({
|
|
|
922
947
|
description: r,
|
|
923
948
|
percentage: c,
|
|
924
949
|
subBudgets: d,
|
|
925
|
-
transaction_total:
|
|
950
|
+
transaction_total: m
|
|
926
951
|
} = t;
|
|
927
|
-
return /* @__PURE__ */ e(
|
|
928
|
-
/* @__PURE__ */ e(
|
|
952
|
+
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ g(Y, { onClick: () => o?.(t), children: [
|
|
953
|
+
/* @__PURE__ */ e(se, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(De, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: n, variant: "basic" }) }) }),
|
|
929
954
|
/* @__PURE__ */ e(
|
|
930
|
-
|
|
955
|
+
Z,
|
|
931
956
|
{
|
|
932
|
-
primary: /* @__PURE__ */
|
|
957
|
+
primary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
933
958
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: t.category.name }),
|
|
934
959
|
/* @__PURE__ */ e(y, { fontWeight: 400, variant: "Body", children: `
|
|
935
|
-
${T(
|
|
960
|
+
${T(m, "0,0")} /
|
|
936
961
|
${T(i, "0,0")}
|
|
937
962
|
` })
|
|
938
963
|
] }),
|
|
939
|
-
secondary: /* @__PURE__ */
|
|
964
|
+
secondary: /* @__PURE__ */ g(B, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
940
965
|
/* @__PURE__ */ e(y, { variant: "XSmall", children: `${d.length} Sub-budgets` }),
|
|
941
966
|
/* @__PURE__ */ e(y, { bold: c > 100, color: a, variant: "XSmall", children: r })
|
|
942
967
|
] })
|
|
943
968
|
}
|
|
944
969
|
)
|
|
945
970
|
] }) });
|
|
946
|
-
},
|
|
971
|
+
}, $t = I(() => {
|
|
947
972
|
const { onEvent: t } = X(), { budgets: o } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), a = (n) => {
|
|
948
|
-
s(n), t(
|
|
973
|
+
s(n), t(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
949
974
|
budget_category: n.category.name,
|
|
950
975
|
click_type: "list"
|
|
951
976
|
});
|
|
952
977
|
};
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
/* @__PURE__ */ e(
|
|
955
|
-
/* @__PURE__ */ e(
|
|
956
|
-
/* @__PURE__ */ e(
|
|
957
|
-
/* @__PURE__ */ e(
|
|
978
|
+
return /* @__PURE__ */ g(he, { elevation: 2, children: [
|
|
979
|
+
/* @__PURE__ */ e(Ie, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: o.budget_categories_title }) }),
|
|
980
|
+
/* @__PURE__ */ e(fe, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(K, { children: i.map((n) => /* @__PURE__ */ g(l.Fragment, { children: [
|
|
981
|
+
/* @__PURE__ */ e(kt, { budget: n, onClick: a }),
|
|
982
|
+
/* @__PURE__ */ e(re, {})
|
|
958
983
|
] }, n.guid)) }) })
|
|
959
984
|
] });
|
|
960
985
|
}), Nt = I(() => {
|
|
961
|
-
const t =
|
|
962
|
-
const A = c.reduce((
|
|
963
|
-
let x = A /
|
|
986
|
+
const t = ee(), { onEvent: o } = X(), { visibleAccounts: i } = Ae(), { budgets: s, common: a, recurring: n } = w(), { incomeCategories: r, spendCategories: c } = U(), { detailedBudgets: d, totalBudgeted: m } = D(), { incomeTotal: u } = te(), { setFilter: _ } = ae(), [f, h] = l.useState(!1), [p, S] = l.useMemo(() => {
|
|
987
|
+
const A = c.reduce((N, F) => N + F.totalAmount, 0);
|
|
988
|
+
let x = A / m;
|
|
964
989
|
x > 1 && (x = 1);
|
|
965
990
|
let E = t.palette.success.main;
|
|
966
991
|
x > 0.8 && x < 1 ? E = t.palette.warning.main : x >= 1 && (E = t.palette.error.main);
|
|
967
|
-
const
|
|
992
|
+
const M = [
|
|
968
993
|
{
|
|
969
994
|
color: E,
|
|
970
995
|
percentage: `${x}`
|
|
971
996
|
}
|
|
972
997
|
];
|
|
973
|
-
return [A,
|
|
974
|
-
}, [d, c]), [
|
|
998
|
+
return [A, M];
|
|
999
|
+
}, [d, c]), [b, C] = l.useMemo(() => {
|
|
975
1000
|
const A = Math.abs(
|
|
976
|
-
r.reduce((
|
|
1001
|
+
r.reduce((M, N) => M + N.totalAmount, 0)
|
|
977
1002
|
);
|
|
978
1003
|
let x = A / u;
|
|
979
1004
|
x > 1 && (x = 1);
|
|
@@ -985,170 +1010,170 @@ const xt = ({
|
|
|
985
1010
|
];
|
|
986
1011
|
return [A, E];
|
|
987
1012
|
}, [r, u]), v = () => {
|
|
988
|
-
|
|
1013
|
+
_({
|
|
989
1014
|
accounts: i.map((A) => A.guid),
|
|
990
1015
|
dateRange: {
|
|
991
|
-
start:
|
|
1016
|
+
start: rt(/* @__PURE__ */ new Date(), 90),
|
|
992
1017
|
end: /* @__PURE__ */ new Date()
|
|
993
1018
|
}
|
|
994
|
-
}),
|
|
1019
|
+
}), h(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
|
|
995
1020
|
};
|
|
996
|
-
return /* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */ e(
|
|
998
|
-
/* @__PURE__ */ e(
|
|
999
|
-
/* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ g(he, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
1022
|
+
/* @__PURE__ */ e(Ie, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ve, { children: s.overview_title }) }),
|
|
1023
|
+
/* @__PURE__ */ e(fe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ g(B, { gap: 24, children: [
|
|
1024
|
+
/* @__PURE__ */ g(B, { gap: 8, children: [
|
|
1000
1025
|
/* @__PURE__ */ e(y, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1002
|
-
/* @__PURE__ */ e(y, { variant: "Small", children:
|
|
1026
|
+
/* @__PURE__ */ e(pe, { data: S, height: 16 }),
|
|
1027
|
+
/* @__PURE__ */ e(y, { variant: "Small", children: R(
|
|
1003
1028
|
s.spending_description,
|
|
1004
|
-
T(
|
|
1005
|
-
T(
|
|
1029
|
+
T(p, "0,0"),
|
|
1030
|
+
T(m, "0,0")
|
|
1006
1031
|
) })
|
|
1007
1032
|
] }),
|
|
1008
|
-
/* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ g(B, { gap: 8, children: [
|
|
1034
|
+
/* @__PURE__ */ g(B, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
1010
1035
|
/* @__PURE__ */ e(y, { bold: !0, variant: "Body", children: s.income_title }),
|
|
1011
1036
|
/* @__PURE__ */ e(
|
|
1012
|
-
|
|
1037
|
+
st,
|
|
1013
1038
|
{
|
|
1014
1039
|
"aria-label": n.manage_income,
|
|
1015
1040
|
onClick: v,
|
|
1016
1041
|
sx: { p: 0 },
|
|
1017
|
-
children: /* @__PURE__ */ e(
|
|
1042
|
+
children: /* @__PURE__ */ e(P, { color: "primary", name: "edit" })
|
|
1018
1043
|
}
|
|
1019
1044
|
)
|
|
1020
1045
|
] }),
|
|
1021
|
-
/* @__PURE__ */ e(
|
|
1022
|
-
/* @__PURE__ */ e(y, { variant: "Small", children:
|
|
1046
|
+
/* @__PURE__ */ e(pe, { data: C, height: 16 }),
|
|
1047
|
+
/* @__PURE__ */ e(y, { variant: "Small", children: R(
|
|
1023
1048
|
s.income_description,
|
|
1024
|
-
T(
|
|
1049
|
+
T(b, "0,0"),
|
|
1025
1050
|
T(u, "0,0")
|
|
1026
1051
|
) })
|
|
1027
1052
|
] })
|
|
1028
1053
|
] }) }),
|
|
1029
1054
|
/* @__PURE__ */ e(
|
|
1030
|
-
|
|
1055
|
+
$,
|
|
1031
1056
|
{
|
|
1032
1057
|
ariaLabelClose: a.close_aria,
|
|
1033
|
-
isOpen:
|
|
1034
|
-
onClose: () =>
|
|
1058
|
+
isOpen: f,
|
|
1059
|
+
onClose: () => h(!1),
|
|
1035
1060
|
title: n.manage_income,
|
|
1036
|
-
children: /* @__PURE__ */ e(
|
|
1061
|
+
children: /* @__PURE__ */ e(it, { forOverview: !0 })
|
|
1037
1062
|
}
|
|
1038
1063
|
)
|
|
1039
1064
|
] });
|
|
1040
|
-
}),
|
|
1041
|
-
const i =
|
|
1042
|
-
alert:
|
|
1043
|
-
dateRange:
|
|
1044
|
-
isDataLoaded:
|
|
1045
|
-
loadBudgetData:
|
|
1046
|
-
setDateRange:
|
|
1065
|
+
}), xe = 480, kn = I(({ onBackClick: t, sx: o }) => {
|
|
1066
|
+
const i = ee(), { onEvent: s } = X(), { visibleAccounts: a } = Ae(), { budgets: n, common: r } = w(), { isCopyLoaded: c, isInitialized: d, selectedAccounts: m, setDisplayedDate: u, setSelectedAccounts: _ } = oe(), {
|
|
1067
|
+
alert: f,
|
|
1068
|
+
dateRange: h,
|
|
1069
|
+
isDataLoaded: p,
|
|
1070
|
+
loadBudgetData: S,
|
|
1071
|
+
setDateRange: b,
|
|
1047
1072
|
setAlert: C,
|
|
1048
1073
|
setTheme: v,
|
|
1049
1074
|
detailedBudgets: A
|
|
1050
|
-
} = D(), { loadRepeatingTransactions: x, setDateRange: E } =
|
|
1051
|
-
l.useEffect(() => (v(i),
|
|
1052
|
-
|
|
1075
|
+
} = D(), { loadRepeatingTransactions: x, setDateRange: E } = te(), { reloadCategoryTotals: M } = U(), { isSmallTablet: N, isMobile: F, isSmallMobile: le } = ie(), L = N || F || le, [ke, de] = l.useState(!1);
|
|
1076
|
+
l.useEffect(() => (v(i), _(a), b({ start: J(q()), end: ge(q()) }), s(k.BUDGETS_VIEW), () => {
|
|
1077
|
+
b({ start: J(q()), end: ge(q()) });
|
|
1053
1078
|
}), []), l.useEffect(() => {
|
|
1054
|
-
|
|
1079
|
+
_(a);
|
|
1055
1080
|
}, [a]), l.useEffect(() => {
|
|
1056
|
-
d && (u(
|
|
1057
|
-
}, [d,
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1081
|
+
d && (u(h.start, h.end), M(m, h.start, h.end).finally(), E(h), p || (x().finally(), S().finally()));
|
|
1082
|
+
}, [d, m, h]);
|
|
1083
|
+
const $e = (ye) => {
|
|
1084
|
+
b({ start: ye[0] || /* @__PURE__ */ new Date(), end: ye[1] || /* @__PURE__ */ new Date() });
|
|
1085
|
+
}, Ne = () => {
|
|
1086
|
+
s(k.BUDGETS_CLICK_FILTER);
|
|
1087
|
+
}, be = () => {
|
|
1088
|
+
de(!0), s(k.BUDGETS_CLICK_ADD);
|
|
1060
1089
|
}, Pe = () => {
|
|
1061
|
-
|
|
1062
|
-
},
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
le(!1);
|
|
1066
|
-
}, Ge = Ze(p.end, q(/* @__PURE__ */ new Date()));
|
|
1067
|
-
return !c || !d || !b ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ m(
|
|
1068
|
-
Ke,
|
|
1090
|
+
de(!1);
|
|
1091
|
+
}, Ge = qe(h.end, J(/* @__PURE__ */ new Date()));
|
|
1092
|
+
return !c || !d || !p ? /* @__PURE__ */ e(z, {}) : /* @__PURE__ */ g(
|
|
1093
|
+
Ve,
|
|
1069
1094
|
{
|
|
1070
1095
|
accountOptions: a,
|
|
1071
1096
|
actions: [
|
|
1072
1097
|
{
|
|
1073
1098
|
iconName: "add",
|
|
1074
1099
|
label: n.add_title,
|
|
1075
|
-
onClick:
|
|
1100
|
+
onClick: be
|
|
1076
1101
|
}
|
|
1077
1102
|
],
|
|
1078
1103
|
calendarActions: {
|
|
1079
|
-
onRangeChanged:
|
|
1104
|
+
onRangeChanged: $e,
|
|
1080
1105
|
shouldDisableNext: Ge,
|
|
1081
1106
|
shouldDisablePicker: !0
|
|
1082
1107
|
},
|
|
1083
|
-
onAccountsFilterClick:
|
|
1108
|
+
onAccountsFilterClick: Ne,
|
|
1084
1109
|
onBackClick: t,
|
|
1085
1110
|
sx: o,
|
|
1086
1111
|
title: n.budgets_title,
|
|
1087
1112
|
children: [
|
|
1088
|
-
(!d || !
|
|
1089
|
-
d &&
|
|
1090
|
-
|
|
1113
|
+
(!d || !p) && /* @__PURE__ */ e(z, {}),
|
|
1114
|
+
d && p && /* @__PURE__ */ g(
|
|
1115
|
+
B,
|
|
1091
1116
|
{
|
|
1092
|
-
direction:
|
|
1117
|
+
direction: L ? "column" : "row",
|
|
1093
1118
|
height: "100%",
|
|
1094
1119
|
sx: { justifyContent: "center" },
|
|
1095
1120
|
width: "100%",
|
|
1096
1121
|
children: [
|
|
1097
|
-
/* @__PURE__ */ e(
|
|
1098
|
-
|
|
1122
|
+
/* @__PURE__ */ e(B, { height: L ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1123
|
+
Re,
|
|
1099
1124
|
{
|
|
1100
|
-
createBudgetOnClick:
|
|
1101
|
-
height:
|
|
1125
|
+
createBudgetOnClick: be,
|
|
1126
|
+
height: L ? 450 : 800,
|
|
1102
1127
|
isDraggable: !0,
|
|
1103
1128
|
shouldShowZeroState: A.length === 0,
|
|
1104
|
-
unavailableWidth:
|
|
1129
|
+
unavailableWidth: L ? 0 : xe
|
|
1105
1130
|
}
|
|
1106
1131
|
) }),
|
|
1107
|
-
A.length !== 0 && /* @__PURE__ */
|
|
1108
|
-
|
|
1132
|
+
A.length !== 0 && /* @__PURE__ */ g(
|
|
1133
|
+
B,
|
|
1109
1134
|
{
|
|
1110
1135
|
gap: 24,
|
|
1111
1136
|
height: "100%",
|
|
1112
1137
|
sx: { mr: 24, mt: 48 },
|
|
1113
|
-
width:
|
|
1138
|
+
width: L ? "100%" : xe,
|
|
1114
1139
|
children: [
|
|
1115
1140
|
/* @__PURE__ */ e(Nt, {}),
|
|
1116
|
-
/* @__PURE__ */ e(
|
|
1141
|
+
/* @__PURE__ */ e($t, {})
|
|
1117
1142
|
]
|
|
1118
1143
|
}
|
|
1119
1144
|
)
|
|
1120
1145
|
]
|
|
1121
1146
|
}
|
|
1122
1147
|
),
|
|
1123
|
-
/* @__PURE__ */ e(
|
|
1148
|
+
/* @__PURE__ */ e(Lt, {}),
|
|
1124
1149
|
/* @__PURE__ */ e(
|
|
1125
|
-
|
|
1150
|
+
$,
|
|
1126
1151
|
{
|
|
1127
1152
|
ariaLabelClose: r.close_aria,
|
|
1128
1153
|
isOpen: ke,
|
|
1129
|
-
onClose: () =>
|
|
1154
|
+
onClose: () => de(!1),
|
|
1130
1155
|
title: n.add_new_title,
|
|
1131
|
-
children: /* @__PURE__ */ e(
|
|
1156
|
+
children: /* @__PURE__ */ e(Ee, { onRecalculateBudgets: Pe })
|
|
1132
1157
|
}
|
|
1133
1158
|
),
|
|
1134
1159
|
/* @__PURE__ */ e(
|
|
1135
|
-
|
|
1160
|
+
Qe,
|
|
1136
1161
|
{
|
|
1137
1162
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1138
1163
|
autoHideDuration: 3500,
|
|
1139
1164
|
onClose: () => {
|
|
1140
1165
|
C("");
|
|
1141
1166
|
},
|
|
1142
|
-
open: !!
|
|
1167
|
+
open: !!f,
|
|
1143
1168
|
children: /* @__PURE__ */ e(
|
|
1144
|
-
|
|
1169
|
+
Je,
|
|
1145
1170
|
{
|
|
1146
1171
|
onClose: () => {
|
|
1147
1172
|
C("");
|
|
1148
1173
|
},
|
|
1149
1174
|
severity: "success",
|
|
1150
1175
|
variant: "filled",
|
|
1151
|
-
children:
|
|
1176
|
+
children: f
|
|
1152
1177
|
}
|
|
1153
1178
|
)
|
|
1154
1179
|
}
|
|
@@ -1158,6 +1183,6 @@ const xt = ({
|
|
|
1158
1183
|
);
|
|
1159
1184
|
});
|
|
1160
1185
|
export {
|
|
1161
|
-
|
|
1162
|
-
|
|
1186
|
+
Ln as BubbleBudgetsMiniWidget,
|
|
1187
|
+
kn as BubbleBudgetsWidget
|
|
1163
1188
|
};
|