@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,1336 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { useVirtualizer as Le } from "@tanstack/react-virtual";
|
|
5
|
+
import v from "@mui/material/Box";
|
|
6
|
+
import Z from "@mui/material/Divider";
|
|
7
|
+
import J from "@mui/material/List";
|
|
8
|
+
import { MerchantLogo as me, Text as h, Icon as C, CategoryIcon as pe, CategoryIconVariants as fe, P as se, H1 as be, TextField as ge } from "@mxenabled/mxui";
|
|
9
|
+
import K from "@mui/material/ListItemAvatar";
|
|
10
|
+
import M from "@mui/material/ListItemText";
|
|
11
|
+
import S from "@mui/material/Stack";
|
|
12
|
+
import { T as Re, L as ke, O as g, C as Ge, b as Me, i as Pe } from "./User-BklmOUSd.mjs";
|
|
13
|
+
import { G as Ke, h as E, u as N, g as D, m as Se, b as $e, p as He } from "./hooks-C41HAxM5.mjs";
|
|
14
|
+
import { f as ee } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
15
|
+
import { Receipt as Fe, Delete as re, ChevronRight as ze, Cancel as oe, Search as Ue, Edit as Ve, Flag as Be } from "@mxenabled/mx-icons";
|
|
16
|
+
import { fromUnixTime as Y } from "date-fns/fromUnixTime";
|
|
17
|
+
import { isSameDay as Ae } from "date-fns/isSameDay";
|
|
18
|
+
import { h as We } from "./DateUtil-CDPZw_-m.mjs";
|
|
19
|
+
import { L as xe } from "./Loader-Ckqi9Rx6.mjs";
|
|
20
|
+
import { A as k } from "./WidgetContainer-CDh9fjpR.mjs";
|
|
21
|
+
import ne from "@mui/material/Paper";
|
|
22
|
+
import le from "@mui/material/Button";
|
|
23
|
+
import Ye from "@mui/material/FormGroup";
|
|
24
|
+
import Q from "@mui/material/IconButton";
|
|
25
|
+
import Ne from "@mui/material/TextField";
|
|
26
|
+
import je from "@mui/material/ToggleButton";
|
|
27
|
+
import { useTheme as Ie } from "@mui/material/styles";
|
|
28
|
+
import z from "@mui/material/Avatar";
|
|
29
|
+
import $ from "@mui/material/ListItem";
|
|
30
|
+
import { D as W, f as ve, a as Ee } from "./Dialog-CDV0kKxj.mjs";
|
|
31
|
+
import U from "@mui/material/ListItemButton";
|
|
32
|
+
import V from "@mui/material/ListItemIcon";
|
|
33
|
+
import { a as Oe } from "./CategorySelectorDrawer-Dl006GKy.mjs";
|
|
34
|
+
import { b as ie } from "./Localization-2MODESHW.mjs";
|
|
35
|
+
import { getUnixTime as qe } from "date-fns/getUnixTime";
|
|
36
|
+
import { D as ce } from "./Drawer-BF40nbsH.mjs";
|
|
37
|
+
import he from "@mui/material/InputAdornment";
|
|
38
|
+
import Xe from "@mui/material/Checkbox";
|
|
39
|
+
import _e from "@mui/material/Grid";
|
|
40
|
+
import { C as Ze } from "./CurrencyInput-D1cjbdCI.mjs";
|
|
41
|
+
import Je from "@mui/material/Switch";
|
|
42
|
+
var X = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(X || {}), ae = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(ae || {});
|
|
43
|
+
const Qe = [
|
|
44
|
+
0,
|
|
45
|
+
1,
|
|
46
|
+
2,
|
|
47
|
+
3
|
|
48
|
+
/* Tags */
|
|
49
|
+
], et = [
|
|
50
|
+
0,
|
|
51
|
+
1,
|
|
52
|
+
2
|
|
53
|
+
/* MerchantLogo */
|
|
54
|
+
], G = () => {
|
|
55
|
+
if (!c.useContext(Ke))
|
|
56
|
+
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
|
57
|
+
return E().uiStore;
|
|
58
|
+
};
|
|
59
|
+
function tt() {
|
|
60
|
+
return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
|
|
61
|
+
}
|
|
62
|
+
function nt(t) {
|
|
63
|
+
const a = tt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), i = window.parent || window.opener || !1;
|
|
64
|
+
return i && i.postMessage && a ? (i.postMessage(t, a), !0) : !1;
|
|
65
|
+
}
|
|
66
|
+
function at(t) {
|
|
67
|
+
return nt({
|
|
68
|
+
metadata: { beat_guid: t },
|
|
69
|
+
mx: !0,
|
|
70
|
+
type: "mx/moneyDashboard/insightOnTransaction"
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const rt = ({ transaction: t, onClick: a }) => {
|
|
74
|
+
const { associatedBeats: i } = E(), { expandedSplits: n } = G(), { transactions: o } = N(), { showInsights: r } = G(), s = t.transaction_type === Re.CREDIT, u = c.useMemo(() => i.find((d) => d.associated_transaction_guid === t.guid), [i, t]);
|
|
75
|
+
return (
|
|
76
|
+
//TODO: implement common/components/ListItemRow.tsx
|
|
77
|
+
/* @__PURE__ */ l(
|
|
78
|
+
ke,
|
|
79
|
+
{
|
|
80
|
+
clickEventName: g.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
81
|
+
onClick: a ? () => a(t.guid) : void 0,
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ e(K, { children: t.parent_guid && n.includes(t.parent_guid) ? /* @__PURE__ */ e(c.Fragment, {}) : /* @__PURE__ */ e(
|
|
84
|
+
me,
|
|
85
|
+
{
|
|
86
|
+
categoryGuid: t.top_level_category_guid || "",
|
|
87
|
+
merchantGuid: t.merchant_guid || ""
|
|
88
|
+
}
|
|
89
|
+
) }),
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
M,
|
|
92
|
+
{
|
|
93
|
+
disableTypography: !0,
|
|
94
|
+
secondary: /* @__PURE__ */ l(S, { direction: "row", justifyContent: "space-between", children: [
|
|
95
|
+
/* @__PURE__ */ l(S, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
96
|
+
t.is_flagged && /* @__PURE__ */ e(C, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
97
|
+
t.is_hidden && /* @__PURE__ */ e(C, { name: "visibility_off", size: 16 }),
|
|
98
|
+
t.has_been_split && /* @__PURE__ */ e(C, { name: "call_split", size: 16 }),
|
|
99
|
+
/* @__PURE__ */ e(h, { variant: "caption", children: t.has_been_split ? o.split_transaction_category_label : t.category })
|
|
100
|
+
] }),
|
|
101
|
+
u && r && /* @__PURE__ */ e(
|
|
102
|
+
h,
|
|
103
|
+
{
|
|
104
|
+
bold: !0,
|
|
105
|
+
color: "action.active",
|
|
106
|
+
onClick: (d) => {
|
|
107
|
+
d.stopPropagation(), d.preventDefault(), at(u.guid);
|
|
108
|
+
},
|
|
109
|
+
variant: "caption",
|
|
110
|
+
children: u.short_title
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] }),
|
|
114
|
+
children: /* @__PURE__ */ l(S, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
115
|
+
/* @__PURE__ */ l(h, { bold: !0, variant: "body1", children: [
|
|
116
|
+
t.is_hidden && o.hide_trnx_cancel_hidden_note,
|
|
117
|
+
t.payee || t.description || t.feed_description
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ l(
|
|
120
|
+
h,
|
|
121
|
+
{
|
|
122
|
+
bold: !0,
|
|
123
|
+
color: s ? "success.main" : "text.primary",
|
|
124
|
+
sx: { flexShrink: 0 },
|
|
125
|
+
variant: "body1",
|
|
126
|
+
children: [
|
|
127
|
+
s ? "+" : "",
|
|
128
|
+
ee(t.amount, "0,0.00")
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] })
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
);
|
|
139
|
+
}, ot = A(rt), it = ({
|
|
140
|
+
bgcolor: t = "background.default",
|
|
141
|
+
children: a
|
|
142
|
+
}) => /* @__PURE__ */ e(v, { display: "inline-block", sx: { bgcolor: t, py: 6, width: "100%" }, children: /* @__PURE__ */ e(h, { bold: !0, sx: { pl: 24 }, variant: "caption", children: a }) }), st = ({ showIcon: t = !0, showSubtitle: a = !0 }) => {
|
|
143
|
+
const { transactions: i } = N();
|
|
144
|
+
return /* @__PURE__ */ l(S, { alignItems: "center", gap: 12, height: "auto", mt: 24, children: [
|
|
145
|
+
t && /* @__PURE__ */ e(Fe, { color: "secondary", sx: { fontSize: 32 } }),
|
|
146
|
+
/* @__PURE__ */ e(h, { bold: !0, color: "secondary", variant: "body2", children: i.zero_state_no_transactions }),
|
|
147
|
+
a && /* @__PURE__ */ e(h, { color: "secondary", variant: "caption", children: i.zero_state_there_are_no_transactions })
|
|
148
|
+
] });
|
|
149
|
+
}, lt = A(st), Te = (t, a) => {
|
|
150
|
+
const i = Y(a[t].date), n = Y(a[t - 1]?.date);
|
|
151
|
+
return !Ae(i, n);
|
|
152
|
+
}, ct = (t, a) => {
|
|
153
|
+
const i = Y(a[t].date), n = Y(a[t + 1]?.date);
|
|
154
|
+
return Ae(i, n);
|
|
155
|
+
}, ye = 65, Ce = 32, dt = ({
|
|
156
|
+
bgcolor: t,
|
|
157
|
+
filter: a,
|
|
158
|
+
height: i = "calc(100dvh - 36px)",
|
|
159
|
+
loader: n = /* @__PURE__ */ e(xe, { label: "Loading", size: 40 }),
|
|
160
|
+
onClick: o,
|
|
161
|
+
showInsights: r = !1,
|
|
162
|
+
showLoader: s = !1,
|
|
163
|
+
showHiddenTransactions: u = !1,
|
|
164
|
+
transaction: d,
|
|
165
|
+
width: _ = "100%",
|
|
166
|
+
zeroState: m = /* @__PURE__ */ e(lt, {})
|
|
167
|
+
}) => {
|
|
168
|
+
const { isLoading: p, sortedTransactions: T } = E(), y = c.useMemo(() => {
|
|
169
|
+
const w = a ? T.filter(a) : T, R = d ?? w;
|
|
170
|
+
return u ? R : R.filter((B) => !B.is_hidden);
|
|
171
|
+
}, [T, u]), { clearExpandedSplits: f, setShowInsights: I, toggleSplit: b } = G(), { onEvent: L } = D(), H = (w) => {
|
|
172
|
+
const R = y.find((B) => B.guid === w);
|
|
173
|
+
if (R?.has_been_split) {
|
|
174
|
+
b(R.guid);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
L(k.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
178
|
+
account_guid: R?.account_guid,
|
|
179
|
+
transaction_guid: w
|
|
180
|
+
}), o?.(w);
|
|
181
|
+
}, j = c.useRef(null), P = Le({
|
|
182
|
+
count: y.length,
|
|
183
|
+
getScrollElement: () => j.current,
|
|
184
|
+
estimateSize: (w) => ye + (Te(w, y) ? Ce : 0),
|
|
185
|
+
overscan: 5
|
|
186
|
+
});
|
|
187
|
+
return c.useEffect(() => P.measure(), [y]), c.useEffect(() => I(r), [r]), c.useEffect(() => () => f(), []), /* @__PURE__ */ e(J, { sx: { width: _ }, children: /* @__PURE__ */ e(v, { height: i, overflow: "auto", ref: j, width: _, children: /* @__PURE__ */ l(
|
|
188
|
+
v,
|
|
189
|
+
{
|
|
190
|
+
height: (
|
|
191
|
+
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
192
|
+
P.getVirtualItems().length === 0 ? "auto" : P.getTotalSize()
|
|
193
|
+
),
|
|
194
|
+
position: "relative",
|
|
195
|
+
width: "100%",
|
|
196
|
+
children: [
|
|
197
|
+
(p || s) && n,
|
|
198
|
+
!p && !s && P.getVirtualItems().length === 0 && m,
|
|
199
|
+
!p && !s && P.getVirtualItems().length > 0 && P.getVirtualItems().map((w) => {
|
|
200
|
+
const R = y[w.index], B = Te(w.index, y), de = ct(w.index, y), x = ye + (B ? Ce : 0);
|
|
201
|
+
return /* @__PURE__ */ l(
|
|
202
|
+
v,
|
|
203
|
+
{
|
|
204
|
+
sx: {
|
|
205
|
+
height: x,
|
|
206
|
+
position: "absolute",
|
|
207
|
+
transform: `translateY(${w.start}px)`,
|
|
208
|
+
width: "100%",
|
|
209
|
+
bgcolor: "background.paper"
|
|
210
|
+
},
|
|
211
|
+
children: [
|
|
212
|
+
B && /* @__PURE__ */ e(it, { bgcolor: t, children: We(R.date) }),
|
|
213
|
+
/* @__PURE__ */ e(
|
|
214
|
+
ot,
|
|
215
|
+
{
|
|
216
|
+
...o && { onClick: H },
|
|
217
|
+
transaction: R
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
/* @__PURE__ */ e(Z, { sx: { ml: de ? 68 : 0 } })
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
R.guid
|
|
224
|
+
);
|
|
225
|
+
})
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
) }) });
|
|
229
|
+
}, Rn = A(dt), ut = ({ transaction: t }) => {
|
|
230
|
+
const { addOrUpdateTransactionRule: a, updateTransaction: i } = E(), { categories: n } = Se(), { onEvent: o } = D(), { setShouldDisableDrawerScroll: r, updateManualTransaction: s } = G(), { transactions: u } = N(), [d, _] = c.useState(!1), [m, p] = c.useState(""), T = async (b) => {
|
|
231
|
+
await i({ ...t, category_guid: m }), b && await a(m, t), p(""), o(k.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
232
|
+
transaction_guid: t.guid
|
|
233
|
+
});
|
|
234
|
+
}, y = (b) => {
|
|
235
|
+
if (t.is_manual && !t.guid) {
|
|
236
|
+
const L = n.find((H) => H.guid === b);
|
|
237
|
+
s({
|
|
238
|
+
...t,
|
|
239
|
+
category: L?.name,
|
|
240
|
+
category_guid: b,
|
|
241
|
+
top_level_category_guid: L?.parent_guid || b
|
|
242
|
+
});
|
|
243
|
+
} else
|
|
244
|
+
p(b);
|
|
245
|
+
f();
|
|
246
|
+
}, f = () => {
|
|
247
|
+
_(!1), r(!1);
|
|
248
|
+
}, I = c.useMemo(
|
|
249
|
+
() => n.find((b) => b.guid === m),
|
|
250
|
+
[m]
|
|
251
|
+
);
|
|
252
|
+
return /* @__PURE__ */ l(c.Fragment, { children: [
|
|
253
|
+
/* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
254
|
+
U,
|
|
255
|
+
{
|
|
256
|
+
onClick: () => {
|
|
257
|
+
o(g.ON_TRANSACTION_CATEGORY_CLICK), _(!0);
|
|
258
|
+
},
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
261
|
+
pe,
|
|
262
|
+
{
|
|
263
|
+
categoryGuid: t.top_level_category_guid,
|
|
264
|
+
size: 24,
|
|
265
|
+
sx: { color: "text.primary" },
|
|
266
|
+
variant: fe.Transparent
|
|
267
|
+
}
|
|
268
|
+
) }) }),
|
|
269
|
+
/* @__PURE__ */ e(
|
|
270
|
+
M,
|
|
271
|
+
{
|
|
272
|
+
primary: u.category_title,
|
|
273
|
+
primaryTypographyProps: { variant: "caption" },
|
|
274
|
+
secondary: /* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.category ?? u.actions_select_a_category })
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
) }),
|
|
281
|
+
/* @__PURE__ */ e(
|
|
282
|
+
Oe,
|
|
283
|
+
{
|
|
284
|
+
initialSelected: t.category_guid,
|
|
285
|
+
onClose: f,
|
|
286
|
+
onSelect: y,
|
|
287
|
+
showDrawer: d,
|
|
288
|
+
title: u.actions_select_a_category
|
|
289
|
+
}
|
|
290
|
+
),
|
|
291
|
+
/* @__PURE__ */ e(
|
|
292
|
+
W,
|
|
293
|
+
{
|
|
294
|
+
copy: {
|
|
295
|
+
title: ie(
|
|
296
|
+
u.actions_apply_to_all_transaction_types,
|
|
297
|
+
t.description
|
|
298
|
+
)
|
|
299
|
+
},
|
|
300
|
+
isOpen: !!m,
|
|
301
|
+
onClose: () => p(""),
|
|
302
|
+
onPrimaryAction: () => T(!0),
|
|
303
|
+
onSecondaryAction: () => T(!1),
|
|
304
|
+
primaryText: u.actions_apply_to_all,
|
|
305
|
+
secondaryText: u.actions_this_time_only,
|
|
306
|
+
children: /* @__PURE__ */ e(se, { variant: "subtitle1", children: ie(
|
|
307
|
+
u.actions_all_past_and_future,
|
|
308
|
+
t.description,
|
|
309
|
+
I?.name
|
|
310
|
+
) })
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
] });
|
|
314
|
+
}, _t = ({ transaction: t }) => {
|
|
315
|
+
const { onEvent: a } = D(), { updateTransaction: i } = E(), { updateManualTransaction: n } = G(), { common: o, transactions: r } = N(), [s, u] = c.useState(!1), [d, _] = c.useState(t.date), m = (T) => {
|
|
316
|
+
_(qe(T));
|
|
317
|
+
}, p = async () => {
|
|
318
|
+
if (t.is_manual && !t.guid) {
|
|
319
|
+
n({ ...t, date: d }), u(!1);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
await i({ ...t, date: d }), a(k.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), u(!1);
|
|
323
|
+
};
|
|
324
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-date-action", children: [
|
|
325
|
+
/* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
326
|
+
U,
|
|
327
|
+
{
|
|
328
|
+
onClick: () => {
|
|
329
|
+
a(g.ON_TRANSACTION_DATE_CLICK), u(!0);
|
|
330
|
+
},
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
|
|
333
|
+
/* @__PURE__ */ e(
|
|
334
|
+
M,
|
|
335
|
+
{
|
|
336
|
+
primary: r.date_title,
|
|
337
|
+
primaryTypographyProps: { variant: "caption" },
|
|
338
|
+
secondary: /* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: ve(Y(t.date), Ee.YEAR_MONTH_DAY) })
|
|
339
|
+
}
|
|
340
|
+
),
|
|
341
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
) }),
|
|
345
|
+
/* @__PURE__ */ e(
|
|
346
|
+
ce,
|
|
347
|
+
{
|
|
348
|
+
ariaLabelClose: o.close_aria,
|
|
349
|
+
isOpen: s,
|
|
350
|
+
onClose: () => u(!1),
|
|
351
|
+
onPrimaryAction: p,
|
|
352
|
+
primaryText: o.save_button,
|
|
353
|
+
secondaryText: o.cancel_button,
|
|
354
|
+
title: r.date_edit_title,
|
|
355
|
+
children: /* @__PURE__ */ e(S, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
356
|
+
Ge,
|
|
357
|
+
{
|
|
358
|
+
beginDate: Y(d),
|
|
359
|
+
copy: {
|
|
360
|
+
nextAria: r.date_next_aria,
|
|
361
|
+
prevAria: r.date_prev_aria,
|
|
362
|
+
today: o.date_range_picker.today
|
|
363
|
+
},
|
|
364
|
+
onDateSelected: m,
|
|
365
|
+
selectionType: Me.Single
|
|
366
|
+
}
|
|
367
|
+
) })
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
] });
|
|
371
|
+
}, mt = ({ transaction: t }) => {
|
|
372
|
+
const { onEvent: a } = D(), { removeTransaction: i } = E(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: r } = N(), [s, u] = c.useState(!1), d = async () => {
|
|
373
|
+
await i(t.guid), a(g.ON_TRANSACTION_DELETE_DELETED);
|
|
374
|
+
};
|
|
375
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-delete", children: [
|
|
376
|
+
t && /* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
377
|
+
U,
|
|
378
|
+
{
|
|
379
|
+
onClick: () => {
|
|
380
|
+
a(g.ON_TRANSACTION_DELETE_CLICK), n(!0), u(!0);
|
|
381
|
+
},
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { variant: "rounded", children: /* @__PURE__ */ e(re, { color: "secondary", fontSize: "small" }) }) }),
|
|
384
|
+
/* @__PURE__ */ e(
|
|
385
|
+
M,
|
|
386
|
+
{
|
|
387
|
+
primary: r.manual_transaction_delete_title,
|
|
388
|
+
secondary: r.manual_transaction_delete_subtitle
|
|
389
|
+
}
|
|
390
|
+
),
|
|
391
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(re, {}) })
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
) }),
|
|
395
|
+
/* @__PURE__ */ e(
|
|
396
|
+
W,
|
|
397
|
+
{
|
|
398
|
+
copy: { title: r.manual_transaction_delete_title },
|
|
399
|
+
isOpen: s,
|
|
400
|
+
onClose: () => {
|
|
401
|
+
n(!1), u(!1);
|
|
402
|
+
},
|
|
403
|
+
onPrimaryAction: d,
|
|
404
|
+
onSecondaryAction: () => a(g.ON_TRANSACTION_DELETE_CANCEL),
|
|
405
|
+
primaryText: o.delete_button,
|
|
406
|
+
secondaryText: o.cancel_button,
|
|
407
|
+
children: /* @__PURE__ */ e(h, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: r.manual_transaction_delete_description })
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] });
|
|
411
|
+
}, pt = A(mt), gt = ({ transaction: t }) => {
|
|
412
|
+
const { onEvent: a } = D(), { updateTransaction: i } = E(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: r } = N(), [s, u] = c.useState(!1), d = async () => {
|
|
413
|
+
await i({ ...t, merchant_guid: "" }), a(k.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
414
|
+
transaction_guid: t.guid
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-delete-logo", children: [
|
|
418
|
+
t && /* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
419
|
+
U,
|
|
420
|
+
{
|
|
421
|
+
onClick: () => {
|
|
422
|
+
a(g.ON_TRANSACTION_DELETE_LOGO_CLICK), u(!0);
|
|
423
|
+
},
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "delete", sx: { color: "text.primary" } }) }) }),
|
|
426
|
+
/* @__PURE__ */ e(M, { primary: r.merchant_logo_title, secondary: r.merchant_logo_desc }),
|
|
427
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
) }),
|
|
431
|
+
/* @__PURE__ */ l(
|
|
432
|
+
W,
|
|
433
|
+
{
|
|
434
|
+
copy: { title: r.merchant_logo_modal_title },
|
|
435
|
+
isOpen: s,
|
|
436
|
+
onClose: () => {
|
|
437
|
+
n(!1), u(!1);
|
|
438
|
+
},
|
|
439
|
+
onPrimaryAction: d,
|
|
440
|
+
onSecondaryAction: () => a(g.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
441
|
+
primaryText: o.delete_button,
|
|
442
|
+
secondaryText: o.cancel_button,
|
|
443
|
+
title: r.merchant_logo_modal_title,
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ e(h, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: r.merchant_logo_modal_desc }),
|
|
446
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { whiteSpace: "normal" }, variant: "subtitle1", children: ` ${r.merchant_logo_modal_desc_bold}` })
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
] });
|
|
451
|
+
}, ht = A(gt), Tt = ({ transaction: t }) => {
|
|
452
|
+
const { onEvent: a } = D(), { updateTransaction: i } = E(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: r } = N(), [s, u] = c.useState(!1), d = t.is_hidden, _ = async () => {
|
|
453
|
+
await i({ ...t, is_hidden: !t.is_hidden }), a(
|
|
454
|
+
d ? g.ON_TRANSACTION_UNHIDDEN : g.ON_TRANSACTION_HIDDEN
|
|
455
|
+
);
|
|
456
|
+
};
|
|
457
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-hide-transaction", children: [
|
|
458
|
+
t && /* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
459
|
+
U,
|
|
460
|
+
{
|
|
461
|
+
"aria-checked": d,
|
|
462
|
+
onClick: () => {
|
|
463
|
+
a(
|
|
464
|
+
d ? g.ON_TRANSACTION_UNHIDE_CLICK : g.ON_TRANSACTION_HIDE_CLICK
|
|
465
|
+
), a(
|
|
466
|
+
d ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
|
467
|
+
{
|
|
468
|
+
transaction_guid: t.guid
|
|
469
|
+
}
|
|
470
|
+
), u(!0);
|
|
471
|
+
},
|
|
472
|
+
role: "switch",
|
|
473
|
+
children: [
|
|
474
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: d ? /* @__PURE__ */ e(C, { name: "visibilityOff", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(C, { name: "visibility", sx: { color: "text.primary" } }) }) }),
|
|
475
|
+
/* @__PURE__ */ e(
|
|
476
|
+
M,
|
|
477
|
+
{
|
|
478
|
+
primary: d ? r.hide_trnx_subtitle_unhide_trnx : r.hide_trnx_subtitle_hide_trnx,
|
|
479
|
+
secondary: d ? r.hide_trnx_desc_unhiding : r.hide_trnx_desc_hiding
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
|
|
483
|
+
Je,
|
|
484
|
+
{
|
|
485
|
+
checked: d,
|
|
486
|
+
id: "hide-transaction",
|
|
487
|
+
name: "hide-transaction",
|
|
488
|
+
tabIndex: -1
|
|
489
|
+
}
|
|
490
|
+
) })
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
) }),
|
|
494
|
+
/* @__PURE__ */ e(
|
|
495
|
+
W,
|
|
496
|
+
{
|
|
497
|
+
copy: {
|
|
498
|
+
title: d ? r.hide_trnx_subtitle_unhide_trnx : r.hide_trnx_subtitle_hide_trnx
|
|
499
|
+
},
|
|
500
|
+
isOpen: s,
|
|
501
|
+
onClose: () => {
|
|
502
|
+
n(!1), u(!1);
|
|
503
|
+
},
|
|
504
|
+
onPrimaryAction: _,
|
|
505
|
+
onSecondaryAction: () => a(
|
|
506
|
+
d ? g.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : g.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
|
507
|
+
),
|
|
508
|
+
primaryText: d ? o.unhide_button : o.hide_button,
|
|
509
|
+
secondaryText: o.cancel_button,
|
|
510
|
+
children: /* @__PURE__ */ e(h, { truncate: !1, variant: "subtitle1", children: d ? r.hide_trnx_desc_unhiding : r.hide_trnx_desc_hiding })
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
] });
|
|
514
|
+
}, yt = A(Tt), De = ({ transaction: t }) => {
|
|
515
|
+
const { amount: a, description: i, isIncome: n, merchant_guid: o, payee: r, top_level_category_guid: s } = t;
|
|
516
|
+
return /* @__PURE__ */ l(S, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
517
|
+
/* @__PURE__ */ e(
|
|
518
|
+
me,
|
|
519
|
+
{
|
|
520
|
+
categoryGuid: s || "",
|
|
521
|
+
merchantGuid: o || "",
|
|
522
|
+
size: 64
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
/* @__PURE__ */ l(S, { overflow: "hidden'", children: [
|
|
526
|
+
/* @__PURE__ */ e(h, { bold: !0, mb: 4, truncate: !0, variant: "body1", children: i || r }),
|
|
527
|
+
/* @__PURE__ */ l(be, { color: n ? "success.main" : "text.primary", truncate: !0, children: [
|
|
528
|
+
n ? "+" : "",
|
|
529
|
+
ee(a, "0,0.00")
|
|
530
|
+
] })
|
|
531
|
+
] })
|
|
532
|
+
] });
|
|
533
|
+
}, Ct = ({ transaction: t }) => {
|
|
534
|
+
const { onEvent: a } = D(), { updateTransaction: i } = E(), { updateManualTransaction: n } = G(), { common: o, transactions: r } = N(), [s, u] = c.useState(!1), [d, _] = c.useState("");
|
|
535
|
+
c.useEffect(() => {
|
|
536
|
+
s && _(t.memo ? t.memo : "");
|
|
537
|
+
}, [s]);
|
|
538
|
+
const m = async () => {
|
|
539
|
+
if (t.is_manual && !t.guid) {
|
|
540
|
+
n({ ...t, memo: d }), u(!1);
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
await i({ ...t, memo: d }), a(k.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), u(!1);
|
|
544
|
+
};
|
|
545
|
+
return /* @__PURE__ */ l("div", { className: "mx-txn-memo-action", children: [
|
|
546
|
+
/* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
547
|
+
U,
|
|
548
|
+
{
|
|
549
|
+
onClick: () => {
|
|
550
|
+
a(g.ON_TRANSACTION_MEMO_CLICK), u(!0);
|
|
551
|
+
},
|
|
552
|
+
children: [
|
|
553
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" } }) }) }),
|
|
554
|
+
/* @__PURE__ */ e(
|
|
555
|
+
M,
|
|
556
|
+
{
|
|
557
|
+
primary: r.memo_title,
|
|
558
|
+
primaryTypographyProps: { variant: "caption" },
|
|
559
|
+
secondary: /* @__PURE__ */ e(
|
|
560
|
+
h,
|
|
561
|
+
{
|
|
562
|
+
bold: !0,
|
|
563
|
+
sx: { overflowWrap: "break-word", whiteSpace: "wrap" },
|
|
564
|
+
variant: "body1",
|
|
565
|
+
children: t.memo ? t.memo : r.memo_desc
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
}
|
|
569
|
+
),
|
|
570
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
) }),
|
|
574
|
+
/* @__PURE__ */ l(
|
|
575
|
+
ce,
|
|
576
|
+
{
|
|
577
|
+
ariaLabelClose: o.close_aria,
|
|
578
|
+
isOpen: s,
|
|
579
|
+
onClose: () => u(!1),
|
|
580
|
+
onPrimaryAction: m,
|
|
581
|
+
title: r.memo_title,
|
|
582
|
+
children: [
|
|
583
|
+
/* @__PURE__ */ e(De, { transaction: t }),
|
|
584
|
+
/* @__PURE__ */ e(
|
|
585
|
+
Ne,
|
|
586
|
+
{
|
|
587
|
+
"aria-label": r.memo_desc_aria,
|
|
588
|
+
focused: !0,
|
|
589
|
+
fullWidth: !0,
|
|
590
|
+
multiline: !0,
|
|
591
|
+
name: "memo",
|
|
592
|
+
onChange: (p) => _(p.target.value),
|
|
593
|
+
placeholder: r.memo_desc,
|
|
594
|
+
rows: 4,
|
|
595
|
+
sx: { px: 16 },
|
|
596
|
+
value: d
|
|
597
|
+
}
|
|
598
|
+
)
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
] });
|
|
603
|
+
}, ft = A(Ct), bt = (t = "polite") => {
|
|
604
|
+
const [a, i] = c.useState(""), [n, o] = c.useState(t), r = c.useCallback((u, d) => {
|
|
605
|
+
d && o(d), i(u);
|
|
606
|
+
}, []), s = c.useMemo(
|
|
607
|
+
() => /* @__PURE__ */ e(
|
|
608
|
+
v,
|
|
609
|
+
{
|
|
610
|
+
"aria-atomic": "true",
|
|
611
|
+
"aria-live": n,
|
|
612
|
+
role: n === "assertive" ? "alert" : "status",
|
|
613
|
+
sx: {
|
|
614
|
+
position: "absolute",
|
|
615
|
+
width: "1px",
|
|
616
|
+
height: "1px",
|
|
617
|
+
padding: 0,
|
|
618
|
+
margin: "-1px",
|
|
619
|
+
overflow: "hidden",
|
|
620
|
+
clip: "rect(0 0 0 0)",
|
|
621
|
+
clipPath: "inset(50%)",
|
|
622
|
+
whiteSpace: "nowrap",
|
|
623
|
+
border: 0
|
|
624
|
+
},
|
|
625
|
+
children: a
|
|
626
|
+
}
|
|
627
|
+
),
|
|
628
|
+
[a, n]
|
|
629
|
+
);
|
|
630
|
+
return { announce: r, ariaLive: s };
|
|
631
|
+
}, St = ({
|
|
632
|
+
index: t,
|
|
633
|
+
onDeleteRow: a,
|
|
634
|
+
onCategoryChanged: i,
|
|
635
|
+
onUpdateAmount: n,
|
|
636
|
+
split: o
|
|
637
|
+
}) => {
|
|
638
|
+
const { onEvent: r } = D(), { transactions: s } = N(), [u, d] = c.useState(`${o.amount}`), [_, m] = c.useState(!1), p = t === 0, T = (y) => {
|
|
639
|
+
isNaN(Number(y)) || (d(y), n(t, Number(y)));
|
|
640
|
+
};
|
|
641
|
+
return /* @__PURE__ */ l(v, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
642
|
+
/* @__PURE__ */ l(_e, { alignItems: p ? "center" : "start", container: !0, children: [
|
|
643
|
+
/* @__PURE__ */ e(_e, { size: { xs: 7 }, children: /* @__PURE__ */ l(S, { alignItems: "start", children: [
|
|
644
|
+
/* @__PURE__ */ e(
|
|
645
|
+
le,
|
|
646
|
+
{
|
|
647
|
+
endIcon: /* @__PURE__ */ e(ze, {}),
|
|
648
|
+
onClick: () => m(!0),
|
|
649
|
+
startIcon: /* @__PURE__ */ e(pe, { categoryGuid: o.top_level_category_guid }),
|
|
650
|
+
sx: { px: 12, py: 8 },
|
|
651
|
+
children: o.category
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
/* @__PURE__ */ e(v, { children: !o.category_guid && /* @__PURE__ */ l(S, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
|
|
655
|
+
/* @__PURE__ */ e(oe, { sx: { fontSize: 15 } }),
|
|
656
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: s.split_transaction_errors_select_category })
|
|
657
|
+
] }) })
|
|
658
|
+
] }) }),
|
|
659
|
+
/* @__PURE__ */ e(_e, { size: { xs: 5 }, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(h, { children: ee(o.amount, "0,0.00") }) }) : /* @__PURE__ */ l(S, { alignItems: "start", children: [
|
|
660
|
+
/* @__PURE__ */ l(S, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
661
|
+
/* @__PURE__ */ e(
|
|
662
|
+
Ze,
|
|
663
|
+
{
|
|
664
|
+
amount: u,
|
|
665
|
+
ariaLabel: s.split_transaction_edit_split_amount,
|
|
666
|
+
name: "split-amount-input",
|
|
667
|
+
setAmount: T,
|
|
668
|
+
sx: {
|
|
669
|
+
".MuiOutlinedInput-input": { p: 12 }
|
|
670
|
+
},
|
|
671
|
+
type: "number"
|
|
672
|
+
}
|
|
673
|
+
),
|
|
674
|
+
/* @__PURE__ */ e(
|
|
675
|
+
Q,
|
|
676
|
+
{
|
|
677
|
+
"aria-label": s.split_transaction_delete_split_btn,
|
|
678
|
+
color: "secondary",
|
|
679
|
+
onClick: () => {
|
|
680
|
+
r(g.ON_TRANSACTION_SPLIT_DELETE_CLICK), a(t);
|
|
681
|
+
},
|
|
682
|
+
sx: { w: 44, h: 44 },
|
|
683
|
+
children: /* @__PURE__ */ e(re, {})
|
|
684
|
+
}
|
|
685
|
+
)
|
|
686
|
+
] }),
|
|
687
|
+
!u && /* @__PURE__ */ l(S, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
|
|
688
|
+
/* @__PURE__ */ e(oe, { sx: { fontSize: 15 } }),
|
|
689
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: s.split_transaction_errors_enter_an_amount })
|
|
690
|
+
] })
|
|
691
|
+
] }) })
|
|
692
|
+
] }),
|
|
693
|
+
/* @__PURE__ */ e(
|
|
694
|
+
Oe,
|
|
695
|
+
{
|
|
696
|
+
initialSelected: o.category_guid,
|
|
697
|
+
onClose: () => m(!1),
|
|
698
|
+
onSelect: (y) => {
|
|
699
|
+
i(t, y), m(!1);
|
|
700
|
+
},
|
|
701
|
+
showDrawer: _,
|
|
702
|
+
title: s.actions_select_a_category
|
|
703
|
+
}
|
|
704
|
+
)
|
|
705
|
+
] });
|
|
706
|
+
}, At = A(St), xt = ({
|
|
707
|
+
onAddSplit: t,
|
|
708
|
+
onCategoryChanged: a,
|
|
709
|
+
onDeleteSplit: i,
|
|
710
|
+
onUpdateAmount: n,
|
|
711
|
+
splits: o,
|
|
712
|
+
transaction: r
|
|
713
|
+
}) => {
|
|
714
|
+
const { transactions: s } = N(), { onEvent: u } = D(), [d, _] = c.useState(""), { announce: m, ariaLive: p } = bt();
|
|
715
|
+
return c.useEffect(() => {
|
|
716
|
+
if (o.length <= 1)
|
|
717
|
+
_(s.split_transaction_errors_min_splits), m(s.split_transaction_errors_min_splits);
|
|
718
|
+
else if (o[0].amount < 0) {
|
|
719
|
+
const T = ie(
|
|
720
|
+
s.split_transaction_errors_totals_must_equal_amount,
|
|
721
|
+
ee(r.amount, "0,0.00")
|
|
722
|
+
);
|
|
723
|
+
_(T), m(T);
|
|
724
|
+
} else
|
|
725
|
+
_(""), m("");
|
|
726
|
+
}, [o]), /* @__PURE__ */ l(v, { className: "mx-txn-split-manager", children: [
|
|
727
|
+
o.map((T, y) => /* @__PURE__ */ e(
|
|
728
|
+
At,
|
|
729
|
+
{
|
|
730
|
+
index: y,
|
|
731
|
+
onCategoryChanged: a,
|
|
732
|
+
onDeleteRow: i,
|
|
733
|
+
onUpdateAmount: n,
|
|
734
|
+
split: T
|
|
735
|
+
},
|
|
736
|
+
y
|
|
737
|
+
)),
|
|
738
|
+
d && /* @__PURE__ */ l(S, { color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
739
|
+
/* @__PURE__ */ e(oe, { sx: { fontSize: 15 } }),
|
|
740
|
+
/* @__PURE__ */ e(h, { variant: "body2", children: d }),
|
|
741
|
+
p
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ e(v, { p: 16, children: /* @__PURE__ */ e(
|
|
744
|
+
le,
|
|
745
|
+
{
|
|
746
|
+
"aria-label": s.split_transaction_add_split_btn,
|
|
747
|
+
onClick: () => {
|
|
748
|
+
u(g.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
749
|
+
},
|
|
750
|
+
children: s.split_transaction_add_split_btn
|
|
751
|
+
}
|
|
752
|
+
) })
|
|
753
|
+
] });
|
|
754
|
+
}, Nt = A(xt), It = ({ transaction: t }) => {
|
|
755
|
+
const { onEvent: a } = D(), { splitTransaction: i, unSplitTransaction: n } = E(), { common: o, transactions: r } = N(), { setShouldDisableDrawerScroll: s } = G(), { categories: u } = Se(), d = {
|
|
756
|
+
...t,
|
|
757
|
+
amount: t.amount - 1,
|
|
758
|
+
guid: "",
|
|
759
|
+
has_been_split: !1,
|
|
760
|
+
parent_guid: t.guid
|
|
761
|
+
}, _ = {
|
|
762
|
+
...t,
|
|
763
|
+
amount: 1,
|
|
764
|
+
category_guid: void 0,
|
|
765
|
+
category: r.split_transaction_select_category_btn,
|
|
766
|
+
guid: "",
|
|
767
|
+
has_been_split: !1,
|
|
768
|
+
parent_guid: t.guid,
|
|
769
|
+
top_level_category_guid: void 0
|
|
770
|
+
}, [m, p] = c.useState(!1), [T, y] = c.useState(!1), [f, I] = c.useState([]), b = () => {
|
|
771
|
+
const x = [...f];
|
|
772
|
+
x.push({ ..._ }), x[0].amount -= 1, I(x);
|
|
773
|
+
}, L = (x) => {
|
|
774
|
+
if (x > 0) {
|
|
775
|
+
const F = f[x], O = [...f];
|
|
776
|
+
O.splice(x, 1), O[0].amount += F.amount, I(O);
|
|
777
|
+
}
|
|
778
|
+
}, H = (x, F) => {
|
|
779
|
+
const O = [...f];
|
|
780
|
+
O[x].amount = F, O[0].amount = t.amount - O.reduce(
|
|
781
|
+
(q, ue, we) => q + (we !== 0 ? ue.amount : 0),
|
|
782
|
+
0
|
|
783
|
+
), I(O);
|
|
784
|
+
}, j = (x, F) => {
|
|
785
|
+
const O = [...f], q = u.find((ue) => ue.guid === F);
|
|
786
|
+
q && (O[x] = {
|
|
787
|
+
...O[x],
|
|
788
|
+
category_guid: F,
|
|
789
|
+
category: q.name,
|
|
790
|
+
top_level_category_guid: q.parent_guid || F
|
|
791
|
+
}, I(O));
|
|
792
|
+
}, P = () => {
|
|
793
|
+
if (t.parent_guid || t.has_been_split) {
|
|
794
|
+
y(!0);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
I([{ ...d }, { ..._ }]), a(k.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
798
|
+
transaction_guid: t.guid
|
|
799
|
+
}), p(!0);
|
|
800
|
+
}, w = async () => {
|
|
801
|
+
a(g.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, f), p(!1);
|
|
802
|
+
}, R = async () => {
|
|
803
|
+
a(g.ON_TRANSACTION_SPLIT_CANCEL_CLICK), I([{ ...d }, { ..._ }]), p(!1);
|
|
804
|
+
}, B = async () => {
|
|
805
|
+
a(k.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
806
|
+
transaction_guid: t.guid
|
|
807
|
+
});
|
|
808
|
+
const x = t.parent_guid ?? t.guid;
|
|
809
|
+
await n(x);
|
|
810
|
+
}, de = c.useMemo(() => {
|
|
811
|
+
const x = f.some((O) => !O.category_guid), F = f.some((O) => O.amount <= 0);
|
|
812
|
+
return x || F;
|
|
813
|
+
}, [f]);
|
|
814
|
+
return /* @__PURE__ */ l(c.Fragment, { children: [
|
|
815
|
+
t && /* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(U, { onClick: P, children: [
|
|
816
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "call_split", sx: { color: "text.primary" } }) }) }),
|
|
817
|
+
/* @__PURE__ */ e(
|
|
818
|
+
M,
|
|
819
|
+
{
|
|
820
|
+
primary: t.has_been_split || t.parent_guid ? r.split_transaction_unsplit_title : r.split_transaction_title,
|
|
821
|
+
secondary: t.has_been_split || t.parent_guid ? r.split_transaction_unsplit_subtitle : r.split_transaction_desc
|
|
822
|
+
}
|
|
823
|
+
),
|
|
824
|
+
/* @__PURE__ */ e(V, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(C, { name: "delete" }) : /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
825
|
+
] }) }),
|
|
826
|
+
/* @__PURE__ */ l(
|
|
827
|
+
ce,
|
|
828
|
+
{
|
|
829
|
+
ariaLabelClose: o.close_aria,
|
|
830
|
+
isOpen: m,
|
|
831
|
+
isPrimaryDisabled: de,
|
|
832
|
+
onClose: R,
|
|
833
|
+
onPrimaryAction: w,
|
|
834
|
+
primaryText: o.save_button,
|
|
835
|
+
secondaryText: o.cancel_button,
|
|
836
|
+
title: r.split_transaction_title,
|
|
837
|
+
children: [
|
|
838
|
+
/* @__PURE__ */ e(De, { transaction: t }),
|
|
839
|
+
/* @__PURE__ */ e(
|
|
840
|
+
Nt,
|
|
841
|
+
{
|
|
842
|
+
onAddSplit: b,
|
|
843
|
+
onCategoryChanged: j,
|
|
844
|
+
onDeleteSplit: L,
|
|
845
|
+
onUpdateAmount: H,
|
|
846
|
+
splits: f,
|
|
847
|
+
transaction: t
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
),
|
|
853
|
+
/* @__PURE__ */ e(
|
|
854
|
+
W,
|
|
855
|
+
{
|
|
856
|
+
copy: { title: r.split_transaction_unsplit_title },
|
|
857
|
+
isOpen: T,
|
|
858
|
+
onClose: () => {
|
|
859
|
+
s(!1), y(!1);
|
|
860
|
+
},
|
|
861
|
+
onPrimaryAction: B,
|
|
862
|
+
onSecondaryAction: () => {
|
|
863
|
+
a(g.ON_TRANSACTION_UNSPLIT_CANCEL);
|
|
864
|
+
},
|
|
865
|
+
primaryText: o.delete_button,
|
|
866
|
+
secondaryText: o.cancel_button,
|
|
867
|
+
children: /* @__PURE__ */ e(se, { variant: "subtitle1", children: ie(
|
|
868
|
+
r.split_transaction_unsplit_description,
|
|
869
|
+
t.description
|
|
870
|
+
) })
|
|
871
|
+
}
|
|
872
|
+
)
|
|
873
|
+
] });
|
|
874
|
+
}, vt = A(It), Et = () => {
|
|
875
|
+
const t = Ie(), { onEvent: a } = D(), { addTag: i } = E(), { transactions: n } = N(), [o, r] = c.useState(!1), [s, u] = c.useState(""), [d, _] = c.useState(""), m = c.useRef(null);
|
|
876
|
+
c.useEffect(() => {
|
|
877
|
+
o && m?.current?.focus();
|
|
878
|
+
}, [o]);
|
|
879
|
+
const p = () => {
|
|
880
|
+
a(
|
|
881
|
+
o ? g.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : g.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
882
|
+
), o || u(""), r(!o);
|
|
883
|
+
}, T = async () => {
|
|
884
|
+
a(g.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), r(!1);
|
|
885
|
+
};
|
|
886
|
+
return c.useEffect(() => {
|
|
887
|
+
_(s.length > 40 ? n.tags_error_name_must_be_40_chars : "");
|
|
888
|
+
}, [s]), /* @__PURE__ */ l(v, { className: "mx-txn-tag-manager-header", children: [
|
|
889
|
+
/* @__PURE__ */ l(
|
|
890
|
+
S,
|
|
891
|
+
{
|
|
892
|
+
alignItems: "center",
|
|
893
|
+
bgcolor: t.palette.background.default,
|
|
894
|
+
direction: "row",
|
|
895
|
+
justifyContent: "space-between",
|
|
896
|
+
px: 24,
|
|
897
|
+
py: 16,
|
|
898
|
+
children: [
|
|
899
|
+
/* @__PURE__ */ e(h, { bold: !0, children: n.tags_your_tags }),
|
|
900
|
+
/* @__PURE__ */ e(
|
|
901
|
+
le,
|
|
902
|
+
{
|
|
903
|
+
"aria-expanded": o,
|
|
904
|
+
"aria-label": n.tags_add_tag_btn_aria,
|
|
905
|
+
onClick: p,
|
|
906
|
+
children: n.tags_add_tag_btn
|
|
907
|
+
}
|
|
908
|
+
)
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
),
|
|
912
|
+
/* @__PURE__ */ l(
|
|
913
|
+
W,
|
|
914
|
+
{
|
|
915
|
+
copy: { title: n.tags_add_tag_btn },
|
|
916
|
+
isOpen: o,
|
|
917
|
+
onClose: () => r(!1),
|
|
918
|
+
onPrimaryAction: T,
|
|
919
|
+
onSecondaryAction: () => r(!1),
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ e(
|
|
922
|
+
ge,
|
|
923
|
+
{
|
|
924
|
+
"aria-label": n.tags_placeholder,
|
|
925
|
+
name: "add-tag",
|
|
926
|
+
onChange: (y) => u(y.target.value),
|
|
927
|
+
placeholder: n.tags_placeholder,
|
|
928
|
+
sx: { width: "100%" },
|
|
929
|
+
value: s
|
|
930
|
+
}
|
|
931
|
+
),
|
|
932
|
+
/* @__PURE__ */ e(se, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: d })
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
] });
|
|
937
|
+
}, Ot = A(Et), Dt = ({ onSearchValueChanged: t, searchValue: a }) => {
|
|
938
|
+
const { common: i, transactions: n } = N(), o = /* @__PURE__ */ e(
|
|
939
|
+
Q,
|
|
940
|
+
{
|
|
941
|
+
"aria-label": n.tags_cancel_search || "Search",
|
|
942
|
+
onClick: () => t(""),
|
|
943
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
|
|
947
|
+
ge,
|
|
948
|
+
{
|
|
949
|
+
InputProps: {
|
|
950
|
+
startAdornment: /* @__PURE__ */ e(he, { position: "start", children: /* @__PURE__ */ e(Ue, { color: "disabled" }) }),
|
|
951
|
+
endAdornment: /* @__PURE__ */ e(he, { position: "end", sx: { padding: 0 }, children: a ? o : null })
|
|
952
|
+
},
|
|
953
|
+
"aria-label": i.search_aria,
|
|
954
|
+
name: "search",
|
|
955
|
+
onChange: (r) => t(r.target.value),
|
|
956
|
+
placeholder: i.search_placeholder,
|
|
957
|
+
sx: { bgcolor: "background.paper", width: "100%" },
|
|
958
|
+
value: a
|
|
959
|
+
}
|
|
960
|
+
) });
|
|
961
|
+
}, wt = A(Dt), Lt = ({ onTagChecked: t, selectedTags: a, tag: i }) => {
|
|
962
|
+
const { onEvent: n } = D(), { removeTag: o, updateTag: r } = E(), { common: s, transactions: u } = N(), [d, _] = c.useState(!1), [m, p] = c.useState(!1), [T, y] = c.useState(""), [f, I] = c.useState(""), b = async () => {
|
|
963
|
+
n(g.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await r({ ...i, name: T }), _(!1);
|
|
964
|
+
}, L = async () => {
|
|
965
|
+
n(g.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
|
|
966
|
+
};
|
|
967
|
+
c.useEffect(() => {
|
|
968
|
+
I(T.length > 40 ? u.tags_error_name_must_be_40_chars : "");
|
|
969
|
+
}, [T]);
|
|
970
|
+
const H = () => {
|
|
971
|
+
n(g.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), y(i.name), _(!0);
|
|
972
|
+
}, j = () => {
|
|
973
|
+
n(g.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
|
|
974
|
+
};
|
|
975
|
+
return /* @__PURE__ */ l(
|
|
976
|
+
$,
|
|
977
|
+
{
|
|
978
|
+
className: "mx-txn-transaction-manager-row",
|
|
979
|
+
disableGutters: !0,
|
|
980
|
+
disablePadding: !0,
|
|
981
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ l(S, { direction: "row", children: [
|
|
982
|
+
/* @__PURE__ */ e(
|
|
983
|
+
Q,
|
|
984
|
+
{
|
|
985
|
+
"aria-label": `Edit ${i.name} tag`,
|
|
986
|
+
color: "secondary",
|
|
987
|
+
onClick: H,
|
|
988
|
+
children: /* @__PURE__ */ e(Ve, { color: "secondary" })
|
|
989
|
+
}
|
|
990
|
+
),
|
|
991
|
+
/* @__PURE__ */ e(
|
|
992
|
+
Q,
|
|
993
|
+
{
|
|
994
|
+
"aria-label": `Delete ${i.name} tag`,
|
|
995
|
+
color: "secondary",
|
|
996
|
+
onClick: j,
|
|
997
|
+
children: /* @__PURE__ */ e(re, { color: "secondary" })
|
|
998
|
+
}
|
|
999
|
+
)
|
|
1000
|
+
] }),
|
|
1001
|
+
children: [
|
|
1002
|
+
/* @__PURE__ */ l(
|
|
1003
|
+
U,
|
|
1004
|
+
{
|
|
1005
|
+
"aria-checked": a.includes(i.guid),
|
|
1006
|
+
onClick: () => t(i.guid),
|
|
1007
|
+
role: "checkbox",
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ e(V, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Xe, { checked: a.includes(i.guid), edge: "start", tabIndex: -1 }) }),
|
|
1010
|
+
/* @__PURE__ */ e(M, { children: i.name })
|
|
1011
|
+
]
|
|
1012
|
+
}
|
|
1013
|
+
),
|
|
1014
|
+
/* @__PURE__ */ l(
|
|
1015
|
+
W,
|
|
1016
|
+
{
|
|
1017
|
+
copy: { title: "Update tag name" },
|
|
1018
|
+
isOpen: d,
|
|
1019
|
+
onClose: () => _(!1),
|
|
1020
|
+
onPrimaryAction: b,
|
|
1021
|
+
onSecondaryAction: () => _(!1),
|
|
1022
|
+
children: [
|
|
1023
|
+
/* @__PURE__ */ e(
|
|
1024
|
+
ge,
|
|
1025
|
+
{
|
|
1026
|
+
"aria-describedby": f ? "update-tag-error" : void 0,
|
|
1027
|
+
"aria-label": u.tags_update_the_tag_name,
|
|
1028
|
+
name: "update-tag",
|
|
1029
|
+
onChange: (P) => y(P.target.value),
|
|
1030
|
+
placeholder: "Tag name",
|
|
1031
|
+
sx: { width: "100%" },
|
|
1032
|
+
value: T
|
|
1033
|
+
}
|
|
1034
|
+
),
|
|
1035
|
+
/* @__PURE__ */ e(se, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: f })
|
|
1036
|
+
]
|
|
1037
|
+
}
|
|
1038
|
+
),
|
|
1039
|
+
/* @__PURE__ */ e(
|
|
1040
|
+
W,
|
|
1041
|
+
{
|
|
1042
|
+
copy: { title: u.tags_delete_title },
|
|
1043
|
+
isOpen: m,
|
|
1044
|
+
onClose: () => p(!1),
|
|
1045
|
+
onPrimaryAction: L,
|
|
1046
|
+
onSecondaryAction: () => n(g.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1047
|
+
primaryText: s.delete_button,
|
|
1048
|
+
secondaryText: s.cancel_button,
|
|
1049
|
+
children: /* @__PURE__ */ e(h, { truncate: !1, children: u.tags_deleting_this_tag_will_remove_it })
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1052
|
+
]
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
}, Rt = A(Lt), kt = ({ selectedTags: t, onTagChecked: a }) => {
|
|
1056
|
+
const { tags: i } = E(), [n, o] = c.useState(""), r = i.filter(
|
|
1057
|
+
(s) => s.name.toLowerCase().includes(n.toLowerCase())
|
|
1058
|
+
);
|
|
1059
|
+
return /* @__PURE__ */ l("div", { className: "mx-txn-tag-manager", children: [
|
|
1060
|
+
/* @__PURE__ */ e(
|
|
1061
|
+
wt,
|
|
1062
|
+
{
|
|
1063
|
+
onSearchValueChanged: (s) => o(s),
|
|
1064
|
+
searchValue: n
|
|
1065
|
+
}
|
|
1066
|
+
),
|
|
1067
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1068
|
+
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: r.map((s) => /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1069
|
+
/* @__PURE__ */ e(Rt, { onTagChecked: a, selectedTags: t, tag: s }),
|
|
1070
|
+
/* @__PURE__ */ e(Z, { sx: { ml: 24 } })
|
|
1071
|
+
] }, s.guid)) }) })
|
|
1072
|
+
] });
|
|
1073
|
+
}, Gt = A(kt), Mt = ({ transaction: t }) => {
|
|
1074
|
+
const { onEvent: a } = D(), { tags: i, updateTaggings: n, updateTransaction: o } = E(), { common: r, transactions: s } = N(), { updateManualTransaction: u } = G(), [d, _] = c.useState(!1), [m, p] = c.useState(t.tags);
|
|
1075
|
+
c.useEffect(() => {
|
|
1076
|
+
p(t.tags);
|
|
1077
|
+
}, [d, t]);
|
|
1078
|
+
const T = (I) => {
|
|
1079
|
+
const b = [...m], L = m.indexOf(I);
|
|
1080
|
+
L >= 0 ? b.splice(L, 1) : b.push(I), p(b);
|
|
1081
|
+
}, y = async () => {
|
|
1082
|
+
if (t.is_manual && !t.guid) {
|
|
1083
|
+
u({ ...t, tags: m }), _(!1);
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
await n(m, t.guid), await o({ ...t, tags: m }), a(k.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), _(!1);
|
|
1087
|
+
}, f = c.useMemo(
|
|
1088
|
+
() => t.tags.map(
|
|
1089
|
+
(I, b, L) => `${i.find((H) => H.guid === I)?.name}${b < L.length - 1 ? " / " : ""}`
|
|
1090
|
+
),
|
|
1091
|
+
[i, t]
|
|
1092
|
+
);
|
|
1093
|
+
return /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1094
|
+
/* @__PURE__ */ e($, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
1095
|
+
U,
|
|
1096
|
+
{
|
|
1097
|
+
onClick: () => {
|
|
1098
|
+
a(g.ON_TRANSACTION_TAGS_CLICK), _(!0);
|
|
1099
|
+
},
|
|
1100
|
+
children: [
|
|
1101
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
|
|
1102
|
+
/* @__PURE__ */ e(
|
|
1103
|
+
M,
|
|
1104
|
+
{
|
|
1105
|
+
primary: s.tags_title,
|
|
1106
|
+
primaryTypographyProps: { variant: "caption" },
|
|
1107
|
+
secondary: /* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.tags?.length > 0 ? f : s.tags_desc })
|
|
1108
|
+
}
|
|
1109
|
+
),
|
|
1110
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(C, { name: "chevron_right" }) })
|
|
1111
|
+
]
|
|
1112
|
+
}
|
|
1113
|
+
) }),
|
|
1114
|
+
/* @__PURE__ */ e(
|
|
1115
|
+
ce,
|
|
1116
|
+
{
|
|
1117
|
+
ariaLabelClose: r.close_aria,
|
|
1118
|
+
isOpen: d,
|
|
1119
|
+
onClose: () => _(!1),
|
|
1120
|
+
onPrimaryAction: y,
|
|
1121
|
+
primaryText: r.save_button,
|
|
1122
|
+
secondaryText: r.cancel_button,
|
|
1123
|
+
title: s.tags_title,
|
|
1124
|
+
children: /* @__PURE__ */ e(Gt, { onTagChecked: T, selectedTags: m })
|
|
1125
|
+
}
|
|
1126
|
+
)
|
|
1127
|
+
] });
|
|
1128
|
+
}, Pt = A(Mt), Kt = ({ transaction: t, viewOnly: a = !1 }) => {
|
|
1129
|
+
const { updateTransaction: i } = E(), { common: n, transactions: o } = N(), { onEvent: r } = D(), [s, u] = c.useState(!1), [d, _] = c.useState(""), m = c.useRef(null);
|
|
1130
|
+
c.useEffect(() => {
|
|
1131
|
+
s && (_(t.description), m?.current?.focus());
|
|
1132
|
+
}, [s]);
|
|
1133
|
+
const p = async () => {
|
|
1134
|
+
r(k.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1135
|
+
transaction_guid: t.guid
|
|
1136
|
+
}), await i({ ...t, description: d }), u(!1);
|
|
1137
|
+
};
|
|
1138
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-description", children: s ? /* @__PURE__ */ l(Ye, { row: !0, children: [
|
|
1139
|
+
/* @__PURE__ */ e(
|
|
1140
|
+
Ne,
|
|
1141
|
+
{
|
|
1142
|
+
"aria-label": o.description_add_a_subcategory,
|
|
1143
|
+
name: "add-subcategory",
|
|
1144
|
+
onChange: (T) => _(T.target.value),
|
|
1145
|
+
ref: m,
|
|
1146
|
+
sx: {
|
|
1147
|
+
backgroundColor: "background.paper",
|
|
1148
|
+
".MuiOutlinedInput-root": { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
1149
|
+
".MuiOutlinedInput-input": { p: 11 },
|
|
1150
|
+
width: 250
|
|
1151
|
+
},
|
|
1152
|
+
value: d
|
|
1153
|
+
}
|
|
1154
|
+
),
|
|
1155
|
+
/* @__PURE__ */ e(
|
|
1156
|
+
le,
|
|
1157
|
+
{
|
|
1158
|
+
disabled: !d,
|
|
1159
|
+
onClick: p,
|
|
1160
|
+
sx: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
1161
|
+
variant: "outlined",
|
|
1162
|
+
children: n.save_button
|
|
1163
|
+
}
|
|
1164
|
+
)
|
|
1165
|
+
] }) : /* @__PURE__ */ l(S, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1166
|
+
/* @__PURE__ */ e(h, { bold: !0, children: t.description }),
|
|
1167
|
+
!a && /* @__PURE__ */ e(
|
|
1168
|
+
Q,
|
|
1169
|
+
{
|
|
1170
|
+
"aria-label": o.description_edit_transaction_name,
|
|
1171
|
+
onClick: () => {
|
|
1172
|
+
u(!0), r(g.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
|
1173
|
+
},
|
|
1174
|
+
sx: { color: "action.active" },
|
|
1175
|
+
children: /* @__PURE__ */ e(C, { name: "create", size: 22 })
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
|
+
] }) });
|
|
1179
|
+
}, $t = A(Kt), Ht = ({ transaction: t }) => {
|
|
1180
|
+
const { updateTransaction: a } = E(), { transactions: i } = N(), { onEvent: n } = D(), o = Ie(), r = async () => {
|
|
1181
|
+
n(k.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await a({ ...t, is_flagged: !t.is_flagged });
|
|
1182
|
+
};
|
|
1183
|
+
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1184
|
+
je,
|
|
1185
|
+
{
|
|
1186
|
+
"aria-label": i.flag_btn_aria,
|
|
1187
|
+
"aria-pressed": t.is_flagged,
|
|
1188
|
+
color: "warning",
|
|
1189
|
+
onClick: r,
|
|
1190
|
+
selected: t.is_flagged,
|
|
1191
|
+
sx: {
|
|
1192
|
+
borderRadius: 6,
|
|
1193
|
+
color: o.palette.secondary.main,
|
|
1194
|
+
"&.Mui-selected": {
|
|
1195
|
+
color: o.palette.common.white,
|
|
1196
|
+
backgroundColor: o.palette.warning.dark,
|
|
1197
|
+
":hover": {
|
|
1198
|
+
color: o.palette.common.white,
|
|
1199
|
+
backgroundColor: o.palette.warning.main
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
":hover": {
|
|
1203
|
+
color: o.palette.warning.contrastText,
|
|
1204
|
+
backgroundColor: o.palette.warning.light
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
value: "flagged",
|
|
1208
|
+
children: /* @__PURE__ */ e(Be, { color: "inherit" })
|
|
1209
|
+
}
|
|
1210
|
+
) });
|
|
1211
|
+
}, Ft = A(Ht), te = (t, a, i, n = !0, o = "inset") => n ? /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1212
|
+
/* @__PURE__ */ l($, { disableGutters: !0, disablePadding: !0, children: [
|
|
1213
|
+
/* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: t }) }),
|
|
1214
|
+
/* @__PURE__ */ e(
|
|
1215
|
+
M,
|
|
1216
|
+
{
|
|
1217
|
+
primary: a,
|
|
1218
|
+
primaryTypographyProps: { variant: "caption" },
|
|
1219
|
+
secondary: i
|
|
1220
|
+
}
|
|
1221
|
+
)
|
|
1222
|
+
] }),
|
|
1223
|
+
/* @__PURE__ */ e(Z, { variant: o })
|
|
1224
|
+
] }) : null, zt = ({ transaction: t }) => {
|
|
1225
|
+
const { transactions: a } = N(), { tags: i } = E(), n = c.useMemo(() => {
|
|
1226
|
+
const o = new Map(i.map((r) => [r.guid, r.name]));
|
|
1227
|
+
return t.tags.map((r) => o.get(r)).filter(Boolean).join(" / ");
|
|
1228
|
+
}, [i, t.tags]);
|
|
1229
|
+
return /* @__PURE__ */ l(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1230
|
+
te(
|
|
1231
|
+
/* @__PURE__ */ e(
|
|
1232
|
+
pe,
|
|
1233
|
+
{
|
|
1234
|
+
categoryGuid: t.top_level_category_guid,
|
|
1235
|
+
size: 24,
|
|
1236
|
+
sx: { color: "text.primary" },
|
|
1237
|
+
variant: fe.Transparent
|
|
1238
|
+
}
|
|
1239
|
+
),
|
|
1240
|
+
a.category_title,
|
|
1241
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.category ?? a.actions_select_a_category })
|
|
1242
|
+
),
|
|
1243
|
+
te(
|
|
1244
|
+
/* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" } }),
|
|
1245
|
+
a.date_title,
|
|
1246
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: ve(Y(t.date), Ee.YEAR_MONTH_DAY) })
|
|
1247
|
+
),
|
|
1248
|
+
te(
|
|
1249
|
+
/* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" } }),
|
|
1250
|
+
a.memo_title,
|
|
1251
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "body1", children: t.memo ?? a.memo_desc }),
|
|
1252
|
+
!!t.memo,
|
|
1253
|
+
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1254
|
+
),
|
|
1255
|
+
te(
|
|
1256
|
+
/* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" } }),
|
|
1257
|
+
a.tags_title,
|
|
1258
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.tags?.length ? n : a.tags_desc }),
|
|
1259
|
+
!!t.tags?.length,
|
|
1260
|
+
"fullWidth"
|
|
1261
|
+
)
|
|
1262
|
+
] });
|
|
1263
|
+
}, Ut = A(zt), Vt = ({
|
|
1264
|
+
bottomActions: t = et,
|
|
1265
|
+
canFlagTransaction: a = !0,
|
|
1266
|
+
topActions: i = Qe,
|
|
1267
|
+
transaction: n
|
|
1268
|
+
}) => {
|
|
1269
|
+
const { onEvent: o } = D(), { isCopyLoaded: r } = $e(), { userFeatures: s } = He(), u = n?.number && n.number.length > 4;
|
|
1270
|
+
if (c.useEffect(
|
|
1271
|
+
() => o(k.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
|
|
1272
|
+
[]
|
|
1273
|
+
), !r)
|
|
1274
|
+
return /* @__PURE__ */ e(xe, {});
|
|
1275
|
+
const d = Pe(s, "MX_TXN_DETAILS_VIEW_ONLY");
|
|
1276
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ l(S, { children: [
|
|
1277
|
+
/* @__PURE__ */ l(S, { gap: 12, p: 24, children: [
|
|
1278
|
+
/* @__PURE__ */ e(ne, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1279
|
+
me,
|
|
1280
|
+
{
|
|
1281
|
+
categoryGuid: n.top_level_category_guid || "",
|
|
1282
|
+
merchantGuid: n.merchant_guid || "",
|
|
1283
|
+
size: 64
|
|
1284
|
+
}
|
|
1285
|
+
) }),
|
|
1286
|
+
/* @__PURE__ */ e($t, { transaction: n, viewOnly: d }),
|
|
1287
|
+
/* @__PURE__ */ l(S, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1288
|
+
/* @__PURE__ */ l(be, { color: n.isIncome ? "success.main" : "text.primary", children: [
|
|
1289
|
+
n.isIncome ? "+" : "",
|
|
1290
|
+
ee(n.amount, "0,0.00")
|
|
1291
|
+
] }),
|
|
1292
|
+
!d && a && /* @__PURE__ */ e(Ft, { transaction: n })
|
|
1293
|
+
] }),
|
|
1294
|
+
/* @__PURE__ */ l(S, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1295
|
+
/* @__PURE__ */ e(h, { bold: !0, children: `${n.account}
|
|
1296
|
+
${u ? n.number : "•".repeat(4).concat(n.number ?? "")}` }),
|
|
1297
|
+
/* @__PURE__ */ e(h, { bold: !0, color: "secondary", variant: "tiny", children: n.feed_description })
|
|
1298
|
+
] })
|
|
1299
|
+
] }),
|
|
1300
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: d ? /* @__PURE__ */ e(Ut, { transaction: n }) : /* @__PURE__ */ e(J, { children: i.map((_, m) => /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1301
|
+
_ === X.Category && /* @__PURE__ */ e(ut, { transaction: n }),
|
|
1302
|
+
_ === X.Date && /* @__PURE__ */ e(_t, { transaction: n }),
|
|
1303
|
+
_ === X.Memo && /* @__PURE__ */ e(ft, { transaction: n }),
|
|
1304
|
+
_ === X.Tags && /* @__PURE__ */ e(Pt, { transaction: n }),
|
|
1305
|
+
/* @__PURE__ */ e(Z, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
|
|
1306
|
+
] }, _)) }) }),
|
|
1307
|
+
!d && t.length > 0 && /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1308
|
+
/* @__PURE__ */ e(h, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: "Actions" }),
|
|
1309
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ l(J, { children: [
|
|
1310
|
+
t.map((_, m) => /* @__PURE__ */ l(c.Fragment, { children: [
|
|
1311
|
+
_ === ae.SplitTransaction && /* @__PURE__ */ e(vt, { transaction: n }),
|
|
1312
|
+
_ === ae.HideTransaction && /* @__PURE__ */ e(yt, { transaction: n }),
|
|
1313
|
+
_ === ae.MerchantLogo && /* @__PURE__ */ e(ht, { transaction: n }),
|
|
1314
|
+
/* @__PURE__ */ e(Z, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
|
|
1315
|
+
] }, _)),
|
|
1316
|
+
n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(pt, { transaction: n })
|
|
1317
|
+
] }) })
|
|
1318
|
+
] })
|
|
1319
|
+
] }) });
|
|
1320
|
+
}, kn = A(Vt);
|
|
1321
|
+
export {
|
|
1322
|
+
ae as B,
|
|
1323
|
+
ut as C,
|
|
1324
|
+
_t as D,
|
|
1325
|
+
ft as M,
|
|
1326
|
+
it as S,
|
|
1327
|
+
Rn as T,
|
|
1328
|
+
kn as a,
|
|
1329
|
+
G as b,
|
|
1330
|
+
ot as c,
|
|
1331
|
+
Pt as d,
|
|
1332
|
+
X as e,
|
|
1333
|
+
ct as h,
|
|
1334
|
+
Te as s,
|
|
1335
|
+
bt as u
|
|
1336
|
+
};
|