@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs +922 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs +231 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs.map +1 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs +28 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Dcsnnz86.mjs +906 -0
- package/dist/ManageIncome-Dcsnnz86.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs +96 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs +89 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-C1fdL3Iu.mjs +3054 -0
- package/dist/UserStore-C1fdL3Iu.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/index.es.js +943 -1047
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/RecurringTransactionsStore.d.ts +29 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
package/dist/budgets/index.es.js
CHANGED
|
@@ -1,296 +1,269 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { J as D, K as Ve, q as Ke, rt as Ee, s as Ye } from "../core-BexP5oiV.mjs";
|
|
3
|
-
import { $t as Se, An as fe, Bn as Xe, Gn as Ze, Vn as qe, Xn as Le, c as Je, d as Qe, f as et, i as tt, lr as $, mr as le, p as nt, sr as P, ur as W, yr as ve } from "../accounts-DkyAiLpg.mjs";
|
|
4
|
-
import { n as Ne } from "../Analytics-BKzTPees.mjs";
|
|
5
|
-
import { E as X, a as E, d as Z, h as q, i as ke, k as de, n as $e, p as w, s as J, t as ue, w as me } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
-
import { t as at } from "../MiniWidgetContainer-COwnjfy7.mjs";
|
|
7
|
-
import { o as ot } from "../recurringtransactions-gbJ_NA8u.mjs";
|
|
1
|
+
import { jsxs as m, jsx as e, Fragment as Ve } from "react/jsx-runtime";
|
|
8
2
|
import l from "react";
|
|
9
3
|
import { observer as I } from "mobx-react-lite";
|
|
10
|
-
import x from "@mui/material/Stack";
|
|
11
|
-
import { CategoryIcon as H, H3 as Ge, Icon as z, Text as v } from "@mxenabled/mxui";
|
|
12
4
|
import { endOfMonth as Be } from "date-fns/endOfMonth";
|
|
5
|
+
import { isAfter as Ke } from "date-fns/isAfter";
|
|
13
6
|
import { startOfMonth as ie } from "date-fns/startOfMonth";
|
|
14
7
|
import { startOfToday as re } from "date-fns/startOfToday";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import je from "@mui/material/CardHeader";
|
|
28
|
-
import ge from "@mui/material/Divider";
|
|
29
|
-
import ut from "@mui/material/Tooltip";
|
|
30
|
-
import ee from "@mui/material/List";
|
|
8
|
+
import Ae from "@mui/material/Alert";
|
|
9
|
+
import xe from "@mui/material/Snackbar";
|
|
10
|
+
import x from "@mui/material/Stack";
|
|
11
|
+
import { useTheme as H, alpha as Ye } from "@mui/material/styles";
|
|
12
|
+
import X from "@mui/material/Box";
|
|
13
|
+
import Z from "@mui/material/List";
|
|
14
|
+
import { b as R } from "../Localization-DnoVyBNK.mjs";
|
|
15
|
+
import { Text as C, CategoryIcon as V, Icon as z, H3 as Le } from "@mxenabled/mxui";
|
|
16
|
+
import { f as D } from "../NumberFormatting--XMeeBfr.mjs";
|
|
17
|
+
import { u as E, o as w, h as le, l as q, D as de, i as Ne, f as J, a as Q, g as ee, c as ke } from "../hooks-97sNJ_lf.mjs";
|
|
18
|
+
import $e from "@mui/material/Button";
|
|
19
|
+
import ue from "@mui/material/Divider";
|
|
31
20
|
import te from "@mui/material/ListItem";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, [o, i]);
|
|
101
|
-
return /* @__PURE__ */ m(l.Fragment, { children: [/* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(ne, { children: [/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(H, {
|
|
102
|
-
categoryGuid: t.guid,
|
|
103
|
-
variant: "filled"
|
|
104
|
-
}) }), /* @__PURE__ */ e(ae, {
|
|
105
|
-
primary: t.name,
|
|
106
|
-
secondary: r
|
|
107
|
-
})] }) }), /* @__PURE__ */ e(ge, {})] }, t.guid);
|
|
108
|
-
}), ht = ({ onRecalculateBudgets: t }) => {
|
|
109
|
-
const { budgets: o, common: i } = w(), { spendCategories: r } = J(), { recalculateBudgets: n, setAlert: s } = E(), [a, c] = l.useState(!1), g = r.filter((u) => u.totalAverageAmount > 0), d = async () => {
|
|
110
|
-
await n(g), c(!1), s(o.alert_recalculated_budgets), t?.();
|
|
21
|
+
import me from "@mui/material/ListItemAvatar";
|
|
22
|
+
import oe from "@mui/material/ListItemButton";
|
|
23
|
+
import ne from "@mui/material/ListItemText";
|
|
24
|
+
import { D as $ } from "../Drawer-DsnW2o0v.mjs";
|
|
25
|
+
import Xe from "@mui/material/ListItemSecondaryAction";
|
|
26
|
+
import { C as Ze } from "../CurrencyInput-DaGEQaLW.mjs";
|
|
27
|
+
import { D as W } from "../Dialog-Bvd2n8hz.mjs";
|
|
28
|
+
import { C as qe } from "../ConnectionsDrawer-CZU9ku-k.mjs";
|
|
29
|
+
import * as O from "d3";
|
|
30
|
+
import Je from "@mui/material/Tooltip";
|
|
31
|
+
import { u as ge } from "../useScreenSize-mWpmnh5w.mjs";
|
|
32
|
+
import { L as pe } from "../Loader-CxeBwuPG.mjs";
|
|
33
|
+
import { E as _e } from "../EmptyState-CJUDc3kD.mjs";
|
|
34
|
+
import { A as P } from "../Analytics-WeZYytR0.mjs";
|
|
35
|
+
import Ee from "@mui/material/Tab";
|
|
36
|
+
import Qe from "@mui/material/Tabs";
|
|
37
|
+
import { e as et, g as we } from "../TransactionUtils-BphBJBbU.mjs";
|
|
38
|
+
import { T as ve } from "../EmbeddedCard-DH8vQ3qN.mjs";
|
|
39
|
+
import { T as tt, c as ot } from "../TransactionDetails-roZ5xLq8.mjs";
|
|
40
|
+
import Te from "@mui/material/Card";
|
|
41
|
+
import De from "@mui/material/CardContent";
|
|
42
|
+
import { S as Se } from "../StatusBar-CPfSXe80.mjs";
|
|
43
|
+
import { S as Ge } from "../SingleSegmentDonut-7Uy6VEld.mjs";
|
|
44
|
+
import { u as nt, C as at } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
|
|
45
|
+
import Pe from "@mui/material/CardHeader";
|
|
46
|
+
import { subDays as rt } from "date-fns/subDays";
|
|
47
|
+
import st from "@mui/material/IconButton";
|
|
48
|
+
import { M as it } from "../ManageIncome-Dcsnnz86.mjs";
|
|
49
|
+
import { u as je } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
50
|
+
import { W as ct } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
51
|
+
import { g as lt, a as dt } from "../BudgetUtil-Bg2AQJpQ.mjs";
|
|
52
|
+
import { M as ut } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
53
|
+
import { b as mt } from "../CurrencyDialog-DumQCTPO.mjs";
|
|
54
|
+
const gt = I(() => {
|
|
55
|
+
const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal: c } = le(), i = c - n;
|
|
56
|
+
return /* @__PURE__ */ m(x, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
57
|
+
/* @__PURE__ */ m(x, { alignItems: "center", children: [
|
|
58
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(c, "0,0") }),
|
|
59
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.projected_income })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "-" }),
|
|
62
|
+
/* @__PURE__ */ m(x, { alignItems: "center", children: [
|
|
63
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(n, "0,0") }),
|
|
64
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.budgeted })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "=" }),
|
|
67
|
+
/* @__PURE__ */ m(x, { alignItems: "center", children: [
|
|
68
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(i, "0,0") }),
|
|
69
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.remaining })
|
|
70
|
+
] })
|
|
71
|
+
] });
|
|
72
|
+
}), pt = I(
|
|
73
|
+
({ category: t }) => {
|
|
74
|
+
const { budgets: n } = E(), { budgets: c } = w(), i = l.useMemo(() => {
|
|
75
|
+
const a = c.find((r) => r.category_guid === t.guid), s = D(t.totalAverageAmount, "0,0"), o = a ? R(n.recalculate_previous_budget, D(a.amount, "0,0")) : n.recalculate_new_budget;
|
|
76
|
+
return `${s} - ${o}`;
|
|
77
|
+
}, [n, c]);
|
|
78
|
+
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { children: [
|
|
80
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid, variant: "filled" }) }),
|
|
81
|
+
/* @__PURE__ */ e(ne, { primary: t.name, secondary: i })
|
|
82
|
+
] }) }),
|
|
83
|
+
/* @__PURE__ */ e(ue, {})
|
|
84
|
+
] }, t.guid);
|
|
85
|
+
}
|
|
86
|
+
), ht = ({ onRecalculateBudgets: t }) => {
|
|
87
|
+
const { budgets: n, common: c } = E(), { spendCategories: i } = q(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), p = i.filter((u) => u.totalAverageAmount > 0), d = async () => {
|
|
88
|
+
await a(p), r(!1), s(n.alert_recalculated_budgets), t?.();
|
|
111
89
|
};
|
|
112
90
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ariaLabelClose: i.close_aria,
|
|
133
|
-
isOpen: a,
|
|
134
|
-
onClose: () => c(!1),
|
|
135
|
-
onPrimaryAction: d,
|
|
136
|
-
title: o.recalculate_title,
|
|
137
|
-
children: /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ m(x, {
|
|
138
|
-
mx: 24,
|
|
139
|
-
my: 16,
|
|
140
|
-
children: [/* @__PURE__ */ e(v, {
|
|
141
|
-
bold: !0,
|
|
142
|
-
variant: "body1",
|
|
143
|
-
children: o.recalculate_description_top
|
|
144
|
-
}), /* @__PURE__ */ e(v, {
|
|
145
|
-
variant: "subtitle2",
|
|
146
|
-
children: o.recalculate_description_bottom
|
|
147
|
-
})]
|
|
148
|
-
}), /* @__PURE__ */ e(Q, {
|
|
149
|
-
bgcolor: "background.paper",
|
|
150
|
-
children: /* @__PURE__ */ e(ee, { children: g.map((u) => /* @__PURE__ */ e(pt, { category: u }, u.guid)) })
|
|
151
|
-
})] })
|
|
152
|
-
})
|
|
91
|
+
/* @__PURE__ */ e($e, { onClick: () => r(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
|
|
92
|
+
/* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center" }, variant: "subtitle1", children: n.recalculate_help }),
|
|
93
|
+
/* @__PURE__ */ e(
|
|
94
|
+
$,
|
|
95
|
+
{
|
|
96
|
+
ariaLabelClose: c.close_aria,
|
|
97
|
+
isOpen: o,
|
|
98
|
+
onClose: () => r(!1),
|
|
99
|
+
onPrimaryAction: d,
|
|
100
|
+
title: n.recalculate_title,
|
|
101
|
+
children: /* @__PURE__ */ m(x, { children: [
|
|
102
|
+
/* @__PURE__ */ m(x, { mx: 24, my: 16, children: [
|
|
103
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: n.recalculate_description_top }),
|
|
104
|
+
/* @__PURE__ */ e(C, { variant: "subtitle2", children: n.recalculate_description_bottom })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: p.map((u) => /* @__PURE__ */ e(pt, { category: u }, u.guid)) }) })
|
|
107
|
+
] })
|
|
108
|
+
}
|
|
109
|
+
)
|
|
153
110
|
] });
|
|
154
|
-
}, he = ({
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
111
|
+
}, he = ({
|
|
112
|
+
amount: t,
|
|
113
|
+
categoryName: n,
|
|
114
|
+
onAmountChanged: c
|
|
115
|
+
}) => {
|
|
116
|
+
const { budgets: i } = E(), { totalBudgeted: a } = w(), { incomeTotal: s } = le(), o = s - a;
|
|
117
|
+
return /* @__PURE__ */ m(x, { gap: 16, children: [
|
|
118
|
+
/* @__PURE__ */ m(x, { children: [
|
|
119
|
+
/* @__PURE__ */ e(C, { children: R(
|
|
120
|
+
i.add_description_top,
|
|
121
|
+
D(o, "0,0")
|
|
122
|
+
) }),
|
|
123
|
+
/* @__PURE__ */ e(C, { children: R(i.add_description_bottom, n) })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ e(
|
|
126
|
+
Ze,
|
|
127
|
+
{
|
|
128
|
+
amount: t,
|
|
129
|
+
autoFocus: !0,
|
|
130
|
+
label: i.add_label,
|
|
131
|
+
minAmount: 0,
|
|
132
|
+
setAmount: c,
|
|
133
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] });
|
|
137
|
+
}, bt = I(({ category: t, onAddBudget: n }) => {
|
|
138
|
+
const { budgets: c, common: i } = E(), [a, s] = l.useState(!1), [o, r] = l.useState(
|
|
139
|
+
`${t.totalAmount === 0 ? "" : t.totalAmount}`
|
|
140
|
+
);
|
|
141
|
+
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
142
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => s(!0), children: [
|
|
143
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(V, { categoryGuid: t.guid }) }),
|
|
144
|
+
/* @__PURE__ */ e(
|
|
145
|
+
ne,
|
|
146
|
+
{
|
|
147
|
+
primary: t.name,
|
|
148
|
+
secondary: D(t.totalAmount, "0,0")
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(z, { name: "add", size: 20 }) })
|
|
152
|
+
] }) }, t.guid),
|
|
153
|
+
/* @__PURE__ */ e(
|
|
154
|
+
W,
|
|
155
|
+
{
|
|
156
|
+
copy: { close_aria: i.close_aria, title: c.add_title },
|
|
157
|
+
disablePrimaryButton: Number(o) <= 0,
|
|
158
|
+
isOpen: a,
|
|
159
|
+
onClose: () => s(!1),
|
|
160
|
+
onPrimaryAction: () => n(t, Number(o)),
|
|
161
|
+
primaryText: c.add_save_button,
|
|
162
|
+
children: /* @__PURE__ */ e(he, { amount: o, categoryName: t.name, onAmountChanged: r })
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] });
|
|
166
|
+
}), ze = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
|
|
167
|
+
const { budgets: c } = E(), { addBudget: i, setAlert: a, unbudgetedCategories: s } = w(), o = async (r, p) => {
|
|
168
|
+
await i(r, p), t?.(), a(R(c.alert_budget_created, r.name));
|
|
201
169
|
};
|
|
202
170
|
return /* @__PURE__ */ m(x, { children: [
|
|
203
171
|
/* @__PURE__ */ e(gt, {}),
|
|
204
|
-
/* @__PURE__ */ e(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
category:
|
|
208
|
-
onAddBudget:
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
172
|
+
/* @__PURE__ */ e(X, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Z, { children: s.map((r) => /* @__PURE__ */ e(
|
|
173
|
+
bt,
|
|
174
|
+
{
|
|
175
|
+
category: r,
|
|
176
|
+
onAddBudget: o
|
|
177
|
+
},
|
|
178
|
+
r.guid
|
|
179
|
+
)) }) }),
|
|
180
|
+
/* @__PURE__ */ e(ht, { onRecalculateBudgets: n })
|
|
212
181
|
] });
|
|
213
|
-
}), Ie = 5, Fe = 100, ce = 25,
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
|
|
182
|
+
}), Ie = 5, Fe = 100, ce = 25, ft = (t) => {
|
|
183
|
+
const n = (a) => {
|
|
184
|
+
a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
|
|
185
|
+
}, c = (a) => {
|
|
186
|
+
a.subject.fx = a.x, a.subject.fy = a.y;
|
|
187
|
+
}, i = (a) => {
|
|
188
|
+
a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
|
|
220
189
|
};
|
|
221
|
-
return O.drag().on("start",
|
|
222
|
-
},
|
|
223
|
-
let
|
|
224
|
-
|
|
225
|
-
const
|
|
226
|
-
return (s) => (
|
|
227
|
-
},
|
|
228
|
-
O.selectAll(".bubble").call(
|
|
229
|
-
}, Oe = (t,
|
|
230
|
-
t.alpha(1).restart().force(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
190
|
+
return O.drag().on("start", n).on("drag", c).on("end", i);
|
|
191
|
+
}, yt = (t) => {
|
|
192
|
+
let n = t.transaction_total / t.amount;
|
|
193
|
+
n < 0 ? n = 0 : n > 1 && (n = 1);
|
|
194
|
+
const c = n * 2 * Math.PI, i = O.interpolate(0, c), a = O.arc().cornerRadius(5).innerRadius(t.radius - Ie * 2).outerRadius(t.radius - Ie).startAngle(0).endAngle(0);
|
|
195
|
+
return (s) => (a.endAngle(i(s)), a(t) || "");
|
|
196
|
+
}, _t = (t) => {
|
|
197
|
+
O.selectAll(".bubble").call(ft(t));
|
|
198
|
+
}, Oe = (t, n, c) => Math.min(Math.max(t, n), c), Ct = (t, n, c) => {
|
|
199
|
+
t.alpha(1).restart().force(
|
|
200
|
+
"x",
|
|
201
|
+
O.forceX().x(c / 2).strength(0.01)
|
|
202
|
+
).force(
|
|
203
|
+
"y",
|
|
204
|
+
O.forceY().y(n / 2).strength(0.02)
|
|
205
|
+
).on("tick", () => {
|
|
206
|
+
const i = t.nodes();
|
|
207
|
+
i.forEach((a) => {
|
|
208
|
+
const s = a.radius ?? ce;
|
|
209
|
+
a.x = Oe(a.x ?? 0, s, c - s), a.y = Oe(a.y ?? 0, s, n - s);
|
|
210
|
+
}), O.selectAll(".bubble").data(i).attr("transform", (a) => `translate(${a.x},${a.y})`);
|
|
236
211
|
});
|
|
237
|
-
}, Ue = (t,
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
return
|
|
241
|
-
}, 0),
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
},
|
|
245
|
-
const
|
|
212
|
+
}, Ue = (t, n) => O.scaleLinear().domain([t, n]).range([ce, Fe]), Bt = (t) => {
|
|
213
|
+
const n = t.reduce((s, o) => {
|
|
214
|
+
const r = Math.max(o.transaction_total, o.amount);
|
|
215
|
+
return r > s ? r : s;
|
|
216
|
+
}, 0), c = t.reduce((s, o) => {
|
|
217
|
+
const r = Math.max(o.transaction_total, o.amount);
|
|
218
|
+
return r < s ? r : s;
|
|
219
|
+
}, n), i = Ue(c, n), a = t.map((s) => {
|
|
220
|
+
const o = i(Math.max(s.transaction_total, s.amount)) || 25;
|
|
246
221
|
return {
|
|
247
|
-
...
|
|
248
|
-
radius:
|
|
222
|
+
...s,
|
|
223
|
+
radius: o
|
|
249
224
|
};
|
|
250
225
|
});
|
|
251
|
-
return O.forceSimulation(
|
|
252
|
-
},
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
if (
|
|
256
|
-
const
|
|
257
|
-
|
|
226
|
+
return O.forceSimulation(a).velocityDecay(0.05).force("collide", O.forceCollide((s) => s.radius + 2).strength(0.7));
|
|
227
|
+
}, St = (t, n, c) => {
|
|
228
|
+
const a = Math.PI * ce ** 2 * t, s = c < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, c - o), p = Math.max(100, n - o), d = r * p;
|
|
229
|
+
let u = ce;
|
|
230
|
+
if (a < d) {
|
|
231
|
+
const g = Math.sqrt(d / (t * Math.PI)), h = Math.min(r, p) / 4;
|
|
232
|
+
u = Math.min(Fe, g, h);
|
|
258
233
|
}
|
|
259
|
-
return
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
},
|
|
264
|
-
const
|
|
265
|
-
return O.scaleLinear().domain([r, i]).range([a, s]);
|
|
266
|
-
}, xt = (t, o, i = !1, r, n) => {
|
|
267
|
-
const s = o.map((d) => Math.max(d.transaction_total, d.amount)), a = Math.min(...s), c = Math.max(...s), g = i ? St(t.length, r, c, a, n) : Ue(a, c);
|
|
234
|
+
return s && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
|
|
235
|
+
}, At = (t, n, c, i, a) => {
|
|
236
|
+
const { maxRadius: s, minRadius: o } = St(t, n, a);
|
|
237
|
+
return O.scaleLinear().domain([i, c]).range([o, s]);
|
|
238
|
+
}, xt = (t, n, c = !1, i, a) => {
|
|
239
|
+
const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), p = c ? At(t.length, i, r, o, a) : Ue(o, r);
|
|
268
240
|
return t.map((d) => ({
|
|
269
241
|
...d,
|
|
270
|
-
radius:
|
|
242
|
+
radius: p(Math.max(d.transaction_total, d.amount))
|
|
271
243
|
}));
|
|
272
|
-
},
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
244
|
+
}, Me = 5, vt = 2e3, Tt = ({ bubble: t }) => {
|
|
245
|
+
const n = H(), {
|
|
246
|
+
amount: c,
|
|
247
|
+
guid: i,
|
|
248
|
+
budgetColors: { mercury: a },
|
|
249
|
+
radius: s,
|
|
250
|
+
transaction_total: o
|
|
251
|
+
} = t, r = `mercury-${i}`;
|
|
252
|
+
l.useEffect(() => {
|
|
253
|
+
O.select(`.${r}`).selectAll(".status").remove(), O.select(`.${r}`).append("path").transition().duration(vt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => yt(t));
|
|
254
|
+
}, [c, s, o]);
|
|
255
|
+
const p = O.arc().innerRadius((d) => d - 2 * Me).outerRadius((d) => d - Me).startAngle(0).endAngle(2 * Math.PI);
|
|
256
|
+
return /* @__PURE__ */ e("g", { className: r, children: /* @__PURE__ */ e(
|
|
257
|
+
"path",
|
|
258
|
+
{
|
|
259
|
+
d: p(s) || "",
|
|
260
|
+
style: { fill: n.palette.common.white, fillOpacity: 0.35 }
|
|
261
|
+
}
|
|
262
|
+
) });
|
|
290
263
|
}, Dt = l.memo(Tt), U = 75, Ce = 50;
|
|
291
|
-
function Et({ bubble: t, isDraggable:
|
|
264
|
+
function Et({ bubble: t, isDraggable: n, onClick: c = () => {
|
|
292
265
|
} }) {
|
|
293
|
-
const [
|
|
266
|
+
const [i, a] = l.useState(!1), s = H(), { availableWidth: o } = de(), r = l.useMemo(() => {
|
|
294
267
|
if (t)
|
|
295
268
|
return {
|
|
296
269
|
amount: t.amount,
|
|
@@ -299,50 +272,55 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
299
272
|
radius: t.radius,
|
|
300
273
|
transaction_total: t.transaction_total
|
|
301
274
|
};
|
|
302
|
-
}, [
|
|
303
|
-
t.amount,
|
|
304
|
-
t.budgetColors,
|
|
305
|
-
t.guid,
|
|
306
|
-
t.radius,
|
|
307
|
-
t.transaction_total
|
|
308
|
-
]);
|
|
275
|
+
}, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
|
|
309
276
|
if (!t) return;
|
|
310
|
-
const {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
277
|
+
const {
|
|
278
|
+
budgetColors: { background: p, text: d },
|
|
279
|
+
category: { icon: u, name: S },
|
|
280
|
+
guid: g,
|
|
281
|
+
description: h,
|
|
282
|
+
radius: _,
|
|
283
|
+
x: y,
|
|
284
|
+
y: A
|
|
285
|
+
} = t, v = o < 400 ? -8 : -12;
|
|
286
|
+
let b = v, B = v;
|
|
287
|
+
_ > U ? (b = -14, B = -45) : _ > Ce && (B = -32);
|
|
288
|
+
let f = 32;
|
|
289
|
+
_ <= U && (f = o < 400 ? 16 : 24);
|
|
290
|
+
const T = `${t.category.name}: ${h}`, L = {
|
|
291
|
+
modifiers: [
|
|
292
|
+
{
|
|
293
|
+
name: "offset",
|
|
294
|
+
options: { offset: [0, 15] }
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}, M = (G) => {
|
|
298
|
+
(G.key === "Enter" || G.key === " ") && (G.preventDefault(), c(t));
|
|
320
299
|
}, N = () => {
|
|
321
|
-
|
|
300
|
+
a(!0);
|
|
322
301
|
}, k = () => {
|
|
323
|
-
|
|
302
|
+
a(!1);
|
|
324
303
|
};
|
|
325
|
-
return /* @__PURE__ */ m(
|
|
326
|
-
"
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
touchAction: "manipulation"
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
/* @__PURE__ */ e("style", { children: `
|
|
304
|
+
return /* @__PURE__ */ m(
|
|
305
|
+
"g",
|
|
306
|
+
{
|
|
307
|
+
"aria-label": `${S} - ${h}`,
|
|
308
|
+
className: "bubble",
|
|
309
|
+
id: `bubble-${g}`,
|
|
310
|
+
onBlur: k,
|
|
311
|
+
onClick: () => c(t),
|
|
312
|
+
onFocus: N,
|
|
313
|
+
onKeyDown: M,
|
|
314
|
+
onMouseEnter: () => a(!0),
|
|
315
|
+
onMouseLeave: () => a(!1),
|
|
316
|
+
role: "button",
|
|
317
|
+
style: { cursor: n ? "pointer" : "default", touchAction: "manipulation" },
|
|
318
|
+
tabIndex: 0,
|
|
319
|
+
textAnchor: "middle",
|
|
320
|
+
x: y,
|
|
321
|
+
y: A,
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ e("style", { children: `
|
|
346
324
|
.bubble:focus,
|
|
347
325
|
.bubble:focus-visible {
|
|
348
326
|
outline: none;
|
|
@@ -354,1099 +332,1071 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
354
332
|
stroke-opacity: 0.8;
|
|
355
333
|
}
|
|
356
334
|
` }),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
y: 28,
|
|
400
|
-
children: b.split(" ")[1]
|
|
401
|
-
}),
|
|
402
|
-
/* @__PURE__ */ e(Dt, { bubble: c })
|
|
403
|
-
]
|
|
404
|
-
}, p);
|
|
335
|
+
/* @__PURE__ */ e(Je, { open: i, slotProps: { popper: L }, title: T, children: /* @__PURE__ */ e("circle", { fill: p, id: `circle-${g}`, r: _ }) }),
|
|
336
|
+
/* @__PURE__ */ e("svg", { x: b, y: B, children: /* @__PURE__ */ e(z, { name: u, size: f, sx: { fill: d } }) }),
|
|
337
|
+
_ > U && /* @__PURE__ */ e(
|
|
338
|
+
C,
|
|
339
|
+
{
|
|
340
|
+
bold: !0,
|
|
341
|
+
component: "text",
|
|
342
|
+
id: `budget-category-${g}`,
|
|
343
|
+
sx: { fill: d },
|
|
344
|
+
variant: "body2",
|
|
345
|
+
y: 4,
|
|
346
|
+
children: S
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
_ > Ce && /* @__PURE__ */ e(
|
|
350
|
+
C,
|
|
351
|
+
{
|
|
352
|
+
bold: !0,
|
|
353
|
+
component: "text",
|
|
354
|
+
id: `budget-description-${g}-1`,
|
|
355
|
+
sx: { fill: d },
|
|
356
|
+
variant: "body1",
|
|
357
|
+
y: _ <= U ? 12 : 24,
|
|
358
|
+
children: _ <= U ? h.split(" ")[0] : h
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
_ <= U && _ > Ce && /* @__PURE__ */ e(
|
|
362
|
+
C,
|
|
363
|
+
{
|
|
364
|
+
component: "text",
|
|
365
|
+
id: `budget-description-${g}-2`,
|
|
366
|
+
sx: { fill: d },
|
|
367
|
+
variant: "caption",
|
|
368
|
+
y: 28,
|
|
369
|
+
children: h.split(" ")[1]
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ e(Dt, { bubble: r })
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
g
|
|
376
|
+
);
|
|
405
377
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
378
|
+
const wt = ({
|
|
379
|
+
height: t,
|
|
380
|
+
width: n,
|
|
381
|
+
isDraggable: c = !1,
|
|
382
|
+
onClick: i = () => {
|
|
383
|
+
}
|
|
384
|
+
}) => {
|
|
385
|
+
const [a, s] = l.useState([]), o = l.useRef(null), r = l.useRef(!1), { detailedBudgets: p } = w(), d = l.useCallback(() => {
|
|
386
|
+
const u = o.current, S = Bt(p), g = S.nodes();
|
|
410
387
|
if (u) {
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
vx:
|
|
416
|
-
vy:
|
|
417
|
-
x:
|
|
418
|
-
y:
|
|
388
|
+
const h = u.nodes(), _ = new Map(h.map((y) => [y.guid, y]));
|
|
389
|
+
g.forEach((y) => {
|
|
390
|
+
const A = _.get(y.guid);
|
|
391
|
+
A && Object.assign(y, {
|
|
392
|
+
vx: A.vx,
|
|
393
|
+
vy: A.vy,
|
|
394
|
+
x: A.x,
|
|
395
|
+
y: A.y
|
|
419
396
|
});
|
|
420
397
|
});
|
|
421
398
|
}
|
|
422
|
-
|
|
423
|
-
}, [
|
|
399
|
+
o.current = S, r.current = !1, s(g);
|
|
400
|
+
}, [p]);
|
|
424
401
|
return l.useEffect(() => {
|
|
425
402
|
d();
|
|
426
403
|
}, [d]), l.useEffect(() => () => {
|
|
427
|
-
|
|
404
|
+
o.current && (o.current.stop(), o.current = null);
|
|
428
405
|
}, []), l.useEffect(() => {
|
|
429
|
-
const u =
|
|
406
|
+
const u = o.current;
|
|
430
407
|
if (!u) return;
|
|
431
|
-
const
|
|
432
|
-
u.nodes(
|
|
433
|
-
|
|
434
|
-
}, 0), s([...
|
|
435
|
-
}, [
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}, It = I(wt), Ot = ({ isMiniWidget: t = !1, onConnectAccountsClick: o, createBudgetOnClick: i }) => {
|
|
454
|
-
const { config: r } = ke(), { recalculateBudgets: n } = E(), { spendCategories: s } = J(), { budgets: a } = w(), { availableWidth: c } = de(), { isMobile: g } = le(c), d = t && g, [u, C] = l.useState(!1), [p, b] = l.useState(!1), [f, _] = l.useState(!1), S = l.useMemo(() => [...s.filter((h) => h.totalAverageAmount > 0)], [s]), A = async () => {
|
|
455
|
-
_(!0);
|
|
456
|
-
const { data: h, isSuccess: B } = await n(S);
|
|
457
|
-
_(!1), B ? (h.length === 0 && b(!0), C(!1)) : C(!0);
|
|
408
|
+
const S = u.nodes(), g = n > 0 && n < 450 || t > 0 && t < 300, h = xt(S, p, g, t, n);
|
|
409
|
+
u.nodes(h), Ct(u, t, n), c && setTimeout(() => {
|
|
410
|
+
_t(u);
|
|
411
|
+
}, 0), s([...h]);
|
|
412
|
+
}, [t, n, c, p]), /* @__PURE__ */ e(
|
|
413
|
+
"svg",
|
|
414
|
+
{
|
|
415
|
+
height: t,
|
|
416
|
+
style: { overflow: "visible", touchAction: "manipulation" },
|
|
417
|
+
width: Math.abs(n),
|
|
418
|
+
children: a.map((u) => /* @__PURE__ */ e(Et, { bubble: u, isDraggable: c, onClick: i }, u.guid))
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
}, It = I(wt), Ot = ({
|
|
422
|
+
isMiniWidget: t = !1,
|
|
423
|
+
onConnectAccountsClick: n,
|
|
424
|
+
createBudgetOnClick: c
|
|
425
|
+
}) => {
|
|
426
|
+
const { config: i } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = q(), { budgets: o } = E(), { availableWidth: r } = de(), { isMobile: p } = ge(r), d = t && p, [u, S] = l.useState(!1), [g, h] = l.useState(!1), [_, y] = l.useState(!1), A = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
|
|
427
|
+
y(!0);
|
|
428
|
+
const { data: b, isSuccess: B } = await a(A);
|
|
429
|
+
y(!1), B ? (b.length === 0 && h(!0), S(!1)) : S(!0);
|
|
458
430
|
};
|
|
459
|
-
return
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
secondaryButton: a.zero_state_generate_budgets_secondary_button,
|
|
468
|
-
subText: a.autogenerate_budgets_error_subheader,
|
|
469
|
-
sx: {
|
|
470
|
-
width: { sm: 468 },
|
|
471
|
-
".buttons-footer": {
|
|
472
|
-
width: 208,
|
|
473
|
-
...d && {
|
|
474
|
-
mt: 16,
|
|
475
|
-
button: { height: "max-content" }
|
|
476
|
-
}
|
|
431
|
+
return _ ? /* @__PURE__ */ e(pe, {}) : u ? /* @__PURE__ */ e(
|
|
432
|
+
_e,
|
|
433
|
+
{
|
|
434
|
+
header: o.autogenerate_budgets_error_header,
|
|
435
|
+
icon: "error",
|
|
436
|
+
iconColor: "#4D4D4D",
|
|
437
|
+
onClick: (b) => {
|
|
438
|
+
b === "primary" ? v() : c();
|
|
477
439
|
},
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
440
|
+
primaryButton: o.autogenerate_budgets_error_primary_button,
|
|
441
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
442
|
+
subText: o.autogenerate_budgets_error_subheader,
|
|
443
|
+
sx: {
|
|
444
|
+
width: { sm: 468 },
|
|
445
|
+
".buttons-footer": {
|
|
446
|
+
width: 208,
|
|
447
|
+
...d && { mt: 16, button: { height: "max-content" } }
|
|
448
|
+
},
|
|
449
|
+
...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
|
|
485
450
|
}
|
|
486
451
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
secondaryButton: a.zero_state_generate_budgets_secondary_button,
|
|
496
|
-
subText: a.zero_state_generate_budgets_subheader,
|
|
497
|
-
sx: {
|
|
498
|
-
width: t ? "100%" : { sm: 500 },
|
|
499
|
-
height: t ? "100%" : { sm: 468 },
|
|
500
|
-
mt: d ? 0 : 50,
|
|
501
|
-
".buttons-footer": {
|
|
502
|
-
width: 208,
|
|
503
|
-
height: 100,
|
|
504
|
-
...d && {
|
|
505
|
-
mt: 16,
|
|
506
|
-
button: { height: "max-content" }
|
|
507
|
-
}
|
|
452
|
+
) : /* @__PURE__ */ e(Ve, { children: g ? /* @__PURE__ */ e(
|
|
453
|
+
_e,
|
|
454
|
+
{
|
|
455
|
+
header: o.zero_state_generate_budgets_header,
|
|
456
|
+
icon: "error",
|
|
457
|
+
iconColor: "#4D4D4D",
|
|
458
|
+
onClick: (b) => {
|
|
459
|
+
b === "primary" ? n() : c();
|
|
508
460
|
},
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
461
|
+
primaryButton: i.show_connections_widget_in_master ? o.zero_state_generate_budgets_primary_button : void 0,
|
|
462
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
463
|
+
subText: o.zero_state_generate_budgets_subheader,
|
|
464
|
+
sx: {
|
|
465
|
+
width: t ? "100%" : { sm: 500 },
|
|
466
|
+
height: t ? "100%" : { sm: 468 },
|
|
467
|
+
mt: d ? 0 : 50,
|
|
468
|
+
".buttons-footer": {
|
|
469
|
+
width: 208,
|
|
470
|
+
height: 100,
|
|
471
|
+
...d && { mt: 16, button: { height: "max-content" } }
|
|
472
|
+
},
|
|
473
|
+
padding: t ? 5 : 0,
|
|
474
|
+
...d && { justifyContent: "center", svg: { height: 32, width: 32 } }
|
|
516
475
|
}
|
|
517
476
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
secondaryButton: t ? void 0 : a.empty_state_secondary_button,
|
|
527
|
-
subText: a.empty_state_subheader,
|
|
528
|
-
sx: {
|
|
529
|
-
width: t ? "100%" : { sm: 432 },
|
|
530
|
-
height: t ? "100%" : { sm: 468 },
|
|
531
|
-
mt: d ? 0 : 50,
|
|
532
|
-
".buttons-footer": {
|
|
533
|
-
width: 208,
|
|
534
|
-
height: 100,
|
|
535
|
-
...d && {
|
|
536
|
-
mt: 24,
|
|
537
|
-
button: { height: "max-content" }
|
|
538
|
-
}
|
|
477
|
+
) : /* @__PURE__ */ e(
|
|
478
|
+
_e,
|
|
479
|
+
{
|
|
480
|
+
header: o.create_budgets_title,
|
|
481
|
+
icon: "bubble_chart",
|
|
482
|
+
iconColor: "#1A1A1A",
|
|
483
|
+
onClick: (b) => {
|
|
484
|
+
b === "primary" ? v() : c();
|
|
539
485
|
},
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
486
|
+
primaryButton: o.empty_state_primary_button,
|
|
487
|
+
secondaryButton: t ? void 0 : o.empty_state_secondary_button,
|
|
488
|
+
subText: o.empty_state_subheader,
|
|
489
|
+
sx: {
|
|
490
|
+
width: t ? "100%" : { sm: 432 },
|
|
491
|
+
height: t ? "100%" : { sm: 468 },
|
|
492
|
+
mt: d ? 0 : 50,
|
|
493
|
+
".buttons-footer": {
|
|
494
|
+
width: 208,
|
|
495
|
+
height: 100,
|
|
496
|
+
...d && { mt: 24, button: { height: "max-content" } }
|
|
497
|
+
},
|
|
498
|
+
padding: t ? 4 : 0,
|
|
499
|
+
...d && { justifyContent: "center", svg: { height: 32, width: 32 } }
|
|
547
500
|
}
|
|
548
501
|
}
|
|
549
|
-
|
|
550
|
-
}, We = I(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
c(A), a(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
554
|
-
budget_category: A.category.name,
|
|
555
|
-
click_type: "bubble"
|
|
556
|
-
});
|
|
557
|
-
}, S = () => {
|
|
558
|
-
b(!0), a(P.ACCOUNTS_CLICK_CONNECT);
|
|
559
|
-
};
|
|
560
|
-
return /* @__PURE__ */ m(Q, {
|
|
561
|
-
ml: n || C ? 0 : 24,
|
|
562
|
-
sx: {
|
|
563
|
-
alignSelf: "center",
|
|
564
|
-
...r && { height: "100%" }
|
|
565
|
-
},
|
|
566
|
-
children: [n || !g ? /* @__PURE__ */ e(Ot, {
|
|
567
|
-
createBudgetOnClick: t,
|
|
568
|
-
isMiniWidget: r,
|
|
569
|
-
onConnectAccountsClick: S
|
|
570
|
-
}) : /* @__PURE__ */ e(It, {
|
|
571
|
-
height: o,
|
|
572
|
-
isDraggable: i,
|
|
573
|
-
onClick: _,
|
|
574
|
-
width: f
|
|
575
|
-
}), /* @__PURE__ */ e(tt, {
|
|
576
|
-
onClose: () => b(!1),
|
|
577
|
-
showConnectionsWidget: p,
|
|
578
|
-
title: d.manage_connections
|
|
579
|
-
})]
|
|
580
|
-
});
|
|
581
|
-
}), He = ({ budget: t }) => {
|
|
582
|
-
const { amount: o, budgetColors: { background: i }, category: { name: r }, category_guid: n, percentage: s, transaction_total: a } = t, c = [{
|
|
583
|
-
color: i,
|
|
584
|
-
percentage: `${s}%`
|
|
585
|
-
}];
|
|
586
|
-
return /* @__PURE__ */ e(xe, {
|
|
587
|
-
sx: {
|
|
588
|
-
mt: 24,
|
|
589
|
-
mx: 24
|
|
502
|
+
) });
|
|
503
|
+
}, We = I(
|
|
504
|
+
({
|
|
505
|
+
createBudgetOnClick: t = () => {
|
|
590
506
|
},
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
507
|
+
height: n,
|
|
508
|
+
isDraggable: c = !1,
|
|
509
|
+
isMiniWidget: i = !1,
|
|
510
|
+
shouldShowZeroState: a,
|
|
511
|
+
unavailableWidth: s = 24
|
|
512
|
+
}) => {
|
|
513
|
+
const { onEvent: o } = J(), { setSelectedBudget: r } = w(), { isInitialized: p } = Q(), { accounts: d } = E(), { availableWidth: u } = de(), { isMobile: S } = ge(), [g, h] = l.useState(!1), _ = l.useMemo(() => u - s, [u]), y = (v) => {
|
|
514
|
+
r(v), o(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
515
|
+
budget_category: v.category.name,
|
|
516
|
+
click_type: "bubble"
|
|
517
|
+
});
|
|
518
|
+
}, A = () => {
|
|
519
|
+
h(!0), o(P.ACCOUNTS_CLICK_CONNECT);
|
|
520
|
+
};
|
|
521
|
+
return /* @__PURE__ */ m(
|
|
522
|
+
X,
|
|
523
|
+
{
|
|
524
|
+
ml: a || S ? 0 : 24,
|
|
525
|
+
sx: { alignSelf: "center", ...i && { height: "100%" } },
|
|
526
|
+
children: [
|
|
527
|
+
a || !p ? /* @__PURE__ */ e(
|
|
528
|
+
Ot,
|
|
529
|
+
{
|
|
530
|
+
createBudgetOnClick: t,
|
|
531
|
+
isMiniWidget: i,
|
|
532
|
+
onConnectAccountsClick: A
|
|
533
|
+
}
|
|
534
|
+
) : /* @__PURE__ */ e(
|
|
535
|
+
It,
|
|
536
|
+
{
|
|
537
|
+
height: n,
|
|
538
|
+
isDraggable: c,
|
|
539
|
+
onClick: y,
|
|
540
|
+
width: _
|
|
541
|
+
}
|
|
542
|
+
),
|
|
543
|
+
/* @__PURE__ */ e(
|
|
544
|
+
qe,
|
|
545
|
+
{
|
|
546
|
+
onClose: () => h(!1),
|
|
547
|
+
showConnectionsWidget: g,
|
|
548
|
+
title: d.manage_connections
|
|
549
|
+
}
|
|
550
|
+
)
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
), He = ({ budget: t }) => {
|
|
556
|
+
const {
|
|
557
|
+
amount: n,
|
|
558
|
+
budgetColors: { background: c },
|
|
559
|
+
category: { name: i },
|
|
560
|
+
category_guid: a,
|
|
561
|
+
percentage: s,
|
|
562
|
+
transaction_total: o
|
|
563
|
+
} = t, r = [
|
|
564
|
+
{
|
|
565
|
+
color: c,
|
|
566
|
+
percentage: `${s}%`
|
|
567
|
+
}
|
|
568
|
+
];
|
|
569
|
+
return /* @__PURE__ */ e(Te, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(De, { children: /* @__PURE__ */ m(x, { alignItems: "center", gap: 16, children: [
|
|
570
|
+
/* @__PURE__ */ e(V, { categoryGuid: a, size: 56 }),
|
|
571
|
+
/* @__PURE__ */ e(C, { variant: "h1", children: `${D(o, "0,0")} / ${D(n, "0,0")}` }),
|
|
572
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: i }),
|
|
573
|
+
/* @__PURE__ */ e(Se, { data: r, height: 10 })
|
|
574
|
+
] }) }) });
|
|
575
|
+
}, Mt = I(() => {
|
|
576
|
+
const { budgets: t } = E();
|
|
577
|
+
return /* @__PURE__ */ m(x, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
578
|
+
/* @__PURE__ */ e(z, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
579
|
+
/* @__PURE__ */ e(C, { bold: !0, color: "text.secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
|
|
580
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
|
|
581
|
+
] });
|
|
582
|
+
}), Rt = I(({ budget: t }) => {
|
|
583
|
+
const {
|
|
584
|
+
amount: n,
|
|
585
|
+
budgetColors: { background: c },
|
|
586
|
+
category: i,
|
|
587
|
+
percentage: a,
|
|
588
|
+
transaction_total: s
|
|
589
|
+
} = t, { setSelectedSubBudget: o } = w();
|
|
590
|
+
return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => o(t), children: [
|
|
591
|
+
/* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: c, percent: a, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: i.parent_guid, variant: "basic" }) }) }),
|
|
592
|
+
/* @__PURE__ */ e(
|
|
593
|
+
ne,
|
|
594
|
+
{
|
|
595
|
+
primary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }) }),
|
|
596
|
+
secondary: /* @__PURE__ */ e(x, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
|
|
679
597
|
${D(s, "0,0")} /
|
|
680
|
-
${D(
|
|
681
|
-
`
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
const { budgets: i, common: r } = w(), { setExpandedGuid: n, setOnSelect: s } = et(), { addBudget: a } = E(), [c, g] = l.useState(!1), [d, u] = l.useState(!1), [C, p] = l.useState(""), [b, f] = l.useState(void 0);
|
|
598
|
+
${D(n, "0,0")}
|
|
599
|
+
` }) })
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
] }) });
|
|
603
|
+
}), Lt = I(({ category: t, parentBudget: n }) => {
|
|
604
|
+
const { budgets: c, common: i } = E(), { setExpandedGuid: a, setOnSelect: s } = nt(), { addBudget: o } = w(), [r, p] = l.useState(!1), [d, u] = l.useState(!1), [S, g] = l.useState(""), [h, _] = l.useState(void 0);
|
|
688
605
|
l.useEffect(() => {
|
|
689
|
-
s((
|
|
690
|
-
const
|
|
691
|
-
|
|
606
|
+
s((v) => {
|
|
607
|
+
const b = t.subCategories.find((B) => B.guid === v);
|
|
608
|
+
b && (_(b), g(`${b.currentAmount === 0 ? "" : b.currentAmount}`), u(!0));
|
|
692
609
|
});
|
|
693
610
|
}, []);
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
},
|
|
697
|
-
|
|
611
|
+
const y = () => {
|
|
612
|
+
a(t.guid), p(!0);
|
|
613
|
+
}, A = async () => {
|
|
614
|
+
h && Number(S) > 0 && (await o(h, Number(S), n.guid), u(!1), p(!1), _(void 0));
|
|
698
615
|
};
|
|
699
|
-
return /* @__PURE__ */ m(
|
|
700
|
-
/* @__PURE__ */ e(te, {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
onClose: () => g(!1),
|
|
738
|
-
title: i.add_sub_budget_title,
|
|
739
|
-
children: /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(Qe, {
|
|
740
|
-
category: t,
|
|
741
|
-
subCategories: t.subCategories
|
|
742
|
-
}) })
|
|
743
|
-
}),
|
|
744
|
-
/* @__PURE__ */ e(W, {
|
|
745
|
-
copy: {
|
|
746
|
-
close_aria: r.close_aria,
|
|
747
|
-
title: i.add_title
|
|
748
|
-
},
|
|
749
|
-
disablePrimaryButton: Number(C) <= 0,
|
|
750
|
-
isOpen: d,
|
|
751
|
-
onClose: () => u(!1),
|
|
752
|
-
onPrimaryAction: S,
|
|
753
|
-
primaryText: i.add_save_button,
|
|
754
|
-
children: /* @__PURE__ */ e(he, {
|
|
755
|
-
amount: C,
|
|
756
|
-
categoryName: b?.name || "",
|
|
757
|
-
onAmountChanged: p
|
|
758
|
-
})
|
|
759
|
-
})
|
|
616
|
+
return /* @__PURE__ */ m(X, { children: [
|
|
617
|
+
/* @__PURE__ */ e(te, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(oe, { onClick: y, children: /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ m(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
618
|
+
/* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
619
|
+
/* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
|
|
620
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: c.add_sub_budget_button })
|
|
621
|
+
] }),
|
|
622
|
+
/* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
623
|
+
] }) }) }) }),
|
|
624
|
+
/* @__PURE__ */ e(ue, {}),
|
|
625
|
+
/* @__PURE__ */ e(
|
|
626
|
+
$,
|
|
627
|
+
{
|
|
628
|
+
ariaLabelClose: i.close_aria,
|
|
629
|
+
isOpen: r,
|
|
630
|
+
onClose: () => p(!1),
|
|
631
|
+
title: c.add_sub_budget_title,
|
|
632
|
+
children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(at, { category: t, subCategories: t.subCategories }) })
|
|
633
|
+
}
|
|
634
|
+
),
|
|
635
|
+
/* @__PURE__ */ e(
|
|
636
|
+
W,
|
|
637
|
+
{
|
|
638
|
+
copy: { close_aria: i.close_aria, title: c.add_title },
|
|
639
|
+
disablePrimaryButton: Number(S) <= 0,
|
|
640
|
+
isOpen: d,
|
|
641
|
+
onClose: () => u(!1),
|
|
642
|
+
onPrimaryAction: A,
|
|
643
|
+
primaryText: c.add_save_button,
|
|
644
|
+
children: /* @__PURE__ */ e(
|
|
645
|
+
he,
|
|
646
|
+
{
|
|
647
|
+
amount: S,
|
|
648
|
+
categoryName: h?.name || "",
|
|
649
|
+
onAmountChanged: g
|
|
650
|
+
}
|
|
651
|
+
)
|
|
652
|
+
}
|
|
653
|
+
)
|
|
760
654
|
] });
|
|
761
655
|
}), Nt = I(({ budget: t }) => {
|
|
762
|
-
const { category:
|
|
656
|
+
const { category: n, subBudgets: c } = t, { budgets: i, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: p } = w(), { filter: d, setFilter: u } = ee(), [S, g] = l.useState(!1), [h, _] = l.useState(!1), [y, A] = l.useState("");
|
|
763
657
|
l.useEffect(() => {
|
|
764
|
-
|
|
658
|
+
o && (A(`${o.amount}`), u({
|
|
765
659
|
...d,
|
|
766
|
-
custom: (
|
|
660
|
+
custom: (f) => f.category_guid === o.category_guid
|
|
767
661
|
}));
|
|
768
|
-
}, [
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
...
|
|
772
|
-
amount: Number(
|
|
662
|
+
}, [o]);
|
|
663
|
+
const v = async () => {
|
|
664
|
+
o && await p({
|
|
665
|
+
...o,
|
|
666
|
+
amount: Number(y)
|
|
773
667
|
});
|
|
774
|
-
},
|
|
775
|
-
|
|
668
|
+
}, b = async () => {
|
|
669
|
+
o && await s(o.guid), _(!1), B();
|
|
776
670
|
}, B = () => {
|
|
777
671
|
u({
|
|
778
672
|
...d,
|
|
779
|
-
custom: (
|
|
780
|
-
}),
|
|
673
|
+
custom: (f) => f.category_guid === t.category_guid || f.top_level_category_guid === t.category_guid
|
|
674
|
+
}), r(void 0);
|
|
781
675
|
};
|
|
782
676
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
783
|
-
/* @__PURE__ */ m(
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
})
|
|
789
|
-
}),
|
|
790
|
-
/* @__PURE__ */ e(
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
children:
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
677
|
+
/* @__PURE__ */ m(Z, { sx: { bgcolor: "background.paper" }, children: [
|
|
678
|
+
c.length === 0 ? /* @__PURE__ */ e(Mt, {}) : c.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
679
|
+
/* @__PURE__ */ e(Rt, { budget: f }),
|
|
680
|
+
/* @__PURE__ */ e(ue, {})
|
|
681
|
+
] }, f.guid)),
|
|
682
|
+
/* @__PURE__ */ e(Lt, { category: n, parentBudget: t })
|
|
683
|
+
] }),
|
|
684
|
+
/* @__PURE__ */ e(
|
|
685
|
+
$,
|
|
686
|
+
{
|
|
687
|
+
ariaLabelClose: a.close_aria,
|
|
688
|
+
isOpen: !!o,
|
|
689
|
+
onClose: B,
|
|
690
|
+
onPrimaryAction: () => g(!0),
|
|
691
|
+
onSecondaryAction: () => _(!0),
|
|
692
|
+
primaryText: i.details_edit_button,
|
|
693
|
+
secondaryText: i.details_delete_button,
|
|
694
|
+
title: i.details_title,
|
|
695
|
+
children: o && /* @__PURE__ */ m(x, { gap: 24, children: [
|
|
696
|
+
/* @__PURE__ */ e(He, { budget: o }),
|
|
697
|
+
/* @__PURE__ */ e(ve, { height: "100%" })
|
|
698
|
+
] })
|
|
699
|
+
}
|
|
700
|
+
),
|
|
701
|
+
o && /* @__PURE__ */ m(l.Fragment, { children: [
|
|
702
|
+
/* @__PURE__ */ e(
|
|
703
|
+
W,
|
|
704
|
+
{
|
|
705
|
+
copy: { close_aria: a.close_aria, title: i.details_edit_title },
|
|
706
|
+
disablePrimaryButton: Number(y) <= 0,
|
|
707
|
+
isOpen: S,
|
|
708
|
+
onClose: () => g(!1),
|
|
709
|
+
onPrimaryAction: v,
|
|
710
|
+
primaryText: i.edit_save_button,
|
|
711
|
+
children: /* @__PURE__ */ e(
|
|
712
|
+
he,
|
|
713
|
+
{
|
|
714
|
+
amount: y,
|
|
715
|
+
categoryName: o.category.name,
|
|
716
|
+
onAmountChanged: A
|
|
717
|
+
}
|
|
718
|
+
)
|
|
719
|
+
}
|
|
720
|
+
),
|
|
721
|
+
/* @__PURE__ */ e(
|
|
722
|
+
W,
|
|
723
|
+
{
|
|
724
|
+
copy: { close_aria: a.close_aria, title: i.delete_title },
|
|
725
|
+
isOpen: h,
|
|
726
|
+
onClose: () => _(!1),
|
|
727
|
+
onPrimaryAction: b,
|
|
728
|
+
primaryColor: "error",
|
|
729
|
+
primaryText: "Delete",
|
|
730
|
+
secondaryColor: "secondary",
|
|
731
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(i.delete_description, o.category.name) })
|
|
732
|
+
}
|
|
733
|
+
)
|
|
734
|
+
] })
|
|
835
735
|
] });
|
|
836
736
|
}), kt = I(({ budget: t }) => {
|
|
837
|
-
const { is_mobile_webview:
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
})
|
|
878
|
-
|
|
879
|
-
|
|
737
|
+
const { is_mobile_webview: n } = Ne(), { setAlert: c } = w(), { budgets: i, common: a, transactions: s } = E(), { isDesktop: o, isSmallTablet: r, isTablet: p } = ge(), {
|
|
738
|
+
sortedTransactions: d,
|
|
739
|
+
sortedTransactionsWithSplits: u,
|
|
740
|
+
tags: S
|
|
741
|
+
} = ee(), [g, h] = l.useState(0), [_, y] = l.useState(""), A = l.useMemo(
|
|
742
|
+
() => d.find((f) => f.guid === _),
|
|
743
|
+
[_, d]
|
|
744
|
+
), v = (f, T) => {
|
|
745
|
+
h(T);
|
|
746
|
+
}, b = () => {
|
|
747
|
+
et(u, S), c(i.alert_csv_downloaded);
|
|
748
|
+
}, B = d.length > 0 && !n && (o || p && !r);
|
|
749
|
+
return /* @__PURE__ */ m(x, { gap: 24, children: [
|
|
750
|
+
/* @__PURE__ */ e(He, { budget: t }),
|
|
751
|
+
/* @__PURE__ */ m(x, { children: [
|
|
752
|
+
/* @__PURE__ */ m(
|
|
753
|
+
Qe,
|
|
754
|
+
{
|
|
755
|
+
onChange: v,
|
|
756
|
+
sx: { width: "100%" },
|
|
757
|
+
textColor: "primary",
|
|
758
|
+
value: g,
|
|
759
|
+
variant: "fullWidth",
|
|
760
|
+
children: [
|
|
761
|
+
/* @__PURE__ */ e(Ee, { label: i.details_transactions_tab }),
|
|
762
|
+
/* @__PURE__ */ e(Ee, { label: i.details_subbudgets_tab })
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
g === 0 && /* @__PURE__ */ m(x, { children: [
|
|
767
|
+
B && /* @__PURE__ */ e(x, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
|
|
768
|
+
$e,
|
|
769
|
+
{
|
|
770
|
+
onClick: b,
|
|
771
|
+
startIcon: /* @__PURE__ */ e(z, { name: "ios_share" }),
|
|
772
|
+
variant: "text",
|
|
773
|
+
children: s.export_csv_btn
|
|
774
|
+
}
|
|
775
|
+
) }),
|
|
776
|
+
/* @__PURE__ */ e(ve, { height: "100%", onClick: y })
|
|
777
|
+
] }),
|
|
778
|
+
g === 1 && /* @__PURE__ */ e(Nt, { budget: t }),
|
|
779
|
+
/* @__PURE__ */ e(
|
|
780
|
+
$,
|
|
781
|
+
{
|
|
782
|
+
ariaLabelClose: a.close_aria,
|
|
783
|
+
isOpen: !!A,
|
|
784
|
+
onClose: () => y(""),
|
|
785
|
+
title: i.details_transaction_drawer,
|
|
786
|
+
children: A && /* @__PURE__ */ e(tt, { transaction: A })
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
] })
|
|
790
|
+
] });
|
|
880
791
|
}), $t = I(() => {
|
|
881
|
-
const { selectedAccountGuids: t } =
|
|
792
|
+
const { selectedAccountGuids: t } = Q(), { budgets: n, common: c } = E(), {
|
|
793
|
+
alert: i,
|
|
794
|
+
dateRange: a,
|
|
795
|
+
deleteBudget: s,
|
|
796
|
+
selectedBudget: o,
|
|
797
|
+
selectedSubBudget: r,
|
|
798
|
+
setAlert: p,
|
|
799
|
+
setSelectedBudget: d,
|
|
800
|
+
updateBudget: u
|
|
801
|
+
} = w(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useState(!1), [A, v] = l.useState(!1), [b, B] = l.useState("");
|
|
882
802
|
l.useEffect(() => {
|
|
883
|
-
|
|
803
|
+
o && !r && (B(`${o.amount}`), h(!0), S({
|
|
884
804
|
accounts: t,
|
|
885
|
-
dateRange:
|
|
886
|
-
custom: (N) => N.category_guid ===
|
|
805
|
+
dateRange: a,
|
|
806
|
+
custom: (N) => N.category_guid === o.category_guid || N.top_level_category_guid === o.category_guid,
|
|
887
807
|
showSplits: !0
|
|
888
808
|
}));
|
|
889
|
-
}, [
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
...
|
|
893
|
-
amount: Number(
|
|
894
|
-
percentage:
|
|
895
|
-
}),
|
|
809
|
+
}, [o]);
|
|
810
|
+
const f = async () => {
|
|
811
|
+
o && (await u({
|
|
812
|
+
...o,
|
|
813
|
+
amount: Number(b),
|
|
814
|
+
percentage: o.category.totalAmount / Number(b) * 100
|
|
815
|
+
}), y(!1), p(R(n.alert_budget_updated, o.category.name)));
|
|
896
816
|
}, T = async () => {
|
|
897
|
-
|
|
898
|
-
},
|
|
899
|
-
|
|
817
|
+
o && (await s(o.guid), p(R(n.alert_budget_deleted, o.category.name))), L();
|
|
818
|
+
}, L = () => {
|
|
819
|
+
h(!1), setTimeout(() => {
|
|
900
820
|
d(void 0);
|
|
901
821
|
}, 250);
|
|
902
|
-
},
|
|
903
|
-
|
|
822
|
+
}, M = () => {
|
|
823
|
+
y(!1), B(`${o?.amount}`);
|
|
904
824
|
};
|
|
905
|
-
if (
|
|
825
|
+
if (o)
|
|
906
826
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
907
|
-
/* @__PURE__ */ m(
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/* @__PURE__ */ e(
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
title:
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
children: R(
|
|
965
|
-
}
|
|
966
|
-
|
|
827
|
+
/* @__PURE__ */ m(
|
|
828
|
+
$,
|
|
829
|
+
{
|
|
830
|
+
ariaLabelClose: c.close_aria,
|
|
831
|
+
isOpen: g,
|
|
832
|
+
onClose: L,
|
|
833
|
+
onPrimaryAction: () => y(!0),
|
|
834
|
+
onSecondaryAction: () => v(!0),
|
|
835
|
+
primaryText: n.details_edit_button,
|
|
836
|
+
secondaryColor: "error",
|
|
837
|
+
secondaryText: n.details_delete_button,
|
|
838
|
+
title: n.details_title,
|
|
839
|
+
children: [
|
|
840
|
+
/* @__PURE__ */ e(kt, { budget: o }),
|
|
841
|
+
/* @__PURE__ */ e(
|
|
842
|
+
xe,
|
|
843
|
+
{
|
|
844
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
845
|
+
autoHideDuration: 3500,
|
|
846
|
+
onClose: () => p(""),
|
|
847
|
+
open: !!i,
|
|
848
|
+
children: /* @__PURE__ */ e(Ae, { closeText: "", onClose: () => p(""), severity: "success", variant: "filled", children: i })
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
/* @__PURE__ */ e(
|
|
855
|
+
W,
|
|
856
|
+
{
|
|
857
|
+
copy: { close_aria: c.close_aria, title: n.details_edit_title },
|
|
858
|
+
disablePrimaryButton: Number(b) <= 0,
|
|
859
|
+
isOpen: _,
|
|
860
|
+
onClose: M,
|
|
861
|
+
onPrimaryAction: f,
|
|
862
|
+
onSecondaryAction: M,
|
|
863
|
+
primaryText: n.edit_save_button,
|
|
864
|
+
children: /* @__PURE__ */ e(
|
|
865
|
+
he,
|
|
866
|
+
{
|
|
867
|
+
amount: b,
|
|
868
|
+
categoryName: o.category.name,
|
|
869
|
+
onAmountChanged: B
|
|
870
|
+
}
|
|
871
|
+
)
|
|
872
|
+
}
|
|
873
|
+
),
|
|
874
|
+
/* @__PURE__ */ e(
|
|
875
|
+
W,
|
|
876
|
+
{
|
|
877
|
+
copy: { close_aria: c.close_aria, title: n.delete_title },
|
|
878
|
+
isOpen: A,
|
|
879
|
+
onClose: () => v(!1),
|
|
880
|
+
onPrimaryAction: T,
|
|
881
|
+
primaryColor: "error",
|
|
882
|
+
primaryText: n.details_delete_button,
|
|
883
|
+
secondaryColor: "secondary",
|
|
884
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(n.delete_description, o.category.name) })
|
|
885
|
+
}
|
|
886
|
+
)
|
|
967
887
|
] });
|
|
968
|
-
}), Gt = ({ budget: t, onClick:
|
|
969
|
-
const {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
}), /* @__PURE__ */ e(ae, {
|
|
987
|
-
primary: /* @__PURE__ */ m(x, {
|
|
988
|
-
component: "span",
|
|
989
|
-
direction: "row",
|
|
990
|
-
justifyContent: "space-between",
|
|
991
|
-
children: [/* @__PURE__ */ e(v, {
|
|
992
|
-
bold: !0,
|
|
993
|
-
variant: "body1",
|
|
994
|
-
children: t.category.name
|
|
995
|
-
}), /* @__PURE__ */ e(v, {
|
|
996
|
-
fontWeight: 400,
|
|
997
|
-
variant: "body1",
|
|
998
|
-
children: `
|
|
888
|
+
}), Gt = ({ budget: t, onClick: n }) => {
|
|
889
|
+
const {
|
|
890
|
+
amount: c,
|
|
891
|
+
budgetColors: { background: i, description: a },
|
|
892
|
+
category_guid: s,
|
|
893
|
+
description: o,
|
|
894
|
+
percentage: r,
|
|
895
|
+
subBudgets: p,
|
|
896
|
+
transaction_total: d
|
|
897
|
+
} = t, u = r > 100;
|
|
898
|
+
return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(oe, { onClick: () => n?.(t), children: [
|
|
899
|
+
/* @__PURE__ */ e(me, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Ge, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(V, { categoryGuid: s, variant: "basic" }) }) }),
|
|
900
|
+
/* @__PURE__ */ e(
|
|
901
|
+
ne,
|
|
902
|
+
{
|
|
903
|
+
primary: /* @__PURE__ */ m(x, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
904
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }),
|
|
905
|
+
/* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
|
|
999
906
|
${D(d, "0,0")} /
|
|
1000
|
-
${D(
|
|
1001
|
-
`
|
|
1002
|
-
})
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
907
|
+
${D(c, "0,0")}
|
|
908
|
+
` })
|
|
909
|
+
] }),
|
|
910
|
+
secondary: /* @__PURE__ */ m(x, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
911
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: `${p.length} Sub-budgets` }),
|
|
912
|
+
/* @__PURE__ */ e(
|
|
913
|
+
C,
|
|
914
|
+
{
|
|
915
|
+
bold: u,
|
|
916
|
+
sx: {
|
|
917
|
+
color: a,
|
|
918
|
+
...u && {
|
|
919
|
+
".MuiListItemButton-root:hover &, .MuiListItemButton-root:active &": {
|
|
920
|
+
color: "error.dark"
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
variant: "caption",
|
|
925
|
+
children: o
|
|
926
|
+
}
|
|
927
|
+
)
|
|
928
|
+
] })
|
|
929
|
+
}
|
|
930
|
+
)
|
|
931
|
+
] }) });
|
|
1023
932
|
}, Pt = I(() => {
|
|
1024
|
-
const { onEvent: t } =
|
|
1025
|
-
|
|
933
|
+
const { onEvent: t } = J(), { budgets: n } = E(), { detailedBudgets: c, setSelectedBudget: i } = w(), a = (s) => {
|
|
934
|
+
i(s), t(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
1026
935
|
budget_category: s.category.name,
|
|
1027
936
|
click_type: "list"
|
|
1028
937
|
});
|
|
1029
938
|
};
|
|
1030
|
-
return /* @__PURE__ */ m(
|
|
1031
|
-
|
|
1032
|
-
children:
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
title: /* @__PURE__ */ e(Ge, { children: o.budget_categories_title })
|
|
1038
|
-
}), /* @__PURE__ */ e(Ae, {
|
|
1039
|
-
sx: {
|
|
1040
|
-
p: 0,
|
|
1041
|
-
":last-child": { p: 0 }
|
|
1042
|
-
},
|
|
1043
|
-
children: /* @__PURE__ */ e(ee, { children: i.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [/* @__PURE__ */ e(Gt, {
|
|
1044
|
-
budget: s,
|
|
1045
|
-
onClick: n
|
|
1046
|
-
}), /* @__PURE__ */ e(ge, {})] }, s.guid)) })
|
|
1047
|
-
})]
|
|
1048
|
-
});
|
|
939
|
+
return /* @__PURE__ */ m(Te, { elevation: 2, children: [
|
|
940
|
+
/* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
|
|
941
|
+
/* @__PURE__ */ e(De, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(Z, { children: c.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
942
|
+
/* @__PURE__ */ e(Gt, { budget: s, onClick: a }),
|
|
943
|
+
/* @__PURE__ */ e(ue, {})
|
|
944
|
+
] }, s.guid)) }) })
|
|
945
|
+
] });
|
|
1049
946
|
}), jt = I(() => {
|
|
1050
|
-
const t =
|
|
1051
|
-
const B =
|
|
1052
|
-
let
|
|
1053
|
-
|
|
947
|
+
const t = H(), { onEvent: n } = J(), { visibleAccounts: c } = ke(), { budgets: i, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = q(), { detailedBudgets: p, totalBudgeted: d } = w(), { incomeTotal: u } = le(), { setFilter: S } = ee(), [g, h] = l.useState(!1), [_, y] = l.useMemo(() => {
|
|
948
|
+
const B = r.reduce((M, N) => M + N.totalAmount, 0);
|
|
949
|
+
let f = B / d;
|
|
950
|
+
f > 1 && (f = 1);
|
|
1054
951
|
let T = t.palette.success.main;
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
return
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
952
|
+
f > 0.8 && f < 1 ? T = t.palette.warning.main : f >= 1 && (T = t.palette.error.main);
|
|
953
|
+
const L = [
|
|
954
|
+
{
|
|
955
|
+
color: T,
|
|
956
|
+
percentage: `${f}`
|
|
957
|
+
}
|
|
958
|
+
];
|
|
959
|
+
return [B, L];
|
|
960
|
+
}, [p, r]), [A, v] = l.useMemo(() => {
|
|
961
|
+
const B = Math.abs(
|
|
962
|
+
o.reduce((L, M) => L + M.totalAmount, 0)
|
|
963
|
+
);
|
|
964
|
+
let f = B / u;
|
|
965
|
+
f > 1 && (f = 1);
|
|
966
|
+
const T = [
|
|
967
|
+
{
|
|
968
|
+
color: t.palette.secondary.main,
|
|
969
|
+
percentage: `${f}`
|
|
970
|
+
}
|
|
971
|
+
];
|
|
972
|
+
return [B, T];
|
|
973
|
+
}, [o, u]), b = () => {
|
|
974
|
+
S({
|
|
975
|
+
accounts: c.map((B) => B.guid),
|
|
1069
976
|
dateRange: {
|
|
1070
|
-
start:
|
|
977
|
+
start: rt(/* @__PURE__ */ new Date(), 90),
|
|
1071
978
|
end: /* @__PURE__ */ new Date()
|
|
1072
979
|
}
|
|
1073
|
-
}),
|
|
980
|
+
}), h(!0), n(P.BUDGETS_CLICK_EDIT_INCOME);
|
|
1074
981
|
};
|
|
1075
|
-
return /* @__PURE__ */ m(
|
|
1076
|
-
|
|
1077
|
-
sx: {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
/* @__PURE__ */ e(
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
/* @__PURE__ */ m(x, {
|
|
1115
|
-
alignItems: "center",
|
|
1116
|
-
direction: "row",
|
|
1117
|
-
gap: 4,
|
|
1118
|
-
mb: -4,
|
|
1119
|
-
children: [/* @__PURE__ */ e(v, {
|
|
1120
|
-
bold: !0,
|
|
1121
|
-
variant: "body1",
|
|
1122
|
-
children: r.income_title
|
|
1123
|
-
}), /* @__PURE__ */ e(lt, {
|
|
1124
|
-
"aria-label": s.manage_income,
|
|
1125
|
-
onClick: h,
|
|
1126
|
-
sx: { p: 0 },
|
|
1127
|
-
children: /* @__PURE__ */ e(z, {
|
|
1128
|
-
color: "primary",
|
|
1129
|
-
name: "edit"
|
|
1130
|
-
})
|
|
1131
|
-
})]
|
|
1132
|
-
}),
|
|
1133
|
-
/* @__PURE__ */ e(ve, {
|
|
1134
|
-
data: A,
|
|
1135
|
-
height: 16
|
|
1136
|
-
}),
|
|
1137
|
-
/* @__PURE__ */ e(v, {
|
|
1138
|
-
variant: "body2",
|
|
1139
|
-
children: R(r.income_description, D(S, "0,0"), D(u, "0,0"))
|
|
1140
|
-
})
|
|
1141
|
-
]
|
|
1142
|
-
})]
|
|
1143
|
-
})
|
|
1144
|
-
}),
|
|
1145
|
-
/* @__PURE__ */ e($, {
|
|
1146
|
-
ariaLabelClose: n.close_aria,
|
|
1147
|
-
isOpen: p,
|
|
1148
|
-
onClose: () => b(!1),
|
|
982
|
+
return /* @__PURE__ */ m(Te, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
983
|
+
/* @__PURE__ */ e(Pe, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: i.overview_title }) }),
|
|
984
|
+
/* @__PURE__ */ e(De, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(x, { gap: 24, children: [
|
|
985
|
+
/* @__PURE__ */ m(x, { gap: 8, children: [
|
|
986
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 8 }, variant: "body1", children: i.spending_title }),
|
|
987
|
+
/* @__PURE__ */ e(Se, { data: y, height: 16 }),
|
|
988
|
+
/* @__PURE__ */ e(C, { variant: "body2", children: R(
|
|
989
|
+
i.spending_description,
|
|
990
|
+
D(_, "0,0"),
|
|
991
|
+
D(d, "0,0")
|
|
992
|
+
) })
|
|
993
|
+
] }),
|
|
994
|
+
/* @__PURE__ */ m(x, { gap: 8, children: [
|
|
995
|
+
/* @__PURE__ */ m(x, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
996
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: i.income_title }),
|
|
997
|
+
/* @__PURE__ */ e(
|
|
998
|
+
st,
|
|
999
|
+
{
|
|
1000
|
+
"aria-label": s.manage_income,
|
|
1001
|
+
onClick: b,
|
|
1002
|
+
sx: { p: 0 },
|
|
1003
|
+
children: /* @__PURE__ */ e(z, { color: "primary", name: "edit" })
|
|
1004
|
+
}
|
|
1005
|
+
)
|
|
1006
|
+
] }),
|
|
1007
|
+
/* @__PURE__ */ e(Se, { data: v, height: 16 }),
|
|
1008
|
+
/* @__PURE__ */ e(C, { variant: "body2", children: R(
|
|
1009
|
+
i.income_description,
|
|
1010
|
+
D(A, "0,0"),
|
|
1011
|
+
D(u, "0,0")
|
|
1012
|
+
) })
|
|
1013
|
+
] })
|
|
1014
|
+
] }) }),
|
|
1015
|
+
/* @__PURE__ */ e(
|
|
1016
|
+
$,
|
|
1017
|
+
{
|
|
1018
|
+
ariaLabelClose: a.close_aria,
|
|
1019
|
+
isOpen: g,
|
|
1020
|
+
onClose: () => h(!1),
|
|
1149
1021
|
title: s.manage_income,
|
|
1150
|
-
children: /* @__PURE__ */ e(
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
});
|
|
1154
|
-
}),
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
})
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
hasDivider: !0,
|
|
1204
|
-
onAccountsFilterClick: _e,
|
|
1205
|
-
onBackClick: t,
|
|
1206
|
-
onMenuClick: o,
|
|
1207
|
-
sx: i,
|
|
1208
|
-
title: a.budgets_title,
|
|
1209
|
-
children: [
|
|
1210
|
-
/* @__PURE__ */ m(x, {
|
|
1211
|
-
direction: k ? "column" : "row",
|
|
1212
|
-
height: "100%",
|
|
1213
|
-
sx: { justifyContent: "center" },
|
|
1214
|
-
width: "100%",
|
|
1215
|
-
children: [/* @__PURE__ */ e(x, {
|
|
1216
|
-
height: k ? 450 : "calc(100dvh - 150px)",
|
|
1217
|
-
children: /* @__PURE__ */ e(We, {
|
|
1218
|
-
createBudgetOnClick: oe,
|
|
1219
|
-
height: k ? 450 : 800,
|
|
1220
|
-
isDraggable: !0,
|
|
1221
|
-
shouldShowZeroState: h.length === 0,
|
|
1222
|
-
unavailableWidth: k ? 0 : Me
|
|
1223
|
-
})
|
|
1224
|
-
}), h.length !== 0 && /* @__PURE__ */ m(x, {
|
|
1225
|
-
gap: 24,
|
|
1226
|
-
height: "100%",
|
|
1227
|
-
sx: {
|
|
1228
|
-
mr: 24,
|
|
1229
|
-
mt: 48
|
|
1230
|
-
},
|
|
1231
|
-
width: k ? "100%" : Me,
|
|
1232
|
-
children: [/* @__PURE__ */ e(jt, {}), /* @__PURE__ */ e(Pt, {})]
|
|
1233
|
-
})]
|
|
1234
|
-
}),
|
|
1235
|
-
/* @__PURE__ */ e($t, {}),
|
|
1236
|
-
/* @__PURE__ */ e($, {
|
|
1237
|
-
ariaLabelClose: c.close_aria,
|
|
1238
|
-
isOpen: G,
|
|
1239
|
-
onClose: () => F(!1),
|
|
1240
|
-
title: a.add_new_title,
|
|
1241
|
-
children: /* @__PURE__ */ e(ze, {
|
|
1242
|
-
onAddBudget: be,
|
|
1243
|
-
onRecalculateBudgets: j
|
|
1244
|
-
})
|
|
1245
|
-
}),
|
|
1246
|
-
/* @__PURE__ */ e(De, {
|
|
1247
|
-
anchorOrigin: {
|
|
1248
|
-
vertical: "bottom",
|
|
1249
|
-
horizontal: "right"
|
|
1250
|
-
},
|
|
1251
|
-
autoHideDuration: 3500,
|
|
1252
|
-
onClose: () => {
|
|
1253
|
-
S("");
|
|
1022
|
+
children: /* @__PURE__ */ e(it, { forOverview: !0 })
|
|
1023
|
+
}
|
|
1024
|
+
)
|
|
1025
|
+
] });
|
|
1026
|
+
}), Re = 480, Uo = I(
|
|
1027
|
+
({ onBackClick: t, onMenuClick: n, sx: c }) => {
|
|
1028
|
+
const i = H(), { onEvent: a } = J(), { visibleAccounts: s } = ke(), { budgets: o, common: r } = E(), { isInitialized: p, selectedAccounts: d, setDisplayedDate: u } = Q(), {
|
|
1029
|
+
alert: S,
|
|
1030
|
+
dateRange: g,
|
|
1031
|
+
isDataLoaded: h,
|
|
1032
|
+
loadBudgetData: _,
|
|
1033
|
+
setDateRange: y,
|
|
1034
|
+
setAlert: A,
|
|
1035
|
+
setTheme: v,
|
|
1036
|
+
detailedBudgets: b
|
|
1037
|
+
} = w(), { setDateRange: B } = le(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: T } = q(), { isSmallTablet: L, isMobile: M, isSmallMobile: N } = ge(), k = L || M || N, [G, F] = l.useState(!1);
|
|
1038
|
+
je({
|
|
1039
|
+
widgetName: "BubbleBudgetsWidget",
|
|
1040
|
+
isLoaded: h
|
|
1041
|
+
}), l.useEffect(() => {
|
|
1042
|
+
v(i), h || _().finally(() => {
|
|
1043
|
+
a(P.BUDGETS_VIEW);
|
|
1044
|
+
});
|
|
1045
|
+
}, []), l.useEffect(() => (y({ start: ie(re()), end: Be(re()) }), () => {
|
|
1046
|
+
y({ start: ie(re()), end: Be(re()) });
|
|
1047
|
+
}), [s]), l.useEffect(() => {
|
|
1048
|
+
p && (u(g.start, g.end), f(d, g.start, g.end).finally(), T(d).finally(), B(g));
|
|
1049
|
+
}, [p, d, g]);
|
|
1050
|
+
const be = (Y) => {
|
|
1051
|
+
y({ start: Y[0] || /* @__PURE__ */ new Date(), end: Y[1] || /* @__PURE__ */ new Date() });
|
|
1052
|
+
}, fe = () => {
|
|
1053
|
+
a(P.BUDGETS_CLICK_FILTER);
|
|
1054
|
+
}, ae = () => {
|
|
1055
|
+
F(!0), a(P.BUDGETS_CLICK_ADD);
|
|
1056
|
+
}, ye = () => {
|
|
1057
|
+
F(!1);
|
|
1058
|
+
}, j = () => {
|
|
1059
|
+
F(!1);
|
|
1060
|
+
}, K = Ke(g.end, ie(/* @__PURE__ */ new Date()));
|
|
1061
|
+
return !p || !h ? /* @__PURE__ */ e(pe, {}) : /* @__PURE__ */ m(
|
|
1062
|
+
ct,
|
|
1063
|
+
{
|
|
1064
|
+
actions: [
|
|
1065
|
+
{
|
|
1066
|
+
iconName: "add",
|
|
1067
|
+
label: o.add_title,
|
|
1068
|
+
onClick: ae
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
calendarActions: {
|
|
1072
|
+
onRangeChanged: be,
|
|
1073
|
+
shouldDisableNext: K,
|
|
1074
|
+
shouldDisablePicker: !0
|
|
1254
1075
|
},
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1076
|
+
hasDivider: !0,
|
|
1077
|
+
onAccountsFilterClick: fe,
|
|
1078
|
+
onBackClick: t,
|
|
1079
|
+
onMenuClick: n,
|
|
1080
|
+
sx: c,
|
|
1081
|
+
title: o.budgets_title,
|
|
1082
|
+
children: [
|
|
1083
|
+
/* @__PURE__ */ m(
|
|
1084
|
+
x,
|
|
1085
|
+
{
|
|
1086
|
+
direction: k ? "column" : "row",
|
|
1087
|
+
height: "100%",
|
|
1088
|
+
sx: { justifyContent: "center" },
|
|
1089
|
+
width: "100%",
|
|
1090
|
+
children: [
|
|
1091
|
+
/* @__PURE__ */ e(x, { height: k ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1092
|
+
We,
|
|
1093
|
+
{
|
|
1094
|
+
createBudgetOnClick: ae,
|
|
1095
|
+
height: k ? 450 : 800,
|
|
1096
|
+
isDraggable: !0,
|
|
1097
|
+
shouldShowZeroState: b.length === 0,
|
|
1098
|
+
unavailableWidth: k ? 0 : Re
|
|
1099
|
+
}
|
|
1100
|
+
) }),
|
|
1101
|
+
b.length !== 0 && /* @__PURE__ */ m(
|
|
1102
|
+
x,
|
|
1103
|
+
{
|
|
1104
|
+
gap: 24,
|
|
1105
|
+
height: "100%",
|
|
1106
|
+
sx: { mr: 24, mt: 48 },
|
|
1107
|
+
width: k ? "100%" : Re,
|
|
1108
|
+
children: [
|
|
1109
|
+
/* @__PURE__ */ e(jt, {}),
|
|
1110
|
+
/* @__PURE__ */ e(Pt, {})
|
|
1111
|
+
]
|
|
1112
|
+
}
|
|
1113
|
+
)
|
|
1114
|
+
]
|
|
1115
|
+
}
|
|
1116
|
+
),
|
|
1117
|
+
/* @__PURE__ */ e($t, {}),
|
|
1118
|
+
/* @__PURE__ */ e(
|
|
1119
|
+
$,
|
|
1120
|
+
{
|
|
1121
|
+
ariaLabelClose: r.close_aria,
|
|
1122
|
+
isOpen: G,
|
|
1123
|
+
onClose: () => F(!1),
|
|
1124
|
+
title: o.add_new_title,
|
|
1125
|
+
children: /* @__PURE__ */ e(
|
|
1126
|
+
ze,
|
|
1127
|
+
{
|
|
1128
|
+
onAddBudget: ye,
|
|
1129
|
+
onRecalculateBudgets: j
|
|
1130
|
+
}
|
|
1131
|
+
)
|
|
1132
|
+
}
|
|
1133
|
+
),
|
|
1134
|
+
/* @__PURE__ */ e(
|
|
1135
|
+
xe,
|
|
1136
|
+
{
|
|
1137
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1138
|
+
autoHideDuration: 3500,
|
|
1139
|
+
onClose: () => {
|
|
1140
|
+
A("");
|
|
1141
|
+
},
|
|
1142
|
+
open: !!S,
|
|
1143
|
+
children: /* @__PURE__ */ e(
|
|
1144
|
+
Ae,
|
|
1145
|
+
{
|
|
1146
|
+
closeText: "",
|
|
1147
|
+
onClose: () => {
|
|
1148
|
+
A("");
|
|
1149
|
+
},
|
|
1150
|
+
severity: "success",
|
|
1151
|
+
variant: "filled",
|
|
1152
|
+
children: S
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1157
|
+
]
|
|
1158
|
+
}
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1161
|
+
), zt = ({
|
|
1162
|
+
budgetsCopy: t,
|
|
1163
|
+
difference: n,
|
|
1164
|
+
handleAddClick: c,
|
|
1165
|
+
shouldShowZeroState: i
|
|
1166
|
+
}) => {
|
|
1167
|
+
const { availableHeight: a = 0 } = de(), s = l.useRef(null);
|
|
1168
|
+
l.useEffect(() => {
|
|
1169
|
+
a > 0 && s.current === null && (s.current = a);
|
|
1170
|
+
}, [a]);
|
|
1171
|
+
const o = l.useMemo(() => {
|
|
1172
|
+
const r = s.current ?? a;
|
|
1173
|
+
return r > 0 ? Math.round(Math.max(120, Math.min(450, r * 0.8))) - 40 : 450;
|
|
1174
|
+
}, [a]);
|
|
1175
|
+
return /* @__PURE__ */ m(x, { sx: { height: "100%", justifyContent: "space-between" }, children: [
|
|
1176
|
+
/* @__PURE__ */ e(
|
|
1177
|
+
We,
|
|
1178
|
+
{
|
|
1179
|
+
createBudgetOnClick: c,
|
|
1180
|
+
height: o,
|
|
1181
|
+
isMiniWidget: !0,
|
|
1182
|
+
shouldShowZeroState: i
|
|
1183
|
+
}
|
|
1184
|
+
),
|
|
1185
|
+
!i && /* @__PURE__ */ m(X, { ml: 16, children: [
|
|
1186
|
+
/* @__PURE__ */ e(C, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: D(Math.abs(n), "0,0") }),
|
|
1187
|
+
/* @__PURE__ */ e(C, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
|
|
1188
|
+
] })
|
|
1189
|
+
] });
|
|
1294
1190
|
}, Ft = (t) => {
|
|
1295
|
-
const
|
|
1191
|
+
const n = H(), { onEvent: c } = J(), { detailedBudgets: i, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: p } = E(), { isInitialized: d, selectedAccounts: u } = Q(), { loadDateRangeCategoryTotals: S, loadMonthlyCategoryTotals: g } = q(), h = lt(i), [_, y] = l.useState(!1);
|
|
1296
1192
|
l.useEffect(() => {
|
|
1297
|
-
|
|
1193
|
+
a || s().finally();
|
|
1298
1194
|
}, []), l.useEffect(() => {
|
|
1299
|
-
|
|
1300
|
-
}, [
|
|
1301
|
-
d && !
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
]);
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
},
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1312
|
-
if (
|
|
1195
|
+
o(n);
|
|
1196
|
+
}, [n]), l.useEffect(() => {
|
|
1197
|
+
d && !a && (S(
|
|
1198
|
+
u,
|
|
1199
|
+
ie(/* @__PURE__ */ new Date()),
|
|
1200
|
+
Be(/* @__PURE__ */ new Date())
|
|
1201
|
+
).finally(), g(u).finally());
|
|
1202
|
+
}, [d, u, a]);
|
|
1203
|
+
const A = () => {
|
|
1204
|
+
y(!0), c(P.BUDGETS_CLICK_ADD);
|
|
1205
|
+
}, v = () => {
|
|
1206
|
+
y(!1);
|
|
1207
|
+
}, b = () => y(!1);
|
|
1208
|
+
if (je({
|
|
1313
1209
|
widgetName: "BubbleBudgetsMiniWidget",
|
|
1314
|
-
isLoaded:
|
|
1315
|
-
}), !d || !
|
|
1316
|
-
const B =
|
|
1317
|
-
return /* @__PURE__ */ m(
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
":last-child": { pb: 0 }
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1210
|
+
isLoaded: a
|
|
1211
|
+
}), !d || !a) return /* @__PURE__ */ e(pe, {});
|
|
1212
|
+
const B = i.length === 0;
|
|
1213
|
+
return /* @__PURE__ */ m(
|
|
1214
|
+
ut,
|
|
1215
|
+
{
|
|
1216
|
+
contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
|
|
1217
|
+
primaryCtaLabel: B ? r.get_started_cta : r.details_cta,
|
|
1218
|
+
primaryCtaLabelAria: r.details_cta_aria,
|
|
1219
|
+
sx: { height: "100%" },
|
|
1220
|
+
title: r.budgets_title,
|
|
1221
|
+
...t,
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ e(
|
|
1224
|
+
zt,
|
|
1225
|
+
{
|
|
1226
|
+
budgetsCopy: r,
|
|
1227
|
+
difference: h,
|
|
1228
|
+
handleAddClick: A,
|
|
1229
|
+
shouldShowZeroState: B
|
|
1230
|
+
}
|
|
1231
|
+
),
|
|
1232
|
+
/* @__PURE__ */ e(
|
|
1233
|
+
$,
|
|
1234
|
+
{
|
|
1235
|
+
ariaLabelClose: p.close_aria,
|
|
1236
|
+
isOpen: _,
|
|
1237
|
+
onClose: () => y(!1),
|
|
1238
|
+
title: r.add_new_title,
|
|
1239
|
+
children: /* @__PURE__ */ e(
|
|
1240
|
+
ze,
|
|
1241
|
+
{
|
|
1242
|
+
onAddBudget: v,
|
|
1243
|
+
onRecalculateBudgets: b
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
}
|
|
1247
|
+
)
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
}, Wo = I(Ft), se = {
|
|
1344
1252
|
CANCEL_DELETE: "Cancel - Delete",
|
|
1345
1253
|
END_SAVE: "End - Save",
|
|
1346
1254
|
END_DELETE: "End - Delete",
|
|
1347
1255
|
START_DELETE: "Start - Delete"
|
|
1348
|
-
}, Ut = ({
|
|
1349
|
-
|
|
1256
|
+
}, Ut = ({
|
|
1257
|
+
onClose: t,
|
|
1258
|
+
onEvent: n,
|
|
1259
|
+
onViewHistory: c,
|
|
1260
|
+
transactionListProps: i
|
|
1261
|
+
}) => {
|
|
1262
|
+
const {
|
|
1263
|
+
alert: a,
|
|
1264
|
+
dateRange: s,
|
|
1265
|
+
deleteBudget: o,
|
|
1266
|
+
selectedBudget: r,
|
|
1267
|
+
selectedSubBudget: p,
|
|
1268
|
+
setAlert: d,
|
|
1269
|
+
setSelectedBudget: u,
|
|
1270
|
+
updateBudget: S
|
|
1271
|
+
} = w(), { budgets: g, common: h } = E(), { isCopyLoaded: _, selectedAccountGuids: y } = Q(), A = H(), { setFilter: v } = ee(), [b, B] = l.useState(""), [f, T] = l.useState(null), [L, M] = l.useState(!1), N = l.useRef(!1);
|
|
1350
1272
|
if (l.useEffect(() => {
|
|
1351
|
-
!
|
|
1352
|
-
accounts:
|
|
1273
|
+
!r || p || (B(`${r.amount}`), v({
|
|
1274
|
+
accounts: y,
|
|
1353
1275
|
dateRange: s,
|
|
1354
1276
|
custom: ({ category_guid: j, top_level_category_guid: K }) => {
|
|
1355
|
-
const { category_guid: Y } =
|
|
1277
|
+
const { category_guid: Y } = r;
|
|
1356
1278
|
return j === Y || K === Y;
|
|
1357
1279
|
}
|
|
1358
|
-
}),
|
|
1359
|
-
}, [
|
|
1360
|
-
if (!
|
|
1280
|
+
}), M(!0));
|
|
1281
|
+
}, [r]), !_) return /* @__PURE__ */ e(pe, {});
|
|
1282
|
+
if (!r) return null;
|
|
1361
1283
|
const k = () => {
|
|
1362
|
-
B(""), T(null),
|
|
1284
|
+
B(""), T(null), M(!1), setTimeout(() => {
|
|
1363
1285
|
u(void 0), t?.();
|
|
1364
1286
|
}, 250);
|
|
1365
1287
|
}, G = () => {
|
|
1366
|
-
|
|
1288
|
+
f === "delete" && n?.(se.CANCEL_DELETE, b), B(r.amount ? `${r.amount}` : ""), T(null);
|
|
1367
1289
|
}, F = async () => {
|
|
1368
|
-
if (
|
|
1290
|
+
if (f === "edit") {
|
|
1369
1291
|
if (N.current) return;
|
|
1370
|
-
N.current = !0, await
|
|
1371
|
-
...
|
|
1372
|
-
amount: Number(
|
|
1373
|
-
}),
|
|
1292
|
+
N.current = !0, await S({
|
|
1293
|
+
...r,
|
|
1294
|
+
amount: Number(b)
|
|
1295
|
+
}), n?.(se.END_SAVE, b), d(
|
|
1296
|
+
R(g.alert_budget_updated, r.category.name)
|
|
1297
|
+
), T(null), N.current = !1;
|
|
1374
1298
|
}
|
|
1375
|
-
|
|
1376
|
-
}, { remainingAmount:
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1299
|
+
f === "delete" && (await o(r.guid), n?.(se.END_DELETE, b), k());
|
|
1300
|
+
}, { remainingAmount: be, spentPercentage: fe, iconColor: ae } = dt(
|
|
1301
|
+
r.transaction_total ?? 0,
|
|
1302
|
+
r.amount ?? 0
|
|
1303
|
+
), ye = (j, K) => R(j, /* @__PURE__ */ e("b", { children: K }));
|
|
1304
|
+
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
1305
|
+
/* @__PURE__ */ m(
|
|
1306
|
+
$,
|
|
1307
|
+
{
|
|
1308
|
+
ariaLabelClose: h.close_aria,
|
|
1309
|
+
footerStyles: {
|
|
1310
|
+
px: 24,
|
|
1311
|
+
py: 16
|
|
1312
|
+
},
|
|
1313
|
+
isOpen: L,
|
|
1314
|
+
onClose: k,
|
|
1315
|
+
onPrimaryAction: () => T(
|
|
1316
|
+
"edit"
|
|
1317
|
+
/* EDIT */
|
|
1318
|
+
),
|
|
1319
|
+
onSecondaryAction: () => {
|
|
1320
|
+
n?.(se.START_DELETE, b), T(
|
|
1321
|
+
"delete"
|
|
1322
|
+
/* DELETE */
|
|
1323
|
+
);
|
|
1324
|
+
},
|
|
1325
|
+
primaryText: g.details_edit_button,
|
|
1326
|
+
secondaryColor: "error",
|
|
1327
|
+
secondaryText: g.details_delete_button,
|
|
1328
|
+
sx: {
|
|
1329
|
+
"& .list-wrapper": {
|
|
1330
|
+
pr: 24
|
|
1404
1331
|
}
|
|
1405
|
-
}),
|
|
1406
|
-
iconColor: oe,
|
|
1407
|
-
onViewHistory: i,
|
|
1408
|
-
remainingAmount: ye,
|
|
1409
|
-
spentPercentage: _e,
|
|
1410
|
-
startDate: (s.start.getTime() ?? 0) / 1e3,
|
|
1411
|
-
totalTransaction: c.transaction_total
|
|
1412
|
-
}),
|
|
1413
|
-
/* @__PURE__ */ e(Se, { ...r }),
|
|
1414
|
-
n && /* @__PURE__ */ e(De, {
|
|
1415
|
-
anchorOrigin: {
|
|
1416
|
-
horizontal: "right",
|
|
1417
|
-
vertical: "bottom"
|
|
1418
1332
|
},
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1333
|
+
title: R(g.details_type_title, r.category.name),
|
|
1334
|
+
children: [
|
|
1335
|
+
/* @__PURE__ */ e(
|
|
1336
|
+
ot,
|
|
1337
|
+
{
|
|
1338
|
+
amount: r.amount,
|
|
1339
|
+
icon: /* @__PURE__ */ e(
|
|
1340
|
+
V,
|
|
1341
|
+
{
|
|
1342
|
+
categoryGuid: r.category.guid,
|
|
1343
|
+
size: 44,
|
|
1344
|
+
sx: {
|
|
1345
|
+
bgcolor: Ye(we(r.category.guid, A), 0.15),
|
|
1346
|
+
border: `1px solid ${we(r.category.guid, A)}`,
|
|
1347
|
+
color: "text.primary"
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
),
|
|
1351
|
+
iconColor: ae,
|
|
1352
|
+
onViewHistory: c,
|
|
1353
|
+
remainingAmount: be,
|
|
1354
|
+
spentPercentage: fe,
|
|
1355
|
+
startDate: (s.start.getTime() ?? 0) / 1e3,
|
|
1356
|
+
totalTransaction: r.transaction_total
|
|
1357
|
+
}
|
|
1358
|
+
),
|
|
1359
|
+
/* @__PURE__ */ e(ve, { ...i }),
|
|
1360
|
+
a && /* @__PURE__ */ e(
|
|
1361
|
+
xe,
|
|
1362
|
+
{
|
|
1363
|
+
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
1364
|
+
autoHideDuration: 3500,
|
|
1365
|
+
onClose: () => d(""),
|
|
1366
|
+
open: !!a,
|
|
1367
|
+
children: /* @__PURE__ */ e(Ae, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: a })
|
|
1368
|
+
}
|
|
1369
|
+
)
|
|
1370
|
+
]
|
|
1371
|
+
}
|
|
1372
|
+
),
|
|
1373
|
+
f && /* @__PURE__ */ e(
|
|
1374
|
+
mt,
|
|
1375
|
+
{
|
|
1376
|
+
closeAriaLabel: h.close_aria,
|
|
1377
|
+
content: ye(
|
|
1378
|
+
g[f === "edit" ? "edit_budget_content" : "delete_description"],
|
|
1379
|
+
r.category.name
|
|
1380
|
+
),
|
|
1381
|
+
handleInputChange: (j) => B(j.toString()),
|
|
1382
|
+
handleModalClose: G,
|
|
1383
|
+
handlePrimaryAction: F,
|
|
1384
|
+
handleSecondaryAction: G,
|
|
1385
|
+
inputLabel: f === "edit" ? g.details_edit_title : "",
|
|
1386
|
+
inputValue: b,
|
|
1387
|
+
isOpen: !0,
|
|
1388
|
+
primaryColor: f === "edit" ? "primary" : "error",
|
|
1389
|
+
primaryText: g[f === "edit" ? "add_save_button" : "details_delete_button"],
|
|
1390
|
+
secondaryColor: f === "edit" ? "primary" : "inherit",
|
|
1391
|
+
secondaryText: h.cancel_button,
|
|
1392
|
+
title: g[f === "edit" ? "details_edit_title" : "delete_title"]
|
|
1393
|
+
}
|
|
1394
|
+
)
|
|
1395
|
+
] });
|
|
1396
|
+
}, Ho = I(Ut);
|
|
1448
1397
|
export {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1398
|
+
Wo as BubbleBudgetsMiniWidget,
|
|
1399
|
+
Uo as BubbleBudgetsWidget,
|
|
1400
|
+
Ho as BudgetDetailsDrawerV2
|
|
1452
1401
|
};
|
|
1402
|
+
//# sourceMappingURL=index.es.js.map
|