@mx-cartographer/experiences 8.1.12 → 8.2.0
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 +4 -0
- package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
- package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
- package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +21 -21
- package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
- package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-BYyeeCf6.mjs} +7 -7
- package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
- package/dist/{Analytics-CxK7O19c.mjs → Analytics-CkYXKvco.mjs} +1 -1
- package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
- package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +2 -2
- package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
- package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
- package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
- package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
- package/dist/CurrencyDialog-d4dL7vA5.mjs +371 -0
- package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-B59ugxPN.mjs} +15 -16
- package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
- package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-HudZ3Bjs.mjs} +6 -7
- package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
- package/dist/DebtUtils-DD3186U-.mjs +153 -0
- package/dist/EmbeddedCard-BNl3quCs.mjs +856 -0
- package/dist/Error-Dogaw2jO.mjs +84 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
- package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-hDprC41l.mjs} +6 -5
- package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
- package/dist/{Help-C_CM4gpK.mjs → Help-BSQm9o29.mjs} +68 -67
- package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
- package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
- package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-CejWS_rh.mjs} +2 -2
- package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
- package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
- package/dist/Localization-DnoVyBNK.mjs +38 -0
- package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-DwylSiWs.mjs} +51 -51
- package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
- package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
- package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-CCg-Tml2.mjs} +13 -13
- package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
- package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
- package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +4 -4
- package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-CPXLW6AR.mjs} +9 -9
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
- package/dist/Select-BZRUpOib.mjs +51 -0
- package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
- package/dist/Sizes-DISGrlUg.mjs +6 -0
- package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-PKlh8caU.mjs} +6 -6
- package/dist/{SpendingLegend-BS8mHUbu.mjs → SpendingLegend-BmkEr9Nh.mjs} +4 -4
- package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-CbBSxdOi.mjs} +33 -33
- package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
- package/dist/UserStore-CRpKQjpP.mjs +3002 -0
- package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +28 -30
- package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-DalWyz5A.mjs} +3 -3
- package/dist/accounts/hooks/useUiStore.d.ts +6 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +62 -64
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +18 -18
- package/dist/cashflow/context/hooks.d.ts +15 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +28 -31
- package/dist/categories/context/hooks.d.ts +19 -1
- package/dist/categories/index.d.ts +0 -1
- package/dist/categories/index.es.js +4 -6
- package/dist/common/constants/ScheduledPayment.d.ts +1 -1
- package/dist/common/constants/index.d.ts +0 -3
- package/dist/common/context/GlobalDataProvider.d.ts +1 -1
- package/dist/common/context/hooks.d.ts +20 -20
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.es.js +215 -961
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/index.d.ts +0 -4
- package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
- package/dist/core/constants/Transaction.d.ts +10 -0
- package/dist/core/constants/index.d.ts +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.es.js +94 -79
- package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
- package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
- package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
- package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
- package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
- package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
- package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
- package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
- package/dist/core/stores/DebtsStore.d.ts +22 -0
- package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
- package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
- package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
- package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
- package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
- package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
- package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
- package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
- package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
- package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
- package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
- package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
- package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
- package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
- package/dist/{common → core}/stores/UserStore.d.ts +2 -2
- package/dist/core/stores/index.d.ts +24 -0
- package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
- package/dist/core/types/Offer.d.ts +32 -0
- package/dist/core/types/index.d.ts +3 -1
- package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
- package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
- package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
- package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
- package/dist/core/utils/DebtUtils.d.ts +31 -0
- package/dist/core/utils/FinstrongUtils.d.ts +7 -0
- package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
- package/dist/core/utils/HelpUtil.d.ts +3 -0
- package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
- package/dist/core/utils/Localization.d.ts +3 -0
- package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
- package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
- package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
- package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
- package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
- package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
- package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
- package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/dashboard/index.es.js +4 -4
- package/dist/debts/components/DebtsChart.d.ts +1 -1
- package/dist/debts/components/DebtsTable.d.ts +1 -1
- package/dist/debts/components/SnowballCard.d.ts +1 -1
- package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
- package/dist/debts/index.d.ts +0 -1
- package/dist/debts/index.es.js +568 -691
- package/dist/debts/utils/DebtsTable.d.ts +1 -1
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +1565 -1342
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +71 -73
- package/dist/help/index.es.js +4 -4
- package/dist/help/utils/index.d.ts +0 -1
- package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/index.es.js +52 -54
- package/dist/investments/components/AnalysisDetails.d.ts +1 -1
- package/dist/investments/index.es.js +6 -6
- package/dist/merchants/index.d.ts +0 -1
- package/dist/merchants/index.es.js +12 -14
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -33
- package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
- package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
- package/dist/networth/components/NetWorthChange.d.ts +1 -1
- package/dist/networth/components/NetWorthListItem.d.ts +1 -1
- package/dist/networth/components/NetWorthSummary.d.ts +1 -1
- package/dist/networth/index.d.ts +0 -4
- package/dist/networth/index.es.js +232 -237
- package/dist/notifications/index.d.ts +0 -2
- package/dist/notifications/index.es.js +23 -26
- package/dist/recurringtransactions/index.d.ts +0 -1
- package/dist/recurringtransactions/index.es.js +92 -96
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +11 -13
- package/dist/spending/index.es.js +10 -10
- package/dist/transactions/context/hooks.d.ts +1 -1
- package/dist/transactions/index.d.ts +0 -4
- package/dist/transactions/index.es.js +102 -109
- package/dist/trends/index.d.ts +0 -1
- package/dist/trends/index.es.js +67 -68
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
- package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
- package/package.json +1 -1
- package/dist/AccountApi-WEM2M9tg.mjs +0 -19
- package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
- package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
- package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
- package/dist/BeatStore-C7-PIhpB.mjs +0 -163
- package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
- package/dist/CashflowStore-BEi92kJg.mjs +0 -91
- package/dist/CategoryApi-CogDFScz.mjs +0 -29
- package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
- package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
- package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
- package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
- package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
- package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
- package/dist/Goal-MFBpoOIC.mjs +0 -29
- package/dist/GoalStore-BBAEbf43.mjs +0 -395
- package/dist/Localization-C_HZg9tJ.mjs +0 -15
- package/dist/Localization-CkQ49EKr.mjs +0 -26
- package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
- package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
- package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
- package/dist/NotificationApi-DF0obHoR.mjs +0 -20
- package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
- package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
- package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
- package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
- package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
- package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
- package/dist/Transaction-Cn5_iFm0.mjs +0 -5
- package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
- package/dist/TransactionStore-amPYxHnA.mjs +0 -710
- package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
- package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
- package/dist/accounts/stores/UiStore.d.ts +0 -10
- package/dist/accounts/utils/index.d.ts +0 -1
- package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
- package/dist/categories/stores/UiStore.d.ts +0 -20
- package/dist/common/stores/index.d.ts +0 -3
- package/dist/common/utils/Categories.d.ts +0 -6
- package/dist/common/utils/Localization.d.ts +0 -3
- package/dist/debts/store/DebtsStore.d.ts +0 -10
- package/dist/debts/store/DebtsUiStore.d.ts +0 -13
- package/dist/debts/utils/DebtStore.d.ts +0 -4
- package/dist/debts/utils/DebtsWidget.d.ts +0 -20
- package/dist/debts/utils/shared.d.ts +0 -12
- package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
- package/dist/help/constants/index.d.ts +0 -1
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
- package/dist/transactions/analytics.d.ts +0 -3
- package/dist/transactions/constants/Transaction.d.ts +0 -2
- package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
- package/dist/transactions/stores/UiStore.d.ts +0 -25
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
- /package/dist/{common → core}/constants/Category.d.ts +0 -0
- /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
- /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
- /package/dist/{help → core}/constants/Help.d.ts +0 -0
- /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
- /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
- /package/dist/{common → core}/constants/Table.d.ts +0 -0
- /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import I, { useMemo as X, useState as P, useEffect as q } from "react";
|
|
3
|
+
import L from "@mui/material/Box";
|
|
4
|
+
import Y from "@mui/material/Button";
|
|
5
|
+
import l from "@mui/material/Stack";
|
|
6
|
+
import { MerchantLogo as J, Text as m, Icon as k, P as $, H3 as tt, H2 as et } from "@mxenabled/mxui";
|
|
7
|
+
import { Receipt as nt, Icon as rt } from "@mxenabled/mx-icons";
|
|
8
|
+
import { T as it, e as ot } from "./TransactionUtils-BphBJBbU.mjs";
|
|
9
|
+
import { observer as V } from "mobx-react-lite";
|
|
10
|
+
import { useVirtualizer as at } from "@tanstack/react-virtual";
|
|
11
|
+
import st from "@mui/material/Divider";
|
|
12
|
+
import ct from "@mui/material/List";
|
|
13
|
+
import { G as lt, h as G, u as z, g as dt, b as Tt } from "./hooks-BaO_gOI6.mjs";
|
|
14
|
+
import ht from "@mui/material/ListItemAvatar";
|
|
15
|
+
import Ct from "@mui/material/ListItemText";
|
|
16
|
+
import { useTheme as M } from "@mui/material/styles";
|
|
17
|
+
import { f as H } from "./NumberFormatting--XMeeBfr.mjs";
|
|
18
|
+
import { L as _t } from "./ListItemWrapper-B5r-YQQ_.mjs";
|
|
19
|
+
import { fromUnixTime as v } from "date-fns/fromUnixTime";
|
|
20
|
+
import { isSameDay as F } from "date-fns/isSameDay";
|
|
21
|
+
import { f as pt, D as ut } from "./DateFormats-HudZ3Bjs.mjs";
|
|
22
|
+
import { i as mt } from "./DateUtil-Bhq59ZVg.mjs";
|
|
23
|
+
import { L as Z } from "./Loader-CxeBwuPG.mjs";
|
|
24
|
+
import { A as gt } from "./Analytics-CzGzz_sE.mjs";
|
|
25
|
+
import At from "@mui/material/Tab";
|
|
26
|
+
import Nt from "@mui/material/Tabs";
|
|
27
|
+
import ft from "@mui/material/IconButton";
|
|
28
|
+
import { D as It } from "./Drawer-XPaLYjiO.mjs";
|
|
29
|
+
import { ChartContainer as xt, ChartsReferenceLine as U, ChartsXAxis as St, BarPlot as Ot } from "@mui/x-charts";
|
|
30
|
+
import Dt from "@mui/material/Card";
|
|
31
|
+
const K = () => {
|
|
32
|
+
if (!I.useContext(lt))
|
|
33
|
+
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
|
34
|
+
return G().uiStore;
|
|
35
|
+
}, bt = {
|
|
36
|
+
ON_TRANSACTION_CATEGORY_CLICK: "onTransactionCategoryClick",
|
|
37
|
+
ON_TRANSACTION_CATEGORY_CHANGED: "onTransactionCategoryChanged",
|
|
38
|
+
ON_TRANSACTION_MANUAL_ADD_CLICK: "onTransactionManualAddClick",
|
|
39
|
+
ON_TRANSACTION_MANUAL_ADD_ADDED: "onTransactionManualAddAdded",
|
|
40
|
+
ON_TRANSACTION_DATE_CHANGED: "onTransactionDateChanged",
|
|
41
|
+
ON_TRANSACTION_DATE_CLICK: "onTransactionDateClick",
|
|
42
|
+
ON_TRANSACTION_DELETE_CANCEL: "onTransactionDeleteCancel",
|
|
43
|
+
ON_TRANSACTION_DELETE_CLICK: "onTransactionDeleteClick",
|
|
44
|
+
ON_TRANSACTION_DELETE_DELETED: "onTransactionDeleted",
|
|
45
|
+
ON_TRANSACTION_DELETE_LOGO_CANCEL: "onTransactionDeleteLogoCancel",
|
|
46
|
+
ON_TRANSACTION_DELETE_LOGO_CLICK: "onTransactionDeleteLogoClick",
|
|
47
|
+
ON_TRANSACTION_DELETE_LOGO_DELETED: "onTransactionDeletedLogo",
|
|
48
|
+
ON_TRANSACTION_DESCRIPTION_EDIT_CLICK: "onTransactionDescriptionEditClick",
|
|
49
|
+
ON_TRANSACTION_DESCRIPTION_SAVE_CLICK: "onTransactionDescriptionSaveClick",
|
|
50
|
+
ON_TRANSACTION_EXPORT_CSV_CLICK: "onTransactionExportCsvClick",
|
|
51
|
+
ON_TRANSACTION_HIDDEN: "onTransactionHidden",
|
|
52
|
+
ON_TRANSACTION_HIDE_CLICK: "onTransactionHideClick",
|
|
53
|
+
ON_TRANSACTION_HIDE_CANCEL_CLICK: "onTransactionHideCancelClick",
|
|
54
|
+
ON_TRANSACTION_LIST_ITEM_CLICK: "onTransactionListItemClick",
|
|
55
|
+
ON_TRANSACTION_MEMO_CHANGED: "onTransactionMemoChanged",
|
|
56
|
+
ON_TRANSACTION_MEMO_CLICK: "onTransactionMemoClick",
|
|
57
|
+
ON_TRANSACTION_SPLIT_ADD_CLICK: "onTransactionSplitAddClick",
|
|
58
|
+
ON_TRANSACTION_SPLIT_CANCEL_CLICK: "onTransactionSplitCancelClick",
|
|
59
|
+
ON_TRANSACTION_SPLIT_CATEGORY_CLICK: "onTransactionSplitCategoryClick",
|
|
60
|
+
ON_TRANSACTION_SPLIT_CLICK: "onTransactionSplitClick",
|
|
61
|
+
ON_TRANSACTION_SPLIT_DELETE_CLICK: "onTransactionSplitDeleteClick",
|
|
62
|
+
ON_TRANSACTION_SPLIT_SAVE_CLICK: "onTransactionSplitSaveClick",
|
|
63
|
+
ON_TRANSACTION_TAGS_CHANGED: "onTransactionTagsChanged",
|
|
64
|
+
ON_TRANSACTION_TAGS_CLICK: "onTransactionTagsClick",
|
|
65
|
+
ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK: "onTransactionTagsTagAddCancelClick",
|
|
66
|
+
ON_TRANSACTION_TAGS_TAG_ADD_CLICK: "onTransactionTagsTagAddClick",
|
|
67
|
+
ON_TRANSACTION_TAGS_TAG_ADDED: "onTransactionTagsTagAdded",
|
|
68
|
+
ON_TRANSACTION_TAGS_TAG_DELETE_CLICK: "onTransactionTagsTagDeleteClick",
|
|
69
|
+
ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK: "onTransactionTagsTagDeleteCancelClick",
|
|
70
|
+
ON_TRANSACTION_TAGS_TAG_DELETED: "onTransactionTagsTagDeleted",
|
|
71
|
+
ON_TRANSACTION_TAGS_TAG_EDIT_CLICK: "onTransactionTagsTagEditClick",
|
|
72
|
+
ON_TRANSACTION_TAGS_TAG_EDIT_SAVED: "onTransactionTagsTagEditSavedClick",
|
|
73
|
+
ON_TRANSACTION_TOGGLE_FLAG_CLICK: "onTransactionToggleFlagClick",
|
|
74
|
+
ON_TRANSACTION_UNHIDDEN: "onTransactionUnHidden",
|
|
75
|
+
ON_TRANSACTION_UNHIDE_CLICK: "onTransactionUnHideClick",
|
|
76
|
+
ON_TRANSACTION_UNHIDE_CANCEL_CLICK: "onTransactionUnHideCancelClick",
|
|
77
|
+
ON_TRANSACTION_UNSPLIT: "onTransactionUnsplit",
|
|
78
|
+
ON_TRANSACTION_UNSPLIT_CANCEL: "onTransactionUnsplitCancel"
|
|
79
|
+
};
|
|
80
|
+
function Et() {
|
|
81
|
+
return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
|
|
82
|
+
}
|
|
83
|
+
function Q(t) {
|
|
84
|
+
const r = Et().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), n = window.parent || window.opener || !1;
|
|
85
|
+
return n && n.postMessage && r ? (n.postMessage(t, r), !0) : !1;
|
|
86
|
+
}
|
|
87
|
+
function Lt(t) {
|
|
88
|
+
return Q({
|
|
89
|
+
metadata: { beat_guid: t },
|
|
90
|
+
mx: !0,
|
|
91
|
+
type: "mx/moneyDashboard/insightOnTransaction"
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function fe(t) {
|
|
95
|
+
return Q({
|
|
96
|
+
metadata: { template: t },
|
|
97
|
+
mx: !0,
|
|
98
|
+
type: "mx/pulse/client_configured_cta"
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
const yt = ({ transaction: t, onClick: r }) => {
|
|
102
|
+
const i = M().palette.mode === "dark", { associatedBeats: o } = G(), { expandedSplits: c } = K(), { transactions: T } = z(), { showInsights: g } = K(), C = t.transaction_type === it.CREDIT, d = I.useMemo(() => o.find((a) => a.associated_transaction_guid === t.guid), [o, t]), u = (a, p) => {
|
|
103
|
+
const A = [];
|
|
104
|
+
return a.is_flagged && A.push(
|
|
105
|
+
/* @__PURE__ */ e(
|
|
106
|
+
k,
|
|
107
|
+
{
|
|
108
|
+
fill: !0,
|
|
109
|
+
name: "flag",
|
|
110
|
+
size: 16,
|
|
111
|
+
sx: { color: p ? "primary.main" : "warning.dark" }
|
|
112
|
+
},
|
|
113
|
+
"flag"
|
|
114
|
+
)
|
|
115
|
+
), a.is_hidden && A.push(/* @__PURE__ */ e(k, { name: "visibility_off", size: 16 }, "hidden")), a.has_been_split && A.push(/* @__PURE__ */ e(k, { name: "call_split", size: 16 }, "split")), A;
|
|
116
|
+
}, _ = (a, p) => a.is_hidden ? p.is_excluded : a.has_been_split ? p.split_transaction_category_label : a.category || "";
|
|
117
|
+
return (
|
|
118
|
+
//TODO: implement common/components/ListItemRow.tsx
|
|
119
|
+
/* @__PURE__ */ s(
|
|
120
|
+
_t,
|
|
121
|
+
{
|
|
122
|
+
clickEventName: bt.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
123
|
+
onClick: r ? () => r(t.guid) : void 0,
|
|
124
|
+
sx: t.is_hidden ? { backgroundColor: "grey.50", color: "text.secondary" } : void 0,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ e(ht, { children: t.parent_guid && c.includes(t.parent_guid) ? /* @__PURE__ */ e(I.Fragment, {}) : /* @__PURE__ */ e(
|
|
127
|
+
J,
|
|
128
|
+
{
|
|
129
|
+
categoryGuid: t.top_level_category_guid || "",
|
|
130
|
+
merchantGuid: t.merchant_guid || ""
|
|
131
|
+
}
|
|
132
|
+
) }),
|
|
133
|
+
/* @__PURE__ */ e(
|
|
134
|
+
Ct,
|
|
135
|
+
{
|
|
136
|
+
disableTypography: !0,
|
|
137
|
+
secondary: /* @__PURE__ */ s(l, { direction: "row", justifyContent: "space-between", children: [
|
|
138
|
+
/* @__PURE__ */ s(l, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
139
|
+
u(t, i),
|
|
140
|
+
/* @__PURE__ */ e(m, { variant: "caption", children: _(t, T) })
|
|
141
|
+
] }),
|
|
142
|
+
d && g && /* @__PURE__ */ e(
|
|
143
|
+
m,
|
|
144
|
+
{
|
|
145
|
+
bold: !0,
|
|
146
|
+
color: "action.active",
|
|
147
|
+
onClick: (a) => {
|
|
148
|
+
a.stopPropagation(), a.preventDefault(), Lt(d.guid);
|
|
149
|
+
},
|
|
150
|
+
variant: "caption",
|
|
151
|
+
children: d.short_title
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] }),
|
|
155
|
+
children: /* @__PURE__ */ s(l, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
156
|
+
/* @__PURE__ */ e(m, { bold: !0, variant: "body1", children: t.payee || t.description || t.feed_description }),
|
|
157
|
+
/* @__PURE__ */ s(
|
|
158
|
+
m,
|
|
159
|
+
{
|
|
160
|
+
bold: !0,
|
|
161
|
+
color: C ? "success.main" : "text.primary",
|
|
162
|
+
sx: { flexShrink: 0 },
|
|
163
|
+
variant: "body1",
|
|
164
|
+
children: [
|
|
165
|
+
C ? "+" : "",
|
|
166
|
+
H(t.amount, "0,0.00")
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
] })
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
}, wt = V(yt), Rt = ({
|
|
178
|
+
bgcolor: t = "background.default",
|
|
179
|
+
children: r
|
|
180
|
+
}) => /* @__PURE__ */ e(L, { display: "inline-block", sx: { bgcolor: t, py: 6, width: "100%" }, children: /* @__PURE__ */ e(m, { bold: !0, sx: { pl: 24 }, variant: "caption", children: r }) }), kt = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
|
|
181
|
+
const { transactions: n } = z();
|
|
182
|
+
return /* @__PURE__ */ s(l, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
183
|
+
t && /* @__PURE__ */ e(nt, { color: "action", sx: { fontSize: 32 } }),
|
|
184
|
+
/* @__PURE__ */ e(m, { bold: !0, color: "text.secondary", variant: "body2", children: n.zero_state_no_transactions }),
|
|
185
|
+
r && /* @__PURE__ */ e(m, { color: "text.secondary", variant: "caption", children: n.zero_state_there_are_no_transactions })
|
|
186
|
+
] });
|
|
187
|
+
}, vt = V(kt), W = (t, r) => {
|
|
188
|
+
const n = v(r[t].date), i = v(r[t - 1]?.date);
|
|
189
|
+
return !F(n, i);
|
|
190
|
+
}, Gt = (t, r) => {
|
|
191
|
+
const n = v(r[t].date), i = v(r[t + 1]?.date);
|
|
192
|
+
return F(n, i);
|
|
193
|
+
}, Ie = (t) => t?.data ? t.data.map((r) => Object.fromEntries((t.names || []).map((n, i) => [n, r[i]]))) : [], xe = (t, r = "") => t.map((i) => {
|
|
194
|
+
const o = pt(i.date, ut.MONTH_SHORT);
|
|
195
|
+
return {
|
|
196
|
+
ariaLabel: `
|
|
197
|
+
${o},
|
|
198
|
+
${H(i.amount, "0.00")},
|
|
199
|
+
${r}`,
|
|
200
|
+
label: o,
|
|
201
|
+
value: i.amount,
|
|
202
|
+
formattedAmount: H(i.amount, "0,0")
|
|
203
|
+
};
|
|
204
|
+
}), B = 65, j = 32, Mt = ({
|
|
205
|
+
bgcolor: t,
|
|
206
|
+
filter: r,
|
|
207
|
+
height: n = "calc(100dvh - 36px)",
|
|
208
|
+
loader: i = /* @__PURE__ */ e(Z, { label: "Loading", size: 40 }),
|
|
209
|
+
onClick: o,
|
|
210
|
+
showInsights: c = !1,
|
|
211
|
+
showLoader: T = !1,
|
|
212
|
+
transaction: g,
|
|
213
|
+
width: C = "100%",
|
|
214
|
+
zeroState: d = /* @__PURE__ */ e(vt, {})
|
|
215
|
+
}) => {
|
|
216
|
+
const { isLoading: u, sortedTransactions: _ } = G(), a = I.useMemo(() => {
|
|
217
|
+
const N = r ? _.filter(r) : _;
|
|
218
|
+
return g ?? N;
|
|
219
|
+
}, [_, g]), { clearExpandedSplits: p, setShowInsights: A, toggleSplit: b } = K(), { onEvent: S } = dt(), O = (N) => {
|
|
220
|
+
const D = a.find((y) => y.guid === N);
|
|
221
|
+
if (D?.has_been_split) {
|
|
222
|
+
b(D.guid);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
S(gt.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
226
|
+
account_guid: D?.account_guid,
|
|
227
|
+
transaction_guid: N
|
|
228
|
+
}), o?.(N);
|
|
229
|
+
}, w = I.useRef(null), f = at({
|
|
230
|
+
count: a.length,
|
|
231
|
+
getScrollElement: () => w.current,
|
|
232
|
+
estimateSize: (N) => B + (W(N, a) ? j : 0),
|
|
233
|
+
overscan: 5
|
|
234
|
+
});
|
|
235
|
+
return I.useEffect(() => f.measure(), [a]), I.useEffect(() => A(c), [c]), I.useEffect(() => () => p(), []), /* @__PURE__ */ e(ct, { component: "div", role: "list", sx: { width: C }, children: /* @__PURE__ */ e(L, { height: n, overflow: "auto", ref: w, role: "presentation", width: C, children: /* @__PURE__ */ s(
|
|
236
|
+
L,
|
|
237
|
+
{
|
|
238
|
+
height: (
|
|
239
|
+
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
240
|
+
f.getVirtualItems().length === 0 ? "auto" : f.getTotalSize()
|
|
241
|
+
),
|
|
242
|
+
position: "relative",
|
|
243
|
+
role: "presentation",
|
|
244
|
+
width: "100%",
|
|
245
|
+
children: [
|
|
246
|
+
(u || T) && i,
|
|
247
|
+
!u && !T && f.getVirtualItems().length === 0 && d,
|
|
248
|
+
!u && !T && f.getVirtualItems().length > 0 && f.getVirtualItems().map((N) => {
|
|
249
|
+
const D = a[N.index], y = W(N.index, a), h = Gt(N.index, a), x = B + (y ? j : 0);
|
|
250
|
+
return /* @__PURE__ */ s(
|
|
251
|
+
L,
|
|
252
|
+
{
|
|
253
|
+
role: "listitem",
|
|
254
|
+
sx: {
|
|
255
|
+
height: x,
|
|
256
|
+
position: "absolute",
|
|
257
|
+
transform: `translateY(${N.start}px)`,
|
|
258
|
+
width: "100%",
|
|
259
|
+
bgcolor: "background.paper"
|
|
260
|
+
},
|
|
261
|
+
children: [
|
|
262
|
+
y && /* @__PURE__ */ e(Rt, { bgcolor: t, children: mt(D.date) }),
|
|
263
|
+
/* @__PURE__ */ e(
|
|
264
|
+
wt,
|
|
265
|
+
{
|
|
266
|
+
...o && { onClick: O },
|
|
267
|
+
transaction: D
|
|
268
|
+
}
|
|
269
|
+
),
|
|
270
|
+
/* @__PURE__ */ e(st, { sx: { ml: h ? 68 : 0 } })
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
D.guid
|
|
274
|
+
);
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
) }) });
|
|
279
|
+
}, Ht = V(Mt), Kt = ({ message: t, tipAriaLabel: r, onDismiss: n, onAction: i, sx: o }) => {
|
|
280
|
+
const c = i || n, T = i ? "chevron_right" : "close";
|
|
281
|
+
return /* @__PURE__ */ s(
|
|
282
|
+
l,
|
|
283
|
+
{
|
|
284
|
+
sx: {
|
|
285
|
+
backgroundColor: "primary.lighter",
|
|
286
|
+
borderRadius: "8px",
|
|
287
|
+
mb: 24,
|
|
288
|
+
mt: 12,
|
|
289
|
+
p: 12,
|
|
290
|
+
mx: 24,
|
|
291
|
+
alignItems: "flex-start",
|
|
292
|
+
justifyContent: "space-between",
|
|
293
|
+
flexDirection: "row",
|
|
294
|
+
gap: 8,
|
|
295
|
+
...o
|
|
296
|
+
},
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ s(l, { sx: { flexDirection: "row", gap: 4 }, children: [
|
|
299
|
+
/* @__PURE__ */ e(k, { color: "info", fill: !0, name: "lightbulb", size: 24 }),
|
|
300
|
+
/* @__PURE__ */ e($, { color: "primary.dark", fontWeight: 400, noWrap: !1, variant: "subtitle2", children: t })
|
|
301
|
+
] }),
|
|
302
|
+
c && /* @__PURE__ */ e(
|
|
303
|
+
ft,
|
|
304
|
+
{
|
|
305
|
+
"aria-label": r,
|
|
306
|
+
onClick: c,
|
|
307
|
+
size: "small",
|
|
308
|
+
sx: { minHeight: 0, minWidth: 0, p: 0 },
|
|
309
|
+
children: /* @__PURE__ */ e(k, { color: "primary", fill: !0, name: T, size: 20 })
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
}, $t = ({
|
|
316
|
+
ariaLabel: t,
|
|
317
|
+
beat: r,
|
|
318
|
+
chart: n,
|
|
319
|
+
children: i,
|
|
320
|
+
data: o,
|
|
321
|
+
defaultSelectedIndex: c,
|
|
322
|
+
icon: T,
|
|
323
|
+
onTabChange: g,
|
|
324
|
+
tipSection: C
|
|
325
|
+
}) => {
|
|
326
|
+
const { heading: d, subHeading: u } = r, _ = X(
|
|
327
|
+
() => c ?? (o.length ? o.length - 1 : 0),
|
|
328
|
+
[c, o.length]
|
|
329
|
+
), [a, p] = P(_), A = (S, O) => {
|
|
330
|
+
g?.(O), p(O);
|
|
331
|
+
}, b = (S) => {
|
|
332
|
+
p(S);
|
|
333
|
+
};
|
|
334
|
+
return /* @__PURE__ */ s(L, { sx: { bgcolor: "background.paper", width: "100%" }, children: [
|
|
335
|
+
/* @__PURE__ */ e(Nt, { "aria-label": t, onChange: A, value: a, variant: "fullWidth", children: o.map((S, O) => /* @__PURE__ */ e(
|
|
336
|
+
At,
|
|
337
|
+
{
|
|
338
|
+
id: `transaction-details-tab-${O}`,
|
|
339
|
+
label: S.label,
|
|
340
|
+
sx: { minWidth: "auto", px: 0 }
|
|
341
|
+
},
|
|
342
|
+
`${S.label}-${O}`
|
|
343
|
+
)) }),
|
|
344
|
+
/* @__PURE__ */ e(l, { sx: { pt: 16, px: 24 }, children: (d || u) && /* @__PURE__ */ s(l, { sx: { gap: 4 }, children: [
|
|
345
|
+
d && /* @__PURE__ */ e(tt, { children: d }),
|
|
346
|
+
u && /* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
347
|
+
T,
|
|
348
|
+
/* @__PURE__ */ e(m, { textTransform: "uppercase", variant: "body2", children: u.description })
|
|
349
|
+
] })
|
|
350
|
+
] }) }),
|
|
351
|
+
n?.(a, b),
|
|
352
|
+
C && /* @__PURE__ */ e(Kt, { ...C }),
|
|
353
|
+
i?.(a)
|
|
354
|
+
] });
|
|
355
|
+
}, Vt = (t) => {
|
|
356
|
+
const [r, n] = P({ width: 0, height: 0 });
|
|
357
|
+
return q(() => {
|
|
358
|
+
const i = () => {
|
|
359
|
+
if (t.current) {
|
|
360
|
+
const { offsetWidth: o, offsetHeight: c } = t.current;
|
|
361
|
+
n({ width: o, height: c });
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
return i(), window.addEventListener("resize", i), () => {
|
|
365
|
+
window.removeEventListener("resize", i);
|
|
366
|
+
};
|
|
367
|
+
}, [t]), r;
|
|
368
|
+
}, zt = ({
|
|
369
|
+
color: t,
|
|
370
|
+
legendStyle: r = {},
|
|
371
|
+
monthlyAmount: n,
|
|
372
|
+
monthlyAmountLabel: i,
|
|
373
|
+
trendAmount: o,
|
|
374
|
+
trendAmountLabel: c
|
|
375
|
+
}) => {
|
|
376
|
+
const T = M();
|
|
377
|
+
return /* @__PURE__ */ s(
|
|
378
|
+
l,
|
|
379
|
+
{
|
|
380
|
+
sx: {
|
|
381
|
+
alignItems: "center",
|
|
382
|
+
flexDirection: "row",
|
|
383
|
+
gap: 24,
|
|
384
|
+
justifyContent: "flex-start",
|
|
385
|
+
py: 4,
|
|
386
|
+
width: "100%",
|
|
387
|
+
...r
|
|
388
|
+
},
|
|
389
|
+
children: [
|
|
390
|
+
i && /* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
391
|
+
/* @__PURE__ */ e(
|
|
392
|
+
"svg",
|
|
393
|
+
{
|
|
394
|
+
"aria-hidden": "true",
|
|
395
|
+
"aria-labelledby": "chartLegendLabel",
|
|
396
|
+
fill: "none",
|
|
397
|
+
height: "12",
|
|
398
|
+
role: "figure",
|
|
399
|
+
width: "12",
|
|
400
|
+
children: /* @__PURE__ */ e("rect", { fill: t, height: "12", rx: "2", width: "12" })
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ s(m, { id: "chartLegendLabel", variant: "caption", children: [
|
|
404
|
+
i,
|
|
405
|
+
": ",
|
|
406
|
+
n
|
|
407
|
+
] })
|
|
408
|
+
] }),
|
|
409
|
+
c && /* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
410
|
+
/* @__PURE__ */ e(
|
|
411
|
+
"svg",
|
|
412
|
+
{
|
|
413
|
+
"aria-hidden": "true",
|
|
414
|
+
"aria-labelledby": "chartLegendLabel",
|
|
415
|
+
fill: "none",
|
|
416
|
+
height: "12",
|
|
417
|
+
role: "figure",
|
|
418
|
+
width: "12",
|
|
419
|
+
children: /* @__PURE__ */ e("rect", { fill: T.palette.chart.chart7, height: "12", rx: "2", width: "12" })
|
|
420
|
+
}
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ s(m, { id: "chartLegendLabel", variant: "caption", children: [
|
|
423
|
+
c,
|
|
424
|
+
": ",
|
|
425
|
+
o
|
|
426
|
+
] })
|
|
427
|
+
] })
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
}, Ut = (t, r) => {
|
|
432
|
+
if (t <= 0 || r <= 0) return "";
|
|
433
|
+
const n = Math.min(4, t / 2, r / 2);
|
|
434
|
+
return `M${n},0 L${t - n},0 Q${t},0 ${t},${n} L${t},${r} L0,${r} L0,${n} Q0,0 ${n},0 Z`;
|
|
435
|
+
}, Wt = ({
|
|
436
|
+
colorRange: t,
|
|
437
|
+
data: r,
|
|
438
|
+
dataIndex: n,
|
|
439
|
+
removeSelectedTabColorChange: i,
|
|
440
|
+
selectedTabIndex: o,
|
|
441
|
+
style: c,
|
|
442
|
+
...T
|
|
443
|
+
}) => {
|
|
444
|
+
const g = M(), { ariaLabel: C, formattedAmount: d } = r[n], u = o === n ? "bold" : 400, _ = c.x ?? 0, a = c.y ?? 0, p = c.width ?? 0, A = c.height ?? 0;
|
|
445
|
+
return /* @__PURE__ */ s("g", { "aria-label": C, children: [
|
|
446
|
+
/* @__PURE__ */ e(
|
|
447
|
+
"path",
|
|
448
|
+
{
|
|
449
|
+
...T,
|
|
450
|
+
d: Ut(p, A),
|
|
451
|
+
fill: t[n],
|
|
452
|
+
transform: `translate(${_}, ${a})`
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
/* @__PURE__ */ e(
|
|
456
|
+
"text",
|
|
457
|
+
{
|
|
458
|
+
fill: g.palette.text.primary,
|
|
459
|
+
fontSize: 11,
|
|
460
|
+
fontWeight: i ? "bold" : u,
|
|
461
|
+
textAnchor: "middle",
|
|
462
|
+
x: _ + p / 2,
|
|
463
|
+
y: a - 8,
|
|
464
|
+
children: d
|
|
465
|
+
}
|
|
466
|
+
)
|
|
467
|
+
] });
|
|
468
|
+
}, Bt = ({
|
|
469
|
+
amounts: t,
|
|
470
|
+
color: r,
|
|
471
|
+
data: n,
|
|
472
|
+
heightOverride: i,
|
|
473
|
+
margin: o = {
|
|
474
|
+
bottom: 30,
|
|
475
|
+
left: 40,
|
|
476
|
+
right: 40,
|
|
477
|
+
top: 20
|
|
478
|
+
},
|
|
479
|
+
onBarClick: c,
|
|
480
|
+
legendPosition: T = "bottom",
|
|
481
|
+
monthlyAmountLabel: g,
|
|
482
|
+
removeSelectedTabColorChange: C,
|
|
483
|
+
selectedTabIndex: d,
|
|
484
|
+
trendAmountLabel: u
|
|
485
|
+
}) => {
|
|
486
|
+
const _ = I.useRef(null), { height: a, width: p } = Vt(_), A = M(), b = I.useMemo(() => {
|
|
487
|
+
const h = n.map(({ value: R }) => R), x = Math.min(...h), E = Math.max(...h);
|
|
488
|
+
return {
|
|
489
|
+
series: [
|
|
490
|
+
{
|
|
491
|
+
data: h,
|
|
492
|
+
type: "bar"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
xAxis: [
|
|
496
|
+
{
|
|
497
|
+
data: n.map(({ label: R }) => R),
|
|
498
|
+
scaleType: "band",
|
|
499
|
+
categoryGapRatio: 0.45
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
yAxis: [
|
|
503
|
+
{
|
|
504
|
+
scaleType: "linear",
|
|
505
|
+
min: x < 0 ? x * 1.2 : 0,
|
|
506
|
+
max: E > 0 ? E : 0
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
};
|
|
510
|
+
}, [n]), S = I.useMemo(() => {
|
|
511
|
+
const h = `${r}80`;
|
|
512
|
+
return C ? n.map(() => r) : d == null ? [...new Array(n.length - 1).fill(h), r] : n.map((x, E) => E === d ? r : h);
|
|
513
|
+
}, [r, n, d]), O = I.useMemo(
|
|
514
|
+
() => n[d ?? n.length - 1],
|
|
515
|
+
[n, d]
|
|
516
|
+
), f = n.reduce((h, x) => Math.min(h, x.value), 1 / 0) < 0, N = /* @__PURE__ */ e(
|
|
517
|
+
zt,
|
|
518
|
+
{
|
|
519
|
+
color: r,
|
|
520
|
+
legendStyle: { pl: o.left },
|
|
521
|
+
monthlyAmount: O.formattedAmount,
|
|
522
|
+
monthlyAmountLabel: g,
|
|
523
|
+
trendAmount: t?.formattedAverage,
|
|
524
|
+
trendAmountLabel: u
|
|
525
|
+
}
|
|
526
|
+
), D = g || u, y = (h, { dataIndex: x }) => c?.(x);
|
|
527
|
+
return /* @__PURE__ */ s(l, { sx: { alignItems: "center", width: "100%" }, children: [
|
|
528
|
+
D && T === "top" && N,
|
|
529
|
+
/* @__PURE__ */ e(
|
|
530
|
+
L,
|
|
531
|
+
{
|
|
532
|
+
ref: _,
|
|
533
|
+
sx: {
|
|
534
|
+
height: i || 122,
|
|
535
|
+
mb: T === "top" ? 0 : 4,
|
|
536
|
+
mt: T === "top" ? 4 : 0,
|
|
537
|
+
touchAction: "pan-y",
|
|
538
|
+
width: "100%",
|
|
539
|
+
"& svg": {
|
|
540
|
+
touchAction: "pan-y",
|
|
541
|
+
userSelect: "none"
|
|
542
|
+
},
|
|
543
|
+
"& .recharts-wrapper": {
|
|
544
|
+
touchAction: "pan-y"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
children: /* @__PURE__ */ s(
|
|
548
|
+
xt,
|
|
549
|
+
{
|
|
550
|
+
height: a,
|
|
551
|
+
margin: {
|
|
552
|
+
bottom: o.bottom,
|
|
553
|
+
left: o.left,
|
|
554
|
+
right: o.right,
|
|
555
|
+
top: o.top || 45
|
|
556
|
+
},
|
|
557
|
+
series: b.series,
|
|
558
|
+
width: p,
|
|
559
|
+
xAxis: b.xAxis,
|
|
560
|
+
yAxis: [{ width: 0 }],
|
|
561
|
+
children: [
|
|
562
|
+
t?.average && /* @__PURE__ */ e(
|
|
563
|
+
U,
|
|
564
|
+
{
|
|
565
|
+
labelAlign: "middle",
|
|
566
|
+
lineStyle: {
|
|
567
|
+
stroke: A.palette.chart.chart7,
|
|
568
|
+
strokeDasharray: "4",
|
|
569
|
+
strokeLinecap: "round",
|
|
570
|
+
strokeWidth: 1
|
|
571
|
+
},
|
|
572
|
+
y: t?.average
|
|
573
|
+
}
|
|
574
|
+
),
|
|
575
|
+
f && /* @__PURE__ */ e(
|
|
576
|
+
U,
|
|
577
|
+
{
|
|
578
|
+
labelAlign: "middle",
|
|
579
|
+
lineStyle: {
|
|
580
|
+
stroke: A.palette.chart.chart7
|
|
581
|
+
},
|
|
582
|
+
y: 0
|
|
583
|
+
}
|
|
584
|
+
),
|
|
585
|
+
/* @__PURE__ */ e(
|
|
586
|
+
St,
|
|
587
|
+
{
|
|
588
|
+
position: "bottom",
|
|
589
|
+
slots: {
|
|
590
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
591
|
+
axisTickLabel: ({ text: h, ownerState: x, ...E }) => {
|
|
592
|
+
const R = n[d ?? n.length - 1]?.label;
|
|
593
|
+
return /* @__PURE__ */ e(
|
|
594
|
+
"text",
|
|
595
|
+
{
|
|
596
|
+
...E,
|
|
597
|
+
style: {
|
|
598
|
+
...E.style,
|
|
599
|
+
fontWeight: !C && R === h ? "bold" : 400
|
|
600
|
+
},
|
|
601
|
+
children: h
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
sx: (h) => ({
|
|
607
|
+
"& .MuiChartsAxis-line": {
|
|
608
|
+
stroke: f ? "none" : h.palette.text?.primary
|
|
609
|
+
},
|
|
610
|
+
"& .MuiChartsAxis-tickContainer:first-of-type .MuiChartsAxis-tick": {
|
|
611
|
+
display: "none"
|
|
612
|
+
},
|
|
613
|
+
"& .MuiChartsAxis-tickLabel": {
|
|
614
|
+
transform: f ? "translateY(15px)" : {}
|
|
615
|
+
}
|
|
616
|
+
}),
|
|
617
|
+
tickLabelStyle: {
|
|
618
|
+
fontSize: 11
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
/* @__PURE__ */ e(
|
|
623
|
+
Ot,
|
|
624
|
+
{
|
|
625
|
+
onItemClick: y,
|
|
626
|
+
slots: {
|
|
627
|
+
bar: (h) => {
|
|
628
|
+
const { ownerState: x, ...E } = h;
|
|
629
|
+
return /* @__PURE__ */ e(
|
|
630
|
+
Wt,
|
|
631
|
+
{
|
|
632
|
+
...E,
|
|
633
|
+
colorRange: S,
|
|
634
|
+
data: n,
|
|
635
|
+
dataIndex: x.dataIndex,
|
|
636
|
+
removeSelectedTabColorChange: C,
|
|
637
|
+
selectedTabIndex: d ?? n.length - 1,
|
|
638
|
+
style: {
|
|
639
|
+
height: h.height,
|
|
640
|
+
x: h.x,
|
|
641
|
+
y: h.y,
|
|
642
|
+
width: h.width
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
]
|
|
651
|
+
}
|
|
652
|
+
)
|
|
653
|
+
}
|
|
654
|
+
),
|
|
655
|
+
D && T === "bottom" && N
|
|
656
|
+
] });
|
|
657
|
+
}, Se = ({
|
|
658
|
+
ariaLabel: t,
|
|
659
|
+
barChartProps: r,
|
|
660
|
+
beat: n,
|
|
661
|
+
data: i,
|
|
662
|
+
defaultSelectedIndex: o = 0,
|
|
663
|
+
icon: c,
|
|
664
|
+
isOpen: T = !1,
|
|
665
|
+
onClose: g,
|
|
666
|
+
onTabChange: C,
|
|
667
|
+
tipSection: d,
|
|
668
|
+
title: u,
|
|
669
|
+
transactionListProps: _ = {}
|
|
670
|
+
}) => {
|
|
671
|
+
const { common: a, transactions: p } = z(), { isCopyLoaded: A } = Tt(), { sortedTransactionsWithSplits: b, tags: S } = G();
|
|
672
|
+
return A ? /* @__PURE__ */ e(It, { ariaLabelClose: a.close_aria, isOpen: T, onClose: g, title: u, children: /* @__PURE__ */ e(
|
|
673
|
+
$t,
|
|
674
|
+
{
|
|
675
|
+
ariaLabel: t,
|
|
676
|
+
beat: n,
|
|
677
|
+
chart: (O, w) => /* @__PURE__ */ e(L, { sx: { pt: 16 }, children: /* @__PURE__ */ e(
|
|
678
|
+
Bt,
|
|
679
|
+
{
|
|
680
|
+
...r,
|
|
681
|
+
onBarClick: (f) => {
|
|
682
|
+
w(f), r.onBarClick?.(f);
|
|
683
|
+
},
|
|
684
|
+
selectedTabIndex: O
|
|
685
|
+
}
|
|
686
|
+
) }),
|
|
687
|
+
data: i,
|
|
688
|
+
defaultSelectedIndex: o,
|
|
689
|
+
icon: c,
|
|
690
|
+
onTabChange: C,
|
|
691
|
+
tipSection: d,
|
|
692
|
+
children: () => /* @__PURE__ */ s(I.Fragment, { children: [
|
|
693
|
+
/* @__PURE__ */ s(
|
|
694
|
+
l,
|
|
695
|
+
{
|
|
696
|
+
sx: {
|
|
697
|
+
alignItems: "center",
|
|
698
|
+
borderBottomColor: "divider",
|
|
699
|
+
borderBottomStyle: "solid",
|
|
700
|
+
borderBottomWidth: 1,
|
|
701
|
+
flexDirection: "row",
|
|
702
|
+
justifyContent: "space-between",
|
|
703
|
+
pb: 4,
|
|
704
|
+
pt: 16,
|
|
705
|
+
px: 24
|
|
706
|
+
},
|
|
707
|
+
children: [
|
|
708
|
+
/* @__PURE__ */ e(m, { bold: !0, variant: "body1", children: p.transactions_title }),
|
|
709
|
+
(_?.transaction || b.length > 0) && /* @__PURE__ */ e(
|
|
710
|
+
Y,
|
|
711
|
+
{
|
|
712
|
+
onClick: () => {
|
|
713
|
+
ot(
|
|
714
|
+
_?.transaction || b,
|
|
715
|
+
S
|
|
716
|
+
);
|
|
717
|
+
},
|
|
718
|
+
startIcon: /* @__PURE__ */ e(rt, { name: "ios_share" }),
|
|
719
|
+
sx: { height: 28 },
|
|
720
|
+
children: /* @__PURE__ */ e(m, { bold: !0, variant: "body2", children: p.export_csv_btn })
|
|
721
|
+
}
|
|
722
|
+
)
|
|
723
|
+
]
|
|
724
|
+
}
|
|
725
|
+
),
|
|
726
|
+
/* @__PURE__ */ e(Ht, { ..._ })
|
|
727
|
+
] })
|
|
728
|
+
}
|
|
729
|
+
) }) : /* @__PURE__ */ e(Z, {});
|
|
730
|
+
}, Oe = ({
|
|
731
|
+
amount: t,
|
|
732
|
+
borderRadius: r = "2px",
|
|
733
|
+
count: n,
|
|
734
|
+
completeColor: i = "success.main",
|
|
735
|
+
icon: o,
|
|
736
|
+
label: c,
|
|
737
|
+
leftLabel: T,
|
|
738
|
+
percentComplete: g = 0,
|
|
739
|
+
rightLabel: C,
|
|
740
|
+
sx: d
|
|
741
|
+
}) => /* @__PURE__ */ s(l, { className: "details-container", sx: { p: 24, width: "100%", gap: 16, ...d }, children: [
|
|
742
|
+
/* @__PURE__ */ s(l, { sx: { alignItems: "center", flexDirection: "row", gap: 12 }, children: [
|
|
743
|
+
/* @__PURE__ */ e(L, { children: o }),
|
|
744
|
+
/* @__PURE__ */ s(l, { children: [
|
|
745
|
+
typeof c == "string" ? /* @__PURE__ */ e($, { dangerouslySetInnerHTML: { __html: c }, variant: "body2" }) : c,
|
|
746
|
+
typeof t == "string" ? /* @__PURE__ */ e(et, { children: t }) : t
|
|
747
|
+
] })
|
|
748
|
+
] }),
|
|
749
|
+
/* @__PURE__ */ s(l, { sx: { gap: 4 }, children: [
|
|
750
|
+
/* @__PURE__ */ e(
|
|
751
|
+
l,
|
|
752
|
+
{
|
|
753
|
+
sx: {
|
|
754
|
+
bgcolor: "divider",
|
|
755
|
+
borderRadius: r,
|
|
756
|
+
flexDirection: "row",
|
|
757
|
+
height: n ? 20 : 16,
|
|
758
|
+
width: "100%"
|
|
759
|
+
},
|
|
760
|
+
children: /* @__PURE__ */ e(
|
|
761
|
+
L,
|
|
762
|
+
{
|
|
763
|
+
sx: {
|
|
764
|
+
alignItems: "center",
|
|
765
|
+
display: "flex",
|
|
766
|
+
py: 2,
|
|
767
|
+
px: 12,
|
|
768
|
+
bgcolor: i,
|
|
769
|
+
borderRadius: r,
|
|
770
|
+
height: n ? 20 : 16,
|
|
771
|
+
width: `${g}%`
|
|
772
|
+
},
|
|
773
|
+
children: /* @__PURE__ */ e(m, { sx: { color: "primary.dark" }, variant: "caption", children: n })
|
|
774
|
+
}
|
|
775
|
+
)
|
|
776
|
+
}
|
|
777
|
+
),
|
|
778
|
+
!n && /* @__PURE__ */ s(l, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
779
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: T }),
|
|
780
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: C })
|
|
781
|
+
] })
|
|
782
|
+
] })
|
|
783
|
+
] }), De = ({
|
|
784
|
+
title: t,
|
|
785
|
+
description: r,
|
|
786
|
+
callToAction: n,
|
|
787
|
+
instanceSlot: i = void 0,
|
|
788
|
+
onCtaClick: o = () => {
|
|
789
|
+
}
|
|
790
|
+
}) => /* @__PURE__ */ s(Dt, { sx: { pt: 8, pr: 16, pb: 12, pl: 8, borderRadius: "8px" }, children: [
|
|
791
|
+
/* @__PURE__ */ e(
|
|
792
|
+
l,
|
|
793
|
+
{
|
|
794
|
+
sx: {
|
|
795
|
+
flexDirection: "row",
|
|
796
|
+
alignItems: "center",
|
|
797
|
+
justifyContent: "space-between",
|
|
798
|
+
pt: 4,
|
|
799
|
+
pl: 8
|
|
800
|
+
},
|
|
801
|
+
children: /* @__PURE__ */ e(m, { bold: !0, variant: "body1", children: t })
|
|
802
|
+
}
|
|
803
|
+
),
|
|
804
|
+
/* @__PURE__ */ s(
|
|
805
|
+
l,
|
|
806
|
+
{
|
|
807
|
+
sx: {
|
|
808
|
+
gap: 16,
|
|
809
|
+
alignItems: "center",
|
|
810
|
+
flexDirection: "row",
|
|
811
|
+
justifyContent: "space-between"
|
|
812
|
+
},
|
|
813
|
+
children: [
|
|
814
|
+
/* @__PURE__ */ s(l, { children: [
|
|
815
|
+
/* @__PURE__ */ e(l, { sx: { pt: 2, pl: 8, pb: 8 }, children: /* @__PURE__ */ e($, { sx: { fontWeight: 400 }, variant: "subtitle2", children: r }) }),
|
|
816
|
+
/* @__PURE__ */ e(l, { sx: { alignItems: "flex-start" }, children: /* @__PURE__ */ e(
|
|
817
|
+
Y,
|
|
818
|
+
{
|
|
819
|
+
onClick: o,
|
|
820
|
+
sx: {
|
|
821
|
+
p: 0,
|
|
822
|
+
height: 24,
|
|
823
|
+
px: 8,
|
|
824
|
+
py: 8,
|
|
825
|
+
fontWeight: 600,
|
|
826
|
+
fontSize: 13,
|
|
827
|
+
lineHeight: "16px"
|
|
828
|
+
},
|
|
829
|
+
variant: "text",
|
|
830
|
+
children: n
|
|
831
|
+
}
|
|
832
|
+
) })
|
|
833
|
+
] }),
|
|
834
|
+
i
|
|
835
|
+
]
|
|
836
|
+
}
|
|
837
|
+
)
|
|
838
|
+
] });
|
|
839
|
+
export {
|
|
840
|
+
Bt as B,
|
|
841
|
+
Se as C,
|
|
842
|
+
De as E,
|
|
843
|
+
bt as O,
|
|
844
|
+
Rt as S,
|
|
845
|
+
Ht as T,
|
|
846
|
+
wt as a,
|
|
847
|
+
Oe as b,
|
|
848
|
+
Ie as c,
|
|
849
|
+
xe as d,
|
|
850
|
+
Vt as e,
|
|
851
|
+
$t as f,
|
|
852
|
+
Gt as h,
|
|
853
|
+
fe as p,
|
|
854
|
+
W as s,
|
|
855
|
+
K as u
|
|
856
|
+
};
|