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