@mx-cartographer/experiences 7.0.23-alpha.al1 → 7.0.23-alpha.al10
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/dist/{Account-BW3-oYEs.mjs → Account-CVVDlNDC.mjs} +1 -1
- package/dist/{AccountDetailsContent-UxSEMBo_.mjs → AccountDetailsContent-bQKVSCZF.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-BGQAu0Xm.mjs} +8 -8
- package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-CC7kzfPK.mjs} +2 -2
- package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-wgvQjLxW.mjs} +3 -3
- package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-DpglOysH.mjs} +19 -19
- package/dist/{Accounts-CA-nqAjT.mjs → Accounts-ByViymVi.mjs} +1 -1
- package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-gzgNEDE7.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-LpZcwQPa.mjs} +4 -4
- package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-C2minBK_.mjs} +1 -1
- package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-Cd4dZuWL.mjs} +2 -2
- package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-Dz4r9Rfe.mjs} +1 -1
- package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-B51DTXVj.mjs} +1 -1
- package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-DqQ2FMx5.mjs} +2 -2
- package/dist/{Help-KAAMEubC.mjs → Help-DVPbIxMM.mjs} +1 -1
- package/dist/{LineChart-BWWmmJxV.mjs → LineChart-DLk-bww5.mjs} +1 -1
- package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-DE6S0N5o.mjs} +1 -1
- package/dist/{ManageIncome-DbsiKUoO.mjs → ManageIncome-BokhnWOn.mjs} +4 -4
- package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-5YscP1xa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-BlsgwNew.mjs} +1 -1
- package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-C0hQSRzt.mjs} +2 -2
- package/dist/{NotificationSettings-BJFyyZYE.mjs → NotificationSettings-CWx6H-2z.mjs} +2 -2
- package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-BKsSQVnI.mjs} +3 -3
- package/dist/{RecurringSettings-Dj29piAQ.mjs → RecurringSettings-CICRt51C.mjs} +3 -3
- package/dist/{TransactionDetails-C-z3HGTT.mjs → TransactionDetails-BXl0m15s.mjs} +37 -37
- package/dist/{TransactionStore-0tLtBEIC.mjs → TransactionStore-BElBVYfk.mjs} +248 -209
- package/dist/TrendsStore-DRuzsVVE.mjs +505 -0
- package/dist/TrendsWidget-CRi8EO04.mjs +6 -0
- package/dist/{User-Dq9Qj764.mjs → User-DtwqVm3K.mjs} +1 -1
- package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-DK8aZO5l.mjs} +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +577 -518
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-BDlt8u0n.mjs → exportTransactionsToCSV-Cf5VRYVr.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +11 -11
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-DkUqN6JE.mjs → hooks-DUeXom8C.mjs} +13 -13
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1969 -14
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +24 -24
- package/dist/spending/index.es.js +21 -21
- package/dist/transactions/index.es.js +270 -259
- package/dist/trends/index.es.js +402 -778
- package/package.json +1 -1
- package/dist/ExportCsvAction-CbMfQ2Wa.mjs +0 -24
- package/dist/ResponsiveButton-DZFp78fJ.mjs +0 -45
- package/dist/TrendsStore-WrHxzdbQ.mjs +0 -565
- package/dist/ViewMoreMicroCard-DFAY0tA8.mjs +0 -1974
package/dist/trends/index.es.js
CHANGED
|
@@ -1,73 +1,61 @@
|
|
|
1
|
-
import { jsx as e, jsxs as f
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { addSeconds as
|
|
9
|
-
import { differenceInCalendarMonths as
|
|
10
|
-
import { a as
|
|
11
|
-
import { T as
|
|
12
|
-
import { i as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { u as R,
|
|
16
|
-
import { u as
|
|
17
|
-
import { f as
|
|
18
|
-
import { DataGridPro as
|
|
19
|
-
import { C as
|
|
20
|
-
import { c as
|
|
21
|
-
import { b as
|
|
22
|
-
import { H as
|
|
23
|
-
import { T as
|
|
24
|
-
import { A as
|
|
25
|
-
import { a as
|
|
26
|
-
import { D as
|
|
27
|
-
import { L as
|
|
28
|
-
import { useTheme as
|
|
29
|
-
import { L as
|
|
30
|
-
import { M as
|
|
31
|
-
import { subMonths as
|
|
32
|
-
import { TrendingUp as
|
|
33
|
-
import { a as
|
|
34
|
-
import { M as
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import bt from "@mui/material/ListItemButton";
|
|
39
|
-
import St from "@mui/material/ListItemIcon";
|
|
40
|
-
import wt from "@mui/material/ListItemText";
|
|
41
|
-
import Ne from "@mui/material/styles/useTheme";
|
|
42
|
-
import Dt from "@mui/material/Divider";
|
|
43
|
-
import { useTheme as It, Stack as Et } from "@mui/material";
|
|
44
|
-
import Lt from "@mui/material/Paper";
|
|
45
|
-
import { b as xt } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
46
|
-
import { E as vt } from "../ExportCsvAction-CbMfQ2Wa.mjs";
|
|
47
|
-
import { E as Mt } from "../EmptyState-C0lr9E5T.mjs";
|
|
48
|
-
const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
49
|
-
nt,
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { observer as O } from "mobx-react-lite";
|
|
4
|
+
import { Icon as ne, Text as oe, CategoryIcon as Se, P as V, H3 as be } from "@mxenabled/mxui";
|
|
5
|
+
import z from "@mui/material/Box";
|
|
6
|
+
import S from "@mui/material/Stack";
|
|
7
|
+
import ce from "@mui/material/Button";
|
|
8
|
+
import { addSeconds as ge } from "date-fns/addSeconds";
|
|
9
|
+
import { differenceInCalendarMonths as se } from "date-fns/differenceInCalendarMonths";
|
|
10
|
+
import { a as De, g as we, S as Ee, u as ve } from "../TrendsStore-DRuzsVVE.mjs";
|
|
11
|
+
import { T as sn } from "../TrendsStore-DRuzsVVE.mjs";
|
|
12
|
+
import { i as Ie, c as xe, d as Me, e as Re, f as Le, h as Ae, b as Ne, g as We, j as le } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
|
+
import He from "@mui/material/ToggleButton";
|
|
14
|
+
import ke from "@mui/material/ToggleButtonGroup";
|
|
15
|
+
import { u as R, j as G, g as j, a as Y, n as ae, c as q, s as he, k as Oe, p as ze, l as Ge } from "../hooks-DUeXom8C.mjs";
|
|
16
|
+
import { u as re } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
|
+
import { f as K, D as k } from "../Dialog-CWW597AF.mjs";
|
|
18
|
+
import { DataGridPro as Fe } from "@mui/x-data-grid-pro";
|
|
19
|
+
import { C as Pe } from "../CurrencyText-YUhH2caW.mjs";
|
|
20
|
+
import { c as fe } from "../Category-CevNQ03n.mjs";
|
|
21
|
+
import { b as Ve } from "../Localization-2MODESHW.mjs";
|
|
22
|
+
import { H as de } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
|
+
import { T as B } from "../TrendsWidget-CRi8EO04.mjs";
|
|
24
|
+
import { A as p, W as pe } from "../WidgetContainer-DK8aZO5l.mjs";
|
|
25
|
+
import { a as Be, T as Ke } from "../TransactionDetails-BXl0m15s.mjs";
|
|
26
|
+
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
27
|
+
import { L as $ } from "../Loader-DUaFpDGv.mjs";
|
|
28
|
+
import { useTheme as je } from "@mui/material/styles";
|
|
29
|
+
import { L as Ye } from "../LineChart-DLk-bww5.mjs";
|
|
30
|
+
import { M as Ze } from "../MiniWidgetContainer-BlsgwNew.mjs";
|
|
31
|
+
import { subMonths as Ue } from "date-fns";
|
|
32
|
+
import { TrendingUp as Xe, TrendingDown as qe, MultilineChart as Je } from "@mxenabled/mx-icons";
|
|
33
|
+
import { a as Qe, f as te } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
34
|
+
import { M as et } from "../MicroWidgetContainer-5YscP1xa.mjs";
|
|
35
|
+
import { E as ue } from "../EmptyState-C0lr9E5T.mjs";
|
|
36
|
+
const tt = ({ selectedTab: t, onTabChange: r }) => /* @__PURE__ */ e(
|
|
37
|
+
ke,
|
|
50
38
|
{
|
|
51
39
|
exclusive: !0,
|
|
52
|
-
onChange:
|
|
40
|
+
onChange: r,
|
|
53
41
|
orientation: "horizontal",
|
|
54
|
-
value:
|
|
55
|
-
children: ["Chart", "Table"].map((
|
|
42
|
+
value: t,
|
|
43
|
+
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(He, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(ne, { name: "table_chart_view" }) : /* @__PURE__ */ e(ne, { name: "format_list_bulleted" }) }, n))
|
|
56
44
|
}
|
|
57
|
-
),
|
|
58
|
-
const { trends:
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
s ?
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
s ?
|
|
45
|
+
), nt = ({ selectedDateRange: t, selectedCategoryGuid: r }) => {
|
|
46
|
+
const { trends: n } = R(), { isMobile: s, isDesktop: h } = re(), { getCategoryName: m } = G(), l = a.useMemo(() => {
|
|
47
|
+
const u = K(
|
|
48
|
+
t.start,
|
|
49
|
+
s ? k.MONTH_SHORT_YEAR : k.MONTH_YEAR
|
|
50
|
+
), i = K(
|
|
51
|
+
t.end,
|
|
52
|
+
s ? k.MONTH_SHORT_YEAR : k.MONTH_YEAR
|
|
65
53
|
);
|
|
66
|
-
return `${
|
|
67
|
-
}, [
|
|
68
|
-
return /* @__PURE__ */ f(
|
|
54
|
+
return `${u} - ${i}`;
|
|
55
|
+
}, [t, s]);
|
|
56
|
+
return /* @__PURE__ */ f(z, { sx: { mr: 10, minWidth: "60%" }, children: [
|
|
69
57
|
/* @__PURE__ */ e(
|
|
70
|
-
|
|
58
|
+
oe,
|
|
71
59
|
{
|
|
72
60
|
display: "block",
|
|
73
61
|
fontWeight: 700,
|
|
@@ -76,272 +64,272 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
76
64
|
overflow: "visible",
|
|
77
65
|
textOverflow: "unset"
|
|
78
66
|
},
|
|
79
|
-
variant:
|
|
80
|
-
children:
|
|
67
|
+
variant: h ? "H3" : "Body",
|
|
68
|
+
children: m(r) || n.sub_title
|
|
81
69
|
}
|
|
82
70
|
),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
71
|
+
/* @__PURE__ */ e(oe, { variant: h ? "Body" : "Small", children: l })
|
|
84
72
|
] });
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
return /* @__PURE__ */ e(
|
|
88
|
-
},
|
|
89
|
-
const { categories:
|
|
90
|
-
return /* @__PURE__ */ f(
|
|
73
|
+
}, ot = (t) => {
|
|
74
|
+
const r = t.row[t.field];
|
|
75
|
+
return /* @__PURE__ */ e(S, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(Pe, { amount: r, variant: "Small" }) });
|
|
76
|
+
}, st = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
77
|
+
const { categories: n } = R(), s = n.default_categories[t]?.replace(/&/g, "&") ?? fe[t];
|
|
78
|
+
return /* @__PURE__ */ f(S, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
91
79
|
/* @__PURE__ */ e(
|
|
92
|
-
|
|
80
|
+
z,
|
|
93
81
|
{
|
|
94
|
-
"aria-label":
|
|
82
|
+
"aria-label": Ve(n.category_icon_label_aria, s),
|
|
95
83
|
role: "img",
|
|
96
|
-
children: /* @__PURE__ */ e(
|
|
84
|
+
children: /* @__PURE__ */ e(Se, { categoryGuid: r })
|
|
97
85
|
}
|
|
98
86
|
),
|
|
99
|
-
/* @__PURE__ */ e(
|
|
87
|
+
/* @__PURE__ */ e(oe, { sx: { ml: 12, pb: 6 }, variant: "Small", children: s })
|
|
100
88
|
] });
|
|
101
|
-
},
|
|
102
|
-
|
|
89
|
+
}, at = (t) => /* @__PURE__ */ e(S, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
|
|
90
|
+
st,
|
|
103
91
|
{
|
|
104
|
-
categoryGuid:
|
|
105
|
-
topLevelCategoryGuid:
|
|
92
|
+
categoryGuid: t.row.category,
|
|
93
|
+
topLevelCategoryGuid: t.row.top_level_category_guid
|
|
106
94
|
}
|
|
107
|
-
) }),
|
|
108
|
-
const
|
|
109
|
-
for (; s <=
|
|
110
|
-
const
|
|
111
|
-
|
|
95
|
+
) }), rt = (t, r) => {
|
|
96
|
+
const n = [], s = new Date(t);
|
|
97
|
+
for (; s <= r; ) {
|
|
98
|
+
const h = K(s, k.MONTH);
|
|
99
|
+
n.push(h), s.setMonth(s.getMonth() + 1);
|
|
112
100
|
}
|
|
113
|
-
return
|
|
114
|
-
},
|
|
115
|
-
monthlyCategoryTotals:
|
|
116
|
-
selectedDateRange:
|
|
117
|
-
selectedCategory:
|
|
101
|
+
return n;
|
|
102
|
+
}, it = ({
|
|
103
|
+
monthlyCategoryTotals: t,
|
|
104
|
+
selectedDateRange: r,
|
|
105
|
+
selectedCategory: n,
|
|
118
106
|
onClickRow: s,
|
|
119
|
-
height:
|
|
120
|
-
sx:
|
|
107
|
+
height: h = "100dvh",
|
|
108
|
+
sx: m = {}
|
|
121
109
|
}) => {
|
|
122
|
-
const { onEvent:
|
|
123
|
-
{ field:
|
|
124
|
-
]),
|
|
110
|
+
const { onEvent: l } = j(), u = K(/* @__PURE__ */ new Date(), k.MONTH_SHORT), [i, _] = a.useState([
|
|
111
|
+
{ field: u, sort: "desc" }
|
|
112
|
+
]), y = a.useMemo(() => rt(r.start, r.end), [r]), c = [
|
|
125
113
|
{
|
|
126
114
|
field: "category",
|
|
127
115
|
flex: 1,
|
|
128
116
|
headerName: "Category",
|
|
129
117
|
minWidth: 175,
|
|
130
|
-
renderHeader:
|
|
131
|
-
renderCell:
|
|
118
|
+
renderHeader: de,
|
|
119
|
+
renderCell: at,
|
|
132
120
|
sortable: !0,
|
|
133
121
|
type: "string"
|
|
134
122
|
},
|
|
135
|
-
...
|
|
136
|
-
(
|
|
137
|
-
field:
|
|
123
|
+
...y.map(
|
|
124
|
+
(o) => ({
|
|
125
|
+
field: o,
|
|
138
126
|
flex: 1,
|
|
139
|
-
headerName:
|
|
127
|
+
headerName: o,
|
|
140
128
|
minWidth: 100,
|
|
141
|
-
renderHeader:
|
|
142
|
-
renderCell:
|
|
129
|
+
renderHeader: de,
|
|
130
|
+
renderCell: ot,
|
|
143
131
|
align: "right",
|
|
144
132
|
headerAlign: "right",
|
|
145
133
|
sortable: !0,
|
|
146
134
|
hideSortIcons: !1,
|
|
147
135
|
type: "number",
|
|
148
|
-
sortComparator:
|
|
136
|
+
sortComparator: De
|
|
149
137
|
})
|
|
150
138
|
)
|
|
151
|
-
],
|
|
152
|
-
const
|
|
153
|
-
(
|
|
154
|
-
),
|
|
155
|
-
(
|
|
156
|
-
) :
|
|
157
|
-
(
|
|
158
|
-
const { category_guid:
|
|
159
|
-
|
|
160
|
-
id:
|
|
161
|
-
category:
|
|
162
|
-
category_guid:
|
|
163
|
-
top_level_category_guid:
|
|
139
|
+
], C = a.useMemo(() => {
|
|
140
|
+
const o = t.filter(
|
|
141
|
+
(d) => !Ie(d) && !xe(d)
|
|
142
|
+
), D = (n ? o.filter(
|
|
143
|
+
(d) => d.category_guid === n || d.top_level_category_guid === n
|
|
144
|
+
) : o).reduce(
|
|
145
|
+
(d, x) => {
|
|
146
|
+
const { category_guid: v, top_level_category_guid: M, month: A, total: w, year: L } = x, E = n ? v : M;
|
|
147
|
+
d[E] || (d[E] = {
|
|
148
|
+
id: E,
|
|
149
|
+
category: E,
|
|
150
|
+
category_guid: v,
|
|
151
|
+
top_level_category_guid: M
|
|
164
152
|
});
|
|
165
|
-
const
|
|
166
|
-
return
|
|
153
|
+
const T = K(new Date(L, A - 1), k.MONTH_SHORT);
|
|
154
|
+
return d[E][T] || (d[E][T] = 0), d[E][T] = d[E][T] + Math.abs(w), d;
|
|
167
155
|
},
|
|
168
156
|
{}
|
|
169
157
|
);
|
|
170
|
-
return Object.values(
|
|
171
|
-
}, [
|
|
172
|
-
return /* @__PURE__ */ e(
|
|
173
|
-
|
|
158
|
+
return Object.values(D);
|
|
159
|
+
}, [t, n]);
|
|
160
|
+
return /* @__PURE__ */ e(z, { sx: { height: h, width: "100%", overflowX: "auto", boxShadow: "none", ...m }, children: /* @__PURE__ */ e(
|
|
161
|
+
Fe,
|
|
174
162
|
{
|
|
175
|
-
columns:
|
|
163
|
+
columns: c,
|
|
176
164
|
disableColumnFilter: !0,
|
|
177
165
|
disableColumnMenu: !0,
|
|
178
166
|
hideFooter: !0,
|
|
179
|
-
initialState: { sorting: { sortModel:
|
|
180
|
-
onRowClick: (
|
|
181
|
-
s?.(
|
|
182
|
-
...
|
|
183
|
-
listItem:
|
|
167
|
+
initialState: { sorting: { sortModel: i } },
|
|
168
|
+
onRowClick: (o) => {
|
|
169
|
+
s?.(o.row.category), l(p.TRENDS_CLICK_LIST_ITEM, {
|
|
170
|
+
...B,
|
|
171
|
+
listItem: fe[o.row.category]
|
|
184
172
|
});
|
|
185
173
|
},
|
|
186
|
-
onSortModelChange: (
|
|
187
|
-
|
|
174
|
+
onSortModelChange: (o) => {
|
|
175
|
+
_(o), l(p.TRENDS_CLICK_TABLE_SORT, B);
|
|
188
176
|
},
|
|
189
|
-
rows:
|
|
177
|
+
rows: C,
|
|
190
178
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
191
|
-
sortModel:
|
|
179
|
+
sortModel: i,
|
|
192
180
|
sortingOrder: ["asc", "desc"]
|
|
193
181
|
}
|
|
194
182
|
) });
|
|
195
|
-
},
|
|
183
|
+
}, ct = {
|
|
196
184
|
title: "Transaction List"
|
|
197
|
-
},
|
|
198
|
-
categoryGuid:
|
|
199
|
-
dateRange:
|
|
200
|
-
isOpen:
|
|
185
|
+
}, lt = ({
|
|
186
|
+
categoryGuid: t,
|
|
187
|
+
dateRange: r,
|
|
188
|
+
isOpen: n,
|
|
201
189
|
onClose: s
|
|
202
190
|
}) => {
|
|
203
|
-
const { onEvent:
|
|
204
|
-
() =>
|
|
205
|
-
[
|
|
191
|
+
const { onEvent: h } = j(), { selectedAccountGuids: m } = Y(), { common: l } = R(), { setFilter: u, sortedTransactions: i } = ae(), [_, y] = a.useState(""), c = a.useMemo(
|
|
192
|
+
() => i.find((o) => o.guid === _),
|
|
193
|
+
[_, i]
|
|
206
194
|
);
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
accounts:
|
|
210
|
-
dateRange:
|
|
211
|
-
custom: (
|
|
212
|
-
showSplits: !!
|
|
195
|
+
a.useEffect(() => {
|
|
196
|
+
u({
|
|
197
|
+
accounts: m,
|
|
198
|
+
dateRange: r,
|
|
199
|
+
custom: (o) => t === "" || t === o.category_guid || t === o.top_level_category_guid,
|
|
200
|
+
showSplits: !!t
|
|
213
201
|
});
|
|
214
|
-
}, [
|
|
215
|
-
const
|
|
216
|
-
|
|
202
|
+
}, [m, t, r]), a.useEffect(() => h(p.TRENDS_VIEW_TRANSACTIONS), []);
|
|
203
|
+
const C = () => {
|
|
204
|
+
y(""), s();
|
|
217
205
|
};
|
|
218
206
|
return /* @__PURE__ */ f(
|
|
219
|
-
|
|
207
|
+
$e,
|
|
220
208
|
{
|
|
221
|
-
ariaLabelClose:
|
|
222
|
-
isOpen:
|
|
223
|
-
onClose:
|
|
224
|
-
title:
|
|
209
|
+
ariaLabelClose: l.close_aria,
|
|
210
|
+
isOpen: n,
|
|
211
|
+
onClose: C,
|
|
212
|
+
title: ct.title,
|
|
225
213
|
children: [
|
|
226
|
-
|
|
227
|
-
!
|
|
214
|
+
c && /* @__PURE__ */ e(Be, { transaction: c }),
|
|
215
|
+
!c && /* @__PURE__ */ e(Ke, { onClick: y })
|
|
228
216
|
]
|
|
229
217
|
}
|
|
230
218
|
);
|
|
231
|
-
},
|
|
232
|
-
const { onEvent:
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
return window.addEventListener("resize",
|
|
236
|
-
}, []),
|
|
237
|
-
|
|
238
|
-
}, [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
219
|
+
}, dt = O(lt), ut = ({ onBackClick: t, sx: r }) => {
|
|
220
|
+
const { onEvent: n } = j(), { isDesktop: s, isTablet: h, isMobile: m } = re(), { visibleAccounts: l } = q(), { loadMonthlyCategoryTotals: u, monthlyCategoryTotals: i, getCategoryName: _ } = G(), { sortedTransactions: y } = ae(), { selectedDateRange: c, setSelectedDateRange: C } = he(), { isCopyLoaded: o, isInitialized: b, selectedAccounts: D, setSelectedAccounts: d } = Y(), { trends: x } = R(), [v, M] = a.useState(!1), [A, w] = a.useState(!1), [L, E] = a.useState("Chart"), [T, F] = a.useState(""), [Z, J] = a.useState(window.innerHeight), U = Z - (m ? 315 : 345);
|
|
221
|
+
a.useEffect(() => {
|
|
222
|
+
const g = () => J(window.innerHeight);
|
|
223
|
+
return window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
224
|
+
}, []), a.useEffect(() => {
|
|
225
|
+
d(l);
|
|
226
|
+
}, [l]), a.useEffect(() => {
|
|
227
|
+
b && u(
|
|
228
|
+
D,
|
|
229
|
+
c.start,
|
|
230
|
+
c.end
|
|
243
231
|
).finally(() => {
|
|
244
|
-
|
|
232
|
+
M(!0);
|
|
245
233
|
});
|
|
246
|
-
}, [
|
|
247
|
-
const
|
|
248
|
-
if (!
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
),
|
|
254
|
-
(
|
|
255
|
-
) :
|
|
234
|
+
}, [b, D, c]);
|
|
235
|
+
const X = a.useMemo(() => {
|
|
236
|
+
if (!v) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
237
|
+
const g = we(
|
|
238
|
+
i,
|
|
239
|
+
c.start,
|
|
240
|
+
c.end
|
|
241
|
+
), H = T.length ? g.filter(
|
|
242
|
+
(P) => P.top_level_category_guid === T || P.category_guid === T
|
|
243
|
+
) : Me(g);
|
|
256
244
|
return {
|
|
257
|
-
stackedDatasets:
|
|
258
|
-
unstackedDatasets:
|
|
245
|
+
stackedDatasets: H.filter(Re),
|
|
246
|
+
unstackedDatasets: H.filter(Le)
|
|
259
247
|
};
|
|
260
|
-
}, [
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
time_period:
|
|
248
|
+
}, [i, T, c]), Q = (g, H) => {
|
|
249
|
+
E(H ?? L), n(p.TRENDS_CLICK_TOGGLE_VIEW);
|
|
250
|
+
}, I = (g) => {
|
|
251
|
+
const H = ge(g?.[0], 1), P = g?.[1], Ce = se(P, H);
|
|
252
|
+
C({ start: H, end: P }), n(p.TRENDS_CLICK_TIME_WINDOW, {
|
|
253
|
+
time_period: Ce + "M"
|
|
266
254
|
});
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
255
|
+
}, N = () => {
|
|
256
|
+
n(p.TRENDS_CLICK_FILTER);
|
|
257
|
+
}, W = (g) => {
|
|
258
|
+
F(g);
|
|
259
|
+
}, ee = (g) => {
|
|
260
|
+
F(g), n(p.TRENDS_CLICK_LEGEND, { category: _(g) });
|
|
261
|
+
}, _e = (g) => {
|
|
262
|
+
n(p.TRENDS_HOVER_LEGEND, { category: _(g) });
|
|
263
|
+
}, ye = (g) => {
|
|
264
|
+
n(p.TRENDS_HOVER_AREA, { category: g });
|
|
265
|
+
}, Te = (g) => {
|
|
266
|
+
n(p.TRENDS_HOVER_POINT, { category: g });
|
|
279
267
|
};
|
|
280
|
-
return !
|
|
281
|
-
|
|
268
|
+
return !o || !b || !v ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ f(
|
|
269
|
+
pe,
|
|
282
270
|
{
|
|
283
|
-
accountOptions:
|
|
284
|
-
calendarActions: { onRangeChanged:
|
|
285
|
-
dateRange:
|
|
271
|
+
accountOptions: l,
|
|
272
|
+
calendarActions: { onRangeChanged: I },
|
|
273
|
+
dateRange: c,
|
|
286
274
|
dateRangeVariant: "timeframebuttons",
|
|
287
|
-
onAccountsFilterClick:
|
|
288
|
-
onBackClick:
|
|
289
|
-
sx:
|
|
290
|
-
title:
|
|
275
|
+
onAccountsFilterClick: N,
|
|
276
|
+
onBackClick: t,
|
|
277
|
+
sx: r,
|
|
278
|
+
title: x.title,
|
|
291
279
|
children: [
|
|
292
280
|
/* @__PURE__ */ f(
|
|
293
|
-
|
|
281
|
+
S,
|
|
294
282
|
{
|
|
295
283
|
sx: {
|
|
296
284
|
// eslint-disable-next-line no-nested-ternary
|
|
297
|
-
px: s ? 48 :
|
|
285
|
+
px: s ? 48 : h ? 24 : 12
|
|
298
286
|
},
|
|
299
287
|
children: [
|
|
300
288
|
/* @__PURE__ */ f(
|
|
301
|
-
|
|
289
|
+
S,
|
|
302
290
|
{
|
|
303
291
|
flexDirection: "row",
|
|
304
292
|
justifyContent: "space-between",
|
|
305
|
-
sx: { pb:
|
|
293
|
+
sx: { pb: m ? 12 : 24, pt: m ? 24 : 48 },
|
|
306
294
|
children: [
|
|
307
295
|
/* @__PURE__ */ e(
|
|
308
|
-
|
|
296
|
+
nt,
|
|
309
297
|
{
|
|
310
|
-
selectedCategoryGuid:
|
|
311
|
-
selectedDateRange:
|
|
298
|
+
selectedCategoryGuid: T,
|
|
299
|
+
selectedDateRange: c
|
|
312
300
|
}
|
|
313
301
|
),
|
|
314
|
-
/* @__PURE__ */ e(
|
|
302
|
+
/* @__PURE__ */ e(tt, { onTabChange: Q, selectedTab: L })
|
|
315
303
|
]
|
|
316
304
|
}
|
|
317
305
|
),
|
|
318
|
-
/* @__PURE__ */ f(
|
|
319
|
-
/* @__PURE__ */ e(
|
|
320
|
-
/* @__PURE__ */ e(
|
|
321
|
-
|
|
306
|
+
/* @__PURE__ */ f(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
307
|
+
/* @__PURE__ */ e(z, { flexGrow: 1, children: T && /* @__PURE__ */ f(ce, { onClick: () => F(""), sx: { p: 0, pr: 5 }, children: [
|
|
308
|
+
/* @__PURE__ */ e(ne, { name: "arrow_back" }),
|
|
309
|
+
x.all_categories
|
|
322
310
|
] }) }),
|
|
323
|
-
/* @__PURE__ */ e(
|
|
311
|
+
/* @__PURE__ */ e(ce, { onClick: () => w(!0), sx: { px: 5 }, children: `${x.view_transactions} (${y.length})` })
|
|
324
312
|
] }),
|
|
325
|
-
/* @__PURE__ */ f(
|
|
326
|
-
|
|
327
|
-
|
|
313
|
+
/* @__PURE__ */ f(z, { children: [
|
|
314
|
+
L === "Chart" && /* @__PURE__ */ e(
|
|
315
|
+
Ee,
|
|
328
316
|
{
|
|
329
|
-
availableHeight:
|
|
330
|
-
onClickLegend:
|
|
331
|
-
onHoverArea:
|
|
332
|
-
onHoverLegend:
|
|
333
|
-
onHoverPoint:
|
|
334
|
-
stackedDatasets:
|
|
335
|
-
unstackedDatasets:
|
|
317
|
+
availableHeight: U,
|
|
318
|
+
onClickLegend: ee,
|
|
319
|
+
onHoverArea: ye,
|
|
320
|
+
onHoverLegend: _e,
|
|
321
|
+
onHoverPoint: Te,
|
|
322
|
+
stackedDatasets: X.stackedDatasets,
|
|
323
|
+
unstackedDatasets: X.unstackedDatasets
|
|
336
324
|
}
|
|
337
325
|
),
|
|
338
|
-
|
|
339
|
-
|
|
326
|
+
L === "Table" && /* @__PURE__ */ e(
|
|
327
|
+
it,
|
|
340
328
|
{
|
|
341
|
-
monthlyCategoryTotals:
|
|
342
|
-
onClickRow:
|
|
343
|
-
selectedCategory:
|
|
344
|
-
selectedDateRange:
|
|
329
|
+
monthlyCategoryTotals: i,
|
|
330
|
+
onClickRow: W,
|
|
331
|
+
selectedCategory: T,
|
|
332
|
+
selectedDateRange: c
|
|
345
333
|
}
|
|
346
334
|
)
|
|
347
335
|
] })
|
|
@@ -349,27 +337,27 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
349
337
|
}
|
|
350
338
|
),
|
|
351
339
|
/* @__PURE__ */ e(
|
|
352
|
-
|
|
340
|
+
dt,
|
|
353
341
|
{
|
|
354
|
-
categoryGuid:
|
|
355
|
-
dateRange:
|
|
356
|
-
isOpen:
|
|
357
|
-
onClose: () =>
|
|
342
|
+
categoryGuid: T,
|
|
343
|
+
dateRange: c,
|
|
344
|
+
isOpen: A,
|
|
345
|
+
onClose: () => w(!1)
|
|
358
346
|
}
|
|
359
347
|
)
|
|
360
348
|
]
|
|
361
349
|
}
|
|
362
350
|
);
|
|
363
|
-
},
|
|
364
|
-
const
|
|
351
|
+
}, Jt = O(ut), mt = () => {
|
|
352
|
+
const t = je(), { monthlyCategoryTotals: r } = G(), { trends: n } = R(), s = Ae(r);
|
|
365
353
|
return /* @__PURE__ */ e(
|
|
366
|
-
|
|
354
|
+
Ye,
|
|
367
355
|
{
|
|
368
356
|
baseline: "min",
|
|
369
|
-
colors: [
|
|
357
|
+
colors: [t.palette.primary.main],
|
|
370
358
|
datasets: [s],
|
|
371
359
|
height: 300,
|
|
372
|
-
labels: [
|
|
360
|
+
labels: [n.spending_label],
|
|
373
361
|
showArea: !0,
|
|
374
362
|
showAverage: !0,
|
|
375
363
|
showLegend: !0,
|
|
@@ -378,37 +366,37 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
378
366
|
valueFormatterString: "0,0"
|
|
379
367
|
}
|
|
380
368
|
);
|
|
381
|
-
},
|
|
382
|
-
const { visibleAccounts:
|
|
383
|
-
return
|
|
384
|
-
|
|
385
|
-
}, [
|
|
386
|
-
|
|
387
|
-
}, [
|
|
388
|
-
|
|
369
|
+
}, gt = O(mt), ht = ({ onPrimaryCtaClick: t, sx: r }) => {
|
|
370
|
+
const { visibleAccounts: n } = q(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: h } = G(), { isInitialized: m } = Oe(), { trends: l } = R(), { isCopyLoaded: u, selectedAccounts: i, setSelectedAccounts: _ } = Y();
|
|
371
|
+
return a.useEffect(() => {
|
|
372
|
+
_(n);
|
|
373
|
+
}, [n]), a.useEffect(() => {
|
|
374
|
+
m && s(i).finally();
|
|
375
|
+
}, [m, i]), !u || !m ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(
|
|
376
|
+
Ze,
|
|
389
377
|
{
|
|
390
|
-
onPrimaryCtaClick:
|
|
391
|
-
primaryCtaLabel:
|
|
392
|
-
subTitle:
|
|
393
|
-
sx:
|
|
394
|
-
title:
|
|
395
|
-
children:
|
|
378
|
+
onPrimaryCtaClick: t,
|
|
379
|
+
primaryCtaLabel: l.primary_cta,
|
|
380
|
+
subTitle: l.sub_title,
|
|
381
|
+
sx: r,
|
|
382
|
+
title: l.mini_title,
|
|
383
|
+
children: h ? /* @__PURE__ */ e(gt, {}) : /* @__PURE__ */ e($, {})
|
|
396
384
|
}
|
|
397
385
|
);
|
|
398
|
-
},
|
|
399
|
-
title:
|
|
400
|
-
totalAmount:
|
|
401
|
-
transactionType:
|
|
386
|
+
}, Qt = O(ht), ft = 70, me = ({
|
|
387
|
+
title: t,
|
|
388
|
+
totalAmount: r,
|
|
389
|
+
transactionType: n,
|
|
402
390
|
percentage: s,
|
|
403
|
-
secondaryLabel:
|
|
404
|
-
shouldDisplayPercentage:
|
|
391
|
+
secondaryLabel: h,
|
|
392
|
+
shouldDisplayPercentage: m
|
|
405
393
|
}) => {
|
|
406
|
-
const { availableWidth:
|
|
394
|
+
const { availableWidth: l } = ze(), u = a.useRef(null), i = a.useRef(null), _ = Qe(Number(Math.abs(s)), {
|
|
407
395
|
style: "percent",
|
|
408
396
|
minimumIntegerDigits: 1
|
|
409
|
-
}),
|
|
397
|
+
}), y = l === 288 && te(r, "0,0.00").length > 10 ? te(r, "0,0") : te(r, "0,0.00"), c = n === "spending" ? s > 0 : s >= 0, C = n === "spending" ? "error.main" : "success.main", o = n === "spending" ? "success.main" : "text.secondary", b = u?.current, D = i?.current, d = b && D ? b.scrollWidth > D.clientWidth - ft : !1;
|
|
410
398
|
return /* @__PURE__ */ f(
|
|
411
|
-
|
|
399
|
+
S,
|
|
412
400
|
{
|
|
413
401
|
sx: {
|
|
414
402
|
border: 1,
|
|
@@ -421,7 +409,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
421
409
|
},
|
|
422
410
|
children: [
|
|
423
411
|
/* @__PURE__ */ f(
|
|
424
|
-
|
|
412
|
+
S,
|
|
425
413
|
{
|
|
426
414
|
sx: {
|
|
427
415
|
alignItems: "center",
|
|
@@ -429,18 +417,18 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
429
417
|
justifyContent: "space-between"
|
|
430
418
|
},
|
|
431
419
|
children: [
|
|
432
|
-
/* @__PURE__ */ e(
|
|
433
|
-
|
|
434
|
-
|
|
420
|
+
/* @__PURE__ */ e(V, { color: "text.secondary", variant: "caption", children: t }),
|
|
421
|
+
m && /* @__PURE__ */ f(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
422
|
+
c ? /* @__PURE__ */ e(Xe, { size: 20, sx: { color: C } }) : /* @__PURE__ */ e(qe, { size: 20, sx: { color: o } }),
|
|
435
423
|
/* @__PURE__ */ e(
|
|
436
|
-
|
|
424
|
+
V,
|
|
437
425
|
{
|
|
438
426
|
sx: {
|
|
439
|
-
color:
|
|
427
|
+
color: c ? C : o,
|
|
440
428
|
fontWeight: 600
|
|
441
429
|
},
|
|
442
430
|
variant: "body2",
|
|
443
|
-
children:
|
|
431
|
+
children: _
|
|
444
432
|
}
|
|
445
433
|
)
|
|
446
434
|
] })
|
|
@@ -448,9 +436,9 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
448
436
|
}
|
|
449
437
|
),
|
|
450
438
|
/* @__PURE__ */ f(
|
|
451
|
-
|
|
439
|
+
S,
|
|
452
440
|
{
|
|
453
|
-
ref:
|
|
441
|
+
ref: i,
|
|
454
442
|
sx: {
|
|
455
443
|
alignItems: "center",
|
|
456
444
|
flexDirection: "row",
|
|
@@ -458,19 +446,19 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
458
446
|
},
|
|
459
447
|
children: [
|
|
460
448
|
/* @__PURE__ */ e(
|
|
461
|
-
|
|
449
|
+
z,
|
|
462
450
|
{
|
|
463
|
-
ref:
|
|
451
|
+
ref: u,
|
|
464
452
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
465
|
-
children: /* @__PURE__ */ e(
|
|
453
|
+
children: /* @__PURE__ */ e(be, { children: y })
|
|
466
454
|
}
|
|
467
455
|
),
|
|
468
|
-
|
|
469
|
-
|
|
456
|
+
m && l >= 450 && !d && /* @__PURE__ */ e(
|
|
457
|
+
V,
|
|
470
458
|
{
|
|
471
|
-
color:
|
|
459
|
+
color: c ? C : o,
|
|
472
460
|
variant: "caption",
|
|
473
|
-
children:
|
|
461
|
+
children: h
|
|
474
462
|
}
|
|
475
463
|
)
|
|
476
464
|
]
|
|
@@ -479,50 +467,50 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
479
467
|
]
|
|
480
468
|
}
|
|
481
469
|
);
|
|
482
|
-
},
|
|
483
|
-
const { trends:
|
|
484
|
-
return /* @__PURE__ */ f(
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
-
/* @__PURE__ */ f(
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */ e(
|
|
470
|
+
}, pt = O(() => {
|
|
471
|
+
const { trends: t } = R();
|
|
472
|
+
return /* @__PURE__ */ f(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
473
|
+
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
474
|
+
/* @__PURE__ */ f(S, { children: [
|
|
475
|
+
/* @__PURE__ */ e(V, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
476
|
+
/* @__PURE__ */ e(V, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
489
477
|
] })
|
|
490
478
|
] });
|
|
491
|
-
}),
|
|
492
|
-
const { visibleAccounts:
|
|
493
|
-
start:
|
|
479
|
+
}), en = O(({ onCtaClick: t }) => {
|
|
480
|
+
const { visibleAccounts: r } = q(), { onEvent: n } = j(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: h, monthlyTotalsLoaded: m } = G(), l = {
|
|
481
|
+
start: Ue(/* @__PURE__ */ new Date(), 1),
|
|
494
482
|
end: /* @__PURE__ */ new Date()
|
|
495
|
-
}, { trends:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}, [
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
state:
|
|
483
|
+
}, { trends: u } = R(), { selectedAccounts: i, setSelectedAccounts: _, isInitialized: y } = Y();
|
|
484
|
+
a.useEffect(() => {
|
|
485
|
+
_(r);
|
|
486
|
+
}, [r]), a.useEffect(() => {
|
|
487
|
+
y && h(i, l.start).then(() => {
|
|
488
|
+
n(p.TRENDS_LOAD_WIDGET, {
|
|
489
|
+
state: r?.length ? "default" : "zeroState"
|
|
502
490
|
});
|
|
503
491
|
});
|
|
504
|
-
}, [
|
|
505
|
-
const { spendingData:
|
|
492
|
+
}, [y, i]);
|
|
493
|
+
const { spendingData: c, incomeData: C } = a.useMemo(
|
|
506
494
|
() => ({
|
|
507
|
-
spendingData:
|
|
508
|
-
incomeData:
|
|
495
|
+
spendingData: Ne(s, l),
|
|
496
|
+
incomeData: We(s, l)
|
|
509
497
|
}),
|
|
510
|
-
[s,
|
|
511
|
-
), [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
),
|
|
498
|
+
[s, l]
|
|
499
|
+
), [o, b] = c, [D, d] = C, x = le(b.y, o.y), v = le(d.y, D.y), M = y && !r?.length, A = () => {
|
|
500
|
+
n(
|
|
501
|
+
M ? p.TRENDS_CLICK_GET_STARTED : p.TRENDS_CLICK_VIEW_MORE
|
|
502
|
+
), t();
|
|
515
503
|
};
|
|
516
|
-
return !
|
|
517
|
-
|
|
504
|
+
return !m || !y ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(
|
|
505
|
+
et,
|
|
518
506
|
{
|
|
519
507
|
className: "mx-trends-microwidget",
|
|
520
|
-
ctaLabel:
|
|
521
|
-
onCTAClick:
|
|
522
|
-
subHeader:
|
|
523
|
-
title:
|
|
524
|
-
children:
|
|
525
|
-
|
|
508
|
+
ctaLabel: u.micro_primary_cta_label,
|
|
509
|
+
onCTAClick: A,
|
|
510
|
+
subHeader: M ? void 0 : u.micro_subheader,
|
|
511
|
+
title: u.title,
|
|
512
|
+
children: M ? /* @__PURE__ */ e(pt, {}) : /* @__PURE__ */ f(
|
|
513
|
+
S,
|
|
526
514
|
{
|
|
527
515
|
sx: {
|
|
528
516
|
alignItems: "stretch",
|
|
@@ -531,24 +519,24 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
531
519
|
},
|
|
532
520
|
children: [
|
|
533
521
|
/* @__PURE__ */ e(
|
|
534
|
-
|
|
522
|
+
me,
|
|
535
523
|
{
|
|
536
|
-
percentage:
|
|
537
|
-
secondaryLabel:
|
|
538
|
-
shouldDisplayPercentage:
|
|
539
|
-
title:
|
|
540
|
-
totalAmount:
|
|
524
|
+
percentage: x,
|
|
525
|
+
secondaryLabel: u.micro_secondary_label,
|
|
526
|
+
shouldDisplayPercentage: b.y !== 0 && o.y !== 0,
|
|
527
|
+
title: u.spending_label,
|
|
528
|
+
totalAmount: b.y,
|
|
541
529
|
transactionType: "spending"
|
|
542
530
|
}
|
|
543
531
|
),
|
|
544
532
|
/* @__PURE__ */ e(
|
|
545
|
-
|
|
533
|
+
me,
|
|
546
534
|
{
|
|
547
|
-
percentage:
|
|
548
|
-
secondaryLabel:
|
|
549
|
-
shouldDisplayPercentage:
|
|
550
|
-
title:
|
|
551
|
-
totalAmount:
|
|
535
|
+
percentage: v,
|
|
536
|
+
secondaryLabel: u.micro_secondary_label,
|
|
537
|
+
shouldDisplayPercentage: d.y !== 0 && D.y !== 0,
|
|
538
|
+
title: u.income_label,
|
|
539
|
+
totalAmount: d.y,
|
|
552
540
|
transactionType: "income"
|
|
553
541
|
}
|
|
554
542
|
)
|
|
@@ -557,472 +545,108 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
557
545
|
)
|
|
558
546
|
}
|
|
559
547
|
);
|
|
560
|
-
}),
|
|
561
|
-
({
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
({
|
|
584
|
-
totalAmount: n,
|
|
585
|
-
guid: o,
|
|
586
|
-
name: t,
|
|
587
|
-
transactions: s,
|
|
588
|
-
onClick: r,
|
|
589
|
-
isLastItem: h = !1,
|
|
590
|
-
showDivider: d = !0
|
|
591
|
-
}) => {
|
|
592
|
-
const { trends: c } = R(), { onEvent: l } = H(), m = `${s.length} ${s.length === 1 ? c.transaction : c.transactions}`, C = () => {
|
|
593
|
-
r?.(), l(y.TRENDS_CLICK_LIST_ITEM, {
|
|
594
|
-
...A,
|
|
595
|
-
listItem: t
|
|
596
|
-
});
|
|
597
|
-
};
|
|
598
|
-
return /* @__PURE__ */ f(i.Fragment, { children: [
|
|
599
|
-
/* @__PURE__ */ e(
|
|
600
|
-
Ee,
|
|
601
|
-
{
|
|
602
|
-
leftIcon: o ? /* @__PURE__ */ e(Te, { categoryGuid: o }) : void 0,
|
|
603
|
-
onClick: C,
|
|
604
|
-
rightContent: U(Math.abs(n), "0,0.00"),
|
|
605
|
-
rightIcon: r ? /* @__PURE__ */ e(Ke, {}) : void 0,
|
|
606
|
-
subtitle: m,
|
|
607
|
-
title: t
|
|
608
|
-
}
|
|
609
|
-
),
|
|
610
|
-
d && /* @__PURE__ */ e(Dt, { sx: { ml: h ? 24 : 68 } })
|
|
611
|
-
] }, o);
|
|
612
|
-
}
|
|
613
|
-
), $t = M(
|
|
614
|
-
({ availableHeight: n = 0, onCategoryClick: o }) => {
|
|
615
|
-
const { collapsedCategories: t, visibleCategories: s, setVisibleListLength: r } = q(), { isLargeDesktop: h, isDesktop: d } = $(), { trends: c } = R(), { onEvent: l } = H(), [m, C] = i.useState(!1), u = d || h;
|
|
616
|
-
i.useEffect(() => {
|
|
617
|
-
const g = Math.floor(n / 64) - 1, T = s.length + t.length;
|
|
618
|
-
g !== s.length && (r(u ? Math.max(g, 5) : 5), C(g >= T));
|
|
619
|
-
}, [n]);
|
|
620
|
-
const b = () => {
|
|
621
|
-
C(!m), l(y.TRENDS_CLICK_VIEW_MORE, {
|
|
622
|
-
...A
|
|
623
|
-
});
|
|
624
|
-
}, a = s.length + (m ? t.length : 0);
|
|
625
|
-
return /* @__PURE__ */ e(_, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ f(yt, { children: [
|
|
626
|
-
/* @__PURE__ */ e(_, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(De, { children: c.categories }) }),
|
|
627
|
-
s.map((g, T) => /* @__PURE__ */ e(
|
|
628
|
-
we,
|
|
629
|
-
{
|
|
630
|
-
...g,
|
|
631
|
-
isLastItem: T === a - 1,
|
|
632
|
-
onClick: g.transactions.length > 0 ? () => o(g) : void 0,
|
|
633
|
-
showDivider: !0
|
|
634
|
-
},
|
|
635
|
-
g.guid
|
|
636
|
-
)),
|
|
637
|
-
/* @__PURE__ */ e(
|
|
638
|
-
Tt,
|
|
639
|
-
{
|
|
640
|
-
in: m,
|
|
641
|
-
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
642
|
-
children: t.map((g, T) => {
|
|
643
|
-
const p = s.length + T;
|
|
644
|
-
return /* @__PURE__ */ e(
|
|
645
|
-
we,
|
|
646
|
-
{
|
|
647
|
-
...g,
|
|
648
|
-
isLastItem: p === a - 1,
|
|
649
|
-
onClick: g.transactions.length > 0 ? () => o(g) : void 0,
|
|
650
|
-
showDivider: !0
|
|
651
|
-
},
|
|
652
|
-
g.guid
|
|
653
|
-
);
|
|
654
|
-
})
|
|
655
|
-
}
|
|
656
|
-
),
|
|
657
|
-
t.length > 0 && /* @__PURE__ */ e(Kt, { isExpanded: m, onClick: b })
|
|
658
|
-
] }) });
|
|
659
|
-
}
|
|
660
|
-
), jt = [
|
|
661
|
-
"BillAmountNotStandard",
|
|
662
|
-
"CategorySpendingV2",
|
|
663
|
-
"CostOfLivingToIncome",
|
|
664
|
-
"DebtPaymentReminderV2",
|
|
665
|
-
"DiscoveredAccounts",
|
|
666
|
-
"DuplicatePaymentV2",
|
|
667
|
-
"FeeDetected",
|
|
668
|
-
"GreenGasPurchasesSummary",
|
|
669
|
-
"LargeTransaction",
|
|
670
|
-
"LowAccountBalance",
|
|
671
|
-
"MonthlyDebtToIncomeComparisonV2",
|
|
672
|
-
"MonthlyDepositSummaryV2",
|
|
673
|
-
"MonthlyNonEssentialCategorySummaryV2",
|
|
674
|
-
"MonthlySavingsToIncomeComparison",
|
|
675
|
-
"MonthlySpendToIncomeComparisonV2",
|
|
676
|
-
"MonthlySubscriptionAggregateV2",
|
|
677
|
-
"MonthlyTopMerchantSpendingV3",
|
|
678
|
-
"MonthlyObligationsStatus",
|
|
679
|
-
"QuarterlySummary",
|
|
680
|
-
"SaveAnExtra100Dollars",
|
|
681
|
-
"SaveEnoughToLiveOn",
|
|
682
|
-
"SavingsOpportunityV2",
|
|
683
|
-
"SubscriptionDetected",
|
|
684
|
-
"SubscriptionPriceIncrease",
|
|
685
|
-
"SetUpDirectDeposit",
|
|
686
|
-
"SwitchDirectDeposit",
|
|
687
|
-
"UnexpectedSubscriptionPayment",
|
|
688
|
-
"UpcomingBill",
|
|
689
|
-
"UpcomingSubscription",
|
|
690
|
-
"WeekendSpendingSummaryV2",
|
|
691
|
-
"WeeklyNewMerchantsV2",
|
|
692
|
-
"WeeklyNoSpendDays",
|
|
693
|
-
"WeeklySmallPurchasesSummary"
|
|
694
|
-
], Yt = ({ onInsightCardClick: n }) => {
|
|
695
|
-
const o = It(), { onEvent: t } = H(), { isMobile: s, isDesktop: r, isLargeDesktop: h } = $(), { beatStore: d, endpoint: c, sessionToken: l } = ve(), { isInitialized: m } = K(), [C, u] = i.useState(!1), b = o.palette.mode === "dark", a = r || h, g = a || s ? 1 : 2;
|
|
696
|
-
i.useEffect(() => {
|
|
697
|
-
m && d.loadBeats().finally(() => u(!0));
|
|
698
|
-
}, [m]);
|
|
699
|
-
const T = i.useMemo(() => C ? d.getFilteredBeats({ templates: jt }) : [], [C]), p = () => null, E = (D) => {
|
|
700
|
-
n?.(D), t(y.TRENDS_CLICK_INSIGHT, A);
|
|
701
|
-
}, w = a ? 200 : 170, I = a ? 170 : 124, k = T.length > 0 ? w : I;
|
|
702
|
-
return /* @__PURE__ */ e(Et, { sx: { height: k }, children: /* @__PURE__ */ e(
|
|
703
|
-
ct,
|
|
704
|
-
{
|
|
705
|
-
areBeatsLoading: d.isLoading,
|
|
706
|
-
beats: T,
|
|
707
|
-
endpoint: c,
|
|
708
|
-
logOutUser: p,
|
|
709
|
-
onCardClick: E,
|
|
710
|
-
showBorder: !0,
|
|
711
|
-
showCTAColocatedWithText: !1,
|
|
712
|
-
showCarouselControls: !0,
|
|
713
|
-
showHeader: a,
|
|
714
|
-
showIcon: !0,
|
|
715
|
-
showWithMargin: !1,
|
|
716
|
-
token: l,
|
|
717
|
-
useDarkMode: b,
|
|
718
|
-
userHasFullInsightFeedBeats: !1,
|
|
719
|
-
variant: "outlined",
|
|
720
|
-
visibleCardsCount: g
|
|
721
|
-
}
|
|
722
|
-
) });
|
|
723
|
-
}, Ut = M(Yt), Xt = M(({ chartLabel: n, chartColor: o }) => {
|
|
724
|
-
const { onEvent: t } = H(), {
|
|
725
|
-
categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels: r }
|
|
726
|
-
} = q();
|
|
727
|
-
return /* @__PURE__ */ e(_, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
728
|
-
ye,
|
|
729
|
-
{
|
|
730
|
-
baseline: "min",
|
|
731
|
-
colors: [o],
|
|
732
|
-
curveType: "bump",
|
|
733
|
-
customTooltipLabels: r,
|
|
734
|
-
datasets: [s],
|
|
735
|
-
height: 265,
|
|
736
|
-
labels: [n],
|
|
737
|
-
markStyles: () => ({
|
|
738
|
-
stroke: o
|
|
739
|
-
}),
|
|
740
|
-
onItemClick: () => {
|
|
741
|
-
t(y.TRENDS_CLICK_CHART, A);
|
|
742
|
-
},
|
|
743
|
-
showArea: !0,
|
|
744
|
-
showAverage: !0,
|
|
745
|
-
showAxisHighlight: !0,
|
|
746
|
-
showLegend: !0,
|
|
747
|
-
showTooltip: !0,
|
|
748
|
-
showXAxis: !0,
|
|
749
|
-
showXAxisTicks: !0,
|
|
750
|
-
showYAxis: !0,
|
|
751
|
-
showYAxisTicks: !0,
|
|
752
|
-
useCustomMark: !0,
|
|
753
|
-
valueFormatterString: "0,0"
|
|
754
|
-
}
|
|
755
|
-
) });
|
|
756
|
-
}), Zt = M(({ onClose: n }) => {
|
|
757
|
-
const o = Ne(), { onEvent: t } = H(), { common: s, trends: r } = R(), { selectedCategoryData: h, selectedDateRangeMonthRange: d } = q(), { sortedTransactions: c } = re(), [l, m] = i.useState(null);
|
|
758
|
-
if (!h)
|
|
759
|
-
return null;
|
|
760
|
-
const { guid: C, name: u, is_income: b, totalAmount: a } = h, g = b ? r.category_income : r.category_spending, T = xt(C, o), p = b ? r.income_label : r.spending_label, E = ` ${h.transactions.length === 1 ? r.transaction : r.transactions} (${h.transactions.length})`, w = i.useMemo(
|
|
761
|
-
() => c.find((D) => D.guid === l),
|
|
762
|
-
[l, c]
|
|
763
|
-
), I = (D) => D.category_guid === C || D.top_level_category_guid === C, k = () => {
|
|
764
|
-
n?.(), t(y.TRENDS_CLICK_BACK, A);
|
|
765
|
-
};
|
|
766
|
-
return /* @__PURE__ */ f(
|
|
767
|
-
fe,
|
|
768
|
-
{
|
|
769
|
-
ariaLabelClose: r.close_category_details,
|
|
770
|
-
isOpen: !0,
|
|
771
|
-
onClose: k,
|
|
772
|
-
shouldShowHeaderShadow: !0,
|
|
773
|
-
title: g,
|
|
774
|
-
children: [
|
|
775
|
-
/* @__PURE__ */ f(_, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
776
|
-
/* @__PURE__ */ f(Lt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
777
|
-
/* @__PURE__ */ e(
|
|
778
|
-
Ee,
|
|
779
|
-
{
|
|
780
|
-
leftIcon: /* @__PURE__ */ e(Te, { categoryGuid: C }),
|
|
781
|
-
rightContent: U(Math.abs(a), "0,0.00"),
|
|
782
|
-
subtitle: d,
|
|
783
|
-
title: u
|
|
784
|
-
}
|
|
785
|
-
),
|
|
786
|
-
/* @__PURE__ */ e(Xt, { chartColor: T, chartLabel: p }),
|
|
787
|
-
/* @__PURE__ */ f(_, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
788
|
-
/* @__PURE__ */ e(X, { bold: !0, variant: "body1", children: E }),
|
|
789
|
-
/* @__PURE__ */ e(vt, { filter: I })
|
|
790
|
-
] })
|
|
791
|
-
] }),
|
|
792
|
-
/* @__PURE__ */ e(
|
|
793
|
-
ke,
|
|
794
|
-
{
|
|
795
|
-
bgcolor: "transparent",
|
|
796
|
-
filter: I,
|
|
797
|
-
height: "calc(100vh - 475px)",
|
|
798
|
-
onClick: m
|
|
799
|
-
}
|
|
800
|
-
)
|
|
801
|
-
] }),
|
|
802
|
-
/* @__PURE__ */ e(
|
|
803
|
-
fe,
|
|
804
|
-
{
|
|
805
|
-
ariaLabelClose: s.close_aria,
|
|
806
|
-
isOpen: !!w,
|
|
807
|
-
onClose: () => m(""),
|
|
808
|
-
title: r.transaction,
|
|
809
|
-
children: w && /* @__PURE__ */ e(Re, { transaction: w })
|
|
810
|
-
}
|
|
811
|
-
)
|
|
812
|
-
]
|
|
813
|
-
}
|
|
814
|
-
);
|
|
815
|
-
}), Qt = (n, o) => {
|
|
816
|
-
const t = xe(n, o), s = Le(n, o);
|
|
817
|
-
return [t, s].filter((r) => r.length > 0);
|
|
818
|
-
}, qt = (n, o) => {
|
|
819
|
-
const [t, s] = n, r = t, h = s ?? t, d = [];
|
|
820
|
-
if (r) {
|
|
821
|
-
const c = r.reduce((l, m) => l + m.y, 0);
|
|
822
|
-
d.push({ label: o.income_label, amount: c });
|
|
823
|
-
}
|
|
824
|
-
if (h) {
|
|
825
|
-
const c = h.reduce((l, m) => l + m.y, 0);
|
|
826
|
-
d.push({ label: o.spending_label, amount: c });
|
|
827
|
-
}
|
|
828
|
-
return d;
|
|
829
|
-
}, Jt = ({
|
|
830
|
-
availableHeight: n = 0,
|
|
831
|
-
minHeight: o = 500,
|
|
832
|
-
selectedDateRange: t,
|
|
833
|
-
totals: s
|
|
834
|
-
}) => {
|
|
835
|
-
const r = He(), { onEvent: h } = H(), { trends: d } = R(), { isSmallMobile: c, isMobile: l, isSmallTablet: m, isTablet: C } = $(), u = [r.palette.chart?.chart1, r.palette.chart?.chart2], b = Qt(s, t), a = qt(b, d), [g, T] = i.useState(0), p = 458, E = 195, w = 56, I = l || c ? E : m || C ? p : g;
|
|
836
|
-
return i.useEffect(() => {
|
|
837
|
-
const D = Math.max(n - w, o);
|
|
838
|
-
T(D);
|
|
839
|
-
}, [n]), /* @__PURE__ */ e(
|
|
840
|
-
ye,
|
|
841
|
-
{
|
|
842
|
-
baseline: "min",
|
|
843
|
-
colors: u,
|
|
844
|
-
curveType: "bump",
|
|
845
|
-
datasets: b,
|
|
846
|
-
height: I,
|
|
847
|
-
labels: a,
|
|
848
|
-
onItemClick: () => {
|
|
849
|
-
h(y.TRENDS_CLICK_CHART, A);
|
|
850
|
-
},
|
|
851
|
-
showArea: !0,
|
|
852
|
-
showAxisHighlight: !0,
|
|
853
|
-
showLegend: !0,
|
|
854
|
-
showTooltip: !0,
|
|
855
|
-
showXAxis: !0,
|
|
856
|
-
showXAxisTicks: !0,
|
|
857
|
-
showYAxis: !0,
|
|
858
|
-
showYAxisTicks: !0,
|
|
859
|
-
valueFormatterString: "0,0"
|
|
860
|
-
}
|
|
861
|
-
);
|
|
862
|
-
}, en = M(Jt), tn = ({ onBackClick: n, onInsightCardClick: o, sx: t }) => {
|
|
863
|
-
const { onEvent: s } = H(), { config: r } = st(), { isLargeDesktop: h, isDesktop: d, isMobile: c } = $(), { visibleAccounts: l } = ie(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: C, monthlyCategoryTotals: u } = P(), { setFilter: b } = re(), { selectedDateRange: a, setSelectedCategoryData: g, setSelectedDateRange: T } = q(), {
|
|
864
|
-
isCopyLoaded: p,
|
|
865
|
-
isInitialized: E,
|
|
866
|
-
selectedAccounts: w,
|
|
867
|
-
selectedAccountGuids: I,
|
|
868
|
-
setSelectedAccounts: k
|
|
869
|
-
} = K(), { trends: D } = R(), N = Ue(), L = d || h, [x, z] = i.useState(!1), [F, ce] = i.useState("Chart"), [J, ee] = i.useState(""), [te, ne] = i.useState(!1), [oe, le] = i.useState(window.innerHeight), se = oe - 208, de = oe - (N ? 494 : 266), [he, ue] = i.useState(!1);
|
|
870
|
-
i.useEffect(() => {
|
|
871
|
-
const v = () => le(window.innerHeight);
|
|
872
|
-
return window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
873
|
-
}, []), i.useEffect(() => {
|
|
874
|
-
console.log("accounts changed: ", l.length), l.length ? k(l) : (ue(!0), z(!0));
|
|
875
|
-
}, [l]), i.useEffect(() => {
|
|
876
|
-
E && m(w, a.start, a.end).then(() => {
|
|
877
|
-
C(
|
|
878
|
-
w,
|
|
879
|
-
a.start,
|
|
880
|
-
a.end
|
|
548
|
+
}), _t = ({ onBackClick: t, onInsightCardClick: r, sx: n }) => {
|
|
549
|
+
const { onEvent: s } = j(), { config: h } = Ge(), { isLargeDesktop: m, isDesktop: l, isMobile: u } = re(), { visibleAccounts: i } = q(), { loadDateRangeCategoryTotals: _, loadMonthlyCategoryTotals: y, monthlyCategoryTotals: c } = G(), { setFilter: C } = ae(), { selectedDateRange: o, setSelectedCategoryData: b, setSelectedDateRange: D } = he(), {
|
|
550
|
+
isCopyLoaded: d,
|
|
551
|
+
isInitialized: x,
|
|
552
|
+
selectedAccounts: v,
|
|
553
|
+
selectedAccountGuids: M,
|
|
554
|
+
setSelectedAccounts: A
|
|
555
|
+
} = Y(), { trends: w } = R();
|
|
556
|
+
ve();
|
|
557
|
+
const [L, E] = a.useState(!1);
|
|
558
|
+
a.useState("Chart"), a.useState(""), a.useState(!1);
|
|
559
|
+
const [T, F] = a.useState(window.innerHeight), Z = T - 208;
|
|
560
|
+
a.useEffect(() => {
|
|
561
|
+
const I = () => F(window.innerHeight);
|
|
562
|
+
return window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
563
|
+
}, []), a.useEffect(() => {
|
|
564
|
+
A(i);
|
|
565
|
+
}, [i]), a.useEffect(() => {
|
|
566
|
+
x && _(v, o.start, o.end).then(() => {
|
|
567
|
+
y(
|
|
568
|
+
v,
|
|
569
|
+
o.start,
|
|
570
|
+
o.end
|
|
881
571
|
);
|
|
882
572
|
}).finally(() => {
|
|
883
|
-
|
|
884
|
-
...
|
|
885
|
-
time_period: `${
|
|
573
|
+
E(!0), s(p.TRENDS_LOAD_WIDGET, {
|
|
574
|
+
...B,
|
|
575
|
+
time_period: `${se(o.end, o.start)}M`
|
|
886
576
|
});
|
|
887
577
|
});
|
|
888
|
-
}, [
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
accounts:
|
|
892
|
-
dateRange: { start:
|
|
578
|
+
}, [x, v, o]), a.useEffect(() => {
|
|
579
|
+
if (c.length !== 0) {
|
|
580
|
+
const I = {
|
|
581
|
+
accounts: M,
|
|
582
|
+
dateRange: { start: o.start, end: o.end }
|
|
893
583
|
};
|
|
894
|
-
|
|
895
|
-
...
|
|
896
|
-
custom: (
|
|
897
|
-
(
|
|
584
|
+
C({
|
|
585
|
+
...I,
|
|
586
|
+
custom: (N) => !!c.find(
|
|
587
|
+
(W) => W.top_level_category_guid === N.top_level_category_guid || W.category_guid === N.category_guid
|
|
898
588
|
)
|
|
899
589
|
});
|
|
900
590
|
}
|
|
901
|
-
}, [
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
ce(V ?? F), s(y.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
908
|
-
...A,
|
|
909
|
-
toggleView: V
|
|
910
|
-
});
|
|
911
|
-
}, G = (v) => {
|
|
912
|
-
const V = Ie(v?.[0], 1), j = v?.[1], Fe = Ce(j, V);
|
|
913
|
-
T({ start: V, end: j }), s(y.TRENDS_CLICK_TIME_WINDOW, {
|
|
914
|
-
...A,
|
|
915
|
-
time_period: Fe + "M"
|
|
591
|
+
}, [c]);
|
|
592
|
+
const J = (I) => {
|
|
593
|
+
const N = ge(I?.[0], 1), W = I?.[1], ee = se(W, N);
|
|
594
|
+
D({ start: N, end: W }), s(p.TRENDS_CLICK_TIME_WINDOW, {
|
|
595
|
+
...B,
|
|
596
|
+
time_period: ee + "M"
|
|
916
597
|
});
|
|
917
|
-
},
|
|
918
|
-
s(
|
|
919
|
-
...
|
|
920
|
-
filterValue:
|
|
598
|
+
}, ie = (I) => {
|
|
599
|
+
s(p.TRENDS_CLICK_FILTER, {
|
|
600
|
+
...B,
|
|
601
|
+
filterValue: I
|
|
921
602
|
});
|
|
922
|
-
},
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
ee(""), s(y.TRENDS_CLICK_ALL_CATEGORIES, A);
|
|
926
|
-
}, ze = r.show_connections_widget_in_master ? "buttons" : "no-buttons";
|
|
927
|
-
return /* @__PURE__ */ f(
|
|
928
|
-
Ae,
|
|
603
|
+
}, U = h.show_connections_widget_in_master ? "buttons" : "no-buttons", X = !i?.length, Q = i.length > 0;
|
|
604
|
+
return !d || !L ? /* @__PURE__ */ e($, {}) : (console.log("accounts: ", i), console.log("!accounts?.length: ", X), console.log("accounts.length > 0: ", Q), /* @__PURE__ */ f(
|
|
605
|
+
pe,
|
|
929
606
|
{
|
|
930
|
-
accountOptions:
|
|
931
|
-
calendarActions: { onRangeChanged:
|
|
932
|
-
dateRange:
|
|
933
|
-
dateRangeVariant:
|
|
934
|
-
onAccountsFilterClick:
|
|
935
|
-
onBackClick:
|
|
936
|
-
sx:
|
|
937
|
-
title:
|
|
607
|
+
accountOptions: i,
|
|
608
|
+
calendarActions: { onRangeChanged: J },
|
|
609
|
+
dateRange: o,
|
|
610
|
+
dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
|
|
611
|
+
onAccountsFilterClick: ie,
|
|
612
|
+
onBackClick: t,
|
|
613
|
+
sx: n,
|
|
614
|
+
title: w.title,
|
|
938
615
|
children: [
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
Mt,
|
|
616
|
+
/* @__PURE__ */ e(
|
|
617
|
+
ue,
|
|
942
618
|
{
|
|
943
|
-
header:
|
|
619
|
+
header: w.zero_state_content_header,
|
|
944
620
|
icon: "",
|
|
945
621
|
onClick: () => {
|
|
946
622
|
},
|
|
947
|
-
primaryButton:
|
|
948
|
-
subText:
|
|
949
|
-
sx: { height:
|
|
950
|
-
variant:
|
|
623
|
+
primaryButton: w.empty_state_primary,
|
|
624
|
+
subText: w.empty_state_sub_text,
|
|
625
|
+
sx: { height: Z },
|
|
626
|
+
variant: U
|
|
951
627
|
}
|
|
952
|
-
)
|
|
953
|
-
|
|
628
|
+
),
|
|
629
|
+
/* @__PURE__ */ e(
|
|
630
|
+
ue,
|
|
954
631
|
{
|
|
955
|
-
|
|
956
|
-
|
|
632
|
+
header: w.zero_state_content_header,
|
|
633
|
+
icon: "",
|
|
634
|
+
onClick: () => {
|
|
957
635
|
},
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
flexDirection: "row",
|
|
963
|
-
justifyContent: "space-between",
|
|
964
|
-
sx: { pb: c ? 12 : 24, pt: c ? 24 : 48 },
|
|
965
|
-
children: [
|
|
966
|
-
/* @__PURE__ */ e(
|
|
967
|
-
Oe,
|
|
968
|
-
{
|
|
969
|
-
selectedCategoryGuid: J,
|
|
970
|
-
selectedDateRange: a
|
|
971
|
-
}
|
|
972
|
-
),
|
|
973
|
-
/* @__PURE__ */ e(We, { onTabChange: W, selectedTab: F })
|
|
974
|
-
]
|
|
975
|
-
}
|
|
976
|
-
),
|
|
977
|
-
/* @__PURE__ */ e(_, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(O, { flexGrow: 1, children: J && /* @__PURE__ */ f(pe, { onClick: Be, sx: { p: 0, pr: 5 }, children: [
|
|
978
|
-
/* @__PURE__ */ e(ae, { name: "arrow_back" }),
|
|
979
|
-
D.all_categories
|
|
980
|
-
] }) }) }),
|
|
981
|
-
/* @__PURE__ */ f(_, { flexDirection: L ? "row" : "column", gap: L ? 48 : 16, children: [
|
|
982
|
-
F === "Chart" && /* @__PURE__ */ f(Pe, { children: [
|
|
983
|
-
/* @__PURE__ */ e(O, { sx: { width: L ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
984
|
-
en,
|
|
985
|
-
{
|
|
986
|
-
availableHeight: se,
|
|
987
|
-
minHeight: 450,
|
|
988
|
-
selectedDateRange: a,
|
|
989
|
-
totals: u
|
|
990
|
-
}
|
|
991
|
-
) }),
|
|
992
|
-
/* @__PURE__ */ f(_, { gap: 16, sx: { width: L ? "32%" : "100%" }, children: [
|
|
993
|
-
N && /* @__PURE__ */ e(Ut, { onInsightCardClick: o }),
|
|
994
|
-
/* @__PURE__ */ e(
|
|
995
|
-
$t,
|
|
996
|
-
{
|
|
997
|
-
availableHeight: de,
|
|
998
|
-
onCategoryClick: me
|
|
999
|
-
}
|
|
1000
|
-
)
|
|
1001
|
-
] })
|
|
1002
|
-
] }),
|
|
1003
|
-
F === "Table" && /* @__PURE__ */ e(O, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1004
|
-
Ve,
|
|
1005
|
-
{
|
|
1006
|
-
height: "unset",
|
|
1007
|
-
monthlyCategoryTotals: u,
|
|
1008
|
-
onClickRow: Ge,
|
|
1009
|
-
selectedCategory: J,
|
|
1010
|
-
selectedDateRange: a
|
|
1011
|
-
}
|
|
1012
|
-
) })
|
|
1013
|
-
] }),
|
|
1014
|
-
te && /* @__PURE__ */ e(Zt, { onClose: S })
|
|
1015
|
-
]
|
|
636
|
+
primaryButton: w.empty_state_primary,
|
|
637
|
+
subText: w.empty_state_sub_text,
|
|
638
|
+
sx: { height: Z },
|
|
639
|
+
variant: U
|
|
1016
640
|
}
|
|
1017
641
|
)
|
|
1018
642
|
]
|
|
1019
643
|
}
|
|
1020
|
-
);
|
|
1021
|
-
},
|
|
644
|
+
));
|
|
645
|
+
}, tn = O(_t);
|
|
1022
646
|
export {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
647
|
+
Jt as TrendsFullWidget,
|
|
648
|
+
en as TrendsMicroWidget,
|
|
649
|
+
Qt as TrendsMiniWidget,
|
|
650
|
+
sn as TrendsStore,
|
|
651
|
+
tn as TrendsWidget
|
|
1028
652
|
};
|