@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,12 +1,1014 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import { observer as T } from "mobx-react-lite";
|
|
4
|
+
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
5
|
+
import { endOfToday as J } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as Q } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as ee } from "date-fns/subDays";
|
|
9
|
+
import Be from "@mui/material/Alert";
|
|
10
|
+
import Fe from "@mui/material/Snackbar";
|
|
11
|
+
import { R as _e } from "../RecurringSettings-D8hBbXV_.mjs";
|
|
12
|
+
import { M as Jn } from "../RecurringSettings-D8hBbXV_.mjs";
|
|
13
|
+
import { addMonths as Ue } from "date-fns/addMonths";
|
|
14
|
+
import { subMonths as Ye } from "date-fns/subMonths";
|
|
15
|
+
import { isBefore as je } from "date-fns/isBefore";
|
|
16
|
+
import q from "@mui/material/Grid";
|
|
17
|
+
import he from "@mui/material/IconButton";
|
|
18
|
+
import d from "@mui/material/Stack";
|
|
19
|
+
import fe from "@mui/material/Tab";
|
|
20
|
+
import Ke from "@mui/material/Tabs";
|
|
21
|
+
import { Cancel as Se, CheckCircle as we, Schedule as Ve, MonetizationOn as qe, ChevronLeft as Ze, ChevronRight as Xe, CurrencyExchange as Je } from "@mxenabled/mx-icons";
|
|
22
|
+
import { Text as h, MerchantLogo as te, InstitutionLogo as Qe, H3 as et, H2 as tt, P as Z } from "@mxenabled/mxui";
|
|
23
|
+
import { g as nt, L as O, b as G } from "../Localization-DnoVyBNK.mjs";
|
|
24
|
+
import { getWeeksInMonth as xe } from "date-fns/getWeeksInMonth";
|
|
25
|
+
import { enCA as rt } from "date-fns/locale/en-CA";
|
|
26
|
+
import { enUS as be } from "date-fns/locale/en-US";
|
|
27
|
+
import { es as it } from "date-fns/locale/es";
|
|
28
|
+
import { fr as ot } from "date-fns/locale/fr";
|
|
29
|
+
import { frCA as at } from "date-fns/locale/fr-CA";
|
|
30
|
+
import { useTheme as ne } from "@mui/material/styles";
|
|
31
|
+
import { AdapterDateFns as st } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
32
|
+
import { DateCalendar as ct } from "@mui/x-date-pickers/DateCalendar";
|
|
33
|
+
import { LocalizationProvider as lt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
34
|
+
import { isSameDay as dt } from "date-fns/isSameDay";
|
|
35
|
+
import ut from "@mui/material/Badge";
|
|
36
|
+
import { PickersDay as mt } from "@mui/x-date-pickers/PickersDay";
|
|
37
|
+
import { I as F } from "../IconBacking-DgT8DCeh.mjs";
|
|
38
|
+
import { u as b, a as U, h as _, f as Y, D as Ie, g as re } from "../hooks-97sNJ_lf.mjs";
|
|
39
|
+
import { b as E, a as D, g as ye, e as pt, R as gt } from "../RecurringTransactionsUtil-CHWmqvW5.mjs";
|
|
40
|
+
import { f as I, D as M } from "../DateFormats-HudZ3Bjs.mjs";
|
|
41
|
+
import { T as W } from "../Sizes-DISGrlUg.mjs";
|
|
42
|
+
import { A as v } from "../Analytics-WeZYytR0.mjs";
|
|
43
|
+
import ht from "@mui/material/Button";
|
|
44
|
+
import X from "@mui/material/Divider";
|
|
45
|
+
import Ce from "@mui/material/List";
|
|
46
|
+
import Me from "@mui/material/ListItem";
|
|
47
|
+
import ft from "@mui/material/ListSubheader";
|
|
48
|
+
import xt from "@mui/material/ListItemAvatar";
|
|
49
|
+
import bt from "@mui/material/ListItemButton";
|
|
50
|
+
import yt from "@mui/material/ListItemText";
|
|
51
|
+
import { f as L } from "../NumberFormatting--XMeeBfr.mjs";
|
|
52
|
+
import N from "@mui/material/Box";
|
|
53
|
+
import { u as ve } from "../useScreenSize-mWpmnh5w.mjs";
|
|
54
|
+
import { S as Le } from "../StatusBar-CPfSXe80.mjs";
|
|
55
|
+
import { d as Ct } from "../ManageIncome-Dcsnnz86.mjs";
|
|
56
|
+
import { c as er, M as tr, S as nr } from "../ManageIncome-Dcsnnz86.mjs";
|
|
57
|
+
import { D as ie } from "../Drawer-DsnW2o0v.mjs";
|
|
58
|
+
import { S as Ae } from "../SkeletonLoader-BaNboJjD.mjs";
|
|
59
|
+
import { u as oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
60
|
+
import { L as ae } from "../Loader-CxeBwuPG.mjs";
|
|
61
|
+
import { W as Rt } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
62
|
+
import { M as Tt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
63
|
+
import { u as Dt } from "../useDimensions-CeDR9V8N.mjs";
|
|
64
|
+
import { M as _t } from "../MicroWidgetContainer-B2NnKBgW.mjs";
|
|
65
|
+
const j = {
|
|
66
|
+
gridRow: 1,
|
|
67
|
+
gridColumn: 1,
|
|
68
|
+
zIndex: 2
|
|
69
|
+
}, K = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
70
|
+
F,
|
|
71
|
+
{
|
|
72
|
+
backingSx: { backgroundColor: "background.paper" },
|
|
73
|
+
size: n,
|
|
74
|
+
sx: { ...K(t) },
|
|
75
|
+
children: /* @__PURE__ */ e(Ve, { color: "primary", filled: !0, sx: { fontSize: n, ...j } })
|
|
76
|
+
}
|
|
77
|
+
), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
78
|
+
F,
|
|
79
|
+
{
|
|
80
|
+
backingSx: { backgroundColor: "background.paper" },
|
|
81
|
+
size: n,
|
|
82
|
+
sx: { ...K(t) },
|
|
83
|
+
children: /* @__PURE__ */ e(
|
|
84
|
+
qe,
|
|
85
|
+
{
|
|
86
|
+
filled: !0,
|
|
87
|
+
sx: { color: "categories.income", fontSize: n, ...j }
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
92
|
+
F,
|
|
93
|
+
{
|
|
94
|
+
backingSx: { backgroundColor: "background.paper" },
|
|
95
|
+
size: n,
|
|
96
|
+
sx: { ...K(t) },
|
|
97
|
+
children: /* @__PURE__ */ e(Se, { color: "error", filled: !0, sx: { fontSize: n, ...j } })
|
|
98
|
+
}
|
|
99
|
+
), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(
|
|
100
|
+
F,
|
|
101
|
+
{
|
|
102
|
+
backingSx: { backgroundColor: "background.paper" },
|
|
103
|
+
size: n,
|
|
104
|
+
sx: { ...K(t) },
|
|
105
|
+
children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...j } })
|
|
106
|
+
}
|
|
107
|
+
), St = T(
|
|
108
|
+
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
109
|
+
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences: s, setSelectedDay: m } = _(), a = x.useMemo(
|
|
110
|
+
() => s.filter((f) => o.includes(f.accountGuid)),
|
|
111
|
+
[o, s]
|
|
112
|
+
).filter(
|
|
113
|
+
(f) => dt(f.occurredOnDate || f.expectedDate, t)
|
|
114
|
+
), l = a.some(
|
|
115
|
+
(f) => f.type !== E.Income && f.status === D.Upcoming
|
|
116
|
+
), u = a.some(
|
|
117
|
+
(f) => f.type !== E.Income && f.status === D.Missed
|
|
118
|
+
), g = a.some(
|
|
119
|
+
(f) => f.type !== E.Income && f.status === D.Paid
|
|
120
|
+
), y = a.some((f) => f.type === E.Income), C = (l ? 1 : 0) + (u ? 1 : 0) + (g ? 1 : 0) + (y ? 1 : 0), S = [
|
|
121
|
+
g && i.paid,
|
|
122
|
+
u && i.missed,
|
|
123
|
+
l && i.upcoming,
|
|
124
|
+
y && i.income
|
|
125
|
+
].filter(Boolean), A = S.length > 0 ? `${I(t, M.MONTH_DAY_YEAR)}, ${S.join(", ")}` : I(t, M.MONTH_DAY_YEAR);
|
|
126
|
+
return /* @__PURE__ */ e(
|
|
127
|
+
ut,
|
|
128
|
+
{
|
|
129
|
+
badgeContent: a.length > 0 && /* @__PURE__ */ c(B, { children: [
|
|
130
|
+
u && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
131
|
+
g && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
132
|
+
l && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
133
|
+
y && /* @__PURE__ */ e(ce, { isOffset: !0 })
|
|
134
|
+
] }),
|
|
135
|
+
overlap: "circular",
|
|
136
|
+
sx: {
|
|
137
|
+
"& .MuiBadge-badge": {
|
|
138
|
+
padding: 0,
|
|
139
|
+
marginRight: `${(C - 1) * 6 + 1}px`,
|
|
140
|
+
flexWrap: "nowrap"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
children: /* @__PURE__ */ e(
|
|
144
|
+
mt,
|
|
145
|
+
{
|
|
146
|
+
"aria-label": A,
|
|
147
|
+
day: t,
|
|
148
|
+
onClick: () => m(t),
|
|
149
|
+
outsideCurrentMonth: n,
|
|
150
|
+
sx: {
|
|
151
|
+
"&.MuiPickersDay-root": {
|
|
152
|
+
...n && {
|
|
153
|
+
color: "text.disabled"
|
|
154
|
+
},
|
|
155
|
+
...r.today && {
|
|
156
|
+
color: "primary.main"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
...r
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ c(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
167
|
+
/* @__PURE__ */ e(t, {}),
|
|
168
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: n })
|
|
169
|
+
] }), wt = T(() => {
|
|
170
|
+
const { recurring: t } = b();
|
|
171
|
+
return /* @__PURE__ */ c(
|
|
172
|
+
d,
|
|
173
|
+
{
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
"aria-hidden": !0,
|
|
176
|
+
flexDirection: "row",
|
|
177
|
+
gap: 16,
|
|
178
|
+
justifyContent: "center",
|
|
179
|
+
mt: 12,
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
182
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
183
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
184
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
}), Re = 58, It = () => {
|
|
189
|
+
const t = nt();
|
|
190
|
+
return {
|
|
191
|
+
[O.EN_US]: be,
|
|
192
|
+
[O.EN_CA]: rt,
|
|
193
|
+
[O.FR]: ot,
|
|
194
|
+
[O.FR_CA]: at,
|
|
195
|
+
[O.ES]: it
|
|
196
|
+
}[t] || be;
|
|
197
|
+
}, Ee = T(() => {
|
|
198
|
+
const t = ne(), { onEvent: n } = Y(), { recurring: r } = b(), { selectedDay: i, setDateRange: o } = _(), [s, m] = x.useState(
|
|
199
|
+
xe(/* @__PURE__ */ new Date()) * W + Re
|
|
200
|
+
), p = (u) => {
|
|
201
|
+
m(xe(u) * W + Re), o({
|
|
202
|
+
start: k(u),
|
|
203
|
+
end: z(u)
|
|
204
|
+
}), a(u), n(v.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
205
|
+
}, a = (u) => {
|
|
206
|
+
u && requestAnimationFrame(() => {
|
|
207
|
+
const g = document.getElementById("recurrence-list");
|
|
208
|
+
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
209
|
+
});
|
|
210
|
+
}, l = /* @__PURE__ */ e(
|
|
211
|
+
ct,
|
|
212
|
+
{
|
|
213
|
+
minDate: k(/* @__PURE__ */ new Date()),
|
|
214
|
+
onChange: a,
|
|
215
|
+
onMonthChange: p,
|
|
216
|
+
showDaysOutsideCurrentMonth: !0,
|
|
217
|
+
slots: {
|
|
218
|
+
day: St
|
|
219
|
+
},
|
|
220
|
+
sx: {
|
|
221
|
+
"& .MuiPickersArrowSwitcher-button": {
|
|
222
|
+
color: "primary.main",
|
|
223
|
+
"&:disabled": {
|
|
224
|
+
color: "action.disabled"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"& .MuiButtonBase-root.MuiPickersDay-root": {
|
|
228
|
+
borderRadius: "4px",
|
|
229
|
+
"&:focus, &:hover": {
|
|
230
|
+
borderRadius: "4px"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"& .MuiPickersCalendarHeader-root": {
|
|
234
|
+
mt: 0,
|
|
235
|
+
pl: 16,
|
|
236
|
+
pr: 8
|
|
237
|
+
},
|
|
238
|
+
"& .MuiPickersCalendarHeader-label": {
|
|
239
|
+
fontFamily: t.typography.body1.fontFamily,
|
|
240
|
+
fontSize: t.typography.body1.fontSize,
|
|
241
|
+
fontWeight: 600
|
|
242
|
+
},
|
|
243
|
+
"& .MuiDayCalendar-slideTransition": {
|
|
244
|
+
minHeight: s
|
|
245
|
+
},
|
|
246
|
+
"&.MuiDateCalendar-root": {
|
|
247
|
+
minHeight: s + W
|
|
248
|
+
},
|
|
249
|
+
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
250
|
+
height: W,
|
|
251
|
+
width: W,
|
|
252
|
+
margin: 0
|
|
253
|
+
},
|
|
254
|
+
"& .MuiDayCalendar-weekDayLabel": {
|
|
255
|
+
fontFamily: t.typography.h3.fontFamily,
|
|
256
|
+
fontSize: t.typography.body2.fontSize
|
|
257
|
+
},
|
|
258
|
+
"& .MuiPickersDay-dayOutsideMonth": {
|
|
259
|
+
color: "text.secondary"
|
|
260
|
+
},
|
|
261
|
+
textTransform: "capitalize"
|
|
262
|
+
},
|
|
263
|
+
value: i,
|
|
264
|
+
views: ["day"]
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ c(lt, { adapterLocale: It(), dateAdapter: st, children: [
|
|
268
|
+
i && l,
|
|
269
|
+
!i && l,
|
|
270
|
+
/* @__PURE__ */ e(h, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
271
|
+
/* @__PURE__ */ e(wt, {})
|
|
272
|
+
] }) });
|
|
273
|
+
}), Mt = (t) => {
|
|
274
|
+
if (t.type === E.Income)
|
|
275
|
+
return /* @__PURE__ */ e(ce, {});
|
|
276
|
+
switch (t.status) {
|
|
277
|
+
case D.Missed:
|
|
278
|
+
return /* @__PURE__ */ e(le, {});
|
|
279
|
+
case D.Paid:
|
|
280
|
+
return /* @__PURE__ */ e(de, {});
|
|
281
|
+
default:
|
|
282
|
+
return /* @__PURE__ */ e(se, {});
|
|
283
|
+
}
|
|
284
|
+
}, vt = (t, n) => {
|
|
285
|
+
switch (t.status) {
|
|
286
|
+
case D.Paid:
|
|
287
|
+
return t.expectedDate ? G(
|
|
288
|
+
n.paid_on,
|
|
289
|
+
I(
|
|
290
|
+
t.occurredOnDate || t.expectedDate,
|
|
291
|
+
M.MONTH_DAY
|
|
292
|
+
)
|
|
293
|
+
) : n.paid;
|
|
294
|
+
case D.Missed:
|
|
295
|
+
return G(
|
|
296
|
+
n.missed_on,
|
|
297
|
+
I(t.expectedDate, M.MONTH_DAY)
|
|
298
|
+
);
|
|
299
|
+
case D.Upcoming:
|
|
300
|
+
return G(
|
|
301
|
+
n.upcoming_on,
|
|
302
|
+
I(t.expectedDate, M.MONTH_DAY)
|
|
303
|
+
);
|
|
304
|
+
default:
|
|
305
|
+
return n.unknown;
|
|
306
|
+
}
|
|
307
|
+
}, Te = ({
|
|
308
|
+
recurrence: t,
|
|
309
|
+
isMini: n = !1,
|
|
310
|
+
onRecurrenceClick: r = () => {
|
|
311
|
+
},
|
|
312
|
+
showOrdinal: i = !1
|
|
313
|
+
}) => {
|
|
314
|
+
const { recurring: o } = b(), { detailedRepeatingTransactions: s } = _(), m = x.useMemo(
|
|
315
|
+
() => s.find((C) => C.guid === t.repeatingTransactionGuid),
|
|
316
|
+
[t, s]
|
|
317
|
+
), p = t.type === E.Income, a = t.status === D.Paid, l = t.status === D.Missed, u = t.status === D.Upcoming;
|
|
318
|
+
let g = o.paid?.toLowerCase();
|
|
319
|
+
return l ? g = o.missed?.toLowerCase() : u && (g = i ? ye(o, m || {}, !0) : ye(o, m || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
320
|
+
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(bt, { onClick: () => {
|
|
321
|
+
r(t);
|
|
322
|
+
}, children: [
|
|
323
|
+
/* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(
|
|
324
|
+
te,
|
|
325
|
+
{
|
|
326
|
+
categoryGuid: t.categoryGuid,
|
|
327
|
+
merchantGuid: t.merchantGuid
|
|
328
|
+
}
|
|
329
|
+
) }),
|
|
330
|
+
/* @__PURE__ */ e(yt, { children: /* @__PURE__ */ c(
|
|
331
|
+
d,
|
|
332
|
+
{
|
|
333
|
+
direction: "row",
|
|
334
|
+
gap: 4,
|
|
335
|
+
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ c(d, { direction: "column", width: "50%", children: [
|
|
338
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
339
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
340
|
+
Mt(t),
|
|
341
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: vt(t, o) })
|
|
342
|
+
] }) : /* @__PURE__ */ c(B, { children: [
|
|
343
|
+
t.institutionGuid && /* @__PURE__ */ e(
|
|
344
|
+
Qe,
|
|
345
|
+
{
|
|
346
|
+
alt: "",
|
|
347
|
+
institutionGuid: t.institutionGuid,
|
|
348
|
+
size: 12
|
|
349
|
+
}
|
|
350
|
+
),
|
|
351
|
+
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
352
|
+
] }) })
|
|
353
|
+
] }),
|
|
354
|
+
/* @__PURE__ */ c(d, { alignItems: "flex-end", width: "100%", children: [
|
|
355
|
+
/* @__PURE__ */ c(h, { bold: !0, color: p ? "success.main" : "text.primary", variant: "body1", children: [
|
|
356
|
+
p ? "+" : "",
|
|
357
|
+
L(t.amount, "0,0.00")
|
|
358
|
+
] }),
|
|
359
|
+
!n && /* @__PURE__ */ c(
|
|
360
|
+
d,
|
|
361
|
+
{
|
|
362
|
+
direction: "row",
|
|
363
|
+
sx: {
|
|
364
|
+
alignItems: "center",
|
|
365
|
+
gap: 6,
|
|
366
|
+
justifyContent: "flex-end",
|
|
367
|
+
textTransform: "uppercase",
|
|
368
|
+
width: "100%"
|
|
369
|
+
},
|
|
370
|
+
children: [
|
|
371
|
+
a && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
372
|
+
l && /* @__PURE__ */ e(Se, { color: "error", filled: !0, size: 12 }),
|
|
373
|
+
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: g })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
] })
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
) })
|
|
381
|
+
] }) });
|
|
382
|
+
}, P = T(
|
|
383
|
+
({
|
|
384
|
+
recurrences: t,
|
|
385
|
+
isMini: n = !1,
|
|
386
|
+
onResetClick: r,
|
|
387
|
+
onRecurrenceClick: i,
|
|
388
|
+
sx: o = {},
|
|
389
|
+
title: s
|
|
390
|
+
}) => {
|
|
391
|
+
const { recurring: m } = b(), p = x.useMemo(() => pt(t), [t]);
|
|
392
|
+
return /* @__PURE__ */ c(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, tabIndex: -1, children: [
|
|
393
|
+
s && /* @__PURE__ */ c(
|
|
394
|
+
d,
|
|
395
|
+
{
|
|
396
|
+
sx: {
|
|
397
|
+
alignItems: "center",
|
|
398
|
+
flexDirection: "row",
|
|
399
|
+
justifyContent: "space-between",
|
|
400
|
+
px: 24
|
|
401
|
+
},
|
|
402
|
+
children: [
|
|
403
|
+
/* @__PURE__ */ e(et, { bold: !0, variant: "body1", children: s }),
|
|
404
|
+
r && /* @__PURE__ */ e(ht, { onClick: r, size: "small", variant: "text", children: m.reset })
|
|
405
|
+
]
|
|
406
|
+
}
|
|
407
|
+
),
|
|
408
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { "aria-label": s, children: n ? t.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
409
|
+
/* @__PURE__ */ e(
|
|
410
|
+
Te,
|
|
411
|
+
{
|
|
412
|
+
isMini: n,
|
|
413
|
+
onRecurrenceClick: i,
|
|
414
|
+
recurrence: a
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
418
|
+
] }, `recurrence-${l}`)) : p.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
419
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
|
|
420
|
+
Ce,
|
|
421
|
+
{
|
|
422
|
+
"aria-labelledby": `date-group-header-${a.id}`,
|
|
423
|
+
subheader: /* @__PURE__ */ e(
|
|
424
|
+
ft,
|
|
425
|
+
{
|
|
426
|
+
"aria-hidden": "true",
|
|
427
|
+
id: `date-group-header-${a.id}`,
|
|
428
|
+
role: "presentation",
|
|
429
|
+
sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 },
|
|
430
|
+
children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: I(a.date, M.DAY_OF_WEEK_MONTH_DAY) })
|
|
431
|
+
}
|
|
432
|
+
),
|
|
433
|
+
sx: { width: "100%" },
|
|
434
|
+
children: a.recurrences.map((u, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
435
|
+
Te,
|
|
436
|
+
{
|
|
437
|
+
isMini: n,
|
|
438
|
+
onRecurrenceClick: i,
|
|
439
|
+
recurrence: u
|
|
440
|
+
}
|
|
441
|
+
) }, `day-recurrence-${g}`))
|
|
442
|
+
}
|
|
443
|
+
) }, a.id),
|
|
444
|
+
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
445
|
+
] }, `recurrence-${l}`)) })
|
|
446
|
+
] });
|
|
447
|
+
}
|
|
448
|
+
), De = T(
|
|
449
|
+
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: s, upcoming: m }) => {
|
|
450
|
+
const p = ne(), { isSmallMobile: a } = ve(), { recurring: l } = b(), u = x.useMemo(() => {
|
|
451
|
+
const g = [{ color: p.palette.success.main, percentage: `${i / t}` }];
|
|
452
|
+
return r && g.push({ color: p.palette.error.main, percentage: `${r / t}` }), g;
|
|
453
|
+
}, [i, t, r]);
|
|
454
|
+
return /* @__PURE__ */ c(d, { children: [
|
|
455
|
+
/* @__PURE__ */ c(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
456
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${s})` }),
|
|
457
|
+
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
458
|
+
] }),
|
|
459
|
+
/* @__PURE__ */ e(Le, { data: u, height: 12 }),
|
|
460
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
461
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
462
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
463
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
464
|
+
r !== void 0 && /* @__PURE__ */ c(B, { children: [
|
|
465
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
466
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
467
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
468
|
+
] }),
|
|
469
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
470
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
|
|
471
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming?.toLowerCase() })
|
|
472
|
+
] })
|
|
473
|
+
] });
|
|
474
|
+
}
|
|
475
|
+
), Ge = T(() => {
|
|
476
|
+
const { recurring: t } = b(), {
|
|
477
|
+
selectedRecurrence: n,
|
|
478
|
+
selectedRepeatingTransaction: r,
|
|
479
|
+
setSelectedRecurrence: i,
|
|
480
|
+
setSelectedRepeatingTransactionGuid: o
|
|
481
|
+
} = _(), s = () => {
|
|
482
|
+
o(null), i(null);
|
|
483
|
+
};
|
|
484
|
+
return /* @__PURE__ */ e(
|
|
485
|
+
ie,
|
|
486
|
+
{
|
|
487
|
+
ariaLabelClose: t.close_drawer_aria,
|
|
488
|
+
isOpen: !!r,
|
|
489
|
+
onClose: s,
|
|
490
|
+
title: r?.repeating_transaction_type === gt.Income ? t.income_details : t.expense_details,
|
|
491
|
+
children: r && /* @__PURE__ */ e(
|
|
492
|
+
Ct,
|
|
493
|
+
{
|
|
494
|
+
onDeleted: s,
|
|
495
|
+
recurringTransaction: r,
|
|
496
|
+
selectedRecurrence: n
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
}), Lt = T(() => {
|
|
502
|
+
const { recurring: t } = b(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: i, isMobile: o } = ve(n), { onEvent: s } = Y(), {
|
|
503
|
+
currentMonthExpenses: m,
|
|
504
|
+
currentMonthIncome: p,
|
|
505
|
+
dateRange: a,
|
|
506
|
+
expenseTotal: l,
|
|
507
|
+
incomeTotal: u,
|
|
508
|
+
missedExpenseTotal: g,
|
|
509
|
+
pastRecurrences: y,
|
|
510
|
+
paidExpenseTotal: C,
|
|
511
|
+
paidIncomeTotal: S,
|
|
512
|
+
selectedDay: A,
|
|
513
|
+
selectedDayRecurrences: f,
|
|
514
|
+
setDateRange: w,
|
|
515
|
+
setSelectedRecurrence: H,
|
|
516
|
+
setSelectedRepeatingTransactionGuid: ue,
|
|
517
|
+
upcomingExpenseTotal: Ne,
|
|
518
|
+
upcomingIncomeTotal: ke,
|
|
519
|
+
upcomingRecurrences: me
|
|
520
|
+
} = _(), [V, Oe] = x.useState(0), We = je(a.start, /* @__PURE__ */ new Date()), Pe = (R, $e) => {
|
|
521
|
+
Oe($e);
|
|
522
|
+
}, pe = (R) => {
|
|
523
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
524
|
+
transaction_guid: R.transaction?.guid
|
|
525
|
+
});
|
|
526
|
+
}, ge = (R) => {
|
|
527
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
528
|
+
transaction_guid: R.transaction?.guid
|
|
529
|
+
});
|
|
530
|
+
}, ze = () => {
|
|
531
|
+
const R = Ue(a.start, 1);
|
|
532
|
+
w({
|
|
533
|
+
start: k(R),
|
|
534
|
+
end: z(R)
|
|
535
|
+
});
|
|
536
|
+
}, He = () => {
|
|
537
|
+
const R = Ye(a.start, 1);
|
|
538
|
+
w({
|
|
539
|
+
start: k(R),
|
|
540
|
+
end: z(R)
|
|
541
|
+
});
|
|
542
|
+
};
|
|
543
|
+
return /* @__PURE__ */ c(
|
|
544
|
+
q,
|
|
545
|
+
{
|
|
546
|
+
container: !0,
|
|
547
|
+
sx: {
|
|
548
|
+
pt: 16
|
|
549
|
+
},
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ c(q, { size: { sm: 12, md: "grow" }, width: "100%", children: [
|
|
552
|
+
/* @__PURE__ */ c(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
553
|
+
/* @__PURE__ */ c(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
554
|
+
/* @__PURE__ */ e(tt, { variant: "h3", children: G(
|
|
555
|
+
t.header_title,
|
|
556
|
+
I(a.start, M.MONTH_LONG)
|
|
557
|
+
) }),
|
|
558
|
+
!r && /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
559
|
+
/* @__PURE__ */ e(
|
|
560
|
+
he,
|
|
561
|
+
{
|
|
562
|
+
color: "primary",
|
|
563
|
+
disabled: We,
|
|
564
|
+
onClick: He,
|
|
565
|
+
children: /* @__PURE__ */ e(Ze, {})
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ e(he, { color: "primary", onClick: ze, children: /* @__PURE__ */ e(Xe, {}) })
|
|
569
|
+
] })
|
|
570
|
+
] }),
|
|
571
|
+
/* @__PURE__ */ e(
|
|
572
|
+
De,
|
|
573
|
+
{
|
|
574
|
+
expected: l,
|
|
575
|
+
missed: g,
|
|
576
|
+
paid: C,
|
|
577
|
+
title: t.expenses,
|
|
578
|
+
total: m.length,
|
|
579
|
+
upcoming: Ne
|
|
580
|
+
}
|
|
581
|
+
),
|
|
582
|
+
/* @__PURE__ */ e(
|
|
583
|
+
De,
|
|
584
|
+
{
|
|
585
|
+
expected: u,
|
|
586
|
+
isExpense: !1,
|
|
587
|
+
paid: S,
|
|
588
|
+
title: t.deposits,
|
|
589
|
+
total: p.length,
|
|
590
|
+
upcoming: ke
|
|
591
|
+
}
|
|
592
|
+
),
|
|
593
|
+
r && /* @__PURE__ */ e(
|
|
594
|
+
P,
|
|
595
|
+
{
|
|
596
|
+
onRecurrenceClick: pe,
|
|
597
|
+
recurrences: me,
|
|
598
|
+
title: t.upcoming_activity
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
] }),
|
|
602
|
+
!r && /* @__PURE__ */ c(d, { sx: { px: o ? 0 : 24 }, children: [
|
|
603
|
+
/* @__PURE__ */ c(Ke, { onChange: Pe, value: V, variant: "fullWidth", children: [
|
|
604
|
+
/* @__PURE__ */ e(
|
|
605
|
+
fe,
|
|
606
|
+
{
|
|
607
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
/* @__PURE__ */ e(
|
|
611
|
+
fe,
|
|
612
|
+
{
|
|
613
|
+
label: /* @__PURE__ */ e(h, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
|
|
614
|
+
}
|
|
615
|
+
)
|
|
616
|
+
] }),
|
|
617
|
+
V === 0 && /* @__PURE__ */ e(
|
|
618
|
+
P,
|
|
619
|
+
{
|
|
620
|
+
onRecurrenceClick: pe,
|
|
621
|
+
recurrences: me
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
V === 1 && /* @__PURE__ */ e(
|
|
625
|
+
P,
|
|
626
|
+
{
|
|
627
|
+
onRecurrenceClick: ge,
|
|
628
|
+
recurrences: y
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
] })
|
|
632
|
+
] }),
|
|
633
|
+
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ c(d, { gap: 24, children: [
|
|
634
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
635
|
+
/* @__PURE__ */ e(
|
|
636
|
+
P,
|
|
637
|
+
{
|
|
638
|
+
onRecurrenceClick: ge,
|
|
639
|
+
recurrences: f || y,
|
|
640
|
+
title: A ? G(
|
|
641
|
+
t.day_transactions,
|
|
642
|
+
I(A, M.MONTH_DAY)
|
|
643
|
+
) : t.past_transactions
|
|
644
|
+
}
|
|
645
|
+
)
|
|
646
|
+
] }) }),
|
|
647
|
+
/* @__PURE__ */ e(Ge, {})
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
}), jn = T(
|
|
652
|
+
({ onBackClick: t, onMenuClick: n, sx: r = {} }) => {
|
|
653
|
+
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids: s } = U(), { alert: m, isDataLoaded: p, loadRepeatingTransactionData: a, setAlert: l, setDateRange: u } = _(), { setFilter: g } = re(), { onEvent: y } = Y(), [C, S] = x.useState(!1);
|
|
654
|
+
return oe({
|
|
655
|
+
widgetName: "RecurringTransactionsWidget",
|
|
656
|
+
isLoaded: p
|
|
657
|
+
}), x.useEffect(() => {
|
|
658
|
+
p || a().finally();
|
|
659
|
+
}, []), x.useEffect(() => {
|
|
660
|
+
g({
|
|
661
|
+
dateRange: { start: ee(Q(), 90), end: J() },
|
|
662
|
+
accounts: s
|
|
663
|
+
}), u({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) });
|
|
664
|
+
}, [s]), o ? /* @__PURE__ */ c(
|
|
665
|
+
Rt,
|
|
666
|
+
{
|
|
667
|
+
actions: [
|
|
668
|
+
{
|
|
669
|
+
label: i.action_title,
|
|
670
|
+
iconName: "credit_card_gear",
|
|
671
|
+
onClick: () => {
|
|
672
|
+
S(!0), y(v.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
hasDivider: !0,
|
|
677
|
+
onAccountsFilterClick: () => y(v.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
678
|
+
onBackClick: t,
|
|
679
|
+
onMenuClick: n,
|
|
680
|
+
sx: r,
|
|
681
|
+
title: i.title,
|
|
682
|
+
children: [
|
|
683
|
+
p ? /* @__PURE__ */ e(Lt, {}) : /* @__PURE__ */ e(Ae, { sx: { m: 48 }, variant: "list" }),
|
|
684
|
+
/* @__PURE__ */ e(
|
|
685
|
+
ie,
|
|
686
|
+
{
|
|
687
|
+
ariaLabelClose: i.close_drawer_aria,
|
|
688
|
+
isOpen: C,
|
|
689
|
+
onClose: () => S(!1),
|
|
690
|
+
shouldShowHeaderBorders: !1,
|
|
691
|
+
title: i.action_title,
|
|
692
|
+
children: /* @__PURE__ */ e(_e, {})
|
|
693
|
+
}
|
|
694
|
+
),
|
|
695
|
+
/* @__PURE__ */ e(
|
|
696
|
+
Fe,
|
|
697
|
+
{
|
|
698
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
699
|
+
autoHideDuration: 3500,
|
|
700
|
+
onClose: () => l(""),
|
|
701
|
+
open: !!m.message,
|
|
702
|
+
children: /* @__PURE__ */ e(Be, { onClose: () => l(""), severity: m.severity, variant: "filled", children: m.message })
|
|
703
|
+
}
|
|
704
|
+
)
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
708
|
+
}
|
|
709
|
+
), At = T(() => {
|
|
710
|
+
const { recurring: t } = b(), { availableWidth: n } = Ie(), {
|
|
711
|
+
selectedDay: r,
|
|
712
|
+
selectedDayRecurrences: i,
|
|
713
|
+
setSelectedDay: o,
|
|
714
|
+
setSelectedRecurrence: s,
|
|
715
|
+
setSelectedRepeatingTransactionGuid: m,
|
|
716
|
+
upcomingRecurrences: p
|
|
717
|
+
} = _(), a = (u) => {
|
|
718
|
+
m(u.repeatingTransactionGuid), s(u);
|
|
719
|
+
}, l = n < 750;
|
|
720
|
+
return /* @__PURE__ */ c(d, { flexDirection: l ? "column" : "row", width: "100%", children: [
|
|
721
|
+
/* @__PURE__ */ e(Ee, {}),
|
|
722
|
+
!l && /* @__PURE__ */ e(X, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
723
|
+
/* @__PURE__ */ e(
|
|
724
|
+
P,
|
|
725
|
+
{
|
|
726
|
+
isMini: !0,
|
|
727
|
+
onRecurrenceClick: a,
|
|
728
|
+
onResetClick: r ? () => o(r) : void 0,
|
|
729
|
+
recurrences: i || p.slice(0, 5),
|
|
730
|
+
sx: { width: l ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
731
|
+
title: r ? G(
|
|
732
|
+
t.day_transactions,
|
|
733
|
+
I(r, M.MONTH_DAY)
|
|
734
|
+
) : t.upcoming_activity
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
] });
|
|
738
|
+
}), Kn = T(
|
|
739
|
+
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
740
|
+
const { recurring: r } = b(), { setFilter: i } = re(), { isDataLoaded: o, loadRepeatingTransactionData: s } = _(), { isInitialized: m, selectedAccountGuids: p } = U();
|
|
741
|
+
return oe({
|
|
742
|
+
widgetName: "RecurringTransactionsMiniWidget",
|
|
743
|
+
isLoaded: o
|
|
744
|
+
}), x.useEffect(() => {
|
|
745
|
+
o || s().finally();
|
|
746
|
+
}, []), x.useEffect(() => {
|
|
747
|
+
p.length > 0 && i({
|
|
748
|
+
dateRange: { start: ee(Q(), 90), end: J() },
|
|
749
|
+
accounts: p
|
|
750
|
+
});
|
|
751
|
+
}, [p]), m ? /* @__PURE__ */ c(
|
|
752
|
+
Tt,
|
|
753
|
+
{
|
|
754
|
+
className: "mx-exp-recurring-transactions-miniwidget",
|
|
755
|
+
onPrimaryCtaClick: t,
|
|
756
|
+
primaryCtaLabel: r.primary_cta,
|
|
757
|
+
primaryCtaLabelAria: r.primary_cta_aria,
|
|
758
|
+
subTitle: r.sub_title,
|
|
759
|
+
sx: n,
|
|
760
|
+
title: r.mini_title,
|
|
761
|
+
children: [
|
|
762
|
+
o ? /* @__PURE__ */ e(At, {}) : /* @__PURE__ */ e(Ae, { sx: { mx: 16 }, variant: "list" }),
|
|
763
|
+
/* @__PURE__ */ e(Ge, {})
|
|
764
|
+
]
|
|
765
|
+
}
|
|
766
|
+
) : /* @__PURE__ */ e(ae, {});
|
|
767
|
+
}
|
|
768
|
+
), Et = T(() => {
|
|
769
|
+
const { recurring: t } = b();
|
|
770
|
+
return /* @__PURE__ */ c(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
771
|
+
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
772
|
+
/* @__PURE__ */ c(d, { children: [
|
|
773
|
+
/* @__PURE__ */ e(Z, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
774
|
+
/* @__PURE__ */ e(Z, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
775
|
+
] })
|
|
776
|
+
] });
|
|
777
|
+
}), Gt = ({
|
|
778
|
+
amount: t,
|
|
779
|
+
bgcolor: n,
|
|
780
|
+
isLargeScreen: r,
|
|
781
|
+
isSmallScreen: i,
|
|
782
|
+
label: o
|
|
783
|
+
}) => /* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
784
|
+
/* @__PURE__ */ e(
|
|
785
|
+
N,
|
|
786
|
+
{
|
|
787
|
+
sx: {
|
|
788
|
+
borderRadius: "2px",
|
|
789
|
+
bgcolor: n,
|
|
790
|
+
height: 8,
|
|
791
|
+
width: 8
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
796
|
+
!i && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: L(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
797
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: o })
|
|
798
|
+
] })
|
|
799
|
+
] }), Nt = ({
|
|
800
|
+
upcomingRecurrences: t,
|
|
801
|
+
logoSize: n = 32,
|
|
802
|
+
maxLogos: r = 3
|
|
803
|
+
}) => {
|
|
804
|
+
const i = (o) => o * (n / 2);
|
|
805
|
+
return /* @__PURE__ */ e(
|
|
806
|
+
N,
|
|
807
|
+
{
|
|
808
|
+
sx: {
|
|
809
|
+
position: "relative",
|
|
810
|
+
width: 64
|
|
811
|
+
},
|
|
812
|
+
children: t.map((o, s) => s < r ? /* @__PURE__ */ e(
|
|
813
|
+
N,
|
|
814
|
+
{
|
|
815
|
+
sx: {
|
|
816
|
+
borderRadius: "4px",
|
|
817
|
+
left: i(s),
|
|
818
|
+
outlineColor: "common.white",
|
|
819
|
+
outlineStyle: "solid",
|
|
820
|
+
outlineWidth: 2,
|
|
821
|
+
position: "absolute"
|
|
822
|
+
},
|
|
823
|
+
children: /* @__PURE__ */ e(
|
|
824
|
+
te,
|
|
825
|
+
{
|
|
826
|
+
categoryGuid: o.categoryGuid || "",
|
|
827
|
+
merchantGuid: o.merchantGuid || "",
|
|
828
|
+
size: n
|
|
829
|
+
}
|
|
830
|
+
)
|
|
831
|
+
},
|
|
832
|
+
`${o.categoryGuid}-${o.merchantGuid}-${s}`
|
|
833
|
+
) : null)
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}, kt = ({
|
|
837
|
+
upcomingRecurrences: t,
|
|
838
|
+
maxLogos: n = 3
|
|
839
|
+
}) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, i) => /* @__PURE__ */ e(
|
|
840
|
+
te,
|
|
841
|
+
{
|
|
842
|
+
categoryGuid: r.categoryGuid || "",
|
|
843
|
+
merchantGuid: r.merchantGuid || ""
|
|
844
|
+
},
|
|
845
|
+
`${r.categoryGuid}-${r.merchantGuid}-${i}`
|
|
846
|
+
)) }), Ot = T(() => {
|
|
847
|
+
const t = ne(), [n, { width: r }] = Dt(), {
|
|
848
|
+
upcomingRecurrences: i,
|
|
849
|
+
expenseTotal: o,
|
|
850
|
+
missedExpenseTotal: s,
|
|
851
|
+
paidExpenseTotal: m,
|
|
852
|
+
upcomingExpenseTotal: p
|
|
853
|
+
} = _(), { recurring: a } = b(), l = r <= 288, u = r >= 450, g = 32, y = i.length > 0, C = x.useMemo(() => L(o, o === 0 ? "0,0" : "0,0.00"), [o]), S = x.useMemo(() => {
|
|
854
|
+
const w = [
|
|
855
|
+
{ color: t.palette.success.main, percentage: `${m / o}` }
|
|
856
|
+
];
|
|
857
|
+
return s && w.push({
|
|
858
|
+
color: t.palette.error.main,
|
|
859
|
+
percentage: `${s / o}`
|
|
860
|
+
}), w;
|
|
861
|
+
}, [
|
|
862
|
+
m,
|
|
863
|
+
o,
|
|
864
|
+
s,
|
|
865
|
+
t.palette.success.main,
|
|
866
|
+
t.palette.error.main
|
|
867
|
+
]), A = () => y ? l ? /* @__PURE__ */ e(
|
|
868
|
+
Nt,
|
|
869
|
+
{
|
|
870
|
+
logoSize: g,
|
|
871
|
+
maxLogos: 3,
|
|
872
|
+
upcomingRecurrences: i.slice(0, 3)
|
|
873
|
+
}
|
|
874
|
+
) : /* @__PURE__ */ e(kt, { maxLogos: 3, upcomingRecurrences: i.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), f = [
|
|
875
|
+
{
|
|
876
|
+
amount: m,
|
|
877
|
+
bgColor: "success.main",
|
|
878
|
+
label: a.paid
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
amount: s,
|
|
882
|
+
bgColor: "error.main",
|
|
883
|
+
label: a.missed
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
amount: p,
|
|
887
|
+
bgColor: "neutral.light",
|
|
888
|
+
label: a.upcoming
|
|
889
|
+
}
|
|
890
|
+
];
|
|
891
|
+
return /* @__PURE__ */ c(B, { children: [
|
|
892
|
+
/* @__PURE__ */ c(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
893
|
+
/* @__PURE__ */ c(
|
|
894
|
+
d,
|
|
895
|
+
{
|
|
896
|
+
sx: [
|
|
897
|
+
C.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
898
|
+
{
|
|
899
|
+
alignItems: "baseline",
|
|
900
|
+
overflow: "hidden",
|
|
901
|
+
textOverflow: "ellipsis",
|
|
902
|
+
whiteSpace: "nowrap"
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
children: [
|
|
906
|
+
/* @__PURE__ */ e(
|
|
907
|
+
h,
|
|
908
|
+
{
|
|
909
|
+
sx: { width: "100%" },
|
|
910
|
+
variant: C.length >= 10 && l ? "h3" : "h2",
|
|
911
|
+
children: C
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children: a.expected })
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
),
|
|
918
|
+
A()
|
|
919
|
+
] }),
|
|
920
|
+
/* @__PURE__ */ c(d, { sx: { pt: 12 }, children: [
|
|
921
|
+
/* @__PURE__ */ e(Le, { data: S }),
|
|
922
|
+
/* @__PURE__ */ e(
|
|
923
|
+
d,
|
|
924
|
+
{
|
|
925
|
+
sx: {
|
|
926
|
+
alignItems: "center",
|
|
927
|
+
flexDirection: "row",
|
|
928
|
+
gap: 16,
|
|
929
|
+
mt: 4
|
|
930
|
+
},
|
|
931
|
+
children: f.map((w, H) => /* @__PURE__ */ e(
|
|
932
|
+
Gt,
|
|
933
|
+
{
|
|
934
|
+
amount: w.amount,
|
|
935
|
+
bgcolor: w.bgColor,
|
|
936
|
+
isLargeScreen: u,
|
|
937
|
+
isSmallScreen: l,
|
|
938
|
+
label: w.label
|
|
939
|
+
},
|
|
940
|
+
`recurrence-legend-${H}`
|
|
941
|
+
))
|
|
942
|
+
}
|
|
943
|
+
)
|
|
944
|
+
] })
|
|
945
|
+
] });
|
|
946
|
+
}), Vn = T(
|
|
947
|
+
({ onCTAClick: t }) => {
|
|
948
|
+
const { onEvent: n } = Y(), { isInitialized: r, selectedAccountGuids: i } = U(), {
|
|
949
|
+
loadRepeatingTransactionData: o,
|
|
950
|
+
upcomingRecurrences: s,
|
|
951
|
+
repeatingTransactions: m,
|
|
952
|
+
setDateRange: p,
|
|
953
|
+
isDataLoaded: a
|
|
954
|
+
} = _(), { setFilter: l } = re(), { recurring: u, budgets: g } = b();
|
|
955
|
+
oe({
|
|
956
|
+
widgetName: "RecurringTransactionsMicroWidget",
|
|
957
|
+
isLoaded: a
|
|
958
|
+
}), x.useEffect(() => {
|
|
959
|
+
a || o().finally(() => {
|
|
960
|
+
n(v.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
961
|
+
state: s.length > 0 ? "default" : "zeroState"
|
|
962
|
+
});
|
|
963
|
+
});
|
|
964
|
+
}, []), x.useEffect(() => {
|
|
965
|
+
r && (l({
|
|
966
|
+
dateRange: { start: ee(Q(), 90), end: J() },
|
|
967
|
+
accounts: i
|
|
968
|
+
}), p({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }));
|
|
969
|
+
}, [r, i]);
|
|
970
|
+
const y = () => {
|
|
971
|
+
n(
|
|
972
|
+
s.length > 0 ? v.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : v.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
973
|
+
), t();
|
|
974
|
+
};
|
|
975
|
+
if (!r || !a) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
976
|
+
const C = !m?.length;
|
|
977
|
+
return /* @__PURE__ */ e(
|
|
978
|
+
_t,
|
|
979
|
+
{
|
|
980
|
+
className: "mx-recurring-transaction-microwidget",
|
|
981
|
+
ctaLabel: C ? g.get_started_cta : u.primary_cta,
|
|
982
|
+
onCTAClick: y,
|
|
983
|
+
title: u.recurring_expenses,
|
|
984
|
+
children: C ? /* @__PURE__ */ e(Et, {}) : /* @__PURE__ */ e(Ot, {})
|
|
985
|
+
}
|
|
986
|
+
);
|
|
987
|
+
}
|
|
988
|
+
), qn = T(
|
|
989
|
+
({ isOpen: t, onClose: n, selectedTab: r }) => {
|
|
990
|
+
const { cashflow: i } = b();
|
|
991
|
+
return /* @__PURE__ */ e(
|
|
992
|
+
ie,
|
|
993
|
+
{
|
|
994
|
+
ariaLabelClose: i.close_settings_aria,
|
|
995
|
+
isOpen: t,
|
|
996
|
+
onClose: n,
|
|
997
|
+
title: i.cashflow_settings,
|
|
998
|
+
children: /* @__PURE__ */ e(_e, { defaultSelectedTab: r })
|
|
999
|
+
}
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
2
1003
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1004
|
+
er as AddRecurringTransactionDetails,
|
|
1005
|
+
Jn as ManageExpenses,
|
|
1006
|
+
tr as ManageIncome,
|
|
1007
|
+
_e as RecurringSettings,
|
|
1008
|
+
qn as RecurringSettingsDrawer,
|
|
1009
|
+
Vn as RecurringTransactionsMicroWidget,
|
|
1010
|
+
Kn as RecurringTransactionsMiniWidget,
|
|
1011
|
+
jn as RecurringTransactionsWidget,
|
|
1012
|
+
nr as SelectTransaction
|
|
12
1013
|
};
|
|
1014
|
+
//# sourceMappingURL=index.es.js.map
|