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