@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4
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 +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
- 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-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- 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 +228 -199
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- 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 +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- 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/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.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 +25 -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 +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- 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 +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- 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 +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- 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 +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { endOfMonth as
|
|
5
|
-
import { endOfToday as
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import je from "@
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { f as
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import { L as
|
|
54
|
-
import { M as
|
|
55
|
-
import { u as
|
|
56
|
-
import { M as
|
|
57
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import { observer as C } from "mobx-react-lite";
|
|
4
|
+
import { endOfMonth as W } from "date-fns/endOfMonth";
|
|
5
|
+
import { endOfToday as X } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as N } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as J } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as Q } from "date-fns/subDays";
|
|
9
|
+
import { R as De } from "../RecurringSettings-DAncu--R.mjs";
|
|
10
|
+
import { M as vn } from "../RecurringSettings-DAncu--R.mjs";
|
|
11
|
+
import { addMonths as We } from "date-fns/addMonths";
|
|
12
|
+
import { subMonths as $e } from "date-fns/subMonths";
|
|
13
|
+
import { isBefore as Pe } from "date-fns/isBefore";
|
|
14
|
+
import q from "@mui/material/Grid";
|
|
15
|
+
import ge from "@mui/material/IconButton";
|
|
16
|
+
import d from "@mui/material/Stack";
|
|
17
|
+
import he from "@mui/material/Tab";
|
|
18
|
+
import ze from "@mui/material/Tabs";
|
|
19
|
+
import { Cancel as Te, CheckCircle as we, Schedule as Be, MonetizationOn as Fe, ChevronLeft as He, ChevronRight as Ue, CurrencyExchange as je } from "@mxenabled/mx-icons";
|
|
20
|
+
import { Text as f, MerchantLogo as ee, InstitutionLogo as Ke, H3 as Ye, P as V } from "@mxenabled/mxui";
|
|
21
|
+
import { getWeeksInMonth as fe } from "date-fns/getWeeksInMonth";
|
|
22
|
+
import { useTheme as te } from "@mui/material/styles";
|
|
23
|
+
import { AdapterDateFns as qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
24
|
+
import { DateCalendar as Ve } from "@mui/x-date-pickers/DateCalendar";
|
|
25
|
+
import { LocalizationProvider as Ze } from "@mui/x-date-pickers/LocalizationProvider";
|
|
26
|
+
import { isSameDay as Xe } from "date-fns/isSameDay";
|
|
27
|
+
import Je from "@mui/material/Badge";
|
|
28
|
+
import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
|
|
29
|
+
import { I as z } from "../IconBacking-DgT8DCeh.mjs";
|
|
30
|
+
import { u as R, b as B, j as _, g as F, q as Se, d as ne, h as re, n as et } from "../hooks-C41HAxM5.mjs";
|
|
31
|
+
import { d as M, c as T, g as xe, f as tt } from "../RecurringTransactions-CxcSL1dY.mjs";
|
|
32
|
+
import { T as O } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
|
|
33
|
+
import { R as An } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
|
|
34
|
+
import { A as I, W as nt } from "../WidgetContainer-CDh9fjpR.mjs";
|
|
35
|
+
import rt from "@mui/material/Button";
|
|
36
|
+
import Z from "@mui/material/Divider";
|
|
37
|
+
import be from "@mui/material/List";
|
|
38
|
+
import _e from "@mui/material/ListItem";
|
|
39
|
+
import it from "@mui/material/ListSubheader";
|
|
40
|
+
import ot from "@mui/material/ListItemAvatar";
|
|
41
|
+
import at from "@mui/material/ListItemButton";
|
|
42
|
+
import st from "@mui/material/ListItemText";
|
|
43
|
+
import { b as ct } from "../ManageIncome-8EsStyIQ.mjs";
|
|
44
|
+
import { c as Gn, M as Nn, S as On } from "../ManageIncome-8EsStyIQ.mjs";
|
|
45
|
+
import { D as ie } from "../Drawer-BF40nbsH.mjs";
|
|
46
|
+
import { f as v } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
47
|
+
import { b as E } from "../Localization-2MODESHW.mjs";
|
|
48
|
+
import { f as L, a as A } from "../Dialog-CDV0kKxj.mjs";
|
|
49
|
+
import G from "@mui/material/Box";
|
|
50
|
+
import { S as Ie } from "../StatusBar-CPfSXe80.mjs";
|
|
51
|
+
import { u as oe } from "../useScreenSize-B5afALev.mjs";
|
|
52
|
+
import { S as Me } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
53
|
+
import { L as ae } from "../Loader-Ckqi9Rx6.mjs";
|
|
54
|
+
import { M as lt } from "../MiniWidgetContainer-CKzf_Ira.mjs";
|
|
55
|
+
import { u as dt } from "../useDimensions-27p2evRx.mjs";
|
|
56
|
+
import { M as ut } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
|
|
57
|
+
const H = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
},
|
|
62
|
-
|
|
61
|
+
}, U = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Be, { color: "primary", filled: !0, sx: { fontSize: n, ...H } }) }), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(
|
|
62
|
+
Fe,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
65
|
+
sx: { color: "categories.income", fontSize: n, ...H }
|
|
66
66
|
}
|
|
67
|
-
) }),
|
|
68
|
-
({ day: t, outsideCurrentMonth: n, ...
|
|
69
|
-
const { recurring:
|
|
70
|
-
() =>
|
|
71
|
-
[o,
|
|
67
|
+
) }), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Te, { color: "error", filled: !0, sx: { fontSize: n, ...H } }) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...H } }) }), mt = C(
|
|
68
|
+
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
69
|
+
const { recurring: i } = R(), { selectedAccountGuids: o } = B(), { recurrences: c, setSelectedDay: u } = _(), s = x.useMemo(
|
|
70
|
+
() => c.filter((g) => o.includes(g.accountGuid)),
|
|
71
|
+
[o, c]
|
|
72
72
|
).filter(
|
|
73
|
-
(
|
|
74
|
-
),
|
|
75
|
-
(
|
|
76
|
-
),
|
|
77
|
-
(
|
|
78
|
-
),
|
|
79
|
-
(
|
|
80
|
-
),
|
|
73
|
+
(g) => Xe(g.occurredOnDate || g.expectedDate, t)
|
|
74
|
+
), l = s.some(
|
|
75
|
+
(g) => g.type !== M.Income && g.status === T.Upcoming
|
|
76
|
+
), m = s.some(
|
|
77
|
+
(g) => g.type !== M.Income && g.status === T.Missed
|
|
78
|
+
), h = s.some(
|
|
79
|
+
(g) => g.type !== M.Income && g.status === T.Paid
|
|
80
|
+
), b = s.some((g) => g.type === M.Income), y = (l ? 1 : 0) + (m ? 1 : 0) + (h ? 1 : 0) + (b ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
Je,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */ a(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ a(P, { children: [
|
|
85
|
+
m && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
86
|
+
h && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
87
|
+
l && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
88
|
+
b && /* @__PURE__ */ e(ce, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -96,15 +96,15 @@ const Q = {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
Qe,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
|
-
${
|
|
103
|
-
${
|
|
104
|
-
${
|
|
105
|
-
${
|
|
102
|
+
${h && i.paid},
|
|
103
|
+
${m && i.missed},
|
|
104
|
+
${l && i.upcoming},
|
|
105
|
+
${b && i.income}`,
|
|
106
106
|
day: t,
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => u(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
109
109
|
sx: {
|
|
110
110
|
"&.MuiPickersDay-root": {
|
|
@@ -113,19 +113,19 @@ const Q = {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
...
|
|
116
|
+
...r
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ a(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
] }),
|
|
126
|
-
const { recurring: t } =
|
|
124
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: n })
|
|
125
|
+
] }), pt = C(() => {
|
|
126
|
+
const { recurring: t } = R();
|
|
127
127
|
return /* @__PURE__ */ a(
|
|
128
|
-
|
|
128
|
+
d,
|
|
129
129
|
{
|
|
130
130
|
alignItems: "center",
|
|
131
131
|
"aria-hidden": !0,
|
|
@@ -134,29 +134,35 @@ const Q = {
|
|
|
134
134
|
justifyContent: "center",
|
|
135
135
|
mt: 12,
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
/* @__PURE__ */ e(
|
|
137
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t =
|
|
146
|
-
|
|
147
|
-
),
|
|
148
|
-
|
|
149
|
-
start:
|
|
150
|
-
end:
|
|
151
|
-
}), n(
|
|
152
|
-
},
|
|
153
|
-
|
|
144
|
+
}), ye = 58, ve = C(() => {
|
|
145
|
+
const t = te(), { onEvent: n } = F(), { selectedDay: r, setDateRange: i } = _(), [o, c] = x.useState(
|
|
146
|
+
fe(/* @__PURE__ */ new Date()) * O + ye
|
|
147
|
+
), u = (m) => {
|
|
148
|
+
c(fe(m) * O + ye), i({
|
|
149
|
+
start: N(m),
|
|
150
|
+
end: W(m)
|
|
151
|
+
}), p(m), n(I.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
|
+
}, p = (m) => {
|
|
153
|
+
m && requestAnimationFrame(() => {
|
|
154
|
+
const h = document.getElementById("recurrence-list");
|
|
155
|
+
h?.setAttribute("tabindex", "-1"), h?.focus();
|
|
156
|
+
});
|
|
157
|
+
}, s = /* @__PURE__ */ e(
|
|
158
|
+
Ve,
|
|
154
159
|
{
|
|
155
|
-
minDate:
|
|
156
|
-
|
|
160
|
+
minDate: N(/* @__PURE__ */ new Date()),
|
|
161
|
+
onChange: p,
|
|
162
|
+
onMonthChange: u,
|
|
157
163
|
showDaysOutsideCurrentMonth: !0,
|
|
158
164
|
slots: {
|
|
159
|
-
day:
|
|
165
|
+
day: mt
|
|
160
166
|
},
|
|
161
167
|
sx: {
|
|
162
168
|
"& .MuiPickersArrowSwitcher-button": {
|
|
@@ -177,19 +183,19 @@ const Q = {
|
|
|
177
183
|
pr: 8
|
|
178
184
|
},
|
|
179
185
|
"& .MuiPickersCalendarHeader-label": {
|
|
180
|
-
fontFamily: t.typography.
|
|
181
|
-
fontSize: t.typography.
|
|
186
|
+
fontFamily: t.typography.body1.fontFamily,
|
|
187
|
+
fontSize: t.typography.body1.fontSize,
|
|
182
188
|
fontWeight: 600
|
|
183
189
|
},
|
|
184
190
|
"& .MuiDayCalendar-slideTransition": {
|
|
185
191
|
minHeight: o
|
|
186
192
|
},
|
|
187
193
|
"&.MuiDateCalendar-root": {
|
|
188
|
-
minHeight: o +
|
|
194
|
+
minHeight: o + O
|
|
189
195
|
},
|
|
190
196
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
191
|
-
height:
|
|
192
|
-
width:
|
|
197
|
+
height: O,
|
|
198
|
+
width: O,
|
|
193
199
|
margin: 0
|
|
194
200
|
},
|
|
195
201
|
"& .MuiDayCalendar-weekDayLabel": {
|
|
@@ -197,104 +203,132 @@ const Q = {
|
|
|
197
203
|
fontSize: t.typography.body2.fontSize
|
|
198
204
|
}
|
|
199
205
|
},
|
|
200
|
-
value:
|
|
206
|
+
value: r,
|
|
201
207
|
views: ["day"]
|
|
202
208
|
}
|
|
203
209
|
);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
return /* @__PURE__ */ a(
|
|
211
|
+
d,
|
|
212
|
+
{
|
|
213
|
+
"aria-describedby": "calendar-description",
|
|
214
|
+
"aria-labelledby": "calendar-label",
|
|
215
|
+
justifyContent: "center",
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ e(
|
|
218
|
+
"span",
|
|
219
|
+
{
|
|
220
|
+
id: "calendar-label",
|
|
221
|
+
style: {
|
|
222
|
+
position: "absolute",
|
|
223
|
+
width: "1px",
|
|
224
|
+
height: "1px",
|
|
225
|
+
padding: 0,
|
|
226
|
+
margin: "-1px",
|
|
227
|
+
overflow: "hidden",
|
|
228
|
+
clip: "rect(0, 0, 0, 0)",
|
|
229
|
+
whiteSpace: "nowrap",
|
|
230
|
+
border: 0
|
|
231
|
+
},
|
|
232
|
+
children: "Calendar filter for recurring transactions list. Filter by month or select specific date."
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
/* @__PURE__ */ a(Ze, { dateAdapter: qe, children: [
|
|
236
|
+
r && s,
|
|
237
|
+
!r && s,
|
|
238
|
+
/* @__PURE__ */ e(pt, {})
|
|
239
|
+
] })
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}), gt = (t) => {
|
|
210
244
|
if (t.type === M.Income)
|
|
211
|
-
return /* @__PURE__ */ e(
|
|
245
|
+
return /* @__PURE__ */ e(ce, {});
|
|
212
246
|
switch (t.status) {
|
|
213
|
-
case
|
|
214
|
-
return /* @__PURE__ */ e(
|
|
215
|
-
case
|
|
216
|
-
return /* @__PURE__ */ e(
|
|
247
|
+
case T.Missed:
|
|
248
|
+
return /* @__PURE__ */ e(le, {});
|
|
249
|
+
case T.Paid:
|
|
250
|
+
return /* @__PURE__ */ e(de, {});
|
|
217
251
|
default:
|
|
218
|
-
return /* @__PURE__ */ e(
|
|
252
|
+
return /* @__PURE__ */ e(se, {});
|
|
219
253
|
}
|
|
220
|
-
},
|
|
254
|
+
}, ht = (t, n) => {
|
|
221
255
|
switch (t.status) {
|
|
222
|
-
case
|
|
223
|
-
return t.expectedDate ?
|
|
256
|
+
case T.Paid:
|
|
257
|
+
return t.expectedDate ? E(
|
|
224
258
|
n.paid_on,
|
|
225
|
-
|
|
259
|
+
L(
|
|
226
260
|
t.occurredOnDate || t.expectedDate,
|
|
227
|
-
|
|
261
|
+
A.MONTH_DAY
|
|
228
262
|
)
|
|
229
263
|
) : n.paid;
|
|
230
|
-
case
|
|
231
|
-
return
|
|
264
|
+
case T.Missed:
|
|
265
|
+
return E(
|
|
232
266
|
n.missed_on,
|
|
233
|
-
|
|
267
|
+
L(t.expectedDate, A.MONTH_DAY)
|
|
234
268
|
);
|
|
235
|
-
case
|
|
236
|
-
return
|
|
269
|
+
case T.Upcoming:
|
|
270
|
+
return E(
|
|
237
271
|
n.upcoming_on,
|
|
238
|
-
|
|
272
|
+
L(t.expectedDate, A.MONTH_DAY)
|
|
239
273
|
);
|
|
240
274
|
default:
|
|
241
275
|
return n.unknown;
|
|
242
276
|
}
|
|
243
|
-
},
|
|
277
|
+
}, Ce = ({
|
|
244
278
|
recurrence: t,
|
|
245
279
|
isMini: n = !1,
|
|
246
|
-
onRecurrenceClick:
|
|
280
|
+
onRecurrenceClick: r = () => {
|
|
247
281
|
},
|
|
248
|
-
showOrdinal:
|
|
282
|
+
showOrdinal: i = !1
|
|
249
283
|
}) => {
|
|
250
|
-
const { recurring: o } =
|
|
251
|
-
() =>
|
|
252
|
-
[t,
|
|
253
|
-
),
|
|
284
|
+
const { recurring: o } = R(), { detailedRepeatingTransactions: c } = _(), [u, p] = x.useState(!1), s = x.useMemo(
|
|
285
|
+
() => c.find((D) => D.guid === t.repeatingTransactionGuid),
|
|
286
|
+
[t, c]
|
|
287
|
+
), l = t.type === M.Income, m = t.status === T.Paid, h = t.status === T.Missed, b = t.status === T.Upcoming;
|
|
254
288
|
let y = o.paid?.toLowerCase();
|
|
255
|
-
return
|
|
256
|
-
/* @__PURE__ */ a(
|
|
257
|
-
/* @__PURE__ */ a(
|
|
258
|
-
|
|
289
|
+
return h ? y = o.missed?.toLowerCase() : b && (y = i ? xe(o, s || {}, !0) : xe(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
290
|
+
/* @__PURE__ */ a(_e, { disableGutters: !0, disablePadding: !0, children: [
|
|
291
|
+
/* @__PURE__ */ a(at, { onClick: () => {
|
|
292
|
+
p(!0), r(t);
|
|
259
293
|
}, children: [
|
|
260
|
-
/* @__PURE__ */ e(
|
|
261
|
-
|
|
294
|
+
/* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(
|
|
295
|
+
ee,
|
|
262
296
|
{
|
|
263
297
|
categoryGuid: t.categoryGuid,
|
|
264
298
|
merchantGuid: t.merchantGuid
|
|
265
299
|
}
|
|
266
300
|
) }),
|
|
267
|
-
/* @__PURE__ */ e(
|
|
268
|
-
|
|
301
|
+
/* @__PURE__ */ e(st, { children: /* @__PURE__ */ a(
|
|
302
|
+
d,
|
|
269
303
|
{
|
|
270
304
|
direction: "row",
|
|
271
305
|
gap: 4,
|
|
272
306
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
273
307
|
children: [
|
|
274
|
-
/* @__PURE__ */ a(
|
|
275
|
-
/* @__PURE__ */ e(
|
|
276
|
-
/* @__PURE__ */ e(
|
|
277
|
-
|
|
278
|
-
/* @__PURE__ */ e(
|
|
279
|
-
] }) : /* @__PURE__ */ a(
|
|
308
|
+
/* @__PURE__ */ a(d, { direction: "column", width: "50%", children: [
|
|
309
|
+
/* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: t.name }),
|
|
310
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
|
|
311
|
+
gt(t),
|
|
312
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: ht(t, o) })
|
|
313
|
+
] }) : /* @__PURE__ */ a(P, { children: [
|
|
280
314
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
281
|
-
|
|
315
|
+
Ke,
|
|
282
316
|
{
|
|
283
|
-
alt: t.institutionName
|
|
317
|
+
alt: `${t.institutionName} institution logo`,
|
|
284
318
|
institutionGuid: t.institutionGuid,
|
|
285
319
|
size: 12
|
|
286
320
|
}
|
|
287
321
|
),
|
|
288
|
-
/* @__PURE__ */ e(
|
|
322
|
+
/* @__PURE__ */ e(f, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
289
323
|
] }) })
|
|
290
324
|
] }),
|
|
291
|
-
/* @__PURE__ */ a(
|
|
292
|
-
/* @__PURE__ */ a(
|
|
293
|
-
|
|
294
|
-
|
|
325
|
+
/* @__PURE__ */ a(d, { alignItems: "flex-end", width: "100%", children: [
|
|
326
|
+
/* @__PURE__ */ a(f, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
|
|
327
|
+
l ? "+" : "",
|
|
328
|
+
v(t.amount, "0,0.00")
|
|
295
329
|
] }),
|
|
296
330
|
!n && /* @__PURE__ */ a(
|
|
297
|
-
|
|
331
|
+
d,
|
|
298
332
|
{
|
|
299
333
|
direction: "row",
|
|
300
334
|
sx: {
|
|
@@ -305,9 +339,9 @@ const Q = {
|
|
|
305
339
|
width: "100%"
|
|
306
340
|
},
|
|
307
341
|
children: [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
/* @__PURE__ */ e(
|
|
342
|
+
m && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
343
|
+
h && /* @__PURE__ */ e(Te, { color: "error", filled: !0, size: 12 }),
|
|
344
|
+
/* @__PURE__ */ e(f, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
311
345
|
]
|
|
312
346
|
}
|
|
313
347
|
)
|
|
@@ -317,240 +351,240 @@ const Q = {
|
|
|
317
351
|
) })
|
|
318
352
|
] }),
|
|
319
353
|
/* @__PURE__ */ e(
|
|
320
|
-
|
|
354
|
+
ie,
|
|
321
355
|
{
|
|
322
356
|
ariaLabelClose: o.close_drawer_aria,
|
|
323
|
-
isOpen:
|
|
324
|
-
onClose: () =>
|
|
357
|
+
isOpen: u,
|
|
358
|
+
onClose: () => p(!1),
|
|
325
359
|
title: t.type === M.Income ? o.income_details : o.expense_details,
|
|
326
360
|
children: s && /* @__PURE__ */ e(
|
|
327
|
-
|
|
361
|
+
ct,
|
|
328
362
|
{
|
|
329
|
-
onDeleted: () =>
|
|
363
|
+
onDeleted: () => p(!1),
|
|
330
364
|
recurringTransaction: s
|
|
331
365
|
}
|
|
332
366
|
)
|
|
333
367
|
}
|
|
334
368
|
)
|
|
335
369
|
] });
|
|
336
|
-
},
|
|
370
|
+
}, k = C(
|
|
337
371
|
({
|
|
338
372
|
recurrences: t,
|
|
339
373
|
isMini: n = !1,
|
|
340
|
-
onResetClick:
|
|
341
|
-
onRecurrenceClick:
|
|
374
|
+
onResetClick: r,
|
|
375
|
+
onRecurrenceClick: i,
|
|
342
376
|
sx: o = {},
|
|
343
|
-
title:
|
|
377
|
+
title: c
|
|
344
378
|
}) => {
|
|
345
|
-
const { recurring:
|
|
346
|
-
return /* @__PURE__ */ a(
|
|
347
|
-
|
|
348
|
-
|
|
379
|
+
const { recurring: u } = R(), p = x.useMemo(() => tt(t), [t]);
|
|
380
|
+
return /* @__PURE__ */ a(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, "tab-index": -1, children: [
|
|
381
|
+
c && /* @__PURE__ */ a(
|
|
382
|
+
d,
|
|
349
383
|
{
|
|
350
384
|
sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
|
|
351
385
|
children: [
|
|
352
|
-
/* @__PURE__ */ e(
|
|
353
|
-
|
|
386
|
+
/* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: c }),
|
|
387
|
+
r && /* @__PURE__ */ e(rt, { onClick: r, variant: "text", children: u.reset })
|
|
354
388
|
]
|
|
355
389
|
}
|
|
356
390
|
),
|
|
357
|
-
t.length === 0 ? /* @__PURE__ */ e(
|
|
391
|
+
t.length === 0 ? /* @__PURE__ */ e(f, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(be, { children: n ? t.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
358
392
|
/* @__PURE__ */ e(
|
|
359
|
-
|
|
393
|
+
Ce,
|
|
360
394
|
{
|
|
361
395
|
isMini: n,
|
|
362
|
-
onRecurrenceClick:
|
|
396
|
+
onRecurrenceClick: i,
|
|
363
397
|
recurrence: s
|
|
364
398
|
}
|
|
365
399
|
),
|
|
366
|
-
/* @__PURE__ */ e(
|
|
367
|
-
] }, `recurrence-${
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
|
|
400
|
+
/* @__PURE__ */ e(Z, { sx: { mx: 24 } })
|
|
401
|
+
] }, `recurrence-${l}`)) : p.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
|
|
402
|
+
/* @__PURE__ */ e(_e, { children: /* @__PURE__ */ e(
|
|
403
|
+
be,
|
|
370
404
|
{
|
|
371
|
-
subheader: /* @__PURE__ */ e(
|
|
405
|
+
subheader: /* @__PURE__ */ e(it, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: L(s.date, A.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
372
406
|
sx: { width: "100%" },
|
|
373
|
-
children: s.recurrences.map((
|
|
374
|
-
|
|
407
|
+
children: s.recurrences.map((m, h) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
408
|
+
Ce,
|
|
375
409
|
{
|
|
376
410
|
isMini: n,
|
|
377
|
-
onRecurrenceClick:
|
|
378
|
-
recurrence:
|
|
411
|
+
onRecurrenceClick: i,
|
|
412
|
+
recurrence: m
|
|
379
413
|
}
|
|
380
|
-
) }, `day-recurrence-${
|
|
414
|
+
) }, `day-recurrence-${h}`))
|
|
381
415
|
}
|
|
382
416
|
) }, s.id),
|
|
383
|
-
/* @__PURE__ */ e(
|
|
384
|
-
] }, `recurrence-${
|
|
417
|
+
/* @__PURE__ */ e(Z, { sx: { mx: 24 } })
|
|
418
|
+
] }, `recurrence-${l}`)) })
|
|
385
419
|
] });
|
|
386
420
|
}
|
|
387
|
-
),
|
|
388
|
-
({ expected: t, isExpense: n = !0, missed:
|
|
389
|
-
const
|
|
390
|
-
const
|
|
391
|
-
return
|
|
392
|
-
}, [
|
|
393
|
-
return /* @__PURE__ */ a(
|
|
394
|
-
/* @__PURE__ */ a(
|
|
395
|
-
/* @__PURE__ */ e(
|
|
396
|
-
/* @__PURE__ */ e(
|
|
421
|
+
), Re = C(
|
|
422
|
+
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: c, upcoming: u }) => {
|
|
423
|
+
const p = te(), { isSmallMobile: s } = oe(), { recurring: l } = R(), m = x.useMemo(() => {
|
|
424
|
+
const h = [{ color: p.palette.success.main, percentage: `${i / t}` }];
|
|
425
|
+
return r && h.push({ color: p.palette.error.main, percentage: `${r / t}` }), h;
|
|
426
|
+
}, [i, t, r]);
|
|
427
|
+
return /* @__PURE__ */ a(d, { children: [
|
|
428
|
+
/* @__PURE__ */ a(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
429
|
+
/* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: `${o} (${c})` }),
|
|
430
|
+
/* @__PURE__ */ e(f, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${v(t, "0,0.00")}` })
|
|
397
431
|
] }),
|
|
398
|
-
/* @__PURE__ */ e(
|
|
399
|
-
/* @__PURE__ */ a(
|
|
400
|
-
/* @__PURE__ */ e(
|
|
401
|
-
!s && /* @__PURE__ */ e(
|
|
402
|
-
/* @__PURE__ */ e(
|
|
403
|
-
|
|
404
|
-
/* @__PURE__ */ e(
|
|
405
|
-
!s && /* @__PURE__ */ e(
|
|
406
|
-
/* @__PURE__ */ e(
|
|
432
|
+
/* @__PURE__ */ e(Ie, { data: m, height: 12 }),
|
|
433
|
+
/* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
434
|
+
/* @__PURE__ */ e(G, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
435
|
+
!s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(i, "0,0.00") }),
|
|
436
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
437
|
+
r !== void 0 && /* @__PURE__ */ a(P, { children: [
|
|
438
|
+
/* @__PURE__ */ e(G, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
439
|
+
!s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(r, "0,0.00") }),
|
|
440
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
407
441
|
] }),
|
|
408
|
-
/* @__PURE__ */ e(
|
|
409
|
-
!s && /* @__PURE__ */ e(
|
|
410
|
-
/* @__PURE__ */ e(
|
|
442
|
+
/* @__PURE__ */ e(G, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
443
|
+
!s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(u, "0,0.00") }),
|
|
444
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: l.upcoming })
|
|
411
445
|
] })
|
|
412
446
|
] });
|
|
413
447
|
}
|
|
414
|
-
),
|
|
415
|
-
const { recurring: t } =
|
|
416
|
-
currentMonthExpenses:
|
|
417
|
-
currentMonthIncome:
|
|
448
|
+
), ft = C(() => {
|
|
449
|
+
const { recurring: t } = R(), { availableWidth: n } = Se(), { isDesktop: r, isSmallMobile: i, isMobile: o } = oe(n), { onEvent: c } = F(), {
|
|
450
|
+
currentMonthExpenses: u,
|
|
451
|
+
currentMonthIncome: p,
|
|
418
452
|
dateRange: s,
|
|
419
|
-
expenseTotal:
|
|
420
|
-
incomeTotal:
|
|
421
|
-
missedExpenseTotal:
|
|
422
|
-
pastRecurrences:
|
|
453
|
+
expenseTotal: l,
|
|
454
|
+
incomeTotal: m,
|
|
455
|
+
missedExpenseTotal: h,
|
|
456
|
+
pastRecurrences: b,
|
|
423
457
|
paidExpenseTotal: y,
|
|
424
|
-
paidIncomeTotal:
|
|
425
|
-
selectedDay:
|
|
426
|
-
selectedDayRecurrences:
|
|
427
|
-
setDateRange:
|
|
428
|
-
upcomingExpenseTotal:
|
|
429
|
-
upcomingIncomeTotal:
|
|
430
|
-
upcomingRecurrences:
|
|
431
|
-
} =
|
|
432
|
-
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
transaction_guid:
|
|
458
|
+
paidIncomeTotal: g,
|
|
459
|
+
selectedDay: D,
|
|
460
|
+
selectedDayRecurrences: j,
|
|
461
|
+
setDateRange: S,
|
|
462
|
+
upcomingExpenseTotal: K,
|
|
463
|
+
upcomingIncomeTotal: Le,
|
|
464
|
+
upcomingRecurrences: ue
|
|
465
|
+
} = _(), [Y, Ae] = x.useState(0), Ee = Pe(s.start, /* @__PURE__ */ new Date()), Ge = (w, ke) => {
|
|
466
|
+
Ae(ke);
|
|
467
|
+
}, me = (w) => {
|
|
468
|
+
c(I.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
469
|
+
transaction_guid: w.transaction?.guid
|
|
436
470
|
});
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
transaction_guid:
|
|
471
|
+
}, pe = (w) => {
|
|
472
|
+
c(I.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
473
|
+
transaction_guid: w.transaction?.guid
|
|
440
474
|
});
|
|
441
|
-
},
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
start:
|
|
445
|
-
end:
|
|
475
|
+
}, Ne = () => {
|
|
476
|
+
const w = We(s.start, 1);
|
|
477
|
+
S({
|
|
478
|
+
start: N(w),
|
|
479
|
+
end: W(w)
|
|
446
480
|
});
|
|
447
|
-
},
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
start:
|
|
451
|
-
end:
|
|
481
|
+
}, Oe = () => {
|
|
482
|
+
const w = $e(s.start, 1);
|
|
483
|
+
S({
|
|
484
|
+
start: N(w),
|
|
485
|
+
end: W(w)
|
|
452
486
|
});
|
|
453
487
|
};
|
|
454
488
|
return /* @__PURE__ */ a(
|
|
455
|
-
|
|
489
|
+
q,
|
|
456
490
|
{
|
|
457
491
|
container: !0,
|
|
458
492
|
sx: {
|
|
459
493
|
pt: 16
|
|
460
494
|
},
|
|
461
495
|
children: [
|
|
462
|
-
/* @__PURE__ */ a(
|
|
463
|
-
/* @__PURE__ */ a(
|
|
464
|
-
/* @__PURE__ */ a(
|
|
465
|
-
/* @__PURE__ */ e(
|
|
496
|
+
/* @__PURE__ */ a(q, { size: { md: "grow", sm: 12 }, width: "100%", children: [
|
|
497
|
+
/* @__PURE__ */ a(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
498
|
+
/* @__PURE__ */ a(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
499
|
+
/* @__PURE__ */ e(Ye, { children: E(
|
|
466
500
|
t.header_title,
|
|
467
|
-
|
|
501
|
+
L(s.start, A.MONTH_LONG)
|
|
468
502
|
) }),
|
|
469
|
-
!
|
|
503
|
+
!r && /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
|
|
470
504
|
/* @__PURE__ */ e(
|
|
471
|
-
|
|
505
|
+
ge,
|
|
472
506
|
{
|
|
473
507
|
color: "primary",
|
|
474
|
-
disabled:
|
|
475
|
-
onClick:
|
|
476
|
-
children: /* @__PURE__ */ e(
|
|
508
|
+
disabled: Ee,
|
|
509
|
+
onClick: Oe,
|
|
510
|
+
children: /* @__PURE__ */ e(He, {})
|
|
477
511
|
}
|
|
478
512
|
),
|
|
479
|
-
/* @__PURE__ */ e(
|
|
513
|
+
/* @__PURE__ */ e(ge, { color: "primary", onClick: Ne, children: /* @__PURE__ */ e(Ue, {}) })
|
|
480
514
|
] })
|
|
481
515
|
] }),
|
|
482
516
|
/* @__PURE__ */ e(
|
|
483
|
-
|
|
517
|
+
Re,
|
|
484
518
|
{
|
|
485
|
-
expected:
|
|
486
|
-
missed:
|
|
519
|
+
expected: l,
|
|
520
|
+
missed: h,
|
|
487
521
|
paid: y,
|
|
488
522
|
title: t.expenses,
|
|
489
|
-
total:
|
|
490
|
-
upcoming:
|
|
523
|
+
total: u.length,
|
|
524
|
+
upcoming: K
|
|
491
525
|
}
|
|
492
526
|
),
|
|
493
527
|
/* @__PURE__ */ e(
|
|
494
|
-
|
|
528
|
+
Re,
|
|
495
529
|
{
|
|
496
|
-
expected:
|
|
530
|
+
expected: m,
|
|
497
531
|
isExpense: !1,
|
|
498
|
-
paid:
|
|
532
|
+
paid: g,
|
|
499
533
|
title: t.deposits,
|
|
500
|
-
total:
|
|
501
|
-
upcoming:
|
|
534
|
+
total: p.length,
|
|
535
|
+
upcoming: Le
|
|
502
536
|
}
|
|
503
537
|
),
|
|
504
|
-
|
|
505
|
-
|
|
538
|
+
r && /* @__PURE__ */ e(
|
|
539
|
+
k,
|
|
506
540
|
{
|
|
507
|
-
onRecurrenceClick:
|
|
508
|
-
recurrences:
|
|
541
|
+
onRecurrenceClick: me,
|
|
542
|
+
recurrences: ue,
|
|
509
543
|
title: t.upcoming_activity
|
|
510
544
|
}
|
|
511
545
|
)
|
|
512
546
|
] }),
|
|
513
|
-
!
|
|
514
|
-
/* @__PURE__ */ a(
|
|
547
|
+
!r && /* @__PURE__ */ a(d, { sx: { px: o ? 0 : 24 }, children: [
|
|
548
|
+
/* @__PURE__ */ a(ze, { onChange: Ge, value: Y, variant: "fullWidth", children: [
|
|
515
549
|
/* @__PURE__ */ e(
|
|
516
|
-
|
|
550
|
+
he,
|
|
517
551
|
{
|
|
518
|
-
label: /* @__PURE__ */ e(
|
|
552
|
+
label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
|
|
519
553
|
}
|
|
520
554
|
),
|
|
521
555
|
/* @__PURE__ */ e(
|
|
522
|
-
|
|
556
|
+
he,
|
|
523
557
|
{
|
|
524
|
-
label: /* @__PURE__ */ e(
|
|
558
|
+
label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
|
|
525
559
|
}
|
|
526
560
|
)
|
|
527
561
|
] }),
|
|
528
|
-
|
|
529
|
-
|
|
562
|
+
Y === 0 && /* @__PURE__ */ e(
|
|
563
|
+
k,
|
|
530
564
|
{
|
|
531
|
-
onRecurrenceClick:
|
|
532
|
-
recurrences:
|
|
565
|
+
onRecurrenceClick: me,
|
|
566
|
+
recurrences: ue
|
|
533
567
|
}
|
|
534
568
|
),
|
|
535
|
-
|
|
536
|
-
|
|
569
|
+
Y === 1 && /* @__PURE__ */ e(
|
|
570
|
+
k,
|
|
537
571
|
{
|
|
538
|
-
onRecurrenceClick:
|
|
539
|
-
recurrences:
|
|
572
|
+
onRecurrenceClick: pe,
|
|
573
|
+
recurrences: b
|
|
540
574
|
}
|
|
541
575
|
)
|
|
542
576
|
] })
|
|
543
577
|
] }),
|
|
544
|
-
|
|
545
|
-
/* @__PURE__ */ e(
|
|
578
|
+
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ a(d, { gap: 24, children: [
|
|
579
|
+
/* @__PURE__ */ e(ve, {}),
|
|
546
580
|
/* @__PURE__ */ e(
|
|
547
|
-
|
|
581
|
+
k,
|
|
548
582
|
{
|
|
549
|
-
onRecurrenceClick:
|
|
550
|
-
recurrences:
|
|
551
|
-
title:
|
|
583
|
+
onRecurrenceClick: pe,
|
|
584
|
+
recurrences: j || b,
|
|
585
|
+
title: D ? E(
|
|
552
586
|
t.day_transactions,
|
|
553
|
-
|
|
587
|
+
L(D, A.MONTH_DAY)
|
|
554
588
|
) : t.past_transactions
|
|
555
589
|
}
|
|
556
590
|
)
|
|
@@ -558,131 +592,154 @@ const Q = {
|
|
|
558
592
|
]
|
|
559
593
|
}
|
|
560
594
|
);
|
|
561
|
-
}),
|
|
562
|
-
const { accounts:
|
|
563
|
-
return
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
595
|
+
}), Tn = C(({ onBackClick: t, sx: n = {} }) => {
|
|
596
|
+
const { accounts: r } = ne(), { recurring: i } = R(), { isInitialized: o, selectedAccountGuids: c, setSelectedAccounts: u } = B(), { isDataLoaded: p, loadRepeatingTransactionData: s, setDateRange: l } = _(), { setFilter: m } = re(), { onEvent: h } = F(), { onLoad: b } = et(), { isMobile: y } = oe(), [g, D] = x.useState(!1);
|
|
597
|
+
return x.useEffect(() => {
|
|
598
|
+
p || s().finally(() => {
|
|
599
|
+
b?.("RecurringTransactionsWidget");
|
|
600
|
+
});
|
|
601
|
+
}, []), x.useEffect(() => {
|
|
602
|
+
u(r);
|
|
603
|
+
}, [r]), x.useEffect(() => {
|
|
604
|
+
m({
|
|
605
|
+
dateRange: { start: Q(J(), 90), end: X() },
|
|
606
|
+
accounts: c
|
|
607
|
+
}), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) });
|
|
608
|
+
}, [c]), o ? /* @__PURE__ */ a(
|
|
609
|
+
nt,
|
|
572
610
|
{
|
|
573
|
-
accountOptions:
|
|
611
|
+
accountOptions: r,
|
|
574
612
|
actions: [
|
|
575
613
|
{
|
|
576
|
-
label:
|
|
614
|
+
label: i.action_title,
|
|
577
615
|
iconName: "credit_card_gear",
|
|
578
616
|
onClick: () => {
|
|
579
|
-
|
|
617
|
+
D(!0), h(I.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
580
618
|
}
|
|
581
619
|
}
|
|
582
620
|
],
|
|
583
621
|
hasDivider: y,
|
|
584
|
-
onAccountsFilterClick: () =>
|
|
622
|
+
onAccountsFilterClick: () => h(I.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
585
623
|
onBackClick: t,
|
|
586
624
|
sx: n,
|
|
587
|
-
title:
|
|
625
|
+
title: i.title,
|
|
588
626
|
children: [
|
|
589
|
-
|
|
590
|
-
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
591
|
-
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
592
|
-
/* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
|
|
593
|
-
] }),
|
|
627
|
+
p ? /* @__PURE__ */ e(ft, {}) : /* @__PURE__ */ e(Me, { variant: "list" }),
|
|
594
628
|
/* @__PURE__ */ e(
|
|
595
|
-
|
|
629
|
+
ie,
|
|
596
630
|
{
|
|
597
|
-
ariaLabelClose:
|
|
598
|
-
isOpen:
|
|
599
|
-
onClose: () =>
|
|
631
|
+
ariaLabelClose: i.close_drawer_aria,
|
|
632
|
+
isOpen: g,
|
|
633
|
+
onClose: () => D(!1),
|
|
600
634
|
shouldShowHeaderBorders: !1,
|
|
601
|
-
title:
|
|
602
|
-
children: /* @__PURE__ */ e(
|
|
635
|
+
title: i.action_title,
|
|
636
|
+
children: /* @__PURE__ */ e(De, {})
|
|
603
637
|
}
|
|
604
638
|
)
|
|
605
639
|
]
|
|
606
640
|
}
|
|
607
|
-
) : /* @__PURE__ */ e(
|
|
608
|
-
}),
|
|
609
|
-
const { recurring: t } =
|
|
610
|
-
return /* @__PURE__ */ a(
|
|
611
|
-
/* @__PURE__ */ e(
|
|
612
|
-
!
|
|
641
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
642
|
+
}), xt = C(() => {
|
|
643
|
+
const { recurring: t } = R(), { availableWidth: n } = Se(), { selectedDay: r, selectedDayRecurrences: i, setSelectedDay: o, upcomingRecurrences: c } = _(), u = n < 750;
|
|
644
|
+
return /* @__PURE__ */ a(d, { flexDirection: u ? "column" : "row", width: "100%", children: [
|
|
645
|
+
/* @__PURE__ */ e(ve, {}),
|
|
646
|
+
!u && /* @__PURE__ */ e(Z, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
613
647
|
/* @__PURE__ */ e(
|
|
614
|
-
|
|
648
|
+
k,
|
|
615
649
|
{
|
|
616
650
|
isMini: !0,
|
|
617
|
-
onResetClick:
|
|
618
|
-
recurrences:
|
|
619
|
-
sx: { width:
|
|
620
|
-
title:
|
|
651
|
+
onResetClick: r ? () => o(r) : void 0,
|
|
652
|
+
recurrences: i || c.slice(0, 5),
|
|
653
|
+
sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
654
|
+
title: r ? E(
|
|
621
655
|
t.day_transactions,
|
|
622
|
-
|
|
656
|
+
L(r, A.MONTH_DAY)
|
|
623
657
|
) : t.upcoming_activity
|
|
624
658
|
}
|
|
625
659
|
)
|
|
626
660
|
] });
|
|
627
|
-
}),
|
|
661
|
+
}), wn = C(
|
|
628
662
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
629
|
-
const { accounts:
|
|
630
|
-
return
|
|
631
|
-
|
|
632
|
-
}, [
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
663
|
+
const { accounts: r } = ne(), { recurring: i } = R(), { setFilter: o } = re(), { isDataLoaded: c, loadRepeatingTransactionData: u } = _(), { isInitialized: p, setSelectedAccounts: s, selectedAccountGuids: l } = B();
|
|
664
|
+
return x.useEffect(() => {
|
|
665
|
+
c || u().finally();
|
|
666
|
+
}, []), x.useEffect(() => {
|
|
667
|
+
s(r);
|
|
668
|
+
}, [r]), x.useEffect(() => {
|
|
669
|
+
l.length > 0 && o({
|
|
670
|
+
dateRange: { start: Q(J(), 90), end: X() },
|
|
671
|
+
accounts: l
|
|
672
|
+
});
|
|
673
|
+
}, [l]), p ? /* @__PURE__ */ e(
|
|
674
|
+
lt,
|
|
639
675
|
{
|
|
640
676
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
641
677
|
onPrimaryCtaClick: t,
|
|
642
|
-
primaryCtaLabel:
|
|
643
|
-
subTitle:
|
|
678
|
+
primaryCtaLabel: i.primary_cta,
|
|
679
|
+
subTitle: i.sub_title,
|
|
644
680
|
sx: n,
|
|
645
|
-
title:
|
|
646
|
-
children:
|
|
681
|
+
title: i.mini_title,
|
|
682
|
+
children: c ? /* @__PURE__ */ e(xt, {}) : /* @__PURE__ */ e(Me, { sx: { mx: 16 }, variant: "list" })
|
|
647
683
|
}
|
|
648
|
-
);
|
|
684
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
649
685
|
}
|
|
650
|
-
),
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
686
|
+
), bt = C(() => {
|
|
687
|
+
const { recurring: t } = R();
|
|
688
|
+
return /* @__PURE__ */ a(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
689
|
+
/* @__PURE__ */ e(je, { size: 32 }),
|
|
690
|
+
/* @__PURE__ */ a(d, { children: [
|
|
691
|
+
/* @__PURE__ */ e(V, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
692
|
+
/* @__PURE__ */ e(V, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
693
|
+
] })
|
|
694
|
+
] });
|
|
695
|
+
}), yt = ({
|
|
696
|
+
amount: t,
|
|
697
|
+
bgcolor: n,
|
|
698
|
+
isLargeScreen: r,
|
|
699
|
+
isSmallScreen: i,
|
|
700
|
+
label: o
|
|
701
|
+
}) => /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
702
|
+
/* @__PURE__ */ e(
|
|
703
|
+
G,
|
|
704
|
+
{
|
|
705
|
+
sx: {
|
|
706
|
+
borderRadius: "2px",
|
|
707
|
+
bgcolor: n,
|
|
708
|
+
height: 8,
|
|
709
|
+
width: 8
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
/* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
714
|
+
!i && /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: v(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
715
|
+
/* @__PURE__ */ e(f, { variant: "caption", children: o })
|
|
716
|
+
] })
|
|
717
|
+
] }), Ct = ({
|
|
661
718
|
upcomingRecurrences: t,
|
|
662
719
|
logoSize: n = 32,
|
|
663
|
-
maxLogos:
|
|
720
|
+
maxLogos: r = 3
|
|
664
721
|
}) => {
|
|
665
|
-
const
|
|
722
|
+
const i = (o) => o * (n / 2);
|
|
666
723
|
return /* @__PURE__ */ e(
|
|
667
|
-
|
|
724
|
+
G,
|
|
668
725
|
{
|
|
669
726
|
sx: {
|
|
670
727
|
position: "relative",
|
|
671
728
|
width: 64
|
|
672
729
|
},
|
|
673
|
-
children: t.map((o,
|
|
674
|
-
|
|
730
|
+
children: t.map((o, c) => c < r ? /* @__PURE__ */ e(
|
|
731
|
+
G,
|
|
675
732
|
{
|
|
676
733
|
sx: {
|
|
677
734
|
borderRadius: "4px",
|
|
678
|
-
left:
|
|
735
|
+
left: i(c),
|
|
679
736
|
outlineColor: "common.white",
|
|
680
737
|
outlineStyle: "solid",
|
|
681
738
|
outlineWidth: 2,
|
|
682
739
|
position: "absolute"
|
|
683
740
|
},
|
|
684
741
|
children: /* @__PURE__ */ e(
|
|
685
|
-
|
|
742
|
+
ee,
|
|
686
743
|
{
|
|
687
744
|
categoryGuid: o.categoryGuid || "",
|
|
688
745
|
merchantGuid: o.merchantGuid || "",
|
|
@@ -690,218 +747,185 @@ const Q = {
|
|
|
690
747
|
}
|
|
691
748
|
)
|
|
692
749
|
},
|
|
693
|
-
`${o.categoryGuid}-${o.merchantGuid}-${
|
|
750
|
+
`${o.categoryGuid}-${o.merchantGuid}-${c}`
|
|
694
751
|
) : null)
|
|
695
752
|
}
|
|
696
753
|
);
|
|
697
|
-
},
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
754
|
+
}, Rt = ({
|
|
755
|
+
upcomingRecurrences: t,
|
|
756
|
+
maxLogos: n = 3
|
|
757
|
+
}) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, i) => /* @__PURE__ */ e(
|
|
758
|
+
ee,
|
|
759
|
+
{
|
|
760
|
+
categoryGuid: r.categoryGuid || "",
|
|
761
|
+
merchantGuid: r.merchantGuid || ""
|
|
762
|
+
},
|
|
763
|
+
`${r.categoryGuid}-${r.merchantGuid}-${i}`
|
|
764
|
+
)) }), Dt = C(() => {
|
|
765
|
+
const t = te(), [n, { width: r }] = dt(), {
|
|
766
|
+
upcomingRecurrences: i,
|
|
767
|
+
expenseTotal: o,
|
|
768
|
+
missedExpenseTotal: c,
|
|
769
|
+
paidExpenseTotal: u,
|
|
770
|
+
upcomingExpenseTotal: p
|
|
771
|
+
} = _(), { recurring: s } = R(), l = r <= 288, m = r >= 450, h = 32, b = i.length > 0, y = x.useMemo(() => v(o, o === 0 ? "0,0" : "0,0.00"), [o]), g = x.useMemo(() => {
|
|
772
|
+
const S = [
|
|
773
|
+
{ color: t.palette.success.main, percentage: `${u / o}` }
|
|
774
|
+
];
|
|
775
|
+
return c && S.push({
|
|
776
|
+
color: t.palette.error.main,
|
|
777
|
+
percentage: `${c / o}`
|
|
778
|
+
}), S;
|
|
779
|
+
}, [
|
|
780
|
+
u,
|
|
781
|
+
o,
|
|
782
|
+
c,
|
|
783
|
+
t.palette.success.main,
|
|
784
|
+
t.palette.error.main
|
|
785
|
+
]), D = () => b ? l ? /* @__PURE__ */ e(
|
|
786
|
+
Ct,
|
|
706
787
|
{
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
height: 8,
|
|
711
|
-
width: 8
|
|
712
|
-
}
|
|
788
|
+
logoSize: h,
|
|
789
|
+
maxLogos: 3,
|
|
790
|
+
upcomingRecurrences: i.slice(0, 3)
|
|
713
791
|
}
|
|
714
|
-
),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
792
|
+
) : /* @__PURE__ */ e(Rt, { maxLogos: 3, upcomingRecurrences: i.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), j = [
|
|
793
|
+
{
|
|
794
|
+
amount: u,
|
|
795
|
+
bgColor: "success.main",
|
|
796
|
+
label: s.paid
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
amount: c,
|
|
800
|
+
bgColor: "error.main",
|
|
801
|
+
label: s.missed
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
amount: p,
|
|
805
|
+
bgColor: "neutral.light",
|
|
806
|
+
label: s.upcoming
|
|
807
|
+
}
|
|
808
|
+
];
|
|
809
|
+
return /* @__PURE__ */ a(P, { children: [
|
|
810
|
+
/* @__PURE__ */ a(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
811
|
+
/* @__PURE__ */ a(
|
|
812
|
+
d,
|
|
813
|
+
{
|
|
814
|
+
sx: [
|
|
815
|
+
y.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
816
|
+
{
|
|
817
|
+
alignItems: "baseline",
|
|
818
|
+
overflow: "hidden",
|
|
819
|
+
textOverflow: "ellipsis",
|
|
820
|
+
whiteSpace: "nowrap"
|
|
821
|
+
}
|
|
822
|
+
],
|
|
823
|
+
children: [
|
|
824
|
+
/* @__PURE__ */ e(
|
|
825
|
+
f,
|
|
826
|
+
{
|
|
827
|
+
sx: { width: "100%" },
|
|
828
|
+
variant: y.length >= 10 && l ? "h3" : "h2",
|
|
829
|
+
children: y
|
|
830
|
+
}
|
|
831
|
+
),
|
|
832
|
+
/* @__PURE__ */ e(V, { sx: { pr: 12 }, variant: "caption", children: s.expected })
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
),
|
|
836
|
+
D()
|
|
837
|
+
] }),
|
|
838
|
+
/* @__PURE__ */ a(d, { sx: { pt: 12 }, children: [
|
|
839
|
+
/* @__PURE__ */ e(Ie, { data: g }),
|
|
840
|
+
/* @__PURE__ */ e(
|
|
841
|
+
d,
|
|
842
|
+
{
|
|
843
|
+
sx: {
|
|
844
|
+
alignItems: "center",
|
|
845
|
+
flexDirection: "row",
|
|
846
|
+
gap: 16,
|
|
847
|
+
mt: 4
|
|
848
|
+
},
|
|
849
|
+
children: j.map((S, K) => /* @__PURE__ */ e(
|
|
850
|
+
yt,
|
|
851
|
+
{
|
|
852
|
+
amount: S.amount,
|
|
853
|
+
bgcolor: S.bgColor,
|
|
854
|
+
isLargeScreen: m,
|
|
855
|
+
isSmallScreen: l,
|
|
856
|
+
label: S.label
|
|
857
|
+
},
|
|
858
|
+
`recurrence-legend-${K}`
|
|
859
|
+
))
|
|
860
|
+
}
|
|
861
|
+
)
|
|
726
862
|
] })
|
|
727
863
|
] });
|
|
728
|
-
}),
|
|
864
|
+
}), Sn = C(
|
|
729
865
|
({ onCTAClick: t }) => {
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
upcomingRecurrences:
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
x(l);
|
|
743
|
-
}, [l]), h.useEffect(() => {
|
|
744
|
-
u && ($({
|
|
745
|
-
dateRange: { start: me(ue(), 90), end: de() },
|
|
746
|
-
accounts: f
|
|
747
|
-
}), te({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
748
|
-
}, [u]), h.useEffect(() => {
|
|
749
|
-
n && r(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
750
|
-
state: y.length > 0 ? "default" : "zeroState"
|
|
866
|
+
const { onEvent: n } = F(), { accounts: r } = ne(), { isInitialized: i, selectedAccountGuids: o, setSelectedAccounts: c } = B(), {
|
|
867
|
+
loadRepeatingTransactionData: u,
|
|
868
|
+
upcomingRecurrences: p,
|
|
869
|
+
repeatingTransactions: s,
|
|
870
|
+
setDateRange: l,
|
|
871
|
+
isDataLoaded: m
|
|
872
|
+
} = _(), { setFilter: h } = re(), { recurring: b, budgets: y } = R();
|
|
873
|
+
x.useEffect(() => {
|
|
874
|
+
m || u().finally(() => {
|
|
875
|
+
n(I.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
876
|
+
state: p.length > 0 ? "default" : "zeroState"
|
|
877
|
+
});
|
|
751
878
|
});
|
|
752
|
-
}, [
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
d,
|
|
764
|
-
b,
|
|
765
|
-
o.palette.success.main,
|
|
766
|
-
o.palette.error.main
|
|
767
|
-
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
|
|
768
|
-
r(
|
|
769
|
-
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
879
|
+
}, []), x.useEffect(() => {
|
|
880
|
+
i && c(r);
|
|
881
|
+
}, [i, r]), x.useEffect(() => {
|
|
882
|
+
i && (h({
|
|
883
|
+
dateRange: { start: Q(J(), 90), end: X() },
|
|
884
|
+
accounts: o
|
|
885
|
+
}), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) }));
|
|
886
|
+
}, [i, o]);
|
|
887
|
+
const g = () => {
|
|
888
|
+
n(
|
|
889
|
+
p.length > 0 ? I.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : I.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
770
890
|
), t();
|
|
771
891
|
};
|
|
772
|
-
if (!
|
|
773
|
-
const
|
|
774
|
-
Dt,
|
|
775
|
-
{
|
|
776
|
-
logoSize: R,
|
|
777
|
-
maxLogos: 3,
|
|
778
|
-
upcomingRecurrences: y.slice(0, 3)
|
|
779
|
-
}
|
|
780
|
-
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: v ? 64 : 104 } }), Be = [
|
|
781
|
-
{
|
|
782
|
-
amount: W,
|
|
783
|
-
bgColor: "success.main",
|
|
784
|
-
label: _.paid
|
|
785
|
-
},
|
|
786
|
-
{
|
|
787
|
-
amount: b,
|
|
788
|
-
bgColor: "error.main",
|
|
789
|
-
label: _.missed
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
amount: ne,
|
|
793
|
-
bgColor: "border.light",
|
|
794
|
-
label: _.upcoming
|
|
795
|
-
}
|
|
796
|
-
], De = !F?.length;
|
|
892
|
+
if (!i || !m) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
893
|
+
const D = !s?.length;
|
|
797
894
|
return /* @__PURE__ */ e(
|
|
798
|
-
|
|
895
|
+
ut,
|
|
799
896
|
{
|
|
800
897
|
className: "mx-recurring-transaction-microwidget",
|
|
801
|
-
ctaLabel:
|
|
802
|
-
onCTAClick:
|
|
803
|
-
title:
|
|
804
|
-
children:
|
|
805
|
-
/* @__PURE__ */ a(
|
|
806
|
-
c,
|
|
807
|
-
{
|
|
808
|
-
ref: m,
|
|
809
|
-
sx: {
|
|
810
|
-
flexDirection: "row",
|
|
811
|
-
justifyContent: "space-between"
|
|
812
|
-
},
|
|
813
|
-
children: [
|
|
814
|
-
/* @__PURE__ */ a(
|
|
815
|
-
c,
|
|
816
|
-
{
|
|
817
|
-
sx: [
|
|
818
|
-
P.length >= 10 && v ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
819
|
-
{
|
|
820
|
-
alignItems: "baseline",
|
|
821
|
-
overflow: "hidden",
|
|
822
|
-
textOverflow: "ellipsis",
|
|
823
|
-
whiteSpace: "nowrap"
|
|
824
|
-
}
|
|
825
|
-
],
|
|
826
|
-
children: [
|
|
827
|
-
/* @__PURE__ */ e(
|
|
828
|
-
p,
|
|
829
|
-
{
|
|
830
|
-
sx: { width: "100%" },
|
|
831
|
-
variant: P.length >= 10 && v ? "H3" : "H2",
|
|
832
|
-
children: P
|
|
833
|
-
}
|
|
834
|
-
),
|
|
835
|
-
/* @__PURE__ */ e(
|
|
836
|
-
ce,
|
|
837
|
-
{
|
|
838
|
-
sx: {
|
|
839
|
-
pr: 12
|
|
840
|
-
},
|
|
841
|
-
variant: "XSmall",
|
|
842
|
-
children: _.expected
|
|
843
|
-
}
|
|
844
|
-
)
|
|
845
|
-
]
|
|
846
|
-
}
|
|
847
|
-
),
|
|
848
|
-
Pe()
|
|
849
|
-
]
|
|
850
|
-
}
|
|
851
|
-
),
|
|
852
|
-
/* @__PURE__ */ a(c, { sx: { pt: 12 }, children: [
|
|
853
|
-
/* @__PURE__ */ e(We, { data: K }),
|
|
854
|
-
/* @__PURE__ */ e(
|
|
855
|
-
c,
|
|
856
|
-
{
|
|
857
|
-
sx: {
|
|
858
|
-
alignItems: "center",
|
|
859
|
-
flexDirection: "row",
|
|
860
|
-
gap: 16,
|
|
861
|
-
mt: 4
|
|
862
|
-
},
|
|
863
|
-
children: Be.map((G, He) => /* @__PURE__ */ e(
|
|
864
|
-
St,
|
|
865
|
-
{
|
|
866
|
-
amount: G.amount,
|
|
867
|
-
bgcolor: G.bgColor,
|
|
868
|
-
isLargeScreen: j,
|
|
869
|
-
isSmallScreen: v,
|
|
870
|
-
label: G.label
|
|
871
|
-
},
|
|
872
|
-
`recurrence-legend-${He}`
|
|
873
|
-
))
|
|
874
|
-
}
|
|
875
|
-
)
|
|
876
|
-
] })
|
|
877
|
-
] })
|
|
898
|
+
ctaLabel: D ? y.get_started_cta : b.primary_cta,
|
|
899
|
+
onCTAClick: g,
|
|
900
|
+
title: b.recurring_expenses,
|
|
901
|
+
children: D ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ e(Dt, {})
|
|
878
902
|
}
|
|
879
903
|
);
|
|
880
904
|
}
|
|
881
|
-
),
|
|
882
|
-
({ isOpen: t, onClose: n, selectedTab:
|
|
883
|
-
const { cashflow:
|
|
905
|
+
), _n = C(
|
|
906
|
+
({ isOpen: t, onClose: n, selectedTab: r }) => {
|
|
907
|
+
const { cashflow: i } = R();
|
|
884
908
|
return /* @__PURE__ */ e(
|
|
885
|
-
|
|
909
|
+
ie,
|
|
886
910
|
{
|
|
887
|
-
ariaLabelClose:
|
|
911
|
+
ariaLabelClose: i.close_settings_aria,
|
|
888
912
|
isOpen: t,
|
|
889
913
|
onClose: n,
|
|
890
|
-
title:
|
|
891
|
-
children: /* @__PURE__ */ e(
|
|
914
|
+
title: i.cashflow_settings,
|
|
915
|
+
children: /* @__PURE__ */ e(De, { defaultSelectedTab: r })
|
|
892
916
|
}
|
|
893
917
|
);
|
|
894
918
|
}
|
|
895
919
|
);
|
|
896
920
|
export {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
921
|
+
Gn as AddRecurringTransactionDetails,
|
|
922
|
+
vn as ManageExpenses,
|
|
923
|
+
Nn as ManageIncome,
|
|
924
|
+
De as RecurringSettings,
|
|
925
|
+
_n as RecurringSettingsDrawer,
|
|
926
|
+
Sn as RecurringTransactionsMicroWidget,
|
|
927
|
+
wn as RecurringTransactionsMiniWidget,
|
|
928
|
+
An as RecurringTransactionsStore,
|
|
929
|
+
Tn as RecurringTransactionsWidget,
|
|
930
|
+
On as SelectTransaction
|
|
907
931
|
};
|