@mx-cartographer/experiences 8.0.0-alpha.bb2 → 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 -199
- 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/SkeletonLoader.d.ts +7 -0
- 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 +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- 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/accounts/components/AccountsWidgetContent.d.ts +0 -3
- 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,182 @@
|
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import S from "@mui/material/ListItem";
|
|
4
|
+
import R from "@mui/material/ListItemButton";
|
|
5
|
+
import f from "@mui/material/ListItemIcon";
|
|
6
|
+
import A from "@mui/material/ListItemText";
|
|
7
|
+
import h from "@mui/material/Stack";
|
|
8
|
+
import { Text as y } from "@mxenabled/mxui";
|
|
9
|
+
import { makeAutoObservable as N } from "mobx";
|
|
10
|
+
import { addSeconds as v } from "date-fns/addSeconds";
|
|
11
|
+
import { differenceInCalendarMonths as w } from "date-fns/differenceInCalendarMonths";
|
|
12
|
+
import { endOfMonth as D } from "date-fns/endOfMonth";
|
|
13
|
+
import { subMonths as I } from "date-fns/subMonths";
|
|
14
|
+
import { b as E, a as _, c as O } from "./Category-Ccoew_sA.mjs";
|
|
15
|
+
import { f as L, a as T } from "./Dialog-CDV0kKxj.mjs";
|
|
16
|
+
const rt = ({
|
|
17
|
+
onClick: e,
|
|
18
|
+
leftIcon: t,
|
|
19
|
+
rightIcon: o,
|
|
20
|
+
title: a,
|
|
21
|
+
subtitle: r,
|
|
22
|
+
rightContent: n,
|
|
23
|
+
titleBold: s = !0,
|
|
24
|
+
rightContentBold: m = !0
|
|
25
|
+
}) => {
|
|
26
|
+
const c = /* @__PURE__ */ d(x.Fragment, { children: [
|
|
27
|
+
t && /* @__PURE__ */ l(f, { sx: { ml: 0 }, children: t }),
|
|
28
|
+
/* @__PURE__ */ l(A, { children: /* @__PURE__ */ d(
|
|
29
|
+
h,
|
|
30
|
+
{
|
|
31
|
+
sx: {
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
flexDirection: "row",
|
|
34
|
+
marginLeft: 12
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ d(h, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
38
|
+
/* @__PURE__ */ l(y, { bold: s, variant: "body1", children: a }),
|
|
39
|
+
r && /* @__PURE__ */ l(y, { variant: "caption", children: r })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ d(h, { sx: { flexDirection: "row", alignItems: "center", gap: 1 }, children: [
|
|
42
|
+
n && /* @__PURE__ */ l(y, { bold: m, display: "flex", variant: "body1", children: n }),
|
|
43
|
+
o && /* @__PURE__ */ l(f, { children: o })
|
|
44
|
+
] })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
49
|
+
return /* @__PURE__ */ l(S, { sx: { bgcolor: "background.paper" }, children: e ? /* @__PURE__ */ l(
|
|
50
|
+
R,
|
|
51
|
+
{
|
|
52
|
+
onClick: e,
|
|
53
|
+
sx: {
|
|
54
|
+
py: 14
|
|
55
|
+
},
|
|
56
|
+
children: c
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ l(
|
|
59
|
+
h,
|
|
60
|
+
{
|
|
61
|
+
sx: {
|
|
62
|
+
py: 14,
|
|
63
|
+
px: 24,
|
|
64
|
+
width: "100%",
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
alignItems: "center"
|
|
67
|
+
},
|
|
68
|
+
children: c
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
}, W = (e) => _[e] ?? _.default, F = (e) => O[e];
|
|
72
|
+
function G(e, t) {
|
|
73
|
+
const o = [], a = new Date(e);
|
|
74
|
+
for (; a <= t; ) {
|
|
75
|
+
const r = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0");
|
|
76
|
+
o.push(+`${r}${n}`), a.setMonth(a.getMonth() + 1);
|
|
77
|
+
}
|
|
78
|
+
return o;
|
|
79
|
+
}
|
|
80
|
+
const $ = (e) => e.reduce((o, a) => {
|
|
81
|
+
const r = {
|
|
82
|
+
top_level_category_guid: a.top_level_category_guid,
|
|
83
|
+
category_guid: a.category_guid,
|
|
84
|
+
amount: a.total,
|
|
85
|
+
year_month: a.year_month
|
|
86
|
+
}, { top_level_category_guid: n, category_guid: s } = r;
|
|
87
|
+
return o[s] || (o[s] = []), o[s].push(r), n !== s && (o[n] || (o[n] = []), o[n].push(r)), o;
|
|
88
|
+
}, {}), nt = (e, t, o) => {
|
|
89
|
+
const a = $(e), r = G(t, o);
|
|
90
|
+
return Object.entries(a).map(([s, m]) => {
|
|
91
|
+
const c = m[0].top_level_category_guid, b = r.map((i) => {
|
|
92
|
+
const g = m.filter((p) => p.year_month === i).reduce((p, C) => p + Math.abs(C.amount), 0), u = Number(String(i).slice(0, 4)), M = Number(String(i).slice(4));
|
|
93
|
+
return { x: new Date(u, M - 1), y: g };
|
|
94
|
+
}).sort((i, g) => i.x.getTime() - g.x.getTime());
|
|
95
|
+
return {
|
|
96
|
+
top_level_category_guid: c,
|
|
97
|
+
category_guid: s,
|
|
98
|
+
category_name: F(s),
|
|
99
|
+
category_color: W(c),
|
|
100
|
+
dataset: b
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}, st = (e, t) => {
|
|
104
|
+
const o = typeof e == "string" ? parseFloat(e.replace(/[^0-9.-]+/g, "")) : e, a = typeof t == "string" ? parseFloat(t.replace(/[^0-9.-]+/g, "")) : t;
|
|
105
|
+
return (o || 0) - (a || 0);
|
|
106
|
+
}, j = (e, t) => {
|
|
107
|
+
const o = e.subCategories.filter((n) => n.currentAmount !== 0), a = e.totalMonthlyAmounts.slice(-t), r = (n) => n.substring(0, 3) + " " + n.slice(-4);
|
|
108
|
+
return a.map((n) => {
|
|
109
|
+
const s = r(n.label), m = o.map((i) => {
|
|
110
|
+
const g = i.monthlyAmounts.slice(-t).find((u) => r(u.label) === s);
|
|
111
|
+
return {
|
|
112
|
+
label: i.name,
|
|
113
|
+
amount: Math.abs(g?.amount || 0),
|
|
114
|
+
header: s
|
|
115
|
+
};
|
|
116
|
+
}), c = e.monthlyAmounts.slice(-t).find((i) => r(i.label) === s);
|
|
117
|
+
return [{
|
|
118
|
+
label: e.name,
|
|
119
|
+
amount: Math.abs(c?.amount || 0),
|
|
120
|
+
header: s
|
|
121
|
+
}, ...m].sort((i, g) => g.amount - i.amount);
|
|
122
|
+
});
|
|
123
|
+
}, k = (e, t) => {
|
|
124
|
+
const o = e ? e.totalMonthlyAmounts.slice(-t).map((r) => ({
|
|
125
|
+
x: r.label.substring(0, 3),
|
|
126
|
+
y: Math.abs(r.amount)
|
|
127
|
+
})) : [], a = e ? j(e, t) : [];
|
|
128
|
+
return { monthlyAmounts: o, tooltipLabels: a };
|
|
129
|
+
}, H = (e) => e.slice().filter(
|
|
130
|
+
(t) => t.totalAmount !== 0 && t.isTransfer === !1 && t.guid !== E.INVESTMENTS
|
|
131
|
+
).sort((t, o) => Math.abs(o.totalAmount) - Math.abs(t.totalAmount));
|
|
132
|
+
class it {
|
|
133
|
+
globalStore;
|
|
134
|
+
selectedCategoryData = null;
|
|
135
|
+
selectedDateRange;
|
|
136
|
+
visibleListLength = 5;
|
|
137
|
+
constructor(t) {
|
|
138
|
+
this.globalStore = t, this.selectedDateRange = {
|
|
139
|
+
start: v(D(I(/* @__PURE__ */ new Date(), 6)), 1),
|
|
140
|
+
end: D(/* @__PURE__ */ new Date())
|
|
141
|
+
}, N(this);
|
|
142
|
+
}
|
|
143
|
+
setSelectedCategoryData = (t) => {
|
|
144
|
+
this.selectedCategoryData = t;
|
|
145
|
+
};
|
|
146
|
+
setSelectedDateRange = (t) => {
|
|
147
|
+
this.selectedDateRange = t;
|
|
148
|
+
};
|
|
149
|
+
setVisibleListLength = (t) => {
|
|
150
|
+
this.visibleListLength = t;
|
|
151
|
+
};
|
|
152
|
+
get sortedDetailedCategoriesWithTransactions() {
|
|
153
|
+
return H(
|
|
154
|
+
this.globalStore.categoryStore.detailedCategoriesWithTransactions
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
get selectedDateRangeMonthCount() {
|
|
158
|
+
return w(this.selectedDateRange.end, this.selectedDateRange.start) + 1;
|
|
159
|
+
}
|
|
160
|
+
get selectedDateRangeMonthRange() {
|
|
161
|
+
const t = L(this.selectedDateRange.start, T.MONTH_LONG), o = L(this.selectedDateRange.end, T.MONTH_LONG);
|
|
162
|
+
return `${t} - ${o}`;
|
|
163
|
+
}
|
|
164
|
+
get visibleCategories() {
|
|
165
|
+
return this.sortedDetailedCategoriesWithTransactions.slice(0, this.visibleListLength);
|
|
166
|
+
}
|
|
167
|
+
get collapsedCategories() {
|
|
168
|
+
return this.sortedDetailedCategoriesWithTransactions.slice(this.visibleListLength);
|
|
169
|
+
}
|
|
170
|
+
get categoryDetailsChartData() {
|
|
171
|
+
return k(
|
|
172
|
+
this.selectedCategoryData,
|
|
173
|
+
this.selectedDateRangeMonthCount
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
rt as L,
|
|
179
|
+
it as T,
|
|
180
|
+
st as a,
|
|
181
|
+
nt as g
|
|
182
|
+
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import A from "react";
|
|
3
|
-
import { css as
|
|
3
|
+
import { css as R } from "@mxenabled/cssinjs";
|
|
4
4
|
import { addDays as b } from "date-fns/addDays";
|
|
5
|
-
import { addMonths as
|
|
6
|
-
import { eachDayOfInterval as
|
|
7
|
-
import { eachWeekOfInterval as
|
|
8
|
-
import { endOfMonth as
|
|
9
|
-
import { format as
|
|
10
|
-
import { isBefore as
|
|
11
|
-
import { isSameMonth as
|
|
12
|
-
import { startOfMonth as
|
|
5
|
+
import { addMonths as w } from "date-fns/addMonths";
|
|
6
|
+
import { eachDayOfInterval as H } from "date-fns/eachDayOfInterval";
|
|
7
|
+
import { eachWeekOfInterval as B } from "date-fns/eachWeekOfInterval";
|
|
8
|
+
import { endOfMonth as P } from "date-fns/endOfMonth";
|
|
9
|
+
import { format as k } from "date-fns/format";
|
|
10
|
+
import { isBefore as $ } from "date-fns/isBefore";
|
|
11
|
+
import { isSameMonth as U } from "date-fns/isSameMonth";
|
|
12
|
+
import { startOfMonth as j } from "date-fns/startOfMonth";
|
|
13
13
|
import { startOfToday as f } from "date-fns/startOfToday";
|
|
14
|
-
import { subMonths as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { ChevronLeft as
|
|
19
|
-
import { f as
|
|
14
|
+
import { subMonths as W } from "date-fns/subMonths";
|
|
15
|
+
import S from "@mui/material/Button";
|
|
16
|
+
import V from "@mui/material/Paper";
|
|
17
|
+
import { H2 as F, Text as y } from "@mxenabled/mxui";
|
|
18
|
+
import { ChevronLeft as Y, ChevronRight as z } from "@mxenabled/mx-icons";
|
|
19
|
+
import { f as X, a as Z } from "./Dialog-CDV0kKxj.mjs";
|
|
20
20
|
import { isSameDay as T } from "date-fns/isSameDay";
|
|
21
|
-
import { isWithinInterval as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { g as
|
|
26
|
-
var
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ e(
|
|
21
|
+
import { isWithinInterval as q } from "date-fns/isWithinInterval";
|
|
22
|
+
import { useTheme as J } from "@mui/material/styles";
|
|
23
|
+
import u from "@mui/material/ListItem";
|
|
24
|
+
import Q from "@mui/material/ListItemButton";
|
|
25
|
+
import { g as nn } from "./hooks-C41HAxM5.mjs";
|
|
26
|
+
var an = /* @__PURE__ */ ((n) => (n[n.CREDIT = 1] = "CREDIT", n[n.DEBIT = 2] = "DEBIT", n))(an || {}), tn = /* @__PURE__ */ ((n) => (n[n.POSTED = 1] = "POSTED", n[n.PENDING = 2] = "PENDING", n))(tn || {});
|
|
27
|
+
const on = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
|
|
28
|
+
const i = en();
|
|
29
|
+
return /* @__PURE__ */ g("div", { className: `mx-cmn-calendar-header ${i}`, children: [
|
|
30
|
+
/* @__PURE__ */ e(F, { className: "mx-cmn-calendar-header-title", variant: "h3", children: X(a, Z.MONTH_YEAR) }),
|
|
31
|
+
/* @__PURE__ */ g("div", { className: "mx-cmn-calendar-header-button-container", children: [
|
|
32
|
+
/* @__PURE__ */ e(S, { "aria-label": n.prevAria, onClick: r, children: /* @__PURE__ */ e(Y, { size: 24 }) }),
|
|
33
|
+
/* @__PURE__ */ e(S, { "aria-label": n.nextAria, onClick: o, children: /* @__PURE__ */ e(z, { size: 24 }) })
|
|
34
34
|
] })
|
|
35
35
|
] });
|
|
36
|
-
},
|
|
36
|
+
}, en = () => R({
|
|
37
37
|
alignItems: "center",
|
|
38
38
|
display: "flex",
|
|
39
|
-
marginBottom:
|
|
40
|
-
marginRight: -
|
|
41
|
-
paddingLeft:
|
|
39
|
+
marginBottom: 16,
|
|
40
|
+
marginRight: -16,
|
|
41
|
+
paddingLeft: 8,
|
|
42
42
|
"& .mx-cmn-calendar-header-title": {
|
|
43
43
|
flexGrow: 1
|
|
44
44
|
},
|
|
@@ -46,44 +46,44 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
|
|
|
46
46
|
display: "flex",
|
|
47
47
|
gap: 4
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
50
|
-
const
|
|
49
|
+
}), rn = ({ beginDate: n, date: a, endDate: o, isInMonth: r, onClick: i }) => {
|
|
50
|
+
const C = J(), L = cn(C), c = n && o && q(a, { start: n, end: o }) && !T(a, n) && !T(a, o), N = n && o && T(n, a) && !T(n, o), l = o && n && T(o, a) && !T(n, o), s = n && T(n, a) || o && T(o, a), O = T(a, f());
|
|
51
51
|
return /* @__PURE__ */ e(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
className: `
|
|
55
55
|
mx-cmn-calendar-day
|
|
56
|
-
${
|
|
56
|
+
${L}
|
|
57
57
|
${r ? "" : "mx-cmn-out-of-month"}
|
|
58
|
-
${
|
|
58
|
+
${c ? "mx-cmn-date-interval" : ""}
|
|
59
59
|
`,
|
|
60
60
|
children: /* @__PURE__ */ e(
|
|
61
|
-
|
|
61
|
+
S,
|
|
62
62
|
{
|
|
63
63
|
className: `
|
|
64
64
|
mx-cmn-calendar-day-button
|
|
65
|
-
${
|
|
66
|
-
${
|
|
65
|
+
${N ? "mx-cmn-range-start" : ""}
|
|
66
|
+
${l ? "mx-cmn-range-end" : ""}
|
|
67
67
|
`,
|
|
68
|
-
color:
|
|
69
|
-
onClick: () =>
|
|
70
|
-
variant:
|
|
68
|
+
color: s ? "primary" : "secondary",
|
|
69
|
+
onClick: () => i(a),
|
|
70
|
+
variant: s ? "contained" : "text",
|
|
71
71
|
children: /* @__PURE__ */ e(
|
|
72
|
-
|
|
72
|
+
y,
|
|
73
73
|
{
|
|
74
74
|
className: `
|
|
75
75
|
mx-cmn-calendar-day-text
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
variant: "
|
|
79
|
-
children:
|
|
76
|
+
${s ? "mx-cmn-day-selected" : ""}
|
|
77
|
+
${O ? "mx-cmn-today" : ""}`,
|
|
78
|
+
variant: "body2",
|
|
79
|
+
children: k(a, "d")
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
},
|
|
86
|
+
}, cn = (n) => R({
|
|
87
87
|
height: I,
|
|
88
88
|
width: I,
|
|
89
89
|
display: "flex",
|
|
@@ -128,72 +128,72 @@ const rn = ({ copy: n, date: a, onNextClick: o, onPreviousClick: r }) => {
|
|
|
128
128
|
paddingBottom: 5
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
132
|
-
var
|
|
133
|
-
const
|
|
131
|
+
}), sn = 340, I = 44;
|
|
132
|
+
var Tn = /* @__PURE__ */ ((n) => (n.None = "None", n.Single = "Single", n.Range = "Range", n))(Tn || {});
|
|
133
|
+
const bn = ({
|
|
134
134
|
copy: n,
|
|
135
135
|
beginDate: a = void 0,
|
|
136
136
|
endDate: o = void 0,
|
|
137
137
|
onDateSelected: r,
|
|
138
|
-
onRangeSelected:
|
|
139
|
-
selectionType:
|
|
138
|
+
onRangeSelected: i,
|
|
139
|
+
selectionType: C = "Single"
|
|
140
140
|
/* Single */
|
|
141
141
|
}) => {
|
|
142
|
-
const
|
|
142
|
+
const L = ln(), [c, N] = A.useState(f), [l, s] = A.useState(a), [O, m] = A.useState(o);
|
|
143
143
|
A.useEffect(() => {
|
|
144
|
-
|
|
144
|
+
s(a), m(o), a && N(a);
|
|
145
145
|
}, [a, o]);
|
|
146
|
-
const
|
|
147
|
-
const t =
|
|
146
|
+
const p = A.useMemo(() => {
|
|
147
|
+
const t = B({ start: j(c), end: P(c) }), _ = [];
|
|
148
148
|
for (let d = 0; d < t.length; d++) {
|
|
149
|
-
const
|
|
150
|
-
for (let
|
|
151
|
-
x.push(
|
|
152
|
-
|
|
149
|
+
const E = t[d], D = H({ start: E, end: b(E, 6) }), x = [];
|
|
150
|
+
for (let h = 0; h < D.length; h++)
|
|
151
|
+
x.push(D[h]);
|
|
152
|
+
_.push(x);
|
|
153
153
|
}
|
|
154
|
-
return
|
|
155
|
-
}, [
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
158
|
-
|
|
154
|
+
return _;
|
|
155
|
+
}, [c]), v = (t) => {
|
|
156
|
+
if (C !== "None") {
|
|
157
|
+
if (C === "Single") {
|
|
158
|
+
s(t), r?.(t);
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
!
|
|
161
|
+
!l || O ? (s(t), m(void 0)) : $(t, l) ? (m(l), s(t), i?.(t, l)) : (m(t), i?.(l, t));
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, G = () => {
|
|
164
164
|
const t = f();
|
|
165
|
-
N(t),
|
|
166
|
-
},
|
|
167
|
-
N(
|
|
168
|
-
},
|
|
169
|
-
N(
|
|
165
|
+
N(t), C !== "None" && (s(t), C === "Single" ? r?.(t) : (m(t), i?.(t, t)));
|
|
166
|
+
}, K = () => {
|
|
167
|
+
N(w(c, 1));
|
|
168
|
+
}, M = () => {
|
|
169
|
+
N(W(c, 1));
|
|
170
170
|
};
|
|
171
|
-
return /* @__PURE__ */ e("div", { className: `mx-cmn-calendar ${
|
|
171
|
+
return /* @__PURE__ */ e("div", { className: `mx-cmn-calendar ${L}`, children: /* @__PURE__ */ g(V, { sx: { boxShadow: "none" }, children: [
|
|
172
172
|
/* @__PURE__ */ e(
|
|
173
|
-
|
|
173
|
+
on,
|
|
174
174
|
{
|
|
175
175
|
copy: n,
|
|
176
|
-
date:
|
|
177
|
-
onNextClick:
|
|
178
|
-
onPreviousClick:
|
|
176
|
+
date: c,
|
|
177
|
+
onNextClick: K,
|
|
178
|
+
onPreviousClick: M
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
|
-
/* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-row", children:
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
/* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-row", children: p[0].map((t, _) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ e(y, { bold: !0, variant: "body2", children: k(t, "EEEEE") }) }, _)) }),
|
|
182
|
+
p.map((t, _) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-week", children: t.map((d, E) => /* @__PURE__ */ e(
|
|
183
|
+
rn,
|
|
184
184
|
{
|
|
185
|
-
beginDate:
|
|
185
|
+
beginDate: l,
|
|
186
186
|
date: d,
|
|
187
|
-
endDate:
|
|
188
|
-
isInMonth:
|
|
189
|
-
onClick:
|
|
187
|
+
endDate: O,
|
|
188
|
+
isInMonth: U(d, c),
|
|
189
|
+
onClick: v
|
|
190
190
|
},
|
|
191
|
-
|
|
192
|
-
)) }, `w-${
|
|
193
|
-
/* @__PURE__ */ e("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ e(
|
|
191
|
+
E
|
|
192
|
+
)) }, `w-${_}`)),
|
|
193
|
+
/* @__PURE__ */ e("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ e(S, { onClick: G, size: "small", variant: "text", children: n.today }) })
|
|
194
194
|
] }) });
|
|
195
|
-
},
|
|
196
|
-
width:
|
|
195
|
+
}, ln = () => R({
|
|
196
|
+
width: sn,
|
|
197
197
|
"& .MuiPaper-root": {
|
|
198
198
|
paddingLeft: 24,
|
|
199
199
|
paddingRight: 24,
|
|
@@ -224,7 +224,7 @@ const Nn = ({
|
|
|
224
224
|
},
|
|
225
225
|
"& .mx-cmn-calendar-today-container": {
|
|
226
226
|
display: "block",
|
|
227
|
-
marginTop:
|
|
227
|
+
marginTop: 16,
|
|
228
228
|
textAlign: "center",
|
|
229
229
|
width: "100%",
|
|
230
230
|
"& > .MuiButton-root": {
|
|
@@ -233,23 +233,23 @@ const Nn = ({
|
|
|
233
233
|
marginRight: "auto"
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
}),
|
|
236
|
+
}), wn = ({
|
|
237
237
|
children: n,
|
|
238
238
|
clickEventName: a,
|
|
239
239
|
onClick: o,
|
|
240
240
|
sx: r = {}
|
|
241
241
|
}) => {
|
|
242
|
-
const { onEvent:
|
|
243
|
-
return o ? /* @__PURE__ */ e(
|
|
244
|
-
|
|
242
|
+
const { onEvent: i } = nn();
|
|
243
|
+
return o ? /* @__PURE__ */ e(u, { sx: { bgcolor: "background.paper", ...r }, children: /* @__PURE__ */ e(
|
|
244
|
+
Q,
|
|
245
245
|
{
|
|
246
246
|
onClick: () => {
|
|
247
|
-
a &&
|
|
247
|
+
a && i(a), o();
|
|
248
248
|
},
|
|
249
249
|
children: n
|
|
250
250
|
}
|
|
251
251
|
) }) : /* @__PURE__ */ e(
|
|
252
|
-
|
|
252
|
+
u,
|
|
253
253
|
{
|
|
254
254
|
disableGutters: !1,
|
|
255
255
|
disablePadding: !1,
|
|
@@ -257,7 +257,7 @@ const Nn = ({
|
|
|
257
257
|
children: n
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
|
-
},
|
|
260
|
+
}, Hn = {
|
|
261
261
|
ON_TRANSACTION_CATEGORY_CLICK: "onTransactionCategoryClick",
|
|
262
262
|
ON_TRANSACTION_CATEGORY_CHANGED: "onTransactionCategoryChanged",
|
|
263
263
|
ON_TRANSACTION_MANUAL_ADD_CLICK: "onTransactionManualAddClick",
|
|
@@ -301,13 +301,13 @@ const Nn = ({
|
|
|
301
301
|
ON_TRANSACTION_UNHIDE_CANCEL_CLICK: "onTransactionUnHideCancelClick",
|
|
302
302
|
ON_TRANSACTION_UNSPLIT: "onTransactionUnsplit",
|
|
303
303
|
ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
|
|
304
|
-
},
|
|
304
|
+
}, Bn = (n, a) => !!n.find((o) => o.feature_name === a)?.is_enabled;
|
|
305
305
|
export {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
306
|
+
bn as C,
|
|
307
|
+
wn as L,
|
|
308
|
+
Hn as O,
|
|
309
|
+
an as T,
|
|
310
|
+
tn as a,
|
|
311
|
+
Tn as b,
|
|
312
|
+
Bn as i
|
|
313
313
|
};
|