@mx-cartographer/experiences 9.3.8-alpha.al0 → 9.4.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 +15 -0
- package/dist/accounts/components/AccountListItem.es.js +4 -4
- package/dist/accounts/components/AccountsListCompact.es.js +15 -15
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActions.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetails.es.js +11 -11
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.es.js +7 -7
- package/dist/accounts/components/detailsdrawer/Transactions/TransactionsTab.es.js +4 -4
- package/dist/budgets/components/BudgetsEmptyState.es.js +7 -7
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js +16 -16
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js.map +1 -1
- package/dist/cashflow/CashflowOnboarding.es.js +13 -13
- package/dist/cashflow/components/CashflowHeading.es.js +4 -4
- package/dist/cashflow/components/DetailsExpenseHeader.es.js +4 -4
- package/dist/common/components/DataRow.es.js +6 -6
- package/dist/common/components/MiniWidgetContainer.es.js +9 -9
- package/dist/common/components/charts/linechart/CustomLine.es.js +2 -2
- package/dist/common/components/charts/linechart/CustomMark.es.js +2 -2
- package/dist/common/context/hooks.d.ts +1 -0
- package/dist/common/context/hooks.es.js +12 -11
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +116 -115
- package/dist/core/index.es.js +27 -25
- package/dist/core/stores/BudgetsStore.es.js +21 -28
- package/dist/core/stores/BudgetsStore.es.js.map +1 -1
- package/dist/core/stores/GlobalStore.d.ts +2 -1
- package/dist/core/stores/GlobalStore.es.js +11 -9
- package/dist/core/stores/GlobalStore.es.js.map +1 -1
- package/dist/core/stores/InsightsV2Store.d.ts +24 -0
- package/dist/core/stores/InsightsV2Store.es.js +41 -0
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -0
- package/dist/core/stores/index.d.ts +2 -0
- package/dist/core/types/Beat.d.ts +2 -0
- package/dist/core/types/Beat.es.js.map +1 -1
- package/dist/core/types/Insights.d.ts +90 -0
- package/dist/core/types/InsightsInstanceSlotData.d.ts +93 -0
- package/dist/core/types/InsightsInstanceSlotData.es.js +8 -0
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/utils/BudgetUtil.es.js +50 -56
- package/dist/core/utils/BudgetUtil.es.js.map +1 -1
- package/dist/debts/DebtsWidget.es.js +5 -5
- package/dist/debts/components/debtsdrawer/DebtDetailsContent.es.js +3 -3
- package/dist/debts/components/debtsdrawer/DebtDetailsTab.es.js +6 -6
- package/dist/debts/components/debtsdrawer/DebtScheduleTab.es.js +8 -8
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.es.js +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.es.js +8 -8
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.es.js +5 -5
- package/dist/finstrong/components/shared/Accounts.es.js +24 -24
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.es.js +2 -2
- package/dist/finstrong/components/shared/Transactions.es.js +28 -28
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
- package/dist/goals/GoalsWidget.es.js +12 -12
- package/dist/insights/components/insights/CustomTransaction/CustomTransaction.es.js +13 -13
- package/dist/insights/components/insights/UserFeedback/UserFeedback.es.js +14 -14
- package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.es.js +2 -2
- package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.es.js +9 -9
- package/dist/insights/components/shared/InsightsCard/BeatCard.es.js +4 -4
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.es.js +4 -4
- package/dist/insights/components/shared/InsightsCard/ContentAndDescription.es.js +2 -2
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.es.js +2 -2
- package/dist/insights/components/shared/MenuAction.es.js +16 -16
- package/dist/insights-v2/CommonUtils.d.ts +1 -0
- package/dist/insights-v2/CommonUtils.es.js +7 -0
- package/dist/insights-v2/CommonUtils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +28 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.d.ts +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +18 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +34 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +13 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +87 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +23 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +19 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +15 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +3 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +11 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.d.ts +7 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js +48 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.d.ts +18 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js +45 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.d.ts +2 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js +125 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +8 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +10 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js +28 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.d.ts +8 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js +44 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +15 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +13 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.d.ts +19 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js +27 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +5 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +78 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.d.ts +5 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js +81 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +200 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js +26 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +64 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +32 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +100 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.d.ts +8 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js +41 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js +32 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +50 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js +12 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +35 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +20 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +296 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +449 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js +89 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js +235 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js +57 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +7 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +15 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/index.d.ts +4 -0
- package/dist/insights-v2/blocks/types.d.ts +8 -0
- package/dist/insights-v2/components/AccountHeroCard.d.ts +35 -0
- package/dist/insights-v2/components/AccountHeroCard.es.js +91 -0
- package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -0
- package/dist/insights-v2/components/AmountPill.d.ts +16 -0
- package/dist/insights-v2/components/AmountPill.es.js +25 -0
- package/dist/insights-v2/components/AmountPill.es.js.map +1 -0
- package/dist/insights-v2/components/BaseLayout.d.ts +6 -0
- package/dist/insights-v2/components/BaseLayout.es.js +77 -0
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.d.ts +22 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js +33 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js.map +1 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.d.ts +14 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js +65 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js.map +1 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.d.ts +33 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js +78 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js.map +1 -0
- package/dist/insights-v2/components/Footer.d.ts +9 -0
- package/dist/insights-v2/components/Footer.es.js +25 -0
- package/dist/insights-v2/components/Footer.es.js.map +1 -0
- package/dist/insights-v2/components/Header.d.ts +8 -0
- package/dist/insights-v2/components/Header.es.js +41 -0
- package/dist/insights-v2/components/Header.es.js.map +1 -0
- package/dist/insights-v2/components/InsightTransactionRow.d.ts +23 -0
- package/dist/insights-v2/components/InsightTransactionRow.es.js +52 -0
- package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -0
- package/dist/insights-v2/components/LogoClusterCard.d.ts +40 -0
- package/dist/insights-v2/components/LogoClusterCard.es.js +104 -0
- package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -0
- package/dist/insights-v2/components/LogoTile.d.ts +31 -0
- package/dist/insights-v2/components/LogoTile.es.js +34 -0
- package/dist/insights-v2/components/LogoTile.es.js.map +1 -0
- package/dist/insights-v2/components/MerchantHighlightCard.d.ts +34 -0
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +64 -0
- package/dist/insights-v2/components/MerchantHighlightCard.es.js.map +1 -0
- package/dist/insights-v2/components/P2PLogoStack.d.ts +32 -0
- package/dist/insights-v2/components/P2PLogoStack.es.js +55 -0
- package/dist/insights-v2/components/P2PLogoStack.es.js.map +1 -0
- package/dist/insights-v2/components/SaveAnExtraCard.d.ts +27 -0
- package/dist/insights-v2/components/SaveAnExtraCard.es.js +57 -0
- package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.d.ts +18 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js +71 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js.map +1 -0
- package/dist/insights-v2/components/StatusMessageCard.d.ts +28 -0
- package/dist/insights-v2/components/StatusMessageCard.es.js +45 -0
- package/dist/insights-v2/components/StatusMessageCard.es.js.map +1 -0
- package/dist/insights-v2/components/StatusPill.d.ts +26 -0
- package/dist/insights-v2/components/StatusPill.es.js +30 -0
- package/dist/insights-v2/components/StatusPill.es.js.map +1 -0
- package/dist/insights-v2/components/SubHeader.d.ts +6 -0
- package/dist/insights-v2/components/SubHeader.es.js +40 -0
- package/dist/insights-v2/components/SubHeader.es.js.map +1 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.d.ts +27 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.es.js +63 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.es.js.map +1 -0
- package/dist/insights-v2/components/TransactionListCard.d.ts +45 -0
- package/dist/insights-v2/components/TransactionListCard.es.js +118 -0
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -0
- package/dist/insights-v2/components/TransferLogoCard.d.ts +44 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js +121 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -0
- package/dist/insights-v2/components/UpcomingBillCard.d.ts +41 -0
- package/dist/insights-v2/components/UpcomingBillCard.es.js +99 -0
- package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -0
- package/dist/insights-v2/components/celebrationGradients.d.ts +19 -0
- package/dist/insights-v2/components/celebrationGradients.es.js +7 -0
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +2 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +148 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.d.ts +1 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +14 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.d.ts +2 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js +49 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js.map +1 -0
- package/dist/insights-v2/components/logoShadow.d.ts +26 -0
- package/dist/insights-v2/components/logoShadow.es.js +12 -0
- package/dist/insights-v2/components/logoShadow.es.js.map +1 -0
- package/dist/insights-v2/components/shared/Confetti.d.ts +15 -0
- package/dist/insights-v2/components/shared/Confetti.es.js +33 -0
- package/dist/insights-v2/components/shared/Confetti.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +338 -0
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/PaidOffCard.es.js +85 -0
- package/dist/insights-v2/components/shared/images/PaidOffCard.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js +124 -0
- package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js +104 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js +104 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js +38 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js.map +1 -0
- package/dist/insights-v2/components/statusTokens.d.ts +12 -0
- package/dist/insights-v2/components/statusTokens.es.js +10 -0
- package/dist/insights-v2/components/statusTokens.es.js.map +1 -0
- package/dist/insights-v2/hooks/useContainerDimensions.d.ts +5 -0
- package/dist/insights-v2/hooks/useContainerDimensions.es.js +26 -0
- package/dist/insights-v2/hooks/useContainerDimensions.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +18 -0
- package/dist/insights-v2/index.es.js +55 -0
- package/dist/insights-v2/mappings/blocks.d.ts +14 -0
- package/dist/insights-v2/mappings/blocks.es.js +32 -0
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -0
- package/dist/investments/InvestmentsWidget.es.js +10 -10
- package/dist/investments/components/AnalysisDetails.es.js +4 -4
- package/dist/investments/components/allocation/InvestementAllocationList.es.js +27 -27
- package/dist/microinsights/MicroCardTemplate.es.js +4 -4
- package/dist/microinsights/carousel/BeatList.es.js +9 -9
- package/dist/networth/NetWorthWidget.es.js +6 -6
- package/dist/networth/components/AssetsLiabilitiesDetail.es.js +2 -2
- package/dist/networth/components/GainsLossesDetail.es.js +13 -13
- package/dist/notifications/components/NotificationDrawer.es.js +5 -5
- package/dist/notifications/components/NotificationList.es.js +13 -13
- package/dist/recurringtransactions/components/MicroWidgetContent.es.js +13 -13
- package/dist/recurringtransactions/components/RecurrenceRow.es.js +6 -6
- package/dist/recurringtransactions/components/RecurringStatus.es.js +4 -4
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +19 -19
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.es.js +9 -9
- package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js +5 -5
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransaction.es.js +25 -25
- package/dist/recurringtransactions/components/shared/recurringsettings/ManageIncome.es.js +5 -5
- package/dist/settings/components/notifications/NotificationSettings.es.js +12 -12
- package/dist/settings/components/profile/ProfileTab.es.js +20 -20
- package/dist/trends/TrendsWidget.es.js +25 -25
- package/package.json +1 -1
package/dist/common/index.es.js
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
1
|
import { buildDynamicCopy as r, buildPluralCopy as t } from "../core/utils/Localization.es.js";
|
|
2
2
|
import m, { CalendarSelectionTypes as i } from "./components/calendar/Calendar.es.js";
|
|
3
3
|
import a from "./components/charts/StatusBar.es.js";
|
|
4
|
-
import
|
|
4
|
+
import p from "./components/charts/Donut.es.js";
|
|
5
5
|
import u from "./hooks/useAccountDisplayName.es.js";
|
|
6
6
|
import { useCombineEvents as S, useCombinePageviews as C } from "./hooks/useCombineEvents.es.js";
|
|
7
7
|
import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
|
|
8
8
|
import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
|
|
9
|
-
import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as w, useLoad as
|
|
10
|
-
import { useInsightsEnabled as
|
|
11
|
-
import { useScreenSize as
|
|
12
|
-
import
|
|
13
|
-
import { useWidgetHeaderStyles as
|
|
14
|
-
import { useWidgetLoadTimer as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { ANALYTICS_EVENTS as
|
|
19
|
-
import { CONNECTIONS_WIDGET_ID as
|
|
20
|
-
import { formatCurrency as
|
|
21
|
-
import { GlobalStore as
|
|
22
|
-
import { INCOME_ACCOUNT_TYPES as
|
|
23
|
-
import { RECURRENCE_COPY as
|
|
24
|
-
import { LOADING_STATUS as
|
|
25
|
-
import { DEFAULT_DONUT_SIZE as
|
|
26
|
-
import { Sizes as
|
|
27
|
-
import
|
|
9
|
+
import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as V, useSettingsStore as z, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as Z } from "./context/hooks.es.js";
|
|
10
|
+
import { useInsightsEnabled as J } from "./hooks/useInsightsEnabled.es.js";
|
|
11
|
+
import { useScreenSize as X } from "./hooks/useScreenSize.es.js";
|
|
12
|
+
import oo from "./hooks/usePrevious.es.js";
|
|
13
|
+
import { useWidgetHeaderStyles as to } from "./hooks/useWidgetHeaderStyles.es.js";
|
|
14
|
+
import { useWidgetLoadTimer as mo } from "./hooks/useWidgetLoadTimer.es.js";
|
|
15
|
+
import no from "./components/dialog/Dialog.es.js";
|
|
16
|
+
import so from "./components/drawer/Drawer.es.js";
|
|
17
|
+
import fo from "./components/daterangeselector/DateRangeSelector.es.js";
|
|
18
|
+
import { ANALYTICS_EVENTS as lo } from "./constants/Analytics.es.js";
|
|
19
|
+
import { CONNECTIONS_WIDGET_ID as Co, CONNECT_WIDGET_ID as go, MemberConnectionStatus as co } from "./constants/Connect.es.js";
|
|
20
|
+
import { formatCurrency as Eo, formatOrdinal as Do, formatPercentage as Io, generateEqualIntervals as _o, getCurrencyCodes as No, getPluralRules as yo } from "../core/utils/NumberFormatting.es.js";
|
|
21
|
+
import { GlobalStore as Po } from "../core/stores/GlobalStore.es.js";
|
|
22
|
+
import { INCOME_ACCOUNT_TYPES as Oo, PAYMENT_ACCOUNT_TYPES as Go, SPENDING_ACCOUNT_TYPES as Wo } from "./constants/Account.es.js";
|
|
23
|
+
import { RECURRENCE_COPY as Ro } from "./constants/ScheduledPayment.es.js";
|
|
24
|
+
import { LOADING_STATUS as vo } from "./constants/SpendingPlan.es.js";
|
|
25
|
+
import { DEFAULT_DONUT_SIZE as ho, DEFAULT_STROKE_WIDTH as wo } from "./constants/Donut.es.js";
|
|
26
|
+
import { Sizes as Mo, TOUCH_TARGET as Yo } from "./constants/Sizes.es.js";
|
|
27
|
+
import Fo from "./components/donuts/MultiSegmentDonut.es.js";
|
|
28
28
|
import zo from "./components/donuts/SingleSegmentDonut.es.js";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { GlobalAccountFilter as
|
|
34
|
-
import
|
|
35
|
-
import { WidgetContainer as
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import { ConnectCard as
|
|
47
|
-
import { CurrencyText as
|
|
48
|
-
import { EmptyState as
|
|
49
|
-
import { ListItemAction as
|
|
50
|
-
import { ListItemRow as
|
|
51
|
-
import { ListItemWrapper as
|
|
52
|
-
import { Select as
|
|
53
|
-
import { ToggleButtonListItem as
|
|
54
|
-
import { ToggleListItem as
|
|
29
|
+
import qo from "./components/ErrorBoundary.es.js";
|
|
30
|
+
import Zo from "./components/Error.es.js";
|
|
31
|
+
import Jo from "./components/MicroWidgetContainer.es.js";
|
|
32
|
+
import Xo from "./components/MiniWidgetContainer.es.js";
|
|
33
|
+
import { GlobalAccountFilter as or } from "./components/GlobalAccountFilter.es.js";
|
|
34
|
+
import tr from "./components/Loader.es.js";
|
|
35
|
+
import { WidgetContainer as mr } from "./components/WidgetContainer.es.js";
|
|
36
|
+
import nr from "./components/ConnectDrawer.es.js";
|
|
37
|
+
import sr from "./components/CurrencyDialog.es.js";
|
|
38
|
+
import fr from "./components/CurrencyInput.es.js";
|
|
39
|
+
import lr from "./components/ResponsiveButton.es.js";
|
|
40
|
+
import Cr from "./components/SearchBox.es.js";
|
|
41
|
+
import cr from "./components/SelectionBox.es.js";
|
|
42
|
+
import dr from "./components/TabContentContainer.es.js";
|
|
43
|
+
import Dr from "./components/IconBacking.es.js";
|
|
44
|
+
import _r from "./components/DataRow.es.js";
|
|
45
|
+
import yr from "./components/InformationTooltip.es.js";
|
|
46
|
+
import { ConnectCard as Pr } from "./components/ConnectCard.es.js";
|
|
47
|
+
import { CurrencyText as Or } from "./components/CurrencyText.es.js";
|
|
48
|
+
import { EmptyState as Wr } from "./components/EmptyState.es.js";
|
|
49
|
+
import { ListItemAction as Rr } from "./components/ListItemAction.es.js";
|
|
50
|
+
import { ListItemRow as vr } from "./components/ListItemRow.es.js";
|
|
51
|
+
import { ListItemWrapper as hr } from "./components/ListItemWrapper.es.js";
|
|
52
|
+
import { Select as xr } from "./components/Select.es.js";
|
|
53
|
+
import { ToggleButtonListItem as Yr } from "./components/listitems/ToggleButtonListItem.es.js";
|
|
54
|
+
import { ToggleListItem as Fr } from "./components/listitems/ToggleListItem.es.js";
|
|
55
55
|
import { analyticsSession as zr } from "./utils/Analytics.es.js";
|
|
56
|
-
import { getClientPaletteOptions as
|
|
56
|
+
import { getClientPaletteOptions as qr, getClientTheme as Kr } from "./utils/Theme.es.js";
|
|
57
57
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
lo as ANALYTICS_EVENTS,
|
|
59
|
+
Co as CONNECTIONS_WIDGET_ID,
|
|
60
|
+
go as CONNECT_WIDGET_ID,
|
|
61
61
|
m as Calendar,
|
|
62
62
|
i as CalendarSelectionTypes,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
Pr as ConnectCard,
|
|
64
|
+
nr as ConnectDrawer,
|
|
65
|
+
sr as CurrencyDialog,
|
|
66
|
+
fr as CurrencyInput,
|
|
67
|
+
Or as CurrencyText,
|
|
68
|
+
ho as DEFAULT_DONUT_SIZE,
|
|
69
69
|
wo as DEFAULT_STROKE_WIDTH,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
_r as DataRow,
|
|
71
|
+
fo as DateRangeSelector,
|
|
72
|
+
no as Dialog,
|
|
73
|
+
p as Donut,
|
|
74
|
+
so as Drawer,
|
|
75
|
+
Wr as EmptyState,
|
|
76
|
+
Zo as Error,
|
|
77
|
+
qo as ErrorBoundary,
|
|
78
|
+
or as GlobalAccountFilter,
|
|
79
79
|
c as GlobalDataContext,
|
|
80
80
|
T as GlobalDataProvider,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
81
|
+
Po as GlobalStore,
|
|
82
|
+
Oo as INCOME_ACCOUNT_TYPES,
|
|
83
|
+
Dr as IconBacking,
|
|
84
|
+
yr as InformationTooltip,
|
|
85
|
+
vo as LOADING_STATUS,
|
|
86
|
+
Rr as ListItemAction,
|
|
87
|
+
vr as ListItemRow,
|
|
88
|
+
hr as ListItemWrapper,
|
|
89
|
+
tr as Loader,
|
|
90
|
+
co as MemberConnectionStatus,
|
|
91
|
+
Jo as MicroWidgetContainer,
|
|
92
|
+
Xo as MiniWidgetContainer,
|
|
93
|
+
Fo as MultiSegmentDonut,
|
|
94
|
+
Go as PAYMENT_ACCOUNT_TYPES,
|
|
95
|
+
Ro as RECURRENCE_COPY,
|
|
96
|
+
lr as ResponsiveButton,
|
|
97
|
+
Wo as SPENDING_ACCOUNT_TYPES,
|
|
98
|
+
Cr as SearchBox,
|
|
99
|
+
xr as Select,
|
|
100
|
+
cr as SelectionBox,
|
|
101
101
|
zo as SingleSegmentDonut,
|
|
102
|
-
|
|
102
|
+
Mo as Sizes,
|
|
103
103
|
a as StatusBar,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
Yo as TOUCH_TARGET,
|
|
105
|
+
dr as TabContentContainer,
|
|
106
|
+
Yr as ToggleButtonListItem,
|
|
107
|
+
Fr as ToggleListItem,
|
|
108
|
+
mr as WidgetContainer,
|
|
109
109
|
E as WidgetContainerContext,
|
|
110
110
|
D as WidgetContainerProvider,
|
|
111
111
|
zr as analyticsSession,
|
|
112
112
|
r as buildDynamicCopy,
|
|
113
113
|
t as buildPluralCopy,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
Eo as formatCurrency,
|
|
115
|
+
Do as formatOrdinal,
|
|
116
|
+
Io as formatPercentage,
|
|
117
|
+
_o as generateEqualIntervals,
|
|
118
|
+
qr as getClientPaletteOptions,
|
|
119
|
+
Kr as getClientTheme,
|
|
120
|
+
No as getCurrencyCodes,
|
|
121
|
+
yo as getPluralRules,
|
|
122
122
|
u as useAccountDisplayName,
|
|
123
123
|
_ as useAccountStore,
|
|
124
124
|
N as useAppConfig,
|
|
@@ -136,21 +136,22 @@ export {
|
|
|
136
136
|
U as useGlobalUiStore,
|
|
137
137
|
v as useGoalStore,
|
|
138
138
|
B as useHelpStore,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
x as
|
|
143
|
-
M as
|
|
144
|
-
Y as
|
|
145
|
-
H as
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
h as useHoldingStore,
|
|
140
|
+
J as useInsightsEnabled,
|
|
141
|
+
w as useInsightsV2Store,
|
|
142
|
+
x as useLoad,
|
|
143
|
+
M as useMerchantStore,
|
|
144
|
+
Y as useNetWorthStore,
|
|
145
|
+
H as useNotificationStore,
|
|
146
|
+
F as usePageView,
|
|
147
|
+
oo as usePrevious,
|
|
148
|
+
V as useRecurringTransactionsStore,
|
|
149
|
+
X as useScreenSize,
|
|
149
150
|
z as useSettingsStore,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
k as useTransactionStore,
|
|
152
|
+
q as useTrendsStore,
|
|
153
|
+
K as useUserStore,
|
|
154
|
+
Z as useWidgetContainerProvider,
|
|
155
|
+
to as useWidgetHeaderStyles,
|
|
156
|
+
mo as useWidgetLoadTimer
|
|
156
157
|
};
|
package/dist/core/index.es.js
CHANGED
|
@@ -11,8 +11,8 @@ import { FinstrongApi as h } from "./api/FinstrongApi.es.js";
|
|
|
11
11
|
import { GlobalCopyApi as G } from "./api/GlobalCopyApi.es.js";
|
|
12
12
|
import { GoalApi as L } from "./api/GoalApi.es.js";
|
|
13
13
|
import { HelpApi as E } from "./api/HelpApi.es.js";
|
|
14
|
-
import { HoldingApi as
|
|
15
|
-
import { MerchantApi as
|
|
14
|
+
import { HoldingApi as P } from "./api/HoldingApi.es.js";
|
|
15
|
+
import { MerchantApi as F } from "./api/MerchantApi.es.js";
|
|
16
16
|
import { NotificationApi as M } from "./api/NotificationApi.es.js";
|
|
17
17
|
import { RepeatingTransactionsApi as V } from "./api/RepeatingTransactionsApi.es.js";
|
|
18
18
|
import { ScheduledPaymentsApi as O } from "./api/ScheduledPaymentsApi.es.js";
|
|
@@ -27,7 +27,7 @@ import { GoalType as uo, MetaType as yo, TrackType as To } from "./types/Goal.es
|
|
|
27
27
|
import { AccountNotificationTypes as go, BudgetNotificationTypes as Co, InsightNotificationTypes as No, NotificationTypes as ho } from "./types/Notification.es.js";
|
|
28
28
|
import { TransactionStatus as Go, TransactionType as Bo } from "./types/Transaction.es.js";
|
|
29
29
|
import { ScreenSize as Do } from "./types/ScreenSize.es.js";
|
|
30
|
-
import { Frequency as
|
|
30
|
+
import { Frequency as Io, RecurrenceStatus as Po, RecurrenceType as Ro, RepeatingType as Fo } from "./types/RepeatingTransaction.es.js";
|
|
31
31
|
import { AccountStore as Mo } from "./stores/AccountStore.es.js";
|
|
32
32
|
import { AppDataStore as Vo } from "./stores/AppDataStore.es.js";
|
|
33
33
|
import { AnalyticsStore as Oo } from "./stores/AnalyticsStore.es.js";
|
|
@@ -44,14 +44,15 @@ import { GlobalCopyStore as mr } from "./stores/GlobalCopyStore.es.js";
|
|
|
44
44
|
import { GoalStore as pr } from "./stores/GoalStore.es.js";
|
|
45
45
|
import { HelpStore as ar } from "./stores/HelpStore.es.js";
|
|
46
46
|
import { HoldingStore as cr } from "./stores/HoldingStore.es.js";
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
47
|
+
import { InsightsV2Store as Sr } from "./stores/InsightsV2Store.es.js";
|
|
48
|
+
import { MerchantStore as ur } from "./stores/MerchantStore.es.js";
|
|
49
|
+
import { NetWorthStore as Tr } from "./stores/NetWorthStore.es.js";
|
|
50
|
+
import { NotificationStore as gr } from "./stores/NotificationStore.es.js";
|
|
51
|
+
import { RecurringTransactionsStore as Cr } from "./stores/RecurringTransactionsStore.es.js";
|
|
52
|
+
import { SettingsStore as hr } from "./stores/SettingsStore.es.js";
|
|
53
|
+
import { TransactionStore as Gr } from "./stores/TransactionStore.es.js";
|
|
54
|
+
import { TrendsStore as Lr } from "./stores/TrendsStore.es.js";
|
|
55
|
+
import { UserStore as Er } from "./stores/UserStore.es.js";
|
|
55
56
|
export {
|
|
56
57
|
a as AccountApi,
|
|
57
58
|
K as AccountIcon,
|
|
@@ -83,7 +84,7 @@ export {
|
|
|
83
84
|
p as Fetch,
|
|
84
85
|
h as FinstrongApi,
|
|
85
86
|
Zo as FinstrongStore,
|
|
86
|
-
|
|
87
|
+
Io as Frequency,
|
|
87
88
|
G as GlobalCopyApi,
|
|
88
89
|
mr as GlobalCopyStore,
|
|
89
90
|
or as GlobalStore,
|
|
@@ -93,41 +94,42 @@ export {
|
|
|
93
94
|
uo as GoalType,
|
|
94
95
|
E as HelpApi,
|
|
95
96
|
ar as HelpStore,
|
|
96
|
-
|
|
97
|
+
P as HoldingApi,
|
|
97
98
|
cr as HoldingStore,
|
|
98
99
|
No as InsightNotificationTypes,
|
|
100
|
+
Sr as InsightsV2Store,
|
|
99
101
|
r as LOCALES,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
F as MerchantApi,
|
|
103
|
+
ur as MerchantStore,
|
|
102
104
|
yo as MetaType,
|
|
103
105
|
to as MfaStatuses,
|
|
104
|
-
|
|
106
|
+
Tr as NetWorthStore,
|
|
105
107
|
io as NonConnectedStatuses,
|
|
106
108
|
M as NotificationApi,
|
|
107
|
-
|
|
109
|
+
gr as NotificationStore,
|
|
108
110
|
ho as NotificationTypes,
|
|
109
111
|
mo as ProcessingStatuses,
|
|
110
112
|
eo as PropertyType,
|
|
111
113
|
po as PropertyTypeName,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
Po as RecurrenceStatus,
|
|
115
|
+
Ro as RecurrenceType,
|
|
116
|
+
Cr as RecurringTransactionsStore,
|
|
115
117
|
V as RepeatingTransactionsApi,
|
|
116
|
-
|
|
118
|
+
Fo as RepeatingType,
|
|
117
119
|
So as ScheduledPaymentTypes,
|
|
118
120
|
O as ScheduledPaymentsApi,
|
|
119
121
|
Do as ScreenSize,
|
|
120
122
|
k as SettingsApi,
|
|
121
|
-
|
|
123
|
+
hr as SettingsStore,
|
|
122
124
|
no as StatusName,
|
|
123
125
|
To as TrackType,
|
|
124
126
|
w as TransactionApi,
|
|
125
127
|
Go as TransactionStatus,
|
|
126
|
-
|
|
128
|
+
Gr as TransactionStore,
|
|
127
129
|
Bo as TransactionType,
|
|
128
|
-
|
|
130
|
+
Lr as TrendsStore,
|
|
129
131
|
_ as UserApi,
|
|
130
|
-
|
|
132
|
+
Er as UserStore,
|
|
131
133
|
fo as UserVerification,
|
|
132
134
|
t as VALID_LOCALES,
|
|
133
135
|
v as WidgetApi,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { CategoryGuids as i } from "../constants/Category.es.js";
|
|
2
2
|
import { BudgetsApi as o } from "../api/BudgetsApi.es.js";
|
|
3
|
-
import { upsertByGuid as
|
|
4
|
-
import { augmentBudgets as
|
|
3
|
+
import { upsertByGuid as u } from "../utils/upsertByGuid.es.js";
|
|
4
|
+
import { augmentBudgets as g, findBudget as h, findSubBudget as l } from "../utils/BudgetUtil.es.js";
|
|
5
5
|
import { endOfMonth as B } from "date-fns/endOfMonth";
|
|
6
6
|
import { startOfMonth as p } from "date-fns/startOfMonth";
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { makeAutoObservable as b, reaction as S, runInAction as
|
|
7
|
+
import { startOfToday as n } from "date-fns/startOfToday";
|
|
8
|
+
import { makeAutoObservable as b, reaction as S, runInAction as d } from "mobx";
|
|
9
9
|
var _ = class {
|
|
10
10
|
api = new o("/", "");
|
|
11
11
|
globalStore;
|
|
12
12
|
alert = "";
|
|
13
13
|
dateRange = {
|
|
14
|
-
start: p(
|
|
15
|
-
end: B(
|
|
14
|
+
start: p(n()),
|
|
15
|
+
end: B(n())
|
|
16
16
|
};
|
|
17
17
|
budgets = [];
|
|
18
18
|
selectedBudget;
|
|
@@ -34,10 +34,10 @@ var _ = class {
|
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
get detailedBudgets() {
|
|
37
|
-
return
|
|
37
|
+
return g(this.budgets.filter((t) => t.category_guid !== i.INCOME && t.category_guid !== i.TRANSFER && t.category_guid !== i.INVESTMENTS), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
|
|
38
38
|
}
|
|
39
39
|
get incomeBudget() {
|
|
40
|
-
return
|
|
40
|
+
return g(this.budgets.filter((t) => !t.parent_guid), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).reduce((t, e) => e.category_guid !== i.INCOME ? t : !t || e.percentage > t.percentage ? e : t, void 0)?.amount;
|
|
41
41
|
}
|
|
42
42
|
get unbudgetedCategories() {
|
|
43
43
|
return this.globalStore.categoryStore.spendCategories.filter((t) => !this.detailedBudgets.find((e) => e.category_guid === t.guid));
|
|
@@ -48,8 +48,8 @@ var _ = class {
|
|
|
48
48
|
addBudget = async (t, e, r = null) => {
|
|
49
49
|
try {
|
|
50
50
|
const s = await this.api.addBudget(t, e, r);
|
|
51
|
-
|
|
52
|
-
this.budgets =
|
|
51
|
+
d(() => {
|
|
52
|
+
this.budgets = u(this.budgets, s);
|
|
53
53
|
});
|
|
54
54
|
} catch (s) {
|
|
55
55
|
console.error("Error adding budget:", s), this.globalStore.captureException(s, { store: "BudgetsStore" });
|
|
@@ -57,16 +57,9 @@ var _ = class {
|
|
|
57
57
|
};
|
|
58
58
|
deleteBudget = async (t) => {
|
|
59
59
|
try {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}), e?.subBudgets && e.subBudgets.forEach((d) => {
|
|
64
|
-
r.add(d.guid);
|
|
65
|
-
});
|
|
66
|
-
const s = [t, ...Array.from(r)];
|
|
67
|
-
await Promise.all(s.map((d) => this.api.deleteBudget(d))), a(() => {
|
|
68
|
-
const d = new Set(s);
|
|
69
|
-
this.budgets = this.budgets.filter((u) => !d.has(u.guid));
|
|
60
|
+
await this.api.deleteBudget(t), d(() => {
|
|
61
|
+
const e = this.budgets.findIndex((r) => r.guid === t);
|
|
62
|
+
e >= 0 && this.budgets.splice(e, 1);
|
|
70
63
|
});
|
|
71
64
|
} catch (e) {
|
|
72
65
|
console.error("Error deleting budget:", e), this.globalStore.captureException(e, { store: "BudgetsStore" });
|
|
@@ -91,7 +84,7 @@ var _ = class {
|
|
|
91
84
|
recalculateBudgets = async (t) => {
|
|
92
85
|
try {
|
|
93
86
|
for (const r of t) {
|
|
94
|
-
const s = this.budgets.find((
|
|
87
|
+
const s = this.budgets.find((a) => a.category_guid === r.guid);
|
|
95
88
|
s ? await this.api.updateBudget({
|
|
96
89
|
...s,
|
|
97
90
|
amount: r.totalAverageAmount
|
|
@@ -113,7 +106,7 @@ var _ = class {
|
|
|
113
106
|
updateBudget = async (t) => {
|
|
114
107
|
try {
|
|
115
108
|
const e = await this.api.updateBudget(t);
|
|
116
|
-
|
|
109
|
+
d(() => {
|
|
117
110
|
const r = this.budgets.findIndex((s) => s.guid === t.guid);
|
|
118
111
|
r >= 0 && (this.budgets[r] = e);
|
|
119
112
|
});
|
|
@@ -128,8 +121,8 @@ var _ = class {
|
|
|
128
121
|
addMerchantBudget = async (t, e) => {
|
|
129
122
|
try {
|
|
130
123
|
const r = await this.api.addMerchantBudget(t, e);
|
|
131
|
-
return
|
|
132
|
-
this.merchantBudgets =
|
|
124
|
+
return d(() => {
|
|
125
|
+
this.merchantBudgets = u(this.merchantBudgets, r);
|
|
133
126
|
}), { isSuccess: !0 };
|
|
134
127
|
} catch (r) {
|
|
135
128
|
return console.error("Error adding merchant budget:", r), this.globalStore.captureException(r, { store: "BudgetsStore" }), { isSuccess: !1 };
|
|
@@ -138,9 +131,9 @@ var _ = class {
|
|
|
138
131
|
updateMerchantBudget = async (t) => {
|
|
139
132
|
try {
|
|
140
133
|
const { guid: e, amount: r } = t, s = await this.api.updateMerchantBudget(e, r);
|
|
141
|
-
return
|
|
142
|
-
const
|
|
143
|
-
|
|
134
|
+
return d(() => {
|
|
135
|
+
const a = this.merchantBudgets.findIndex((c) => c.guid === t.guid);
|
|
136
|
+
a >= 0 && (this.merchantBudgets[a] = s);
|
|
144
137
|
}), { isSuccess: !0 };
|
|
145
138
|
} catch (e) {
|
|
146
139
|
return console.error("Error updating merchant budget:", e), this.globalStore.captureException(e, { store: "BudgetsStore" }), { isSuccess: !1 };
|
|
@@ -148,7 +141,7 @@ var _ = class {
|
|
|
148
141
|
};
|
|
149
142
|
deleteMerchantBudget = async (t) => {
|
|
150
143
|
try {
|
|
151
|
-
return await this.api.deleteMerchantBudget(t),
|
|
144
|
+
return await this.api.deleteMerchantBudget(t), d(() => {
|
|
152
145
|
this.merchantBudgets = this.merchantBudgets.filter((e) => e.guid !== t);
|
|
153
146
|
}), { isSuccess: !0 };
|
|
154
147
|
} catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BudgetsStore.es.js","names":[],"sources":["../../../src/core/stores/BudgetsStore.ts"],"sourcesContent":["import { makeAutoObservable, reaction, runInAction } from 'mobx'\n\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\n\nimport { Theme } from '@mui/system'\n\nimport { BudgetsApi } from '../api'\nimport { upsertByGuid } from '../utils/upsertByGuid'\nimport { CategoryGuids } from '../constants'\nimport { augmentBudgets, findBudget, findSubBudget } from '../utils/BudgetUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\nimport type {\n Budget,\n Category,\n DateRange,\n DetailedBudget,\n DetailedCategory,\n MerchantBudget,\n} from '../types'\n\nexport class BudgetsStore {\n api: BudgetsApi = new BudgetsApi('/', '')\n\n globalStore: GlobalStore\n\n alert: string = ''\n dateRange: DateRange = { start: startOfMonth(startOfToday()), end: endOfMonth(startOfToday()) }\n budgets: Budget[] = []\n selectedBudget: DetailedBudget | undefined\n selectedSubBudget: DetailedBudget | undefined\n isDataLoaded = false\n theme = {} as Theme\n merchantBudgets: MerchantBudget[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BudgetsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadBudgetData = async () => {\n if (!this.globalStore.recurringTransactionsStore.isDataLoaded) {\n await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData()\n }\n await this.loadBudgets()\n\n /** Reaction to update the selected budget/sub-budget if detailedBudgets is updated **/\n reaction(\n () => this.detailedBudgets,\n (detailedBudgets) => {\n if (detailedBudgets) {\n const budget = this.selectedBudget\n if (budget) {\n this.selectedBudget = findBudget(detailedBudgets, budget.guid)\n }\n\n const subBudget = this.selectedSubBudget\n if (subBudget && subBudget.parent_guid) {\n this.selectedSubBudget = findSubBudget(\n detailedBudgets,\n subBudget.guid,\n subBudget.parent_guid,\n )\n }\n }\n },\n )\n }\n\n get detailedBudgets(): DetailedBudget[] {\n return augmentBudgets(\n this.budgets.filter(\n (budget: Budget) =>\n budget.category_guid !== CategoryGuids.INCOME &&\n budget.category_guid !== CategoryGuids.TRANSFER &&\n budget.category_guid !== CategoryGuids.INVESTMENTS,\n ),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n ).sort((a, b) => {\n if (a.percentage > b.percentage) return -1\n if (a.percentage < b.percentage) return 1\n return 0\n })\n }\n\n // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.\n get incomeBudget(): number | undefined {\n const filteredBudgets = augmentBudgets(\n this.budgets.filter((budget: Budget) => !budget.parent_guid),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n )\n\n const incomeBudget = filteredBudgets.reduce(\n (acc, curr) => {\n if (curr.category_guid !== CategoryGuids.INCOME) return acc\n if (!acc || curr.percentage > acc.percentage) return curr\n return acc\n },\n undefined as DetailedBudget | undefined,\n )\n\n return incomeBudget?.amount\n }\n\n get unbudgetedCategories(): DetailedCategory[] {\n return this.globalStore.categoryStore.spendCategories.filter(\n (category) => !this.detailedBudgets.find((budget) => budget.category_guid === category.guid),\n )\n }\n\n get totalBudgeted(): number {\n return this.detailedBudgets.reduce((total, budget) => total + budget.amount, 0)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n try {\n const budget = await this.api.addBudget(category, amount, parentGuid)\n runInAction(() => {\n this.budgets = upsertByGuid(this.budgets, budget)\n })\n } catch (error) {\n console.error('Error adding budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n deleteBudget = async (guid: string) => {\n try {\n const detailedParent = this.detailedBudgets.find((b) => b.guid === guid)\n const subBudgetGuids = new Set<string>()\n\n this.budgets.forEach((b) => {\n if (b.parent_guid === guid) {\n subBudgetGuids.add(b.guid)\n }\n })\n\n if (detailedParent?.subBudgets) {\n detailedParent.subBudgets.forEach((sb) => {\n subBudgetGuids.add(sb.guid)\n })\n }\n\n const allGuidsToDelete = [guid, ...Array.from(subBudgetGuids)]\n\n await Promise.all(allGuidsToDelete.map((id) => this.api.deleteBudget(id)))\n\n runInAction(() => {\n const guidsSet = new Set(allGuidsToDelete)\n this.budgets = this.budgets.filter((budget) => !guidsSet.has(budget.guid))\n })\n } catch (error) {\n console.error('Error deleting budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n loadBudgets = async () => {\n try {\n const budgets = await this.api.getBudgets()\n this.setBudgets(budgets)\n } catch (error) {\n console.error('Error occurred while loading budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n throw error\n }\n }\n\n setAlert = (alert: string) => (this.alert = alert)\n\n setBudgets = (budgets: Budget[]) => {\n this.budgets = budgets\n this.isDataLoaded = true\n }\n\n setDateRange = (dateRange: DateRange) => (this.dateRange = dateRange)\n\n setSelectedBudget = (budget: DetailedBudget | undefined) => (this.selectedBudget = budget)\n\n setSelectedSubBudget = (budget: DetailedBudget | undefined) => (this.selectedSubBudget = budget)\n\n setTheme = (theme: Theme) => (this.theme = theme)\n\n /**\n * Recalculate budget by using the average amount from top-level categories\n * @param categories Detailed categories\n */\n recalculateBudgets = async (categories: DetailedCategory[]) => {\n try {\n for (const category of categories) {\n const budget = this.budgets.find((budget) => budget.category_guid === category.guid)\n if (budget) {\n await this.api.updateBudget({\n ...budget,\n amount: category.totalAverageAmount,\n })\n } else {\n await this.api.addBudget(category, category.totalAverageAmount)\n }\n }\n const budgetsToDelete = this.budgets.filter(\n (budget) => !categories.find((c) => c.guid === budget.category_guid),\n )\n\n for (const budgetToDelete of budgetsToDelete) {\n await this.api.deleteBudget(budgetToDelete.guid)\n }\n\n await this.loadBudgets()\n\n return { data: this.budgets, isSuccess: true }\n } catch (error) {\n console.error('Error recalculating budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { data: [], isSuccess: false }\n }\n }\n\n updateBudget = async (budget: Budget) => {\n try {\n const updatedBudget = await this.api.updateBudget(budget)\n\n runInAction(() => {\n const index = this.budgets.findIndex((b) => b.guid === budget.guid)\n if (index >= 0) {\n this.budgets[index] = updatedBudget\n }\n })\n } catch (error) {\n console.error('Error updating budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n getMerchantBudgetByMerchantGuid = (merchantGuid: string): MerchantBudget | undefined => {\n return this.merchantBudgets.find(\n (eachMerchantBudget) => eachMerchantBudget?.merchant_guid === merchantGuid,\n )\n }\n\n setMerchantBudgets = (merchantBudgets: MerchantBudget[]) => {\n this.merchantBudgets = merchantBudgets\n }\n\n addMerchantBudget = async (merchantGuid: string, amount: number) => {\n try {\n const newMerchantBudget = await this.api.addMerchantBudget(merchantGuid, amount)\n\n runInAction(() => {\n this.merchantBudgets = upsertByGuid(this.merchantBudgets, newMerchantBudget)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error adding merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n updateMerchantBudget = async (merchantBudget: MerchantBudget) => {\n try {\n const { guid: merchantBudgetGuid, amount } = merchantBudget\n const updatedMerchantBudget = await this.api.updateMerchantBudget(merchantBudgetGuid, amount)\n\n runInAction(() => {\n const index = this.merchantBudgets.findIndex((b) => b.guid === merchantBudget.guid)\n if (index >= 0) {\n this.merchantBudgets[index] = updatedMerchantBudget\n }\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error updating merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n deleteMerchantBudget = async (merchantBudgetGuid: string) => {\n try {\n await this.api.deleteMerchantBudget(merchantBudgetGuid)\n\n runInAction(() => {\n this.merchantBudgets = this.merchantBudgets.filter((b) => b.guid !== merchantBudgetGuid)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error deleting merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAb,MAA0B;AAAA,EACxB,MAAkB,IAAI,EAA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esContent":["import { makeAutoObservable, reaction, runInAction } from 'mobx'\n\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\n\nimport { Theme } from '@mui/system'\n\nimport { BudgetsApi } from '../api'\nimport { upsertByGuid } from '../utils/upsertByGuid'\nimport { CategoryGuids } from '../constants'\nimport { augmentBudgets, findBudget, findSubBudget } from '../utils/BudgetUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\nimport type {\n Budget,\n Category,\n DateRange,\n DetailedBudget,\n DetailedCategory,\n MerchantBudget,\n} from '../types'\n\nexport class BudgetsStore {\n api: BudgetsApi = new BudgetsApi('/', '')\n\n globalStore: GlobalStore\n\n alert: string = ''\n dateRange: DateRange = { start: startOfMonth(startOfToday()), end: endOfMonth(startOfToday()) }\n budgets: Budget[] = []\n selectedBudget: DetailedBudget | undefined\n selectedSubBudget: DetailedBudget | undefined\n isDataLoaded = false\n theme = {} as Theme\n merchantBudgets: MerchantBudget[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BudgetsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadBudgetData = async () => {\n if (!this.globalStore.recurringTransactionsStore.isDataLoaded) {\n await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData()\n }\n await this.loadBudgets()\n\n /** Reaction to update the selected budget/sub-budget if detailedBudgets is updated **/\n reaction(\n () => this.detailedBudgets,\n (detailedBudgets) => {\n if (detailedBudgets) {\n const budget = this.selectedBudget\n if (budget) {\n this.selectedBudget = findBudget(detailedBudgets, budget.guid)\n }\n\n const subBudget = this.selectedSubBudget\n if (subBudget && subBudget.parent_guid) {\n this.selectedSubBudget = findSubBudget(\n detailedBudgets,\n subBudget.guid,\n subBudget.parent_guid,\n )\n }\n }\n },\n )\n }\n\n get detailedBudgets(): DetailedBudget[] {\n return augmentBudgets(\n this.budgets.filter(\n (budget: Budget) =>\n budget.category_guid !== CategoryGuids.INCOME &&\n budget.category_guid !== CategoryGuids.TRANSFER &&\n budget.category_guid !== CategoryGuids.INVESTMENTS,\n ),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n ).sort((a, b) => {\n if (a.percentage > b.percentage) return -1\n if (a.percentage < b.percentage) return 1\n return 0\n })\n }\n\n // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.\n get incomeBudget(): number | undefined {\n const filteredBudgets = augmentBudgets(\n this.budgets.filter((budget: Budget) => !budget.parent_guid),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n )\n\n const incomeBudget = filteredBudgets.reduce(\n (acc, curr) => {\n if (curr.category_guid !== CategoryGuids.INCOME) return acc\n if (!acc || curr.percentage > acc.percentage) return curr\n return acc\n },\n undefined as DetailedBudget | undefined,\n )\n\n return incomeBudget?.amount\n }\n\n get unbudgetedCategories(): DetailedCategory[] {\n return this.globalStore.categoryStore.spendCategories.filter(\n (category) => !this.detailedBudgets.find((budget) => budget.category_guid === category.guid),\n )\n }\n\n get totalBudgeted(): number {\n return this.detailedBudgets.reduce((total, budget) => total + budget.amount, 0)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n try {\n const budget = await this.api.addBudget(category, amount, parentGuid)\n runInAction(() => {\n this.budgets = upsertByGuid(this.budgets, budget)\n })\n } catch (error) {\n console.error('Error adding budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n deleteBudget = async (guid: string) => {\n try {\n await this.api.deleteBudget(guid)\n\n runInAction(() => {\n const index = this.budgets.findIndex((budget) => budget.guid === guid)\n if (index >= 0) {\n this.budgets.splice(index, 1)\n }\n })\n } catch (error) {\n console.error('Error deleting budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n loadBudgets = async () => {\n try {\n const budgets = await this.api.getBudgets()\n this.setBudgets(budgets)\n } catch (error) {\n console.error('Error occurred while loading budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n throw error\n }\n }\n\n setAlert = (alert: string) => (this.alert = alert)\n\n setBudgets = (budgets: Budget[]) => {\n this.budgets = budgets\n this.isDataLoaded = true\n }\n\n setDateRange = (dateRange: DateRange) => (this.dateRange = dateRange)\n\n setSelectedBudget = (budget: DetailedBudget | undefined) => (this.selectedBudget = budget)\n\n setSelectedSubBudget = (budget: DetailedBudget | undefined) => (this.selectedSubBudget = budget)\n\n setTheme = (theme: Theme) => (this.theme = theme)\n\n /**\n * Recalculate budget by using the average amount from top-level categories\n * @param categories Detailed categories\n */\n recalculateBudgets = async (categories: DetailedCategory[]) => {\n try {\n for (const category of categories) {\n const budget = this.budgets.find((budget) => budget.category_guid === category.guid)\n if (budget) {\n await this.api.updateBudget({\n ...budget,\n amount: category.totalAverageAmount,\n })\n } else {\n await this.api.addBudget(category, category.totalAverageAmount)\n }\n }\n const budgetsToDelete = this.budgets.filter(\n (budget) => !categories.find((c) => c.guid === budget.category_guid),\n )\n\n for (const budgetToDelete of budgetsToDelete) {\n await this.api.deleteBudget(budgetToDelete.guid)\n }\n\n await this.loadBudgets()\n\n return { data: this.budgets, isSuccess: true }\n } catch (error) {\n console.error('Error recalculating budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { data: [], isSuccess: false }\n }\n }\n\n updateBudget = async (budget: Budget) => {\n try {\n const updatedBudget = await this.api.updateBudget(budget)\n\n runInAction(() => {\n const index = this.budgets.findIndex((b) => b.guid === budget.guid)\n if (index >= 0) {\n this.budgets[index] = updatedBudget\n }\n })\n } catch (error) {\n console.error('Error updating budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n getMerchantBudgetByMerchantGuid = (merchantGuid: string): MerchantBudget | undefined => {\n return this.merchantBudgets.find(\n (eachMerchantBudget) => eachMerchantBudget?.merchant_guid === merchantGuid,\n )\n }\n\n setMerchantBudgets = (merchantBudgets: MerchantBudget[]) => {\n this.merchantBudgets = merchantBudgets\n }\n\n addMerchantBudget = async (merchantGuid: string, amount: number) => {\n try {\n const newMerchantBudget = await this.api.addMerchantBudget(merchantGuid, amount)\n\n runInAction(() => {\n this.merchantBudgets = upsertByGuid(this.merchantBudgets, newMerchantBudget)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error adding merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n updateMerchantBudget = async (merchantBudget: MerchantBudget) => {\n try {\n const { guid: merchantBudgetGuid, amount } = merchantBudget\n const updatedMerchantBudget = await this.api.updateMerchantBudget(merchantBudgetGuid, amount)\n\n runInAction(() => {\n const index = this.merchantBudgets.findIndex((b) => b.guid === merchantBudget.guid)\n if (index >= 0) {\n this.merchantBudgets[index] = updatedMerchantBudget\n }\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error updating merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n deleteMerchantBudget = async (merchantBudgetGuid: string) => {\n try {\n await this.api.deleteMerchantBudget(merchantBudgetGuid)\n\n runInAction(() => {\n this.merchantBudgets = this.merchantBudgets.filter((b) => b.guid !== merchantBudgetGuid)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error deleting merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAb,MAA0B;AAAA,EACxB,MAAkB,IAAI,EAAW,KAAK,EAAE;AAAA,EAExC;AAAA,EAEA,QAAgB;AAAA,EAChB,YAAuB;AAAA,IAAE,OAAO,EAAa,EAAa,CAAC;AAAA,IAAG,KAAK,EAAW,EAAa,CAAC;AAAA,EAAE;AAAA,EAC9F,UAAoB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,QAAQ,CAA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Y,iBAAiB,GAAO,EAAE,OAAO,eAAe,CAAC,GAC3D,EAAE,WAAW,GAAM;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,uBAAuB,OAAO,MAA+B;AAC3D,QAAI;AACF,mBAAM,KAAK,IAAI,qBAAqB,CAAkB,GAEtD,EAAA,MAAkB;AAChB,aAAK,kBAAkB,KAAK,gBAAgB,OAAA,CAAQ,MAAM,EAAE,SAAS,CAAkB;AAAA,MACzF,CAAC,GACM,EAAE,WAAW,GAAK;AAAA,IAC3B,SAAS,GAAO;AACd,qBAAQ,MAAM,mCAAmC,CAAK,GACtD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,eAAe,CAAC,GAC3D,EAAE,WAAW,GAAM;AAAA,IAC5B;AAAA,EACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountStore, AnalyticsStore, AppDataStore, BeatStore, BudgetsStore, CashflowStore, CategoryStore, ConnectStore, DebtsStore, FinstrongStore, GlobalCopyStore, GlobalUiStore, GoalStore, HelpStore, HoldingStore, MerchantStore, NetWorthStore, NotificationStore, RecurringTransactionsStore, SettingsStore, TransactionStore, TrendsStore, UserStore } from '../stores';
|
|
1
|
+
import { AccountStore, AnalyticsStore, AppDataStore, BeatStore, BudgetsStore, CashflowStore, CategoryStore, ConnectStore, DebtsStore, FinstrongStore, GlobalCopyStore, GlobalUiStore, GoalStore, HelpStore, HoldingStore, InsightsV2Store, MerchantStore, NetWorthStore, NotificationStore, RecurringTransactionsStore, SettingsStore, TransactionStore, TrendsStore, UserStore } from '../stores';
|
|
2
2
|
import { Account, Category, Institution, Member, AppConfig, AppData, Beat, GlobalCaptureException, GlobalErrorHandler, MerchantBudget, Tag, Tagging, Transaction, TransactionRule, UserFeature } from '../types';
|
|
3
3
|
interface LoadDataProps {
|
|
4
4
|
accounts?: Account[];
|
|
@@ -48,6 +48,7 @@ export declare class GlobalStore {
|
|
|
48
48
|
trendsStore: TrendsStore;
|
|
49
49
|
userStore: UserStore;
|
|
50
50
|
globalUiStore: GlobalUiStore;
|
|
51
|
+
insightsV2Store: InsightsV2Store;
|
|
51
52
|
constructor(appConfig?: AppConfig, endpoint?: string, onError?: GlobalErrorHandler, onStoreUpdate?: OnStoreUpdate, onCaptureException?: GlobalCaptureException);
|
|
52
53
|
get isInitialized(): boolean;
|
|
53
54
|
captureException: (error: unknown, context?: Record<string, string>) => void;
|
|
@@ -14,16 +14,17 @@ import { GlobalCopyStore as C } from "./GlobalCopyStore.es.js";
|
|
|
14
14
|
import { GoalStore as U } from "./GoalStore.es.js";
|
|
15
15
|
import { HelpStore as D } from "./HelpStore.es.js";
|
|
16
16
|
import { HoldingStore as A } from "./HoldingStore.es.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { InsightsV2Store as T } from "./InsightsV2Store.es.js";
|
|
18
|
+
import { MerchantStore as E } from "./MerchantStore.es.js";
|
|
19
|
+
import { NetWorthStore as x } from "./NetWorthStore.es.js";
|
|
20
|
+
import { NotificationStore as k } from "./NotificationStore.es.js";
|
|
21
|
+
import { RecurringTransactionsStore as G } from "./RecurringTransactionsStore.es.js";
|
|
22
|
+
import { SettingsStore as I } from "./SettingsStore.es.js";
|
|
22
23
|
import { TransactionStore as M } from "./TransactionStore.es.js";
|
|
23
|
-
import { TrendsStore as
|
|
24
|
+
import { TrendsStore as V } from "./TrendsStore.es.js";
|
|
24
25
|
import { UserStore as W } from "./UserStore.es.js";
|
|
25
26
|
import { autorun as v, makeAutoObservable as z } from "mobx";
|
|
26
|
-
var
|
|
27
|
+
var St = class {
|
|
27
28
|
appConfig = h;
|
|
28
29
|
endpoint = "/";
|
|
29
30
|
sessionToken = "";
|
|
@@ -53,8 +54,9 @@ var nt = class {
|
|
|
53
54
|
trendsStore;
|
|
54
55
|
userStore;
|
|
55
56
|
globalUiStore;
|
|
57
|
+
insightsV2Store;
|
|
56
58
|
constructor(t = h, o = "/", r, e, i) {
|
|
57
|
-
this.appConfig = t, this.endpoint = o, this.sessionToken = t.options.session_token ?? "", this.onCaptureException = i, this.onError = r, this.onStoreUpdate = e, this.accountStore = new p(this), this.appDataStore = new c(this), this.analyticsStore = new m(this), this.beatStore = new f(this), this.budgetsStore = new l(this), this.cashflowStore = new g(this), this.categoryStore = new w(this), this.connectStore = new d(this), this.copyStore = new C(this), this.debtsStore = new u(this), this.finstrongStore = new b(this), this.goalStore = new U(this), this.helpStore = new D(this), this.holdingStore = new A(this), this.merchantStore = new
|
|
59
|
+
this.appConfig = t, this.endpoint = o, this.sessionToken = t.options.session_token ?? "", this.onCaptureException = i, this.onError = r, this.onStoreUpdate = e, this.accountStore = new p(this), this.appDataStore = new c(this), this.analyticsStore = new m(this), this.beatStore = new f(this), this.budgetsStore = new l(this), this.cashflowStore = new g(this), this.categoryStore = new w(this), this.connectStore = new d(this), this.copyStore = new C(this), this.debtsStore = new u(this), this.finstrongStore = new b(this), this.goalStore = new U(this), this.helpStore = new D(this), this.holdingStore = new A(this), this.merchantStore = new E(this), this.netWorthStore = new x(this), this.notificationStore = new k(this), this.recurringTransactionsStore = new G(this), this.settingsStore = new I(this), this.transactionStore = new M(this), this.trendsStore = new V(this), this.userStore = new W(this), this.globalUiStore = new y(this), this.insightsV2Store = new T(this), z(this), v(() => {
|
|
58
60
|
const { transactions: s } = this.transactionStore;
|
|
59
61
|
this.emitUpdate({ transactions: s });
|
|
60
62
|
});
|
|
@@ -81,7 +83,7 @@ var nt = class {
|
|
|
81
83
|
};
|
|
82
84
|
};
|
|
83
85
|
export {
|
|
84
|
-
|
|
86
|
+
St as GlobalStore
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
//# sourceMappingURL=GlobalStore.es.js.map
|