@mx-cartographer/experiences 7.0.17-alpha.mm.0 → 7.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{Account-DY2axAET.mjs → Account-BW3-oYEs.mjs} +1 -1
- package/dist/{AccountDetailsContent-Jsg4ZDC1.mjs → AccountDetailsContent-BzD6CDIm.mjs} +8 -8
- package/dist/{AccountDetailsHeader-EU_2u2Iq.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +5 -5
- package/dist/{AccountFields-CSUS7pGn.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
- package/dist/{AccountListItem-CMYZQg8M.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
- package/dist/{AccountStore-CIX2RAmG.mjs → AccountStore-BaMynkQT.mjs} +26 -26
- package/dist/{Accounts-xi9RGRIU.mjs → Accounts-CA-nqAjT.mjs} +1 -1
- package/dist/{BeatApi-D0WcLW3O.mjs → BeatApi-DLu87ijw.mjs} +3 -3
- package/dist/{BeatStore-y6WVs07e.mjs → BeatStore-By4aGoRM.mjs} +17 -17
- package/dist/{BudgetUtil-DmWvHV7C.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BHqOpBNr.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
- package/dist/{CategoryStore-BfYppD3g.mjs → CategoryStore-BOyzQjQp.mjs} +4 -4
- package/dist/{ConnectDrawer-CU5dEdrU.mjs → ConnectDrawer-phFH6OHt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BUJuQrgF.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
- package/dist/{CurrencyInput-BtrNBP3z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
- package/dist/{DebtsStore-BL_0pQEd.mjs → DebtsStore-Dp-CraCD.mjs} +1 -1
- package/dist/{ExportCsvAction-CUGnEaHw.mjs → ExportCsvAction-CbMfQ2Wa.mjs} +3 -3
- package/dist/{Fetch-CJ9cgjgV.mjs → Fetch-CkFKy79O.mjs} +8 -9
- package/dist/{FinstrongStore-rC2F4Tq3.mjs → FinstrongStore-mkALvztw.mjs} +4 -4
- package/dist/{GoalStore-CFx47exL.mjs → GoalStore-eSOkI6uE.mjs} +6 -6
- package/dist/{Help-CCuoAZT3.mjs → Help-KAAMEubC.mjs} +1 -1
- package/dist/{LineChart-D5uLCys4.mjs → LineChart-BWWmmJxV.mjs} +1 -1
- package/dist/{ListItemAction-Cwadpg85.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
- package/dist/{ManageIncome-B91zIeYo.mjs → ManageIncome-DcKHpJ9V.mjs} +4 -4
- package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
- package/dist/{MicroWidgetContainer-DwTAjSdX.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CxggrnHk.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
- package/dist/{NetWorthStore-CYYTpP9O.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
- package/dist/{NotificationSettings-BEFyqBTj.mjs → NotificationSettings-aZFVTc8B.mjs} +2 -2
- package/dist/{NotificationStore-DpV9hXSE.mjs → NotificationStore-DHtSGySy.mjs} +4 -8
- package/dist/{OriginalBalanceAction-DDMRgIBU.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
- package/dist/{RecurringSettings-CGGFhlhh.mjs → RecurringSettings-C9r4s1Cz.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-CXhnipfd.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +16 -20
- package/dist/{SettingsStore-CLLqNa_S.mjs → SettingsStore-B4gi6oOw.mjs} +29 -33
- package/dist/{TransactionApi-C0HMGDBV.mjs → TransactionApi-DbbcjI2L.mjs} +29 -29
- package/dist/{TransactionDetails-Bc0iW26I.mjs → TransactionDetails-bja6hKJk.mjs} +5 -5
- package/dist/{TransactionStore-Va_jug-g.mjs → TransactionStore-0tLtBEIC.mjs} +25 -29
- package/dist/{TrendsStore-DmuQennN.mjs → TrendsStore-WrHxzdbQ.mjs} +1 -1
- package/dist/{User-B9T_314z.mjs → User-Dq9Qj764.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-61VqFx4x.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +2 -5
- package/dist/{WidgetContainer-CTrp2veH.mjs → WidgetContainer-CdBs9WOZ.mjs} +2 -2
- package/dist/accounts/api/AccountApi.d.ts +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/api/BudgetsApi.d.ts +2 -2
- package/dist/budgets/index.es.js +209 -209
- package/dist/cashflow/api/CashflowApi.d.ts +2 -3
- package/dist/cashflow/index.es.js +10 -10
- package/dist/categories/index.es.js +2 -2
- package/dist/common/api/AnalyticsApi.d.ts +2 -2
- package/dist/common/api/AppDataApi.d.ts +2 -2
- package/dist/common/api/BeatApi.d.ts +2 -2
- package/dist/common/api/CategoryApi.d.ts +3 -2
- package/dist/common/api/GlobalCopyApi.d.ts +1 -2
- package/dist/common/api/LocalizedCopyApi.d.ts +1 -2
- package/dist/common/api/NotificationApi.d.ts +2 -2
- package/dist/common/api/ScheduledPaymentsApi.d.ts +2 -3
- package/dist/common/api/UserApi.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +2 -3
- package/dist/common/context/hooks.d.ts +1 -4
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +315 -321
- package/dist/common/stores/GlobalStore.d.ts +1 -2
- package/dist/common/types/index.d.ts +0 -1
- package/dist/common/utils/Fetch.d.ts +1 -3
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-ct1RkLbj.mjs → exportTransactionsToCSV-BDlt8u0n.mjs} +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +1 -2
- package/dist/finstrong/index.es.js +7 -7
- package/dist/goals/api/GoalApi.d.ts +2 -3
- package/dist/goals/index.es.js +11 -11
- package/dist/help/api/HelpApi.d.ts +2 -2
- package/dist/help/index.es.js +3 -3
- package/dist/hooks-DkUqN6JE.mjs +71 -0
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/api/HoldingApi.d.ts +2 -3
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/api/MerchantApi.d.ts +1 -2
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -2
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/recurringtransactions/index.es.js +10 -10
- package/dist/settings/api/SettingsApi.d.ts +2 -3
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/api/TransactionApi.d.ts +2 -3
- package/dist/transactions/index.es.js +14 -14
- package/dist/trends/index.es.js +10 -10
- package/dist/{useCombineEvents-Dbjzfwvo.mjs → useCombineEvents-DaDBSR_1.mjs} +29 -29
- package/package.json +1 -1
- package/dist/MerchantStore-h96aTml7.mjs +0 -37
- package/dist/common/types/Handlers.d.ts +0 -2
- package/dist/hooks-DcS6DyRl.mjs +0 -74
package/dist/budgets/index.es.js
CHANGED
|
@@ -4,18 +4,18 @@ import { observer as I } from "mobx-react-lite";
|
|
|
4
4
|
import { endOfMonth as de } from "date-fns/endOfMonth";
|
|
5
5
|
import { startOfMonth as J } from "date-fns/startOfMonth";
|
|
6
6
|
import W from "@mui/material/Box";
|
|
7
|
-
import
|
|
7
|
+
import _ from "@mui/material/Stack";
|
|
8
8
|
import Q from "@mui/material/styles/useTheme";
|
|
9
|
-
import { Icon as $, Text as
|
|
10
|
-
import { u as Pe } from "../BudgetUtil-
|
|
11
|
-
import { C as Ne } from "../ConnectionsDrawer-
|
|
9
|
+
import { Icon as $, Text as g, CategoryIcon as H, H1 as Ge, H3 as Be } from "@mxenabled/mxui";
|
|
10
|
+
import { u as Pe } from "../BudgetUtil-CeSLAcsl.mjs";
|
|
11
|
+
import { C as Ne } from "../ConnectionsDrawer-ihxkAi1P.mjs";
|
|
12
12
|
import * as E from "d3";
|
|
13
13
|
import je from "@mui/material/Tooltip";
|
|
14
|
-
import { g as w, k as j, u as D, e as X, a as ee, p as ze, h as te, f as ne, m as Ue, c as Se } from "../hooks-
|
|
14
|
+
import { g as w, k as j, u as D, e as X, a as ee, p as ze, h as te, f as ne, m as Ue, c as Se } from "../hooks-DkUqN6JE.mjs";
|
|
15
15
|
import { L as P } from "../Loader-DUaFpDGv.mjs";
|
|
16
16
|
import { E as ce } from "../EmptyState-C0lr9E5T.mjs";
|
|
17
17
|
import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
18
|
-
import { A as k, W as Fe } from "../WidgetContainer-
|
|
18
|
+
import { A as k, W as Fe } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
19
19
|
import K from "@mui/material/List";
|
|
20
20
|
import { f as T } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
21
21
|
import Ae from "@mui/material/Button";
|
|
@@ -27,26 +27,26 @@ import Z from "@mui/material/ListItemText";
|
|
|
27
27
|
import { b as L } from "../Localization-2MODESHW.mjs";
|
|
28
28
|
import { D as M } from "../Drawer-kEE73B87.mjs";
|
|
29
29
|
import We from "@mui/material/ListItemSecondaryAction";
|
|
30
|
-
import { C as He } from "../CurrencyInput-
|
|
30
|
+
import { C as He } from "../CurrencyInput-bEx2Mbd0.mjs";
|
|
31
31
|
import { a as N } from "../Dialog-CWW597AF.mjs";
|
|
32
|
-
import { M as Xe } from "../MiniWidgetContainer-
|
|
32
|
+
import { M as Xe } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
33
33
|
import { isAfter as Ke } from "date-fns/isAfter";
|
|
34
34
|
import { startOfToday as q } from "date-fns/startOfToday";
|
|
35
35
|
import Ve from "@mui/material/Alert";
|
|
36
36
|
import Ye from "@mui/material/Snackbar";
|
|
37
37
|
import be from "@mui/material/Tab";
|
|
38
38
|
import Ze from "@mui/material/Tabs";
|
|
39
|
-
import { e as qe } from "../exportTransactionsToCSV-
|
|
40
|
-
import { T as xe, a as Je } from "../TransactionDetails-
|
|
39
|
+
import { e as qe } from "../exportTransactionsToCSV-BDlt8u0n.mjs";
|
|
40
|
+
import { T as xe, a as Je } from "../TransactionDetails-bja6hKJk.mjs";
|
|
41
41
|
import ge from "@mui/material/Card";
|
|
42
42
|
import pe from "@mui/material/CardContent";
|
|
43
43
|
import { S as ue } from "../StatusBar-BK_uYHAB.mjs";
|
|
44
44
|
import { S as ve } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
45
|
-
import { u as Qe, b as et } from "../CategorySelectorDrawer-
|
|
45
|
+
import { u as Qe, b as et } from "../CategorySelectorDrawer-BJ9jlCyt.mjs";
|
|
46
46
|
import Te from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as tt } from "date-fns/subDays";
|
|
48
48
|
import nt from "@mui/material/IconButton";
|
|
49
|
-
import { M as ot } from "../ManageIncome-
|
|
49
|
+
import { M as ot } from "../ManageIncome-DcKHpJ9V.mjs";
|
|
50
50
|
const ye = 5, at = 100, rt = 25, st = (t) => {
|
|
51
51
|
const o = (a) => {
|
|
52
52
|
a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
|
|
@@ -115,15 +115,15 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
115
115
|
const {
|
|
116
116
|
budgetColors: { background: n, text: r },
|
|
117
117
|
category: { icon: c, name: y },
|
|
118
|
-
guid:
|
|
119
|
-
description:
|
|
120
|
-
radius:
|
|
121
|
-
x:
|
|
122
|
-
y:
|
|
118
|
+
guid: p,
|
|
119
|
+
description: h,
|
|
120
|
+
radius: m,
|
|
121
|
+
x: C,
|
|
122
|
+
y: b
|
|
123
123
|
} = t;
|
|
124
|
-
let u = -12,
|
|
125
|
-
|
|
126
|
-
const
|
|
124
|
+
let u = -12, B = -12;
|
|
125
|
+
m > G ? (u = -14, B = -45) : m > le && (B = -32);
|
|
126
|
+
const f = `${t.category.name}: ${h}`, A = {
|
|
127
127
|
modifiers: [
|
|
128
128
|
{
|
|
129
129
|
name: "offset",
|
|
@@ -135,14 +135,14 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
135
135
|
"g",
|
|
136
136
|
{
|
|
137
137
|
className: "bubble",
|
|
138
|
-
id: `bubble-${
|
|
138
|
+
id: `bubble-${p}`,
|
|
139
139
|
onClick: () => i(t),
|
|
140
140
|
onMouseEnter: () => a(!0),
|
|
141
141
|
onMouseLeave: () => a(!1),
|
|
142
142
|
style: { cursor: o ? "pointer" : "default" },
|
|
143
143
|
textAnchor: "middle",
|
|
144
|
-
x:
|
|
145
|
-
y:
|
|
144
|
+
x: C,
|
|
145
|
+
y: b,
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
148
|
je,
|
|
@@ -150,50 +150,50 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
150
150
|
followCursor: !0,
|
|
151
151
|
open: s,
|
|
152
152
|
slotProps: { popper: A },
|
|
153
|
-
title:
|
|
154
|
-
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${
|
|
153
|
+
title: f,
|
|
154
|
+
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${p}`, r: m })
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
/* @__PURE__ */ e("svg", { x: u, y:
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
/* @__PURE__ */ e("svg", { x: u, y: B, children: /* @__PURE__ */ e($, { name: c, size: m <= G ? 24 : 32, sx: { fill: r } }) }),
|
|
158
|
+
m > G && /* @__PURE__ */ e(
|
|
159
|
+
g,
|
|
160
160
|
{
|
|
161
161
|
bold: !0,
|
|
162
162
|
component: "text",
|
|
163
|
-
id: `budget-category-${
|
|
163
|
+
id: `budget-category-${p}`,
|
|
164
164
|
sx: { fill: r },
|
|
165
165
|
variant: "Small",
|
|
166
166
|
y: 4,
|
|
167
167
|
children: y
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
m > le && /* @__PURE__ */ e(
|
|
171
|
+
g,
|
|
172
172
|
{
|
|
173
173
|
bold: !0,
|
|
174
174
|
component: "text",
|
|
175
|
-
id: `budget-description-${
|
|
175
|
+
id: `budget-description-${p}-1`,
|
|
176
176
|
sx: { fill: r },
|
|
177
177
|
variant: "Body",
|
|
178
|
-
y:
|
|
179
|
-
children:
|
|
178
|
+
y: m <= G ? 12 : 24,
|
|
179
|
+
children: m <= G ? h.split(" ")[0] : h
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
m <= G && m > le && /* @__PURE__ */ e(
|
|
183
|
+
g,
|
|
184
184
|
{
|
|
185
185
|
component: "text",
|
|
186
|
-
id: `budget-description-${
|
|
186
|
+
id: `budget-description-${p}-2`,
|
|
187
187
|
sx: { fill: r },
|
|
188
188
|
variant: "XSmall",
|
|
189
189
|
y: 28,
|
|
190
|
-
children:
|
|
190
|
+
children: h.split(" ")[1]
|
|
191
191
|
}
|
|
192
192
|
),
|
|
193
193
|
/* @__PURE__ */ e(gt, { bubble: t })
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
-
|
|
196
|
+
p
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
let F;
|
|
@@ -213,19 +213,19 @@ const ht = ({
|
|
|
213
213
|
onConnectAccountsClick: o,
|
|
214
214
|
createBudgetOnClick: i
|
|
215
215
|
}) => {
|
|
216
|
-
const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y,
|
|
217
|
-
|
|
218
|
-
const { data: u, isSuccess:
|
|
219
|
-
|
|
216
|
+
const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y, p] = l.useState(!1), [h, m] = l.useState(!1), C = l.useMemo(() => [...a.filter((u) => u.totalAverageAmount > 0)], [a]), b = async () => {
|
|
217
|
+
m(!0);
|
|
218
|
+
const { data: u, isSuccess: B } = await s(C);
|
|
219
|
+
m(!1), B ? (u.length === 0 && c(!0), p(!1)) : p(!0);
|
|
220
220
|
};
|
|
221
|
-
return
|
|
221
|
+
return h ? /* @__PURE__ */ e(P, {}) : y ? /* @__PURE__ */ e(
|
|
222
222
|
ce,
|
|
223
223
|
{
|
|
224
224
|
header: n.autogenerate_budgets_error_header,
|
|
225
225
|
icon: "error",
|
|
226
226
|
iconColor: "#4D4D4D",
|
|
227
227
|
onClick: (u) => {
|
|
228
|
-
u === "primary" ?
|
|
228
|
+
u === "primary" ? b() : i();
|
|
229
229
|
},
|
|
230
230
|
primaryButton: n.autogenerate_budgets_error_primary_button,
|
|
231
231
|
secondaryButton: n.zero_state_generate_budgets_secondary_button,
|
|
@@ -267,7 +267,7 @@ const ht = ({
|
|
|
267
267
|
icon: "bubble_chart",
|
|
268
268
|
iconColor: "#1A1A1A",
|
|
269
269
|
onClick: (u) => {
|
|
270
|
-
u === "primary" ?
|
|
270
|
+
u === "primary" ? b() : i();
|
|
271
271
|
},
|
|
272
272
|
primaryButton: n.empty_state_primary_button,
|
|
273
273
|
secondaryButton: t ? void 0 : n.empty_state_secondary_button,
|
|
@@ -294,7 +294,7 @@ const ht = ({
|
|
|
294
294
|
shouldShowZeroState: a,
|
|
295
295
|
unavailableWidth: n = 24
|
|
296
296
|
}) => {
|
|
297
|
-
const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized:
|
|
297
|
+
const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized: p } = ee(), { accounts: h } = D(), { availableWidth: m } = ze(), { isMobile: C } = me(), [b, u] = l.useState(!1), B = l.useMemo(() => m - n, [m]), f = (x) => {
|
|
298
298
|
c(x), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
299
299
|
budget_category: x.category.name,
|
|
300
300
|
click_type: "bubble"
|
|
@@ -302,8 +302,8 @@ const ht = ({
|
|
|
302
302
|
}, A = () => {
|
|
303
303
|
u(!0), r(k.ACCOUNTS_CLICK_CONNECT);
|
|
304
304
|
};
|
|
305
|
-
return y ? /* @__PURE__ */ e(
|
|
306
|
-
a || !
|
|
305
|
+
return y ? /* @__PURE__ */ e(_, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(B), children: /* @__PURE__ */ e(P, {}) }) : /* @__PURE__ */ d(W, { ml: a || C ? 0 : 24, sx: { alignSelf: "center" }, children: [
|
|
306
|
+
a || !p ? /* @__PURE__ */ e(
|
|
307
307
|
bt,
|
|
308
308
|
{
|
|
309
309
|
createBudgetOnClick: t,
|
|
@@ -315,36 +315,36 @@ const ht = ({
|
|
|
315
315
|
{
|
|
316
316
|
height: o,
|
|
317
317
|
isDraggable: i,
|
|
318
|
-
onClick:
|
|
319
|
-
width:
|
|
318
|
+
onClick: f,
|
|
319
|
+
width: B
|
|
320
320
|
}
|
|
321
321
|
),
|
|
322
322
|
/* @__PURE__ */ e(
|
|
323
323
|
Ne,
|
|
324
324
|
{
|
|
325
325
|
onClose: () => u(!1),
|
|
326
|
-
showConnectionsWidget:
|
|
327
|
-
title:
|
|
326
|
+
showConnectionsWidget: b,
|
|
327
|
+
title: h.manage_connections
|
|
328
328
|
}
|
|
329
329
|
)
|
|
330
330
|
] });
|
|
331
331
|
}
|
|
332
332
|
), yt = I(() => {
|
|
333
333
|
const { budgets: t } = D(), { totalBudgeted: o } = w(), { incomeTotal: i } = te(), s = i - o;
|
|
334
|
-
return /* @__PURE__ */ d(
|
|
335
|
-
/* @__PURE__ */ d(
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
/* @__PURE__ */ e(
|
|
334
|
+
return /* @__PURE__ */ d(_, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
335
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
336
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(i, "0,0") }),
|
|
337
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.projected_income })
|
|
338
338
|
] }),
|
|
339
|
-
/* @__PURE__ */ e(
|
|
340
|
-
/* @__PURE__ */ d(
|
|
341
|
-
/* @__PURE__ */ e(
|
|
342
|
-
/* @__PURE__ */ e(
|
|
339
|
+
/* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
|
|
340
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
341
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(o, "0,0") }),
|
|
342
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.budgeted })
|
|
343
343
|
] }),
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
/* @__PURE__ */ d(
|
|
346
|
-
/* @__PURE__ */ e(
|
|
347
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
|
|
345
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
346
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(s, "0,0") }),
|
|
347
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.remaining })
|
|
348
348
|
] })
|
|
349
349
|
] });
|
|
350
350
|
}), ft = I(
|
|
@@ -362,26 +362,26 @@ const ht = ({
|
|
|
362
362
|
] }, t.guid);
|
|
363
363
|
}
|
|
364
364
|
), Ct = ({ onRecalculateBudgets: t }) => {
|
|
365
|
-
const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((
|
|
365
|
+
const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((h) => h.totalAverageAmount > 0), p = async () => {
|
|
366
366
|
await a(y), c(!1), n(o.alert_recalculated_budgets), t?.();
|
|
367
367
|
};
|
|
368
368
|
return /* @__PURE__ */ d(l.Fragment, { children: [
|
|
369
369
|
/* @__PURE__ */ e(Ae, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
|
|
370
|
-
/* @__PURE__ */ e(
|
|
370
|
+
/* @__PURE__ */ e(g, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
|
|
371
371
|
/* @__PURE__ */ e(
|
|
372
372
|
M,
|
|
373
373
|
{
|
|
374
374
|
ariaLabelClose: i.close_aria,
|
|
375
375
|
isOpen: r,
|
|
376
376
|
onClose: () => c(!1),
|
|
377
|
-
onPrimaryAction:
|
|
377
|
+
onPrimaryAction: p,
|
|
378
378
|
title: o.recalculate_title,
|
|
379
|
-
children: /* @__PURE__ */ d(
|
|
380
|
-
/* @__PURE__ */ d(
|
|
381
|
-
/* @__PURE__ */ e(
|
|
382
|
-
/* @__PURE__ */ e(
|
|
379
|
+
children: /* @__PURE__ */ d(_, { children: [
|
|
380
|
+
/* @__PURE__ */ d(_, { mx: 24, my: 16, children: [
|
|
381
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
|
|
382
|
+
/* @__PURE__ */ e(g, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
|
|
383
383
|
] }),
|
|
384
|
-
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((
|
|
384
|
+
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((h) => /* @__PURE__ */ e(ft, { category: h }, h.guid)) }) })
|
|
385
385
|
] })
|
|
386
386
|
}
|
|
387
387
|
)
|
|
@@ -392,13 +392,13 @@ const ht = ({
|
|
|
392
392
|
onAmountChanged: i
|
|
393
393
|
}) => {
|
|
394
394
|
const { budgets: s } = D(), { totalBudgeted: a } = w(), { incomeTotal: n } = te(), r = n - a;
|
|
395
|
-
return /* @__PURE__ */ d(
|
|
396
|
-
/* @__PURE__ */ d(
|
|
397
|
-
/* @__PURE__ */ e(
|
|
395
|
+
return /* @__PURE__ */ d(_, { gap: 16, children: [
|
|
396
|
+
/* @__PURE__ */ d(_, { children: [
|
|
397
|
+
/* @__PURE__ */ e(g, { children: L(
|
|
398
398
|
s.add_description_top,
|
|
399
399
|
T(r, "0,0")
|
|
400
400
|
) }),
|
|
401
|
-
/* @__PURE__ */ e(
|
|
401
|
+
/* @__PURE__ */ e(g, { children: L(s.add_description_bottom, o) })
|
|
402
402
|
] }),
|
|
403
403
|
/* @__PURE__ */ e(
|
|
404
404
|
He,
|
|
@@ -445,7 +445,7 @@ const ht = ({
|
|
|
445
445
|
const { budgets: o } = D(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = w(), n = async (r, c) => {
|
|
446
446
|
await i(r, c), s(L(o.alert_budget_created, r.name));
|
|
447
447
|
};
|
|
448
|
-
return /* @__PURE__ */ d(
|
|
448
|
+
return /* @__PURE__ */ d(_, { children: [
|
|
449
449
|
/* @__PURE__ */ e(yt, {}),
|
|
450
450
|
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
|
|
451
451
|
Bt,
|
|
@@ -458,27 +458,27 @@ const ht = ({
|
|
|
458
458
|
/* @__PURE__ */ e(Ct, { onRecalculateBudgets: t })
|
|
459
459
|
] });
|
|
460
460
|
}), St = (t) => {
|
|
461
|
-
const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded:
|
|
462
|
-
|
|
461
|
+
const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded: p, isInitialized: h, selectedAccounts: m } = ee(), { reloadCategoryTotals: C } = j(), b = Pe(), u = s.length === 0, [B, f] = l.useState(!1), A = () => {
|
|
462
|
+
f(!0), i(k.BUDGETS_CLICK_ADD);
|
|
463
463
|
}, x = () => {
|
|
464
|
-
|
|
464
|
+
f(!1);
|
|
465
465
|
};
|
|
466
466
|
return l.useEffect(() => {
|
|
467
467
|
r(o);
|
|
468
468
|
}, [o]), l.useEffect(() => {
|
|
469
|
-
|
|
469
|
+
h && !a && C(m, J(/* @__PURE__ */ new Date()), de(/* @__PURE__ */ new Date())).then(
|
|
470
470
|
() => {
|
|
471
471
|
n().finally();
|
|
472
472
|
}
|
|
473
473
|
);
|
|
474
|
-
}, [
|
|
474
|
+
}, [h, m]), p ? /* @__PURE__ */ d(
|
|
475
475
|
Xe,
|
|
476
476
|
{
|
|
477
477
|
primaryCtaLabel: u ? c.get_started_cta : c.details_cta,
|
|
478
478
|
title: c.budgets_title,
|
|
479
479
|
...t,
|
|
480
480
|
children: [
|
|
481
|
-
a ? /* @__PURE__ */ d(
|
|
481
|
+
a ? /* @__PURE__ */ d(_, { height: 450, mt: 32, children: [
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
483
|
we,
|
|
484
484
|
{
|
|
@@ -489,16 +489,16 @@ const ht = ({
|
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
491
|
!u && /* @__PURE__ */ d(W, { ml: 16, children: [
|
|
492
|
-
/* @__PURE__ */ e(
|
|
493
|
-
/* @__PURE__ */ e(
|
|
492
|
+
/* @__PURE__ */ e(g, { bold: !0, color: b < 0 ? "error.main" : "success.main", children: T(Math.abs(b), "0,0") }),
|
|
493
|
+
/* @__PURE__ */ e(g, { children: b < 0 ? c.overspent_in_budgets : c.left_in_budgets })
|
|
494
494
|
] })
|
|
495
495
|
] }) : /* @__PURE__ */ e(P, {}),
|
|
496
496
|
/* @__PURE__ */ e(
|
|
497
497
|
M,
|
|
498
498
|
{
|
|
499
499
|
ariaLabelClose: y.close_aria,
|
|
500
|
-
isOpen:
|
|
501
|
-
onClose: () =>
|
|
500
|
+
isOpen: B,
|
|
501
|
+
onClose: () => f(!1),
|
|
502
502
|
title: c.add_new_title,
|
|
503
503
|
children: /* @__PURE__ */ e(De, { onRecalculateBudgets: x })
|
|
504
504
|
}
|
|
@@ -520,18 +520,18 @@ const ht = ({
|
|
|
520
520
|
percentage: `${n}%`
|
|
521
521
|
}
|
|
522
522
|
];
|
|
523
|
-
return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(
|
|
523
|
+
return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(_, { alignItems: "center", gap: 16, children: [
|
|
524
524
|
/* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
|
|
525
525
|
/* @__PURE__ */ e(Ge, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
|
|
526
|
-
/* @__PURE__ */ e(
|
|
526
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "XSmall", children: s }),
|
|
527
527
|
/* @__PURE__ */ e(ue, { data: c, height: 10 })
|
|
528
528
|
] }) }) });
|
|
529
529
|
}, At = I(() => {
|
|
530
530
|
const { budgets: t } = D();
|
|
531
|
-
return /* @__PURE__ */ d(
|
|
531
|
+
return /* @__PURE__ */ d(_, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
532
532
|
/* @__PURE__ */ e($, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
533
|
-
/* @__PURE__ */ e(
|
|
534
|
-
/* @__PURE__ */ e(
|
|
533
|
+
/* @__PURE__ */ e(g, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
|
|
534
|
+
/* @__PURE__ */ e(g, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
|
|
535
535
|
] });
|
|
536
536
|
}), xt = I(({ budget: t }) => {
|
|
537
537
|
const {
|
|
@@ -546,8 +546,8 @@ const ht = ({
|
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
547
|
Z,
|
|
548
548
|
{
|
|
549
|
-
primary: /* @__PURE__ */ e(
|
|
550
|
-
secondary: /* @__PURE__ */ e(
|
|
549
|
+
primary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }) }),
|
|
550
|
+
secondary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
|
|
551
551
|
${T(n, "0,0")} /
|
|
552
552
|
${T(o, "0,0")}
|
|
553
553
|
` }) })
|
|
@@ -555,23 +555,23 @@ const ht = ({
|
|
|
555
555
|
)
|
|
556
556
|
] }) });
|
|
557
557
|
}), vt = I(({ category: t, parentBudget: o }) => {
|
|
558
|
-
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [
|
|
558
|
+
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [p, h] = l.useState(!1), [m, C] = l.useState(""), [b, u] = l.useState(void 0);
|
|
559
559
|
l.useEffect(() => {
|
|
560
560
|
n((A) => {
|
|
561
561
|
const x = t.subCategories.find((v) => v.guid === A);
|
|
562
|
-
x && (u(x),
|
|
562
|
+
x && (u(x), C(`${x.currentAmount === 0 ? "" : x.currentAmount}`), h(!0));
|
|
563
563
|
});
|
|
564
564
|
}, []);
|
|
565
|
-
const
|
|
565
|
+
const B = () => {
|
|
566
566
|
a(t.guid), y(!0);
|
|
567
|
-
},
|
|
568
|
-
|
|
567
|
+
}, f = async () => {
|
|
568
|
+
b && Number(m) > 0 && (await r(b, Number(m), o.guid), h(!1), y(!1), u(void 0));
|
|
569
569
|
};
|
|
570
570
|
return /* @__PURE__ */ d(W, { children: [
|
|
571
|
-
/* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick:
|
|
572
|
-
/* @__PURE__ */ d(
|
|
571
|
+
/* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: B, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(_, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
572
|
+
/* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
573
573
|
/* @__PURE__ */ e($, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
|
|
574
|
-
/* @__PURE__ */ e(
|
|
574
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
|
|
575
575
|
] }),
|
|
576
576
|
/* @__PURE__ */ e($, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
577
577
|
] }) }) }) }),
|
|
@@ -590,40 +590,40 @@ const ht = ({
|
|
|
590
590
|
N,
|
|
591
591
|
{
|
|
592
592
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
593
|
-
disablePrimaryButton: Number(
|
|
594
|
-
isOpen:
|
|
595
|
-
onClose: () =>
|
|
596
|
-
onPrimaryAction:
|
|
593
|
+
disablePrimaryButton: Number(m) <= 0,
|
|
594
|
+
isOpen: p,
|
|
595
|
+
onClose: () => h(!1),
|
|
596
|
+
onPrimaryAction: f,
|
|
597
597
|
primaryText: i.add_save_button,
|
|
598
598
|
children: /* @__PURE__ */ e(
|
|
599
599
|
re,
|
|
600
600
|
{
|
|
601
|
-
amount:
|
|
602
|
-
categoryName:
|
|
603
|
-
onAmountChanged:
|
|
601
|
+
amount: m,
|
|
602
|
+
categoryName: b?.name || "",
|
|
603
|
+
onAmountChanged: C
|
|
604
604
|
}
|
|
605
605
|
)
|
|
606
606
|
}
|
|
607
607
|
)
|
|
608
608
|
] });
|
|
609
609
|
}), Tt = I(({ budget: t }) => {
|
|
610
|
-
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter:
|
|
610
|
+
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter: p, setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState("");
|
|
611
611
|
l.useEffect(() => {
|
|
612
|
-
r && (
|
|
613
|
-
...
|
|
612
|
+
r && (f(`${r.amount}`), h({
|
|
613
|
+
...p,
|
|
614
614
|
custom: (S) => S.category_guid === r.category_guid
|
|
615
615
|
}));
|
|
616
616
|
}, [r]);
|
|
617
617
|
const A = async () => {
|
|
618
618
|
r && await y({
|
|
619
619
|
...r,
|
|
620
|
-
amount: Number(
|
|
620
|
+
amount: Number(B)
|
|
621
621
|
});
|
|
622
622
|
}, x = async () => {
|
|
623
623
|
r && await n(r.guid), u(!1), v();
|
|
624
624
|
}, v = () => {
|
|
625
|
-
|
|
626
|
-
...
|
|
625
|
+
h({
|
|
626
|
+
...p,
|
|
627
627
|
custom: (S) => S.category_guid === t.category_guid || S.top_level_category_guid === t.category_guid
|
|
628
628
|
}), c(void 0);
|
|
629
629
|
};
|
|
@@ -641,12 +641,12 @@ const ht = ({
|
|
|
641
641
|
ariaLabelClose: a.close_aria,
|
|
642
642
|
isOpen: !!r,
|
|
643
643
|
onClose: v,
|
|
644
|
-
onPrimaryAction: () =>
|
|
644
|
+
onPrimaryAction: () => C(!0),
|
|
645
645
|
onSecondaryAction: () => u(!0),
|
|
646
646
|
primaryText: s.details_edit_button,
|
|
647
647
|
secondaryText: s.details_delete_button,
|
|
648
648
|
title: s.details_title,
|
|
649
|
-
children: r && /* @__PURE__ */ d(
|
|
649
|
+
children: r && /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
650
650
|
/* @__PURE__ */ e(Ie, { budget: r }),
|
|
651
651
|
/* @__PURE__ */ e(xe, { height: "100%" })
|
|
652
652
|
] })
|
|
@@ -657,17 +657,17 @@ const ht = ({
|
|
|
657
657
|
N,
|
|
658
658
|
{
|
|
659
659
|
copy: { close_aria: a.close_aria, title: s.details_edit_title },
|
|
660
|
-
disablePrimaryButton: Number(
|
|
661
|
-
isOpen:
|
|
662
|
-
onClose: () =>
|
|
660
|
+
disablePrimaryButton: Number(B) <= 0,
|
|
661
|
+
isOpen: m,
|
|
662
|
+
onClose: () => C(!1),
|
|
663
663
|
onPrimaryAction: A,
|
|
664
664
|
primaryText: s.edit_save_button,
|
|
665
665
|
children: /* @__PURE__ */ e(
|
|
666
666
|
re,
|
|
667
667
|
{
|
|
668
|
-
amount:
|
|
668
|
+
amount: B,
|
|
669
669
|
categoryName: r.category.name,
|
|
670
|
-
onAmountChanged:
|
|
670
|
+
onAmountChanged: f
|
|
671
671
|
}
|
|
672
672
|
)
|
|
673
673
|
}
|
|
@@ -676,40 +676,40 @@ const ht = ({
|
|
|
676
676
|
N,
|
|
677
677
|
{
|
|
678
678
|
copy: { close_aria: a.close_aria, title: s.delete_title },
|
|
679
|
-
isOpen:
|
|
679
|
+
isOpen: b,
|
|
680
680
|
onClose: () => u(!1),
|
|
681
681
|
onPrimaryAction: x,
|
|
682
682
|
primaryColor: "error",
|
|
683
683
|
primaryText: "Delete",
|
|
684
684
|
secondaryColor: "secondary",
|
|
685
|
-
children: /* @__PURE__ */ e(
|
|
685
|
+
children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(s.delete_description, r.category.name) })
|
|
686
686
|
}
|
|
687
687
|
)
|
|
688
688
|
] })
|
|
689
689
|
] });
|
|
690
690
|
}), wt = I(({ budget: t }) => {
|
|
691
|
-
const { is_mobile_webview: o } = Ue(), { setAlert: i } = w(), { budgets: s, common: a, transactions: n } = D(), { isDesktop: r } = me(), {
|
|
692
|
-
sortedTransactions:
|
|
693
|
-
sortedTransactionsWithSplits:
|
|
694
|
-
tags:
|
|
695
|
-
} = ne(), [
|
|
696
|
-
() =>
|
|
697
|
-
[
|
|
698
|
-
),
|
|
699
|
-
|
|
700
|
-
},
|
|
701
|
-
qe(
|
|
702
|
-
},
|
|
703
|
-
return /* @__PURE__ */ d(
|
|
691
|
+
const { is_mobile_webview: o } = Ue(), { setAlert: i } = w(), { budgets: s, common: a, transactions: n } = D(), { isDesktop: r, isSmallTablet: c, isTablet: y } = me(), {
|
|
692
|
+
sortedTransactions: p,
|
|
693
|
+
sortedTransactionsWithSplits: h,
|
|
694
|
+
tags: m
|
|
695
|
+
} = ne(), [C, b] = l.useState(0), [u, B] = l.useState(""), f = l.useMemo(
|
|
696
|
+
() => p.find((S) => S.guid === u),
|
|
697
|
+
[u, p]
|
|
698
|
+
), A = (S, O) => {
|
|
699
|
+
b(O);
|
|
700
|
+
}, x = () => {
|
|
701
|
+
qe(h, m), i(s.alert_csv_downloaded);
|
|
702
|
+
}, v = p.length > 0 && !o && (r || y && !c);
|
|
703
|
+
return /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
704
704
|
/* @__PURE__ */ e(Ie, { budget: t }),
|
|
705
|
-
/* @__PURE__ */ d(
|
|
705
|
+
/* @__PURE__ */ d(_, { children: [
|
|
706
706
|
/* @__PURE__ */ d(
|
|
707
707
|
Ze,
|
|
708
708
|
{
|
|
709
|
-
onChange:
|
|
709
|
+
onChange: A,
|
|
710
710
|
sx: { width: "100%" },
|
|
711
711
|
textColor: "primary",
|
|
712
|
-
value:
|
|
712
|
+
value: C,
|
|
713
713
|
variant: "fullWidth",
|
|
714
714
|
children: [
|
|
715
715
|
/* @__PURE__ */ e(be, { label: s.details_transactions_tab }),
|
|
@@ -717,27 +717,27 @@ const ht = ({
|
|
|
717
717
|
]
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
|
-
|
|
721
|
-
|
|
720
|
+
C === 0 && /* @__PURE__ */ d(_, { children: [
|
|
721
|
+
v && /* @__PURE__ */ e(_, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
|
|
722
722
|
Ae,
|
|
723
723
|
{
|
|
724
|
-
onClick:
|
|
724
|
+
onClick: x,
|
|
725
725
|
startIcon: /* @__PURE__ */ e($, { name: "ios_share" }),
|
|
726
726
|
variant: "text",
|
|
727
727
|
children: n.export_csv_btn
|
|
728
728
|
}
|
|
729
729
|
) }),
|
|
730
|
-
/* @__PURE__ */ e(xe, { height: "100%", onClick:
|
|
730
|
+
/* @__PURE__ */ e(xe, { height: "100%", onClick: B })
|
|
731
731
|
] }),
|
|
732
|
-
|
|
732
|
+
C === 1 && /* @__PURE__ */ e(Tt, { budget: t }),
|
|
733
733
|
/* @__PURE__ */ e(
|
|
734
734
|
M,
|
|
735
735
|
{
|
|
736
736
|
ariaLabelClose: a.close_aria,
|
|
737
|
-
isOpen: !!
|
|
738
|
-
onClose: () =>
|
|
737
|
+
isOpen: !!f,
|
|
738
|
+
onClose: () => B(""),
|
|
739
739
|
title: s.details_transaction_drawer,
|
|
740
|
-
children:
|
|
740
|
+
children: f && /* @__PURE__ */ e(Je, { transaction: f })
|
|
741
741
|
}
|
|
742
742
|
)
|
|
743
743
|
] })
|
|
@@ -750,10 +750,10 @@ const ht = ({
|
|
|
750
750
|
selectedSubBudget: r,
|
|
751
751
|
setAlert: c,
|
|
752
752
|
setSelectedBudget: y,
|
|
753
|
-
updateBudget:
|
|
754
|
-
} = w(), { setFilter:
|
|
753
|
+
updateBudget: p
|
|
754
|
+
} = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState(!1), [A, x] = l.useState("");
|
|
755
755
|
l.useEffect(() => {
|
|
756
|
-
n && !r && (x(`${n.amount}`),
|
|
756
|
+
n && !r && (x(`${n.amount}`), C(!0), h({
|
|
757
757
|
accounts: t,
|
|
758
758
|
dateRange: s,
|
|
759
759
|
custom: (R) => R.category_guid === n.category_guid || R.top_level_category_guid === n.category_guid,
|
|
@@ -761,15 +761,15 @@ const ht = ({
|
|
|
761
761
|
}));
|
|
762
762
|
}, [n]);
|
|
763
763
|
const v = async () => {
|
|
764
|
-
n && (await
|
|
764
|
+
n && (await p({
|
|
765
765
|
...n,
|
|
766
766
|
amount: Number(A),
|
|
767
767
|
percentage: n.category.totalAmount / Number(A) * 100
|
|
768
768
|
}), c(L(o.alert_budget_updated, n.category.name)));
|
|
769
769
|
}, S = async () => {
|
|
770
|
-
n && (await a(n.guid), c(L(o.alert_budget_deleted, n.category.name))),
|
|
770
|
+
n && (await a(n.guid), c(L(o.alert_budget_deleted, n.category.name))), f(!1), O();
|
|
771
771
|
}, O = () => {
|
|
772
|
-
|
|
772
|
+
C(!1), setTimeout(() => {
|
|
773
773
|
y(void 0);
|
|
774
774
|
}, 250);
|
|
775
775
|
};
|
|
@@ -779,10 +779,10 @@ const ht = ({
|
|
|
779
779
|
M,
|
|
780
780
|
{
|
|
781
781
|
ariaLabelClose: i.close_aria,
|
|
782
|
-
isOpen:
|
|
782
|
+
isOpen: m,
|
|
783
783
|
onClose: O,
|
|
784
784
|
onPrimaryAction: () => u(!0),
|
|
785
|
-
onSecondaryAction: () =>
|
|
785
|
+
onSecondaryAction: () => f(!0),
|
|
786
786
|
primaryText: o.details_edit_button,
|
|
787
787
|
secondaryColor: "error",
|
|
788
788
|
secondaryText: o.details_delete_button,
|
|
@@ -795,7 +795,7 @@ const ht = ({
|
|
|
795
795
|
{
|
|
796
796
|
copy: { close_aria: i.close_aria, title: o.details_edit_title },
|
|
797
797
|
disablePrimaryButton: Number(A) <= 0,
|
|
798
|
-
isOpen:
|
|
798
|
+
isOpen: b,
|
|
799
799
|
onClose: () => u(!1),
|
|
800
800
|
onPrimaryAction: v,
|
|
801
801
|
primaryText: o.edit_save_button,
|
|
@@ -813,13 +813,13 @@ const ht = ({
|
|
|
813
813
|
N,
|
|
814
814
|
{
|
|
815
815
|
copy: { close_aria: i.close_aria, title: o.delete_title },
|
|
816
|
-
isOpen:
|
|
817
|
-
onClose: () =>
|
|
816
|
+
isOpen: B,
|
|
817
|
+
onClose: () => f(!1),
|
|
818
818
|
onPrimaryAction: S,
|
|
819
819
|
primaryColor: "error",
|
|
820
820
|
primaryText: o.details_delete_button,
|
|
821
821
|
secondaryColor: "secondary",
|
|
822
|
-
children: /* @__PURE__ */ e(
|
|
822
|
+
children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
|
|
823
823
|
}
|
|
824
824
|
)
|
|
825
825
|
] });
|
|
@@ -831,23 +831,23 @@ const ht = ({
|
|
|
831
831
|
description: r,
|
|
832
832
|
percentage: c,
|
|
833
833
|
subBudgets: y,
|
|
834
|
-
transaction_total:
|
|
834
|
+
transaction_total: p
|
|
835
835
|
} = t;
|
|
836
836
|
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(Y, { onClick: () => o?.(t), children: [
|
|
837
837
|
/* @__PURE__ */ e(ae, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(ve, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: n, variant: "basic" }) }) }),
|
|
838
838
|
/* @__PURE__ */ e(
|
|
839
839
|
Z,
|
|
840
840
|
{
|
|
841
|
-
primary: /* @__PURE__ */ d(
|
|
842
|
-
/* @__PURE__ */ e(
|
|
843
|
-
/* @__PURE__ */ e(
|
|
844
|
-
${T(
|
|
841
|
+
primary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
842
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }),
|
|
843
|
+
/* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
|
|
844
|
+
${T(p, "0,0")} /
|
|
845
845
|
${T(i, "0,0")}
|
|
846
846
|
` })
|
|
847
847
|
] }),
|
|
848
|
-
secondary: /* @__PURE__ */ d(
|
|
849
|
-
/* @__PURE__ */ e(
|
|
850
|
-
/* @__PURE__ */ e(
|
|
848
|
+
secondary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
849
|
+
/* @__PURE__ */ e(g, { variant: "XSmall", children: `${y.length} Sub-budgets` }),
|
|
850
|
+
/* @__PURE__ */ e(g, { bold: c > 100, color: a, variant: "XSmall", children: r })
|
|
851
851
|
] })
|
|
852
852
|
}
|
|
853
853
|
)
|
|
@@ -867,9 +867,9 @@ const ht = ({
|
|
|
867
867
|
] }, n.guid)) }) })
|
|
868
868
|
] });
|
|
869
869
|
}), Ot = I(() => {
|
|
870
|
-
const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted:
|
|
870
|
+
const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted: p } = w(), { incomeTotal: h } = te(), { setFilter: m } = ne(), [C, b] = l.useState(!1), [u, B] = l.useMemo(() => {
|
|
871
871
|
const v = c.reduce((z, se) => z + se.totalAmount, 0);
|
|
872
|
-
let S = v /
|
|
872
|
+
let S = v / p;
|
|
873
873
|
S > 1 && (S = 1);
|
|
874
874
|
let O = t.palette.success.main;
|
|
875
875
|
S > 0.8 && S < 1 ? O = t.palette.warning.main : S >= 1 && (O = t.palette.error.main);
|
|
@@ -880,11 +880,11 @@ const ht = ({
|
|
|
880
880
|
}
|
|
881
881
|
];
|
|
882
882
|
return [v, R];
|
|
883
|
-
}, [y, c]), [
|
|
883
|
+
}, [y, c]), [f, A] = l.useMemo(() => {
|
|
884
884
|
const v = Math.abs(
|
|
885
885
|
r.reduce((R, z) => R + z.totalAmount, 0)
|
|
886
886
|
);
|
|
887
|
-
let S = v /
|
|
887
|
+
let S = v / h;
|
|
888
888
|
S > 1 && (S = 1);
|
|
889
889
|
const O = [
|
|
890
890
|
{
|
|
@@ -893,30 +893,30 @@ const ht = ({
|
|
|
893
893
|
}
|
|
894
894
|
];
|
|
895
895
|
return [v, O];
|
|
896
|
-
}, [r,
|
|
897
|
-
|
|
896
|
+
}, [r, h]), x = () => {
|
|
897
|
+
m({
|
|
898
898
|
accounts: i.map((v) => v.guid),
|
|
899
899
|
dateRange: {
|
|
900
900
|
start: tt(/* @__PURE__ */ new Date(), 90),
|
|
901
901
|
end: /* @__PURE__ */ new Date()
|
|
902
902
|
}
|
|
903
|
-
}),
|
|
903
|
+
}), b(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
|
|
904
904
|
};
|
|
905
905
|
return /* @__PURE__ */ d(ge, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
906
906
|
/* @__PURE__ */ e(Te, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Be, { children: s.overview_title }) }),
|
|
907
|
-
/* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(
|
|
908
|
-
/* @__PURE__ */ d(
|
|
909
|
-
/* @__PURE__ */ e(
|
|
910
|
-
/* @__PURE__ */ e(ue, { data:
|
|
911
|
-
/* @__PURE__ */ e(
|
|
907
|
+
/* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
908
|
+
/* @__PURE__ */ d(_, { gap: 8, children: [
|
|
909
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
|
|
910
|
+
/* @__PURE__ */ e(ue, { data: B, height: 16 }),
|
|
911
|
+
/* @__PURE__ */ e(g, { variant: "Small", children: L(
|
|
912
912
|
s.spending_description,
|
|
913
913
|
T(u, "0,0"),
|
|
914
|
-
T(
|
|
914
|
+
T(p, "0,0")
|
|
915
915
|
) })
|
|
916
916
|
] }),
|
|
917
|
-
/* @__PURE__ */ d(
|
|
918
|
-
/* @__PURE__ */ d(
|
|
919
|
-
/* @__PURE__ */ e(
|
|
917
|
+
/* @__PURE__ */ d(_, { gap: 8, children: [
|
|
918
|
+
/* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
919
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: s.income_title }),
|
|
920
920
|
/* @__PURE__ */ e(
|
|
921
921
|
nt,
|
|
922
922
|
{
|
|
@@ -928,10 +928,10 @@ const ht = ({
|
|
|
928
928
|
)
|
|
929
929
|
] }),
|
|
930
930
|
/* @__PURE__ */ e(ue, { data: A, height: 16 }),
|
|
931
|
-
/* @__PURE__ */ e(
|
|
931
|
+
/* @__PURE__ */ e(g, { variant: "Small", children: L(
|
|
932
932
|
s.income_description,
|
|
933
|
-
T(
|
|
934
|
-
T(
|
|
933
|
+
T(f, "0,0"),
|
|
934
|
+
T(h, "0,0")
|
|
935
935
|
) })
|
|
936
936
|
] })
|
|
937
937
|
] }) }),
|
|
@@ -939,43 +939,43 @@ const ht = ({
|
|
|
939
939
|
M,
|
|
940
940
|
{
|
|
941
941
|
ariaLabelClose: a.close_aria,
|
|
942
|
-
isOpen:
|
|
943
|
-
onClose: () =>
|
|
942
|
+
isOpen: C,
|
|
943
|
+
onClose: () => b(!1),
|
|
944
944
|
title: n.manage_income,
|
|
945
|
-
children: /* @__PURE__ */ d(
|
|
946
|
-
/* @__PURE__ */ e(
|
|
945
|
+
children: /* @__PURE__ */ d(_, { sx: { height: "100%" }, children: [
|
|
946
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: s.income_title }),
|
|
947
947
|
/* @__PURE__ */ e(ot, { forOverview: !0 })
|
|
948
948
|
] })
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
] });
|
|
952
952
|
}), Ce = 480, Dn = I(({ onBackClick: t, sx: o }) => {
|
|
953
|
-
const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts:
|
|
954
|
-
alert:
|
|
955
|
-
dateRange:
|
|
953
|
+
const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts: p, setDisplayedDate: h, setSelectedAccounts: m } = ee(), {
|
|
954
|
+
alert: C,
|
|
955
|
+
dateRange: b,
|
|
956
956
|
isDataLoaded: u,
|
|
957
|
-
loadBudgetData:
|
|
958
|
-
setDateRange:
|
|
957
|
+
loadBudgetData: B,
|
|
958
|
+
setDateRange: f,
|
|
959
959
|
setAlert: A,
|
|
960
960
|
setTheme: x,
|
|
961
961
|
detailedBudgets: v
|
|
962
962
|
} = w(), { loadRepeatingTransactions: S, setDateRange: O } = te(), { reloadCategoryTotals: R } = j(), { isSmallTablet: z, isMobile: se, isSmallMobile: Ee } = me(), U = z || se || Ee, [Oe, ie] = l.useState(!1);
|
|
963
|
-
l.useEffect(() => (x(i),
|
|
964
|
-
|
|
963
|
+
l.useEffect(() => (x(i), m(a), f({ start: J(q()), end: de(q()) }), s(k.BUDGETS_VIEW), () => {
|
|
964
|
+
f({ start: J(q()), end: de(q()) });
|
|
965
965
|
}), []), l.useEffect(() => {
|
|
966
|
-
|
|
966
|
+
m(a);
|
|
967
967
|
}, [a]), l.useEffect(() => {
|
|
968
|
-
y && (
|
|
969
|
-
}, [y,
|
|
968
|
+
y && (h(b.start, b.end), R(p, b.start, b.end).finally(), O(b), u || (S().finally(), B().finally()));
|
|
969
|
+
}, [y, p, b]);
|
|
970
970
|
const Le = (_e) => {
|
|
971
|
-
|
|
971
|
+
f({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
|
|
972
972
|
}, Re = () => {
|
|
973
973
|
s(k.BUDGETS_CLICK_FILTER);
|
|
974
974
|
}, he = () => {
|
|
975
975
|
ie(!0), s(k.BUDGETS_CLICK_ADD);
|
|
976
976
|
}, ke = () => {
|
|
977
977
|
ie(!1);
|
|
978
|
-
}, Me = Ke(
|
|
978
|
+
}, Me = Ke(b.end, J(/* @__PURE__ */ new Date()));
|
|
979
979
|
return !c || !y || !u ? /* @__PURE__ */ e(P, {}) : /* @__PURE__ */ d(
|
|
980
980
|
Fe,
|
|
981
981
|
{
|
|
@@ -999,14 +999,14 @@ const ht = ({
|
|
|
999
999
|
children: [
|
|
1000
1000
|
(!y || !u) && /* @__PURE__ */ e(P, {}),
|
|
1001
1001
|
y && u && /* @__PURE__ */ d(
|
|
1002
|
-
|
|
1002
|
+
_,
|
|
1003
1003
|
{
|
|
1004
1004
|
direction: U ? "column" : "row",
|
|
1005
1005
|
height: "100%",
|
|
1006
1006
|
sx: { justifyContent: "center" },
|
|
1007
1007
|
width: "100%",
|
|
1008
1008
|
children: [
|
|
1009
|
-
/* @__PURE__ */ e(
|
|
1009
|
+
/* @__PURE__ */ e(_, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1010
1010
|
we,
|
|
1011
1011
|
{
|
|
1012
1012
|
createBudgetOnClick: he,
|
|
@@ -1017,7 +1017,7 @@ const ht = ({
|
|
|
1017
1017
|
}
|
|
1018
1018
|
) }),
|
|
1019
1019
|
v.length !== 0 && /* @__PURE__ */ d(
|
|
1020
|
-
|
|
1020
|
+
_,
|
|
1021
1021
|
{
|
|
1022
1022
|
gap: 24,
|
|
1023
1023
|
height: "100%",
|
|
@@ -1051,7 +1051,7 @@ const ht = ({
|
|
|
1051
1051
|
onClose: () => {
|
|
1052
1052
|
A("");
|
|
1053
1053
|
},
|
|
1054
|
-
open: !!
|
|
1054
|
+
open: !!C,
|
|
1055
1055
|
children: /* @__PURE__ */ e(
|
|
1056
1056
|
Ve,
|
|
1057
1057
|
{
|
|
@@ -1060,7 +1060,7 @@ const ht = ({
|
|
|
1060
1060
|
},
|
|
1061
1061
|
severity: "success",
|
|
1062
1062
|
variant: "filled",
|
|
1063
|
-
children:
|
|
1063
|
+
children: C
|
|
1064
1064
|
}
|
|
1065
1065
|
)
|
|
1066
1066
|
}
|