@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1
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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { startOfMonth as
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { startOfMonth as at } from "date-fns/startOfMonth";
|
|
5
5
|
import { endOfMonth as ot } from "date-fns/endOfMonth";
|
|
6
6
|
import v from "@mui/material/Box";
|
|
7
7
|
import b from "@mui/material/Stack";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { g as
|
|
12
|
-
import { Text as
|
|
8
|
+
import N from "@mui/material/Tab";
|
|
9
|
+
import it from "@mui/material/Tabs";
|
|
10
|
+
import yt from "@mui/material/styles/useTheme";
|
|
11
|
+
import { g as rt, a as st, S as k, b as Y } from "../SpendingLegend-BxefXiQd.mjs";
|
|
12
|
+
import { Text as T, Icon as _t } from "@mxenabled/mxui";
|
|
13
13
|
import { f as R } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
|
-
import { u as
|
|
15
|
-
import { L as
|
|
16
|
-
import { M as
|
|
14
|
+
import { u as I, m as E, d as lt, b as z, a as V, h as ct, g as bt } from "../hooks-fY_n74f7.mjs";
|
|
15
|
+
import { L as dt } from "../Loader-BSWSYqvn.mjs";
|
|
16
|
+
import { M as Ct } from "../MiniWidgetContainer-DKn7ndO6.mjs";
|
|
17
|
+
import { u as gt } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
17
18
|
import { startOfToday as q } from "date-fns/startOfToday";
|
|
18
|
-
import
|
|
19
|
-
import { useTheme as
|
|
20
|
-
import { e as
|
|
21
|
-
import { T as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
19
|
+
import St from "@mui/material/Button";
|
|
20
|
+
import { useTheme as Tt } from "@mui/material";
|
|
21
|
+
import { e as Mt } from "../exportTransactionsToCSV-BU1jTY0Q.mjs";
|
|
22
|
+
import { T as Dt, a as xt } from "../TransactionDetails-CPwv9xtZ.mjs";
|
|
23
|
+
import wt from "@mui/material/Collapse";
|
|
24
|
+
import F from "@mui/material/Divider";
|
|
24
25
|
import J from "@mui/material/List";
|
|
25
26
|
import Q from "@mui/material/ListItem";
|
|
26
|
-
import
|
|
27
|
-
import { u as
|
|
28
|
-
import { D as
|
|
29
|
-
import { b as
|
|
30
|
-
import { A as
|
|
31
|
-
const
|
|
32
|
-
/* @__PURE__ */ t(
|
|
33
|
-
/* @__PURE__ */ t(
|
|
34
|
-
] }),
|
|
35
|
-
const n =
|
|
27
|
+
import Z from "@mui/material/ListItemButton";
|
|
28
|
+
import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
29
|
+
import { D as tt } from "../Drawer-Bet2ZPJo.mjs";
|
|
30
|
+
import { b as L } from "../Category-Ccoew_sA.mjs";
|
|
31
|
+
import { A as et, W as vt } from "../WidgetContainer-mzejMmz2.mjs";
|
|
32
|
+
const O = ({ amount: n, label: d, variant: a = "full" }) => /* @__PURE__ */ c(b, { direction: "column", children: [
|
|
33
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
|
|
34
|
+
/* @__PURE__ */ t(T, { variant: "XSmall", children: R(n, a === "mini" ? "0,0" : "0,0.00") })
|
|
35
|
+
] }), At = () => {
|
|
36
|
+
const n = yt(), { goals: d, spending: a } = I(), { categories: o, dateRangeCategoryTotals: i } = E(), g = l.useMemo(
|
|
36
37
|
() => [
|
|
37
38
|
n.palette.chartMono.chartMono5,
|
|
38
39
|
n.palette.chartMono.chartMono4,
|
|
@@ -42,54 +43,56 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
42
43
|
n.palette.chartMono.chartMono6
|
|
43
44
|
],
|
|
44
45
|
[n]
|
|
45
|
-
), [e,
|
|
46
|
-
() =>
|
|
47
|
-
[
|
|
48
|
-
),
|
|
49
|
-
() =>
|
|
50
|
-
[
|
|
51
|
-
),
|
|
52
|
-
_(
|
|
53
|
-
},
|
|
54
|
-
|
|
46
|
+
), [e, r] = l.useState(""), [p, _] = l.useState(0), u = l.useMemo(
|
|
47
|
+
() => rt(o, d, n, i),
|
|
48
|
+
[o, i]
|
|
49
|
+
), m = l.useMemo(
|
|
50
|
+
() => st(o, i, g),
|
|
51
|
+
[o, i, g]
|
|
52
|
+
), M = (f, D) => {
|
|
53
|
+
_(D), r("");
|
|
54
|
+
}, y = (f) => {
|
|
55
|
+
r(e === f ? "" : f);
|
|
55
56
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
57
|
+
return /* @__PURE__ */ c(v, { width: "100%", children: [
|
|
58
|
+
/* @__PURE__ */ c(
|
|
59
|
+
it,
|
|
59
60
|
{
|
|
60
|
-
"aria-label":
|
|
61
|
-
onChange:
|
|
62
|
-
value:
|
|
61
|
+
"aria-label": a.mini_title,
|
|
62
|
+
onChange: M,
|
|
63
|
+
value: p,
|
|
63
64
|
variant: "fullWidth",
|
|
64
65
|
children: [
|
|
65
66
|
/* @__PURE__ */ t(
|
|
66
|
-
|
|
67
|
+
N,
|
|
67
68
|
{
|
|
68
69
|
"aria-controls": "spending-tabpanel",
|
|
69
70
|
id: "spending-tab",
|
|
70
71
|
label: /* @__PURE__ */ t(
|
|
71
|
-
|
|
72
|
+
O,
|
|
72
73
|
{
|
|
73
|
-
amount:
|
|
74
|
-
label:
|
|
74
|
+
amount: u.totalAmount,
|
|
75
|
+
label: a.spend_tab_title,
|
|
76
|
+
variant: "mini"
|
|
75
77
|
}
|
|
76
78
|
),
|
|
77
|
-
tabIndex:
|
|
79
|
+
tabIndex: p === 0 ? 0 : -1
|
|
78
80
|
}
|
|
79
81
|
),
|
|
80
82
|
/* @__PURE__ */ t(
|
|
81
|
-
|
|
83
|
+
N,
|
|
82
84
|
{
|
|
83
85
|
"aria-controls": "income-tabpanel",
|
|
84
86
|
id: "income-tab",
|
|
85
87
|
label: /* @__PURE__ */ t(
|
|
86
|
-
|
|
88
|
+
O,
|
|
87
89
|
{
|
|
88
|
-
amount:
|
|
89
|
-
label:
|
|
90
|
+
amount: m.totalAmount,
|
|
91
|
+
label: a.income_tab_title,
|
|
92
|
+
variant: "mini"
|
|
90
93
|
}
|
|
91
94
|
),
|
|
92
|
-
tabIndex:
|
|
95
|
+
tabIndex: p === 1 ? 0 : -1
|
|
93
96
|
}
|
|
94
97
|
)
|
|
95
98
|
]
|
|
@@ -99,20 +102,20 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
99
102
|
v,
|
|
100
103
|
{
|
|
101
104
|
"aria-labelledby": "spending-tab",
|
|
102
|
-
hidden:
|
|
105
|
+
hidden: p !== 0,
|
|
103
106
|
id: "spending-tabpanel",
|
|
104
107
|
role: "tabpanel",
|
|
105
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ c(b, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
106
109
|
/* @__PURE__ */ t(
|
|
107
|
-
|
|
110
|
+
k,
|
|
108
111
|
{
|
|
109
|
-
data:
|
|
110
|
-
onSelected:
|
|
112
|
+
data: u,
|
|
113
|
+
onSelected: y,
|
|
111
114
|
selectedId: e,
|
|
112
|
-
totalLabel:
|
|
115
|
+
totalLabel: a.total_spending
|
|
113
116
|
}
|
|
114
117
|
),
|
|
115
|
-
/* @__PURE__ */ t(Y, { data:
|
|
118
|
+
/* @__PURE__ */ t(Y, { data: u, onSelected: y, selectedId: e })
|
|
116
119
|
] })
|
|
117
120
|
}
|
|
118
121
|
),
|
|
@@ -120,59 +123,60 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
120
123
|
v,
|
|
121
124
|
{
|
|
122
125
|
"aria-labelledby": "income-tab",
|
|
123
|
-
hidden:
|
|
126
|
+
hidden: p !== 1,
|
|
124
127
|
id: "income-tabpanel",
|
|
125
128
|
role: "tabpanel",
|
|
126
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ c(b, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
|
|
127
130
|
/* @__PURE__ */ t(
|
|
128
|
-
|
|
131
|
+
k,
|
|
129
132
|
{
|
|
130
|
-
data:
|
|
133
|
+
data: m,
|
|
131
134
|
isIncome: !0,
|
|
132
|
-
onSelected:
|
|
135
|
+
onSelected: y,
|
|
133
136
|
selectedId: e,
|
|
134
|
-
totalLabel:
|
|
137
|
+
totalLabel: a.total_income
|
|
135
138
|
}
|
|
136
139
|
),
|
|
137
|
-
/* @__PURE__ */ t(Y, { data:
|
|
140
|
+
/* @__PURE__ */ t(Y, { data: m, onSelected: y, selectedId: e })
|
|
138
141
|
] })
|
|
139
142
|
}
|
|
140
143
|
)
|
|
141
144
|
] });
|
|
142
|
-
},
|
|
143
|
-
const { isAccountDataLoaded:
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
}, It = A(At), Et = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
|
|
146
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { spending: p } = I(), { isInitialized: _, selectedAccounts: u } = z();
|
|
147
|
+
return gt({
|
|
148
|
+
widgetName: "SpendingMiniWidget",
|
|
149
|
+
isLoaded: i
|
|
150
|
+
}), l.useEffect(() => {
|
|
151
|
+
a || o().finally(), g || e().finally();
|
|
152
|
+
}, []), l.useEffect(() => {
|
|
153
|
+
r(
|
|
154
|
+
u,
|
|
155
|
+
at(/* @__PURE__ */ new Date()),
|
|
152
156
|
ot(/* @__PURE__ */ new Date())
|
|
153
157
|
).finally();
|
|
154
|
-
}, [
|
|
155
|
-
|
|
158
|
+
}, [u]), _ ? /* @__PURE__ */ t(
|
|
159
|
+
Ct,
|
|
156
160
|
{
|
|
157
161
|
className: "mx-exp-spending-miniwidget",
|
|
158
162
|
onPrimaryCtaClick: n,
|
|
159
|
-
primaryCtaLabel:
|
|
163
|
+
primaryCtaLabel: p.primary_cta,
|
|
160
164
|
sx: { height: "100%", ...d },
|
|
161
|
-
title:
|
|
162
|
-
children: /* @__PURE__ */ t(
|
|
165
|
+
title: p.mini_title,
|
|
166
|
+
children: /* @__PURE__ */ t(It, {})
|
|
163
167
|
}
|
|
164
|
-
) : /* @__PURE__ */ t(
|
|
165
|
-
},
|
|
168
|
+
) : /* @__PURE__ */ t(dt, {});
|
|
169
|
+
}, fe = A(Et), Wt = ({
|
|
166
170
|
data: n,
|
|
167
171
|
onSelected: d,
|
|
168
|
-
selectedId:
|
|
169
|
-
title:
|
|
172
|
+
selectedId: a = "",
|
|
173
|
+
title: o
|
|
170
174
|
}) => {
|
|
171
|
-
const { spending:
|
|
172
|
-
return /* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */ t(
|
|
174
|
-
/* @__PURE__ */ t(
|
|
175
|
-
/* @__PURE__ */ t(J, { children: n.categoryData.map((e) => /* @__PURE__ */
|
|
175
|
+
const { spending: i } = I(), g = n.categoryData.find((e) => e.guid === a);
|
|
176
|
+
return /* @__PURE__ */ c(b, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
|
|
177
|
+
/* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${o} ${i.by_category}` }),
|
|
178
|
+
/* @__PURE__ */ t(F, { "aria-hidden": "true" }),
|
|
179
|
+
/* @__PURE__ */ t(J, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
176
180
|
/* @__PURE__ */ t(
|
|
177
181
|
Q,
|
|
178
182
|
{
|
|
@@ -181,10 +185,11 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
181
185
|
sx: {
|
|
182
186
|
minHeight: 44
|
|
183
187
|
},
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
|
|
188
|
+
children: /* @__PURE__ */ c(
|
|
189
|
+
Z,
|
|
186
190
|
{
|
|
187
|
-
"aria-expanded":
|
|
191
|
+
"aria-expanded": g?.guid === e.guid,
|
|
192
|
+
id: `spending-list-category-${e.guid}`,
|
|
188
193
|
onClick: () => d(e.guid),
|
|
189
194
|
sx: { minHeight: 44, px: 8, py: 0 },
|
|
190
195
|
children: [
|
|
@@ -198,7 +203,7 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
198
203
|
width: 8
|
|
199
204
|
}
|
|
200
205
|
),
|
|
201
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ c(
|
|
202
207
|
b,
|
|
203
208
|
{
|
|
204
209
|
alignItems: "center",
|
|
@@ -206,8 +211,8 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
206
211
|
justifyContent: "space-between",
|
|
207
212
|
width: "100%",
|
|
208
213
|
children: [
|
|
209
|
-
/* @__PURE__ */ t(
|
|
210
|
-
/* @__PURE__ */ t(
|
|
214
|
+
/* @__PURE__ */ t(T, { bold: a === e.guid, children: e.name }),
|
|
215
|
+
/* @__PURE__ */ t(T, { bold: a === e.guid, variant: "Body", children: R(e.amount, "0,0.00") })
|
|
211
216
|
]
|
|
212
217
|
}
|
|
213
218
|
)
|
|
@@ -216,40 +221,47 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
216
221
|
)
|
|
217
222
|
}
|
|
218
223
|
),
|
|
219
|
-
/* @__PURE__ */ t(
|
|
220
|
-
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(
|
|
221
|
-
|
|
224
|
+
/* @__PURE__ */ t(F, {}),
|
|
225
|
+
e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(wt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ c(J, { children: [
|
|
226
|
+
g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
|
|
222
227
|
Q,
|
|
223
228
|
{
|
|
224
229
|
sx: {
|
|
225
|
-
pl:
|
|
226
|
-
pr: 8,
|
|
230
|
+
pl: 12,
|
|
227
231
|
py: 0
|
|
228
232
|
},
|
|
229
|
-
children: /* @__PURE__ */
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
children: /* @__PURE__ */ t(
|
|
234
|
+
Z,
|
|
235
|
+
{
|
|
236
|
+
id: `spending-list-subcategory-${r.guid}`,
|
|
237
|
+
onClick: () => d(r.guid, !0),
|
|
238
|
+
sx: { minHeight: 44, px: 8, py: 0 },
|
|
239
|
+
children: /* @__PURE__ */ c(b, { direction: "row", justifyContent: "space-between", width: "100%", children: [
|
|
240
|
+
/* @__PURE__ */ c(T, { children: [
|
|
241
|
+
r.name,
|
|
242
|
+
" "
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ t(T, { children: R(r.amount, "0,0.00") })
|
|
245
|
+
] })
|
|
246
|
+
}
|
|
247
|
+
)
|
|
236
248
|
},
|
|
237
|
-
|
|
249
|
+
r.guid
|
|
238
250
|
)),
|
|
239
|
-
/* @__PURE__ */ t(
|
|
251
|
+
/* @__PURE__ */ t(F, {})
|
|
240
252
|
] }) })
|
|
241
253
|
] }, e.guid)) }),
|
|
242
|
-
/* @__PURE__ */ t(
|
|
254
|
+
/* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${R(n.totalAmount, "0,0.00")}` })
|
|
243
255
|
] });
|
|
244
|
-
},
|
|
256
|
+
}, Rt = A(Wt), Nt = ({
|
|
245
257
|
data: n,
|
|
246
258
|
onSelected: d,
|
|
247
|
-
onViewTransactions:
|
|
248
|
-
selectedId:
|
|
249
|
-
title:
|
|
259
|
+
onViewTransactions: a,
|
|
260
|
+
selectedId: o,
|
|
261
|
+
title: i
|
|
250
262
|
}) => {
|
|
251
|
-
const { isDesktop:
|
|
252
|
-
return /* @__PURE__ */
|
|
263
|
+
const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = E(), { spending: p } = I();
|
|
264
|
+
return /* @__PURE__ */ c(
|
|
253
265
|
b,
|
|
254
266
|
{
|
|
255
267
|
alignItems: e ? "center" : "flex-start",
|
|
@@ -259,8 +271,8 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
259
271
|
pt: 50,
|
|
260
272
|
px: 8,
|
|
261
273
|
children: [
|
|
262
|
-
|
|
263
|
-
|
|
274
|
+
r && /* @__PURE__ */ t(
|
|
275
|
+
k,
|
|
264
276
|
{
|
|
265
277
|
data: {
|
|
266
278
|
categoryData: [],
|
|
@@ -270,103 +282,114 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
270
282
|
onSelected: () => {
|
|
271
283
|
},
|
|
272
284
|
selectedId: "",
|
|
273
|
-
size:
|
|
285
|
+
size: g ? 400 : 300,
|
|
274
286
|
totalLabel: "Loading ...",
|
|
275
287
|
variant: "full"
|
|
276
288
|
}
|
|
277
289
|
),
|
|
278
|
-
!
|
|
279
|
-
|
|
290
|
+
!r && /* @__PURE__ */ t(
|
|
291
|
+
k,
|
|
280
292
|
{
|
|
281
293
|
data: n,
|
|
282
|
-
onSelected:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
294
|
+
onSelected: (m) => {
|
|
295
|
+
d(m), setTimeout(() => document.getElementById(`spending-list-category-${m}`)?.focus(), 0);
|
|
296
|
+
},
|
|
297
|
+
onViewTransactions: a,
|
|
298
|
+
selectedId: o,
|
|
299
|
+
size: g ? 400 : 300,
|
|
300
|
+
totalLabel: p.total_amount,
|
|
287
301
|
variant: "full"
|
|
288
302
|
}
|
|
289
303
|
),
|
|
290
|
-
/* @__PURE__ */ t(
|
|
304
|
+
/* @__PURE__ */ t(Rt, { data: n, onSelected: d, selectedId: o, title: i })
|
|
291
305
|
]
|
|
292
306
|
}
|
|
293
307
|
);
|
|
294
|
-
},
|
|
308
|
+
}, nt = A(Nt), kt = (n) => [
|
|
295
309
|
n.palette.chartMono.chartMono5,
|
|
296
310
|
n.palette.chartMono.chartMono4,
|
|
297
311
|
n.palette.chartMono.chartMono3,
|
|
298
312
|
n.palette.chartMono.chartMono2,
|
|
299
313
|
n.palette.chartMono.chartMono1,
|
|
300
314
|
n.palette.chartMono.chartMono6
|
|
301
|
-
],
|
|
302
|
-
const n =
|
|
303
|
-
goals:
|
|
315
|
+
], Ot = () => {
|
|
316
|
+
const n = Tt(), { is_mobile_webview: d } = V(), { clientConfig: a } = V(), { categories: o, dateRangeCategoryTotals: i } = E(), {
|
|
317
|
+
goals: g,
|
|
304
318
|
spending: e,
|
|
305
|
-
transactions:
|
|
306
|
-
} =
|
|
307
|
-
setFilter:
|
|
308
|
-
sortedTransactions:
|
|
309
|
-
sortedTransactionsWithSplits:
|
|
310
|
-
tags:
|
|
311
|
-
} = ct(),
|
|
312
|
-
() =>
|
|
313
|
-
[
|
|
314
|
-
), K =
|
|
315
|
-
() =>
|
|
316
|
-
[
|
|
317
|
-
),
|
|
318
|
-
() =>
|
|
319
|
-
[
|
|
320
|
-
),
|
|
321
|
-
S
|
|
322
|
-
}, U = (
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
319
|
+
transactions: r
|
|
320
|
+
} = I(), { displayedDateRange: p, selectedAccountGuids: _ } = z(), {
|
|
321
|
+
setFilter: u,
|
|
322
|
+
sortedTransactions: m,
|
|
323
|
+
sortedTransactionsWithSplits: M,
|
|
324
|
+
tags: y
|
|
325
|
+
} = ct(), f = a?.master?.deep_link_params?.account_guids, D = a?.master?.deep_link_params?.view, [x, C] = l.useState(""), [w, W] = l.useState(D === "income" ? 1 : 0), [H, P] = l.useState(""), [pt, $] = l.useState(!1), B = l.useMemo(
|
|
326
|
+
() => rt(o, g, n, i),
|
|
327
|
+
[o, i]
|
|
328
|
+
), K = l.useMemo(
|
|
329
|
+
() => st(o, i, kt(n)),
|
|
330
|
+
[o, i]
|
|
331
|
+
), G = l.useMemo(
|
|
332
|
+
() => m.find((s) => s.guid === H),
|
|
333
|
+
[H, m]
|
|
334
|
+
), ut = (s, S) => {
|
|
335
|
+
W(S), C("");
|
|
336
|
+
}, U = (s, S = !1) => {
|
|
337
|
+
S ? mt(s) : C(x === s || s === "0" ? "" : s);
|
|
338
|
+
}, mt = (s) => {
|
|
339
|
+
u({
|
|
340
|
+
...{
|
|
341
|
+
accounts: f || _,
|
|
342
|
+
dateRange: p
|
|
343
|
+
},
|
|
344
|
+
custom: (h) => x === "other" ? h.top_level_category_guid === s : h.category_guid === s,
|
|
345
|
+
showSplits: !0
|
|
346
|
+
}), $(!0);
|
|
347
|
+
}, X = (s) => {
|
|
348
|
+
const S = {
|
|
349
|
+
accounts: f || _,
|
|
350
|
+
dateRange: p
|
|
328
351
|
};
|
|
329
|
-
if (
|
|
330
|
-
if (
|
|
331
|
-
const h =
|
|
332
|
-
|
|
333
|
-
...
|
|
334
|
-
custom: (
|
|
352
|
+
if (w === 0)
|
|
353
|
+
if (s === "other") {
|
|
354
|
+
const h = B.categoryData.find((j) => j.guid === "other");
|
|
355
|
+
u({
|
|
356
|
+
...S,
|
|
357
|
+
custom: (j) => !!h?.categoryTotals?.find((ft) => ft.guid === j.top_level_category_guid)
|
|
335
358
|
});
|
|
336
359
|
} else
|
|
337
|
-
|
|
338
|
-
...
|
|
339
|
-
custom: (h) =>
|
|
340
|
-
showSplits: !!
|
|
360
|
+
u({
|
|
361
|
+
...S,
|
|
362
|
+
custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== L.INCOME && h.category_guid !== L.INCOME && h.top_level_category_guid !== L.INVESTMENTS && h.top_level_category_guid !== L.TRANSFER,
|
|
363
|
+
showSplits: !!s
|
|
341
364
|
});
|
|
342
365
|
else
|
|
343
|
-
|
|
344
|
-
...
|
|
345
|
-
custom: (h) =>
|
|
366
|
+
u({
|
|
367
|
+
...S,
|
|
368
|
+
custom: (h) => s ? h.category_guid === s : h.category_guid === L.INCOME || h.top_level_category_guid === L.INCOME
|
|
346
369
|
});
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
|
|
370
|
+
$(!0);
|
|
371
|
+
}, ht = () => {
|
|
372
|
+
Mt(M, y);
|
|
350
373
|
};
|
|
351
|
-
return /* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
375
|
+
/* @__PURE__ */ c(it, { onChange: ut, value: w, variant: "fullWidth", children: [
|
|
353
376
|
/* @__PURE__ */ t(
|
|
354
|
-
|
|
377
|
+
N,
|
|
355
378
|
{
|
|
356
379
|
label: /* @__PURE__ */ t(
|
|
357
|
-
|
|
380
|
+
O,
|
|
358
381
|
{
|
|
359
|
-
amount:
|
|
382
|
+
amount: B.totalAmount,
|
|
360
383
|
label: e.spend_tab_title
|
|
361
384
|
}
|
|
362
385
|
)
|
|
363
386
|
}
|
|
364
387
|
),
|
|
365
388
|
/* @__PURE__ */ t(
|
|
366
|
-
|
|
389
|
+
N,
|
|
367
390
|
{
|
|
368
391
|
label: /* @__PURE__ */ t(
|
|
369
|
-
|
|
392
|
+
O,
|
|
370
393
|
{
|
|
371
394
|
amount: K.totalAmount,
|
|
372
395
|
label: e.income_tab_title
|
|
@@ -375,96 +398,88 @@ const G = ({ amount: n, label: d }) => /* @__PURE__ */ s(b, { direction: "column
|
|
|
375
398
|
}
|
|
376
399
|
)
|
|
377
400
|
] }),
|
|
378
|
-
|
|
379
|
-
|
|
401
|
+
w === 0 && /* @__PURE__ */ t(
|
|
402
|
+
nt,
|
|
380
403
|
{
|
|
381
|
-
data:
|
|
404
|
+
data: B,
|
|
382
405
|
onSelected: U,
|
|
383
406
|
onViewTransactions: X,
|
|
384
|
-
selectedId:
|
|
407
|
+
selectedId: x,
|
|
385
408
|
title: e.spend_tab_title
|
|
386
409
|
}
|
|
387
410
|
),
|
|
388
|
-
|
|
389
|
-
|
|
411
|
+
w === 1 && /* @__PURE__ */ t(
|
|
412
|
+
nt,
|
|
390
413
|
{
|
|
391
414
|
data: K,
|
|
392
415
|
onSelected: U,
|
|
393
416
|
onViewTransactions: X,
|
|
394
|
-
selectedId:
|
|
417
|
+
selectedId: x,
|
|
395
418
|
title: e.income_tab_title
|
|
396
419
|
}
|
|
397
420
|
),
|
|
398
421
|
/* @__PURE__ */ t(
|
|
399
|
-
|
|
422
|
+
tt,
|
|
400
423
|
{
|
|
401
424
|
ariaLabelClose: e.close_drawer_aria,
|
|
402
|
-
isOpen:
|
|
403
|
-
onClose: () =>
|
|
425
|
+
isOpen: pt,
|
|
426
|
+
onClose: () => $(!1),
|
|
404
427
|
title: e.transactions_drawer_title,
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
-
!d &&
|
|
407
|
-
|
|
428
|
+
children: /* @__PURE__ */ c(b, { children: [
|
|
429
|
+
!d && m.length > 0 && /* @__PURE__ */ t(b, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
|
|
430
|
+
St,
|
|
408
431
|
{
|
|
409
|
-
onClick:
|
|
410
|
-
startIcon: /* @__PURE__ */ t(
|
|
432
|
+
onClick: ht,
|
|
433
|
+
startIcon: /* @__PURE__ */ t(_t, { name: "ios_share" }),
|
|
411
434
|
variant: "text",
|
|
412
|
-
children:
|
|
435
|
+
children: r.export_csv_btn
|
|
413
436
|
}
|
|
414
437
|
) }),
|
|
415
|
-
/* @__PURE__ */ t(
|
|
438
|
+
/* @__PURE__ */ t(Dt, { onClick: P })
|
|
416
439
|
] })
|
|
417
440
|
}
|
|
418
441
|
),
|
|
419
442
|
/* @__PURE__ */ t(
|
|
420
|
-
|
|
443
|
+
tt,
|
|
421
444
|
{
|
|
422
445
|
ariaLabelClose: e.close_drawer_aria,
|
|
423
|
-
isOpen:
|
|
424
|
-
onClose: () =>
|
|
446
|
+
isOpen: !!G,
|
|
447
|
+
onClose: () => P(""),
|
|
425
448
|
title: e.transaction_details_drawer_title,
|
|
426
|
-
children:
|
|
449
|
+
children: G && /* @__PURE__ */ t(xt, { transaction: G })
|
|
427
450
|
}
|
|
428
451
|
)
|
|
429
452
|
] });
|
|
430
|
-
},
|
|
431
|
-
const {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
p.end
|
|
447
|
-
).finally(() => {
|
|
448
|
-
N?.("SpendingWidget");
|
|
449
|
-
});
|
|
450
|
-
}, [p, T]);
|
|
451
|
-
const O = (I) => {
|
|
452
|
-
f(I[0], I[1]);
|
|
453
|
+
}, $t = A(Ot), Bt = ({ onBackClick: n, sx: d = {} }) => {
|
|
454
|
+
const { isAccountDataLoaded: a, loadAccountData: o } = lt(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = E(), { isTransactionDataLoaded: p, loadTransactionData: _ } = ct(), { spending: u } = I(), { displayedDateRange: m, isInitialized: M, setDisplayedDate: y, selectedAccounts: f } = z(), { onEvent: D } = bt(), { clientConfig: x } = V(), C = x?.master?.deep_link_params?.date_range;
|
|
455
|
+
gt({
|
|
456
|
+
widgetName: "SpendingWidget",
|
|
457
|
+
isLoaded: g
|
|
458
|
+
}), l.useEffect(() => {
|
|
459
|
+
C && Array.isArray(C) && C.length === 2 ? y(C[0], C[1]) : y(at(q()), ot(q())), a || o().finally(), i || e().finally(), p || _().finally(), D(et.SPENDING_VIEW);
|
|
460
|
+
}, []), l.useEffect(() => {
|
|
461
|
+
M && r(
|
|
462
|
+
f,
|
|
463
|
+
m.start,
|
|
464
|
+
m.end
|
|
465
|
+
).finally();
|
|
466
|
+
}, [m, M, f]);
|
|
467
|
+
const w = (W) => {
|
|
468
|
+
y(W[0], W[1]);
|
|
453
469
|
};
|
|
454
|
-
return
|
|
455
|
-
|
|
470
|
+
return M ? /* @__PURE__ */ t(
|
|
471
|
+
vt,
|
|
456
472
|
{
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
onAccountsFilterClick: () => M(tt.SPENDING_CLICK_FILTER),
|
|
473
|
+
calendarActions: { onRangeChanged: w },
|
|
474
|
+
onAccountsFilterClick: () => D(et.SPENDING_CLICK_FILTER),
|
|
460
475
|
onBackClick: n,
|
|
461
476
|
sx: d,
|
|
462
|
-
title:
|
|
463
|
-
children: /* @__PURE__ */ t(v, {
|
|
477
|
+
title: u.title,
|
|
478
|
+
children: /* @__PURE__ */ t(v, { width: "100%", children: /* @__PURE__ */ t($t, {}) })
|
|
464
479
|
}
|
|
465
|
-
) : /* @__PURE__ */ t(
|
|
466
|
-
},
|
|
480
|
+
) : /* @__PURE__ */ t(dt, {});
|
|
481
|
+
}, ye = A(Bt);
|
|
467
482
|
export {
|
|
468
|
-
|
|
469
|
-
|
|
483
|
+
fe as SpendingMiniWidget,
|
|
484
|
+
ye as SpendingWidget
|
|
470
485
|
};
|