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