@mx-cartographer/experiences 8.1.10 → 8.2.0-alpha.bb0
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-BTOmbrEK.mjs} +5 -5
- package/dist/{Account-BIKn4XEZ.mjs → Account-DC2d-cjn.mjs} +1 -1
- package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-IDZ6GTT0.mjs} +10 -10
- package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-BRAl-Hro.mjs} +6 -6
- package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-B8koowMf.mjs} +7 -7
- package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-Bc-SndzX.mjs} +1 -1
- package/dist/{Analytics-CxK7O19c.mjs → Analytics-vgPYa2Zt.mjs} +1 -1
- package/dist/AnalyticsApi-DwgSyZ6m.mjs +102 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
- package/dist/BudgetUtil-CGchXaek.mjs +74 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
- package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-nHEBR24E.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-C7r7JqVu.mjs +371 -0
- package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-BUd8mAcE.mjs} +15 -16
- package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-Dd3NxFYY.mjs} +1 -1
- package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-BSktnUw6.mjs} +6 -7
- package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bdm-ZxFw.mjs} +1 -1
- package/dist/DebtUtils-DPn1cXKG.mjs +153 -0
- package/dist/EmbeddedCard-CAY_HJjE.mjs +856 -0
- package/dist/Error-Dogaw2jO.mjs +84 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
- package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-DzeJOb_g.mjs} +6 -5
- package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
- package/dist/GlobalCopyApi-C75qVBk6.mjs +30 -0
- package/dist/GoalsUtil-B-Z6fq_t.mjs +107 -0
- package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
- package/dist/{Help-C_CM4gpK.mjs → Help-HoxJgoVt.mjs} +68 -67
- package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
- package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-DNynWPGz.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-Li21_krp.mjs +37 -0
- package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-C_FjST7B.mjs} +24 -24
- package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
- package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
- package/dist/NetWorthUtils-CyVz9bUn.mjs +95 -0
- package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-B8pH9TOv.mjs} +13 -13
- package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
- package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting-Dnk0YyfZ.mjs} +1 -1
- package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-BEBuqeS1.mjs} +4 -4
- package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-eQb1AS5x.mjs} +9 -9
- package/dist/RecurringTransactionsUtil-DbMNqEu_.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-CktOElG1.mjs} +6 -6
- package/dist/{SpendingLegend-DLElSvH0.mjs → SpendingLegend-CM5L_1Ka.mjs} +4 -4
- package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-BP-sFltN.mjs} +33 -33
- package/dist/TransactionUtils-CvJW9wDu.mjs +234 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
- package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-DWOpU5L8.mjs} +28 -30
- package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-CAgbD0ZS.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 +52 -54
- 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 +21 -21
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +203 -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 +3060 -88
- 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 +2 -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 +67 -71
- 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
package/dist/trends/index.es.js
CHANGED
|
@@ -17,56 +17,56 @@ import tt from "@mui/material/Card";
|
|
|
17
17
|
import ot from "@mui/material/CardContent";
|
|
18
18
|
import Ne from "@mui/material/Divider";
|
|
19
19
|
import ze from "@mui/material/Grid";
|
|
20
|
-
import {
|
|
21
|
-
import { b as rt } from "../
|
|
22
|
-
import { C as xe } from "../CurrencyText-
|
|
23
|
-
import { a as Re,
|
|
24
|
-
import { f as X, D as G } from "../DateFormats-
|
|
25
|
-
import { f as se, a as Ot } from "../NumberFormatting-
|
|
26
|
-
import { a as Ke, c as Gt, g as Bt
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import Kt from "@mui/material/
|
|
30
|
-
import Yt from "@mui/material/ToggleButtonGroup";
|
|
20
|
+
import { b as nt } from "../Localization-Li21_krp.mjs";
|
|
21
|
+
import { u as R, l as Q, g as $, b as fe, h as ve, d as De, B as ye, D as st, f as Be, a as rt } from "../hooks-BaO_gOI6.mjs";
|
|
22
|
+
import { C as xe } from "../CurrencyText-Dd3NxFYY.mjs";
|
|
23
|
+
import { a as Re, C as $e, b as Wt } from "../Category-DEKZGLYe.mjs";
|
|
24
|
+
import { f as X, D as G } from "../DateFormats-BSktnUw6.mjs";
|
|
25
|
+
import { f as se, a as Ot } from "../NumberFormatting-Dnk0YyfZ.mjs";
|
|
26
|
+
import { a as Ke, c as Gt, g as Bt } from "../TrendsUtil-D9z3kIj_.mjs";
|
|
27
|
+
import { c as Pt, i as Vt, d as Ft, e as zt, g as at, b as it, f as Ye } from "../SpendingData-CktOElG1.mjs";
|
|
28
|
+
import $t from "@mui/material/ToggleButton";
|
|
29
|
+
import Kt from "@mui/material/ToggleButtonGroup";
|
|
31
30
|
import { parseISO as lt } from "date-fns/parseISO";
|
|
32
31
|
import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
|
|
33
|
-
import { T as W, a as
|
|
34
|
-
import { useGridApiContext as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
32
|
+
import { T as W, a as Yt } from "../ViewMoreMicroCard-DWOpU5L8.mjs";
|
|
33
|
+
import { useGridApiContext as jt, useGridRootProps as Ut, DataGridPro as Xt } from "@mui/x-data-grid-pro";
|
|
34
|
+
import Zt from "@mui/material/Badge";
|
|
35
|
+
import Qt from "@mui/material/IconButton";
|
|
37
36
|
import { A as v } from "../Analytics-CzGzz_sE.mjs";
|
|
38
|
-
import { T as ct } from "../EmbeddedCard-
|
|
39
|
-
import { T as dt } from "../TransactionDetails-
|
|
37
|
+
import { T as ct } from "../EmbeddedCard-CAY_HJjE.mjs";
|
|
38
|
+
import { T as dt } from "../TransactionDetails-BP-sFltN.mjs";
|
|
40
39
|
import { D as Pe } from "../Drawer-XPaLYjiO.mjs";
|
|
41
|
-
import { u as Ie } from "../useWidgetLoadTimer-
|
|
40
|
+
import { u as Ie } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
42
41
|
import { L as Le } from "../Loader-CxeBwuPG.mjs";
|
|
43
|
-
import { W as ut } from "../WidgetContainer-
|
|
44
|
-
import { L as Ve } from "../LineChart-
|
|
45
|
-
import { M as
|
|
46
|
-
import { subMonths as
|
|
47
|
-
import { TrendingUp as
|
|
48
|
-
import { M as
|
|
49
|
-
import
|
|
42
|
+
import { W as ut } from "../WidgetContainer-CAgbD0ZS.mjs";
|
|
43
|
+
import { L as Ve } from "../LineChart-DNynWPGz.mjs";
|
|
44
|
+
import { M as qt } from "../MiniWidgetContainer-BdPiUU-u.mjs";
|
|
45
|
+
import { subMonths as Jt } from "date-fns";
|
|
46
|
+
import { TrendingUp as eo, TrendingDown as to, MultilineChart as oo, ExpandLess as no, ExpandMore as so, ChevronRight as ro, ArrowBack as ao } from "@mxenabled/mx-icons";
|
|
47
|
+
import { M as io } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
48
|
+
import lo from "@mui/material/Collapse";
|
|
50
49
|
import We from "@mui/material/List";
|
|
51
50
|
import mt from "@mui/material/ListItem";
|
|
52
|
-
import
|
|
53
|
-
import
|
|
51
|
+
import co from "@mui/material/ListItemButton";
|
|
52
|
+
import uo from "@mui/material/ListItemIcon";
|
|
54
53
|
import ht from "@mui/material/ListItemText";
|
|
55
54
|
import gt from "@mui/material/styles/useTheme";
|
|
56
|
-
import {
|
|
55
|
+
import { g as Oe } from "../TransactionUtils-CvJW9wDu.mjs";
|
|
56
|
+
import { L as mo } from "../ListItemRow-kH1rn8Xu.mjs";
|
|
57
57
|
import { Stack as ho } from "@mui/material";
|
|
58
58
|
import go from "@mui/material/ListItemAvatar";
|
|
59
|
-
import { E as po } from "../ExportCsvAction-
|
|
60
|
-
import { u as fo } from "../useInsightsEnabled-
|
|
59
|
+
import { E as po } from "../ExportCsvAction-DzeJOb_g.mjs";
|
|
60
|
+
import { u as fo } from "../useInsightsEnabled-DaNLPmUU.mjs";
|
|
61
61
|
import { E as yo } from "../EmptyState-DHAkGsjk.mjs";
|
|
62
|
-
import { C as Co } from "../ConnectDrawer-
|
|
62
|
+
import { C as Co } from "../ConnectDrawer-DgfsTpyW.mjs";
|
|
63
63
|
const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
64
64
|
const { categories: s } = R(), { getCategoryName: o } = Q(), r = o(t);
|
|
65
65
|
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
66
66
|
/* @__PURE__ */ e(
|
|
67
67
|
H,
|
|
68
68
|
{
|
|
69
|
-
"aria-label":
|
|
69
|
+
"aria-label": nt(s.category_icon_label_aria, r),
|
|
70
70
|
mb: 4,
|
|
71
71
|
role: "img",
|
|
72
72
|
children: /* @__PURE__ */ e(we, { categoryGuid: n })
|
|
@@ -426,7 +426,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
426
426
|
}, ft = ({ selectedTab: t, onTabChange: n }) => {
|
|
427
427
|
const { common: s } = R();
|
|
428
428
|
return /* @__PURE__ */ e(
|
|
429
|
-
|
|
429
|
+
Kt,
|
|
430
430
|
{
|
|
431
431
|
"aria-label": s.view_toggle,
|
|
432
432
|
exclusive: !0,
|
|
@@ -434,7 +434,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
434
434
|
orientation: "horizontal",
|
|
435
435
|
value: t,
|
|
436
436
|
children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
|
|
437
|
-
|
|
437
|
+
$t,
|
|
438
438
|
{
|
|
439
439
|
"aria-label": o === "Chart" ? s.view_chart : s.view_table,
|
|
440
440
|
"aria-pressed": t === o,
|
|
@@ -567,7 +567,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
|
|
|
567
567
|
const a = r.monthlyAmounts.reduce(Xe(o), 0);
|
|
568
568
|
a !== 0 && c.push({
|
|
569
569
|
id: `sub-${r.guid}`,
|
|
570
|
-
category:
|
|
570
|
+
category: nt(n.category_general, r.name),
|
|
571
571
|
category_guid: r.guid,
|
|
572
572
|
isParent: !0,
|
|
573
573
|
top_level_category_guid: r.guid,
|
|
@@ -589,7 +589,7 @@ function Lo({
|
|
|
589
589
|
className: r,
|
|
590
590
|
field: c
|
|
591
591
|
}) {
|
|
592
|
-
const a =
|
|
592
|
+
const a = jt(), d = Ut();
|
|
593
593
|
let u = null;
|
|
594
594
|
const i = {};
|
|
595
595
|
if (t === "asc" ? u = d.slots.columnSortedAscendingIcon : t === "desc" ? u = d.slots.columnSortedDescendingIcon : (u = d.slots.columnUnsortedIcon ?? null, i.sortingOrder = s), !u) return null;
|
|
@@ -597,7 +597,7 @@ function Lo({
|
|
|
597
597
|
let _ = "";
|
|
598
598
|
t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
|
|
599
599
|
const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, y = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...i }), T = /* @__PURE__ */ e(
|
|
600
|
-
|
|
600
|
+
Qt,
|
|
601
601
|
{
|
|
602
602
|
disabled: o,
|
|
603
603
|
size: "small",
|
|
@@ -609,7 +609,7 @@ function Lo({
|
|
|
609
609
|
children: y
|
|
610
610
|
}
|
|
611
611
|
);
|
|
612
|
-
return /* @__PURE__ */ e(Io, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(
|
|
612
|
+
return /* @__PURE__ */ e(Io, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(Zt, { badgeContent: n, color: "default", overlap: "circular", children: T }) : T });
|
|
613
613
|
}
|
|
614
614
|
const Eo = g.memo(Lo), Qe = ({
|
|
615
615
|
columns: t,
|
|
@@ -620,7 +620,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
620
620
|
}) => {
|
|
621
621
|
const c = re(), { onEvent: a } = $(), d = c.palette.mode === "light";
|
|
622
622
|
return /* @__PURE__ */ e(
|
|
623
|
-
|
|
623
|
+
Xt,
|
|
624
624
|
{
|
|
625
625
|
columns: t,
|
|
626
626
|
disableColumnFilter: !0,
|
|
@@ -793,10 +793,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
793
793
|
x.end
|
|
794
794
|
), l = O.length ? D.filter(
|
|
795
795
|
(b) => b.top_level_category_guid === O || b.category_guid === O
|
|
796
|
-
) :
|
|
796
|
+
) : Pt(D);
|
|
797
797
|
return {
|
|
798
|
-
stackedDatasets: l.filter(
|
|
799
|
-
unstackedDatasets: l.filter(
|
|
798
|
+
stackedDatasets: l.filter(Ft),
|
|
799
|
+
unstackedDatasets: l.filter(Vt)
|
|
800
800
|
};
|
|
801
801
|
}, [h, O, x]), U = (D, l) => {
|
|
802
802
|
V(l ?? P), o(v.TRENDS_CLICK_TOGGLE_VIEW);
|
|
@@ -900,8 +900,8 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
900
900
|
]
|
|
901
901
|
}
|
|
902
902
|
);
|
|
903
|
-
},
|
|
904
|
-
const { monthlyCategoryTotals: t } = Q(), { trends: n } = R(), s = re(), { availableHeight: o = 300 } =
|
|
903
|
+
}, is = A(ko), Ho = () => {
|
|
904
|
+
const { monthlyCategoryTotals: t } = Q(), { trends: n } = R(), s = re(), { availableHeight: o = 300 } = st(), r = g.useMemo(() => zt(t), [t]);
|
|
905
905
|
return /* @__PURE__ */ e(
|
|
906
906
|
Ve,
|
|
907
907
|
{
|
|
@@ -928,7 +928,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
928
928
|
}), g.useEffect(() => {
|
|
929
929
|
a && s && r(u).finally();
|
|
930
930
|
}, [s, a, u]), !s || !a || !c ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
931
|
-
|
|
931
|
+
qt,
|
|
932
932
|
{
|
|
933
933
|
contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
|
|
934
934
|
onPrimaryCtaClick: t,
|
|
@@ -939,7 +939,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
939
939
|
children: /* @__PURE__ */ e(No, {})
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
},
|
|
942
|
+
}, ls = A(Wo), Oo = 70, qe = ({
|
|
943
943
|
title: t,
|
|
944
944
|
totalAmount: n,
|
|
945
945
|
transactionType: s,
|
|
@@ -947,7 +947,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
947
947
|
secondaryLabel: r,
|
|
948
948
|
shouldDisplayPercentage: c
|
|
949
949
|
}) => {
|
|
950
|
-
const { availableWidth: a } =
|
|
950
|
+
const { availableWidth: a } = st(), d = g.useRef(null), u = g.useRef(null), i = Ot(Number(Math.abs(o)), {
|
|
951
951
|
style: "percent",
|
|
952
952
|
minimumIntegerDigits: 1
|
|
953
953
|
}), f = a === 288 && se(n, "0,0.00").length > 10 ? se(n, "0,0") : se(n, "0,0.00"), m = s === "spending" ? o > 0 : o >= 0, _ = s === "spending" ? "error.main" : "success.main", h = s === "spending" ? "success.main" : "text.secondary", p = d?.current, y = u?.current, T = p && y ? p.scrollWidth > y.clientWidth - Oo : !1;
|
|
@@ -975,7 +975,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
975
975
|
children: [
|
|
976
976
|
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
|
|
977
977
|
c && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
978
|
-
m ? /* @__PURE__ */ e(
|
|
978
|
+
m ? /* @__PURE__ */ e(eo, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(to, { size: 20, sx: { color: h } }),
|
|
979
979
|
/* @__PURE__ */ e(
|
|
980
980
|
pe,
|
|
981
981
|
{
|
|
@@ -1026,19 +1026,19 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1026
1026
|
}, Go = A(() => {
|
|
1027
1027
|
const { trends: t } = R();
|
|
1028
1028
|
return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
1029
|
-
/* @__PURE__ */ e(
|
|
1029
|
+
/* @__PURE__ */ e(oo, { size: 32 }),
|
|
1030
1030
|
/* @__PURE__ */ C(S, { children: [
|
|
1031
1031
|
/* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
1032
1032
|
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
1033
1033
|
] })
|
|
1034
1034
|
] });
|
|
1035
|
-
}),
|
|
1035
|
+
}), cs = A(({ onCtaClick: t }) => {
|
|
1036
1036
|
const { isAccountDataLoaded: n, loadAccountData: s, visibleAccounts: o } = De();
|
|
1037
1037
|
g.useEffect(() => {
|
|
1038
1038
|
n || s().finally();
|
|
1039
1039
|
}, []);
|
|
1040
1040
|
const { onEvent: r } = $(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: d } = Q(), u = {
|
|
1041
|
-
start:
|
|
1041
|
+
start: Jt(/* @__PURE__ */ new Date(), 1),
|
|
1042
1042
|
end: /* @__PURE__ */ new Date()
|
|
1043
1043
|
}, { trends: i } = R(), { selectedAccounts: f, isInitialized: m } = fe();
|
|
1044
1044
|
Ie({
|
|
@@ -1063,7 +1063,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1063
1063
|
), t();
|
|
1064
1064
|
};
|
|
1065
1065
|
return !d || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
1066
|
-
|
|
1066
|
+
io,
|
|
1067
1067
|
{
|
|
1068
1068
|
className: "mx-trends-microwidget",
|
|
1069
1069
|
ctaLabel: i.micro_primary_cta_label,
|
|
@@ -1109,14 +1109,14 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1109
1109
|
}), Bo = A(
|
|
1110
1110
|
({ isExpanded: t, onClick: n }) => {
|
|
1111
1111
|
const s = gt();
|
|
1112
|
-
return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(
|
|
1112
|
+
return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(co, { onClick: n, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
|
|
1113
1113
|
S,
|
|
1114
1114
|
{
|
|
1115
1115
|
sx: { color: s.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
1116
1116
|
children: [
|
|
1117
1117
|
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(z, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
|
|
1118
|
-
/* @__PURE__ */ e(
|
|
1119
|
-
|
|
1118
|
+
/* @__PURE__ */ e(uo, { sx: { color: s.palette.primary.main }, children: t ? /* @__PURE__ */ e(no, {}) : /* @__PURE__ */ e(
|
|
1119
|
+
so,
|
|
1120
1120
|
{
|
|
1121
1121
|
sx: {
|
|
1122
1122
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -1146,7 +1146,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1146
1146
|
};
|
|
1147
1147
|
return /* @__PURE__ */ C(g.Fragment, { children: [
|
|
1148
1148
|
/* @__PURE__ */ e(
|
|
1149
|
-
|
|
1149
|
+
mo,
|
|
1150
1150
|
{
|
|
1151
1151
|
leftIcon: n ? /* @__PURE__ */ e(
|
|
1152
1152
|
we,
|
|
@@ -1161,7 +1161,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1161
1161
|
) : void 0,
|
|
1162
1162
|
onClick: m,
|
|
1163
1163
|
rightContent: se(Math.abs(t), "0,0.00"),
|
|
1164
|
-
rightIcon: r ? /* @__PURE__ */ e(
|
|
1164
|
+
rightIcon: r ? /* @__PURE__ */ e(ro, {}) : void 0,
|
|
1165
1165
|
subtitle: f,
|
|
1166
1166
|
title: s
|
|
1167
1167
|
}
|
|
@@ -1195,7 +1195,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1195
1195
|
p.guid
|
|
1196
1196
|
)),
|
|
1197
1197
|
/* @__PURE__ */ e(
|
|
1198
|
-
|
|
1198
|
+
lo,
|
|
1199
1199
|
{
|
|
1200
1200
|
component: "li",
|
|
1201
1201
|
in: i,
|
|
@@ -1224,7 +1224,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1224
1224
|
n?.(T), s(v.TRENDS_CLICK_INSIGHT, W);
|
|
1225
1225
|
}, h = i ? 200 : 170, p = i ? 170 : 124, y = t.length > 0 ? h : p;
|
|
1226
1226
|
return /* @__PURE__ */ e(ho, { sx: { height: y }, children: /* @__PURE__ */ e(
|
|
1227
|
-
|
|
1227
|
+
Yt,
|
|
1228
1228
|
{
|
|
1229
1229
|
areBeatsLoading: a.isLoading,
|
|
1230
1230
|
beats: t,
|
|
@@ -1277,7 +1277,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1277
1277
|
}
|
|
1278
1278
|
) });
|
|
1279
1279
|
}), $o = A(() => {
|
|
1280
|
-
const t = gt(), { is_mobile_webview: n } =
|
|
1280
|
+
const t = gt(), { is_mobile_webview: n } = rt(), { isDesktop: s, isSmallTablet: o, isTablet: r } = Z(), { common: c, trends: a } = R(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = ve(), [f, m] = g.useState(null);
|
|
1281
1281
|
if (!d)
|
|
1282
1282
|
return null;
|
|
1283
1283
|
const { guid: _, name: h, is_income: p, totalAmount: y } = d, T = Oe(_, t), N = p ? a.income_label : a.spending_label, x = ` ${d.transactions.length === 1 ? a.transaction : a.transactions} (${d.transactions.length})`, L = g.useMemo(
|
|
@@ -1417,7 +1417,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1417
1417
|
onInsightCardClick: s,
|
|
1418
1418
|
sx: o
|
|
1419
1419
|
}) => {
|
|
1420
|
-
const { onEvent: r } = $(), { config: c } =
|
|
1420
|
+
const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Z(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
|
|
1421
1421
|
categoriesLoaded: _,
|
|
1422
1422
|
loadCategories: h,
|
|
1423
1423
|
loadDateRangeCategoryTotals: p,
|
|
@@ -1528,7 +1528,7 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1528
1528
|
}
|
|
1529
1529
|
),
|
|
1530
1530
|
/* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(H, { flexGrow: 1, children: ne && /* @__PURE__ */ C(Te, { onClick: xt, sx: { p: 0, pr: 5 }, children: [
|
|
1531
|
-
/* @__PURE__ */ e(
|
|
1531
|
+
/* @__PURE__ */ e(ao, {}),
|
|
1532
1532
|
V.all_categories
|
|
1533
1533
|
] }) }) }),
|
|
1534
1534
|
Fe && /* @__PURE__ */ e(
|
|
@@ -1605,11 +1605,10 @@ const Eo = g.memo(Lo), Qe = ({
|
|
|
1605
1605
|
]
|
|
1606
1606
|
}
|
|
1607
1607
|
);
|
|
1608
|
-
},
|
|
1608
|
+
}, ds = A(Qo);
|
|
1609
1609
|
export {
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
cs as TrendsWidget
|
|
1610
|
+
is as TrendsFullWidget,
|
|
1611
|
+
cs as TrendsMicroWidget,
|
|
1612
|
+
ls as TrendsMiniWidget,
|
|
1613
|
+
ds as TrendsWidget
|
|
1615
1614
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MonthlyCategoryTotals } from '../../core';
|
|
2
|
-
import { StackedLineChartData } from '
|
|
2
|
+
import { StackedLineChartData } from '../../core/utils/TrendsUtil';
|
|
3
3
|
type TotalsData = MonthlyCategoryTotals | StackedLineChartData;
|
|
4
4
|
export declare const isIncome: (totals: TotalsData) => boolean;
|
|
5
5
|
export declare const isExpense: (totals: TotalsData) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef as r, useEffect as c } from "react";
|
|
2
|
-
import { g as l } from "./hooks-
|
|
2
|
+
import { g as l } from "./hooks-BaO_gOI6.mjs";
|
|
3
3
|
let n = !0;
|
|
4
4
|
const d = ({ widgetName: i, isLoaded: u = !0 }) => {
|
|
5
5
|
const { onEvent: o } = l(), t = r(null), s = r(!1), e = r(!1);
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { F as s, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
|
|
2
|
-
class r {
|
|
3
|
-
fetchInstance;
|
|
4
|
-
constructor(t, c, n) {
|
|
5
|
-
this.fetchInstance = new s(t, c, void 0, n);
|
|
6
|
-
}
|
|
7
|
-
createAccount = async (t) => this.fetchInstance.post(e.ACCOUNTS, t).then((c) => c.account).catch((c) => c);
|
|
8
|
-
deleteAccount = async (t) => this.fetchInstance.delete(`${e.ACCOUNTS}/${t}`).catch((c) => c);
|
|
9
|
-
getAccounts = async () => this.fetchInstance.get(e.ACCOUNTS).then((t) => t.accounts).catch((t) => t);
|
|
10
|
-
getInstitutions = async () => this.fetchInstance.get(e.INSTITUTIONS).then((t) => t).catch((t) => t);
|
|
11
|
-
getMembers = async () => this.fetchInstance.get(e.MEMBERS).then((t) => t.members).catch((t) => t);
|
|
12
|
-
getMonthlyAccountBalances = async (t) => this.fetchInstance.get(`${e.ACCOUNTS}/${t}/monthly_account_balances`).then((c) => c.monthly_account_balances).catch((c) => c);
|
|
13
|
-
mergeAccounts = async (t) => this.fetchInstance.put(`${e.ACCOUNTS}/merge`, { accounts: t }).then((c) => c).catch((c) => c);
|
|
14
|
-
refreshAllMembers = async () => this.fetchInstance.get(`${e.MEMBERS}/refresh_all`).then((t) => t).catch((t) => t);
|
|
15
|
-
updateAccount = async (t) => this.fetchInstance.put(`${e.ACCOUNTS}/${t.guid}`, t).then((c) => c.account).catch((c) => c);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
r as A
|
|
19
|
-
};
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable as h, runInAction as a } from "mobx";
|
|
2
|
-
import { i as g } from "./BudgetUtil-H9igoNVm.mjs";
|
|
3
|
-
import { A as d } from "./AccountApi-WEM2M9tg.mjs";
|
|
4
|
-
import { d as p } from "./Accounts-DX3xJE97.mjs";
|
|
5
|
-
import { A as s, d as u } from "./Account-CMjOp7S2.mjs";
|
|
6
|
-
class m {
|
|
7
|
-
isLoading = !1;
|
|
8
|
-
selectedAccount = {};
|
|
9
|
-
selectedMember = {};
|
|
10
|
-
constructor() {
|
|
11
|
-
h(this);
|
|
12
|
-
}
|
|
13
|
-
setIsLoading = (t) => this.isLoading = t;
|
|
14
|
-
setSelectedAccount = (t) => this.selectedAccount = t;
|
|
15
|
-
setSelectedMember = (t) => this.selectedMember = t;
|
|
16
|
-
}
|
|
17
|
-
class E {
|
|
18
|
-
globalStore;
|
|
19
|
-
api = new d("/", "");
|
|
20
|
-
accounts = [];
|
|
21
|
-
accountsLoaded = !1;
|
|
22
|
-
accountsLoading = !1;
|
|
23
|
-
institutions = [];
|
|
24
|
-
institutionsLoaded = !1;
|
|
25
|
-
institutionsLoading = !1;
|
|
26
|
-
members = [];
|
|
27
|
-
membersLoaded = !1;
|
|
28
|
-
membersLoading = !1;
|
|
29
|
-
uiStore;
|
|
30
|
-
constructor(t) {
|
|
31
|
-
this.globalStore = t, this.uiStore = new m(), this.api = new d(t.endpoint, t.sessionToken, t.onError), h(this);
|
|
32
|
-
}
|
|
33
|
-
loadAccountData = async () => {
|
|
34
|
-
await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
|
|
35
|
-
};
|
|
36
|
-
get isAccountDataLoaded() {
|
|
37
|
-
return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
|
|
38
|
-
}
|
|
39
|
-
get detailedAccounts() {
|
|
40
|
-
const t = this.globalStore.userStore.userFeatures, e = g(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS"), c = this.globalStore.appConfig.config.display_only_external_accounts_in_accounts && this.globalStore.appConfig.options.subtype === "accounts";
|
|
41
|
-
return p(
|
|
42
|
-
this.accounts,
|
|
43
|
-
this.institutions,
|
|
44
|
-
this.members,
|
|
45
|
-
e,
|
|
46
|
-
c
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
get accountsByTypeMap() {
|
|
50
|
-
return this.detailedAccounts.reduce((t, e) => {
|
|
51
|
-
const c = e.account_type;
|
|
52
|
-
let n = t.get(c);
|
|
53
|
-
return n || (n = []), n.push(e), t.set(c, n), t;
|
|
54
|
-
}, /* @__PURE__ */ new Map());
|
|
55
|
-
}
|
|
56
|
-
get cashAccounts() {
|
|
57
|
-
return this.detailedAccounts.filter(
|
|
58
|
-
(t) => t.account_type === s.CASH || t.account_type === s.CHECKING || t.account_type === s.PREPAID || t.account_type === s.SAVINGS || t.account_type === s.CHECKING_LINE_OF_CREDIT
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
get cashBalance() {
|
|
62
|
-
return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
|
|
63
|
-
}
|
|
64
|
-
get checkingAccounts() {
|
|
65
|
-
return this.detailedAccounts.filter((t) => t.account_type === s.CHECKING);
|
|
66
|
-
}
|
|
67
|
-
get debtAccounts() {
|
|
68
|
-
return this.detailedAccounts.filter(
|
|
69
|
-
(t) => t.account_type === s.CREDIT_CARD || t.account_type === s.LOAN || t.account_type === s.MORTGAGE || t.account_type === s.LINE_OF_CREDIT || t.account_type === s.CHECKING_LINE_OF_CREDIT
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
get finstrongAccounts() {
|
|
73
|
-
const t = /* @__PURE__ */ new Set([
|
|
74
|
-
s.CHECKING,
|
|
75
|
-
s.SAVINGS,
|
|
76
|
-
s.CREDIT_CARD,
|
|
77
|
-
s.INVESTMENT
|
|
78
|
-
]);
|
|
79
|
-
return this.detailedAccounts.filter((e) => t.has(e.account_type));
|
|
80
|
-
}
|
|
81
|
-
get investmentAccounts() {
|
|
82
|
-
return this.detailedAccounts.filter(
|
|
83
|
-
(t) => t.account_type === s.INVESTMENT
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
get manualAccounts() {
|
|
87
|
-
return this.detailedAccounts.filter((t) => t.is_manual);
|
|
88
|
-
}
|
|
89
|
-
get savingsAccounts() {
|
|
90
|
-
return this.detailedAccounts.filter((t) => t.account_type === s.SAVINGS);
|
|
91
|
-
}
|
|
92
|
-
get retirementAccounts() {
|
|
93
|
-
return this.detailedAccounts.filter(
|
|
94
|
-
(t) => t.account_type === s.INVESTMENT || t.account_type === s.SAVINGS || t.account_type === s.CHECKING || t.account_type === s.CASH || t.account_type === s.PROPERTY || t.account_type === s.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
get visibleAccounts() {
|
|
98
|
-
return this.detailedAccounts.filter((t) => !t.is_hidden && !t.is_closed);
|
|
99
|
-
}
|
|
100
|
-
get visibleCashAccounts() {
|
|
101
|
-
return this.cashAccounts.filter((t) => !t.is_hidden);
|
|
102
|
-
}
|
|
103
|
-
get visibleCashBalance() {
|
|
104
|
-
return this.visibleCashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
|
|
105
|
-
}
|
|
106
|
-
get visibleCheckingAccounts() {
|
|
107
|
-
return this.checkingAccounts.filter((t) => !t.is_hidden);
|
|
108
|
-
}
|
|
109
|
-
get visibleDebtAccounts() {
|
|
110
|
-
return this.debtAccounts.filter((t) => !t.is_hidden);
|
|
111
|
-
}
|
|
112
|
-
get visibleFinstrongAccounts() {
|
|
113
|
-
return this.finstrongAccounts.filter(
|
|
114
|
-
(t) => !(t.is_closed || t.is_deleted || t.is_hidden)
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
get visibleRetirementAccounts() {
|
|
118
|
-
return this.retirementAccounts.filter((t) => !t.is_hidden);
|
|
119
|
-
}
|
|
120
|
-
get visibleInvestmentAccounts() {
|
|
121
|
-
return this.investmentAccounts.filter((t) => !t.is_hidden);
|
|
122
|
-
}
|
|
123
|
-
get visibleSavingsAccounts() {
|
|
124
|
-
return this.savingsAccounts.filter((t) => !t.is_hidden);
|
|
125
|
-
}
|
|
126
|
-
get savingsAndCheckingAccountsBalance() {
|
|
127
|
-
return this.savingsAndCheckingAccounts.reduce(
|
|
128
|
-
(e, c) => e + (c?.balance || 0),
|
|
129
|
-
0
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
get savingsAndCheckingAccounts() {
|
|
133
|
-
return this.accounts.filter(
|
|
134
|
-
(e) => e.account_type === s.SAVINGS || e.account_type === s.CHECKING
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
setAccounts = (t) => {
|
|
138
|
-
this.accounts = t, this.accountsLoading = !1, this.accountsLoaded = !0;
|
|
139
|
-
};
|
|
140
|
-
setMembers = (t) => {
|
|
141
|
-
this.members = t, this.membersLoading = !1, this.membersLoaded = !0;
|
|
142
|
-
};
|
|
143
|
-
setInstitutions = (t) => {
|
|
144
|
-
this.institutions = t, this.institutionsLoading = !1, this.institutionsLoaded = !0;
|
|
145
|
-
};
|
|
146
|
-
addAccount = async (t) => {
|
|
147
|
-
try {
|
|
148
|
-
const e = await this.api.createAccount(t);
|
|
149
|
-
a(() => {
|
|
150
|
-
this.accounts = [...this.accounts, e];
|
|
151
|
-
});
|
|
152
|
-
} catch (e) {
|
|
153
|
-
console.error(`Error occurred while adding an account: ${e}`);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
loadAccounts = async () => {
|
|
157
|
-
if (!this.accountsLoading) {
|
|
158
|
-
this.accountsLoading = !0;
|
|
159
|
-
try {
|
|
160
|
-
const t = await this.api.getAccounts();
|
|
161
|
-
this.setAccounts(t);
|
|
162
|
-
} catch (t) {
|
|
163
|
-
console.error(`Error occurred while loading accounts: ${t}`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
loadInstitutions = async () => {
|
|
168
|
-
if (!this.institutionsLoading) {
|
|
169
|
-
this.institutionsLoading = !0;
|
|
170
|
-
try {
|
|
171
|
-
const t = await this.api.getInstitutions();
|
|
172
|
-
this.setInstitutions(t);
|
|
173
|
-
} catch (t) {
|
|
174
|
-
console.error(`Error occurred while loading institutions: ${t}`);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
loadMembers = async () => {
|
|
179
|
-
if (!this.membersLoading) {
|
|
180
|
-
this.membersLoading = !0;
|
|
181
|
-
try {
|
|
182
|
-
const t = await this.api.getMembers();
|
|
183
|
-
this.setMembers(t);
|
|
184
|
-
} catch (t) {
|
|
185
|
-
console.error(`Error occurred while loading members: ${t}`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
mergeAccounts = async (t) => {
|
|
190
|
-
try {
|
|
191
|
-
const e = await this.api.mergeAccounts(t), c = e[Object.keys(e)[0]];
|
|
192
|
-
a(() => {
|
|
193
|
-
const n = this.accounts.findIndex((i) => i.guid === t[1]);
|
|
194
|
-
this.accounts.splice(n, 1);
|
|
195
|
-
const o = this.accounts.findIndex((i) => i.guid === t[0]);
|
|
196
|
-
this.accounts.splice(o, 1, c);
|
|
197
|
-
});
|
|
198
|
-
} catch (e) {
|
|
199
|
-
console.error(`Error occurred while merging accounts: ${e}`);
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
refreshAccounts = async () => {
|
|
203
|
-
this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions(), this.loadMembers()]), this.uiStore.setIsLoading(!1);
|
|
204
|
-
};
|
|
205
|
-
refreshMembers = async () => {
|
|
206
|
-
try {
|
|
207
|
-
await this.api.refreshAllMembers();
|
|
208
|
-
} catch (t) {
|
|
209
|
-
console.error(`Error occurredwhile refreshing members: ${t}`);
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
removeAccount = async (t) => {
|
|
213
|
-
try {
|
|
214
|
-
await this.api.deleteAccount(t);
|
|
215
|
-
const e = this.accounts.findIndex((c) => c.guid === t);
|
|
216
|
-
this.accounts.splice(e, 1);
|
|
217
|
-
} catch (e) {
|
|
218
|
-
console.error(`Error occurred while removing an account: ${e}`);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
updateAccount = async (t) => {
|
|
222
|
-
try {
|
|
223
|
-
const e = await this.api.updateAccount(t), c = this.accounts.findIndex(
|
|
224
|
-
(n) => n.guid === e.guid
|
|
225
|
-
);
|
|
226
|
-
this.accounts.splice(c, 1, e);
|
|
227
|
-
} catch (e) {
|
|
228
|
-
console.error(`Error occurred while updating account: ${e}`);
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
updateAccountBalance = (t, e) => {
|
|
232
|
-
const c = this.accounts.find((n) => n.guid === t);
|
|
233
|
-
c && a(() => {
|
|
234
|
-
c.balance = (c.balance || 0) + e;
|
|
235
|
-
});
|
|
236
|
-
};
|
|
237
|
-
updateAccountFilter = async (t) => {
|
|
238
|
-
const e = [];
|
|
239
|
-
for (const [o, i] of t.entries()) {
|
|
240
|
-
const r = this.accounts.find((A) => A.guid === o);
|
|
241
|
-
r && r.is_excluded_from_accounts === i && (r.is_excluded_from_accounts = !i, e.push(this.api.updateAccount(r)));
|
|
242
|
-
}
|
|
243
|
-
const c = await Promise.all(e), n = [...this.accounts];
|
|
244
|
-
for (const o of c) {
|
|
245
|
-
const i = n.findIndex((r) => r.guid === o.guid);
|
|
246
|
-
i !== -1 && n.splice(i, 1, o);
|
|
247
|
-
}
|
|
248
|
-
this.setAccounts(n);
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
export {
|
|
252
|
-
E as A
|
|
253
|
-
};
|