@mx-cartographer/experiences 7.12.13 → 7.12.14
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/index.es.js +239 -224
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/budgets/index.es.js
CHANGED
|
@@ -4,14 +4,14 @@ import { observer as w } from "mobx-react-lite";
|
|
|
4
4
|
import { endOfMonth as Ce } from "date-fns/endOfMonth";
|
|
5
5
|
import { isAfter as Ke } from "date-fns/isAfter";
|
|
6
6
|
import { startOfMonth as re } from "date-fns/startOfMonth";
|
|
7
|
-
import { startOfToday as
|
|
7
|
+
import { startOfToday as ne } from "date-fns/startOfToday";
|
|
8
8
|
import Se from "@mui/material/Alert";
|
|
9
9
|
import xe from "@mui/material/Snackbar";
|
|
10
10
|
import v from "@mui/material/Stack";
|
|
11
11
|
import ie from "@mui/material/styles/useTheme";
|
|
12
12
|
import K from "@mui/material/Box";
|
|
13
13
|
import X from "@mui/material/List";
|
|
14
|
-
import { Text as B, CategoryIcon as W, Icon as j, H3 as
|
|
14
|
+
import { Text as B, CategoryIcon as W, Icon as j, H3 as Re } from "@mxenabled/mxui";
|
|
15
15
|
import { u as D, m as E, i as ce, l as Y, p as le, a as Le, g as Z, b as q, h as J, d as Ne } from "../hooks-BxkfR-Ff.mjs";
|
|
16
16
|
import { f as T } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
17
17
|
import ke from "@mui/material/Button";
|
|
@@ -26,7 +26,7 @@ import Xe from "@mui/material/ListItemSecondaryAction";
|
|
|
26
26
|
import { C as Ye } from "../CurrencyInput-DuMktPu3.mjs";
|
|
27
27
|
import { D as U } from "../Dialog-Ck34yr-d.mjs";
|
|
28
28
|
import { C as Ze } from "../ConnectionsDrawer-DqhSaMrJ.mjs";
|
|
29
|
-
import * as
|
|
29
|
+
import * as R from "d3";
|
|
30
30
|
import qe from "@mui/material/Tooltip";
|
|
31
31
|
import { useTheme as $e, alpha as Je } from "@mui/material/styles";
|
|
32
32
|
import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
@@ -37,12 +37,12 @@ import De from "@mui/material/Tab";
|
|
|
37
37
|
import Qe from "@mui/material/Tabs";
|
|
38
38
|
import { e as et } from "../exportTransactionsToCSV-CdTF_RqL.mjs";
|
|
39
39
|
import { T as Ae } from "../StatusIndicator-BV3oFzxo.mjs";
|
|
40
|
-
import { T as tt, c as
|
|
40
|
+
import { T as tt, c as ot } from "../TransactionDetails-hy1TTw8R.mjs";
|
|
41
41
|
import ve from "@mui/material/Card";
|
|
42
42
|
import Te from "@mui/material/CardContent";
|
|
43
43
|
import { S as Be } from "../StatusBar-BK_uYHAB.mjs";
|
|
44
44
|
import { S as Pe } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
45
|
-
import { u as
|
|
45
|
+
import { u as nt, b as at } from "../CategorySelectorDrawer-wfUTIbLR.mjs";
|
|
46
46
|
import Ge from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as rt } from "date-fns/subDays";
|
|
48
48
|
import st from "@mui/material/IconButton";
|
|
@@ -53,7 +53,7 @@ import { u as lt, g as dt, C as ut } from "../BudgetUtil--_QXyszn.mjs";
|
|
|
53
53
|
import { M as mt } from "../MiniWidgetContainer-Cu72GNsE.mjs";
|
|
54
54
|
import { b as Ee } from "../CategoryUtil-BVixr0d5.mjs";
|
|
55
55
|
const gt = w(() => {
|
|
56
|
-
const { budgets: t } = D(), { totalBudgeted:
|
|
56
|
+
const { budgets: t } = D(), { totalBudgeted: n } = E(), { incomeTotal: i } = ce(), s = i - n;
|
|
57
57
|
return /* @__PURE__ */ m(v, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
58
58
|
/* @__PURE__ */ m(v, { alignItems: "center", children: [
|
|
59
59
|
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: T(i, "0,0") }),
|
|
@@ -61,7 +61,7 @@ const gt = w(() => {
|
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ e(B, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
|
|
63
63
|
/* @__PURE__ */ m(v, { alignItems: "center", children: [
|
|
64
|
-
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: T(
|
|
64
|
+
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: T(n, "0,0") }),
|
|
65
65
|
/* @__PURE__ */ e(B, { color: "secondary", variant: "Small", children: t.budgeted })
|
|
66
66
|
] }),
|
|
67
67
|
/* @__PURE__ */ e(B, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
|
|
@@ -72,10 +72,10 @@ const gt = w(() => {
|
|
|
72
72
|
] });
|
|
73
73
|
}), pt = w(
|
|
74
74
|
({ category: t }) => {
|
|
75
|
-
const { budgets:
|
|
76
|
-
const a = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"),
|
|
77
|
-
return `${r} - ${
|
|
78
|
-
}, [
|
|
75
|
+
const { budgets: n } = D(), { budgets: i } = E(), s = l.useMemo(() => {
|
|
76
|
+
const a = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"), o = a ? N(n.recalculate_previous_budget, T(a.amount, "0,0")) : n.recalculate_new_budget;
|
|
77
|
+
return `${r} - ${o}`;
|
|
78
|
+
}, [n, i]);
|
|
79
79
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
80
80
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(ee, { children: [
|
|
81
81
|
/* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
|
|
@@ -85,24 +85,24 @@ const gt = w(() => {
|
|
|
85
85
|
] }, t.guid);
|
|
86
86
|
}
|
|
87
87
|
), ht = ({ onRecalculateBudgets: t }) => {
|
|
88
|
-
const { budgets:
|
|
89
|
-
await a(g), c(!1), r(
|
|
88
|
+
const { budgets: n, common: i } = D(), { spendCategories: s } = Y(), { recalculateBudgets: a, setAlert: r } = E(), [o, c] = l.useState(!1), g = s.filter((u) => u.totalAverageAmount > 0), d = async () => {
|
|
89
|
+
await a(g), c(!1), r(n.alert_recalculated_budgets), t?.();
|
|
90
90
|
};
|
|
91
91
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
92
|
-
/* @__PURE__ */ e(ke, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children:
|
|
93
|
-
/* @__PURE__ */ e(B, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children:
|
|
92
|
+
/* @__PURE__ */ e(ke, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
|
|
93
|
+
/* @__PURE__ */ e(B, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: n.recalculate_help }),
|
|
94
94
|
/* @__PURE__ */ e(
|
|
95
95
|
$,
|
|
96
96
|
{
|
|
97
97
|
ariaLabelClose: i.close_aria,
|
|
98
|
-
isOpen:
|
|
98
|
+
isOpen: o,
|
|
99
99
|
onClose: () => c(!1),
|
|
100
100
|
onPrimaryAction: d,
|
|
101
|
-
title:
|
|
101
|
+
title: n.recalculate_title,
|
|
102
102
|
children: /* @__PURE__ */ m(v, { children: [
|
|
103
103
|
/* @__PURE__ */ m(v, { mx: 24, my: 16, children: [
|
|
104
|
-
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children:
|
|
105
|
-
/* @__PURE__ */ e(B, { variant: "ParagraphSmall", children:
|
|
104
|
+
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: n.recalculate_description_top }),
|
|
105
|
+
/* @__PURE__ */ e(B, { variant: "ParagraphSmall", children: n.recalculate_description_bottom })
|
|
106
106
|
] }),
|
|
107
107
|
/* @__PURE__ */ e(K, { bgcolor: "background.paper", children: /* @__PURE__ */ e(X, { children: g.map((u) => /* @__PURE__ */ e(pt, { category: u }, u.guid)) }) })
|
|
108
108
|
] })
|
|
@@ -111,17 +111,17 @@ const gt = w(() => {
|
|
|
111
111
|
] });
|
|
112
112
|
}, pe = ({
|
|
113
113
|
amount: t,
|
|
114
|
-
categoryName:
|
|
114
|
+
categoryName: n,
|
|
115
115
|
onAmountChanged: i
|
|
116
116
|
}) => {
|
|
117
|
-
const { budgets: s } = D(), { totalBudgeted: a } = E(), { incomeTotal: r } = ce(),
|
|
117
|
+
const { budgets: s } = D(), { totalBudgeted: a } = E(), { incomeTotal: r } = ce(), o = r - a;
|
|
118
118
|
return /* @__PURE__ */ m(v, { gap: 16, children: [
|
|
119
119
|
/* @__PURE__ */ m(v, { children: [
|
|
120
120
|
/* @__PURE__ */ e(B, { children: N(
|
|
121
121
|
s.add_description_top,
|
|
122
|
-
T(
|
|
122
|
+
T(o, "0,0")
|
|
123
123
|
) }),
|
|
124
|
-
/* @__PURE__ */ e(B, { children: N(s.add_description_bottom,
|
|
124
|
+
/* @__PURE__ */ e(B, { children: N(s.add_description_bottom, n) })
|
|
125
125
|
] }),
|
|
126
126
|
/* @__PURE__ */ e(
|
|
127
127
|
Ye,
|
|
@@ -135,8 +135,8 @@ const gt = w(() => {
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] });
|
|
138
|
-
}, ft = w(({ category: t, onAddBudget:
|
|
139
|
-
const { budgets: i, common: s } = D(), [a, r] = l.useState(!1), [
|
|
138
|
+
}, ft = w(({ category: t, onAddBudget: n }) => {
|
|
139
|
+
const { budgets: i, common: s } = D(), [a, r] = l.useState(!1), [o, c] = l.useState(
|
|
140
140
|
`${t.totalAmount === 0 ? "" : t.totalAmount}`
|
|
141
141
|
);
|
|
142
142
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
@@ -155,17 +155,17 @@ const gt = w(() => {
|
|
|
155
155
|
U,
|
|
156
156
|
{
|
|
157
157
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
158
|
-
disablePrimaryButton: Number(
|
|
158
|
+
disablePrimaryButton: Number(o) <= 0,
|
|
159
159
|
isOpen: a,
|
|
160
160
|
onClose: () => r(!1),
|
|
161
|
-
onPrimaryAction: () =>
|
|
161
|
+
onPrimaryAction: () => n(t, Number(o)),
|
|
162
162
|
primaryText: i.add_save_button,
|
|
163
|
-
children: /* @__PURE__ */ e(pe, { amount:
|
|
163
|
+
children: /* @__PURE__ */ e(pe, { amount: o, categoryName: t.name, onAmountChanged: c })
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
] });
|
|
167
|
-
}), ze = w(({ onAddBudget: t, onRecalculateBudgets:
|
|
168
|
-
const { budgets: i } = D(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = E(),
|
|
167
|
+
}), ze = w(({ onAddBudget: t, onRecalculateBudgets: n }) => {
|
|
168
|
+
const { budgets: i } = D(), { addBudget: s, setAlert: a, unbudgetedCategories: r } = E(), o = async (c, g) => {
|
|
169
169
|
await s(c, g), t?.(), a(N(i.alert_budget_created, c.name));
|
|
170
170
|
};
|
|
171
171
|
return /* @__PURE__ */ m(v, { children: [
|
|
@@ -174,97 +174,97 @@ const gt = w(() => {
|
|
|
174
174
|
ft,
|
|
175
175
|
{
|
|
176
176
|
category: c,
|
|
177
|
-
onAddBudget:
|
|
177
|
+
onAddBudget: o
|
|
178
178
|
},
|
|
179
179
|
c.guid
|
|
180
180
|
)) }) }),
|
|
181
|
-
/* @__PURE__ */ e(ht, { onRecalculateBudgets:
|
|
181
|
+
/* @__PURE__ */ e(ht, { onRecalculateBudgets: n })
|
|
182
182
|
] });
|
|
183
183
|
}), we = 5, Fe = 100, se = 25, _t = (t) => {
|
|
184
|
-
const
|
|
184
|
+
const n = (a) => {
|
|
185
185
|
a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
|
|
186
186
|
}, i = (a) => {
|
|
187
187
|
a.subject.fx = a.x, a.subject.fy = a.y;
|
|
188
188
|
}, s = (a) => {
|
|
189
189
|
a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
|
|
190
190
|
};
|
|
191
|
-
return
|
|
191
|
+
return R.drag().on("start", n).on("drag", i).on("end", s);
|
|
192
192
|
}, yt = (t) => {
|
|
193
|
-
let
|
|
194
|
-
|
|
195
|
-
const i =
|
|
193
|
+
let n = t.transaction_total / t.amount;
|
|
194
|
+
n < 0 ? n = 0 : n > 1 && (n = 1);
|
|
195
|
+
const i = n * 2 * Math.PI, s = R.interpolate(0, i), a = R.arc().cornerRadius(5).innerRadius(t.radius - we * 2).outerRadius(t.radius - we).startAngle(0).endAngle(0);
|
|
196
196
|
return (r) => (a.endAngle(s(r)), a(t) || "");
|
|
197
197
|
}, bt = (t) => {
|
|
198
|
-
|
|
199
|
-
}, Ie = (t,
|
|
198
|
+
R.selectAll(".bubble").call(_t(t));
|
|
199
|
+
}, Ie = (t, n, i) => Math.min(Math.max(t, n), i), Ct = (t, n, i) => {
|
|
200
200
|
t.alpha(1).restart().force(
|
|
201
201
|
"x",
|
|
202
|
-
|
|
202
|
+
R.forceX().x(i / 2).strength(0.01)
|
|
203
203
|
).force(
|
|
204
204
|
"y",
|
|
205
|
-
|
|
205
|
+
R.forceY().y(n / 2).strength(0.02)
|
|
206
206
|
).on("tick", () => {
|
|
207
207
|
const s = t.nodes();
|
|
208
208
|
s.forEach((a) => {
|
|
209
209
|
const r = a.radius ?? se;
|
|
210
|
-
a.x = Ie(a.x ?? 0, r, i - r), a.y = Ie(a.y ?? 0, r,
|
|
211
|
-
}),
|
|
210
|
+
a.x = Ie(a.x ?? 0, r, i - r), a.y = Ie(a.y ?? 0, r, n - r);
|
|
211
|
+
}), R.selectAll(".bubble").data(s).attr("transform", (a) => `translate(${a.x},${a.y})`);
|
|
212
212
|
});
|
|
213
|
-
}, Ue = (t,
|
|
214
|
-
const
|
|
215
|
-
const c = Math.max(
|
|
213
|
+
}, Ue = (t, n) => R.scaleLinear().domain([t, n]).range([se, Fe]), Bt = (t) => {
|
|
214
|
+
const n = t.reduce((r, o) => {
|
|
215
|
+
const c = Math.max(o.transaction_total, o.amount);
|
|
216
216
|
return c > r ? c : r;
|
|
217
|
-
}, 0), i = t.reduce((r,
|
|
218
|
-
const c = Math.max(
|
|
217
|
+
}, 0), i = t.reduce((r, o) => {
|
|
218
|
+
const c = Math.max(o.transaction_total, o.amount);
|
|
219
219
|
return c < r ? c : r;
|
|
220
|
-
},
|
|
221
|
-
const
|
|
220
|
+
}, n), s = Ue(i, n), a = t.map((r) => {
|
|
221
|
+
const o = s(Math.max(r.transaction_total, r.amount)) || 25;
|
|
222
222
|
return {
|
|
223
223
|
...r,
|
|
224
|
-
radius:
|
|
224
|
+
radius: o
|
|
225
225
|
};
|
|
226
226
|
});
|
|
227
|
-
return
|
|
228
|
-
}, St = (t,
|
|
229
|
-
const a = Math.PI * se ** 2 * t, r = i < 400 ||
|
|
227
|
+
return R.forceSimulation(a).velocityDecay(0.05).force("collide", R.forceCollide((r) => r.radius + 2).strength(0.7));
|
|
228
|
+
}, St = (t, n, i) => {
|
|
229
|
+
const a = Math.PI * se ** 2 * t, r = i < 400 || n < 300, o = r ? 40 : 20, c = Math.max(100, i - o), g = Math.max(100, n - o), d = c * g;
|
|
230
230
|
let u = se;
|
|
231
231
|
if (a < d) {
|
|
232
232
|
const h = Math.sqrt(d / (t * Math.PI)), b = Math.min(c, g) / 4;
|
|
233
233
|
u = Math.min(Fe, h, b);
|
|
234
234
|
}
|
|
235
235
|
return r && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
|
|
236
|
-
}, xt = (t,
|
|
237
|
-
const { maxRadius: r, minRadius:
|
|
238
|
-
return
|
|
239
|
-
}, At = (t,
|
|
240
|
-
const r =
|
|
236
|
+
}, xt = (t, n, i, s, a) => {
|
|
237
|
+
const { maxRadius: r, minRadius: o } = St(t, n, a);
|
|
238
|
+
return R.scaleLinear().domain([s, i]).range([o, r]);
|
|
239
|
+
}, At = (t, n, i = !1, s, a) => {
|
|
240
|
+
const r = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...r), c = Math.max(...r), g = i ? xt(t.length, s, c, o, a) : Ue(o, c);
|
|
241
241
|
return t.map((d) => ({
|
|
242
242
|
...d,
|
|
243
243
|
radius: g(Math.max(d.transaction_total, d.amount))
|
|
244
244
|
}));
|
|
245
245
|
}, Oe = 5, vt = 2e3, Tt = ({ bubble: t }) => {
|
|
246
|
-
const
|
|
246
|
+
const n = ie(), {
|
|
247
247
|
amount: i,
|
|
248
248
|
guid: s,
|
|
249
249
|
budgetColors: { mercury: a },
|
|
250
250
|
radius: r,
|
|
251
|
-
transaction_total:
|
|
251
|
+
transaction_total: o
|
|
252
252
|
} = t, c = `mercury-${s}`;
|
|
253
253
|
l.useEffect(() => {
|
|
254
|
-
|
|
255
|
-
}, [i, r,
|
|
256
|
-
const g =
|
|
254
|
+
R.select(`.${c}`).selectAll(".status").remove(), R.select(`.${c}`).append("path").transition().duration(vt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => yt(t));
|
|
255
|
+
}, [i, r, o]);
|
|
256
|
+
const g = R.arc().innerRadius((d) => d - 2 * Oe).outerRadius((d) => d - Oe).startAngle(0).endAngle(2 * Math.PI);
|
|
257
257
|
return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
|
|
258
258
|
"path",
|
|
259
259
|
{
|
|
260
260
|
d: g(r) || "",
|
|
261
|
-
style: { fill:
|
|
261
|
+
style: { fill: n.palette.common.white, fillOpacity: 0.35 }
|
|
262
262
|
}
|
|
263
263
|
) });
|
|
264
264
|
}, Dt = l.memo(Tt), F = 75, be = 50;
|
|
265
|
-
function Et({ bubble: t, isDraggable:
|
|
265
|
+
function Et({ bubble: t, isDraggable: n, onClick: i = () => {
|
|
266
266
|
} }) {
|
|
267
|
-
const [s, a] = l.useState(!1), r = $e(), { availableWidth:
|
|
267
|
+
const [s, a] = l.useState(!1), r = $e(), { availableWidth: o } = le(), c = l.useMemo(() => {
|
|
268
268
|
if (t)
|
|
269
269
|
return {
|
|
270
270
|
amount: t.amount,
|
|
@@ -283,11 +283,11 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
283
283
|
radius: _,
|
|
284
284
|
x: y,
|
|
285
285
|
y: A
|
|
286
|
-
} = t, x =
|
|
286
|
+
} = t, x = o < 400 ? -8 : -12;
|
|
287
287
|
let C = x, f = x;
|
|
288
288
|
_ > F ? (C = -14, f = -45) : _ > be && (f = -32);
|
|
289
289
|
let S = 32;
|
|
290
|
-
_ <= F && (S =
|
|
290
|
+
_ <= F && (S = o < 400 ? 16 : 24);
|
|
291
291
|
const I = `${t.category.name}: ${b}`, L = {
|
|
292
292
|
modifiers: [
|
|
293
293
|
{
|
|
@@ -295,7 +295,7 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
295
295
|
options: { offset: [0, 15] }
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
|
-
},
|
|
298
|
+
}, M = (k) => {
|
|
299
299
|
(k.key === "Enter" || k.key === " ") && (k.preventDefault(), i(t));
|
|
300
300
|
}, O = () => {
|
|
301
301
|
a(!0);
|
|
@@ -311,11 +311,11 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
311
311
|
onBlur: z,
|
|
312
312
|
onClick: () => i(t),
|
|
313
313
|
onFocus: O,
|
|
314
|
-
onKeyDown:
|
|
314
|
+
onKeyDown: M,
|
|
315
315
|
onMouseEnter: () => a(!0),
|
|
316
316
|
onMouseLeave: () => a(!1),
|
|
317
317
|
role: "button",
|
|
318
|
-
style: { cursor:
|
|
318
|
+
style: { cursor: n ? "pointer" : "default" },
|
|
319
319
|
tabIndex: 0,
|
|
320
320
|
textAnchor: "middle",
|
|
321
321
|
x: y,
|
|
@@ -378,13 +378,13 @@ function Et({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
378
378
|
}
|
|
379
379
|
const wt = ({
|
|
380
380
|
height: t,
|
|
381
|
-
width:
|
|
381
|
+
width: n,
|
|
382
382
|
isDraggable: i = !1,
|
|
383
383
|
onClick: s = () => {
|
|
384
384
|
}
|
|
385
385
|
}) => {
|
|
386
|
-
const [a, r] = l.useState([]),
|
|
387
|
-
const u =
|
|
386
|
+
const [a, r] = l.useState([]), o = l.useRef(null), c = l.useRef(!1), { detailedBudgets: g } = E(), d = l.useCallback(() => {
|
|
387
|
+
const u = o.current, p = Bt(g), h = p.nodes();
|
|
388
388
|
if (u) {
|
|
389
389
|
const b = u.nodes(), _ = new Map(b.map((y) => [y.guid, y]));
|
|
390
390
|
h.forEach((y) => {
|
|
@@ -397,26 +397,26 @@ const wt = ({
|
|
|
397
397
|
});
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
|
|
400
|
+
o.current = p, c.current = !1, r(h);
|
|
401
401
|
}, [g]);
|
|
402
402
|
return l.useEffect(() => {
|
|
403
403
|
d();
|
|
404
404
|
}, [d]), l.useEffect(() => () => {
|
|
405
|
-
|
|
405
|
+
o.current && (o.current.stop(), o.current = null);
|
|
406
406
|
}, []), l.useEffect(() => {
|
|
407
|
-
const u =
|
|
407
|
+
const u = o.current;
|
|
408
408
|
if (!u) return;
|
|
409
|
-
const p = u.nodes(), h =
|
|
410
|
-
u.nodes(b), Ct(u, t,
|
|
409
|
+
const p = u.nodes(), h = n > 0 && n < 450 || t > 0 && t < 300, b = At(p, g, h, t, n);
|
|
410
|
+
u.nodes(b), Ct(u, t, n), i && setTimeout(() => {
|
|
411
411
|
bt(u);
|
|
412
412
|
}, 0), r([...b]);
|
|
413
|
-
}, [t,
|
|
413
|
+
}, [t, n, i, g]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(n), children: a.map((u) => /* @__PURE__ */ e(Et, { bubble: u, isDraggable: i, onClick: s }, u.guid)) });
|
|
414
414
|
}, It = w(wt), Ot = ({
|
|
415
415
|
isMiniWidget: t = !1,
|
|
416
|
-
onConnectAccountsClick:
|
|
416
|
+
onConnectAccountsClick: n,
|
|
417
417
|
createBudgetOnClick: i
|
|
418
418
|
}) => {
|
|
419
|
-
const { config: s } = Le(), { recalculateBudgets: a } = E(), { spendCategories: r } = Y(), { budgets:
|
|
419
|
+
const { config: s } = Le(), { recalculateBudgets: a } = E(), { spendCategories: r } = Y(), { budgets: o } = D(), { availableWidth: c } = le(), { isMobile: g } = me(c), d = t && g, [u, p] = l.useState(!1), [h, b] = l.useState(!1), [_, y] = l.useState(!1), A = l.useMemo(() => [...r.filter((C) => C.totalAverageAmount > 0)], [r]), x = async () => {
|
|
420
420
|
y(!0);
|
|
421
421
|
const { data: C, isSuccess: f } = await a(A);
|
|
422
422
|
y(!1), f ? (C.length === 0 && b(!0), p(!1)) : p(!0);
|
|
@@ -424,15 +424,15 @@ const wt = ({
|
|
|
424
424
|
return _ ? /* @__PURE__ */ e(ge, {}) : u ? /* @__PURE__ */ e(
|
|
425
425
|
ye,
|
|
426
426
|
{
|
|
427
|
-
header:
|
|
427
|
+
header: o.autogenerate_budgets_error_header,
|
|
428
428
|
icon: "error",
|
|
429
429
|
iconColor: "#4D4D4D",
|
|
430
430
|
onClick: (C) => {
|
|
431
431
|
C === "primary" ? x() : i();
|
|
432
432
|
},
|
|
433
|
-
primaryButton:
|
|
434
|
-
secondaryButton:
|
|
435
|
-
subText:
|
|
433
|
+
primaryButton: o.autogenerate_budgets_error_primary_button,
|
|
434
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
435
|
+
subText: o.autogenerate_budgets_error_subheader,
|
|
436
436
|
sx: {
|
|
437
437
|
width: { sm: 468 },
|
|
438
438
|
".buttons-footer": {
|
|
@@ -445,15 +445,15 @@ const wt = ({
|
|
|
445
445
|
) : /* @__PURE__ */ e(Ve, { children: h ? /* @__PURE__ */ e(
|
|
446
446
|
ye,
|
|
447
447
|
{
|
|
448
|
-
header:
|
|
448
|
+
header: o.zero_state_generate_budgets_header,
|
|
449
449
|
icon: "error",
|
|
450
450
|
iconColor: "#4D4D4D",
|
|
451
451
|
onClick: (C) => {
|
|
452
|
-
C === "primary" ?
|
|
452
|
+
C === "primary" ? n() : i();
|
|
453
453
|
},
|
|
454
|
-
primaryButton: s.show_connections_widget_in_master ?
|
|
455
|
-
secondaryButton:
|
|
456
|
-
subText:
|
|
454
|
+
primaryButton: s.show_connections_widget_in_master ? o.zero_state_generate_budgets_primary_button : void 0,
|
|
455
|
+
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
456
|
+
subText: o.zero_state_generate_budgets_subheader,
|
|
457
457
|
sx: {
|
|
458
458
|
width: t ? "100%" : { sm: 500 },
|
|
459
459
|
height: t ? "100%" : { sm: 468 },
|
|
@@ -470,15 +470,15 @@ const wt = ({
|
|
|
470
470
|
) : /* @__PURE__ */ e(
|
|
471
471
|
ye,
|
|
472
472
|
{
|
|
473
|
-
header:
|
|
473
|
+
header: o.create_budgets_title,
|
|
474
474
|
icon: "bubble_chart",
|
|
475
475
|
iconColor: "#1A1A1A",
|
|
476
476
|
onClick: (C) => {
|
|
477
477
|
C === "primary" ? x() : i();
|
|
478
478
|
},
|
|
479
|
-
primaryButton:
|
|
480
|
-
secondaryButton: t ? void 0 :
|
|
481
|
-
subText:
|
|
479
|
+
primaryButton: o.empty_state_primary_button,
|
|
480
|
+
secondaryButton: t ? void 0 : o.empty_state_secondary_button,
|
|
481
|
+
subText: o.empty_state_subheader,
|
|
482
482
|
sx: {
|
|
483
483
|
width: t ? "100%" : { sm: 432 },
|
|
484
484
|
height: t ? "100%" : { sm: 468 },
|
|
@@ -497,19 +497,19 @@ const wt = ({
|
|
|
497
497
|
({
|
|
498
498
|
createBudgetOnClick: t = () => {
|
|
499
499
|
},
|
|
500
|
-
height:
|
|
500
|
+
height: n,
|
|
501
501
|
isDraggable: i = !1,
|
|
502
502
|
isMiniWidget: s = !1,
|
|
503
503
|
shouldShowZeroState: a,
|
|
504
504
|
unavailableWidth: r = 24
|
|
505
505
|
}) => {
|
|
506
|
-
const { onEvent:
|
|
507
|
-
c(x),
|
|
506
|
+
const { onEvent: o } = Z(), { setSelectedBudget: c } = E(), { isInitialized: g } = q(), { accounts: d } = D(), { availableWidth: u } = le(), { isMobile: p } = me(), [h, b] = l.useState(!1), _ = l.useMemo(() => u - r, [u]), y = (x) => {
|
|
507
|
+
c(x), o(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
508
508
|
budget_category: x.category.name,
|
|
509
509
|
click_type: "bubble"
|
|
510
510
|
});
|
|
511
511
|
}, A = () => {
|
|
512
|
-
b(!0),
|
|
512
|
+
b(!0), o(P.ACCOUNTS_CLICK_CONNECT);
|
|
513
513
|
};
|
|
514
514
|
return /* @__PURE__ */ m(
|
|
515
515
|
K,
|
|
@@ -527,7 +527,7 @@ const wt = ({
|
|
|
527
527
|
) : /* @__PURE__ */ e(
|
|
528
528
|
It,
|
|
529
529
|
{
|
|
530
|
-
height:
|
|
530
|
+
height: n,
|
|
531
531
|
isDraggable: i,
|
|
532
532
|
onClick: y,
|
|
533
533
|
width: _
|
|
@@ -547,12 +547,12 @@ const wt = ({
|
|
|
547
547
|
}
|
|
548
548
|
), He = ({ budget: t }) => {
|
|
549
549
|
const {
|
|
550
|
-
amount:
|
|
550
|
+
amount: n,
|
|
551
551
|
budgetColors: { background: i },
|
|
552
552
|
category: { name: s },
|
|
553
553
|
category_guid: a,
|
|
554
554
|
percentage: r,
|
|
555
|
-
transaction_total:
|
|
555
|
+
transaction_total: o
|
|
556
556
|
} = t, c = [
|
|
557
557
|
{
|
|
558
558
|
color: i,
|
|
@@ -561,26 +561,26 @@ const wt = ({
|
|
|
561
561
|
];
|
|
562
562
|
return /* @__PURE__ */ e(ve, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ m(v, { alignItems: "center", gap: 16, children: [
|
|
563
563
|
/* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
|
|
564
|
-
/* @__PURE__ */ e(B, { variant: "H1", children: `${T(
|
|
564
|
+
/* @__PURE__ */ e(B, { variant: "H1", children: `${T(o, "0,0")} / ${T(n, "0,0")}` }),
|
|
565
565
|
/* @__PURE__ */ e(B, { bold: !0, variant: "XSmall", children: s }),
|
|
566
566
|
/* @__PURE__ */ e(Be, { data: c, height: 10 })
|
|
567
567
|
] }) }) });
|
|
568
|
-
},
|
|
568
|
+
}, Mt = w(() => {
|
|
569
569
|
const { budgets: t } = D();
|
|
570
570
|
return /* @__PURE__ */ m(v, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
571
571
|
/* @__PURE__ */ e(j, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
572
572
|
/* @__PURE__ */ e(B, { bold: !0, color: "text.secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
|
|
573
573
|
/* @__PURE__ */ e(B, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
|
|
574
574
|
] });
|
|
575
|
-
}),
|
|
575
|
+
}), Rt = w(({ budget: t }) => {
|
|
576
576
|
const {
|
|
577
|
-
amount:
|
|
577
|
+
amount: n,
|
|
578
578
|
budgetColors: { background: i },
|
|
579
579
|
category: s,
|
|
580
580
|
percentage: a,
|
|
581
581
|
transaction_total: r
|
|
582
|
-
} = t, { setSelectedSubBudget:
|
|
583
|
-
return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(ee, { onClick: () =>
|
|
582
|
+
} = t, { setSelectedSubBudget: o } = E();
|
|
583
|
+
return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(ee, { onClick: () => o(t), children: [
|
|
584
584
|
/* @__PURE__ */ e(ue, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
|
|
585
585
|
/* @__PURE__ */ e(
|
|
586
586
|
te,
|
|
@@ -588,13 +588,13 @@ const wt = ({
|
|
|
588
588
|
primary: /* @__PURE__ */ e(v, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: t.category.name }) }),
|
|
589
589
|
secondary: /* @__PURE__ */ e(v, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(B, { fontWeight: 400, variant: "Body", children: `
|
|
590
590
|
${T(r, "0,0")} /
|
|
591
|
-
${T(
|
|
591
|
+
${T(n, "0,0")}
|
|
592
592
|
` }) })
|
|
593
593
|
}
|
|
594
594
|
)
|
|
595
595
|
] }) });
|
|
596
|
-
}), Lt = w(({ category: t, parentBudget:
|
|
597
|
-
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: r } =
|
|
596
|
+
}), Lt = w(({ category: t, parentBudget: n }) => {
|
|
597
|
+
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: r } = nt(), { addBudget: o } = E(), [c, g] = l.useState(!1), [d, u] = l.useState(!1), [p, h] = l.useState(""), [b, _] = l.useState(void 0);
|
|
598
598
|
l.useEffect(() => {
|
|
599
599
|
r((x) => {
|
|
600
600
|
const C = t.subCategories.find((f) => f.guid === x);
|
|
@@ -604,7 +604,7 @@ const wt = ({
|
|
|
604
604
|
const y = () => {
|
|
605
605
|
a(t.guid), g(!0);
|
|
606
606
|
}, A = async () => {
|
|
607
|
-
b && Number(p) > 0 && (await
|
|
607
|
+
b && Number(p) > 0 && (await o(b, Number(p), n.guid), u(!1), g(!1), _(void 0));
|
|
608
608
|
};
|
|
609
609
|
return /* @__PURE__ */ m(K, { children: [
|
|
610
610
|
/* @__PURE__ */ e(Q, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(ee, { onClick: y, children: /* @__PURE__ */ e(te, { children: /* @__PURE__ */ m(v, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
@@ -646,20 +646,20 @@ const wt = ({
|
|
|
646
646
|
)
|
|
647
647
|
] });
|
|
648
648
|
}), Nt = w(({ budget: t }) => {
|
|
649
|
-
const { category:
|
|
649
|
+
const { category: n, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: r, selectedSubBudget: o, setSelectedSubBudget: c, updateBudget: g } = E(), { filter: d, setFilter: u } = J(), [p, h] = l.useState(!1), [b, _] = l.useState(!1), [y, A] = l.useState("");
|
|
650
650
|
l.useEffect(() => {
|
|
651
|
-
|
|
651
|
+
o && (A(`${o.amount}`), u({
|
|
652
652
|
...d,
|
|
653
|
-
custom: (S) => S.category_guid ===
|
|
653
|
+
custom: (S) => S.category_guid === o.category_guid
|
|
654
654
|
}));
|
|
655
|
-
}, [
|
|
655
|
+
}, [o]);
|
|
656
656
|
const x = async () => {
|
|
657
|
-
|
|
658
|
-
...
|
|
657
|
+
o && await g({
|
|
658
|
+
...o,
|
|
659
659
|
amount: Number(y)
|
|
660
660
|
});
|
|
661
661
|
}, C = async () => {
|
|
662
|
-
|
|
662
|
+
o && await r(o.guid), _(!1), f();
|
|
663
663
|
}, f = () => {
|
|
664
664
|
u({
|
|
665
665
|
...d,
|
|
@@ -668,30 +668,30 @@ const wt = ({
|
|
|
668
668
|
};
|
|
669
669
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
670
670
|
/* @__PURE__ */ m(X, { sx: { bgcolor: "background.paper" }, children: [
|
|
671
|
-
i.length === 0 ? /* @__PURE__ */ e(
|
|
672
|
-
/* @__PURE__ */ e(
|
|
671
|
+
i.length === 0 ? /* @__PURE__ */ e(Mt, {}) : i.map((S) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
672
|
+
/* @__PURE__ */ e(Rt, { budget: S }),
|
|
673
673
|
/* @__PURE__ */ e(de, {})
|
|
674
674
|
] }, S.guid)),
|
|
675
|
-
/* @__PURE__ */ e(Lt, { category:
|
|
675
|
+
/* @__PURE__ */ e(Lt, { category: n, parentBudget: t })
|
|
676
676
|
] }),
|
|
677
677
|
/* @__PURE__ */ e(
|
|
678
678
|
$,
|
|
679
679
|
{
|
|
680
680
|
ariaLabelClose: a.close_aria,
|
|
681
|
-
isOpen: !!
|
|
681
|
+
isOpen: !!o,
|
|
682
682
|
onClose: f,
|
|
683
683
|
onPrimaryAction: () => h(!0),
|
|
684
684
|
onSecondaryAction: () => _(!0),
|
|
685
685
|
primaryText: s.details_edit_button,
|
|
686
686
|
secondaryText: s.details_delete_button,
|
|
687
687
|
title: s.details_title,
|
|
688
|
-
children:
|
|
689
|
-
/* @__PURE__ */ e(He, { budget:
|
|
688
|
+
children: o && /* @__PURE__ */ m(v, { gap: 24, children: [
|
|
689
|
+
/* @__PURE__ */ e(He, { budget: o }),
|
|
690
690
|
/* @__PURE__ */ e(Ae, { height: "100%" })
|
|
691
691
|
] })
|
|
692
692
|
}
|
|
693
693
|
),
|
|
694
|
-
|
|
694
|
+
o && /* @__PURE__ */ m(l.Fragment, { children: [
|
|
695
695
|
/* @__PURE__ */ e(
|
|
696
696
|
U,
|
|
697
697
|
{
|
|
@@ -705,7 +705,7 @@ const wt = ({
|
|
|
705
705
|
pe,
|
|
706
706
|
{
|
|
707
707
|
amount: y,
|
|
708
|
-
categoryName:
|
|
708
|
+
categoryName: o.category.name,
|
|
709
709
|
onAmountChanged: A
|
|
710
710
|
}
|
|
711
711
|
)
|
|
@@ -721,13 +721,13 @@ const wt = ({
|
|
|
721
721
|
primaryColor: "error",
|
|
722
722
|
primaryText: "Delete",
|
|
723
723
|
secondaryColor: "secondary",
|
|
724
|
-
children: /* @__PURE__ */ e(B, { variant: "Paragraph", children: N(s.delete_description,
|
|
724
|
+
children: /* @__PURE__ */ e(B, { variant: "Paragraph", children: N(s.delete_description, o.category.name) })
|
|
725
725
|
}
|
|
726
726
|
)
|
|
727
727
|
] })
|
|
728
728
|
] });
|
|
729
729
|
}), kt = w(({ budget: t }) => {
|
|
730
|
-
const { is_mobile_webview:
|
|
730
|
+
const { is_mobile_webview: n } = Le(), { setAlert: i } = E(), { budgets: s, common: a, transactions: r } = D(), { isDesktop: o, isSmallTablet: c, isTablet: g } = me(), {
|
|
731
731
|
sortedTransactions: d,
|
|
732
732
|
sortedTransactionsWithSplits: u,
|
|
733
733
|
tags: p
|
|
@@ -738,7 +738,7 @@ const wt = ({
|
|
|
738
738
|
b(I);
|
|
739
739
|
}, C = () => {
|
|
740
740
|
et(u, p), i(s.alert_csv_downloaded);
|
|
741
|
-
}, f = d.length > 0 && !
|
|
741
|
+
}, f = d.length > 0 && !n && (o || g && !c);
|
|
742
742
|
return /* @__PURE__ */ m(v, { gap: 24, children: [
|
|
743
743
|
/* @__PURE__ */ e(He, { budget: t }),
|
|
744
744
|
/* @__PURE__ */ m(v, { children: [
|
|
@@ -782,40 +782,40 @@ const wt = ({
|
|
|
782
782
|
] })
|
|
783
783
|
] });
|
|
784
784
|
}), $t = w(() => {
|
|
785
|
-
const { selectedAccountGuids: t } = q(), { budgets:
|
|
785
|
+
const { selectedAccountGuids: t } = q(), { budgets: n, common: i } = D(), {
|
|
786
786
|
alert: s,
|
|
787
787
|
dateRange: a,
|
|
788
788
|
deleteBudget: r,
|
|
789
|
-
selectedBudget:
|
|
789
|
+
selectedBudget: o,
|
|
790
790
|
selectedSubBudget: c,
|
|
791
791
|
setAlert: g,
|
|
792
792
|
setSelectedBudget: d,
|
|
793
793
|
updateBudget: u
|
|
794
794
|
} = E(), { setFilter: p } = J(), [h, b] = l.useState(!1), [_, y] = l.useState(!1), [A, x] = l.useState(!1), [C, f] = l.useState("");
|
|
795
795
|
l.useEffect(() => {
|
|
796
|
-
|
|
796
|
+
o && !c && (f(`${o.amount}`), b(!0), p({
|
|
797
797
|
accounts: t,
|
|
798
798
|
dateRange: a,
|
|
799
|
-
custom: (O) => O.category_guid ===
|
|
799
|
+
custom: (O) => O.category_guid === o.category_guid || O.top_level_category_guid === o.category_guid,
|
|
800
800
|
showSplits: !0
|
|
801
801
|
}));
|
|
802
|
-
}, [
|
|
802
|
+
}, [o]);
|
|
803
803
|
const S = async () => {
|
|
804
|
-
|
|
805
|
-
...
|
|
804
|
+
o && (await u({
|
|
805
|
+
...o,
|
|
806
806
|
amount: Number(C),
|
|
807
|
-
percentage:
|
|
808
|
-
}), y(!1), g(N(
|
|
807
|
+
percentage: o.category.totalAmount / Number(C) * 100
|
|
808
|
+
}), y(!1), g(N(n.alert_budget_updated, o.category.name)));
|
|
809
809
|
}, I = async () => {
|
|
810
|
-
|
|
810
|
+
o && (await r(o.guid), g(N(n.alert_budget_deleted, o.category.name))), L();
|
|
811
811
|
}, L = () => {
|
|
812
812
|
b(!1), setTimeout(() => {
|
|
813
813
|
d(void 0);
|
|
814
814
|
}, 250);
|
|
815
|
-
},
|
|
816
|
-
y(!1), f(`${
|
|
815
|
+
}, M = () => {
|
|
816
|
+
y(!1), f(`${o?.amount}`);
|
|
817
817
|
};
|
|
818
|
-
if (
|
|
818
|
+
if (o)
|
|
819
819
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
820
820
|
/* @__PURE__ */ m(
|
|
821
821
|
$,
|
|
@@ -825,12 +825,12 @@ const wt = ({
|
|
|
825
825
|
onClose: L,
|
|
826
826
|
onPrimaryAction: () => y(!0),
|
|
827
827
|
onSecondaryAction: () => x(!0),
|
|
828
|
-
primaryText:
|
|
828
|
+
primaryText: n.details_edit_button,
|
|
829
829
|
secondaryColor: "error",
|
|
830
|
-
secondaryText:
|
|
831
|
-
title:
|
|
830
|
+
secondaryText: n.details_delete_button,
|
|
831
|
+
title: n.details_title,
|
|
832
832
|
children: [
|
|
833
|
-
/* @__PURE__ */ e(kt, { budget:
|
|
833
|
+
/* @__PURE__ */ e(kt, { budget: o }),
|
|
834
834
|
/* @__PURE__ */ e(
|
|
835
835
|
xe,
|
|
836
836
|
{
|
|
@@ -847,18 +847,18 @@ const wt = ({
|
|
|
847
847
|
/* @__PURE__ */ e(
|
|
848
848
|
U,
|
|
849
849
|
{
|
|
850
|
-
copy: { close_aria: i.close_aria, title:
|
|
850
|
+
copy: { close_aria: i.close_aria, title: n.details_edit_title },
|
|
851
851
|
disablePrimaryButton: Number(C) <= 0,
|
|
852
852
|
isOpen: _,
|
|
853
|
-
onClose:
|
|
853
|
+
onClose: M,
|
|
854
854
|
onPrimaryAction: S,
|
|
855
|
-
onSecondaryAction:
|
|
856
|
-
primaryText:
|
|
855
|
+
onSecondaryAction: M,
|
|
856
|
+
primaryText: n.edit_save_button,
|
|
857
857
|
children: /* @__PURE__ */ e(
|
|
858
858
|
pe,
|
|
859
859
|
{
|
|
860
860
|
amount: C,
|
|
861
|
-
categoryName:
|
|
861
|
+
categoryName: o.category.name,
|
|
862
862
|
onAmountChanged: f
|
|
863
863
|
}
|
|
864
864
|
)
|
|
@@ -867,28 +867,28 @@ const wt = ({
|
|
|
867
867
|
/* @__PURE__ */ e(
|
|
868
868
|
U,
|
|
869
869
|
{
|
|
870
|
-
copy: { close_aria: i.close_aria, title:
|
|
870
|
+
copy: { close_aria: i.close_aria, title: n.delete_title },
|
|
871
871
|
isOpen: A,
|
|
872
872
|
onClose: () => x(!1),
|
|
873
873
|
onPrimaryAction: I,
|
|
874
874
|
primaryColor: "error",
|
|
875
|
-
primaryText:
|
|
875
|
+
primaryText: n.details_delete_button,
|
|
876
876
|
secondaryColor: "secondary",
|
|
877
|
-
children: /* @__PURE__ */ e(B, { variant: "Paragraph", children: N(
|
|
877
|
+
children: /* @__PURE__ */ e(B, { variant: "Paragraph", children: N(n.delete_description, o.category.name) })
|
|
878
878
|
}
|
|
879
879
|
)
|
|
880
880
|
] });
|
|
881
|
-
}), Pt = ({ budget: t, onClick:
|
|
881
|
+
}), Pt = ({ budget: t, onClick: n }) => {
|
|
882
882
|
const {
|
|
883
883
|
amount: i,
|
|
884
884
|
budgetColors: { background: s, description: a },
|
|
885
885
|
category_guid: r,
|
|
886
|
-
description:
|
|
886
|
+
description: o,
|
|
887
887
|
percentage: c,
|
|
888
888
|
subBudgets: g,
|
|
889
889
|
transaction_total: d
|
|
890
|
-
} = t;
|
|
891
|
-
return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(ee, { onClick: () =>
|
|
890
|
+
} = t, u = c > 100;
|
|
891
|
+
return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(ee, { onClick: () => n?.(t), children: [
|
|
892
892
|
/* @__PURE__ */ e(ue, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: r, variant: "basic" }) }) }),
|
|
893
893
|
/* @__PURE__ */ e(
|
|
894
894
|
te,
|
|
@@ -896,34 +896,49 @@ const wt = ({
|
|
|
896
896
|
primary: /* @__PURE__ */ m(v, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
897
897
|
/* @__PURE__ */ e(B, { bold: !0, variant: "Body", children: t.category.name }),
|
|
898
898
|
/* @__PURE__ */ e(B, { fontWeight: 400, variant: "Body", children: `
|
|
899
|
-
${T(d, "0,0")} /
|
|
899
|
+
${T(d, "0,0")} /
|
|
900
900
|
${T(i, "0,0")}
|
|
901
901
|
` })
|
|
902
902
|
] }),
|
|
903
903
|
secondary: /* @__PURE__ */ m(v, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
904
904
|
/* @__PURE__ */ e(B, { variant: "XSmall", children: `${g.length} Sub-budgets` }),
|
|
905
|
-
/* @__PURE__ */ e(
|
|
905
|
+
/* @__PURE__ */ e(
|
|
906
|
+
B,
|
|
907
|
+
{
|
|
908
|
+
bold: u,
|
|
909
|
+
sx: {
|
|
910
|
+
color: a,
|
|
911
|
+
...u && {
|
|
912
|
+
".MuiListItemButton-root:hover &, .MuiListItemButton-root:active &": {
|
|
913
|
+
color: "error.dark"
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
variant: "XSmall",
|
|
918
|
+
children: o
|
|
919
|
+
}
|
|
920
|
+
)
|
|
906
921
|
] })
|
|
907
922
|
}
|
|
908
923
|
)
|
|
909
924
|
] }) });
|
|
910
925
|
}, Gt = w(() => {
|
|
911
|
-
const { onEvent: t } = Z(), { budgets:
|
|
926
|
+
const { onEvent: t } = Z(), { budgets: n } = D(), { detailedBudgets: i, setSelectedBudget: s } = E(), a = (r) => {
|
|
912
927
|
s(r), t(P.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
913
928
|
budget_category: r.category.name,
|
|
914
929
|
click_type: "list"
|
|
915
930
|
});
|
|
916
931
|
};
|
|
917
932
|
return /* @__PURE__ */ m(ve, { elevation: 2, children: [
|
|
918
|
-
/* @__PURE__ */ e(Ge, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(
|
|
933
|
+
/* @__PURE__ */ e(Ge, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Re, { children: n.budget_categories_title }) }),
|
|
919
934
|
/* @__PURE__ */ e(Te, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(X, { children: i.map((r) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
920
935
|
/* @__PURE__ */ e(Pt, { budget: r, onClick: a }),
|
|
921
936
|
/* @__PURE__ */ e(de, {})
|
|
922
937
|
] }, r.guid)) }) })
|
|
923
938
|
] });
|
|
924
939
|
}), jt = w(() => {
|
|
925
|
-
const t = ie(), { onEvent:
|
|
926
|
-
const f = c.reduce((
|
|
940
|
+
const t = ie(), { onEvent: n } = Z(), { visibleAccounts: i } = Ne(), { budgets: s, common: a, recurring: r } = D(), { incomeCategories: o, spendCategories: c } = Y(), { detailedBudgets: g, totalBudgeted: d } = E(), { incomeTotal: u } = ce(), { setFilter: p } = J(), [h, b] = l.useState(!1), [_, y] = l.useMemo(() => {
|
|
941
|
+
const f = c.reduce((M, O) => M + O.totalAmount, 0);
|
|
927
942
|
let S = f / d;
|
|
928
943
|
S > 1 && (S = 1);
|
|
929
944
|
let I = t.palette.success.main;
|
|
@@ -937,7 +952,7 @@ const wt = ({
|
|
|
937
952
|
return [f, L];
|
|
938
953
|
}, [g, c]), [A, x] = l.useMemo(() => {
|
|
939
954
|
const f = Math.abs(
|
|
940
|
-
|
|
955
|
+
o.reduce((L, M) => L + M.totalAmount, 0)
|
|
941
956
|
);
|
|
942
957
|
let S = f / u;
|
|
943
958
|
S > 1 && (S = 1);
|
|
@@ -948,17 +963,17 @@ const wt = ({
|
|
|
948
963
|
}
|
|
949
964
|
];
|
|
950
965
|
return [f, I];
|
|
951
|
-
}, [
|
|
966
|
+
}, [o, u]), C = () => {
|
|
952
967
|
p({
|
|
953
968
|
accounts: i.map((f) => f.guid),
|
|
954
969
|
dateRange: {
|
|
955
970
|
start: rt(/* @__PURE__ */ new Date(), 90),
|
|
956
971
|
end: /* @__PURE__ */ new Date()
|
|
957
972
|
}
|
|
958
|
-
}), b(!0),
|
|
973
|
+
}), b(!0), n(P.BUDGETS_CLICK_EDIT_INCOME);
|
|
959
974
|
};
|
|
960
975
|
return /* @__PURE__ */ m(ve, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
961
|
-
/* @__PURE__ */ e(Ge, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(
|
|
976
|
+
/* @__PURE__ */ e(Ge, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Re, { children: s.overview_title }) }),
|
|
962
977
|
/* @__PURE__ */ e(Te, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(v, { gap: 24, children: [
|
|
963
978
|
/* @__PURE__ */ m(v, { gap: 8, children: [
|
|
964
979
|
/* @__PURE__ */ e(B, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
|
|
@@ -1001,8 +1016,8 @@ const wt = ({
|
|
|
1001
1016
|
}
|
|
1002
1017
|
)
|
|
1003
1018
|
] });
|
|
1004
|
-
}),
|
|
1005
|
-
const i = ie(), { onEvent: s } = Z(), { visibleAccounts: a } = Ne(), { budgets: r, common:
|
|
1019
|
+
}), Me = 480, Wo = w(({ onBackClick: t, sx: n }) => {
|
|
1020
|
+
const i = ie(), { onEvent: s } = Z(), { visibleAccounts: a } = Ne(), { budgets: r, common: o } = D(), { isInitialized: c, selectedAccounts: g, setDisplayedDate: d } = q(), {
|
|
1006
1021
|
alert: u,
|
|
1007
1022
|
dateRange: p,
|
|
1008
1023
|
isDataLoaded: h,
|
|
@@ -1011,7 +1026,7 @@ const wt = ({
|
|
|
1011
1026
|
setAlert: y,
|
|
1012
1027
|
setTheme: A,
|
|
1013
1028
|
detailedBudgets: x
|
|
1014
|
-
} = E(), { setDateRange: C } = ce(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: S } = Y(), { isSmallTablet: I, isMobile: L, isSmallMobile:
|
|
1029
|
+
} = E(), { setDateRange: C } = ce(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: S } = Y(), { isSmallTablet: I, isMobile: L, isSmallMobile: M } = me(), O = I || L || M, [z, k] = l.useState(!1);
|
|
1015
1030
|
je({
|
|
1016
1031
|
widgetName: "BubbleBudgetsWidget",
|
|
1017
1032
|
isLoaded: h
|
|
@@ -1019,8 +1034,8 @@ const wt = ({
|
|
|
1019
1034
|
A(i), h || b().finally(() => {
|
|
1020
1035
|
s(P.BUDGETS_VIEW);
|
|
1021
1036
|
});
|
|
1022
|
-
}, []), l.useEffect(() => (_({ start: re(
|
|
1023
|
-
_({ start: re(
|
|
1037
|
+
}, []), l.useEffect(() => (_({ start: re(ne()), end: Ce(ne()) }), () => {
|
|
1038
|
+
_({ start: re(ne()), end: Ce(ne()) });
|
|
1024
1039
|
}), [a]), l.useEffect(() => {
|
|
1025
1040
|
c && (d(p.start, p.end), f(g, p.start, p.end).finally(), S(g).finally(), C(p));
|
|
1026
1041
|
}, [c, g, p]);
|
|
@@ -1028,7 +1043,7 @@ const wt = ({
|
|
|
1028
1043
|
_({ start: V[0] || /* @__PURE__ */ new Date(), end: V[1] || /* @__PURE__ */ new Date() });
|
|
1029
1044
|
}, fe = () => {
|
|
1030
1045
|
s(P.BUDGETS_CLICK_FILTER);
|
|
1031
|
-
},
|
|
1046
|
+
}, oe = () => {
|
|
1032
1047
|
k(!0), s(P.BUDGETS_CLICK_ADD);
|
|
1033
1048
|
}, _e = () => {
|
|
1034
1049
|
k(!1);
|
|
@@ -1042,7 +1057,7 @@ const wt = ({
|
|
|
1042
1057
|
{
|
|
1043
1058
|
iconName: "add",
|
|
1044
1059
|
label: r.add_title,
|
|
1045
|
-
onClick:
|
|
1060
|
+
onClick: oe
|
|
1046
1061
|
}
|
|
1047
1062
|
],
|
|
1048
1063
|
calendarActions: {
|
|
@@ -1052,7 +1067,7 @@ const wt = ({
|
|
|
1052
1067
|
},
|
|
1053
1068
|
onAccountsFilterClick: fe,
|
|
1054
1069
|
onBackClick: t,
|
|
1055
|
-
sx:
|
|
1070
|
+
sx: n,
|
|
1056
1071
|
title: r.budgets_title,
|
|
1057
1072
|
children: [
|
|
1058
1073
|
/* @__PURE__ */ m(
|
|
@@ -1066,11 +1081,11 @@ const wt = ({
|
|
|
1066
1081
|
/* @__PURE__ */ e(v, { height: O ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1067
1082
|
We,
|
|
1068
1083
|
{
|
|
1069
|
-
createBudgetOnClick:
|
|
1084
|
+
createBudgetOnClick: oe,
|
|
1070
1085
|
height: O ? 450 : 800,
|
|
1071
1086
|
isDraggable: !0,
|
|
1072
1087
|
shouldShowZeroState: x.length === 0,
|
|
1073
|
-
unavailableWidth: O ? 0 :
|
|
1088
|
+
unavailableWidth: O ? 0 : Me
|
|
1074
1089
|
}
|
|
1075
1090
|
) }),
|
|
1076
1091
|
x.length !== 0 && /* @__PURE__ */ m(
|
|
@@ -1079,7 +1094,7 @@ const wt = ({
|
|
|
1079
1094
|
gap: 24,
|
|
1080
1095
|
height: "100%",
|
|
1081
1096
|
sx: { mr: 24, mt: 48 },
|
|
1082
|
-
width: O ? "100%" :
|
|
1097
|
+
width: O ? "100%" : Me,
|
|
1083
1098
|
children: [
|
|
1084
1099
|
/* @__PURE__ */ e(jt, {}),
|
|
1085
1100
|
/* @__PURE__ */ e(Gt, {})
|
|
@@ -1093,7 +1108,7 @@ const wt = ({
|
|
|
1093
1108
|
/* @__PURE__ */ e(
|
|
1094
1109
|
$,
|
|
1095
1110
|
{
|
|
1096
|
-
ariaLabelClose:
|
|
1111
|
+
ariaLabelClose: o.close_aria,
|
|
1097
1112
|
isOpen: z,
|
|
1098
1113
|
onClose: () => k(!1),
|
|
1099
1114
|
title: r.add_new_title,
|
|
@@ -1134,7 +1149,7 @@ const wt = ({
|
|
|
1134
1149
|
);
|
|
1135
1150
|
}), zt = ({
|
|
1136
1151
|
budgetsCopy: t,
|
|
1137
|
-
difference:
|
|
1152
|
+
difference: n,
|
|
1138
1153
|
handleAddClick: i,
|
|
1139
1154
|
shouldShowZeroState: s
|
|
1140
1155
|
}) => {
|
|
@@ -1142,7 +1157,7 @@ const wt = ({
|
|
|
1142
1157
|
l.useEffect(() => {
|
|
1143
1158
|
a > 0 && r.current === null && (r.current = a);
|
|
1144
1159
|
}, [a]);
|
|
1145
|
-
const
|
|
1160
|
+
const o = l.useMemo(() => {
|
|
1146
1161
|
const c = r.current ?? a;
|
|
1147
1162
|
return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
|
|
1148
1163
|
}, [a]);
|
|
@@ -1151,23 +1166,23 @@ const wt = ({
|
|
|
1151
1166
|
We,
|
|
1152
1167
|
{
|
|
1153
1168
|
createBudgetOnClick: i,
|
|
1154
|
-
height:
|
|
1169
|
+
height: o,
|
|
1155
1170
|
isMiniWidget: !0,
|
|
1156
1171
|
shouldShowZeroState: s
|
|
1157
1172
|
}
|
|
1158
1173
|
),
|
|
1159
1174
|
!s && /* @__PURE__ */ m(K, { ml: 16, children: [
|
|
1160
|
-
/* @__PURE__ */ e(B, { bold: !0, color:
|
|
1161
|
-
/* @__PURE__ */ e(B, { children:
|
|
1175
|
+
/* @__PURE__ */ e(B, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: T(Math.abs(n), "0,0") }),
|
|
1176
|
+
/* @__PURE__ */ e(B, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
|
|
1162
1177
|
] })
|
|
1163
1178
|
] });
|
|
1164
1179
|
}, Ft = (t) => {
|
|
1165
|
-
const
|
|
1180
|
+
const n = ie(), { onEvent: i } = Z(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: r, setTheme: o } = E(), { budgets: c, common: g } = D(), { isInitialized: d, selectedAccounts: u } = q(), { loadDateRangeCategoryTotals: p, loadMonthlyCategoryTotals: h } = Y(), b = lt(), [_, y] = l.useState(!1);
|
|
1166
1181
|
l.useEffect(() => {
|
|
1167
1182
|
a || r().finally();
|
|
1168
1183
|
}, []), l.useEffect(() => {
|
|
1169
|
-
n
|
|
1170
|
-
}, [
|
|
1184
|
+
o(n);
|
|
1185
|
+
}, [n]), l.useEffect(() => {
|
|
1171
1186
|
d && !a && (p(
|
|
1172
1187
|
u,
|
|
1173
1188
|
re(/* @__PURE__ */ new Date()),
|
|
@@ -1221,54 +1236,54 @@ const wt = ({
|
|
|
1221
1236
|
]
|
|
1222
1237
|
}
|
|
1223
1238
|
);
|
|
1224
|
-
},
|
|
1239
|
+
}, Ho = w(Ft), ae = {
|
|
1225
1240
|
CANCEL_DELETE: "Cancel - Delete",
|
|
1226
1241
|
END_SAVE: "End - Save",
|
|
1227
1242
|
END_DELETE: "End - Delete",
|
|
1228
1243
|
START_DELETE: "Start - Delete"
|
|
1229
|
-
}, Ut = ({ onClose: t, onEvent:
|
|
1244
|
+
}, Ut = ({ onClose: t, onEvent: n, onViewHistory: i }) => {
|
|
1230
1245
|
const {
|
|
1231
1246
|
alert: s,
|
|
1232
1247
|
dateRange: a,
|
|
1233
1248
|
deleteBudget: r,
|
|
1234
|
-
selectedBudget:
|
|
1249
|
+
selectedBudget: o,
|
|
1235
1250
|
selectedSubBudget: c,
|
|
1236
1251
|
setAlert: g,
|
|
1237
1252
|
setSelectedBudget: d,
|
|
1238
1253
|
updateBudget: u
|
|
1239
|
-
} = E(), { budgets: p, common: h } = D(), { isCopyLoaded: b, selectedAccountGuids: _ } = q(), y = $e(), { setFilter: A } = J(), [x, C] = l.useState(""), [f, S] = l.useState(null), [I, L] = l.useState(!1),
|
|
1254
|
+
} = E(), { budgets: p, common: h } = D(), { isCopyLoaded: b, selectedAccountGuids: _ } = q(), y = $e(), { setFilter: A } = J(), [x, C] = l.useState(""), [f, S] = l.useState(null), [I, L] = l.useState(!1), M = l.useRef(!1);
|
|
1240
1255
|
if (l.useEffect(() => {
|
|
1241
|
-
!
|
|
1256
|
+
!o || c || (C(`${o.amount}`), A({
|
|
1242
1257
|
accounts: _,
|
|
1243
1258
|
dateRange: a,
|
|
1244
1259
|
custom: ({ category_guid: G, top_level_category_guid: H }) => {
|
|
1245
|
-
const { category_guid: V } =
|
|
1260
|
+
const { category_guid: V } = o;
|
|
1246
1261
|
return G === V || H === V;
|
|
1247
1262
|
},
|
|
1248
1263
|
showSplits: !0
|
|
1249
1264
|
}), L(!0));
|
|
1250
|
-
}, [
|
|
1251
|
-
if (!
|
|
1265
|
+
}, [o]), !b) return /* @__PURE__ */ e(ge, {});
|
|
1266
|
+
if (!o) return null;
|
|
1252
1267
|
const O = () => {
|
|
1253
1268
|
C(""), S(null), L(!1), setTimeout(() => {
|
|
1254
1269
|
d(void 0), t?.();
|
|
1255
1270
|
}, 250);
|
|
1256
1271
|
}, z = () => {
|
|
1257
|
-
f === "delete" &&
|
|
1272
|
+
f === "delete" && n?.(ae.CANCEL_DELETE, x), C(o.amount ? `${o.amount}` : ""), S(null);
|
|
1258
1273
|
}, k = async () => {
|
|
1259
1274
|
if (f === "edit") {
|
|
1260
|
-
if (
|
|
1261
|
-
|
|
1262
|
-
...
|
|
1275
|
+
if (M.current) return;
|
|
1276
|
+
M.current = !0, await u({
|
|
1277
|
+
...o,
|
|
1263
1278
|
amount: Number(x)
|
|
1264
|
-
}),
|
|
1265
|
-
N(p.alert_budget_updated,
|
|
1266
|
-
), S(null),
|
|
1279
|
+
}), n?.(ae.END_SAVE, x), g(
|
|
1280
|
+
N(p.alert_budget_updated, o.category.name)
|
|
1281
|
+
), S(null), M.current = !1;
|
|
1267
1282
|
}
|
|
1268
|
-
f === "delete" && (await r(
|
|
1269
|
-
}, { remainingAmount: he, spentPercentage: fe, iconColor:
|
|
1270
|
-
|
|
1271
|
-
|
|
1283
|
+
f === "delete" && (await r(o.guid), n?.(ae.END_DELETE, x), O());
|
|
1284
|
+
}, { remainingAmount: he, spentPercentage: fe, iconColor: oe } = dt(
|
|
1285
|
+
o.transaction_total ?? 0,
|
|
1286
|
+
o.amount ?? 0
|
|
1272
1287
|
), _e = (G, H) => N(G, /* @__PURE__ */ e("b", { children: H }));
|
|
1273
1288
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
1274
1289
|
/* @__PURE__ */ m(
|
|
@@ -1286,7 +1301,7 @@ const wt = ({
|
|
|
1286
1301
|
/* EDIT */
|
|
1287
1302
|
),
|
|
1288
1303
|
onSecondaryAction: () => {
|
|
1289
|
-
|
|
1304
|
+
n?.(ae.START_DELETE, x), S(
|
|
1290
1305
|
"delete"
|
|
1291
1306
|
/* DELETE */
|
|
1292
1307
|
);
|
|
@@ -1299,30 +1314,30 @@ const wt = ({
|
|
|
1299
1314
|
pr: 24
|
|
1300
1315
|
}
|
|
1301
1316
|
},
|
|
1302
|
-
title: N(p.details_type_title,
|
|
1317
|
+
title: N(p.details_type_title, o.category.name),
|
|
1303
1318
|
children: [
|
|
1304
1319
|
/* @__PURE__ */ e(
|
|
1305
|
-
|
|
1320
|
+
ot,
|
|
1306
1321
|
{
|
|
1307
|
-
amount:
|
|
1322
|
+
amount: o.amount,
|
|
1308
1323
|
icon: /* @__PURE__ */ e(
|
|
1309
1324
|
W,
|
|
1310
1325
|
{
|
|
1311
|
-
categoryGuid:
|
|
1326
|
+
categoryGuid: o.category.guid,
|
|
1312
1327
|
size: 44,
|
|
1313
1328
|
sx: {
|
|
1314
|
-
bgcolor: Je(Ee(
|
|
1315
|
-
border: `1px solid ${Ee(
|
|
1329
|
+
bgcolor: Je(Ee(o.category.guid, y), 0.15),
|
|
1330
|
+
border: `1px solid ${Ee(o.category.guid, y)}`,
|
|
1316
1331
|
color: "text.primary"
|
|
1317
1332
|
}
|
|
1318
1333
|
}
|
|
1319
1334
|
),
|
|
1320
|
-
iconColor:
|
|
1335
|
+
iconColor: oe,
|
|
1321
1336
|
onViewHistory: i,
|
|
1322
1337
|
remainingAmount: he,
|
|
1323
1338
|
spentPercentage: fe,
|
|
1324
|
-
startDate:
|
|
1325
|
-
totalTransaction:
|
|
1339
|
+
startDate: o.start_date,
|
|
1340
|
+
totalTransaction: o.transaction_total
|
|
1326
1341
|
}
|
|
1327
1342
|
),
|
|
1328
1343
|
/* @__PURE__ */ e(Ae, {}),
|
|
@@ -1345,7 +1360,7 @@ const wt = ({
|
|
|
1345
1360
|
closeAriaLabel: h.close_aria,
|
|
1346
1361
|
content: _e(
|
|
1347
1362
|
p[f === "edit" ? "edit_budget_content" : "delete_description"],
|
|
1348
|
-
|
|
1363
|
+
o.category.name
|
|
1349
1364
|
),
|
|
1350
1365
|
handleInputChange: (G) => C(G.toString()),
|
|
1351
1366
|
handleModalClose: z,
|
|
@@ -1362,9 +1377,9 @@ const wt = ({
|
|
|
1362
1377
|
}
|
|
1363
1378
|
)
|
|
1364
1379
|
] });
|
|
1365
|
-
},
|
|
1380
|
+
}, Vo = w(Ut);
|
|
1366
1381
|
export {
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1382
|
+
Ho as BubbleBudgetsMiniWidget,
|
|
1383
|
+
Wo as BubbleBudgetsWidget,
|
|
1384
|
+
Vo as BudgetDetailsDrawerV2
|
|
1370
1385
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-cartographer/experiences",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.14",
|
|
4
4
|
"description": "Library containing experience widgets",
|
|
5
5
|
"author": "MX",
|
|
6
6
|
"license": "MIT",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"@mui/x-date-pickers-pro": "^7.29.4",
|
|
194
194
|
"@mxenabled/cssinjs": "^0.6.0",
|
|
195
195
|
"@mxenabled/mx-icons": "^1.5.1",
|
|
196
|
-
"@mxenabled/mxui": "
|
|
196
|
+
"@mxenabled/mxui": "1.5.12",
|
|
197
197
|
"@mxenabled/web-widget-sdk": "^0.0.13",
|
|
198
198
|
"@tanstack/react-virtual": "^3.13.2",
|
|
199
199
|
"bowser": "^2.11.0",
|