@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.bb4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +228 -221
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +402 -668
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { observer as m } from "mobx-react-lite";
|
|
3
|
+
import e from "@mui/material/Stack";
|
|
4
|
+
import { H3 as _, InstitutionLogo as x, Text as a, H2 as T } from "@mxenabled/mxui";
|
|
5
|
+
import d from "react";
|
|
6
|
+
import { G as N, d as f, m as D, f as w, u as E } from "./hooks-C41HAxM5.mjs";
|
|
7
|
+
import { g as I } from "./AccountFields-Cl4KHoSj.mjs";
|
|
8
|
+
import G from "@mui/material/Card";
|
|
9
|
+
import v from "@mui/material/CardContent";
|
|
10
|
+
import O from "@mui/material/CardHeader";
|
|
11
|
+
import { L as H } from "./Loader-Ckqi9Rx6.mjs";
|
|
12
|
+
import { f as M, a as P } from "./Dialog-CDV0kKxj.mjs";
|
|
13
|
+
import { I as L, P as U, S as j } from "./Account-B4CDD-zq.mjs";
|
|
14
|
+
import { u as z } from "./useAccountDisplayName-CcIp09Xc.mjs";
|
|
15
|
+
import { f as Y } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
16
|
+
const p = () => {
|
|
17
|
+
if (!d.useContext(N))
|
|
18
|
+
throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
|
|
19
|
+
return f().uiStore;
|
|
20
|
+
}, k = ({ sx: n, ChartComponent: s }) => {
|
|
21
|
+
const { loadMonthlyCategoryTotals: c } = D(), { isInitialized: o } = w(), { selectedAccount: r } = p(), [l, u] = d.useState(!1);
|
|
22
|
+
return d.useEffect(() => {
|
|
23
|
+
o && c([r]).finally(() => {
|
|
24
|
+
u(!0);
|
|
25
|
+
});
|
|
26
|
+
}, [o, r]), !o || !l ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ i(
|
|
27
|
+
G,
|
|
28
|
+
{
|
|
29
|
+
sx: {
|
|
30
|
+
"& .MuiCardContent-root:last-child": {
|
|
31
|
+
pb: 0
|
|
32
|
+
},
|
|
33
|
+
...n
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ t(
|
|
37
|
+
O,
|
|
38
|
+
{
|
|
39
|
+
sx: { pb: 0 },
|
|
40
|
+
title: /* @__PURE__ */ t(_, { sx: { pb: 4 }, children: M(/* @__PURE__ */ new Date(), P.MONTH_LONG) })
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ t(v, { sx: { p: 0 }, children: s ? /* @__PURE__ */ t(s, {}) : null })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}, B = m(k), R = ({
|
|
48
|
+
customDetailsChart: n,
|
|
49
|
+
ChartComponent: s
|
|
50
|
+
}) => {
|
|
51
|
+
const { institutions: c } = f(), { selectedAccount: o } = p(), { accounts: r } = E(), { firstSubtitle: l, firstValue: u, hasAvailableBalance: b, secondSubtitle: C, secondValue: h } = I(o, r), y = c.find(
|
|
52
|
+
(g) => g.guid === o?.institution_guid
|
|
53
|
+
), A = [
|
|
54
|
+
...L,
|
|
55
|
+
...U,
|
|
56
|
+
...j
|
|
57
|
+
].includes(o.account_type), S = z(o);
|
|
58
|
+
return /* @__PURE__ */ i(e, { bgcolor: "background.default", p: 24, children: [
|
|
59
|
+
/* @__PURE__ */ i(e, { gap: 12, children: [
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
x,
|
|
62
|
+
{
|
|
63
|
+
alt: r.institution_logo_alt,
|
|
64
|
+
institutionGuid: o.institution_guid || "",
|
|
65
|
+
size: 64
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ t(a, { variant: "body2", children: y?.name })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ i(e, { gap: 8, mb: 24, mt: 4, children: [
|
|
71
|
+
/* @__PURE__ */ t(T, { children: S }),
|
|
72
|
+
/* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
|
|
73
|
+
/* @__PURE__ */ t(a, { bold: b, variant: "body1", children: l }),
|
|
74
|
+
/* @__PURE__ */ t(a, { bold: !0, variant: "body1", children: Y(u, "0,0.00") })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
|
|
77
|
+
/* @__PURE__ */ t(a, { variant: "body2", children: C }),
|
|
78
|
+
/* @__PURE__ */ t(a, { variant: "body2", children: h })
|
|
79
|
+
] })
|
|
80
|
+
] }),
|
|
81
|
+
A && /* @__PURE__ */ t(e, { children: n || /* @__PURE__ */ t(B, { ChartComponent: s }) })
|
|
82
|
+
] });
|
|
83
|
+
}, rt = m(R);
|
|
84
|
+
export {
|
|
85
|
+
rt as A,
|
|
86
|
+
p as u
|
|
87
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-
|
|
4
|
-
import { i as T, u as
|
|
5
|
-
import { f as _,
|
|
2
|
+
import { Text as y, Icon as p } from "@mxenabled/mxui";
|
|
3
|
+
import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-DVp54lUH.mjs";
|
|
4
|
+
import { i as T, u as A, a as D, b as g, c as O } from "./Accounts-CRUehOiy.mjs";
|
|
5
|
+
import { f as _, a as N, i as b, b as C } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
6
6
|
import { b as i } from "./Localization-2MODESHW.mjs";
|
|
7
|
-
import { f as o,
|
|
7
|
+
import { f as o, a as f } from "./Dialog-CDV0kKxj.mjs";
|
|
8
8
|
const w = (l, e) => {
|
|
9
9
|
const r = [
|
|
10
10
|
{
|
|
@@ -54,7 +54,7 @@ const w = (l, e) => {
|
|
|
54
54
|
valueFormatter: (t) => a.find((n) => n.value === t)?.label
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
if (
|
|
57
|
+
if (A(l)) {
|
|
58
58
|
let a = e.interest_rate, t = "interest_rate";
|
|
59
59
|
l.is_manual || (typeof l.apr == "number" && (a = e.apr, t = "apr"), typeof l.apy == "number" && (a = e.apy, t = "apy")), r.push({
|
|
60
60
|
event: "account_details_click_interest_rate",
|
|
@@ -66,7 +66,7 @@ const w = (l, e) => {
|
|
|
66
66
|
valueFormatter: (n) => b(n) ? N(n / 100) : n
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return D(l) && (r.push({
|
|
70
70
|
label: e.minimum_payment,
|
|
71
71
|
name: "minimum_payment",
|
|
72
72
|
placeholder: i(e.enter_value, e.minimum_payment),
|
|
@@ -87,7 +87,7 @@ const w = (l, e) => {
|
|
|
87
87
|
type: m.Date,
|
|
88
88
|
valueFormatter: (a) => i(
|
|
89
89
|
e.day_of_every_month,
|
|
90
|
-
|
|
90
|
+
C(a <= 31 ? a : new Date(a).getDate())
|
|
91
91
|
)
|
|
92
92
|
})), g(l) && r.push({
|
|
93
93
|
label: e.credit_limit,
|
|
@@ -103,18 +103,20 @@ const w = (l, e) => {
|
|
|
103
103
|
type: m.Currency,
|
|
104
104
|
valueFormatter: (a) => _(a, "0,0.00")
|
|
105
105
|
}), r;
|
|
106
|
-
},
|
|
106
|
+
}, S = (l, e) => {
|
|
107
107
|
let r = "", a = null, t = null, n = null, s = !1;
|
|
108
108
|
switch (l.account_type) {
|
|
109
|
+
// checking or savings
|
|
109
110
|
case 1:
|
|
110
111
|
case 2: {
|
|
111
112
|
l.available_balance ? (r = e.available_balance, a = l.available_balance, t = l.available_balance ? e.current_balance : null, n = _(l.balance, "0,0.00"), s = !0) : (r = e.current_balance, a = l.balance);
|
|
112
113
|
break;
|
|
113
114
|
}
|
|
115
|
+
// credit cards, loans, investments, etc
|
|
114
116
|
default:
|
|
115
117
|
if (r = e.current_balance, a = l.balance, l.minimum_payment && l.payment_due_at) {
|
|
116
118
|
const c = typeof l.payment_due_at == "number" ? new Date(l.payment_due_at * 1e3) : l.payment_due_at;
|
|
117
|
-
t = /* @__PURE__ */ u(y, { component: "strong", variant: "
|
|
119
|
+
t = /* @__PURE__ */ u(y, { component: "strong", variant: "caption", children: i(
|
|
118
120
|
e.payment_due_on,
|
|
119
121
|
_(l.minimum_payment, "0,0.00"),
|
|
120
122
|
o(c, f.FULL_MONTH_DAY)
|
|
@@ -129,11 +131,11 @@ const w = (l, e) => {
|
|
|
129
131
|
hasAvailableBalance: s
|
|
130
132
|
};
|
|
131
133
|
}, x = (l, e) => l.reduce((a, t) => {
|
|
132
|
-
const s =
|
|
134
|
+
const s = S(t, e).firstValue || 0;
|
|
133
135
|
return a + s;
|
|
134
136
|
}, 0);
|
|
135
137
|
export {
|
|
136
138
|
x as a,
|
|
137
139
|
w as b,
|
|
138
|
-
|
|
140
|
+
S as g
|
|
139
141
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { observer as b } from "mobx-react-lite";
|
|
3
|
+
import I from "@mui/material/Badge";
|
|
4
|
+
import l from "@mui/material/Box";
|
|
5
|
+
import v from "@mui/material/ListItem";
|
|
6
|
+
import C from "@mui/material/ListItemAvatar";
|
|
7
|
+
import S from "@mui/material/ListItemButton";
|
|
8
|
+
import _ from "@mui/material/ListItemText";
|
|
9
|
+
import { useTheme as L } from "@mui/material/styles";
|
|
10
|
+
import { InstitutionLogo as A, Text as o } from "@mxenabled/mxui";
|
|
11
|
+
import { Error as B } from "@mxenabled/mx-icons";
|
|
12
|
+
import { I as j } from "./IconBacking-DgT8DCeh.mjs";
|
|
13
|
+
import { g as T } from "./AccountFields-Cl4KHoSj.mjs";
|
|
14
|
+
import { u as $ } from "./useAccountDisplayName-CcIp09Xc.mjs";
|
|
15
|
+
import { u as k } from "./hooks-C41HAxM5.mjs";
|
|
16
|
+
import { C as d } from "./ConnectDrawer-DVp54lUH.mjs";
|
|
17
|
+
import { f as w } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
18
|
+
const E = {
|
|
19
|
+
gridRow: 1,
|
|
20
|
+
gridColumn: 1,
|
|
21
|
+
zIndex: 2
|
|
22
|
+
}, M = ({ size: t = 20 }) => /* @__PURE__ */ e(j, { size: t, children: /* @__PURE__ */ e(B, { color: "error", filled: !0, sx: { fontSize: t, ...E } }) }), z = ({
|
|
23
|
+
account: t,
|
|
24
|
+
onRowClick: n,
|
|
25
|
+
listItemProps: c,
|
|
26
|
+
shouldShowConnectionStatus: p = !1
|
|
27
|
+
}) => {
|
|
28
|
+
const u = L(), f = $(t), { accounts: i } = k(), { firstSubtitle: h, firstValue: g, secondSubtitle: x, secondValue: y } = T(
|
|
29
|
+
t,
|
|
30
|
+
i
|
|
31
|
+
);
|
|
32
|
+
let s;
|
|
33
|
+
(t.connectionStatus === d.Error || t.connectionStatus === d.RequiresMfa) && (s = /* @__PURE__ */ e(M, { size: 16 }));
|
|
34
|
+
const a = /* @__PURE__ */ r(m, { children: [
|
|
35
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
36
|
+
I,
|
|
37
|
+
{
|
|
38
|
+
badgeContent: p ? s : void 0,
|
|
39
|
+
sx: {
|
|
40
|
+
"& .MuiBadge-badge": {
|
|
41
|
+
right: -1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ e(A, { alt: "MX", institutionGuid: t.institution_guid || "" })
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
_,
|
|
49
|
+
{
|
|
50
|
+
disableTypography: !0,
|
|
51
|
+
primary: /* @__PURE__ */ r(
|
|
52
|
+
o,
|
|
53
|
+
{
|
|
54
|
+
bold: !0,
|
|
55
|
+
color: t.is_hidden ? u.palette.text.secondary : void 0,
|
|
56
|
+
sx: { whiteSpace: "normal" },
|
|
57
|
+
variant: "body1",
|
|
58
|
+
children: [
|
|
59
|
+
`${f} ${t.account_number ? `*${t.account_number}` : ""}`,
|
|
60
|
+
" ",
|
|
61
|
+
t.is_hidden && !t.is_closed && i.is_hidden,
|
|
62
|
+
t.is_closed && i.is_closed
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
secondary: /* @__PURE__ */ r(m, { children: [
|
|
67
|
+
/* @__PURE__ */ r(l, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
68
|
+
/* @__PURE__ */ e(o, { variant: "caption", children: h }),
|
|
69
|
+
/* @__PURE__ */ e(o, { bold: !0, variant: "body2", children: w(g, "0,0.00") })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ r(l, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
72
|
+
/* @__PURE__ */ e(o, { variant: "caption", children: x }),
|
|
73
|
+
/* @__PURE__ */ e(o, { ml: "auto", variant: "caption", children: y })
|
|
74
|
+
] })
|
|
75
|
+
] })
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] });
|
|
79
|
+
return /* @__PURE__ */ e(
|
|
80
|
+
v,
|
|
81
|
+
{
|
|
82
|
+
sx: { backgroundColor: "background.paper", color: t.is_closed ? "grey.700" : "" },
|
|
83
|
+
...c,
|
|
84
|
+
children: n ? /* @__PURE__ */ e(S, { alignItems: "flex-start", onClick: n, sx: { px: 24 }, children: a }) : a
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}, Z = b(z);
|
|
88
|
+
export {
|
|
89
|
+
Z as A
|
|
90
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeAutoObservable as l, runInAction as a } from "mobx";
|
|
2
|
-
import { i as A } from "./User-
|
|
3
|
-
import { F as g, A as i } from "./Fetch-
|
|
4
|
-
import { d as m } from "./Accounts-
|
|
5
|
-
import { A as c, j as u } from "./ConnectDrawer-
|
|
2
|
+
import { i as A } from "./User-BklmOUSd.mjs";
|
|
3
|
+
import { F as g, A as i } from "./Fetch-DecPFeGU.mjs";
|
|
4
|
+
import { d as m } from "./Accounts-CRUehOiy.mjs";
|
|
5
|
+
import { A as c, j as u } from "./ConnectDrawer-DVp54lUH.mjs";
|
|
6
6
|
class d {
|
|
7
7
|
fetchInstance;
|
|
8
8
|
constructor(t, e, s) {
|
|
@@ -119,6 +119,17 @@ class E {
|
|
|
119
119
|
get visibleSavingsAccounts() {
|
|
120
120
|
return this.savingsAccounts.filter((t) => !t.is_hidden);
|
|
121
121
|
}
|
|
122
|
+
get savingsAndCheckingAccountsBalance() {
|
|
123
|
+
return this.savingsAndCheckingAccounts.reduce(
|
|
124
|
+
(e, s) => e + (s?.balance || 0),
|
|
125
|
+
0
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
get savingsAndCheckingAccounts() {
|
|
129
|
+
return this.accounts.filter(
|
|
130
|
+
(e) => e.account_type === c.SAVINGS || e.account_type === c.CHECKING
|
|
131
|
+
);
|
|
132
|
+
}
|
|
122
133
|
setAccounts = (t) => {
|
|
123
134
|
this.accounts = t, this.accountsLoaded = !0;
|
|
124
135
|
};
|
|
@@ -166,10 +177,10 @@ class E {
|
|
|
166
177
|
try {
|
|
167
178
|
const e = await this.api.mergeAccounts(t), s = e[Object.keys(e)[0]];
|
|
168
179
|
a(() => {
|
|
169
|
-
const n = this.accounts.findIndex((
|
|
180
|
+
const n = this.accounts.findIndex((r) => r.guid === t[1]);
|
|
170
181
|
this.accounts.splice(n, 1);
|
|
171
|
-
const
|
|
172
|
-
this.accounts.splice(
|
|
182
|
+
const o = this.accounts.findIndex((r) => r.guid === t[0]);
|
|
183
|
+
this.accounts.splice(o, 1, s);
|
|
173
184
|
});
|
|
174
185
|
} catch (e) {
|
|
175
186
|
console.error(`Error occurred while merging accounts: ${e}`);
|
|
@@ -212,7 +223,7 @@ class E {
|
|
|
212
223
|
};
|
|
213
224
|
updateAccountFiltering = async (t, e) => {
|
|
214
225
|
for (const s of t) {
|
|
215
|
-
const n = this.accounts.find((
|
|
226
|
+
const n = this.accounts.find((o) => o.guid === s);
|
|
216
227
|
n && (n.is_excluded_from_accounts = e, await this.updateAccount(n));
|
|
217
228
|
}
|
|
218
229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as u, E as r, c as p, M as y } from "./ConnectDrawer-
|
|
1
|
+
import { A as e, C as u, E as r, c as p, M as y } from "./ConnectDrawer-DVp54lUH.mjs";
|
|
2
2
|
const l = (t) => t && (t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CHECKING_LINE_OF_CREDIT), I = (t) => t.is_manual || !t.guid, R = (t) => t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.CHECKING_LINE_OF_CREDIT, f = (t) => t.account_type === e.SAVINGS || t.account_type === e.CHECKING || t.account_type === e.LINE_OF_CREDIT || t.account_type === e.CREDIT_CARD || t.account_type === e.LOAN || t.account_type === e.MORTGAGE, m = (t) => t.account_type === e.LOAN || t.account_type === e.MORTGAGE, A = (t, n, s, _) => t.filter((i) => !(i.member_is_managed_by_user && _)).sort(d).map((i) => {
|
|
3
3
|
const c = n.find((a) => a.guid === i.institution_guid), o = s.find((a) => a.guid === i.member_guid);
|
|
4
4
|
return E(i, c, o);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeAutoObservable as c, runInAction as r } from "mobx";
|
|
2
|
-
import { B as l } from "./BeatApi-
|
|
2
|
+
import { B as l } from "./BeatApi-De2IaqH2.mjs";
|
|
3
3
|
function d(t, e, s, i = "asc") {
|
|
4
4
|
const a = i === "desc" ? -1 : 1;
|
|
5
5
|
return [...t, ...e].sort((_, n) => _[s] < n[s] ? -1 * a : _[s] > n[s] ? 1 * a : 0);
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { i as _ } from "./hooks-
|
|
2
|
-
import { b as d } from "./Category-
|
|
1
|
+
import { i as _ } from "./hooks-C41HAxM5.mjs";
|
|
2
|
+
import { b as d } from "./Category-Ccoew_sA.mjs";
|
|
3
3
|
import { b as f } from "./Localization-2MODESHW.mjs";
|
|
4
|
-
import { f as l } from "./NumberFormatting-
|
|
4
|
+
import { f as l } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
5
5
|
const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.guid === e), T = (n, e) => {
|
|
6
|
-
const t = n.find((
|
|
6
|
+
const t = n.find((o) => o.subCategories.find((a) => a.guid === e));
|
|
7
7
|
if (t)
|
|
8
|
-
return t.subCategories.find((
|
|
8
|
+
return t.subCategories.find((o) => o.guid === e);
|
|
9
9
|
}, k = (n, e) => {
|
|
10
10
|
const t = [];
|
|
11
|
-
for (const
|
|
12
|
-
const a = p(n,
|
|
11
|
+
for (const o of e) {
|
|
12
|
+
const a = p(n, o.category_guid);
|
|
13
13
|
if (!a) continue;
|
|
14
|
-
const
|
|
14
|
+
const r = a.parent_guid ?? a.guid, s = p(n, r);
|
|
15
15
|
if (!s) continue;
|
|
16
16
|
const u = {
|
|
17
|
-
amount:
|
|
17
|
+
amount: o.total,
|
|
18
18
|
category: a,
|
|
19
19
|
guid: a.guid,
|
|
20
20
|
subCategoryTotals: []
|
|
21
|
-
}, i = t.find((g) => g.guid ===
|
|
22
|
-
i ? (i.amount +=
|
|
23
|
-
amount:
|
|
21
|
+
}, i = t.find((g) => g.guid === r);
|
|
22
|
+
i ? (i.amount += o.total, i.subCategoryTotals.push(u)) : t.push({
|
|
23
|
+
amount: o.total,
|
|
24
24
|
category: s,
|
|
25
|
-
guid:
|
|
25
|
+
guid: r,
|
|
26
26
|
subCategoryTotals: [u]
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}, w = (n, e) => {
|
|
31
|
-
const t = n.find((
|
|
31
|
+
const t = n.find((o) => o.guid === e);
|
|
32
32
|
return t ? t.guid === d.INCOME || t.parent_guid === d.INCOME : !1;
|
|
33
33
|
}, y = (n, e) => !n && !e ? 0 : !n && e ? 101 : e / n * 100, b = (n, e) => {
|
|
34
34
|
const t = {
|
|
35
35
|
background: e.palette.success.main,
|
|
36
36
|
description: n <= 100 ? e.palette.text.secondary : e.palette.error.main,
|
|
37
37
|
text: e.palette.common.white,
|
|
38
|
-
mercury: e.palette.success.
|
|
38
|
+
mercury: e.palette.success.light
|
|
39
39
|
};
|
|
40
|
-
return n > 100 ? (t.background = e.palette.error.main, t.mercury = e.palette.error.
|
|
40
|
+
return n > 100 ? (t.background = e.palette.error.main, t.mercury = e.palette.error.light) : n > 80 && (t.background = e.palette.warning.main, t.text = e.palette.grey[900], t.mercury = e.palette.warning.light), t;
|
|
41
41
|
}, G = () => {
|
|
42
42
|
const { detailedBudgets: n } = _();
|
|
43
43
|
return n.map((t) => {
|
|
44
|
-
const
|
|
45
|
-
return t.amount -
|
|
46
|
-
}).reduce((t,
|
|
47
|
-
}, I = (n, e, t,
|
|
44
|
+
const o = t.transaction_total;
|
|
45
|
+
return t.amount - o;
|
|
46
|
+
}).reduce((t, o) => t + o, 0);
|
|
47
|
+
}, I = (n, e, t, o) => {
|
|
48
48
|
const a = [];
|
|
49
|
-
for (const
|
|
50
|
-
const s = B(e,
|
|
49
|
+
for (const r of n) {
|
|
50
|
+
const s = B(e, r.category_guid);
|
|
51
51
|
if (!s) continue;
|
|
52
|
-
const u = s.totalAmount, i = y(
|
|
52
|
+
const u = s.totalAmount, i = y(r.amount, u), g = r.amount - u;
|
|
53
53
|
a.push({
|
|
54
|
-
...
|
|
55
|
-
budgetColors: b(i,
|
|
54
|
+
...r,
|
|
55
|
+
budgetColors: b(i, o),
|
|
56
56
|
category: s,
|
|
57
57
|
description: f(
|
|
58
58
|
g < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
@@ -63,15 +63,15 @@ const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.g
|
|
|
63
63
|
transaction_total: u
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
for (const
|
|
67
|
-
const s = T(e,
|
|
66
|
+
for (const r of n) {
|
|
67
|
+
const s = T(e, r.category_guid);
|
|
68
68
|
if (!s) continue;
|
|
69
69
|
const u = s.currentAmount, i = a.find((C) => C.category_guid === s.parent_guid);
|
|
70
70
|
if (!i) continue;
|
|
71
|
-
const g =
|
|
71
|
+
const g = r.amount - u, c = y(r.amount, u);
|
|
72
72
|
i && i.subBudgets.push({
|
|
73
|
-
...
|
|
74
|
-
budgetColors: b(c,
|
|
73
|
+
...r,
|
|
74
|
+
budgetColors: b(c, o),
|
|
75
75
|
category: s,
|
|
76
76
|
description: f(
|
|
77
77
|
g < 0 ? t.budget_remaining_over : t.budget_remaining_left,
|
|
@@ -84,9 +84,9 @@ const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.g
|
|
|
84
84
|
}
|
|
85
85
|
return a;
|
|
86
86
|
}, m = (n, e) => n.find((t) => t.guid === e), S = (n, e, t) => {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
return m(
|
|
87
|
+
const o = m(n, t);
|
|
88
|
+
if (o)
|
|
89
|
+
return m(o.subBudgets, e);
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
92
|
S as a,
|
|
@@ -2,47 +2,40 @@ import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
|
2
2
|
import c from "@mui/material/IconButton";
|
|
3
3
|
import m from "@mui/material/Stack";
|
|
4
4
|
import l from "@mui/material/Tooltip";
|
|
5
|
-
import {
|
|
5
|
+
import { Icon as p, Text as n } from "@mxenabled/mxui";
|
|
6
6
|
import { makeAutoObservable as i } from "mobx";
|
|
7
7
|
import { addDays as d } from "date-fns/addDays";
|
|
8
|
-
import { differenceInDays as
|
|
9
|
-
import { endOfMonth as
|
|
10
|
-
import { isBefore as
|
|
8
|
+
import { differenceInDays as h } from "date-fns/differenceInDays";
|
|
9
|
+
import { endOfMonth as f } from "date-fns/endOfMonth";
|
|
10
|
+
import { isBefore as x } from "date-fns/isBefore";
|
|
11
11
|
import { startOfToday as r } from "date-fns/startOfToday";
|
|
12
|
-
const
|
|
12
|
+
const U = ({
|
|
13
13
|
body: o,
|
|
14
14
|
iconName: e = "info",
|
|
15
|
-
title:
|
|
15
|
+
title: s
|
|
16
16
|
}) => /* @__PURE__ */ t(
|
|
17
17
|
l,
|
|
18
18
|
{
|
|
19
19
|
enterTouchDelay: 500,
|
|
20
20
|
title: /* @__PURE__ */ a(m, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
-
/* @__PURE__ */ t(
|
|
21
|
+
/* @__PURE__ */ t(n, { bold: !0, variant: "body1", children: s }),
|
|
22
|
+
/* @__PURE__ */ t(n, { sx: { whiteSpace: "unset" }, variant: "body2", children: o })
|
|
23
23
|
] }),
|
|
24
24
|
children: /* @__PURE__ */ t(
|
|
25
25
|
c,
|
|
26
26
|
{
|
|
27
|
-
"aria-label":
|
|
27
|
+
"aria-label": s,
|
|
28
28
|
sx: {
|
|
29
29
|
minHeight: 0,
|
|
30
30
|
minWidth: 0,
|
|
31
31
|
p: 0
|
|
32
32
|
},
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
34
|
-
p,
|
|
35
|
-
{
|
|
36
|
-
name: e,
|
|
37
|
-
sx: { color: "primary.main", fontSize: 16 },
|
|
38
|
-
weight: h.Dark
|
|
39
|
-
}
|
|
40
|
-
)
|
|
33
|
+
children: /* @__PURE__ */ t(p, { name: e, sx: { color: "primary.main", fontSize: 16 } })
|
|
41
34
|
}
|
|
42
35
|
)
|
|
43
36
|
}
|
|
44
|
-
)
|
|
45
|
-
class
|
|
37
|
+
);
|
|
38
|
+
class u {
|
|
46
39
|
// Cashflow is hard-coded to display 30 days starting from today
|
|
47
40
|
dateRange = { start: r(), end: d(r(), 30) };
|
|
48
41
|
isDirty = !1;
|
|
@@ -54,13 +47,13 @@ class I {
|
|
|
54
47
|
}
|
|
55
48
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
56
49
|
get daysUntilNextIncome() {
|
|
57
|
-
return this.nextIncome ? Math.abs(
|
|
50
|
+
return this.nextIncome ? Math.abs(h(r(), this.nextIncome.expectedDate)) : 0;
|
|
58
51
|
}
|
|
59
52
|
// Returns the expenses (Activities) until the next income activity or the end of the month
|
|
60
53
|
// if there is no income activity
|
|
61
54
|
get expensesTilNextIncome() {
|
|
62
55
|
return this.upcomingExpenses.filter(
|
|
63
|
-
(e) =>
|
|
56
|
+
(e) => x(e.expectedDate, this.nextIncome?.expectedDate || f(/* @__PURE__ */ new Date()))
|
|
64
57
|
);
|
|
65
58
|
}
|
|
66
59
|
setNextIncome = (e) => {
|
|
@@ -71,11 +64,11 @@ class I {
|
|
|
71
64
|
};
|
|
72
65
|
setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
|
|
73
66
|
}
|
|
74
|
-
class
|
|
67
|
+
class A {
|
|
75
68
|
globalStore;
|
|
76
69
|
uiStore;
|
|
77
70
|
constructor(e) {
|
|
78
|
-
this.globalStore = e, this.uiStore = new
|
|
71
|
+
this.globalStore = e, this.uiStore = new u(), i(this);
|
|
79
72
|
}
|
|
80
73
|
completeOnboarding = async () => {
|
|
81
74
|
const e = {
|
|
@@ -86,6 +79,6 @@ class _ {
|
|
|
86
79
|
};
|
|
87
80
|
}
|
|
88
81
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
A as C,
|
|
83
|
+
U as I
|
|
91
84
|
};
|