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