@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
package/dist/common/index.es.js
CHANGED
|
@@ -1,141 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { D as
|
|
7
|
-
import { D as
|
|
8
|
-
import { D as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { I as
|
|
14
|
-
import { L as
|
|
15
|
-
import { M as
|
|
16
|
-
import { M as
|
|
17
|
-
import { jsxs as
|
|
18
|
-
import { css as
|
|
19
|
-
import { D as
|
|
20
|
-
import { S as
|
|
21
|
-
import { R as
|
|
22
|
-
import {
|
|
23
|
-
import { S as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
import { L as Dr } from "../ListItemAction-CNpknVvo.mjs";
|
|
64
|
-
import { L as Ar } from "../exportTransactionsToCSV-CSvbZrvL.mjs";
|
|
65
|
-
import { S as Er } from "../SearchBox-CwDgvWVJ.mjs";
|
|
66
|
-
import { T as vr, a as Mr } from "../ToggleListItem-BLu_fWA2.mjs";
|
|
67
|
-
import { a as Ir, u as Ur, b as Lr } from "../Analytics-CxK7O19c.mjs";
|
|
68
|
-
import { b as Pr, a as Or } from "../Localization-CkQ49EKr.mjs";
|
|
69
|
-
import { j as Fr } from "../DateUtil-D0TO0DaZ.mjs";
|
|
70
|
-
import { alpha as le, darken as k, lighten as I } from "@mui/material";
|
|
71
|
-
import { u as $r } from "../useAccountDisplayName-pliH6hz0.mjs";
|
|
72
|
-
import { u as Wr } from "../useInsightsEnabled-CzJoG8xi.mjs";
|
|
73
|
-
import { useRef as he, useEffect as ge } from "react";
|
|
74
|
-
import { u as Qr } from "../useScreenSize-CeFhWTt_.mjs";
|
|
75
|
-
import { u as Vr } from "../useWidgetLoadTimer-BZjr-BiE.mjs";
|
|
76
|
-
const it = [
|
|
77
|
-
{ id: g.Unknown, copy: "frequency_unknown" },
|
|
78
|
-
{ id: g.EveryWeek, copy: "frequency_every_week" },
|
|
79
|
-
{ id: g.EveryOtherWeek, copy: "frequency_every_other_week" },
|
|
80
|
-
{ id: g.EveryMonth, copy: "frequency_every_month" },
|
|
81
|
-
{ id: g.EveryOtherMonth, copy: "frequency_every_other_month" },
|
|
82
|
-
{ id: g.EveryQuarter, copy: "frequency_every_quarter" },
|
|
83
|
-
{ id: g.EveryOtherQuarter, copy: "frequency_every_other_quarter" },
|
|
84
|
-
{ id: g.EveryYear, copy: "frequency_every_year" }
|
|
85
|
-
], nt = {
|
|
1
|
+
import { l as q } from "../UserStore-CRpKQjpP.mjs";
|
|
2
|
+
import { b as F, a as $ } from "../Localization-DnoVyBNK.mjs";
|
|
3
|
+
import { f as Q, b as j, a as V, c as K, g as Z, d as J } from "../NumberFormatting--XMeeBfr.mjs";
|
|
4
|
+
import { C as z, a as rr, b as er } from "../CurrencyDialog-d4dL7vA5.mjs";
|
|
5
|
+
import { C as tr } from "../CurrencyInput-B59ugxPN.mjs";
|
|
6
|
+
import { D as sr, S as nr } from "../Select-BZRUpOib.mjs";
|
|
7
|
+
import { D as ur, W as lr, u as mr } from "../WidgetContainer-DalWyz5A.mjs";
|
|
8
|
+
import { D as cr } from "../Dialog-iLlBR8TG.mjs";
|
|
9
|
+
import { D as pr } from "../Donut-SzzfZDHF.mjs";
|
|
10
|
+
import { D as gr } from "../Drawer-XPaLYjiO.mjs";
|
|
11
|
+
import { E as Er } from "../ErrorBoundary-CsdOcnJ9.mjs";
|
|
12
|
+
import { I as hr } from "../IconBacking-DgT8DCeh.mjs";
|
|
13
|
+
import { I as _r } from "../InformationTooltip-4su8bn1e.mjs";
|
|
14
|
+
import { L as kr } from "../Loader-CxeBwuPG.mjs";
|
|
15
|
+
import { M as Or } from "../MicroWidgetContainer-CfKdQfhi.mjs";
|
|
16
|
+
import { M as Tr } from "../MiniWidgetContainer-BdPiUU-u.mjs";
|
|
17
|
+
import { jsxs as g, jsx as y } from "react/jsx-runtime";
|
|
18
|
+
import { css as h } from "@mxenabled/cssinjs";
|
|
19
|
+
import { D as C, a as _ } from "../SingleSegmentDonut-PsRQPkmV.mjs";
|
|
20
|
+
import { S as Ar } from "../SingleSegmentDonut-PsRQPkmV.mjs";
|
|
21
|
+
import { R as wr } from "../ResponsiveButton-BNsV08Ud.mjs";
|
|
22
|
+
import { S as Pr } from "../SelectionBox-Bx2a5rh4.mjs";
|
|
23
|
+
import { S as Wr } from "../StatusBar-CPfSXe80.mjs";
|
|
24
|
+
import { T as Gr } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
25
|
+
import { A as Rr } from "../Analytics-CzGzz_sE.mjs";
|
|
26
|
+
import { C as Yr } from "../ConnectCard-Dix8BoV_.mjs";
|
|
27
|
+
import { C as $r } from "../ConnectDrawer-DgfsTpyW.mjs";
|
|
28
|
+
import { C as Qr } from "../CurrencyText-CCbE6MmF.mjs";
|
|
29
|
+
import { E as Vr } from "../EmptyState-DHAkGsjk.mjs";
|
|
30
|
+
import { E as Zr } from "../Error-Dogaw2jO.mjs";
|
|
31
|
+
import { G as Xr } from "../GlobalAccountFilter-DrhtwPqh.mjs";
|
|
32
|
+
import { G as re, m as ee, n as oe, W as te, d as ae, a as se, o as ne, p as ie, l as ue, q as le, r as me, g as de, s as ce, u as fe, f as pe, b as ye, k as ge, t as xe, v as Ee, w as Se, c as he, x as Ce, y as _e, z as ve, i as ke, A as be, h as Oe, B as De, C as Te, D as Ie } from "../hooks-BaO_gOI6.mjs";
|
|
33
|
+
import { I as Me, P as we, S as Ne } from "../Account-BxHMlV9R.mjs";
|
|
34
|
+
import { L as Le } from "../ListItemAction-DGjHxNDJ.mjs";
|
|
35
|
+
import { L as Ue } from "../ListItemRow-kH1rn8Xu.mjs";
|
|
36
|
+
import { L as Be } from "../ListItemWrapper-B5r-YQQ_.mjs";
|
|
37
|
+
import { S as qe } from "../SearchBox-CwDgvWVJ.mjs";
|
|
38
|
+
import { S as Fe, T as $e } from "../Sizes-DISGrlUg.mjs";
|
|
39
|
+
import { T as Qe, a as je } from "../ToggleListItem-BLu_fWA2.mjs";
|
|
40
|
+
import { a as Ke, u as Ze, b as Je } from "../Analytics-CkYXKvco.mjs";
|
|
41
|
+
import { alpha as v, darken as x, lighten as E } from "@mui/material";
|
|
42
|
+
import { u as ze } from "../useAccountDisplayName-CFa_MrS6.mjs";
|
|
43
|
+
import { u as eo } from "../useInsightsEnabled-DaNLPmUU.mjs";
|
|
44
|
+
import { useRef as k, useEffect as b } from "react";
|
|
45
|
+
import { u as to } from "../useScreenSize-CeFhWTt_.mjs";
|
|
46
|
+
import { u as so } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
47
|
+
var s = /* @__PURE__ */ ((r) => (r[r.Unknown = 0] = "Unknown", r[r.EveryWeek = 1] = "EveryWeek", r[r.EveryOtherWeek = 2] = "EveryOtherWeek", r[r.EveryMonth = 3] = "EveryMonth", r[r.EveryOtherMonth = 4] = "EveryOtherMonth", r[r.EveryQuarter = 5] = "EveryQuarter", r[r.EveryOtherQuarter = 6] = "EveryOtherQuarter", r[r.EveryYear = 7] = "EveryYear", r))(s || {});
|
|
48
|
+
const P = (r) => {
|
|
49
|
+
const t = k();
|
|
50
|
+
return b(() => {
|
|
51
|
+
t.current = r;
|
|
52
|
+
}, [r]), t.current;
|
|
53
|
+
}, L = [
|
|
54
|
+
{ id: s.Unknown, copy: "frequency_unknown" },
|
|
55
|
+
{ id: s.EveryWeek, copy: "frequency_every_week" },
|
|
56
|
+
{ id: s.EveryOtherWeek, copy: "frequency_every_other_week" },
|
|
57
|
+
{ id: s.EveryMonth, copy: "frequency_every_month" },
|
|
58
|
+
{ id: s.EveryOtherMonth, copy: "frequency_every_other_month" },
|
|
59
|
+
{ id: s.EveryQuarter, copy: "frequency_every_quarter" },
|
|
60
|
+
{ id: s.EveryOtherQuarter, copy: "frequency_every_other_quarter" },
|
|
61
|
+
{ id: s.EveryYear, copy: "frequency_every_year" }
|
|
62
|
+
], W = {
|
|
86
63
|
ERROR: "ERROR",
|
|
87
64
|
LOADING: "LOADING",
|
|
88
65
|
SUCCESS: "SUCCESS"
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
hasGap: o = !1,
|
|
96
|
-
segments: e,
|
|
97
|
-
size: t = W,
|
|
98
|
-
strokeWidth: s = q,
|
|
99
|
-
children: r
|
|
66
|
+
}, U = ({
|
|
67
|
+
hasGap: r = !1,
|
|
68
|
+
segments: t,
|
|
69
|
+
size: i = C,
|
|
70
|
+
strokeWidth: l = _,
|
|
71
|
+
children: m
|
|
100
72
|
}) => {
|
|
101
|
-
const
|
|
102
|
-
let
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
73
|
+
const c = O(i), a = (i - l) / 2, n = i / 2;
|
|
74
|
+
let d = -90 - (r ? 1 : 0), o = 0;
|
|
75
|
+
return /* @__PURE__ */ g("div", { className: `mx-cmn-multi-segment-donut ${c}`, children: [
|
|
76
|
+
/* @__PURE__ */ g("svg", { height: i, width: i, children: [
|
|
77
|
+
/* @__PURE__ */ y(
|
|
106
78
|
"circle",
|
|
107
79
|
{
|
|
108
80
|
cx: n,
|
|
109
81
|
cy: n,
|
|
110
82
|
fill: "none",
|
|
111
|
-
r:
|
|
83
|
+
r: a,
|
|
112
84
|
stroke: "#E4E8EE",
|
|
113
|
-
strokeWidth:
|
|
85
|
+
strokeWidth: l
|
|
114
86
|
}
|
|
115
87
|
),
|
|
116
|
-
|
|
88
|
+
t.map((u, f) => (d += 360 * o + (r ? 1 : 0), o = (u.percent - (r ? 0.3 : 0)) / 100, /* @__PURE__ */ y(
|
|
117
89
|
"circle",
|
|
118
90
|
{
|
|
119
91
|
cx: n,
|
|
120
92
|
cy: n,
|
|
121
93
|
fill: "none",
|
|
122
|
-
r:
|
|
123
|
-
stroke:
|
|
124
|
-
strokeDasharray: 2 * Math.PI *
|
|
125
|
-
strokeDashoffset: 2 * Math.PI *
|
|
126
|
-
strokeWidth:
|
|
127
|
-
transform: `rotate(${
|
|
94
|
+
r: a,
|
|
95
|
+
stroke: u.color,
|
|
96
|
+
strokeDasharray: 2 * Math.PI * a,
|
|
97
|
+
strokeDashoffset: 2 * Math.PI * a * (1 - o),
|
|
98
|
+
strokeWidth: l,
|
|
99
|
+
transform: `rotate(${d}, ${n}, ${n})`
|
|
128
100
|
},
|
|
129
|
-
|
|
101
|
+
f
|
|
130
102
|
)))
|
|
131
103
|
] }),
|
|
132
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ y("div", { className: "mx-cmn-multi-segment-donut-children", children: m })
|
|
133
105
|
] });
|
|
134
|
-
},
|
|
135
|
-
height:
|
|
106
|
+
}, O = (r) => h({
|
|
107
|
+
height: r,
|
|
136
108
|
marginTop: "-8px",
|
|
137
109
|
position: "relative",
|
|
138
|
-
width:
|
|
110
|
+
width: r,
|
|
139
111
|
"& .mx-cmn-multi-segment-donut-children": {
|
|
140
112
|
left: "50%",
|
|
141
113
|
position: "absolute",
|
|
@@ -143,7 +115,7 @@ const it = [
|
|
|
143
115
|
top: "50%",
|
|
144
116
|
transform: "translate(-50%, -50%)"
|
|
145
117
|
}
|
|
146
|
-
}),
|
|
118
|
+
}), D = [
|
|
147
119
|
"fontFamily",
|
|
148
120
|
"h1",
|
|
149
121
|
"h2",
|
|
@@ -155,892 +127,174 @@ const it = [
|
|
|
155
127
|
"subtitle1",
|
|
156
128
|
"subtitle2",
|
|
157
129
|
"tiny"
|
|
158
|
-
],
|
|
130
|
+
], T = [
|
|
159
131
|
{ key: "primary", light: "primary_color", dark: "primary_color_dark" },
|
|
160
132
|
{ key: "secondary", light: "neutral_color", dark: "neutral_color_dark" },
|
|
161
133
|
{ key: "error", light: "error_color", dark: "error_color_dark" },
|
|
162
134
|
{ key: "warning", light: "warning_color", dark: "warning_color_dark" },
|
|
163
135
|
{ key: "info", light: "info_color", dark: "info_color_dark" },
|
|
164
136
|
{ key: "success", light: "success_color", dark: "success_color_dark" }
|
|
165
|
-
],
|
|
166
|
-
const
|
|
167
|
-
lighter:
|
|
168
|
-
light:
|
|
169
|
-
main:
|
|
170
|
-
dark:
|
|
171
|
-
darker:
|
|
172
|
-
} :
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
137
|
+
], G = (r, t, i) => {
|
|
138
|
+
const l = r.palette.mode === "dark", m = (i?.master?.style?.font_name || t?.system_font) ?? r.typography.fontFamily, c = (e, p) => e ? {
|
|
139
|
+
lighter: E(e, 0.5),
|
|
140
|
+
light: E(e, 0.25),
|
|
141
|
+
main: e,
|
|
142
|
+
dark: x(e, 0.25),
|
|
143
|
+
darker: x(e, 0.5)
|
|
144
|
+
} : p, a = Object.fromEntries(
|
|
145
|
+
T.map(({ key: e, light: p, dark: S }) => [
|
|
146
|
+
e,
|
|
147
|
+
c(
|
|
148
|
+
t?.[l ? S : p],
|
|
149
|
+
r.palette[e]
|
|
178
150
|
)
|
|
179
151
|
])
|
|
180
152
|
), n = Object.fromEntries(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
153
|
+
D.map((e) => [
|
|
154
|
+
e,
|
|
155
|
+
e === "fontFamily" ? m : { fontFamily: m }
|
|
184
156
|
])
|
|
185
|
-
),
|
|
157
|
+
), d = {
|
|
186
158
|
MuiTabs: {
|
|
187
159
|
styleOverrides: {
|
|
188
|
-
indicator: { backgroundColor:
|
|
160
|
+
indicator: { backgroundColor: a.primary.light }
|
|
189
161
|
}
|
|
190
162
|
},
|
|
191
163
|
MuiPickersCalendarHeader: {
|
|
192
164
|
styleOverrides: {
|
|
193
165
|
switchViewButton: {
|
|
194
|
-
color:
|
|
195
|
-
"&:hover": { backgroundColor:
|
|
166
|
+
color: a.primary.lighter,
|
|
167
|
+
"&:hover": { backgroundColor: v(a.primary.light, 0.1) }
|
|
196
168
|
}
|
|
197
169
|
}
|
|
198
170
|
}
|
|
199
|
-
},
|
|
200
|
-
...
|
|
201
|
-
...
|
|
171
|
+
}, o = t?.button_corner_radius, u = t?.card_corner_radius, f = {
|
|
172
|
+
...d,
|
|
173
|
+
...o && {
|
|
202
174
|
MuiButton: {
|
|
203
175
|
styleOverrides: {
|
|
204
|
-
root: { borderRadius: `${
|
|
176
|
+
root: { borderRadius: `${o}px`, textTransform: "none" }
|
|
205
177
|
}
|
|
206
178
|
},
|
|
207
179
|
MuiIconButton: {
|
|
208
180
|
styleOverrides: {
|
|
209
181
|
root: {
|
|
210
|
-
borderRadius: `${
|
|
211
|
-
minWidth:
|
|
212
|
-
minHeight:
|
|
182
|
+
borderRadius: `${o}px`,
|
|
183
|
+
minWidth: o,
|
|
184
|
+
minHeight: o
|
|
213
185
|
}
|
|
214
186
|
}
|
|
215
187
|
},
|
|
216
188
|
MuiToggleButton: {
|
|
217
189
|
styleOverrides: {
|
|
218
|
-
root: { borderRadius: `${
|
|
190
|
+
root: { borderRadius: `${o}px`, textTransform: "none" }
|
|
219
191
|
}
|
|
220
192
|
}
|
|
221
193
|
},
|
|
222
|
-
...
|
|
194
|
+
...u && {
|
|
223
195
|
MuiCard: {
|
|
224
|
-
styleOverrides: { root: { borderRadius: `${
|
|
196
|
+
styleOverrides: { root: { borderRadius: `${u}px` } }
|
|
225
197
|
},
|
|
226
198
|
MuiPaper: {
|
|
227
|
-
styleOverrides: { rounded: { borderRadius: `${
|
|
199
|
+
styleOverrides: { rounded: { borderRadius: `${u}px` } }
|
|
228
200
|
}
|
|
229
201
|
}
|
|
230
202
|
};
|
|
231
|
-
return { typography: n, palette:
|
|
203
|
+
return { typography: n, palette: a, components: f };
|
|
232
204
|
};
|
|
233
|
-
class me {
|
|
234
|
-
globalStore;
|
|
235
|
-
api = new C("/", "");
|
|
236
|
-
copy = {};
|
|
237
|
-
featureNamespace = "experiences";
|
|
238
|
-
isInitialized = !1;
|
|
239
|
-
constructor(e) {
|
|
240
|
-
this.globalStore = e, this.api = new C(
|
|
241
|
-
e.endpoint,
|
|
242
|
-
e.sessionToken,
|
|
243
|
-
e.onError
|
|
244
|
-
), l(this);
|
|
245
|
-
}
|
|
246
|
-
loadCopy = async () => {
|
|
247
|
-
await this.getCopy(this.featureNamespace), c(() => {
|
|
248
|
-
this.isInitialized = !0;
|
|
249
|
-
});
|
|
250
|
-
};
|
|
251
|
-
getCopy = async (e, t = "") => {
|
|
252
|
-
try {
|
|
253
|
-
const s = await this.api.getGlobalCopy(e, t);
|
|
254
|
-
c(() => {
|
|
255
|
-
this.copy = s[e];
|
|
256
|
-
});
|
|
257
|
-
} catch (s) {
|
|
258
|
-
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${s}`);
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
class ye {
|
|
263
|
-
globalStore;
|
|
264
|
-
survey = null;
|
|
265
|
-
currentQuestionIndex = 0;
|
|
266
|
-
question = null;
|
|
267
|
-
response = null;
|
|
268
|
-
responses = {};
|
|
269
|
-
constructor(e) {
|
|
270
|
-
this.globalStore = e, l(this);
|
|
271
|
-
}
|
|
272
|
-
get isLastQuestion() {
|
|
273
|
-
return this.currentQuestionIndex === this.surveyQuestions.length - 1;
|
|
274
|
-
}
|
|
275
|
-
get questionCount() {
|
|
276
|
-
return `${this.currentQuestionIndex + 1}/${this.surveyQuestions.length}`;
|
|
277
|
-
}
|
|
278
|
-
get responsePayload() {
|
|
279
|
-
return {
|
|
280
|
-
$survey_id: this.surveyId,
|
|
281
|
-
...this.responses
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
// TODO hardcode elsewhere
|
|
285
|
-
get surveyId() {
|
|
286
|
-
return window.app?.postHogPublicKey === "phc_KclQGnOZEaYCttkpiVpuyOYeBlixGo6xNphYgWV4CXo" ? "0196caa6-9b37-0000-98a7-f04e8d56faf5" : "0196a6b0-ccde-0000-b980-0b84ea2fef4a";
|
|
287
|
-
}
|
|
288
|
-
get surveyQuestions() {
|
|
289
|
-
return this.survey ? this.survey.questions : [];
|
|
290
|
-
}
|
|
291
|
-
loadSurvey = (e = !1) => {
|
|
292
|
-
j.getActiveMatchingSurveys((t) => {
|
|
293
|
-
c(() => {
|
|
294
|
-
if (t.length > 0) {
|
|
295
|
-
const s = t.find((r) => r.id === this.surveyId);
|
|
296
|
-
s && (this.survey = s, this.currentQuestionIndex = 0, this.question = s.questions[0], this.response = null, this.responses = {});
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
}, e);
|
|
300
|
-
};
|
|
301
|
-
nextQuestion = () => {
|
|
302
|
-
this.currentQuestionIndex < this.surveyQuestions.length - 1 && (this.currentQuestionIndex += 1), this.response = null, this.question = this.surveyQuestions[this.currentQuestionIndex];
|
|
303
|
-
};
|
|
304
|
-
resetStore = () => {
|
|
305
|
-
this.survey = null, this.currentQuestionIndex = 0, this.question = null, this.response = null, this.responses = {};
|
|
306
|
-
};
|
|
307
|
-
setResponse = (e) => {
|
|
308
|
-
this.response = e, this.question && (this.responses[`$survey_response_${this.question.id}`] = e);
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
class Se {
|
|
312
|
-
api = new x("/", "");
|
|
313
|
-
globalStore;
|
|
314
|
-
alert = "";
|
|
315
|
-
dateRange = { start: P(D()), end: R(D()) };
|
|
316
|
-
budgets = [];
|
|
317
|
-
selectedBudget;
|
|
318
|
-
selectedSubBudget;
|
|
319
|
-
isDataLoaded = !1;
|
|
320
|
-
theme = {};
|
|
321
|
-
merchantBudgets = [];
|
|
322
|
-
constructor(e) {
|
|
323
|
-
this.globalStore = e, this.api = new x(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
324
|
-
}
|
|
325
|
-
loadBudgetData = async () => {
|
|
326
|
-
this.globalStore.recurringTransactionsStore.isDataLoaded || await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData(), await this.loadBudgets(), L(
|
|
327
|
-
() => this.detailedBudgets,
|
|
328
|
-
(e) => {
|
|
329
|
-
if (e) {
|
|
330
|
-
const t = this.selectedBudget;
|
|
331
|
-
t && (this.selectedBudget = N(e, t.guid));
|
|
332
|
-
const s = this.selectedSubBudget;
|
|
333
|
-
s && s.parent_guid && (this.selectedSubBudget = F(
|
|
334
|
-
e,
|
|
335
|
-
s.guid,
|
|
336
|
-
s.parent_guid
|
|
337
|
-
));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
);
|
|
341
|
-
};
|
|
342
|
-
get detailedBudgets() {
|
|
343
|
-
return b(
|
|
344
|
-
this.budgets.filter(
|
|
345
|
-
(e) => e.category_guid !== _.INCOME && e.category_guid !== _.TRANSFER && e.category_guid !== _.INVESTMENTS
|
|
346
|
-
),
|
|
347
|
-
this.globalStore.categoryStore.detailedCategories,
|
|
348
|
-
this.globalStore.copyStore.copy.budgets,
|
|
349
|
-
this.theme
|
|
350
|
-
).sort((e, t) => e.percentage > t.percentage ? -1 : e.percentage < t.percentage ? 1 : 0);
|
|
351
|
-
}
|
|
352
|
-
// TODO: Replace this with income from recurring transactions. Income budgets are deprecated.
|
|
353
|
-
get incomeBudget() {
|
|
354
|
-
return b(
|
|
355
|
-
this.budgets.filter((s) => !s.parent_guid),
|
|
356
|
-
this.globalStore.categoryStore.detailedCategories,
|
|
357
|
-
this.globalStore.copyStore.copy.budgets,
|
|
358
|
-
this.theme
|
|
359
|
-
).reduce(
|
|
360
|
-
(s, r) => r.category_guid !== _.INCOME ? s : !s || r.percentage > s.percentage ? r : s,
|
|
361
|
-
void 0
|
|
362
|
-
)?.amount;
|
|
363
|
-
}
|
|
364
|
-
get unbudgetedCategories() {
|
|
365
|
-
return this.globalStore.categoryStore.spendCategories.filter(
|
|
366
|
-
(e) => !this.detailedBudgets.find((t) => t.category_guid === e.guid)
|
|
367
|
-
);
|
|
368
|
-
}
|
|
369
|
-
get totalBudgeted() {
|
|
370
|
-
return this.detailedBudgets.reduce((e, t) => e + t.amount, 0);
|
|
371
|
-
}
|
|
372
|
-
addBudget = async (e, t, s = null) => {
|
|
373
|
-
try {
|
|
374
|
-
const r = await this.api.addBudget(e, t, s);
|
|
375
|
-
c(() => {
|
|
376
|
-
this.budgets.push(r);
|
|
377
|
-
});
|
|
378
|
-
} catch (r) {
|
|
379
|
-
console.error(`Error adding budget: ${r}`);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
deleteBudget = async (e) => {
|
|
383
|
-
try {
|
|
384
|
-
await this.api.deleteBudget(e), c(() => {
|
|
385
|
-
const t = this.budgets.findIndex((s) => s.guid === e);
|
|
386
|
-
t >= 0 && this.budgets.splice(t, 1);
|
|
387
|
-
});
|
|
388
|
-
} catch (t) {
|
|
389
|
-
console.error(`Error deleting budget: ${t}`);
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
loadBudgets = async () => {
|
|
393
|
-
try {
|
|
394
|
-
const e = await this.api.getBudgets();
|
|
395
|
-
this.setBudgets(e);
|
|
396
|
-
} catch (e) {
|
|
397
|
-
throw console.error(`Error occurred while loading budgets: ${e}`), e;
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
setAlert = (e) => this.alert = e;
|
|
401
|
-
setBudgets = (e) => {
|
|
402
|
-
this.budgets = e, this.isDataLoaded = !0;
|
|
403
|
-
};
|
|
404
|
-
setDateRange = (e) => this.dateRange = e;
|
|
405
|
-
setSelectedBudget = (e) => this.selectedBudget = e;
|
|
406
|
-
setSelectedSubBudget = (e) => this.selectedSubBudget = e;
|
|
407
|
-
setTheme = (e) => this.theme = e;
|
|
408
|
-
/**
|
|
409
|
-
* Recalculate budget by using the average amount from top-level categories
|
|
410
|
-
* @param categories Detailed categories
|
|
411
|
-
*/
|
|
412
|
-
recalculateBudgets = async (e) => {
|
|
413
|
-
try {
|
|
414
|
-
for (const s of e) {
|
|
415
|
-
const r = this.budgets.find((a) => a.category_guid === s.guid);
|
|
416
|
-
r ? await this.api.updateBudget({
|
|
417
|
-
...r,
|
|
418
|
-
amount: s.totalAverageAmount
|
|
419
|
-
}) : await this.api.addBudget(s, s.totalAverageAmount);
|
|
420
|
-
}
|
|
421
|
-
const t = this.budgets.filter(
|
|
422
|
-
(s) => !e.find((r) => r.guid === s.category_guid)
|
|
423
|
-
);
|
|
424
|
-
for (const s of t)
|
|
425
|
-
await this.api.deleteBudget(s.guid);
|
|
426
|
-
return await this.loadBudgets(), { data: this.budgets, isSuccess: !0 };
|
|
427
|
-
} catch (t) {
|
|
428
|
-
return console.error("error recalculating budgets", t), { data: [], isSuccess: !1 };
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
updateBudget = async (e) => {
|
|
432
|
-
try {
|
|
433
|
-
const t = await this.api.updateBudget(e);
|
|
434
|
-
c(() => {
|
|
435
|
-
const s = this.budgets.findIndex((r) => r.guid === e.guid);
|
|
436
|
-
s >= 0 && (this.budgets[s] = t);
|
|
437
|
-
});
|
|
438
|
-
} catch (t) {
|
|
439
|
-
console.error(`Error updating budget: ${t}`);
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
getMerchantBudgetByMerchantGuid = (e) => this.merchantBudgets.find(
|
|
443
|
-
(t) => t?.merchant_guid === e
|
|
444
|
-
);
|
|
445
|
-
setMerchantBudgets = (e) => {
|
|
446
|
-
this.merchantBudgets = e;
|
|
447
|
-
};
|
|
448
|
-
addMerchantBudget = async (e, t) => {
|
|
449
|
-
try {
|
|
450
|
-
const s = await this.api.addMerchantBudget(e, t);
|
|
451
|
-
return c(() => {
|
|
452
|
-
this.merchantBudgets.push(s);
|
|
453
|
-
}), { isSuccess: !0 };
|
|
454
|
-
} catch (s) {
|
|
455
|
-
return console.error(`Error adding merchant budget: ${s}`), { isSuccess: !1 };
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
updateMerchantBudget = async (e) => {
|
|
459
|
-
try {
|
|
460
|
-
const { guid: t, amount: s } = e, r = await this.api.updateMerchantBudget(t, s);
|
|
461
|
-
return c(() => {
|
|
462
|
-
const a = this.merchantBudgets.findIndex((i) => i.guid === e.guid);
|
|
463
|
-
a >= 0 && (this.merchantBudgets[a] = r);
|
|
464
|
-
}), { isSuccess: !0 };
|
|
465
|
-
} catch (t) {
|
|
466
|
-
return console.error(`Error updating merchant budget: ${t}`), { isSuccess: !1 };
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
deleteMerchantBudget = async (e) => {
|
|
470
|
-
try {
|
|
471
|
-
return await this.api.deleteMerchantBudget(e), c(() => {
|
|
472
|
-
const t = this.merchantBudgets.filter(
|
|
473
|
-
(s) => s.guid !== e
|
|
474
|
-
);
|
|
475
|
-
this.merchantBudgets = t;
|
|
476
|
-
}), { isSuccess: !0 };
|
|
477
|
-
} catch (t) {
|
|
478
|
-
return console.error(`Error deleting merchant budget: ${t}`), { isSuccess: !1 };
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
const be = (o, e) => o.guid === "general" || o.guid === "insights" ? !0 : o.flags ? o.flags.every((t) => e[t]) : !1, we = (o, e) => {
|
|
483
|
-
const t = [];
|
|
484
|
-
for (const s of G) {
|
|
485
|
-
const r = e[s.guid];
|
|
486
|
-
if (!r) continue;
|
|
487
|
-
const a = {
|
|
488
|
-
...s,
|
|
489
|
-
title: r.label,
|
|
490
|
-
topics: s.topics.map(({ topicKey: i }, n) => ({
|
|
491
|
-
topicKey: i,
|
|
492
|
-
label: r.topics[n]
|
|
493
|
-
}))
|
|
494
|
-
};
|
|
495
|
-
be(a, o) && t.push(a);
|
|
496
|
-
}
|
|
497
|
-
return t;
|
|
498
|
-
};
|
|
499
|
-
class Ce {
|
|
500
|
-
alert = { message: "", severity: void 0 };
|
|
501
|
-
api = new A("/", "");
|
|
502
|
-
appConfig;
|
|
503
|
-
globalStore;
|
|
504
|
-
isLoading = !1;
|
|
505
|
-
constructor(e) {
|
|
506
|
-
this.globalStore = e, this.api = new A(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
507
|
-
}
|
|
508
|
-
createSupportTicket = async (e) => {
|
|
509
|
-
try {
|
|
510
|
-
this.isLoading = !0, await this.api.createSupportTicket(e), this.setAlert(this.copy.request_support_submit_success_message, "success");
|
|
511
|
-
} catch (t) {
|
|
512
|
-
this.setAlert(this.copy.request_support_submit_failure_message, "error"), console.error("Error occurred while submitting:", t);
|
|
513
|
-
} finally {
|
|
514
|
-
this.isLoading = !1;
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
setAlert = (e, t = void 0) => this.alert = { message: e, severity: t };
|
|
518
|
-
get copy() {
|
|
519
|
-
return this.globalStore.copyStore.copy.help;
|
|
520
|
-
}
|
|
521
|
-
get helpCategories() {
|
|
522
|
-
const { client_communication_profile: e, client_profile: t } = this.globalStore.appDataStore.appData, {
|
|
523
|
-
help: { category_list: s }
|
|
524
|
-
} = this.globalStore.copyStore.copy;
|
|
525
|
-
return we(
|
|
526
|
-
{
|
|
527
|
-
...e,
|
|
528
|
-
...t,
|
|
529
|
-
...this.globalStore.appConfig.config
|
|
530
|
-
},
|
|
531
|
-
s
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
class De {
|
|
536
|
-
analysisType = ee.Stocks;
|
|
537
|
-
api = new T("/", "");
|
|
538
|
-
holdings = [];
|
|
539
|
-
holdingsLoaded = !1;
|
|
540
|
-
globalStore;
|
|
541
|
-
showConnectionsWidget = !1;
|
|
542
|
-
constructor(e) {
|
|
543
|
-
this.globalStore = e, this.api = new T(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
544
|
-
}
|
|
545
|
-
get analysisChartData() {
|
|
546
|
-
return te(se(this.visibleHoldings), this.analysisType);
|
|
547
|
-
}
|
|
548
|
-
get analysisDetails() {
|
|
549
|
-
return re(this.visibleHoldings)[this.analysisType] || {};
|
|
550
|
-
}
|
|
551
|
-
get visibleHoldings() {
|
|
552
|
-
return this.holdings.filter(
|
|
553
|
-
(e) => this.globalStore.globalUiStore.selectedAccountGuids.includes(e.account_guid)
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
|
-
setHoldings = (e) => {
|
|
557
|
-
this.holdings = e, this.holdingsLoaded = !0;
|
|
558
|
-
};
|
|
559
|
-
setShowConnectionsWidget = (e) => {
|
|
560
|
-
this.showConnectionsWidget = e;
|
|
561
|
-
};
|
|
562
|
-
loadHoldings = async () => {
|
|
563
|
-
try {
|
|
564
|
-
const e = await this.api.getHoldings();
|
|
565
|
-
this.setHoldings(e);
|
|
566
|
-
} catch (e) {
|
|
567
|
-
console.error(`Error occured while getting holdings: ${e}`);
|
|
568
|
-
}
|
|
569
|
-
};
|
|
570
|
-
setAnalysisType = (e) => {
|
|
571
|
-
this.analysisType = e;
|
|
572
|
-
};
|
|
573
|
-
updateHoldings = async (e) => {
|
|
574
|
-
this.holdingsLoaded = !1;
|
|
575
|
-
try {
|
|
576
|
-
const t = await this.api.updateHoldings(e), s = this.holdings.findIndex(({ guid: r }) => r === e.guid);
|
|
577
|
-
if (s >= 0) {
|
|
578
|
-
const r = [...this.holdings];
|
|
579
|
-
r[s] = t, c(() => {
|
|
580
|
-
this.holdings = r, this.holdingsLoaded = !0;
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
} catch (t) {
|
|
584
|
-
console.error(`Error occurred while updating holding: ${t}`);
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
const U = {
|
|
589
|
-
clientConfig: {},
|
|
590
|
-
clientStyleProfile: {},
|
|
591
|
-
config: {
|
|
592
|
-
assets_prefix: "/assets",
|
|
593
|
-
bundle: "widgetLoader",
|
|
594
|
-
client_guid: "",
|
|
595
|
-
dashboard_accounts_index: 6,
|
|
596
|
-
dashboard_accounts_location: 0,
|
|
597
|
-
dashboard_activity_index: 2,
|
|
598
|
-
dashboard_activity_location: 0,
|
|
599
|
-
dashboard_budgets_index: 5,
|
|
600
|
-
dashboard_budgets_location: 1,
|
|
601
|
-
dashboard_cash_flow_index: 0,
|
|
602
|
-
dashboard_cash_flow_location: 0,
|
|
603
|
-
dashboard_connect_index: 7,
|
|
604
|
-
dashboard_connect_location: 1,
|
|
605
|
-
dashboard_insights_index: 3,
|
|
606
|
-
dashboard_insights_location: 1,
|
|
607
|
-
dashboard_spending_index: 1,
|
|
608
|
-
dashboard_spending_location: 1,
|
|
609
|
-
dashboard_survey_index: 8,
|
|
610
|
-
dashboard_survey_location: 1,
|
|
611
|
-
dashboard_trends_index: 4,
|
|
612
|
-
dashboard_trends_location: 0,
|
|
613
|
-
display_account_number_in_accounts: !0,
|
|
614
|
-
display_add_manual_transaction_in_transactions: !0,
|
|
615
|
-
display_available_balance_in_accounts: !0,
|
|
616
|
-
display_email_edit_field_in_settings: !0,
|
|
617
|
-
display_mobile_devices_in_settings: !0,
|
|
618
|
-
display_notification_settings_in_settings: !0,
|
|
619
|
-
display_only_external_accounts_in_accounts: !1,
|
|
620
|
-
display_password_options_in_settings: !0,
|
|
621
|
-
display_sms_edit_field_in_settings: !0,
|
|
622
|
-
display_terms_and_conditions: !0,
|
|
623
|
-
display_user_profile_in_settings: !0,
|
|
624
|
-
display_user_transaction_rules_in_settings: !0,
|
|
625
|
-
display_widget_headings: !0,
|
|
626
|
-
enable_add_account_in_zero_state: !0,
|
|
627
|
-
enable_aggregation_prompts: !0,
|
|
628
|
-
enable_external_accounts_in_goals_widget: !0,
|
|
629
|
-
enable_funds_transfers_in_goals_widget: !1,
|
|
630
|
-
enable_manual_accounts: !0,
|
|
631
|
-
enable_mark_account_closed_for_held_accounts: !0,
|
|
632
|
-
enable_mark_account_duplicate_for_held_accounts: !0,
|
|
633
|
-
enable_renaming_home_accounts: !0,
|
|
634
|
-
enable_support_requests: !1,
|
|
635
|
-
language: "en-US",
|
|
636
|
-
product_name: "Money Dashboard",
|
|
637
|
-
session_token: "",
|
|
638
|
-
show_account_nicknames_in_master: !1,
|
|
639
|
-
show_accounts_widget_in_master: !0,
|
|
640
|
-
show_budgets_widget_in_master: !0,
|
|
641
|
-
show_carousel_card_border_in_pulse_micro_widget: !1,
|
|
642
|
-
show_cash_flow_widget_in_master: !0,
|
|
643
|
-
show_connections_widget_in_master: !0,
|
|
644
|
-
show_debts_widget_in_master: !0,
|
|
645
|
-
show_finstrong_widget_in_master: !0,
|
|
646
|
-
show_full_experience_link_in_pulse_micro_widget: !1,
|
|
647
|
-
show_full_experience_link_in_pulse_mini_widget: !1,
|
|
648
|
-
show_goals_widget_in_master: !0,
|
|
649
|
-
show_help_widget_in_master: !0,
|
|
650
|
-
show_horizontal_padding_in_pulse_micro_widget: !0,
|
|
651
|
-
show_icon_in_pulse_micro_widget: !0,
|
|
652
|
-
show_insights_widget_in_master: !0,
|
|
653
|
-
show_investments_widget_in_master: !1,
|
|
654
|
-
show_mx_branding: !0,
|
|
655
|
-
show_navigation_controls_in_pulse_micro_widget: !0,
|
|
656
|
-
show_net_worth_widget_in_master: !0,
|
|
657
|
-
show_notifications_widget_in_master: !0,
|
|
658
|
-
show_recurring_transactions_widget_in_master: !0,
|
|
659
|
-
show_settings_widget_in_master: !0,
|
|
660
|
-
show_spending_plan_widget_in_master: !1,
|
|
661
|
-
show_spending_widget_in_master: !0,
|
|
662
|
-
show_transactions_widget_in_master: !0,
|
|
663
|
-
show_trends_widget_in_master: !0,
|
|
664
|
-
type: "money-dashboard",
|
|
665
|
-
websocket: {
|
|
666
|
-
hmac: "",
|
|
667
|
-
token: "",
|
|
668
|
-
url: ""
|
|
669
|
-
},
|
|
670
|
-
widgets_display_name: "Money Dashboard "
|
|
671
|
-
},
|
|
672
|
-
honeyBadgerPublicKey: "",
|
|
673
|
-
options: {
|
|
674
|
-
assets_prefix: "/assets",
|
|
675
|
-
brokaw_auth: {
|
|
676
|
-
token: "",
|
|
677
|
-
hmac: "",
|
|
678
|
-
url: ""
|
|
679
|
-
},
|
|
680
|
-
brokaw_websocket_url: "",
|
|
681
|
-
bundle: "widgetLoader",
|
|
682
|
-
custom_copy_namespace: "",
|
|
683
|
-
language: "en-US",
|
|
684
|
-
product_name: "Master Widget",
|
|
685
|
-
session_token: "",
|
|
686
|
-
subtype: "master",
|
|
687
|
-
type: "money_dashboard"
|
|
688
|
-
},
|
|
689
|
-
postHogPublicKey: "phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE",
|
|
690
|
-
userFeatures: []
|
|
691
|
-
};
|
|
692
|
-
class xe {
|
|
693
|
-
globalStore;
|
|
694
|
-
api = new E("/", "");
|
|
695
|
-
bannerApi = new B("/");
|
|
696
|
-
appData = {};
|
|
697
|
-
isAppDataLoaded = !1;
|
|
698
|
-
banner = {};
|
|
699
|
-
constructor(e) {
|
|
700
|
-
this.globalStore = e, this.api = new E(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
701
|
-
}
|
|
702
|
-
get appConfig() {
|
|
703
|
-
return this.globalStore.appConfig;
|
|
704
|
-
}
|
|
705
|
-
get clientCommunicationProfile() {
|
|
706
|
-
return this.appData.client_communication_profile;
|
|
707
|
-
}
|
|
708
|
-
get clientInsightProfile() {
|
|
709
|
-
return this.appData.client_insight_profile;
|
|
710
|
-
}
|
|
711
|
-
get user() {
|
|
712
|
-
return this.appData.user;
|
|
713
|
-
}
|
|
714
|
-
get userCommunicationProfile() {
|
|
715
|
-
return this.appData.user_communication_profile;
|
|
716
|
-
}
|
|
717
|
-
get userProfile() {
|
|
718
|
-
return this.appData.user_profile;
|
|
719
|
-
}
|
|
720
|
-
setAppData = (e) => {
|
|
721
|
-
this.appData = e, this.bannerApi = new B(e.address?.bullseye || "/"), this.isAppDataLoaded = !0;
|
|
722
|
-
};
|
|
723
|
-
loadAppData = async () => {
|
|
724
|
-
try {
|
|
725
|
-
const e = await this.api.getAppData();
|
|
726
|
-
this.setAppData(e);
|
|
727
|
-
} catch (e) {
|
|
728
|
-
console.error(`Error loading app data: ${e}`);
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
loadBanner = async () => {
|
|
732
|
-
try {
|
|
733
|
-
const e = this.user?.guid ?? null, t = e ? await this.bannerApi.getBanner(e) : {};
|
|
734
|
-
c(() => {
|
|
735
|
-
this.banner = t;
|
|
736
|
-
});
|
|
737
|
-
} catch (e) {
|
|
738
|
-
console.error(`Error loading banner: ${e}`);
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
setUser = (e) => this.appData.user = e;
|
|
742
|
-
setUserCommunicationProfile = (e) => this.appData.user_communication_profile = e;
|
|
743
|
-
setUserProfile = (e) => this.appData.user_profile = e;
|
|
744
|
-
}
|
|
745
|
-
class Ae {
|
|
746
|
-
globalStore;
|
|
747
|
-
widgetApi = new v("/", "");
|
|
748
|
-
constructor(e) {
|
|
749
|
-
this.globalStore = e, this.widgetApi = new v(e.endpoint, e.sessionToken), l(this);
|
|
750
|
-
}
|
|
751
|
-
loadWidget = async ({ widget: e = "connect_widget", mode: t = "light", ...s }) => await this.widgetApi.requestWidgetUrl({
|
|
752
|
-
widget_url: { widget_type: e, color_scheme: t, ...s }
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
class Te {
|
|
756
|
-
globalStore;
|
|
757
|
-
accountFilterMap = /* @__PURE__ */ new Map();
|
|
758
|
-
displayedDate = /* @__PURE__ */ new Date();
|
|
759
|
-
displayedDateRange = {
|
|
760
|
-
start: P(this.displayedDate),
|
|
761
|
-
end: R(this.displayedDate)
|
|
762
|
-
};
|
|
763
|
-
constructor(e) {
|
|
764
|
-
l(this), this.globalStore = e, L(
|
|
765
|
-
() => this.globalStore.accountStore.visibleAccounts,
|
|
766
|
-
(t) => {
|
|
767
|
-
this.populateAccountFilterMap(t);
|
|
768
|
-
}
|
|
769
|
-
);
|
|
770
|
-
}
|
|
771
|
-
get allSelectedAccounts() {
|
|
772
|
-
return this.globalStore.accountStore.detailedAccounts.filter(
|
|
773
|
-
(e) => !e.is_excluded_from_accounts
|
|
774
|
-
);
|
|
775
|
-
}
|
|
776
|
-
get selectedAccounts() {
|
|
777
|
-
return this.globalStore.accountStore.visibleAccounts.filter(
|
|
778
|
-
(e) => !e.is_excluded_from_accounts
|
|
779
|
-
);
|
|
780
|
-
}
|
|
781
|
-
get selectedAccountGuids() {
|
|
782
|
-
return this.selectedAccounts.map((e) => e.guid);
|
|
783
|
-
}
|
|
784
|
-
get isCopyLoaded() {
|
|
785
|
-
return this.globalStore.copyStore.isInitialized;
|
|
786
|
-
}
|
|
787
|
-
get isConfigLoaded() {
|
|
788
|
-
return this.globalStore.appDataStore.isAppDataLoaded;
|
|
789
|
-
}
|
|
790
|
-
get areUserFeaturesLoaded() {
|
|
791
|
-
return this.globalStore.userStore.userFeaturesLoaded;
|
|
792
|
-
}
|
|
793
|
-
get isInitialized() {
|
|
794
|
-
return this.isCopyLoaded && this.isConfigLoaded && this.areUserFeaturesLoaded;
|
|
795
|
-
}
|
|
796
|
-
populateAccountFilterMap = (e) => {
|
|
797
|
-
e && e.forEach((t) => {
|
|
798
|
-
this.accountFilterMap.set(t.guid, !t.is_excluded_from_accounts);
|
|
799
|
-
});
|
|
800
|
-
};
|
|
801
|
-
resetAccountFilterMap = () => {
|
|
802
|
-
this.accountFilterMap.clear(), this.populateAccountFilterMap(this.globalStore.accountStore.visibleAccounts);
|
|
803
|
-
};
|
|
804
|
-
updateAccountFilterMap = (e, t) => {
|
|
805
|
-
this.accountFilterMap.set(e, t);
|
|
806
|
-
};
|
|
807
|
-
setDisplayedDate = (e, t) => {
|
|
808
|
-
this.displayedDate = t, this.displayedDateRange = {
|
|
809
|
-
start: e,
|
|
810
|
-
end: t
|
|
811
|
-
};
|
|
812
|
-
};
|
|
813
|
-
get shouldDisableNextDate() {
|
|
814
|
-
const e = f(this.displayedDate), t = f(ce(/* @__PURE__ */ new Date(), 1));
|
|
815
|
-
return e === t;
|
|
816
|
-
}
|
|
817
|
-
get shouldDisablePrevDate() {
|
|
818
|
-
const e = f(this.displayedDate), t = f(/* @__PURE__ */ new Date());
|
|
819
|
-
return e === t;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
class Ee {
|
|
823
|
-
globalStore;
|
|
824
|
-
api = new M("/", "");
|
|
825
|
-
userFeatures = [];
|
|
826
|
-
userFeaturesLoaded = !1;
|
|
827
|
-
constructor(e) {
|
|
828
|
-
this.globalStore = e, this.api = new M(e.endpoint, e.sessionToken, e.onError), l(this);
|
|
829
|
-
}
|
|
830
|
-
get userProfile() {
|
|
831
|
-
return this.globalStore.appDataStore.userProfile;
|
|
832
|
-
}
|
|
833
|
-
get user() {
|
|
834
|
-
return this.globalStore.appDataStore.user;
|
|
835
|
-
}
|
|
836
|
-
setUserFeatures = (e) => {
|
|
837
|
-
this.userFeatures = e, this.userFeaturesLoaded = !0;
|
|
838
|
-
};
|
|
839
|
-
loadUserFeatures = async () => {
|
|
840
|
-
try {
|
|
841
|
-
const e = await this.api.getUserFeatures();
|
|
842
|
-
this.setUserFeatures(e);
|
|
843
|
-
} catch (e) {
|
|
844
|
-
console.error(`Error occurred while loading user features: ${e}`);
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
updateUser = async (e) => {
|
|
848
|
-
try {
|
|
849
|
-
const t = await this.api.updateUser(e);
|
|
850
|
-
this.globalStore.appDataStore.setUser(t);
|
|
851
|
-
} catch (t) {
|
|
852
|
-
console.error(`Error updating User: ${t}`);
|
|
853
|
-
}
|
|
854
|
-
};
|
|
855
|
-
updateUserProfile = async (e) => {
|
|
856
|
-
try {
|
|
857
|
-
const t = await this.api.updateUserProfile(e);
|
|
858
|
-
this.globalStore.appDataStore.setUserProfile(t);
|
|
859
|
-
} catch (t) {
|
|
860
|
-
console.error(`Error occurred while updating user profile: ${t}`);
|
|
861
|
-
}
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
class lt {
|
|
865
|
-
// Global properties
|
|
866
|
-
appConfig = U;
|
|
867
|
-
endpoint = "/";
|
|
868
|
-
sessionToken = "";
|
|
869
|
-
onError;
|
|
870
|
-
onStoreUpdate;
|
|
871
|
-
// Data Stores
|
|
872
|
-
accountStore;
|
|
873
|
-
appDataStore;
|
|
874
|
-
analyticsStore;
|
|
875
|
-
beatStore;
|
|
876
|
-
budgetsStore;
|
|
877
|
-
cashflowStore;
|
|
878
|
-
categoryStore;
|
|
879
|
-
connectStore;
|
|
880
|
-
copyStore;
|
|
881
|
-
debtsStore;
|
|
882
|
-
finstrongStore;
|
|
883
|
-
goalStore;
|
|
884
|
-
helpStore;
|
|
885
|
-
holdingStore;
|
|
886
|
-
merchantStore;
|
|
887
|
-
netWorthStore;
|
|
888
|
-
notificationStore;
|
|
889
|
-
recurringTransactionsStore;
|
|
890
|
-
settingsStore;
|
|
891
|
-
transactionStore;
|
|
892
|
-
trendsStore;
|
|
893
|
-
userStore;
|
|
894
|
-
// UI Stores
|
|
895
|
-
globalUiStore;
|
|
896
|
-
constructor(e = U, t = "/", s, r) {
|
|
897
|
-
this.appConfig = e, this.endpoint = t, this.sessionToken = e.options.session_token ?? "", this.onError = s, this.onStoreUpdate = r, this.accountStore = new K(this), this.appDataStore = new xe(this), this.analyticsStore = new ye(this), this.beatStore = new V(this), this.budgetsStore = new Se(this), this.cashflowStore = new $(this), this.categoryStore = new X(this), this.connectStore = new Ae(this), this.copyStore = new me(this), this.debtsStore = new Z(this), this.finstrongStore = new J(this), this.goalStore = new Y(this), this.helpStore = new Ce(this), this.holdingStore = new De(this), this.merchantStore = new oe(this), this.netWorthStore = new ae(this), this.notificationStore = new ie(this), this.recurringTransactionsStore = new de(this), this.settingsStore = new ne(this), this.transactionStore = new Q(this), this.trendsStore = new ue(this), this.userStore = new Ee(this), this.globalUiStore = new Te(this), l(this), z(() => {
|
|
898
|
-
const { transactions: a } = this.transactionStore;
|
|
899
|
-
this.emitUpdate({
|
|
900
|
-
transactions: a
|
|
901
|
-
});
|
|
902
|
-
});
|
|
903
|
-
}
|
|
904
|
-
get isInitialized() {
|
|
905
|
-
return this.globalUiStore.isInitialized;
|
|
906
|
-
}
|
|
907
|
-
// emits change triggered in the autorun
|
|
908
|
-
emitUpdate = (e) => {
|
|
909
|
-
this.onStoreUpdate?.(e);
|
|
910
|
-
};
|
|
911
|
-
loadConfigData = async () => {
|
|
912
|
-
await Promise.all([
|
|
913
|
-
// Load copy, config and user data
|
|
914
|
-
this.copyStore.loadCopy(),
|
|
915
|
-
this.appDataStore.loadAppData(),
|
|
916
|
-
this.accountStore.refreshMembers(),
|
|
917
|
-
this.userStore.loadUserFeatures()
|
|
918
|
-
]);
|
|
919
|
-
};
|
|
920
|
-
loadData = async ({
|
|
921
|
-
accounts: e,
|
|
922
|
-
appData: t,
|
|
923
|
-
associatedBeats: s,
|
|
924
|
-
categories: r,
|
|
925
|
-
institutions: a,
|
|
926
|
-
transactionRules: i,
|
|
927
|
-
transactions: n,
|
|
928
|
-
userFeatures: h,
|
|
929
|
-
merchantBudgets: d
|
|
930
|
-
} = {}) => {
|
|
931
|
-
(!t || !h) && await this.loadConfigData(), t && this.appDataStore.setAppData(t), h && this.userStore.setUserFeatures(h), e && (await this.accountStore.loadMembers(), a && this.accountStore.setInstitutions(a), this.accountStore.setAccounts(e)), s && this.transactionStore.setAssociatedBeats(s), r && this.categoryStore.setCategories(r), n && this.transactionStore.setTransactions(n), i && this.transactionStore.setTransactionRules(i), d && this.budgetsStore.setMerchantBudgets(d);
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
205
|
export {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
tr as useHoldingStore,
|
|
1030
|
-
Wr as useInsightsEnabled,
|
|
1031
|
-
sr as useLoad,
|
|
1032
|
-
rr as useMerchantStore,
|
|
1033
|
-
or as useNetWorthStore,
|
|
1034
|
-
ar as useNotificationStore,
|
|
1035
|
-
ir as usePageView,
|
|
1036
|
-
dt as usePrevious,
|
|
1037
|
-
nr as useRecurringTransactionsStore,
|
|
1038
|
-
Qr as useScreenSize,
|
|
1039
|
-
dr as useSettingsStore,
|
|
1040
|
-
ur as useTransactionStore,
|
|
1041
|
-
cr as useTrendsStore,
|
|
1042
|
-
lr as useUserStore,
|
|
1043
|
-
hr as useWidgetContainerProvider,
|
|
1044
|
-
Mt as useWidgetHeaderStyles,
|
|
1045
|
-
Vr as useWidgetLoadTimer
|
|
206
|
+
Rr as ANALYTICS_EVENTS,
|
|
207
|
+
z as Calendar,
|
|
208
|
+
rr as CalendarSelectionTypes,
|
|
209
|
+
Yr as ConnectCard,
|
|
210
|
+
$r as ConnectDrawer,
|
|
211
|
+
er as CurrencyDialog,
|
|
212
|
+
tr as CurrencyInput,
|
|
213
|
+
Qr as CurrencyText,
|
|
214
|
+
C as DEFAULT_DONUT_SIZE,
|
|
215
|
+
_ as DEFAULT_STROKE_WIDTH,
|
|
216
|
+
sr as DataRow,
|
|
217
|
+
ur as DateRangeSelector,
|
|
218
|
+
cr as Dialog,
|
|
219
|
+
pr as Donut,
|
|
220
|
+
gr as Drawer,
|
|
221
|
+
Vr as EmptyState,
|
|
222
|
+
Zr as Error,
|
|
223
|
+
Er as ErrorBoundary,
|
|
224
|
+
Xr as GlobalAccountFilter,
|
|
225
|
+
re as GlobalDataContext,
|
|
226
|
+
ee as GlobalDataProvider,
|
|
227
|
+
q as GlobalStore,
|
|
228
|
+
Me as INCOME_ACCOUNT_TYPES,
|
|
229
|
+
hr as IconBacking,
|
|
230
|
+
_r as InformationTooltip,
|
|
231
|
+
W as LOADING_STATUS,
|
|
232
|
+
Le as ListItemAction,
|
|
233
|
+
Ue as ListItemRow,
|
|
234
|
+
Be as ListItemWrapper,
|
|
235
|
+
kr as Loader,
|
|
236
|
+
Or as MicroWidgetContainer,
|
|
237
|
+
Tr as MiniWidgetContainer,
|
|
238
|
+
U as MultiSegmentDonut,
|
|
239
|
+
we as PAYMENT_ACCOUNT_TYPES,
|
|
240
|
+
L as RECURRENCE_COPY,
|
|
241
|
+
wr as ResponsiveButton,
|
|
242
|
+
Ne as SPENDING_ACCOUNT_TYPES,
|
|
243
|
+
qe as SearchBox,
|
|
244
|
+
nr as Select,
|
|
245
|
+
Pr as SelectionBox,
|
|
246
|
+
Ar as SingleSegmentDonut,
|
|
247
|
+
Fe as Sizes,
|
|
248
|
+
Wr as StatusBar,
|
|
249
|
+
$e as TOUCH_TARGET,
|
|
250
|
+
Gr as TabContentContainer,
|
|
251
|
+
Qe as ToggleButtonListItem,
|
|
252
|
+
je as ToggleListItem,
|
|
253
|
+
lr as WidgetContainer,
|
|
254
|
+
oe as WidgetContainerContext,
|
|
255
|
+
te as WidgetContainerProvider,
|
|
256
|
+
Ke as analyticsSession,
|
|
257
|
+
F as buildDynamicCopy,
|
|
258
|
+
$ as buildPluralCopy,
|
|
259
|
+
Q as formatCurrency,
|
|
260
|
+
j as formatOrdinal,
|
|
261
|
+
V as formatPercentage,
|
|
262
|
+
K as generateEqualIntervals,
|
|
263
|
+
G as getClientTheme,
|
|
264
|
+
Z as getCurrencyCodes,
|
|
265
|
+
J as getPluralRules,
|
|
266
|
+
ze as useAccountDisplayName,
|
|
267
|
+
ae as useAccountStore,
|
|
268
|
+
se as useAppConfig,
|
|
269
|
+
ne as useBudgetsStore,
|
|
270
|
+
ie as useCashflowStore,
|
|
271
|
+
ue as useCategoryStore,
|
|
272
|
+
Ze as useCombineEvents,
|
|
273
|
+
Je as useCombinePageviews,
|
|
274
|
+
le as useDebtStore,
|
|
275
|
+
me as useError,
|
|
276
|
+
de as useEvent,
|
|
277
|
+
ce as useFinstrongStore,
|
|
278
|
+
fe as useGlobalCopyStore,
|
|
279
|
+
pe as useGlobalStore,
|
|
280
|
+
ye as useGlobalUiStore,
|
|
281
|
+
ge as useGoalStore,
|
|
282
|
+
xe as useHelpStore,
|
|
283
|
+
Ee as useHoldingStore,
|
|
284
|
+
eo as useInsightsEnabled,
|
|
285
|
+
Se as useLoad,
|
|
286
|
+
he as useMerchantStore,
|
|
287
|
+
Ce as useNetWorthStore,
|
|
288
|
+
_e as useNotificationStore,
|
|
289
|
+
ve as usePageView,
|
|
290
|
+
P as usePrevious,
|
|
291
|
+
ke as useRecurringTransactionsStore,
|
|
292
|
+
to as useScreenSize,
|
|
293
|
+
be as useSettingsStore,
|
|
294
|
+
Oe as useTransactionStore,
|
|
295
|
+
De as useTrendsStore,
|
|
296
|
+
Te as useUserStore,
|
|
297
|
+
Ie as useWidgetContainerProvider,
|
|
298
|
+
mr as useWidgetHeaderStyles,
|
|
299
|
+
so as useWidgetLoadTimer
|
|
1046
300
|
};
|