@mx-cartographer/experiences 8.0.0-alpha.bb3 → 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 +178 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
- package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
- package/dist/LineChart-KpPw1phO.mjs +580 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
- package/dist/SpendingLegend-CDO060GT.mjs +193 -0
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- 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-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +245 -235
- package/dist/accounts/stores/AccountStore.d.ts +24 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +611 -580
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +187 -180
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
- 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/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +397 -387
- 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 +10 -4
- 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/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +458 -448
- package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3190 -1073
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +302 -291
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +108 -104
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +4 -3
- package/dist/microinsights/index.es.js +101 -14
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/index.es.js +197 -190
- package/dist/notifications/index.es.js +25 -25
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +395 -351
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +307 -298
- package/dist/spending/index.es.js +299 -438
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +115 -112
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +1025 -604
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
package/dist/trends/index.es.js
CHANGED
|
@@ -1,75 +1,450 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { addSeconds as
|
|
9
|
-
import { differenceInCalendarMonths as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { u as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { b as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import Nt from "
|
|
43
|
-
import {
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
|
|
51
|
-
|
|
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
|
+
import { observer as R } from "mobx-react-lite";
|
|
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
|
+
import S from "@mui/material/Stack";
|
|
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);
|
|
61
|
+
return /* @__PURE__ */ y(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
k,
|
|
64
|
+
{
|
|
65
|
+
"aria-label": Tt(n.category_icon_label_aria, s),
|
|
66
|
+
mb: 4,
|
|
67
|
+
role: "img",
|
|
68
|
+
children: /* @__PURE__ */ e(Se, { categoryGuid: r })
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ e(P, { variant: "Body", children: s })
|
|
72
|
+
] });
|
|
73
|
+
}, to = ({
|
|
74
|
+
categoryGuids: { guid: t, topLevelGuid: r },
|
|
75
|
+
hoveredAreaData: n,
|
|
76
|
+
cursorPosition: o,
|
|
77
|
+
chartContainerRef: s
|
|
78
|
+
}) => {
|
|
79
|
+
const h = ce(), g = ut(null), [d, l] = ht({ x: o.x, y: o.y });
|
|
80
|
+
if (gt(() => {
|
|
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: _ });
|
|
87
|
+
})();
|
|
88
|
+
}, [o, s]), !n) return null;
|
|
89
|
+
const m = n.reduce((p, i) => p + i.y, 0);
|
|
90
|
+
return /* @__PURE__ */ e(
|
|
91
|
+
Ue,
|
|
92
|
+
{
|
|
93
|
+
ref: g,
|
|
94
|
+
sx: {
|
|
95
|
+
position: "absolute",
|
|
96
|
+
top: d.y,
|
|
97
|
+
left: d.x,
|
|
98
|
+
width: 250,
|
|
99
|
+
pointerEvents: "none"
|
|
100
|
+
},
|
|
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" })
|
|
106
|
+
] }),
|
|
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 }),
|
|
112
|
+
/* @__PURE__ */ e(
|
|
113
|
+
Te,
|
|
114
|
+
{
|
|
115
|
+
amount: p.y,
|
|
116
|
+
bold: !0,
|
|
117
|
+
formatString: "0,0",
|
|
118
|
+
variant: "Body"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] }) })
|
|
122
|
+
] }, i)) })
|
|
123
|
+
] })
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}, oo = R(to), no = ({
|
|
127
|
+
sx: t,
|
|
128
|
+
categoryGuids: r,
|
|
129
|
+
hoveredLegend: n,
|
|
130
|
+
legendRef: o,
|
|
131
|
+
onHoverLegend: s,
|
|
132
|
+
onClickLegend: h
|
|
133
|
+
}) => {
|
|
134
|
+
const { isMobile: g } = ee(), { getCategoryName: d } = $();
|
|
135
|
+
return /* @__PURE__ */ e(
|
|
136
|
+
S,
|
|
137
|
+
{
|
|
138
|
+
direction: "row",
|
|
139
|
+
flexWrap: "wrap",
|
|
140
|
+
gap: g ? 2 : 6,
|
|
141
|
+
justifyContent: "start",
|
|
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";
|
|
146
|
+
return /* @__PURE__ */ y(
|
|
147
|
+
be,
|
|
148
|
+
{
|
|
149
|
+
onClick: () => h(l),
|
|
150
|
+
onMouseEnter: () => s(l),
|
|
151
|
+
onMouseLeave: () => s(null),
|
|
152
|
+
sx: {
|
|
153
|
+
color: "text.primary",
|
|
154
|
+
fontWeight: "normal",
|
|
155
|
+
display: "flex",
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
alignItems: "center",
|
|
158
|
+
paddingX: 8,
|
|
159
|
+
paddingY: 4,
|
|
160
|
+
borderRadius: 1,
|
|
161
|
+
opacity: p ? 1 : 0.7
|
|
162
|
+
},
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ e(
|
|
165
|
+
k,
|
|
166
|
+
{
|
|
167
|
+
sx: {
|
|
168
|
+
width: 16,
|
|
169
|
+
height: 16,
|
|
170
|
+
marginRight: g ? 5 : 10,
|
|
171
|
+
borderRadius: "2px",
|
|
172
|
+
backgroundColor: n ? p ? c : f : c
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ e(P, { variant: "Body", children: d(l) })
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
l
|
|
180
|
+
);
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
);
|
|
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,
|
|
204
|
+
stackedDatasets: s,
|
|
205
|
+
unstackedDatasets: h = [],
|
|
206
|
+
availableHeight: g = 0,
|
|
207
|
+
minimumHeight: d = 350
|
|
208
|
+
}) => {
|
|
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({
|
|
215
|
+
hoveredSeriesId: null,
|
|
216
|
+
hoveredAreaData: null,
|
|
217
|
+
isAreaHovered: !1,
|
|
218
|
+
cursorPos: { x: 0, y: 0 }
|
|
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) => ({
|
|
224
|
+
id: `stacked-${T}`,
|
|
225
|
+
guid: a.category_guid,
|
|
226
|
+
top_level_guid: a.top_level_category_guid,
|
|
227
|
+
area: !0,
|
|
228
|
+
color: s[T].category_color ?? l.palette.primary.main,
|
|
229
|
+
data: a.dataset.map((E) => E.y),
|
|
230
|
+
label: s[T].category_name,
|
|
231
|
+
stack: "total",
|
|
232
|
+
type: "line",
|
|
233
|
+
highlightScope: { highlight: "item" },
|
|
234
|
+
valueFormatter: (E) => se(E, "0,0")
|
|
235
|
+
})), ae = h.map((a, T) => ({
|
|
236
|
+
id: `unstacked-${T}`,
|
|
237
|
+
guid: a.category_guid,
|
|
238
|
+
top_level_guid: a.top_level_category_guid,
|
|
239
|
+
area: !1,
|
|
240
|
+
color: a.category_color,
|
|
241
|
+
data: a.dataset.map((E) => E.y),
|
|
242
|
+
label: a.category_name,
|
|
243
|
+
type: "line",
|
|
244
|
+
valueFormatter: (E) => se(E, "0,0")
|
|
245
|
+
})), Q = [...K, ...ae], ie = [
|
|
246
|
+
...K.map(({ guid: a, top_level_guid: T }) => ({
|
|
247
|
+
guid: a,
|
|
248
|
+
top_level_guid: T
|
|
249
|
+
})),
|
|
250
|
+
...ae.map(({ guid: a, top_level_guid: T }) => ({
|
|
251
|
+
guid: a,
|
|
252
|
+
top_level_guid: T
|
|
253
|
+
}))
|
|
254
|
+
], q = (a) => {
|
|
255
|
+
const E = a.startsWith("stacked-") ? s[parseInt(a.split("-")[1])] : h[parseInt(a.split("-")[1])];
|
|
256
|
+
return {
|
|
257
|
+
guid: E?.category_guid,
|
|
258
|
+
topLevelGuid: E?.top_level_category_guid
|
|
259
|
+
};
|
|
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({
|
|
271
|
+
hoveredSeriesId: T,
|
|
272
|
+
hoveredAreaData: null,
|
|
273
|
+
isAreaHovered: !1,
|
|
274
|
+
cursorPos: A
|
|
275
|
+
}), r?.(E);
|
|
276
|
+
else if (Ee) {
|
|
277
|
+
const ue = j?.data.map((De, Me) => ({
|
|
278
|
+
x: X[Me],
|
|
279
|
+
y: De
|
|
280
|
+
})) ?? [];
|
|
281
|
+
v({
|
|
282
|
+
hoveredSeriesId: T,
|
|
283
|
+
hoveredAreaData: ue,
|
|
284
|
+
isAreaHovered: !0,
|
|
285
|
+
cursorPos: A
|
|
286
|
+
}), t?.(E);
|
|
287
|
+
} else
|
|
288
|
+
v({
|
|
289
|
+
hoveredSeriesId: null,
|
|
290
|
+
hoveredAreaData: null,
|
|
291
|
+
isAreaHovered: !1,
|
|
292
|
+
cursorPos: A
|
|
293
|
+
});
|
|
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,
|
|
300
|
+
cursorPos: {
|
|
301
|
+
x: a.clientX - T.left,
|
|
302
|
+
y: a.clientY - T.top
|
|
303
|
+
}
|
|
304
|
+
}));
|
|
305
|
+
}, Ie = {
|
|
306
|
+
p: 4,
|
|
307
|
+
"& .MuiBarLabel-root": {
|
|
308
|
+
fontSize: 10,
|
|
309
|
+
fontWeight: 600
|
|
310
|
+
},
|
|
311
|
+
"& .MuiAreaElement-root": {
|
|
312
|
+
opacity: 0.4,
|
|
313
|
+
transition: "opacity 0.3s ease"
|
|
314
|
+
},
|
|
315
|
+
"& .MuiAreaElement-root:hover": {
|
|
316
|
+
opacity: 1
|
|
317
|
+
},
|
|
318
|
+
'& [class*="MuiLineElement-series-unstacked-"]': {
|
|
319
|
+
strokeWidth: 3
|
|
320
|
+
},
|
|
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;
|
|
326
|
+
}, {})
|
|
327
|
+
};
|
|
328
|
+
return /* @__PURE__ */ e(
|
|
329
|
+
k,
|
|
330
|
+
{
|
|
331
|
+
onMouseMove: ye,
|
|
332
|
+
ref: b,
|
|
333
|
+
sx: {
|
|
334
|
+
position: "relative",
|
|
335
|
+
touchAction: "pan-y",
|
|
336
|
+
"& svg": {
|
|
337
|
+
touchAction: "pan-y",
|
|
338
|
+
userSelect: "none"
|
|
339
|
+
},
|
|
340
|
+
"& .recharts-wrapper": {
|
|
341
|
+
touchAction: "pan-y"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
children: /* @__PURE__ */ y(
|
|
345
|
+
S,
|
|
346
|
+
{
|
|
347
|
+
direction: { xs: "column", md: "column" },
|
|
348
|
+
spacing: { xs: 0, md: 4 },
|
|
349
|
+
sx: { width: "100%", position: "relative" },
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ e(
|
|
352
|
+
yt,
|
|
353
|
+
{
|
|
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,
|
|
360
|
+
skipAnimation: !0,
|
|
361
|
+
slotProps: {
|
|
362
|
+
tooltip: { trigger: W ? "item" : "none" }
|
|
363
|
+
},
|
|
364
|
+
slots: {
|
|
365
|
+
tooltip: W && D ? (a) => /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(
|
|
366
|
+
so,
|
|
367
|
+
{
|
|
368
|
+
...a,
|
|
369
|
+
categoryGuids: q(D),
|
|
370
|
+
series: Q,
|
|
371
|
+
xData: X
|
|
372
|
+
}
|
|
373
|
+
) }) : void 0
|
|
374
|
+
},
|
|
375
|
+
sx: Ie,
|
|
376
|
+
xAxis: [
|
|
377
|
+
{
|
|
378
|
+
data: X,
|
|
379
|
+
scaleType: "time",
|
|
380
|
+
valueFormatter: (a) => U(a, G.MONTH_SHORT_YEAR),
|
|
381
|
+
tickNumber: z
|
|
382
|
+
// How many ticks to show on the x-axis
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
yAxis: [
|
|
386
|
+
{
|
|
387
|
+
min: le,
|
|
388
|
+
max: ne || 100,
|
|
389
|
+
valueFormatter: (a) => pt(a).format("0a")
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
),
|
|
394
|
+
/* @__PURE__ */ e(
|
|
395
|
+
no,
|
|
396
|
+
{
|
|
397
|
+
categoryGuids: ie,
|
|
398
|
+
hoveredLegend: C,
|
|
399
|
+
legendRef: p,
|
|
400
|
+
onClickLegend: O,
|
|
401
|
+
onHoverLegend: w,
|
|
402
|
+
sx: { px: m ? 0 : 24 }
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
te && /* @__PURE__ */ e(
|
|
406
|
+
oo,
|
|
407
|
+
{
|
|
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)
|
|
414
|
+
}))
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
}, rt = ({ selectedTab: t, onTabChange: r }) => /* @__PURE__ */ e(
|
|
423
|
+
At,
|
|
52
424
|
{
|
|
53
425
|
exclusive: !0,
|
|
54
|
-
onChange:
|
|
426
|
+
onChange: r,
|
|
55
427
|
orientation: "horizontal",
|
|
56
428
|
value: t,
|
|
57
|
-
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(
|
|
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))
|
|
58
430
|
}
|
|
59
|
-
),
|
|
60
|
-
const { trends: n } =
|
|
61
|
-
const
|
|
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(
|
|
62
434
|
t.start,
|
|
63
|
-
|
|
64
|
-
)
|
|
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(
|
|
65
440
|
t.end,
|
|
66
|
-
|
|
441
|
+
o ? G.MONTH_SHORT_YEAR : G.MONTH_YEAR
|
|
67
442
|
);
|
|
68
|
-
return `${
|
|
69
|
-
}, [t,
|
|
70
|
-
return /* @__PURE__ */
|
|
443
|
+
return `${d} - ${l}`;
|
|
444
|
+
}, [t, o]);
|
|
445
|
+
return /* @__PURE__ */ y(k, { sx: { mr: 10, minWidth: "60%" }, children: [
|
|
71
446
|
/* @__PURE__ */ e(
|
|
72
|
-
|
|
447
|
+
P,
|
|
73
448
|
{
|
|
74
449
|
display: "block",
|
|
75
450
|
fontWeight: 700,
|
|
@@ -78,272 +453,309 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
78
453
|
overflow: "visible",
|
|
79
454
|
textOverflow: "unset"
|
|
80
455
|
},
|
|
81
|
-
variant:
|
|
82
|
-
children:
|
|
456
|
+
variant: s ? "H3" : "Body",
|
|
457
|
+
children: h(r) || n.sub_title
|
|
83
458
|
}
|
|
84
459
|
),
|
|
85
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e(P, { variant: s ? "subtitle1" : "body2", children: g })
|
|
86
461
|
] });
|
|
87
|
-
},
|
|
88
|
-
const o = t.row[t.field];
|
|
89
|
-
return /* @__PURE__ */ e(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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);
|
|
476
|
+
return /* @__PURE__ */ y(S, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
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 })
|
|
102
479
|
] });
|
|
103
|
-
},
|
|
104
|
-
|
|
480
|
+
}, io = (t) => /* @__PURE__ */ e(S, { alignItems: "center", direction: "row", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
|
|
481
|
+
ao,
|
|
105
482
|
{
|
|
106
483
|
categoryGuid: t.row.category,
|
|
107
484
|
topLevelCategoryGuid: t.row.top_level_category_guid
|
|
108
485
|
}
|
|
109
|
-
) }),
|
|
110
|
-
const n = [],
|
|
111
|
-
for (;
|
|
112
|
-
const
|
|
113
|
-
n.push(
|
|
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);
|
|
114
491
|
}
|
|
115
492
|
return n;
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
sx: l = {}
|
|
493
|
+
}, it = ({
|
|
494
|
+
selectedDateRange: t,
|
|
495
|
+
selectedCategory: r,
|
|
496
|
+
onClickRow: n,
|
|
497
|
+
height: o = "100%",
|
|
498
|
+
sx: s = {}
|
|
123
499
|
}) => {
|
|
124
|
-
const { onEvent: d } = H(),
|
|
125
|
-
{ field: h, sort: "desc" }
|
|
126
|
-
]), f = i.useMemo(() => jt(o.start, o.end), [o]), g = [
|
|
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 = [
|
|
127
501
|
{
|
|
128
502
|
field: "category",
|
|
129
503
|
flex: 1,
|
|
130
|
-
|
|
504
|
+
headerClassName: "trends-table-header",
|
|
505
|
+
headerName: d.category_title,
|
|
131
506
|
minWidth: 175,
|
|
132
|
-
renderHeader:
|
|
133
|
-
renderCell:
|
|
507
|
+
renderHeader: ke,
|
|
508
|
+
renderCell: io,
|
|
134
509
|
sortable: !0,
|
|
510
|
+
sortComparator: vt,
|
|
135
511
|
type: "string"
|
|
136
512
|
},
|
|
137
|
-
...
|
|
138
|
-
(
|
|
139
|
-
field:
|
|
513
|
+
...p.map(
|
|
514
|
+
(C) => ({
|
|
515
|
+
field: C,
|
|
140
516
|
flex: 1,
|
|
141
|
-
|
|
517
|
+
headerClassName: "trends-table-header",
|
|
518
|
+
headerName: C,
|
|
142
519
|
minWidth: 100,
|
|
143
|
-
renderHeader:
|
|
144
|
-
renderCell:
|
|
520
|
+
renderHeader: ke,
|
|
521
|
+
renderCell: $e,
|
|
145
522
|
align: "right",
|
|
146
523
|
headerAlign: "right",
|
|
147
524
|
sortable: !0,
|
|
148
525
|
hideSortIcons: !1,
|
|
149
526
|
type: "number",
|
|
150
|
-
sortComparator:
|
|
527
|
+
sortComparator: Ve
|
|
151
528
|
})
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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,
|
|
176
576
|
{
|
|
177
|
-
columns:
|
|
577
|
+
columns: b,
|
|
178
578
|
disableColumnFilter: !0,
|
|
179
579
|
disableColumnMenu: !0,
|
|
180
580
|
hideFooter: !0,
|
|
181
|
-
initialState: { sorting: { sortModel:
|
|
182
|
-
onRowClick: (
|
|
183
|
-
|
|
184
|
-
...
|
|
185
|
-
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]
|
|
186
586
|
});
|
|
187
587
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
rows: T,
|
|
588
|
+
rowHeight: 64,
|
|
589
|
+
rows: f,
|
|
192
590
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
}
|
|
195
605
|
}
|
|
196
606
|
) });
|
|
197
|
-
},
|
|
607
|
+
}, lo = {
|
|
198
608
|
title: "Transaction List"
|
|
199
|
-
},
|
|
609
|
+
}, uo = ({
|
|
200
610
|
categoryGuid: t,
|
|
201
|
-
dateRange:
|
|
611
|
+
dateRange: r,
|
|
202
612
|
isOpen: n,
|
|
203
|
-
onClose:
|
|
613
|
+
onClose: o
|
|
204
614
|
}) => {
|
|
205
|
-
const { onEvent:
|
|
206
|
-
() =>
|
|
207
|
-
[
|
|
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]
|
|
208
618
|
);
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
accounts:
|
|
212
|
-
dateRange:
|
|
213
|
-
custom: (
|
|
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,
|
|
214
624
|
showSplits: !!t
|
|
215
625
|
});
|
|
216
|
-
}, [
|
|
217
|
-
const
|
|
218
|
-
|
|
626
|
+
}, [h, t, r]), u.useEffect(() => s(I.TRENDS_VIEW_TRANSACTIONS), []);
|
|
627
|
+
const b = () => {
|
|
628
|
+
p(""), o();
|
|
219
629
|
};
|
|
220
|
-
return /* @__PURE__ */
|
|
221
|
-
|
|
630
|
+
return /* @__PURE__ */ y(
|
|
631
|
+
Ne,
|
|
222
632
|
{
|
|
223
|
-
ariaLabelClose:
|
|
633
|
+
ariaLabelClose: g.close_aria,
|
|
224
634
|
isOpen: n,
|
|
225
|
-
onClose:
|
|
226
|
-
title:
|
|
635
|
+
onClose: b,
|
|
636
|
+
title: lo.title,
|
|
227
637
|
children: [
|
|
228
|
-
|
|
229
|
-
!
|
|
638
|
+
i && /* @__PURE__ */ e(tt, { transaction: i }),
|
|
639
|
+
!i && /* @__PURE__ */ e(ot, { onClick: p })
|
|
230
640
|
]
|
|
231
641
|
}
|
|
232
642
|
);
|
|
233
|
-
},
|
|
234
|
-
const { onEvent: n } =
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
|
245
658
|
).finally(() => {
|
|
246
659
|
D(!0);
|
|
247
660
|
});
|
|
248
|
-
}, [
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
),
|
|
256
|
-
(
|
|
257
|
-
) :
|
|
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);
|
|
258
671
|
return {
|
|
259
|
-
stackedDatasets:
|
|
260
|
-
unstackedDatasets:
|
|
672
|
+
stackedDatasets: O.filter(Lt),
|
|
673
|
+
unstackedDatasets: O.filter(Et)
|
|
261
674
|
};
|
|
262
|
-
}, [
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
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"
|
|
268
681
|
});
|
|
269
|
-
},
|
|
270
|
-
n(
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
n(
|
|
277
|
-
},
|
|
278
|
-
n(
|
|
279
|
-
},
|
|
280
|
-
n(
|
|
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 });
|
|
281
694
|
};
|
|
282
|
-
return !
|
|
283
|
-
|
|
695
|
+
return !c || !f || !v ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ y(
|
|
696
|
+
et,
|
|
284
697
|
{
|
|
285
|
-
accountOptions:
|
|
286
|
-
calendarActions: { onRangeChanged:
|
|
287
|
-
dateRange:
|
|
698
|
+
accountOptions: g,
|
|
699
|
+
calendarActions: { onRangeChanged: le },
|
|
700
|
+
dateRange: i,
|
|
288
701
|
dateRangeVariant: "timeframebuttons",
|
|
289
|
-
onAccountsFilterClick:
|
|
702
|
+
onAccountsFilterClick: ne,
|
|
290
703
|
onBackClick: t,
|
|
291
|
-
sx:
|
|
292
|
-
title:
|
|
704
|
+
sx: r,
|
|
705
|
+
title: x.title,
|
|
293
706
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
|
|
707
|
+
/* @__PURE__ */ y(
|
|
708
|
+
S,
|
|
296
709
|
{
|
|
297
710
|
sx: {
|
|
298
711
|
// eslint-disable-next-line no-nested-ternary
|
|
299
|
-
px:
|
|
712
|
+
px: o ? 48 : s ? 24 : 12
|
|
300
713
|
},
|
|
301
714
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
|
|
715
|
+
/* @__PURE__ */ y(
|
|
716
|
+
S,
|
|
304
717
|
{
|
|
305
718
|
flexDirection: "row",
|
|
306
719
|
justifyContent: "space-between",
|
|
307
|
-
sx: { pb:
|
|
720
|
+
sx: { pb: h ? 12 : 24, pt: h ? 24 : 48 },
|
|
308
721
|
children: [
|
|
309
722
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
723
|
+
at,
|
|
311
724
|
{
|
|
312
|
-
selectedCategoryGuid:
|
|
313
|
-
selectedDateRange:
|
|
725
|
+
selectedCategoryGuid: W,
|
|
726
|
+
selectedDateRange: i
|
|
314
727
|
}
|
|
315
728
|
),
|
|
316
|
-
/* @__PURE__ */ e(
|
|
729
|
+
/* @__PURE__ */ e(rt, { onTabChange: Z, selectedTab: A })
|
|
317
730
|
]
|
|
318
731
|
}
|
|
319
732
|
),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */ e(
|
|
322
|
-
/* @__PURE__ */ e(
|
|
323
|
-
|
|
733
|
+
/* @__PURE__ */ y(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
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
|
|
324
737
|
] }) }),
|
|
325
|
-
/* @__PURE__ */ e(
|
|
738
|
+
/* @__PURE__ */ e(be, { onClick: () => L(!0), sx: { px: 5 }, children: `${x.view_transactions} (${p.length})` })
|
|
326
739
|
] }),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
|
|
329
|
-
|
|
740
|
+
/* @__PURE__ */ y(k, { children: [
|
|
741
|
+
A === "Chart" && /* @__PURE__ */ e(
|
|
742
|
+
ro,
|
|
330
743
|
{
|
|
331
|
-
availableHeight:
|
|
332
|
-
onClickLegend:
|
|
333
|
-
onHoverArea:
|
|
334
|
-
onHoverLegend:
|
|
335
|
-
onHoverPoint:
|
|
336
|
-
stackedDatasets:
|
|
337
|
-
unstackedDatasets:
|
|
744
|
+
availableHeight: oe,
|
|
745
|
+
onClickLegend: ae,
|
|
746
|
+
onHoverArea: ie,
|
|
747
|
+
onHoverLegend: Q,
|
|
748
|
+
onHoverPoint: q,
|
|
749
|
+
stackedDatasets: re.stackedDatasets,
|
|
750
|
+
unstackedDatasets: re.unstackedDatasets
|
|
338
751
|
}
|
|
339
752
|
),
|
|
340
|
-
|
|
341
|
-
|
|
753
|
+
A === "Table" && /* @__PURE__ */ e(
|
|
754
|
+
it,
|
|
342
755
|
{
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
selectedDateRange: g
|
|
756
|
+
onClickRow: K,
|
|
757
|
+
selectedCategory: W,
|
|
758
|
+
selectedDateRange: i
|
|
347
759
|
}
|
|
348
760
|
)
|
|
349
761
|
] })
|
|
@@ -351,27 +763,27 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
351
763
|
}
|
|
352
764
|
),
|
|
353
765
|
/* @__PURE__ */ e(
|
|
354
|
-
|
|
766
|
+
ho,
|
|
355
767
|
{
|
|
356
|
-
categoryGuid:
|
|
357
|
-
dateRange:
|
|
358
|
-
isOpen:
|
|
359
|
-
onClose: () =>
|
|
768
|
+
categoryGuid: W,
|
|
769
|
+
dateRange: i,
|
|
770
|
+
isOpen: M,
|
|
771
|
+
onClose: () => L(!1)
|
|
360
772
|
}
|
|
361
773
|
)
|
|
362
774
|
]
|
|
363
775
|
}
|
|
364
776
|
);
|
|
365
|
-
},
|
|
366
|
-
const t =
|
|
777
|
+
}, Nn = R(go), mo = () => {
|
|
778
|
+
const { monthlyCategoryTotals: t } = $(), { trends: r } = H(), n = ce(), { availableHeight: o = 300 } = Ze(), s = Dt(t);
|
|
367
779
|
return /* @__PURE__ */ e(
|
|
368
|
-
|
|
780
|
+
Oe,
|
|
369
781
|
{
|
|
370
782
|
baseline: "min",
|
|
371
|
-
colors: [
|
|
783
|
+
colors: [n.palette.primary.main],
|
|
372
784
|
datasets: [s],
|
|
373
|
-
height:
|
|
374
|
-
labels: [
|
|
785
|
+
height: o,
|
|
786
|
+
labels: [r.spending_label],
|
|
375
787
|
showArea: !0,
|
|
376
788
|
showAverage: !0,
|
|
377
789
|
showLegend: !0,
|
|
@@ -380,37 +792,41 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
380
792
|
valueFormatterString: "0,0"
|
|
381
793
|
}
|
|
382
794
|
);
|
|
383
|
-
},
|
|
384
|
-
const { visibleAccounts: n } =
|
|
385
|
-
return
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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,
|
|
391
806
|
{
|
|
807
|
+
contentStyles: { height: "calc(100% - 72px)", ":last-child": { pb: 0 } },
|
|
392
808
|
onPrimaryCtaClick: t,
|
|
393
|
-
primaryCtaLabel:
|
|
394
|
-
subTitle:
|
|
395
|
-
sx:
|
|
396
|
-
title:
|
|
397
|
-
children:
|
|
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, {})
|
|
398
814
|
}
|
|
399
815
|
);
|
|
400
|
-
},
|
|
816
|
+
}, Wn = R(Co), fo = 70, ze = ({
|
|
401
817
|
title: t,
|
|
402
|
-
totalAmount:
|
|
818
|
+
totalAmount: r,
|
|
403
819
|
transactionType: n,
|
|
404
|
-
percentage:
|
|
405
|
-
secondaryLabel:
|
|
406
|
-
shouldDisplayPercentage:
|
|
820
|
+
percentage: o,
|
|
821
|
+
secondaryLabel: s,
|
|
822
|
+
shouldDisplayPercentage: h
|
|
407
823
|
}) => {
|
|
408
|
-
const { availableWidth:
|
|
824
|
+
const { availableWidth: g } = Ze(), d = u.useRef(null), l = u.useRef(null), m = xt(Number(Math.abs(o)), {
|
|
409
825
|
style: "percent",
|
|
410
826
|
minimumIntegerDigits: 1
|
|
411
|
-
}),
|
|
412
|
-
return /* @__PURE__ */
|
|
413
|
-
|
|
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;
|
|
828
|
+
return /* @__PURE__ */ y(
|
|
829
|
+
S,
|
|
414
830
|
{
|
|
415
831
|
sx: {
|
|
416
832
|
border: 1,
|
|
@@ -422,8 +838,8 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
422
838
|
py: 8
|
|
423
839
|
},
|
|
424
840
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
|
|
841
|
+
/* @__PURE__ */ y(
|
|
842
|
+
S,
|
|
427
843
|
{
|
|
428
844
|
sx: {
|
|
429
845
|
alignItems: "center",
|
|
@@ -431,28 +847,28 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
431
847
|
justifyContent: "space-between"
|
|
432
848
|
},
|
|
433
849
|
children: [
|
|
434
|
-
/* @__PURE__ */ e(
|
|
435
|
-
|
|
436
|
-
|
|
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 } }),
|
|
437
853
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
854
|
+
ge,
|
|
439
855
|
{
|
|
440
856
|
sx: {
|
|
441
|
-
color:
|
|
857
|
+
color: i ? b : c,
|
|
442
858
|
fontWeight: 600
|
|
443
859
|
},
|
|
444
860
|
variant: "body2",
|
|
445
|
-
children:
|
|
861
|
+
children: m
|
|
446
862
|
}
|
|
447
863
|
)
|
|
448
864
|
] })
|
|
449
865
|
]
|
|
450
866
|
}
|
|
451
867
|
),
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
|
|
868
|
+
/* @__PURE__ */ y(
|
|
869
|
+
S,
|
|
454
870
|
{
|
|
455
|
-
ref:
|
|
871
|
+
ref: l,
|
|
456
872
|
sx: {
|
|
457
873
|
alignItems: "center",
|
|
458
874
|
flexDirection: "row",
|
|
@@ -460,19 +876,19 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
460
876
|
},
|
|
461
877
|
children: [
|
|
462
878
|
/* @__PURE__ */ e(
|
|
463
|
-
|
|
879
|
+
k,
|
|
464
880
|
{
|
|
465
|
-
ref:
|
|
881
|
+
ref: d,
|
|
466
882
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
467
|
-
children: /* @__PURE__ */ e(
|
|
883
|
+
children: /* @__PURE__ */ e(Ye, { children: p })
|
|
468
884
|
}
|
|
469
885
|
),
|
|
470
|
-
|
|
471
|
-
|
|
886
|
+
h && g >= 450 && !_ && /* @__PURE__ */ e(
|
|
887
|
+
ge,
|
|
472
888
|
{
|
|
473
|
-
color:
|
|
889
|
+
color: i ? b : c,
|
|
474
890
|
variant: "caption",
|
|
475
|
-
children:
|
|
891
|
+
children: s
|
|
476
892
|
}
|
|
477
893
|
)
|
|
478
894
|
]
|
|
@@ -481,50 +897,53 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
481
897
|
]
|
|
482
898
|
}
|
|
483
899
|
);
|
|
484
|
-
},
|
|
485
|
-
const { trends: t } =
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */ e(
|
|
490
|
-
/* @__PURE__ */ e(
|
|
900
|
+
}, yo = R(() => {
|
|
901
|
+
const { trends: t } = H();
|
|
902
|
+
return /* @__PURE__ */ y(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
903
|
+
/* @__PURE__ */ e(Gt, { size: 32 }),
|
|
904
|
+
/* @__PURE__ */ y(S, { children: [
|
|
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 })
|
|
491
907
|
] })
|
|
492
908
|
] });
|
|
493
|
-
}),
|
|
494
|
-
const { visibleAccounts:
|
|
495
|
-
start:
|
|
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),
|
|
496
912
|
end: /* @__PURE__ */ new Date()
|
|
497
|
-
}, { trends:
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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"
|
|
504
923
|
});
|
|
505
924
|
});
|
|
506
|
-
}, [
|
|
507
|
-
const { spendingData:
|
|
925
|
+
}, [p, l]);
|
|
926
|
+
const { spendingData: i, incomeData: b } = u.useMemo(
|
|
508
927
|
() => ({
|
|
509
|
-
spendingData:
|
|
510
|
-
incomeData:
|
|
928
|
+
spendingData: qe(o, g),
|
|
929
|
+
incomeData: Je(o, g)
|
|
511
930
|
}),
|
|
512
|
-
[
|
|
513
|
-
), [
|
|
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 = () => {
|
|
514
933
|
n(
|
|
515
|
-
D ?
|
|
934
|
+
D ? I.TRENDS_CLICK_GET_STARTED : I.TRENDS_CLICK_VIEW_MORE
|
|
516
935
|
), t();
|
|
517
936
|
};
|
|
518
|
-
return !
|
|
519
|
-
|
|
937
|
+
return !h || !p ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(
|
|
938
|
+
Ft,
|
|
520
939
|
{
|
|
521
940
|
className: "mx-trends-microwidget",
|
|
522
|
-
ctaLabel:
|
|
523
|
-
onCTAClick:
|
|
524
|
-
subHeader: D ? void 0 :
|
|
525
|
-
title:
|
|
526
|
-
children: D ? /* @__PURE__ */ e(
|
|
527
|
-
|
|
941
|
+
ctaLabel: d.micro_primary_cta_label,
|
|
942
|
+
onCTAClick: M,
|
|
943
|
+
subHeader: D ? void 0 : d.micro_subheader,
|
|
944
|
+
title: d.title,
|
|
945
|
+
children: D ? /* @__PURE__ */ e(yo, {}) : /* @__PURE__ */ y(
|
|
946
|
+
S,
|
|
528
947
|
{
|
|
529
948
|
sx: {
|
|
530
949
|
alignItems: "stretch",
|
|
@@ -533,24 +952,24 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
533
952
|
},
|
|
534
953
|
children: [
|
|
535
954
|
/* @__PURE__ */ e(
|
|
536
|
-
|
|
955
|
+
ze,
|
|
537
956
|
{
|
|
538
|
-
percentage:
|
|
539
|
-
secondaryLabel:
|
|
540
|
-
shouldDisplayPercentage:
|
|
541
|
-
title:
|
|
542
|
-
totalAmount:
|
|
957
|
+
percentage: x,
|
|
958
|
+
secondaryLabel: d.micro_secondary_label,
|
|
959
|
+
shouldDisplayPercentage: f.y !== 0 && c.y !== 0,
|
|
960
|
+
title: d.spending_label,
|
|
961
|
+
totalAmount: f.y,
|
|
543
962
|
transactionType: "spending"
|
|
544
963
|
}
|
|
545
964
|
),
|
|
546
965
|
/* @__PURE__ */ e(
|
|
547
|
-
|
|
966
|
+
ze,
|
|
548
967
|
{
|
|
549
|
-
percentage:
|
|
550
|
-
secondaryLabel:
|
|
551
|
-
shouldDisplayPercentage:
|
|
552
|
-
title:
|
|
553
|
-
totalAmount:
|
|
968
|
+
percentage: v,
|
|
969
|
+
secondaryLabel: d.micro_secondary_label,
|
|
970
|
+
shouldDisplayPercentage: _.y !== 0 && C.y !== 0,
|
|
971
|
+
title: d.income_label,
|
|
972
|
+
totalAmount: _.y,
|
|
554
973
|
transactionType: "income"
|
|
555
974
|
}
|
|
556
975
|
)
|
|
@@ -559,17 +978,17 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
559
978
|
)
|
|
560
979
|
}
|
|
561
980
|
);
|
|
562
|
-
}),
|
|
563
|
-
({ isExpanded: t, onClick:
|
|
564
|
-
const n =
|
|
565
|
-
return /* @__PURE__ */ e(
|
|
566
|
-
|
|
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(
|
|
985
|
+
S,
|
|
567
986
|
{
|
|
568
987
|
sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
569
988
|
children: [
|
|
570
|
-
/* @__PURE__ */ e(
|
|
571
|
-
/* @__PURE__ */ e(
|
|
572
|
-
|
|
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,
|
|
573
992
|
{
|
|
574
993
|
sx: {
|
|
575
994
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -581,129 +1000,128 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
581
1000
|
}
|
|
582
1001
|
) }) });
|
|
583
1002
|
}
|
|
584
|
-
),
|
|
1003
|
+
), Ke = R(
|
|
585
1004
|
({
|
|
586
1005
|
totalAmount: t,
|
|
587
|
-
guid:
|
|
1006
|
+
guid: r,
|
|
588
1007
|
name: n,
|
|
589
|
-
transactions:
|
|
590
|
-
onClick:
|
|
591
|
-
isLastItem:
|
|
592
|
-
showDivider:
|
|
1008
|
+
transactions: o,
|
|
1009
|
+
onClick: s,
|
|
1010
|
+
isLastItem: h = !1,
|
|
1011
|
+
showDivider: g = !0
|
|
593
1012
|
}) => {
|
|
594
|
-
const { trends:
|
|
595
|
-
|
|
596
|
-
...
|
|
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,
|
|
597
1016
|
listItem: n
|
|
598
1017
|
});
|
|
599
1018
|
};
|
|
600
|
-
return /* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ y(u.Fragment, { children: [
|
|
601
1020
|
/* @__PURE__ */ e(
|
|
602
|
-
|
|
1021
|
+
Qe,
|
|
603
1022
|
{
|
|
604
|
-
leftIcon:
|
|
605
|
-
onClick:
|
|
606
|
-
rightContent:
|
|
607
|
-
rightIcon:
|
|
608
|
-
subtitle:
|
|
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,
|
|
609
1028
|
title: n
|
|
610
1029
|
}
|
|
611
1030
|
),
|
|
612
|
-
|
|
613
|
-
] },
|
|
1031
|
+
g && /* @__PURE__ */ e(He, { sx: { ml: h ? 24 : 68 } })
|
|
1032
|
+
] }, r);
|
|
614
1033
|
}
|
|
615
|
-
),
|
|
616
|
-
({ availableHeight: t = 0, onCategoryClick:
|
|
617
|
-
const { collapsedCategories: n, visibleCategories:
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
|
|
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));
|
|
621
1040
|
}, [t]);
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
...
|
|
1041
|
+
const b = () => {
|
|
1042
|
+
p(!m), l(I.TRENDS_CLICK_VIEW_MORE, {
|
|
1043
|
+
...B
|
|
625
1044
|
});
|
|
626
|
-
},
|
|
627
|
-
return /* @__PURE__ */ e(
|
|
628
|
-
/* @__PURE__ */ e(
|
|
629
|
-
|
|
630
|
-
|
|
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,
|
|
631
1050
|
{
|
|
632
|
-
...
|
|
633
|
-
isLastItem:
|
|
634
|
-
onClick:
|
|
1051
|
+
...f,
|
|
1052
|
+
isLastItem: C === c - 1,
|
|
1053
|
+
onClick: f.transactions.length > 0 ? () => r(f) : void 0,
|
|
635
1054
|
showDivider: !0
|
|
636
1055
|
},
|
|
637
|
-
|
|
1056
|
+
f.guid
|
|
638
1057
|
)),
|
|
639
1058
|
/* @__PURE__ */ e(
|
|
640
|
-
|
|
1059
|
+
Pt,
|
|
641
1060
|
{
|
|
642
|
-
in:
|
|
1061
|
+
in: m,
|
|
643
1062
|
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
644
|
-
children: n.map((
|
|
645
|
-
const
|
|
1063
|
+
children: n.map((f, C) => {
|
|
1064
|
+
const _ = o.length + C;
|
|
646
1065
|
return /* @__PURE__ */ e(
|
|
647
|
-
|
|
1066
|
+
Ke,
|
|
648
1067
|
{
|
|
649
|
-
...
|
|
650
|
-
isLastItem:
|
|
651
|
-
onClick:
|
|
1068
|
+
...f,
|
|
1069
|
+
isLastItem: _ === c - 1,
|
|
1070
|
+
onClick: f.transactions.length > 0 ? () => r(f) : void 0,
|
|
652
1071
|
showDivider: !0
|
|
653
1072
|
},
|
|
654
|
-
|
|
1073
|
+
f.guid
|
|
655
1074
|
);
|
|
656
1075
|
})
|
|
657
1076
|
}
|
|
658
1077
|
),
|
|
659
|
-
n.length > 0 && /* @__PURE__ */ e(
|
|
1078
|
+
n.length > 0 && /* @__PURE__ */ e(_o, { isExpanded: m, onClick: b })
|
|
660
1079
|
] }) });
|
|
661
1080
|
}
|
|
662
|
-
),
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
},
|
|
666
|
-
return /* @__PURE__ */ e(
|
|
667
|
-
|
|
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,
|
|
668
1087
|
{
|
|
669
|
-
areBeatsLoading:
|
|
1088
|
+
areBeatsLoading: g.isLoading,
|
|
670
1089
|
beats: t,
|
|
671
|
-
endpoint:
|
|
672
|
-
heightOverrides:
|
|
673
|
-
logOutUser:
|
|
674
|
-
onCardClick:
|
|
1090
|
+
endpoint: d,
|
|
1091
|
+
heightOverrides: x,
|
|
1092
|
+
logOutUser: i,
|
|
1093
|
+
onCardClick: b,
|
|
675
1094
|
showBorder: !0,
|
|
676
1095
|
showCTAColocatedWithText: !1,
|
|
677
1096
|
showCarouselControls: !0,
|
|
678
|
-
showHeader:
|
|
1097
|
+
showHeader: m,
|
|
679
1098
|
showIcon: !0,
|
|
680
1099
|
showWithMargin: !1,
|
|
681
|
-
token:
|
|
682
|
-
useDarkMode: f,
|
|
1100
|
+
token: l,
|
|
683
1101
|
userHasFullInsightFeedBeats: !1,
|
|
684
1102
|
variant: "outlined",
|
|
685
|
-
visibleCardsCount:
|
|
1103
|
+
visibleCardsCount: p
|
|
686
1104
|
}
|
|
687
1105
|
) });
|
|
688
|
-
},
|
|
689
|
-
const { onEvent: n } =
|
|
690
|
-
categoryDetailsChartData: { monthlyAmounts:
|
|
691
|
-
} =
|
|
692
|
-
return /* @__PURE__ */ e(
|
|
693
|
-
|
|
1106
|
+
}, So = R(To), xo = R(({ chartLabel: t, chartColor: r }) => {
|
|
1107
|
+
const { onEvent: n } = V(), {
|
|
1108
|
+
categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: s }
|
|
1109
|
+
} = Ce();
|
|
1110
|
+
return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
1111
|
+
Oe,
|
|
694
1112
|
{
|
|
695
1113
|
baseline: "min",
|
|
696
|
-
colors: [
|
|
1114
|
+
colors: [r],
|
|
697
1115
|
curveType: "bump",
|
|
698
|
-
customTooltipLabels:
|
|
699
|
-
datasets: [
|
|
1116
|
+
customTooltipLabels: s,
|
|
1117
|
+
datasets: [o],
|
|
700
1118
|
height: 265,
|
|
701
1119
|
labels: [t],
|
|
702
1120
|
markStyles: () => ({
|
|
703
|
-
stroke:
|
|
1121
|
+
stroke: r
|
|
704
1122
|
}),
|
|
705
1123
|
onItemClick: () => {
|
|
706
|
-
n(
|
|
1124
|
+
n(I.TRENDS_CLICK_CHART, B);
|
|
707
1125
|
},
|
|
708
1126
|
showArea: !0,
|
|
709
1127
|
showAverage: !0,
|
|
@@ -718,100 +1136,100 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
718
1136
|
valueFormatterString: "0,0"
|
|
719
1137
|
}
|
|
720
1138
|
) });
|
|
721
|
-
}),
|
|
722
|
-
const
|
|
723
|
-
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)
|
|
724
1142
|
return null;
|
|
725
|
-
const { guid:
|
|
726
|
-
() =>
|
|
727
|
-
[
|
|
728
|
-
), D = (
|
|
729
|
-
t?.(), n(
|
|
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);
|
|
730
1148
|
};
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
|
|
1149
|
+
return /* @__PURE__ */ y(
|
|
1150
|
+
Ne,
|
|
733
1151
|
{
|
|
734
|
-
ariaLabelClose:
|
|
1152
|
+
ariaLabelClose: s.close_category_details,
|
|
735
1153
|
isOpen: !0,
|
|
736
|
-
onClose:
|
|
1154
|
+
onClose: M,
|
|
737
1155
|
shouldShowHeaderShadow: !0,
|
|
738
|
-
title:
|
|
1156
|
+
title: f,
|
|
739
1157
|
children: [
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ y(S, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1159
|
+
/* @__PURE__ */ y(Xt, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
742
1160
|
/* @__PURE__ */ e(
|
|
743
|
-
|
|
1161
|
+
Qe,
|
|
744
1162
|
{
|
|
745
|
-
leftIcon: /* @__PURE__ */ e(
|
|
746
|
-
rightContent:
|
|
747
|
-
subtitle:
|
|
748
|
-
title:
|
|
1163
|
+
leftIcon: /* @__PURE__ */ e(Se, { categoryGuid: p }),
|
|
1164
|
+
rightContent: se(Math.abs(c), "0,0.00"),
|
|
1165
|
+
subtitle: g,
|
|
1166
|
+
title: i
|
|
749
1167
|
}
|
|
750
1168
|
),
|
|
751
|
-
/* @__PURE__ */ e(
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */ e(
|
|
754
|
-
/* @__PURE__ */ e(
|
|
1169
|
+
/* @__PURE__ */ e(xo, { chartColor: C, chartLabel: _ }),
|
|
1170
|
+
/* @__PURE__ */ y(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
1171
|
+
/* @__PURE__ */ e(P, { bold: !0, variant: "body1", children: x }),
|
|
1172
|
+
/* @__PURE__ */ e(Qt, { filter: D })
|
|
755
1173
|
] })
|
|
756
1174
|
] }),
|
|
757
1175
|
/* @__PURE__ */ e(
|
|
758
|
-
|
|
1176
|
+
ot,
|
|
759
1177
|
{
|
|
760
1178
|
bgcolor: "transparent",
|
|
761
1179
|
filter: D,
|
|
762
1180
|
height: "calc(100vh - 475px)",
|
|
763
|
-
onClick:
|
|
1181
|
+
onClick: m
|
|
764
1182
|
}
|
|
765
1183
|
)
|
|
766
1184
|
] }),
|
|
767
1185
|
/* @__PURE__ */ e(
|
|
768
|
-
|
|
1186
|
+
Ne,
|
|
769
1187
|
{
|
|
770
|
-
ariaLabelClose:
|
|
771
|
-
isOpen: !!
|
|
772
|
-
onClose: () =>
|
|
773
|
-
title:
|
|
774
|
-
children:
|
|
1188
|
+
ariaLabelClose: o.close_aria,
|
|
1189
|
+
isOpen: !!v,
|
|
1190
|
+
onClose: () => m(""),
|
|
1191
|
+
title: s.transaction,
|
|
1192
|
+
children: v && /* @__PURE__ */ e(tt, { transaction: v })
|
|
775
1193
|
}
|
|
776
1194
|
)
|
|
777
1195
|
]
|
|
778
1196
|
}
|
|
779
1197
|
);
|
|
780
|
-
}),
|
|
781
|
-
const n =
|
|
782
|
-
return [n,
|
|
783
|
-
},
|
|
784
|
-
const [n,
|
|
785
|
-
if (
|
|
786
|
-
const
|
|
787
|
-
|
|
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 = [];
|
|
1203
|
+
if (s) {
|
|
1204
|
+
const d = s.reduce((l, m) => l + m.y, 0);
|
|
1205
|
+
g.push({ label: r.income_label, amount: d });
|
|
788
1206
|
}
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
|
|
1207
|
+
if (h) {
|
|
1208
|
+
const d = h.reduce((l, m) => l + m.y, 0);
|
|
1209
|
+
g.push({ label: r.spending_label, amount: d });
|
|
792
1210
|
}
|
|
793
|
-
return
|
|
794
|
-
},
|
|
1211
|
+
return g;
|
|
1212
|
+
}, Lo = ({
|
|
795
1213
|
availableHeight: t = 0,
|
|
796
|
-
minHeight:
|
|
1214
|
+
minHeight: r = 500,
|
|
797
1215
|
selectedDateRange: n,
|
|
798
|
-
totals:
|
|
1216
|
+
totals: o
|
|
799
1217
|
}) => {
|
|
800
|
-
const
|
|
801
|
-
return
|
|
802
|
-
const
|
|
803
|
-
|
|
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);
|
|
804
1222
|
}, [t]), /* @__PURE__ */ e(
|
|
805
|
-
|
|
1223
|
+
Oe,
|
|
806
1224
|
{
|
|
807
1225
|
baseline: "min",
|
|
808
|
-
colors:
|
|
1226
|
+
colors: i,
|
|
809
1227
|
curveType: "bump",
|
|
810
|
-
datasets:
|
|
1228
|
+
datasets: b,
|
|
811
1229
|
height: D,
|
|
812
|
-
labels:
|
|
1230
|
+
labels: c,
|
|
813
1231
|
onItemClick: () => {
|
|
814
|
-
|
|
1232
|
+
h(I.TRENDS_CLICK_CHART, B);
|
|
815
1233
|
},
|
|
816
1234
|
showArea: !0,
|
|
817
1235
|
showAxisHighlight: !0,
|
|
@@ -824,7 +1242,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
824
1242
|
valueFormatterString: "0.0a"
|
|
825
1243
|
}
|
|
826
1244
|
);
|
|
827
|
-
},
|
|
1245
|
+
}, Eo = R(Lo), Do = [
|
|
828
1246
|
"BillAmountNotStandard",
|
|
829
1247
|
"CategorySpendingV2",
|
|
830
1248
|
"CostOfLivingToIncome",
|
|
@@ -858,192 +1276,195 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
858
1276
|
"WeeklyNewMerchantsV2",
|
|
859
1277
|
"WeeklyNoSpendDays",
|
|
860
1278
|
"WeeklySmallPurchasesSummary"
|
|
861
|
-
],
|
|
862
|
-
const { onEvent:
|
|
863
|
-
isCopyLoaded:
|
|
864
|
-
isInitialized:
|
|
865
|
-
selectedAccounts:
|
|
866
|
-
selectedAccountGuids:
|
|
867
|
-
setSelectedAccounts:
|
|
868
|
-
} =
|
|
869
|
-
() =>
|
|
870
|
-
[
|
|
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]
|
|
871
1289
|
);
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
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
|
+
});
|
|
893
1315
|
});
|
|
894
|
-
}, [
|
|
895
|
-
if (
|
|
896
|
-
const
|
|
897
|
-
accounts:
|
|
898
|
-
dateRange: { start:
|
|
1316
|
+
}, [x, v, c]), u.useEffect(() => {
|
|
1317
|
+
if (i.length !== 0) {
|
|
1318
|
+
const N = {
|
|
1319
|
+
accounts: D,
|
|
1320
|
+
dateRange: { start: c.start, end: c.end }
|
|
899
1321
|
};
|
|
900
|
-
|
|
901
|
-
...
|
|
902
|
-
custom: (
|
|
903
|
-
(
|
|
1322
|
+
b({
|
|
1323
|
+
...N,
|
|
1324
|
+
custom: (J) => !!i.find(
|
|
1325
|
+
(he) => he.top_level_category_guid === J.top_level_category_guid || he.category_guid === J.category_guid
|
|
904
1326
|
)
|
|
905
1327
|
});
|
|
906
1328
|
}
|
|
907
|
-
}, [
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
},
|
|
911
|
-
|
|
912
|
-
},
|
|
913
|
-
|
|
914
|
-
},
|
|
915
|
-
|
|
916
|
-
...
|
|
917
|
-
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
|
|
918
1340
|
});
|
|
919
|
-
},
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
...
|
|
923
|
-
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"
|
|
924
1346
|
});
|
|
925
|
-
},
|
|
926
|
-
|
|
927
|
-
...
|
|
928
|
-
filterValue:
|
|
1347
|
+
}, De = (N) => {
|
|
1348
|
+
o(I.TRENDS_CLICK_FILTER, {
|
|
1349
|
+
...B,
|
|
1350
|
+
filterValue: N
|
|
929
1351
|
});
|
|
930
|
-
},
|
|
931
|
-
|
|
932
|
-
},
|
|
933
|
-
|
|
1352
|
+
}, Me = (N) => {
|
|
1353
|
+
K(N);
|
|
1354
|
+
}, ct = () => {
|
|
1355
|
+
K(""), o(I.TRENDS_CLICK_ALL_CATEGORIES, B);
|
|
934
1356
|
};
|
|
935
|
-
return !
|
|
936
|
-
|
|
1357
|
+
return !_ || !X ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ y(
|
|
1358
|
+
et,
|
|
937
1359
|
{
|
|
938
|
-
accountOptions:
|
|
939
|
-
calendarActions: { onRangeChanged:
|
|
940
|
-
dateRange:
|
|
941
|
-
dateRangeVariant:
|
|
942
|
-
onAccountsFilterClick:
|
|
1360
|
+
accountOptions: l,
|
|
1361
|
+
calendarActions: { onRangeChanged: ue },
|
|
1362
|
+
dateRange: c,
|
|
1363
|
+
dateRangeVariant: d ? "timeframetabs" : "timeframebuttons",
|
|
1364
|
+
onAccountsFilterClick: De,
|
|
943
1365
|
onBackClick: t,
|
|
944
1366
|
sx: n,
|
|
945
|
-
title:
|
|
1367
|
+
title: L.title,
|
|
946
1368
|
children: [
|
|
947
|
-
|
|
948
|
-
|
|
1369
|
+
a && /* @__PURE__ */ e(
|
|
1370
|
+
Jt,
|
|
949
1371
|
{
|
|
950
|
-
header:
|
|
1372
|
+
header: L.zero_state_content_header,
|
|
951
1373
|
icon: "",
|
|
952
|
-
onClick:
|
|
953
|
-
primaryButton:
|
|
954
|
-
subText:
|
|
955
|
-
sx: { height:
|
|
956
|
-
variant:
|
|
1374
|
+
onClick: Le,
|
|
1375
|
+
primaryButton: L.empty_state_primary,
|
|
1376
|
+
subText: L.empty_state_sub_text,
|
|
1377
|
+
sx: { height: O },
|
|
1378
|
+
variant: Ie
|
|
957
1379
|
}
|
|
958
1380
|
),
|
|
959
|
-
!
|
|
960
|
-
|
|
1381
|
+
!a && /* @__PURE__ */ y(
|
|
1382
|
+
S,
|
|
961
1383
|
{
|
|
962
1384
|
sx: {
|
|
963
|
-
px:
|
|
1385
|
+
px: d ? 0 : 48
|
|
964
1386
|
},
|
|
965
1387
|
children: [
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
|
|
1388
|
+
/* @__PURE__ */ y(
|
|
1389
|
+
S,
|
|
968
1390
|
{
|
|
969
1391
|
flexDirection: "row",
|
|
970
1392
|
justifyContent: "space-between",
|
|
971
|
-
sx: { pb:
|
|
1393
|
+
sx: { pb: d ? 12 : 24, pt: d ? 24 : 48 },
|
|
972
1394
|
children: [
|
|
973
1395
|
/* @__PURE__ */ e(
|
|
974
|
-
|
|
1396
|
+
at,
|
|
975
1397
|
{
|
|
976
|
-
selectedCategoryGuid:
|
|
977
|
-
selectedDateRange:
|
|
1398
|
+
selectedCategoryGuid: ne,
|
|
1399
|
+
selectedDateRange: c
|
|
978
1400
|
}
|
|
979
1401
|
),
|
|
980
|
-
/* @__PURE__ */ e(
|
|
1402
|
+
/* @__PURE__ */ e(rt, { onTabChange: Ee, selectedTab: Z })
|
|
981
1403
|
]
|
|
982
1404
|
}
|
|
983
1405
|
),
|
|
984
|
-
/* @__PURE__ */ e(
|
|
985
|
-
/* @__PURE__ */ e(
|
|
986
|
-
|
|
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
|
|
987
1409
|
] }) }) }),
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
|
|
990
|
-
/* @__PURE__ */ e(
|
|
991
|
-
|
|
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,
|
|
992
1414
|
{
|
|
993
|
-
availableHeight:
|
|
1415
|
+
availableHeight: O,
|
|
994
1416
|
minHeight: 450,
|
|
995
|
-
selectedDateRange:
|
|
996
|
-
totals:
|
|
1417
|
+
selectedDateRange: c,
|
|
1418
|
+
totals: i
|
|
997
1419
|
}
|
|
998
1420
|
) }),
|
|
999
|
-
/* @__PURE__ */
|
|
1000
|
-
|
|
1001
|
-
|
|
1421
|
+
/* @__PURE__ */ y(S, { gap: 16, sx: { width: z ? "32%" : "100%" }, children: [
|
|
1422
|
+
F && oe && T.length > 0 && /* @__PURE__ */ e(
|
|
1423
|
+
So,
|
|
1002
1424
|
{
|
|
1003
|
-
beats:
|
|
1004
|
-
onInsightCardClick:
|
|
1425
|
+
beats: T,
|
|
1426
|
+
onInsightCardClick: r
|
|
1005
1427
|
}
|
|
1006
1428
|
),
|
|
1007
1429
|
/* @__PURE__ */ e(
|
|
1008
|
-
|
|
1430
|
+
bo,
|
|
1009
1431
|
{
|
|
1010
|
-
availableHeight:
|
|
1011
|
-
onCategoryClick:
|
|
1432
|
+
availableHeight: Y,
|
|
1433
|
+
onCategoryClick: E
|
|
1012
1434
|
}
|
|
1013
1435
|
)
|
|
1014
1436
|
] })
|
|
1015
1437
|
] }),
|
|
1016
|
-
|
|
1017
|
-
|
|
1438
|
+
Z === "Table" && /* @__PURE__ */ e(k, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1439
|
+
it,
|
|
1018
1440
|
{
|
|
1019
1441
|
height: "unset",
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
selectedDateRange: a
|
|
1442
|
+
onClickRow: Me,
|
|
1443
|
+
selectedCategory: ne,
|
|
1444
|
+
selectedDateRange: c
|
|
1024
1445
|
}
|
|
1025
1446
|
) })
|
|
1026
1447
|
] }),
|
|
1027
|
-
|
|
1448
|
+
ae && /* @__PURE__ */ e(vo, { onClose: j })
|
|
1028
1449
|
]
|
|
1029
1450
|
}
|
|
1030
1451
|
),
|
|
1031
1452
|
/* @__PURE__ */ e(
|
|
1032
|
-
|
|
1453
|
+
eo,
|
|
1033
1454
|
{
|
|
1034
|
-
onClose: () =>
|
|
1035
|
-
showConnectWidget:
|
|
1036
|
-
title:
|
|
1455
|
+
onClose: () => ye(!1),
|
|
1456
|
+
showConnectWidget: de,
|
|
1457
|
+
title: A.mini_title
|
|
1037
1458
|
}
|
|
1038
1459
|
)
|
|
1039
1460
|
]
|
|
1040
1461
|
}
|
|
1041
1462
|
);
|
|
1042
|
-
},
|
|
1463
|
+
}, Gn = R(Mo);
|
|
1043
1464
|
export {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1465
|
+
Nn as TrendsFullWidget,
|
|
1466
|
+
On as TrendsMicroWidget,
|
|
1467
|
+
Wn as TrendsMiniWidget,
|
|
1468
|
+
Fn as TrendsStore,
|
|
1469
|
+
Gn as TrendsWidget
|
|
1049
1470
|
};
|