@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.sms2
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/dist/{Account-B4CDD-zq.mjs → Account-Cp30A3ad.mjs} +1 -1
- package/dist/AccountDetailsContent-C1HumFnW.mjs +683 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-NMx79DGs.mjs} +17 -17
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-CW6cIthP.mjs} +8 -8
- package/dist/AccountListItem-DxmAs98Z.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-hIs-yA6W.mjs} +3 -3
- package/dist/{Accounts-CRUehOiy.mjs → Accounts-DUHkUyK4.mjs} +1 -1
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-CIDAPPPT.mjs} +30 -30
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-naOtJcwo.mjs} +22 -15
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-DqDAA_5I.mjs} +26 -26
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-Dn1MlqLz.mjs} +60 -61
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-CSo6AFkG.mjs} +2 -2
- package/dist/CurrencyInput-BrGvhgVK.mjs +85 -0
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-hi1cqrRk.mjs} +3 -3
- package/dist/{Drawer-BF40nbsH.mjs → Drawer-Dqe5EqvA.mjs} +6 -6
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-CQ1grpwo.mjs} +3 -3
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-dKZOZ2hM.mjs} +3 -3
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-CFeAJloA.mjs} +3 -3
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-DBfsTkAi.mjs → Help-i4OasOO-.mjs} +176 -158
- package/dist/{LineChart-C1PxNf7P.mjs → LineChart-bc1D9xBE.mjs} +78 -78
- package/dist/Loader-BSWSYqvn.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-D_qVX5dN.mjs} +44 -44
- package/dist/{MiniWidgetContainer-CKzf_Ira.mjs → MiniWidgetContainer-D7MkHG15.mjs} +12 -12
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-8FFC1Bs0.mjs} +2 -2
- package/dist/{NotificationSettings-B74rQVYC.mjs → NotificationSettings-BsWiYD94.mjs} +67 -67
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-62e0mU_3.mjs} +7 -7
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-RfZ8Wuhh.mjs} +3 -3
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-Bhx56aA3.mjs} +76 -76
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-D3EOKZ2B.mjs} +1 -1
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-C6KH8JH4.mjs} +1 -1
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-PsRQPkmV.mjs} +1 -1
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CZzDb-7d.mjs} +10 -10
- package/dist/TransactionDetails-Duv1X9ec.mjs +1379 -0
- package/dist/{TransactionStore-DbwAutwC.mjs → TransactionStore-DgLrYW4C.mjs} +3 -3
- package/dist/{User-BklmOUSd.mjs → User-DqNX2GAK.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-CH9E-jOx.mjs} +178 -177
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-B1Jzb4XA.mjs} +6 -6
- package/dist/accounts/index.es.js +45 -45
- package/dist/analytics/index.es.js +22 -22
- package/dist/budgets/index.es.js +266 -265
- package/dist/cashflow/index.es.js +155 -154
- package/dist/categories/index.es.js +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/index.d.ts +1 -0
- package/dist/common/index.es.js +659 -394
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +438 -438
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-BFpuIAXW.mjs} +1 -1
- package/dist/finstrong/index.es.js +113 -113
- package/dist/goals/index.es.js +379 -385
- 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 +3 -3
- package/dist/investments/index.es.js +279 -278
- package/dist/merchants/index.es.js +16 -16
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +185 -191
- package/dist/notifications/index.es.js +29 -29
- package/dist/recurringtransactions/index.es.js +82 -82
- package/dist/settings/index.es.js +254 -254
- package/dist/spending/index.es.js +43 -43
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +150 -149
- package/dist/trends/index.es.js +297 -296
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-usSZCQ7I.mjs} +1 -1
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/package.json +30 -30
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
|
@@ -2,52 +2,53 @@ import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import f, { useState as J } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as Pe } from "date-fns/addMonths";
|
|
5
|
-
import { startOfToday as
|
|
5
|
+
import { startOfToday as W } from "date-fns/startOfToday";
|
|
6
6
|
import D from "@mui/material/Box";
|
|
7
7
|
import v from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import { Text as h, P as N, Icon as j, InstitutionLogo as xe, H1 as de, H2 as
|
|
11
|
-
import { G as
|
|
9
|
+
import se from "@mui/material/styles/useTheme";
|
|
10
|
+
import { Text as h, P as N, Icon as j, InstitutionLogo as xe, H1 as de, H2 as qe } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Xe, v as me, u as k, q as ce, d as Le, b as q, j as P, g as ke, n as Ye, a as Qe, h as Ne, p as Ve } from "../hooks-C41HAxM5.mjs";
|
|
12
12
|
import { C as L } from "../CurrencyText-Dr0EZ7bp.mjs";
|
|
13
|
-
import { u as ue } from "../useScreenSize-
|
|
14
|
-
import { L as te } from "../Loader-
|
|
15
|
-
import { I as he } from "../CashflowStore-
|
|
16
|
-
import { C as
|
|
13
|
+
import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
+
import { L as te } from "../Loader-BSWSYqvn.mjs";
|
|
15
|
+
import { I as he } from "../CashflowStore-naOtJcwo.mjs";
|
|
16
|
+
import { C as zn } from "../CashflowStore-naOtJcwo.mjs";
|
|
17
17
|
import { b as $ } from "../Localization-2MODESHW.mjs";
|
|
18
|
-
import { M as
|
|
19
|
-
import { E as
|
|
20
|
-
import { R as
|
|
21
|
-
import
|
|
18
|
+
import { M as Ke } from "../MiniWidgetContainer-D7MkHG15.mjs";
|
|
19
|
+
import { E as Je } from "../EmptyState-DoxNUae-.mjs";
|
|
20
|
+
import { R as Ze } from "../RecurringSettings-RfZ8Wuhh.mjs";
|
|
21
|
+
import et from "@mui/material/Tabs";
|
|
22
22
|
import ye from "@mui/material/Tab";
|
|
23
23
|
import { getUnixTime as B } from "date-fns/getUnixTime";
|
|
24
24
|
import ee from "@mui/material/List";
|
|
25
25
|
import ne from "@mui/material/ListItem";
|
|
26
|
-
import { A as
|
|
27
|
-
import { f as
|
|
28
|
-
import
|
|
26
|
+
import { A as tt } from "../AccountListItem-DxmAs98Z.mjs";
|
|
27
|
+
import { f as X, a as Y } from "../Dialog-CDV0kKxj.mjs";
|
|
28
|
+
import nt from "@mui/material/ListSubheader";
|
|
29
29
|
import { f as Z } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
30
30
|
import { isAfter as Oe } from "date-fns/isAfter";
|
|
31
|
-
import { isBefore as
|
|
32
|
-
import { isToday as
|
|
31
|
+
import { isBefore as He } from "date-fns/isBefore";
|
|
32
|
+
import { isToday as Fe } from "date-fns/isToday";
|
|
33
33
|
import { addDays as Ce } from "date-fns/addDays";
|
|
34
|
+
import { alpha as ot, keyframes as at } from "@mui/material/styles";
|
|
34
35
|
import { DataGridPro as it } from "@mui/x-data-grid-pro";
|
|
35
|
-
import { T as
|
|
36
|
+
import { T as Se } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
36
37
|
import G from "@mui/material/Button";
|
|
37
|
-
import { M as rt, S as st, i as ct, d as
|
|
38
|
-
import { D as
|
|
38
|
+
import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-D_qVX5dN.mjs";
|
|
39
|
+
import { D as We } from "../Drawer-Dqe5EqvA.mjs";
|
|
39
40
|
import { subDays as Me } from "date-fns/subDays";
|
|
40
41
|
import { endOfToday as dt } from "date-fns/endOfToday";
|
|
41
|
-
import { W as mt, A as
|
|
42
|
+
import { W as mt, A as we } from "../WidgetContainer-B1Jzb4XA.mjs";
|
|
42
43
|
import { formatISO as ut } from "date-fns/formatISO";
|
|
43
44
|
import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
|
|
44
45
|
import { startOfMonth as ht } from "date-fns/startOfMonth";
|
|
45
|
-
import { S as pt, c as ft } from "../TransactionDetails-
|
|
46
|
-
import { F as gt, R as De, e as ve } from "../RecurringTransactions-
|
|
46
|
+
import { S as pt, c as ft } from "../TransactionDetails-Duv1X9ec.mjs";
|
|
47
|
+
import { F as gt, R as De, e as ve } from "../RecurringTransactions-Bhx56aA3.mjs";
|
|
47
48
|
import { h as bt } from "../DateUtil-CDPZw_-m.mjs";
|
|
48
49
|
import { F as xt, A as z } from "../Fetch-DecPFeGU.mjs";
|
|
49
|
-
const
|
|
50
|
-
if (!f.useContext(
|
|
50
|
+
const Q = () => {
|
|
51
|
+
if (!f.useContext(Xe))
|
|
51
52
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
52
53
|
return me().uiStore;
|
|
53
54
|
}, yt = ({ remaining: a }) => {
|
|
@@ -74,8 +75,8 @@ const V = () => {
|
|
|
74
75
|
selectedCashAccounts: d,
|
|
75
76
|
setNextIncome: b,
|
|
76
77
|
setSelectedCashAccounts: C,
|
|
77
|
-
setUpcomingExpenses:
|
|
78
|
-
} =
|
|
78
|
+
setUpcomingExpenses: _
|
|
79
|
+
} = Q(), { isDataLoaded: O, nextIncomeRecurrence: A, upcomingExpenses: H } = P();
|
|
79
80
|
f.useEffect(() => {
|
|
80
81
|
c(i);
|
|
81
82
|
}, [i]), f.useEffect(() => {
|
|
@@ -83,65 +84,65 @@ const V = () => {
|
|
|
83
84
|
i.filter((I) => u.includes(I.guid))
|
|
84
85
|
);
|
|
85
86
|
}, [i, x]), f.useEffect(() => {
|
|
86
|
-
A && b(A),
|
|
87
|
-
}, [A,
|
|
87
|
+
A && b(A), _(H);
|
|
88
|
+
}, [A, H]);
|
|
88
89
|
const p = f.useMemo(
|
|
89
90
|
() => i.filter((I) => u.includes(I.guid)).reduce((I, M) => I + (M?.balance || 0), 0),
|
|
90
|
-
[u,
|
|
91
|
-
),
|
|
91
|
+
[u, H]
|
|
92
|
+
), w = f.useMemo(
|
|
92
93
|
() => l.filter((I) => u.includes(I.accountGuid || "")).reduce((I, M) => I + M.amount, 0),
|
|
93
94
|
[u, l]
|
|
94
95
|
), R = f.useMemo(
|
|
95
|
-
() => p -
|
|
96
|
-
[p,
|
|
96
|
+
() => p - w,
|
|
97
|
+
[p, w]
|
|
97
98
|
);
|
|
98
99
|
return O ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
99
100
|
s,
|
|
100
101
|
{
|
|
101
|
-
border: `1px solid ${a.palette.
|
|
102
|
+
border: `1px solid ${a.palette.border.light}`,
|
|
102
103
|
borderRadius: 1,
|
|
103
104
|
direction: "row",
|
|
104
105
|
justifyContent: "space-between",
|
|
105
106
|
px: 24,
|
|
106
107
|
children: [
|
|
107
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
108
|
-
/* @__PURE__ */ e(L, { amount: p, variant: "
|
|
109
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
109
|
+
/* @__PURE__ */ e(L, { amount: p, variant: "H2" }),
|
|
110
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: $(
|
|
110
111
|
m.total_cash_accounts,
|
|
111
112
|
d.length
|
|
112
113
|
) })
|
|
113
114
|
] }),
|
|
114
115
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
|
|
115
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
116
|
-
/* @__PURE__ */ e(L, { amount:
|
|
117
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
117
|
+
/* @__PURE__ */ e(L, { amount: w, variant: "H2" }),
|
|
118
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: $(m.expenses_due, l.length) })
|
|
118
119
|
] }),
|
|
119
120
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
|
|
120
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
121
|
-
/* @__PURE__ */ e(L, { amount: R, variant: "
|
|
122
|
+
/* @__PURE__ */ e(L, { amount: R, variant: "H2" }),
|
|
122
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
123
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
124
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: m.available_to_spend }),
|
|
124
125
|
/* @__PURE__ */ e(he, { body: m.tooltip_body, title: m.tooltip_title })
|
|
125
126
|
] })
|
|
126
127
|
] }),
|
|
127
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.
|
|
128
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
129
|
-
/* @__PURE__ */ e(N, { variant: "
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
|
|
129
|
+
/* @__PURE__ */ e(h, { variant: "H2", children: $(m.days, r) }),
|
|
130
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: m.next_paycheck })
|
|
130
131
|
] }) })
|
|
131
132
|
]
|
|
132
133
|
}
|
|
133
|
-
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.
|
|
134
|
+
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
|
|
134
135
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
135
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
136
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: $(
|
|
136
137
|
m.total_cash_accounts,
|
|
137
138
|
d.length
|
|
138
139
|
) }),
|
|
139
|
-
/* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "
|
|
140
|
+
/* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
|
|
140
141
|
] }),
|
|
141
142
|
/* @__PURE__ */ e(v, {}),
|
|
142
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
143
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
144
|
-
/* @__PURE__ */ e(L, { amount:
|
|
144
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: $(m.expenses_due, l.length) }),
|
|
145
|
+
/* @__PURE__ */ e(L, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
|
|
145
146
|
] }),
|
|
146
147
|
/* @__PURE__ */ e(v, {}),
|
|
147
148
|
/* @__PURE__ */ e(
|
|
@@ -160,22 +161,22 @@ const V = () => {
|
|
|
160
161
|
),
|
|
161
162
|
/* @__PURE__ */ e(v, {}),
|
|
162
163
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
163
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
164
|
-
/* @__PURE__ */ e(h, { bold: !0, variant: "
|
|
164
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: m.next_paycheck }),
|
|
165
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "XSmall", children: $(m.days, r) })
|
|
165
166
|
] })
|
|
166
167
|
] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
|
|
167
|
-
},
|
|
168
|
+
}, St = T(Ct), _t = ({
|
|
168
169
|
onPrimaryCtaClick: a,
|
|
169
170
|
onSecondaryCtaClick: n,
|
|
170
171
|
sx: t = {}
|
|
171
172
|
}) => {
|
|
172
173
|
const { cashflow: i } = k(), { isInitialized: g } = q(), { loadRepeatingTransactionData: x, income: u, isDataLoaded: c, setDateRange: m } = P();
|
|
173
174
|
f.useEffect(() => {
|
|
174
|
-
m({ start:
|
|
175
|
+
m({ start: W(), end: Pe(W(), 1) }), c || x().finally();
|
|
175
176
|
}, []);
|
|
176
177
|
const r = c && !u.length;
|
|
177
178
|
return g ? /* @__PURE__ */ o(
|
|
178
|
-
|
|
179
|
+
Ke,
|
|
179
180
|
{
|
|
180
181
|
className: "mx-exp-cashflow-miniwidget",
|
|
181
182
|
onPrimaryCtaClick: a,
|
|
@@ -186,7 +187,7 @@ const V = () => {
|
|
|
186
187
|
children: [
|
|
187
188
|
!c && /* @__PURE__ */ e(te, {}),
|
|
188
189
|
c && (r ? /* @__PURE__ */ e(
|
|
189
|
-
|
|
190
|
+
Je,
|
|
190
191
|
{
|
|
191
192
|
header: i.create,
|
|
192
193
|
icon: "local_atm",
|
|
@@ -195,11 +196,11 @@ const V = () => {
|
|
|
195
196
|
primaryButtonStartIcon: "add",
|
|
196
197
|
subText: i.create_description
|
|
197
198
|
}
|
|
198
|
-
) : /* @__PURE__ */ e(
|
|
199
|
+
) : /* @__PURE__ */ e(St, {}))
|
|
199
200
|
]
|
|
200
201
|
}
|
|
201
202
|
) : /* @__PURE__ */ e(te, {});
|
|
202
|
-
}, Fn = T(
|
|
203
|
+
}, Fn = T(_t), wt = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
203
204
|
ne,
|
|
204
205
|
{
|
|
205
206
|
sx: {
|
|
@@ -219,8 +220,8 @@ var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a)
|
|
|
219
220
|
const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
220
221
|
/* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
221
222
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
222
|
-
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children:
|
|
223
|
-
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children:
|
|
223
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: X(a.expectedDate, Y.MONTH) }),
|
|
224
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: X(a.expectedDate, Y.DAY) })
|
|
224
225
|
] }),
|
|
225
226
|
/* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
226
227
|
/* @__PURE__ */ e(
|
|
@@ -237,7 +238,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
237
238
|
const { cashflow: t } = k();
|
|
238
239
|
return /* @__PURE__ */ o(U, { children: [
|
|
239
240
|
/* @__PURE__ */ o(
|
|
240
|
-
|
|
241
|
+
nt,
|
|
241
242
|
{
|
|
242
243
|
sx: {
|
|
243
244
|
alignItems: "center",
|
|
@@ -259,16 +260,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
259
260
|
),
|
|
260
261
|
/* @__PURE__ */ e(v, {})
|
|
261
262
|
] });
|
|
262
|
-
}, Ee = T(Dt), re = (a, n) => (t) => t.accountGuid === a.guid && (
|
|
263
|
-
const { availableWidth: a } = ce(), { cashflow: n } = k(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: x } =
|
|
263
|
+
}, Ee = T(Dt), re = (a, n) => (t) => t.accountGuid === a.guid && (Fe(t.expectedDate) || Oe(t.expectedDate, n.start)) && He(t.expectedDate, n.end), vt = () => {
|
|
264
|
+
const { availableWidth: a } = ce(), { cashflow: n } = k(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: x } = Q();
|
|
264
265
|
return /* @__PURE__ */ o(s, { children: [
|
|
265
266
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
266
267
|
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
267
268
|
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
268
|
-
|
|
269
|
+
X(g.start, Y.FULL_MONTH_DAY),
|
|
269
270
|
" -",
|
|
270
271
|
" ",
|
|
271
|
-
|
|
272
|
+
X(g.end, Y.FULL_MONTH_DAY)
|
|
272
273
|
] })
|
|
273
274
|
] }),
|
|
274
275
|
/* @__PURE__ */ e(s, { children: x.map((u) => {
|
|
@@ -286,13 +287,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
286
287
|
{
|
|
287
288
|
sx: {
|
|
288
289
|
border: "1px solid",
|
|
289
|
-
borderColor: "
|
|
290
|
+
borderColor: "border.light",
|
|
290
291
|
mb: 24,
|
|
291
292
|
borderRadius: 1
|
|
292
293
|
},
|
|
293
294
|
children: [
|
|
294
295
|
/* @__PURE__ */ e(
|
|
295
|
-
|
|
296
|
+
tt,
|
|
296
297
|
{
|
|
297
298
|
account: u,
|
|
298
299
|
listItemProps: {
|
|
@@ -320,7 +321,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
320
321
|
}
|
|
321
322
|
) }),
|
|
322
323
|
/* @__PURE__ */ e(
|
|
323
|
-
|
|
324
|
+
wt,
|
|
324
325
|
{
|
|
325
326
|
remaining: (u.available_balance || u.balance || 0) + r - l
|
|
326
327
|
}
|
|
@@ -332,7 +333,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
332
333
|
}) })
|
|
333
334
|
] });
|
|
334
335
|
}, At = T(vt), Et = () => {
|
|
335
|
-
const { availableWidth: a } = ce(), n = se(), { cashflow: t } = k(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: x, selectedCashAccounts: u } =
|
|
336
|
+
const { availableWidth: a } = ce(), n = se(), { cashflow: t } = k(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: x, selectedCashAccounts: u } = Q(), c = [
|
|
336
337
|
{
|
|
337
338
|
field: "account",
|
|
338
339
|
flex: 1.5,
|
|
@@ -357,21 +358,21 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
357
358
|
flex: 1,
|
|
358
359
|
headerName: t.balance,
|
|
359
360
|
type: "number",
|
|
360
|
-
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "
|
|
361
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: Z(r.value, "0,0.00") })
|
|
361
362
|
},
|
|
362
363
|
{
|
|
363
364
|
field: "income",
|
|
364
365
|
flex: 1,
|
|
365
366
|
headerName: t.projected_income,
|
|
366
367
|
type: "number",
|
|
367
|
-
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "
|
|
368
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: `+${Z(r.value, "0,0.00")}` })
|
|
368
369
|
},
|
|
369
370
|
{
|
|
370
371
|
field: "expenses",
|
|
371
372
|
flex: 1.1,
|
|
372
373
|
headerName: t.projected_expenses,
|
|
373
374
|
type: "number",
|
|
374
|
-
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "
|
|
375
|
+
renderCell: (r) => /* @__PURE__ */ e(h, { color: n.palette.text.primary, variant: "Small", children: `-${Z(r.value, "0,0.00")}` })
|
|
375
376
|
},
|
|
376
377
|
{
|
|
377
378
|
field: "remaining",
|
|
@@ -384,7 +385,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
384
385
|
h,
|
|
385
386
|
{
|
|
386
387
|
color: Math.sign(l) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
387
|
-
variant: "
|
|
388
|
+
variant: "Small",
|
|
388
389
|
children: Z(l, "0,0.00")
|
|
389
390
|
}
|
|
390
391
|
);
|
|
@@ -392,10 +393,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
392
393
|
}
|
|
393
394
|
], m = f.useMemo(() => u.map((r) => {
|
|
394
395
|
const l = i.filter(
|
|
395
|
-
re(r, { start:
|
|
396
|
-
).reduce((C,
|
|
397
|
-
re(r, { start:
|
|
398
|
-
).reduce((C,
|
|
396
|
+
re(r, { start: W(), end: Ce(W(), 30) })
|
|
397
|
+
).reduce((C, _) => C + _.amount, 0), d = g.filter(
|
|
398
|
+
re(r, { start: W(), end: Ce(W(), 30) })
|
|
399
|
+
).reduce((C, _) => C + _.amount, 0), b = (r.balance || 0) + d - l;
|
|
399
400
|
return {
|
|
400
401
|
account: r,
|
|
401
402
|
balance: r.balance || 0,
|
|
@@ -440,10 +441,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
440
441
|
)
|
|
441
442
|
] }),
|
|
442
443
|
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
443
|
-
|
|
444
|
+
X(x.start, Y.FULL_MONTH_DAY),
|
|
444
445
|
" -",
|
|
445
446
|
" ",
|
|
446
|
-
|
|
447
|
+
X(x.end, Y.FULL_MONTH_DAY)
|
|
447
448
|
] })
|
|
448
449
|
]
|
|
449
450
|
}
|
|
@@ -461,12 +462,12 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
461
462
|
rows: m,
|
|
462
463
|
sx: {
|
|
463
464
|
border: "1px solid",
|
|
464
|
-
borderColor: "
|
|
465
|
+
borderColor: "border.light",
|
|
465
466
|
borderRadius: 1,
|
|
466
467
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
467
468
|
color: n.palette.primary.main,
|
|
468
469
|
"&:hover": {
|
|
469
|
-
backgroundColor:
|
|
470
|
+
backgroundColor: ot(n.palette.primary.main, 0.1)
|
|
470
471
|
}
|
|
471
472
|
},
|
|
472
473
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
@@ -479,13 +480,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
479
480
|
}
|
|
480
481
|
}
|
|
481
482
|
) : m.map((r) => {
|
|
482
|
-
const { name: l, nickname: d, institution_guid: b, account_number: C } = r.account,
|
|
483
|
+
const { name: l, nickname: d, institution_guid: b, account_number: C } = r.account, _ = d || l;
|
|
483
484
|
return /* @__PURE__ */ e(
|
|
484
485
|
ee,
|
|
485
486
|
{
|
|
486
487
|
sx: {
|
|
487
488
|
border: "1px solid",
|
|
488
|
-
borderColor: "
|
|
489
|
+
borderColor: "border.light",
|
|
489
490
|
borderRadius: 1,
|
|
490
491
|
marginBottom: 24
|
|
491
492
|
},
|
|
@@ -508,9 +509,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
508
509
|
size: 16
|
|
509
510
|
}
|
|
510
511
|
),
|
|
511
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
512
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: `${_} ${C ? `*${C}` : ""}` })
|
|
512
513
|
] }),
|
|
513
|
-
/* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "
|
|
514
|
+
/* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "Small" })
|
|
514
515
|
]
|
|
515
516
|
}
|
|
516
517
|
),
|
|
@@ -524,8 +525,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
524
525
|
px: 16,
|
|
525
526
|
py: 12,
|
|
526
527
|
children: [
|
|
527
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
528
|
-
/* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "
|
|
528
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_income }),
|
|
529
|
+
/* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
|
|
529
530
|
]
|
|
530
531
|
}
|
|
531
532
|
),
|
|
@@ -539,8 +540,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
539
540
|
px: 16,
|
|
540
541
|
py: 12,
|
|
541
542
|
children: [
|
|
542
|
-
/* @__PURE__ */ e(h, { variant: "
|
|
543
|
-
/* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "
|
|
543
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_expenses }),
|
|
544
|
+
/* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
544
545
|
]
|
|
545
546
|
}
|
|
546
547
|
),
|
|
@@ -575,7 +576,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
575
576
|
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
576
577
|
}, [i]), /* @__PURE__ */ o(D, { children: [
|
|
577
578
|
/* @__PURE__ */ o(
|
|
578
|
-
|
|
579
|
+
et,
|
|
579
580
|
{
|
|
580
581
|
"aria-label": a.cashflow_summary_and_details,
|
|
581
582
|
centered: !0,
|
|
@@ -610,8 +611,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
610
611
|
}
|
|
611
612
|
),
|
|
612
613
|
/* @__PURE__ */ e(D, { sx: { mb: 32 } }),
|
|
613
|
-
/* @__PURE__ */ e(
|
|
614
|
-
/* @__PURE__ */ e(
|
|
614
|
+
/* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
|
|
615
|
+
/* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
|
|
615
616
|
] });
|
|
616
617
|
}, Lt = T(Rt), ie = ({
|
|
617
618
|
amount: a,
|
|
@@ -629,31 +630,31 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
629
630
|
padding: n ? "14px 16px" : 0,
|
|
630
631
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
631
632
|
children: [
|
|
632
|
-
!n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "
|
|
633
|
+
!n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "H2" }),
|
|
633
634
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
634
|
-
/* @__PURE__ */ e(h, { bold: t, variant: "
|
|
635
|
+
/* @__PURE__ */ e(h, { bold: t, variant: "Small", children: i }),
|
|
635
636
|
x
|
|
636
637
|
] }),
|
|
637
|
-
n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "
|
|
638
|
+
n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "Small" })
|
|
638
639
|
]
|
|
639
640
|
}
|
|
640
|
-
), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (
|
|
641
|
-
const { availableWidth: a } = ce(), { cashflow: n } = k(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = P(), { selectedAccountGuids: u } = q(), { dateRange: c, selectedCashAccounts: m } =
|
|
641
|
+
), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Fe(t.expectedDate) || Oe(t.expectedDate, n.start)) && He(t.expectedDate, n.end), kt = () => {
|
|
642
|
+
const { availableWidth: a } = ce(), { cashflow: n } = k(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = P(), { selectedAccountGuids: u } = q(), { dateRange: c, selectedCashAccounts: m } = Q(), [r, l] = f.useState(!1), d = f.useMemo(
|
|
642
643
|
() => g.filter(Te(u, c)),
|
|
643
644
|
[c, u, g]
|
|
644
645
|
), b = f.useMemo(
|
|
645
646
|
() => x.filter(Te(u, c)),
|
|
646
647
|
[c, u, x]
|
|
647
648
|
), C = f.useMemo(
|
|
648
|
-
() => m.reduce((
|
|
649
|
+
() => m.reduce((w, R) => w + (R?.balance || 0), 0),
|
|
649
650
|
[m]
|
|
650
|
-
),
|
|
651
|
+
), _ = d.reduce((w, R) => w + R.amount, 0), O = b.reduce((w, R) => w + R.amount, 0), A = C - _ + O, H = i && t.length > 0, p = a < 725;
|
|
651
652
|
return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
652
653
|
/* @__PURE__ */ o(
|
|
653
654
|
s,
|
|
654
655
|
{
|
|
655
656
|
border: p ? "1px solid" : "none",
|
|
656
|
-
borderColor: "
|
|
657
|
+
borderColor: "border.light",
|
|
657
658
|
borderRadius: 2,
|
|
658
659
|
flexDirection: p ? "column" : "row",
|
|
659
660
|
gap: p ? 0 : 24,
|
|
@@ -668,7 +669,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
668
669
|
}
|
|
669
670
|
),
|
|
670
671
|
p && /* @__PURE__ */ e(v, {}),
|
|
671
|
-
|
|
672
|
+
H ? /* @__PURE__ */ o(U, { children: [
|
|
672
673
|
!p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
673
674
|
/* @__PURE__ */ e(
|
|
674
675
|
ie,
|
|
@@ -692,7 +693,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
692
693
|
/* @__PURE__ */ e(
|
|
693
694
|
ie,
|
|
694
695
|
{
|
|
695
|
-
amount:
|
|
696
|
+
amount: _,
|
|
696
697
|
isMobile: p,
|
|
697
698
|
label: $(n.to_be_paid_out, d.length),
|
|
698
699
|
symbol: p ? "-" : void 0
|
|
@@ -719,7 +720,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
719
720
|
}
|
|
720
721
|
),
|
|
721
722
|
/* @__PURE__ */ e(
|
|
722
|
-
|
|
723
|
+
We,
|
|
723
724
|
{
|
|
724
725
|
ariaLabelClose: n.close_manage_income_aria,
|
|
725
726
|
isOpen: r,
|
|
@@ -737,22 +738,22 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
737
738
|
setSelectedAccounts: g,
|
|
738
739
|
shouldDisableNextDate: x,
|
|
739
740
|
shouldDisablePrevDate: u
|
|
740
|
-
} = q(), { onEvent: c } = ke(), { onLoad: m } =
|
|
741
|
+
} = q(), { onEvent: c } = ke(), { onLoad: m } = Ye(), { clientConfig: r } = Qe(), { visibleCashAccounts: l } = Le(), { setFilter: d } = Ne(), { dateRange: b, setSelectedCashAccounts: C } = Q(), { loadRepeatingTransactionData: _, isDataLoaded: O, setDateRange: A } = P(), { cashflow: H, recurring: p } = k(), { isInitialized: w } = q(), I = r?.master?.deep_link_params?.view === "manage_income", [M, ae] = f.useState(I);
|
|
741
742
|
return f.useEffect(() => {
|
|
742
|
-
A(b), O ||
|
|
743
|
+
A(b), O || _().finally(() => {
|
|
743
744
|
m?.("CashflowWidget");
|
|
744
745
|
});
|
|
745
746
|
}, []), f.useEffect(() => {
|
|
746
747
|
g(l);
|
|
747
748
|
}, [l]), f.useEffect(() => {
|
|
748
|
-
const
|
|
749
|
-
(
|
|
749
|
+
const V = l.map((S) => S.guid), K = t.filter(
|
|
750
|
+
(S) => i.includes(S.guid) && V.includes(S.guid)
|
|
750
751
|
);
|
|
751
752
|
C(K), d({
|
|
752
|
-
dateRange: { start: Me(
|
|
753
|
-
accounts: K.map((
|
|
753
|
+
dateRange: { start: Me(W(), 90), end: dt() },
|
|
754
|
+
accounts: K.map((S) => S.guid)
|
|
754
755
|
});
|
|
755
|
-
}, [l, t]),
|
|
756
|
+
}, [l, t]), w ? /* @__PURE__ */ o(
|
|
756
757
|
mt,
|
|
757
758
|
{
|
|
758
759
|
accountOptions: l,
|
|
@@ -761,7 +762,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
761
762
|
label: p.action_title,
|
|
762
763
|
iconName: "credit_card_gear",
|
|
763
764
|
onClick: () => {
|
|
764
|
-
ae(!0), c(
|
|
765
|
+
ae(!0), c(we.CASH_FLOW_CLICK_SETTINGS);
|
|
765
766
|
}
|
|
766
767
|
}
|
|
767
768
|
],
|
|
@@ -774,38 +775,38 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
774
775
|
},
|
|
775
776
|
dateRange: b,
|
|
776
777
|
dateRangeVariant: "readonly",
|
|
777
|
-
onAccountsFilterClick: () => c(
|
|
778
|
+
onAccountsFilterClick: () => c(we.CASH_FLOW_CLICK_FILTER),
|
|
778
779
|
onBackClick: a,
|
|
779
780
|
sx: n,
|
|
780
|
-
title:
|
|
781
|
+
title: H.title,
|
|
781
782
|
children: [
|
|
782
783
|
/* @__PURE__ */ e(Nt, {}),
|
|
783
784
|
/* @__PURE__ */ e(Lt, {}),
|
|
784
785
|
/* @__PURE__ */ e(
|
|
785
|
-
|
|
786
|
+
We,
|
|
786
787
|
{
|
|
787
|
-
ariaLabelClose:
|
|
788
|
+
ariaLabelClose: H.close_settings_aria,
|
|
788
789
|
isOpen: M,
|
|
789
790
|
onClose: () => ae(!1),
|
|
790
791
|
shouldShowHeaderBorders: !1,
|
|
791
792
|
title: p.action_title,
|
|
792
|
-
children: /* @__PURE__ */ e(
|
|
793
|
+
children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: I ? 1 : 0 })
|
|
793
794
|
}
|
|
794
795
|
)
|
|
795
796
|
]
|
|
796
797
|
}
|
|
797
798
|
) : /* @__PURE__ */ e(te, {});
|
|
798
|
-
}, Wn = T(Ot),
|
|
799
|
+
}, Wn = T(Ot), Ht = ({ handleNextStep: a }) => {
|
|
799
800
|
const { completeOnboarding: n } = me(), { cashflow: t } = k(), i = se();
|
|
800
801
|
return /* @__PURE__ */ o(s, { children: [
|
|
801
802
|
/* @__PURE__ */ e(de, { pb: 12, children: t.welcome_title }),
|
|
802
803
|
/* @__PURE__ */ e(
|
|
803
|
-
|
|
804
|
+
qe,
|
|
804
805
|
{
|
|
805
806
|
color: i.palette.primary.light,
|
|
806
807
|
pb: 8,
|
|
807
808
|
sx: { wordBreak: "break-word", whiteSpace: "initial" },
|
|
808
|
-
variant: "
|
|
809
|
+
variant: "H3",
|
|
809
810
|
children: t.welcome_sub_title
|
|
810
811
|
}
|
|
811
812
|
),
|
|
@@ -815,7 +816,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
815
816
|
/* @__PURE__ */ e(
|
|
816
817
|
D,
|
|
817
818
|
{
|
|
818
|
-
bgcolor: i.palette.primary.
|
|
819
|
+
bgcolor: i.palette.primary.lighter,
|
|
819
820
|
borderRadius: 1,
|
|
820
821
|
component: "span",
|
|
821
822
|
height: 44,
|
|
@@ -831,7 +832,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
831
832
|
/* @__PURE__ */ e(
|
|
832
833
|
D,
|
|
833
834
|
{
|
|
834
|
-
bgcolor: i.palette.primary.
|
|
835
|
+
bgcolor: i.palette.primary.lighter,
|
|
835
836
|
borderRadius: 1,
|
|
836
837
|
component: "span",
|
|
837
838
|
height: 44,
|
|
@@ -847,7 +848,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
847
848
|
/* @__PURE__ */ e(
|
|
848
849
|
D,
|
|
849
850
|
{
|
|
850
|
-
bgcolor: i.palette.primary.
|
|
851
|
+
bgcolor: i.palette.primary.lighter,
|
|
851
852
|
borderRadius: 1,
|
|
852
853
|
component: "span",
|
|
853
854
|
height: 44,
|
|
@@ -865,17 +866,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
865
866
|
/* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
866
867
|
] })
|
|
867
868
|
] });
|
|
868
|
-
},
|
|
869
|
+
}, Ft = T(Ht), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", $e = {
|
|
869
870
|
CASHFLOW_ONBOARDING: `${Re}/cashflow-onboarding.png`,
|
|
870
871
|
CASHFLOW_LOADING_ANIMATION: `${Re}/loading-animation.gif`
|
|
871
|
-
},
|
|
872
|
+
}, Wt = () => {
|
|
872
873
|
const { cashflow: a } = k();
|
|
873
874
|
return /* @__PURE__ */ o(f.Fragment, { children: [
|
|
874
875
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: $e.CASHFLOW_LOADING_ANIMATION }) }),
|
|
875
876
|
/* @__PURE__ */ e(de, { pb: 12, children: a.loading_title }),
|
|
876
877
|
/* @__PURE__ */ e(N, { children: a.loading_description })
|
|
877
878
|
] });
|
|
878
|
-
}, Mt = T(
|
|
879
|
+
}, Mt = T(Wt), $t = at`
|
|
879
880
|
from {
|
|
880
881
|
transform: rotate(0deg);
|
|
881
882
|
}
|
|
@@ -883,7 +884,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
883
884
|
transform: rotate(360deg);
|
|
884
885
|
}
|
|
885
886
|
`, Gt = () => {
|
|
886
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = k(), { user: g } =
|
|
887
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = k(), { user: g } = Ve(), { completeOnboarding: x } = me(), { isDirty: u } = Q(), { isMobile: c } = ue(), { isCopyLoaded: m, setDisplayedDate: r } = q(), { filter: l, setFilter: d, transactions: b } = Ne(), C = se(), [_, O] = J(!0), [A, H] = f.useState(gt.EveryMonth), [p, w] = f.useState(1), [R, I] = f.useState(15), [M, ae] = J(!1), [V, K] = J(1), [S, Ge] = J([]), [fe, le] = J(""), F = f.useMemo(
|
|
887
888
|
() => b.find((y) => y.guid === fe),
|
|
888
889
|
[fe, b]
|
|
889
890
|
), je = !!n.filter(
|
|
@@ -891,14 +892,14 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
891
892
|
).length, ge = async () => {
|
|
892
893
|
K(2), r(
|
|
893
894
|
// Beginning of the month, 90 days before today
|
|
894
|
-
ht(Me(
|
|
895
|
-
|
|
896
|
-
), d({ ...l, custom:
|
|
895
|
+
ht(Me(W(), 90)),
|
|
896
|
+
W()
|
|
897
|
+
), d({ ...l, custom: _e }), K(3);
|
|
897
898
|
}, ze = async () => {
|
|
898
|
-
if (!(
|
|
899
|
+
if (!(S.length < 1)) {
|
|
899
900
|
ae(!0);
|
|
900
|
-
for (let y = 0; y <
|
|
901
|
-
const E =
|
|
901
|
+
for (let y = 0; y < S.length; y++) {
|
|
902
|
+
const E = S[y], be = ve(A, Ie(E.date)), Ue = {
|
|
902
903
|
account_guid: E.account_guid,
|
|
903
904
|
amount: E.amount,
|
|
904
905
|
created_by: 0,
|
|
@@ -917,7 +918,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
917
918
|
}
|
|
918
919
|
await x();
|
|
919
920
|
}
|
|
920
|
-
}, Be = !
|
|
921
|
+
}, Be = !F && _ || !F && S.length < 1;
|
|
921
922
|
return m ? /* @__PURE__ */ o(
|
|
922
923
|
D,
|
|
923
924
|
{
|
|
@@ -932,16 +933,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
932
933
|
py: 24
|
|
933
934
|
},
|
|
934
935
|
children: [
|
|
935
|
-
|
|
936
|
+
V === 1 && /* @__PURE__ */ e(
|
|
936
937
|
D,
|
|
937
938
|
{
|
|
938
939
|
sx: {
|
|
939
940
|
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
940
941
|
},
|
|
941
|
-
children: /* @__PURE__ */ e(
|
|
942
|
+
children: /* @__PURE__ */ e(Ft, { handleNextStep: ge })
|
|
942
943
|
}
|
|
943
944
|
),
|
|
944
|
-
|
|
945
|
+
V === 2 && /* @__PURE__ */ e(
|
|
945
946
|
D,
|
|
946
947
|
{
|
|
947
948
|
sx: {
|
|
@@ -950,7 +951,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
950
951
|
children: /* @__PURE__ */ e(Mt, {})
|
|
951
952
|
}
|
|
952
953
|
),
|
|
953
|
-
|
|
954
|
+
V === 3 && /* @__PURE__ */ o(
|
|
954
955
|
D,
|
|
955
956
|
{
|
|
956
957
|
sx: {
|
|
@@ -959,13 +960,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
959
960
|
children: [
|
|
960
961
|
/* @__PURE__ */ e(de, { pb: 12, children: t.add_income_title }),
|
|
961
962
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
962
|
-
|
|
963
|
-
/* @__PURE__ */ e(ee, { children:
|
|
963
|
+
S.length > 0 && !F && /* @__PURE__ */ o(U, { children: [
|
|
964
|
+
/* @__PURE__ */ e(ee, { children: S.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
|
|
964
965
|
/* @__PURE__ */ e(pt, { bgcolor: "background.paper", children: bt(
|
|
965
966
|
B(y.nextDate || y.date)
|
|
966
967
|
) }),
|
|
967
968
|
/* @__PURE__ */ e(ft, { transaction: y }),
|
|
968
|
-
E !==
|
|
969
|
+
E !== S.length - 1 && /* @__PURE__ */ e(v, {})
|
|
969
970
|
] }, y.guid)) }),
|
|
970
971
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
971
972
|
/* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
|
|
@@ -985,7 +986,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
985
986
|
bgcolor: "background.paper",
|
|
986
987
|
onSearch: (y) => d({
|
|
987
988
|
...l,
|
|
988
|
-
custom: (E) => y ? ct(E, y) :
|
|
989
|
+
custom: (E) => y ? ct(E, y) : _e(E)
|
|
989
990
|
}),
|
|
990
991
|
onSelected: (y) => {
|
|
991
992
|
le(y), O(!1);
|
|
@@ -993,30 +994,30 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
993
994
|
}
|
|
994
995
|
),
|
|
995
996
|
!je && u && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
996
|
-
|
|
997
|
+
F && /* @__PURE__ */ o(U, { children: [
|
|
997
998
|
/* @__PURE__ */ e(
|
|
998
999
|
lt,
|
|
999
1000
|
{
|
|
1000
1001
|
bgcolor: "background.paper",
|
|
1001
1002
|
firstDay: p,
|
|
1002
1003
|
frequency: A,
|
|
1003
|
-
onFirstDayChange:
|
|
1004
|
-
onFrequencyChange:
|
|
1004
|
+
onFirstDayChange: w,
|
|
1005
|
+
onFrequencyChange: H,
|
|
1005
1006
|
onSecondDayChange: I,
|
|
1006
1007
|
secondDay: R,
|
|
1007
|
-
transaction:
|
|
1008
|
+
transaction: F
|
|
1008
1009
|
}
|
|
1009
1010
|
),
|
|
1010
1011
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1011
1012
|
/* @__PURE__ */ e(
|
|
1012
1013
|
G,
|
|
1013
1014
|
{
|
|
1014
|
-
"aria-disabled": !
|
|
1015
|
+
"aria-disabled": !F,
|
|
1015
1016
|
onClick: () => {
|
|
1016
|
-
const y = [...
|
|
1017
|
+
const y = [...S];
|
|
1017
1018
|
y.push({
|
|
1018
|
-
...
|
|
1019
|
-
nextDate: ve(A, Ie(
|
|
1019
|
+
...F,
|
|
1020
|
+
nextDate: ve(A, Ie(F.date)),
|
|
1020
1021
|
frequency: A
|
|
1021
1022
|
}), Ge(y), le("");
|
|
1022
1023
|
},
|
|
@@ -1036,11 +1037,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1036
1037
|
)
|
|
1037
1038
|
] })
|
|
1038
1039
|
] }),
|
|
1039
|
-
|
|
1040
|
+
S.length > 0 && !F && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1040
1041
|
/* @__PURE__ */ e(
|
|
1041
1042
|
G,
|
|
1042
1043
|
{
|
|
1043
|
-
"aria-disabled":
|
|
1044
|
+
"aria-disabled": S.length < 1 || M,
|
|
1044
1045
|
onClick: ze,
|
|
1045
1046
|
startIcon: M ? /* @__PURE__ */ e(
|
|
1046
1047
|
j,
|
|
@@ -1063,8 +1064,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1063
1064
|
]
|
|
1064
1065
|
}
|
|
1065
1066
|
) : /* @__PURE__ */ e(te, {});
|
|
1066
|
-
},
|
|
1067
|
-
class
|
|
1067
|
+
}, Mn = T(Gt);
|
|
1068
|
+
class $n {
|
|
1068
1069
|
fetchInstance;
|
|
1069
1070
|
constructor(n, t, i) {
|
|
1070
1071
|
this.fetchInstance = new xt(n, t, void 0, i);
|
|
@@ -1084,9 +1085,9 @@ class Mn {
|
|
|
1084
1085
|
updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1085
1086
|
}
|
|
1086
1087
|
export {
|
|
1087
|
-
|
|
1088
|
+
$n as CashflowApi,
|
|
1088
1089
|
Fn as CashflowMiniWidget,
|
|
1089
|
-
|
|
1090
|
-
|
|
1090
|
+
Mn as CashflowOnboarding,
|
|
1091
|
+
zn as CashflowStore,
|
|
1091
1092
|
Wn as CashflowWidget
|
|
1092
1093
|
};
|