@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.0
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 +71 -0
- package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
- package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
- package/dist/Accounts-UIlYCmHb.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-CXvenbdN.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
- package/dist/CategoryStore-BEdFs69_.mjs +183 -0
- package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DZ10CbWd.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
- package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
- package/dist/TransactionStore-C1oyQCZK.mjs +677 -0
- package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +241 -203
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +500 -507
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +384 -382
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/charts/index.d.ts +0 -2
- package/dist/common/index.es.js +391 -376
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +506 -498
- package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-B8qpk5MU.mjs} +14 -13
- package/dist/finstrong/index.es.js +417 -415
- package/dist/goals/index.es.js +559 -557
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +437 -435
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -1
- package/dist/networth/index.es.js +176 -174
- package/dist/notifications/index.es.js +23 -23
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +175 -173
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +285 -279
- package/dist/spending/index.es.js +282 -281
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/index.es.js +63 -64
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/index.es.js +948 -583
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,142 +1,141 @@
|
|
|
1
|
-
import { jsxs as h, jsx as t, Fragment as
|
|
1
|
+
import { jsxs as h, jsx as t, Fragment as ht } from "react/jsx-runtime";
|
|
2
2
|
import p from "react";
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
5
|
-
import { endOfMonth as
|
|
6
|
-
import
|
|
3
|
+
import { observer as I } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as ot } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as at } from "date-fns/endOfMonth";
|
|
6
|
+
import w from "@mui/material/Box";
|
|
7
7
|
import C from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { b as V } from "../CategoryUtil-
|
|
12
|
-
import { b as
|
|
13
|
-
import { Text as y, CategoryIcon as
|
|
14
|
-
import { f as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import { useTheme as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import { D as
|
|
8
|
+
import L from "@mui/material/Tab";
|
|
9
|
+
import it from "@mui/material/Tabs";
|
|
10
|
+
import ft from "@mui/material/styles/useTheme";
|
|
11
|
+
import { b as V } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
12
|
+
import { b as _ } from "../Category-CevNQ03n.mjs";
|
|
13
|
+
import { Text as y, CategoryIcon as yt, CategoryIconVariants as bt } from "@mxenabled/mxui";
|
|
14
|
+
import { f as v } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
15
|
+
import { c as Ct, T as _t, a as St } from "../TransactionDetails-BUoNbsu-.mjs";
|
|
16
|
+
import Tt from "@mui/material/Button";
|
|
17
|
+
import { useTheme as rt } from "@mui/material";
|
|
18
|
+
import { u as E, b as O, m as z, d as st, n as Mt, a as lt, h as Dt, g as xt } from "../hooks-Cy8JnjCg.mjs";
|
|
19
|
+
import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
20
|
+
import { D as wt } from "../Donut-oaQFlbit.mjs";
|
|
21
21
|
import { L as F } from "../Loader-DUaFpDGv.mjs";
|
|
22
|
-
import { M as
|
|
23
|
-
import { startOfToday as
|
|
24
|
-
import
|
|
25
|
-
import wt from "@mui/material/Collapse";
|
|
22
|
+
import { M as vt } from "../MiniWidgetContainer-BdgBvpga.mjs";
|
|
23
|
+
import { startOfToday as q } from "date-fns/startOfToday";
|
|
24
|
+
import It from "@mui/material/Collapse";
|
|
26
25
|
import B from "@mui/material/Divider";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { D as
|
|
31
|
-
import { A as
|
|
32
|
-
const j = 5,
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
const
|
|
26
|
+
import J from "@mui/material/List";
|
|
27
|
+
import Q from "@mui/material/ListItem";
|
|
28
|
+
import Et from "@mui/material/ListItemButton";
|
|
29
|
+
import { D as Z } from "../Drawer-kEE73B87.mjs";
|
|
30
|
+
import { A as tt, W as At } from "../WidgetContainer-BnTgAfQn.mjs";
|
|
31
|
+
const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
|
|
32
|
+
if (n.total > 0) {
|
|
33
|
+
const a = o.find((s) => s.guid === n.category_guid);
|
|
34
|
+
if (!a) return l;
|
|
35
|
+
const i = a.parent_guid ?? a.guid, e = o.find((s) => s.guid === i);
|
|
37
36
|
if (!e) return l;
|
|
38
|
-
const
|
|
39
|
-
guid:
|
|
40
|
-
name:
|
|
41
|
-
color: V(e.guid,
|
|
42
|
-
amount:
|
|
43
|
-
}, u = l.find((s) => s.guid ===
|
|
44
|
-
u ? (u.amount +=
|
|
45
|
-
guid:
|
|
37
|
+
const c = {
|
|
38
|
+
guid: a.guid,
|
|
39
|
+
name: a.guid === i ? `General ${a.name}` : a.name,
|
|
40
|
+
color: V(e.guid, d),
|
|
41
|
+
amount: n.total
|
|
42
|
+
}, u = l.find((s) => s.guid === i);
|
|
43
|
+
u ? (u.amount += n.total, u.categoryTotals?.push(c)) : l.push({
|
|
44
|
+
guid: i,
|
|
46
45
|
name: e.name,
|
|
47
|
-
color: V(e.guid,
|
|
48
|
-
categoryTotals: [
|
|
49
|
-
amount:
|
|
46
|
+
color: V(e.guid, d),
|
|
47
|
+
categoryTotals: [c],
|
|
48
|
+
amount: n.total
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
return l;
|
|
53
|
-
}, []),
|
|
54
|
-
const
|
|
55
|
-
(s) => s.guid !==
|
|
56
|
-
).sort((s, m) => m.amount - s.amount),
|
|
52
|
+
}, []), dt = (o, d, r, l) => {
|
|
53
|
+
const n = Lt(o, r, l), a = n.filter(
|
|
54
|
+
(s) => s.guid !== _.INCOME && s.guid !== _.INVESTMENTS && s.guid !== _.TRANSFER
|
|
55
|
+
).sort((s, m) => m.amount - s.amount), i = a.reduce(
|
|
57
56
|
(s, m) => s + m.amount,
|
|
58
57
|
0
|
|
59
|
-
), e =
|
|
58
|
+
), e = a.length > j ? j : a.length, c = a.slice(0, e), u = c.map((s) => ({
|
|
60
59
|
id: s.guid,
|
|
61
60
|
color: V(s.guid, r),
|
|
62
61
|
label: s.name,
|
|
63
|
-
value: s.amount /
|
|
62
|
+
value: s.amount / i * 100
|
|
64
63
|
}));
|
|
65
|
-
if (
|
|
66
|
-
const s =
|
|
67
|
-
(
|
|
64
|
+
if (a.length > 5) {
|
|
65
|
+
const s = a.slice(j, n.length), m = s.reduce(
|
|
66
|
+
(S, g) => S + g.amount,
|
|
68
67
|
0
|
|
69
68
|
);
|
|
70
|
-
|
|
69
|
+
c.push({
|
|
71
70
|
guid: "other",
|
|
72
71
|
color: r.palette.categories.others || "",
|
|
73
|
-
name:
|
|
72
|
+
name: d.saving_goal_other,
|
|
74
73
|
categoryTotals: s,
|
|
75
74
|
amount: m
|
|
76
75
|
}), u.push({
|
|
77
76
|
id: "other",
|
|
78
77
|
color: r.palette.categories.others || "",
|
|
79
|
-
label:
|
|
80
|
-
value: m /
|
|
78
|
+
label: d.saving_goal_other,
|
|
79
|
+
value: m / i * 100
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
82
|
return {
|
|
84
|
-
categoryData:
|
|
83
|
+
categoryData: c,
|
|
85
84
|
donutData: u,
|
|
86
|
-
totalAmount:
|
|
85
|
+
totalAmount: i
|
|
87
86
|
};
|
|
88
|
-
},
|
|
89
|
-
const l =
|
|
90
|
-
(e) => e.guid ===
|
|
91
|
-
),
|
|
87
|
+
}, gt = (o, d, r) => {
|
|
88
|
+
const l = o.filter(
|
|
89
|
+
(e) => e.guid === _.INCOME || e.parent_guid === _.INCOME
|
|
90
|
+
), n = d.filter((e) => l.some((c) => c.guid === e.category_guid)).sort((e, c) => e.total - c.total).map((e, c) => ({
|
|
92
91
|
guid: e.category_guid,
|
|
93
|
-
name:
|
|
94
|
-
color: r[
|
|
92
|
+
name: o.find((u) => u.guid === e.category_guid)?.name,
|
|
93
|
+
color: r[c],
|
|
95
94
|
categoryTotals: [],
|
|
96
95
|
amount: Math.abs(e.total)
|
|
97
|
-
})),
|
|
98
|
-
(e,
|
|
96
|
+
})), a = n.reduce(
|
|
97
|
+
(e, c) => e + c.amount,
|
|
99
98
|
0
|
|
100
|
-
),
|
|
99
|
+
), i = n.map((e) => ({
|
|
101
100
|
id: e.guid,
|
|
102
101
|
color: e.color,
|
|
103
102
|
label: e.name,
|
|
104
|
-
value: e.amount /
|
|
103
|
+
value: e.amount / a * 100
|
|
105
104
|
}));
|
|
106
105
|
return {
|
|
107
|
-
categoryData:
|
|
108
|
-
donutData:
|
|
109
|
-
totalAmount:
|
|
106
|
+
categoryData: n,
|
|
107
|
+
donutData: i,
|
|
108
|
+
totalAmount: a
|
|
110
109
|
};
|
|
111
|
-
},
|
|
112
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children:
|
|
113
|
-
/* @__PURE__ */ t(y, { variant: "XSmall", children:
|
|
114
|
-
] }),
|
|
115
|
-
data:
|
|
116
|
-
isIncome:
|
|
110
|
+
}, N = ({ amount: o, label: d }) => /* @__PURE__ */ h(C, { direction: "column", children: [
|
|
111
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
|
|
112
|
+
/* @__PURE__ */ t(y, { variant: "XSmall", children: v(o, "0,0") })
|
|
113
|
+
] }), Nt = ({
|
|
114
|
+
data: o,
|
|
115
|
+
isIncome: d = !1,
|
|
117
116
|
onSelected: r,
|
|
118
117
|
onViewTransactions: l,
|
|
119
|
-
selectedId:
|
|
120
|
-
size:
|
|
121
|
-
totalLabel:
|
|
118
|
+
selectedId: n,
|
|
119
|
+
size: a = 150,
|
|
120
|
+
totalLabel: i,
|
|
122
121
|
variant: e = "mini"
|
|
123
122
|
}) => {
|
|
124
|
-
const { spending:
|
|
125
|
-
() =>
|
|
126
|
-
[
|
|
123
|
+
const { spending: c } = E(), u = rt(), { isTablet: s } = ct(), { announce: m, ariaLive: S } = Ct(), g = p.useMemo(
|
|
124
|
+
() => n ? o.categoryData.find((b) => b.guid === n) : void 0,
|
|
125
|
+
[n]
|
|
127
126
|
);
|
|
128
127
|
p.useEffect(() => {
|
|
129
128
|
if (g) {
|
|
130
|
-
const
|
|
131
|
-
m(`${g.name}: ${
|
|
129
|
+
const b = v(g.amount, "0,0");
|
|
130
|
+
m(`${g.name}: ${b}`);
|
|
132
131
|
}
|
|
133
132
|
}, [g, m]);
|
|
134
|
-
const
|
|
135
|
-
l?.(
|
|
136
|
-
},
|
|
137
|
-
return /* @__PURE__ */ h(
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */ t(
|
|
133
|
+
const T = p.useMemo(() => o.donutData.length > 0 ? o.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [o, u]), x = () => {
|
|
134
|
+
l?.(n);
|
|
135
|
+
}, D = s ? 32 : 48;
|
|
136
|
+
return /* @__PURE__ */ h(ht, { children: [
|
|
137
|
+
S,
|
|
138
|
+
/* @__PURE__ */ t(wt, { data: T, onClick: r, selectedId: n, size: a, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(C, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: [
|
|
140
139
|
g && /* @__PURE__ */ h(
|
|
141
140
|
C,
|
|
142
141
|
{
|
|
@@ -147,11 +146,11 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
147
146
|
sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
148
147
|
children: [
|
|
149
148
|
/* @__PURE__ */ t(
|
|
150
|
-
|
|
149
|
+
yt,
|
|
151
150
|
{
|
|
152
|
-
categoryGuid:
|
|
153
|
-
size: e === "mini" ? 24 :
|
|
154
|
-
variant:
|
|
151
|
+
categoryGuid: d ? _.INCOME : g.guid,
|
|
152
|
+
size: e === "mini" ? 24 : D,
|
|
153
|
+
variant: bt.Transparent
|
|
155
154
|
}
|
|
156
155
|
),
|
|
157
156
|
/* @__PURE__ */ t(
|
|
@@ -160,103 +159,103 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
160
159
|
color: "secondary",
|
|
161
160
|
noWrap: !0,
|
|
162
161
|
variant: e === "mini" ? "Tiny" : "Body",
|
|
163
|
-
children: g ? g.name :
|
|
162
|
+
children: g ? g.name : i
|
|
164
163
|
}
|
|
165
164
|
)
|
|
166
165
|
]
|
|
167
166
|
}
|
|
168
167
|
),
|
|
169
|
-
!g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children:
|
|
170
|
-
/* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ?
|
|
171
|
-
!g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children:
|
|
168
|
+
!g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: i }),
|
|
169
|
+
/* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ? v(g.amount, "0,0") : v(o.totalAmount, "0,0") }),
|
|
170
|
+
!g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children: i }),
|
|
172
171
|
e === "full" && /* @__PURE__ */ t(
|
|
173
|
-
|
|
172
|
+
Tt,
|
|
174
173
|
{
|
|
175
174
|
"aria-label": `View ${g?.name || ""} Transactions`,
|
|
176
|
-
disabled:
|
|
177
|
-
onClick:
|
|
175
|
+
disabled: o.categoryData.length === 0,
|
|
176
|
+
onClick: x,
|
|
178
177
|
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
179
178
|
variant: "text",
|
|
180
|
-
children:
|
|
179
|
+
children: c.view_transactions
|
|
181
180
|
}
|
|
182
181
|
)
|
|
183
182
|
] }) }) })
|
|
184
183
|
] });
|
|
185
|
-
},
|
|
186
|
-
const l = (
|
|
187
|
-
(
|
|
184
|
+
}, W = I(Nt), et = ({ data: o, onSelected: d, selectedId: r }) => {
|
|
185
|
+
const l = (n, a) => {
|
|
186
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), d(a));
|
|
188
187
|
};
|
|
189
|
-
return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children:
|
|
188
|
+
return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: o.categoryData.map((n) => /* @__PURE__ */ h(
|
|
190
189
|
C,
|
|
191
190
|
{
|
|
192
191
|
alignItems: "center",
|
|
193
|
-
"aria-label":
|
|
194
|
-
"aria-pressed":
|
|
192
|
+
"aria-label": n.name,
|
|
193
|
+
"aria-pressed": n.guid === r,
|
|
195
194
|
direction: "row",
|
|
196
195
|
gap: 8,
|
|
197
|
-
onClick: () =>
|
|
198
|
-
onKeyDown: (
|
|
196
|
+
onClick: () => d(n.guid),
|
|
197
|
+
onKeyDown: (a) => l(a, n.guid),
|
|
199
198
|
role: "button",
|
|
200
199
|
sx: { cursor: "pointer" },
|
|
201
200
|
tabIndex: 0,
|
|
202
201
|
children: [
|
|
203
|
-
/* @__PURE__ */ t(
|
|
204
|
-
/* @__PURE__ */ t(y, { bold:
|
|
202
|
+
/* @__PURE__ */ t(w, { borderRadius: 4, height: 8, sx: { backgroundColor: n.color }, width: 8 }),
|
|
203
|
+
/* @__PURE__ */ t(y, { bold: n.guid === r, variant: "XSmall", children: n.name })
|
|
205
204
|
]
|
|
206
205
|
},
|
|
207
|
-
|
|
206
|
+
n.guid
|
|
208
207
|
)) });
|
|
209
|
-
},
|
|
210
|
-
const
|
|
211
|
-
categories:
|
|
212
|
-
dateRangeCategoryTotals:
|
|
213
|
-
dataRangeTotalsLoaded:
|
|
208
|
+
}, Wt = () => {
|
|
209
|
+
const o = ft(), { goals: d, spending: r } = E(), { selectedAccounts: l } = O(), {
|
|
210
|
+
categories: n,
|
|
211
|
+
dateRangeCategoryTotals: a,
|
|
212
|
+
dataRangeTotalsLoaded: i,
|
|
214
213
|
loadDateRangeCategoryTotals: e
|
|
215
|
-
} = z(),
|
|
214
|
+
} = z(), c = p.useMemo(
|
|
216
215
|
() => [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
o.palette.chartMono.chartMono5,
|
|
217
|
+
o.palette.chartMono.chartMono4,
|
|
218
|
+
o.palette.chartMono.chartMono3,
|
|
219
|
+
o.palette.chartMono.chartMono2,
|
|
220
|
+
o.palette.chartMono.chartMono1,
|
|
221
|
+
o.palette.chartMono.chartMono6
|
|
223
222
|
],
|
|
224
|
-
[
|
|
223
|
+
[o]
|
|
225
224
|
);
|
|
226
225
|
p.useEffect(() => {
|
|
227
226
|
e(
|
|
228
227
|
l,
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
ot(/* @__PURE__ */ new Date()),
|
|
229
|
+
at(/* @__PURE__ */ new Date())
|
|
231
230
|
).finally();
|
|
232
231
|
}, [l]);
|
|
233
|
-
const [u, s] = p.useState(""), [m,
|
|
234
|
-
() =>
|
|
235
|
-
[
|
|
236
|
-
),
|
|
237
|
-
() =>
|
|
238
|
-
[
|
|
239
|
-
),
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
s(u ===
|
|
232
|
+
const [u, s] = p.useState(""), [m, S] = p.useState(0), g = p.useMemo(
|
|
233
|
+
() => dt(n, d, o, a),
|
|
234
|
+
[n, a]
|
|
235
|
+
), T = p.useMemo(
|
|
236
|
+
() => gt(n, a, c),
|
|
237
|
+
[n, a, c]
|
|
238
|
+
), x = (b, R) => {
|
|
239
|
+
S(R), s("");
|
|
240
|
+
}, D = (b) => {
|
|
241
|
+
s(u === b ? "" : b);
|
|
243
242
|
};
|
|
244
|
-
return
|
|
243
|
+
return i ? /* @__PURE__ */ h(w, { width: "100%", children: [
|
|
245
244
|
/* @__PURE__ */ h(
|
|
246
|
-
|
|
245
|
+
it,
|
|
247
246
|
{
|
|
248
247
|
"aria-label": r.mini_title,
|
|
249
|
-
onChange:
|
|
248
|
+
onChange: x,
|
|
250
249
|
value: m,
|
|
251
250
|
variant: "fullWidth",
|
|
252
251
|
children: [
|
|
253
252
|
/* @__PURE__ */ t(
|
|
254
|
-
|
|
253
|
+
L,
|
|
255
254
|
{
|
|
256
255
|
"aria-controls": "spending-tabpanel",
|
|
257
256
|
id: "spending-tab",
|
|
258
257
|
label: /* @__PURE__ */ t(
|
|
259
|
-
|
|
258
|
+
N,
|
|
260
259
|
{
|
|
261
260
|
amount: g.totalAmount,
|
|
262
261
|
label: r.spend_tab_title
|
|
@@ -266,14 +265,14 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
266
265
|
}
|
|
267
266
|
),
|
|
268
267
|
/* @__PURE__ */ t(
|
|
269
|
-
|
|
268
|
+
L,
|
|
270
269
|
{
|
|
271
270
|
"aria-controls": "income-tabpanel",
|
|
272
271
|
id: "income-tab",
|
|
273
272
|
label: /* @__PURE__ */ t(
|
|
274
|
-
|
|
273
|
+
N,
|
|
275
274
|
{
|
|
276
|
-
amount:
|
|
275
|
+
amount: T.totalAmount,
|
|
277
276
|
label: r.income_tab_title
|
|
278
277
|
}
|
|
279
278
|
),
|
|
@@ -284,7 +283,7 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
284
283
|
}
|
|
285
284
|
),
|
|
286
285
|
/* @__PURE__ */ t(
|
|
287
|
-
|
|
286
|
+
w,
|
|
288
287
|
{
|
|
289
288
|
"aria-labelledby": "spending-tab",
|
|
290
289
|
hidden: m !== 0,
|
|
@@ -292,20 +291,20 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
292
291
|
role: "tabpanel",
|
|
293
292
|
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
294
293
|
/* @__PURE__ */ t(
|
|
295
|
-
|
|
294
|
+
W,
|
|
296
295
|
{
|
|
297
296
|
data: g,
|
|
298
|
-
onSelected:
|
|
297
|
+
onSelected: D,
|
|
299
298
|
selectedId: u,
|
|
300
299
|
totalLabel: r.total_spending
|
|
301
300
|
}
|
|
302
301
|
),
|
|
303
|
-
/* @__PURE__ */ t(
|
|
302
|
+
/* @__PURE__ */ t(et, { data: g, onSelected: D, selectedId: u })
|
|
304
303
|
] })
|
|
305
304
|
}
|
|
306
305
|
),
|
|
307
306
|
/* @__PURE__ */ t(
|
|
308
|
-
|
|
307
|
+
w,
|
|
309
308
|
{
|
|
310
309
|
"aria-labelledby": "income-tab",
|
|
311
310
|
hidden: m !== 1,
|
|
@@ -313,48 +312,48 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
313
312
|
role: "tabpanel",
|
|
314
313
|
children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
315
314
|
/* @__PURE__ */ t(
|
|
316
|
-
|
|
315
|
+
W,
|
|
317
316
|
{
|
|
318
|
-
data:
|
|
317
|
+
data: T,
|
|
319
318
|
isIncome: !0,
|
|
320
|
-
onSelected:
|
|
319
|
+
onSelected: D,
|
|
321
320
|
selectedId: u,
|
|
322
321
|
totalLabel: r.total_income
|
|
323
322
|
}
|
|
324
323
|
),
|
|
325
|
-
/* @__PURE__ */ t(
|
|
324
|
+
/* @__PURE__ */ t(et, { data: T, onSelected: D, selectedId: u })
|
|
326
325
|
] })
|
|
327
326
|
}
|
|
328
327
|
)
|
|
329
328
|
] }) : /* @__PURE__ */ t(F, { height: 250 });
|
|
330
|
-
},
|
|
331
|
-
const { visibleAccounts: r } =
|
|
329
|
+
}, Ot = I(Wt), Rt = ({ onPrimaryCtaClick: o, sx: d = {} }) => {
|
|
330
|
+
const { visibleAccounts: r } = st(), { spending: l } = E(), { isCopyLoaded: n, isInitialized: a, setSelectedAccounts: i } = O();
|
|
332
331
|
return p.useEffect(() => {
|
|
333
|
-
|
|
334
|
-
}, [r]), !
|
|
335
|
-
|
|
332
|
+
i(r);
|
|
333
|
+
}, [r]), !n || !a ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
334
|
+
vt,
|
|
336
335
|
{
|
|
337
336
|
className: "mx-exp-spending-miniwidget",
|
|
338
|
-
onPrimaryCtaClick:
|
|
337
|
+
onPrimaryCtaClick: o,
|
|
339
338
|
primaryCtaLabel: l.primary_cta,
|
|
340
|
-
sx:
|
|
339
|
+
sx: d,
|
|
341
340
|
title: l.mini_title,
|
|
342
|
-
children: /* @__PURE__ */ t(
|
|
341
|
+
children: /* @__PURE__ */ t(Ot, {})
|
|
343
342
|
}
|
|
344
343
|
);
|
|
345
|
-
},
|
|
346
|
-
data:
|
|
347
|
-
onSelected:
|
|
344
|
+
}, Ce = I(Rt), kt = ({
|
|
345
|
+
data: o,
|
|
346
|
+
onSelected: d,
|
|
348
347
|
selectedId: r = "",
|
|
349
348
|
title: l
|
|
350
349
|
}) => {
|
|
351
|
-
const { spending:
|
|
350
|
+
const { spending: n } = E(), a = o.categoryData.find((i) => i.guid === r);
|
|
352
351
|
return /* @__PURE__ */ h(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
353
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${
|
|
352
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${n.by_category}` }),
|
|
354
353
|
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
355
|
-
/* @__PURE__ */ t(
|
|
354
|
+
/* @__PURE__ */ t(J, { children: o.categoryData.map((i) => /* @__PURE__ */ h(p.Fragment, { children: [
|
|
356
355
|
/* @__PURE__ */ t(
|
|
357
|
-
|
|
356
|
+
Q,
|
|
358
357
|
{
|
|
359
358
|
disableGutters: !0,
|
|
360
359
|
disablePadding: !0,
|
|
@@ -362,19 +361,19 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
362
361
|
minHeight: 44
|
|
363
362
|
},
|
|
364
363
|
children: /* @__PURE__ */ h(
|
|
365
|
-
|
|
364
|
+
Et,
|
|
366
365
|
{
|
|
367
|
-
"aria-expanded":
|
|
368
|
-
onClick: () =>
|
|
366
|
+
"aria-expanded": a?.guid === i.guid,
|
|
367
|
+
onClick: () => d(i.guid),
|
|
369
368
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
370
369
|
children: [
|
|
371
370
|
/* @__PURE__ */ t(
|
|
372
|
-
|
|
371
|
+
w,
|
|
373
372
|
{
|
|
374
373
|
borderRadius: 4,
|
|
375
374
|
flexShrink: 0,
|
|
376
375
|
height: 8,
|
|
377
|
-
sx: { backgroundColor:
|
|
376
|
+
sx: { backgroundColor: i.color, mr: 8 },
|
|
378
377
|
width: 8
|
|
379
378
|
}
|
|
380
379
|
),
|
|
@@ -386,8 +385,8 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
386
385
|
justifyContent: "space-between",
|
|
387
386
|
width: "100%",
|
|
388
387
|
children: [
|
|
389
|
-
/* @__PURE__ */ t(y, { bold: r ===
|
|
390
|
-
/* @__PURE__ */ t(y, { bold: r ===
|
|
388
|
+
/* @__PURE__ */ t(y, { bold: r === i.guid, children: i.name }),
|
|
389
|
+
/* @__PURE__ */ t(y, { bold: r === i.guid, variant: "Body", children: v(i.amount, "0,0") })
|
|
391
390
|
]
|
|
392
391
|
}
|
|
393
392
|
)
|
|
@@ -397,9 +396,9 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
397
396
|
}
|
|
398
397
|
),
|
|
399
398
|
/* @__PURE__ */ t(B, {}),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
i.categoryTotals && i.categoryTotals.length > 0 && /* @__PURE__ */ t(It, { in: a?.guid === i.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(J, { children: [
|
|
400
|
+
a?.categoryTotals?.map((e) => /* @__PURE__ */ t(
|
|
401
|
+
Q,
|
|
403
402
|
{
|
|
404
403
|
sx: {
|
|
405
404
|
pl: 24,
|
|
@@ -411,36 +410,36 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
411
410
|
e.name,
|
|
412
411
|
" "
|
|
413
412
|
] }),
|
|
414
|
-
/* @__PURE__ */ t(y, { children:
|
|
413
|
+
/* @__PURE__ */ t(y, { children: v(e.amount, "0,0") })
|
|
415
414
|
] })
|
|
416
415
|
},
|
|
417
416
|
e.guid
|
|
418
417
|
)),
|
|
419
418
|
/* @__PURE__ */ t(B, {})
|
|
420
419
|
] }) })
|
|
421
|
-
] },
|
|
422
|
-
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${
|
|
420
|
+
] }, i.guid)) }),
|
|
421
|
+
/* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${n.total}: ${v(o.totalAmount, "0,0")}` })
|
|
423
422
|
] });
|
|
424
|
-
},
|
|
425
|
-
data:
|
|
426
|
-
onSelected:
|
|
423
|
+
}, $t = I(kt), Gt = ({
|
|
424
|
+
data: o,
|
|
425
|
+
onSelected: d,
|
|
427
426
|
onViewTransactions: r,
|
|
428
427
|
selectedId: l,
|
|
429
|
-
title:
|
|
428
|
+
title: n
|
|
430
429
|
}) => {
|
|
431
|
-
const { isDesktop:
|
|
430
|
+
const { isDesktop: a, isMobile: i } = ct(), { isLoadingCategoryTotals: e } = z(), { spending: c } = E();
|
|
432
431
|
return /* @__PURE__ */ h(
|
|
433
432
|
C,
|
|
434
433
|
{
|
|
435
|
-
alignItems:
|
|
436
|
-
direction:
|
|
434
|
+
alignItems: i ? "center" : "flex-start",
|
|
435
|
+
direction: i ? "column" : "row",
|
|
437
436
|
gap: { xs: 16, md: 64, xl: 100 },
|
|
438
437
|
justifyContent: "center",
|
|
439
438
|
pt: 50,
|
|
440
439
|
px: 8,
|
|
441
440
|
children: [
|
|
442
441
|
e && /* @__PURE__ */ t(
|
|
443
|
-
|
|
442
|
+
W,
|
|
444
443
|
{
|
|
445
444
|
data: {
|
|
446
445
|
categoryData: [],
|
|
@@ -450,173 +449,175 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
|
|
|
450
449
|
onSelected: () => {
|
|
451
450
|
},
|
|
452
451
|
selectedId: "",
|
|
453
|
-
size:
|
|
452
|
+
size: a ? 400 : 300,
|
|
454
453
|
totalLabel: "Loading ...",
|
|
455
454
|
variant: "full"
|
|
456
455
|
}
|
|
457
456
|
),
|
|
458
457
|
!e && /* @__PURE__ */ t(
|
|
459
|
-
|
|
458
|
+
W,
|
|
460
459
|
{
|
|
461
|
-
data:
|
|
462
|
-
onSelected:
|
|
460
|
+
data: o,
|
|
461
|
+
onSelected: d,
|
|
463
462
|
onViewTransactions: r,
|
|
464
463
|
selectedId: l,
|
|
465
|
-
size:
|
|
466
|
-
totalLabel:
|
|
464
|
+
size: a ? 400 : 300,
|
|
465
|
+
totalLabel: c.total_amount,
|
|
467
466
|
variant: "full"
|
|
468
467
|
}
|
|
469
468
|
),
|
|
470
|
-
/* @__PURE__ */ t(
|
|
469
|
+
/* @__PURE__ */ t($t, { data: o, onSelected: d, selectedId: l, title: n })
|
|
471
470
|
]
|
|
472
471
|
}
|
|
473
472
|
);
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
],
|
|
482
|
-
const
|
|
473
|
+
}, nt = I(Gt), Bt = (o) => [
|
|
474
|
+
o.palette.chartMono.chartMono5,
|
|
475
|
+
o.palette.chartMono.chartMono4,
|
|
476
|
+
o.palette.chartMono.chartMono3,
|
|
477
|
+
o.palette.chartMono.chartMono2,
|
|
478
|
+
o.palette.chartMono.chartMono1,
|
|
479
|
+
o.palette.chartMono.chartMono6
|
|
480
|
+
], jt = () => {
|
|
481
|
+
const o = rt(), { onLoad: d } = Mt(), { clientConfig: r } = lt(), { categories: l, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: a } = z(), { goals: i, spending: e } = E(), { displayedDateRange: c, selectedAccounts: u, selectedAccountGuids: s } = O(), { setFilter: m, sortedTransactions: S } = Dt(), g = r?.master?.deep_link_params?.account_guids, T = r?.master?.deep_link_params?.view, [x, D] = p.useState(""), [b, R] = p.useState(T === "income" ? 1 : 0), [H, P] = p.useState(""), [ut, K] = p.useState(!1);
|
|
483
482
|
p.useEffect(() => {
|
|
484
483
|
a(
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
).finally()
|
|
489
|
-
|
|
484
|
+
u,
|
|
485
|
+
c.start,
|
|
486
|
+
c.end
|
|
487
|
+
).finally(() => {
|
|
488
|
+
d?.("SpendingWidget");
|
|
489
|
+
});
|
|
490
|
+
}, [u, c]);
|
|
490
491
|
const k = p.useMemo(
|
|
491
|
-
() =>
|
|
492
|
-
[
|
|
493
|
-
),
|
|
494
|
-
() =>
|
|
495
|
-
[
|
|
492
|
+
() => dt(l, i, o, n),
|
|
493
|
+
[l, n]
|
|
494
|
+
), X = p.useMemo(
|
|
495
|
+
() => gt(l, n, Bt(o)),
|
|
496
|
+
[l, n]
|
|
496
497
|
), $ = p.useMemo(
|
|
497
|
-
() =>
|
|
498
|
-
[
|
|
499
|
-
),
|
|
500
|
-
|
|
501
|
-
}, X = (f) => {
|
|
502
|
-
E(b === f || f === "0" ? "" : f);
|
|
498
|
+
() => S.find((f) => f.guid === H),
|
|
499
|
+
[H, S]
|
|
500
|
+
), pt = (f, A) => {
|
|
501
|
+
R(A), D("");
|
|
503
502
|
}, Y = (f) => {
|
|
503
|
+
D(x === f || f === "0" ? "" : f);
|
|
504
|
+
}, U = (f) => {
|
|
504
505
|
const A = {
|
|
505
|
-
accounts:
|
|
506
|
-
dateRange:
|
|
506
|
+
accounts: g || s,
|
|
507
|
+
dateRange: c
|
|
507
508
|
};
|
|
508
|
-
if (
|
|
509
|
+
if (b === 0)
|
|
509
510
|
if (f === "other") {
|
|
510
511
|
const M = k.categoryData.find((G) => G.guid === "other");
|
|
511
|
-
|
|
512
|
+
m({
|
|
512
513
|
...A,
|
|
513
|
-
custom: (G) => !!M?.categoryTotals?.find((
|
|
514
|
+
custom: (G) => !!M?.categoryTotals?.find((mt) => mt.guid === G.top_level_category_guid)
|
|
514
515
|
});
|
|
515
516
|
} else
|
|
516
|
-
|
|
517
|
+
m({
|
|
517
518
|
...A,
|
|
518
|
-
custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !==
|
|
519
|
+
custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !== _.INCOME && M.top_level_category_guid !== _.INVESTMENTS && M.top_level_category_guid !== _.TRANSFER,
|
|
519
520
|
showSplits: !!f
|
|
520
521
|
});
|
|
521
522
|
else
|
|
522
|
-
|
|
523
|
+
m({
|
|
523
524
|
...A,
|
|
524
|
-
custom: (M) => f ? M.category_guid === f : M.category_guid ===
|
|
525
|
+
custom: (M) => f ? M.category_guid === f : M.category_guid === _.INCOME || M.top_level_category_guid === _.INCOME
|
|
525
526
|
});
|
|
526
|
-
|
|
527
|
+
K(!0);
|
|
527
528
|
};
|
|
528
|
-
return /* @__PURE__ */ h(
|
|
529
|
-
/* @__PURE__ */ h(
|
|
529
|
+
return /* @__PURE__ */ h(w, { children: [
|
|
530
|
+
/* @__PURE__ */ h(it, { onChange: pt, value: b, variant: "fullWidth", children: [
|
|
530
531
|
/* @__PURE__ */ t(
|
|
531
|
-
|
|
532
|
+
L,
|
|
532
533
|
{
|
|
533
534
|
label: /* @__PURE__ */ t(
|
|
534
|
-
|
|
535
|
+
N,
|
|
535
536
|
{
|
|
536
537
|
amount: k.totalAmount,
|
|
537
|
-
label:
|
|
538
|
+
label: e.spend_tab_title
|
|
538
539
|
}
|
|
539
540
|
)
|
|
540
541
|
}
|
|
541
542
|
),
|
|
542
543
|
/* @__PURE__ */ t(
|
|
543
|
-
|
|
544
|
+
L,
|
|
544
545
|
{
|
|
545
546
|
label: /* @__PURE__ */ t(
|
|
546
|
-
|
|
547
|
+
N,
|
|
547
548
|
{
|
|
548
|
-
amount:
|
|
549
|
-
label:
|
|
549
|
+
amount: X.totalAmount,
|
|
550
|
+
label: e.income_tab_title
|
|
550
551
|
}
|
|
551
552
|
)
|
|
552
553
|
}
|
|
553
554
|
)
|
|
554
555
|
] }),
|
|
555
|
-
|
|
556
|
-
|
|
556
|
+
b === 0 && /* @__PURE__ */ t(
|
|
557
|
+
nt,
|
|
557
558
|
{
|
|
558
559
|
data: k,
|
|
559
|
-
onSelected:
|
|
560
|
-
onViewTransactions:
|
|
561
|
-
selectedId:
|
|
562
|
-
title:
|
|
560
|
+
onSelected: Y,
|
|
561
|
+
onViewTransactions: U,
|
|
562
|
+
selectedId: x,
|
|
563
|
+
title: e.spend_tab_title
|
|
563
564
|
}
|
|
564
565
|
),
|
|
565
|
-
|
|
566
|
-
|
|
566
|
+
b === 1 && /* @__PURE__ */ t(
|
|
567
|
+
nt,
|
|
567
568
|
{
|
|
568
|
-
data:
|
|
569
|
-
onSelected:
|
|
570
|
-
onViewTransactions:
|
|
571
|
-
selectedId:
|
|
572
|
-
title:
|
|
569
|
+
data: X,
|
|
570
|
+
onSelected: Y,
|
|
571
|
+
onViewTransactions: U,
|
|
572
|
+
selectedId: x,
|
|
573
|
+
title: e.income_tab_title
|
|
573
574
|
}
|
|
574
575
|
),
|
|
575
576
|
/* @__PURE__ */ t(
|
|
576
|
-
|
|
577
|
+
Z,
|
|
577
578
|
{
|
|
578
|
-
ariaLabelClose:
|
|
579
|
-
isOpen:
|
|
580
|
-
onClose: () =>
|
|
581
|
-
title:
|
|
582
|
-
children: /* @__PURE__ */ t(
|
|
579
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
580
|
+
isOpen: ut,
|
|
581
|
+
onClose: () => K(!1),
|
|
582
|
+
title: e.transactions_drawer_title,
|
|
583
|
+
children: /* @__PURE__ */ t(_t, { onClick: P })
|
|
583
584
|
}
|
|
584
585
|
),
|
|
585
586
|
/* @__PURE__ */ t(
|
|
586
|
-
|
|
587
|
+
Z,
|
|
587
588
|
{
|
|
588
|
-
ariaLabelClose:
|
|
589
|
+
ariaLabelClose: e.close_drawer_aria,
|
|
589
590
|
isOpen: !!$,
|
|
590
|
-
onClose: () =>
|
|
591
|
-
title:
|
|
592
|
-
children: $ && /* @__PURE__ */ t(
|
|
591
|
+
onClose: () => P(""),
|
|
592
|
+
title: e.transaction_details_drawer_title,
|
|
593
|
+
children: $ && /* @__PURE__ */ t(St, { transaction: $ })
|
|
593
594
|
}
|
|
594
595
|
)
|
|
595
596
|
] });
|
|
596
|
-
},
|
|
597
|
-
const { visibleAccounts: r } =
|
|
597
|
+
}, Vt = I(jt), zt = ({ onBackClick: o, sx: d = {} }) => {
|
|
598
|
+
const { visibleAccounts: r } = st(), { spending: l } = E(), { isCopyLoaded: n, isInitialized: a, setDisplayedDate: i, setSelectedAccounts: e } = O(), { onEvent: c } = xt(), { clientConfig: u } = lt(), s = u?.master?.deep_link_params?.date_range, [m, S] = p.useState(!1);
|
|
598
599
|
p.useEffect(() => {
|
|
599
600
|
e(r);
|
|
600
601
|
}, [r]), p.useEffect(() => {
|
|
601
|
-
s && Array.isArray(s) && s.length === 2 ?
|
|
602
|
+
s && Array.isArray(s) && s.length === 2 ? i(s[0], s[1]) : i(ot(q()), at(q())), S(!0), c(tt.SPENDING_VIEW);
|
|
602
603
|
}, []);
|
|
603
|
-
const g = (
|
|
604
|
-
|
|
604
|
+
const g = (T) => {
|
|
605
|
+
i(T[0], T[1]);
|
|
605
606
|
};
|
|
606
|
-
return !
|
|
607
|
-
|
|
607
|
+
return !n || !a || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
|
|
608
|
+
At,
|
|
608
609
|
{
|
|
609
610
|
accountOptions: r,
|
|
610
611
|
calendarActions: { onRangeChanged: g },
|
|
611
|
-
onAccountsFilterClick: () =>
|
|
612
|
-
onBackClick:
|
|
613
|
-
sx:
|
|
612
|
+
onAccountsFilterClick: () => c(tt.SPENDING_CLICK_FILTER),
|
|
613
|
+
onBackClick: o,
|
|
614
|
+
sx: d,
|
|
614
615
|
title: l.title,
|
|
615
|
-
children: /* @__PURE__ */ t(
|
|
616
|
+
children: /* @__PURE__ */ t(w, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Vt, {}) })
|
|
616
617
|
}
|
|
617
618
|
);
|
|
618
|
-
},
|
|
619
|
+
}, _e = I(zt);
|
|
619
620
|
export {
|
|
620
|
-
|
|
621
|
-
|
|
621
|
+
Ce as SpendingMiniWidget,
|
|
622
|
+
_e as SpendingWidget
|
|
622
623
|
};
|