@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.0
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 +75 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs +922 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs +231 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs.map +1 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs +28 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Dcsnnz86.mjs +906 -0
- package/dist/ManageIncome-Dcsnnz86.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs +96 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs +89 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-C1fdL3Iu.mjs +3054 -0
- package/dist/UserStore-C1fdL3Iu.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/index.es.js +943 -1047
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/RecurringTransactionsStore.d.ts +29 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
|
@@ -1,410 +1,358 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { An as qe, Gn as Ke, In as _e, Nn as le, jn as E, ln as Ve, lr as Ne, mr as de, nn as Xe, rn as Je, sr as Ce } from "../accounts-DkyAiLpg.mjs";
|
|
4
|
-
import { n as ke } from "../Analytics-BKzTPees.mjs";
|
|
5
|
-
import { E as Le, M as Qe, O as Ze, d as Oe, h as $, i as et, k as ie, n as Ge, o as me, p as N, t as J, w as B } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
-
import { t as tt } from "../MiniWidgetContainer-COwnjfy7.mjs";
|
|
7
|
-
import { a as nt, c as we, d as at, l as ot, o as it, u as rt } from "../recurringtransactions-gbJ_NA8u.mjs";
|
|
8
|
-
import h, { useState as K } from "react";
|
|
1
|
+
import { jsxs as n, Fragment as j, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import h, { useState as V } from "react";
|
|
9
3
|
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { addMonths as Ye } from "date-fns/addMonths";
|
|
5
|
+
import { startOfToday as F } from "date-fns/startOfToday";
|
|
6
|
+
import I from "@mui/material/Box";
|
|
7
|
+
import v from "@mui/material/Divider";
|
|
10
8
|
import s from "@mui/material/Stack";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { useTheme as ie, alpha as qe, keyframes as Ke } from "@mui/material/styles";
|
|
10
|
+
import { Text as m, P as N, Icon as z, InstitutionLogo as xe, H2 as de, H3 as Ve } from "@mxenabled/mxui";
|
|
11
|
+
import { b as H } from "../Localization-DnoVyBNK.mjs";
|
|
12
|
+
import { G as Xe, p as me, u as L, D as ae, c as Le, a as P, h as B, f as ke, i as Je, g as Ne, C as Qe } from "../hooks-97sNJ_lf.mjs";
|
|
13
|
+
import { C as E } from "../CurrencyText-CCbE6MmF.mjs";
|
|
14
|
+
import { u as ue } from "../useScreenSize-mWpmnh5w.mjs";
|
|
15
|
+
import { L as Z } from "../Loader-CxeBwuPG.mjs";
|
|
16
|
+
import { I as pe } from "../InformationTooltip-4su8bn1e.mjs";
|
|
17
|
+
import { u as Oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
18
|
+
import { M as Ze } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
19
|
+
import { E as et } from "../EmptyState-CJUDc3kD.mjs";
|
|
20
|
+
import { R as tt } from "../RecurringSettings-D8hBbXV_.mjs";
|
|
21
|
+
import nt from "@mui/material/Tabs";
|
|
22
|
+
import ye from "@mui/material/Tab";
|
|
23
|
+
import { getUnixTime as le } from "date-fns/getUnixTime";
|
|
24
|
+
import Q from "@mui/material/List";
|
|
25
|
+
import ee from "@mui/material/ListItem";
|
|
26
|
+
import { A as ot } from "../AccountDetailsDrawer-CZPeLsCq.mjs";
|
|
27
|
+
import { f as U, D as Y } from "../DateFormats-HudZ3Bjs.mjs";
|
|
28
|
+
import it from "@mui/material/ListSubheader";
|
|
29
|
+
import { f as J } from "../NumberFormatting--XMeeBfr.mjs";
|
|
30
|
+
import { isAfter as Ge } from "date-fns/isAfter";
|
|
14
31
|
import { isBefore as Me } from "date-fns/isBefore";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
32
|
+
import { isToday as Fe } from "date-fns/isToday";
|
|
33
|
+
import { addDays as _e } from "date-fns/addDays";
|
|
34
|
+
import { DataGridPro as at } from "@mui/x-data-grid-pro";
|
|
35
|
+
import { T as Ce } from "../TabContentContainer-B0eYJP5p.mjs";
|
|
17
36
|
import W from "@mui/material/Button";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import { endOfToday as
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import { fromUnixTime as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import { DataGridPro as gt } from "@mui/x-data-grid-pro";
|
|
35
|
-
var Y = () => {
|
|
36
|
-
if (!h.useContext(Qe)) throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
37
|
+
import { M as rt, S as st, i as ct, b as we, c as lt } from "../ManageIncome-Dcsnnz86.mjs";
|
|
38
|
+
import { D as He } from "../Drawer-DsnW2o0v.mjs";
|
|
39
|
+
import { subDays as We } from "date-fns/subDays";
|
|
40
|
+
import { endOfToday as dt } from "date-fns/endOfToday";
|
|
41
|
+
import { W as mt } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
42
|
+
import { c as X } from "../Account-DR7Plrqy.mjs";
|
|
43
|
+
import { A as Se } from "../Analytics-WeZYytR0.mjs";
|
|
44
|
+
import { formatISO as ut } from "date-fns/formatISO";
|
|
45
|
+
import { fromUnixTime as De } from "date-fns/fromUnixTime";
|
|
46
|
+
import { startOfMonth as pt } from "date-fns/startOfMonth";
|
|
47
|
+
import { S as ht, a as ft } from "../EmbeddedCard-DH8vQ3qN.mjs";
|
|
48
|
+
import { F as gt, R as Ie, d as ve } from "../RecurringTransactionsUtil-CHWmqvW5.mjs";
|
|
49
|
+
import { k as bt } from "../DateUtil-CzBmbjmA.mjs";
|
|
50
|
+
const q = () => {
|
|
51
|
+
if (!h.useContext(Xe))
|
|
52
|
+
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
37
53
|
return me().uiStore;
|
|
38
|
-
},
|
|
39
|
-
const { cashflow:
|
|
54
|
+
}, xt = ({ remaining: i }) => {
|
|
55
|
+
const { cashflow: o } = L();
|
|
40
56
|
return /* @__PURE__ */ n(j, { children: [
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ e(E, {
|
|
56
|
-
amount: o,
|
|
57
|
-
bold: !0,
|
|
58
|
-
sx: { fontSize: 12 }
|
|
59
|
-
})
|
|
57
|
+
/* @__PURE__ */ e(
|
|
58
|
+
I,
|
|
59
|
+
{
|
|
60
|
+
sx: {
|
|
61
|
+
borderRadius: "1px",
|
|
62
|
+
backgroundColor: i < 0 ? "error.main" : i > 0 ? "success.main" : "warning.main",
|
|
63
|
+
height: 6,
|
|
64
|
+
width: 6
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: o.remaining_cash }),
|
|
69
|
+
/* @__PURE__ */ e(E, { amount: i, bold: !0, sx: { fontSize: 12 } })
|
|
60
70
|
] });
|
|
61
|
-
},
|
|
62
|
-
const
|
|
71
|
+
}, he = A(xt), yt = () => {
|
|
72
|
+
const i = ie(), { availableWidth: o } = ae(), { isMobile: t } = ue(), { visibleCashAccounts: r, visibleCashBalance: f } = Le(), { selectedAccountGuids: u } = P(), { cashflow: c } = L(), {
|
|
73
|
+
daysUntilNextIncome: l,
|
|
74
|
+
expensesTilNextIncome: b,
|
|
75
|
+
selectedCashAccounts: a,
|
|
76
|
+
setNextIncome: g,
|
|
77
|
+
setSelectedCashAccounts: d,
|
|
78
|
+
setUpcomingExpenses: x
|
|
79
|
+
} = q(), { isDataLoaded: C, nextIncomeRecurrence: w, upcomingExpenses: R } = B();
|
|
63
80
|
h.useEffect(() => {
|
|
64
|
-
d(
|
|
81
|
+
d(
|
|
82
|
+
r.filter((_) => u.includes(_.guid))
|
|
83
|
+
);
|
|
65
84
|
}, [r, u]), h.useEffect(() => {
|
|
66
85
|
w && g(w), x(R);
|
|
67
86
|
}, [w, R]);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
const D = h.useMemo(
|
|
88
|
+
() => r.filter((_) => u.includes(_.guid)).reduce((_, S) => _ + (S?.balance || 0), 0),
|
|
89
|
+
[u, R]
|
|
90
|
+
), k = h.useMemo(
|
|
91
|
+
() => b.filter((_) => u.includes(_.accountGuid || "")).reduce((_, S) => _ + S.amount, 0),
|
|
92
|
+
[u, b]
|
|
93
|
+
), p = h.useMemo(
|
|
94
|
+
() => D - k,
|
|
95
|
+
[D, k]
|
|
96
|
+
);
|
|
97
|
+
return C ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: o > 710 ? /* @__PURE__ */ n(
|
|
98
|
+
s,
|
|
99
|
+
{
|
|
100
|
+
border: `1px solid ${i.palette.divider}`,
|
|
76
101
|
borderRadius: 1,
|
|
77
102
|
direction: "row",
|
|
78
103
|
justifyContent: "space-between",
|
|
79
104
|
px: 24,
|
|
80
105
|
children: [
|
|
81
|
-
/* @__PURE__ */ n(s, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ e(s, {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
whiteSpace: "nowrap",
|
|
106
|
-
children: F(c.expenses_due, b.length)
|
|
107
|
-
})]
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ e(s, {
|
|
110
|
-
pt: 18,
|
|
111
|
-
children: /* @__PURE__ */ e(z, { name: "equal" })
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ n(s, {
|
|
114
|
-
pb: 14,
|
|
115
|
-
pr: 24,
|
|
116
|
-
pt: 12,
|
|
117
|
-
children: [/* @__PURE__ */ e(E, {
|
|
118
|
-
amount: p,
|
|
119
|
-
variant: "h2"
|
|
120
|
-
}), /* @__PURE__ */ n(s, {
|
|
121
|
-
alignItems: "center",
|
|
122
|
-
direction: "row",
|
|
123
|
-
gap: 8,
|
|
124
|
-
children: [/* @__PURE__ */ e(L, {
|
|
125
|
-
variant: "caption",
|
|
126
|
-
whiteSpace: "nowrap",
|
|
127
|
-
children: c.available_to_spend
|
|
128
|
-
}), /* @__PURE__ */ e(le, {
|
|
129
|
-
body: c.tooltip_body,
|
|
130
|
-
title: c.tooltip_title
|
|
131
|
-
})]
|
|
132
|
-
})]
|
|
133
|
-
}),
|
|
134
|
-
/* @__PURE__ */ e(s, {
|
|
135
|
-
borderLeft: `1px solid ${o.palette.divider}`,
|
|
136
|
-
pb: 12,
|
|
137
|
-
pl: 24,
|
|
138
|
-
pt: 12,
|
|
139
|
-
children: /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ e(m, {
|
|
140
|
-
variant: "h2",
|
|
141
|
-
children: F(c.days, l)
|
|
142
|
-
}), /* @__PURE__ */ e(L, {
|
|
143
|
-
variant: "caption",
|
|
144
|
-
whiteSpace: "nowrap",
|
|
145
|
-
children: c.next_paycheck
|
|
146
|
-
})] })
|
|
147
|
-
})
|
|
148
|
-
]
|
|
149
|
-
}) : /* @__PURE__ */ n(s, {
|
|
150
|
-
border: `1px solid ${o.palette.divider}`,
|
|
151
|
-
borderRadius: 1,
|
|
152
|
-
children: [
|
|
153
|
-
/* @__PURE__ */ n(s, {
|
|
154
|
-
direction: "row",
|
|
155
|
-
justifyContent: "space-between",
|
|
156
|
-
p: 16,
|
|
157
|
-
children: [/* @__PURE__ */ e(m, {
|
|
158
|
-
variant: "body2",
|
|
159
|
-
children: F(c.total_cash_accounts, i.length)
|
|
160
|
-
}), /* @__PURE__ */ e(E, {
|
|
161
|
-
amount: f,
|
|
162
|
-
bold: !0,
|
|
163
|
-
variant: "caption"
|
|
164
|
-
})]
|
|
165
|
-
}),
|
|
166
|
-
/* @__PURE__ */ e(I, {}),
|
|
167
|
-
/* @__PURE__ */ n(s, {
|
|
168
|
-
direction: "row",
|
|
169
|
-
justifyContent: "space-between",
|
|
170
|
-
p: 16,
|
|
171
|
-
children: [/* @__PURE__ */ e(m, {
|
|
172
|
-
variant: "body2",
|
|
173
|
-
children: F(c.expenses_due, b.length)
|
|
174
|
-
}), /* @__PURE__ */ e(E, {
|
|
175
|
-
amount: k,
|
|
176
|
-
bold: !0,
|
|
177
|
-
symbol: "-",
|
|
178
|
-
variant: "caption"
|
|
179
|
-
})]
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ e(I, {}),
|
|
182
|
-
/* @__PURE__ */ e(s, {
|
|
183
|
-
alignItems: "center",
|
|
184
|
-
bgcolor: "background.default",
|
|
185
|
-
direction: "row",
|
|
186
|
-
gap: 8,
|
|
187
|
-
height: 48,
|
|
188
|
-
justifyContent: "space-between",
|
|
189
|
-
px: 16,
|
|
190
|
-
sx: {
|
|
191
|
-
borderBottomLeftRadius: 4,
|
|
192
|
-
borderBottomRightRadius: 4
|
|
193
|
-
},
|
|
194
|
-
children: /* @__PURE__ */ e(pe, { remaining: p })
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ e(I, {}),
|
|
197
|
-
/* @__PURE__ */ n(s, {
|
|
198
|
-
direction: "row",
|
|
199
|
-
justifyContent: "space-between",
|
|
200
|
-
p: 16,
|
|
201
|
-
children: [/* @__PURE__ */ e(m, {
|
|
202
|
-
variant: "body2",
|
|
203
|
-
children: c.next_paycheck
|
|
204
|
-
}), /* @__PURE__ */ e(m, {
|
|
205
|
-
bold: !0,
|
|
206
|
-
variant: "caption",
|
|
207
|
-
children: F(c.days, l)
|
|
208
|
-
})]
|
|
209
|
-
})
|
|
106
|
+
/* @__PURE__ */ n(s, { pb: 14, pt: 12, children: [
|
|
107
|
+
/* @__PURE__ */ e(E, { amount: D, variant: "h2" }),
|
|
108
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: H(
|
|
109
|
+
c.total_cash_accounts,
|
|
110
|
+
a.length
|
|
111
|
+
) })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(z, { name: "remove" }) }),
|
|
114
|
+
/* @__PURE__ */ n(s, { pb: 14, pt: 12, children: [
|
|
115
|
+
/* @__PURE__ */ e(E, { amount: k, variant: "h2" }),
|
|
116
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: H(c.expenses_due, b.length) })
|
|
117
|
+
] }),
|
|
118
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(z, { name: "equal" }) }),
|
|
119
|
+
/* @__PURE__ */ n(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
120
|
+
/* @__PURE__ */ e(E, { amount: p, variant: "h2" }),
|
|
121
|
+
/* @__PURE__ */ n(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
122
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: c.available_to_spend }),
|
|
123
|
+
/* @__PURE__ */ e(pe, { body: c.tooltip_body, title: c.tooltip_title })
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${i.palette.divider}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ n(j, { children: [
|
|
127
|
+
/* @__PURE__ */ e(m, { variant: "h2", children: H(c.days, l) }),
|
|
128
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: c.next_paycheck })
|
|
129
|
+
] }) })
|
|
210
130
|
]
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
131
|
+
}
|
|
132
|
+
) : /* @__PURE__ */ n(s, { border: `1px solid ${i.palette.divider}`, borderRadius: 1, children: [
|
|
133
|
+
/* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
134
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: H(
|
|
135
|
+
c.total_cash_accounts,
|
|
136
|
+
a.length
|
|
137
|
+
) }),
|
|
138
|
+
/* @__PURE__ */ e(E, { amount: f, bold: !0, variant: "caption" })
|
|
139
|
+
] }),
|
|
140
|
+
/* @__PURE__ */ e(v, {}),
|
|
141
|
+
/* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
142
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: H(c.expenses_due, b.length) }),
|
|
143
|
+
/* @__PURE__ */ e(E, { amount: k, bold: !0, symbol: "-", variant: "caption" })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ e(v, {}),
|
|
146
|
+
/* @__PURE__ */ e(
|
|
147
|
+
s,
|
|
148
|
+
{
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
bgcolor: "background.default",
|
|
151
|
+
direction: "row",
|
|
152
|
+
gap: 8,
|
|
153
|
+
height: 48,
|
|
154
|
+
justifyContent: "space-between",
|
|
155
|
+
px: 16,
|
|
156
|
+
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
157
|
+
children: /* @__PURE__ */ e(he, { remaining: p })
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ e(v, {}),
|
|
161
|
+
/* @__PURE__ */ n(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
162
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: c.next_paycheck }),
|
|
163
|
+
/* @__PURE__ */ e(m, { bold: !0, variant: "caption", children: H(c.days, l) })
|
|
164
|
+
] })
|
|
165
|
+
] }) }) : /* @__PURE__ */ e(Z, { height: t ? 210 : 120 });
|
|
166
|
+
}, _t = A(yt), Ct = ({
|
|
167
|
+
onPrimaryCtaClick: i,
|
|
168
|
+
onSecondaryCtaClick: o,
|
|
169
|
+
sx: t = {}
|
|
170
|
+
}) => {
|
|
171
|
+
const { cashflow: r } = L(), { isInitialized: f } = P(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: b } = B();
|
|
215
172
|
h.useEffect(() => {
|
|
216
|
-
b({
|
|
217
|
-
|
|
218
|
-
end: ct(H(), 1)
|
|
219
|
-
}), l || u().finally();
|
|
220
|
-
}, []), ke({
|
|
173
|
+
b({ start: F(), end: Ye(F(), 1) }), l || u().finally();
|
|
174
|
+
}, []), Oe({
|
|
221
175
|
widgetName: "CashflowMiniWidget",
|
|
222
176
|
isLoaded: l
|
|
223
177
|
});
|
|
224
|
-
const
|
|
225
|
-
return f ? /* @__PURE__ */ n(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
...t
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
minHeight: "auto"
|
|
255
|
-
},
|
|
256
|
-
children: /* @__PURE__ */ e(pe, { remaining: o })
|
|
257
|
-
}), ae = /* @__PURE__ */ (function(o) {
|
|
258
|
-
return o.EXPENSE = "expense", o.INCOME = "income", o;
|
|
259
|
-
})({}), wt = ({ recurrence: o }) => /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(Q, {
|
|
260
|
-
sx: {
|
|
261
|
-
display: "flex",
|
|
262
|
-
alignItems: "center",
|
|
263
|
-
gap: 16,
|
|
264
|
-
px: 24,
|
|
265
|
-
py: 12
|
|
266
|
-
},
|
|
267
|
-
children: [
|
|
268
|
-
/* @__PURE__ */ n(s, {
|
|
269
|
-
alignItems: "center",
|
|
270
|
-
height: 32,
|
|
271
|
-
width: 32,
|
|
272
|
-
children: [/* @__PURE__ */ e(m, {
|
|
273
|
-
bold: !0,
|
|
274
|
-
sx: { fontSize: 11 },
|
|
275
|
-
children: U(o.expectedDate, P.MONTH)
|
|
276
|
-
}), /* @__PURE__ */ e(m, {
|
|
277
|
-
bold: !0,
|
|
278
|
-
sx: { fontSize: 11 },
|
|
279
|
-
children: U(o.expectedDate, P.DAY)
|
|
280
|
-
})]
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ e(m, {
|
|
283
|
-
sx: {
|
|
284
|
-
flexGrow: 1,
|
|
285
|
-
fontSize: 13
|
|
286
|
-
},
|
|
287
|
-
children: o.name
|
|
288
|
-
}),
|
|
289
|
-
/* @__PURE__ */ e(E, {
|
|
290
|
-
amount: o.amount,
|
|
291
|
-
bold: !0,
|
|
292
|
-
sx: {
|
|
293
|
-
textAlign: "right",
|
|
294
|
-
fontSize: 13
|
|
295
|
-
}
|
|
296
|
-
})
|
|
297
|
-
]
|
|
298
|
-
}), /* @__PURE__ */ e(I, {})] }), Te = A(wt), vt = ({ total: o, type: a }) => {
|
|
299
|
-
const { cashflow: t } = N();
|
|
300
|
-
return /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(ft, {
|
|
178
|
+
const a = l && !c.length;
|
|
179
|
+
return f ? /* @__PURE__ */ n(
|
|
180
|
+
Ze,
|
|
181
|
+
{
|
|
182
|
+
className: "mx-exp-cashflow-miniwidget",
|
|
183
|
+
onPrimaryCtaClick: i,
|
|
184
|
+
primaryCtaLabel: r.primary_cta,
|
|
185
|
+
primaryCtaLabelAria: r.primary_cta_aria,
|
|
186
|
+
subTitle: a || !l ? void 0 : r.sub_title,
|
|
187
|
+
sx: { height: "100%", ...t },
|
|
188
|
+
title: r.title,
|
|
189
|
+
children: [
|
|
190
|
+
!l && /* @__PURE__ */ e(Z, {}),
|
|
191
|
+
l && (a ? /* @__PURE__ */ e(
|
|
192
|
+
et,
|
|
193
|
+
{
|
|
194
|
+
header: r.create,
|
|
195
|
+
icon: "local_atm",
|
|
196
|
+
onClick: o,
|
|
197
|
+
primaryButton: r.add_income,
|
|
198
|
+
primaryButtonStartIcon: "add",
|
|
199
|
+
subText: r.create_description
|
|
200
|
+
}
|
|
201
|
+
) : /* @__PURE__ */ e(_t, {}))
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
205
|
+
}, Mn = A(Ct), wt = ({ remaining: i }) => /* @__PURE__ */ e(
|
|
206
|
+
ee,
|
|
207
|
+
{
|
|
301
208
|
sx: {
|
|
302
209
|
alignItems: "center",
|
|
303
210
|
backgroundColor: "background.highlight",
|
|
304
211
|
display: "flex",
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
212
|
+
gap: 12,
|
|
213
|
+
padding: "12px 24px",
|
|
214
|
+
borderBottomLeftRadius: "3px",
|
|
215
|
+
borderBottomRightRadius: "3px",
|
|
216
|
+
minHeight: "auto"
|
|
309
217
|
},
|
|
310
|
-
children:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
218
|
+
children: /* @__PURE__ */ e(he, { remaining: i })
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
var te = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(te || {});
|
|
222
|
+
const St = ({ recurrence: i }) => /* @__PURE__ */ n(j, { children: [
|
|
223
|
+
/* @__PURE__ */ n(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
224
|
+
/* @__PURE__ */ n(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
225
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: U(i.expectedDate, Y.MONTH) }),
|
|
226
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: U(i.expectedDate, Y.DAY) })
|
|
227
|
+
] }),
|
|
228
|
+
/* @__PURE__ */ e(m, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
|
|
229
|
+
/* @__PURE__ */ e(
|
|
230
|
+
E,
|
|
231
|
+
{
|
|
232
|
+
amount: i.amount,
|
|
233
|
+
bold: !0,
|
|
234
|
+
sx: { textAlign: "right", fontSize: 13 }
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
] }),
|
|
238
|
+
/* @__PURE__ */ e(v, {})
|
|
239
|
+
] }), Te = A(St), Dt = ({ total: i, type: o }) => {
|
|
240
|
+
const { cashflow: t } = L();
|
|
241
|
+
return /* @__PURE__ */ n(j, { children: [
|
|
242
|
+
/* @__PURE__ */ n(
|
|
243
|
+
it,
|
|
244
|
+
{
|
|
245
|
+
sx: {
|
|
246
|
+
alignItems: "center",
|
|
247
|
+
backgroundColor: "background.highlight",
|
|
248
|
+
display: "flex",
|
|
249
|
+
justifyContent: "space-between",
|
|
250
|
+
pb: 4,
|
|
251
|
+
pt: 12,
|
|
252
|
+
px: 24
|
|
253
|
+
},
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: o === te.EXPENSE ? t.expenses : t.income }),
|
|
256
|
+
/* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
257
|
+
o === te.EXPENSE ? "-" : "+",
|
|
258
|
+
J(i, "0,0.00")
|
|
259
|
+
] })
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ e(v, {})
|
|
264
|
+
] });
|
|
265
|
+
}, Ae = A(Dt), oe = (i, o) => (t) => t.accountGuid === i.guid && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), It = () => {
|
|
266
|
+
const { availableWidth: i } = ae(), { cashflow: o } = L(), { upcomingExpenses: t, upcomingIncome: r } = B(), { dateRange: f, selectedCashAccounts: u } = q();
|
|
267
|
+
return /* @__PURE__ */ n(s, { children: [
|
|
268
|
+
/* @__PURE__ */ n(s, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
269
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12 }, children: o.accounts_breakdown }),
|
|
270
|
+
/* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 15, mb: 12 }, children: [
|
|
271
|
+
U(f.start, Y.FULL_MONTH_DAY),
|
|
340
272
|
" -",
|
|
341
273
|
" ",
|
|
342
|
-
U(f.end,
|
|
343
|
-
]
|
|
344
|
-
})
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
274
|
+
U(f.end, Y.FULL_MONTH_DAY)
|
|
275
|
+
] })
|
|
276
|
+
] }),
|
|
277
|
+
/* @__PURE__ */ e(s, { children: u.map((c) => {
|
|
278
|
+
const l = r.filter(oe(c, f)).sort((d, x) => le(d.expectedDate) - le(x.expectedDate)), b = t.filter(
|
|
279
|
+
oe(c, f)
|
|
280
|
+
), a = l.reduce(
|
|
281
|
+
(d, x) => d + x.amount,
|
|
282
|
+
0
|
|
283
|
+
), g = b.reduce(
|
|
284
|
+
(d, x) => d + x.amount,
|
|
285
|
+
0
|
|
286
|
+
);
|
|
287
|
+
return /* @__PURE__ */ n(
|
|
288
|
+
Q,
|
|
289
|
+
{
|
|
290
|
+
sx: {
|
|
291
|
+
border: "1px solid",
|
|
292
|
+
borderColor: "neutral.light",
|
|
293
|
+
mb: 24,
|
|
294
|
+
borderRadius: 1
|
|
295
|
+
},
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ e(
|
|
298
|
+
ot,
|
|
299
|
+
{
|
|
300
|
+
account: c,
|
|
301
|
+
listItemProps: {
|
|
302
|
+
disableGutters: !1,
|
|
303
|
+
disablePadding: !1,
|
|
304
|
+
sx: { borderTopRadius: 1, pr: 24 }
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
),
|
|
308
|
+
/* @__PURE__ */ e(v, {}),
|
|
309
|
+
l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
310
|
+
Q,
|
|
311
|
+
{
|
|
312
|
+
subheader: /* @__PURE__ */ e(Ae, { total: a, type: te.INCOME }),
|
|
313
|
+
sx: { width: "100%" },
|
|
314
|
+
children: l.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
315
|
+
}
|
|
316
|
+
) }),
|
|
317
|
+
b.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
318
|
+
Q,
|
|
319
|
+
{
|
|
320
|
+
subheader: /* @__PURE__ */ e(Ae, { total: g, type: te.EXPENSE }),
|
|
321
|
+
sx: { width: "100%" },
|
|
322
|
+
children: b.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
323
|
+
}
|
|
324
|
+
) }),
|
|
325
|
+
/* @__PURE__ */ e(
|
|
326
|
+
wt,
|
|
327
|
+
{
|
|
328
|
+
remaining: (c.available_balance || c.balance || 0) + a - g
|
|
329
|
+
}
|
|
330
|
+
)
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
c.guid
|
|
334
|
+
);
|
|
335
|
+
}) })
|
|
336
|
+
] });
|
|
337
|
+
}, vt = A(It), Tt = () => {
|
|
338
|
+
const { availableWidth: i } = ae(), o = ie(), { cashflow: t } = L(), { upcomingExpenses: r, upcomingIncome: f } = B(), { dateRange: u, selectedCashAccounts: c } = q(), l = [
|
|
389
339
|
{
|
|
390
340
|
field: "account",
|
|
391
341
|
flex: 1.5,
|
|
392
342
|
headerName: t.accounts,
|
|
393
|
-
renderCell: ({ value: { name:
|
|
394
|
-
const C = g ||
|
|
395
|
-
return /* @__PURE__ */ n(s, {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
})]
|
|
407
|
-
});
|
|
343
|
+
renderCell: ({ value: { name: a, nickname: g, institution_guid: d, account_number: x } }) => {
|
|
344
|
+
const C = g || a;
|
|
345
|
+
return /* @__PURE__ */ n(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
346
|
+
/* @__PURE__ */ e(
|
|
347
|
+
xe,
|
|
348
|
+
{
|
|
349
|
+
alt: t.institution_logo,
|
|
350
|
+
institutionGuid: d || "",
|
|
351
|
+
size: 16
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: `${C} ${x ? `*${x}` : ""}` })
|
|
355
|
+
] });
|
|
408
356
|
}
|
|
409
357
|
},
|
|
410
358
|
{
|
|
@@ -412,759 +360,707 @@ var Y = () => {
|
|
|
412
360
|
flex: 1,
|
|
413
361
|
headerName: t.balance,
|
|
414
362
|
type: "number",
|
|
415
|
-
renderCell: (
|
|
416
|
-
color: a.palette.text.primary,
|
|
417
|
-
variant: "body2",
|
|
418
|
-
children: V(i.value, "0,0.00")
|
|
419
|
-
})
|
|
363
|
+
renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: J(a.value, "0,0.00") })
|
|
420
364
|
},
|
|
421
365
|
{
|
|
422
366
|
field: "income",
|
|
423
367
|
flex: 1,
|
|
424
368
|
headerName: t.projected_income,
|
|
425
369
|
type: "number",
|
|
426
|
-
renderCell: (
|
|
427
|
-
color: a.palette.text.primary,
|
|
428
|
-
variant: "body2",
|
|
429
|
-
children: `+${V(i.value, "0,0.00")}`
|
|
430
|
-
})
|
|
370
|
+
renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: `+${J(a.value, "0,0.00")}` })
|
|
431
371
|
},
|
|
432
372
|
{
|
|
433
373
|
field: "expenses",
|
|
434
374
|
flex: 1.1,
|
|
435
375
|
headerName: t.projected_expenses,
|
|
436
376
|
type: "number",
|
|
437
|
-
renderCell: (
|
|
438
|
-
color: a.palette.text.primary,
|
|
439
|
-
variant: "body2",
|
|
440
|
-
children: `-${V(i.value, "0,0.00")}`
|
|
441
|
-
})
|
|
377
|
+
renderCell: (a) => /* @__PURE__ */ e(m, { color: o.palette.text.primary, variant: "body2", children: `-${J(a.value, "0,0.00")}` })
|
|
442
378
|
},
|
|
443
379
|
{
|
|
444
380
|
field: "remaining",
|
|
445
381
|
flex: 1,
|
|
446
382
|
headerName: t.remaining,
|
|
447
383
|
type: "number",
|
|
448
|
-
renderCell: (
|
|
449
|
-
const g =
|
|
450
|
-
return /* @__PURE__ */ e(
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
384
|
+
renderCell: (a) => {
|
|
385
|
+
const g = a.row.balance + a.row.income - a.row.expenses;
|
|
386
|
+
return /* @__PURE__ */ e(
|
|
387
|
+
m,
|
|
388
|
+
{
|
|
389
|
+
color: Math.sign(g) === -1 ? o.palette.error.main : o.palette.text.primary,
|
|
390
|
+
variant: "body2",
|
|
391
|
+
children: J(g, "0,0.00")
|
|
392
|
+
}
|
|
393
|
+
);
|
|
455
394
|
}
|
|
456
395
|
}
|
|
457
|
-
], b = h.useMemo(() => c.map((
|
|
458
|
-
const g = r.filter(
|
|
459
|
-
start:
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
end: Se(H(), 30)
|
|
464
|
-
})).reduce((C, w) => C + w.amount, 0), x = (i.balance || 0) + d - g;
|
|
396
|
+
], b = h.useMemo(() => c.map((a) => {
|
|
397
|
+
const g = r.filter(
|
|
398
|
+
oe(a, { start: F(), end: _e(F(), 30) })
|
|
399
|
+
).reduce((C, w) => C + w.amount, 0), d = f.filter(
|
|
400
|
+
oe(a, { start: F(), end: _e(F(), 30) })
|
|
401
|
+
).reduce((C, w) => C + w.amount, 0), x = (a.balance || 0) + d - g;
|
|
465
402
|
return {
|
|
466
|
-
account:
|
|
467
|
-
balance:
|
|
468
|
-
id:
|
|
403
|
+
account: a,
|
|
404
|
+
balance: a.balance || 0,
|
|
405
|
+
id: a.guid,
|
|
469
406
|
income: d,
|
|
470
407
|
expenses: g,
|
|
471
408
|
remaining: x
|
|
472
409
|
};
|
|
473
|
-
}), [
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
]);
|
|
478
|
-
return /* @__PURE__ */ n(D, {
|
|
479
|
-
sx: { width: "100%" },
|
|
480
|
-
children: [/* @__PURE__ */ n(s, {
|
|
481
|
-
direction: o < 540 ? "column" : "row",
|
|
482
|
-
justifyContent: "space-between",
|
|
483
|
-
mb: 12,
|
|
484
|
-
children: [/* @__PURE__ */ n(s, {
|
|
485
|
-
alignItems: "center",
|
|
486
|
-
direction: "row",
|
|
487
|
-
gap: 8,
|
|
488
|
-
children: [/* @__PURE__ */ e(m, {
|
|
489
|
-
bold: !0,
|
|
490
|
-
sx: { fontSize: 15 },
|
|
491
|
-
children: t.cash_inflow_and_outflow
|
|
492
|
-
}), /* @__PURE__ */ e(le, {
|
|
493
|
-
body: t.table_tooltip_body,
|
|
494
|
-
title: t.table_tooltip_title
|
|
495
|
-
})]
|
|
496
|
-
}), /* @__PURE__ */ n(m, {
|
|
497
|
-
bold: !0,
|
|
498
|
-
sx: { fontSize: 15 },
|
|
499
|
-
children: [
|
|
500
|
-
U(u.start, P.FULL_MONTH_DAY),
|
|
501
|
-
" -",
|
|
502
|
-
" ",
|
|
503
|
-
U(u.end, P.FULL_MONTH_DAY)
|
|
504
|
-
]
|
|
505
|
-
})]
|
|
506
|
-
}), o > 650 ? /* @__PURE__ */ e(gt, {
|
|
507
|
-
columnHeaderHeight: 48,
|
|
508
|
-
columns: l,
|
|
509
|
-
density: "standard",
|
|
510
|
-
disableColumnMenu: !0,
|
|
511
|
-
disableRowSelectionOnClick: !0,
|
|
512
|
-
hideFooter: !0,
|
|
513
|
-
rowHeight: 48,
|
|
514
|
-
rows: b,
|
|
410
|
+
}), [c, r, f]);
|
|
411
|
+
return /* @__PURE__ */ n(
|
|
412
|
+
I,
|
|
413
|
+
{
|
|
515
414
|
sx: {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
fontSize: a.typography.body2.fontSize
|
|
526
|
-
},
|
|
527
|
-
"& .MuiDataGrid-sortIcon": { color: a.palette.primary.main }
|
|
528
|
-
}
|
|
529
|
-
}) : b.map((i) => {
|
|
530
|
-
const { name: g, nickname: d, institution_guid: x, account_number: C } = i.account, w = d || g;
|
|
531
|
-
return /* @__PURE__ */ e(X, {
|
|
532
|
-
sx: {
|
|
533
|
-
border: "1px solid",
|
|
534
|
-
borderColor: "neutral.light",
|
|
535
|
-
borderRadius: 1,
|
|
536
|
-
marginBottom: 24
|
|
537
|
-
},
|
|
538
|
-
children: /* @__PURE__ */ e(Q, {
|
|
539
|
-
sx: { minHeight: "auto" },
|
|
540
|
-
children: /* @__PURE__ */ n(s, {
|
|
541
|
-
width: "100%",
|
|
415
|
+
width: "100%"
|
|
416
|
+
},
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ n(
|
|
419
|
+
s,
|
|
420
|
+
{
|
|
421
|
+
direction: i < 540 ? "column" : "row",
|
|
422
|
+
justifyContent: "space-between",
|
|
423
|
+
mb: 12,
|
|
542
424
|
children: [
|
|
543
|
-
/* @__PURE__ */ n(s, {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
})
|
|
568
|
-
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
569
|
-
/* @__PURE__ */ n(s, {
|
|
570
|
-
alignItems: "center",
|
|
571
|
-
flexDirection: "row",
|
|
572
|
-
justifyContent: "space-between",
|
|
573
|
-
px: 16,
|
|
574
|
-
py: 12,
|
|
575
|
-
children: [/* @__PURE__ */ e(m, {
|
|
576
|
-
variant: "body2",
|
|
577
|
-
children: t.projected_income
|
|
578
|
-
}), /* @__PURE__ */ e(E, {
|
|
579
|
-
amount: i.income,
|
|
580
|
-
bold: !0,
|
|
581
|
-
symbol: "+",
|
|
582
|
-
variant: "body2"
|
|
583
|
-
})]
|
|
584
|
-
}),
|
|
585
|
-
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
586
|
-
/* @__PURE__ */ n(s, {
|
|
587
|
-
alignItems: "center",
|
|
588
|
-
flexDirection: "row",
|
|
589
|
-
justifyContent: "space-between",
|
|
590
|
-
px: 16,
|
|
591
|
-
py: 12,
|
|
592
|
-
children: [/* @__PURE__ */ e(m, {
|
|
593
|
-
variant: "body2",
|
|
594
|
-
children: t.projected_expenses
|
|
595
|
-
}), /* @__PURE__ */ e(E, {
|
|
596
|
-
amount: i.expenses,
|
|
597
|
-
bold: !0,
|
|
598
|
-
symbol: "-",
|
|
599
|
-
variant: "body2"
|
|
600
|
-
})]
|
|
601
|
-
}),
|
|
602
|
-
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
603
|
-
/* @__PURE__ */ e(s, {
|
|
604
|
-
alignItems: "center",
|
|
605
|
-
bgcolor: "background.default",
|
|
606
|
-
flexDirection: "row",
|
|
607
|
-
gap: 8,
|
|
608
|
-
justifyContent: "space-between",
|
|
609
|
-
px: 16,
|
|
610
|
-
py: 12,
|
|
611
|
-
sx: {
|
|
612
|
-
borderBottomLeftRadius: "4px",
|
|
613
|
-
borderBottomRightRadius: "4px"
|
|
614
|
-
},
|
|
615
|
-
children: /* @__PURE__ */ e(pe, { remaining: i.remaining })
|
|
616
|
-
})
|
|
425
|
+
/* @__PURE__ */ n(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
426
|
+
/* @__PURE__ */ e(
|
|
427
|
+
m,
|
|
428
|
+
{
|
|
429
|
+
bold: !0,
|
|
430
|
+
sx: {
|
|
431
|
+
fontSize: 15
|
|
432
|
+
},
|
|
433
|
+
children: t.cash_inflow_and_outflow
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
/* @__PURE__ */ e(
|
|
437
|
+
pe,
|
|
438
|
+
{
|
|
439
|
+
body: t.table_tooltip_body,
|
|
440
|
+
title: t.table_tooltip_title
|
|
441
|
+
}
|
|
442
|
+
)
|
|
443
|
+
] }),
|
|
444
|
+
/* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 15 }, children: [
|
|
445
|
+
U(u.start, Y.FULL_MONTH_DAY),
|
|
446
|
+
" -",
|
|
447
|
+
" ",
|
|
448
|
+
U(u.end, Y.FULL_MONTH_DAY)
|
|
449
|
+
] })
|
|
617
450
|
]
|
|
618
|
-
}
|
|
451
|
+
}
|
|
452
|
+
),
|
|
453
|
+
i > 650 ? /* @__PURE__ */ e(
|
|
454
|
+
at,
|
|
455
|
+
{
|
|
456
|
+
columnHeaderHeight: 48,
|
|
457
|
+
columns: l,
|
|
458
|
+
density: "standard",
|
|
459
|
+
disableColumnMenu: !0,
|
|
460
|
+
disableRowSelectionOnClick: !0,
|
|
461
|
+
hideFooter: !0,
|
|
462
|
+
rowHeight: 48,
|
|
463
|
+
rows: b,
|
|
464
|
+
sx: {
|
|
465
|
+
border: "1px solid",
|
|
466
|
+
borderColor: "neutral.light",
|
|
467
|
+
borderRadius: 1,
|
|
468
|
+
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
469
|
+
color: o.palette.primary.main,
|
|
470
|
+
"&:hover": {
|
|
471
|
+
backgroundColor: qe(o.palette.primary.main, 0.1)
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
475
|
+
fontFamily: o.typography.h3.fontFamily,
|
|
476
|
+
fontSize: o.typography.body2.fontSize
|
|
477
|
+
},
|
|
478
|
+
"& .MuiDataGrid-sortIcon": {
|
|
479
|
+
color: o.palette.primary.main
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
) : b.map((a) => {
|
|
484
|
+
const { name: g, nickname: d, institution_guid: x, account_number: C } = a.account, w = d || g;
|
|
485
|
+
return /* @__PURE__ */ e(
|
|
486
|
+
Q,
|
|
487
|
+
{
|
|
488
|
+
sx: {
|
|
489
|
+
border: "1px solid",
|
|
490
|
+
borderColor: "neutral.light",
|
|
491
|
+
borderRadius: 1,
|
|
492
|
+
marginBottom: 24
|
|
493
|
+
},
|
|
494
|
+
children: /* @__PURE__ */ e(ee, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ n(s, { width: "100%", children: [
|
|
495
|
+
/* @__PURE__ */ n(
|
|
496
|
+
s,
|
|
497
|
+
{
|
|
498
|
+
alignItems: "center",
|
|
499
|
+
flexDirection: "row",
|
|
500
|
+
justifyContent: "space-between",
|
|
501
|
+
px: 16,
|
|
502
|
+
py: 12,
|
|
503
|
+
children: [
|
|
504
|
+
/* @__PURE__ */ n(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
|
|
505
|
+
/* @__PURE__ */ e(
|
|
506
|
+
xe,
|
|
507
|
+
{
|
|
508
|
+
alt: t.institution_logo,
|
|
509
|
+
institutionGuid: x || "",
|
|
510
|
+
size: 16
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: `${w} ${C ? `*${C}` : ""}` })
|
|
514
|
+
] }),
|
|
515
|
+
/* @__PURE__ */ e(E, { amount: a.balance, bold: !0, variant: "body2" })
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
),
|
|
519
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
520
|
+
/* @__PURE__ */ n(
|
|
521
|
+
s,
|
|
522
|
+
{
|
|
523
|
+
alignItems: "center",
|
|
524
|
+
flexDirection: "row",
|
|
525
|
+
justifyContent: "space-between",
|
|
526
|
+
px: 16,
|
|
527
|
+
py: 12,
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: t.projected_income }),
|
|
530
|
+
/* @__PURE__ */ e(E, { amount: a.income, bold: !0, symbol: "+", variant: "body2" })
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
),
|
|
534
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
535
|
+
/* @__PURE__ */ n(
|
|
536
|
+
s,
|
|
537
|
+
{
|
|
538
|
+
alignItems: "center",
|
|
539
|
+
flexDirection: "row",
|
|
540
|
+
justifyContent: "space-between",
|
|
541
|
+
px: 16,
|
|
542
|
+
py: 12,
|
|
543
|
+
children: [
|
|
544
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: t.projected_expenses }),
|
|
545
|
+
/* @__PURE__ */ e(E, { amount: a.expenses, bold: !0, symbol: "-", variant: "body2" })
|
|
546
|
+
]
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
550
|
+
/* @__PURE__ */ e(
|
|
551
|
+
s,
|
|
552
|
+
{
|
|
553
|
+
alignItems: "center",
|
|
554
|
+
bgcolor: "background.default",
|
|
555
|
+
flexDirection: "row",
|
|
556
|
+
gap: 8,
|
|
557
|
+
justifyContent: "space-between",
|
|
558
|
+
px: 16,
|
|
559
|
+
py: 12,
|
|
560
|
+
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
561
|
+
children: /* @__PURE__ */ e(he, { remaining: a.remaining })
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
] }) })
|
|
565
|
+
},
|
|
566
|
+
a.id
|
|
567
|
+
);
|
|
619
568
|
})
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
},
|
|
624
|
-
const { cashflow:
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}, At = A(Tt), Rt = () => {
|
|
573
|
+
const { cashflow: i } = L(), { isDesktop: o } = ue(), { onEvent: t } = ke(), [r, f] = h.useState(0), u = (c, l) => {
|
|
625
574
|
f(l);
|
|
626
575
|
};
|
|
627
576
|
return h.useEffect(() => {
|
|
628
577
|
t(r === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
629
|
-
}, [r]), /* @__PURE__ */ n(
|
|
630
|
-
/* @__PURE__ */ n(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
})
|
|
578
|
+
}, [r]), /* @__PURE__ */ n(I, { children: [
|
|
579
|
+
/* @__PURE__ */ n(
|
|
580
|
+
nt,
|
|
581
|
+
{
|
|
582
|
+
"aria-label": i.cashflow_summary_and_details,
|
|
583
|
+
centered: !0,
|
|
584
|
+
onChange: u,
|
|
585
|
+
textColor: "primary",
|
|
586
|
+
value: r,
|
|
587
|
+
variant: "fullWidth",
|
|
588
|
+
children: [
|
|
589
|
+
/* @__PURE__ */ e(
|
|
590
|
+
ye,
|
|
591
|
+
{
|
|
592
|
+
"aria-controls": "cashflow-tabpanel-0",
|
|
593
|
+
id: "cashflow-tab-0",
|
|
594
|
+
label: i.summary,
|
|
595
|
+
sx: {
|
|
596
|
+
textTransform: "none"
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
/* @__PURE__ */ e(
|
|
601
|
+
ye,
|
|
602
|
+
{
|
|
603
|
+
"aria-controls": "cashflow-tabpanel-1",
|
|
604
|
+
id: "cashflow-tab-1",
|
|
605
|
+
label: i.details,
|
|
606
|
+
sx: {
|
|
607
|
+
textTransform: "none"
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
),
|
|
614
|
+
/* @__PURE__ */ e(I, { sx: { mb: 32 } }),
|
|
615
|
+
/* @__PURE__ */ e(Ce, { index: 0, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: o ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) }),
|
|
616
|
+
/* @__PURE__ */ e(Ce, { index: 1, name: "cashflow", value: r, children: /* @__PURE__ */ e(I, { sx: { m: o ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) })
|
|
668
617
|
] });
|
|
669
|
-
},
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
component: "span",
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
children: "
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
});
|
|
789
|
-
}, Nt = A(Et), kt = ({ onBackClick: o, onMenuClick: a, sx: t = {} }) => {
|
|
790
|
-
const { selectedAccounts: r, selectedAccountGuids: f, shouldDisableNextDate: u, shouldDisablePrevDate: c } = $(), { onEvent: l } = Oe(), { clientConfig: b } = et(), { visibleCashAccounts: i } = Ge(), { setFilter: g } = Le(), { dateRange: d, setSelectedCashAccounts: x } = Y(), { loadRepeatingTransactionData: C, isDataLoaded: w, setDateRange: R } = B(), { cashflow: v, recurring: k } = N(), { isInitialized: p } = $(), y = b?.master?.deep_link_params?.view === "manage_income", [S, Z] = h.useState(y);
|
|
618
|
+
}, Et = A(Rt), ne = ({
|
|
619
|
+
amount: i,
|
|
620
|
+
isMobile: o = !1,
|
|
621
|
+
isTotal: t = !1,
|
|
622
|
+
label: r,
|
|
623
|
+
symbol: f,
|
|
624
|
+
tooltip: u
|
|
625
|
+
}) => /* @__PURE__ */ n(
|
|
626
|
+
s,
|
|
627
|
+
{
|
|
628
|
+
bgcolor: t ? "background.default" : "transparent",
|
|
629
|
+
direction: o ? "row" : "column",
|
|
630
|
+
justifyContent: o ? "space-between" : "initial",
|
|
631
|
+
padding: o ? "14px 16px" : 0,
|
|
632
|
+
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
633
|
+
children: [
|
|
634
|
+
!o && /* @__PURE__ */ e(E, { amount: i, component: "h2", variant: "h2" }),
|
|
635
|
+
/* @__PURE__ */ n(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
636
|
+
/* @__PURE__ */ e(m, { bold: t, variant: "body2", children: r }),
|
|
637
|
+
u
|
|
638
|
+
] }),
|
|
639
|
+
o && /* @__PURE__ */ e(E, { amount: i, component: "h2", symbol: f, variant: "body2" })
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
), Re = (i, o) => (t) => t.accountGuid && i.includes(t.accountGuid) && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), Lt = () => {
|
|
643
|
+
const { availableWidth: i } = ae(), { cashflow: o } = L(), { income: t, isDataLoaded: r, upcomingExpenses: f, upcomingIncome: u } = B(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: b } = q(), [a, g] = h.useState(!1), d = h.useMemo(
|
|
644
|
+
() => f.filter(Re(c, l)),
|
|
645
|
+
[l, c, f]
|
|
646
|
+
), x = h.useMemo(
|
|
647
|
+
() => u.filter(Re(c, l)),
|
|
648
|
+
[l, c, u]
|
|
649
|
+
), C = h.useMemo(
|
|
650
|
+
() => b.reduce((_, S) => _ + (S?.balance || 0), 0),
|
|
651
|
+
[b]
|
|
652
|
+
), w = d.reduce((_, S) => _ + S.amount, 0), R = x.reduce((_, S) => _ + S.amount, 0), D = C - w + R, k = r && t.length > 0, p = i < 725;
|
|
653
|
+
return /* @__PURE__ */ n(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
654
|
+
/* @__PURE__ */ n(
|
|
655
|
+
s,
|
|
656
|
+
{
|
|
657
|
+
border: p ? "1px solid" : "none",
|
|
658
|
+
borderColor: "neutral.light",
|
|
659
|
+
borderRadius: 2,
|
|
660
|
+
flexDirection: p ? "column" : "row",
|
|
661
|
+
gap: p ? 0 : 24,
|
|
662
|
+
justifyContent: "center",
|
|
663
|
+
children: [
|
|
664
|
+
/* @__PURE__ */ e(
|
|
665
|
+
ne,
|
|
666
|
+
{
|
|
667
|
+
amount: C,
|
|
668
|
+
isMobile: p,
|
|
669
|
+
label: H(o.cash_and_bank, b.length)
|
|
670
|
+
}
|
|
671
|
+
),
|
|
672
|
+
p && /* @__PURE__ */ e(v, {}),
|
|
673
|
+
k ? /* @__PURE__ */ n(j, { children: [
|
|
674
|
+
!p && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
675
|
+
/* @__PURE__ */ e(
|
|
676
|
+
ne,
|
|
677
|
+
{
|
|
678
|
+
amount: R,
|
|
679
|
+
isMobile: p,
|
|
680
|
+
label: o.to_be_received,
|
|
681
|
+
symbol: p ? "+" : void 0
|
|
682
|
+
}
|
|
683
|
+
)
|
|
684
|
+
] }) : /* @__PURE__ */ e(
|
|
685
|
+
W,
|
|
686
|
+
{
|
|
687
|
+
onClick: () => g(!0),
|
|
688
|
+
startIcon: /* @__PURE__ */ e(z, { name: "add" }),
|
|
689
|
+
sx: { fontSize: 13 },
|
|
690
|
+
children: o.add_income
|
|
691
|
+
}
|
|
692
|
+
),
|
|
693
|
+
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
694
|
+
/* @__PURE__ */ e(
|
|
695
|
+
ne,
|
|
696
|
+
{
|
|
697
|
+
amount: w,
|
|
698
|
+
isMobile: p,
|
|
699
|
+
label: H(o.to_be_paid_out, d.length),
|
|
700
|
+
symbol: p ? "-" : void 0
|
|
701
|
+
}
|
|
702
|
+
),
|
|
703
|
+
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
704
|
+
/* @__PURE__ */ e(
|
|
705
|
+
ne,
|
|
706
|
+
{
|
|
707
|
+
amount: D,
|
|
708
|
+
isMobile: p,
|
|
709
|
+
isTotal: p,
|
|
710
|
+
label: o.remaining_cash,
|
|
711
|
+
tooltip: /* @__PURE__ */ e(
|
|
712
|
+
pe,
|
|
713
|
+
{
|
|
714
|
+
body: o.remaining_income_tooltip_body,
|
|
715
|
+
title: o.remaining_income_tooltip_title
|
|
716
|
+
}
|
|
717
|
+
)
|
|
718
|
+
}
|
|
719
|
+
)
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
),
|
|
723
|
+
/* @__PURE__ */ e(
|
|
724
|
+
He,
|
|
725
|
+
{
|
|
726
|
+
ariaLabelClose: o.close_manage_income_aria,
|
|
727
|
+
isOpen: a,
|
|
728
|
+
onClose: () => g(!1),
|
|
729
|
+
shouldShowHeaderBorders: !1,
|
|
730
|
+
title: o.manage_income,
|
|
731
|
+
children: /* @__PURE__ */ e(rt, {})
|
|
732
|
+
}
|
|
733
|
+
)
|
|
734
|
+
] });
|
|
735
|
+
}, kt = A(Lt), Nt = ({ onBackClick: i, onMenuClick: o, sx: t = {} }) => {
|
|
736
|
+
const { selectedAccounts: r, selectedAccountGuids: f, shouldDisableNextDate: u, shouldDisablePrevDate: c } = P(), { onEvent: l } = ke(), { clientConfig: b } = Je(), { visibleCashAccounts: a } = Le(), { setFilter: g } = Ne(), { dateRange: d, setSelectedCashAccounts: x } = q(), { loadRepeatingTransactionData: C, isDataLoaded: w, setDateRange: R } = B(), { cashflow: D, recurring: k } = L(), { isInitialized: p } = P(), S = b?.master?.deep_link_params?.view === "manage_income", [re, K] = h.useState(S);
|
|
791
737
|
return h.useEffect(() => {
|
|
792
738
|
R(d), w || C().finally();
|
|
793
739
|
}, []), h.useEffect(() => {
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
accounts: te.map((O) => O.guid)
|
|
740
|
+
const se = a.map((G) => G.guid), $ = r.filter(
|
|
741
|
+
(G) => f.includes(G.guid) && se.includes(G.guid)
|
|
742
|
+
);
|
|
743
|
+
x($), g({
|
|
744
|
+
dateRange: { start: We(F(), 90), end: dt() },
|
|
745
|
+
accounts: $.map((G) => G.guid)
|
|
801
746
|
});
|
|
802
|
-
}, [
|
|
747
|
+
}, [a, r]), Oe({
|
|
803
748
|
widgetName: "CashflowWidget",
|
|
804
749
|
isLoaded: w
|
|
805
|
-
}), p ? /* @__PURE__ */ n(
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
ariaLabelClose: v.close_settings_aria,
|
|
840
|
-
isOpen: S,
|
|
841
|
-
onClose: () => Z(!1),
|
|
842
|
-
shouldShowHeaderBorders: !1,
|
|
843
|
-
title: k.action_title,
|
|
844
|
-
children: /* @__PURE__ */ e(nt, { defaultSelectedTab: y ? 1 : 0 })
|
|
845
|
-
})
|
|
846
|
-
]
|
|
847
|
-
}) : /* @__PURE__ */ e(J, {});
|
|
848
|
-
}, Cn = A(kt), Lt = ({ handleNextStep: o }) => {
|
|
849
|
-
const { completeOnboarding: a } = me(), { cashflow: t } = N(), r = re();
|
|
850
|
-
return /* @__PURE__ */ n(s, { children: [
|
|
851
|
-
/* @__PURE__ */ e(ue, {
|
|
852
|
-
pb: 12,
|
|
853
|
-
variant: "h1",
|
|
854
|
-
children: t.welcome_title
|
|
855
|
-
}),
|
|
856
|
-
/* @__PURE__ */ e(st, {
|
|
857
|
-
color: r.palette.primary.light,
|
|
858
|
-
pb: 8,
|
|
859
|
-
children: t.welcome_sub_title
|
|
860
|
-
}),
|
|
861
|
-
/* @__PURE__ */ e(L, {
|
|
862
|
-
pb: 32,
|
|
863
|
-
children: t.welcome_description
|
|
864
|
-
}),
|
|
865
|
-
/* @__PURE__ */ n(s, {
|
|
866
|
-
direction: "column",
|
|
867
|
-
mb: 32,
|
|
868
|
-
spacing: 32,
|
|
750
|
+
}), p ? /* @__PURE__ */ n(
|
|
751
|
+
mt,
|
|
752
|
+
{
|
|
753
|
+
actions: [
|
|
754
|
+
{
|
|
755
|
+
label: k.action_title,
|
|
756
|
+
iconName: "credit_card_gear",
|
|
757
|
+
onClick: () => {
|
|
758
|
+
K(!0), l(Se.CASH_FLOW_CLICK_SETTINGS);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
],
|
|
762
|
+
allowedAccountTypes: [
|
|
763
|
+
X.CASH,
|
|
764
|
+
X.CHECKING,
|
|
765
|
+
X.PREPAID,
|
|
766
|
+
X.SAVINGS,
|
|
767
|
+
X.CHECKING_LINE_OF_CREDIT
|
|
768
|
+
],
|
|
769
|
+
calendarActions: {
|
|
770
|
+
shouldDisableNext: u,
|
|
771
|
+
shouldDisablePrevious: c,
|
|
772
|
+
shouldDisablePicker: !0,
|
|
773
|
+
onRangeChanged: () => {
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
dateRange: d,
|
|
777
|
+
dateRangeVariant: "readonly",
|
|
778
|
+
hasDivider: !0,
|
|
779
|
+
onAccountsFilterClick: () => l(Se.CASH_FLOW_CLICK_FILTER),
|
|
780
|
+
onBackClick: i,
|
|
781
|
+
onMenuClick: o,
|
|
782
|
+
sx: t,
|
|
783
|
+
title: D.title,
|
|
869
784
|
children: [
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
785
|
+
/* @__PURE__ */ e(kt, {}),
|
|
786
|
+
/* @__PURE__ */ e(Et, {}),
|
|
787
|
+
/* @__PURE__ */ e(
|
|
788
|
+
He,
|
|
789
|
+
{
|
|
790
|
+
ariaLabelClose: D.close_settings_aria,
|
|
791
|
+
isOpen: re,
|
|
792
|
+
onClose: () => K(!1),
|
|
793
|
+
shouldShowHeaderBorders: !1,
|
|
794
|
+
title: k.action_title,
|
|
795
|
+
children: /* @__PURE__ */ e(tt, { defaultSelectedTab: S ? 1 : 0 })
|
|
796
|
+
}
|
|
797
|
+
)
|
|
798
|
+
]
|
|
799
|
+
}
|
|
800
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
801
|
+
}, Fn = A(Nt), Ot = ({ handleNextStep: i }) => {
|
|
802
|
+
const { completeOnboarding: o } = me(), { cashflow: t } = L(), r = ie();
|
|
803
|
+
return /* @__PURE__ */ n(s, { children: [
|
|
804
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.welcome_title }),
|
|
805
|
+
/* @__PURE__ */ e(Ve, { color: r.palette.primary.light, pb: 8, children: t.welcome_sub_title }),
|
|
806
|
+
/* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
|
|
807
|
+
/* @__PURE__ */ n(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
808
|
+
/* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
809
|
+
/* @__PURE__ */ e(
|
|
810
|
+
I,
|
|
811
|
+
{
|
|
877
812
|
bgcolor: r.palette.primary.lighter,
|
|
878
813
|
borderRadius: 1,
|
|
879
814
|
component: "span",
|
|
880
815
|
height: 44,
|
|
881
816
|
mr: 24,
|
|
882
|
-
sx: {
|
|
883
|
-
display: "flex",
|
|
884
|
-
alignItems: "center",
|
|
885
|
-
justifyContent: "center",
|
|
886
|
-
flexShrink: 0
|
|
887
|
-
},
|
|
817
|
+
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
888
818
|
width: 44,
|
|
889
|
-
children: /* @__PURE__ */ e(z, {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
alignItems: "center",
|
|
899
|
-
fontSize: 18
|
|
900
|
-
},
|
|
901
|
-
children: [/* @__PURE__ */ e(D, {
|
|
819
|
+
children: /* @__PURE__ */ e(z, { color: "primary", name: "currency_exchange" })
|
|
820
|
+
}
|
|
821
|
+
),
|
|
822
|
+
t.bullet_one
|
|
823
|
+
] }),
|
|
824
|
+
/* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
825
|
+
/* @__PURE__ */ e(
|
|
826
|
+
I,
|
|
827
|
+
{
|
|
902
828
|
bgcolor: r.palette.primary.lighter,
|
|
903
829
|
borderRadius: 1,
|
|
904
830
|
component: "span",
|
|
905
831
|
height: 44,
|
|
906
832
|
mr: 24,
|
|
907
|
-
sx: {
|
|
908
|
-
display: "flex",
|
|
909
|
-
alignItems: "center",
|
|
910
|
-
justifyContent: "center",
|
|
911
|
-
flexShrink: 0
|
|
912
|
-
},
|
|
833
|
+
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
913
834
|
width: 44,
|
|
914
|
-
children: /* @__PURE__ */ e(z, {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
alignItems: "center",
|
|
924
|
-
fontSize: 18
|
|
925
|
-
},
|
|
926
|
-
children: [/* @__PURE__ */ e(D, {
|
|
835
|
+
children: /* @__PURE__ */ e(z, { color: "primary", name: "cardiology" })
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
t.bullet_two
|
|
839
|
+
] }),
|
|
840
|
+
/* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
841
|
+
/* @__PURE__ */ e(
|
|
842
|
+
I,
|
|
843
|
+
{
|
|
927
844
|
bgcolor: r.palette.primary.lighter,
|
|
928
845
|
borderRadius: 1,
|
|
929
846
|
component: "span",
|
|
930
847
|
height: 44,
|
|
931
848
|
mr: 24,
|
|
932
|
-
sx: {
|
|
933
|
-
display: "flex",
|
|
934
|
-
alignItems: "center",
|
|
935
|
-
justifyContent: "center",
|
|
936
|
-
flexShrink: 0
|
|
937
|
-
},
|
|
849
|
+
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
938
850
|
width: 44,
|
|
939
|
-
children: /* @__PURE__ */ e(z, {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
spacing: 16,
|
|
950
|
-
children: [/* @__PURE__ */ e(W, {
|
|
951
|
-
onClick: o,
|
|
952
|
-
variant: "contained",
|
|
953
|
-
children: t.get_started_button
|
|
954
|
-
}), /* @__PURE__ */ e(W, {
|
|
955
|
-
onClick: a,
|
|
956
|
-
variant: "outlined",
|
|
957
|
-
children: t.skip_button
|
|
958
|
-
})]
|
|
959
|
-
})
|
|
851
|
+
children: /* @__PURE__ */ e(z, { color: "primary", name: "flare" })
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
t.bullet_three
|
|
855
|
+
] })
|
|
856
|
+
] }),
|
|
857
|
+
/* @__PURE__ */ n(s, { direction: "row", spacing: 16, children: [
|
|
858
|
+
/* @__PURE__ */ e(W, { onClick: i, variant: "contained", children: t.get_started_button }),
|
|
859
|
+
/* @__PURE__ */ e(W, { onClick: o, variant: "outlined", children: t.skip_button })
|
|
860
|
+
] })
|
|
960
861
|
] });
|
|
961
|
-
},
|
|
862
|
+
}, Gt = A(Ot), Ee = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
|
|
962
863
|
CASHFLOW_ONBOARDING: `${Ee}/cashflow-onboarding.png`,
|
|
963
864
|
CASHFLOW_LOADING_ANIMATION: `${Ee}/loading-animation.gif`
|
|
964
|
-
},
|
|
965
|
-
const { cashflow:
|
|
865
|
+
}, Mt = () => {
|
|
866
|
+
const { cashflow: i } = L();
|
|
966
867
|
return /* @__PURE__ */ n(h.Fragment, { children: [
|
|
967
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}) }),
|
|
971
|
-
/* @__PURE__ */ e(ue, {
|
|
972
|
-
pb: 12,
|
|
973
|
-
variant: "h1",
|
|
974
|
-
children: o.loading_title
|
|
975
|
-
}),
|
|
976
|
-
/* @__PURE__ */ e(L, { children: o.loading_description })
|
|
868
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
|
|
869
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: i.loading_title }),
|
|
870
|
+
/* @__PURE__ */ e(N, { children: i.loading_description })
|
|
977
871
|
] });
|
|
978
|
-
},
|
|
872
|
+
}, Ft = A(Mt), Ht = Ke`
|
|
979
873
|
from {
|
|
980
874
|
transform: rotate(0deg);
|
|
981
875
|
}
|
|
982
876
|
to {
|
|
983
877
|
transform: rotate(360deg);
|
|
984
878
|
}
|
|
985
|
-
`,
|
|
986
|
-
const { addRepeatingTransaction:
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
879
|
+
`, Wt = () => {
|
|
880
|
+
const { addRepeatingTransaction: i, repeatingTransactions: o } = B(), { cashflow: t, common: r } = L(), { user: f } = Qe(), { completeOnboarding: u } = me(), { isDirty: c } = q(), { isMobile: l } = ue(), { isCopyLoaded: b, setDisplayedDate: a } = P(), { filter: g, setFilter: d, transactions: x } = Ne(), C = ie(), [w, R] = V(!0), [D, k] = h.useState(gt.EveryMonth), [p, _] = h.useState(1), [S, re] = h.useState(15), [K, se] = V(!1), [$, G] = V(1), [O, je] = V([]), [fe, ce] = V(""), M = h.useMemo(
|
|
881
|
+
() => x.find((y) => y.guid === fe),
|
|
882
|
+
[fe, x]
|
|
883
|
+
), Be = !!o.filter(
|
|
884
|
+
(y) => y.repeating_transaction_type === Ie.Income
|
|
885
|
+
).length, ge = async () => {
|
|
886
|
+
G(2), a(
|
|
887
|
+
// Beginning of the month, 90 days before today
|
|
888
|
+
pt(We(F(), 90)),
|
|
889
|
+
F()
|
|
890
|
+
), d({ ...g, custom: we }), G(3);
|
|
891
|
+
}, $e = async () => {
|
|
892
|
+
if (!(O.length < 1)) {
|
|
893
|
+
se(!0);
|
|
894
|
+
for (let y = 0; y < O.length; y++) {
|
|
895
|
+
const T = O[y], be = ve(D, De(T.date)), Ue = {
|
|
997
896
|
account_guid: T.account_guid,
|
|
998
897
|
amount: T.amount,
|
|
999
898
|
created_by: 0,
|
|
899
|
+
//user
|
|
1000
900
|
merchant_guid: T.merchant_guid,
|
|
1001
901
|
description: T.feed_description || T.description,
|
|
1002
|
-
predicted_occurs_on:
|
|
902
|
+
predicted_occurs_on: ut(be, { representation: "date" }),
|
|
1003
903
|
recurrence_day: be.getDay(),
|
|
1004
|
-
recurrence_type:
|
|
1005
|
-
repeating_transaction_type:
|
|
904
|
+
recurrence_type: D,
|
|
905
|
+
repeating_transaction_type: Ie.Income,
|
|
1006
906
|
second_recurrence_day: S,
|
|
1007
907
|
transaction_type: T.transaction_type,
|
|
1008
908
|
user_guid: f.guid
|
|
1009
|
-
}
|
|
909
|
+
};
|
|
910
|
+
await i(Ue, T);
|
|
1010
911
|
}
|
|
1011
912
|
await u();
|
|
1012
913
|
}
|
|
1013
|
-
},
|
|
1014
|
-
return b ? /* @__PURE__ */ n(
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
}),
|
|
1089
|
-
children:
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
children:
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
})
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
})
|
|
1161
|
-
]
|
|
1162
|
-
})
|
|
1163
|
-
]
|
|
1164
|
-
}) : /* @__PURE__ */ e(J, {});
|
|
1165
|
-
}, wn = A(Ft);
|
|
914
|
+
}, Pe = !M && w || !M && O.length < 1;
|
|
915
|
+
return b ? /* @__PURE__ */ n(
|
|
916
|
+
I,
|
|
917
|
+
{
|
|
918
|
+
sx: {
|
|
919
|
+
display: "flex",
|
|
920
|
+
alignItems: l ? "flex-start" : "center",
|
|
921
|
+
backgroundColor: C.palette.background.paper,
|
|
922
|
+
backgroundImage: l ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
|
|
923
|
+
backgroundRepeat: "no-repeat",
|
|
924
|
+
backgroundPosition: "left 100px",
|
|
925
|
+
backgroundSize: "35%",
|
|
926
|
+
py: 24
|
|
927
|
+
},
|
|
928
|
+
children: [
|
|
929
|
+
$ === 1 && /* @__PURE__ */ e(
|
|
930
|
+
I,
|
|
931
|
+
{
|
|
932
|
+
sx: {
|
|
933
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
934
|
+
},
|
|
935
|
+
children: /* @__PURE__ */ e(Gt, { handleNextStep: ge })
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
$ === 2 && /* @__PURE__ */ e(
|
|
939
|
+
I,
|
|
940
|
+
{
|
|
941
|
+
sx: {
|
|
942
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
943
|
+
},
|
|
944
|
+
children: /* @__PURE__ */ e(Ft, {})
|
|
945
|
+
}
|
|
946
|
+
),
|
|
947
|
+
$ === 3 && /* @__PURE__ */ n(
|
|
948
|
+
I,
|
|
949
|
+
{
|
|
950
|
+
sx: {
|
|
951
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
952
|
+
},
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.add_income_title }),
|
|
955
|
+
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
956
|
+
O.length > 0 && !M && /* @__PURE__ */ n(j, { children: [
|
|
957
|
+
/* @__PURE__ */ e(Q, { children: O.map((y, T) => /* @__PURE__ */ n(h.Fragment, { children: [
|
|
958
|
+
/* @__PURE__ */ e(ht, { bgcolor: "background.paper", children: bt(
|
|
959
|
+
le(y.nextDate || y.date)
|
|
960
|
+
) }),
|
|
961
|
+
/* @__PURE__ */ e(ft, { transaction: y }),
|
|
962
|
+
T !== O.length - 1 && /* @__PURE__ */ e(v, {})
|
|
963
|
+
] }, y.guid)) }),
|
|
964
|
+
/* @__PURE__ */ n(s, { alignItems: "center", direction: "row", children: [
|
|
965
|
+
/* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
|
|
966
|
+
/* @__PURE__ */ e(
|
|
967
|
+
W,
|
|
968
|
+
{
|
|
969
|
+
onClick: () => R(!0),
|
|
970
|
+
startIcon: /* @__PURE__ */ e(z, { name: "add", size: 20 }),
|
|
971
|
+
children: t.add_income
|
|
972
|
+
}
|
|
973
|
+
)
|
|
974
|
+
] })
|
|
975
|
+
] }),
|
|
976
|
+
Pe && /* @__PURE__ */ e(
|
|
977
|
+
st,
|
|
978
|
+
{
|
|
979
|
+
bgcolor: "background.paper",
|
|
980
|
+
onSearch: (y) => d({
|
|
981
|
+
...g,
|
|
982
|
+
custom: (T) => y ? ct(T, y) : we(T)
|
|
983
|
+
}),
|
|
984
|
+
onSelected: (y) => {
|
|
985
|
+
ce(y), R(!1);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
),
|
|
989
|
+
!Be && c && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
990
|
+
M && /* @__PURE__ */ n(j, { children: [
|
|
991
|
+
/* @__PURE__ */ e(
|
|
992
|
+
lt,
|
|
993
|
+
{
|
|
994
|
+
bgcolor: "background.paper",
|
|
995
|
+
firstDay: p,
|
|
996
|
+
frequency: D,
|
|
997
|
+
onFirstDayChange: _,
|
|
998
|
+
onFrequencyChange: k,
|
|
999
|
+
onSecondDayChange: re,
|
|
1000
|
+
secondDay: S,
|
|
1001
|
+
transaction: M
|
|
1002
|
+
}
|
|
1003
|
+
),
|
|
1004
|
+
/* @__PURE__ */ n(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1005
|
+
/* @__PURE__ */ e(
|
|
1006
|
+
W,
|
|
1007
|
+
{
|
|
1008
|
+
"aria-disabled": !M,
|
|
1009
|
+
onClick: () => {
|
|
1010
|
+
const y = [...O];
|
|
1011
|
+
y.push({
|
|
1012
|
+
...M,
|
|
1013
|
+
nextDate: ve(D, De(M.date)),
|
|
1014
|
+
frequency: D
|
|
1015
|
+
}), je(y), ce("");
|
|
1016
|
+
},
|
|
1017
|
+
variant: "contained",
|
|
1018
|
+
children: r.confirm_button
|
|
1019
|
+
}
|
|
1020
|
+
),
|
|
1021
|
+
/* @__PURE__ */ e(
|
|
1022
|
+
W,
|
|
1023
|
+
{
|
|
1024
|
+
onClick: () => {
|
|
1025
|
+
ce(""), R(!0), ge().finally();
|
|
1026
|
+
},
|
|
1027
|
+
variant: "outlined",
|
|
1028
|
+
children: r.cancel_button
|
|
1029
|
+
}
|
|
1030
|
+
)
|
|
1031
|
+
] })
|
|
1032
|
+
] }),
|
|
1033
|
+
O.length > 0 && !M && /* @__PURE__ */ n(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1034
|
+
/* @__PURE__ */ e(
|
|
1035
|
+
W,
|
|
1036
|
+
{
|
|
1037
|
+
"aria-disabled": O.length < 1 || K,
|
|
1038
|
+
onClick: $e,
|
|
1039
|
+
startIcon: K ? /* @__PURE__ */ e(
|
|
1040
|
+
z,
|
|
1041
|
+
{
|
|
1042
|
+
name: "progress_activity",
|
|
1043
|
+
sx: {
|
|
1044
|
+
animation: `${Ht} 2s linear infinite`
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
) : null,
|
|
1048
|
+
variant: "contained",
|
|
1049
|
+
children: t.confirm_income_button
|
|
1050
|
+
}
|
|
1051
|
+
),
|
|
1052
|
+
/* @__PURE__ */ e(W, { onClick: u, variant: "outlined", children: t.skip_button })
|
|
1053
|
+
] })
|
|
1054
|
+
]
|
|
1055
|
+
}
|
|
1056
|
+
)
|
|
1057
|
+
]
|
|
1058
|
+
}
|
|
1059
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
1060
|
+
}, Hn = A(Wt);
|
|
1166
1061
|
export {
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1062
|
+
Mn as CashflowMiniWidget,
|
|
1063
|
+
Hn as CashflowOnboarding,
|
|
1064
|
+
Fn as CashflowWidget
|
|
1170
1065
|
};
|
|
1066
|
+
//# sourceMappingURL=index.es.js.map
|