@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,193 @@
|
|
|
1
|
+
import { b as T } from "./CategoryUtil-DfVKKkRf.mjs";
|
|
2
|
+
import { b as p } from "./Category-Ccoew_sA.mjs";
|
|
3
|
+
import { jsxs as y, Fragment as v, jsx as c } from "react/jsx-runtime";
|
|
4
|
+
import _ from "react";
|
|
5
|
+
import { observer as w } from "mobx-react-lite";
|
|
6
|
+
import N from "@mui/material/Button";
|
|
7
|
+
import f from "@mui/material/Stack";
|
|
8
|
+
import { useTheme as k } from "@mui/material/styles";
|
|
9
|
+
import { CategoryIcon as M, CategoryIconVariants as A, Text as h } from "@mxenabled/mxui";
|
|
10
|
+
import { D as G } from "./Donut-Dmy3JTWd.mjs";
|
|
11
|
+
import { u as O } from "./TransactionDetails-Bn0qY5Hw.mjs";
|
|
12
|
+
import { u as $ } from "./hooks-C41HAxM5.mjs";
|
|
13
|
+
import { u as j } from "./useScreenSize-B5afALev.mjs";
|
|
14
|
+
import { f as x } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
15
|
+
import R from "@mui/material/Box";
|
|
16
|
+
const D = 5, V = (i, l, g, d) => d.reduce((o, n) => {
|
|
17
|
+
const r = i.find((s) => s.guid === n.category_guid);
|
|
18
|
+
if (!r) return o;
|
|
19
|
+
const t = r.parent_guid ?? r.guid, a = i.find((s) => s.guid === t);
|
|
20
|
+
if (!a) return o;
|
|
21
|
+
const m = {
|
|
22
|
+
guid: r.guid,
|
|
23
|
+
name: r.guid === t ? `${l.parent_category_totals_label_general} ${r.name}` : r.name,
|
|
24
|
+
color: T(a.guid, g),
|
|
25
|
+
amount: n.total
|
|
26
|
+
}, e = o.find((s) => s.guid === t);
|
|
27
|
+
return e ? (e.amount += n.total, e.categoryTotals?.push(m)) : o.push({
|
|
28
|
+
guid: t,
|
|
29
|
+
name: a.name,
|
|
30
|
+
color: T(a.guid, g),
|
|
31
|
+
categoryTotals: [m],
|
|
32
|
+
amount: n.total
|
|
33
|
+
}), o;
|
|
34
|
+
}, []), ot = (i, l, g, d) => {
|
|
35
|
+
const o = V(i, l, g, d), n = o.filter(
|
|
36
|
+
(e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER
|
|
37
|
+
).sort((e, s) => s.amount - e.amount), r = n.reduce(
|
|
38
|
+
(e, s) => e + s.amount,
|
|
39
|
+
0
|
|
40
|
+
), t = n.length > D ? D : n.length, a = n.slice(0, t), m = a.map((e) => ({
|
|
41
|
+
id: e.guid,
|
|
42
|
+
color: T(e.guid, g),
|
|
43
|
+
label: e.name,
|
|
44
|
+
value: e.amount / r * 100
|
|
45
|
+
}));
|
|
46
|
+
if (n.length > 5) {
|
|
47
|
+
const e = n.slice(D, o.length), s = e.reduce(
|
|
48
|
+
(C, u) => C + u.amount,
|
|
49
|
+
0
|
|
50
|
+
);
|
|
51
|
+
a.push({
|
|
52
|
+
guid: "other",
|
|
53
|
+
color: g.palette.categories.others || "",
|
|
54
|
+
name: l.saving_goal_other,
|
|
55
|
+
categoryTotals: e,
|
|
56
|
+
amount: s
|
|
57
|
+
}), m.push({
|
|
58
|
+
id: "other",
|
|
59
|
+
color: g.palette.categories.others || "",
|
|
60
|
+
label: l.saving_goal_other,
|
|
61
|
+
value: s / r * 100
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
categoryData: a,
|
|
66
|
+
donutData: m,
|
|
67
|
+
totalAmount: r
|
|
68
|
+
};
|
|
69
|
+
}, nt = (i, l, g) => {
|
|
70
|
+
const d = i.filter(
|
|
71
|
+
(t) => t.guid === p.INCOME || t.parent_guid === p.INCOME
|
|
72
|
+
), o = l.filter((t) => d.some((a) => a.guid === t.category_guid)).sort((t, a) => t.total - a.total).map((t, a) => ({
|
|
73
|
+
guid: t.category_guid,
|
|
74
|
+
name: i.find((m) => m.guid === t.category_guid)?.name,
|
|
75
|
+
color: g[a],
|
|
76
|
+
categoryTotals: [],
|
|
77
|
+
amount: Math.abs(t.total)
|
|
78
|
+
})), n = o.reduce(
|
|
79
|
+
(t, a) => t + a.amount,
|
|
80
|
+
0
|
|
81
|
+
), r = o.map((t) => ({
|
|
82
|
+
id: t.guid,
|
|
83
|
+
color: t.color,
|
|
84
|
+
label: t.name,
|
|
85
|
+
value: t.amount / n * 100
|
|
86
|
+
}));
|
|
87
|
+
return {
|
|
88
|
+
categoryData: o,
|
|
89
|
+
donutData: r,
|
|
90
|
+
totalAmount: n
|
|
91
|
+
};
|
|
92
|
+
}, B = ({
|
|
93
|
+
data: i,
|
|
94
|
+
isIncome: l = !1,
|
|
95
|
+
onSelected: g,
|
|
96
|
+
onViewTransactions: d,
|
|
97
|
+
selectedId: o,
|
|
98
|
+
size: n = 150,
|
|
99
|
+
totalLabel: r,
|
|
100
|
+
variant: t = "mini"
|
|
101
|
+
}) => {
|
|
102
|
+
const { spending: a } = $(), m = k(), { isTablet: e } = j(), { announce: s, ariaLive: C } = O(), u = _.useMemo(
|
|
103
|
+
() => o ? i.categoryData.find((b) => b.guid === o) : void 0,
|
|
104
|
+
[o]
|
|
105
|
+
);
|
|
106
|
+
_.useEffect(() => {
|
|
107
|
+
if (u) {
|
|
108
|
+
const b = x(u.amount, "0,0");
|
|
109
|
+
s(`${u.name}: ${b}`);
|
|
110
|
+
}
|
|
111
|
+
}, [u, s]);
|
|
112
|
+
const S = i.donutData.length > 0 ? i.donutData : [{ id: "0", color: m.palette.divider, value: 100 }], E = () => {
|
|
113
|
+
d?.(o);
|
|
114
|
+
}, I = e ? 32 : 48;
|
|
115
|
+
return /* @__PURE__ */ y(v, { children: [
|
|
116
|
+
C,
|
|
117
|
+
/* @__PURE__ */ c(G, { data: S, onClick: g, selectedId: o, size: n, children: /* @__PURE__ */ c(f, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ y(f, { alignItems: "center", justifyContent: "center", minHeight: n, minWidth: n, children: [
|
|
118
|
+
u && /* @__PURE__ */ y(
|
|
119
|
+
f,
|
|
120
|
+
{
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
gap: t === "mini" ? 0 : 8,
|
|
123
|
+
mb: t === "mini" ? 0 : 8,
|
|
124
|
+
mt: t === "mini" ? 0 : -16,
|
|
125
|
+
sx: t === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ c(
|
|
128
|
+
M,
|
|
129
|
+
{
|
|
130
|
+
categoryGuid: l ? p.INCOME : u.guid,
|
|
131
|
+
size: t === "mini" ? 24 : I,
|
|
132
|
+
variant: A.Transparent
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ c(
|
|
136
|
+
h,
|
|
137
|
+
{
|
|
138
|
+
color: "secondary",
|
|
139
|
+
noWrap: !0,
|
|
140
|
+
variant: t === "mini" ? "tiny" : "body1",
|
|
141
|
+
children: u ? u.name : r
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
!u && t === "full" && /* @__PURE__ */ c(h, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: r }),
|
|
148
|
+
/* @__PURE__ */ c(h, { variant: t === "mini" ? "h2" : "h1", children: u ? x(u.amount, "0,0") : x(i.totalAmount, "0,0") }),
|
|
149
|
+
!u && t === "mini" && /* @__PURE__ */ c(h, { color: "secondary", noWrap: !0, variant: "tiny", children: r }),
|
|
150
|
+
t === "full" && /* @__PURE__ */ c(
|
|
151
|
+
N,
|
|
152
|
+
{
|
|
153
|
+
"aria-label": `View ${u?.name || ""} Transactions`,
|
|
154
|
+
disabled: i.categoryData.length === 0,
|
|
155
|
+
onClick: E,
|
|
156
|
+
sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
|
|
157
|
+
variant: "text",
|
|
158
|
+
children: a.view_transactions
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }) }) })
|
|
162
|
+
] });
|
|
163
|
+
}, et = w(B), at = ({ data: i, onSelected: l, selectedId: g }) => {
|
|
164
|
+
const d = (o, n) => {
|
|
165
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), l(n));
|
|
166
|
+
};
|
|
167
|
+
return /* @__PURE__ */ c(f, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: i.categoryData.map((o) => /* @__PURE__ */ y(
|
|
168
|
+
f,
|
|
169
|
+
{
|
|
170
|
+
alignItems: "center",
|
|
171
|
+
"aria-label": o.name,
|
|
172
|
+
"aria-pressed": o.guid === g,
|
|
173
|
+
direction: "row",
|
|
174
|
+
gap: 8,
|
|
175
|
+
onClick: () => l(o.guid),
|
|
176
|
+
onKeyDown: (n) => d(n, o.guid),
|
|
177
|
+
role: "button",
|
|
178
|
+
sx: { cursor: "pointer" },
|
|
179
|
+
tabIndex: 0,
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ c(R, { borderRadius: 4, height: 8, sx: { backgroundColor: o.color }, width: 8 }),
|
|
182
|
+
/* @__PURE__ */ c(h, { bold: o.guid === g, variant: "caption", children: o.name })
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
o.guid
|
|
186
|
+
)) });
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
et as S,
|
|
190
|
+
nt as a,
|
|
191
|
+
at as b,
|
|
192
|
+
ot as g
|
|
193
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import i from "@mui/material/Box";
|
|
3
3
|
import p from "@mui/material/Stack";
|
|
4
|
-
const s = ({ data:
|
|
4
|
+
const s = ({ data: a, height: r = 8 }) => {
|
|
5
5
|
const o = `${r / 4}px`;
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ c(
|
|
7
7
|
p,
|
|
8
8
|
{
|
|
9
9
|
bgcolor: "divider",
|
|
@@ -12,7 +12,7 @@ const s = ({ data: c, height: r = 8 }) => {
|
|
|
12
12
|
gap: 2,
|
|
13
13
|
height: r,
|
|
14
14
|
width: "100%",
|
|
15
|
-
children:
|
|
15
|
+
children: a.map((t, d) => /* @__PURE__ */ c(
|
|
16
16
|
i,
|
|
17
17
|
{
|
|
18
18
|
bgcolor: t.color,
|
|
@@ -24,7 +24,7 @@ const s = ({ data: c, height: r = 8 }) => {
|
|
|
24
24
|
))
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
s as S
|
|
30
30
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
2
|
+
const n = ({
|
|
3
3
|
children: o,
|
|
4
4
|
index: t,
|
|
5
5
|
name: a,
|
|
6
|
-
value:
|
|
7
|
-
...
|
|
6
|
+
value: r,
|
|
7
|
+
...b
|
|
8
8
|
}) => /* @__PURE__ */ e(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
11
|
"aria-labelledby": `${a}-tab-${t}`,
|
|
12
|
-
hidden:
|
|
12
|
+
hidden: r !== t,
|
|
13
13
|
id: `${a}-tabpanel-${t}`,
|
|
14
14
|
role: "tabpanel",
|
|
15
|
-
...
|
|
16
|
-
children:
|
|
15
|
+
...b,
|
|
16
|
+
children: r === t && o
|
|
17
17
|
}
|
|
18
|
-
)
|
|
18
|
+
);
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
n as T
|
|
21
21
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import o from "@mui/material/ListItem";
|
|
3
3
|
import c from "@mui/material/ListItemButton";
|
|
4
4
|
import p from "@mui/material/ListItemIcon";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Text as
|
|
5
|
+
import u from "@mui/material/ListItemText";
|
|
6
|
+
import x from "@mui/material/Stack";
|
|
7
|
+
import D from "@mui/material/Switch";
|
|
8
|
+
import { Text as L } from "@mxenabled/mxui";
|
|
9
9
|
import w from "@mui/material/ListItemAvatar";
|
|
10
10
|
var B = /* @__PURE__ */ ((r) => (r.Accounts = "accounts", r.Budgets = "budgets", r.Insights = "insights", r.Personal = "personal", r))(B || {}), P = /* @__PURE__ */ ((r) => (r[r.DebtPaymentReminder = 3] = "DebtPaymentReminder", r[r.AccountBalanceLow = 6] = "AccountBalanceLow", r[r.AccountDepositLarge = 7] = "AccountDepositLarge", r[r.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", r[r.TransactionFeeCharge = 9] = "TransactionFeeCharge", r[r.InternationalTransaction = 23] = "InternationalTransaction", r[r.AccountDepositLargePosted = 48] = "AccountDepositLargePosted", r))(P || {}), b = /* @__PURE__ */ ((r) => (r[r.BudgetExceeded = 1] = "BudgetExceeded", r[r.BudgetOffTarget = 2] = "BudgetOffTarget", r))(b || {}), A = /* @__PURE__ */ ((r) => (r[r.AccountBalanceLow = 33] = "AccountBalanceLow", r[r.BillAmountNotStandard = 49] = "BillAmountNotStandard", r[r.CategorySpending = 50] = "CategorySpending", r[r.CreditCardCloseToLimit = 51] = "CreditCardCloseToLimit", r[r.DebtPaymentReminder = 37] = "DebtPaymentReminder", r[r.DuplicatePayment = 42] = "DuplicatePayment", r[r.MonthlySpendComparison = 53] = "MonthlySpendComparison", r[r.MonthlySpendToIncomeComparison = 54] = "MonthlySpendToIncomeComparison", r[r.MonthlySubscriptionAggregate = 55] = "MonthlySubscriptionAggregate", r[r.MonthlyTopMerchantSpending = 56] = "MonthlyTopMerchantSpending", r[r.SaveAnExtra100Dollars = 57] = "SaveAnExtra100Dollars", r[r.SavingsOpportunity = 58] = "SavingsOpportunity", r[r.SetUpDirectDeposit = 59] = "SetUpDirectDeposit", r[r.SwitchDirectDeposit = 60] = "SwitchDirectDeposit", r[r.UncategorizedTransactions = 61] = "UncategorizedTransactions", r[r.UnifiedDeposit = 62] = "UnifiedDeposit", r[r.UpcomingBill = 63] = "UpcomingBill", r[r.WeekendSpendingSummary = 64] = "WeekendSpendingSummary", r[r.WeeklyNewMerchants = 65] = "WeeklyNewMerchants", r[r.DiscoveredAccounts = 52] = "DiscoveredAccounts", r[r.TransactionExpenseLarge = 39] = "TransactionExpenseLarge", r[r.PromotionalCampaignMessages = 67] = "PromotionalCampaignMessages", r[r.TransparentOverdraft = 68] = "TransparentOverdraft", r))(A || {});
|
|
11
11
|
const z = ({
|
|
@@ -21,18 +21,18 @@ const z = ({
|
|
|
21
21
|
}) => (
|
|
22
22
|
//TODO: implement common/components/ListItemRow.tsx
|
|
23
23
|
/* @__PURE__ */ e(
|
|
24
|
-
|
|
24
|
+
o,
|
|
25
25
|
{
|
|
26
|
-
secondaryAction: /* @__PURE__ */ e(
|
|
26
|
+
secondaryAction: /* @__PURE__ */ e(D, { checked: l, onChange: C }),
|
|
27
27
|
sx: {
|
|
28
28
|
"& .MuiListItemSecondaryAction-root": { right: a ? 64 : 24 },
|
|
29
29
|
"& .MuiListItemButton-root": { pr: 24 }
|
|
30
30
|
},
|
|
31
31
|
children: /* @__PURE__ */ S(c, { onClick: d ? void 0 : () => m(), children: [
|
|
32
32
|
r && /* @__PURE__ */ e(w, { children: r }),
|
|
33
|
-
/* @__PURE__ */ e(
|
|
33
|
+
/* @__PURE__ */ e(u, { primaryTypographyProps: { fontWeight: 400 }, children: /* @__PURE__ */ e(x, { alignItems: "center", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ S(x, { sx: { width: "100%" }, children: [
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
|
-
|
|
35
|
+
L,
|
|
36
36
|
{
|
|
37
37
|
bold: n,
|
|
38
38
|
color: "text.primary",
|
|
@@ -43,7 +43,7 @@ const z = ({
|
|
|
43
43
|
children: v
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
46
|
+
/* @__PURE__ */ e(L, { color: "text.secondary", variant: "caption", children: M })
|
|
47
47
|
] }) }) }),
|
|
48
48
|
!d && a && /* @__PURE__ */ e(p, { children: a })
|
|
49
49
|
] })
|
|
@@ -57,18 +57,23 @@ const z = ({
|
|
|
57
57
|
secondaryText: n = void 0,
|
|
58
58
|
useExtraPadding: m = !0
|
|
59
59
|
}) => /* @__PURE__ */ e(
|
|
60
|
-
|
|
60
|
+
o,
|
|
61
61
|
{
|
|
62
|
-
secondaryAction: /* @__PURE__ */ e(
|
|
62
|
+
secondaryAction: /* @__PURE__ */ e(D, { checked: r, disabled: a, onChange: l }),
|
|
63
63
|
sx: {
|
|
64
64
|
pl: m ? 48 : 0,
|
|
65
65
|
"& .MuiListItemSecondaryAction-root": { right: m ? 64 : 24 }
|
|
66
66
|
},
|
|
67
67
|
children: /* @__PURE__ */ e(
|
|
68
|
-
|
|
68
|
+
u,
|
|
69
69
|
{
|
|
70
70
|
primary: d,
|
|
71
|
-
primaryTypographyProps: {
|
|
71
|
+
primaryTypographyProps: {
|
|
72
|
+
fontWeight: 400,
|
|
73
|
+
variant: "body1",
|
|
74
|
+
maxWidth: "calc(100% - 60px)",
|
|
75
|
+
color: "text.primary"
|
|
76
|
+
},
|
|
72
77
|
secondary: n,
|
|
73
78
|
secondaryTypographyProps: {
|
|
74
79
|
color: "text.secondary",
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { F as g, A as e } from "./Fetch-DecPFeGU.mjs";
|
|
2
|
+
class u {
|
|
3
|
+
fetchInstance;
|
|
4
|
+
constructor(n, t, a) {
|
|
5
|
+
this.fetchInstance = new g(n, t, void 0, a);
|
|
6
|
+
}
|
|
7
|
+
addTag = async (n) => this.fetchInstance.post(e.TAGS, n).then((t) => t.tag).catch((t) => t);
|
|
8
|
+
addTagging = async (n) => this.fetchInstance.post(e.TAGGINGS, n).then((t) => t.tagging).catch((t) => t);
|
|
9
|
+
addTransaction = async (n) => this.fetchInstance.post(e.TRANSACTIONS, n).then((t) => t.transaction).catch((t) => t);
|
|
10
|
+
addTransactionRule = async (n) => this.fetchInstance.post(e.TRANSACTION_RULES, n).then((t) => t).catch((t) => t);
|
|
11
|
+
getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((n) => n.map((t) => t.tagging));
|
|
12
|
+
getTags = async () => this.fetchInstance.get(e.TAGS).then((n) => n.map((t) => t.tag));
|
|
13
|
+
getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((n) => n.transaction_rules);
|
|
14
|
+
getTransactionsByDateRange = async (n, t) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${t}`).then((a) => a.map((c) => c.transaction));
|
|
15
|
+
// DEPRECATED
|
|
16
|
+
getTransactionsByAccountsAndDateRange = async (n, t, a) => {
|
|
17
|
+
console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
|
|
18
|
+
const c = n.reduce(
|
|
19
|
+
(o, s, r) => `${o}account_guids[]=${s}${r !== n.length - 1 ? "&" : ""}`,
|
|
20
|
+
""
|
|
21
|
+
);
|
|
22
|
+
return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${a}?${c}`).then((o) => o.map((s) => s.transaction));
|
|
23
|
+
};
|
|
24
|
+
// DEPRECATED
|
|
25
|
+
getTransactionsByGuids = async (n) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: n.join("+") }).then((t) => t.map((a) => a.transaction)));
|
|
26
|
+
// DEPRECATED
|
|
27
|
+
getTransactionsByCategoryAndDate = async (n, t, a) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
|
|
28
|
+
`${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}`
|
|
29
|
+
).then((c) => c.map((o) => o.transaction)));
|
|
30
|
+
// DEPRECATED
|
|
31
|
+
getTransactionsByCategoryDateAndAccounts = async (n, t, a, c) => {
|
|
32
|
+
console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
|
|
33
|
+
const o = c.reduce(
|
|
34
|
+
(s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
|
|
35
|
+
""
|
|
36
|
+
);
|
|
37
|
+
return this.fetchInstance.get(
|
|
38
|
+
`${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}?${o}`
|
|
39
|
+
).then((s) => s.map((r) => r.transaction));
|
|
40
|
+
};
|
|
41
|
+
// DEPRECATED
|
|
42
|
+
getTransactionsByCategoriesDateAndAccounts = async (n, t, a, c) => {
|
|
43
|
+
console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
|
|
44
|
+
const o = c.reduce(
|
|
45
|
+
(s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
|
|
46
|
+
""
|
|
47
|
+
);
|
|
48
|
+
return this.fetchInstance.get(
|
|
49
|
+
`${e.TRANSACTIONS}/by_category_guids/${n.join(
|
|
50
|
+
"+"
|
|
51
|
+
)}/by_date/${t}/${a}?${o}`
|
|
52
|
+
).then((s) => s.map((r) => r.transaction));
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* DEPRECATED
|
|
56
|
+
* Get all transactions by the top level category, between begin date and end date, and optionally
|
|
57
|
+
* filtered by accounts
|
|
58
|
+
* @param categoryGuid The top level category guid
|
|
59
|
+
* @param beginDate the start date
|
|
60
|
+
* @param endDate the end date
|
|
61
|
+
* @param accountGuids an optional list of account guids
|
|
62
|
+
*/
|
|
63
|
+
getTransactionsByTopLevelCategoryAndDate = async (n, t, a, c = []) => {
|
|
64
|
+
console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
|
|
65
|
+
let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${n}/by_date/${t}/${a}`;
|
|
66
|
+
if (c.length > 0) {
|
|
67
|
+
const s = c.reduce(
|
|
68
|
+
(r, i, h) => `${r}account_guids[]=${i}${h !== c.length - 1 ? "&" : ""}`,
|
|
69
|
+
""
|
|
70
|
+
);
|
|
71
|
+
o += `?${s}`;
|
|
72
|
+
}
|
|
73
|
+
return this.fetchInstance.get(o).then((s) => s.map((r) => r.transaction));
|
|
74
|
+
};
|
|
75
|
+
removeTag = async (n) => this.fetchInstance.delete(`${e.TAGS}/${n}`).then((t) => t).catch((t) => t);
|
|
76
|
+
removeTagging = async (n) => this.fetchInstance.delete(`${e.TAGGINGS}/${n}`).then((t) => t).catch((t) => t);
|
|
77
|
+
removeTransaction = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}`).then((t) => t);
|
|
78
|
+
removeTransactionRule = async (n) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${n}`).catch((t) => t);
|
|
79
|
+
removeTransactionSplit = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}/unsplit`).then((t) => t).catch((t) => t);
|
|
80
|
+
updateTransactionRule = async (n) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${n.guid}`, n).then((t) => t).catch((t) => t);
|
|
81
|
+
updateTag = async (n) => this.fetchInstance.put(`${e.TAGS}/${n.guid}`, n).then((t) => t.tag).catch((t) => t);
|
|
82
|
+
updateTransaction = async (n) => this.fetchInstance.put(`${e.TRANSACTIONS}/${n.guid}`, n).then((t) => t.transaction).catch((t) => t);
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
u as T
|
|
86
|
+
};
|