@mx-cartographer/experiences 7.0.37-alpha-recurring-transactions-divider-padding-ram2 → 7.0.37-alpha-testing-mr-ram1
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/{ManageIncome-BaZyK1CD.mjs → ManageIncome-4_bSdxXr.mjs} +74 -73
- package/dist/RecurringSettings-RduF8gt3.mjs +88 -0
- package/dist/budgets/index.es.js +117 -120
- package/dist/cashflow/index.es.js +2 -2
- package/dist/finstrong/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +126 -127
- package/package.json +1 -1
- package/dist/RecurringSettings-DHPyexin.mjs +0 -79
package/dist/budgets/index.es.js
CHANGED
|
@@ -4,9 +4,9 @@ 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 b from "@mui/material/Stack";
|
|
8
8
|
import Q from "@mui/material/styles/useTheme";
|
|
9
|
-
import { Icon as $, Text as
|
|
9
|
+
import { Icon as $, Text as p, CategoryIcon as H, H1 as Ge, H3 as Be } from "@mxenabled/mxui";
|
|
10
10
|
import { u as Pe } from "../BudgetUtil-n3gEKIub.mjs";
|
|
11
11
|
import { C as Ne } from "../ConnectionsDrawer-B-dZx6gH.mjs";
|
|
12
12
|
import * as E from "d3";
|
|
@@ -46,7 +46,7 @@ import { u as Qe, b as et } from "../CategorySelectorDrawer-993LpETZ.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-4_bSdxXr.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,11 +115,11 @@ 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:
|
|
118
|
+
guid: g,
|
|
119
119
|
description: h,
|
|
120
120
|
radius: m,
|
|
121
121
|
x: C,
|
|
122
|
-
y:
|
|
122
|
+
y: _
|
|
123
123
|
} = t;
|
|
124
124
|
let u = -12, B = -12;
|
|
125
125
|
m > G ? (u = -14, B = -45) : m > le && (B = -32);
|
|
@@ -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-${g}`,
|
|
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
144
|
x: C,
|
|
145
|
-
y:
|
|
145
|
+
y: _,
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
148
|
je,
|
|
@@ -151,16 +151,16 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
151
151
|
open: s,
|
|
152
152
|
slotProps: { popper: A },
|
|
153
153
|
title: f,
|
|
154
|
-
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${
|
|
154
|
+
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${g}`, r: m })
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
/* @__PURE__ */ e("svg", { x: u, y: B, children: /* @__PURE__ */ e($, { name: c, size: m <= G ? 24 : 32, sx: { fill: r } }) }),
|
|
158
158
|
m > G && /* @__PURE__ */ e(
|
|
159
|
-
|
|
159
|
+
p,
|
|
160
160
|
{
|
|
161
161
|
bold: !0,
|
|
162
162
|
component: "text",
|
|
163
|
-
id: `budget-category-${
|
|
163
|
+
id: `budget-category-${g}`,
|
|
164
164
|
sx: { fill: r },
|
|
165
165
|
variant: "Small",
|
|
166
166
|
y: 4,
|
|
@@ -168,11 +168,11 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
m > le && /* @__PURE__ */ e(
|
|
171
|
-
|
|
171
|
+
p,
|
|
172
172
|
{
|
|
173
173
|
bold: !0,
|
|
174
174
|
component: "text",
|
|
175
|
-
id: `budget-description-${
|
|
175
|
+
id: `budget-description-${g}-1`,
|
|
176
176
|
sx: { fill: r },
|
|
177
177
|
variant: "Body",
|
|
178
178
|
y: m <= G ? 12 : 24,
|
|
@@ -180,10 +180,10 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
182
|
m <= G && m > le && /* @__PURE__ */ e(
|
|
183
|
-
|
|
183
|
+
p,
|
|
184
184
|
{
|
|
185
185
|
component: "text",
|
|
186
|
-
id: `budget-description-${
|
|
186
|
+
id: `budget-description-${g}-2`,
|
|
187
187
|
sx: { fill: r },
|
|
188
188
|
variant: "XSmall",
|
|
189
189
|
y: 28,
|
|
@@ -193,7 +193,7 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
193
193
|
/* @__PURE__ */ e(gt, { bubble: t })
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
-
|
|
196
|
+
g
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
let F;
|
|
@@ -213,10 +213,10 @@ 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,
|
|
216
|
+
const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y, g] = l.useState(!1), [h, m] = l.useState(!1), C = l.useMemo(() => [...a.filter((u) => u.totalAverageAmount > 0)], [a]), _ = async () => {
|
|
217
217
|
m(!0);
|
|
218
218
|
const { data: u, isSuccess: B } = await s(C);
|
|
219
|
-
m(!1), B ? (u.length === 0 && c(!0),
|
|
219
|
+
m(!1), B ? (u.length === 0 && c(!0), g(!1)) : g(!0);
|
|
220
220
|
};
|
|
221
221
|
return h ? /* @__PURE__ */ e(P, {}) : y ? /* @__PURE__ */ e(
|
|
222
222
|
ce,
|
|
@@ -225,7 +225,7 @@ const ht = ({
|
|
|
225
225
|
icon: "error",
|
|
226
226
|
iconColor: "#4D4D4D",
|
|
227
227
|
onClick: (u) => {
|
|
228
|
-
u === "primary" ?
|
|
228
|
+
u === "primary" ? _() : 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" ? _() : 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: g } = ee(), { accounts: h } = D(), { availableWidth: m } = ze(), { isMobile: C } = me(), [_, 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(b, { 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 || !g ? /* @__PURE__ */ e(
|
|
307
307
|
bt,
|
|
308
308
|
{
|
|
309
309
|
createBudgetOnClick: t,
|
|
@@ -323,7 +323,7 @@ const ht = ({
|
|
|
323
323
|
Ne,
|
|
324
324
|
{
|
|
325
325
|
onClose: () => u(!1),
|
|
326
|
-
showConnectionsWidget:
|
|
326
|
+
showConnectionsWidget: _,
|
|
327
327
|
title: h.manage_connections
|
|
328
328
|
}
|
|
329
329
|
)
|
|
@@ -331,20 +331,20 @@ const ht = ({
|
|
|
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(b, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
335
|
+
/* @__PURE__ */ d(b, { alignItems: "center", children: [
|
|
336
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(i, "0,0") }),
|
|
337
|
+
/* @__PURE__ */ e(p, { 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(p, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
|
|
340
|
+
/* @__PURE__ */ d(b, { alignItems: "center", children: [
|
|
341
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(o, "0,0") }),
|
|
342
|
+
/* @__PURE__ */ e(p, { color: "secondary", variant: "Small", children: t.budgeted })
|
|
343
343
|
] }),
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
/* @__PURE__ */ d(
|
|
346
|
-
/* @__PURE__ */ e(
|
|
347
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(p, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
|
|
345
|
+
/* @__PURE__ */ d(b, { alignItems: "center", children: [
|
|
346
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: T(s, "0,0") }),
|
|
347
|
+
/* @__PURE__ */ e(p, { color: "secondary", variant: "Small", children: t.remaining })
|
|
348
348
|
] })
|
|
349
349
|
] });
|
|
350
350
|
}), ft = I(
|
|
@@ -362,24 +362,24 @@ 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((h) => h.totalAverageAmount > 0),
|
|
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), g = 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(p, { 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: g,
|
|
378
378
|
title: o.recalculate_title,
|
|
379
|
-
children: /* @__PURE__ */ d(
|
|
380
|
-
/* @__PURE__ */ d(
|
|
381
|
-
/* @__PURE__ */ e(
|
|
382
|
-
/* @__PURE__ */ e(
|
|
379
|
+
children: /* @__PURE__ */ d(b, { children: [
|
|
380
|
+
/* @__PURE__ */ d(b, { mx: 24, my: 16, children: [
|
|
381
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
|
|
382
|
+
/* @__PURE__ */ e(p, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
|
|
383
383
|
] }),
|
|
384
384
|
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((h) => /* @__PURE__ */ e(ft, { category: h }, h.guid)) }) })
|
|
385
385
|
] })
|
|
@@ -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(b, { gap: 16, children: [
|
|
396
|
+
/* @__PURE__ */ d(b, { children: [
|
|
397
|
+
/* @__PURE__ */ e(p, { children: L(
|
|
398
398
|
s.add_description_top,
|
|
399
399
|
T(r, "0,0")
|
|
400
400
|
) }),
|
|
401
|
-
/* @__PURE__ */ e(
|
|
401
|
+
/* @__PURE__ */ e(p, { 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(b, { 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,7 +458,7 @@ 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:
|
|
461
|
+
const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded: g, isInitialized: h, selectedAccounts: m } = ee(), { reloadCategoryTotals: C } = j(), _ = Pe(), u = s.length === 0, [B, f] = l.useState(!1), A = () => {
|
|
462
462
|
f(!0), i(k.BUDGETS_CLICK_ADD);
|
|
463
463
|
}, x = () => {
|
|
464
464
|
f(!1);
|
|
@@ -471,14 +471,14 @@ const ht = ({
|
|
|
471
471
|
n().finally();
|
|
472
472
|
}
|
|
473
473
|
);
|
|
474
|
-
}, [h, m]),
|
|
474
|
+
}, [h, m]), g ? /* @__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(b, { height: 450, mt: 32, children: [
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
483
|
we,
|
|
484
484
|
{
|
|
@@ -489,8 +489,8 @@ const ht = ({
|
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
491
|
!u && /* @__PURE__ */ d(W, { ml: 16, children: [
|
|
492
|
-
/* @__PURE__ */ e(
|
|
493
|
-
/* @__PURE__ */ e(
|
|
492
|
+
/* @__PURE__ */ e(p, { bold: !0, color: _ < 0 ? "error.main" : "success.main", children: T(Math.abs(_), "0,0") }),
|
|
493
|
+
/* @__PURE__ */ e(p, { children: _ < 0 ? c.overspent_in_budgets : c.left_in_budgets })
|
|
494
494
|
] })
|
|
495
495
|
] }) : /* @__PURE__ */ e(P, {}),
|
|
496
496
|
/* @__PURE__ */ e(
|
|
@@ -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(b, { 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(p, { 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(b, { 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(p, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
|
|
534
|
+
/* @__PURE__ */ e(p, { 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(b, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: t.category.name }) }),
|
|
550
|
+
secondary: /* @__PURE__ */ e(b, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(p, { fontWeight: 400, variant: "Body", children: `
|
|
551
551
|
${T(n, "0,0")} /
|
|
552
552
|
${T(o, "0,0")}
|
|
553
553
|
` }) })
|
|
@@ -555,7 +555,7 @@ 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), [g, h] = l.useState(!1), [m, C] = l.useState(""), [_, u] = l.useState(void 0);
|
|
559
559
|
l.useEffect(() => {
|
|
560
560
|
n((A) => {
|
|
561
561
|
const x = t.subCategories.find((v) => v.guid === A);
|
|
@@ -565,13 +565,13 @@ const ht = ({
|
|
|
565
565
|
const B = () => {
|
|
566
566
|
a(t.guid), y(!0);
|
|
567
567
|
}, f = async () => {
|
|
568
|
-
|
|
568
|
+
_ && Number(m) > 0 && (await r(_, 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: B, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(
|
|
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(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
572
|
+
/* @__PURE__ */ d(b, { 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(p, { 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
|
] }) }) }) }),
|
|
@@ -591,7 +591,7 @@ const ht = ({
|
|
|
591
591
|
{
|
|
592
592
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
593
593
|
disablePrimaryButton: Number(m) <= 0,
|
|
594
|
-
isOpen:
|
|
594
|
+
isOpen: g,
|
|
595
595
|
onClose: () => h(!1),
|
|
596
596
|
onPrimaryAction: f,
|
|
597
597
|
primaryText: i.add_save_button,
|
|
@@ -599,7 +599,7 @@ const ht = ({
|
|
|
599
599
|
re,
|
|
600
600
|
{
|
|
601
601
|
amount: m,
|
|
602
|
-
categoryName:
|
|
602
|
+
categoryName: _?.name || "",
|
|
603
603
|
onAmountChanged: C
|
|
604
604
|
}
|
|
605
605
|
)
|
|
@@ -607,10 +607,10 @@ const ht = ({
|
|
|
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: g, setFilter: h } = ne(), [m, C] = l.useState(!1), [_, u] = l.useState(!1), [B, f] = l.useState("");
|
|
611
611
|
l.useEffect(() => {
|
|
612
612
|
r && (f(`${r.amount}`), h({
|
|
613
|
-
...
|
|
613
|
+
...g,
|
|
614
614
|
custom: (S) => S.category_guid === r.category_guid
|
|
615
615
|
}));
|
|
616
616
|
}, [r]);
|
|
@@ -623,7 +623,7 @@ const ht = ({
|
|
|
623
623
|
r && await n(r.guid), u(!1), v();
|
|
624
624
|
}, v = () => {
|
|
625
625
|
h({
|
|
626
|
-
...
|
|
626
|
+
...g,
|
|
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
|
};
|
|
@@ -646,7 +646,7 @@ const ht = ({
|
|
|
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(b, { gap: 24, children: [
|
|
650
650
|
/* @__PURE__ */ e(Ie, { budget: r }),
|
|
651
651
|
/* @__PURE__ */ e(xe, { height: "100%" })
|
|
652
652
|
] })
|
|
@@ -676,33 +676,33 @@ const ht = ({
|
|
|
676
676
|
N,
|
|
677
677
|
{
|
|
678
678
|
copy: { close_aria: a.close_aria, title: s.delete_title },
|
|
679
|
-
isOpen:
|
|
679
|
+
isOpen: _,
|
|
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(p, { 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
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:
|
|
692
|
+
sortedTransactions: g,
|
|
693
693
|
sortedTransactionsWithSplits: h,
|
|
694
694
|
tags: m
|
|
695
|
-
} = ne(), [C,
|
|
696
|
-
() =>
|
|
697
|
-
[u,
|
|
695
|
+
} = ne(), [C, _] = l.useState(0), [u, B] = l.useState(""), f = l.useMemo(
|
|
696
|
+
() => g.find((S) => S.guid === u),
|
|
697
|
+
[u, g]
|
|
698
698
|
), A = (S, O) => {
|
|
699
|
-
|
|
699
|
+
_(O);
|
|
700
700
|
}, x = () => {
|
|
701
701
|
qe(h, m), i(s.alert_csv_downloaded);
|
|
702
|
-
}, v =
|
|
703
|
-
return /* @__PURE__ */ d(
|
|
702
|
+
}, v = g.length > 0 && !o && (r || y && !c);
|
|
703
|
+
return /* @__PURE__ */ d(b, { gap: 24, children: [
|
|
704
704
|
/* @__PURE__ */ e(Ie, { budget: t }),
|
|
705
|
-
/* @__PURE__ */ d(
|
|
705
|
+
/* @__PURE__ */ d(b, { children: [
|
|
706
706
|
/* @__PURE__ */ d(
|
|
707
707
|
Ze,
|
|
708
708
|
{
|
|
@@ -717,8 +717,8 @@ const ht = ({
|
|
|
717
717
|
]
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
|
-
C === 0 && /* @__PURE__ */ d(
|
|
721
|
-
v && /* @__PURE__ */ e(
|
|
720
|
+
C === 0 && /* @__PURE__ */ d(b, { children: [
|
|
721
|
+
v && /* @__PURE__ */ e(b, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
|
|
722
722
|
Ae,
|
|
723
723
|
{
|
|
724
724
|
onClick: x,
|
|
@@ -750,8 +750,8 @@ const ht = ({
|
|
|
750
750
|
selectedSubBudget: r,
|
|
751
751
|
setAlert: c,
|
|
752
752
|
setSelectedBudget: y,
|
|
753
|
-
updateBudget:
|
|
754
|
-
} = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [
|
|
753
|
+
updateBudget: g
|
|
754
|
+
} = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [_, u] = l.useState(!1), [B, f] = l.useState(!1), [A, x] = l.useState("");
|
|
755
755
|
l.useEffect(() => {
|
|
756
756
|
n && !r && (x(`${n.amount}`), C(!0), h({
|
|
757
757
|
accounts: t,
|
|
@@ -761,7 +761,7 @@ const ht = ({
|
|
|
761
761
|
}));
|
|
762
762
|
}, [n]);
|
|
763
763
|
const v = async () => {
|
|
764
|
-
n && (await
|
|
764
|
+
n && (await g({
|
|
765
765
|
...n,
|
|
766
766
|
amount: Number(A),
|
|
767
767
|
percentage: n.category.totalAmount / Number(A) * 100
|
|
@@ -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: _,
|
|
799
799
|
onClose: () => u(!1),
|
|
800
800
|
onPrimaryAction: v,
|
|
801
801
|
primaryText: o.edit_save_button,
|
|
@@ -819,7 +819,7 @@ const ht = ({
|
|
|
819
819
|
primaryColor: "error",
|
|
820
820
|
primaryText: o.details_delete_button,
|
|
821
821
|
secondaryColor: "secondary",
|
|
822
|
-
children: /* @__PURE__ */ e(
|
|
822
|
+
children: /* @__PURE__ */ e(p, { 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: g
|
|
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(b, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
842
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: t.category.name }),
|
|
843
|
+
/* @__PURE__ */ e(p, { fontWeight: 400, variant: "Body", children: `
|
|
844
|
+
${T(g, "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(b, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
849
|
+
/* @__PURE__ */ e(p, { variant: "XSmall", children: `${y.length} Sub-budgets` }),
|
|
850
|
+
/* @__PURE__ */ e(p, { 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: g } = w(), { incomeTotal: h } = te(), { setFilter: m } = ne(), [C, _] = 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 / g;
|
|
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);
|
|
@@ -900,23 +900,23 @@ const ht = ({
|
|
|
900
900
|
start: tt(/* @__PURE__ */ new Date(), 90),
|
|
901
901
|
end: /* @__PURE__ */ new Date()
|
|
902
902
|
}
|
|
903
|
-
}),
|
|
903
|
+
}), _(!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(
|
|
907
|
+
/* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(b, { gap: 24, children: [
|
|
908
|
+
/* @__PURE__ */ d(b, { gap: 8, children: [
|
|
909
|
+
/* @__PURE__ */ e(p, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
|
|
910
910
|
/* @__PURE__ */ e(ue, { data: B, height: 16 }),
|
|
911
|
-
/* @__PURE__ */ e(
|
|
911
|
+
/* @__PURE__ */ e(p, { variant: "Small", children: L(
|
|
912
912
|
s.spending_description,
|
|
913
913
|
T(u, "0,0"),
|
|
914
|
-
T(
|
|
914
|
+
T(g, "0,0")
|
|
915
915
|
) })
|
|
916
916
|
] }),
|
|
917
|
-
/* @__PURE__ */ d(
|
|
918
|
-
/* @__PURE__ */ d(
|
|
919
|
-
/* @__PURE__ */ e(
|
|
917
|
+
/* @__PURE__ */ d(b, { gap: 8, children: [
|
|
918
|
+
/* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
919
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "Body", children: s.income_title }),
|
|
920
920
|
/* @__PURE__ */ e(
|
|
921
921
|
nt,
|
|
922
922
|
{
|
|
@@ -928,7 +928,7 @@ const ht = ({
|
|
|
928
928
|
)
|
|
929
929
|
] }),
|
|
930
930
|
/* @__PURE__ */ e(ue, { data: A, height: 16 }),
|
|
931
|
-
/* @__PURE__ */ e(
|
|
931
|
+
/* @__PURE__ */ e(p, { variant: "Small", children: L(
|
|
932
932
|
s.income_description,
|
|
933
933
|
T(f, "0,0"),
|
|
934
934
|
T(h, "0,0")
|
|
@@ -940,19 +940,16 @@ const ht = ({
|
|
|
940
940
|
{
|
|
941
941
|
ariaLabelClose: a.close_aria,
|
|
942
942
|
isOpen: C,
|
|
943
|
-
onClose: () =>
|
|
943
|
+
onClose: () => _(!1),
|
|
944
944
|
title: n.manage_income,
|
|
945
|
-
children: /* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */ e(g, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: s.income_title }),
|
|
947
|
-
/* @__PURE__ */ e(ot, { forOverview: !0 })
|
|
948
|
-
] })
|
|
945
|
+
children: /* @__PURE__ */ e(ot, { forOverview: !0 })
|
|
949
946
|
}
|
|
950
947
|
)
|
|
951
948
|
] });
|
|
952
949
|
}), 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:
|
|
950
|
+
const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts: g, setDisplayedDate: h, setSelectedAccounts: m } = ee(), {
|
|
954
951
|
alert: C,
|
|
955
|
-
dateRange:
|
|
952
|
+
dateRange: _,
|
|
956
953
|
isDataLoaded: u,
|
|
957
954
|
loadBudgetData: B,
|
|
958
955
|
setDateRange: f,
|
|
@@ -965,8 +962,8 @@ const ht = ({
|
|
|
965
962
|
}), []), l.useEffect(() => {
|
|
966
963
|
m(a);
|
|
967
964
|
}, [a]), l.useEffect(() => {
|
|
968
|
-
y && (h(
|
|
969
|
-
}, [y,
|
|
965
|
+
y && (h(_.start, _.end), R(g, _.start, _.end).finally(), O(_), u || (S().finally(), B().finally()));
|
|
966
|
+
}, [y, g, _]);
|
|
970
967
|
const Le = (_e) => {
|
|
971
968
|
f({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
|
|
972
969
|
}, Re = () => {
|
|
@@ -975,7 +972,7 @@ const ht = ({
|
|
|
975
972
|
ie(!0), s(k.BUDGETS_CLICK_ADD);
|
|
976
973
|
}, ke = () => {
|
|
977
974
|
ie(!1);
|
|
978
|
-
}, Me = Ke(
|
|
975
|
+
}, Me = Ke(_.end, J(/* @__PURE__ */ new Date()));
|
|
979
976
|
return !c || !y || !u ? /* @__PURE__ */ e(P, {}) : /* @__PURE__ */ d(
|
|
980
977
|
Fe,
|
|
981
978
|
{
|
|
@@ -999,14 +996,14 @@ const ht = ({
|
|
|
999
996
|
children: [
|
|
1000
997
|
(!y || !u) && /* @__PURE__ */ e(P, {}),
|
|
1001
998
|
y && u && /* @__PURE__ */ d(
|
|
1002
|
-
|
|
999
|
+
b,
|
|
1003
1000
|
{
|
|
1004
1001
|
direction: U ? "column" : "row",
|
|
1005
1002
|
height: "100%",
|
|
1006
1003
|
sx: { justifyContent: "center" },
|
|
1007
1004
|
width: "100%",
|
|
1008
1005
|
children: [
|
|
1009
|
-
/* @__PURE__ */ e(
|
|
1006
|
+
/* @__PURE__ */ e(b, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1010
1007
|
we,
|
|
1011
1008
|
{
|
|
1012
1009
|
createBudgetOnClick: he,
|
|
@@ -1017,7 +1014,7 @@ const ht = ({
|
|
|
1017
1014
|
}
|
|
1018
1015
|
) }),
|
|
1019
1016
|
v.length !== 0 && /* @__PURE__ */ d(
|
|
1020
|
-
|
|
1017
|
+
b,
|
|
1021
1018
|
{
|
|
1022
1019
|
gap: 24,
|
|
1023
1020
|
height: "100%",
|