@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,61 +1,60 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import f, { useState as
|
|
1
|
+
import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import f, { useState as J } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
|
-
import { addMonths as
|
|
5
|
-
import { startOfToday as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { addMonths as Pe } from "date-fns/addMonths";
|
|
5
|
+
import { startOfToday as H } from "date-fns/startOfToday";
|
|
6
|
+
import D from "@mui/material/Box";
|
|
7
|
+
import v from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import { Text as
|
|
11
|
-
import { G as
|
|
12
|
-
import { C as L } from "../CurrencyText-
|
|
13
|
-
import { u as
|
|
14
|
-
import { L as
|
|
15
|
-
import { I as
|
|
16
|
-
import { C as jn } from "../CashflowStore-
|
|
17
|
-
import { b as
|
|
18
|
-
import { M as
|
|
19
|
-
import { E as
|
|
20
|
-
import { R as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { getUnixTime as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { A as
|
|
27
|
-
import { f as Y,
|
|
28
|
-
import
|
|
29
|
-
import { f as
|
|
30
|
-
import { isAfter as
|
|
31
|
-
import { isBefore as
|
|
32
|
-
import { isToday as
|
|
33
|
-
import { addDays as
|
|
34
|
-
import { alpha as ot, keyframes as at } from "@mui/material/styles";
|
|
9
|
+
import { useTheme as se, alpha as qe, keyframes as Ye } from "@mui/material/styles";
|
|
10
|
+
import { Text as h, P as N, Icon as j, InstitutionLogo as xe, H1 as de, H2 as Qe } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Ve, v as me, u as k, q as ce, d as Le, b as q, j as P, g as ke, n as Xe, a as Ke, h as Ne, p as Je } from "../hooks-C41HAxM5.mjs";
|
|
12
|
+
import { C as L } from "../CurrencyText-Dr0EZ7bp.mjs";
|
|
13
|
+
import { u as ue } from "../useScreenSize-B5afALev.mjs";
|
|
14
|
+
import { L as te } from "../Loader-Ckqi9Rx6.mjs";
|
|
15
|
+
import { I as he } from "../CashflowStore-CA190BPF.mjs";
|
|
16
|
+
import { C as jn } from "../CashflowStore-CA190BPF.mjs";
|
|
17
|
+
import { b as $ } from "../Localization-2MODESHW.mjs";
|
|
18
|
+
import { M as Ze } from "../MiniWidgetContainer-CKzf_Ira.mjs";
|
|
19
|
+
import { E as et } from "../EmptyState-DoxNUae-.mjs";
|
|
20
|
+
import { R as tt } from "../RecurringSettings-DAncu--R.mjs";
|
|
21
|
+
import nt from "@mui/material/Tabs";
|
|
22
|
+
import ye from "@mui/material/Tab";
|
|
23
|
+
import { getUnixTime as B } from "date-fns/getUnixTime";
|
|
24
|
+
import ee from "@mui/material/List";
|
|
25
|
+
import ne from "@mui/material/ListItem";
|
|
26
|
+
import { A as ot } from "../AccountListItem-wgmlex-_.mjs";
|
|
27
|
+
import { f as Y, a as Q } from "../Dialog-CDV0kKxj.mjs";
|
|
28
|
+
import at from "@mui/material/ListSubheader";
|
|
29
|
+
import { f as Z } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
30
|
+
import { isAfter as Oe } from "date-fns/isAfter";
|
|
31
|
+
import { isBefore as Fe } from "date-fns/isBefore";
|
|
32
|
+
import { isToday as We } from "date-fns/isToday";
|
|
33
|
+
import { addDays as Ce } from "date-fns/addDays";
|
|
35
34
|
import { DataGridPro as it } from "@mui/x-data-grid-pro";
|
|
36
|
-
import { T as
|
|
35
|
+
import { T as _e } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
37
36
|
import G from "@mui/material/Button";
|
|
38
|
-
import { M as rt, S as st, i as ct, d as
|
|
39
|
-
import { D as
|
|
40
|
-
import {
|
|
37
|
+
import { M as rt, S as st, i as ct, d as we, c as lt } from "../ManageIncome-8EsStyIQ.mjs";
|
|
38
|
+
import { D as He } from "../Drawer-BF40nbsH.mjs";
|
|
39
|
+
import { subDays as Me } from "date-fns/subDays";
|
|
40
|
+
import { endOfToday as dt } from "date-fns/endOfToday";
|
|
41
|
+
import { W as mt, A as Se } from "../WidgetContainer-CDh9fjpR.mjs";
|
|
42
|
+
import { formatISO as ut } from "date-fns/formatISO";
|
|
41
43
|
import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
|
|
42
|
-
import { startOfMonth as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import { endOfToday as gt } from "date-fns/endOfToday";
|
|
48
|
-
import { W as Ae, A as Ee } from "../WidgetContainer-BHWANqT4.mjs";
|
|
49
|
-
import { F as bt, A as B } from "../Fetch-87LIQbEA.mjs";
|
|
44
|
+
import { startOfMonth as ht } from "date-fns/startOfMonth";
|
|
45
|
+
import { S as pt, c as ft } from "../TransactionDetails-Bn0qY5Hw.mjs";
|
|
46
|
+
import { F as gt, R as De, e as ve } from "../RecurringTransactions-CxcSL1dY.mjs";
|
|
47
|
+
import { h as bt } from "../DateUtil-CDPZw_-m.mjs";
|
|
48
|
+
import { F as xt, A as z } from "../Fetch-DecPFeGU.mjs";
|
|
50
49
|
const V = () => {
|
|
51
|
-
if (!f.useContext(
|
|
50
|
+
if (!f.useContext(Ve))
|
|
52
51
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
53
|
-
return
|
|
54
|
-
},
|
|
55
|
-
const { cashflow: n } =
|
|
56
|
-
return /* @__PURE__ */ o(
|
|
52
|
+
return me().uiStore;
|
|
53
|
+
}, yt = ({ remaining: a }) => {
|
|
54
|
+
const { cashflow: n } = k();
|
|
55
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
57
56
|
/* @__PURE__ */ e(
|
|
58
|
-
|
|
57
|
+
D,
|
|
59
58
|
{
|
|
60
59
|
sx: {
|
|
61
60
|
borderRadius: "1px",
|
|
@@ -65,86 +64,86 @@ const V = () => {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
69
68
|
/* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
|
|
70
69
|
] });
|
|
71
|
-
},
|
|
72
|
-
const a =
|
|
70
|
+
}, pe = T(yt), Ct = () => {
|
|
71
|
+
const a = se(), { availableWidth: n } = ce(), { isMobile: t } = ue(), { visibleCashAccounts: i, visibleCashBalance: g } = Le(), { selectedAccounts: x, selectedAccountGuids: u, setSelectedAccounts: c } = q(), { cashflow: m } = k(), {
|
|
73
72
|
daysUntilNextIncome: r,
|
|
74
|
-
expensesTilNextIncome:
|
|
75
|
-
selectedCashAccounts:
|
|
73
|
+
expensesTilNextIncome: l,
|
|
74
|
+
selectedCashAccounts: d,
|
|
76
75
|
setNextIncome: b,
|
|
77
76
|
setSelectedCashAccounts: C,
|
|
78
|
-
setUpcomingExpenses:
|
|
79
|
-
} = V(), { isDataLoaded:
|
|
77
|
+
setUpcomingExpenses: w
|
|
78
|
+
} = V(), { isDataLoaded: O, nextIncomeRecurrence: A, upcomingExpenses: F } = P();
|
|
80
79
|
f.useEffect(() => {
|
|
81
|
-
|
|
80
|
+
c(i);
|
|
82
81
|
}, [i]), f.useEffect(() => {
|
|
83
82
|
C(
|
|
84
|
-
i.filter((
|
|
83
|
+
i.filter((I) => u.includes(I.guid))
|
|
85
84
|
);
|
|
86
85
|
}, [i, x]), f.useEffect(() => {
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
const
|
|
90
|
-
() => i.filter((
|
|
91
|
-
[
|
|
86
|
+
A && b(A), w(F);
|
|
87
|
+
}, [A, F]);
|
|
88
|
+
const p = f.useMemo(
|
|
89
|
+
() => i.filter((I) => u.includes(I.guid)).reduce((I, M) => I + (M?.balance || 0), 0),
|
|
90
|
+
[u, F]
|
|
92
91
|
), S = f.useMemo(
|
|
93
|
-
() =>
|
|
94
|
-
[
|
|
95
|
-
),
|
|
96
|
-
() =>
|
|
97
|
-
[
|
|
92
|
+
() => l.filter((I) => u.includes(I.accountGuid || "")).reduce((I, M) => I + M.amount, 0),
|
|
93
|
+
[u, l]
|
|
94
|
+
), R = f.useMemo(
|
|
95
|
+
() => p - S,
|
|
96
|
+
[p, S]
|
|
98
97
|
);
|
|
99
|
-
return
|
|
98
|
+
return O ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
100
99
|
s,
|
|
101
100
|
{
|
|
102
|
-
border: `1px solid ${a.palette.
|
|
101
|
+
border: `1px solid ${a.palette.neutral.light}`,
|
|
103
102
|
borderRadius: 1,
|
|
104
103
|
direction: "row",
|
|
105
104
|
justifyContent: "space-between",
|
|
106
105
|
px: 24,
|
|
107
106
|
children: [
|
|
108
107
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
109
|
-
/* @__PURE__ */ e(L, { amount:
|
|
110
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
/* @__PURE__ */ e(L, { amount: p, variant: "h2" }),
|
|
109
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: $(
|
|
110
|
+
m.total_cash_accounts,
|
|
111
|
+
d.length
|
|
113
112
|
) })
|
|
114
113
|
] }),
|
|
115
114
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
|
|
116
115
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
117
|
-
/* @__PURE__ */ e(L, { amount: S, variant: "
|
|
118
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
116
|
+
/* @__PURE__ */ e(L, { amount: S, variant: "h2" }),
|
|
117
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: $(m.expenses_due, l.length) })
|
|
119
118
|
] }),
|
|
120
119
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
|
|
121
120
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
122
|
-
/* @__PURE__ */ e(L, { amount:
|
|
121
|
+
/* @__PURE__ */ e(L, { amount: R, variant: "h2" }),
|
|
123
122
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
124
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
125
|
-
/* @__PURE__ */ e(
|
|
123
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: m.available_to_spend }),
|
|
124
|
+
/* @__PURE__ */ e(he, { body: m.tooltip_body, title: m.tooltip_title })
|
|
126
125
|
] })
|
|
127
126
|
] }),
|
|
128
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
127
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.neutral.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
|
|
128
|
+
/* @__PURE__ */ e(h, { variant: "h2", children: $(m.days, r) }),
|
|
129
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: m.next_paycheck })
|
|
131
130
|
] }) })
|
|
132
131
|
]
|
|
133
132
|
}
|
|
134
|
-
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.
|
|
133
|
+
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.neutral.light}`, borderRadius: 1, children: [
|
|
135
134
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
136
|
-
/* @__PURE__ */ e(
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: $(
|
|
136
|
+
m.total_cash_accounts,
|
|
137
|
+
d.length
|
|
139
138
|
) }),
|
|
140
|
-
/* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "
|
|
139
|
+
/* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "caption" })
|
|
141
140
|
] }),
|
|
142
|
-
/* @__PURE__ */ e(
|
|
141
|
+
/* @__PURE__ */ e(v, {}),
|
|
143
142
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(L, { amount: S, bold: !0, symbol: "-", variant: "
|
|
143
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: $(m.expenses_due, l.length) }),
|
|
144
|
+
/* @__PURE__ */ e(L, { amount: S, bold: !0, symbol: "-", variant: "caption" })
|
|
146
145
|
] }),
|
|
147
|
-
/* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e(v, {}),
|
|
148
147
|
/* @__PURE__ */ e(
|
|
149
148
|
s,
|
|
150
149
|
{
|
|
@@ -156,38 +155,38 @@ const V = () => {
|
|
|
156
155
|
justifyContent: "space-between",
|
|
157
156
|
px: 16,
|
|
158
157
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
159
|
-
children: /* @__PURE__ */ e(
|
|
158
|
+
children: /* @__PURE__ */ e(pe, { remaining: R })
|
|
160
159
|
}
|
|
161
160
|
),
|
|
162
|
-
/* @__PURE__ */ e(
|
|
161
|
+
/* @__PURE__ */ e(v, {}),
|
|
163
162
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
/* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: m.next_paycheck }),
|
|
164
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: $(m.days, r) })
|
|
166
165
|
] })
|
|
167
|
-
] }) }) : /* @__PURE__ */ e(
|
|
168
|
-
},
|
|
166
|
+
] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
|
|
167
|
+
}, _t = T(Ct), wt = ({
|
|
169
168
|
onPrimaryCtaClick: a,
|
|
170
169
|
onSecondaryCtaClick: n,
|
|
171
170
|
sx: t = {}
|
|
172
171
|
}) => {
|
|
173
|
-
const { cashflow: i } =
|
|
172
|
+
const { cashflow: i } = k(), { isInitialized: g } = q(), { loadRepeatingTransactionData: x, income: u, isDataLoaded: c, setDateRange: m } = P();
|
|
174
173
|
f.useEffect(() => {
|
|
175
|
-
|
|
176
|
-
}, [
|
|
177
|
-
const
|
|
174
|
+
m({ start: H(), end: Pe(H(), 1) }), c || x().finally();
|
|
175
|
+
}, []);
|
|
176
|
+
const r = c && !u.length;
|
|
178
177
|
return g ? /* @__PURE__ */ o(
|
|
179
|
-
|
|
178
|
+
Ze,
|
|
180
179
|
{
|
|
181
180
|
className: "mx-exp-cashflow-miniwidget",
|
|
182
181
|
onPrimaryCtaClick: a,
|
|
183
182
|
primaryCtaLabel: i.primary_cta,
|
|
184
|
-
subTitle:
|
|
185
|
-
sx: t,
|
|
183
|
+
subTitle: r || !c ? void 0 : i.sub_title,
|
|
184
|
+
sx: { height: "100%", ...t },
|
|
186
185
|
title: i.title,
|
|
187
186
|
children: [
|
|
188
|
-
!c && /* @__PURE__ */ e(
|
|
189
|
-
c && (
|
|
190
|
-
|
|
187
|
+
!c && /* @__PURE__ */ e(te, {}),
|
|
188
|
+
c && (r ? /* @__PURE__ */ e(
|
|
189
|
+
et,
|
|
191
190
|
{
|
|
192
191
|
header: i.create,
|
|
193
192
|
icon: "local_atm",
|
|
@@ -196,12 +195,12 @@ const V = () => {
|
|
|
196
195
|
primaryButtonStartIcon: "add",
|
|
197
196
|
subText: i.create_description
|
|
198
197
|
}
|
|
199
|
-
) : /* @__PURE__ */ e(
|
|
198
|
+
) : /* @__PURE__ */ e(_t, {}))
|
|
200
199
|
]
|
|
201
200
|
}
|
|
202
|
-
) : /* @__PURE__ */ e(
|
|
203
|
-
}, Fn = T(
|
|
204
|
-
|
|
201
|
+
) : /* @__PURE__ */ e(te, {});
|
|
202
|
+
}, Fn = T(wt), St = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
203
|
+
ne,
|
|
205
204
|
{
|
|
206
205
|
sx: {
|
|
207
206
|
alignItems: "center",
|
|
@@ -213,17 +212,17 @@ const V = () => {
|
|
|
213
212
|
borderBottomRightRadius: "3px",
|
|
214
213
|
minHeight: "auto"
|
|
215
214
|
},
|
|
216
|
-
children: /* @__PURE__ */ e(
|
|
215
|
+
children: /* @__PURE__ */ e(pe, { remaining: a })
|
|
217
216
|
}
|
|
218
217
|
);
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
/* @__PURE__ */ o(
|
|
218
|
+
var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(oe || {});
|
|
219
|
+
const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
220
|
+
/* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
222
221
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
223
|
-
/* @__PURE__ */ e(
|
|
224
|
-
/* @__PURE__ */ e(
|
|
222
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
|
|
223
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.DAY) })
|
|
225
224
|
] }),
|
|
226
|
-
/* @__PURE__ */ e(
|
|
225
|
+
/* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
227
226
|
/* @__PURE__ */ e(
|
|
228
227
|
L,
|
|
229
228
|
{
|
|
@@ -233,12 +232,12 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
233
232
|
}
|
|
234
233
|
)
|
|
235
234
|
] }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
] }),
|
|
238
|
-
const { cashflow: t } =
|
|
239
|
-
return /* @__PURE__ */ o(
|
|
235
|
+
/* @__PURE__ */ e(v, {})
|
|
236
|
+
] }), Ae = T(It), Dt = ({ total: a, type: n }) => {
|
|
237
|
+
const { cashflow: t } = k();
|
|
238
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
240
239
|
/* @__PURE__ */ o(
|
|
241
|
-
|
|
240
|
+
at,
|
|
242
241
|
{
|
|
243
242
|
sx: {
|
|
244
243
|
alignItems: "center",
|
|
@@ -250,52 +249,52 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
250
249
|
px: 24
|
|
251
250
|
},
|
|
252
251
|
children: [
|
|
253
|
-
/* @__PURE__ */ e(
|
|
254
|
-
/* @__PURE__ */ o(
|
|
255
|
-
n ===
|
|
256
|
-
|
|
252
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
|
|
253
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
254
|
+
n === oe.EXPENSE ? "-" : "+",
|
|
255
|
+
Z(a, "0,0.00")
|
|
257
256
|
] })
|
|
258
257
|
]
|
|
259
258
|
}
|
|
260
259
|
),
|
|
261
|
-
/* @__PURE__ */ e(
|
|
260
|
+
/* @__PURE__ */ e(v, {})
|
|
262
261
|
] });
|
|
263
|
-
},
|
|
264
|
-
const { availableWidth: a } =
|
|
262
|
+
}, Ee = T(Dt), re = (a, n) => (t) => t.accountGuid === a.guid && (We(t.expectedDate) || Oe(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), vt = () => {
|
|
263
|
+
const { availableWidth: a } = ce(), { cashflow: n } = k(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: x } = V();
|
|
265
264
|
return /* @__PURE__ */ o(s, { children: [
|
|
266
265
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
267
|
-
/* @__PURE__ */ e(
|
|
268
|
-
/* @__PURE__ */ o(
|
|
266
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
267
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
269
268
|
Y(g.start, Q.FULL_MONTH_DAY),
|
|
270
269
|
" -",
|
|
271
270
|
" ",
|
|
272
271
|
Y(g.end, Q.FULL_MONTH_DAY)
|
|
273
272
|
] })
|
|
274
273
|
] }),
|
|
275
|
-
/* @__PURE__ */ e(s, { children: x.map((
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
), r =
|
|
279
|
-
(
|
|
274
|
+
/* @__PURE__ */ e(s, { children: x.map((u) => {
|
|
275
|
+
const c = i.filter(re(u, g)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), m = t.filter(
|
|
276
|
+
re(u, g)
|
|
277
|
+
), r = c.reduce(
|
|
278
|
+
(d, b) => d + b.amount,
|
|
280
279
|
0
|
|
281
|
-
),
|
|
282
|
-
(
|
|
280
|
+
), l = m.reduce(
|
|
281
|
+
(d, b) => d + b.amount,
|
|
283
282
|
0
|
|
284
283
|
);
|
|
285
284
|
return /* @__PURE__ */ o(
|
|
286
|
-
|
|
285
|
+
ee,
|
|
287
286
|
{
|
|
288
287
|
sx: {
|
|
289
288
|
border: "1px solid",
|
|
290
|
-
borderColor: "
|
|
289
|
+
borderColor: "neutral.light",
|
|
291
290
|
mb: 24,
|
|
292
291
|
borderRadius: 1
|
|
293
292
|
},
|
|
294
293
|
children: [
|
|
295
294
|
/* @__PURE__ */ e(
|
|
296
|
-
|
|
295
|
+
ot,
|
|
297
296
|
{
|
|
298
|
-
account:
|
|
297
|
+
account: u,
|
|
299
298
|
listItemProps: {
|
|
300
299
|
disableGutters: !1,
|
|
301
300
|
disablePadding: !1,
|
|
@@ -303,53 +302,53 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
303
302
|
}
|
|
304
303
|
}
|
|
305
304
|
),
|
|
306
|
-
/* @__PURE__ */ e(
|
|
307
|
-
|
|
308
|
-
|
|
305
|
+
/* @__PURE__ */ e(v, {}),
|
|
306
|
+
c.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
307
|
+
ee,
|
|
309
308
|
{
|
|
310
|
-
subheader: /* @__PURE__ */ e(
|
|
309
|
+
subheader: /* @__PURE__ */ e(Ee, { total: r, type: oe.INCOME }),
|
|
311
310
|
sx: { width: "100%" },
|
|
312
|
-
children:
|
|
311
|
+
children: c.map((d) => /* @__PURE__ */ e(Ae, { recurrence: d }, d.repeatingTransactionGuid))
|
|
313
312
|
}
|
|
314
313
|
) }),
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
m.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
315
|
+
ee,
|
|
317
316
|
{
|
|
318
|
-
subheader: /* @__PURE__ */ e(
|
|
317
|
+
subheader: /* @__PURE__ */ e(Ee, { total: l, type: oe.EXPENSE }),
|
|
319
318
|
sx: { width: "100%" },
|
|
320
|
-
children:
|
|
319
|
+
children: m.map((d) => /* @__PURE__ */ e(Ae, { recurrence: d }, d.repeatingTransactionGuid))
|
|
321
320
|
}
|
|
322
321
|
) }),
|
|
323
322
|
/* @__PURE__ */ e(
|
|
324
|
-
|
|
323
|
+
St,
|
|
325
324
|
{
|
|
326
|
-
remaining: (
|
|
325
|
+
remaining: (u.available_balance || u.balance || 0) + r - l
|
|
327
326
|
}
|
|
328
327
|
)
|
|
329
328
|
]
|
|
330
329
|
},
|
|
331
|
-
|
|
330
|
+
u.guid
|
|
332
331
|
);
|
|
333
332
|
}) })
|
|
334
333
|
] });
|
|
335
|
-
},
|
|
336
|
-
const { availableWidth: a } =
|
|
334
|
+
}, At = T(vt), Et = () => {
|
|
335
|
+
const { availableWidth: a } = ce(), n = se(), { cashflow: t } = k(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: x, selectedCashAccounts: u } = V(), c = [
|
|
337
336
|
{
|
|
338
337
|
field: "account",
|
|
339
338
|
flex: 1.5,
|
|
340
339
|
headerName: t.accounts,
|
|
341
|
-
renderCell: ({ value: { name: r, nickname:
|
|
342
|
-
const C =
|
|
340
|
+
renderCell: ({ value: { name: r, nickname: l, institution_guid: d, account_number: b } }) => {
|
|
341
|
+
const C = l || r;
|
|
343
342
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
344
343
|
/* @__PURE__ */ e(
|
|
345
|
-
|
|
344
|
+
xe,
|
|
346
345
|
{
|
|
347
346
|
alt: t.institution_logo,
|
|
348
|
-
institutionGuid:
|
|
347
|
+
institutionGuid: d || "",
|
|
349
348
|
size: 16
|
|
350
349
|
}
|
|
351
350
|
),
|
|
352
|
-
/* @__PURE__ */ e(
|
|
351
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: `${C} ${b ? `*${b}` : ""}` })
|
|
353
352
|
] });
|
|
354
353
|
}
|
|
355
354
|
},
|
|
@@ -358,21 +357,21 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
358
357
|
flex: 1,
|
|
359
358
|
headerName: t.balance,
|
|
360
359
|
type: "number",
|
|
361
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
360
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "body2", children: Z(r.value, "0,0.00") })
|
|
362
361
|
},
|
|
363
362
|
{
|
|
364
363
|
field: "income",
|
|
365
364
|
flex: 1,
|
|
366
365
|
headerName: t.projected_income,
|
|
367
366
|
type: "number",
|
|
368
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
367
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "body2", children: `+${Z(r.value, "0,0.00")}` })
|
|
369
368
|
},
|
|
370
369
|
{
|
|
371
370
|
field: "expenses",
|
|
372
371
|
flex: 1.1,
|
|
373
372
|
headerName: t.projected_expenses,
|
|
374
373
|
type: "number",
|
|
375
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
374
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "body2", children: `-${Z(r.value, "0,0.00")}` })
|
|
376
375
|
},
|
|
377
376
|
{
|
|
378
377
|
field: "remaining",
|
|
@@ -380,34 +379,34 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
380
379
|
headerName: t.remaining,
|
|
381
380
|
type: "number",
|
|
382
381
|
renderCell: (r) => {
|
|
383
|
-
const
|
|
382
|
+
const l = r.row.balance + r.row.income - r.row.expenses;
|
|
384
383
|
return /* @__PURE__ */ e(
|
|
385
|
-
|
|
384
|
+
h,
|
|
386
385
|
{
|
|
387
|
-
color: Math.sign(
|
|
388
|
-
variant: "
|
|
389
|
-
children:
|
|
386
|
+
color: Math.sign(l) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
387
|
+
variant: "body2",
|
|
388
|
+
children: Z(l, "0,0.00")
|
|
390
389
|
}
|
|
391
390
|
);
|
|
392
391
|
}
|
|
393
392
|
}
|
|
394
|
-
],
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
).reduce((C,
|
|
398
|
-
|
|
399
|
-
).reduce((C,
|
|
393
|
+
], m = f.useMemo(() => u.map((r) => {
|
|
394
|
+
const l = i.filter(
|
|
395
|
+
re(r, { start: H(), end: Ce(H(), 30) })
|
|
396
|
+
).reduce((C, w) => C + w.amount, 0), d = g.filter(
|
|
397
|
+
re(r, { start: H(), end: Ce(H(), 30) })
|
|
398
|
+
).reduce((C, w) => C + w.amount, 0), b = (r.balance || 0) + d - l;
|
|
400
399
|
return {
|
|
401
400
|
account: r,
|
|
402
401
|
balance: r.balance || 0,
|
|
403
402
|
id: r.guid,
|
|
404
|
-
income:
|
|
405
|
-
expenses:
|
|
403
|
+
income: d,
|
|
404
|
+
expenses: l,
|
|
406
405
|
remaining: b
|
|
407
406
|
};
|
|
408
|
-
}), [
|
|
407
|
+
}), [u, i, g]);
|
|
409
408
|
return /* @__PURE__ */ o(
|
|
410
|
-
|
|
409
|
+
D,
|
|
411
410
|
{
|
|
412
411
|
sx: {
|
|
413
412
|
width: "100%"
|
|
@@ -422,7 +421,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
422
421
|
children: [
|
|
423
422
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
424
423
|
/* @__PURE__ */ e(
|
|
425
|
-
|
|
424
|
+
h,
|
|
426
425
|
{
|
|
427
426
|
bold: !0,
|
|
428
427
|
sx: {
|
|
@@ -433,14 +432,14 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
433
432
|
}
|
|
434
433
|
),
|
|
435
434
|
/* @__PURE__ */ e(
|
|
436
|
-
|
|
435
|
+
he,
|
|
437
436
|
{
|
|
438
437
|
body: t.table_tooltip_body,
|
|
439
438
|
title: t.table_tooltip_title
|
|
440
439
|
}
|
|
441
440
|
)
|
|
442
441
|
] }),
|
|
443
|
-
/* @__PURE__ */ o(
|
|
442
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
444
443
|
Y(x.start, Q.FULL_MONTH_DAY),
|
|
445
444
|
" -",
|
|
446
445
|
" ",
|
|
@@ -453,21 +452,21 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
453
452
|
it,
|
|
454
453
|
{
|
|
455
454
|
columnHeaderHeight: 48,
|
|
456
|
-
columns:
|
|
455
|
+
columns: c,
|
|
457
456
|
density: "standard",
|
|
458
457
|
disableColumnMenu: !0,
|
|
459
458
|
disableRowSelectionOnClick: !0,
|
|
460
459
|
hideFooter: !0,
|
|
461
460
|
rowHeight: 48,
|
|
462
|
-
rows:
|
|
461
|
+
rows: m,
|
|
463
462
|
sx: {
|
|
464
463
|
border: "1px solid",
|
|
465
|
-
borderColor: "
|
|
464
|
+
borderColor: "neutral.light",
|
|
466
465
|
borderRadius: 1,
|
|
467
466
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
468
467
|
color: n.palette.primary.main,
|
|
469
468
|
"&:hover": {
|
|
470
|
-
backgroundColor:
|
|
469
|
+
backgroundColor: qe(n.palette.primary.main, 0.1)
|
|
471
470
|
}
|
|
472
471
|
},
|
|
473
472
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
@@ -479,18 +478,18 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
479
478
|
}
|
|
480
479
|
}
|
|
481
480
|
}
|
|
482
|
-
) :
|
|
483
|
-
const { name:
|
|
481
|
+
) : m.map((r) => {
|
|
482
|
+
const { name: l, nickname: d, institution_guid: b, account_number: C } = r.account, w = d || l;
|
|
484
483
|
return /* @__PURE__ */ e(
|
|
485
|
-
|
|
484
|
+
ee,
|
|
486
485
|
{
|
|
487
486
|
sx: {
|
|
488
487
|
border: "1px solid",
|
|
489
|
-
borderColor: "
|
|
488
|
+
borderColor: "neutral.light",
|
|
490
489
|
borderRadius: 1,
|
|
491
490
|
marginBottom: 24
|
|
492
491
|
},
|
|
493
|
-
children: /* @__PURE__ */ e(
|
|
492
|
+
children: /* @__PURE__ */ e(ne, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
|
|
494
493
|
/* @__PURE__ */ o(
|
|
495
494
|
s,
|
|
496
495
|
{
|
|
@@ -502,20 +501,20 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
502
501
|
children: [
|
|
503
502
|
/* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
|
|
504
503
|
/* @__PURE__ */ e(
|
|
505
|
-
|
|
504
|
+
xe,
|
|
506
505
|
{
|
|
507
506
|
alt: t.institution_logo,
|
|
508
507
|
institutionGuid: b || "",
|
|
509
508
|
size: 16
|
|
510
509
|
}
|
|
511
510
|
),
|
|
512
|
-
/* @__PURE__ */ e(
|
|
511
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: `${w} ${C ? `*${C}` : ""}` })
|
|
513
512
|
] }),
|
|
514
|
-
/* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "
|
|
513
|
+
/* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "body2" })
|
|
515
514
|
]
|
|
516
515
|
}
|
|
517
516
|
),
|
|
518
|
-
/* @__PURE__ */ e(
|
|
517
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
519
518
|
/* @__PURE__ */ o(
|
|
520
519
|
s,
|
|
521
520
|
{
|
|
@@ -525,12 +524,12 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
525
524
|
px: 16,
|
|
526
525
|
py: 12,
|
|
527
526
|
children: [
|
|
528
|
-
/* @__PURE__ */ e(
|
|
529
|
-
/* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "
|
|
527
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: t.projected_income }),
|
|
528
|
+
/* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "body2" })
|
|
530
529
|
]
|
|
531
530
|
}
|
|
532
531
|
),
|
|
533
|
-
/* @__PURE__ */ e(
|
|
532
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
534
533
|
/* @__PURE__ */ o(
|
|
535
534
|
s,
|
|
536
535
|
{
|
|
@@ -540,12 +539,12 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
540
539
|
px: 16,
|
|
541
540
|
py: 12,
|
|
542
541
|
children: [
|
|
543
|
-
/* @__PURE__ */ e(
|
|
544
|
-
/* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "
|
|
542
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: t.projected_expenses }),
|
|
543
|
+
/* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "body2" })
|
|
545
544
|
]
|
|
546
545
|
}
|
|
547
546
|
),
|
|
548
|
-
/* @__PURE__ */ e(
|
|
547
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
549
548
|
/* @__PURE__ */ e(
|
|
550
549
|
s,
|
|
551
550
|
{
|
|
@@ -557,7 +556,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
557
556
|
px: 16,
|
|
558
557
|
py: 12,
|
|
559
558
|
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
560
|
-
children: /* @__PURE__ */ e(
|
|
559
|
+
children: /* @__PURE__ */ e(pe, { remaining: r.remaining })
|
|
561
560
|
}
|
|
562
561
|
)
|
|
563
562
|
] }) })
|
|
@@ -568,15 +567,15 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
568
567
|
]
|
|
569
568
|
}
|
|
570
569
|
);
|
|
571
|
-
},
|
|
572
|
-
const { cashflow: a } =
|
|
573
|
-
g(
|
|
570
|
+
}, Tt = T(Et), Rt = () => {
|
|
571
|
+
const { cashflow: a } = k(), { isDesktop: n } = ue(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (u, c) => {
|
|
572
|
+
g(c);
|
|
574
573
|
};
|
|
575
574
|
return f.useEffect(() => {
|
|
576
575
|
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
577
|
-
}, [i]), /* @__PURE__ */ o(
|
|
576
|
+
}, [i]), /* @__PURE__ */ o(D, { children: [
|
|
578
577
|
/* @__PURE__ */ o(
|
|
579
|
-
|
|
578
|
+
nt,
|
|
580
579
|
{
|
|
581
580
|
"aria-label": a.cashflow_summary_and_details,
|
|
582
581
|
centered: !0,
|
|
@@ -586,7 +585,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
586
585
|
variant: "fullWidth",
|
|
587
586
|
children: [
|
|
588
587
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
588
|
+
ye,
|
|
590
589
|
{
|
|
591
590
|
"aria-controls": "cashflow-tabpanel-0",
|
|
592
591
|
id: "cashflow-tab-0",
|
|
@@ -597,7 +596,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
597
596
|
}
|
|
598
597
|
),
|
|
599
598
|
/* @__PURE__ */ e(
|
|
600
|
-
|
|
599
|
+
ye,
|
|
601
600
|
{
|
|
602
601
|
"aria-controls": "cashflow-tabpanel-1",
|
|
603
602
|
id: "cashflow-tab-1",
|
|
@@ -610,11 +609,11 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
610
609
|
]
|
|
611
610
|
}
|
|
612
611
|
),
|
|
613
|
-
/* @__PURE__ */ e(
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
/* @__PURE__ */ e(
|
|
612
|
+
/* @__PURE__ */ e(D, { sx: { mb: 32 } }),
|
|
613
|
+
/* @__PURE__ */ e(_e, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
|
|
614
|
+
/* @__PURE__ */ e(_e, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
|
|
616
615
|
] });
|
|
617
|
-
},
|
|
616
|
+
}, Lt = T(Rt), ie = ({
|
|
618
617
|
amount: a,
|
|
619
618
|
isMobile: n = !1,
|
|
620
619
|
isTotal: t = !1,
|
|
@@ -630,85 +629,85 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
630
629
|
padding: n ? "14px 16px" : 0,
|
|
631
630
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
632
631
|
children: [
|
|
633
|
-
!n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "
|
|
632
|
+
!n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "h2" }),
|
|
634
633
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
635
|
-
/* @__PURE__ */ e(
|
|
634
|
+
/* @__PURE__ */ e(h, { bold: t, variant: "body2", children: i }),
|
|
636
635
|
x
|
|
637
636
|
] }),
|
|
638
|
-
n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "
|
|
637
|
+
n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "body2" })
|
|
639
638
|
]
|
|
640
639
|
}
|
|
641
|
-
),
|
|
642
|
-
const { availableWidth: a } =
|
|
643
|
-
() => g.filter(
|
|
644
|
-
[
|
|
640
|
+
), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (We(t.expectedDate) || Oe(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), kt = () => {
|
|
641
|
+
const { availableWidth: a } = ce(), { cashflow: n } = k(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = P(), { selectedAccountGuids: u } = q(), { dateRange: c, selectedCashAccounts: m } = V(), [r, l] = f.useState(!1), d = f.useMemo(
|
|
642
|
+
() => g.filter(Te(u, c)),
|
|
643
|
+
[c, u, g]
|
|
645
644
|
), b = f.useMemo(
|
|
646
|
-
() => x.filter(
|
|
647
|
-
[
|
|
645
|
+
() => x.filter(Te(u, c)),
|
|
646
|
+
[c, u, x]
|
|
648
647
|
), C = f.useMemo(
|
|
649
|
-
() =>
|
|
650
|
-
[
|
|
651
|
-
),
|
|
652
|
-
return /* @__PURE__ */ o(s, { sx: { mx:
|
|
648
|
+
() => m.reduce((S, R) => S + (R?.balance || 0), 0),
|
|
649
|
+
[m]
|
|
650
|
+
), w = d.reduce((S, R) => S + R.amount, 0), O = b.reduce((S, R) => S + R.amount, 0), A = C - w + O, F = i && t.length > 0, p = a < 725;
|
|
651
|
+
return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
653
652
|
/* @__PURE__ */ o(
|
|
654
653
|
s,
|
|
655
654
|
{
|
|
656
|
-
border:
|
|
657
|
-
borderColor: "
|
|
655
|
+
border: p ? "1px solid" : "none",
|
|
656
|
+
borderColor: "neutral.light",
|
|
658
657
|
borderRadius: 2,
|
|
659
|
-
flexDirection:
|
|
660
|
-
gap:
|
|
658
|
+
flexDirection: p ? "column" : "row",
|
|
659
|
+
gap: p ? 0 : 24,
|
|
661
660
|
justifyContent: "center",
|
|
662
661
|
children: [
|
|
663
662
|
/* @__PURE__ */ e(
|
|
664
|
-
|
|
663
|
+
ie,
|
|
665
664
|
{
|
|
666
665
|
amount: C,
|
|
667
|
-
isMobile:
|
|
668
|
-
label:
|
|
666
|
+
isMobile: p,
|
|
667
|
+
label: $(n.cash_and_bank, m.length)
|
|
669
668
|
}
|
|
670
669
|
),
|
|
671
|
-
|
|
672
|
-
F ? /* @__PURE__ */ o(
|
|
673
|
-
!
|
|
670
|
+
p && /* @__PURE__ */ e(v, {}),
|
|
671
|
+
F ? /* @__PURE__ */ o(U, { children: [
|
|
672
|
+
!p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
674
673
|
/* @__PURE__ */ e(
|
|
675
|
-
|
|
674
|
+
ie,
|
|
676
675
|
{
|
|
677
|
-
amount:
|
|
678
|
-
isMobile:
|
|
676
|
+
amount: O,
|
|
677
|
+
isMobile: p,
|
|
679
678
|
label: n.to_be_received,
|
|
680
|
-
symbol:
|
|
679
|
+
symbol: p ? "+" : void 0
|
|
681
680
|
}
|
|
682
681
|
)
|
|
683
682
|
] }) : /* @__PURE__ */ e(
|
|
684
683
|
G,
|
|
685
684
|
{
|
|
686
|
-
onClick: () =>
|
|
685
|
+
onClick: () => l(!0),
|
|
687
686
|
startIcon: /* @__PURE__ */ e(j, { name: "add" }),
|
|
688
687
|
sx: { fontSize: 13 },
|
|
689
688
|
children: n.add_income
|
|
690
689
|
}
|
|
691
690
|
),
|
|
692
|
-
|
|
691
|
+
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
693
692
|
/* @__PURE__ */ e(
|
|
694
|
-
|
|
693
|
+
ie,
|
|
695
694
|
{
|
|
696
|
-
amount:
|
|
697
|
-
isMobile:
|
|
698
|
-
label:
|
|
699
|
-
symbol:
|
|
695
|
+
amount: w,
|
|
696
|
+
isMobile: p,
|
|
697
|
+
label: $(n.to_be_paid_out, d.length),
|
|
698
|
+
symbol: p ? "-" : void 0
|
|
700
699
|
}
|
|
701
700
|
),
|
|
702
|
-
|
|
701
|
+
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
703
702
|
/* @__PURE__ */ e(
|
|
704
|
-
|
|
703
|
+
ie,
|
|
705
704
|
{
|
|
706
|
-
amount:
|
|
707
|
-
isMobile:
|
|
708
|
-
isTotal:
|
|
705
|
+
amount: A,
|
|
706
|
+
isMobile: p,
|
|
707
|
+
isTotal: p,
|
|
709
708
|
label: n.remaining_cash,
|
|
710
709
|
tooltip: /* @__PURE__ */ e(
|
|
711
|
-
|
|
710
|
+
he,
|
|
712
711
|
{
|
|
713
712
|
body: n.remaining_income_tooltip_body,
|
|
714
713
|
title: n.remaining_income_tooltip_title
|
|
@@ -720,28 +719,93 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
720
719
|
}
|
|
721
720
|
),
|
|
722
721
|
/* @__PURE__ */ e(
|
|
723
|
-
|
|
722
|
+
He,
|
|
724
723
|
{
|
|
725
724
|
ariaLabelClose: n.close_manage_income_aria,
|
|
726
725
|
isOpen: r,
|
|
727
|
-
onClose: () =>
|
|
726
|
+
onClose: () => l(!1),
|
|
728
727
|
shouldShowHeaderBorders: !1,
|
|
729
728
|
title: n.manage_income,
|
|
730
729
|
children: /* @__PURE__ */ e(rt, {})
|
|
731
730
|
}
|
|
732
731
|
)
|
|
733
732
|
] });
|
|
734
|
-
},
|
|
735
|
-
const {
|
|
733
|
+
}, Nt = T(kt), Ot = ({ onBackClick: a, sx: n = {} }) => {
|
|
734
|
+
const {
|
|
735
|
+
selectedAccounts: t,
|
|
736
|
+
selectedAccountGuids: i,
|
|
737
|
+
setSelectedAccounts: g,
|
|
738
|
+
shouldDisableNextDate: x,
|
|
739
|
+
shouldDisablePrevDate: u
|
|
740
|
+
} = q(), { onEvent: c } = ke(), { onLoad: m } = Xe(), { clientConfig: r } = Ke(), { visibleCashAccounts: l } = Le(), { setFilter: d } = Ne(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactionData: w, isDataLoaded: O, setDateRange: A } = P(), { cashflow: F, recurring: p } = k(), { isInitialized: S } = q(), I = r?.master?.deep_link_params?.view === "manage_income", [M, ae] = f.useState(I);
|
|
741
|
+
return f.useEffect(() => {
|
|
742
|
+
A(b), O || w().finally(() => {
|
|
743
|
+
m?.("CashflowWidget");
|
|
744
|
+
});
|
|
745
|
+
}, []), f.useEffect(() => {
|
|
746
|
+
g(l);
|
|
747
|
+
}, [l]), f.useEffect(() => {
|
|
748
|
+
const X = l.map((_) => _.guid), K = t.filter(
|
|
749
|
+
(_) => i.includes(_.guid) && X.includes(_.guid)
|
|
750
|
+
);
|
|
751
|
+
C(K), d({
|
|
752
|
+
dateRange: { start: Me(H(), 90), end: dt() },
|
|
753
|
+
accounts: K.map((_) => _.guid)
|
|
754
|
+
});
|
|
755
|
+
}, [l, t]), S ? /* @__PURE__ */ o(
|
|
756
|
+
mt,
|
|
757
|
+
{
|
|
758
|
+
accountOptions: l,
|
|
759
|
+
actions: [
|
|
760
|
+
{
|
|
761
|
+
label: p.action_title,
|
|
762
|
+
iconName: "credit_card_gear",
|
|
763
|
+
onClick: () => {
|
|
764
|
+
ae(!0), c(Se.CASH_FLOW_CLICK_SETTINGS);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
calendarActions: {
|
|
769
|
+
shouldDisableNext: x,
|
|
770
|
+
shouldDisablePrevious: u,
|
|
771
|
+
shouldDisablePicker: !0,
|
|
772
|
+
onRangeChanged: () => {
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
dateRange: b,
|
|
776
|
+
dateRangeVariant: "readonly",
|
|
777
|
+
onAccountsFilterClick: () => c(Se.CASH_FLOW_CLICK_FILTER),
|
|
778
|
+
onBackClick: a,
|
|
779
|
+
sx: n,
|
|
780
|
+
title: F.title,
|
|
781
|
+
children: [
|
|
782
|
+
/* @__PURE__ */ e(Nt, {}),
|
|
783
|
+
/* @__PURE__ */ e(Lt, {}),
|
|
784
|
+
/* @__PURE__ */ e(
|
|
785
|
+
He,
|
|
786
|
+
{
|
|
787
|
+
ariaLabelClose: F.close_settings_aria,
|
|
788
|
+
isOpen: M,
|
|
789
|
+
onClose: () => ae(!1),
|
|
790
|
+
shouldShowHeaderBorders: !1,
|
|
791
|
+
title: p.action_title,
|
|
792
|
+
children: /* @__PURE__ */ e(tt, { defaultSelectedTab: I ? 1 : 0 })
|
|
793
|
+
}
|
|
794
|
+
)
|
|
795
|
+
]
|
|
796
|
+
}
|
|
797
|
+
) : /* @__PURE__ */ e(te, {});
|
|
798
|
+
}, Wn = T(Ot), Ft = ({ handleNextStep: a }) => {
|
|
799
|
+
const { completeOnboarding: n } = me(), { cashflow: t } = k(), i = se();
|
|
736
800
|
return /* @__PURE__ */ o(s, { children: [
|
|
737
|
-
/* @__PURE__ */ e(
|
|
801
|
+
/* @__PURE__ */ e(de, { pb: 12, children: t.welcome_title }),
|
|
738
802
|
/* @__PURE__ */ e(
|
|
739
|
-
|
|
803
|
+
Qe,
|
|
740
804
|
{
|
|
741
805
|
color: i.palette.primary.light,
|
|
742
806
|
pb: 8,
|
|
743
807
|
sx: { wordBreak: "break-word", whiteSpace: "initial" },
|
|
744
|
-
variant: "
|
|
808
|
+
variant: "h3",
|
|
745
809
|
children: t.welcome_sub_title
|
|
746
810
|
}
|
|
747
811
|
),
|
|
@@ -749,9 +813,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
749
813
|
/* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
750
814
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
751
815
|
/* @__PURE__ */ e(
|
|
752
|
-
|
|
816
|
+
D,
|
|
753
817
|
{
|
|
754
|
-
bgcolor: i.palette.primary.
|
|
818
|
+
bgcolor: i.palette.primary.light,
|
|
755
819
|
borderRadius: 1,
|
|
756
820
|
component: "span",
|
|
757
821
|
height: 44,
|
|
@@ -765,9 +829,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
765
829
|
] }),
|
|
766
830
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
767
831
|
/* @__PURE__ */ e(
|
|
768
|
-
|
|
832
|
+
D,
|
|
769
833
|
{
|
|
770
|
-
bgcolor: i.palette.primary.
|
|
834
|
+
bgcolor: i.palette.primary.light,
|
|
771
835
|
borderRadius: 1,
|
|
772
836
|
component: "span",
|
|
773
837
|
height: 44,
|
|
@@ -781,9 +845,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
781
845
|
] }),
|
|
782
846
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
783
847
|
/* @__PURE__ */ e(
|
|
784
|
-
|
|
848
|
+
D,
|
|
785
849
|
{
|
|
786
|
-
bgcolor: i.palette.primary.
|
|
850
|
+
bgcolor: i.palette.primary.light,
|
|
787
851
|
borderRadius: 1,
|
|
788
852
|
component: "span",
|
|
789
853
|
height: 44,
|
|
@@ -801,145 +865,145 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
801
865
|
/* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
802
866
|
] })
|
|
803
867
|
] });
|
|
804
|
-
},
|
|
805
|
-
CASHFLOW_ONBOARDING: `${
|
|
806
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
868
|
+
}, Wt = T(Ft), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", $e = {
|
|
869
|
+
CASHFLOW_ONBOARDING: `${Re}/cashflow-onboarding.png`,
|
|
870
|
+
CASHFLOW_LOADING_ANIMATION: `${Re}/loading-animation.gif`
|
|
807
871
|
}, Ht = () => {
|
|
808
|
-
const { cashflow: a } =
|
|
872
|
+
const { cashflow: a } = k();
|
|
809
873
|
return /* @__PURE__ */ o(f.Fragment, { children: [
|
|
810
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src:
|
|
811
|
-
/* @__PURE__ */ e(
|
|
874
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: $e.CASHFLOW_LOADING_ANIMATION }) }),
|
|
875
|
+
/* @__PURE__ */ e(de, { pb: 12, children: a.loading_title }),
|
|
812
876
|
/* @__PURE__ */ e(N, { children: a.loading_description })
|
|
813
877
|
] });
|
|
814
|
-
},
|
|
878
|
+
}, Mt = T(Ht), $t = Ye`
|
|
815
879
|
from {
|
|
816
880
|
transform: rotate(0deg);
|
|
817
881
|
}
|
|
818
882
|
to {
|
|
819
883
|
transform: rotate(360deg);
|
|
820
884
|
}
|
|
821
|
-
`,
|
|
822
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
823
|
-
() => b.find((y) => y.guid ===
|
|
824
|
-
[
|
|
825
|
-
),
|
|
885
|
+
`, Gt = () => {
|
|
886
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = k(), { user: g } = Je(), { completeOnboarding: x } = me(), { isDirty: u } = V(), { isMobile: c } = ue(), { isCopyLoaded: m, setDisplayedDate: r } = q(), { filter: l, setFilter: d, transactions: b } = Ne(), C = se(), [w, O] = J(!0), [A, F] = f.useState(gt.EveryMonth), [p, S] = f.useState(1), [R, I] = f.useState(15), [M, ae] = J(!1), [X, K] = J(1), [_, Ge] = J([]), [fe, le] = J(""), W = f.useMemo(
|
|
887
|
+
() => b.find((y) => y.guid === fe),
|
|
888
|
+
[fe, b]
|
|
889
|
+
), je = !!n.filter(
|
|
826
890
|
(y) => y.repeating_transaction_type === De.Income
|
|
827
|
-
).length,
|
|
828
|
-
|
|
891
|
+
).length, ge = async () => {
|
|
892
|
+
K(2), r(
|
|
829
893
|
// Beginning of the month, 90 days before today
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
),
|
|
833
|
-
},
|
|
834
|
-
if (!(
|
|
835
|
-
|
|
836
|
-
for (let y = 0; y <
|
|
837
|
-
const E =
|
|
894
|
+
ht(Me(H(), 90)),
|
|
895
|
+
H()
|
|
896
|
+
), d({ ...l, custom: we }), K(3);
|
|
897
|
+
}, ze = async () => {
|
|
898
|
+
if (!(_.length < 1)) {
|
|
899
|
+
ae(!0);
|
|
900
|
+
for (let y = 0; y < _.length; y++) {
|
|
901
|
+
const E = _[y], be = ve(A, Ie(E.date)), Ue = {
|
|
838
902
|
account_guid: E.account_guid,
|
|
839
903
|
amount: E.amount,
|
|
840
904
|
created_by: 0,
|
|
841
905
|
//user
|
|
842
906
|
merchant_guid: E.merchant_guid,
|
|
843
907
|
description: E.feed_description || E.description,
|
|
844
|
-
predicted_occurs_on:
|
|
845
|
-
recurrence_day:
|
|
846
|
-
recurrence_type:
|
|
908
|
+
predicted_occurs_on: ut(be, { representation: "date" }),
|
|
909
|
+
recurrence_day: be.getDay(),
|
|
910
|
+
recurrence_type: A,
|
|
847
911
|
repeating_transaction_type: De.Income,
|
|
848
|
-
second_recurrence_day:
|
|
912
|
+
second_recurrence_day: R,
|
|
849
913
|
transaction_type: E.transaction_type,
|
|
850
914
|
user_guid: g.guid
|
|
851
915
|
};
|
|
852
|
-
await a(
|
|
916
|
+
await a(Ue, E);
|
|
853
917
|
}
|
|
854
918
|
await x();
|
|
855
919
|
}
|
|
856
|
-
},
|
|
857
|
-
return
|
|
858
|
-
|
|
920
|
+
}, Be = !W && w || !W && _.length < 1;
|
|
921
|
+
return m ? /* @__PURE__ */ o(
|
|
922
|
+
D,
|
|
859
923
|
{
|
|
860
924
|
sx: {
|
|
861
925
|
display: "flex",
|
|
862
|
-
alignItems:
|
|
926
|
+
alignItems: c ? "flex-start" : "center",
|
|
863
927
|
backgroundColor: C.palette.background.paper,
|
|
864
|
-
backgroundImage:
|
|
928
|
+
backgroundImage: c ? null : `url(${$e.CASHFLOW_ONBOARDING})`,
|
|
865
929
|
backgroundRepeat: "no-repeat",
|
|
866
930
|
backgroundPosition: "left 100px",
|
|
867
931
|
backgroundSize: "35%",
|
|
868
932
|
py: 24
|
|
869
933
|
},
|
|
870
934
|
children: [
|
|
871
|
-
|
|
872
|
-
|
|
935
|
+
X === 1 && /* @__PURE__ */ e(
|
|
936
|
+
D,
|
|
873
937
|
{
|
|
874
938
|
sx: {
|
|
875
|
-
...
|
|
939
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
876
940
|
},
|
|
877
|
-
children: /* @__PURE__ */ e(
|
|
941
|
+
children: /* @__PURE__ */ e(Wt, { handleNextStep: ge })
|
|
878
942
|
}
|
|
879
943
|
),
|
|
880
|
-
|
|
881
|
-
|
|
944
|
+
X === 2 && /* @__PURE__ */ e(
|
|
945
|
+
D,
|
|
882
946
|
{
|
|
883
947
|
sx: {
|
|
884
|
-
...
|
|
948
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
885
949
|
},
|
|
886
|
-
children: /* @__PURE__ */ e(
|
|
950
|
+
children: /* @__PURE__ */ e(Mt, {})
|
|
887
951
|
}
|
|
888
952
|
),
|
|
889
|
-
|
|
890
|
-
|
|
953
|
+
X === 3 && /* @__PURE__ */ o(
|
|
954
|
+
D,
|
|
891
955
|
{
|
|
892
956
|
sx: {
|
|
893
|
-
...
|
|
957
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
894
958
|
},
|
|
895
959
|
children: [
|
|
896
|
-
/* @__PURE__ */ e(
|
|
960
|
+
/* @__PURE__ */ e(de, { pb: 12, children: t.add_income_title }),
|
|
897
961
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
898
|
-
|
|
899
|
-
/* @__PURE__ */ e(
|
|
900
|
-
/* @__PURE__ */ e(
|
|
901
|
-
|
|
962
|
+
_.length > 0 && !W && /* @__PURE__ */ o(U, { children: [
|
|
963
|
+
/* @__PURE__ */ e(ee, { children: _.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
|
|
964
|
+
/* @__PURE__ */ e(pt, { bgcolor: "background.paper", children: bt(
|
|
965
|
+
B(y.nextDate || y.date)
|
|
902
966
|
) }),
|
|
903
|
-
/* @__PURE__ */ e(
|
|
904
|
-
E !==
|
|
967
|
+
/* @__PURE__ */ e(ft, { transaction: y }),
|
|
968
|
+
E !== _.length - 1 && /* @__PURE__ */ e(v, {})
|
|
905
969
|
] }, y.guid)) }),
|
|
906
970
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
907
|
-
/* @__PURE__ */ e(
|
|
971
|
+
/* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
|
|
908
972
|
/* @__PURE__ */ e(
|
|
909
973
|
G,
|
|
910
974
|
{
|
|
911
|
-
onClick: () =>
|
|
975
|
+
onClick: () => O(!0),
|
|
912
976
|
startIcon: /* @__PURE__ */ e(j, { name: "add", size: 20 }),
|
|
913
977
|
children: t.add_income
|
|
914
978
|
}
|
|
915
979
|
)
|
|
916
980
|
] })
|
|
917
981
|
] }),
|
|
918
|
-
|
|
982
|
+
Be && /* @__PURE__ */ e(
|
|
919
983
|
st,
|
|
920
984
|
{
|
|
921
985
|
bgcolor: "background.paper",
|
|
922
|
-
onSearch: (y) =>
|
|
923
|
-
...
|
|
924
|
-
custom: (E) => y ? ct(E, y) :
|
|
986
|
+
onSearch: (y) => d({
|
|
987
|
+
...l,
|
|
988
|
+
custom: (E) => y ? ct(E, y) : we(E)
|
|
925
989
|
}),
|
|
926
990
|
onSelected: (y) => {
|
|
927
|
-
|
|
991
|
+
le(y), O(!1);
|
|
928
992
|
}
|
|
929
993
|
}
|
|
930
994
|
),
|
|
931
|
-
!
|
|
932
|
-
W && /* @__PURE__ */ o(
|
|
995
|
+
!je && u && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
996
|
+
W && /* @__PURE__ */ o(U, { children: [
|
|
933
997
|
/* @__PURE__ */ e(
|
|
934
998
|
lt,
|
|
935
999
|
{
|
|
936
1000
|
bgcolor: "background.paper",
|
|
937
|
-
firstDay:
|
|
938
|
-
frequency:
|
|
1001
|
+
firstDay: p,
|
|
1002
|
+
frequency: A,
|
|
939
1003
|
onFirstDayChange: S,
|
|
940
1004
|
onFrequencyChange: F,
|
|
941
|
-
onSecondDayChange:
|
|
942
|
-
secondDay:
|
|
1005
|
+
onSecondDayChange: I,
|
|
1006
|
+
secondDay: R,
|
|
943
1007
|
transaction: W
|
|
944
1008
|
}
|
|
945
1009
|
),
|
|
@@ -949,12 +1013,12 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
949
1013
|
{
|
|
950
1014
|
"aria-disabled": !W,
|
|
951
1015
|
onClick: () => {
|
|
952
|
-
const y = [...
|
|
1016
|
+
const y = [..._];
|
|
953
1017
|
y.push({
|
|
954
1018
|
...W,
|
|
955
|
-
nextDate: ve(
|
|
956
|
-
frequency:
|
|
957
|
-
}),
|
|
1019
|
+
nextDate: ve(A, Ie(W.date)),
|
|
1020
|
+
frequency: A
|
|
1021
|
+
}), Ge(y), le("");
|
|
958
1022
|
},
|
|
959
1023
|
variant: "contained",
|
|
960
1024
|
children: i.confirm_button
|
|
@@ -964,7 +1028,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
964
1028
|
G,
|
|
965
1029
|
{
|
|
966
1030
|
onClick: () => {
|
|
967
|
-
|
|
1031
|
+
le(""), O(!0), ge().finally();
|
|
968
1032
|
},
|
|
969
1033
|
variant: "outlined",
|
|
970
1034
|
children: i.cancel_button
|
|
@@ -972,18 +1036,18 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
972
1036
|
)
|
|
973
1037
|
] })
|
|
974
1038
|
] }),
|
|
975
|
-
|
|
1039
|
+
_.length > 0 && !W && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
976
1040
|
/* @__PURE__ */ e(
|
|
977
1041
|
G,
|
|
978
1042
|
{
|
|
979
|
-
"aria-disabled":
|
|
980
|
-
onClick:
|
|
981
|
-
startIcon:
|
|
1043
|
+
"aria-disabled": _.length < 1 || M,
|
|
1044
|
+
onClick: ze,
|
|
1045
|
+
startIcon: M ? /* @__PURE__ */ e(
|
|
982
1046
|
j,
|
|
983
1047
|
{
|
|
984
1048
|
name: "progress_activity",
|
|
985
1049
|
sx: {
|
|
986
|
-
animation: `${
|
|
1050
|
+
animation: `${$t} 2s linear infinite`
|
|
987
1051
|
}
|
|
988
1052
|
}
|
|
989
1053
|
) : null,
|
|
@@ -998,104 +1062,31 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
998
1062
|
)
|
|
999
1063
|
]
|
|
1000
1064
|
}
|
|
1001
|
-
) : /* @__PURE__ */ e(
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
selectedAccounts: t,
|
|
1005
|
-
selectedAccountGuids: i,
|
|
1006
|
-
setSelectedAccounts: g,
|
|
1007
|
-
shouldDisableNextDate: x,
|
|
1008
|
-
shouldDisablePrevDate: m
|
|
1009
|
-
} = X(), { onEvent: p } = ke(), { clientConfig: c } = Ve(), { visibleCashAccounts: r } = Ne(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: v, setDateRange: F } = q(), { cashflow: h, recurring: S } = O(), { isCopyLoaded: A, isInitialized: w } = X(), re = c?.master?.deep_link_params?.view === "manage_income", [K, J] = f.useState(re);
|
|
1010
|
-
f.useEffect(() => {
|
|
1011
|
-
w && (F(b), _().finally());
|
|
1012
|
-
}, [w]), f.useEffect(() => {
|
|
1013
|
-
g(r);
|
|
1014
|
-
}, [r]), f.useEffect(() => {
|
|
1015
|
-
const me = r.map((H) => H.guid), Z = t.filter(
|
|
1016
|
-
(H) => i.includes(H.guid) && me.includes(H.guid)
|
|
1017
|
-
);
|
|
1018
|
-
C(Z), d({
|
|
1019
|
-
dateRange: { start: je($(), 90), end: gt() },
|
|
1020
|
-
accounts: Z.map((H) => H.guid)
|
|
1021
|
-
});
|
|
1022
|
-
}, [r, t]);
|
|
1023
|
-
const R = v && !l?.has_completed_cash_flow_onboarding && !k.length;
|
|
1024
|
-
return !A || !w ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
|
|
1025
|
-
Ae,
|
|
1026
|
-
{
|
|
1027
|
-
onBackClick: a,
|
|
1028
|
-
sx: { height: "100%", overflow: "auto" },
|
|
1029
|
-
title: h.title,
|
|
1030
|
-
children: /* @__PURE__ */ e(Mt, {})
|
|
1031
|
-
}
|
|
1032
|
-
) : /* @__PURE__ */ o(
|
|
1033
|
-
Ae,
|
|
1034
|
-
{
|
|
1035
|
-
accountOptions: r,
|
|
1036
|
-
actions: [
|
|
1037
|
-
{
|
|
1038
|
-
label: S.action_title,
|
|
1039
|
-
iconName: "credit_card_gear",
|
|
1040
|
-
onClick: () => {
|
|
1041
|
-
J(!0), p(Ee.CASH_FLOW_CLICK_SETTINGS);
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
],
|
|
1045
|
-
calendarActions: {
|
|
1046
|
-
shouldDisableNext: x,
|
|
1047
|
-
shouldDisablePrevious: m,
|
|
1048
|
-
shouldDisablePicker: !0,
|
|
1049
|
-
onRangeChanged: () => {
|
|
1050
|
-
}
|
|
1051
|
-
},
|
|
1052
|
-
dateRange: b,
|
|
1053
|
-
dateRangeVariant: "readonly",
|
|
1054
|
-
onAccountsFilterClick: () => p(Ee.CASH_FLOW_CLICK_FILTER),
|
|
1055
|
-
onBackClick: a,
|
|
1056
|
-
sx: n,
|
|
1057
|
-
title: h.title,
|
|
1058
|
-
children: [
|
|
1059
|
-
/* @__PURE__ */ e(Ot, {}),
|
|
1060
|
-
/* @__PURE__ */ e(Rt, {}),
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1062
|
-
Ge,
|
|
1063
|
-
{
|
|
1064
|
-
ariaLabelClose: h.close_settings_aria,
|
|
1065
|
-
isOpen: K,
|
|
1066
|
-
onClose: () => J(!1),
|
|
1067
|
-
shouldShowHeaderBorders: !1,
|
|
1068
|
-
title: S.action_title,
|
|
1069
|
-
children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: re ? 1 : 0 })
|
|
1070
|
-
}
|
|
1071
|
-
)
|
|
1072
|
-
]
|
|
1073
|
-
}
|
|
1074
|
-
);
|
|
1075
|
-
}, Wn = T(Gt);
|
|
1076
|
-
class $n {
|
|
1065
|
+
) : /* @__PURE__ */ e(te, {});
|
|
1066
|
+
}, Hn = T(Gt);
|
|
1067
|
+
class Mn {
|
|
1077
1068
|
fetchInstance;
|
|
1078
1069
|
constructor(n, t, i) {
|
|
1079
|
-
this.fetchInstance = new
|
|
1070
|
+
this.fetchInstance = new xt(n, t, void 0, i);
|
|
1080
1071
|
}
|
|
1081
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1082
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1083
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1072
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1073
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1074
|
+
getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1084
1075
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1085
|
-
`${
|
|
1076
|
+
`${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
|
|
1086
1077
|
).then((i) => i.cashflow_events);
|
|
1087
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1078
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1088
1079
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1089
|
-
`${
|
|
1080
|
+
`${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
|
|
1090
1081
|
n
|
|
1091
|
-
)}/to/${
|
|
1082
|
+
)}/to/${B(t)}`
|
|
1092
1083
|
).then((i) => i.cashflow_events);
|
|
1093
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1084
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1094
1085
|
}
|
|
1095
1086
|
export {
|
|
1096
|
-
|
|
1087
|
+
Mn as CashflowApi,
|
|
1097
1088
|
Fn as CashflowMiniWidget,
|
|
1098
|
-
|
|
1089
|
+
Hn as CashflowOnboarding,
|
|
1099
1090
|
jn as CashflowStore,
|
|
1100
1091
|
Wn as CashflowWidget
|
|
1101
1092
|
};
|