@mx-cartographer/experiences 7.13.21 → 7.13.22-alpha.al0
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/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-CG9VtEpj.mjs} +2 -2
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-BDFCEhSI.mjs} +2 -2
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-Bn1eH2EU.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-BCSxP3M3.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-tvJUjmwZ.mjs} +1 -1
- package/dist/{Connect-eYIWqCEr.mjs → Connect-CmjOgy5v.mjs} +1 -1
- package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-Be0RkL7I.mjs} +2 -2
- package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-yeD_PsY1.mjs} +2 -2
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-xu9UcYZR.mjs} +1 -1
- package/dist/DateRangeSelector-DE4UR77m.mjs +275 -0
- package/dist/{ExportCsvAction-izkIdXj5.mjs → ExportCsvAction-CLUDN8jI.mjs} +3 -3
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-BkUeAltd.mjs} +90 -96
- package/dist/{GoalStore-DB58sKTC.mjs → GoalStore-DMhiGiF4.mjs} +1 -1
- package/dist/{Help-D-laTbKu.mjs → Help-pcoNjCaF.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DIjY-HBq.mjs} +1 -1
- package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-BQIdxB-9.mjs} +1 -1
- package/dist/{ManageIncome-B1j-AzI1.mjs → ManageIncome-DWVaWpCT.mjs} +4 -4
- package/dist/{MicroWidgetContainer-B_EnfvCq.mjs → MicroWidgetContainer-CTMkXRJM.mjs} +1 -1
- package/dist/{MiniWidgetContainer-Bhkv-hpz.mjs → MiniWidgetContainer-BKPN3c-6.mjs} +1 -1
- package/dist/{NotificationSettings-C77J42Ue.mjs → NotificationSettings-O3iUw7-O.mjs} +32 -32
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-2lCGZTRv.mjs} +3 -3
- package/dist/{RecurringSettings-Dyj3i0ZJ.mjs → RecurringSettings-DNko1CD0.mjs} +2 -2
- package/dist/{SpendingLegend-BgjazduU.mjs → SpendingLegend-CGYqNtOp.mjs} +1 -1
- package/dist/{StatusIndicator-CIKUOoN_.mjs → StatusIndicator-CnDblSmc.mjs} +2 -2
- package/dist/{Transaction-CqjlF6SO.mjs → Transaction-Bd0myZzA.mjs} +1 -1
- package/dist/{TransactionDetails-CwqokbQo.mjs → TransactionDetails-DAB5arBD.mjs} +6 -6
- package/dist/{TransactionStore-rpqhGX8m.mjs → TransactionStore-hzVucfUK.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BWCe3UeO.mjs} +1 -1
- package/dist/WidgetContainer-BPeSl0Dj.mjs +180 -0
- package/dist/WidgetContainerV2-BjOelON7.mjs +127 -0
- package/dist/accounts/index.es.js +218 -219
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +408 -409
- package/dist/cashflow/index.es.js +227 -228
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +3 -2
- package/dist/common/components/WidgetContainerV2.d.ts +4 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +167 -164
- package/dist/dashboard/index.es.js +5 -5
- package/dist/debts/index.es.js +585 -586
- package/dist/{exportTransactionsToCSV-CdTF_RqL.mjs → exportTransactionsToCSV-CamFllci.mjs} +1 -1
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +641 -652
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +498 -499
- package/dist/help/index.es.js +8 -8
- package/dist/{hooks-BxkfR-Ff.mjs → hooks-DOWEalfb.mjs} +2 -2
- package/dist/insights/index.es.js +3 -3
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +448 -449
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +182 -196
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +240 -242
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/index.es.js +246 -248
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-DQc7zGqk.mjs} +1 -1
- package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DojdZhOg.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-DmYEMfRw.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-B7xDq2bM.mjs +0 -441
package/dist/budgets/index.es.js
CHANGED
|
@@ -1,176 +1,176 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e, Fragment as Ke } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as O } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as Ce } from "date-fns/endOfMonth";
|
|
5
5
|
import { isAfter as Ye } from "date-fns/isAfter";
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
6
|
+
import { startOfMonth as ne } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as te } from "date-fns/startOfToday";
|
|
8
8
|
import Se from "@mui/material/Alert";
|
|
9
9
|
import xe from "@mui/material/Snackbar";
|
|
10
10
|
import A from "@mui/material/Stack";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Text as
|
|
15
|
-
import { u as E, m as w, i as
|
|
11
|
+
import re from "@mui/material/styles/useTheme";
|
|
12
|
+
import H from "@mui/material/Box";
|
|
13
|
+
import V from "@mui/material/List";
|
|
14
|
+
import { Text as C, CategoryIcon as W, Icon as z, H3 as Le } from "@mxenabled/mxui";
|
|
15
|
+
import { u as E, m as w, i as se, l as K, p as ie, a as Ne, f as Y, b as X, h as Z, d as ke } from "../hooks-DOWEalfb.mjs";
|
|
16
16
|
import { f as D } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
17
17
|
import $e from "@mui/material/Button";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { b as
|
|
18
|
+
import ce from "@mui/material/Divider";
|
|
19
|
+
import q from "@mui/material/ListItem";
|
|
20
|
+
import le from "@mui/material/ListItemAvatar";
|
|
21
|
+
import J from "@mui/material/ListItemButton";
|
|
22
|
+
import Q from "@mui/material/ListItemText";
|
|
23
|
+
import { b as R } from "../Localization-CPkpIwIx.mjs";
|
|
24
24
|
import { D as $ } from "../Drawer-Bbe4AMB1.mjs";
|
|
25
25
|
import Xe from "@mui/material/ListItemSecondaryAction";
|
|
26
|
-
import { C as Ze } from "../CurrencyInput-
|
|
27
|
-
import { D as
|
|
28
|
-
import { C as qe } from "../ConnectionsDrawer-
|
|
26
|
+
import { C as Ze } from "../CurrencyInput-xu9UcYZR.mjs";
|
|
27
|
+
import { D as U } from "../Dialog-Ck34yr-d.mjs";
|
|
28
|
+
import { C as qe } from "../ConnectionsDrawer-yeD_PsY1.mjs";
|
|
29
29
|
import * as M from "d3";
|
|
30
30
|
import Je from "@mui/material/Tooltip";
|
|
31
31
|
import { useTheme as Ge, alpha as Qe } from "@mui/material/styles";
|
|
32
|
-
import { u as
|
|
33
|
-
import { L as
|
|
32
|
+
import { u as de } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
33
|
+
import { L as ue } from "../Loader-D3rjKx72.mjs";
|
|
34
34
|
import { E as ye } from "../EmptyState-DHAkGsjk.mjs";
|
|
35
|
-
import { A as
|
|
35
|
+
import { A as j } from "../Analytics-BYItVAe-.mjs";
|
|
36
36
|
import Ee from "@mui/material/Tab";
|
|
37
37
|
import et from "@mui/material/Tabs";
|
|
38
|
-
import { e as tt } from "../exportTransactionsToCSV-
|
|
39
|
-
import { T as Ae } from "../StatusIndicator-
|
|
40
|
-
import { T as ot, c as nt } from "../TransactionDetails-
|
|
38
|
+
import { e as tt } from "../exportTransactionsToCSV-CamFllci.mjs";
|
|
39
|
+
import { T as Ae } from "../StatusIndicator-CnDblSmc.mjs";
|
|
40
|
+
import { T as ot, c as nt } from "../TransactionDetails-DAB5arBD.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 at, b as rt } from "../CategorySelectorDrawer-
|
|
45
|
+
import { u as at, b as rt } from "../CategorySelectorDrawer-tvJUjmwZ.mjs";
|
|
46
46
|
import je from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as st } from "date-fns/subDays";
|
|
48
48
|
import it from "@mui/material/IconButton";
|
|
49
|
-
import { M as ct } from "../ManageIncome-
|
|
50
|
-
import { u as ze } from "../useWidgetLoadTimer-
|
|
51
|
-
import { W as lt } from "../
|
|
52
|
-
import { u as dt, g as ut, C as mt } from "../BudgetUtil-
|
|
53
|
-
import { M as gt } from "../MiniWidgetContainer-
|
|
49
|
+
import { M as ct } from "../ManageIncome-DWVaWpCT.mjs";
|
|
50
|
+
import { u as ze } from "../useWidgetLoadTimer-DmYEMfRw.mjs";
|
|
51
|
+
import { W as lt } from "../WidgetContainerV2-BjOelON7.mjs";
|
|
52
|
+
import { u as dt, g as ut, C as mt } from "../BudgetUtil-BCSxP3M3.mjs";
|
|
53
|
+
import { M as gt } from "../MiniWidgetContainer-BKPN3c-6.mjs";
|
|
54
54
|
import { b as we } from "../CategoryUtil-BVixr0d5.mjs";
|
|
55
|
-
const pt =
|
|
56
|
-
const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal:
|
|
55
|
+
const pt = O(() => {
|
|
56
|
+
const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal: i } = se(), c = i - n;
|
|
57
57
|
return /* @__PURE__ */ m(A, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
58
58
|
/* @__PURE__ */ m(A, { alignItems: "center", children: [
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e(
|
|
59
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(i, "0,0") }),
|
|
60
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.projected_income })
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "-" }),
|
|
63
63
|
/* @__PURE__ */ m(A, { alignItems: "center", children: [
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
/* @__PURE__ */ e(
|
|
64
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(n, "0,0") }),
|
|
65
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.budgeted })
|
|
66
66
|
] }),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "body1", children: "=" }),
|
|
68
68
|
/* @__PURE__ */ m(A, { alignItems: "center", children: [
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: D(c, "0,0") }),
|
|
70
|
+
/* @__PURE__ */ e(C, { color: "secondary", variant: "body2", children: t.remaining })
|
|
71
71
|
] })
|
|
72
72
|
] });
|
|
73
|
-
}), ht =
|
|
73
|
+
}), ht = O(
|
|
74
74
|
({ category: t }) => {
|
|
75
|
-
const { budgets: n } = E(), { budgets:
|
|
76
|
-
const a =
|
|
75
|
+
const { budgets: n } = E(), { budgets: i } = w(), c = l.useMemo(() => {
|
|
76
|
+
const a = i.find((r) => r.category_guid === t.guid), s = D(t.totalAverageAmount, "0,0"), o = a ? R(n.recalculate_previous_budget, D(a.amount, "0,0")) : n.recalculate_new_budget;
|
|
77
77
|
return `${s} - ${o}`;
|
|
78
|
-
}, [n,
|
|
78
|
+
}, [n, i]);
|
|
79
79
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
/* @__PURE__ */ e(
|
|
82
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ m(J, { children: [
|
|
81
|
+
/* @__PURE__ */ e(le, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid, variant: "filled" }) }),
|
|
82
|
+
/* @__PURE__ */ e(Q, { primary: t.name, secondary: c })
|
|
83
83
|
] }) }),
|
|
84
|
-
/* @__PURE__ */ e(
|
|
84
|
+
/* @__PURE__ */ e(ce, {})
|
|
85
85
|
] }, t.guid);
|
|
86
86
|
}
|
|
87
87
|
), bt = ({ onRecalculateBudgets: t }) => {
|
|
88
|
-
const { budgets: n, common:
|
|
88
|
+
const { budgets: n, common: i } = E(), { spendCategories: c } = K(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), g = c.filter((u) => u.totalAverageAmount > 0), d = async () => {
|
|
89
89
|
await a(g), r(!1), s(n.alert_recalculated_budgets), t?.();
|
|
90
90
|
};
|
|
91
91
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
92
92
|
/* @__PURE__ */ e($e, { onClick: () => r(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
|
|
93
|
-
/* @__PURE__ */ e(
|
|
93
|
+
/* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "subtitle1", children: n.recalculate_help }),
|
|
94
94
|
/* @__PURE__ */ e(
|
|
95
95
|
$,
|
|
96
96
|
{
|
|
97
|
-
ariaLabelClose:
|
|
97
|
+
ariaLabelClose: i.close_aria,
|
|
98
98
|
isOpen: o,
|
|
99
99
|
onClose: () => r(!1),
|
|
100
100
|
onPrimaryAction: d,
|
|
101
101
|
title: n.recalculate_title,
|
|
102
102
|
children: /* @__PURE__ */ m(A, { children: [
|
|
103
103
|
/* @__PURE__ */ m(A, { mx: 24, my: 16, children: [
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
-
/* @__PURE__ */ e(
|
|
104
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: n.recalculate_description_top }),
|
|
105
|
+
/* @__PURE__ */ e(C, { variant: "subtitle2", children: n.recalculate_description_bottom })
|
|
106
106
|
] }),
|
|
107
|
-
/* @__PURE__ */ e(
|
|
107
|
+
/* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(V, { children: g.map((u) => /* @__PURE__ */ e(ht, { category: u }, u.guid)) }) })
|
|
108
108
|
] })
|
|
109
109
|
}
|
|
110
110
|
)
|
|
111
111
|
] });
|
|
112
|
-
},
|
|
112
|
+
}, me = ({
|
|
113
113
|
amount: t,
|
|
114
114
|
categoryName: n,
|
|
115
|
-
onAmountChanged:
|
|
115
|
+
onAmountChanged: i
|
|
116
116
|
}) => {
|
|
117
|
-
const { budgets:
|
|
117
|
+
const { budgets: c } = E(), { totalBudgeted: a } = w(), { incomeTotal: s } = se(), o = s - a;
|
|
118
118
|
return /* @__PURE__ */ m(A, { gap: 16, children: [
|
|
119
119
|
/* @__PURE__ */ m(A, { children: [
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
|
|
120
|
+
/* @__PURE__ */ e(C, { children: R(
|
|
121
|
+
c.add_description_top,
|
|
122
122
|
D(o, "0,0")
|
|
123
123
|
) }),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(C, { children: R(c.add_description_bottom, n) })
|
|
125
125
|
] }),
|
|
126
126
|
/* @__PURE__ */ e(
|
|
127
127
|
Ze,
|
|
128
128
|
{
|
|
129
129
|
amount: t,
|
|
130
130
|
autoFocus: !0,
|
|
131
|
-
label:
|
|
131
|
+
label: c.add_label,
|
|
132
132
|
minAmount: 0,
|
|
133
|
-
setAmount:
|
|
133
|
+
setAmount: i,
|
|
134
134
|
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] });
|
|
138
|
-
}, ft =
|
|
139
|
-
const { budgets:
|
|
138
|
+
}, ft = O(({ category: t, onAddBudget: n }) => {
|
|
139
|
+
const { budgets: i, common: c } = E(), [a, s] = l.useState(!1), [o, r] = l.useState(
|
|
140
140
|
`${t.totalAmount === 0 ? "" : t.totalAmount}`
|
|
141
141
|
);
|
|
142
142
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
143
|
-
/* @__PURE__ */ e(
|
|
144
|
-
/* @__PURE__ */ e(
|
|
143
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ m(J, { onClick: () => s(!0), children: [
|
|
144
|
+
/* @__PURE__ */ e(le, { children: /* @__PURE__ */ e(W, { categoryGuid: t.guid }) }),
|
|
145
145
|
/* @__PURE__ */ e(
|
|
146
|
-
|
|
146
|
+
Q,
|
|
147
147
|
{
|
|
148
148
|
primary: t.name,
|
|
149
149
|
secondary: D(t.totalAmount, "0,0")
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
/* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(
|
|
152
|
+
/* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(z, { name: "add", size: 20 }) })
|
|
153
153
|
] }) }, t.guid),
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
155
|
+
U,
|
|
156
156
|
{
|
|
157
|
-
copy: { close_aria:
|
|
157
|
+
copy: { close_aria: c.close_aria, title: i.add_title },
|
|
158
158
|
disablePrimaryButton: Number(o) <= 0,
|
|
159
159
|
isOpen: a,
|
|
160
160
|
onClose: () => s(!1),
|
|
161
161
|
onPrimaryAction: () => n(t, Number(o)),
|
|
162
|
-
primaryText:
|
|
163
|
-
children: /* @__PURE__ */ e(
|
|
162
|
+
primaryText: i.add_save_button,
|
|
163
|
+
children: /* @__PURE__ */ e(me, { amount: o, categoryName: t.name, onAmountChanged: r })
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
] });
|
|
167
|
-
}), Fe =
|
|
168
|
-
const { budgets:
|
|
169
|
-
await
|
|
167
|
+
}), Fe = O(({ onAddBudget: t, onRecalculateBudgets: n }) => {
|
|
168
|
+
const { budgets: i } = E(), { addBudget: c, setAlert: a, unbudgetedCategories: s } = w(), o = async (r, g) => {
|
|
169
|
+
await c(r, g), t?.(), a(R(i.alert_budget_created, r.name));
|
|
170
170
|
};
|
|
171
171
|
return /* @__PURE__ */ m(A, { children: [
|
|
172
172
|
/* @__PURE__ */ e(pt, {}),
|
|
173
|
-
/* @__PURE__ */ e(
|
|
173
|
+
/* @__PURE__ */ e(H, { bgcolor: "background.paper", children: /* @__PURE__ */ e(V, { children: s.map((r) => /* @__PURE__ */ e(
|
|
174
174
|
ft,
|
|
175
175
|
{
|
|
176
176
|
category: r,
|
|
@@ -180,79 +180,79 @@ const pt = I(() => {
|
|
|
180
180
|
)) }) }),
|
|
181
181
|
/* @__PURE__ */ e(bt, { onRecalculateBudgets: n })
|
|
182
182
|
] });
|
|
183
|
-
}), Ie = 5, Ue = 100,
|
|
183
|
+
}), Ie = 5, Ue = 100, ae = 25, yt = (t) => {
|
|
184
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
|
-
}, c = (a) => {
|
|
187
|
-
a.subject.fx = a.x, a.subject.fy = a.y;
|
|
188
186
|
}, i = (a) => {
|
|
187
|
+
a.subject.fx = a.x, a.subject.fy = a.y;
|
|
188
|
+
}, c = (a) => {
|
|
189
189
|
a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
|
|
190
190
|
};
|
|
191
|
-
return M.drag().on("start", n).on("drag",
|
|
191
|
+
return M.drag().on("start", n).on("drag", i).on("end", c);
|
|
192
192
|
}, _t = (t) => {
|
|
193
193
|
let n = t.transaction_total / t.amount;
|
|
194
194
|
n < 0 ? n = 0 : n > 1 && (n = 1);
|
|
195
|
-
const
|
|
196
|
-
return (s) => (a.endAngle(
|
|
195
|
+
const i = n * 2 * Math.PI, c = M.interpolate(0, i), a = M.arc().cornerRadius(5).innerRadius(t.radius - Ie * 2).outerRadius(t.radius - Ie).startAngle(0).endAngle(0);
|
|
196
|
+
return (s) => (a.endAngle(c(s)), a(t) || "");
|
|
197
197
|
}, Ct = (t) => {
|
|
198
198
|
M.selectAll(".bubble").call(yt(t));
|
|
199
|
-
}, Oe = (t, n,
|
|
199
|
+
}, Oe = (t, n, i) => Math.min(Math.max(t, n), i), Bt = (t, n, i) => {
|
|
200
200
|
t.alpha(1).restart().force(
|
|
201
201
|
"x",
|
|
202
|
-
M.forceX().x(
|
|
202
|
+
M.forceX().x(i / 2).strength(0.01)
|
|
203
203
|
).force(
|
|
204
204
|
"y",
|
|
205
205
|
M.forceY().y(n / 2).strength(0.02)
|
|
206
206
|
).on("tick", () => {
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
const s = a.radius ??
|
|
210
|
-
a.x = Oe(a.x ?? 0, s,
|
|
211
|
-
}), M.selectAll(".bubble").data(
|
|
207
|
+
const c = t.nodes();
|
|
208
|
+
c.forEach((a) => {
|
|
209
|
+
const s = a.radius ?? ae;
|
|
210
|
+
a.x = Oe(a.x ?? 0, s, i - s), a.y = Oe(a.y ?? 0, s, n - s);
|
|
211
|
+
}), M.selectAll(".bubble").data(c).attr("transform", (a) => `translate(${a.x},${a.y})`);
|
|
212
212
|
});
|
|
213
|
-
}, We = (t, n) => M.scaleLinear().domain([t, n]).range([
|
|
213
|
+
}, We = (t, n) => M.scaleLinear().domain([t, n]).range([ae, Ue]), St = (t) => {
|
|
214
214
|
const n = t.reduce((s, o) => {
|
|
215
215
|
const r = Math.max(o.transaction_total, o.amount);
|
|
216
216
|
return r > s ? r : s;
|
|
217
|
-
}, 0),
|
|
217
|
+
}, 0), i = t.reduce((s, o) => {
|
|
218
218
|
const r = Math.max(o.transaction_total, o.amount);
|
|
219
219
|
return r < s ? r : s;
|
|
220
|
-
}, n),
|
|
221
|
-
const o =
|
|
220
|
+
}, n), c = We(i, n), a = t.map((s) => {
|
|
221
|
+
const o = c(Math.max(s.transaction_total, s.amount)) || 25;
|
|
222
222
|
return {
|
|
223
223
|
...s,
|
|
224
224
|
radius: o
|
|
225
225
|
};
|
|
226
226
|
});
|
|
227
227
|
return M.forceSimulation(a).velocityDecay(0.05).force("collide", M.forceCollide((s) => s.radius + 2).strength(0.7));
|
|
228
|
-
}, xt = (t, n,
|
|
229
|
-
const a = Math.PI *
|
|
230
|
-
let u =
|
|
228
|
+
}, xt = (t, n, i) => {
|
|
229
|
+
const a = Math.PI * ae ** 2 * t, s = i < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, i - o), g = Math.max(100, n - o), d = r * g;
|
|
230
|
+
let u = ae;
|
|
231
231
|
if (a < d) {
|
|
232
232
|
const p = Math.sqrt(d / (t * Math.PI)), h = Math.min(r, g) / 4;
|
|
233
233
|
u = Math.min(Ue, p, h);
|
|
234
234
|
}
|
|
235
235
|
return s && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
|
|
236
|
-
}, At = (t, n,
|
|
236
|
+
}, At = (t, n, i, c, a) => {
|
|
237
237
|
const { maxRadius: s, minRadius: o } = xt(t, n, a);
|
|
238
|
-
return M.scaleLinear().domain([
|
|
239
|
-
}, vt = (t, n,
|
|
240
|
-
const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), g =
|
|
238
|
+
return M.scaleLinear().domain([c, i]).range([o, s]);
|
|
239
|
+
}, vt = (t, n, i = !1, c, a) => {
|
|
240
|
+
const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), g = i ? At(t.length, c, r, o, a) : We(o, r);
|
|
241
241
|
return t.map((d) => ({
|
|
242
242
|
...d,
|
|
243
243
|
radius: g(Math.max(d.transaction_total, d.amount))
|
|
244
244
|
}));
|
|
245
245
|
}, Me = 5, Tt = 2e3, Dt = ({ bubble: t }) => {
|
|
246
|
-
const n =
|
|
247
|
-
amount:
|
|
248
|
-
guid:
|
|
246
|
+
const n = re(), {
|
|
247
|
+
amount: i,
|
|
248
|
+
guid: c,
|
|
249
249
|
budgetColors: { mercury: a },
|
|
250
250
|
radius: s,
|
|
251
251
|
transaction_total: o
|
|
252
|
-
} = t, r = `mercury-${
|
|
252
|
+
} = t, r = `mercury-${c}`;
|
|
253
253
|
l.useEffect(() => {
|
|
254
254
|
M.select(`.${r}`).selectAll(".status").remove(), M.select(`.${r}`).append("path").transition().duration(Tt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => _t(t));
|
|
255
|
-
}, [
|
|
255
|
+
}, [i, s, o]);
|
|
256
256
|
const g = M.arc().innerRadius((d) => d - 2 * Me).outerRadius((d) => d - Me).startAngle(0).endAngle(2 * Math.PI);
|
|
257
257
|
return /* @__PURE__ */ e("g", { className: r, children: /* @__PURE__ */ e(
|
|
258
258
|
"path",
|
|
@@ -261,10 +261,10 @@ const pt = I(() => {
|
|
|
261
261
|
style: { fill: n.palette.common.white, fillOpacity: 0.35 }
|
|
262
262
|
}
|
|
263
263
|
) });
|
|
264
|
-
}, Et = l.memo(Dt),
|
|
265
|
-
function wt({ bubble: t, isDraggable: n, onClick:
|
|
264
|
+
}, Et = l.memo(Dt), F = 75, _e = 50;
|
|
265
|
+
function wt({ bubble: t, isDraggable: n, onClick: i = () => {
|
|
266
266
|
} }) {
|
|
267
|
-
const [
|
|
267
|
+
const [c, a] = l.useState(!1), s = Ge(), { availableWidth: o } = ie(), r = l.useMemo(() => {
|
|
268
268
|
if (t)
|
|
269
269
|
return {
|
|
270
270
|
amount: t.amount,
|
|
@@ -277,48 +277,48 @@ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
|
|
|
277
277
|
if (!t) return;
|
|
278
278
|
const {
|
|
279
279
|
budgetColors: { background: g, text: d },
|
|
280
|
-
category: { icon: u, name:
|
|
280
|
+
category: { icon: u, name: B },
|
|
281
281
|
guid: p,
|
|
282
282
|
description: h,
|
|
283
|
-
radius:
|
|
284
|
-
x:
|
|
283
|
+
radius: y,
|
|
284
|
+
x: _,
|
|
285
285
|
y: x
|
|
286
286
|
} = t, v = o < 400 ? -8 : -12;
|
|
287
287
|
let b = v, S = v;
|
|
288
|
-
|
|
288
|
+
y > F ? (b = -14, S = -45) : y > _e && (S = -32);
|
|
289
289
|
let f = 32;
|
|
290
|
-
|
|
291
|
-
const T = `${t.category.name}: ${h}`,
|
|
290
|
+
y <= F && (f = o < 400 ? 16 : 24);
|
|
291
|
+
const T = `${t.category.name}: ${h}`, L = {
|
|
292
292
|
modifiers: [
|
|
293
293
|
{
|
|
294
294
|
name: "offset",
|
|
295
295
|
options: { offset: [0, 15] }
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
|
-
},
|
|
299
|
-
(
|
|
300
|
-
},
|
|
298
|
+
}, I = (G) => {
|
|
299
|
+
(G.key === "Enter" || G.key === " ") && (G.preventDefault(), i(t));
|
|
300
|
+
}, N = () => {
|
|
301
301
|
a(!0);
|
|
302
|
-
},
|
|
302
|
+
}, k = () => {
|
|
303
303
|
a(!1);
|
|
304
304
|
};
|
|
305
305
|
return /* @__PURE__ */ m(
|
|
306
306
|
"g",
|
|
307
307
|
{
|
|
308
|
-
"aria-label": `${
|
|
308
|
+
"aria-label": `${B} - ${h}`,
|
|
309
309
|
className: "bubble",
|
|
310
310
|
id: `bubble-${p}`,
|
|
311
|
-
onBlur:
|
|
312
|
-
onClick: () =>
|
|
313
|
-
onFocus:
|
|
314
|
-
onKeyDown:
|
|
311
|
+
onBlur: k,
|
|
312
|
+
onClick: () => i(t),
|
|
313
|
+
onFocus: N,
|
|
314
|
+
onKeyDown: I,
|
|
315
315
|
onMouseEnter: () => a(!0),
|
|
316
316
|
onMouseLeave: () => a(!1),
|
|
317
317
|
role: "button",
|
|
318
318
|
style: { cursor: n ? "pointer" : "default" },
|
|
319
319
|
tabIndex: 0,
|
|
320
320
|
textAnchor: "middle",
|
|
321
|
-
x:
|
|
321
|
+
x: _,
|
|
322
322
|
y: x,
|
|
323
323
|
children: [
|
|
324
324
|
/* @__PURE__ */ e("style", { children: `
|
|
@@ -333,10 +333,10 @@ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
|
|
|
333
333
|
stroke-opacity: 0.8;
|
|
334
334
|
}
|
|
335
335
|
` }),
|
|
336
|
-
/* @__PURE__ */ e(Je, { open:
|
|
337
|
-
/* @__PURE__ */ e("svg", { x: b, y: S, children: /* @__PURE__ */ e(
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
/* @__PURE__ */ e(Je, { open: c, slotProps: { popper: L }, title: T, children: /* @__PURE__ */ e("circle", { fill: g, id: `circle-${p}`, r: y }) }),
|
|
337
|
+
/* @__PURE__ */ e("svg", { x: b, y: S, children: /* @__PURE__ */ e(z, { name: u, size: f, sx: { fill: d } }) }),
|
|
338
|
+
y > F && /* @__PURE__ */ e(
|
|
339
|
+
C,
|
|
340
340
|
{
|
|
341
341
|
bold: !0,
|
|
342
342
|
component: "text",
|
|
@@ -344,23 +344,23 @@ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
|
|
|
344
344
|
sx: { fill: d },
|
|
345
345
|
variant: "body2",
|
|
346
346
|
y: 4,
|
|
347
|
-
children:
|
|
347
|
+
children: B
|
|
348
348
|
}
|
|
349
349
|
),
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
y > _e && /* @__PURE__ */ e(
|
|
351
|
+
C,
|
|
352
352
|
{
|
|
353
353
|
bold: !0,
|
|
354
354
|
component: "text",
|
|
355
355
|
id: `budget-description-${p}-1`,
|
|
356
356
|
sx: { fill: d },
|
|
357
357
|
variant: "body1",
|
|
358
|
-
y:
|
|
359
|
-
children:
|
|
358
|
+
y: y <= F ? 12 : 24,
|
|
359
|
+
children: y <= F ? h.split(" ")[0] : h
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
y <= F && y > _e && /* @__PURE__ */ e(
|
|
363
|
+
C,
|
|
364
364
|
{
|
|
365
365
|
component: "text",
|
|
366
366
|
id: `budget-description-${p}-2`,
|
|
@@ -379,17 +379,17 @@ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
|
|
|
379
379
|
const It = ({
|
|
380
380
|
height: t,
|
|
381
381
|
width: n,
|
|
382
|
-
isDraggable:
|
|
383
|
-
onClick:
|
|
382
|
+
isDraggable: i = !1,
|
|
383
|
+
onClick: c = () => {
|
|
384
384
|
}
|
|
385
385
|
}) => {
|
|
386
386
|
const [a, s] = l.useState([]), o = l.useRef(null), r = l.useRef(!1), { detailedBudgets: g } = w(), d = l.useCallback(() => {
|
|
387
|
-
const u = o.current,
|
|
387
|
+
const u = o.current, B = St(g), p = B.nodes();
|
|
388
388
|
if (u) {
|
|
389
|
-
const h = u.nodes(),
|
|
390
|
-
p.forEach((
|
|
391
|
-
const x =
|
|
392
|
-
x && Object.assign(
|
|
389
|
+
const h = u.nodes(), y = new Map(h.map((_) => [_.guid, _]));
|
|
390
|
+
p.forEach((_) => {
|
|
391
|
+
const x = y.get(_.guid);
|
|
392
|
+
x && Object.assign(_, {
|
|
393
393
|
vx: x.vx,
|
|
394
394
|
vy: x.vy,
|
|
395
395
|
x: x.x,
|
|
@@ -397,7 +397,7 @@ const It = ({
|
|
|
397
397
|
});
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
o.current =
|
|
400
|
+
o.current = B, r.current = !1, s(p);
|
|
401
401
|
}, [g]);
|
|
402
402
|
return l.useEffect(() => {
|
|
403
403
|
d();
|
|
@@ -406,29 +406,29 @@ const It = ({
|
|
|
406
406
|
}, []), l.useEffect(() => {
|
|
407
407
|
const u = o.current;
|
|
408
408
|
if (!u) return;
|
|
409
|
-
const
|
|
410
|
-
u.nodes(h), Bt(u, t, n),
|
|
409
|
+
const B = u.nodes(), p = n > 0 && n < 450 || t > 0 && t < 300, h = vt(B, g, p, t, n);
|
|
410
|
+
u.nodes(h), Bt(u, t, n), i && setTimeout(() => {
|
|
411
411
|
Ct(u);
|
|
412
412
|
}, 0), s([...h]);
|
|
413
|
-
}, [t, n,
|
|
414
|
-
}, Ot =
|
|
413
|
+
}, [t, n, i, g]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(n), children: a.map((u) => /* @__PURE__ */ e(wt, { bubble: u, isDraggable: i, onClick: c }, u.guid)) });
|
|
414
|
+
}, Ot = O(It), Mt = ({
|
|
415
415
|
isMiniWidget: t = !1,
|
|
416
416
|
onConnectAccountsClick: n,
|
|
417
|
-
createBudgetOnClick:
|
|
417
|
+
createBudgetOnClick: i
|
|
418
418
|
}) => {
|
|
419
|
-
const { config:
|
|
420
|
-
|
|
419
|
+
const { config: c } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = K(), { budgets: o } = E(), { availableWidth: r } = ie(), { isMobile: g } = de(r), d = t && g, [u, B] = l.useState(!1), [p, h] = l.useState(!1), [y, _] = l.useState(!1), x = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
|
|
420
|
+
_(!0);
|
|
421
421
|
const { data: b, isSuccess: S } = await a(x);
|
|
422
|
-
|
|
422
|
+
_(!1), S ? (b.length === 0 && h(!0), B(!1)) : B(!0);
|
|
423
423
|
};
|
|
424
|
-
return
|
|
424
|
+
return y ? /* @__PURE__ */ e(ue, {}) : u ? /* @__PURE__ */ e(
|
|
425
425
|
ye,
|
|
426
426
|
{
|
|
427
427
|
header: o.autogenerate_budgets_error_header,
|
|
428
428
|
icon: "error",
|
|
429
429
|
iconColor: "#4D4D4D",
|
|
430
430
|
onClick: (b) => {
|
|
431
|
-
b === "primary" ? v() :
|
|
431
|
+
b === "primary" ? v() : i();
|
|
432
432
|
},
|
|
433
433
|
primaryButton: o.autogenerate_budgets_error_primary_button,
|
|
434
434
|
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
@@ -449,9 +449,9 @@ const It = ({
|
|
|
449
449
|
icon: "error",
|
|
450
450
|
iconColor: "#4D4D4D",
|
|
451
451
|
onClick: (b) => {
|
|
452
|
-
b === "primary" ? n() :
|
|
452
|
+
b === "primary" ? n() : i();
|
|
453
453
|
},
|
|
454
|
-
primaryButton:
|
|
454
|
+
primaryButton: c.show_connections_widget_in_master ? o.zero_state_generate_budgets_primary_button : void 0,
|
|
455
455
|
secondaryButton: o.zero_state_generate_budgets_secondary_button,
|
|
456
456
|
subText: o.zero_state_generate_budgets_subheader,
|
|
457
457
|
sx: {
|
|
@@ -474,7 +474,7 @@ const It = ({
|
|
|
474
474
|
icon: "bubble_chart",
|
|
475
475
|
iconColor: "#1A1A1A",
|
|
476
476
|
onClick: (b) => {
|
|
477
|
-
b === "primary" ? v() :
|
|
477
|
+
b === "primary" ? v() : i();
|
|
478
478
|
},
|
|
479
479
|
primaryButton: o.empty_state_primary_button,
|
|
480
480
|
secondaryButton: t ? void 0 : o.empty_state_secondary_button,
|
|
@@ -493,44 +493,44 @@ const It = ({
|
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
) });
|
|
496
|
-
}, He =
|
|
496
|
+
}, He = O(
|
|
497
497
|
({
|
|
498
498
|
createBudgetOnClick: t = () => {
|
|
499
499
|
},
|
|
500
500
|
height: n,
|
|
501
|
-
isDraggable:
|
|
502
|
-
isMiniWidget:
|
|
501
|
+
isDraggable: i = !1,
|
|
502
|
+
isMiniWidget: c = !1,
|
|
503
503
|
shouldShowZeroState: a,
|
|
504
504
|
unavailableWidth: s = 24
|
|
505
505
|
}) => {
|
|
506
|
-
const { onEvent: o } =
|
|
507
|
-
r(v), o(
|
|
506
|
+
const { onEvent: o } = Y(), { setSelectedBudget: r } = w(), { isInitialized: g } = X(), { accounts: d } = E(), { availableWidth: u } = ie(), { isMobile: B } = de(), [p, h] = l.useState(!1), y = l.useMemo(() => u - s, [u]), _ = (v) => {
|
|
507
|
+
r(v), o(j.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
508
508
|
budget_category: v.category.name,
|
|
509
509
|
click_type: "bubble"
|
|
510
510
|
});
|
|
511
511
|
}, x = () => {
|
|
512
|
-
h(!0), o(
|
|
512
|
+
h(!0), o(j.ACCOUNTS_CLICK_CONNECT);
|
|
513
513
|
};
|
|
514
514
|
return /* @__PURE__ */ m(
|
|
515
|
-
|
|
515
|
+
H,
|
|
516
516
|
{
|
|
517
|
-
ml: a ||
|
|
518
|
-
sx: { alignSelf: "center", ...
|
|
517
|
+
ml: a || B ? 0 : 24,
|
|
518
|
+
sx: { alignSelf: "center", ...c && { height: "100%" } },
|
|
519
519
|
children: [
|
|
520
520
|
a || !g ? /* @__PURE__ */ e(
|
|
521
521
|
Mt,
|
|
522
522
|
{
|
|
523
523
|
createBudgetOnClick: t,
|
|
524
|
-
isMiniWidget:
|
|
524
|
+
isMiniWidget: c,
|
|
525
525
|
onConnectAccountsClick: x
|
|
526
526
|
}
|
|
527
527
|
) : /* @__PURE__ */ e(
|
|
528
528
|
Ot,
|
|
529
529
|
{
|
|
530
530
|
height: n,
|
|
531
|
-
isDraggable:
|
|
532
|
-
onClick:
|
|
533
|
-
width:
|
|
531
|
+
isDraggable: i,
|
|
532
|
+
onClick: _,
|
|
533
|
+
width: y
|
|
534
534
|
}
|
|
535
535
|
),
|
|
536
536
|
/* @__PURE__ */ e(
|
|
@@ -548,96 +548,96 @@ const It = ({
|
|
|
548
548
|
), Ve = ({ budget: t }) => {
|
|
549
549
|
const {
|
|
550
550
|
amount: n,
|
|
551
|
-
budgetColors: { background:
|
|
552
|
-
category: { name:
|
|
551
|
+
budgetColors: { background: i },
|
|
552
|
+
category: { name: c },
|
|
553
553
|
category_guid: a,
|
|
554
554
|
percentage: s,
|
|
555
555
|
transaction_total: o
|
|
556
556
|
} = t, r = [
|
|
557
557
|
{
|
|
558
|
-
color:
|
|
558
|
+
color: i,
|
|
559
559
|
percentage: `${s}%`
|
|
560
560
|
}
|
|
561
561
|
];
|
|
562
562
|
return /* @__PURE__ */ e(ve, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ m(A, { alignItems: "center", gap: 16, children: [
|
|
563
|
-
/* @__PURE__ */ e(
|
|
564
|
-
/* @__PURE__ */ e(
|
|
565
|
-
/* @__PURE__ */ e(
|
|
563
|
+
/* @__PURE__ */ e(W, { categoryGuid: a, size: 56 }),
|
|
564
|
+
/* @__PURE__ */ e(C, { variant: "h1", children: `${D(o, "0,0")} / ${D(n, "0,0")}` }),
|
|
565
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: c }),
|
|
566
566
|
/* @__PURE__ */ e(Be, { data: r, height: 10 })
|
|
567
567
|
] }) }) });
|
|
568
|
-
}, Rt =
|
|
568
|
+
}, Rt = O(() => {
|
|
569
569
|
const { budgets: t } = E();
|
|
570
570
|
return /* @__PURE__ */ m(A, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
571
|
-
/* @__PURE__ */ e(
|
|
572
|
-
/* @__PURE__ */ e(
|
|
573
|
-
/* @__PURE__ */ e(
|
|
571
|
+
/* @__PURE__ */ e(z, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
572
|
+
/* @__PURE__ */ e(C, { bold: !0, color: "text.secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
|
|
573
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
|
|
574
574
|
] });
|
|
575
|
-
}), Lt =
|
|
575
|
+
}), Lt = O(({ budget: t }) => {
|
|
576
576
|
const {
|
|
577
577
|
amount: n,
|
|
578
|
-
budgetColors: { background:
|
|
579
|
-
category:
|
|
578
|
+
budgetColors: { background: i },
|
|
579
|
+
category: c,
|
|
580
580
|
percentage: a,
|
|
581
581
|
transaction_total: s
|
|
582
582
|
} = t, { setSelectedSubBudget: o } = w();
|
|
583
|
-
return /* @__PURE__ */ e(
|
|
584
|
-
/* @__PURE__ */ e(
|
|
583
|
+
return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ m(J, { onClick: () => o(t), children: [
|
|
584
|
+
/* @__PURE__ */ e(le, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: i, percent: a, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: c.parent_guid, variant: "basic" }) }) }),
|
|
585
585
|
/* @__PURE__ */ e(
|
|
586
|
-
|
|
586
|
+
Q,
|
|
587
587
|
{
|
|
588
|
-
primary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(
|
|
589
|
-
secondary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(
|
|
588
|
+
primary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }) }),
|
|
589
|
+
secondary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
|
|
590
590
|
${D(s, "0,0")} /
|
|
591
591
|
${D(n, "0,0")}
|
|
592
592
|
` }) })
|
|
593
593
|
}
|
|
594
594
|
)
|
|
595
595
|
] }) });
|
|
596
|
-
}), Nt =
|
|
597
|
-
const { budgets:
|
|
596
|
+
}), Nt = O(({ category: t, parentBudget: n }) => {
|
|
597
|
+
const { budgets: i, common: c } = E(), { setExpandedGuid: a, setOnSelect: s } = at(), { addBudget: o } = w(), [r, g] = l.useState(!1), [d, u] = l.useState(!1), [B, p] = l.useState(""), [h, y] = l.useState(void 0);
|
|
598
598
|
l.useEffect(() => {
|
|
599
599
|
s((v) => {
|
|
600
600
|
const b = t.subCategories.find((S) => S.guid === v);
|
|
601
|
-
b && (
|
|
601
|
+
b && (y(b), p(`${b.currentAmount === 0 ? "" : b.currentAmount}`), u(!0));
|
|
602
602
|
});
|
|
603
603
|
}, []);
|
|
604
|
-
const
|
|
604
|
+
const _ = () => {
|
|
605
605
|
a(t.guid), g(!0);
|
|
606
606
|
}, x = async () => {
|
|
607
|
-
h && Number(
|
|
607
|
+
h && Number(B) > 0 && (await o(h, Number(B), n.guid), u(!1), g(!1), y(void 0));
|
|
608
608
|
};
|
|
609
|
-
return /* @__PURE__ */ m(
|
|
610
|
-
/* @__PURE__ */ e(
|
|
609
|
+
return /* @__PURE__ */ m(H, { children: [
|
|
610
|
+
/* @__PURE__ */ e(q, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(J, { onClick: _, children: /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ m(A, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
611
611
|
/* @__PURE__ */ m(A, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
612
|
-
/* @__PURE__ */ e(
|
|
613
|
-
/* @__PURE__ */ e(
|
|
612
|
+
/* @__PURE__ */ e(z, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
|
|
613
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: i.add_sub_budget_button })
|
|
614
614
|
] }),
|
|
615
|
-
/* @__PURE__ */ e(
|
|
615
|
+
/* @__PURE__ */ e(z, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
616
616
|
] }) }) }) }),
|
|
617
|
-
/* @__PURE__ */ e(
|
|
617
|
+
/* @__PURE__ */ e(ce, {}),
|
|
618
618
|
/* @__PURE__ */ e(
|
|
619
619
|
$,
|
|
620
620
|
{
|
|
621
|
-
ariaLabelClose:
|
|
621
|
+
ariaLabelClose: c.close_aria,
|
|
622
622
|
isOpen: r,
|
|
623
623
|
onClose: () => g(!1),
|
|
624
|
-
title:
|
|
625
|
-
children: /* @__PURE__ */ e(
|
|
624
|
+
title: i.add_sub_budget_title,
|
|
625
|
+
children: /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(rt, { category: t, subCategories: t.subCategories }) })
|
|
626
626
|
}
|
|
627
627
|
),
|
|
628
628
|
/* @__PURE__ */ e(
|
|
629
|
-
|
|
629
|
+
U,
|
|
630
630
|
{
|
|
631
|
-
copy: { close_aria:
|
|
632
|
-
disablePrimaryButton: Number(
|
|
631
|
+
copy: { close_aria: c.close_aria, title: i.add_title },
|
|
632
|
+
disablePrimaryButton: Number(B) <= 0,
|
|
633
633
|
isOpen: d,
|
|
634
634
|
onClose: () => u(!1),
|
|
635
635
|
onPrimaryAction: x,
|
|
636
|
-
primaryText:
|
|
636
|
+
primaryText: i.add_save_button,
|
|
637
637
|
children: /* @__PURE__ */ e(
|
|
638
|
-
|
|
638
|
+
me,
|
|
639
639
|
{
|
|
640
|
-
amount:
|
|
640
|
+
amount: B,
|
|
641
641
|
categoryName: h?.name || "",
|
|
642
642
|
onAmountChanged: p
|
|
643
643
|
}
|
|
@@ -645,8 +645,8 @@ const It = ({
|
|
|
645
645
|
}
|
|
646
646
|
)
|
|
647
647
|
] });
|
|
648
|
-
}), kt =
|
|
649
|
-
const { category: n, subBudgets:
|
|
648
|
+
}), kt = O(({ budget: t }) => {
|
|
649
|
+
const { category: n, subBudgets: i } = t, { budgets: c, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: g } = w(), { filter: d, setFilter: u } = Z(), [B, p] = l.useState(!1), [h, y] = l.useState(!1), [_, x] = l.useState("");
|
|
650
650
|
l.useEffect(() => {
|
|
651
651
|
o && (x(`${o.amount}`), u({
|
|
652
652
|
...d,
|
|
@@ -656,10 +656,10 @@ const It = ({
|
|
|
656
656
|
const v = async () => {
|
|
657
657
|
o && await g({
|
|
658
658
|
...o,
|
|
659
|
-
amount: Number(
|
|
659
|
+
amount: Number(_)
|
|
660
660
|
});
|
|
661
661
|
}, b = async () => {
|
|
662
|
-
o && await s(o.guid),
|
|
662
|
+
o && await s(o.guid), y(!1), S();
|
|
663
663
|
}, S = () => {
|
|
664
664
|
u({
|
|
665
665
|
...d,
|
|
@@ -667,10 +667,10 @@ const It = ({
|
|
|
667
667
|
}), r(void 0);
|
|
668
668
|
};
|
|
669
669
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
670
|
-
/* @__PURE__ */ m(
|
|
671
|
-
|
|
670
|
+
/* @__PURE__ */ m(V, { sx: { bgcolor: "background.paper" }, children: [
|
|
671
|
+
i.length === 0 ? /* @__PURE__ */ e(Rt, {}) : i.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
672
672
|
/* @__PURE__ */ e(Lt, { budget: f }),
|
|
673
|
-
/* @__PURE__ */ e(
|
|
673
|
+
/* @__PURE__ */ e(ce, {})
|
|
674
674
|
] }, f.guid)),
|
|
675
675
|
/* @__PURE__ */ e(Nt, { category: n, parentBudget: t })
|
|
676
676
|
] }),
|
|
@@ -681,10 +681,10 @@ const It = ({
|
|
|
681
681
|
isOpen: !!o,
|
|
682
682
|
onClose: S,
|
|
683
683
|
onPrimaryAction: () => p(!0),
|
|
684
|
-
onSecondaryAction: () =>
|
|
685
|
-
primaryText:
|
|
686
|
-
secondaryText:
|
|
687
|
-
title:
|
|
684
|
+
onSecondaryAction: () => y(!0),
|
|
685
|
+
primaryText: c.details_edit_button,
|
|
686
|
+
secondaryText: c.details_delete_button,
|
|
687
|
+
title: c.details_title,
|
|
688
688
|
children: o && /* @__PURE__ */ m(A, { gap: 24, children: [
|
|
689
689
|
/* @__PURE__ */ e(Ve, { budget: o }),
|
|
690
690
|
/* @__PURE__ */ e(Ae, { height: "100%" })
|
|
@@ -693,18 +693,18 @@ const It = ({
|
|
|
693
693
|
),
|
|
694
694
|
o && /* @__PURE__ */ m(l.Fragment, { children: [
|
|
695
695
|
/* @__PURE__ */ e(
|
|
696
|
-
|
|
696
|
+
U,
|
|
697
697
|
{
|
|
698
|
-
copy: { close_aria: a.close_aria, title:
|
|
699
|
-
disablePrimaryButton: Number(
|
|
700
|
-
isOpen:
|
|
698
|
+
copy: { close_aria: a.close_aria, title: c.details_edit_title },
|
|
699
|
+
disablePrimaryButton: Number(_) <= 0,
|
|
700
|
+
isOpen: B,
|
|
701
701
|
onClose: () => p(!1),
|
|
702
702
|
onPrimaryAction: v,
|
|
703
|
-
primaryText:
|
|
703
|
+
primaryText: c.edit_save_button,
|
|
704
704
|
children: /* @__PURE__ */ e(
|
|
705
|
-
|
|
705
|
+
me,
|
|
706
706
|
{
|
|
707
|
-
amount:
|
|
707
|
+
amount: _,
|
|
708
708
|
categoryName: o.category.name,
|
|
709
709
|
onAmountChanged: x
|
|
710
710
|
}
|
|
@@ -712,32 +712,32 @@ const It = ({
|
|
|
712
712
|
}
|
|
713
713
|
),
|
|
714
714
|
/* @__PURE__ */ e(
|
|
715
|
-
|
|
715
|
+
U,
|
|
716
716
|
{
|
|
717
|
-
copy: { close_aria: a.close_aria, title:
|
|
717
|
+
copy: { close_aria: a.close_aria, title: c.delete_title },
|
|
718
718
|
isOpen: h,
|
|
719
|
-
onClose: () =>
|
|
719
|
+
onClose: () => y(!1),
|
|
720
720
|
onPrimaryAction: b,
|
|
721
721
|
primaryColor: "error",
|
|
722
722
|
primaryText: "Delete",
|
|
723
723
|
secondaryColor: "secondary",
|
|
724
|
-
children: /* @__PURE__ */ e(
|
|
724
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(c.delete_description, o.category.name) })
|
|
725
725
|
}
|
|
726
726
|
)
|
|
727
727
|
] })
|
|
728
728
|
] });
|
|
729
|
-
}), $t =
|
|
730
|
-
const { is_mobile_webview: n } = Ne(), { setAlert:
|
|
729
|
+
}), $t = O(({ budget: t }) => {
|
|
730
|
+
const { is_mobile_webview: n } = Ne(), { setAlert: i } = w(), { budgets: c, common: a, transactions: s } = E(), { isDesktop: o, isSmallTablet: r, isTablet: g } = de(), {
|
|
731
731
|
sortedTransactions: d,
|
|
732
732
|
sortedTransactionsWithSplits: u,
|
|
733
|
-
tags:
|
|
734
|
-
} =
|
|
735
|
-
() => d.find((f) => f.guid ===
|
|
736
|
-
[
|
|
733
|
+
tags: B
|
|
734
|
+
} = Z(), [p, h] = l.useState(0), [y, _] = l.useState(""), x = l.useMemo(
|
|
735
|
+
() => d.find((f) => f.guid === y),
|
|
736
|
+
[y, d]
|
|
737
737
|
), v = (f, T) => {
|
|
738
738
|
h(T);
|
|
739
739
|
}, b = () => {
|
|
740
|
-
tt(u,
|
|
740
|
+
tt(u, B), i(c.alert_csv_downloaded);
|
|
741
741
|
}, S = d.length > 0 && !n && (o || g && !r);
|
|
742
742
|
return /* @__PURE__ */ m(A, { gap: 24, children: [
|
|
743
743
|
/* @__PURE__ */ e(Ve, { budget: t }),
|
|
@@ -751,8 +751,8 @@ const It = ({
|
|
|
751
751
|
value: p,
|
|
752
752
|
variant: "fullWidth",
|
|
753
753
|
children: [
|
|
754
|
-
/* @__PURE__ */ e(Ee, { label:
|
|
755
|
-
/* @__PURE__ */ e(Ee, { label:
|
|
754
|
+
/* @__PURE__ */ e(Ee, { label: c.details_transactions_tab }),
|
|
755
|
+
/* @__PURE__ */ e(Ee, { label: c.details_subbudgets_tab })
|
|
756
756
|
]
|
|
757
757
|
}
|
|
758
758
|
),
|
|
@@ -761,12 +761,12 @@ const It = ({
|
|
|
761
761
|
$e,
|
|
762
762
|
{
|
|
763
763
|
onClick: b,
|
|
764
|
-
startIcon: /* @__PURE__ */ e(
|
|
764
|
+
startIcon: /* @__PURE__ */ e(z, { name: "ios_share" }),
|
|
765
765
|
variant: "text",
|
|
766
766
|
children: s.export_csv_btn
|
|
767
767
|
}
|
|
768
768
|
) }),
|
|
769
|
-
/* @__PURE__ */ e(Ae, { height: "100%", onClick:
|
|
769
|
+
/* @__PURE__ */ e(Ae, { height: "100%", onClick: _ })
|
|
770
770
|
] }),
|
|
771
771
|
p === 1 && /* @__PURE__ */ e(kt, { budget: t }),
|
|
772
772
|
/* @__PURE__ */ e(
|
|
@@ -774,16 +774,16 @@ const It = ({
|
|
|
774
774
|
{
|
|
775
775
|
ariaLabelClose: a.close_aria,
|
|
776
776
|
isOpen: !!x,
|
|
777
|
-
onClose: () =>
|
|
778
|
-
title:
|
|
777
|
+
onClose: () => _(""),
|
|
778
|
+
title: c.details_transaction_drawer,
|
|
779
779
|
children: x && /* @__PURE__ */ e(ot, { transaction: x })
|
|
780
780
|
}
|
|
781
781
|
)
|
|
782
782
|
] })
|
|
783
783
|
] });
|
|
784
|
-
}), Gt =
|
|
785
|
-
const { selectedAccountGuids: t } =
|
|
786
|
-
alert:
|
|
784
|
+
}), Gt = O(() => {
|
|
785
|
+
const { selectedAccountGuids: t } = X(), { budgets: n, common: i } = E(), {
|
|
786
|
+
alert: c,
|
|
787
787
|
dateRange: a,
|
|
788
788
|
deleteBudget: s,
|
|
789
789
|
selectedBudget: o,
|
|
@@ -791,12 +791,12 @@ const It = ({
|
|
|
791
791
|
setAlert: g,
|
|
792
792
|
setSelectedBudget: d,
|
|
793
793
|
updateBudget: u
|
|
794
|
-
} = w(), { setFilter:
|
|
794
|
+
} = w(), { setFilter: B } = Z(), [p, h] = l.useState(!1), [y, _] = l.useState(!1), [x, v] = l.useState(!1), [b, S] = l.useState("");
|
|
795
795
|
l.useEffect(() => {
|
|
796
|
-
o && !r && (S(`${o.amount}`), h(!0),
|
|
796
|
+
o && !r && (S(`${o.amount}`), h(!0), B({
|
|
797
797
|
accounts: t,
|
|
798
798
|
dateRange: a,
|
|
799
|
-
custom: (
|
|
799
|
+
custom: (N) => N.category_guid === o.category_guid || N.top_level_category_guid === o.category_guid,
|
|
800
800
|
showSplits: !0
|
|
801
801
|
}));
|
|
802
802
|
}, [o]);
|
|
@@ -805,25 +805,25 @@ const It = ({
|
|
|
805
805
|
...o,
|
|
806
806
|
amount: Number(b),
|
|
807
807
|
percentage: o.category.totalAmount / Number(b) * 100
|
|
808
|
-
}),
|
|
808
|
+
}), _(!1), g(R(n.alert_budget_updated, o.category.name)));
|
|
809
809
|
}, T = async () => {
|
|
810
|
-
o && (await s(o.guid), g(
|
|
811
|
-
},
|
|
810
|
+
o && (await s(o.guid), g(R(n.alert_budget_deleted, o.category.name))), L();
|
|
811
|
+
}, L = () => {
|
|
812
812
|
h(!1), setTimeout(() => {
|
|
813
813
|
d(void 0);
|
|
814
814
|
}, 250);
|
|
815
|
-
},
|
|
816
|
-
|
|
815
|
+
}, I = () => {
|
|
816
|
+
_(!1), S(`${o?.amount}`);
|
|
817
817
|
};
|
|
818
818
|
if (o)
|
|
819
819
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
820
820
|
/* @__PURE__ */ m(
|
|
821
821
|
$,
|
|
822
822
|
{
|
|
823
|
-
ariaLabelClose:
|
|
823
|
+
ariaLabelClose: i.close_aria,
|
|
824
824
|
isOpen: p,
|
|
825
|
-
onClose:
|
|
826
|
-
onPrimaryAction: () =>
|
|
825
|
+
onClose: L,
|
|
826
|
+
onPrimaryAction: () => _(!0),
|
|
827
827
|
onSecondaryAction: () => v(!0),
|
|
828
828
|
primaryText: n.details_edit_button,
|
|
829
829
|
secondaryColor: "error",
|
|
@@ -837,25 +837,25 @@ const It = ({
|
|
|
837
837
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
838
838
|
autoHideDuration: 3500,
|
|
839
839
|
onClose: () => g(""),
|
|
840
|
-
open: !!
|
|
841
|
-
children: /* @__PURE__ */ e(Se, { closeText: "", onClose: () => g(""), severity: "success", variant: "filled", children:
|
|
840
|
+
open: !!c,
|
|
841
|
+
children: /* @__PURE__ */ e(Se, { closeText: "", onClose: () => g(""), severity: "success", variant: "filled", children: c })
|
|
842
842
|
}
|
|
843
843
|
)
|
|
844
844
|
]
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
847
|
/* @__PURE__ */ e(
|
|
848
|
-
|
|
848
|
+
U,
|
|
849
849
|
{
|
|
850
|
-
copy: { close_aria:
|
|
850
|
+
copy: { close_aria: i.close_aria, title: n.details_edit_title },
|
|
851
851
|
disablePrimaryButton: Number(b) <= 0,
|
|
852
|
-
isOpen:
|
|
853
|
-
onClose:
|
|
852
|
+
isOpen: y,
|
|
853
|
+
onClose: I,
|
|
854
854
|
onPrimaryAction: f,
|
|
855
|
-
onSecondaryAction:
|
|
855
|
+
onSecondaryAction: I,
|
|
856
856
|
primaryText: n.edit_save_button,
|
|
857
857
|
children: /* @__PURE__ */ e(
|
|
858
|
-
|
|
858
|
+
me,
|
|
859
859
|
{
|
|
860
860
|
amount: b,
|
|
861
861
|
categoryName: o.category.name,
|
|
@@ -865,45 +865,45 @@ const It = ({
|
|
|
865
865
|
}
|
|
866
866
|
),
|
|
867
867
|
/* @__PURE__ */ e(
|
|
868
|
-
|
|
868
|
+
U,
|
|
869
869
|
{
|
|
870
|
-
copy: { close_aria:
|
|
870
|
+
copy: { close_aria: i.close_aria, title: n.delete_title },
|
|
871
871
|
isOpen: x,
|
|
872
872
|
onClose: () => v(!1),
|
|
873
873
|
onPrimaryAction: T,
|
|
874
874
|
primaryColor: "error",
|
|
875
875
|
primaryText: n.details_delete_button,
|
|
876
876
|
secondaryColor: "secondary",
|
|
877
|
-
children: /* @__PURE__ */ e(
|
|
877
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: R(n.delete_description, o.category.name) })
|
|
878
878
|
}
|
|
879
879
|
)
|
|
880
880
|
] });
|
|
881
881
|
}), Pt = ({ budget: t, onClick: n }) => {
|
|
882
882
|
const {
|
|
883
|
-
amount:
|
|
884
|
-
budgetColors: { background:
|
|
883
|
+
amount: i,
|
|
884
|
+
budgetColors: { background: c, description: a },
|
|
885
885
|
category_guid: s,
|
|
886
886
|
description: o,
|
|
887
887
|
percentage: r,
|
|
888
888
|
subBudgets: g,
|
|
889
889
|
transaction_total: d
|
|
890
890
|
} = t, u = r > 100;
|
|
891
|
-
return /* @__PURE__ */ e(
|
|
892
|
-
/* @__PURE__ */ e(
|
|
891
|
+
return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ m(J, { onClick: () => n?.(t), children: [
|
|
892
|
+
/* @__PURE__ */ e(le, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: c, percent: r, size: 40, children: /* @__PURE__ */ e(W, { categoryGuid: s, variant: "basic" }) }) }),
|
|
893
893
|
/* @__PURE__ */ e(
|
|
894
|
-
|
|
894
|
+
Q,
|
|
895
895
|
{
|
|
896
896
|
primary: /* @__PURE__ */ m(A, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
897
|
-
/* @__PURE__ */ e(
|
|
898
|
-
/* @__PURE__ */ e(
|
|
897
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.category.name }),
|
|
898
|
+
/* @__PURE__ */ e(C, { fontWeight: 400, variant: "body1", children: `
|
|
899
899
|
${D(d, "0,0")} /
|
|
900
|
-
${D(
|
|
900
|
+
${D(i, "0,0")}
|
|
901
901
|
` })
|
|
902
902
|
] }),
|
|
903
903
|
secondary: /* @__PURE__ */ m(A, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
904
|
-
/* @__PURE__ */ e(
|
|
904
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: `${g.length} Sub-budgets` }),
|
|
905
905
|
/* @__PURE__ */ e(
|
|
906
|
-
|
|
906
|
+
C,
|
|
907
907
|
{
|
|
908
908
|
bold: u,
|
|
909
909
|
sx: {
|
|
@@ -922,37 +922,37 @@ const It = ({
|
|
|
922
922
|
}
|
|
923
923
|
)
|
|
924
924
|
] }) });
|
|
925
|
-
}, jt =
|
|
926
|
-
const { onEvent: t } =
|
|
927
|
-
|
|
925
|
+
}, jt = O(() => {
|
|
926
|
+
const { onEvent: t } = Y(), { budgets: n } = E(), { detailedBudgets: i, setSelectedBudget: c } = w(), a = (s) => {
|
|
927
|
+
c(s), t(j.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
928
928
|
budget_category: s.category.name,
|
|
929
929
|
click_type: "list"
|
|
930
930
|
});
|
|
931
931
|
};
|
|
932
932
|
return /* @__PURE__ */ m(ve, { elevation: 2, children: [
|
|
933
933
|
/* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
|
|
934
|
-
/* @__PURE__ */ e(Te, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(
|
|
934
|
+
/* @__PURE__ */ e(Te, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(V, { children: i.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
|
|
935
935
|
/* @__PURE__ */ e(Pt, { budget: s, onClick: a }),
|
|
936
|
-
/* @__PURE__ */ e(
|
|
936
|
+
/* @__PURE__ */ e(ce, {})
|
|
937
937
|
] }, s.guid)) }) })
|
|
938
938
|
] });
|
|
939
|
-
}), zt =
|
|
940
|
-
const t =
|
|
941
|
-
const S = r.reduce((
|
|
939
|
+
}), zt = O(() => {
|
|
940
|
+
const t = re(), { onEvent: n } = Y(), { visibleAccounts: i } = ke(), { budgets: c, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = K(), { detailedBudgets: g, totalBudgeted: d } = w(), { incomeTotal: u } = se(), { setFilter: B } = Z(), [p, h] = l.useState(!1), [y, _] = l.useMemo(() => {
|
|
941
|
+
const S = r.reduce((I, N) => I + N.totalAmount, 0);
|
|
942
942
|
let f = S / d;
|
|
943
943
|
f > 1 && (f = 1);
|
|
944
944
|
let T = t.palette.success.main;
|
|
945
945
|
f > 0.8 && f < 1 ? T = t.palette.warning.main : f >= 1 && (T = t.palette.error.main);
|
|
946
|
-
const
|
|
946
|
+
const L = [
|
|
947
947
|
{
|
|
948
948
|
color: T,
|
|
949
949
|
percentage: `${f}`
|
|
950
950
|
}
|
|
951
951
|
];
|
|
952
|
-
return [S,
|
|
952
|
+
return [S, L];
|
|
953
953
|
}, [g, r]), [x, v] = l.useMemo(() => {
|
|
954
954
|
const S = Math.abs(
|
|
955
|
-
o.reduce((
|
|
955
|
+
o.reduce((L, I) => L + I.totalAmount, 0)
|
|
956
956
|
);
|
|
957
957
|
let f = S / u;
|
|
958
958
|
f > 1 && (f = 1);
|
|
@@ -964,42 +964,42 @@ const It = ({
|
|
|
964
964
|
];
|
|
965
965
|
return [S, T];
|
|
966
966
|
}, [o, u]), b = () => {
|
|
967
|
-
|
|
968
|
-
accounts:
|
|
967
|
+
B({
|
|
968
|
+
accounts: i.map((S) => S.guid),
|
|
969
969
|
dateRange: {
|
|
970
970
|
start: st(/* @__PURE__ */ new Date(), 90),
|
|
971
971
|
end: /* @__PURE__ */ new Date()
|
|
972
972
|
}
|
|
973
|
-
}), h(!0), n(
|
|
973
|
+
}), h(!0), n(j.BUDGETS_CLICK_EDIT_INCOME);
|
|
974
974
|
};
|
|
975
975
|
return /* @__PURE__ */ m(ve, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
976
|
-
/* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children:
|
|
976
|
+
/* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: c.overview_title }) }),
|
|
977
977
|
/* @__PURE__ */ e(Te, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(A, { gap: 24, children: [
|
|
978
978
|
/* @__PURE__ */ m(A, { gap: 8, children: [
|
|
979
|
-
/* @__PURE__ */ e(
|
|
980
|
-
/* @__PURE__ */ e(Be, { data:
|
|
981
|
-
/* @__PURE__ */ e(
|
|
982
|
-
|
|
983
|
-
D(
|
|
979
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 8 }, variant: "body1", children: c.spending_title }),
|
|
980
|
+
/* @__PURE__ */ e(Be, { data: _, height: 16 }),
|
|
981
|
+
/* @__PURE__ */ e(C, { variant: "body2", children: R(
|
|
982
|
+
c.spending_description,
|
|
983
|
+
D(y, "0,0"),
|
|
984
984
|
D(d, "0,0")
|
|
985
985
|
) })
|
|
986
986
|
] }),
|
|
987
987
|
/* @__PURE__ */ m(A, { gap: 8, children: [
|
|
988
988
|
/* @__PURE__ */ m(A, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
989
|
-
/* @__PURE__ */ e(
|
|
989
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: c.income_title }),
|
|
990
990
|
/* @__PURE__ */ e(
|
|
991
991
|
it,
|
|
992
992
|
{
|
|
993
993
|
"aria-label": s.manage_income,
|
|
994
994
|
onClick: b,
|
|
995
995
|
sx: { p: 0 },
|
|
996
|
-
children: /* @__PURE__ */ e(
|
|
996
|
+
children: /* @__PURE__ */ e(z, { color: "primary", name: "edit" })
|
|
997
997
|
}
|
|
998
998
|
)
|
|
999
999
|
] }),
|
|
1000
1000
|
/* @__PURE__ */ e(Be, { data: v, height: 16 }),
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1002
|
-
|
|
1001
|
+
/* @__PURE__ */ e(C, { variant: "body2", children: R(
|
|
1002
|
+
c.income_description,
|
|
1003
1003
|
D(x, "0,0"),
|
|
1004
1004
|
D(u, "0,0")
|
|
1005
1005
|
) })
|
|
@@ -1016,85 +1016,84 @@ const It = ({
|
|
|
1016
1016
|
}
|
|
1017
1017
|
)
|
|
1018
1018
|
] });
|
|
1019
|
-
}), Re = 480, Ho =
|
|
1020
|
-
const
|
|
1021
|
-
alert:
|
|
1022
|
-
dateRange:
|
|
1023
|
-
isDataLoaded:
|
|
1024
|
-
loadBudgetData:
|
|
1025
|
-
setDateRange:
|
|
1026
|
-
setAlert:
|
|
1027
|
-
setTheme:
|
|
1028
|
-
detailedBudgets:
|
|
1029
|
-
} = w(), { setDateRange:
|
|
1019
|
+
}), Re = 480, Ho = O(({ onBackClick: t }) => {
|
|
1020
|
+
const n = re(), { onEvent: i } = Y(), { visibleAccounts: c } = ke(), { budgets: a, common: s } = E(), { isInitialized: o, selectedAccounts: r, setDisplayedDate: g } = X(), {
|
|
1021
|
+
alert: d,
|
|
1022
|
+
dateRange: u,
|
|
1023
|
+
isDataLoaded: B,
|
|
1024
|
+
loadBudgetData: p,
|
|
1025
|
+
setDateRange: h,
|
|
1026
|
+
setAlert: y,
|
|
1027
|
+
setTheme: _,
|
|
1028
|
+
detailedBudgets: x
|
|
1029
|
+
} = w(), { setDateRange: v } = se(), { loadDateRangeCategoryTotals: b, loadMonthlyCategoryTotals: S } = K(), { isSmallTablet: f, isMobile: T, isSmallMobile: L } = de(), I = f || T || L, [N, k] = l.useState(!1);
|
|
1030
1030
|
ze({
|
|
1031
1031
|
widgetName: "BubbleBudgetsWidget",
|
|
1032
|
-
isLoaded:
|
|
1032
|
+
isLoaded: B
|
|
1033
1033
|
}), l.useEffect(() => {
|
|
1034
|
-
|
|
1035
|
-
i(
|
|
1034
|
+
_(n), B || p().finally(() => {
|
|
1035
|
+
i(j.BUDGETS_VIEW);
|
|
1036
1036
|
});
|
|
1037
|
-
}, []), l.useEffect(() => (
|
|
1038
|
-
|
|
1039
|
-
}), [
|
|
1040
|
-
|
|
1041
|
-
}, [
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1044
|
-
},
|
|
1045
|
-
i(
|
|
1046
|
-
},
|
|
1047
|
-
k(!0), i(
|
|
1048
|
-
},
|
|
1037
|
+
}, []), l.useEffect(() => (h({ start: ne(te()), end: Ce(te()) }), () => {
|
|
1038
|
+
h({ start: ne(te()), end: Ce(te()) });
|
|
1039
|
+
}), [c]), l.useEffect(() => {
|
|
1040
|
+
o && (g(u.start, u.end), b(r, u.start, u.end).finally(), S(r).finally(), v(u));
|
|
1041
|
+
}, [o, r, u]);
|
|
1042
|
+
const G = (P) => {
|
|
1043
|
+
h({ start: P[0] || /* @__PURE__ */ new Date(), end: P[1] || /* @__PURE__ */ new Date() });
|
|
1044
|
+
}, ge = () => {
|
|
1045
|
+
i(j.BUDGETS_CLICK_FILTER);
|
|
1046
|
+
}, ee = () => {
|
|
1047
|
+
k(!0), i(j.BUDGETS_CLICK_ADD);
|
|
1048
|
+
}, pe = () => {
|
|
1049
1049
|
k(!1);
|
|
1050
|
-
},
|
|
1050
|
+
}, he = () => {
|
|
1051
1051
|
k(!1);
|
|
1052
|
-
},
|
|
1053
|
-
return !
|
|
1052
|
+
}, be = Ye(u.end, ne(/* @__PURE__ */ new Date()));
|
|
1053
|
+
return !o || !B ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ m(
|
|
1054
1054
|
lt,
|
|
1055
1055
|
{
|
|
1056
1056
|
actions: [
|
|
1057
1057
|
{
|
|
1058
1058
|
iconName: "add",
|
|
1059
|
-
label:
|
|
1060
|
-
onClick:
|
|
1059
|
+
label: a.add_title,
|
|
1060
|
+
onClick: ee
|
|
1061
1061
|
}
|
|
1062
1062
|
],
|
|
1063
1063
|
calendarActions: {
|
|
1064
|
-
onRangeChanged:
|
|
1065
|
-
shouldDisableNext:
|
|
1064
|
+
onRangeChanged: G,
|
|
1065
|
+
shouldDisableNext: be,
|
|
1066
1066
|
shouldDisablePicker: !0
|
|
1067
1067
|
},
|
|
1068
|
-
onAccountsFilterClick:
|
|
1068
|
+
onAccountsFilterClick: ge,
|
|
1069
1069
|
onBackClick: t,
|
|
1070
|
-
|
|
1071
|
-
title: s.budgets_title,
|
|
1070
|
+
title: a.budgets_title,
|
|
1072
1071
|
children: [
|
|
1073
1072
|
/* @__PURE__ */ m(
|
|
1074
1073
|
A,
|
|
1075
1074
|
{
|
|
1076
|
-
direction:
|
|
1075
|
+
direction: I ? "column" : "row",
|
|
1077
1076
|
height: "100%",
|
|
1078
1077
|
sx: { justifyContent: "center" },
|
|
1079
1078
|
width: "100%",
|
|
1080
1079
|
children: [
|
|
1081
|
-
/* @__PURE__ */ e(A, { height:
|
|
1080
|
+
/* @__PURE__ */ e(A, { height: I ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1082
1081
|
He,
|
|
1083
1082
|
{
|
|
1084
|
-
createBudgetOnClick:
|
|
1085
|
-
height:
|
|
1083
|
+
createBudgetOnClick: ee,
|
|
1084
|
+
height: I ? 450 : 800,
|
|
1086
1085
|
isDraggable: !0,
|
|
1087
|
-
shouldShowZeroState:
|
|
1088
|
-
unavailableWidth:
|
|
1086
|
+
shouldShowZeroState: x.length === 0,
|
|
1087
|
+
unavailableWidth: I ? 0 : Re
|
|
1089
1088
|
}
|
|
1090
1089
|
) }),
|
|
1091
|
-
|
|
1090
|
+
x.length !== 0 && /* @__PURE__ */ m(
|
|
1092
1091
|
A,
|
|
1093
1092
|
{
|
|
1094
1093
|
gap: 24,
|
|
1095
1094
|
height: "100%",
|
|
1096
1095
|
sx: { mr: 24, mt: 48 },
|
|
1097
|
-
width:
|
|
1096
|
+
width: I ? "100%" : Re,
|
|
1098
1097
|
children: [
|
|
1099
1098
|
/* @__PURE__ */ e(zt, {}),
|
|
1100
1099
|
/* @__PURE__ */ e(jt, {})
|
|
@@ -1108,15 +1107,15 @@ const It = ({
|
|
|
1108
1107
|
/* @__PURE__ */ e(
|
|
1109
1108
|
$,
|
|
1110
1109
|
{
|
|
1111
|
-
ariaLabelClose:
|
|
1112
|
-
isOpen:
|
|
1110
|
+
ariaLabelClose: s.close_aria,
|
|
1111
|
+
isOpen: N,
|
|
1113
1112
|
onClose: () => k(!1),
|
|
1114
|
-
title:
|
|
1113
|
+
title: a.add_new_title,
|
|
1115
1114
|
children: /* @__PURE__ */ e(
|
|
1116
1115
|
Fe,
|
|
1117
1116
|
{
|
|
1118
|
-
onAddBudget:
|
|
1119
|
-
onRecalculateBudgets:
|
|
1117
|
+
onAddBudget: pe,
|
|
1118
|
+
onRecalculateBudgets: he
|
|
1120
1119
|
}
|
|
1121
1120
|
)
|
|
1122
1121
|
}
|
|
@@ -1127,19 +1126,19 @@ const It = ({
|
|
|
1127
1126
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1128
1127
|
autoHideDuration: 3500,
|
|
1129
1128
|
onClose: () => {
|
|
1130
|
-
|
|
1129
|
+
y("");
|
|
1131
1130
|
},
|
|
1132
|
-
open: !!
|
|
1131
|
+
open: !!d,
|
|
1133
1132
|
children: /* @__PURE__ */ e(
|
|
1134
1133
|
Se,
|
|
1135
1134
|
{
|
|
1136
1135
|
closeText: "",
|
|
1137
1136
|
onClose: () => {
|
|
1138
|
-
|
|
1137
|
+
y("");
|
|
1139
1138
|
},
|
|
1140
1139
|
severity: "success",
|
|
1141
1140
|
variant: "filled",
|
|
1142
|
-
children:
|
|
1141
|
+
children: d
|
|
1143
1142
|
}
|
|
1144
1143
|
)
|
|
1145
1144
|
}
|
|
@@ -1150,10 +1149,10 @@ const It = ({
|
|
|
1150
1149
|
}), Ft = ({
|
|
1151
1150
|
budgetsCopy: t,
|
|
1152
1151
|
difference: n,
|
|
1153
|
-
handleAddClick:
|
|
1154
|
-
shouldShowZeroState:
|
|
1152
|
+
handleAddClick: i,
|
|
1153
|
+
shouldShowZeroState: c
|
|
1155
1154
|
}) => {
|
|
1156
|
-
const { availableHeight: a = 0 } =
|
|
1155
|
+
const { availableHeight: a = 0 } = ie(), s = l.useRef(null);
|
|
1157
1156
|
l.useEffect(() => {
|
|
1158
1157
|
a > 0 && s.current === null && (s.current = a);
|
|
1159
1158
|
}, [a]);
|
|
@@ -1165,40 +1164,40 @@ const It = ({
|
|
|
1165
1164
|
/* @__PURE__ */ e(
|
|
1166
1165
|
He,
|
|
1167
1166
|
{
|
|
1168
|
-
createBudgetOnClick:
|
|
1167
|
+
createBudgetOnClick: i,
|
|
1169
1168
|
height: o,
|
|
1170
1169
|
isMiniWidget: !0,
|
|
1171
|
-
shouldShowZeroState:
|
|
1170
|
+
shouldShowZeroState: c
|
|
1172
1171
|
}
|
|
1173
1172
|
),
|
|
1174
|
-
!
|
|
1175
|
-
/* @__PURE__ */ e(
|
|
1176
|
-
/* @__PURE__ */ e(
|
|
1173
|
+
!c && /* @__PURE__ */ m(H, { ml: 16, children: [
|
|
1174
|
+
/* @__PURE__ */ e(C, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: D(Math.abs(n), "0,0") }),
|
|
1175
|
+
/* @__PURE__ */ e(C, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
|
|
1177
1176
|
] })
|
|
1178
1177
|
] });
|
|
1179
1178
|
}, Ut = (t) => {
|
|
1180
|
-
const n =
|
|
1179
|
+
const n = re(), { onEvent: i } = Y(), { detailedBudgets: c, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: g } = E(), { isInitialized: d, selectedAccounts: u } = X(), { loadDateRangeCategoryTotals: B, loadMonthlyCategoryTotals: p } = K(), h = dt(), [y, _] = l.useState(!1);
|
|
1181
1180
|
l.useEffect(() => {
|
|
1182
1181
|
a || s().finally();
|
|
1183
1182
|
}, []), l.useEffect(() => {
|
|
1184
1183
|
o(n);
|
|
1185
1184
|
}, [n]), l.useEffect(() => {
|
|
1186
|
-
d && !a && (
|
|
1185
|
+
d && !a && (B(
|
|
1187
1186
|
u,
|
|
1188
|
-
|
|
1187
|
+
ne(/* @__PURE__ */ new Date()),
|
|
1189
1188
|
Ce(/* @__PURE__ */ new Date())
|
|
1190
1189
|
).finally(), p(u).finally());
|
|
1191
1190
|
}, [d, u, a]);
|
|
1192
1191
|
const x = () => {
|
|
1193
|
-
|
|
1192
|
+
_(!0), i(j.BUDGETS_CLICK_ADD);
|
|
1194
1193
|
}, v = () => {
|
|
1195
|
-
|
|
1196
|
-
}, b = () =>
|
|
1194
|
+
_(!1);
|
|
1195
|
+
}, b = () => _(!1);
|
|
1197
1196
|
if (ze({
|
|
1198
1197
|
widgetName: "BubbleBudgetsMiniWidget",
|
|
1199
1198
|
isLoaded: a
|
|
1200
|
-
}), !d || !a) return /* @__PURE__ */ e(
|
|
1201
|
-
const S =
|
|
1199
|
+
}), !d || !a) return /* @__PURE__ */ e(ue, {});
|
|
1200
|
+
const S = c.length === 0;
|
|
1202
1201
|
return /* @__PURE__ */ m(
|
|
1203
1202
|
gt,
|
|
1204
1203
|
{
|
|
@@ -1222,8 +1221,8 @@ const It = ({
|
|
|
1222
1221
|
$,
|
|
1223
1222
|
{
|
|
1224
1223
|
ariaLabelClose: g.close_aria,
|
|
1225
|
-
isOpen:
|
|
1226
|
-
onClose: () =>
|
|
1224
|
+
isOpen: y,
|
|
1225
|
+
onClose: () => _(!1),
|
|
1227
1226
|
title: r.add_new_title,
|
|
1228
1227
|
children: /* @__PURE__ */ e(
|
|
1229
1228
|
Fe,
|
|
@@ -1237,7 +1236,7 @@ const It = ({
|
|
|
1237
1236
|
]
|
|
1238
1237
|
}
|
|
1239
1238
|
);
|
|
1240
|
-
}, Vo =
|
|
1239
|
+
}, Vo = O(Ut), oe = {
|
|
1241
1240
|
CANCEL_DELETE: "Cancel - Delete",
|
|
1242
1241
|
END_SAVE: "End - Save",
|
|
1243
1242
|
END_DELETE: "End - Delete",
|
|
@@ -1245,8 +1244,8 @@ const It = ({
|
|
|
1245
1244
|
}, Wt = ({
|
|
1246
1245
|
onClose: t,
|
|
1247
1246
|
onEvent: n,
|
|
1248
|
-
onViewHistory:
|
|
1249
|
-
transactionListProps:
|
|
1247
|
+
onViewHistory: i,
|
|
1248
|
+
transactionListProps: c
|
|
1250
1249
|
}) => {
|
|
1251
1250
|
const {
|
|
1252
1251
|
alert: a,
|
|
@@ -1256,41 +1255,41 @@ const It = ({
|
|
|
1256
1255
|
selectedSubBudget: g,
|
|
1257
1256
|
setAlert: d,
|
|
1258
1257
|
setSelectedBudget: u,
|
|
1259
|
-
updateBudget:
|
|
1260
|
-
} = w(), { budgets: p, common: h } = E(), { isCopyLoaded:
|
|
1258
|
+
updateBudget: B
|
|
1259
|
+
} = w(), { budgets: p, common: h } = E(), { isCopyLoaded: y, selectedAccountGuids: _ } = X(), x = Ge(), { setFilter: v } = Z(), [b, S] = l.useState(""), [f, T] = l.useState(null), [L, I] = l.useState(!1), N = l.useRef(!1);
|
|
1261
1260
|
if (l.useEffect(() => {
|
|
1262
1261
|
!r || g || (S(`${r.amount}`), v({
|
|
1263
|
-
accounts:
|
|
1262
|
+
accounts: _,
|
|
1264
1263
|
dateRange: s,
|
|
1265
|
-
custom: ({ category_guid: P, top_level_category_guid:
|
|
1264
|
+
custom: ({ category_guid: P, top_level_category_guid: fe }) => {
|
|
1266
1265
|
const { category_guid: De } = r;
|
|
1267
|
-
return P === De ||
|
|
1266
|
+
return P === De || fe === De;
|
|
1268
1267
|
},
|
|
1269
1268
|
showSplits: !0
|
|
1270
|
-
}),
|
|
1271
|
-
}, [r]), !
|
|
1269
|
+
}), I(!0));
|
|
1270
|
+
}, [r]), !y) return /* @__PURE__ */ e(ue, {});
|
|
1272
1271
|
if (!r) return null;
|
|
1273
|
-
const
|
|
1274
|
-
S(""), T(null),
|
|
1272
|
+
const k = () => {
|
|
1273
|
+
S(""), T(null), I(!1), setTimeout(() => {
|
|
1275
1274
|
u(void 0), t?.();
|
|
1276
1275
|
}, 250);
|
|
1277
|
-
},
|
|
1278
|
-
f === "delete" && n?.(
|
|
1279
|
-
},
|
|
1276
|
+
}, G = () => {
|
|
1277
|
+
f === "delete" && n?.(oe.CANCEL_DELETE, b), S(r.amount ? `${r.amount}` : ""), T(null);
|
|
1278
|
+
}, ge = async () => {
|
|
1280
1279
|
if (f === "edit") {
|
|
1281
|
-
if (
|
|
1282
|
-
|
|
1280
|
+
if (N.current) return;
|
|
1281
|
+
N.current = !0, await B({
|
|
1283
1282
|
...r,
|
|
1284
1283
|
amount: Number(b)
|
|
1285
|
-
}), n?.(
|
|
1286
|
-
|
|
1287
|
-
), T(null),
|
|
1284
|
+
}), n?.(oe.END_SAVE, b), d(
|
|
1285
|
+
R(p.alert_budget_updated, r.category.name)
|
|
1286
|
+
), T(null), N.current = !1;
|
|
1288
1287
|
}
|
|
1289
|
-
f === "delete" && (await o(r.guid), n?.(
|
|
1290
|
-
}, { remainingAmount:
|
|
1288
|
+
f === "delete" && (await o(r.guid), n?.(oe.END_DELETE, b), k());
|
|
1289
|
+
}, { remainingAmount: ee, spentPercentage: pe, iconColor: he } = ut(
|
|
1291
1290
|
r.transaction_total ?? 0,
|
|
1292
1291
|
r.amount ?? 0
|
|
1293
|
-
),
|
|
1292
|
+
), be = (P, fe) => R(P, /* @__PURE__ */ e("b", { children: fe }));
|
|
1294
1293
|
return /* @__PURE__ */ m(l.Fragment, { children: [
|
|
1295
1294
|
/* @__PURE__ */ m(
|
|
1296
1295
|
$,
|
|
@@ -1300,14 +1299,14 @@ const It = ({
|
|
|
1300
1299
|
px: 24,
|
|
1301
1300
|
py: 16
|
|
1302
1301
|
},
|
|
1303
|
-
isOpen:
|
|
1304
|
-
onClose:
|
|
1302
|
+
isOpen: L,
|
|
1303
|
+
onClose: k,
|
|
1305
1304
|
onPrimaryAction: () => T(
|
|
1306
1305
|
"edit"
|
|
1307
1306
|
/* EDIT */
|
|
1308
1307
|
),
|
|
1309
1308
|
onSecondaryAction: () => {
|
|
1310
|
-
n?.(
|
|
1309
|
+
n?.(oe.START_DELETE, b), T(
|
|
1311
1310
|
"delete"
|
|
1312
1311
|
/* DELETE */
|
|
1313
1312
|
);
|
|
@@ -1320,14 +1319,14 @@ const It = ({
|
|
|
1320
1319
|
pr: 24
|
|
1321
1320
|
}
|
|
1322
1321
|
},
|
|
1323
|
-
title:
|
|
1322
|
+
title: R(p.details_type_title, r.category.name),
|
|
1324
1323
|
children: [
|
|
1325
1324
|
/* @__PURE__ */ e(
|
|
1326
1325
|
nt,
|
|
1327
1326
|
{
|
|
1328
1327
|
amount: r.amount,
|
|
1329
1328
|
icon: /* @__PURE__ */ e(
|
|
1330
|
-
|
|
1329
|
+
W,
|
|
1331
1330
|
{
|
|
1332
1331
|
categoryGuid: r.category.guid,
|
|
1333
1332
|
size: 44,
|
|
@@ -1338,15 +1337,15 @@ const It = ({
|
|
|
1338
1337
|
}
|
|
1339
1338
|
}
|
|
1340
1339
|
),
|
|
1341
|
-
iconColor:
|
|
1342
|
-
onViewHistory:
|
|
1343
|
-
remainingAmount:
|
|
1344
|
-
spentPercentage:
|
|
1340
|
+
iconColor: he,
|
|
1341
|
+
onViewHistory: i,
|
|
1342
|
+
remainingAmount: ee,
|
|
1343
|
+
spentPercentage: pe,
|
|
1345
1344
|
startDate: (s.start.getTime() ?? 0) / 1e3,
|
|
1346
1345
|
totalTransaction: r.transaction_total
|
|
1347
1346
|
}
|
|
1348
1347
|
),
|
|
1349
|
-
/* @__PURE__ */ e(Ae, { ...
|
|
1348
|
+
/* @__PURE__ */ e(Ae, { ...c }),
|
|
1350
1349
|
a && /* @__PURE__ */ e(
|
|
1351
1350
|
xe,
|
|
1352
1351
|
{
|
|
@@ -1364,14 +1363,14 @@ const It = ({
|
|
|
1364
1363
|
mt,
|
|
1365
1364
|
{
|
|
1366
1365
|
closeAriaLabel: h.close_aria,
|
|
1367
|
-
content:
|
|
1366
|
+
content: be(
|
|
1368
1367
|
p[f === "edit" ? "edit_budget_content" : "delete_description"],
|
|
1369
1368
|
r.category.name
|
|
1370
1369
|
),
|
|
1371
1370
|
handleInputChange: (P) => S(P.toString()),
|
|
1372
|
-
handleModalClose:
|
|
1373
|
-
handlePrimaryAction:
|
|
1374
|
-
handleSecondaryAction:
|
|
1371
|
+
handleModalClose: G,
|
|
1372
|
+
handlePrimaryAction: ge,
|
|
1373
|
+
handleSecondaryAction: G,
|
|
1375
1374
|
inputLabel: f === "edit" ? p.details_edit_title : "",
|
|
1376
1375
|
inputValue: b,
|
|
1377
1376
|
isOpen: !0,
|
|
@@ -1383,7 +1382,7 @@ const It = ({
|
|
|
1383
1382
|
}
|
|
1384
1383
|
)
|
|
1385
1384
|
] });
|
|
1386
|
-
}, Ko =
|
|
1385
|
+
}, Ko = O(Wt);
|
|
1387
1386
|
export {
|
|
1388
1387
|
Vo as BubbleBudgetsMiniWidget,
|
|
1389
1388
|
Ho as BubbleBudgetsWidget,
|