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