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