@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.mega1
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 +178 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
- package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- 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-BmZXkL0C.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
- package/dist/LineChart-KpPw1phO.mjs +580 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
- package/dist/SpendingLegend-CDO060GT.mjs +193 -0
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
- 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 +245 -235
- package/dist/accounts/stores/AccountStore.d.ts +24 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +611 -580
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +187 -180
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/Select.d.ts +4 -2
- 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 +4 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +397 -387
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/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/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +458 -448
- package/dist/exportTransactionsToCSV-DuAaI5XA.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 +24 -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 +3190 -1073
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +302 -291
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +108 -104
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- 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 +4 -3
- package/dist/microinsights/index.es.js +101 -14
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/index.es.js +197 -190
- package/dist/notifications/index.es.js +25 -25
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +395 -351
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +307 -298
- package/dist/spending/index.es.js +299 -438
- 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 +115 -112
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +1025 -604
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { b as _ } from "./CategoryUtil-DUM8NuGO.mjs";
|
|
2
|
+
import { b as p } from "./Category-CevNQ03n.mjs";
|
|
3
|
+
import { jsxs as y, Fragment as v, jsx as m } from "react/jsx-runtime";
|
|
4
|
+
import x from "react";
|
|
5
|
+
import { observer as w } from "mobx-react-lite";
|
|
6
|
+
import M from "@mui/material/Button";
|
|
7
|
+
import f from "@mui/material/Stack";
|
|
8
|
+
import { useTheme as N } from "@mui/material/styles";
|
|
9
|
+
import { CategoryIcon as k, 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-m5PddMQn.mjs";
|
|
12
|
+
import { u as $ } from "./hooks-ZMp65DFz.mjs";
|
|
13
|
+
import { u as j } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
+
import { f as D } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
15
|
+
import R from "@mui/material/Box";
|
|
16
|
+
const T = 5, B = (i, l, g, d) => d.reduce((o, n) => {
|
|
17
|
+
const a = i.find((s) => s.guid === n.category_guid);
|
|
18
|
+
if (!a) return o;
|
|
19
|
+
const t = a.parent_guid ?? a.guid, r = i.find((s) => s.guid === t);
|
|
20
|
+
if (!r) return o;
|
|
21
|
+
const c = {
|
|
22
|
+
guid: a.guid,
|
|
23
|
+
name: a.guid === t ? `${l.parent_category_totals_label_general} ${a.name}` : a.name,
|
|
24
|
+
color: _(r.guid, g),
|
|
25
|
+
amount: n.total
|
|
26
|
+
}, e = o.find((s) => s.guid === t);
|
|
27
|
+
return e ? (e.amount += n.total, e.categoryTotals?.push(c)) : o.push({
|
|
28
|
+
guid: t,
|
|
29
|
+
name: r.name,
|
|
30
|
+
color: _(r.guid, g),
|
|
31
|
+
categoryTotals: [c],
|
|
32
|
+
amount: n.total
|
|
33
|
+
}), o;
|
|
34
|
+
}, []), ot = (i, l, g, d) => {
|
|
35
|
+
const o = B(i, l, g, d), n = o.filter(
|
|
36
|
+
(e) => e.guid !== p.INCOME && e.guid !== p.INVESTMENTS && e.guid !== p.TRANSFER && e.amount > 0
|
|
37
|
+
).sort((e, s) => s.amount - e.amount), a = n.reduce(
|
|
38
|
+
(e, s) => e + s.amount,
|
|
39
|
+
0
|
|
40
|
+
), t = n.length > T ? T : n.length, r = n.slice(0, t), c = r.map((e) => ({
|
|
41
|
+
id: e.guid,
|
|
42
|
+
color: _(e.guid, g),
|
|
43
|
+
label: e.name,
|
|
44
|
+
value: e.amount / a * 100
|
|
45
|
+
}));
|
|
46
|
+
if (n.length > 5) {
|
|
47
|
+
const e = n.slice(T, o.length), s = e.reduce(
|
|
48
|
+
(C, u) => C + u.amount,
|
|
49
|
+
0
|
|
50
|
+
);
|
|
51
|
+
r.push({
|
|
52
|
+
guid: "other",
|
|
53
|
+
color: g.palette.categories.others || "",
|
|
54
|
+
name: l.saving_goal_other,
|
|
55
|
+
categoryTotals: e,
|
|
56
|
+
amount: s
|
|
57
|
+
}), c.push({
|
|
58
|
+
id: "other",
|
|
59
|
+
color: g.palette.categories.others || "",
|
|
60
|
+
label: l.saving_goal_other,
|
|
61
|
+
value: s / a * 100
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
categoryData: r,
|
|
66
|
+
donutData: c,
|
|
67
|
+
totalAmount: a
|
|
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((r) => r.guid === t.category_guid)).sort((t, r) => t.total - r.total).map((t, r) => ({
|
|
73
|
+
guid: t.category_guid,
|
|
74
|
+
name: i.find((c) => c.guid === t.category_guid)?.name,
|
|
75
|
+
color: g[r],
|
|
76
|
+
categoryTotals: [],
|
|
77
|
+
amount: Math.abs(t.total)
|
|
78
|
+
})), n = o.reduce(
|
|
79
|
+
(t, r) => t + r.amount,
|
|
80
|
+
0
|
|
81
|
+
), a = 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: a,
|
|
90
|
+
totalAmount: n
|
|
91
|
+
};
|
|
92
|
+
}, H = ({
|
|
93
|
+
data: i,
|
|
94
|
+
isIncome: l = !1,
|
|
95
|
+
onSelected: g,
|
|
96
|
+
onViewTransactions: d,
|
|
97
|
+
selectedId: o,
|
|
98
|
+
size: n = 150,
|
|
99
|
+
totalLabel: a,
|
|
100
|
+
variant: t = "mini"
|
|
101
|
+
}) => {
|
|
102
|
+
const { spending: r } = $(), c = N(), { isTablet: e } = j(), { announce: s, ariaLive: C } = O(), u = x.useMemo(
|
|
103
|
+
() => o ? i.categoryData.find((b) => b.guid === o) : void 0,
|
|
104
|
+
[o]
|
|
105
|
+
);
|
|
106
|
+
x.useEffect(() => {
|
|
107
|
+
if (u) {
|
|
108
|
+
const b = D(u.amount, "0,0");
|
|
109
|
+
s(`${u.name}: ${b}`);
|
|
110
|
+
}
|
|
111
|
+
}, [u, s]);
|
|
112
|
+
const S = x.useMemo(() => i.donutData.length > 0 ? i.donutData : [{ id: "0", color: c.palette.divider, value: 100 }], [i, c]), E = () => {
|
|
113
|
+
d?.(o);
|
|
114
|
+
}, I = e ? 32 : 48;
|
|
115
|
+
return /* @__PURE__ */ y(v, { children: [
|
|
116
|
+
C,
|
|
117
|
+
/* @__PURE__ */ m(G, { data: S, onClick: g, selectedId: o, size: n, children: /* @__PURE__ */ m(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__ */ m(
|
|
128
|
+
k,
|
|
129
|
+
{
|
|
130
|
+
categoryGuid: l ? p.INCOME : u.guid,
|
|
131
|
+
size: t === "mini" ? 24 : I,
|
|
132
|
+
variant: A.Transparent
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ m(
|
|
136
|
+
h,
|
|
137
|
+
{
|
|
138
|
+
color: "secondary",
|
|
139
|
+
noWrap: !0,
|
|
140
|
+
variant: t === "mini" ? "Tiny" : "Body",
|
|
141
|
+
children: u ? u.name : a
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
!u && t === "full" && /* @__PURE__ */ m(h, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: a }),
|
|
148
|
+
/* @__PURE__ */ m(h, { variant: t === "mini" ? "H2" : "H1", children: u ? D(u.amount, "0,0") : D(i.totalAmount, "0,0") }),
|
|
149
|
+
!u && t === "mini" && /* @__PURE__ */ m(h, { color: "secondary", noWrap: !0, variant: "Tiny", children: a }),
|
|
150
|
+
t === "full" && /* @__PURE__ */ m(
|
|
151
|
+
M,
|
|
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: r.view_transactions
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }) }) })
|
|
162
|
+
] });
|
|
163
|
+
}, et = w(H), rt = ({ 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__ */ m(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__ */ m(R, { borderRadius: 4, height: 8, sx: { backgroundColor: o.color }, width: 8 }),
|
|
182
|
+
/* @__PURE__ */ m(h, { bold: o.guid === g, variant: "XSmall", children: o.name })
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
o.guid
|
|
186
|
+
)) });
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
et as S,
|
|
190
|
+
nt as a,
|
|
191
|
+
rt as b,
|
|
192
|
+
ot as g
|
|
193
|
+
};
|
|
@@ -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
|
+
};
|