@mx-cartographer/experiences 7.12.17 → 7.13.1
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 +8 -0
- package/dist/{AccountDetailsHeader-BkEF1gO-.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
- package/dist/{AccountFields-C_dcdCM7.mjs → AccountFields-CxqONzjY.mjs} +6 -6
- package/dist/AccountListItem-LcJVJysf.mjs +90 -0
- package/dist/{AccountStore-ypdfueW9.mjs → AccountStore-BNlTuxWN.mjs} +1 -1
- package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
- package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
- package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
- package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
- package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
- package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
- package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
- package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
- package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
- package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
- package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
- package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
- package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
- package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
- package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
- package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
- package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
- package/dist/{ViewMoreMicroCard-BhG9hCoO.mjs → ViewMoreMicroCard-ApUBfGOX.mjs} +107 -106
- package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
- package/dist/accounts/index.es.js +107 -107
- package/dist/analytics/index.es.js +18 -18
- package/dist/budgets/index.es.js +182 -182
- package/dist/cashflow/index.es.js +223 -223
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +54 -64
- package/dist/common/types/Beat.d.ts +2 -0
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +469 -469
- package/dist/finstrong/index.es.js +68 -68
- package/dist/goals/index.es.js +437 -437
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +159 -159
- package/dist/investments/index.es.js +292 -292
- package/dist/merchants/index.es.js +12 -12
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +175 -168
- package/dist/notifications/index.es.js +13 -13
- package/dist/recurringtransactions/index.es.js +69 -69
- package/dist/settings/index.es.js +187 -187
- package/dist/spending/index.es.js +58 -58
- package/dist/transactions/index.es.js +70 -70
- package/dist/trends/index.es.js +16 -16
- package/package.json +1 -1
- package/dist/AccountListItem-BAf03YhK.mjs +0 -90
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
|
@@ -39,7 +39,7 @@ const F = p(({ goal: e }) => {
|
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
}),
|
|
42
|
+
}), M = p(({ goal: e }) => {
|
|
43
43
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.monthly_payment ?? 0), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
44
44
|
const n = { ...e, monthly_payment: t };
|
|
45
45
|
e.monthly_payment = t, c ? l(n) : (await m({ ...e, monthly_payment: t }), r(a.alert_goal_updated_payment));
|
|
@@ -68,12 +68,12 @@ const F = p(({ goal: e }) => {
|
|
|
68
68
|
fullWidth: !0,
|
|
69
69
|
minAmount: 0,
|
|
70
70
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
71
|
-
sx: { ".MuiTypography-
|
|
71
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
}),
|
|
76
|
+
}), z = p(({ goal: e }) => {
|
|
77
77
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.initial_amount), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
78
78
|
const n = { ...e, initial_amount: t };
|
|
79
79
|
e.initial_amount = t, c ? l(n) : (await m({ ...e, initial_amount: t }), r(a.alert_goal_updated_balance));
|
|
@@ -102,7 +102,7 @@ const F = p(({ goal: e }) => {
|
|
|
102
102
|
fullWidth: !0,
|
|
103
103
|
minAmount: 0,
|
|
104
104
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
105
|
-
sx: { ".MuiTypography-
|
|
105
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
108
|
}
|
|
@@ -110,6 +110,6 @@ const F = p(({ goal: e }) => {
|
|
|
110
110
|
});
|
|
111
111
|
export {
|
|
112
112
|
F as I,
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
M,
|
|
114
|
+
z as O
|
|
115
115
|
};
|
|
@@ -7,9 +7,9 @@ import R from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
8
|
import b from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-QvqN555q.mjs";
|
|
11
11
|
import { u as _, i as A, g as f } from "./hooks-BxkfR-Ff.mjs";
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactions-
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactions-BOzBqfdg.mjs";
|
|
13
13
|
import { A as m } from "./Analytics-BYItVAe-.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
@@ -14,8 +14,8 @@ import { addMonths as h } from "date-fns/addMonths";
|
|
|
14
14
|
import { addQuarters as Y } from "date-fns/addQuarters";
|
|
15
15
|
import { addWeeks as W } from "date-fns/addWeeks";
|
|
16
16
|
import { addYears as V } from "date-fns/addYears";
|
|
17
|
-
import { formatISO as
|
|
18
|
-
import { fromUnixTime as
|
|
17
|
+
import { formatISO as J } from "date-fns/formatISO";
|
|
18
|
+
import { fromUnixTime as X } from "date-fns/fromUnixTime";
|
|
19
19
|
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
20
20
|
import { isAfter as f } from "date-fns/isAfter";
|
|
21
21
|
import { isBefore as u } from "date-fns/isBefore";
|
|
@@ -26,7 +26,7 @@ import { parseISO as F } from "date-fns/parseISO";
|
|
|
26
26
|
import { setDate as D } from "date-fns/setDate";
|
|
27
27
|
import { setDay as R } from "date-fns/setDay";
|
|
28
28
|
import { setDayOfYear as N } from "date-fns/setDayOfYear";
|
|
29
|
-
import { startOfToday as
|
|
29
|
+
import { startOfToday as b } from "date-fns/startOfToday";
|
|
30
30
|
import { subDays as I } from "date-fns/subDays";
|
|
31
31
|
import { subMonths as q } from "date-fns/subMonths";
|
|
32
32
|
import { subQuarters as B } from "date-fns/subQuarters";
|
|
@@ -43,9 +43,9 @@ const ue = ({ iconName: e, label: a, onClick: r, value: o }) => {
|
|
|
43
43
|
C,
|
|
44
44
|
{
|
|
45
45
|
primary: a,
|
|
46
|
-
primaryTypographyProps: { variant: "
|
|
46
|
+
primaryTypographyProps: { variant: "caption" },
|
|
47
47
|
secondary: o,
|
|
48
|
-
secondaryTypographyProps: { color: "text.default", variant: "
|
|
48
|
+
secondaryTypographyProps: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
49
49
|
}
|
|
50
50
|
)
|
|
51
51
|
] });
|
|
@@ -72,7 +72,7 @@ const ue = ({ iconName: e, label: a, onClick: r, value: o }) => {
|
|
|
72
72
|
children: r.map((c) => /* @__PURE__ */ d(z, { value: c.id, children: c.label }, c.id))
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
|
-
var n = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(n || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}),
|
|
75
|
+
var n = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(n || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), g = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(g || {}), P = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(P || {});
|
|
76
76
|
const de = (e) => {
|
|
77
77
|
if (!e) return "";
|
|
78
78
|
let a = e.user_name || e.feed_name || "";
|
|
@@ -96,7 +96,7 @@ const de = (e) => {
|
|
|
96
96
|
repeatingTransactionGuid: e.guid,
|
|
97
97
|
secondRecurrenceDay: e.second_recurrence_day,
|
|
98
98
|
status: p.Upcoming,
|
|
99
|
-
type: e.repeating_transaction_type === P.Income ?
|
|
99
|
+
type: e.repeating_transaction_type === P.Income ? g.Income : g.Expense,
|
|
100
100
|
transaction: void 0
|
|
101
101
|
}, c = a.start, i = a.end;
|
|
102
102
|
switch (e.recurrence_type) {
|
|
@@ -129,7 +129,7 @@ const de = (e) => {
|
|
|
129
129
|
const _ = e.transactions.find(
|
|
130
130
|
(v) => v.repeating_transaction_guid === e.guid && v.date > y(I(m.expectedDate, 5)) && v.date < y(A(m.expectedDate, 5))
|
|
131
131
|
);
|
|
132
|
-
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate =
|
|
132
|
+
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = X(_.date)) : u(m.expectedDate, I(b(), 3)) && (m.status = p.Missed);
|
|
133
133
|
}
|
|
134
134
|
return r;
|
|
135
135
|
}, le = (e, a, r) => {
|
|
@@ -214,7 +214,7 @@ const de = (e) => {
|
|
|
214
214
|
}
|
|
215
215
|
return o;
|
|
216
216
|
}, it = (e) => e.reduce((a, r) => {
|
|
217
|
-
const o =
|
|
217
|
+
const o = J(r.expectedDate, { representation: "date" }), t = a.find(
|
|
218
218
|
(s) => s.date.toString() === r.expectedDate.toString()
|
|
219
219
|
);
|
|
220
220
|
return t ? t.recurrences.push(r) : a.push({
|
|
@@ -223,7 +223,7 @@ const de = (e) => {
|
|
|
223
223
|
recurrences: [r]
|
|
224
224
|
}), a;
|
|
225
225
|
}, []), ut = (e, a, r) => {
|
|
226
|
-
const o = E(
|
|
226
|
+
const o = E(b(), a.recurrence_day), t = N(b(), a.recurrence_day), s = Q(a.recurrence_day), c = a.second_recurrence_day ? Q(a.second_recurrence_day) : "";
|
|
227
227
|
let i = r ? l(e.monthly_ordinal, s) : e.monthly;
|
|
228
228
|
switch (a.recurrence_type) {
|
|
229
229
|
case n.EveryQuarter:
|
|
@@ -295,7 +295,7 @@ export {
|
|
|
295
295
|
ct as a,
|
|
296
296
|
nt as b,
|
|
297
297
|
p as c,
|
|
298
|
-
|
|
298
|
+
g as d,
|
|
299
299
|
dt as e,
|
|
300
300
|
it as f,
|
|
301
301
|
ut as g
|
package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs}
RENAMED
|
@@ -8,7 +8,7 @@ import { startOfMonth as y } from "date-fns/startOfMonth";
|
|
|
8
8
|
import { startOfToday as i } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as I } from "date-fns/subDays";
|
|
10
10
|
import { F as x, A as o } from "./Fetch-B6tMJC1r.mjs";
|
|
11
|
-
import { a as u, b as A, c as r, d } from "./RecurringTransactions-
|
|
11
|
+
import { a as u, b as A, c as r, d } from "./RecurringTransactions-BOzBqfdg.mjs";
|
|
12
12
|
var E = /* @__PURE__ */ ((a) => (a.Small = "small", a.Medium = "medium", a.Large = "large", a))(E || {});
|
|
13
13
|
const G = 44;
|
|
14
14
|
class h {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as
|
|
1
|
+
import { b as _ } from "./CategoryUtil-BVixr0d5.mjs";
|
|
2
2
|
import { b as p } from "./Category-CevNQ03n.mjs";
|
|
3
3
|
import { jsxs as f, Fragment as N, jsx as d } from "react/jsx-runtime";
|
|
4
|
-
import
|
|
4
|
+
import T from "react";
|
|
5
5
|
import { observer as k } from "mobx-react-lite";
|
|
6
6
|
import S from "@mui/material/Box";
|
|
7
7
|
import M from "@mui/material/Button";
|
|
@@ -11,40 +11,40 @@ import { CategoryIcon as G, CategoryIconVariants as O, Text as y, P as $ } from
|
|
|
11
11
|
import { D as j } from "./Donut-CpxJlVvJ.mjs";
|
|
12
12
|
import { u as R } from "./useAriaLive-MkYebyUR.mjs";
|
|
13
13
|
import { u as v } from "./hooks-BxkfR-Ff.mjs";
|
|
14
|
-
import { u as
|
|
14
|
+
import { u as V } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
15
15
|
import { f as x } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
16
|
-
const D = 5,
|
|
16
|
+
const D = 5, B = (i, l, g, c) => c.reduce((o, n) => {
|
|
17
17
|
const a = i.find((s) => s.guid === n.category_guid);
|
|
18
|
-
if (!a) return
|
|
19
|
-
const
|
|
20
|
-
if (!r) return
|
|
21
|
-
const
|
|
18
|
+
if (!a) return o;
|
|
19
|
+
const t = a.parent_guid ?? a.guid, r = i.find((s) => s.guid === t);
|
|
20
|
+
if (!r) return o;
|
|
21
|
+
const m = {
|
|
22
22
|
guid: a.guid,
|
|
23
|
-
name: a.guid ===
|
|
24
|
-
color:
|
|
23
|
+
name: a.guid === t ? `${l.parent_category_totals_label_general} ${a.name}` : a.name,
|
|
24
|
+
color: _(r.guid, g),
|
|
25
25
|
amount: n.total
|
|
26
|
-
}, e =
|
|
27
|
-
return e ? (e.amount += n.total, e.categoryTotals?.push(
|
|
28
|
-
guid:
|
|
26
|
+
}, e = o.find((s) => s.guid === t);
|
|
27
|
+
return e ? (e.amount += n.total, e.categoryTotals?.push(m)) : o.push({
|
|
28
|
+
guid: t,
|
|
29
29
|
name: r.name,
|
|
30
|
-
color:
|
|
31
|
-
categoryTotals: [
|
|
30
|
+
color: _(r.guid, g),
|
|
31
|
+
categoryTotals: [m],
|
|
32
32
|
amount: n.total
|
|
33
|
-
}),
|
|
34
|
-
}, []),
|
|
35
|
-
const
|
|
33
|
+
}), o;
|
|
34
|
+
}, []), nt = (i, l, g, c) => {
|
|
35
|
+
const o = B(i, l, g, c), n = o.filter(
|
|
36
36
|
(e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER && e.amount > 0
|
|
37
37
|
).sort((e, s) => s.amount - e.amount), a = n.reduce(
|
|
38
38
|
(e, s) => e + s.amount,
|
|
39
39
|
0
|
|
40
|
-
),
|
|
40
|
+
), t = n.length > D ? D : n.length, r = n.slice(0, t), m = r.map((e) => ({
|
|
41
41
|
id: e.guid,
|
|
42
|
-
color:
|
|
42
|
+
color: _(e.guid, g),
|
|
43
43
|
label: e.name,
|
|
44
44
|
value: e.amount / a * 100
|
|
45
45
|
}));
|
|
46
46
|
if (n.length > 5) {
|
|
47
|
-
const e = n.slice(D,
|
|
47
|
+
const e = n.slice(D, o.length), s = e.reduce(
|
|
48
48
|
(C, u) => C + u.amount,
|
|
49
49
|
0
|
|
50
50
|
);
|
|
@@ -54,7 +54,7 @@ const D = 5, H = (i, l, g, m) => m.reduce((t, n) => {
|
|
|
54
54
|
name: l.saving_goal_other,
|
|
55
55
|
categoryTotals: e,
|
|
56
56
|
amount: s
|
|
57
|
-
}),
|
|
57
|
+
}), m.push({
|
|
58
58
|
id: "other",
|
|
59
59
|
color: g.palette.categories.others || "",
|
|
60
60
|
label: l.saving_goal_other,
|
|
@@ -63,72 +63,72 @@ const D = 5, H = (i, l, g, m) => m.reduce((t, n) => {
|
|
|
63
63
|
}
|
|
64
64
|
return {
|
|
65
65
|
categoryData: r,
|
|
66
|
-
donutData:
|
|
66
|
+
donutData: m,
|
|
67
67
|
totalAmount: a
|
|
68
68
|
};
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
(
|
|
72
|
-
),
|
|
73
|
-
guid:
|
|
74
|
-
name: i.find((
|
|
69
|
+
}, et = (i, l, g) => {
|
|
70
|
+
const c = i.filter(
|
|
71
|
+
(t) => t.guid === p.INCOME || t.parent_guid === p.INCOME
|
|
72
|
+
), o = l.filter((t) => c.some((r) => r.guid === t.category_guid)).sort((t, r) => t.total - r.total).map((t, r) => ({
|
|
73
|
+
guid: t.category_guid,
|
|
74
|
+
name: i.find((m) => m.guid === t.category_guid)?.name,
|
|
75
75
|
color: g[r],
|
|
76
76
|
categoryTotals: [],
|
|
77
|
-
amount: Math.abs(
|
|
78
|
-
})), n =
|
|
79
|
-
(
|
|
77
|
+
amount: Math.abs(t.total)
|
|
78
|
+
})), n = o.reduce(
|
|
79
|
+
(t, r) => t + r.amount,
|
|
80
80
|
0
|
|
81
|
-
), a =
|
|
82
|
-
id:
|
|
83
|
-
color:
|
|
84
|
-
label:
|
|
85
|
-
value:
|
|
81
|
+
), a = o.map((t) => ({
|
|
82
|
+
id: t.guid,
|
|
83
|
+
color: t.color,
|
|
84
|
+
label: t.name,
|
|
85
|
+
value: t.amount / n * 100
|
|
86
86
|
}));
|
|
87
87
|
return {
|
|
88
|
-
categoryData:
|
|
88
|
+
categoryData: o,
|
|
89
89
|
donutData: a,
|
|
90
90
|
totalAmount: n
|
|
91
91
|
};
|
|
92
|
-
},
|
|
92
|
+
}, P = ({
|
|
93
93
|
data: i,
|
|
94
94
|
isIncome: l = !1,
|
|
95
95
|
onSelected: g,
|
|
96
|
-
onViewTransactions:
|
|
97
|
-
selectedId:
|
|
96
|
+
onViewTransactions: c,
|
|
97
|
+
selectedId: o,
|
|
98
98
|
size: n = 150,
|
|
99
99
|
totalLabel: a,
|
|
100
|
-
variant:
|
|
100
|
+
variant: t = "mini"
|
|
101
101
|
}) => {
|
|
102
|
-
const { spending: r } = v(),
|
|
103
|
-
() =>
|
|
104
|
-
[
|
|
102
|
+
const { spending: r } = v(), m = A(), { isTablet: e } = V(), { announce: s, ariaLive: C } = R(), u = T.useMemo(
|
|
103
|
+
() => o ? i.categoryData.find((b) => b.guid === o) : void 0,
|
|
104
|
+
[o]
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
T.useEffect(() => {
|
|
107
107
|
if (u) {
|
|
108
|
-
const b = x(u.amount,
|
|
108
|
+
const b = x(u.amount, t === "mini" ? "0,0" : "0,0.00");
|
|
109
109
|
s(`${u.name}: ${b}`);
|
|
110
110
|
}
|
|
111
|
-
}, [u, s,
|
|
112
|
-
const E = i.donutData.length > 0 ? i.donutData : [{ id: "0", color:
|
|
113
|
-
|
|
111
|
+
}, [u, s, t]);
|
|
112
|
+
const E = i.donutData.length > 0 ? i.donutData : [{ id: "0", color: m.palette.divider, value: 100 }], I = () => {
|
|
113
|
+
c?.(o);
|
|
114
114
|
}, w = e ? 32 : 48;
|
|
115
115
|
return /* @__PURE__ */ f(N, { children: [
|
|
116
116
|
C,
|
|
117
|
-
/* @__PURE__ */ d(j, { data: E, onClick: g, selectedId:
|
|
117
|
+
/* @__PURE__ */ d(j, { data: E, onClick: g, selectedId: o, size: n, children: /* @__PURE__ */ d(h, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ f(h, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
|
|
118
118
|
u && /* @__PURE__ */ f(
|
|
119
119
|
h,
|
|
120
120
|
{
|
|
121
121
|
alignItems: "center",
|
|
122
|
-
gap:
|
|
123
|
-
mb:
|
|
124
|
-
mt:
|
|
125
|
-
sx:
|
|
122
|
+
gap: t === "mini" ? 0 : 8,
|
|
123
|
+
mb: t === "mini" ? 0 : 8,
|
|
124
|
+
mt: t === "mini" ? 0 : -16,
|
|
125
|
+
sx: t === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
126
126
|
children: [
|
|
127
127
|
/* @__PURE__ */ d(S, { "aria-hidden": "true", role: "presentation", children: /* @__PURE__ */ d(
|
|
128
128
|
G,
|
|
129
129
|
{
|
|
130
130
|
categoryGuid: l ? p.INCOME : u.guid,
|
|
131
|
-
size:
|
|
131
|
+
size: t === "mini" ? 24 : w,
|
|
132
132
|
variant: O.Transparent
|
|
133
133
|
}
|
|
134
134
|
) }),
|
|
@@ -137,17 +137,17 @@ const D = 5, H = (i, l, g, m) => m.reduce((t, n) => {
|
|
|
137
137
|
{
|
|
138
138
|
color: "secondary",
|
|
139
139
|
noWrap: !0,
|
|
140
|
-
variant:
|
|
140
|
+
variant: t === "mini" ? "tiny" : "body1",
|
|
141
141
|
children: u ? u.name : a
|
|
142
142
|
}
|
|
143
143
|
)
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
|
-
!u &&
|
|
148
|
-
/* @__PURE__ */ d($, { variant:
|
|
149
|
-
!u &&
|
|
150
|
-
|
|
147
|
+
!u && t === "full" && /* @__PURE__ */ d(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: a }),
|
|
148
|
+
/* @__PURE__ */ d($, { variant: t === "mini" ? "h2" : "h1", children: u ? x(u.amount, t === "mini" ? "0,0" : "0,0.00") : x(i.totalAmount, t === "mini" ? "0,0" : "0,0.00") }),
|
|
149
|
+
!u && t === "mini" && /* @__PURE__ */ d(y, { color: "secondary", noWrap: !0, variant: "tiny", children: a }),
|
|
150
|
+
t === "full" && /* @__PURE__ */ d(
|
|
151
151
|
M,
|
|
152
152
|
{
|
|
153
153
|
"aria-label": `View ${u?.name || ""} Transactions`,
|
|
@@ -160,34 +160,34 @@ const D = 5, H = (i, l, g, m) => m.reduce((t, n) => {
|
|
|
160
160
|
)
|
|
161
161
|
] }) }) })
|
|
162
162
|
] });
|
|
163
|
-
},
|
|
164
|
-
const
|
|
165
|
-
(
|
|
163
|
+
}, rt = k(P), at = ({ data: i, onSelected: l, selectedId: g }) => {
|
|
164
|
+
const c = (o, n) => {
|
|
165
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), l(n));
|
|
166
166
|
};
|
|
167
|
-
return /* @__PURE__ */ d(h, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: i.categoryData.map((
|
|
167
|
+
return /* @__PURE__ */ d(h, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: i.categoryData.map((o) => /* @__PURE__ */ f(
|
|
168
168
|
h,
|
|
169
169
|
{
|
|
170
170
|
alignItems: "center",
|
|
171
|
-
"aria-label":
|
|
172
|
-
"aria-pressed":
|
|
171
|
+
"aria-label": o.name,
|
|
172
|
+
"aria-pressed": o.guid === g,
|
|
173
173
|
direction: "row",
|
|
174
174
|
gap: 8,
|
|
175
|
-
onClick: () => l(
|
|
176
|
-
onKeyDown: (n) =>
|
|
175
|
+
onClick: () => l(o.guid),
|
|
176
|
+
onKeyDown: (n) => c(n, o.guid),
|
|
177
177
|
role: "button",
|
|
178
178
|
sx: { cursor: "pointer" },
|
|
179
179
|
tabIndex: 0,
|
|
180
180
|
children: [
|
|
181
|
-
/* @__PURE__ */ d(S, { borderRadius: 4, height: 8, sx: { backgroundColor:
|
|
182
|
-
/* @__PURE__ */ d(y, { bold:
|
|
181
|
+
/* @__PURE__ */ d(S, { borderRadius: 4, height: 8, sx: { backgroundColor: o.color }, width: 8 }),
|
|
182
|
+
/* @__PURE__ */ d(y, { bold: o.guid === g, variant: "caption", children: o.name })
|
|
183
183
|
]
|
|
184
184
|
},
|
|
185
|
-
|
|
185
|
+
o.guid
|
|
186
186
|
)) });
|
|
187
187
|
};
|
|
188
188
|
export {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
rt as S,
|
|
190
|
+
et as a,
|
|
191
|
+
at as b,
|
|
192
|
+
nt as g
|
|
193
193
|
};
|