@mx-cartographer/experiences 9.7.206 → 10.0.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 +5 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +2 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js +39 -23
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +3 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js +37 -33
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js.map +1 -1
- package/dist/accounts/utils/AccountFields.d.ts +3 -1
- package/dist/accounts/utils/AccountFields.es.js +39 -39
- package/dist/accounts/utils/AccountFields.es.js.map +1 -1
- package/dist/common/components/charts/LineChart.d.ts +4 -0
- package/dist/common/components/charts/LineChart.es.js +114 -112
- package/dist/common/components/charts/LineChart.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomLegend.es.js +24 -21
- package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
- package/dist/core/types/Insights.d.ts +9 -1
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +42 -0
- package/dist/core/types/localization/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.d.ts +7 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +39 -20
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.d.ts +4 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js +42 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.d.ts +7 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js +54 -0
- package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +10 -10
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js +24 -23
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +75 -73
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.d.ts +5 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +21 -21
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.d.ts +11 -0
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +65 -58
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js +9 -10
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +21 -22
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +35 -35
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js +44 -49
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +19 -16
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.d.ts +2 -2
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js +212 -166
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.d.ts +4 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js +24 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.d.ts +6 -5
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js +38 -38
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +1 -1
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
- package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
- package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +46 -40
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +141 -126
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +8 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +243 -200
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +54 -53
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +6 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +14 -13
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +4 -3
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +24 -21
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +14 -4
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +79 -67
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +3 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +48 -32
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +19 -14
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +19 -15
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +26 -19
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +17 -21
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +11 -11
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +15 -11
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.d.ts +20 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js +21 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +10 -2
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +115 -54
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +37 -36
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +27 -22
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +8 -8
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +13 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +22 -0
- package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +29 -21
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
- package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js +5 -6
- package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.d.ts +3 -7
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js +120 -306
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.d.ts +17 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js +93 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js +21 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.d.ts +18 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js +71 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.d.ts +82 -8
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js +66 -15
- package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
- package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
- package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js +25 -20
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.d.ts +22 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js +24 -0
- package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js +89 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.d.ts +43 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js +28 -0
- package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +7 -3
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +20 -11
- package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +29 -28
- package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +6 -5
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +117 -71
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +10 -7
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
- package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.d.ts +3 -1
- package/dist/insights-v2/components/BaseLayout.es.js +134 -119
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +28 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js +78 -0
- package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
- package/dist/insights-v2/components/CompactInsightCard.es.js +122 -118
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
- package/dist/insights-v2/components/DirectDepositCard.es.js +24 -22
- package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
- package/dist/insights-v2/components/LoadingCard.es.js +13 -9
- package/dist/insights-v2/components/LoadingCard.es.js.map +1 -1
- package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
- package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
- package/dist/insights-v2/components/SaveAnExtraCard.d.ts +4 -1
- package/dist/insights-v2/components/SaveAnExtraCard.es.js +32 -20
- package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -1
- package/dist/insights-v2/components/SubTabs.d.ts +2 -1
- package/dist/insights-v2/components/SubTabs.es.js +29 -24
- package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
- package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
- package/dist/insights-v2/components/TransactionListCard.es.js +39 -37
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
- package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
- package/dist/insights-v2/components/UpcomingBillCard.es.js +39 -35
- package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +17 -8
- package/dist/insights-v2/components/celebrationGradients.es.js +14 -14
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/ChartLegend.es.js +16 -10
- package/dist/insights-v2/components/chartblocks/ChartLegend.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.d.ts +10 -4
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +62 -61
- package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +13 -6
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -1
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +2 -3
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -1
- package/dist/insights-v2/components/statusIcon.d.ts +2 -1
- package/dist/insights-v2/components/statusIcon.es.js +10 -8
- package/dist/insights-v2/components/statusIcon.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaConfig.es.js +19 -17
- package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaHandlers.d.ts +5 -1
- package/dist/insights-v2/ctaActions/ctaHandlers.es.js +71 -54
- package/dist/insights-v2/ctaActions/ctaHandlers.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/ctaPostMessages.es.js +41 -24
- package/dist/insights-v2/ctaActions/ctaPostMessages.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/feedbackSurvey.d.ts +9 -0
- package/dist/insights-v2/ctaActions/feedbackSurvey.es.js +51 -0
- package/dist/insights-v2/ctaActions/feedbackSurvey.es.js.map +1 -0
- package/dist/insights-v2/ctaActions/runCtaAction.es.js +36 -35
- package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
- package/dist/insights-v2/ctaActions/types.d.ts +7 -0
- package/dist/insights-v2/index.es.js +126 -120
- package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -1
- package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +126 -122
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +53 -53
- package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +0 -13
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +0 -296
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [10.0.0] - 12-01-2026
|
|
2
|
+
|
|
3
|
+
- **ADDED** - Insights V2 beats and Storybook QA pages for the tickets above
|
|
4
|
+
- **ADDED** - `PayoffStrategiesCopy` type and optional `insights_...
|
|
5
|
+
|
|
1
6
|
## [9.7.206] - 11-25-2026
|
|
2
7
|
|
|
3
8
|
- **ADDED** - QuarterlySummaryBlock component block, copy types, mock fixtures, and contract test (WEC-2363)
|
|
@@ -3,6 +3,8 @@ import { MiniWidgetProps } from '../../../../core';
|
|
|
3
3
|
interface AccountDetailsChartProps extends MiniWidgetProps {
|
|
4
4
|
ChartComponent?: React.ComponentType;
|
|
5
5
|
header?: string;
|
|
6
|
+
/** Figma's Insights 2.0 chart card: a body-sized semibold title and the elevation-1 shadow. */
|
|
7
|
+
compactHeader?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const _default: React.FunctionComponent<AccountDetailsChartProps>;
|
|
8
10
|
export default _default;
|
|
@@ -1,36 +1,52 @@
|
|
|
1
|
-
import { useCategoryStore as
|
|
2
|
-
import
|
|
1
|
+
import { useCategoryStore as f, useGlobalStore as m } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import c from "../../../../common/components/Loader.es.js";
|
|
3
3
|
import { useAccountUiStore as u } from "../../../hooks/useUiStore.es.js";
|
|
4
|
-
import
|
|
5
|
-
import { observer as
|
|
6
|
-
import { H3 as
|
|
7
|
-
import { jsx as t, jsxs as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
var
|
|
12
|
-
const { loadMonthlyCategoryTotals:
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import a from "react";
|
|
5
|
+
import { observer as x } from "mobx-react-lite";
|
|
6
|
+
import { H3 as b, Text as h } from "@mxenabled/mxui";
|
|
7
|
+
import { jsx as t, jsxs as C } from "react/jsx-runtime";
|
|
8
|
+
import g from "@mui/material/Card";
|
|
9
|
+
import y from "@mui/material/CardContent";
|
|
10
|
+
import S from "@mui/material/CardHeader";
|
|
11
|
+
var v = ({ sx: l, ChartComponent: e, compactHeader: r = !1, header: i }) => {
|
|
12
|
+
const { loadMonthlyCategoryTotals: n } = f(), { isInitialized: o } = m(), { selectedAccount: s } = u(), [d, p] = a.useState(!1);
|
|
13
|
+
return a.useEffect(() => {
|
|
14
|
+
o && n([s]).finally(() => {
|
|
15
|
+
p(!0);
|
|
16
16
|
});
|
|
17
|
-
}, [
|
|
17
|
+
}, [o, s]), !o || !d ? /* @__PURE__ */ t(c, {}) : /* @__PURE__ */ C(g, {
|
|
18
18
|
sx: {
|
|
19
19
|
"& .MuiCardContent-root:last-child": { pb: 0 },
|
|
20
|
-
...
|
|
20
|
+
...r && {
|
|
21
|
+
borderRadius: "8px",
|
|
22
|
+
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.12)"
|
|
23
|
+
},
|
|
24
|
+
...l
|
|
21
25
|
},
|
|
22
|
-
children: [/* @__PURE__ */ t(
|
|
23
|
-
sx:
|
|
24
|
-
|
|
26
|
+
children: [/* @__PURE__ */ t(S, {
|
|
27
|
+
sx: r ? {
|
|
28
|
+
pb: 0,
|
|
29
|
+
pt: 16,
|
|
30
|
+
px: 24
|
|
31
|
+
} : { pb: 0 },
|
|
32
|
+
title: r ? /* @__PURE__ */ t(h, {
|
|
33
|
+
component: "h3",
|
|
34
|
+
sx: {
|
|
35
|
+
fontWeight: 600,
|
|
36
|
+
pb: 4
|
|
37
|
+
},
|
|
38
|
+
variant: "body1",
|
|
39
|
+
children: i
|
|
40
|
+
}) : /* @__PURE__ */ t(b, {
|
|
25
41
|
sx: { pb: 4 },
|
|
26
|
-
children:
|
|
42
|
+
children: i
|
|
27
43
|
})
|
|
28
|
-
}), /* @__PURE__ */ t(
|
|
44
|
+
}), /* @__PURE__ */ t(y, {
|
|
29
45
|
sx: { p: 0 },
|
|
30
|
-
children:
|
|
46
|
+
children: e ? /* @__PURE__ */ t(e, {}) : null
|
|
31
47
|
})]
|
|
32
48
|
});
|
|
33
|
-
}, E =
|
|
49
|
+
}, E = x(v);
|
|
34
50
|
export {
|
|
35
51
|
E as default
|
|
36
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsChart.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport CardHeader from '@mui/material/CardHeader'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport { Loader, useCategoryStore, useGlobalStore } from '../../../../common'\nimport { MiniWidgetProps } from '../../../../core'\n\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface AccountDetailsChartProps extends MiniWidgetProps {\n ChartComponent?: React.ComponentType\n header?: string\n}\n\nconst AccountDetailsChart: React.FC<AccountDetailsChartProps> = ({\n sx,\n ChartComponent,\n header,\n}) => {\n const { loadMonthlyCategoryTotals } = useCategoryStore()\n const { isInitialized } = useGlobalStore()\n const { selectedAccount } = useAccountUiStore()\n\n const [isWidgetInitialized, setIsWidgetInitialized] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadMonthlyCategoryTotals([selectedAccount]).finally(() => {\n setIsWidgetInitialized(true)\n })\n }\n }, [isInitialized, selectedAccount])\n\n if (!isInitialized || !isWidgetInitialized) {\n return <Loader />\n }\n\n return (\n <Card\n sx={{\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n ...sx,\n }}\n >\n <CardHeader
|
|
1
|
+
{"version":3,"file":"AccountDetailsChart.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport CardHeader from '@mui/material/CardHeader'\n\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport { Loader, useCategoryStore, useGlobalStore } from '../../../../common'\nimport { MiniWidgetProps } from '../../../../core'\n\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface AccountDetailsChartProps extends MiniWidgetProps {\n ChartComponent?: React.ComponentType\n header?: string\n /** Figma's Insights 2.0 chart card: a body-sized semibold title and the elevation-1 shadow. */\n compactHeader?: boolean\n}\n\nconst AccountDetailsChart: React.FC<AccountDetailsChartProps> = ({\n sx,\n ChartComponent,\n compactHeader = false,\n header,\n}) => {\n const { loadMonthlyCategoryTotals } = useCategoryStore()\n const { isInitialized } = useGlobalStore()\n const { selectedAccount } = useAccountUiStore()\n\n const [isWidgetInitialized, setIsWidgetInitialized] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadMonthlyCategoryTotals([selectedAccount]).finally(() => {\n setIsWidgetInitialized(true)\n })\n }\n }, [isInitialized, selectedAccount])\n\n if (!isInitialized || !isWidgetInitialized) {\n return <Loader />\n }\n\n return (\n <Card\n sx={{\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n ...(compactHeader && { borderRadius: '8px', boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.12)' }),\n ...sx,\n }}\n >\n <CardHeader\n sx={compactHeader ? { pb: 0, pt: 16, px: 24 } : { pb: 0 }}\n title={\n compactHeader ? (\n <Text component=\"h3\" sx={{ fontWeight: 600, pb: 4 }} variant=\"body1\">\n {header}\n </Text>\n ) : (\n <H3 sx={{ pb: 4 }}>{header}</H3>\n )\n }\n />\n\n <CardContent sx={{ p: 0 }}>{ChartComponent ? <ChartComponent /> : null}</CardContent>\n </Card>\n )\n}\n\nexport default observer(AccountDetailsChart)\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,IAAA,CAA2D,EAC/D,IAAA,GACA,gBAAA,GACA,eAAA,IAAgB,IAChB,QAAA,EAAA,MACI;AACJ,QAAM,EAAE,2BAAA,EAAA,IAA8B,EAAiB,GACjD,EAAE,eAAA,EAAA,IAAkB,EAAe,GACnC,EAAE,iBAAA,EAAA,IAAoB,EAAkB,GAExC,CAAC,GAAqB,CAAA,IAA0B,EAAM,SAAS,EAAK;AAU1E,SARA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAA0B,CAAC,CAAe,CAAC,EAAE,QAAA,MAAc;AACzD,MAAA,EAAuB,EAAI;AAAA,IAC7B,CAAC;AAAA,EAEL,GAAG,CAAC,GAAe,CAAe,CAAC,GAE/B,CAAC,KAAiB,CAAC,IACd,gBAAA,EAAC,GAAD,CAAS,CAAA,IAIhB,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,qCAAqC,EACnC,IAAI,EACN;AAAA,MACA,GAAI,KAAiB;AAAA,QAAE,cAAc;AAAA,QAAO,WAAW;AAAA,MAAkC;AAAA,MACzF,GAAG;AAAA,IACL;AAAA,IAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI,IAAgB;AAAA,QAAE,IAAI;AAAA,QAAG,IAAI;AAAA,QAAI,IAAI;AAAA,MAAG,IAAI,EAAE,IAAI,EAAE;AAAA,MACxD,OACE,IACE,gBAAA,EAAC,GAAD;AAAA,QAAM,WAAU;AAAA,QAAK,IAAI;AAAA,UAAE,YAAY;AAAA,UAAK,IAAI;AAAA,QAAE;AAAA,QAAG,SAAQ;AAAA,QAC1D,UAAA;AAAA,MACG,CAAA,IAEN,gBAAA,EAAC,GAAD;AAAA,QAAI,IAAI,EAAE,IAAI,EAAE;AAAA,QAAI,UAAA;AAAA,MAAW,CAAA;AAAA,IAGpC,CAAA,GAED,gBAAA,EAAC,GAAD;AAAA,MAAa,IAAI,EAAE,GAAG,EAAE;AAAA,MAAI,UAAA,IAAiB,gBAAA,EAAC,GAAD,CAAiB,CAAA,IAAI;AAAA,IAAkB,CAAA,CAChF;AAAA;AAEV,GAEA,IAAe,EAAS,CAAmB"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
interface AccountDetailsHeaderProps {
|
|
2
2
|
ChartComponent?: React.ComponentType;
|
|
3
3
|
customDetailsChart?: React.ReactElement;
|
|
4
|
+
/** Credit accounts: Available credit under the balance even when a payment is due (Insights 2.0 Figma). */
|
|
5
|
+
preferAvailableCredit?: boolean;
|
|
4
6
|
}
|
|
5
|
-
declare const _default: (({ customDetailsChart, ChartComponent, }: AccountDetailsHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
7
|
+
declare const _default: (({ customDetailsChart, ChartComponent, preferAvailableCredit, }: AccountDetailsHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
8
|
displayName: string;
|
|
7
9
|
};
|
|
8
10
|
export default _default;
|
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useAccountStore as
|
|
1
|
+
import v from "../../../../common/hooks/useAccountDisplayName.es.js";
|
|
2
|
+
import { useAccountStore as A, useAppConfig as N, useGlobalCopyStore as x } from "../../../../common/context/hooks.es.js";
|
|
3
3
|
import { formatCurrency as T } from "../../../../core/utils/NumberFormatting.es.js";
|
|
4
4
|
import { INCOME_ACCOUNT_TYPES as E, PAYMENT_ACCOUNT_TYPES as w, SPENDING_ACCOUNT_TYPES as D } from "../../../../common/constants/Account.es.js";
|
|
5
5
|
import { useAccountUiStore as P } from "../../../hooks/useUiStore.es.js";
|
|
6
6
|
import { getAccountBalanceDetails as j } from "../../../utils/AccountFields.es.js";
|
|
7
|
-
import { getChartLabels as x } from "../../../utils/AccountDetails.es.js";
|
|
8
7
|
import O from "./AccountDetailsChart.es.js";
|
|
9
|
-
import {
|
|
8
|
+
import { getChartLabels as U } from "../../../utils/AccountDetails.es.js";
|
|
9
|
+
import { observer as Y } from "mobx-react-lite";
|
|
10
10
|
import i from "@mui/material/Stack";
|
|
11
|
-
import { H2 as
|
|
12
|
-
import { jsx as t, jsxs as
|
|
13
|
-
var
|
|
14
|
-
const { institutions:
|
|
11
|
+
import { H2 as G, InstitutionLogo as H, Text as c } from "@mxenabled/mxui";
|
|
12
|
+
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
13
|
+
var I = ({ customDetailsChart: a, ChartComponent: s, preferAvailableCredit: o = !1 }) => {
|
|
14
|
+
const { institutions: u } = A(), { selectedAccount: n } = P(), { config: d } = N(), { accounts: r } = x(), { firstSubtitle: l, firstValue: m, hasAvailableBalance: p, secondSubtitle: f, secondValue: h } = j(n, r, d.display_available_balance_in_accounts, o), _ = u.find((S) => S.guid === n?.institution_guid), y = [
|
|
15
15
|
...E,
|
|
16
16
|
...w,
|
|
17
17
|
...D
|
|
18
|
-
].includes(
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
].includes(n.account_type), b = v(n), { title: g, description: C } = U(n.account_type, r);
|
|
19
|
+
return /* @__PURE__ */ e(i, {
|
|
20
20
|
bgcolor: "background.default",
|
|
21
21
|
p: 24,
|
|
22
22
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ e(i, {
|
|
24
24
|
gap: 12,
|
|
25
|
-
children: [/* @__PURE__ */ t(
|
|
25
|
+
children: [/* @__PURE__ */ t(H, {
|
|
26
26
|
alt: r.institution_logo_alt,
|
|
27
|
-
institutionGuid:
|
|
27
|
+
institutionGuid: n.institution_guid || "",
|
|
28
28
|
size: 64
|
|
29
|
-
}), /* @__PURE__ */ t(
|
|
29
|
+
}), /* @__PURE__ */ t(c, {
|
|
30
30
|
variant: "body2",
|
|
31
|
-
children:
|
|
31
|
+
children: _?.name
|
|
32
32
|
})]
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ e(i, {
|
|
35
35
|
gap: 8,
|
|
36
36
|
mb: 24,
|
|
37
37
|
mt: 4,
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */ t(
|
|
40
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ t(G, { children: b }),
|
|
40
|
+
/* @__PURE__ */ e(i, {
|
|
41
41
|
direction: "row",
|
|
42
42
|
justifyContent: "space-between",
|
|
43
|
-
children: [/* @__PURE__ */ t(
|
|
44
|
-
bold:
|
|
43
|
+
children: [/* @__PURE__ */ t(c, {
|
|
44
|
+
bold: p,
|
|
45
|
+
sx: o ? { fontWeight: 600 } : void 0,
|
|
45
46
|
variant: "body1",
|
|
46
|
-
children:
|
|
47
|
-
}), /* @__PURE__ */ t(
|
|
48
|
-
bold: !
|
|
47
|
+
children: l
|
|
48
|
+
}), /* @__PURE__ */ t(c, {
|
|
49
|
+
bold: !o,
|
|
50
|
+
sx: o ? { fontWeight: 600 } : void 0,
|
|
49
51
|
variant: "body1",
|
|
50
|
-
children: T(
|
|
52
|
+
children: T(m, "0,0.00")
|
|
51
53
|
})]
|
|
52
54
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ e(i, {
|
|
54
56
|
direction: "row",
|
|
55
57
|
justifyContent: "space-between",
|
|
56
|
-
children: [/* @__PURE__ */ t(
|
|
57
|
-
|
|
58
|
-
children: p
|
|
59
|
-
}), /* @__PURE__ */ t(e, {
|
|
58
|
+
children: [/* @__PURE__ */ t(c, {
|
|
59
|
+
color: o ? "text.secondary" : void 0,
|
|
60
60
|
variant: "body2",
|
|
61
61
|
children: f
|
|
62
|
+
}), /* @__PURE__ */ t(c, {
|
|
63
|
+
color: o ? "text.secondary" : void 0,
|
|
64
|
+
variant: "body2",
|
|
65
|
+
children: h
|
|
62
66
|
})]
|
|
63
67
|
})
|
|
64
68
|
]
|
|
65
69
|
}),
|
|
66
|
-
|
|
70
|
+
y && /* @__PURE__ */ t(i, {
|
|
67
71
|
"aria-label": C,
|
|
68
72
|
role: "img",
|
|
69
73
|
children: a || /* @__PURE__ */ t(O, {
|
|
70
|
-
ChartComponent:
|
|
71
|
-
header:
|
|
74
|
+
ChartComponent: s,
|
|
75
|
+
header: g
|
|
72
76
|
})
|
|
73
77
|
})
|
|
74
78
|
]
|
|
75
79
|
});
|
|
76
|
-
}, R =
|
|
80
|
+
}, R = Y(I);
|
|
77
81
|
export {
|
|
78
82
|
R as default
|
|
79
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsHeader.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { H2, InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport {\n useAccountStore,\n INCOME_ACCOUNT_TYPES,\n PAYMENT_ACCOUNT_TYPES,\n SPENDING_ACCOUNT_TYPES,\n useAccountDisplayName,\n useGlobalCopyStore,\n useAppConfig,\n} from '../../../../common'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { getAccountBalanceDetails } from '../../../utils/AccountFields'\nimport { getChartLabels } from '../../../utils/AccountDetails'\n\nimport AccountDetailsChart from './AccountDetailsChart'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface AccountDetailsHeaderProps {\n ChartComponent?: React.ComponentType\n customDetailsChart?: React.ReactElement\n}\n\nconst AccountDetailsHeader = ({\n customDetailsChart,\n ChartComponent,\n}: AccountDetailsHeaderProps) => {\n const { institutions } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { config } = useAppConfig()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { firstSubtitle, firstValue, hasAvailableBalance, secondSubtitle, secondValue } =\n getAccountBalanceDetails(account
|
|
1
|
+
{"version":3,"file":"AccountDetailsHeader.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { H2, InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport {\n useAccountStore,\n INCOME_ACCOUNT_TYPES,\n PAYMENT_ACCOUNT_TYPES,\n SPENDING_ACCOUNT_TYPES,\n useAccountDisplayName,\n useGlobalCopyStore,\n useAppConfig,\n} from '../../../../common'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { getAccountBalanceDetails } from '../../../utils/AccountFields'\nimport { getChartLabels } from '../../../utils/AccountDetails'\n\nimport AccountDetailsChart from './AccountDetailsChart'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface AccountDetailsHeaderProps {\n ChartComponent?: React.ComponentType\n customDetailsChart?: React.ReactElement\n /** Credit accounts: Available credit under the balance even when a payment is due (Insights 2.0 Figma). */\n preferAvailableCredit?: boolean\n}\n\nconst AccountDetailsHeader = ({\n customDetailsChart,\n ChartComponent,\n preferAvailableCredit = false,\n}: AccountDetailsHeaderProps) => {\n const { institutions } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { config } = useAppConfig()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { firstSubtitle, firstValue, hasAvailableBalance, secondSubtitle, secondValue } =\n getAccountBalanceDetails(\n account,\n accountsCopy,\n config.display_available_balance_in_accounts,\n preferAvailableCredit,\n )\n\n const institution = institutions.find(\n (institution) => institution.guid === account?.institution_guid,\n )\n\n const showChart = [\n ...INCOME_ACCOUNT_TYPES,\n ...PAYMENT_ACCOUNT_TYPES,\n ...SPENDING_ACCOUNT_TYPES,\n ].includes(account.account_type)\n\n const displayName = useAccountDisplayName(account)\n\n const { title, description } = getChartLabels(account.account_type, accountsCopy)\n\n return (\n <Stack bgcolor=\"background.default\" p={24}>\n <Stack gap={12}>\n <InstitutionLogo\n alt={accountsCopy.institution_logo_alt}\n institutionGuid={account.institution_guid || ''}\n size={64}\n />\n <Text variant=\"body2\">{institution?.name}</Text>\n </Stack>\n <Stack gap={8} mb={24} mt={4}>\n <H2>{displayName}</H2>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Text\n bold={hasAvailableBalance}\n sx={preferAvailableCredit ? { fontWeight: 600 } : undefined}\n variant=\"body1\"\n >\n {firstSubtitle}\n </Text>\n <Text\n bold={!preferAvailableCredit}\n sx={preferAvailableCredit ? { fontWeight: 600 } : undefined}\n variant=\"body1\"\n >\n {formatCurrency(firstValue, '0,0.00')}\n </Text>\n </Stack>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n {/* Figma (Credit Account Details): the second line in text.secondary on the Insights 2.0 drawer. */}\n <Text color={preferAvailableCredit ? 'text.secondary' : undefined} variant=\"body2\">\n {secondSubtitle}\n </Text>\n <Text color={preferAvailableCredit ? 'text.secondary' : undefined} variant=\"body2\">\n {secondValue}\n </Text>\n </Stack>\n </Stack>\n {showChart && (\n <Stack aria-label={description} role=\"img\">\n {customDetailsChart ? (\n customDetailsChart\n ) : (\n <AccountDetailsChart ChartComponent={ChartComponent} header={title} />\n )}\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(AccountDetailsHeader)\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAM,IAAA,CAAwB,EAC5B,oBAAA,GACA,gBAAA,GACA,uBAAA,IAAwB,GAAA,MACO;AAC/B,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAgB,GACnC,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,EAAE,eAAA,GAAe,YAAA,GAAY,qBAAA,GAAqB,gBAAA,GAAgB,aA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A,CACD;AAAA;UACP,gBAAA,EAAC,GAAD;AAAA,YAAO,WAAU;AAAA,YAAM,gBAAe;AAAA,YAAtC,UAAA,CAEE,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAO,IAAwB,mBAAmB;AAAA,cAAW,SAAQ;AAAA,cACxE,UAAA;AAAA,YACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAO,IAAwB,mBAAmB;AAAA,cAAW,SAAQ;AAAA,cACxE,UAAA;AAAA,YACG,CAAA,CACD;AAAA;QACF;AAAA;MACN,KACC,gBAAA,EAAC,GAAD;AAAA,QAAO,cAAY;AAAA,QAAa,MAAK;AAAA,QAClC,UAAA,KAGC,gBAAA,EAAC,GAAD;AAAA,UAAqC,gBAAA;AAAA,UAAgB,QAAQ;AAAA,QAAQ,CAAA;AAAA,MAElE,CAAA;AAAA,IAEJ;AAAA;AAEX,GAEA,IAAe,EAAS,CAAoB"}
|
|
@@ -16,7 +16,9 @@ export type AccountField = {
|
|
|
16
16
|
valueFormatter: (val: any) => any;
|
|
17
17
|
};
|
|
18
18
|
export declare const getAccountDetailFields: (account: Account, copy: AccountsCopy) => AccountField[];
|
|
19
|
-
export declare const getAccountBalanceDetails: (account: Account, copy: AccountsCopy, showAvailableBalance: boolean
|
|
19
|
+
export declare const getAccountBalanceDetails: (account: Account, copy: AccountsCopy, showAvailableBalance: boolean,
|
|
20
|
+
/** Credit accounts: show Available credit even when a payment is due (Insights 2.0 Account Details). */
|
|
21
|
+
preferAvailableCredit?: boolean) => {
|
|
20
22
|
firstSubtitle: string;
|
|
21
23
|
firstValue: number | undefined;
|
|
22
24
|
secondSubtitle: string | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { buildDynamicCopy as i } from "../../core/utils/Localization.es.js";
|
|
2
|
-
import { DATE_FORMATS_INTL as
|
|
3
|
-
import { AccountIcon as
|
|
4
|
-
import { fromUnixUTC as
|
|
5
|
-
import { formatCurrency as _, formatOrdinal as
|
|
6
|
-
import { getAccountStartingBalance as
|
|
2
|
+
import { DATE_FORMATS_INTL as y, formatDate as v } from "../../core/constants/DateFormats.es.js";
|
|
3
|
+
import { AccountIcon as T, AccountType as o, PropertyIcon as g, PropertyType as A } from "../../core/types/Account.es.js";
|
|
4
|
+
import { fromUnixUTC as h } from "../../core/utils/DateUtil.es.js";
|
|
5
|
+
import { formatCurrency as _, formatOrdinal as D, formatPercentage as O, isValidNumber as b } from "../../core/utils/NumberFormatting.es.js";
|
|
6
|
+
import { getAccountStartingBalance as f, isAccountLiability as C, isManual as N, usesCreditLimitField as S, usesInterestRateField as I, usesOriginalBalanceField as L } from "../../core/utils/AccountUtils.es.js";
|
|
7
7
|
import { FieldType as m } from "../constants/Accounts.es.js";
|
|
8
|
-
import { Icon as
|
|
8
|
+
import { Icon as c, Text as R } from "@mxenabled/mxui";
|
|
9
9
|
import { jsx as p } from "react/jsx-runtime";
|
|
10
|
-
var
|
|
10
|
+
var H = (r, e) => {
|
|
11
11
|
const l = [{
|
|
12
12
|
event: "account_details_click_account_name",
|
|
13
13
|
label: e.account_name,
|
|
@@ -17,7 +17,7 @@ var B = (r, e) => {
|
|
|
17
17
|
validation: (t) => t ? "" : i(e.field_is_required, e.account_name),
|
|
18
18
|
valueFormatter: (t) => t
|
|
19
19
|
}];
|
|
20
|
-
if (
|
|
20
|
+
if (N(r)) {
|
|
21
21
|
l.unshift({
|
|
22
22
|
label: e.account_balance,
|
|
23
23
|
name: "balance",
|
|
@@ -25,10 +25,10 @@ var B = (r, e) => {
|
|
|
25
25
|
type: m.Currency,
|
|
26
26
|
valueFormatter: (a) => _(a, "0,0.00")
|
|
27
27
|
});
|
|
28
|
-
const t = Object.keys(
|
|
28
|
+
const t = Object.keys(o).filter((a) => Number(a)).map((a) => ({
|
|
29
29
|
label: e.account_types[a],
|
|
30
30
|
value: Number(a),
|
|
31
|
-
icon: /* @__PURE__ */ p(
|
|
31
|
+
icon: /* @__PURE__ */ p(c, { name: T[a] })
|
|
32
32
|
}));
|
|
33
33
|
l.push({
|
|
34
34
|
label: e.account_type,
|
|
@@ -39,11 +39,11 @@ var B = (r, e) => {
|
|
|
39
39
|
valueFormatter: (a) => t.find((n) => n.value === a)?.label
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
if (r.account_type ===
|
|
43
|
-
const t = Object.keys(
|
|
42
|
+
if (r.account_type === o.PROPERTY) {
|
|
43
|
+
const t = Object.keys(A).filter((a) => Number(a)).map((a) => ({
|
|
44
44
|
label: e.property_types[a],
|
|
45
45
|
value: Number(a),
|
|
46
|
-
icon: /* @__PURE__ */ p(
|
|
46
|
+
icon: /* @__PURE__ */ p(c, { name: g[a] })
|
|
47
47
|
}));
|
|
48
48
|
l.push({
|
|
49
49
|
label: e.property_type,
|
|
@@ -54,7 +54,7 @@ var B = (r, e) => {
|
|
|
54
54
|
valueFormatter: (a) => t.find((n) => n.value === a)?.label
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
if (
|
|
57
|
+
if (I(r)) {
|
|
58
58
|
let t = e.interest_rate, a = "interest_rate";
|
|
59
59
|
r.is_manual || (typeof r.apr == "number" && (t = e.apr, a = "apr"), typeof r.apy == "number" && (t = e.apy, a = "apy")), l.push({
|
|
60
60
|
event: "account_details_click_interest_rate",
|
|
@@ -62,11 +62,11 @@ var B = (r, e) => {
|
|
|
62
62
|
name: a,
|
|
63
63
|
placeholder: i(e.enter_value, t),
|
|
64
64
|
type: m.Input,
|
|
65
|
-
validation: (n) =>
|
|
66
|
-
valueFormatter: (n) =>
|
|
65
|
+
validation: (n) => b(n) ? "" : e.error_amount_is_invalid,
|
|
66
|
+
valueFormatter: (n) => b(n) ? O(n / 100) : n
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return C(r) && (l.push({
|
|
70
70
|
label: e.minimum_payment,
|
|
71
71
|
name: "minimum_payment",
|
|
72
72
|
placeholder: i(e.enter_value, e.minimum_payment),
|
|
@@ -77,22 +77,22 @@ var B = (r, e) => {
|
|
|
77
77
|
name: "payment_due_at",
|
|
78
78
|
type: m.Date,
|
|
79
79
|
valueFormatter: (t) => {
|
|
80
|
-
const a = typeof t == "number" ?
|
|
81
|
-
return
|
|
80
|
+
const a = typeof t == "number" ? h(t) : t;
|
|
81
|
+
return v(a, y.MED_MONTH_SHORT_DAY_FULL_YEAR);
|
|
82
82
|
}
|
|
83
83
|
}) : l.push({
|
|
84
84
|
label: e.day_payment_due,
|
|
85
85
|
name: "day_payment_is_due",
|
|
86
86
|
placeholder: i(e.enter_value, e.day_payment_due),
|
|
87
87
|
type: m.Date,
|
|
88
|
-
valueFormatter: (t) => i(e.day_of_every_month,
|
|
89
|
-
})),
|
|
88
|
+
valueFormatter: (t) => i(e.day_of_every_month, D(t <= 31 ? t : new Date(t).getDate()))
|
|
89
|
+
})), S(r) && l.push({
|
|
90
90
|
label: e.credit_limit,
|
|
91
91
|
name: "credit_limit",
|
|
92
92
|
placeholder: i(e.enter_value, e.credit_limit),
|
|
93
93
|
type: m.Currency,
|
|
94
94
|
valueFormatter: (t) => _(t, "0,0.00")
|
|
95
|
-
}),
|
|
95
|
+
}), L(r) && l.push({
|
|
96
96
|
label: e.original_balance,
|
|
97
97
|
minAmount: 1,
|
|
98
98
|
name: "original_balance",
|
|
@@ -100,35 +100,35 @@ var B = (r, e) => {
|
|
|
100
100
|
type: m.Currency,
|
|
101
101
|
valueFormatter: (t) => _(t, "0,0.00")
|
|
102
102
|
}), l;
|
|
103
|
-
},
|
|
104
|
-
let
|
|
103
|
+
}, k = (r, e, l, t = !1) => {
|
|
104
|
+
let a = "", n = null, u = null, s = null, d = !1;
|
|
105
105
|
switch (r.account_type) {
|
|
106
106
|
case 1:
|
|
107
107
|
case 2:
|
|
108
|
-
r.available_balance != null && l ? (
|
|
108
|
+
r.available_balance != null && l ? (a = e.available_balance, n = f(r, l), u = e.current_balance, s = _(r.balance, "0,0.00"), d = !0) : (a = e.current_balance, n = f(r, l));
|
|
109
109
|
break;
|
|
110
110
|
default:
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
|
|
111
|
+
if (a = e.current_balance, n = r.balance, r.minimum_payment && r.payment_due_at && !(t && r.credit_limit)) {
|
|
112
|
+
const F = h(r.payment_due_at);
|
|
113
|
+
u = /* @__PURE__ */ p(R, {
|
|
114
114
|
component: "strong",
|
|
115
115
|
variant: "caption",
|
|
116
|
-
children: i(e.payment_due_on, _(r.minimum_payment, "0,0.00"),
|
|
116
|
+
children: i(e.payment_due_on, _(r.minimum_payment, "0,0.00"), v(F, y.FULL_MONTH_DAY))
|
|
117
117
|
});
|
|
118
|
-
} else r.credit_limit && (
|
|
118
|
+
} else r.credit_limit && (u = e.available_credit, s = _(r.credit_limit - (r?.balance ?? 0), "0,0.00"));
|
|
119
119
|
}
|
|
120
120
|
return {
|
|
121
|
-
firstSubtitle:
|
|
122
|
-
firstValue:
|
|
123
|
-
secondSubtitle:
|
|
124
|
-
secondValue:
|
|
125
|
-
hasAvailableBalance:
|
|
121
|
+
firstSubtitle: a,
|
|
122
|
+
firstValue: n,
|
|
123
|
+
secondSubtitle: u,
|
|
124
|
+
secondValue: s,
|
|
125
|
+
hasAvailableBalance: d
|
|
126
126
|
};
|
|
127
|
-
},
|
|
127
|
+
}, q = (r, e, l) => r.reduce((t, a) => t + (k(a, e, l).firstValue || 0), 0);
|
|
128
128
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
k as getAccountBalanceDetails,
|
|
130
|
+
H as getAccountDetailFields,
|
|
131
|
+
q as getClosedAccountBalanceTotal
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
//# sourceMappingURL=AccountFields.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountFields.es.js","names":[],"sources":["../../../src/accounts/utils/AccountFields.tsx"],"sourcesContent":["import { Icon, Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\nimport { AccountIcon, AccountType, PropertyType } from '../../core'\nimport type { Account, AccountsCopy } from '../../core'\n\nimport { PropertyIcon } from '../../core/types/Account'\nimport {\n getAccountStartingBalance,\n isAccountLiability,\n isManual,\n usesCreditLimitField,\n usesInterestRateField,\n usesOriginalBalanceField,\n} from '../../core/utils/AccountUtils'\nimport { FieldType } from '../constants/Accounts'\nimport { fromUnixUTC } from '../../core/utils/DateUtil'\nimport {\n formatCurrency,\n formatOrdinal,\n formatPercentage,\n isValidNumber,\n} from '../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\n\ntype SelectOption = {\n label: string\n value: number\n icon: React.ReactElement\n}\n\nexport type AccountField = {\n event?: string\n label: string\n minAmount?: number\n options?: SelectOption[]\n name: keyof Account\n placeholder?: string\n type?: string\n validation?: (val: any) => string\n valueFormatter: (val: any) => any\n}\n\nexport const getAccountDetailFields = (account: Account, copy: AccountsCopy) => {\n const fields: AccountField[] = [\n {\n event: 'account_details_click_account_name',\n label: copy.account_name,\n name: 'user_name',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_name) as string,\n type: FieldType.Input,\n validation: (val: string) =>\n val ? '' : (buildDynamicCopy(copy.field_is_required, copy.account_name) as string),\n valueFormatter: (val) => val,\n },\n ]\n\n if (isManual(account)) {\n fields.unshift({\n label: copy.account_balance,\n name: 'balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n const accountTypeOptions = Object.keys(AccountType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.account_types[value],\n value: Number(value),\n icon: <Icon name={AccountIcon[value]} />,\n }))\n\n fields.push({\n label: copy.account_type,\n name: 'account_type',\n options: accountTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.account_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => accountTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (account.account_type === AccountType.PROPERTY) {\n const propertyTypeOptions = Object.keys(PropertyType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.property_types[value],\n value: Number(value),\n icon: <Icon name={PropertyIcon[value]} />,\n }))\n\n fields.push({\n label: copy.property_type,\n name: 'property_type',\n options: propertyTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.property_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => propertyTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (usesInterestRateField(account)) {\n let label = copy.interest_rate\n let fieldName = 'interest_rate' as keyof Account\n\n if (!account.is_manual) {\n if (typeof account.apr === 'number') {\n label = copy.apr\n fieldName = 'apr'\n }\n if (typeof account.apy === 'number') {\n label = copy.apy\n fieldName = 'apy'\n }\n }\n\n fields.push({\n event: 'account_details_click_interest_rate',\n label,\n name: fieldName,\n placeholder: buildDynamicCopy(copy.enter_value, label) as string,\n type: FieldType.Input,\n validation: (val) => (!isValidNumber(val) ? copy.error_amount_is_invalid : ''),\n valueFormatter: (val) => (isValidNumber(val) ? formatPercentage(val / 100) : val),\n })\n }\n\n if (isAccountLiability(account)) {\n fields.push({\n label: copy.minimum_payment,\n name: 'minimum_payment',\n placeholder: buildDynamicCopy(copy.enter_value, copy.minimum_payment) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n if (account.payment_due_at) {\n fields.push({\n label: copy.next_payment,\n name: 'payment_due_at',\n type: FieldType.Date,\n valueFormatter: (val) => {\n // accounts for Unix and DateTime values\n const dateTimeStamp = typeof val === 'number' ? fromUnixUTC(val) : val\n return formatDate(dateTimeStamp, DATE_FORMATS_INTL.MED_MONTH_SHORT_DAY_FULL_YEAR)\n },\n })\n } else {\n fields.push({\n label: copy.day_payment_due,\n name: 'day_payment_is_due',\n placeholder: buildDynamicCopy(copy.enter_value, copy.day_payment_due) as string,\n type: FieldType.Date,\n valueFormatter: (val) =>\n buildDynamicCopy(\n copy.day_of_every_month,\n formatOrdinal(val <= 31 ? val : new Date(val).getDate()),\n ) as string,\n })\n }\n }\n\n if (usesCreditLimitField(account)) {\n fields.push({\n label: copy.credit_limit,\n name: 'credit_limit',\n placeholder: buildDynamicCopy(copy.enter_value, copy.credit_limit) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n if (usesOriginalBalanceField(account)) {\n fields.push({\n label: copy.original_balance,\n minAmount: 1,\n name: 'original_balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.original_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n return fields\n}\nexport const getAccountBalanceDetails = (\n account: Account,\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n let firstSubtitle = ''\n let firstValue = null\n let secondSubtitle = null\n let secondValue = null\n let hasAvailableBalance = false\n\n switch (account.account_type) {\n // checking or savings\n case 1:\n case 2: {\n // some savings accounts only have balance, and not available_balance\n if (account.available_balance != null && showAvailableBalance) {\n firstSubtitle = copy.available_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n secondSubtitle = copy.current_balance\n secondValue = formatCurrency(account.balance, '0,0.00')\n hasAvailableBalance = true\n } else {\n firstSubtitle = copy.current_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n }\n break\n }\n default: {\n firstSubtitle = copy.current_balance\n firstValue = account.balance\n if (account.minimum_payment && account.payment_due_at) {\n const dateTimeStamp = fromUnixUTC(account.payment_due_at)\n secondSubtitle = (\n <Text component=\"strong\" variant=\"caption\">\n {\n buildDynamicCopy(\n copy.payment_due_on,\n formatCurrency(account.minimum_payment, '0,0.00'),\n formatDate(dateTimeStamp, DATE_FORMATS_INTL.FULL_MONTH_DAY),\n ) as string\n }\n </Text>\n )\n } else if (account.credit_limit) {\n secondSubtitle = copy.available_credit\n secondValue = formatCurrency(account.credit_limit - (account?.balance ?? 0), '0,0.00')\n }\n }\n }\n\n return {\n firstSubtitle,\n firstValue,\n secondSubtitle,\n secondValue,\n hasAvailableBalance,\n }\n}\n\nexport const getClosedAccountBalanceTotal = (\n accounts: Account[],\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n const total = accounts.reduce((sum, account) => {\n const details = getAccountBalanceDetails(account, copy, showAvailableBalance)\n const firstValue = details.firstValue || 0\n return sum + firstValue\n }, 0)\n\n return total\n}\n"],"mappings":";;;;;;;;;AA2CA,IAAa,IAAA,CAA0B,GAAkB,MAAuB;AAC9E,QAAM,IAAyB,CAC7B;AAAA,IACE,OAAO;AAAA,IACP,OAAO,EAAK;AAAA,IACZ,MAAM;AAAA,IACN,aAAa,EAAiB,EAAK,aAAa,EAAK,YAAY;AAAA,IACjE,MAAM,EAAU;AAAA,IAChB,YAAA,CAAa,MACX,IAAM,KAAM,EAAiB,EAAK,mBAAmB,EAAK,YAAY;AAAA,IACxE,gBAAA,CAAiB,MAAQ;AAAA,EAC3B,CACF;AAEA,MAAI,EAAS,CAAO,GAAG;AACrB,IAAA,EAAO,QAAQ;AAAA,MACb,OAAO,EAAK;AAAA,MACZ,MAAM;AAAA,MACN,aAAa,EAAiB,EAAK,aAAa,EAAK,eAAe;AAAA,MACpE,MAAM,EAAU;AAAA,MAChB,gBAAA,CAAiB,MAAQ,EAAe,GAAK,QAAQ;AAAA,IACvD,CAAC;AAED,UAAM,IAAqB,OAAO,KAAK,CAAW,EAC/C,OAAA,CAAQ,MAAQ,OAAO,CAAG,CAAC,EAC3B,IAAA,CAAK,OAAW;AAAA,MACf,OAAO,EAAK,cAAc,CAAA;AAAA,MAC1B,OAAO,OAAO,CAAK;AAAA,MACnB,MAAM,gBAAA,EAAC,GAAD,EAAM,MAAM,EAAY,CAAA,EAAS,CAAA;AAAA,IACzC,EAAE;AAEJ,IAAA,EAAO,KAAK;AAAA,MACV,OAAO,EAAK;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa,EAAiB,EAAK,cAAc,EAAK,YAA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;AACH,MAAI,IAAgB,IAChB,IAAa,MACb,IAAiB,MACjB,IAAc,MACd,IAAsB;AAE1B,UAAQ,EAAQ,cAAhB;AAAA,IAEE,KAAK;AAAA,IACL,KAAK;AAEH,MAAI,EAAQ,qBAAqB,QAAQ,KACvC,IAAgB,EAAK,mBACrB,IAAa,EAA0B,GAAS,CAAoB,GACpE,IAAiB,EAAK,iBACtB,IAAc,EAAe,EAAQ,SAAS,QAAQ,GACtD,IAAsB,OAEtB,IAAgB,EAAK,iBACrB,IAAa,EAA0B,GAAS,CAAoB;AAEtE;AAAA,IAEF;AAGE,UAFA,IAAgB,EAAK,iBACrB,IAAa,EAAQ,SACjB,EAAQ,mBAAmB,EAAQ,gBAAgB;AACrD,cAAM,IAAgB,EAAY,EAAQ,cAAc;AACxD,QAAA,IACE,gBAAA,EAAC,GAAD;AAAA,UAAM,WAAU;AAAA,UAAS,SAAQ;AAAA,UAE7B,UAAA,EACE,EAAK,gBACL,EAAe,EAAQ,iBAAiB,QAAQ,GAChD,EAAW,GAAe,EAAkB,cAAc,CAC5D;AAAA,QAEE,CAAA;AAAA,MAEV,MAAO,CAAI,EAAQ,iBACjB,IAAiB,EAAK,kBACtB,IAAc,EAAe,EAAQ,gBAAgB,GAAS,WAAW,IAAI,QAAQ;AAAA,EAG3F;AAEA,SAAO;AAAA,IACL,eAAA;AAAA,IACA,YAAA;AAAA,IACA,gBAAA;AAAA,IACA,aAAA;AAAA,IACA,qBAAA;AAAA,EACF;AACF,GAEa,IAAA,CACX,GACA,GACA,MAEc,EAAS,OAAA,CAAQ,GAAK,MAG3B,KAFS,EAAyB,GAAS,GAAM,CACrC,EAAQ,cAAc,IAExC,CAEI"}
|
|
1
|
+
{"version":3,"file":"AccountFields.es.js","names":[],"sources":["../../../src/accounts/utils/AccountFields.tsx"],"sourcesContent":["import { Icon, Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\nimport { AccountIcon, AccountType, PropertyType } from '../../core'\nimport type { Account, AccountsCopy } from '../../core'\n\nimport { PropertyIcon } from '../../core/types/Account'\nimport {\n getAccountStartingBalance,\n isAccountLiability,\n isManual,\n usesCreditLimitField,\n usesInterestRateField,\n usesOriginalBalanceField,\n} from '../../core/utils/AccountUtils'\nimport { FieldType } from '../constants/Accounts'\nimport { fromUnixUTC } from '../../core/utils/DateUtil'\nimport {\n formatCurrency,\n formatOrdinal,\n formatPercentage,\n isValidNumber,\n} from '../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\n\ntype SelectOption = {\n label: string\n value: number\n icon: React.ReactElement\n}\n\nexport type AccountField = {\n event?: string\n label: string\n minAmount?: number\n options?: SelectOption[]\n name: keyof Account\n placeholder?: string\n type?: string\n validation?: (val: any) => string\n valueFormatter: (val: any) => any\n}\n\nexport const getAccountDetailFields = (account: Account, copy: AccountsCopy) => {\n const fields: AccountField[] = [\n {\n event: 'account_details_click_account_name',\n label: copy.account_name,\n name: 'user_name',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_name) as string,\n type: FieldType.Input,\n validation: (val: string) =>\n val ? '' : (buildDynamicCopy(copy.field_is_required, copy.account_name) as string),\n valueFormatter: (val) => val,\n },\n ]\n\n if (isManual(account)) {\n fields.unshift({\n label: copy.account_balance,\n name: 'balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n const accountTypeOptions = Object.keys(AccountType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.account_types[value],\n value: Number(value),\n icon: <Icon name={AccountIcon[value]} />,\n }))\n\n fields.push({\n label: copy.account_type,\n name: 'account_type',\n options: accountTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.account_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => accountTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (account.account_type === AccountType.PROPERTY) {\n const propertyTypeOptions = Object.keys(PropertyType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.property_types[value],\n value: Number(value),\n icon: <Icon name={PropertyIcon[value]} />,\n }))\n\n fields.push({\n label: copy.property_type,\n name: 'property_type',\n options: propertyTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.property_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => propertyTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (usesInterestRateField(account)) {\n let label = copy.interest_rate\n let fieldName = 'interest_rate' as keyof Account\n\n if (!account.is_manual) {\n if (typeof account.apr === 'number') {\n label = copy.apr\n fieldName = 'apr'\n }\n if (typeof account.apy === 'number') {\n label = copy.apy\n fieldName = 'apy'\n }\n }\n\n fields.push({\n event: 'account_details_click_interest_rate',\n label,\n name: fieldName,\n placeholder: buildDynamicCopy(copy.enter_value, label) as string,\n type: FieldType.Input,\n validation: (val) => (!isValidNumber(val) ? copy.error_amount_is_invalid : ''),\n valueFormatter: (val) => (isValidNumber(val) ? formatPercentage(val / 100) : val),\n })\n }\n\n if (isAccountLiability(account)) {\n fields.push({\n label: copy.minimum_payment,\n name: 'minimum_payment',\n placeholder: buildDynamicCopy(copy.enter_value, copy.minimum_payment) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n if (account.payment_due_at) {\n fields.push({\n label: copy.next_payment,\n name: 'payment_due_at',\n type: FieldType.Date,\n valueFormatter: (val) => {\n // accounts for Unix and DateTime values\n const dateTimeStamp = typeof val === 'number' ? fromUnixUTC(val) : val\n return formatDate(dateTimeStamp, DATE_FORMATS_INTL.MED_MONTH_SHORT_DAY_FULL_YEAR)\n },\n })\n } else {\n fields.push({\n label: copy.day_payment_due,\n name: 'day_payment_is_due',\n placeholder: buildDynamicCopy(copy.enter_value, copy.day_payment_due) as string,\n type: FieldType.Date,\n valueFormatter: (val) =>\n buildDynamicCopy(\n copy.day_of_every_month,\n formatOrdinal(val <= 31 ? val : new Date(val).getDate()),\n ) as string,\n })\n }\n }\n\n if (usesCreditLimitField(account)) {\n fields.push({\n label: copy.credit_limit,\n name: 'credit_limit',\n placeholder: buildDynamicCopy(copy.enter_value, copy.credit_limit) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n if (usesOriginalBalanceField(account)) {\n fields.push({\n label: copy.original_balance,\n minAmount: 1,\n name: 'original_balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.original_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n return fields\n}\nexport const getAccountBalanceDetails = (\n account: Account,\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n /** Credit accounts: show Available credit even when a payment is due (Insights 2.0 Account Details). */\n preferAvailableCredit = false,\n) => {\n let firstSubtitle = ''\n let firstValue = null\n let secondSubtitle = null\n let secondValue = null\n let hasAvailableBalance = false\n\n switch (account.account_type) {\n // checking or savings\n case 1:\n case 2: {\n // some savings accounts only have balance, and not available_balance\n if (account.available_balance != null && showAvailableBalance) {\n firstSubtitle = copy.available_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n secondSubtitle = copy.current_balance\n secondValue = formatCurrency(account.balance, '0,0.00')\n hasAvailableBalance = true\n } else {\n firstSubtitle = copy.current_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n }\n break\n }\n default: {\n firstSubtitle = copy.current_balance\n firstValue = account.balance\n if (\n account.minimum_payment &&\n account.payment_due_at &&\n !(preferAvailableCredit && account.credit_limit)\n ) {\n const dateTimeStamp = fromUnixUTC(account.payment_due_at)\n secondSubtitle = (\n <Text component=\"strong\" variant=\"caption\">\n {\n buildDynamicCopy(\n copy.payment_due_on,\n formatCurrency(account.minimum_payment, '0,0.00'),\n formatDate(dateTimeStamp, DATE_FORMATS_INTL.FULL_MONTH_DAY),\n ) as string\n }\n </Text>\n )\n } else if (account.credit_limit) {\n secondSubtitle = copy.available_credit\n secondValue = formatCurrency(account.credit_limit - (account?.balance ?? 0), '0,0.00')\n }\n }\n }\n\n return {\n firstSubtitle,\n firstValue,\n secondSubtitle,\n secondValue,\n hasAvailableBalance,\n }\n}\n\nexport const getClosedAccountBalanceTotal = (\n accounts: Account[],\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n const total = accounts.reduce((sum, account) => {\n const details = getAccountBalanceDetails(account, copy, showAvailableBalance)\n const firstValue = details.firstValue || 0\n return sum + firstValue\n }, 0)\n\n return total\n}\n"],"mappings":";;;;;;;;;AA2CA,IAAa,IAAA,CAA0B,GAAkB,MAAuB;AAC9E,QAAM,IAAyB,CAC7B;AAAA,IACE,OAAO;AAAA,IACP,OAAO,EAAK;AAAA,IACZ,MAAM;AAAA,IACN,aAAa,EAAiB,EAAK,aAAa,EAAK,YAAY;AAAA,IACjE,MAAM,EAAU;AAAA,IAChB,YAAA,CAAa,MACX,IAAM,KAAM,EAAiB,EAAK,mBAAmB,EAAK,YAAY;AAAA,IACxE,gBAAA,CAAiB,MAAQ;AAAA,EAC3B,CACF;AAEA,MAAI,EAAS,CAAO,GAAG;AACrB,IAAA,EAAO,QAAQ;AAAA,MACb,OAAO,EAAK;AAAA,MACZ,MAAM;AAAA,MACN,aAAa,EAAiB,EAAK,aAAa,EAAK,eAAe;AAAA,MACpE,MAAM,EAAU;AAAA,MAChB,gBAAA,CAAiB,MAAQ,EAAe,GAAK,QAAQ;AAAA,IACvD,CAAC;AAED,UAAM,IAAqB,OAAO,KAAK,CAAW,EAC/C,OAAA,CAAQ,MAAQ,OAAO,CAAG,CAAC,EAC3B,IAAA,CAAK,OAAW;AAAA,MACf,OAAO,EAAK,cAAc,CAAA;AAAA,MAC1B,OAAO,OAAO,CAAK;AAAA,MACnB,MAAM,gBAAA,EAAC,GAAD,EAAM,MAAM,EAAY,CAAA,EAAS,CAAA;AAAA,IACzC,EAAE;AAEJ,IAAA,EAAO,KAAK;AAAA,MACV,OAAO,EAAK;AAAA,MACZ,MAAM;AA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undefined;
|
|
69
69
|
title?: string;
|
|
70
70
|
useCustomMark?: boolean;
|
|
71
|
+
/** Draw every series' marks as circles (Figma's Account Details charts), not the per-series shape sequence. */
|
|
72
|
+
circleMarks?: boolean;
|
|
73
|
+
/** Axis tick label size in px (MUI X sets 12px inline, so an sx override cannot shrink it). */
|
|
74
|
+
tickLabelFontSize?: number;
|
|
71
75
|
valueFormatterString?: string;
|
|
72
76
|
width?: number;
|
|
73
77
|
xAxisScaleType?: 'band' | 'point';
|