@mx-cartographer/experiences 8.2.3 → 8.2.4-alpha-ram1-bug-testing
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{AccountDetailsHeader-CfdnKyJK.mjs → AccountDetailsHeader-DIysk_4w.mjs} +1 -1
- package/dist/{AccountFields-CAy0x_4i.mjs → AccountFields-mwJ8NXsX.mjs} +18 -18
- package/dist/{AccountListItem-BYyeeCf6.mjs → AccountListItem-BDXHs4tV.mjs} +7 -8
- package/dist/{CategorySelectorDrawer-Cu1ohxeM.mjs → CategorySelectorDrawer-CmaDLhnf.mjs} +71 -68
- package/dist/{ConnectCard-Dix8BoV_.mjs → ConnectCard-CCep7Zqe.mjs} +9 -9
- package/dist/{ConnectDrawer-DgfsTpyW.mjs → ConnectDrawer-Cnjr3Ddg.mjs} +2 -2
- package/dist/{ConnectionsDrawer-D7IXAza2.mjs → ConnectionsDrawer-CtfPXk0M.mjs} +1 -1
- package/dist/{CurrencyDialog-d4dL7vA5.mjs → CurrencyDialog-DumQCTPO.mjs} +18 -16
- package/dist/{CurrencyInput-B59ugxPN.mjs → CurrencyInput-adTIRtL3.mjs} +28 -26
- package/dist/{Dialog-iLlBR8TG.mjs → Dialog-CwWc0AbH.mjs} +11 -11
- package/dist/{Drawer-XPaLYjiO.mjs → Drawer-BXqqBMxg.mjs} +26 -28
- package/dist/{EmbeddedCard-BNl3quCs.mjs → EmbeddedCard-DPwJjqMH.mjs} +37 -37
- package/dist/{EmptyState-DHAkGsjk.mjs → EmptyState-CJUDc3kD.mjs} +17 -17
- package/dist/{ExportCsvAction-hDprC41l.mjs → ExportCsvAction-Bw02ZJEj.mjs} +2 -2
- package/dist/{GlobalAccountFilter-DrhtwPqh.mjs → GlobalAccountFilter-7Cg2-9A5.mjs} +25 -25
- package/dist/{Help-BSQm9o29.mjs → Help-DJ8PrVHX.mjs} +56 -73
- package/dist/{ListItemAction-DGjHxNDJ.mjs → ListItemAction-CwspSmQi.mjs} +22 -22
- package/dist/{ManageIncome-DwylSiWs.mjs → ManageIncome-B1JfqslT.mjs} +6 -6
- package/dist/{NotificationSettings-CCg-Tml2.mjs → NotificationSettings-6p-h5phZ.mjs} +48 -48
- package/dist/{OriginalBalanceAction-CvDx0K6k.mjs → OriginalBalanceAction-CkJPnp2c.mjs} +2 -2
- package/dist/{RecurringSettings-CPXLW6AR.mjs → RecurringSettings-cm6MK_aS.mjs} +1 -1
- package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-CC9F_Ezk.mjs} +1 -1
- package/dist/SearchBox-Cpgu_gdO.mjs +50 -0
- package/dist/Select-BFt-HD-L.mjs +55 -0
- package/dist/{SelectionBox-Bx2a5rh4.mjs → SelectionBox-B4xELRgp.mjs} +1 -1
- package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +1 -1
- package/dist/{SpendingLegend-BmkEr9Nh.mjs → SpendingLegend-5Ct_FZ8o.mjs} +1 -1
- package/dist/{ToggleListItem-BLu_fWA2.mjs → ToggleListItem-Dl1lXNwj.mjs} +29 -28
- package/dist/{TransactionDetails-CbBSxdOi.mjs → TransactionDetails-C3dlAzYf.mjs} +386 -393
- package/dist/{ViewMoreMicroCard-D_LoKlJU.mjs → ViewMoreMicroCard-BD_MNc2z.mjs} +526 -518
- package/dist/{WidgetContainer-CYcmwsSu.mjs → WidgetContainer-DNuz_s7W.mjs} +5 -5
- package/dist/accounts/index.es.js +199 -194
- package/dist/analytics/index.es.js +1 -1
- package/dist/budgets/index.es.js +183 -184
- package/dist/cashflow/index.es.js +70 -80
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +1 -1
- package/dist/common/index.es.js +206 -194
- package/dist/common/utils/Theme.d.ts +6 -5
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +47 -47
- package/dist/debts/index.es.js +140 -140
- package/dist/finstrong/index.es.js +40 -32
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
- package/dist/goals/index.es.js +154 -165
- package/dist/help/index.es.js +2 -2
- package/dist/insights/components/insights/UserFeedback/Types.d.ts +1 -1
- package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +3 -3
- package/dist/insights/hooks/useContainerDimensions.d.ts +1 -1
- package/dist/insights/index.es.js +677 -687
- package/dist/insights/themes/Typography.d.ts +0 -2
- package/dist/investments/index.es.js +205 -207
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/cards/InsightCard.d.ts +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +3 -5
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +3 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +3 -5
- package/dist/microinsights/carousel/BeatList.d.ts +2 -2
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +12 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +11 -5
- package/dist/networth/index.es.js +85 -87
- package/dist/notifications/index.es.js +7 -8
- package/dist/recurringtransactions/index.es.js +53 -53
- package/dist/settings/index.es.js +111 -111
- package/dist/spending/index.es.js +7 -7
- package/dist/transactions/components/shared/TransactionList.d.ts +2 -2
- package/dist/transactions/index.es.js +138 -140
- package/dist/trends/index.es.js +293 -292
- package/dist/{useScreenSize-CeFhWTt_.mjs → useScreenSize-mWpmnh5w.mjs} +1 -1
- package/package.json +29 -23
- package/dist/SearchBox-CwDgvWVJ.mjs +0 -48
- package/dist/Select-BZRUpOib.mjs +0 -51
package/dist/trends/index.es.js
CHANGED
|
@@ -1,67 +1,66 @@
|
|
|
1
1
|
import { jsxs as C, jsx as e, Fragment as vt } from "react/jsx-runtime";
|
|
2
|
-
import g, { useRef as
|
|
2
|
+
import g, { useRef as wt, useState as Dt, useEffect as It } from "react";
|
|
3
3
|
import { observer as A } from "mobx-react-lite";
|
|
4
|
-
import { CategoryIcon as
|
|
4
|
+
import { CategoryIcon as ve, Text as F, Icon as He, H3 as Ge, P as pe } from "@mxenabled/mxui";
|
|
5
5
|
import H from "@mui/material/Box";
|
|
6
6
|
import S from "@mui/material/Stack";
|
|
7
7
|
import Te from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as et } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as Se } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import
|
|
11
|
-
import { useTheme as
|
|
12
|
-
import { useItemTooltip as
|
|
13
|
-
import { LineChart as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
10
|
+
import Lt from "numeral";
|
|
11
|
+
import { useTheme as Z, styled as Et, alpha as Mt } from "@mui/material/styles";
|
|
12
|
+
import { useItemTooltip as At, ChartsTooltipContainer as Rt } from "@mui/x-charts/ChartsTooltip";
|
|
13
|
+
import { LineChart as kt } from "@mui/x-charts/LineChart";
|
|
14
|
+
import { u as Q } from "../useScreenSize-mWpmnh5w.mjs";
|
|
15
|
+
import { u as Ht } from "../useDimensions-CeDR9V8N.mjs";
|
|
16
16
|
import tt from "@mui/material/Card";
|
|
17
17
|
import ot from "@mui/material/CardContent";
|
|
18
18
|
import Ne from "@mui/material/Divider";
|
|
19
|
-
import
|
|
19
|
+
import Fe from "@mui/material/Grid";
|
|
20
20
|
import { b as nt } from "../Localization-DnoVyBNK.mjs";
|
|
21
|
-
import { u as R, l as
|
|
21
|
+
import { u as R, l as q, g as $, b as fe, h as we, d as De, B as ye, D as st, f as Be, a as rt } from "../hooks-BaO_gOI6.mjs";
|
|
22
22
|
import { C as xe } from "../CurrencyText-CCbE6MmF.mjs";
|
|
23
|
-
import { a as Re, C as $e, b as
|
|
23
|
+
import { a as Re, C as $e, b as Nt } from "../Category-DEKZGLYe.mjs";
|
|
24
24
|
import { f as X, D as G } from "../DateFormats-HudZ3Bjs.mjs";
|
|
25
|
-
import { f as
|
|
26
|
-
import { a as Ke, c as
|
|
27
|
-
import { c as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
25
|
+
import { f as re, a as Wt } from "../NumberFormatting--XMeeBfr.mjs";
|
|
26
|
+
import { a as Ke, c as Ot, g as Gt } from "../TrendsUtil-D9z3kIj_.mjs";
|
|
27
|
+
import { c as Bt, i as Pt, d as Vt, e as zt, g as at, b as it, f as Ye } from "../SpendingData-PKlh8caU.mjs";
|
|
28
|
+
import Ft from "@mui/material/ToggleButton";
|
|
29
|
+
import $t from "@mui/material/ToggleButtonGroup";
|
|
30
30
|
import { parseISO as lt } from "date-fns/parseISO";
|
|
31
31
|
import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
|
|
32
|
-
import { T as W, a as
|
|
33
|
-
import { useGridApiContext as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import { A as
|
|
37
|
-
import { T as ct } from "../EmbeddedCard-
|
|
38
|
-
import { T as dt } from "../TransactionDetails-
|
|
39
|
-
import { D as Pe } from "../Drawer-
|
|
32
|
+
import { T as W, a as Kt } from "../ViewMoreMicroCard-BD_MNc2z.mjs";
|
|
33
|
+
import { useGridApiContext as Yt, useGridRootProps as jt, DataGridPro as Ut } from "@mui/x-data-grid-pro";
|
|
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-C3dlAzYf.mjs";
|
|
39
|
+
import { D as Pe } from "../Drawer-BXqqBMxg.mjs";
|
|
40
40
|
import { u as Ie } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
41
41
|
import { L as Le } from "../Loader-CxeBwuPG.mjs";
|
|
42
|
-
import { W as ut } from "../WidgetContainer-
|
|
42
|
+
import { W as ut } from "../WidgetContainer-DNuz_s7W.mjs";
|
|
43
43
|
import { L as Ve } from "../LineChart-CejWS_rh.mjs";
|
|
44
|
-
import { M as
|
|
45
|
-
import { subMonths as
|
|
46
|
-
import { TrendingUp as
|
|
47
|
-
import { M as
|
|
48
|
-
import
|
|
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
49
|
import We from "@mui/material/List";
|
|
50
50
|
import mt from "@mui/material/ListItem";
|
|
51
|
-
import
|
|
52
|
-
import
|
|
51
|
+
import lo from "@mui/material/ListItemButton";
|
|
52
|
+
import co from "@mui/material/ListItemIcon";
|
|
53
53
|
import ht from "@mui/material/ListItemText";
|
|
54
|
-
import gt from "@mui/material/styles/useTheme";
|
|
55
54
|
import { g as Oe } from "../TransactionUtils-BphBJBbU.mjs";
|
|
56
|
-
import { L as
|
|
57
|
-
import { Stack as
|
|
58
|
-
import
|
|
59
|
-
import { E as
|
|
60
|
-
import { u as
|
|
61
|
-
import { E as
|
|
62
|
-
import { C as
|
|
63
|
-
const
|
|
64
|
-
const { categories: s } = R(), { getCategoryName: o } =
|
|
55
|
+
import { L as uo } from "../ListItemRow-kH1rn8Xu.mjs";
|
|
56
|
+
import { Stack as mo } from "@mui/material";
|
|
57
|
+
import ho from "@mui/material/ListItemAvatar";
|
|
58
|
+
import { E as go } from "../ExportCsvAction-Bw02ZJEj.mjs";
|
|
59
|
+
import { u as po } from "../useInsightsEnabled-DaNLPmUU.mjs";
|
|
60
|
+
import { E as fo } from "../EmptyState-CJUDc3kD.mjs";
|
|
61
|
+
import { C as yo } from "../ConnectDrawer-Cnjr3Ddg.mjs";
|
|
62
|
+
const gt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
63
|
+
const { categories: s } = R(), { getCategoryName: o } = q(), r = o(t);
|
|
65
64
|
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
66
65
|
/* @__PURE__ */ e(
|
|
67
66
|
H,
|
|
@@ -69,19 +68,19 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
69
68
|
"aria-label": nt(s.category_icon_label_aria, r),
|
|
70
69
|
mb: 4,
|
|
71
70
|
role: "img",
|
|
72
|
-
children: /* @__PURE__ */ e(
|
|
71
|
+
children: /* @__PURE__ */ e(ve, { categoryGuid: n })
|
|
73
72
|
}
|
|
74
73
|
),
|
|
75
|
-
/* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e(F, { variant: "body1", children: r })
|
|
76
75
|
] });
|
|
77
|
-
},
|
|
76
|
+
}, Co = ({
|
|
78
77
|
categoryGuids: { guid: t, topLevelGuid: n },
|
|
79
78
|
hoveredAreaData: s,
|
|
80
79
|
cursorPosition: o,
|
|
81
80
|
chartContainerRef: r
|
|
82
81
|
}) => {
|
|
83
|
-
const c =
|
|
84
|
-
if (
|
|
82
|
+
const c = Z(), a = wt(null), [d, u] = Dt({ x: o.x, y: o.y });
|
|
83
|
+
if (It(() => {
|
|
85
84
|
(() => {
|
|
86
85
|
const m = a.current, _ = r.current;
|
|
87
86
|
if (!m || !_) return;
|
|
@@ -104,15 +103,15 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
104
103
|
},
|
|
105
104
|
children: /* @__PURE__ */ C(ot, { children: [
|
|
106
105
|
/* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
107
|
-
/* @__PURE__ */ e(
|
|
108
|
-
/* @__PURE__ */ e(
|
|
106
|
+
/* @__PURE__ */ e(gt, { categoryGuid: t, topLevelCategoryGuid: n }),
|
|
107
|
+
/* @__PURE__ */ e(F, { variant: "body2", children: `${s.length}-month total` }),
|
|
109
108
|
/* @__PURE__ */ e(xe, { amount: i, bold: !0, formatString: "0,0", variant: "body2" })
|
|
110
109
|
] }),
|
|
111
110
|
/* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
|
|
112
|
-
/* @__PURE__ */ e(
|
|
111
|
+
/* @__PURE__ */ e(Fe, { container: !0, children: s.map((f, m) => /* @__PURE__ */ C(g.Fragment, { children: [
|
|
113
112
|
m > 0 && m % 3 === 0 && /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
|
|
114
|
-
/* @__PURE__ */ e(
|
|
115
|
-
/* @__PURE__ */ e(
|
|
113
|
+
/* @__PURE__ */ e(Fe, { size: 4, children: /* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
114
|
+
/* @__PURE__ */ e(F, { color: c.palette.text.secondary, variant: "caption", children: f.x }),
|
|
116
115
|
/* @__PURE__ */ e(
|
|
117
116
|
xe,
|
|
118
117
|
{
|
|
@@ -127,7 +126,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
127
126
|
] })
|
|
128
127
|
}
|
|
129
128
|
);
|
|
130
|
-
},
|
|
129
|
+
}, _o = A(Co), bo = ({
|
|
131
130
|
sx: t,
|
|
132
131
|
categoryGuids: n,
|
|
133
132
|
hoveredLegend: s,
|
|
@@ -135,7 +134,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
135
134
|
onHoverLegend: r,
|
|
136
135
|
onClickLegend: c
|
|
137
136
|
}) => {
|
|
138
|
-
const { isMobile: a } =
|
|
137
|
+
const { isMobile: a } = Q(), { getCategoryName: d } = q();
|
|
139
138
|
return /* @__PURE__ */ e(
|
|
140
139
|
S,
|
|
141
140
|
{
|
|
@@ -177,7 +176,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
178
|
),
|
|
180
|
-
/* @__PURE__ */ e(
|
|
179
|
+
/* @__PURE__ */ e(F, { variant: "body1", children: d(u) })
|
|
181
180
|
]
|
|
182
181
|
},
|
|
183
182
|
u
|
|
@@ -185,22 +184,22 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
185
184
|
})
|
|
186
185
|
}
|
|
187
186
|
);
|
|
188
|
-
},
|
|
187
|
+
}, To = ({
|
|
189
188
|
categoryGuids: { guid: t, topLevelGuid: n },
|
|
190
189
|
series: s,
|
|
191
190
|
xData: o
|
|
192
191
|
}) => {
|
|
193
|
-
const r =
|
|
192
|
+
const r = At(), c = Z();
|
|
194
193
|
if (!r?.identifier) return null;
|
|
195
194
|
const { dataIndex: a, seriesId: d } = r.identifier;
|
|
196
195
|
if (a == null || !d) return null;
|
|
197
196
|
const i = s.find((m) => m.id === d)?.data?.[a], f = o?.[a];
|
|
198
197
|
return i === void 0 || !f ? null : /* @__PURE__ */ e(tt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ C(H, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
199
|
-
/* @__PURE__ */ e(
|
|
200
|
-
/* @__PURE__ */ e(
|
|
198
|
+
/* @__PURE__ */ e(gt, { categoryGuid: t, topLevelCategoryGuid: n }),
|
|
199
|
+
/* @__PURE__ */ e(F, { color: c.palette.text.secondary, variant: "body2", children: X(f, G.MONTH_SHORT_YEAR) }),
|
|
201
200
|
/* @__PURE__ */ e(xe, { amount: String(i), bold: !0, formatString: "0,0", variant: "body1" })
|
|
202
201
|
] }) }) });
|
|
203
|
-
},
|
|
202
|
+
}, So = ({
|
|
204
203
|
onHoverArea: t,
|
|
205
204
|
onHoverPoint: n,
|
|
206
205
|
onHoverLegend: s,
|
|
@@ -210,7 +209,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
210
209
|
availableHeight: a = 0,
|
|
211
210
|
minimumHeight: d = 350
|
|
212
211
|
}) => {
|
|
213
|
-
const u =
|
|
212
|
+
const u = Z(), { isMobile: i } = Q(), [f, { height: m }] = Ht(), _ = g.useRef(null), [h, p] = g.useState(0);
|
|
214
213
|
g.useEffect(() => {
|
|
215
214
|
const l = Math.max(a - m, d);
|
|
216
215
|
p(l);
|
|
@@ -220,11 +219,11 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
220
219
|
hoveredAreaData: null,
|
|
221
220
|
isAreaHovered: !1,
|
|
222
221
|
cursorPos: { x: 0, y: 0 }
|
|
223
|
-
}), { hoveredSeriesId: L, hoveredAreaData:
|
|
224
|
-
(l, b) => r.reduce((I,
|
|
225
|
-
) ?? [0],
|
|
222
|
+
}), { hoveredSeriesId: L, hoveredAreaData: E, isAreaHovered: M, cursorPos: v } = N, K = M && L && E, ae = !K, Y = [...r, ...c], J = Y[0]?.dataset.length ?? 0, P = Y.flatMap((l) => l.dataset.map((b) => b.x)), V = Y.flatMap((l) => l.dataset.map((b) => b.y)), O = r[0]?.dataset?.map(
|
|
223
|
+
(l, b) => r.reduce((I, z) => I + z.dataset[b]?.y || 0, 0)
|
|
224
|
+
) ?? [0], ee = Math.max(...O), Ce = Math.max(
|
|
226
225
|
...c.flatMap((l) => l.dataset.map((b) => b.y))
|
|
227
|
-
), ie = Math.floor(Math.min(...V) / 100) * 100,
|
|
226
|
+
), ie = Math.floor(Math.min(...V) / 100) * 100, te = Math.ceil(Math.max(ee, Ce) / 100) * 100, j = r.map((l, b) => ({
|
|
228
227
|
id: `stacked-${b}`,
|
|
229
228
|
guid: l.category_guid,
|
|
230
229
|
top_level_guid: l.top_level_category_guid,
|
|
@@ -235,8 +234,8 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
235
234
|
stack: "total",
|
|
236
235
|
type: "line",
|
|
237
236
|
highlightScope: { highlight: "item" },
|
|
238
|
-
valueFormatter: (I) =>
|
|
239
|
-
})),
|
|
237
|
+
valueFormatter: (I) => re(I, "0,0")
|
|
238
|
+
})), ne = c.map((l, b) => ({
|
|
240
239
|
id: `unstacked-${b}`,
|
|
241
240
|
guid: l.category_guid,
|
|
242
241
|
top_level_guid: l.top_level_category_guid,
|
|
@@ -245,13 +244,13 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
245
244
|
data: l.dataset.map((I) => I.y),
|
|
246
245
|
label: l.category_name,
|
|
247
246
|
type: "line",
|
|
248
|
-
valueFormatter: (I) =>
|
|
249
|
-
})), U = [...j, ...
|
|
247
|
+
valueFormatter: (I) => re(I, "0,0")
|
|
248
|
+
})), U = [...j, ...ne], de = [
|
|
250
249
|
...j.map(({ guid: l, top_level_guid: b }) => ({
|
|
251
250
|
guid: l,
|
|
252
251
|
top_level_guid: b
|
|
253
252
|
})),
|
|
254
|
-
...
|
|
253
|
+
...ne.map(({ guid: l, top_level_guid: b }) => ({
|
|
255
254
|
guid: l,
|
|
256
255
|
top_level_guid: b
|
|
257
256
|
}))
|
|
@@ -263,22 +262,22 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
263
262
|
};
|
|
264
263
|
}, ue = (l) => {
|
|
265
264
|
T(l), s?.(l ?? "");
|
|
266
|
-
},
|
|
265
|
+
}, se = (l) => {
|
|
267
266
|
o?.(l ?? "");
|
|
268
267
|
}, le = () => {
|
|
269
268
|
const l = B(String(L)).guid;
|
|
270
269
|
l && o?.(l);
|
|
271
270
|
}, ce = (l) => {
|
|
272
|
-
const b = String(l?.seriesId), I = B(b).guid,
|
|
271
|
+
const b = String(l?.seriesId), I = B(b).guid, z = U.find((he) => he.id === b), Ee = z && l?.dataIndex !== void 0, _e = z && l?.dataIndex === void 0;
|
|
273
272
|
if (Ee)
|
|
274
273
|
x({
|
|
275
274
|
hoveredSeriesId: b,
|
|
276
275
|
hoveredAreaData: null,
|
|
277
276
|
isAreaHovered: !1,
|
|
278
|
-
cursorPos:
|
|
277
|
+
cursorPos: v
|
|
279
278
|
}), n?.(I);
|
|
280
279
|
else if (_e) {
|
|
281
|
-
const he =
|
|
280
|
+
const he = z?.data.map((Me, Ae) => ({
|
|
282
281
|
x: P[Ae],
|
|
283
282
|
y: Me
|
|
284
283
|
})) ?? [];
|
|
@@ -286,14 +285,14 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
286
285
|
hoveredSeriesId: b,
|
|
287
286
|
hoveredAreaData: he,
|
|
288
287
|
isAreaHovered: !0,
|
|
289
|
-
cursorPos:
|
|
288
|
+
cursorPos: v
|
|
290
289
|
}), t?.(I);
|
|
291
290
|
} else
|
|
292
291
|
x({
|
|
293
292
|
hoveredSeriesId: null,
|
|
294
293
|
hoveredAreaData: null,
|
|
295
294
|
isAreaHovered: !1,
|
|
296
|
-
cursorPos:
|
|
295
|
+
cursorPos: v
|
|
297
296
|
});
|
|
298
297
|
}, me = (l) => {
|
|
299
298
|
if (l.target instanceof Element && l.target.classList[0]?.includes("MuiMarkElement-root"))
|
|
@@ -323,8 +322,8 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
323
322
|
strokeWidth: 3
|
|
324
323
|
},
|
|
325
324
|
...y && j.reduce((l, b, I) => {
|
|
326
|
-
const
|
|
327
|
-
return l[
|
|
325
|
+
const z = `.MuiAreaElement-series-stacked-${I}`;
|
|
326
|
+
return l[z] = {
|
|
328
327
|
opacity: j[I].guid === y ? 0.9 : 0.2
|
|
329
328
|
}, l;
|
|
330
329
|
}, {})
|
|
@@ -353,7 +352,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
353
352
|
sx: { width: "100%", position: "relative" },
|
|
354
353
|
children: [
|
|
355
354
|
/* @__PURE__ */ e(
|
|
356
|
-
|
|
355
|
+
kt,
|
|
357
356
|
{
|
|
358
357
|
height: h,
|
|
359
358
|
hideLegend: !0,
|
|
@@ -366,8 +365,8 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
366
365
|
tooltip: { trigger: ae ? "item" : "none" }
|
|
367
366
|
},
|
|
368
367
|
slots: {
|
|
369
|
-
tooltip: ae && L ? (l) => /* @__PURE__ */ e(
|
|
370
|
-
|
|
368
|
+
tooltip: ae && L ? (l) => /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
|
|
369
|
+
To,
|
|
371
370
|
{
|
|
372
371
|
...l,
|
|
373
372
|
categoryGuids: B(L),
|
|
@@ -382,37 +381,37 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
382
381
|
data: P,
|
|
383
382
|
scaleType: "time",
|
|
384
383
|
valueFormatter: (l) => X(l, G.MONTH_SHORT_YEAR),
|
|
385
|
-
tickNumber:
|
|
384
|
+
tickNumber: J
|
|
386
385
|
// How many ticks to show on the x-axis
|
|
387
386
|
}
|
|
388
387
|
],
|
|
389
388
|
yAxis: [
|
|
390
389
|
{
|
|
391
390
|
min: ie,
|
|
392
|
-
max:
|
|
393
|
-
valueFormatter: (l) =>
|
|
391
|
+
max: te || 100,
|
|
392
|
+
valueFormatter: (l) => Lt(l).format("0a")
|
|
394
393
|
}
|
|
395
394
|
]
|
|
396
395
|
}
|
|
397
396
|
),
|
|
398
397
|
/* @__PURE__ */ e(
|
|
399
|
-
|
|
398
|
+
bo,
|
|
400
399
|
{
|
|
401
400
|
categoryGuids: de,
|
|
402
401
|
hoveredLegend: y,
|
|
403
402
|
legendRef: f,
|
|
404
|
-
onClickLegend:
|
|
403
|
+
onClickLegend: se,
|
|
405
404
|
onHoverLegend: ue,
|
|
406
405
|
sx: { px: i ? 0 : 24 }
|
|
407
406
|
}
|
|
408
407
|
),
|
|
409
408
|
K && /* @__PURE__ */ e(
|
|
410
|
-
|
|
409
|
+
_o,
|
|
411
410
|
{
|
|
412
411
|
categoryGuids: B(L),
|
|
413
412
|
chartContainerRef: _,
|
|
414
|
-
cursorPosition:
|
|
415
|
-
hoveredAreaData:
|
|
413
|
+
cursorPosition: v,
|
|
414
|
+
hoveredAreaData: E.map((l) => ({
|
|
416
415
|
...l,
|
|
417
416
|
x: X(l.x, G.MONTH_SHORT_YEAR)
|
|
418
417
|
}))
|
|
@@ -423,10 +422,10 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
423
422
|
)
|
|
424
423
|
}
|
|
425
424
|
);
|
|
426
|
-
},
|
|
425
|
+
}, pt = ({ selectedTab: t, onTabChange: n }) => {
|
|
427
426
|
const { common: s } = R();
|
|
428
427
|
return /* @__PURE__ */ e(
|
|
429
|
-
|
|
428
|
+
$t,
|
|
430
429
|
{
|
|
431
430
|
"aria-label": s.view_toggle,
|
|
432
431
|
exclusive: !0,
|
|
@@ -434,7 +433,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
434
433
|
orientation: "horizontal",
|
|
435
434
|
value: t,
|
|
436
435
|
children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
|
|
437
|
-
|
|
436
|
+
Ft,
|
|
438
437
|
{
|
|
439
438
|
"aria-label": o === "Chart" ? s.view_chart : s.view_table,
|
|
440
439
|
"aria-pressed": t === o,
|
|
@@ -447,8 +446,8 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
447
446
|
))
|
|
448
447
|
}
|
|
449
448
|
);
|
|
450
|
-
},
|
|
451
|
-
const { trends: s } = R(), { isMobile: o, isDesktop: r } =
|
|
449
|
+
}, ft = ({ selectedDateRange: t, selectedCategoryGuid: n }) => {
|
|
450
|
+
const { trends: s } = R(), { isMobile: o, isDesktop: r } = Q(), { getCategoryName: c } = q(), a = g.useMemo(() => {
|
|
452
451
|
const i = t.start.getFullYear() === t.end.getFullYear() ? X(
|
|
453
452
|
t.start,
|
|
454
453
|
o ? G.MONTH_SHORT : G.MONTH_LONG
|
|
@@ -467,20 +466,19 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
467
466
|
{
|
|
468
467
|
sx: {
|
|
469
468
|
fontSize: r ? null : 15,
|
|
470
|
-
whiteSpace: "normal",
|
|
471
469
|
overflow: "visible",
|
|
472
470
|
textOverflow: "unset"
|
|
473
471
|
},
|
|
474
472
|
children: u
|
|
475
473
|
}
|
|
476
474
|
),
|
|
477
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: a })
|
|
478
476
|
] });
|
|
479
|
-
},
|
|
477
|
+
}, xo = (t) => {
|
|
480
478
|
const n = t.id === "total";
|
|
481
479
|
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: t.tabIndex, children: [
|
|
482
|
-
!n && /* @__PURE__ */ e(H, { "aria-hidden": !0, children: /* @__PURE__ */ e(
|
|
483
|
-
/* @__PURE__ */ e(
|
|
480
|
+
!n && /* @__PURE__ */ e(H, { "aria-hidden": !0, children: /* @__PURE__ */ e(ve, { categoryGuid: t.row.top_level_category_guid, variant: "twotone" }) }),
|
|
481
|
+
/* @__PURE__ */ e(F, { bold: n, sx: { ml: 12 }, variant: n ? "body1" : "body2", children: t.row.category })
|
|
484
482
|
] });
|
|
485
483
|
}, je = (t) => {
|
|
486
484
|
const n = t.row.category_guid, s = t.row.top_level_category_guid, o = n === $e.INCOME || s === $e.INCOME, r = t.id === "total", c = t.field === "total", a = c ? t.row[t.field] : t.row.monthlyAmounts[t.field];
|
|
@@ -507,7 +505,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
507
505
|
s.push(r), o.setMonth(o.getMonth() + 1);
|
|
508
506
|
}
|
|
509
507
|
return s;
|
|
510
|
-
},
|
|
508
|
+
}, wo = (t, n) => {
|
|
511
509
|
const s = {
|
|
512
510
|
field: "category",
|
|
513
511
|
flex: 1,
|
|
@@ -515,9 +513,9 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
515
513
|
headerName: n.category_title,
|
|
516
514
|
minWidth: 210,
|
|
517
515
|
renderHeader: ke,
|
|
518
|
-
renderCell:
|
|
516
|
+
renderCell: xo,
|
|
519
517
|
sortable: !0,
|
|
520
|
-
sortComparator:
|
|
518
|
+
sortComparator: Ot,
|
|
521
519
|
type: "string"
|
|
522
520
|
}, o = t.map((c) => ({
|
|
523
521
|
field: c,
|
|
@@ -576,12 +574,12 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
576
574
|
});
|
|
577
575
|
}
|
|
578
576
|
return c;
|
|
579
|
-
},
|
|
577
|
+
}, Do = Et("div")({
|
|
580
578
|
display: "flex",
|
|
581
579
|
visibility: "hidden",
|
|
582
580
|
width: 0
|
|
583
581
|
});
|
|
584
|
-
function
|
|
582
|
+
function Io({
|
|
585
583
|
direction: t,
|
|
586
584
|
index: n,
|
|
587
585
|
sortingOrder: s,
|
|
@@ -589,7 +587,7 @@ function Lo({
|
|
|
589
587
|
className: r,
|
|
590
588
|
field: c
|
|
591
589
|
}) {
|
|
592
|
-
const a =
|
|
590
|
+
const a = Yt(), d = jt();
|
|
593
591
|
let u = null;
|
|
594
592
|
const i = {};
|
|
595
593
|
if (t === "asc" ? u = d.slots.columnSortedAscendingIcon : t === "desc" ? u = d.slots.columnSortedDescendingIcon : (u = d.slots.columnUnsortedIcon ?? null, i.sortingOrder = s), !u) return null;
|
|
@@ -597,7 +595,7 @@ function Lo({
|
|
|
597
595
|
let _ = "";
|
|
598
596
|
t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
|
|
599
597
|
const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, y = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...i }), T = /* @__PURE__ */ e(
|
|
600
|
-
|
|
598
|
+
Zt,
|
|
601
599
|
{
|
|
602
600
|
disabled: o,
|
|
603
601
|
size: "small",
|
|
@@ -609,18 +607,18 @@ function Lo({
|
|
|
609
607
|
children: y
|
|
610
608
|
}
|
|
611
609
|
);
|
|
612
|
-
return /* @__PURE__ */ e(
|
|
610
|
+
return /* @__PURE__ */ e(Do, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(Xt, { badgeContent: n, color: "default", overlap: "circular", children: T }) : T });
|
|
613
611
|
}
|
|
614
|
-
const
|
|
612
|
+
const Lo = g.memo(Io), Qe = ({
|
|
615
613
|
columns: t,
|
|
616
614
|
onRowClick: n,
|
|
617
615
|
parentCategory: s,
|
|
618
616
|
rows: o,
|
|
619
617
|
totalRow: r
|
|
620
618
|
}) => {
|
|
621
|
-
const c =
|
|
619
|
+
const c = Z(), { onEvent: a } = $(), d = c.palette.mode === "light";
|
|
622
620
|
return /* @__PURE__ */ e(
|
|
623
|
-
|
|
621
|
+
Ut,
|
|
624
622
|
{
|
|
625
623
|
columns: t,
|
|
626
624
|
disableColumnFilter: !0,
|
|
@@ -628,9 +626,9 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
628
626
|
hideFooter: !0,
|
|
629
627
|
initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
|
|
630
628
|
onRowClick: (u) => {
|
|
631
|
-
s || n?.(u.row.category_guid), a(
|
|
629
|
+
s || n?.(u.row.category_guid), a(w.TRENDS_CLICK_LIST_ITEM, {
|
|
632
630
|
...W,
|
|
633
|
-
listItem:
|
|
631
|
+
listItem: Nt[u.row.category_guid]
|
|
634
632
|
});
|
|
635
633
|
},
|
|
636
634
|
pinnedRows: {
|
|
@@ -639,7 +637,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
639
637
|
rowHeight: 64,
|
|
640
638
|
rows: o,
|
|
641
639
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
642
|
-
slots: { columnHeaderSortIcon:
|
|
640
|
+
slots: { columnHeaderSortIcon: Lo },
|
|
643
641
|
sortingOrder: ["asc", "desc"],
|
|
644
642
|
sx: {
|
|
645
643
|
borderColor: "divider",
|
|
@@ -656,14 +654,14 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
656
654
|
}
|
|
657
655
|
}
|
|
658
656
|
);
|
|
659
|
-
},
|
|
657
|
+
}, yt = ({
|
|
660
658
|
selectedDateRange: t,
|
|
661
659
|
selectedCategory: n,
|
|
662
660
|
onClickRow: s,
|
|
663
661
|
height: o = "100%",
|
|
664
662
|
sx: r = {}
|
|
665
663
|
}) => {
|
|
666
|
-
const { trends: c } = R(), { trendsCategories: a } =
|
|
664
|
+
const { trends: c } = R(), { trendsCategories: a } = q(), d = g.useMemo(() => vo(t.start, t.end), [t]), u = g.useMemo(() => wo(d, c), [d, c]), i = g.useMemo(() => {
|
|
667
665
|
if (n)
|
|
668
666
|
return a.find((h) => h.guid === n);
|
|
669
667
|
}, [n, a]), [f, m] = g.useMemo(() => {
|
|
@@ -688,7 +686,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
688
686
|
{}
|
|
689
687
|
)
|
|
690
688
|
};
|
|
691
|
-
return /* @__PURE__ */ C(
|
|
689
|
+
return console.log({ incomeRows: f, spendingRows: m, totalSpendingRow: _ }), /* @__PURE__ */ C(
|
|
692
690
|
S,
|
|
693
691
|
{
|
|
694
692
|
gap: 24,
|
|
@@ -716,15 +714,15 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
716
714
|
]
|
|
717
715
|
}
|
|
718
716
|
);
|
|
719
|
-
},
|
|
717
|
+
}, Eo = {
|
|
720
718
|
title: "Transaction List"
|
|
721
|
-
},
|
|
719
|
+
}, Mo = ({
|
|
722
720
|
categoryGuid: t,
|
|
723
721
|
dateRange: n,
|
|
724
722
|
isOpen: s,
|
|
725
723
|
onClose: o
|
|
726
724
|
}) => {
|
|
727
|
-
const { onEvent: r } = $(), { selectedAccountGuids: c } = fe(), { common: a } = R(), { setFilter: d, sortedTransactions: u } =
|
|
725
|
+
const { onEvent: r } = $(), { selectedAccountGuids: c } = fe(), { common: a } = R(), { setFilter: d, sortedTransactions: u } = we(), [i, f] = g.useState(""), m = g.useMemo(
|
|
728
726
|
() => u.find((h) => h.guid === i),
|
|
729
727
|
[i, u]
|
|
730
728
|
);
|
|
@@ -735,7 +733,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
735
733
|
custom: (h) => t === "" || t === h.category_guid || t === h.top_level_category_guid,
|
|
736
734
|
showSplits: !!t
|
|
737
735
|
});
|
|
738
|
-
}, [c, t, n]), g.useEffect(() => r(
|
|
736
|
+
}, [c, t, n]), g.useEffect(() => r(w.TRENDS_VIEW_TRANSACTIONS), []);
|
|
739
737
|
const _ = () => {
|
|
740
738
|
f(""), o();
|
|
741
739
|
};
|
|
@@ -745,26 +743,26 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
745
743
|
ariaLabelClose: a.close_aria,
|
|
746
744
|
isOpen: s,
|
|
747
745
|
onClose: _,
|
|
748
|
-
title:
|
|
746
|
+
title: Eo.title,
|
|
749
747
|
children: [
|
|
750
748
|
m && /* @__PURE__ */ e(dt, { transaction: m }),
|
|
751
749
|
!m && /* @__PURE__ */ e(ct, { onClick: f })
|
|
752
750
|
]
|
|
753
751
|
}
|
|
754
752
|
);
|
|
755
|
-
},
|
|
756
|
-
const { onEvent: o } = $(), { isDesktop: r, isTablet: c, isMobile: a } =
|
|
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(), {
|
|
757
755
|
categoriesLoaded: i,
|
|
758
756
|
loadCategories: f,
|
|
759
757
|
loadDateRangeCategoryTotals: m,
|
|
760
758
|
loadMonthlyCategoryTotals: _,
|
|
761
759
|
monthlyCategoryTotals: h,
|
|
762
760
|
getCategoryName: p
|
|
763
|
-
} =
|
|
761
|
+
} = q(), {
|
|
764
762
|
isTransactionDataLoaded: y,
|
|
765
763
|
loadTransactionData: T,
|
|
766
764
|
sortedTransactions: N
|
|
767
|
-
} =
|
|
765
|
+
} = we(), { selectedDateRange: x, setSelectedDateRange: L } = ye(), { isInitialized: E, selectedAccounts: M } = 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);
|
|
768
766
|
Ie({
|
|
769
767
|
widgetName: "TrendsFullWidget",
|
|
770
768
|
isLoaded: K
|
|
@@ -772,53 +770,53 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
772
770
|
const D = () => ie(window.innerHeight);
|
|
773
771
|
return window.addEventListener("resize", D), d || u().finally(), i || f().finally(), y || T().finally(), () => window.removeEventListener("resize", D);
|
|
774
772
|
}, []), g.useEffect(() => {
|
|
775
|
-
|
|
773
|
+
E && m(M, x.start, x.end).then(() => {
|
|
776
774
|
_(
|
|
777
|
-
|
|
775
|
+
M,
|
|
778
776
|
x.start,
|
|
779
777
|
x.end
|
|
780
778
|
);
|
|
781
779
|
}).finally(() => {
|
|
782
|
-
ae(!0), o(
|
|
780
|
+
ae(!0), o(w.TRENDS_LOAD_WIDGET, {
|
|
783
781
|
...W,
|
|
784
782
|
time_period: `${Se(x.end, x.start)}M`
|
|
785
783
|
});
|
|
786
784
|
});
|
|
787
|
-
}, [
|
|
788
|
-
const
|
|
785
|
+
}, [E, M, x]);
|
|
786
|
+
const ne = g.useMemo(() => {
|
|
789
787
|
if (!K) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
790
|
-
const D =
|
|
788
|
+
const D = Gt(
|
|
791
789
|
h,
|
|
792
790
|
x.start,
|
|
793
791
|
x.end
|
|
794
792
|
), l = O.length ? D.filter(
|
|
795
793
|
(b) => b.top_level_category_guid === O || b.category_guid === O
|
|
796
|
-
) :
|
|
794
|
+
) : Bt(D);
|
|
797
795
|
return {
|
|
798
|
-
stackedDatasets: l.filter(
|
|
799
|
-
unstackedDatasets: l.filter(
|
|
796
|
+
stackedDatasets: l.filter(Vt),
|
|
797
|
+
unstackedDatasets: l.filter(Pt)
|
|
800
798
|
};
|
|
801
799
|
}, [h, O, x]), U = (D, l) => {
|
|
802
|
-
V(l ?? P), o(
|
|
800
|
+
V(l ?? P), o(w.TRENDS_CLICK_TOGGLE_VIEW);
|
|
803
801
|
}, de = (D) => {
|
|
804
802
|
const l = et(D?.[0], 1), b = D?.[1], I = Se(b, l);
|
|
805
|
-
L({ start: l, end: b }), o(
|
|
803
|
+
L({ start: l, end: b }), o(w.TRENDS_CLICK_TIME_WINDOW, {
|
|
806
804
|
time_period: I + "M"
|
|
807
805
|
});
|
|
808
806
|
}, B = () => {
|
|
809
|
-
o(
|
|
807
|
+
o(w.TRENDS_CLICK_FILTER);
|
|
810
808
|
}, ue = (D) => {
|
|
811
|
-
|
|
812
|
-
},
|
|
813
|
-
|
|
809
|
+
ee(D);
|
|
810
|
+
}, se = (D) => {
|
|
811
|
+
ee(D), o(w.TRENDS_CLICK_LEGEND, { category: p(D) });
|
|
814
812
|
}, le = (D) => {
|
|
815
|
-
o(
|
|
813
|
+
o(w.TRENDS_HOVER_LEGEND, { category: p(D) });
|
|
816
814
|
}, ce = (D) => {
|
|
817
|
-
o(
|
|
815
|
+
o(w.TRENDS_HOVER_AREA, { category: D });
|
|
818
816
|
}, me = (D) => {
|
|
819
|
-
o(
|
|
817
|
+
o(w.TRENDS_HOVER_POINT, { category: D });
|
|
820
818
|
};
|
|
821
|
-
return !
|
|
819
|
+
return !E || !K ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ C(
|
|
822
820
|
ut,
|
|
823
821
|
{
|
|
824
822
|
calendarActions: { onRangeChanged: de },
|
|
@@ -828,7 +826,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
828
826
|
onBackClick: t,
|
|
829
827
|
onMenuClick: n,
|
|
830
828
|
sx: s,
|
|
831
|
-
title:
|
|
829
|
+
title: v.title,
|
|
832
830
|
children: [
|
|
833
831
|
/* @__PURE__ */ C(
|
|
834
832
|
S,
|
|
@@ -846,38 +844,38 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
846
844
|
sx: { pb: a ? 12 : 24, pt: a ? 24 : 48 },
|
|
847
845
|
children: [
|
|
848
846
|
/* @__PURE__ */ e(
|
|
849
|
-
|
|
847
|
+
ft,
|
|
850
848
|
{
|
|
851
849
|
selectedCategoryGuid: O,
|
|
852
850
|
selectedDateRange: x
|
|
853
851
|
}
|
|
854
852
|
),
|
|
855
|
-
/* @__PURE__ */ e(
|
|
853
|
+
/* @__PURE__ */ e(pt, { onTabChange: U, selectedTab: P })
|
|
856
854
|
]
|
|
857
855
|
}
|
|
858
856
|
),
|
|
859
857
|
/* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
860
|
-
/* @__PURE__ */ e(H, { flexGrow: 1, children: O && /* @__PURE__ */ C(Te, { onClick: () =>
|
|
858
|
+
/* @__PURE__ */ e(H, { flexGrow: 1, children: O && /* @__PURE__ */ C(Te, { onClick: () => ee(""), sx: { p: 0, pr: 5 }, children: [
|
|
861
859
|
/* @__PURE__ */ e(He, { name: "arrow_back" }),
|
|
862
|
-
|
|
860
|
+
v.all_categories
|
|
863
861
|
] }) }),
|
|
864
|
-
/* @__PURE__ */ e(Te, { onClick: () =>
|
|
862
|
+
/* @__PURE__ */ e(Te, { onClick: () => J(!0), sx: { px: 5 }, children: `${v.view_transactions} (${N.length})` })
|
|
865
863
|
] }),
|
|
866
864
|
/* @__PURE__ */ C(H, { children: [
|
|
867
865
|
P === "Chart" && /* @__PURE__ */ e(
|
|
868
|
-
|
|
866
|
+
So,
|
|
869
867
|
{
|
|
870
868
|
availableHeight: j,
|
|
871
|
-
onClickLegend:
|
|
869
|
+
onClickLegend: se,
|
|
872
870
|
onHoverArea: ce,
|
|
873
871
|
onHoverLegend: le,
|
|
874
872
|
onHoverPoint: me,
|
|
875
|
-
stackedDatasets:
|
|
876
|
-
unstackedDatasets:
|
|
873
|
+
stackedDatasets: ne.stackedDatasets,
|
|
874
|
+
unstackedDatasets: ne.unstackedDatasets
|
|
877
875
|
}
|
|
878
876
|
),
|
|
879
877
|
P === "Table" && /* @__PURE__ */ e(
|
|
880
|
-
|
|
878
|
+
yt,
|
|
881
879
|
{
|
|
882
880
|
onClickRow: ue,
|
|
883
881
|
selectedCategory: O,
|
|
@@ -889,19 +887,19 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
889
887
|
}
|
|
890
888
|
),
|
|
891
889
|
/* @__PURE__ */ e(
|
|
892
|
-
|
|
890
|
+
Ao,
|
|
893
891
|
{
|
|
894
892
|
categoryGuid: O,
|
|
895
893
|
dateRange: x,
|
|
896
894
|
isOpen: Y,
|
|
897
|
-
onClose: () =>
|
|
895
|
+
onClose: () => J(!1)
|
|
898
896
|
}
|
|
899
897
|
)
|
|
900
898
|
]
|
|
901
899
|
}
|
|
902
900
|
);
|
|
903
|
-
},
|
|
904
|
-
const { monthlyCategoryTotals: t } =
|
|
901
|
+
}, rs = A(Ro), ko = () => {
|
|
902
|
+
const { monthlyCategoryTotals: t } = q(), { trends: n } = R(), s = Z(), { availableHeight: o = 300 } = st(), r = g.useMemo(() => zt(t), [t]);
|
|
905
903
|
return /* @__PURE__ */ e(
|
|
906
904
|
Ve,
|
|
907
905
|
{
|
|
@@ -918,8 +916,8 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
918
916
|
valueFormatterString: "0,0"
|
|
919
917
|
}
|
|
920
918
|
);
|
|
921
|
-
},
|
|
922
|
-
const { isAccountDataLoaded: s, loadAccountData: o } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: c } =
|
|
919
|
+
}, Ho = A(ko), No = ({ onPrimaryCtaClick: t, sx: n }) => {
|
|
920
|
+
const { isAccountDataLoaded: s, loadAccountData: o } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: c } = q(), { isInitialized: a } = Be(), { trends: d } = R(), { selectedAccounts: u } = fe();
|
|
923
921
|
return g.useEffect(() => {
|
|
924
922
|
s || o().finally();
|
|
925
923
|
}, []), Ie({
|
|
@@ -928,7 +926,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
928
926
|
}), g.useEffect(() => {
|
|
929
927
|
a && s && r(u).finally();
|
|
930
928
|
}, [s, a, u]), !s || !a || !c ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
931
|
-
|
|
929
|
+
Qt,
|
|
932
930
|
{
|
|
933
931
|
contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
|
|
934
932
|
onPrimaryCtaClick: t,
|
|
@@ -936,10 +934,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
936
934
|
subTitle: d.sub_title,
|
|
937
935
|
sx: { height: "100%", ...n },
|
|
938
936
|
title: d.mini_title,
|
|
939
|
-
children: /* @__PURE__ */ e(
|
|
937
|
+
children: /* @__PURE__ */ e(Ho, {})
|
|
940
938
|
}
|
|
941
939
|
);
|
|
942
|
-
},
|
|
940
|
+
}, as = A(No), Wo = 70, qe = ({
|
|
943
941
|
title: t,
|
|
944
942
|
totalAmount: n,
|
|
945
943
|
transactionType: s,
|
|
@@ -947,10 +945,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
947
945
|
secondaryLabel: r,
|
|
948
946
|
shouldDisplayPercentage: c
|
|
949
947
|
}) => {
|
|
950
|
-
const { availableWidth: a } = st(), d = g.useRef(null), u = g.useRef(null), i =
|
|
948
|
+
const { availableWidth: a } = st(), d = g.useRef(null), u = g.useRef(null), i = Wt(Number(Math.abs(o)), {
|
|
951
949
|
style: "percent",
|
|
952
950
|
minimumIntegerDigits: 1
|
|
953
|
-
}), f = a === 288 &&
|
|
951
|
+
}), f = a === 288 && re(n, "0,0.00").length > 10 ? re(n, "0,0") : re(n, "0,0.00"), m = s === "spending" ? o > 0 : o >= 0, _ = s === "spending" ? "error.main" : "success.main", h = s === "spending" ? "success.main" : "text.secondary", p = d?.current, y = u?.current, T = p && y ? p.scrollWidth > y.clientWidth - Wo : !1;
|
|
954
952
|
return /* @__PURE__ */ C(
|
|
955
953
|
S,
|
|
956
954
|
{
|
|
@@ -975,7 +973,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
975
973
|
children: [
|
|
976
974
|
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
|
|
977
975
|
c && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
978
|
-
m ? /* @__PURE__ */ e(
|
|
976
|
+
m ? /* @__PURE__ */ e(Jt, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(eo, { size: 20, sx: { color: h } }),
|
|
979
977
|
/* @__PURE__ */ e(
|
|
980
978
|
pe,
|
|
981
979
|
{
|
|
@@ -1023,22 +1021,22 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1023
1021
|
]
|
|
1024
1022
|
}
|
|
1025
1023
|
);
|
|
1026
|
-
},
|
|
1024
|
+
}, Oo = A(() => {
|
|
1027
1025
|
const { trends: t } = R();
|
|
1028
1026
|
return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
1029
|
-
/* @__PURE__ */ e(
|
|
1027
|
+
/* @__PURE__ */ e(to, { size: 32 }),
|
|
1030
1028
|
/* @__PURE__ */ C(S, { children: [
|
|
1031
1029
|
/* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
1032
1030
|
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
1033
1031
|
] })
|
|
1034
1032
|
] });
|
|
1035
|
-
}),
|
|
1033
|
+
}), is = A(({ onCtaClick: t }) => {
|
|
1036
1034
|
const { isAccountDataLoaded: n, loadAccountData: s, visibleAccounts: o } = De();
|
|
1037
1035
|
g.useEffect(() => {
|
|
1038
1036
|
n || s().finally();
|
|
1039
1037
|
}, []);
|
|
1040
|
-
const { onEvent: r } = $(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: d } =
|
|
1041
|
-
start:
|
|
1038
|
+
const { onEvent: r } = $(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: d } = q(), u = {
|
|
1039
|
+
start: qt(/* @__PURE__ */ new Date(), 1),
|
|
1042
1040
|
end: /* @__PURE__ */ new Date()
|
|
1043
1041
|
}, { trends: i } = R(), { selectedAccounts: f, isInitialized: m } = fe();
|
|
1044
1042
|
Ie({
|
|
@@ -1046,7 +1044,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1046
1044
|
isLoaded: d
|
|
1047
1045
|
}), g.useEffect(() => {
|
|
1048
1046
|
m && a(f, u.start).then(() => {
|
|
1049
|
-
r(
|
|
1047
|
+
r(w.TRENDS_LOAD_WIDGET, {
|
|
1050
1048
|
state: o?.length ? "default" : "zeroState"
|
|
1051
1049
|
});
|
|
1052
1050
|
});
|
|
@@ -1057,20 +1055,20 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1057
1055
|
incomeData: at(c, u)
|
|
1058
1056
|
}),
|
|
1059
1057
|
[c, u]
|
|
1060
|
-
), [p, y] = _, [T, N] = h, x = Ye(y.y, p.y), L = Ye(N.y, T.y),
|
|
1058
|
+
), [p, y] = _, [T, N] = h, x = Ye(y.y, p.y), L = Ye(N.y, T.y), E = m && !o?.length, M = () => {
|
|
1061
1059
|
r(
|
|
1062
|
-
|
|
1060
|
+
E ? w.TRENDS_CLICK_GET_STARTED : w.TRENDS_CLICK_VIEW_MORE
|
|
1063
1061
|
), t();
|
|
1064
1062
|
};
|
|
1065
1063
|
return !d || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
1066
|
-
|
|
1064
|
+
ao,
|
|
1067
1065
|
{
|
|
1068
1066
|
className: "mx-trends-microwidget",
|
|
1069
1067
|
ctaLabel: i.micro_primary_cta_label,
|
|
1070
|
-
onCTAClick:
|
|
1071
|
-
subHeader:
|
|
1068
|
+
onCTAClick: M,
|
|
1069
|
+
subHeader: E ? void 0 : i.micro_subheader,
|
|
1072
1070
|
title: i.title,
|
|
1073
|
-
children:
|
|
1071
|
+
children: E ? /* @__PURE__ */ e(Oo, {}) : /* @__PURE__ */ C(
|
|
1074
1072
|
S,
|
|
1075
1073
|
{
|
|
1076
1074
|
sx: {
|
|
@@ -1106,17 +1104,17 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1106
1104
|
)
|
|
1107
1105
|
}
|
|
1108
1106
|
);
|
|
1109
|
-
}),
|
|
1107
|
+
}), Go = A(
|
|
1110
1108
|
({ isExpanded: t, onClick: n }) => {
|
|
1111
|
-
const s =
|
|
1112
|
-
return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(
|
|
1109
|
+
const s = Z();
|
|
1110
|
+
return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(lo, { onClick: n, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
|
|
1113
1111
|
S,
|
|
1114
1112
|
{
|
|
1115
1113
|
sx: { color: s.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
1116
1114
|
children: [
|
|
1117
|
-
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(
|
|
1118
|
-
/* @__PURE__ */ e(
|
|
1119
|
-
|
|
1115
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(F, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
|
|
1116
|
+
/* @__PURE__ */ e(co, { sx: { color: s.palette.primary.main }, children: t ? /* @__PURE__ */ e(oo, {}) : /* @__PURE__ */ e(
|
|
1117
|
+
no,
|
|
1120
1118
|
{
|
|
1121
1119
|
sx: {
|
|
1122
1120
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -1138,30 +1136,30 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1138
1136
|
isLastItem: c = !1,
|
|
1139
1137
|
showDivider: a = !0
|
|
1140
1138
|
}) => {
|
|
1141
|
-
const { trends: d } = R(), { onEvent: u } = $(), i =
|
|
1142
|
-
r?.(), u(
|
|
1139
|
+
const { trends: d } = R(), { onEvent: u } = $(), i = Z(), f = `${o.length} ${o.length === 1 ? d.transaction : d.transactions}`, m = () => {
|
|
1140
|
+
r?.(), u(w.TRENDS_CLICK_LIST_ITEM, {
|
|
1143
1141
|
...W,
|
|
1144
1142
|
listItem: s
|
|
1145
1143
|
});
|
|
1146
1144
|
};
|
|
1147
1145
|
return /* @__PURE__ */ C(g.Fragment, { children: [
|
|
1148
1146
|
/* @__PURE__ */ e(
|
|
1149
|
-
|
|
1147
|
+
uo,
|
|
1150
1148
|
{
|
|
1151
1149
|
leftIcon: n ? /* @__PURE__ */ e(
|
|
1152
|
-
|
|
1150
|
+
ve,
|
|
1153
1151
|
{
|
|
1154
1152
|
categoryGuid: n,
|
|
1155
1153
|
sx: {
|
|
1156
|
-
bgcolor:
|
|
1154
|
+
bgcolor: Mt(Oe(n, i), 0.15),
|
|
1157
1155
|
border: `1px solid ${Oe(n, i)}`,
|
|
1158
1156
|
color: "text.primary"
|
|
1159
1157
|
}
|
|
1160
1158
|
}
|
|
1161
1159
|
) : void 0,
|
|
1162
1160
|
onClick: m,
|
|
1163
|
-
rightContent:
|
|
1164
|
-
rightIcon: r ? /* @__PURE__ */ e(
|
|
1161
|
+
rightContent: re(Math.abs(t), "0,0.00"),
|
|
1162
|
+
rightIcon: r ? /* @__PURE__ */ e(so, {}) : void 0,
|
|
1165
1163
|
subtitle: f,
|
|
1166
1164
|
title: s
|
|
1167
1165
|
}
|
|
@@ -1169,15 +1167,15 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1169
1167
|
a && /* @__PURE__ */ e(Ne, { component: "li", sx: { ml: c ? 24 : 68 } })
|
|
1170
1168
|
] }, n);
|
|
1171
1169
|
}
|
|
1172
|
-
),
|
|
1170
|
+
), Bo = A(
|
|
1173
1171
|
({ availableHeight: t = 0, onCategoryClick: n }) => {
|
|
1174
|
-
const { collapsedCategories: s, visibleCategories: o, setVisibleListLength: r } = ye(), { isLargeDesktop: c, isDesktop: a } =
|
|
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;
|
|
1175
1173
|
g.useEffect(() => {
|
|
1176
1174
|
const p = Math.floor(t / 64) - 1, y = o.length + s.length;
|
|
1177
1175
|
p !== o.length && (r(m ? Math.max(p, 5) : 5), f(p >= y));
|
|
1178
1176
|
}, [t]);
|
|
1179
1177
|
const _ = () => {
|
|
1180
|
-
f(!i), u(
|
|
1178
|
+
f(!i), u(w.TRENDS_CLICK_VIEW_MORE, {
|
|
1181
1179
|
...W
|
|
1182
1180
|
});
|
|
1183
1181
|
}, h = o.length + (i ? s.length : 0);
|
|
@@ -1195,7 +1193,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1195
1193
|
p.guid
|
|
1196
1194
|
)),
|
|
1197
1195
|
/* @__PURE__ */ e(
|
|
1198
|
-
|
|
1196
|
+
io,
|
|
1199
1197
|
{
|
|
1200
1198
|
component: "li",
|
|
1201
1199
|
in: i,
|
|
@@ -1215,35 +1213,34 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1215
1213
|
}) })
|
|
1216
1214
|
}
|
|
1217
1215
|
),
|
|
1218
|
-
s.length > 0 && /* @__PURE__ */ e(
|
|
1216
|
+
s.length > 0 && /* @__PURE__ */ e(Go, { isExpanded: i, onClick: _ })
|
|
1219
1217
|
] })
|
|
1220
1218
|
] });
|
|
1221
1219
|
}
|
|
1222
|
-
),
|
|
1223
|
-
const { onEvent: s } = $(), { isMobile: o, isDesktop: r, isLargeDesktop: c } =
|
|
1224
|
-
n?.(T), s(
|
|
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);
|
|
1225
1223
|
}, h = i ? 200 : 170, p = i ? 170 : 124, y = t.length > 0 ? h : p;
|
|
1226
|
-
return /* @__PURE__ */ e(
|
|
1227
|
-
|
|
1224
|
+
return /* @__PURE__ */ e(mo, { sx: { height: y }, children: /* @__PURE__ */ e(
|
|
1225
|
+
Kt,
|
|
1228
1226
|
{
|
|
1229
1227
|
areBeatsLoading: a.isLoading,
|
|
1230
1228
|
beats: t,
|
|
1229
|
+
cardStyle: "border",
|
|
1231
1230
|
endpoint: d,
|
|
1232
1231
|
headerSx: { p: 0 },
|
|
1233
1232
|
logOutUser: m,
|
|
1234
1233
|
onCardClick: _,
|
|
1235
|
-
showBorder: !0,
|
|
1236
1234
|
showCarouselControls: !0,
|
|
1237
1235
|
showHeader: i,
|
|
1238
1236
|
showIcon: !0,
|
|
1239
1237
|
showWithMargin: !1,
|
|
1240
1238
|
token: u,
|
|
1241
1239
|
userHasFullInsightFeedBeats: !1,
|
|
1242
|
-
variant: "outlined",
|
|
1243
1240
|
visibleCardsCount: f
|
|
1244
1241
|
}
|
|
1245
1242
|
) });
|
|
1246
|
-
},
|
|
1243
|
+
}, Vo = A(Po), zo = A(({ chartLabel: t, chartColor: n }) => {
|
|
1247
1244
|
const { onEvent: s } = $(), {
|
|
1248
1245
|
categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: r }
|
|
1249
1246
|
} = ye();
|
|
@@ -1261,7 +1258,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1261
1258
|
stroke: n
|
|
1262
1259
|
}),
|
|
1263
1260
|
onItemClick: () => {
|
|
1264
|
-
s(
|
|
1261
|
+
s(w.TRENDS_CLICK_CHART, W);
|
|
1265
1262
|
},
|
|
1266
1263
|
showArea: !0,
|
|
1267
1264
|
showAverage: !0,
|
|
@@ -1276,40 +1273,42 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1276
1273
|
valueFormatterString: "0,0"
|
|
1277
1274
|
}
|
|
1278
1275
|
) });
|
|
1279
|
-
}),
|
|
1280
|
-
const t =
|
|
1276
|
+
}), Fo = A(() => {
|
|
1277
|
+
const t = Z(), { is_mobile_webview: n } = rt(), { isDesktop: s, isSmallTablet: o, isTablet: r } = Q(), { common: c, trends: a } = R(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = we(), [f, m] = g.useState(null);
|
|
1281
1278
|
if (!d)
|
|
1282
1279
|
return null;
|
|
1283
1280
|
const { guid: _, name: h, is_income: p, totalAmount: y } = d, T = Oe(_, t), N = p ? a.income_label : a.spending_label, x = ` ${d.transactions.length === 1 ? a.transaction : a.transactions} (${d.transactions.length})`, L = g.useMemo(
|
|
1284
|
-
() => i.find((
|
|
1281
|
+
() => i.find((v) => v.guid === f),
|
|
1285
1282
|
[f, i]
|
|
1286
|
-
),
|
|
1283
|
+
), E = i.length > 0 && !n && (s || r && !o), M = (v) => v.category_guid === _ || v.top_level_category_guid === _;
|
|
1287
1284
|
return /* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1288
1285
|
/* @__PURE__ */ C(S, { sx: { borderRadius: 0, pb: 4, pt: 16, px: 12, width: "100%" }, children: [
|
|
1289
1286
|
/* @__PURE__ */ e(We, { sx: { px: 12 }, children: /* @__PURE__ */ C(mt, { children: [
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1287
|
+
/* @__PURE__ */ e(ho, { children: /* @__PURE__ */ e(ve, { categoryGuid: _ }) }),
|
|
1291
1288
|
/* @__PURE__ */ e(
|
|
1292
1289
|
ht,
|
|
1293
1290
|
{
|
|
1294
1291
|
primary: h,
|
|
1295
|
-
primaryTypographyProps: { component: "div", variant: "h3" },
|
|
1296
1292
|
secondary: u,
|
|
1297
|
-
|
|
1293
|
+
slotProps: {
|
|
1294
|
+
primary: { component: "div", variant: "h3", fontSize: 18, fontWeight: 700 },
|
|
1295
|
+
secondary: { component: "div", variant: "body2", fontSize: 13 }
|
|
1296
|
+
}
|
|
1298
1297
|
}
|
|
1299
1298
|
),
|
|
1300
|
-
/* @__PURE__ */ e(
|
|
1299
|
+
/* @__PURE__ */ e(F, { component: "div", variant: "h3", children: re(Math.abs(y), "0,0.00") })
|
|
1301
1300
|
] }) }),
|
|
1302
1301
|
/* @__PURE__ */ e(zo, { chartColor: T, chartLabel: N }),
|
|
1303
1302
|
/* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 12 }, children: [
|
|
1304
|
-
/* @__PURE__ */ e(
|
|
1305
|
-
|
|
1303
|
+
/* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: x }),
|
|
1304
|
+
E && /* @__PURE__ */ e(go, { filter: M })
|
|
1306
1305
|
] })
|
|
1307
1306
|
] }),
|
|
1308
1307
|
/* @__PURE__ */ e(
|
|
1309
1308
|
ct,
|
|
1310
1309
|
{
|
|
1311
1310
|
bgcolor: "transparent",
|
|
1312
|
-
filter:
|
|
1311
|
+
filter: M,
|
|
1313
1312
|
height: "calc(100vh - 475px)",
|
|
1314
1313
|
onClick: m
|
|
1315
1314
|
}
|
|
@@ -1325,10 +1324,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1325
1324
|
}
|
|
1326
1325
|
)
|
|
1327
1326
|
] });
|
|
1328
|
-
}),
|
|
1327
|
+
}), $o = (t, n) => {
|
|
1329
1328
|
const s = at(t, n), o = it(t, n);
|
|
1330
1329
|
return [s, o].filter((r) => r.length > 0);
|
|
1331
|
-
},
|
|
1330
|
+
}, Ko = (t, n) => {
|
|
1332
1331
|
const [s, o] = t, r = s, c = o ?? s, a = [];
|
|
1333
1332
|
if (r) {
|
|
1334
1333
|
const d = r.reduce((u, i) => u + i.y, 0);
|
|
@@ -1339,17 +1338,21 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1339
1338
|
a.push({ label: n.spending_label, amount: d });
|
|
1340
1339
|
}
|
|
1341
1340
|
return a;
|
|
1342
|
-
},
|
|
1341
|
+
}, Yo = ({
|
|
1343
1342
|
availableHeight: t = 0,
|
|
1344
1343
|
minHeight: n = 500,
|
|
1345
1344
|
selectedDateRange: s,
|
|
1346
1345
|
totals: o
|
|
1347
1346
|
}) => {
|
|
1348
|
-
const r =
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
y(
|
|
1352
|
-
}, [t])
|
|
1347
|
+
const r = Z(), { onEvent: c } = $(), { trends: a } = R(), { isSmallMobile: d, isMobile: u, isSmallTablet: i, isTablet: f } = Q(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = $o(o, s), h = Ko(_, a), [p, y] = g.useState(0), T = 458, N = 195, x = 56, L = u || d ? N : i || f ? T : p;
|
|
1348
|
+
g.useEffect(() => {
|
|
1349
|
+
const M = Math.max(t - x, n);
|
|
1350
|
+
y(M);
|
|
1351
|
+
}, [t]);
|
|
1352
|
+
const E = () => {
|
|
1353
|
+
c(w.TRENDS_CLICK_CHART, W);
|
|
1354
|
+
};
|
|
1355
|
+
return console.log({ datasets: _, totals: o }), /* @__PURE__ */ e(
|
|
1353
1356
|
Ve,
|
|
1354
1357
|
{
|
|
1355
1358
|
baseline: "min",
|
|
@@ -1358,9 +1361,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1358
1361
|
datasets: _,
|
|
1359
1362
|
height: L,
|
|
1360
1363
|
labels: h,
|
|
1361
|
-
onItemClick:
|
|
1362
|
-
c(v.TRENDS_CLICK_CHART, W);
|
|
1363
|
-
},
|
|
1364
|
+
onItemClick: E,
|
|
1364
1365
|
showArea: !0,
|
|
1365
1366
|
showAxisHighlight: !0,
|
|
1366
1367
|
showLegend: !0,
|
|
@@ -1372,7 +1373,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1372
1373
|
valueFormatterString: "0.0a"
|
|
1373
1374
|
}
|
|
1374
1375
|
);
|
|
1375
|
-
},
|
|
1376
|
+
}, jo = A(Yo), Uo = [
|
|
1376
1377
|
"BillAmountNotStandard",
|
|
1377
1378
|
"CategorySpendingV2",
|
|
1378
1379
|
"CostOfLivingToIncome",
|
|
@@ -1406,56 +1407,56 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1406
1407
|
"WeeklyNewMerchantsV2",
|
|
1407
1408
|
"WeeklyNoSpendDays",
|
|
1408
1409
|
"WeeklySmallPurchasesSummary"
|
|
1409
|
-
],
|
|
1410
|
+
], Xo = (t, n, s) => ({
|
|
1410
1411
|
description: n ? t.empty_state_sub_text : t.empty_state_sub_text_no_aggregation,
|
|
1411
1412
|
header: n ? t.zero_state_content_header : t.zero_state_content_header_no_aggregation,
|
|
1412
1413
|
onClickHandler: n ? s : void 0,
|
|
1413
1414
|
primaryButton: n ? t.empty_state_primary : void 0
|
|
1414
|
-
}),
|
|
1415
|
+
}), Zo = ({
|
|
1415
1416
|
onBackClick: t,
|
|
1416
1417
|
onMenuClick: n,
|
|
1417
1418
|
onInsightCardClick: s,
|
|
1418
1419
|
sx: o
|
|
1419
1420
|
}) => {
|
|
1420
|
-
const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } =
|
|
1421
|
+
const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Q(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
|
|
1421
1422
|
categoriesLoaded: _,
|
|
1422
1423
|
loadCategories: h,
|
|
1423
1424
|
loadDateRangeCategoryTotals: p,
|
|
1424
1425
|
loadMonthlyCategoryTotals: y,
|
|
1425
1426
|
monthlyCategoryTotals: T,
|
|
1426
1427
|
monthlyTotalsLoaded: N
|
|
1427
|
-
} =
|
|
1428
|
+
} = q(), { isTransactionDataLoaded: x, loadTransactionData: L, setFilter: E } = we(), { selectedCategoryData: M, 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;
|
|
1428
1429
|
Ie({
|
|
1429
1430
|
widgetName: "TrendsWidget",
|
|
1430
1431
|
isLoaded: j
|
|
1431
1432
|
});
|
|
1432
|
-
const _e = g.useMemo(() => U ?
|
|
1433
|
+
const _e = g.useMemo(() => U ? ee.getFilteredBeats({ templates: Uo }) : [], [U]);
|
|
1433
1434
|
g.useEffect(() => {
|
|
1434
1435
|
const k = () => me(window.innerHeight);
|
|
1435
1436
|
return window.addEventListener("resize", k), i || f().finally(), _ || h().finally(), x || L().finally(), () => window.removeEventListener("resize", k);
|
|
1436
1437
|
}, []), g.useEffect(() => {
|
|
1437
|
-
Y && i && (
|
|
1438
|
+
Y && i && (ee.loadBeats().finally(() => de(!0)), p(J, v.start, v.end).then(() => {
|
|
1438
1439
|
y(
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1440
|
+
J,
|
|
1441
|
+
v.start,
|
|
1442
|
+
v.end
|
|
1442
1443
|
).finally();
|
|
1443
1444
|
}).finally(() => {
|
|
1444
|
-
|
|
1445
|
+
ne(!0), r(w.TRENDS_LOAD_WIDGET, {
|
|
1445
1446
|
...W,
|
|
1446
|
-
time_period: `${Se(
|
|
1447
|
+
time_period: `${Se(v.end, v.start)}M`
|
|
1447
1448
|
});
|
|
1448
1449
|
}));
|
|
1449
|
-
}, [Y, i,
|
|
1450
|
+
}, [Y, i, J, v]), g.useEffect(() => {
|
|
1450
1451
|
if (T.length !== 0) {
|
|
1451
1452
|
const k = {
|
|
1452
1453
|
accounts: P,
|
|
1453
|
-
dateRange: { start:
|
|
1454
|
+
dateRange: { start: v.start, end: v.end }
|
|
1454
1455
|
};
|
|
1455
|
-
|
|
1456
|
+
E({
|
|
1456
1457
|
...k,
|
|
1457
|
-
custom: (
|
|
1458
|
-
(ge) => ge.top_level_category_guid ===
|
|
1458
|
+
custom: (oe) => !!T.find(
|
|
1459
|
+
(ge) => ge.top_level_category_guid === oe.top_level_category_guid || ge.category_guid === oe.category_guid
|
|
1459
1460
|
)
|
|
1460
1461
|
});
|
|
1461
1462
|
}
|
|
@@ -1463,40 +1464,40 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1463
1464
|
const he = (k) => {
|
|
1464
1465
|
K(k);
|
|
1465
1466
|
}, Me = () => {
|
|
1466
|
-
K(null), r(
|
|
1467
|
+
K(null), r(w.TRENDS_CLICK_BACK, W);
|
|
1467
1468
|
}, Ae = () => {
|
|
1468
|
-
|
|
1469
|
-
},
|
|
1470
|
-
ue(
|
|
1469
|
+
z(!0), r(w.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
1470
|
+
}, Ct = (k, oe) => {
|
|
1471
|
+
ue(oe ?? B), r(w.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
1471
1472
|
...W,
|
|
1472
|
-
toggleView:
|
|
1473
|
+
toggleView: oe
|
|
1473
1474
|
});
|
|
1474
|
-
},
|
|
1475
|
-
const
|
|
1476
|
-
ae({ start:
|
|
1475
|
+
}, _t = (k) => {
|
|
1476
|
+
const oe = et(k?.[0], 1), ge = k?.[1], xt = Se(ge, oe);
|
|
1477
|
+
ae({ start: oe, end: ge }), r(w.TRENDS_CLICK_TIME_WINDOW, {
|
|
1477
1478
|
...W,
|
|
1478
|
-
time_period:
|
|
1479
|
+
time_period: xt + "M"
|
|
1479
1480
|
});
|
|
1480
|
-
},
|
|
1481
|
-
r(
|
|
1481
|
+
}, bt = (k) => {
|
|
1482
|
+
r(w.TRENDS_CLICK_FILTER, {
|
|
1482
1483
|
...W,
|
|
1483
1484
|
filterValue: k
|
|
1484
1485
|
});
|
|
1485
|
-
},
|
|
1486
|
+
}, Tt = (k) => {
|
|
1486
1487
|
le(k);
|
|
1487
|
-
},
|
|
1488
|
-
le(""), r(
|
|
1488
|
+
}, St = () => {
|
|
1489
|
+
le(""), r(w.TRENDS_CLICK_ALL_CATEGORIES, W);
|
|
1489
1490
|
};
|
|
1490
1491
|
if (!Y || !i || !j || !N)
|
|
1491
1492
|
return /* @__PURE__ */ e(Le, {});
|
|
1492
|
-
const
|
|
1493
|
+
const ze = m.length === 0 || T.length === 0, be = Xo(V, Ee, Ae);
|
|
1493
1494
|
return /* @__PURE__ */ C(
|
|
1494
1495
|
ut,
|
|
1495
1496
|
{
|
|
1496
|
-
calendarActions: { onRangeChanged:
|
|
1497
|
-
dateRange:
|
|
1497
|
+
calendarActions: { onRangeChanged: _t },
|
|
1498
|
+
dateRange: v,
|
|
1498
1499
|
dateRangeVariant: u ? "timeframetabs" : "timeframebuttons",
|
|
1499
|
-
onAccountsFilterClick:
|
|
1500
|
+
onAccountsFilterClick: bt,
|
|
1500
1501
|
onBackClick: t,
|
|
1501
1502
|
onMenuClick: n,
|
|
1502
1503
|
sx: o,
|
|
@@ -1517,22 +1518,22 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1517
1518
|
sx: { px: u ? 16 : 0, py: 16 },
|
|
1518
1519
|
children: [
|
|
1519
1520
|
/* @__PURE__ */ e(
|
|
1520
|
-
|
|
1521
|
+
ft,
|
|
1521
1522
|
{
|
|
1522
|
-
selectedCategoryGuid:
|
|
1523
|
-
selectedDateRange:
|
|
1523
|
+
selectedCategoryGuid: se,
|
|
1524
|
+
selectedDateRange: v
|
|
1524
1525
|
}
|
|
1525
1526
|
),
|
|
1526
|
-
/* @__PURE__ */ e(
|
|
1527
|
+
/* @__PURE__ */ e(pt, { onTabChange: Ct, selectedTab: B })
|
|
1527
1528
|
]
|
|
1528
1529
|
}
|
|
1529
1530
|
),
|
|
1530
|
-
/* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(H, { flexGrow: 1, children:
|
|
1531
|
-
/* @__PURE__ */ e(
|
|
1531
|
+
/* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(H, { flexGrow: 1, children: se && /* @__PURE__ */ C(Te, { onClick: St, sx: { p: 0, pr: 5 }, children: [
|
|
1532
|
+
/* @__PURE__ */ e(ro, {}),
|
|
1532
1533
|
V.all_categories
|
|
1533
1534
|
] }) }) }),
|
|
1534
|
-
|
|
1535
|
-
|
|
1535
|
+
ze && /* @__PURE__ */ e(
|
|
1536
|
+
fo,
|
|
1536
1537
|
{
|
|
1537
1538
|
header: be.header,
|
|
1538
1539
|
icon: "multiline_chart",
|
|
@@ -1542,27 +1543,27 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1542
1543
|
sx: { height: l, maxWidth: 432 }
|
|
1543
1544
|
}
|
|
1544
1545
|
),
|
|
1545
|
-
!
|
|
1546
|
+
!ze && /* @__PURE__ */ C(S, { flexDirection: te ? "row" : "column", gap: te ? 48 : 16, children: [
|
|
1546
1547
|
B === "Chart" && /* @__PURE__ */ C(vt, { children: [
|
|
1547
|
-
/* @__PURE__ */ e(H, { sx: { width:
|
|
1548
|
-
|
|
1548
|
+
/* @__PURE__ */ e(H, { sx: { width: te ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
1549
|
+
jo,
|
|
1549
1550
|
{
|
|
1550
1551
|
availableHeight: l,
|
|
1551
1552
|
minHeight: 450,
|
|
1552
|
-
selectedDateRange:
|
|
1553
|
+
selectedDateRange: v,
|
|
1553
1554
|
totals: T
|
|
1554
1555
|
}
|
|
1555
1556
|
) }),
|
|
1556
|
-
/* @__PURE__ */ C(S, { gap: 16, sx: { width:
|
|
1557
|
+
/* @__PURE__ */ C(S, { gap: 16, sx: { width: te ? "32%" : "100%" }, children: [
|
|
1557
1558
|
ie && U && _e.length > 0 && /* @__PURE__ */ e(
|
|
1558
|
-
|
|
1559
|
+
Vo,
|
|
1559
1560
|
{
|
|
1560
1561
|
beats: _e,
|
|
1561
1562
|
onInsightCardClick: s
|
|
1562
1563
|
}
|
|
1563
1564
|
),
|
|
1564
1565
|
/* @__PURE__ */ e(
|
|
1565
|
-
|
|
1566
|
+
Bo,
|
|
1566
1567
|
{
|
|
1567
1568
|
availableHeight: b,
|
|
1568
1569
|
onCategoryClick: he
|
|
@@ -1571,12 +1572,12 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1571
1572
|
] })
|
|
1572
1573
|
] }),
|
|
1573
1574
|
B === "Table" && /* @__PURE__ */ e(H, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1574
|
-
|
|
1575
|
+
yt,
|
|
1575
1576
|
{
|
|
1576
1577
|
height: "unset",
|
|
1577
|
-
onClickRow:
|
|
1578
|
-
selectedCategory:
|
|
1579
|
-
selectedDateRange:
|
|
1578
|
+
onClickRow: Tt,
|
|
1579
|
+
selectedCategory: se,
|
|
1580
|
+
selectedDateRange: v
|
|
1580
1581
|
}
|
|
1581
1582
|
) })
|
|
1582
1583
|
] }),
|
|
@@ -1584,20 +1585,20 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1584
1585
|
Pe,
|
|
1585
1586
|
{
|
|
1586
1587
|
ariaLabelClose: V.close_category_details,
|
|
1587
|
-
isOpen: !!
|
|
1588
|
+
isOpen: !!M,
|
|
1588
1589
|
onClose: Me,
|
|
1589
1590
|
shouldShowHeaderShadow: !0,
|
|
1590
|
-
title:
|
|
1591
|
-
children:
|
|
1591
|
+
title: M?.is_income ? V.category_income : V.category_spending,
|
|
1592
|
+
children: M && /* @__PURE__ */ e(Fo, {})
|
|
1592
1593
|
}
|
|
1593
1594
|
)
|
|
1594
1595
|
]
|
|
1595
1596
|
}
|
|
1596
1597
|
),
|
|
1597
1598
|
/* @__PURE__ */ e(
|
|
1598
|
-
|
|
1599
|
+
yo,
|
|
1599
1600
|
{
|
|
1600
|
-
onClose: () =>
|
|
1601
|
+
onClose: () => z(!1),
|
|
1601
1602
|
showConnectWidget: I,
|
|
1602
1603
|
title: O.mini_title
|
|
1603
1604
|
}
|
|
@@ -1605,10 +1606,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1605
1606
|
]
|
|
1606
1607
|
}
|
|
1607
1608
|
);
|
|
1608
|
-
},
|
|
1609
|
+
}, ls = A(Zo);
|
|
1609
1610
|
export {
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1611
|
+
rs as TrendsFullWidget,
|
|
1612
|
+
is as TrendsMicroWidget,
|
|
1613
|
+
as as TrendsMiniWidget,
|
|
1614
|
+
ls as TrendsWidget
|
|
1614
1615
|
};
|