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