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