@mx-cartographer/experiences 9.0.2 → 9.1.0-alpha.bb1
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/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-PKlh8caU.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
package/dist/trends/index.es.js
CHANGED
|
@@ -1,311 +1,300 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import Xt from "@mui/material/Badge";
|
|
35
|
-
import Zt from "@mui/material/IconButton";
|
|
36
|
-
import { A as w } from "../Analytics-CzGzz_sE.mjs";
|
|
37
|
-
import { T as ct } from "../EmbeddedCard-DPwJjqMH.mjs";
|
|
38
|
-
import { T as dt } from "../TransactionDetails-DctXr07p.mjs";
|
|
39
|
-
import { D as Pe } from "../Drawer-BXqqBMxg.mjs";
|
|
40
|
-
import { u as Ie } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
41
|
-
import { L as Le } from "../Loader-CxeBwuPG.mjs";
|
|
42
|
-
import { W as ut } from "../WidgetContainer-CmbU4CBH.mjs";
|
|
43
|
-
import { L as Ve } from "../LineChart-CejWS_rh.mjs";
|
|
44
|
-
import { M as Qt } from "../MiniWidgetContainer-BdPiUU-u.mjs";
|
|
45
|
-
import { subMonths as qt } from "date-fns";
|
|
46
|
-
import { TrendingUp as Jt, TrendingDown as eo, MultilineChart as to, ExpandLess as oo, ExpandMore as no, ChevronRight as so, ArrowBack as ro } from "@mxenabled/mx-icons";
|
|
47
|
-
import { M as ao } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
48
|
-
import io from "@mui/material/Collapse";
|
|
49
|
-
import We from "@mui/material/List";
|
|
50
|
-
import mt from "@mui/material/ListItem";
|
|
51
|
-
import lo from "@mui/material/ListItemButton";
|
|
52
|
-
import co from "@mui/material/ListItemIcon";
|
|
1
|
+
import { d as St, f as ze, s as Qe, u as Me } from "../GlobalCopyApi-BeXzaDH9.mjs";
|
|
2
|
+
import { J as ie, X as xt, a as wt, i as It, ln as B, r as Fe, rt as Re, un as X } from "../core-BexP5oiV.mjs";
|
|
3
|
+
import { $t as et, An as Dt, Gn as tt, Hn as Lt, On as Et, _n as Mt, c as ot, fn as nt, gn as At, hn as $e, hr as Rt, in as Nt, jn as be, lr as We, mn as rt, mr as Z, pn as kt, qn as Ht, sr as w, vn as Wt, yn as Oe } from "../accounts-DkyAiLpg.mjs";
|
|
4
|
+
import { n as Se } from "../Analytics-BKzTPees.mjs";
|
|
5
|
+
import { D as ye, E as xe, d as F, h as fe, i as at, k as st, m as Ge, n as we, p as A, s as q, t as Ie } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
+
import { n as Ot, t as Gt } from "../MiniWidgetContainer-COwnjfy7.mjs";
|
|
7
|
+
import { t as Ae } from "../HeaderCell-EhCUSjvj.mjs";
|
|
8
|
+
import { n as Bt, r as W } from "../microinsights-CRf3ChsJ.mjs";
|
|
9
|
+
import m, { useEffect as Pt, useRef as Vt, useState as zt } from "react";
|
|
10
|
+
import { observer as R } from "mobx-react-lite";
|
|
11
|
+
import v from "@mui/material/Stack";
|
|
12
|
+
import { CategoryIcon as De, H3 as Be, Icon as Ne, P as pe, Text as z } from "@mxenabled/mxui";
|
|
13
|
+
import ve from "@mui/material/Button";
|
|
14
|
+
import { ArrowBack as Ft, ChevronRight as $t, ExpandLess as Kt, ExpandMore as jt, MultilineChart as Yt, TrendingDown as Ut, TrendingUp as Xt } from "@mxenabled/mx-icons";
|
|
15
|
+
import { Fragment as Zt, jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
16
|
+
import { alpha as qt, styled as Jt, useTheme as J } from "@mui/material/styles";
|
|
17
|
+
import k from "@mui/material/Box";
|
|
18
|
+
import Qt from "@mui/material/ToggleButton";
|
|
19
|
+
import eo from "@mui/material/ToggleButtonGroup";
|
|
20
|
+
import to from "@mui/material/IconButton";
|
|
21
|
+
import oo from "numeral";
|
|
22
|
+
import { subMonths as no } from "date-fns";
|
|
23
|
+
import { parseISO as it } from "date-fns/parseISO";
|
|
24
|
+
import { addSeconds as lt } from "date-fns/addSeconds";
|
|
25
|
+
import { differenceInCalendarMonths as Te } from "date-fns/differenceInCalendarMonths";
|
|
26
|
+
import { Stack as ro } from "@mui/material";
|
|
27
|
+
import ct from "@mui/material/Card";
|
|
28
|
+
import dt from "@mui/material/CardContent";
|
|
29
|
+
import ke from "@mui/material/Divider";
|
|
30
|
+
import He from "@mui/material/List";
|
|
31
|
+
import ut from "@mui/material/ListItem";
|
|
32
|
+
import ao from "@mui/material/ListItemButton";
|
|
33
|
+
import so from "@mui/material/ListItemIcon";
|
|
53
34
|
import ht from "@mui/material/ListItemText";
|
|
54
|
-
import
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import ho from "@mui/material/
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ e(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
35
|
+
import io from "@mui/material/ListItemAvatar";
|
|
36
|
+
import { ChartsTooltipContainer as lo, useItemTooltip as co } from "@mui/x-charts/ChartsTooltip";
|
|
37
|
+
import { LineChart as uo } from "@mui/x-charts/LineChart";
|
|
38
|
+
import ho from "@mui/material/Badge";
|
|
39
|
+
import { DataGridPro as go, useGridApiContext as mo, useGridRootProps as po } from "@mui/x-data-grid-pro";
|
|
40
|
+
import yo from "@mui/material/Collapse";
|
|
41
|
+
import Ke from "@mui/material/Grid";
|
|
42
|
+
var gt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
43
|
+
const { categories: r } = A(), { getCategoryName: o } = q(), a = o(t);
|
|
44
|
+
return /* @__PURE__ */ f(v, {
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
direction: "column",
|
|
47
|
+
gap: "8",
|
|
48
|
+
justifyContent: "center",
|
|
49
|
+
mb: 4,
|
|
50
|
+
children: [/* @__PURE__ */ e(k, {
|
|
51
|
+
"aria-label": Qe(r.category_icon_label_aria, a),
|
|
52
|
+
mb: 4,
|
|
53
|
+
role: "img",
|
|
54
|
+
children: /* @__PURE__ */ e(De, { categoryGuid: n })
|
|
55
|
+
}), /* @__PURE__ */ e(z, {
|
|
56
|
+
variant: "body1",
|
|
57
|
+
children: a
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
}, fo = ({ categoryGuids: { guid: t, topLevelGuid: n }, hoveredAreaData: r, cursorPosition: o, chartContainerRef: a }) => {
|
|
61
|
+
const l = J(), s = Vt(null), [c, u] = zt({
|
|
62
|
+
x: o.x,
|
|
63
|
+
y: o.y
|
|
64
|
+
});
|
|
65
|
+
if (Pt(() => {
|
|
84
66
|
(() => {
|
|
85
|
-
const
|
|
86
|
-
if (!
|
|
87
|
-
const h =
|
|
88
|
-
let
|
|
89
|
-
|
|
67
|
+
const g = s.current, _ = a.current;
|
|
68
|
+
if (!g || !_) return;
|
|
69
|
+
const h = g.getBoundingClientRect(), p = _.getBoundingClientRect();
|
|
70
|
+
let C = o.x, x = o.y;
|
|
71
|
+
C + h.width * 2 > p.right ? C = o.x - h.width : C - h.width < p.left && (C = o.x), x + h.height * 2 > p.bottom && (x = o.y - h.height), u({
|
|
72
|
+
x: C,
|
|
73
|
+
y: x
|
|
74
|
+
});
|
|
90
75
|
})();
|
|
91
|
-
}, [o,
|
|
92
|
-
const i =
|
|
93
|
-
return /* @__PURE__ */ e(
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
onClick: () => c(u),
|
|
153
|
-
onMouseEnter: () => r(u),
|
|
154
|
-
onMouseLeave: () => r(null),
|
|
155
|
-
sx: {
|
|
156
|
-
color: "text.primary",
|
|
157
|
-
fontWeight: "normal",
|
|
158
|
-
display: "flex",
|
|
159
|
-
justifyContent: "center",
|
|
160
|
-
alignItems: "center",
|
|
161
|
-
paddingX: 8,
|
|
162
|
-
paddingY: 4,
|
|
163
|
-
borderRadius: 1,
|
|
164
|
-
opacity: f ? 1 : 0.7
|
|
165
|
-
},
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ e(
|
|
168
|
-
H,
|
|
169
|
-
{
|
|
170
|
-
sx: {
|
|
171
|
-
width: 16,
|
|
172
|
-
height: 16,
|
|
173
|
-
marginRight: a ? 5 : 10,
|
|
174
|
-
borderRadius: "2px",
|
|
175
|
-
backgroundColor: s ? f ? h : p : h
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
/* @__PURE__ */ e(F, { variant: "body1", children: d(u) })
|
|
180
|
-
]
|
|
181
|
-
},
|
|
182
|
-
u
|
|
183
|
-
);
|
|
76
|
+
}, [o, a]), !r) return null;
|
|
77
|
+
const i = r.reduce((y, g) => y + g.y, 0);
|
|
78
|
+
return /* @__PURE__ */ e(ct, {
|
|
79
|
+
ref: s,
|
|
80
|
+
sx: {
|
|
81
|
+
position: "absolute",
|
|
82
|
+
top: c.y,
|
|
83
|
+
left: c.x,
|
|
84
|
+
width: 250,
|
|
85
|
+
pointerEvents: "none"
|
|
86
|
+
},
|
|
87
|
+
children: /* @__PURE__ */ f(dt, { children: [
|
|
88
|
+
/* @__PURE__ */ f(k, {
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
display: "flex",
|
|
91
|
+
flexDirection: "column",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ e(gt, {
|
|
94
|
+
categoryGuid: t,
|
|
95
|
+
topLevelCategoryGuid: n
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ e(z, {
|
|
98
|
+
variant: "body2",
|
|
99
|
+
children: `${r.length}-month total`
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ e(be, {
|
|
102
|
+
amount: i,
|
|
103
|
+
bold: !0,
|
|
104
|
+
formatString: "0,0",
|
|
105
|
+
variant: "body2"
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ e(ke, { sx: {
|
|
110
|
+
my: 16,
|
|
111
|
+
width: "100%"
|
|
112
|
+
} }),
|
|
113
|
+
/* @__PURE__ */ e(Ke, {
|
|
114
|
+
container: !0,
|
|
115
|
+
children: r.map((y, g) => /* @__PURE__ */ f(m.Fragment, { children: [g > 0 && g % 3 === 0 && /* @__PURE__ */ e(ke, { sx: {
|
|
116
|
+
my: 16,
|
|
117
|
+
width: "100%"
|
|
118
|
+
} }), /* @__PURE__ */ e(Ke, {
|
|
119
|
+
size: 4,
|
|
120
|
+
children: /* @__PURE__ */ f(k, {
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
display: "flex",
|
|
123
|
+
flexDirection: "column",
|
|
124
|
+
children: [/* @__PURE__ */ e(z, {
|
|
125
|
+
color: l.palette.text.secondary,
|
|
126
|
+
variant: "caption",
|
|
127
|
+
children: y.x
|
|
128
|
+
}), /* @__PURE__ */ e(be, {
|
|
129
|
+
amount: y.y,
|
|
130
|
+
bold: !0,
|
|
131
|
+
formatString: "0,0",
|
|
132
|
+
variant: "body1"
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
})] }, g))
|
|
184
136
|
})
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
137
|
+
] })
|
|
138
|
+
});
|
|
139
|
+
}, Co = R(fo), _o = ({ sx: t, categoryGuids: n, hoveredLegend: r, legendRef: o, onHoverLegend: a, onClickLegend: l }) => {
|
|
140
|
+
const { isMobile: s } = Z(), { getCategoryName: c } = q();
|
|
141
|
+
return /* @__PURE__ */ e(v, {
|
|
142
|
+
direction: "row",
|
|
143
|
+
flexWrap: "wrap",
|
|
144
|
+
gap: s ? 2 : 6,
|
|
145
|
+
justifyContent: "start",
|
|
146
|
+
ref: o,
|
|
147
|
+
sx: t,
|
|
148
|
+
children: n.map(({ guid: u, top_level_guid: i }) => {
|
|
149
|
+
const y = r === u, g = Me[u], _ = Me[i], h = g ?? _ ?? Me.default, p = h + "33";
|
|
150
|
+
return /* @__PURE__ */ f(ve, {
|
|
151
|
+
onClick: () => l(u),
|
|
152
|
+
onMouseEnter: () => a(u),
|
|
153
|
+
onMouseLeave: () => a(null),
|
|
154
|
+
sx: {
|
|
155
|
+
color: "text.primary",
|
|
156
|
+
fontWeight: "normal",
|
|
157
|
+
display: "flex",
|
|
158
|
+
justifyContent: "center",
|
|
159
|
+
alignItems: "center",
|
|
160
|
+
paddingX: 8,
|
|
161
|
+
paddingY: 4,
|
|
162
|
+
borderRadius: 1,
|
|
163
|
+
opacity: y ? 1 : 0.7
|
|
164
|
+
},
|
|
165
|
+
children: [/* @__PURE__ */ e(k, { sx: {
|
|
166
|
+
width: 16,
|
|
167
|
+
height: 16,
|
|
168
|
+
marginRight: s ? 5 : 10,
|
|
169
|
+
borderRadius: "2px",
|
|
170
|
+
backgroundColor: r ? y ? h : p : h
|
|
171
|
+
} }), /* @__PURE__ */ e(z, {
|
|
172
|
+
variant: "body1",
|
|
173
|
+
children: c(u)
|
|
174
|
+
})]
|
|
175
|
+
}, u);
|
|
176
|
+
})
|
|
177
|
+
});
|
|
178
|
+
}, bo = ({ categoryGuids: { guid: t, topLevelGuid: n }, series: r, xData: o }) => {
|
|
179
|
+
const a = co(), l = J();
|
|
180
|
+
if (!a?.identifier) return null;
|
|
181
|
+
const { dataIndex: s, seriesId: c } = a.identifier;
|
|
182
|
+
if (s == null || !c) return null;
|
|
183
|
+
const u = r.find((y) => y.id === c)?.data?.[s], i = o?.[s];
|
|
184
|
+
return u === void 0 || !i ? null : /* @__PURE__ */ e(ct, {
|
|
185
|
+
sx: {
|
|
186
|
+
pt: 4,
|
|
187
|
+
px: 8
|
|
188
|
+
},
|
|
189
|
+
children: /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ f(k, {
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
display: "flex",
|
|
192
|
+
flexDirection: "column",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ e(gt, {
|
|
195
|
+
categoryGuid: t,
|
|
196
|
+
topLevelCategoryGuid: n
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ e(z, {
|
|
199
|
+
color: l.palette.text.secondary,
|
|
200
|
+
variant: "body2",
|
|
201
|
+
children: X(i, B.MONTH_SHORT_YEAR)
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ e(be, {
|
|
204
|
+
amount: String(u),
|
|
205
|
+
bold: !0,
|
|
206
|
+
formatString: "0,0",
|
|
207
|
+
variant: "body1"
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
}) })
|
|
211
|
+
});
|
|
212
|
+
}, vo = ({ onHoverArea: t, onHoverPoint: n, onHoverLegend: r, onClickLegend: o, stackedDatasets: a, unstackedDatasets: l = [], availableHeight: s = 0, minimumHeight: c = 350 }) => {
|
|
213
|
+
const u = J(), { isMobile: i } = Z(), [y, { height: g }] = Ot(), _ = m.useRef(null), [h, p] = m.useState(0);
|
|
214
|
+
m.useEffect(() => {
|
|
215
|
+
p(Math.max(s - g, c));
|
|
216
|
+
}, [s, g]);
|
|
217
|
+
const [C, x] = m.useState(null), [H, T] = m.useState({
|
|
218
218
|
hoveredSeriesId: null,
|
|
219
219
|
hoveredAreaData: null,
|
|
220
220
|
isAreaHovered: !1,
|
|
221
|
-
cursorPos: {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
), ie = Math.floor(Math.min(...V) / 100) * 100, te = Math.ceil(Math.max(ee, Ce) / 100) * 100, j = r.map((l, b) => ({
|
|
221
|
+
cursorPos: {
|
|
222
|
+
x: 0,
|
|
223
|
+
y: 0
|
|
224
|
+
}
|
|
225
|
+
}), { hoveredSeriesId: L, hoveredAreaData: E, isAreaHovered: N, cursorPos: S } = H, $ = N && L && E, le = !$, K = [...a, ...l], Q = K[0]?.dataset.length ?? 0, P = K.flatMap((d) => d.dataset.map((b) => b.x)), V = K.flatMap((d) => d.dataset.map((b) => b.y)), O = a[0]?.dataset?.map((d, b) => a.reduce((D, U) => D + U.dataset[b]?.y || 0, 0)) ?? [0], ee = Math.max(...O), ce = Math.max(...l.flatMap((d) => d.dataset.map((b) => b.y))), j = Math.floor(Math.min(...V) / 100) * 100, de = Math.ceil(Math.max(ee, ce) / 100) * 100, Y = a.map((d, b) => ({
|
|
227
226
|
id: `stacked-${b}`,
|
|
228
|
-
guid:
|
|
229
|
-
top_level_guid:
|
|
227
|
+
guid: d.category_guid,
|
|
228
|
+
top_level_guid: d.top_level_category_guid,
|
|
230
229
|
area: !0,
|
|
231
|
-
color:
|
|
232
|
-
data:
|
|
233
|
-
label:
|
|
230
|
+
color: a[b].category_color ?? u.palette.primary.main,
|
|
231
|
+
data: d.dataset.map((D) => D.y),
|
|
232
|
+
label: a[b].category_name,
|
|
234
233
|
stack: "total",
|
|
235
234
|
type: "line",
|
|
236
235
|
highlightScope: { highlight: "item" },
|
|
237
|
-
valueFormatter: (
|
|
238
|
-
})),
|
|
236
|
+
valueFormatter: (D) => ie(D, "0,0")
|
|
237
|
+
})), te = l.map((d, b) => ({
|
|
239
238
|
id: `unstacked-${b}`,
|
|
240
|
-
guid:
|
|
241
|
-
top_level_guid:
|
|
239
|
+
guid: d.category_guid,
|
|
240
|
+
top_level_guid: d.top_level_category_guid,
|
|
242
241
|
area: !1,
|
|
243
|
-
color:
|
|
244
|
-
data:
|
|
245
|
-
label:
|
|
242
|
+
color: d.category_color,
|
|
243
|
+
data: d.dataset.map((D) => D.y),
|
|
244
|
+
label: d.category_name,
|
|
246
245
|
type: "line",
|
|
247
|
-
valueFormatter: (
|
|
248
|
-
})),
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}))
|
|
257
|
-
], B = (l) => {
|
|
258
|
-
const I = l.startsWith("stacked-") ? r[parseInt(l.split("-")[1])] : c[parseInt(l.split("-")[1])];
|
|
246
|
+
valueFormatter: (D) => ie(D, "0,0")
|
|
247
|
+
})), ae = [...Y, ...te], oe = [...Y.map(({ guid: d, top_level_guid: b }) => ({
|
|
248
|
+
guid: d,
|
|
249
|
+
top_level_guid: b
|
|
250
|
+
})), ...te.map(({ guid: d, top_level_guid: b }) => ({
|
|
251
|
+
guid: d,
|
|
252
|
+
top_level_guid: b
|
|
253
|
+
}))], ne = (d) => {
|
|
254
|
+
const b = d.startsWith("stacked-") ? a[parseInt(d.split("-")[1])] : l[parseInt(d.split("-")[1])];
|
|
259
255
|
return {
|
|
260
|
-
guid:
|
|
261
|
-
topLevelGuid:
|
|
256
|
+
guid: b?.category_guid,
|
|
257
|
+
topLevelGuid: b?.top_level_category_guid
|
|
262
258
|
};
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
},
|
|
266
|
-
o?.(
|
|
267
|
-
},
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
},
|
|
271
|
-
const b = String(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
});
|
|
297
|
-
}, me = (l) => {
|
|
298
|
-
if (l.target instanceof Element && l.target.classList[0]?.includes("MuiMarkElement-root"))
|
|
299
|
-
return;
|
|
300
|
-
const b = l.currentTarget.getBoundingClientRect();
|
|
301
|
-
x((I) => ({
|
|
302
|
-
...I,
|
|
259
|
+
}, se = (d) => {
|
|
260
|
+
x(d), r?.(d ?? "");
|
|
261
|
+
}, ue = (d) => {
|
|
262
|
+
o?.(d ?? "");
|
|
263
|
+
}, he = () => {
|
|
264
|
+
const d = ne(String(L)).guid;
|
|
265
|
+
d && o?.(d);
|
|
266
|
+
}, ge = (d) => {
|
|
267
|
+
const b = String(d?.seriesId), D = ne(b).guid, U = ae.find((me) => me.id === b), Ce = U && d?.dataIndex !== void 0, Le = U && d?.dataIndex === void 0;
|
|
268
|
+
Ce ? (T({
|
|
269
|
+
hoveredSeriesId: b,
|
|
270
|
+
hoveredAreaData: null,
|
|
271
|
+
isAreaHovered: !1,
|
|
272
|
+
cursorPos: S
|
|
273
|
+
}), n?.(D)) : Le ? (T({
|
|
274
|
+
hoveredSeriesId: b,
|
|
275
|
+
hoveredAreaData: U?.data.map((me, Ee) => ({
|
|
276
|
+
x: P[Ee],
|
|
277
|
+
y: me
|
|
278
|
+
})) ?? [],
|
|
279
|
+
isAreaHovered: !0,
|
|
280
|
+
cursorPos: S
|
|
281
|
+
}), t?.(D)) : T({
|
|
282
|
+
hoveredSeriesId: null,
|
|
283
|
+
hoveredAreaData: null,
|
|
284
|
+
isAreaHovered: !1,
|
|
285
|
+
cursorPos: S
|
|
286
|
+
});
|
|
287
|
+
}, I = (d) => {
|
|
288
|
+
if (d.target instanceof Element && d.target.classList[0]?.includes("MuiMarkElement-root")) return;
|
|
289
|
+
const b = d.currentTarget.getBoundingClientRect();
|
|
290
|
+
T((D) => ({
|
|
291
|
+
...D,
|
|
303
292
|
cursorPos: {
|
|
304
|
-
x:
|
|
305
|
-
y:
|
|
293
|
+
x: d.clientX - b.left,
|
|
294
|
+
y: d.clientY - b.top
|
|
306
295
|
}
|
|
307
296
|
}));
|
|
308
|
-
},
|
|
297
|
+
}, G = {
|
|
309
298
|
p: 4,
|
|
310
299
|
"& .MuiBarLabel-root": {
|
|
311
300
|
fontSize: 10,
|
|
@@ -315,921 +304,799 @@ const gt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
315
304
|
opacity: 0.4,
|
|
316
305
|
transition: "opacity 0.3s ease"
|
|
317
306
|
},
|
|
318
|
-
"& .MuiAreaElement-root:hover": {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
...y && j.reduce((l, b, I) => {
|
|
325
|
-
const z = `.MuiAreaElement-series-stacked-${I}`;
|
|
326
|
-
return l[z] = {
|
|
327
|
-
opacity: j[I].guid === y ? 0.9 : 0.2
|
|
328
|
-
}, l;
|
|
307
|
+
"& .MuiAreaElement-root:hover": { opacity: 1 },
|
|
308
|
+
'& [class*="MuiLineElement-series-unstacked-"]': { strokeWidth: 3 },
|
|
309
|
+
...C && Y.reduce((d, b, D) => {
|
|
310
|
+
const U = `.MuiAreaElement-series-stacked-${D}`;
|
|
311
|
+
return d[U] = { opacity: Y[D].guid === C ? 0.9 : 0.2 }, d;
|
|
329
312
|
}, {})
|
|
330
313
|
};
|
|
331
|
-
return /* @__PURE__ */ e(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
314
|
+
return /* @__PURE__ */ e(k, {
|
|
315
|
+
onMouseMove: I,
|
|
316
|
+
ref: _,
|
|
317
|
+
sx: {
|
|
318
|
+
position: "relative",
|
|
319
|
+
touchAction: "pan-y",
|
|
320
|
+
"& svg": {
|
|
338
321
|
touchAction: "pan-y",
|
|
339
|
-
|
|
340
|
-
touchAction: "pan-y",
|
|
341
|
-
userSelect: "none"
|
|
342
|
-
},
|
|
343
|
-
"& .recharts-wrapper": {
|
|
344
|
-
touchAction: "pan-y"
|
|
345
|
-
}
|
|
322
|
+
userSelect: "none"
|
|
346
323
|
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
"
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
);
|
|
449
|
-
}, ft = ({ selectedDateRange: t, selectedCategoryGuid: n }) => {
|
|
450
|
-
const { trends: s } = R(), { isMobile: o, isDesktop: r } = Q(), { getCategoryName: c } = q(), a = g.useMemo(() => {
|
|
451
|
-
const i = t.start.getFullYear() === t.end.getFullYear() ? X(
|
|
452
|
-
t.start,
|
|
453
|
-
o ? G.MONTH_SHORT : G.MONTH_LONG
|
|
454
|
-
) : X(
|
|
455
|
-
t.start,
|
|
456
|
-
o ? G.MONTH_SHORT_YEAR : G.MONTH_YEAR
|
|
457
|
-
), f = X(
|
|
458
|
-
t.end,
|
|
459
|
-
o ? G.MONTH_SHORT_YEAR : G.MONTH_YEAR
|
|
460
|
-
);
|
|
461
|
-
return `${i} - ${f}`;
|
|
462
|
-
}, [t, o]), u = c(n) || (o ? s.sub_title : s.sub_title_by_category);
|
|
463
|
-
return /* @__PURE__ */ C(H, { children: [
|
|
464
|
-
/* @__PURE__ */ e(
|
|
465
|
-
Ge,
|
|
466
|
-
{
|
|
467
|
-
sx: {
|
|
468
|
-
fontSize: r ? null : 15,
|
|
469
|
-
overflow: "visible",
|
|
470
|
-
textOverflow: "unset"
|
|
471
|
-
},
|
|
472
|
-
children: u
|
|
473
|
-
}
|
|
474
|
-
),
|
|
475
|
-
/* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: a })
|
|
476
|
-
] });
|
|
477
|
-
}, xo = (t) => {
|
|
324
|
+
"& .recharts-wrapper": { touchAction: "pan-y" }
|
|
325
|
+
},
|
|
326
|
+
children: /* @__PURE__ */ f(v, {
|
|
327
|
+
direction: {
|
|
328
|
+
xs: "column",
|
|
329
|
+
md: "column"
|
|
330
|
+
},
|
|
331
|
+
spacing: {
|
|
332
|
+
xs: 0,
|
|
333
|
+
md: 4
|
|
334
|
+
},
|
|
335
|
+
sx: {
|
|
336
|
+
width: "100%",
|
|
337
|
+
position: "relative"
|
|
338
|
+
},
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ e(uo, {
|
|
341
|
+
height: h,
|
|
342
|
+
hideLegend: !0,
|
|
343
|
+
margin: {
|
|
344
|
+
bottom: 24,
|
|
345
|
+
left: 12,
|
|
346
|
+
right: 54,
|
|
347
|
+
top: 48
|
|
348
|
+
},
|
|
349
|
+
onAreaClick: he,
|
|
350
|
+
onHighlightChange: ge,
|
|
351
|
+
series: ae,
|
|
352
|
+
skipAnimation: !0,
|
|
353
|
+
slotProps: { tooltip: { trigger: le ? "item" : "none" } },
|
|
354
|
+
slots: { tooltip: le && L ? (d) => /* @__PURE__ */ e(lo, { children: /* @__PURE__ */ e(bo, {
|
|
355
|
+
...d,
|
|
356
|
+
categoryGuids: ne(L),
|
|
357
|
+
series: ae,
|
|
358
|
+
xData: P
|
|
359
|
+
}) }) : void 0 },
|
|
360
|
+
sx: G,
|
|
361
|
+
xAxis: [{
|
|
362
|
+
data: P,
|
|
363
|
+
scaleType: "time",
|
|
364
|
+
valueFormatter: (d) => X(d, B.MONTH_SHORT_YEAR),
|
|
365
|
+
tickNumber: Q
|
|
366
|
+
}],
|
|
367
|
+
yAxis: [{
|
|
368
|
+
min: j,
|
|
369
|
+
max: de || 100,
|
|
370
|
+
valueFormatter: (d) => oo(d).format("0a")
|
|
371
|
+
}]
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ e(_o, {
|
|
374
|
+
categoryGuids: oe,
|
|
375
|
+
hoveredLegend: C,
|
|
376
|
+
legendRef: y,
|
|
377
|
+
onClickLegend: ue,
|
|
378
|
+
onHoverLegend: se,
|
|
379
|
+
sx: { px: i ? 0 : 24 }
|
|
380
|
+
}),
|
|
381
|
+
$ && /* @__PURE__ */ e(Co, {
|
|
382
|
+
categoryGuids: ne(L),
|
|
383
|
+
chartContainerRef: _,
|
|
384
|
+
cursorPosition: S,
|
|
385
|
+
hoveredAreaData: E.map((d) => ({
|
|
386
|
+
...d,
|
|
387
|
+
x: X(d.x, B.MONTH_SHORT_YEAR)
|
|
388
|
+
}))
|
|
389
|
+
})
|
|
390
|
+
]
|
|
391
|
+
})
|
|
392
|
+
});
|
|
393
|
+
}, mt = ({ selectedTab: t, onTabChange: n }) => {
|
|
394
|
+
const { common: r } = A();
|
|
395
|
+
return /* @__PURE__ */ e(eo, {
|
|
396
|
+
"aria-label": r.view_toggle,
|
|
397
|
+
exclusive: !0,
|
|
398
|
+
onChange: n,
|
|
399
|
+
orientation: "horizontal",
|
|
400
|
+
value: t,
|
|
401
|
+
children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(Qt, {
|
|
402
|
+
"aria-label": o === "Chart" ? r.view_chart : r.view_table,
|
|
403
|
+
"aria-pressed": t === o,
|
|
404
|
+
color: "primary",
|
|
405
|
+
sx: { width: 56 },
|
|
406
|
+
value: o,
|
|
407
|
+
children: o === "Chart" ? /* @__PURE__ */ e(Ne, { name: "table_chart_view" }) : /* @__PURE__ */ e(Ne, { name: "format_list_bulleted" })
|
|
408
|
+
}, o))
|
|
409
|
+
});
|
|
410
|
+
}, pt = ({ selectedDateRange: t, selectedCategoryGuid: n }) => {
|
|
411
|
+
const { trends: r } = A(), { isMobile: o, isDesktop: a } = Z(), { getCategoryName: l } = q(), s = m.useMemo(() => `${t.start.getFullYear() === t.end.getFullYear() ? X(t.start, o ? B.MONTH_SHORT : B.MONTH_LONG) : X(t.start, o ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR)} - ${X(t.end, o ? B.MONTH_SHORT_YEAR : B.MONTH_YEAR)}`, [t, o]), c = l(n) || (o ? r.sub_title : r.sub_title_by_category);
|
|
412
|
+
return /* @__PURE__ */ f(k, { children: [/* @__PURE__ */ e(Be, {
|
|
413
|
+
sx: {
|
|
414
|
+
fontSize: a ? null : 15,
|
|
415
|
+
overflow: "visible",
|
|
416
|
+
textOverflow: "unset"
|
|
417
|
+
},
|
|
418
|
+
children: c
|
|
419
|
+
}), /* @__PURE__ */ e(z, {
|
|
420
|
+
variant: a ? "subtitle1" : "body2",
|
|
421
|
+
children: s
|
|
422
|
+
})] });
|
|
423
|
+
}, To = (t) => {
|
|
478
424
|
const n = t.id === "total";
|
|
479
|
-
return /* @__PURE__ */
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
425
|
+
return /* @__PURE__ */ f(v, {
|
|
426
|
+
alignItems: "center",
|
|
427
|
+
direction: "row",
|
|
428
|
+
role: "rowheader",
|
|
429
|
+
tabIndex: t.tabIndex,
|
|
430
|
+
children: [!n && /* @__PURE__ */ e(k, {
|
|
431
|
+
"aria-hidden": !0,
|
|
432
|
+
children: /* @__PURE__ */ e(De, {
|
|
433
|
+
categoryGuid: t.row.top_level_category_guid,
|
|
434
|
+
variant: "twotone"
|
|
435
|
+
})
|
|
436
|
+
}), /* @__PURE__ */ e(z, {
|
|
437
|
+
bold: n,
|
|
438
|
+
sx: { ml: 12 },
|
|
439
|
+
variant: n ? "body1" : "body2",
|
|
440
|
+
children: t.row.category
|
|
441
|
+
})]
|
|
442
|
+
});
|
|
483
443
|
}, je = (t) => {
|
|
484
|
-
const n = t.row.category_guid,
|
|
485
|
-
return /* @__PURE__ */ e(
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
444
|
+
const n = t.row.category_guid, r = t.row.top_level_category_guid, o = n === ze.INCOME || r === ze.INCOME, a = t.id === "total", l = t.field === "total", s = l ? t.row[t.field] : t.row.monthlyAmounts[t.field];
|
|
445
|
+
return /* @__PURE__ */ e(v, {
|
|
446
|
+
alignItems: "flex-end",
|
|
447
|
+
direction: "row",
|
|
448
|
+
tabIndex: t.tabIndex,
|
|
449
|
+
children: /* @__PURE__ */ e(be, {
|
|
450
|
+
amount: o ? Math.abs(s) : s,
|
|
489
451
|
isIncome: o,
|
|
490
|
-
sx: { fontWeight: o ||
|
|
452
|
+
sx: { fontWeight: o || l || a ? 600 : 500 },
|
|
491
453
|
symbol: o ? "+" : void 0,
|
|
492
|
-
variant:
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
},
|
|
496
|
-
const
|
|
497
|
-
return t[
|
|
498
|
-
},
|
|
499
|
-
const o = X(
|
|
500
|
-
return n + (t.includes(o) ?
|
|
501
|
-
},
|
|
502
|
-
const
|
|
454
|
+
variant: a ? "body1" : "body2"
|
|
455
|
+
})
|
|
456
|
+
});
|
|
457
|
+
}, Ye = (t, n) => {
|
|
458
|
+
const r = X(it(n.isoDate), B.MONTH_LONG);
|
|
459
|
+
return t[r] = n.amount, t;
|
|
460
|
+
}, Ue = (t) => (n, r) => {
|
|
461
|
+
const o = X(it(r.isoDate), B.MONTH_LONG);
|
|
462
|
+
return n + (t.includes(o) ? r.amount : 0);
|
|
463
|
+
}, So = (t, n) => {
|
|
464
|
+
const r = [], o = new Date(t);
|
|
503
465
|
for (; o <= n; ) {
|
|
504
|
-
const
|
|
505
|
-
|
|
466
|
+
const a = X(o, B.MONTH_LONG);
|
|
467
|
+
r.push(a), o.setMonth(o.getMonth() + 1);
|
|
506
468
|
}
|
|
507
|
-
return
|
|
508
|
-
},
|
|
509
|
-
const
|
|
469
|
+
return r;
|
|
470
|
+
}, xo = (t, n) => {
|
|
471
|
+
const r = {
|
|
510
472
|
field: "category",
|
|
511
473
|
flex: 1,
|
|
512
474
|
headerClassName: "trends-table-header",
|
|
513
475
|
headerName: n.category_title,
|
|
514
476
|
minWidth: 210,
|
|
515
|
-
renderHeader:
|
|
516
|
-
renderCell:
|
|
477
|
+
renderHeader: Ae,
|
|
478
|
+
renderCell: To,
|
|
517
479
|
sortable: !0,
|
|
518
|
-
sortComparator:
|
|
480
|
+
sortComparator: It,
|
|
519
481
|
type: "string"
|
|
520
|
-
}, o = t.map((
|
|
521
|
-
field:
|
|
482
|
+
}, o = t.map((l) => ({
|
|
483
|
+
field: l,
|
|
522
484
|
flex: 1,
|
|
523
485
|
headerClassName: "trends-table-header",
|
|
524
|
-
headerName:
|
|
486
|
+
headerName: l,
|
|
525
487
|
minWidth: 100,
|
|
526
|
-
renderHeader:
|
|
488
|
+
renderHeader: Ae,
|
|
527
489
|
renderCell: je,
|
|
528
490
|
align: "center",
|
|
529
491
|
headerAlign: "center",
|
|
530
492
|
sortable: !0,
|
|
531
493
|
hideSortIcons: !1,
|
|
532
494
|
type: "number",
|
|
533
|
-
sortComparator:
|
|
534
|
-
valueGetter: (
|
|
535
|
-
})),
|
|
495
|
+
sortComparator: Fe,
|
|
496
|
+
valueGetter: (s, c) => c.monthlyAmounts?.[l] ?? 0
|
|
497
|
+
})), a = {
|
|
536
498
|
field: "total",
|
|
537
499
|
flex: 1,
|
|
538
500
|
headerClassName: "trends-table-header",
|
|
539
501
|
headerName: n.table_column_total,
|
|
540
502
|
minWidth: 100,
|
|
541
|
-
renderHeader:
|
|
503
|
+
renderHeader: Ae,
|
|
542
504
|
renderCell: je,
|
|
543
505
|
align: "center",
|
|
544
506
|
headerAlign: "center",
|
|
545
507
|
sortable: !0,
|
|
546
508
|
hideSortIcons: !1,
|
|
547
509
|
type: "number",
|
|
548
|
-
sortComparator:
|
|
510
|
+
sortComparator: Fe
|
|
549
511
|
};
|
|
550
|
-
return [
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
512
|
+
return [
|
|
513
|
+
r,
|
|
514
|
+
...o,
|
|
515
|
+
a
|
|
516
|
+
];
|
|
517
|
+
}, Xe = (t, n, r, o, a) => {
|
|
518
|
+
const l = t.filter((s) => s.is_income === r).map((s) => {
|
|
519
|
+
let c = s.totalMonthlyAmounts;
|
|
520
|
+
return a && (c = s.monthlyAmounts), {
|
|
521
|
+
id: s.guid,
|
|
522
|
+
category: s.name,
|
|
523
|
+
category_guid: s.guid,
|
|
558
524
|
isParent: !1,
|
|
559
|
-
top_level_category_guid:
|
|
560
|
-
total:
|
|
561
|
-
monthlyAmounts:
|
|
525
|
+
top_level_category_guid: s.parent_guid || s.guid,
|
|
526
|
+
total: c.reduce(Ue(o), 0),
|
|
527
|
+
monthlyAmounts: c.reduce(Ye, {})
|
|
562
528
|
};
|
|
563
529
|
});
|
|
564
|
-
if (
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
id: `sub-${
|
|
568
|
-
category:
|
|
569
|
-
category_guid:
|
|
530
|
+
if (a && a.is_income === r) {
|
|
531
|
+
const s = a.monthlyAmounts.reduce(Ue(o), 0);
|
|
532
|
+
s !== 0 && l.push({
|
|
533
|
+
id: `sub-${a.guid}`,
|
|
534
|
+
category: Qe(n.category_general, a.name),
|
|
535
|
+
category_guid: a.guid,
|
|
570
536
|
isParent: !0,
|
|
571
|
-
top_level_category_guid:
|
|
572
|
-
total:
|
|
573
|
-
monthlyAmounts:
|
|
537
|
+
top_level_category_guid: a.guid,
|
|
538
|
+
total: s,
|
|
539
|
+
monthlyAmounts: a.monthlyAmounts.reduce(Ye, {})
|
|
574
540
|
});
|
|
575
541
|
}
|
|
576
|
-
return
|
|
577
|
-
},
|
|
542
|
+
return l;
|
|
543
|
+
}, wo = Jt("div")({
|
|
578
544
|
display: "flex",
|
|
579
545
|
visibility: "hidden",
|
|
580
546
|
width: 0
|
|
581
547
|
});
|
|
582
|
-
function Io({
|
|
583
|
-
|
|
584
|
-
index: n,
|
|
585
|
-
sortingOrder: s,
|
|
586
|
-
disabled: o,
|
|
587
|
-
className: r,
|
|
588
|
-
field: c
|
|
589
|
-
}) {
|
|
590
|
-
const a = Yt(), d = jt();
|
|
548
|
+
function Io({ direction: t, index: n, sortingOrder: r, disabled: o, className: a, field: l }) {
|
|
549
|
+
const s = mo(), c = po();
|
|
591
550
|
let u = null;
|
|
592
551
|
const i = {};
|
|
593
|
-
if (t === "asc" ? u =
|
|
594
|
-
const
|
|
595
|
-
let
|
|
596
|
-
t === "asc" ?
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
552
|
+
if (t === "asc" ? u = c.slots.columnSortedAscendingIcon : t === "desc" ? u = c.slots.columnSortedDescendingIcon : (u = c.slots.columnUnsortedIcon ?? null, i.sortingOrder = r), !u) return null;
|
|
553
|
+
const y = s.current.getColumn(l)?.headerName ?? l;
|
|
554
|
+
let g = "";
|
|
555
|
+
t === "asc" ? g = ", sorted ascending" : t === "desc" && (g = ", sorted descending");
|
|
556
|
+
const _ = `Sort by ${y}${["Total", "Category"].includes(y) ? "" : " category totals"}${g}`, h = /* @__PURE__ */ e(u, {
|
|
557
|
+
className: "MuiDataGrid-sortIcon",
|
|
558
|
+
fontSize: "small",
|
|
559
|
+
...i
|
|
560
|
+
}), p = /* @__PURE__ */ e(to, {
|
|
561
|
+
disabled: o,
|
|
562
|
+
size: "small",
|
|
563
|
+
tabIndex: -1,
|
|
564
|
+
...c.slotProps?.baseIconButton,
|
|
565
|
+
"aria-label": _,
|
|
566
|
+
className: `MuiDataGrid-sortButton${a ? ` ${a}` : ""}`,
|
|
567
|
+
title: _,
|
|
568
|
+
children: h
|
|
569
|
+
});
|
|
570
|
+
return /* @__PURE__ */ e(wo, {
|
|
571
|
+
className: "MuiDataGrid-iconButtonContainer",
|
|
572
|
+
children: n != null ? /* @__PURE__ */ e(ho, {
|
|
573
|
+
badgeContent: n,
|
|
574
|
+
color: "default",
|
|
575
|
+
overlap: "circular",
|
|
576
|
+
children: p
|
|
577
|
+
}) : p
|
|
578
|
+
});
|
|
611
579
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
580
|
+
var Do = m.memo(Io), Ze = ({ columns: t, onRowClick: n, parentCategory: r, rows: o, totalRow: a }) => {
|
|
581
|
+
const l = J(), { onEvent: s } = F(), c = l.palette.mode === "light";
|
|
582
|
+
return /* @__PURE__ */ e(go, {
|
|
583
|
+
columns: t,
|
|
584
|
+
disableColumnFilter: !0,
|
|
585
|
+
disableColumnMenu: !0,
|
|
586
|
+
hideFooter: !0,
|
|
587
|
+
initialState: { sorting: { sortModel: [{
|
|
588
|
+
field: "category",
|
|
589
|
+
sort: "asc"
|
|
590
|
+
}] } },
|
|
591
|
+
onRowClick: (u) => {
|
|
592
|
+
r || n?.(u.row.category_guid), s(w.TRENDS_CLICK_LIST_ITEM, {
|
|
593
|
+
...W,
|
|
594
|
+
listItem: St[u.row.category_guid]
|
|
595
|
+
});
|
|
596
|
+
},
|
|
597
|
+
pinnedRows: { bottom: a ? [a] : [] },
|
|
598
|
+
rowHeight: 64,
|
|
599
|
+
rows: o,
|
|
600
|
+
slotProps: { baseIconButton: {
|
|
601
|
+
color: "secondary",
|
|
602
|
+
sx: { ml: 8 }
|
|
603
|
+
} },
|
|
604
|
+
slots: { columnHeaderSortIcon: Do },
|
|
605
|
+
sortingOrder: ["asc", "desc"],
|
|
606
|
+
sx: {
|
|
607
|
+
borderColor: "divider",
|
|
608
|
+
borderWidth: 1,
|
|
609
|
+
borderStyle: "solid",
|
|
610
|
+
borderRadius: 2,
|
|
611
|
+
"& .MuiDataGrid-columnHeaders": {
|
|
612
|
+
bgcolor: c ? "neutral.50" : "neutral.800",
|
|
613
|
+
borderBottom: "none"
|
|
636
614
|
},
|
|
637
|
-
|
|
638
|
-
rows: o,
|
|
639
|
-
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
640
|
-
slots: { columnHeaderSortIcon: Lo },
|
|
641
|
-
sortingOrder: ["asc", "desc"],
|
|
642
|
-
sx: {
|
|
643
|
-
borderColor: "divider",
|
|
644
|
-
borderWidth: 1,
|
|
645
|
-
borderStyle: "solid",
|
|
646
|
-
borderRadius: 2,
|
|
647
|
-
"& .MuiDataGrid-columnHeaders": {
|
|
648
|
-
bgcolor: d ? "neutral.50" : "neutral.800",
|
|
649
|
-
borderBottom: "none"
|
|
650
|
-
},
|
|
651
|
-
"& .trends-table-header": {
|
|
652
|
-
bgcolor: d ? "neutral.50" : "neutral.800"
|
|
653
|
-
}
|
|
654
|
-
}
|
|
615
|
+
"& .trends-table-header": { bgcolor: c ? "neutral.50" : "neutral.800" }
|
|
655
616
|
}
|
|
656
|
-
);
|
|
657
|
-
}, yt = ({
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
return i && (h = i.subCategories.filter(
|
|
670
|
-
(p) => p.monthlyAmounts.some((y) => y.amount !== 0)
|
|
671
|
-
)), [
|
|
672
|
-
Ze(h, c, !0, d, i),
|
|
673
|
-
Ze(h, c, !1, d, i)
|
|
674
|
-
];
|
|
675
|
-
}, [a, d, i, c]), _ = {
|
|
617
|
+
});
|
|
618
|
+
}, yt = ({ selectedDateRange: t, selectedCategory: n, onClickRow: r, height: o = "100%", sx: a = {} }) => {
|
|
619
|
+
const { trends: l } = A(), { trendsCategories: s } = q(), c = m.useMemo(() => So(t.start, t.end), [t]), u = m.useMemo(() => xo(c, l), [c, l]), i = m.useMemo(() => {
|
|
620
|
+
if (n) return s.find((h) => h.guid === n);
|
|
621
|
+
}, [n, s]), [y, g] = m.useMemo(() => {
|
|
622
|
+
let h = s;
|
|
623
|
+
return i && (h = i.subCategories.filter((p) => p.monthlyAmounts.some((C) => C.amount !== 0))), [Xe(h, l, !0, c, i), Xe(h, l, !1, c, i)];
|
|
624
|
+
}, [
|
|
625
|
+
s,
|
|
626
|
+
c,
|
|
627
|
+
i,
|
|
628
|
+
l
|
|
629
|
+
]), _ = {
|
|
676
630
|
id: "total",
|
|
677
|
-
category:
|
|
631
|
+
category: l.table_column_total,
|
|
678
632
|
category_guid: "total",
|
|
679
633
|
isParent: !1,
|
|
680
634
|
top_level_category_guid: "total",
|
|
681
|
-
total:
|
|
682
|
-
monthlyAmounts:
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}), h),
|
|
686
|
-
{}
|
|
687
|
-
)
|
|
635
|
+
total: g.reduce((h, p) => h + p.total, 0),
|
|
636
|
+
monthlyAmounts: g.reduce((h, p) => (Object.entries(p.monthlyAmounts).forEach(([C, x]) => {
|
|
637
|
+
h[C] = (h[C] || 0) + x;
|
|
638
|
+
}), h), {})
|
|
688
639
|
};
|
|
689
|
-
return /* @__PURE__ */
|
|
690
|
-
|
|
691
|
-
{
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
);
|
|
717
|
-
}, Eo = {
|
|
718
|
-
title: "Transaction List"
|
|
719
|
-
}, Mo = ({
|
|
720
|
-
categoryGuid: t,
|
|
721
|
-
dateRange: n,
|
|
722
|
-
isOpen: s,
|
|
723
|
-
onClose: o
|
|
724
|
-
}) => {
|
|
725
|
-
const { onEvent: r } = $(), { selectedAccountGuids: c } = fe(), { common: a } = R(), { setFilter: d, sortedTransactions: u } = we(), [i, f] = g.useState(""), m = g.useMemo(
|
|
726
|
-
() => u.find((h) => h.guid === i),
|
|
727
|
-
[i, u]
|
|
728
|
-
);
|
|
729
|
-
g.useEffect(() => {
|
|
730
|
-
d({
|
|
731
|
-
accounts: c,
|
|
640
|
+
return /* @__PURE__ */ f(v, {
|
|
641
|
+
gap: 24,
|
|
642
|
+
sx: {
|
|
643
|
+
height: o,
|
|
644
|
+
width: "100%",
|
|
645
|
+
overflowX: "auto",
|
|
646
|
+
boxShadow: "none",
|
|
647
|
+
...a
|
|
648
|
+
},
|
|
649
|
+
children: [(!i || i && i.is_income) && /* @__PURE__ */ e(Ze, {
|
|
650
|
+
columns: u,
|
|
651
|
+
onRowClick: r,
|
|
652
|
+
parentCategory: i,
|
|
653
|
+
rows: y
|
|
654
|
+
}), (!i || i && !i.is_income) && /* @__PURE__ */ e(Ze, {
|
|
655
|
+
columns: u,
|
|
656
|
+
onRowClick: r,
|
|
657
|
+
parentCategory: i,
|
|
658
|
+
rows: g,
|
|
659
|
+
totalRow: _
|
|
660
|
+
})]
|
|
661
|
+
});
|
|
662
|
+
}, Lo = { title: "Transaction List" }, Eo = ({ categoryGuid: t, dateRange: n, isOpen: r, onClose: o }) => {
|
|
663
|
+
const { onEvent: a } = F(), { selectedAccountGuids: l } = fe(), { common: s } = A(), { setFilter: c, sortedTransactions: u } = xe(), [i, y] = m.useState(""), g = m.useMemo(() => u.find((h) => h.guid === i), [i, u]);
|
|
664
|
+
m.useEffect(() => {
|
|
665
|
+
c({
|
|
666
|
+
accounts: l,
|
|
732
667
|
dateRange: n,
|
|
733
668
|
custom: (h) => t === "" || t === h.category_guid || t === h.top_level_category_guid,
|
|
734
669
|
showSplits: !!t
|
|
735
670
|
});
|
|
736
|
-
}, [
|
|
671
|
+
}, [
|
|
672
|
+
l,
|
|
673
|
+
t,
|
|
674
|
+
n
|
|
675
|
+
]), m.useEffect(() => a(w.TRENDS_VIEW_TRANSACTIONS), []);
|
|
737
676
|
const _ = () => {
|
|
738
|
-
|
|
677
|
+
y(""), o();
|
|
739
678
|
};
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
]
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
}, Ao = A(Mo), Ro = ({ onBackClick: t, onMenuClick: n, sx: s }) => {
|
|
754
|
-
const { onEvent: o } = $(), { isDesktop: r, isTablet: c, isMobile: a } = Q(), { isAccountDataLoaded: d, loadAccountData: u } = De(), {
|
|
755
|
-
categoriesLoaded: i,
|
|
756
|
-
loadCategories: f,
|
|
757
|
-
loadDateRangeCategoryTotals: m,
|
|
758
|
-
loadMonthlyCategoryTotals: _,
|
|
759
|
-
monthlyCategoryTotals: h,
|
|
760
|
-
getCategoryName: p
|
|
761
|
-
} = q(), {
|
|
762
|
-
isTransactionDataLoaded: y,
|
|
763
|
-
loadTransactionData: T,
|
|
764
|
-
sortedTransactions: N
|
|
765
|
-
} = we(), { selectedDateRange: x, setSelectedDateRange: L } = ye(), { isInitialized: M, selectedAccounts: E } = fe(), { trends: v } = R(), [K, ae] = g.useState(!1), [Y, J] = g.useState(!1), [P, V] = g.useState("Chart"), [O, ee] = g.useState(""), [Ce, ie] = g.useState(window.innerHeight), j = Ce - (a ? 315 : 345);
|
|
766
|
-
Ie({
|
|
679
|
+
return /* @__PURE__ */ f(We, {
|
|
680
|
+
ariaLabelClose: s.close_aria,
|
|
681
|
+
isOpen: r,
|
|
682
|
+
onClose: _,
|
|
683
|
+
title: Lo.title,
|
|
684
|
+
children: [g && /* @__PURE__ */ e(ot, { transaction: g }), !g && /* @__PURE__ */ e(et, { onClick: y })]
|
|
685
|
+
});
|
|
686
|
+
}, Mo = R(Eo), Ao = ({ onBackClick: t, onMenuClick: n, sx: r }) => {
|
|
687
|
+
const { onEvent: o } = F(), { isDesktop: a, isTablet: l, isMobile: s } = Z(), { isAccountDataLoaded: c, loadAccountData: u } = we(), { categoriesLoaded: i, loadCategories: y, loadDateRangeCategoryTotals: g, loadMonthlyCategoryTotals: _, monthlyCategoryTotals: h, getCategoryName: p } = q(), { isTransactionDataLoaded: C, loadTransactionData: x, sortedTransactions: H } = xe(), { selectedDateRange: T, setSelectedDateRange: L } = ye(), { isInitialized: E, selectedAccounts: N } = fe(), { trends: S } = A(), [$, le] = m.useState(!1), [K, Q] = m.useState(!1), [P, V] = m.useState("Chart"), [O, ee] = m.useState(""), [ce, j] = m.useState(window.innerHeight), de = ce - (s ? 315 : 345);
|
|
688
|
+
Se({
|
|
767
689
|
widgetName: "TrendsFullWidget",
|
|
768
|
-
isLoaded:
|
|
769
|
-
}),
|
|
770
|
-
const
|
|
771
|
-
return window.addEventListener("resize",
|
|
772
|
-
}, []),
|
|
773
|
-
|
|
774
|
-
_(
|
|
775
|
-
E,
|
|
776
|
-
x.start,
|
|
777
|
-
x.end
|
|
778
|
-
);
|
|
690
|
+
isLoaded: $
|
|
691
|
+
}), m.useEffect(() => {
|
|
692
|
+
const I = () => j(window.innerHeight);
|
|
693
|
+
return window.addEventListener("resize", I), c || u().finally(), i || y().finally(), C || x().finally(), () => window.removeEventListener("resize", I);
|
|
694
|
+
}, []), m.useEffect(() => {
|
|
695
|
+
E && g(N, T.start, T.end).then(() => {
|
|
696
|
+
_(N, T.start, T.end);
|
|
779
697
|
}).finally(() => {
|
|
780
|
-
|
|
698
|
+
le(!0), o(w.TRENDS_LOAD_WIDGET, {
|
|
781
699
|
...W,
|
|
782
|
-
time_period: `${
|
|
700
|
+
time_period: `${Te(T.end, T.start)}M`
|
|
783
701
|
});
|
|
784
702
|
});
|
|
785
|
-
}, [
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
703
|
+
}, [
|
|
704
|
+
E,
|
|
705
|
+
N,
|
|
706
|
+
T
|
|
707
|
+
]);
|
|
708
|
+
const Y = m.useMemo(() => {
|
|
709
|
+
if (!$) return {
|
|
710
|
+
stackedDatasets: [],
|
|
711
|
+
unstackedDatasets: []
|
|
712
|
+
};
|
|
713
|
+
const I = wt(h, T.start, T.end), G = O.length ? I.filter((d) => d.top_level_category_guid === O || d.category_guid === O) : At(I);
|
|
795
714
|
return {
|
|
796
|
-
stackedDatasets:
|
|
797
|
-
unstackedDatasets:
|
|
715
|
+
stackedDatasets: G.filter(Mt),
|
|
716
|
+
unstackedDatasets: G.filter(Wt)
|
|
798
717
|
};
|
|
799
|
-
}, [
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
718
|
+
}, [
|
|
719
|
+
h,
|
|
720
|
+
O,
|
|
721
|
+
T
|
|
722
|
+
]), te = (I, G) => {
|
|
723
|
+
V(G ?? P), o(w.TRENDS_CLICK_TOGGLE_VIEW);
|
|
724
|
+
}, ae = (I) => {
|
|
725
|
+
const G = lt(I?.[0], 1), d = I?.[1], b = Te(d, G);
|
|
726
|
+
L({
|
|
727
|
+
start: G,
|
|
728
|
+
end: d
|
|
729
|
+
}), o(w.TRENDS_CLICK_TIME_WINDOW, { time_period: b + "M" });
|
|
730
|
+
}, oe = () => {
|
|
807
731
|
o(w.TRENDS_CLICK_FILTER);
|
|
808
|
-
},
|
|
809
|
-
ee(
|
|
810
|
-
}, se = (
|
|
811
|
-
ee(
|
|
812
|
-
},
|
|
813
|
-
o(w.TRENDS_HOVER_LEGEND, { category: p(
|
|
814
|
-
},
|
|
815
|
-
o(w.TRENDS_HOVER_AREA, { category:
|
|
816
|
-
},
|
|
817
|
-
o(w.TRENDS_HOVER_POINT, { category:
|
|
732
|
+
}, ne = (I) => {
|
|
733
|
+
ee(I);
|
|
734
|
+
}, se = (I) => {
|
|
735
|
+
ee(I), o(w.TRENDS_CLICK_LEGEND, { category: p(I) });
|
|
736
|
+
}, ue = (I) => {
|
|
737
|
+
o(w.TRENDS_HOVER_LEGEND, { category: p(I) });
|
|
738
|
+
}, he = (I) => {
|
|
739
|
+
o(w.TRENDS_HOVER_AREA, { category: I });
|
|
740
|
+
}, ge = (I) => {
|
|
741
|
+
o(w.TRENDS_HOVER_POINT, { category: I });
|
|
818
742
|
};
|
|
819
|
-
return !
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
743
|
+
return !E || !$ ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ f(tt, {
|
|
744
|
+
calendarActions: { onRangeChanged: ae },
|
|
745
|
+
dateRange: T,
|
|
746
|
+
dateRangeVariant: "timeframebuttons",
|
|
747
|
+
onAccountsFilterClick: oe,
|
|
748
|
+
onBackClick: t,
|
|
749
|
+
onMenuClick: n,
|
|
750
|
+
sx: r,
|
|
751
|
+
title: S.title,
|
|
752
|
+
children: [/* @__PURE__ */ f(v, {
|
|
753
|
+
sx: { px: a ? 48 : l ? 24 : 12 },
|
|
830
754
|
children: [
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
{
|
|
880
|
-
onClickRow: ue,
|
|
881
|
-
selectedCategory: O,
|
|
882
|
-
selectedDateRange: x
|
|
883
|
-
}
|
|
884
|
-
)
|
|
885
|
-
] })
|
|
886
|
-
]
|
|
887
|
-
}
|
|
888
|
-
),
|
|
889
|
-
/* @__PURE__ */ e(
|
|
890
|
-
Ao,
|
|
891
|
-
{
|
|
892
|
-
categoryGuid: O,
|
|
893
|
-
dateRange: x,
|
|
894
|
-
isOpen: Y,
|
|
895
|
-
onClose: () => J(!1)
|
|
896
|
-
}
|
|
897
|
-
)
|
|
755
|
+
/* @__PURE__ */ f(v, {
|
|
756
|
+
flexDirection: "row",
|
|
757
|
+
justifyContent: "space-between",
|
|
758
|
+
sx: {
|
|
759
|
+
pb: s ? 12 : 24,
|
|
760
|
+
pt: s ? 24 : 48
|
|
761
|
+
},
|
|
762
|
+
children: [/* @__PURE__ */ e(pt, {
|
|
763
|
+
selectedCategoryGuid: O,
|
|
764
|
+
selectedDateRange: T
|
|
765
|
+
}), /* @__PURE__ */ e(mt, {
|
|
766
|
+
onTabChange: te,
|
|
767
|
+
selectedTab: P
|
|
768
|
+
})]
|
|
769
|
+
}),
|
|
770
|
+
/* @__PURE__ */ f(v, {
|
|
771
|
+
alignItems: "center",
|
|
772
|
+
flexDirection: "row",
|
|
773
|
+
width: "100%",
|
|
774
|
+
children: [/* @__PURE__ */ e(k, {
|
|
775
|
+
flexGrow: 1,
|
|
776
|
+
children: O && /* @__PURE__ */ f(ve, {
|
|
777
|
+
onClick: () => ee(""),
|
|
778
|
+
sx: {
|
|
779
|
+
p: 0,
|
|
780
|
+
pr: 5
|
|
781
|
+
},
|
|
782
|
+
children: [/* @__PURE__ */ e(Ne, { name: "arrow_back" }), S.all_categories]
|
|
783
|
+
})
|
|
784
|
+
}), /* @__PURE__ */ e(ve, {
|
|
785
|
+
onClick: () => Q(!0),
|
|
786
|
+
sx: { px: 5 },
|
|
787
|
+
children: `${S.view_transactions} (${H.length})`
|
|
788
|
+
})]
|
|
789
|
+
}),
|
|
790
|
+
/* @__PURE__ */ f(k, { children: [P === "Chart" && /* @__PURE__ */ e(vo, {
|
|
791
|
+
availableHeight: de,
|
|
792
|
+
onClickLegend: se,
|
|
793
|
+
onHoverArea: he,
|
|
794
|
+
onHoverLegend: ue,
|
|
795
|
+
onHoverPoint: ge,
|
|
796
|
+
stackedDatasets: Y.stackedDatasets,
|
|
797
|
+
unstackedDatasets: Y.unstackedDatasets
|
|
798
|
+
}), P === "Table" && /* @__PURE__ */ e(yt, {
|
|
799
|
+
onClickRow: ne,
|
|
800
|
+
selectedCategory: O,
|
|
801
|
+
selectedDateRange: T
|
|
802
|
+
})] })
|
|
898
803
|
]
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
804
|
+
}), /* @__PURE__ */ e(Mo, {
|
|
805
|
+
categoryGuid: O,
|
|
806
|
+
dateRange: T,
|
|
807
|
+
isOpen: K,
|
|
808
|
+
onClose: () => Q(!1)
|
|
809
|
+
})]
|
|
810
|
+
});
|
|
811
|
+
}, Gn = R(Ao), Ro = () => {
|
|
812
|
+
const { monthlyCategoryTotals: t } = q(), { trends: n } = A(), r = J(), { availableHeight: o = 300 } = st(), a = m.useMemo(() => kt(t), [t]);
|
|
813
|
+
return /* @__PURE__ */ e(Oe, {
|
|
814
|
+
baseline: "min",
|
|
815
|
+
colors: [r.palette.primary.main],
|
|
816
|
+
datasets: [a],
|
|
817
|
+
height: o,
|
|
818
|
+
labels: [n.spending_label],
|
|
819
|
+
showArea: !0,
|
|
820
|
+
showAverage: !0,
|
|
821
|
+
showLegend: !0,
|
|
822
|
+
showMarkLabel: !0,
|
|
823
|
+
useCustomMark: !0,
|
|
824
|
+
valueFormatterString: "0,0"
|
|
825
|
+
});
|
|
826
|
+
}, No = R(Ro), ko = ({ onPrimaryCtaClick: t, sx: n }) => {
|
|
827
|
+
const { isAccountDataLoaded: r, loadAccountData: o } = we(), { loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: l } = q(), { isInitialized: s } = Ge(), { trends: c } = A(), { selectedAccounts: u } = fe();
|
|
828
|
+
return m.useEffect(() => {
|
|
829
|
+
r || o().finally();
|
|
830
|
+
}, []), Se({
|
|
924
831
|
widgetName: "TrendsMiniWidget",
|
|
925
|
-
isLoaded:
|
|
926
|
-
}),
|
|
927
|
-
|
|
928
|
-
}, [
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
})
|
|
948
|
-
|
|
832
|
+
isLoaded: l
|
|
833
|
+
}), m.useEffect(() => {
|
|
834
|
+
s && r && a(u).finally();
|
|
835
|
+
}, [
|
|
836
|
+
r,
|
|
837
|
+
s,
|
|
838
|
+
u
|
|
839
|
+
]), !r || !s || !l ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(Gt, {
|
|
840
|
+
contentStyles: {
|
|
841
|
+
height: "calc(100% - 72px)",
|
|
842
|
+
minHeight: 300,
|
|
843
|
+
":last-child": { pb: 0 }
|
|
844
|
+
},
|
|
845
|
+
onPrimaryCtaClick: t,
|
|
846
|
+
primaryCtaLabel: c.primary_cta,
|
|
847
|
+
subTitle: c.sub_title,
|
|
848
|
+
sx: {
|
|
849
|
+
height: "100%",
|
|
850
|
+
...n
|
|
851
|
+
},
|
|
852
|
+
title: c.mini_title,
|
|
853
|
+
children: /* @__PURE__ */ e(No, {})
|
|
854
|
+
});
|
|
855
|
+
}, Bn = R(ko), Ho = 70, qe = ({ title: t, totalAmount: n, transactionType: r, percentage: o, secondaryLabel: a, shouldDisplayPercentage: l }) => {
|
|
856
|
+
const { availableWidth: s } = st(), c = m.useRef(null), u = m.useRef(null), i = xt(Number(Math.abs(o)), {
|
|
949
857
|
style: "percent",
|
|
950
858
|
minimumIntegerDigits: 1
|
|
951
|
-
}),
|
|
952
|
-
return /* @__PURE__ */
|
|
953
|
-
|
|
954
|
-
|
|
859
|
+
}), y = s === 288 && ie(n, "0,0.00").length > 10 ? ie(n, "0,0") : ie(n, "0,0.00"), g = r === "spending" ? o > 0 : o >= 0, _ = r === "spending" ? "error.main" : "success.main", h = r === "spending" ? "success.main" : "text.secondary", p = c?.current, C = u?.current, x = p && C ? p.scrollWidth > C.clientWidth - Ho : !1;
|
|
860
|
+
return /* @__PURE__ */ f(v, {
|
|
861
|
+
sx: {
|
|
862
|
+
border: 1,
|
|
863
|
+
borderColor: "divider",
|
|
864
|
+
borderRadius: "4px",
|
|
865
|
+
flex: 1,
|
|
866
|
+
minWidth: 0,
|
|
867
|
+
px: 12,
|
|
868
|
+
py: 8
|
|
869
|
+
},
|
|
870
|
+
children: [/* @__PURE__ */ f(v, {
|
|
955
871
|
sx: {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
flex: 1,
|
|
960
|
-
minWidth: 0,
|
|
961
|
-
px: 12,
|
|
962
|
-
py: 8
|
|
872
|
+
alignItems: "center",
|
|
873
|
+
flexDirection: "row",
|
|
874
|
+
justifyContent: "space-between"
|
|
963
875
|
},
|
|
964
|
-
children: [
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}), is = A(({ onCtaClick: t }) => {
|
|
1034
|
-
const { isAccountDataLoaded: n, loadAccountData: s, visibleAccounts: o } = De();
|
|
1035
|
-
g.useEffect(() => {
|
|
1036
|
-
n || s().finally();
|
|
876
|
+
children: [/* @__PURE__ */ e(pe, {
|
|
877
|
+
color: "text.secondary",
|
|
878
|
+
variant: "caption",
|
|
879
|
+
children: t
|
|
880
|
+
}), l && /* @__PURE__ */ f(v, {
|
|
881
|
+
sx: {
|
|
882
|
+
alignItems: "center",
|
|
883
|
+
flexDirection: "row",
|
|
884
|
+
gap: 4
|
|
885
|
+
},
|
|
886
|
+
children: [g ? /* @__PURE__ */ e(Xt, {
|
|
887
|
+
size: 20,
|
|
888
|
+
sx: { color: _ }
|
|
889
|
+
}) : /* @__PURE__ */ e(Ut, {
|
|
890
|
+
size: 20,
|
|
891
|
+
sx: { color: h }
|
|
892
|
+
}), /* @__PURE__ */ e(pe, {
|
|
893
|
+
sx: {
|
|
894
|
+
color: g ? _ : h,
|
|
895
|
+
fontWeight: 600
|
|
896
|
+
},
|
|
897
|
+
variant: "body2",
|
|
898
|
+
children: i
|
|
899
|
+
})]
|
|
900
|
+
})]
|
|
901
|
+
}), /* @__PURE__ */ f(v, {
|
|
902
|
+
ref: u,
|
|
903
|
+
sx: {
|
|
904
|
+
alignItems: "center",
|
|
905
|
+
flexDirection: "row",
|
|
906
|
+
justifyContent: "space-between"
|
|
907
|
+
},
|
|
908
|
+
children: [/* @__PURE__ */ e(k, {
|
|
909
|
+
ref: c,
|
|
910
|
+
sx: {
|
|
911
|
+
overflow: "hidden",
|
|
912
|
+
textOverflow: "ellipsis",
|
|
913
|
+
whiteSpace: "nowrap"
|
|
914
|
+
},
|
|
915
|
+
children: /* @__PURE__ */ e(Be, { children: y })
|
|
916
|
+
}), l && s >= 450 && !x && /* @__PURE__ */ e(pe, {
|
|
917
|
+
color: g ? _ : h,
|
|
918
|
+
variant: "caption",
|
|
919
|
+
children: a
|
|
920
|
+
})]
|
|
921
|
+
})]
|
|
922
|
+
});
|
|
923
|
+
}, Wo = R(() => {
|
|
924
|
+
const { trends: t } = A();
|
|
925
|
+
return /* @__PURE__ */ f(v, {
|
|
926
|
+
sx: {
|
|
927
|
+
alignItems: "start",
|
|
928
|
+
flexDirection: "row",
|
|
929
|
+
gap: 12
|
|
930
|
+
},
|
|
931
|
+
children: [/* @__PURE__ */ e(Yt, { size: 32 }), /* @__PURE__ */ f(v, { children: [/* @__PURE__ */ e(pe, {
|
|
932
|
+
fontWeight: 600,
|
|
933
|
+
variant: "body1",
|
|
934
|
+
children: t.zero_state_content_header
|
|
935
|
+
}), /* @__PURE__ */ e(pe, {
|
|
936
|
+
color: "text.secondary",
|
|
937
|
+
variant: "subtitle2",
|
|
938
|
+
children: t.zero_state_content_description
|
|
939
|
+
})] })]
|
|
940
|
+
});
|
|
941
|
+
}), Pn = R(({ onCtaClick: t }) => {
|
|
942
|
+
const { isAccountDataLoaded: n, loadAccountData: r, visibleAccounts: o } = we();
|
|
943
|
+
m.useEffect(() => {
|
|
944
|
+
n || r().finally();
|
|
1037
945
|
}, []);
|
|
1038
|
-
const { onEvent:
|
|
1039
|
-
start:
|
|
946
|
+
const { onEvent: a } = F(), { monthlyCategoryTotals: l, loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: c } = q(), u = {
|
|
947
|
+
start: no(/* @__PURE__ */ new Date(), 1),
|
|
1040
948
|
end: /* @__PURE__ */ new Date()
|
|
1041
|
-
}, { trends: i } =
|
|
1042
|
-
|
|
949
|
+
}, { trends: i } = A(), { selectedAccounts: y, isInitialized: g } = fe();
|
|
950
|
+
Se({
|
|
1043
951
|
widgetName: "TrendsMicroWidget",
|
|
1044
|
-
isLoaded:
|
|
1045
|
-
}),
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
state: o?.length ? "default" : "zeroState"
|
|
1049
|
-
});
|
|
952
|
+
isLoaded: c
|
|
953
|
+
}), m.useEffect(() => {
|
|
954
|
+
g && s(y, u.start).then(() => {
|
|
955
|
+
a(w.TRENDS_LOAD_WIDGET, { state: o?.length ? "default" : "zeroState" });
|
|
1050
956
|
});
|
|
1051
|
-
}, [
|
|
1052
|
-
const { spendingData: _, incomeData: h } =
|
|
1053
|
-
()
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
[c, u]
|
|
1058
|
-
), [p, y] = _, [T, N] = h, x = Ye(y.y, p.y), L = Ye(N.y, T.y), M = m && !o?.length, E = () => {
|
|
1059
|
-
r(
|
|
1060
|
-
M ? w.TRENDS_CLICK_GET_STARTED : w.TRENDS_CLICK_VIEW_MORE
|
|
1061
|
-
), t();
|
|
957
|
+
}, [g, y]);
|
|
958
|
+
const { spendingData: _, incomeData: h } = m.useMemo(() => ({
|
|
959
|
+
spendingData: rt(l, u),
|
|
960
|
+
incomeData: nt(l, u)
|
|
961
|
+
}), [l, u]), [p, C] = _, [x, H] = h, T = $e(C.y, p.y), L = $e(H.y, x.y), E = g && !o?.length, N = () => {
|
|
962
|
+
a(E ? w.TRENDS_CLICK_GET_STARTED : w.TRENDS_CLICK_VIEW_MORE), t();
|
|
1062
963
|
};
|
|
1063
|
-
return !
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
}),
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
964
|
+
return !c || !g ? /* @__PURE__ */ e(Ie, {}) : /* @__PURE__ */ e(Ht, {
|
|
965
|
+
className: "mx-trends-microwidget",
|
|
966
|
+
ctaLabel: i.micro_primary_cta_label,
|
|
967
|
+
onCTAClick: N,
|
|
968
|
+
subHeader: E ? void 0 : i.micro_subheader,
|
|
969
|
+
title: i.title,
|
|
970
|
+
children: E ? /* @__PURE__ */ e(Wo, {}) : /* @__PURE__ */ f(v, {
|
|
971
|
+
sx: {
|
|
972
|
+
alignItems: "stretch",
|
|
973
|
+
flexDirection: "row",
|
|
974
|
+
gap: 12
|
|
975
|
+
},
|
|
976
|
+
children: [/* @__PURE__ */ e(qe, {
|
|
977
|
+
percentage: T,
|
|
978
|
+
secondaryLabel: i.micro_secondary_label,
|
|
979
|
+
shouldDisplayPercentage: C.y !== 0 && p.y !== 0,
|
|
980
|
+
title: i.spending_label,
|
|
981
|
+
totalAmount: C.y,
|
|
982
|
+
transactionType: "spending"
|
|
983
|
+
}), /* @__PURE__ */ e(qe, {
|
|
984
|
+
percentage: L,
|
|
985
|
+
secondaryLabel: i.micro_secondary_label,
|
|
986
|
+
shouldDisplayPercentage: H.y !== 0 && x.y !== 0,
|
|
987
|
+
title: i.income_label,
|
|
988
|
+
totalAmount: H.y,
|
|
989
|
+
transactionType: "income"
|
|
990
|
+
})]
|
|
991
|
+
})
|
|
992
|
+
});
|
|
993
|
+
}), Oo = R(({ isExpanded: t, onClick: n }) => {
|
|
994
|
+
const r = J();
|
|
995
|
+
return /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ e(ao, {
|
|
996
|
+
onClick: n,
|
|
997
|
+
sx: { justifyContent: "center" },
|
|
998
|
+
children: /* @__PURE__ */ f(v, {
|
|
999
|
+
sx: {
|
|
1000
|
+
color: r.palette.primary.main,
|
|
1001
|
+
flexDirection: "row",
|
|
1002
|
+
alignItems: "center"
|
|
1003
|
+
},
|
|
1004
|
+
children: [/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(z, {
|
|
1005
|
+
bold: !0,
|
|
1006
|
+
variant: "body2",
|
|
1007
|
+
children: t ? "View less" : "View more"
|
|
1008
|
+
}) }), /* @__PURE__ */ e(so, {
|
|
1009
|
+
sx: { color: r.palette.primary.main },
|
|
1010
|
+
children: t ? /* @__PURE__ */ e(Kt, {}) : /* @__PURE__ */ e(jt, { sx: {
|
|
1011
|
+
transition: "transform 0.3s ease-in-out",
|
|
1012
|
+
transform: t ? "rotate(180deg)" : "rotate(0deg)"
|
|
1013
|
+
} })
|
|
1014
|
+
})]
|
|
1015
|
+
})
|
|
1016
|
+
}) });
|
|
1017
|
+
}), Je = R(({ totalAmount: t, guid: n, name: r, transactions: o, onClick: a, isLastItem: l = !1, showDivider: s = !0 }) => {
|
|
1018
|
+
const { trends: c } = A(), { onEvent: u } = F(), i = J(), y = `${o.length} ${o.length === 1 ? c.transaction : c.transactions}`, g = () => {
|
|
1019
|
+
a?.(), u(w.TRENDS_CLICK_LIST_ITEM, {
|
|
1020
|
+
...W,
|
|
1021
|
+
listItem: r
|
|
1022
|
+
});
|
|
1023
|
+
};
|
|
1024
|
+
return /* @__PURE__ */ f(m.Fragment, { children: [/* @__PURE__ */ e(Et, {
|
|
1025
|
+
leftIcon: n ? /* @__PURE__ */ e(De, {
|
|
1026
|
+
categoryGuid: n,
|
|
1027
|
+
sx: {
|
|
1028
|
+
bgcolor: qt(Re(n, i), 0.15),
|
|
1029
|
+
border: `1px solid ${Re(n, i)}`,
|
|
1030
|
+
color: "text.primary"
|
|
1126
1031
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
),
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
})
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
};
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
}
|
|
1170
|
-
), Bo = A(
|
|
1171
|
-
({ availableHeight: t = 0, onCategoryClick: n }) => {
|
|
1172
|
-
const { collapsedCategories: s, visibleCategories: o, setVisibleListLength: r } = ye(), { isLargeDesktop: c, isDesktop: a } = Q(), { trends: d } = R(), { onEvent: u } = $(), [i, f] = g.useState(!1), m = a || c;
|
|
1173
|
-
g.useEffect(() => {
|
|
1174
|
-
const p = Math.floor(t / 64) - 1, y = o.length + s.length;
|
|
1175
|
-
p !== o.length && (r(m ? Math.max(p, 5) : 5), f(p >= y));
|
|
1176
|
-
}, [t]);
|
|
1177
|
-
const _ = () => {
|
|
1178
|
-
f(!i), u(w.TRENDS_CLICK_VIEW_MORE, {
|
|
1179
|
-
...W
|
|
1180
|
-
});
|
|
1181
|
-
}, h = o.length + (i ? s.length : 0);
|
|
1182
|
-
return /* @__PURE__ */ C(S, { sx: { width: "100%" }, children: [
|
|
1183
|
-
/* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Ge, { children: d.categories }) }),
|
|
1184
|
-
/* @__PURE__ */ C(We, { children: [
|
|
1185
|
-
o.map((p, y) => /* @__PURE__ */ e(
|
|
1186
|
-
Je,
|
|
1187
|
-
{
|
|
1032
|
+
}) : void 0,
|
|
1033
|
+
onClick: g,
|
|
1034
|
+
rightContent: ie(Math.abs(t), "0,0.00"),
|
|
1035
|
+
rightIcon: a ? /* @__PURE__ */ e($t, {}) : void 0,
|
|
1036
|
+
subtitle: y,
|
|
1037
|
+
title: r
|
|
1038
|
+
}), s && /* @__PURE__ */ e(ke, {
|
|
1039
|
+
component: "li",
|
|
1040
|
+
sx: { ml: l ? 24 : 68 }
|
|
1041
|
+
})] }, n);
|
|
1042
|
+
}), Go = R(({ availableHeight: t = 0, onCategoryClick: n }) => {
|
|
1043
|
+
const { collapsedCategories: r, visibleCategories: o, setVisibleListLength: a } = ye(), { isLargeDesktop: l, isDesktop: s } = Z(), { trends: c } = A(), { onEvent: u } = F(), [i, y] = m.useState(!1), g = s || l;
|
|
1044
|
+
m.useEffect(() => {
|
|
1045
|
+
const p = Math.floor(t / 64) - 1, C = o.length + r.length;
|
|
1046
|
+
p !== o.length && (a(g ? Math.max(p, 5) : 5), y(p >= C));
|
|
1047
|
+
}, [t]);
|
|
1048
|
+
const _ = () => {
|
|
1049
|
+
y(!i), u(w.TRENDS_CLICK_VIEW_MORE, { ...W });
|
|
1050
|
+
}, h = o.length + (i ? r.length : 0);
|
|
1051
|
+
return /* @__PURE__ */ f(v, {
|
|
1052
|
+
sx: { width: "100%" },
|
|
1053
|
+
children: [/* @__PURE__ */ e(v, {
|
|
1054
|
+
sx: {
|
|
1055
|
+
pb: 4,
|
|
1056
|
+
pt: 16,
|
|
1057
|
+
px: 16
|
|
1058
|
+
},
|
|
1059
|
+
children: /* @__PURE__ */ e(Be, { children: c.categories })
|
|
1060
|
+
}), /* @__PURE__ */ f(He, { children: [
|
|
1061
|
+
o.map((p, C) => /* @__PURE__ */ e(Je, {
|
|
1062
|
+
...p,
|
|
1063
|
+
isLastItem: C === h - 1,
|
|
1064
|
+
onClick: p.transactions.length > 0 ? () => n(p) : void 0,
|
|
1065
|
+
showDivider: !0
|
|
1066
|
+
}, p.guid)),
|
|
1067
|
+
/* @__PURE__ */ e(yo, {
|
|
1068
|
+
component: "li",
|
|
1069
|
+
in: i,
|
|
1070
|
+
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
1071
|
+
children: /* @__PURE__ */ e(He, { children: r.map((p, C) => {
|
|
1072
|
+
const x = o.length + C;
|
|
1073
|
+
return /* @__PURE__ */ e(Je, {
|
|
1188
1074
|
...p,
|
|
1189
|
-
isLastItem:
|
|
1075
|
+
isLastItem: x === h - 1,
|
|
1190
1076
|
onClick: p.transactions.length > 0 ? () => n(p) : void 0,
|
|
1191
1077
|
showDivider: !0
|
|
1192
|
-
},
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
showDivider: !0
|
|
1210
|
-
},
|
|
1211
|
-
p.guid
|
|
1212
|
-
);
|
|
1213
|
-
}) })
|
|
1214
|
-
}
|
|
1215
|
-
),
|
|
1216
|
-
s.length > 0 && /* @__PURE__ */ e(Go, { isExpanded: i, onClick: _ })
|
|
1217
|
-
] })
|
|
1218
|
-
] });
|
|
1219
|
-
}
|
|
1220
|
-
), Po = ({ beats: t, onInsightCardClick: n }) => {
|
|
1221
|
-
const { onEvent: s } = $(), { isMobile: o, isDesktop: r, isLargeDesktop: c } = Q(), { beatStore: a, endpoint: d, sessionToken: u } = Be(), i = r || c, f = i || o ? 1 : 2, m = () => null, _ = (T) => {
|
|
1222
|
-
n?.(T), s(w.TRENDS_CLICK_INSIGHT, W);
|
|
1223
|
-
}, h = i ? 200 : 170, p = i ? 170 : 124, y = t.length > 0 ? h : p;
|
|
1224
|
-
return /* @__PURE__ */ e(mo, { sx: { height: y }, children: /* @__PURE__ */ e(
|
|
1225
|
-
Kt,
|
|
1226
|
-
{
|
|
1227
|
-
areBeatsLoading: a.isLoading,
|
|
1078
|
+
}, p.guid);
|
|
1079
|
+
}) })
|
|
1080
|
+
}),
|
|
1081
|
+
r.length > 0 && /* @__PURE__ */ e(Oo, {
|
|
1082
|
+
isExpanded: i,
|
|
1083
|
+
onClick: _
|
|
1084
|
+
})
|
|
1085
|
+
] })]
|
|
1086
|
+
});
|
|
1087
|
+
}), Bo = ({ beats: t, onInsightCardClick: n }) => {
|
|
1088
|
+
const { onEvent: r } = F(), { isMobile: o, isDesktop: a, isLargeDesktop: l } = Z(), { beatStore: s, endpoint: c, sessionToken: u } = Ge(), i = a || l, y = i || o ? 1 : 2, g = () => null, _ = (C) => {
|
|
1089
|
+
n?.(C), r(w.TRENDS_CLICK_INSIGHT, W);
|
|
1090
|
+
}, h = i ? 200 : 170, p = i ? 170 : 124;
|
|
1091
|
+
return /* @__PURE__ */ e(ro, {
|
|
1092
|
+
sx: { height: t.length > 0 ? h : p },
|
|
1093
|
+
children: /* @__PURE__ */ e(Bt, {
|
|
1094
|
+
areBeatsLoading: s.isLoading,
|
|
1228
1095
|
beats: t,
|
|
1229
1096
|
cardStyle: "border",
|
|
1230
|
-
endpoint:
|
|
1097
|
+
endpoint: c,
|
|
1231
1098
|
headerSx: { p: 0 },
|
|
1232
|
-
logOutUser:
|
|
1099
|
+
logOutUser: g,
|
|
1233
1100
|
onCardClick: _,
|
|
1234
1101
|
showCarouselControls: !0,
|
|
1235
1102
|
showHeader: i,
|
|
@@ -1237,28 +1104,27 @@ const Lo = g.memo(Io), Qe = ({
|
|
|
1237
1104
|
showWithMargin: !1,
|
|
1238
1105
|
token: u,
|
|
1239
1106
|
userHasFullInsightFeedBeats: !1,
|
|
1240
|
-
visibleCardsCount:
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
},
|
|
1244
|
-
const { onEvent:
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1107
|
+
visibleCardsCount: y
|
|
1108
|
+
})
|
|
1109
|
+
});
|
|
1110
|
+
}, Po = R(Bo), Vo = R(({ chartLabel: t, chartColor: n }) => {
|
|
1111
|
+
const { onEvent: r } = F(), { categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: a } } = ye();
|
|
1112
|
+
return /* @__PURE__ */ e(v, {
|
|
1113
|
+
sx: {
|
|
1114
|
+
pt: 12,
|
|
1115
|
+
width: "100%"
|
|
1116
|
+
},
|
|
1117
|
+
children: /* @__PURE__ */ e(Oe, {
|
|
1250
1118
|
baseline: "min",
|
|
1251
1119
|
colors: [n],
|
|
1252
1120
|
curveType: "bump",
|
|
1253
|
-
customTooltipLabels:
|
|
1121
|
+
customTooltipLabels: a,
|
|
1254
1122
|
datasets: [o],
|
|
1255
1123
|
height: 265,
|
|
1256
1124
|
labels: [t],
|
|
1257
|
-
markStyles: () => ({
|
|
1258
|
-
stroke: n
|
|
1259
|
-
}),
|
|
1125
|
+
markStyles: () => ({ stroke: n }),
|
|
1260
1126
|
onItemClick: () => {
|
|
1261
|
-
|
|
1127
|
+
r(w.TRENDS_CLICK_CHART, W);
|
|
1262
1128
|
},
|
|
1263
1129
|
showArea: !0,
|
|
1264
1130
|
showAverage: !0,
|
|
@@ -1271,107 +1137,129 @@ const Lo = g.memo(Io), Qe = ({
|
|
|
1271
1137
|
showYAxisTicks: !0,
|
|
1272
1138
|
useCustomMark: !0,
|
|
1273
1139
|
valueFormatterString: "0,0"
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
}),
|
|
1277
|
-
const t =
|
|
1278
|
-
if (!
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1140
|
+
})
|
|
1141
|
+
});
|
|
1142
|
+
}), zo = R(() => {
|
|
1143
|
+
const t = J(), { is_mobile_webview: n } = at(), { isDesktop: r, isSmallTablet: o, isTablet: a } = Z(), { common: l, trends: s } = A(), { selectedCategoryData: c, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = xe(), [y, g] = m.useState(null);
|
|
1144
|
+
if (!c) return null;
|
|
1145
|
+
const { guid: _, name: h, is_income: p, totalAmount: C } = c, x = Re(_, t), H = p ? s.income_label : s.spending_label, T = ` ${c.transactions.length === 1 ? s.transaction : s.transactions} (${c.transactions.length})`, L = m.useMemo(() => i.find((S) => S.guid === y), [y, i]), E = i.length > 0 && !n && (r || a && !o), N = (S) => S.category_guid === _ || S.top_level_category_guid === _;
|
|
1146
|
+
return /* @__PURE__ */ f(v, {
|
|
1147
|
+
sx: {
|
|
1148
|
+
alignItems: "center",
|
|
1149
|
+
height: "100%"
|
|
1150
|
+
},
|
|
1151
|
+
children: [
|
|
1152
|
+
/* @__PURE__ */ f(v, {
|
|
1153
|
+
sx: {
|
|
1154
|
+
borderRadius: 0,
|
|
1155
|
+
pb: 4,
|
|
1156
|
+
pt: 16,
|
|
1157
|
+
px: 12,
|
|
1158
|
+
width: "100%"
|
|
1159
|
+
},
|
|
1160
|
+
children: [
|
|
1161
|
+
/* @__PURE__ */ e(He, {
|
|
1162
|
+
sx: { px: 12 },
|
|
1163
|
+
children: /* @__PURE__ */ f(ut, { children: [
|
|
1164
|
+
/* @__PURE__ */ e(io, { children: /* @__PURE__ */ e(De, { categoryGuid: _ }) }),
|
|
1165
|
+
/* @__PURE__ */ e(ht, {
|
|
1166
|
+
primary: h,
|
|
1167
|
+
secondary: u,
|
|
1168
|
+
slotProps: {
|
|
1169
|
+
primary: {
|
|
1170
|
+
component: "div",
|
|
1171
|
+
variant: "h3",
|
|
1172
|
+
fontSize: 18,
|
|
1173
|
+
fontWeight: 700
|
|
1174
|
+
},
|
|
1175
|
+
secondary: {
|
|
1176
|
+
component: "div",
|
|
1177
|
+
variant: "body2",
|
|
1178
|
+
fontSize: 13
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}),
|
|
1182
|
+
/* @__PURE__ */ e(z, {
|
|
1183
|
+
component: "div",
|
|
1184
|
+
variant: "h3",
|
|
1185
|
+
children: ie(Math.abs(C), "0,0.00")
|
|
1186
|
+
})
|
|
1187
|
+
] })
|
|
1188
|
+
}),
|
|
1189
|
+
/* @__PURE__ */ e(Vo, {
|
|
1190
|
+
chartColor: x,
|
|
1191
|
+
chartLabel: H
|
|
1192
|
+
}),
|
|
1193
|
+
/* @__PURE__ */ f(v, {
|
|
1194
|
+
alignItems: "center",
|
|
1195
|
+
direction: "row",
|
|
1196
|
+
justifyContent: "space-between",
|
|
1197
|
+
sx: { mx: 12 },
|
|
1198
|
+
children: [/* @__PURE__ */ e(z, {
|
|
1199
|
+
bold: !0,
|
|
1200
|
+
variant: "body1",
|
|
1201
|
+
children: T
|
|
1202
|
+
}), E && /* @__PURE__ */ e(Nt, { filter: N })]
|
|
1203
|
+
})
|
|
1204
|
+
]
|
|
1205
|
+
}),
|
|
1206
|
+
/* @__PURE__ */ e(et, {
|
|
1310
1207
|
bgcolor: "transparent",
|
|
1311
|
-
filter:
|
|
1208
|
+
filter: N,
|
|
1312
1209
|
height: "calc(100vh - 475px)",
|
|
1313
|
-
onClick:
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
Pe,
|
|
1318
|
-
{
|
|
1319
|
-
ariaLabelClose: c.close_aria,
|
|
1210
|
+
onClick: g
|
|
1211
|
+
}),
|
|
1212
|
+
/* @__PURE__ */ e(We, {
|
|
1213
|
+
ariaLabelClose: l.close_aria,
|
|
1320
1214
|
isOpen: !!L,
|
|
1321
|
-
onClose: () =>
|
|
1322
|
-
title:
|
|
1323
|
-
children: L && /* @__PURE__ */ e(
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
}), $o = (t, n) => {
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1215
|
+
onClose: () => g(""),
|
|
1216
|
+
title: s.transaction,
|
|
1217
|
+
children: L && /* @__PURE__ */ e(ot, { transaction: L })
|
|
1218
|
+
})
|
|
1219
|
+
]
|
|
1220
|
+
});
|
|
1221
|
+
}), Fo = (t, n) => [nt(t, n), rt(t, n)].filter((r) => r.length > 0), $o = (t, n) => {
|
|
1222
|
+
const [r, o] = t, a = r, l = o ?? r, s = [];
|
|
1223
|
+
if (a) {
|
|
1224
|
+
const c = a.reduce((u, i) => u + i.y, 0);
|
|
1225
|
+
s.push({
|
|
1226
|
+
label: n.income_label,
|
|
1227
|
+
amount: c
|
|
1228
|
+
});
|
|
1335
1229
|
}
|
|
1336
|
-
if (
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1230
|
+
if (l) {
|
|
1231
|
+
const c = l.reduce((u, i) => u + i.y, 0);
|
|
1232
|
+
s.push({
|
|
1233
|
+
label: n.spending_label,
|
|
1234
|
+
amount: c
|
|
1235
|
+
});
|
|
1339
1236
|
}
|
|
1340
|
-
return
|
|
1341
|
-
},
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
showTooltip: !0,
|
|
1367
|
-
showXAxis: !0,
|
|
1368
|
-
showXAxisTicks: !0,
|
|
1369
|
-
showYAxis: !0,
|
|
1370
|
-
showYAxisTicks: !0,
|
|
1371
|
-
valueFormatterString: "0.0a"
|
|
1372
|
-
}
|
|
1373
|
-
);
|
|
1374
|
-
}, jo = A(Yo), Uo = [
|
|
1237
|
+
return s;
|
|
1238
|
+
}, Ko = ({ availableHeight: t = 0, minHeight: n = 500, selectedDateRange: r, totals: o }) => {
|
|
1239
|
+
const a = J(), { onEvent: l } = F(), { trends: s } = A(), { isSmallMobile: c, isMobile: u, isSmallTablet: i, isTablet: y } = Z(), g = [a.palette.chart?.chart1, a.palette.chart?.chart2], _ = Fo(o, r), h = $o(_, s), [p, C] = m.useState(0), x = 458, H = 195, T = 56, L = u || c ? H : i || y ? x : p;
|
|
1240
|
+
return m.useEffect(() => {
|
|
1241
|
+
C(Math.max(t - T, n));
|
|
1242
|
+
}, [t]), /* @__PURE__ */ e(Oe, {
|
|
1243
|
+
baseline: "min",
|
|
1244
|
+
colors: g,
|
|
1245
|
+
curveType: "bump",
|
|
1246
|
+
datasets: _,
|
|
1247
|
+
height: L,
|
|
1248
|
+
labels: h,
|
|
1249
|
+
onItemClick: () => {
|
|
1250
|
+
l(w.TRENDS_CLICK_CHART, W);
|
|
1251
|
+
},
|
|
1252
|
+
showArea: !0,
|
|
1253
|
+
showAxisHighlight: !0,
|
|
1254
|
+
showLegend: !0,
|
|
1255
|
+
showTooltip: !0,
|
|
1256
|
+
showXAxis: !0,
|
|
1257
|
+
showXAxisTicks: !0,
|
|
1258
|
+
showYAxis: !0,
|
|
1259
|
+
showYAxisTicks: !0,
|
|
1260
|
+
valueFormatterString: "0.0a"
|
|
1261
|
+
});
|
|
1262
|
+
}, jo = R(Ko), Yo = [
|
|
1375
1263
|
"BillAmountNotStandard",
|
|
1376
1264
|
"CategorySpendingV2",
|
|
1377
1265
|
"CostOfLivingToIncome",
|
|
@@ -1405,209 +1293,182 @@ const Lo = g.memo(Io), Qe = ({
|
|
|
1405
1293
|
"WeeklyNewMerchantsV2",
|
|
1406
1294
|
"WeeklyNoSpendDays",
|
|
1407
1295
|
"WeeklySmallPurchasesSummary"
|
|
1408
|
-
],
|
|
1296
|
+
], Uo = (t, n, r) => ({
|
|
1409
1297
|
description: n ? t.empty_state_sub_text : t.empty_state_sub_text_no_aggregation,
|
|
1410
1298
|
header: n ? t.zero_state_content_header : t.zero_state_content_header_no_aggregation,
|
|
1411
|
-
onClickHandler: n ?
|
|
1299
|
+
onClickHandler: n ? r : void 0,
|
|
1412
1300
|
primaryButton: n ? t.empty_state_primary : void 0
|
|
1413
|
-
}),
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
onInsightCardClick: s,
|
|
1417
|
-
sx: o
|
|
1418
|
-
}) => {
|
|
1419
|
-
const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Q(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
|
|
1420
|
-
categoriesLoaded: _,
|
|
1421
|
-
loadCategories: h,
|
|
1422
|
-
loadDateRangeCategoryTotals: p,
|
|
1423
|
-
loadMonthlyCategoryTotals: y,
|
|
1424
|
-
monthlyCategoryTotals: T,
|
|
1425
|
-
monthlyTotalsLoaded: N
|
|
1426
|
-
} = q(), { isTransactionDataLoaded: x, loadTransactionData: L, setFilter: M } = we(), { selectedCategoryData: E, selectedDateRange: v, setSelectedCategoryData: K, setSelectedDateRange: ae } = ye(), { isInitialized: Y, selectedAccounts: J, selectedAccountGuids: P } = fe(), { trends: V, connect: O } = R(), { beatStore: ee } = Be(), ie = po() && c.show_insights_widget_in_master, te = a || d, [j, ne] = g.useState(!1), [U, de] = g.useState(!1), [B, ue] = g.useState("Chart"), [se, le] = g.useState(""), [ce, me] = g.useState(window.innerHeight), D = te ? 56 : 0, l = ce - 208, b = ce - (ie ? 550 + D : 266), [I, z] = g.useState(!1), Ee = c.show_connections_widget_in_master;
|
|
1427
|
-
Ie({
|
|
1301
|
+
}), Xo = ({ onBackClick: t, onMenuClick: n, onInsightCardClick: r, sx: o }) => {
|
|
1302
|
+
const { onEvent: a } = F(), { config: l } = at(), { isDesktop: s, isLargeDesktop: c, isMobile: u } = Z(), { isAccountDataLoaded: i, loadAccountData: y, visibleAccounts: g } = we(), { categoriesLoaded: _, loadCategories: h, loadDateRangeCategoryTotals: p, loadMonthlyCategoryTotals: C, monthlyCategoryTotals: x, monthlyTotalsLoaded: H } = q(), { isTransactionDataLoaded: T, loadTransactionData: L, setFilter: E } = xe(), { selectedCategoryData: N, selectedDateRange: S, setSelectedCategoryData: $, setSelectedDateRange: le } = ye(), { isInitialized: K, selectedAccounts: Q, selectedAccountGuids: P } = fe(), { trends: V, connect: O } = A(), { beatStore: ee } = Ge(), ce = Rt() && l.show_insights_widget_in_master, j = s || c, [de, Y] = m.useState(!1), [te, ae] = m.useState(!1), [oe, ne] = m.useState("Chart"), [se, ue] = m.useState(""), [he, ge] = m.useState(window.innerHeight), I = j ? 56 : 0, G = he - 208, d = he - (ce ? 550 + I : 266), [b, D] = m.useState(!1), U = l.show_connections_widget_in_master;
|
|
1303
|
+
Se({
|
|
1428
1304
|
widgetName: "TrendsWidget",
|
|
1429
|
-
isLoaded:
|
|
1305
|
+
isLoaded: de
|
|
1430
1306
|
});
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
const
|
|
1434
|
-
return window.addEventListener("resize",
|
|
1435
|
-
}, []),
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
J,
|
|
1439
|
-
v.start,
|
|
1440
|
-
v.end
|
|
1441
|
-
).finally();
|
|
1307
|
+
const Ce = m.useMemo(() => te ? ee.getFilteredBeats({ templates: Yo }) : [], [te]);
|
|
1308
|
+
m.useEffect(() => {
|
|
1309
|
+
const M = () => ge(window.innerHeight);
|
|
1310
|
+
return window.addEventListener("resize", M), i || y().finally(), _ || h().finally(), T || L().finally(), () => window.removeEventListener("resize", M);
|
|
1311
|
+
}, []), m.useEffect(() => {
|
|
1312
|
+
K && i && (ee.loadBeats().finally(() => ae(!0)), p(Q, S.start, S.end).then(() => {
|
|
1313
|
+
C(Q, S.start, S.end).finally();
|
|
1442
1314
|
}).finally(() => {
|
|
1443
|
-
|
|
1315
|
+
Y(!0), a(w.TRENDS_LOAD_WIDGET, {
|
|
1444
1316
|
...W,
|
|
1445
|
-
time_period: `${
|
|
1317
|
+
time_period: `${Te(S.end, S.start)}M`
|
|
1446
1318
|
});
|
|
1447
1319
|
}));
|
|
1448
|
-
}, [
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1320
|
+
}, [
|
|
1321
|
+
K,
|
|
1322
|
+
i,
|
|
1323
|
+
Q,
|
|
1324
|
+
S
|
|
1325
|
+
]), m.useEffect(() => {
|
|
1326
|
+
x.length !== 0 && E({
|
|
1327
|
+
accounts: P,
|
|
1328
|
+
dateRange: {
|
|
1329
|
+
start: S.start,
|
|
1330
|
+
end: S.end
|
|
1331
|
+
},
|
|
1332
|
+
custom: (M) => !!x.find((re) => re.top_level_category_guid === M.top_level_category_guid || re.category_guid === M.category_guid)
|
|
1333
|
+
});
|
|
1334
|
+
}, [x]);
|
|
1335
|
+
const Le = (M) => {
|
|
1336
|
+
$(M);
|
|
1337
|
+
}, me = () => {
|
|
1338
|
+
$(null), a(w.TRENDS_CLICK_BACK, W);
|
|
1339
|
+
}, Ee = () => {
|
|
1340
|
+
D(!0), a(w.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
1341
|
+
}, ft = (M, re) => {
|
|
1342
|
+
ne(re ?? oe), a(w.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
1470
1343
|
...W,
|
|
1471
|
-
toggleView:
|
|
1344
|
+
toggleView: re
|
|
1472
1345
|
});
|
|
1473
|
-
},
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1346
|
+
}, Ct = (M) => {
|
|
1347
|
+
const re = lt(M?.[0], 1), Ve = M?.[1], Tt = Te(Ve, re);
|
|
1348
|
+
le({
|
|
1349
|
+
start: re,
|
|
1350
|
+
end: Ve
|
|
1351
|
+
}), a(w.TRENDS_CLICK_TIME_WINDOW, {
|
|
1476
1352
|
...W,
|
|
1477
|
-
time_period:
|
|
1353
|
+
time_period: Tt + "M"
|
|
1478
1354
|
});
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1355
|
+
}, _t = (M) => {
|
|
1356
|
+
a(w.TRENDS_CLICK_FILTER, {
|
|
1481
1357
|
...W,
|
|
1482
|
-
filterValue:
|
|
1358
|
+
filterValue: M
|
|
1483
1359
|
});
|
|
1484
|
-
},
|
|
1485
|
-
|
|
1486
|
-
},
|
|
1487
|
-
|
|
1360
|
+
}, bt = (M) => {
|
|
1361
|
+
ue(M);
|
|
1362
|
+
}, vt = () => {
|
|
1363
|
+
ue(""), a(w.TRENDS_CLICK_ALL_CATEGORIES, W);
|
|
1488
1364
|
};
|
|
1489
|
-
if (!
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
sx:
|
|
1502
|
-
title: V.title,
|
|
1365
|
+
if (!K || !i || !de || !H) return /* @__PURE__ */ e(Ie, {});
|
|
1366
|
+
const Pe = g.length === 0 || x.length === 0, _e = Uo(V, U, Ee);
|
|
1367
|
+
return /* @__PURE__ */ f(tt, {
|
|
1368
|
+
calendarActions: { onRangeChanged: Ct },
|
|
1369
|
+
dateRange: S,
|
|
1370
|
+
dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
|
|
1371
|
+
onAccountsFilterClick: _t,
|
|
1372
|
+
onBackClick: t,
|
|
1373
|
+
onMenuClick: n,
|
|
1374
|
+
sx: o,
|
|
1375
|
+
title: V.title,
|
|
1376
|
+
children: [/* @__PURE__ */ f(v, {
|
|
1377
|
+
sx: { px: u ? 0 : 48 },
|
|
1503
1378
|
children: [
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
B === "Chart" && /* @__PURE__ */ C(vt, { children: [
|
|
1546
|
-
/* @__PURE__ */ e(H, { sx: { width: te ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
1547
|
-
jo,
|
|
1548
|
-
{
|
|
1549
|
-
availableHeight: l,
|
|
1550
|
-
minHeight: 450,
|
|
1551
|
-
selectedDateRange: v,
|
|
1552
|
-
totals: T
|
|
1553
|
-
}
|
|
1554
|
-
) }),
|
|
1555
|
-
/* @__PURE__ */ C(S, { gap: 16, sx: { width: te ? "32%" : "100%" }, children: [
|
|
1556
|
-
ie && U && _e.length > 0 && /* @__PURE__ */ e(
|
|
1557
|
-
Vo,
|
|
1558
|
-
{
|
|
1559
|
-
beats: _e,
|
|
1560
|
-
onInsightCardClick: s
|
|
1561
|
-
}
|
|
1562
|
-
),
|
|
1563
|
-
/* @__PURE__ */ e(
|
|
1564
|
-
Bo,
|
|
1565
|
-
{
|
|
1566
|
-
availableHeight: b,
|
|
1567
|
-
onCategoryClick: he
|
|
1568
|
-
}
|
|
1569
|
-
)
|
|
1570
|
-
] })
|
|
1571
|
-
] }),
|
|
1572
|
-
B === "Table" && /* @__PURE__ */ e(H, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1573
|
-
yt,
|
|
1574
|
-
{
|
|
1575
|
-
height: "unset",
|
|
1576
|
-
onClickRow: Tt,
|
|
1577
|
-
selectedCategory: se,
|
|
1578
|
-
selectedDateRange: v
|
|
1579
|
-
}
|
|
1580
|
-
) })
|
|
1581
|
-
] }),
|
|
1582
|
-
/* @__PURE__ */ e(
|
|
1583
|
-
Pe,
|
|
1584
|
-
{
|
|
1585
|
-
ariaLabelClose: V.close_category_details,
|
|
1586
|
-
isOpen: !!E,
|
|
1587
|
-
onClose: Me,
|
|
1588
|
-
shouldShowHeaderShadow: !0,
|
|
1589
|
-
title: E?.is_income ? V.category_income : V.category_spending,
|
|
1590
|
-
children: E && /* @__PURE__ */ e(Fo, {})
|
|
1591
|
-
}
|
|
1592
|
-
)
|
|
1593
|
-
]
|
|
1594
|
-
}
|
|
1595
|
-
),
|
|
1596
|
-
/* @__PURE__ */ e(
|
|
1597
|
-
yo,
|
|
1598
|
-
{
|
|
1599
|
-
onClose: () => z(!1),
|
|
1600
|
-
showConnectWidget: I,
|
|
1601
|
-
title: O.mini_title
|
|
1379
|
+
/* @__PURE__ */ f(v, {
|
|
1380
|
+
flexDirection: "row",
|
|
1381
|
+
justifyContent: "space-between",
|
|
1382
|
+
sx: {
|
|
1383
|
+
px: u ? 16 : 0,
|
|
1384
|
+
py: 16
|
|
1385
|
+
},
|
|
1386
|
+
children: [/* @__PURE__ */ e(pt, {
|
|
1387
|
+
selectedCategoryGuid: se,
|
|
1388
|
+
selectedDateRange: S
|
|
1389
|
+
}), /* @__PURE__ */ e(mt, {
|
|
1390
|
+
onTabChange: ft,
|
|
1391
|
+
selectedTab: oe
|
|
1392
|
+
})]
|
|
1393
|
+
}),
|
|
1394
|
+
/* @__PURE__ */ e(v, {
|
|
1395
|
+
alignItems: "center",
|
|
1396
|
+
flexDirection: "row",
|
|
1397
|
+
sx: { pb: 8 },
|
|
1398
|
+
width: "100%",
|
|
1399
|
+
children: /* @__PURE__ */ e(k, {
|
|
1400
|
+
flexGrow: 1,
|
|
1401
|
+
children: se && /* @__PURE__ */ f(ve, {
|
|
1402
|
+
onClick: vt,
|
|
1403
|
+
sx: {
|
|
1404
|
+
p: 0,
|
|
1405
|
+
pr: 5
|
|
1406
|
+
},
|
|
1407
|
+
children: [/* @__PURE__ */ e(Ft, {}), V.all_categories]
|
|
1408
|
+
})
|
|
1409
|
+
})
|
|
1410
|
+
}),
|
|
1411
|
+
Pe && /* @__PURE__ */ e(Dt, {
|
|
1412
|
+
header: _e.header,
|
|
1413
|
+
icon: "multiline_chart",
|
|
1414
|
+
onClick: _e.onClickHandler,
|
|
1415
|
+
primaryButton: _e.primaryButton,
|
|
1416
|
+
subText: _e.description,
|
|
1417
|
+
sx: {
|
|
1418
|
+
height: G,
|
|
1419
|
+
maxWidth: 432
|
|
1602
1420
|
}
|
|
1603
|
-
)
|
|
1421
|
+
}),
|
|
1422
|
+
!Pe && /* @__PURE__ */ f(v, {
|
|
1423
|
+
flexDirection: j ? "row" : "column",
|
|
1424
|
+
gap: j ? 48 : 16,
|
|
1425
|
+
children: [oe === "Chart" && /* @__PURE__ */ f(Zt, { children: [/* @__PURE__ */ e(k, {
|
|
1426
|
+
sx: { width: j ? "68%" : "100%" },
|
|
1427
|
+
children: /* @__PURE__ */ e(jo, {
|
|
1428
|
+
availableHeight: G,
|
|
1429
|
+
minHeight: 450,
|
|
1430
|
+
selectedDateRange: S,
|
|
1431
|
+
totals: x
|
|
1432
|
+
})
|
|
1433
|
+
}), /* @__PURE__ */ f(v, {
|
|
1434
|
+
gap: 16,
|
|
1435
|
+
sx: { width: j ? "32%" : "100%" },
|
|
1436
|
+
children: [ce && te && Ce.length > 0 && /* @__PURE__ */ e(Po, {
|
|
1437
|
+
beats: Ce,
|
|
1438
|
+
onInsightCardClick: r
|
|
1439
|
+
}), /* @__PURE__ */ e(Go, {
|
|
1440
|
+
availableHeight: d,
|
|
1441
|
+
onCategoryClick: Le
|
|
1442
|
+
})]
|
|
1443
|
+
})] }), oe === "Table" && /* @__PURE__ */ e(k, {
|
|
1444
|
+
sx: { width: "100%" },
|
|
1445
|
+
children: /* @__PURE__ */ e(yt, {
|
|
1446
|
+
height: "unset",
|
|
1447
|
+
onClickRow: bt,
|
|
1448
|
+
selectedCategory: se,
|
|
1449
|
+
selectedDateRange: S
|
|
1450
|
+
})
|
|
1451
|
+
})]
|
|
1452
|
+
}),
|
|
1453
|
+
/* @__PURE__ */ e(We, {
|
|
1454
|
+
ariaLabelClose: V.close_category_details,
|
|
1455
|
+
isOpen: !!N,
|
|
1456
|
+
onClose: me,
|
|
1457
|
+
shouldShowHeaderShadow: !0,
|
|
1458
|
+
title: N?.is_income ? V.category_income : V.category_spending,
|
|
1459
|
+
children: N && /* @__PURE__ */ e(zo, {})
|
|
1460
|
+
})
|
|
1604
1461
|
]
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
|
|
1462
|
+
}), /* @__PURE__ */ e(Lt, {
|
|
1463
|
+
onClose: () => D(!1),
|
|
1464
|
+
showConnectWidget: b,
|
|
1465
|
+
title: O.mini_title
|
|
1466
|
+
})]
|
|
1467
|
+
});
|
|
1468
|
+
}, Vn = R(Xo);
|
|
1608
1469
|
export {
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1470
|
+
Gn as TrendsFullWidget,
|
|
1471
|
+
Pn as TrendsMicroWidget,
|
|
1472
|
+
Bn as TrendsMiniWidget,
|
|
1473
|
+
Vn as TrendsWidget
|
|
1613
1474
|
};
|