@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2
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 +335 -0
- package/README.md +5 -3
- package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
- package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
- package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
- package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
- package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
- package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
- package/dist/Accounts-CseLC3lL.mjs +5 -0
- package/dist/Accounts-o7ohkngR.mjs +27 -0
- package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
- package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
- package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
- package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
- package/dist/CashflowStore-CeAzChyD.mjs +91 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
- package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
- package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
- package/dist/Connect-eYIWqCEr.mjs +39 -0
- package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
- package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
- package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
- package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
- package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
- package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
- package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
- package/dist/Dialog-Ck34yr-d.mjs +63 -0
- package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
- package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
- package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
- package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
- package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
- package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
- package/dist/Goal-0loDagc5.mjs +6 -0
- package/dist/GoalStore-fgXt--2Y.mjs +418 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
- package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-EAr5ox5U.mjs +612 -0
- package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
- package/dist/Loader-D3rjKx72.mjs +21 -0
- package/dist/Localization-CPkpIwIx.mjs +37 -0
- package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
- package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
- package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
- package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
- package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
- package/dist/Notification-DTNYSd8P.mjs +7 -0
- package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
- package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
- package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
- package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
- package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
- package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
- package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
- package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
- package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
- package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
- package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
- package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
- package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
- package/dist/SpendingLegend-BgjazduU.mjs +193 -0
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
- package/dist/Transaction-Cn5_iFm0.mjs +5 -0
- package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
- package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
- package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
- package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
- package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
- package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
- package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
- package/dist/accounts/AccountsWidget.d.ts +1 -1
- package/dist/accounts/api/AccountApi.d.ts +1 -1
- package/dist/accounts/components/AccountListItem.d.ts +1 -1
- package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
- package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
- package/dist/accounts/index.es.js +459 -368
- package/dist/accounts/stores/AccountStore.d.ts +2 -1
- package/dist/accounts/stores/UiStore.d.ts +1 -1
- package/dist/accounts/utils/AccountDetails.d.ts +1 -1
- package/dist/accounts/utils/AccountFields.d.ts +1 -1
- package/dist/accounts/utils/Accounts.d.ts +2 -2
- package/dist/analytics/index.es.js +93 -112
- package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
- package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
- package/dist/budgets/api/BudgetsApi.d.ts +5 -1
- package/dist/budgets/components/BubbleChart.d.ts +1 -1
- package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
- package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
- package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
- package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
- package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
- package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
- package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
- package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
- package/dist/budgets/index.es.js +851 -865
- package/dist/budgets/store/BudgetsStore.d.ts +15 -1
- package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
- package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
- package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
- package/dist/cashflow/CashflowWidget.d.ts +1 -1
- package/dist/cashflow/api/CashflowApi.d.ts +1 -1
- package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
- package/dist/cashflow/index.es.js +290 -288
- package/dist/cashflow/stores/UiStore.d.ts +1 -1
- package/dist/cashflow/util/Filters.d.ts +1 -1
- package/dist/categories/components/CategoryRow.d.ts +1 -1
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
- package/dist/categories/components/SubcategoryList.d.ts +1 -1
- package/dist/categories/components/SubcategoryRow.d.ts +1 -1
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/categories/util/CategoryUtil.d.ts +1 -1
- package/dist/common/api/AnalyticsApi.d.ts +1 -1
- package/dist/common/api/AppDataApi.d.ts +1 -1
- package/dist/common/api/BeatApi.d.ts +1 -1
- package/dist/common/api/CategoryApi.d.ts +1 -1
- package/dist/common/api/GlobalCopyApi.d.ts +1 -1
- package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
- package/dist/common/api/NotificationApi.d.ts +1 -1
- package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
- package/dist/common/api/UserApi.d.ts +1 -1
- package/dist/common/components/CurrencyDialog.d.ts +1 -1
- package/dist/common/components/CurrencyInput.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/charts/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
- package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/constants/Account.d.ts +1 -1
- package/dist/common/constants/Analytics.d.ts +10 -0
- package/dist/common/constants/ApiEndpoints.d.ts +1 -0
- package/dist/common/constants/DefaultConfig.d.ts +1 -1
- package/dist/common/constants/ScheduledPayment.d.ts +1 -10
- package/dist/common/constants/SpendingPlan.d.ts +0 -10
- package/dist/common/constants/index.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +2 -1
- package/dist/common/context/hooks.d.ts +4 -4
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
- package/dist/common/hooks/useCombineEvents.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +625 -860
- package/dist/common/stores/AppDataStore.d.ts +3 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/GlobalStore.d.ts +4 -2
- package/dist/common/stores/GlobalUiStore.d.ts +3 -3
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/AccountDisplayName.d.ts +1 -1
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/Analytics.d.ts +1 -1
- package/dist/common/utils/Categories.d.ts +1 -1
- package/dist/common/utils/Fetch.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +9 -1
- package/dist/common/utils/Theme.d.ts +3 -3
- package/dist/common/utils/User.d.ts +1 -1
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/constants/repeatingTransactions.d.ts +10 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +41 -0
- package/dist/{common → core}/types/Analytics.d.ts +6 -3
- package/dist/{common → core}/types/AppData.d.ts +1 -0
- package/dist/{common → core}/types/Beat.d.ts +2 -0
- package/dist/{common → core}/types/Budget.d.ts +8 -0
- package/dist/{common → core}/types/Expense.d.ts +2 -1
- package/dist/{common → core}/types/Finstrong.d.ts +0 -2
- package/dist/{common → core}/types/Notification.d.ts +15 -5
- package/dist/{common → core}/types/index.d.ts +1 -2
- package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
- package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
- package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
- package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +46 -45
- package/dist/debts/DebtsWidget.d.ts +1 -1
- package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
- package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
- package/dist/debts/index.es.js +705 -646
- package/dist/debts/store/DebtsStore.d.ts +2 -1
- package/dist/debts/utils/DebtStore.d.ts +1 -1
- package/dist/debts/utils/DebtsWidget.d.ts +7 -1
- package/dist/debts/utils/shared.d.ts +1 -1
- package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
- package/dist/finstrong/components/HealthChart.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
- package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
- package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
- package/dist/finstrong/index.es.js +161 -159
- package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/api/GoalApi.d.ts +2 -2
- package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
- package/dist/goals/components/AddGoal.d.ts +1 -1
- package/dist/goals/components/GoalDetails.d.ts +1 -1
- package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
- package/dist/goals/components/GoalList.d.ts +1 -1
- package/dist/goals/components/GoalStatusCard.d.ts +1 -1
- package/dist/goals/components/ManageGoals.d.ts +1 -1
- package/dist/goals/components/actions/AccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
- package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
- package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
- package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
- package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
- package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
- package/dist/goals/index.es.js +445 -419
- package/dist/goals/stores/GoalStore.d.ts +2 -1
- package/dist/goals/util/GoalsUtil.d.ts +1 -1
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/api/HelpApi.d.ts +1 -1
- package/dist/help/components/HelpContent.d.ts +1 -1
- package/dist/help/components/HelpList.d.ts +1 -1
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/ContentItem.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/NoImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/components/content/section/Accounts.d.ts +1 -1
- package/dist/help/components/content/section/Budgets.d.ts +1 -1
- package/dist/help/components/content/section/CashFlow.d.ts +1 -1
- package/dist/help/components/content/section/Debts.d.ts +1 -1
- package/dist/help/components/content/section/General.d.ts +1 -1
- package/dist/help/components/content/section/Goals.d.ts +1 -1
- package/dist/help/components/content/section/Insights.d.ts +1 -1
- package/dist/help/components/content/section/Investments.d.ts +1 -1
- package/dist/help/components/content/section/Mobile.d.ts +1 -1
- package/dist/help/components/content/section/NetWorth.d.ts +1 -1
- package/dist/help/components/content/section/Notifications.d.ts +1 -1
- package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
- package/dist/help/components/content/section/Spending.d.ts +1 -1
- package/dist/help/components/content/section/Transactions.d.ts +1 -1
- package/dist/help/components/content/section/Trends.d.ts +1 -1
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
- package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
- package/dist/help/index.es.js +8 -8
- package/dist/help/store/HelpStore.d.ts +5 -4
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
- package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
- package/dist/insights/components/feed/Header.d.ts +8 -0
- package/dist/insights/components/index.d.ts +4 -0
- package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
- package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
- package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
- package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
- package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
- package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
- package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
- package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
- package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
- package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
- package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
- package/dist/insights/index.es.js +1361 -1081
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/api/HoldingApi.d.ts +1 -1
- package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
- package/dist/investments/index.es.js +258 -258
- package/dist/investments/stores/HoldingStore.d.ts +2 -1
- package/dist/investments/util/InvestmentUtil.d.ts +1 -1
- package/dist/merchants/api/MerchantApi.d.ts +1 -1
- package/dist/merchants/index.es.js +16 -16
- package/dist/merchants/stores/MerchantStore.d.ts +2 -1
- package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
- package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
- package/dist/microinsights/beaticons/index.d.ts +3 -0
- package/dist/microinsights/cards/InsightCard.d.ts +1 -1
- package/dist/microinsights/carousel/BeatList.d.ts +1 -1
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
- package/dist/microinsights/constants/Analytics.d.ts +1 -1
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/microinsights/utils/DataSeries.d.ts +1 -1
- package/dist/microinsights/utils/colorType.d.ts +22 -0
- package/dist/networth/NetWorthWidget.d.ts +1 -1
- package/dist/networth/components/micro/NetworthData.d.ts +1 -1
- package/dist/networth/components/micro/ZeroState.d.ts +1 -1
- package/dist/networth/index.es.js +181 -174
- package/dist/networth/stores/NetWorthStore.d.ts +2 -1
- package/dist/networth/types/NetWorth.d.ts +1 -1
- package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
- package/dist/notifications/components/NotificationBadge.d.ts +1 -1
- package/dist/notifications/components/NotificationCard.d.ts +1 -1
- package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
- package/dist/notifications/components/NotificationList.d.ts +2 -1
- package/dist/notifications/index.es.js +104 -92
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
- package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
- package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +477 -451
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
- package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
- package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
- package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
- package/dist/settings/SettingsWidget.d.ts +1 -1
- package/dist/settings/TransactionRulesWidget.d.ts +1 -1
- package/dist/settings/api/SettingsApi.d.ts +1 -2
- package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
- package/dist/settings/components/devices/DeviceList.d.ts +1 -1
- package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
- package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
- package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
- package/dist/settings/index.es.js +314 -323
- package/dist/settings/stores/SettingsStore.d.ts +3 -2
- package/dist/settings/util/Notifications.d.ts +1 -1
- package/dist/spending/SpendingMiniWidget.d.ts +1 -1
- package/dist/spending/SpendingWidget.d.ts +1 -1
- package/dist/spending/index.es.js +167 -166
- package/dist/spending/utils/SpendingData.d.ts +1 -1
- package/dist/transactions/TransactionWidget.d.ts +1 -1
- package/dist/transactions/api/TransactionApi.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
- package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
- package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
- package/dist/transactions/constants/Actions.d.ts +4 -3
- package/dist/transactions/constants/Transaction.d.ts +1 -1
- package/dist/transactions/index.es.js +195 -187
- package/dist/transactions/stores/TransactionStore.d.ts +2 -1
- package/dist/transactions/stores/UiStore.d.ts +1 -1
- package/dist/transactions/utils/Filters.d.ts +1 -1
- package/dist/transactions/utils/Transactions.d.ts +1 -1
- package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
- package/dist/trends/TrendsFullWidget.d.ts +1 -1
- package/dist/trends/TrendsMiniWidget.d.ts +1 -1
- package/dist/trends/TrendsWidget.d.ts +1 -1
- package/dist/trends/components/CategoriesList.d.ts +1 -1
- package/dist/trends/components/CategoriesListItem.d.ts +1 -1
- package/dist/trends/components/CategoryDetails.d.ts +3 -0
- package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
- package/dist/trends/components/TrendsInsights.d.ts +1 -1
- package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
- package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
- package/dist/trends/index.es.js +817 -764
- package/dist/trends/stores/TrendsStore.d.ts +2 -1
- package/dist/trends/utils/SpendingData.d.ts +1 -1
- package/dist/trends/utils/TrendsData.d.ts +1 -1
- package/dist/trends/utils/TrendsTable.d.ts +1 -1
- package/dist/trends/utils/TrendsWidget.d.ts +7 -0
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
- package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
- package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
- package/package.json +17 -10
- package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
- package/dist/AccountListItem-k63LpVBs.mjs +0 -90
- package/dist/Accounts-CuE8aSZN.mjs +0 -27
- package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
- package/dist/CashflowStore-naOtJcwo.mjs +0 -91
- package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
- package/dist/Dialog-jmgGw5WA.mjs +0 -58
- package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
- package/dist/GoalStore-BjHKNAVm.mjs +0 -421
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-CnscUFUG.mjs +0 -580
- package/dist/Loader-icSc5MlE.mjs +0 -24
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
- package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
- package/dist/Notification-Bs1fdbzI.mjs +0 -95
- package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
- package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
- package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
- package/dist/TransactionList-BDffKJMO.mjs +0 -204
- package/dist/User-DS18cMaz.mjs +0 -237
- package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/types/SpendingPlan.d.ts +0 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
- /package/dist/{common → core}/types/Account.d.ts +0 -0
- /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
- /package/dist/{common → core}/types/Category.d.ts +0 -0
- /package/dist/{common → core}/types/Client.d.ts +0 -0
- /package/dist/{common → core}/types/Date.d.ts +0 -0
- /package/dist/{common → core}/types/Debt.d.ts +0 -0
- /package/dist/{common → core}/types/Global.d.ts +0 -0
- /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
- /package/dist/{common → core}/types/Goal.d.ts +0 -0
- /package/dist/{common → core}/types/Handlers.d.ts +0 -0
- /package/dist/{common → core}/types/Help.d.ts +0 -0
- /package/dist/{common → core}/types/Holding.d.ts +0 -0
- /package/dist/{common → core}/types/Institution.d.ts +0 -0
- /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
- /package/dist/{common → core}/types/Merchant.d.ts +0 -0
- /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
- /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
- /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
- /package/dist/{common → core}/types/Transaction.d.ts +0 -0
- /package/dist/{common → core}/types/User.d.ts +0 -0
- /package/dist/{common → core}/types/Widgets.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/index.d.ts +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import B from "react";
|
|
3
|
+
import { observer as I } from "mobx-react-lite";
|
|
4
|
+
import j from "@mui/material/Box";
|
|
5
|
+
import C from "@mui/material/Button";
|
|
6
|
+
import P from "@mui/material/Divider";
|
|
7
|
+
import w from "@mui/material/IconButton";
|
|
8
|
+
import O from "@mui/material/Popover";
|
|
9
|
+
import S from "@mui/material/Stack";
|
|
10
|
+
import D from "@mui/material/Tooltip";
|
|
11
|
+
import { FilterAlt as A } from "@mxenabled/mx-icons";
|
|
12
|
+
import F from "@mui/material/Checkbox";
|
|
13
|
+
import G from "@mui/material/List";
|
|
14
|
+
import y from "@mui/material/ListItem";
|
|
15
|
+
import _ from "@mui/material/ListItemButton";
|
|
16
|
+
import E from "@mui/material/ListItemIcon";
|
|
17
|
+
import v from "@mui/material/ListItemText";
|
|
18
|
+
import { b as z, u as M, d as L } from "./hooks-BxkfR-Ff.mjs";
|
|
19
|
+
import { u as H } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
20
|
+
const N = I(
|
|
21
|
+
({ allowedAccountTypes: a }) => {
|
|
22
|
+
const { accountFilterMap: s, updateAccountFilterMap: u } = z(), { accounts: g, common: x } = M(), { account_filter: c } = x, { accountsByTypeMap: n } = L(), k = B.useMemo(
|
|
23
|
+
() => Array.from(n.keys()).reduce((t, i) => {
|
|
24
|
+
if (!a || a && a.includes(i)) {
|
|
25
|
+
const o = n.get(i);
|
|
26
|
+
o && t.push(...o);
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
}, []),
|
|
30
|
+
[n, a]
|
|
31
|
+
), p = new Map(
|
|
32
|
+
Array.from(s.entries()).filter(([t]) => k.some((i) => i.guid === t))
|
|
33
|
+
), m = Array.from(p.values()).every((t) => t), h = Array.from(p.values()).some((t) => t), f = () => {
|
|
34
|
+
for (const t of p.keys())
|
|
35
|
+
u(t, !m);
|
|
36
|
+
}, b = (t) => {
|
|
37
|
+
const i = n.get(t);
|
|
38
|
+
if (!i) return;
|
|
39
|
+
const o = i.some((r) => s.get(r.guid));
|
|
40
|
+
for (const r of i)
|
|
41
|
+
u(r.guid, !o);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ d(
|
|
44
|
+
G,
|
|
45
|
+
{
|
|
46
|
+
dense: !0,
|
|
47
|
+
id: "filter_accounts",
|
|
48
|
+
sx: { overflowY: "scroll", maxHeight: 350, minWidth: 280 },
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
y,
|
|
52
|
+
{
|
|
53
|
+
"aria-label": c.select_all_accounts,
|
|
54
|
+
disableGutters: !0,
|
|
55
|
+
disablePadding: !0,
|
|
56
|
+
role: "menuitem",
|
|
57
|
+
sx: { py: 16 },
|
|
58
|
+
children: /* @__PURE__ */ d(_, { disableGutters: !0, onClick: f, sx: { p: 0, px: 8 }, children: [
|
|
59
|
+
/* @__PURE__ */ e(
|
|
60
|
+
F,
|
|
61
|
+
{
|
|
62
|
+
"aria-checked": m,
|
|
63
|
+
checked: m,
|
|
64
|
+
disableRipple: !0,
|
|
65
|
+
indeterminate: !m && h,
|
|
66
|
+
inputProps: { "aria-labelledby": "label-select-all" },
|
|
67
|
+
size: "small",
|
|
68
|
+
tabIndex: -1
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
v,
|
|
73
|
+
{
|
|
74
|
+
id: "label-select-all",
|
|
75
|
+
primary: c.select_all_accounts,
|
|
76
|
+
primaryTypographyProps: { variant: "body1" }
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
Array.from(n.keys()).map((t) => {
|
|
83
|
+
const i = n.get(t), o = a ? !a.includes(t) : !1, r = g.account_type_accounts[t];
|
|
84
|
+
return (
|
|
85
|
+
// Account Type Header
|
|
86
|
+
/* @__PURE__ */ e(
|
|
87
|
+
y,
|
|
88
|
+
{
|
|
89
|
+
"aria-label": r,
|
|
90
|
+
disableGutters: !0,
|
|
91
|
+
disablePadding: !0,
|
|
92
|
+
children: /* @__PURE__ */ d(S, { sx: { pb: 8, width: "100%" }, children: [
|
|
93
|
+
/* @__PURE__ */ e(P, {}),
|
|
94
|
+
/* @__PURE__ */ e(
|
|
95
|
+
G,
|
|
96
|
+
{
|
|
97
|
+
dense: !0,
|
|
98
|
+
role: "menu",
|
|
99
|
+
subheader: /* @__PURE__ */ e(y, { "aria-label": r, role: "menu", children: /* @__PURE__ */ e(
|
|
100
|
+
_,
|
|
101
|
+
{
|
|
102
|
+
disableGutters: !0,
|
|
103
|
+
disabled: o,
|
|
104
|
+
onClick: () => b(t),
|
|
105
|
+
sx: { pl: 16, minHeight: 40, justifyContent: "left" },
|
|
106
|
+
children: /* @__PURE__ */ e(
|
|
107
|
+
v,
|
|
108
|
+
{
|
|
109
|
+
primary: r,
|
|
110
|
+
primaryTypographyProps: { variant: "body1", fontWeight: "bold" }
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
) }),
|
|
115
|
+
children: i?.map((l) => (
|
|
116
|
+
// Account Checkbox
|
|
117
|
+
/* @__PURE__ */ e(y, { "aria-label": l.displayName, role: "menuitem", children: /* @__PURE__ */ d(
|
|
118
|
+
_,
|
|
119
|
+
{
|
|
120
|
+
disableGutters: !0,
|
|
121
|
+
disabled: o,
|
|
122
|
+
onClick: () => u(l.guid, !s.get(l.guid)),
|
|
123
|
+
sx: { p: 0, minHeight: 40 },
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
|
|
126
|
+
F,
|
|
127
|
+
{
|
|
128
|
+
"aria-checked": s.get(l.guid),
|
|
129
|
+
checked: s.get(l.guid),
|
|
130
|
+
disableRipple: !0,
|
|
131
|
+
inputProps: { "aria-labelledby": `label-${l.guid}` },
|
|
132
|
+
size: "small",
|
|
133
|
+
tabIndex: -1
|
|
134
|
+
}
|
|
135
|
+
) }),
|
|
136
|
+
/* @__PURE__ */ e(
|
|
137
|
+
v,
|
|
138
|
+
{
|
|
139
|
+
id: `label-${l.guid}`,
|
|
140
|
+
primary: l.displayName,
|
|
141
|
+
primaryTypographyProps: { variant: "body1" }
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
) }, l.guid)
|
|
147
|
+
))
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] })
|
|
151
|
+
},
|
|
152
|
+
t
|
|
153
|
+
)
|
|
154
|
+
);
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
), ne = I(
|
|
161
|
+
({
|
|
162
|
+
allowedAccountTypes: a,
|
|
163
|
+
onAccountFilterClick: s,
|
|
164
|
+
sx: u = {},
|
|
165
|
+
variant: g = "text"
|
|
166
|
+
}) => {
|
|
167
|
+
const { isDesktop: x } = H(), { common: c } = M(), { accountFilterMap: n, resetAccountFilterMap: k } = z(), { detailedAccounts: p, updateAccountFilter: m } = L(), [h, f] = B.useState(null), b = (W) => {
|
|
168
|
+
k(), f(W.currentTarget), s?.();
|
|
169
|
+
}, t = () => {
|
|
170
|
+
f(null);
|
|
171
|
+
}, i = async () => {
|
|
172
|
+
await m(n), f(null);
|
|
173
|
+
}, o = c.account_filter, r = !!h, l = p.length === 0;
|
|
174
|
+
return /* @__PURE__ */ d(j, { m: 4, sx: { ...u }, children: [
|
|
175
|
+
x ? /* @__PURE__ */ e(
|
|
176
|
+
C,
|
|
177
|
+
{
|
|
178
|
+
"aria-controls": r ? "filter_accounts" : void 0,
|
|
179
|
+
"aria-expanded": r,
|
|
180
|
+
"aria-haspopup": !0,
|
|
181
|
+
"aria-label": o.title,
|
|
182
|
+
disabled: l,
|
|
183
|
+
onClick: b,
|
|
184
|
+
startIcon: /* @__PURE__ */ e(A, { size: 24 }),
|
|
185
|
+
sx: { p: 8, whiteSpace: "nowrap", minWidth: "max-content" },
|
|
186
|
+
variant: g,
|
|
187
|
+
children: c.filter_button
|
|
188
|
+
}
|
|
189
|
+
) : /* @__PURE__ */ e(D, { id: "filter-accounts", placement: "bottom", title: o.title, children: /* @__PURE__ */ e(
|
|
190
|
+
w,
|
|
191
|
+
{
|
|
192
|
+
"aria-controls": r ? "filter_accounts" : void 0,
|
|
193
|
+
"aria-describedby": "filter-accounts",
|
|
194
|
+
"aria-expanded": r,
|
|
195
|
+
"aria-haspopup": !0,
|
|
196
|
+
"aria-label": o.title,
|
|
197
|
+
color: "primary",
|
|
198
|
+
disabled: l,
|
|
199
|
+
onClick: b,
|
|
200
|
+
sx: { p: 8 },
|
|
201
|
+
children: /* @__PURE__ */ e(A, { size: 24 })
|
|
202
|
+
}
|
|
203
|
+
) }),
|
|
204
|
+
/* @__PURE__ */ e(
|
|
205
|
+
O,
|
|
206
|
+
{
|
|
207
|
+
anchorEl: h,
|
|
208
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
209
|
+
onClose: t,
|
|
210
|
+
open: r,
|
|
211
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
212
|
+
children: /* @__PURE__ */ d(S, { children: [
|
|
213
|
+
/* @__PURE__ */ e(N, { allowedAccountTypes: a }),
|
|
214
|
+
/* @__PURE__ */ e(P, {}),
|
|
215
|
+
/* @__PURE__ */ d(S, { direction: "row", justifyContent: "space-between", spacing: 16, sx: { p: 16 }, children: [
|
|
216
|
+
/* @__PURE__ */ e(C, { fullWidth: !0, onClick: t, variant: "text", children: c.cancel_button }),
|
|
217
|
+
/* @__PURE__ */ e(
|
|
218
|
+
C,
|
|
219
|
+
{
|
|
220
|
+
"aria-label": o.filter_button_aria,
|
|
221
|
+
color: "primary",
|
|
222
|
+
fullWidth: !0,
|
|
223
|
+
onClick: i,
|
|
224
|
+
variant: "contained",
|
|
225
|
+
children: c.filter_button
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
] })
|
|
229
|
+
] })
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
] });
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
export {
|
|
236
|
+
ne as G
|
|
237
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var A = /* @__PURE__ */ ((E) => (E[E.DEBT_TRACK = 1] = "DEBT_TRACK", E[E.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", E[E.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", E[E.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", E))(A || {}), N = /* @__PURE__ */ ((E) => (E[E.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", E[E.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", E[E.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", E[E.ACTION = 4] = "ACTION", E))(N || {}), C = /* @__PURE__ */ ((E) => (E[E.AUTOMOBILE = 1] = "AUTOMOBILE", E[E.COLLEGE = 2] = "COLLEGE", E[E.HOUSE = 3] = "HOUSE", E[E.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", E[E.VACATION = 5] = "VACATION", E[E.ELECTRONIC = 6] = "ELECTRONIC", E[E.OTHER = 7] = "OTHER", E[E.RETIREMENT = 8] = "RETIREMENT", E[E.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", E[E.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", E[E.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", E[E.CREDIT_CARD = 12] = "CREDIT_CARD", E[E.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", E[E.LOANS = 14] = "LOANS", E))(C || {});
|
|
2
|
+
export {
|
|
3
|
+
N as G,
|
|
4
|
+
C as M,
|
|
5
|
+
A as T
|
|
6
|
+
};
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import { jsxs as g, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
import E from "@mui/material/Button";
|
|
4
|
+
import C from "@mui/material/Card";
|
|
5
|
+
import w from "@mui/material/CardContent";
|
|
6
|
+
import I from "@mui/material/CardHeader";
|
|
7
|
+
import b from "@mui/material/Stack";
|
|
8
|
+
import { AccountBalance as S, ChevronRight as L } from "@mxenabled/mx-icons";
|
|
9
|
+
import { Text as p } from "@mxenabled/mxui";
|
|
10
|
+
import { C as O } from "./ConnectDrawer-C0wjwcJt.mjs";
|
|
11
|
+
import { makeAutoObservable as x, runInAction as u } from "mobx";
|
|
12
|
+
import { F as N, A as i } from "./Fetch-B6tMJC1r.mjs";
|
|
13
|
+
import { fromUnixTime as y } from "date-fns/fromUnixTime";
|
|
14
|
+
import { addYears as M } from "date-fns/addYears";
|
|
15
|
+
import { getUnixTime as v } from "date-fns/getUnixTime";
|
|
16
|
+
import { T as n, M as l } from "./Goal-0loDagc5.mjs";
|
|
17
|
+
import { b as d } from "./Localization-CPkpIwIx.mjs";
|
|
18
|
+
import { a as F } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
19
|
+
import { f as $, D } from "./DateFormats-BMpMrZpW.mjs";
|
|
20
|
+
const re = ({ description: a, label: e, title: t }) => {
|
|
21
|
+
const [o, r] = _.useState(!1);
|
|
22
|
+
return /* @__PURE__ */ g(_.Fragment, { children: [
|
|
23
|
+
/* @__PURE__ */ g(C, { sx: { m: 24 }, children: [
|
|
24
|
+
/* @__PURE__ */ c(
|
|
25
|
+
I,
|
|
26
|
+
{
|
|
27
|
+
avatar: /* @__PURE__ */ c(S, {}),
|
|
28
|
+
sx: { ".MuiCardHeader-avatar": { mr: 8 } },
|
|
29
|
+
title: /* @__PURE__ */ c(p, { bold: !0, variant: "body1", children: t })
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ c(w, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ g(b, { alignItems: "flex-start", spacing: 2, children: [
|
|
33
|
+
/* @__PURE__ */ c(p, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: a }),
|
|
34
|
+
/* @__PURE__ */ c(
|
|
35
|
+
E,
|
|
36
|
+
{
|
|
37
|
+
endIcon: /* @__PURE__ */ c(L, {}),
|
|
38
|
+
onClick: () => r(!0),
|
|
39
|
+
sx: {
|
|
40
|
+
pl: 0,
|
|
41
|
+
":hover": {
|
|
42
|
+
bgcolor: "unset"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
variant: "text",
|
|
46
|
+
children: e
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }) })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ c(
|
|
52
|
+
O,
|
|
53
|
+
{
|
|
54
|
+
onClose: () => r(!1),
|
|
55
|
+
showConnectWidget: o,
|
|
56
|
+
title: e
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
class G {
|
|
62
|
+
fetchInstance;
|
|
63
|
+
constructor(e, t, o) {
|
|
64
|
+
this.fetchInstance = new N(e, t, void 0, o);
|
|
65
|
+
}
|
|
66
|
+
addGoal = async (e) => this.fetchInstance.post(i.GOALS, e).then((t) => t.goal);
|
|
67
|
+
addRetirementGoal = async (e) => this.fetchInstance.post(i.RETIREMENT_GOALS, e).then((t) => t.retirement_goal);
|
|
68
|
+
addRetirementGoalAccount = async (e) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, e).then((t) => t.retirement_goal_account);
|
|
69
|
+
getGoalByGuid = async (e) => this.fetchInstance.get(`${i.GOALS}/${e}`).then((t) => t.goal);
|
|
70
|
+
getGoals = async () => this.fetchInstance.get(i.GOALS).then((e) => e.goals);
|
|
71
|
+
getMonthlyCashFlowProfile = async () => this.fetchInstance.get(i.MONTHLY_CASH_FLOW_PROFILE).then((e) => e.monthly_cash_flow_profile);
|
|
72
|
+
getRetirementGoals = async () => this.fetchInstance.get(i.RETIREMENT_GOALS).then((e) => e.retirement_goals);
|
|
73
|
+
getRetirementGoalAccounts = async () => this.fetchInstance.get(i.RETIREMENT_GOAL_ACCOUNTS).then((e) => e.retirement_goal_accounts);
|
|
74
|
+
removeGoal = async (e) => this.fetchInstance.delete(`${i.GOALS}/${e}`).then((t) => t);
|
|
75
|
+
removeRetirementGoal = async (e) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${e}`).then((t) => t);
|
|
76
|
+
removeRetirementGoalAccount = async (e) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${e}`).then((t) => t);
|
|
77
|
+
reorderGoals = async (e) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: e }).then((t) => t.goals);
|
|
78
|
+
updateGoal = async (e) => this.fetchInstance.put(`${i.GOALS}/${e.guid}`, e).then((t) => t.goal);
|
|
79
|
+
updateMonthlyCashFlowProfile = async (e) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, e).then((t) => t.monthly_cash_flow_profile);
|
|
80
|
+
updateRetirementGoal = async (e) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${e.guid}`, e).then((t) => t.retirement_goal);
|
|
81
|
+
}
|
|
82
|
+
function ae(a, e) {
|
|
83
|
+
const t = e.track_type === n.DEBT_TRACK ? e.initial_amount : e.amount;
|
|
84
|
+
let o = e.current_amount / t;
|
|
85
|
+
o > 1 && (o = 1), o = e.track_type === n.DEBT_TRACK ? 1 - o : o, isNaN(o) && (o = 1);
|
|
86
|
+
let r = "chart.chart1", s = "common.black";
|
|
87
|
+
e.track_type === n.DEBT_TRACK ? (s = "common.white", r = "chart.chart5") : e.track_type === n.RETIREMENT_TRACK && (r = "chart.chart6");
|
|
88
|
+
const h = {
|
|
89
|
+
style: "percent",
|
|
90
|
+
minimumFractionDigits: 0,
|
|
91
|
+
maximumFractionDigits: 0
|
|
92
|
+
}, m = e.is_complete ? e.completed_at : e.projected_to_complete_at, R = m ? y(m) : /* @__PURE__ */ new Date(), A = d(
|
|
93
|
+
a.goal_percentage,
|
|
94
|
+
F(o, h)
|
|
95
|
+
), T = d(
|
|
96
|
+
e.is_complete ? a.completed_label : a.goal_projection,
|
|
97
|
+
$(R, D.MONTH_SHORT_YEAR)
|
|
98
|
+
);
|
|
99
|
+
return {
|
|
100
|
+
backgroundColor: r,
|
|
101
|
+
color: s,
|
|
102
|
+
percentage: o,
|
|
103
|
+
percentageText: A,
|
|
104
|
+
projectedText: T
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function ne(a) {
|
|
108
|
+
return [
|
|
109
|
+
{
|
|
110
|
+
bgcolor: "chart.chart1",
|
|
111
|
+
icon: "attach_money",
|
|
112
|
+
label: a.saving_goal_label,
|
|
113
|
+
description: a.saving_goal_description,
|
|
114
|
+
subTypes: [
|
|
115
|
+
{
|
|
116
|
+
icon: "ecg_heart",
|
|
117
|
+
label: a.saving_goal_emergency_fund,
|
|
118
|
+
metaType: l.EMERGENCY_FUND
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
icon: "directions_car",
|
|
122
|
+
label: a.saving_gaol_automobile,
|
|
123
|
+
metaType: l.AUTOMOBILE
|
|
124
|
+
},
|
|
125
|
+
{ icon: "school", label: a.saving_goal_college, metaType: l.COLLEGE },
|
|
126
|
+
{ icon: "home", label: a.saving_goal_home, metaType: l.HOUSE },
|
|
127
|
+
{
|
|
128
|
+
icon: "mountain_flag",
|
|
129
|
+
label: a.saving_goal_recreational,
|
|
130
|
+
metaType: l.RECREATIONAL_VEHICLE
|
|
131
|
+
},
|
|
132
|
+
{ icon: "airplane_ticket", label: a.saving_goal_vacation, metaType: l.VACATION },
|
|
133
|
+
{
|
|
134
|
+
icon: "desktop_windows",
|
|
135
|
+
label: a.saving_goal_electronic,
|
|
136
|
+
metaType: l.ELECTRONIC
|
|
137
|
+
},
|
|
138
|
+
{ icon: "payments", label: a.saving_goal_other, metaType: l.OTHER }
|
|
139
|
+
],
|
|
140
|
+
type: n.SAVINGS_TRACK
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
bgcolor: "chart.chart5",
|
|
144
|
+
icon: "note_stack",
|
|
145
|
+
label: a.debt_goal_label,
|
|
146
|
+
description: a.debt_goal_description,
|
|
147
|
+
subTypes: [],
|
|
148
|
+
type: n.DEBT_TRACK
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
bgcolor: "chart.chart6",
|
|
152
|
+
icon: "person",
|
|
153
|
+
label: a.retirement_goal_label,
|
|
154
|
+
description: a.retirement_goal_description,
|
|
155
|
+
subTypes: [],
|
|
156
|
+
type: n.RETIREMENT_TRACK
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
const ie = (a, e) => {
|
|
161
|
+
switch (a) {
|
|
162
|
+
case n.DEBT_TRACK:
|
|
163
|
+
return d(e.zero_state_ongoing, "debt");
|
|
164
|
+
case n.SAVINGS_TRACK:
|
|
165
|
+
return d(e.zero_state_ongoing, "saving");
|
|
166
|
+
default:
|
|
167
|
+
return d(e.zero_state_ongoing, "retirement");
|
|
168
|
+
}
|
|
169
|
+
}, f = (a, e) => {
|
|
170
|
+
const t = y(e), o = M(t, a);
|
|
171
|
+
return v(o);
|
|
172
|
+
};
|
|
173
|
+
class se {
|
|
174
|
+
globalStore;
|
|
175
|
+
api = new G("/", "");
|
|
176
|
+
goals = [];
|
|
177
|
+
goalsLoaded = !1;
|
|
178
|
+
retirementGoals = [];
|
|
179
|
+
retirementGoalsLoaded = !1;
|
|
180
|
+
retirementGoalAccounts = [];
|
|
181
|
+
retirementGoalAccountsLoaded = !1;
|
|
182
|
+
monthlyCashFlowProfile = void 0;
|
|
183
|
+
monthlyCashFlowProfileLoaded = !1;
|
|
184
|
+
newRetirementGoalAccounts = [];
|
|
185
|
+
alert = "";
|
|
186
|
+
selectedGoal = void 0;
|
|
187
|
+
constructor(e) {
|
|
188
|
+
this.globalStore = e, this.api = new G(e.endpoint, e.sessionToken, e.onError), x(this);
|
|
189
|
+
}
|
|
190
|
+
get allGoals() {
|
|
191
|
+
if (!this.isAllGoalDataLoaded) return [];
|
|
192
|
+
const e = this.globalStore.copyStore.copy.goals, t = this.globalStore.userStore.user.birthday;
|
|
193
|
+
return [
|
|
194
|
+
...this.goals,
|
|
195
|
+
...this.retirementGoals.map((o) => ({
|
|
196
|
+
...o,
|
|
197
|
+
amount: o.target_amount,
|
|
198
|
+
name: e.retirement,
|
|
199
|
+
track_type: n.RETIREMENT_TRACK,
|
|
200
|
+
projected_to_complete_at: o.retirement_age && t ? f(o.retirement_age, t) : void 0
|
|
201
|
+
}))
|
|
202
|
+
];
|
|
203
|
+
}
|
|
204
|
+
get orderedGoals() {
|
|
205
|
+
return this.allGoals.slice().sort((e, t) => e.position - t.position);
|
|
206
|
+
}
|
|
207
|
+
get debtGoals() {
|
|
208
|
+
return this.orderedGoals.filter((e) => e.track_type === n.DEBT_TRACK);
|
|
209
|
+
}
|
|
210
|
+
get retirmentGoals() {
|
|
211
|
+
return this.orderedGoals.filter((e) => e.track_type === n.RETIREMENT_TRACK);
|
|
212
|
+
}
|
|
213
|
+
get savingGoals() {
|
|
214
|
+
return this.orderedGoals.filter((e) => e.track_type === n.SAVINGS_TRACK);
|
|
215
|
+
}
|
|
216
|
+
get ongoingGoalsForMicroWidget() {
|
|
217
|
+
const e = this.allGoals.filter(
|
|
218
|
+
(o) => !o.is_complete && o.track_type !== n.EMERGENCY_FUND_TRACK && o.track_type !== null
|
|
219
|
+
), t = [
|
|
220
|
+
n.SAVINGS_TRACK,
|
|
221
|
+
n.DEBT_TRACK,
|
|
222
|
+
n.RETIREMENT_TRACK
|
|
223
|
+
];
|
|
224
|
+
return e.sort((o, r) => {
|
|
225
|
+
const s = o.track_type ? t.indexOf(o.track_type) : -1, h = r.track_type ? t.indexOf(r.track_type) : -1;
|
|
226
|
+
return s - h;
|
|
227
|
+
}).slice(0, 3);
|
|
228
|
+
}
|
|
229
|
+
get isAllGoalDataLoaded() {
|
|
230
|
+
return this.goalsLoaded && this.retirementGoalsLoaded && this.retirementGoalAccountsLoaded && this.monthlyCashFlowProfileLoaded;
|
|
231
|
+
}
|
|
232
|
+
setGoals = (e) => {
|
|
233
|
+
this.goals = e, this.goalsLoaded = !0;
|
|
234
|
+
};
|
|
235
|
+
setRetirementGoals = (e) => {
|
|
236
|
+
this.retirementGoals = e, this.retirementGoalsLoaded = !0;
|
|
237
|
+
};
|
|
238
|
+
setRetirementGoalAccounts = (e) => {
|
|
239
|
+
this.retirementGoalAccounts = e, this.retirementGoalAccountsLoaded = !0;
|
|
240
|
+
};
|
|
241
|
+
setMonthlyCashFlowProfile = (e) => {
|
|
242
|
+
this.monthlyCashFlowProfile = e, this.monthlyCashFlowProfileLoaded = !0;
|
|
243
|
+
};
|
|
244
|
+
loadGoalData = async () => {
|
|
245
|
+
await Promise.all([
|
|
246
|
+
this.loadGoals(),
|
|
247
|
+
this.loadRetirementGoals(),
|
|
248
|
+
this.loadRetirementGoalAccounts(),
|
|
249
|
+
this.loadMonthlyCashFlowProfile()
|
|
250
|
+
]);
|
|
251
|
+
};
|
|
252
|
+
loadGoals = async () => {
|
|
253
|
+
try {
|
|
254
|
+
const e = await this.api.getGoals();
|
|
255
|
+
this.setGoals(e);
|
|
256
|
+
} catch (e) {
|
|
257
|
+
console.error(`Error occured while getting goals: ${e}`);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
loadRetirementGoals = async () => {
|
|
261
|
+
try {
|
|
262
|
+
const e = await this.api.getRetirementGoals();
|
|
263
|
+
this.setRetirementGoals(e);
|
|
264
|
+
} catch (e) {
|
|
265
|
+
console.error(`Error occurred while loading retirement goals: ${e}`);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
loadRetirementGoalAccounts = async () => {
|
|
269
|
+
try {
|
|
270
|
+
const e = await this.api.getRetirementGoalAccounts();
|
|
271
|
+
this.setRetirementGoalAccounts(e);
|
|
272
|
+
} catch (e) {
|
|
273
|
+
console.error(`Error occurred while loading retirement goal accounts: ${e}`);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
loadMonthlyCashFlowProfile = async () => {
|
|
277
|
+
try {
|
|
278
|
+
const e = await this.api.getMonthlyCashFlowProfile();
|
|
279
|
+
this.setMonthlyCashFlowProfile(e);
|
|
280
|
+
} catch (e) {
|
|
281
|
+
console.error(`Error occurred while loading monthly cash flow profile: ${e}`);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
addGoal = async (e) => {
|
|
285
|
+
try {
|
|
286
|
+
const t = await this.api.addGoal(e);
|
|
287
|
+
this.setGoals([...this.goals, t]);
|
|
288
|
+
} catch (t) {
|
|
289
|
+
console.error(`Error occurred while adding goal: ${t}`);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
addRetirementGoal = async (e) => {
|
|
293
|
+
const t = this.globalStore.copyStore.copy.goals;
|
|
294
|
+
try {
|
|
295
|
+
const o = await this.api.addRetirementGoal(e), r = [], s = this.globalStore.userStore.user.birthday;
|
|
296
|
+
for (const h of this.newRetirementGoalAccounts) {
|
|
297
|
+
const m = await this.api.addRetirementGoalAccount({
|
|
298
|
+
...h,
|
|
299
|
+
retirement_goal_guid: o.guid
|
|
300
|
+
});
|
|
301
|
+
r.push(m);
|
|
302
|
+
}
|
|
303
|
+
this.setNewRetirementGoalAccounts([]), this.retirementGoals = [
|
|
304
|
+
...this.retirementGoals,
|
|
305
|
+
{
|
|
306
|
+
...o,
|
|
307
|
+
amount: o.target_amount,
|
|
308
|
+
name: t.retirement,
|
|
309
|
+
track_type: n.RETIREMENT_TRACK,
|
|
310
|
+
projected_to_complete_at: o.retirement_age && s ? f(o.retirement_age, s) : void 0
|
|
311
|
+
}
|
|
312
|
+
], this.setRetirementGoalAccounts([...this.retirementGoalAccounts, ...r]);
|
|
313
|
+
} catch (o) {
|
|
314
|
+
console.error(`Error occurred while adding retirement goal: ${o}`);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
addRetirementGoalAccount = async (e) => {
|
|
318
|
+
try {
|
|
319
|
+
const t = await this.api.addRetirementGoalAccount(e);
|
|
320
|
+
u(() => {
|
|
321
|
+
this.retirementGoalAccounts = [...this.retirementGoalAccounts, t];
|
|
322
|
+
});
|
|
323
|
+
} catch (t) {
|
|
324
|
+
console.error(`Error occurred while adding retirement goal account: ${t}`);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
deleteGoal = async (e) => {
|
|
328
|
+
try {
|
|
329
|
+
await this.api.removeGoal(e);
|
|
330
|
+
const t = this.goals.findIndex((o) => o.guid === e);
|
|
331
|
+
t >= 0 && this.goals.splice(t, 1);
|
|
332
|
+
} catch (t) {
|
|
333
|
+
console.error(`Error occured while deleting goal: ${t}`);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
deleteRetirementGoal = async (e) => {
|
|
337
|
+
try {
|
|
338
|
+
const t = this.retirementGoalAccounts.filter(
|
|
339
|
+
(r) => r.retirement_goal_guid === e.guid
|
|
340
|
+
);
|
|
341
|
+
for (const r of t)
|
|
342
|
+
await this.deleteRetirementGoalAccount(r.guid);
|
|
343
|
+
await this.api.removeRetirementGoal(e.guid);
|
|
344
|
+
const o = this.retirementGoals.findIndex((r) => r.guid === e.guid);
|
|
345
|
+
o >= 0 && this.retirementGoals.splice(o, 1);
|
|
346
|
+
} catch (t) {
|
|
347
|
+
console.error(`Error deleting retirement goal: ${t}`);
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
deleteRetirementGoalAccount = async (e) => {
|
|
351
|
+
try {
|
|
352
|
+
await this.api.removeRetirementGoalAccount(e);
|
|
353
|
+
const t = this.retirementGoalAccounts.findIndex((o) => o.guid === e);
|
|
354
|
+
t >= 0 && this.retirementGoalAccounts.splice(t, 1);
|
|
355
|
+
} catch (t) {
|
|
356
|
+
console.error(`Error deleting retirement goal account: ${t}`);
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
reorderGoals = async (e) => {
|
|
360
|
+
try {
|
|
361
|
+
const t = await this.api.reorderGoals(e);
|
|
362
|
+
u(() => {
|
|
363
|
+
for (const o of t) {
|
|
364
|
+
const r = this.goals.findIndex((s) => s.guid === o.guid);
|
|
365
|
+
r >= 0 && (this.goals[r].position = o.position);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
} catch (t) {
|
|
369
|
+
console.error(`Error reordering goals: ${t}`);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
setAlert = (e) => this.alert = e;
|
|
373
|
+
setNewRetirementGoalAccounts = (e) => {
|
|
374
|
+
this.newRetirementGoalAccounts = e;
|
|
375
|
+
};
|
|
376
|
+
setSelectedGoal = (e) => this.selectedGoal = e;
|
|
377
|
+
updateGoal = async (e) => {
|
|
378
|
+
try {
|
|
379
|
+
const t = await this.api.updateGoal(e);
|
|
380
|
+
u(() => {
|
|
381
|
+
const o = this.goals.findIndex((r) => r.guid === e.guid);
|
|
382
|
+
o >= 0 && (this.goals[o] = t), this.selectedGoal?.guid === e.guid && this.setSelectedGoal(t);
|
|
383
|
+
});
|
|
384
|
+
} catch (t) {
|
|
385
|
+
console.error(`Error occurred while updating goal: ${t}`);
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
updateRetirementGoal = async (e) => {
|
|
389
|
+
try {
|
|
390
|
+
const t = await this.api.updateRetirementGoal({
|
|
391
|
+
...e,
|
|
392
|
+
target_amount: e.amount
|
|
393
|
+
});
|
|
394
|
+
u(() => {
|
|
395
|
+
const o = this.retirementGoals.findIndex((r) => r.guid === e.guid);
|
|
396
|
+
o >= 0 && (this.retirementGoals[o] = t), this.selectedGoal?.guid === e.guid && this.setSelectedGoal(this.allGoals.find((r) => r.guid === e.guid));
|
|
397
|
+
});
|
|
398
|
+
} catch (t) {
|
|
399
|
+
console.error(`Error occurred while updating goal: ${t}`);
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
updateMonthlyCashFlowProfile = async (e) => {
|
|
403
|
+
try {
|
|
404
|
+
const t = await this.api.updateMonthlyCashFlowProfile(e);
|
|
405
|
+
this.setMonthlyCashFlowProfile(t);
|
|
406
|
+
} catch (t) {
|
|
407
|
+
console.error(`Error occurred while updating monthly Cash Flow profile: ${t}`);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
export {
|
|
412
|
+
re as C,
|
|
413
|
+
G,
|
|
414
|
+
ie as a,
|
|
415
|
+
ne as b,
|
|
416
|
+
se as c,
|
|
417
|
+
ae as g
|
|
418
|
+
};
|