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