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