@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
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { BEAT_ACTIVE_AT_KEY as
|
|
3
|
-
import { resolveVariantConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { buildDynamicCopy as l } from "../../../core/utils/Localization.es.js";
|
|
2
|
+
import { BEAT_ACTIVE_AT_KEY as T } from "../../../core/stores/InsightsV2Store.es.js";
|
|
3
|
+
import { resolveVariantConfig as A } from "../../blocks/resolveVariantConfig.es.js";
|
|
4
|
+
import { BUDGET_BLOCK_LAYOUT as E } from "../../blocks/ComponentBlocks/BudgetBlock/layout.es.js";
|
|
5
|
+
import { asNonEmptyText as i, asNumber as d } from "../../blocks/slotReaders.es.js";
|
|
6
|
+
import { endOfMonth as n } from "date-fns/endOfMonth";
|
|
6
7
|
import { startOfMonth as c } from "date-fns/startOfMonth";
|
|
7
|
-
import { differenceInCalendarDays as
|
|
8
|
-
var
|
|
8
|
+
import { differenceInCalendarDays as f } from "date-fns/differenceInCalendarDays";
|
|
9
|
+
var h = {
|
|
9
10
|
LOW: "success.main",
|
|
10
11
|
MEDIUM: "warning.main",
|
|
11
12
|
HIGH: "warning.main",
|
|
12
13
|
OFF_TRACK: "error.main"
|
|
13
|
-
},
|
|
14
|
+
}, y = "success.main", W = (t, e) => Math.ceil((e ? t / e : 0) * 100), C = (t) => {
|
|
14
15
|
if (t > 100) return "OFF_TRACK";
|
|
15
16
|
if (t >= 75) return "HIGH";
|
|
16
17
|
if (t >= 50) return "MEDIUM";
|
|
17
18
|
if (t >= 25) return "LOW";
|
|
18
|
-
},
|
|
19
|
+
}, B = (t) => t ? h[t] : y, D = 80, p = 100, O = (t) => E[t <= D ? "status_on_track" : t <= p ? "status_near" : "status_off_track"].barColor, b = (t) => {
|
|
19
20
|
const e = t.insights_payload, r = e?.instance_slot?.data ?? e?.instance_slot_data ?? {};
|
|
20
21
|
return {
|
|
21
|
-
categoryGuid:
|
|
22
|
-
merchantGuid:
|
|
22
|
+
categoryGuid: i(r.category_guid) ?? e?.primary_category_guid ?? t.primary_category_guid ?? void 0,
|
|
23
|
+
merchantGuid: i(r.merchant_guid) ?? e?.primary_merchant_guid ?? t.primary_merchant_guid ?? void 0,
|
|
23
24
|
spent: d(r.spent_amount),
|
|
24
25
|
budgeted: d(r.budgeted_amount)
|
|
25
26
|
};
|
|
26
|
-
},
|
|
27
|
-
const { categoryGuid: r } =
|
|
28
|
-
return (r ? e.categories?.default_categories?.[r] : void 0)
|
|
29
|
-
},
|
|
27
|
+
}, g = (t) => t?.replace(/&/g, "&"), G = (t, e) => {
|
|
28
|
+
const { categoryGuid: r } = b(t);
|
|
29
|
+
return g(r ? e.categories?.default_categories?.[r] : void 0);
|
|
30
|
+
}, N = (t, e) => g(i(t.payload?.merchant_name) ?? i(e)), R = (t) => N(t), o = {
|
|
30
31
|
CATEGORY_SPEND: "category_spend",
|
|
31
32
|
CATEGORY_BUDGET: "category_budget",
|
|
32
33
|
MERCHANT_BUDGET: "merchant_budget"
|
|
@@ -34,63 +35,69 @@ var T = {
|
|
|
34
35
|
if (t == null || t === "") return;
|
|
35
36
|
const e = new Date(typeof t == "number" ? t * 1e3 : t);
|
|
36
37
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
37
|
-
},
|
|
38
|
-
const a =
|
|
39
|
-
if (!(
|
|
40
|
-
return
|
|
41
|
-
},
|
|
42
|
-
const r =
|
|
38
|
+
}, L = (t) => t.active_at ?? t.insights_payload?.active_at, k = (t, e) => t.beatContext[e.guid]?.[T], m = (t, e, r = /* @__PURE__ */ new Date()) => s(e) ?? s(L(t)) ?? r, x = (t, e = /* @__PURE__ */ new Date(), r) => {
|
|
39
|
+
const a = m(t, r, e);
|
|
40
|
+
if (!(n(a) < c(e)))
|
|
41
|
+
return f(n(e), e) + 1;
|
|
42
|
+
}, w = (t, e) => {
|
|
43
|
+
const r = m(t, e);
|
|
43
44
|
return {
|
|
44
45
|
start: c(r),
|
|
45
|
-
end:
|
|
46
|
+
end: n(r)
|
|
46
47
|
};
|
|
47
|
-
},
|
|
48
|
-
const r = t.categoryGuid ?
|
|
48
|
+
}, M = (t) => (e) => e.category_guid === t || e.top_level_category_guid === t, U = (t) => (e) => e.merchant_guid === t, X = (t, e) => {
|
|
49
|
+
const r = t.categoryGuid ? M(t.categoryGuid) : t.merchantGuid ? U(t.merchantGuid) : void 0;
|
|
49
50
|
return r && {
|
|
50
51
|
custom: r,
|
|
51
52
|
dateRange: e
|
|
52
53
|
};
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
}, u = {
|
|
55
|
+
barWithoutBudget: !1,
|
|
56
|
+
showPeriodLine: !0,
|
|
57
|
+
subject: G,
|
|
58
|
+
v2BarColor: !1
|
|
59
|
+
}, _ = {
|
|
60
|
+
...u,
|
|
61
|
+
barWithoutBudget: !0,
|
|
62
|
+
showPeriodLine: !1,
|
|
63
|
+
v2BarColor: !0
|
|
64
|
+
}, I = {
|
|
65
|
+
default: u,
|
|
66
|
+
[o.CATEGORY_SPEND]: {
|
|
67
|
+
...u,
|
|
68
|
+
showPeriodLine: !1
|
|
57
69
|
},
|
|
58
|
-
[
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[n.CATEGORY_BUDGET]: {
|
|
63
|
-
showPeriodLine: !1,
|
|
64
|
-
subject: i
|
|
65
|
-
},
|
|
66
|
-
[n.MERCHANT_BUDGET]: {
|
|
67
|
-
showPeriodLine: !1,
|
|
68
|
-
subject: i
|
|
70
|
+
[o.CATEGORY_BUDGET]: _,
|
|
71
|
+
[o.MERCHANT_BUDGET]: {
|
|
72
|
+
..._,
|
|
73
|
+
subject: R
|
|
69
74
|
}
|
|
70
|
-
},
|
|
71
|
-
const a = r &&
|
|
72
|
-
return a && e.budgets?.details_type_title ?
|
|
73
|
-
},
|
|
75
|
+
}, v = (t) => A(I, t, "default", "BudgetDetailsBlock"), q = (t, e) => v(t).v2BarColor ? O(e) : B(C(e)), z = (t, e, r) => {
|
|
76
|
+
const a = r && v(t).subject(r, e);
|
|
77
|
+
return a && e.budgets?.details_type_title ? l(e.budgets.details_type_title, a) : r?.insights_payload?.title || e.budgets?.details_title || "";
|
|
78
|
+
}, J = (t) => {
|
|
74
79
|
const e = Number(t);
|
|
75
80
|
return t.trim() !== "" && Number.isFinite(e) && e > 0;
|
|
76
81
|
};
|
|
77
82
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
h as BUDGET_TIER_COLORS,
|
|
84
|
+
y as DEFAULT_TIER_COLOR,
|
|
80
85
|
s as activeAtDate,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
L as beatActiveAt,
|
|
87
|
+
N as budgetMerchantName,
|
|
88
|
+
m as budgetMonthOf,
|
|
89
|
+
w as budgetMonthRange,
|
|
90
|
+
X as budgetTransactionFilter,
|
|
91
|
+
W as calculateBudgetPercent,
|
|
92
|
+
C as calculateBudgetTier,
|
|
93
|
+
x as daysLeftInBudgetMonth,
|
|
94
|
+
z as getBudgetDetailsDrawerTitle,
|
|
95
|
+
J as isPositiveAmount,
|
|
96
|
+
k as recordedActiveAtOf,
|
|
97
|
+
q as resolveBudgetBarColor,
|
|
98
|
+
v as resolveBudgetDetailsLayout,
|
|
99
|
+
b as resolveBudgetFacts,
|
|
100
|
+
B as tierColor
|
|
94
101
|
};
|
|
95
102
|
|
|
96
103
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/layout.ts"],"sourcesContent":["import { differenceInCalendarDays } from 'date-fns/differenceInCalendarDays'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\n\nimport type { Beat, GlobalCopy, Transaction } from '../../../core'\nimport { BEAT_ACTIVE_AT_KEY, type InsightsV2Store } from '../../../core/stores/InsightsV2Store'\nimport type { TransactionFilter } from '../../../core/stores/TransactionStore'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\nimport { resolveVariantConfig } from '../../blocks/resolveVariantConfig'\nimport { asNonEmptyText, asNumber } from '../../blocks/slotReaders'\n\nexport type BudgetTier = 'LOW' | 'MEDIUM' | 'HIGH' | 'OFF_TRACK'\n\nexport const BUDGET_TIER_COLORS: Record<BudgetTier, string> = {\n LOW: 'success.main',\n MEDIUM: 'warning.main',\n HIGH: 'warning.main',\n OFF_TRACK: 'error.main',\n}\n\nexport const DEFAULT_TIER_COLOR = 'success.main'\n\nexport const calculateBudgetPercent = (total: number, limit: number) =>\n Math.ceil((limit ? total / limit : 0) * 100)\n\nexport const calculateBudgetTier = (percent: number): BudgetTier | undefined => {\n if (percent > 100) return 'OFF_TRACK'\n if (percent >= 75) return 'HIGH'\n if (percent >= 50) return 'MEDIUM'\n if (percent >= 25) return 'LOW'\n\n return undefined\n}\n\nexport const tierColor = (tier: BudgetTier | undefined) =>\n tier ? BUDGET_TIER_COLORS[tier] : DEFAULT_TIER_COLOR\n\nexport interface BudgetFacts {\n categoryGuid?: string\n merchantGuid?: string\n spent?: number\n budgeted?: number\n}\n\nexport const resolveBudgetFacts = (beat: Beat): BudgetFacts => {\n const payload = beat.insights_payload\n const data = (payload?.instance_slot?.data ?? payload?.instance_slot_data ?? {}) as Record<\n string,\n unknown\n >\n\n return {\n categoryGuid:\n asNonEmptyText(data.category_guid) ??\n payload?.primary_category_guid ??\n beat.primary_category_guid ??\n undefined,\n merchantGuid:\n asNonEmptyText(data.merchant_guid) ??\n payload?.primary_merchant_guid ??\n beat.primary_merchant_guid ??\n undefined,\n spent: asNumber(data.spent_amount),\n budgeted: asNumber(data.budgeted_amount),\n }\n}\n\ntype BudgetSubject = (beat: Beat, copy: GlobalCopy) => string | undefined\n\nconst categoryName: BudgetSubject = (beat, copy) => {\n const { categoryGuid } = resolveBudgetFacts(beat)\n const name = categoryGuid ? copy.categories?.default_categories?.[categoryGuid] : undefined\n\n return name?.replace(/&/g, '&')\n}\n\n/** The CTA variants `budget_details_block` serves (ditto names one on each beat's CTA). */\nconst BUDGET_DETAILS_VARIANTS = {\n CATEGORY_SPEND: 'category_spend',\n CATEGORY_BUDGET: 'category_budget',\n MERCHANT_BUDGET: 'merchant_budget',\n} as const\n\ntype ActiveAt = Beat['active_at'] | number | null | undefined\n\n/** A beat's `active_at` (epoch seconds or ISO) as a date undefined when absent or invalid. */\nexport const activeAtDate = (raw: ActiveAt): Date | undefined => {\n if (raw == null || raw === '') return undefined\n const at = new Date(typeof raw === 'number' ? raw * 1000 : raw)\n\n return Number.isNaN(at.getTime()) ? undefined : at\n}\n\n/** The beat's own `active_at`: on the beat, else on its envelope. */\nexport const beatActiveAt = (beat: Beat): ActiveAt =>\n beat.active_at ?? beat.insights_payload?.active_at\n\n/** The `active_at` the card recorded on render a sampled beat is re-read without it after a CTA. */\nexport const recordedActiveAtOf = (\n store: Pick<InsightsV2Store, 'beatContext'>,\n beat: Beat,\n): ActiveAt => store.beatContext[beat.guid]?.[BEAT_ACTIVE_AT_KEY] as ActiveAt\n\n/** The budget month's anchor: the recorded `active_at`, else the beat's, else now. */\nexport const budgetMonthOf = (beat: Beat, recordedActiveAt?: ActiveAt, now = new Date()) =>\n activeAtDate(recordedActiveAt) ?? activeAtDate(beatActiveAt(beat)) ?? now\n\nexport const daysLeftInBudgetMonth = (\n beat: Beat,\n now = new Date(),\n recordedActiveAt?: ActiveAt,\n) => {\n const activeAt = budgetMonthOf(beat, recordedActiveAt, now)\n if (endOfMonth(activeAt) < startOfMonth(now)) return undefined\n\n return differenceInCalendarDays(endOfMonth(now), now) + 1\n}\n\n/** The month a budget drawer shows (see budgetMonthOf). */\nexport const budgetMonthRange = (beat: Beat, recordedActiveAt?: ActiveAt) => {\n const month = budgetMonthOf(beat, recordedActiveAt)\n\n return { start: startOfMonth(month), end: endOfMonth(month) }\n}\n\nconst inCategory = (categoryGuid: string) => (transaction: Transaction) =>\n transaction.category_guid === categoryGuid || transaction.top_level_category_guid === categoryGuid\n\nconst atMerchant = (merchantGuid: string) => (transaction: Transaction) =>\n transaction.merchant_guid === merchantGuid\n\n/** The budget month and category (own or top-level) or merchant none without either, so no rows. */\nexport const budgetTransactionFilter = (\n facts: BudgetFacts,\n dateRange: { start: Date; end: Date },\n): TransactionFilter | undefined => {\n const custom = facts.categoryGuid\n ? inCategory(facts.categoryGuid)\n : facts.merchantGuid\n ? atMerchant(facts.merchantGuid)\n : undefined\n\n return custom && { custom, dateRange }\n}\n\nexport interface BudgetDetailsLayout {\n /** The \"N days until the end of the month\" / previous-month notice under the summary. */\n showPeriodLine: boolean\n /** The subject of the drawer's \"{subject} Budget\" title the card's subtitle never names it. */\n subject: BudgetSubject\n}\n\n// Figma's Budget Details for these three insights has no period line any other caller keeps it.\n// merchant_budget will name the merchant once Merchant Budget moves to Insights 2.0.\nconst LAYOUT: Record<string, BudgetDetailsLayout> = {\n default: { showPeriodLine: true, subject: categoryName },\n [BUDGET_DETAILS_VARIANTS.CATEGORY_SPEND]: {\n showPeriodLine: false,\n subject: categoryName,\n },\n [BUDGET_DETAILS_VARIANTS.CATEGORY_BUDGET]: {\n showPeriodLine: false,\n subject: categoryName,\n },\n [BUDGET_DETAILS_VARIANTS.MERCHANT_BUDGET]: {\n showPeriodLine: false,\n subject: categoryName,\n },\n}\n\nexport const resolveBudgetDetailsLayout = (variant: string | null | undefined) =>\n resolveVariantConfig(LAYOUT, variant, 'default', 'BudgetDetailsBlock')\n\n/** \"{subject} Budget\" when the variant names a subject, else the card's title. */\nexport const getBudgetDetailsDrawerTitle = (\n variant: string | null | undefined,\n copy: GlobalCopy,\n beat?: Beat,\n): string => {\n const subject = beat && resolveBudgetDetailsLayout(variant).subject(beat, copy)\n if (subject && copy.budgets?.details_type_title) {\n return buildDynamicCopy(copy.budgets.details_type_title, subject) as string\n }\n\n return beat?.insights_payload?.title || copy.budgets?.details_title || ''\n}\n\n/** A budget amount the dialogs accept: a finite number above zero. */\nexport const isPositiveAmount = (value: string): boolean => {\n const amount = Number(value)\n return value.trim() !== '' && Number.isFinite(amount) && amount > 0\n}\n"],"mappings":";;;;;;;AAaA,IAAa,IAAiD;AAAA,EAC5D,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,WAAW;AACb,GAEa,IAAqB,gBAErB,IAAA,CAA0B,GAAe,MACpD,KAAK,MAAM,IAAQ,IAAQ,IAAQ,KAAK,GAAG,GAEhC,IAAA,CAAuB,MAA4C;AAC9E,MAAI,IAAU,IAAK,QAAO;AAC1B,MAAI,KAAW,GAAI,QAAO;AAC1B,MAAI,KAAW,GAAI,QAAO;AAC1B,MAAI,KAAW,GAAI,QAAO;AAG5B,GAEa,IAAA,CAAa,MACxB,IAAO,EAAmB,CAAA,IAAQ,GASvB,IAAA,CAAsB,MAA4B;AAC7D,QAAM,IAAU,EAAK,kBACf,IAAQ,GAAS,eAAe,QAAQ,GAAS,sBAAsB,CAAC;AAK9E,SAAO;AAAA,IACL,cACE,EAAe,EAAK,aAAa,KACjC,GAAS,yBACT,EAAK,yBACL;AAAA,IACF,cACE,EAAe,EAAK,aAAa,KACjC,GAAS,yBACT,EAAK,yBACL;AAA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C,EAAY,kBAAkB,GAGnB,IAAA,CACX,GACA,MACkC;AAClC,QAAM,IAAS,EAAM,eACjB,EAAW,EAAM,YAAY,IAC7B,EAAM,eACJ,EAAW,EAAM,YAAY,IAC7B;AAEN,SAAO,KAAU;AAAA,IAAE,QAAA;AAAA,IAAQ,WAAA;AAAA,EAAU;AACvC,GAWM,IAA8C;AAAA,EAClD,SAAS;AAAA,IAAE,gBAAgB;AAAA,IAAM,SAAS;AAAA,EAAa;AAAA,EACtD,CAAA,EAAwB,cAAA,GAAiB;AAAA,IACxC,gBAAgB;AAAA,IAChB,SAAS;AAAA,EACX;AAAA,EACC,CAAA,EAAwB,eAAA,GAAkB;AAAA,IACzC,gBAAgB;AAAA,IAChB,SAAS;AAAA,EACX;AAAA,EACC,CAAA,EAAwB,eAAA,GAAkB;AAAA,IACzC,gBAAgB;AAAA,IAChB,SAAS;AAAA,EACX;AACF,GAEa,IAAA,CAA8B,MACzC,EAAqB,GAAQ,GAAS,WAAW,oBAAoB,GAG1D,IAAA,CACX,GACA,GACA,MACW;AACX,QAAM,IAAU,KAAQ,EAA2B,CAAO,EAAE,QAAQ,GAAM,CAAI;AAC9E,SAAI,KAAW,EAAK,SAAS,qBACpB,EAAiB,EAAK,QAAQ,oBAAoB,CAAO,IAG3D,GAAM,kBAAkB,SAAS,EAAK,SAAS,iBAAiB;AACzE,GAGa,IAAA,CAAoB,MAA2B;AAC1D,QAAM,IAAS,OAAO,CAAK;AAC3B,SAAO,EAAM,KAAK,MAAM,MAAM,OAAO,SAAS,CAAM,KAAK,IAAS;AACpE"}
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/BudgetDetailsBlock/layout.ts"],"sourcesContent":["import { differenceInCalendarDays } from 'date-fns/differenceInCalendarDays'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\n\nimport type { Beat, GlobalCopy, Transaction } from '../../../core'\nimport { BEAT_ACTIVE_AT_KEY, type InsightsV2Store } from '../../../core/stores/InsightsV2Store'\nimport type { TransactionFilter } from '../../../core/stores/TransactionStore'\nimport { buildDynamicCopy } from '../../../core/utils/Localization'\nimport { BUDGET_BLOCK_LAYOUT } from '../../blocks/ComponentBlocks/BudgetBlock/layout'\nimport { resolveVariantConfig } from '../../blocks/resolveVariantConfig'\nimport { asNonEmptyText, asNumber } from '../../blocks/slotReaders'\n\nexport type BudgetTier = 'LOW' | 'MEDIUM' | 'HIGH' | 'OFF_TRACK'\n\nexport const BUDGET_TIER_COLORS: Record<BudgetTier, string> = {\n LOW: 'success.main',\n MEDIUM: 'warning.main',\n HIGH: 'warning.main',\n OFF_TRACK: 'error.main',\n}\n\nexport const DEFAULT_TIER_COLOR = 'success.main'\n\nexport const calculateBudgetPercent = (total: number, limit: number) =>\n Math.ceil((limit ? total / limit : 0) * 100)\n\nexport const calculateBudgetTier = (percent: number): BudgetTier | undefined => {\n if (percent > 100) return 'OFF_TRACK'\n if (percent >= 75) return 'HIGH'\n if (percent >= 50) return 'MEDIUM'\n if (percent >= 25) return 'LOW'\n\n return undefined\n}\n\nexport const tierColor = (tier: BudgetTier | undefined) =>\n tier ? BUDGET_TIER_COLORS[tier] : DEFAULT_TIER_COLOR\n\n// Budget V2 card states, as tupac's category_budget_v2 factory (ON_TRACK_MAX_PERCENT, NEAR_MAX_PERCENT) sets them.\nconst V2_ON_TRACK_MAX_PERCENT = 80\nconst V2_NEAR_MAX_PERCENT = 100\n\nconst v2StateColor = (percent: number): string =>\n BUDGET_BLOCK_LAYOUT[\n percent <= V2_ON_TRACK_MAX_PERCENT\n ? 'status_on_track'\n : percent <= V2_NEAR_MAX_PERCENT\n ? 'status_near'\n : 'status_off_track'\n ].barColor\n\nexport interface BudgetFacts {\n categoryGuid?: string\n merchantGuid?: string\n spent?: number\n budgeted?: number\n}\n\nexport const resolveBudgetFacts = (beat: Beat): BudgetFacts => {\n const payload = beat.insights_payload\n const data = (payload?.instance_slot?.data ?? payload?.instance_slot_data ?? {}) as Record<\n string,\n unknown\n >\n\n return {\n categoryGuid:\n asNonEmptyText(data.category_guid) ??\n payload?.primary_category_guid ??\n beat.primary_category_guid ??\n undefined,\n merchantGuid:\n asNonEmptyText(data.merchant_guid) ??\n payload?.primary_merchant_guid ??\n beat.primary_merchant_guid ??\n undefined,\n spent: asNumber(data.spent_amount),\n budgeted: asNumber(data.budgeted_amount),\n }\n}\n\ntype BudgetSubject = (beat: Beat, copy: GlobalCopy) => string | undefined\n\nconst decodeAmp = (name?: string) => name?.replace(/&/g, '&')\n\nconst categoryName: BudgetSubject = (beat, copy) => {\n const { categoryGuid } = resolveBudgetFacts(beat)\n\n return decodeAmp(categoryGuid ? copy.categories?.default_categories?.[categoryGuid] : undefined)\n}\n\n/**\n * The merchant a merchant budget names: tupac's stored name (the card's title names it too), else the loaded budget's.\n * The drawer's title and body both read it, so the header and the Edit / Delete dialogs agree.\n */\nexport const budgetMerchantName = (beat: Beat, storedBudgetName?: string): string | undefined =>\n decodeAmp(asNonEmptyText(beat.payload?.merchant_name) ?? asNonEmptyText(storedBudgetName))\n\n// The stored name only: tupac sets it on every Merchant Budget beat (BudgetSubject has no store).\nconst merchantName: BudgetSubject = (beat) => budgetMerchantName(beat)\n\n/** The CTA variants `budget_details_block` serves (ditto names one on each beat's CTA). */\nconst BUDGET_DETAILS_VARIANTS = {\n CATEGORY_SPEND: 'category_spend',\n CATEGORY_BUDGET: 'category_budget',\n MERCHANT_BUDGET: 'merchant_budget',\n} as const\n\ntype ActiveAt = Beat['active_at'] | number | null | undefined\n\n/** A beat's `active_at` (epoch seconds or ISO) as a date undefined when absent or invalid. */\nexport const activeAtDate = (raw: ActiveAt): Date | undefined => {\n if (raw == null || raw === '') return undefined\n const at = new Date(typeof raw === 'number' ? raw * 1000 : raw)\n\n return Number.isNaN(at.getTime()) ? undefined : at\n}\n\n/** The beat's own `active_at`: on the beat, else on its envelope. */\nexport const beatActiveAt = (beat: Beat): ActiveAt =>\n beat.active_at ?? beat.insights_payload?.active_at\n\n/** The `active_at` the card recorded on render a sampled beat is re-read without it after a CTA. */\nexport const recordedActiveAtOf = (\n store: Pick<InsightsV2Store, 'beatContext'>,\n beat: Beat,\n): ActiveAt => store.beatContext[beat.guid]?.[BEAT_ACTIVE_AT_KEY] as ActiveAt\n\n/** The budget month's anchor: the recorded `active_at`, else the beat's, else now. */\nexport const budgetMonthOf = (beat: Beat, recordedActiveAt?: ActiveAt, now = new Date()) =>\n activeAtDate(recordedActiveAt) ?? activeAtDate(beatActiveAt(beat)) ?? now\n\nexport const daysLeftInBudgetMonth = (\n beat: Beat,\n now = new Date(),\n recordedActiveAt?: ActiveAt,\n) => {\n const activeAt = budgetMonthOf(beat, recordedActiveAt, now)\n if (endOfMonth(activeAt) < startOfMonth(now)) return undefined\n\n return differenceInCalendarDays(endOfMonth(now), now) + 1\n}\n\n/** The month a budget drawer shows (see budgetMonthOf). */\nexport const budgetMonthRange = (beat: Beat, recordedActiveAt?: ActiveAt) => {\n const month = budgetMonthOf(beat, recordedActiveAt)\n\n return { start: startOfMonth(month), end: endOfMonth(month) }\n}\n\nconst inCategory = (categoryGuid: string) => (transaction: Transaction) =>\n transaction.category_guid === categoryGuid || transaction.top_level_category_guid === categoryGuid\n\nconst atMerchant = (merchantGuid: string) => (transaction: Transaction) =>\n transaction.merchant_guid === merchantGuid\n\n/** The budget month and category (own or top-level) or merchant none without either, so no rows. */\nexport const budgetTransactionFilter = (\n facts: BudgetFacts,\n dateRange: { start: Date; end: Date },\n): TransactionFilter | undefined => {\n const custom = facts.categoryGuid\n ? inCategory(facts.categoryGuid)\n : facts.merchantGuid\n ? atMerchant(facts.merchantGuid)\n : undefined\n\n return custom && { custom, dateRange }\n}\n\nexport interface BudgetDetailsLayout {\n /** Draws the bar and \"/ $budgeted\" at $0.00 when no budget is loaded, without a percent or amount left. */\n barWithoutBudget: boolean\n /** The \"N days until the end of the month\" / previous-month notice under the summary. */\n showPeriodLine: boolean\n /** The subject of the drawer's \"{subject} Budget\" title the card's subtitle never names it. */\n subject: BudgetSubject\n /** Colours the bar by the Budget V2 card states rather than the legacy tiers. */\n v2BarColor: boolean\n}\n\n// Figma's Budget Details for these three insights has no period line any other caller keeps it.\nconst DEFAULT_LAYOUT: BudgetDetailsLayout = {\n barWithoutBudget: false,\n showPeriodLine: true,\n subject: categoryName,\n v2BarColor: false,\n}\n\nconst BUDGET_V2_LAYOUT: BudgetDetailsLayout = {\n ...DEFAULT_LAYOUT,\n barWithoutBudget: true,\n showPeriodLine: false,\n v2BarColor: true,\n}\n\nconst LAYOUT: Record<string, BudgetDetailsLayout> = {\n default: DEFAULT_LAYOUT,\n [BUDGET_DETAILS_VARIANTS.CATEGORY_SPEND]: { ...DEFAULT_LAYOUT, showPeriodLine: false },\n [BUDGET_DETAILS_VARIANTS.CATEGORY_BUDGET]: BUDGET_V2_LAYOUT,\n [BUDGET_DETAILS_VARIANTS.MERCHANT_BUDGET]: { ...BUDGET_V2_LAYOUT, subject: merchantName },\n}\n\nexport const resolveBudgetDetailsLayout = (variant: string | null | undefined) =>\n resolveVariantConfig(LAYOUT, variant, 'default', 'BudgetDetailsBlock')\n\n/** The bar colour for a percent: the Budget V2 card states for their variants, else the legacy tiers. */\nexport const resolveBudgetBarColor = (\n variant: string | null | undefined,\n percent: number,\n): string =>\n resolveBudgetDetailsLayout(variant).v2BarColor\n ? v2StateColor(percent)\n : tierColor(calculateBudgetTier(percent))\n\n/** \"{subject} Budget\" when the variant names a subject, else the card's title. */\nexport const getBudgetDetailsDrawerTitle = (\n variant: string | null | undefined,\n copy: GlobalCopy,\n beat?: Beat,\n): string => {\n const subject = beat && resolveBudgetDetailsLayout(variant).subject(beat, copy)\n if (subject && copy.budgets?.details_type_title) {\n return buildDynamicCopy(copy.budgets.details_type_title, subject) as string\n }\n\n return beat?.insights_payload?.title || copy.budgets?.details_title || ''\n}\n\n/** A budget amount the dialogs accept: a finite number above zero. */\nexport const isPositiveAmount = (value: string): boolean => {\n const amount = Number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A,EAClB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AACd,GAEM,IAAwC;AAAA,EAC5C,GAAG;AAAA,EACH,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,YAAY;AACd,GAEM,IAA8C;AAAA,EAClD,SAAS;AAAA,EACR,CAAA,EAAwB,cAAA,GAAiB;AAAA,IAAE,GAAG;AAAA,IAAgB,gBAAgB;AAAA,EAAM;AAAA,EACpF,CAAA,EAAwB,eAAA,GAAkB;AAAA,EAC1C,CAAA,EAAwB,eAAA,GAAkB;AAAA,IAAE,GAAG;AAAA,IAAkB,SAAS;AAAA,EAAa;AAC1F,GAEa,IAAA,CAA8B,MACzC,EAAqB,GAAQ,GAAS,WAAW,oBAAoB,GAG1D,IAAA,CACX,GACA,MAEA,EAA2B,CAAO,EAAE,aAChC,EAAa,CAAO,IACpB,EAAU,EAAoB,CAAO,CAAC,GAG/B,IAAA,CACX,GACA,GACA,MACW;AACX,QAAM,IAAU,KAAQ,EAA2B,CAAO,EAAE,QAAQ,GAAM,CAAI;AAC9E,SAAI,KAAW,EAAK,SAAS,qBACpB,EAAiB,EAAK,QAAQ,oBAAoB,CAAO,IAG3D,GAAM,kBAAkB,SAAS,EAAK,SAAS,iBAAiB;AACzE,GAGa,IAAA,CAAoB,MAA2B;AAC1D,QAAM,IAAS,OAAO,CAAK;AAC3B,SAAO,EAAM,KAAK,MAAM,MAAM,OAAO,SAAS,CAAM,KAAK,IAAS;AACpE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { buildDynamicCopy as W } from "../../../core/utils/Localization.es.js";
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
2
|
+
import { CURRENCY_FORMAT as T, formatCurrency as I } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
3
|
import { Select as S } from "../../../common/components/Select.es.js";
|
|
4
4
|
import { SMALL_CARD_SHADOW as H } from "../../components/shared/elevation.es.js";
|
|
5
|
-
import { CADENCES as V, DEADLINE_UNITS as
|
|
5
|
+
import { CADENCES as V, DEADLINE_UNITS as f, calculateContribution as q } from "./layout.es.js";
|
|
6
6
|
import g from "react";
|
|
7
7
|
import { observer as F } from "mobx-react-lite";
|
|
8
8
|
import o from "@mui/material/Stack";
|
|
@@ -30,7 +30,7 @@ var z = [
|
|
|
30
30
|
"add_timeline",
|
|
31
31
|
"weekly",
|
|
32
32
|
"monthly"
|
|
33
|
-
],
|
|
33
|
+
], fe = (n) => z.every((e) => typeof n[e] == "string"), [$, Q, Z] = V, x = [
|
|
34
34
|
{
|
|
35
35
|
cadence: $,
|
|
36
36
|
labelKey: "weekly",
|
|
@@ -46,17 +46,17 @@ var z = [
|
|
|
46
46
|
labelKey: "monthly",
|
|
47
47
|
suffixKey: "per_month"
|
|
48
48
|
}
|
|
49
|
-
], G =
|
|
49
|
+
], G = x.findIndex(({ labelKey: n }) => n === "monthly"), J = f.findIndex(({ labelKey: n }) => n === "months"), X = "6", u = (n, ...e) => W(n, ...e), ee = (n) => n.replace(/[^0-9]/g, ""), m = (n) => I(n, T.whole), R = (n) => I(n, T.cents), xe = F(function({ copy: e, facts: k }) {
|
|
50
50
|
const { balance: s, goal: d, monthContribution: _, monthlyContribution: D, remaining: M } = k, v = s <= 0, y = d > 0 ? Math.round(Math.min(100, Math.max(0, s / d * 100))) : 0, [h, N] = g.useState(v ? "" : G), [p, K] = g.useState(v ? "" : X), [b, L] = g.useState(J), [w, O] = g.useState({
|
|
51
51
|
amount: D,
|
|
52
52
|
suffix: e.per_month
|
|
53
53
|
}), A = h !== "" && p !== "" && Number(p) > 0, B = (a) => {
|
|
54
54
|
if (a.preventDefault(), h === "") return;
|
|
55
|
-
const { cadence: c, suffixKey: Y } =
|
|
55
|
+
const { cadence: c, suffixKey: Y } = x[h], E = q({
|
|
56
56
|
balance: s,
|
|
57
57
|
goal: d,
|
|
58
58
|
cadence: c,
|
|
59
|
-
deadline:
|
|
59
|
+
deadline: f[b],
|
|
60
60
|
deadlineQuantity: Number(p)
|
|
61
61
|
});
|
|
62
62
|
E !== void 0 && O({
|
|
@@ -198,8 +198,8 @@ var z = [
|
|
|
198
198
|
onSubmit: B,
|
|
199
199
|
sx: {
|
|
200
200
|
bgcolor: "background.paper",
|
|
201
|
-
borderColor: "divider",
|
|
202
201
|
borderTop: "1px solid",
|
|
202
|
+
borderTopColor: "divider",
|
|
203
203
|
gap: 32,
|
|
204
204
|
p: 24
|
|
205
205
|
},
|
|
@@ -221,16 +221,16 @@ var z = [
|
|
|
221
221
|
children: /* @__PURE__ */ r(i, {
|
|
222
222
|
color: "text.secondary",
|
|
223
223
|
sx: {
|
|
224
|
-
letterSpacing: "0.
|
|
224
|
+
letterSpacing: "0.33px",
|
|
225
225
|
textTransform: "uppercase"
|
|
226
226
|
},
|
|
227
227
|
variant: "caption",
|
|
228
228
|
children: u(e.next_savings_goal, /* @__PURE__ */ r(i, {
|
|
229
|
-
bold: !0,
|
|
230
229
|
component: "span",
|
|
231
230
|
sx: {
|
|
232
231
|
color: "text.primary",
|
|
233
|
-
fontSize: "inherit"
|
|
232
|
+
fontSize: "inherit",
|
|
233
|
+
fontWeight: "fontWeightBold"
|
|
234
234
|
},
|
|
235
235
|
children: m(d)
|
|
236
236
|
}, "goal"))
|
|
@@ -239,8 +239,8 @@ var z = [
|
|
|
239
239
|
sx: {
|
|
240
240
|
alignItems: "center",
|
|
241
241
|
bgcolor: "background.default",
|
|
242
|
-
borderColor: "divider",
|
|
243
242
|
borderTop: "1px solid",
|
|
243
|
+
borderTopColor: "divider",
|
|
244
244
|
p: 12
|
|
245
245
|
},
|
|
246
246
|
children: [/* @__PURE__ */ t(o, {
|
|
@@ -279,7 +279,7 @@ var z = [
|
|
|
279
279
|
/* @__PURE__ */ r(S, {
|
|
280
280
|
label: e.how_often_will_you_contribute,
|
|
281
281
|
onChange: N,
|
|
282
|
-
options:
|
|
282
|
+
options: x.map(({ labelKey: a }, c) => ({
|
|
283
283
|
id: c,
|
|
284
284
|
label: e[a]
|
|
285
285
|
})),
|
|
@@ -288,7 +288,7 @@ var z = [
|
|
|
288
288
|
inputLabel: { shrink: !0 },
|
|
289
289
|
select: {
|
|
290
290
|
displayEmpty: !0,
|
|
291
|
-
renderValue: (a) => a === "" ? e.select_frequency : e[
|
|
291
|
+
renderValue: (a) => a === "" ? e.select_frequency : e[x[a].labelKey]
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
294
|
value: h
|
|
@@ -317,8 +317,8 @@ var z = [
|
|
|
317
317
|
}), /* @__PURE__ */ r(S, {
|
|
318
318
|
label: "",
|
|
319
319
|
onChange: L,
|
|
320
|
-
slotProps: { select: { SelectDisplayProps: { "aria-label": e[
|
|
321
|
-
options:
|
|
320
|
+
slotProps: { select: { SelectDisplayProps: { "aria-label": e[f[b].labelKey] } } },
|
|
321
|
+
options: f.map(({ labelKey: a }, c) => ({
|
|
322
322
|
id: c,
|
|
323
323
|
label: e[a]
|
|
324
324
|
})),
|
|
@@ -345,8 +345,8 @@ var z = [
|
|
|
345
345
|
});
|
|
346
346
|
});
|
|
347
347
|
export {
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
xe as EmergencySavingsV2,
|
|
349
|
+
fe as hasV2Copy
|
|
350
350
|
};
|
|
351
351
|
|
|
352
352
|
//# sourceMappingURL=EmergencySavingsV2.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmergencySavingsV2.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.tsx"],"sourcesContent":["import React, { type ReactNode } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Select } from '../../../common'\nimport { buildDynamicCopy } from '../../../core'\nimport type { EmergencySavingsCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { SMALL_CARD_SHADOW } from '../../components/shared/elevation'\n\nimport { CADENCES, calculateContribution, DEADLINE_UNITS } from './layout'\n\nconst V2_COPY_KEYS = [\n 'your_progress',\n 'more_to_go',\n 'saved_amount',\n 'goal_amount',\n 'contributed_this_month',\n 'increase_your_transfer',\n 'next_savings_goal',\n 'per_month',\n 'per_week',\n 'per_two_weeks',\n 'use_the_calculator',\n 'how_often_will_you_contribute',\n 'select_frequency',\n 'add_timeline',\n 'weekly',\n 'monthly',\n] as const\n\n/** The drawer's copy with every V2 key present. */\nexport type EmergencySavingsV2Copy = EmergencySavingsCopy &\n Required<Pick<EmergencySavingsCopy, (typeof V2_COPY_KEYS)[number]>>\n\n/** True once mrs_content ships the V2 drawer's words; otherwise the legacy drawer opens. */\nexport const hasV2Copy = (copy: EmergencySavingsCopy): copy is EmergencySavingsV2Copy =>\n V2_COPY_KEYS.every((key) => typeof copy[key] === 'string')\n\n/** The figures the V2 card's CTA carries (ditto monthly_emergency_savings_reminder_v2.yml). */\nexport interface EmergencySavingsFacts {\n balance: number\n goal: number\n remaining: number\n monthlyContribution: number\n monthContribution: number\n}\n\nconst [WEEKLY, EVERY_OTHER_WEEK, MONTHLY_CADENCE] = CADENCES\n\n// Figma 1152:27224: the frequency select (weekly / every other week / monthly).\nconst FREQUENCIES = [\n { cadence: WEEKLY, labelKey: 'weekly', suffixKey: 'per_week' },\n { cadence: EVERY_OTHER_WEEK, labelKey: 'every_other_week', suffixKey: 'per_two_weeks' },\n { cadence: MONTHLY_CADENCE, labelKey: 'monthly', suffixKey: 'per_month' },\n] as const\nconst MONTHLY = FREQUENCIES.findIndex(({ labelKey }) => labelKey === 'monthly')\nconst MONTHS = DEADLINE_UNITS.findIndex(({ labelKey }) => labelKey === 'months')\n// The card's monthly_contribution spreads what's left over six months, so the form starts there.\nconst DEFAULT_TIMELINE_MONTHS = '6'\n\n/** Rich copy (`_1{amount}` with an element) as a node. */\nconst rich = (copy: string, ...args: Parameters<typeof buildDynamicCopy>[1][]) =>\n buildDynamicCopy(copy, ...args) as ReactNode\n\nconst toDigits = (value: string) => value.replace(/[^0-9]/g, '')\nconst whole = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.whole)\nconst cents = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.cents)\n\ninterface Props {\n copy: EmergencySavingsV2Copy\n facts: EmergencySavingsFacts\n}\n\n/** The Build Emergency Savings drawer (Figma 1152:27224): progress, the month banner, the estimate and calculator. */\nexport const EmergencySavingsV2 = observer(function EmergencySavingsV2({ copy, facts }: Props) {\n const { balance, goal, monthContribution, monthlyContribution, remaining } = facts\n const isZeroState = balance <= 0\n const percent = goal > 0 ? Math.round(Math.min(100, Math.max(0, (balance / goal) * 100))) : 0\n\n // The zero state opens empty (Select frequency / Add timeline).\n const [frequency, setFrequency] = React.useState<number | ''>(isZeroState ? '' : MONTHLY)\n const [timeline, setTimeline] = React.useState(isZeroState ? '' : DEFAULT_TIMELINE_MONTHS)\n const [unit, setUnit] = React.useState(MONTHS)\n const [estimate, setEstimate] = React.useState({\n amount: monthlyContribution,\n suffix: copy.per_month,\n })\n\n const canCalculate = frequency !== '' && timeline !== '' && Number(timeline) > 0\n\n const handleSubmit = (event: React.FormEvent) => {\n event.preventDefault()\n if (frequency === '') return\n\n const { cadence, suffixKey } = FREQUENCIES[frequency]\n const amount = calculateContribution({\n balance,\n goal,\n cadence,\n deadline: DEADLINE_UNITS[unit],\n deadlineQuantity: Number(timeline),\n })\n if (amount !== undefined) setEstimate({ amount, suffix: copy[suffixKey] })\n }\n\n return (\n <Stack sx={{ bgcolor: 'background.default' }}>\n <Box sx={{ p: 24 }}>\n <Stack\n aria-label={copy.your_progress}\n role=\"region\"\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: SMALL_CARD_SHADOW,\n gap: 16,\n p: 16,\n }}\n >\n <Stack sx={{ gap: 12 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n <Box\n aria-hidden={true}\n sx={(theme) => ({\n alignItems: 'center',\n bgcolor: alpha(theme.palette.primary.main, 0.15),\n borderRadius: '4px',\n display: 'flex',\n flexShrink: 0,\n height: 40,\n justifyContent: 'center',\n width: 40,\n })}\n >\n <Icon color=\"primary\" name=\"savings\" size={20} />\n </Box>\n <Stack>\n <Text variant=\"caption\">{copy.your_progress}</Text>\n <Text component=\"p\" variant=\"body2\">\n {rich(\n copy.more_to_go,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontWeight: 'fontWeightBold' }}\n variant=\"h2\"\n >\n {whole(remaining)}\n </Text>,\n )}\n </Text>\n </Stack>\n </Stack>\n <Stack sx={{ gap: 4 }}>\n <Box\n aria-label={buildDynamicCopy(copy.saved_amount, whole(balance)) as string}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={percent}\n role=\"progressbar\"\n sx={{ bgcolor: 'divider', borderRadius: '6px', height: 8, overflow: 'hidden' }}\n >\n <Box\n sx={{\n bgcolor: 'primary.main',\n borderRadius: '6px',\n height: '100%',\n width: `${percent}%`,\n }}\n />\n </Box>\n <Stack sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.saved_amount, whole(balance))}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.goal_amount, whole(goal))}\n </Text>\n </Stack>\n </Stack>\n </Stack>\n {monthContribution > 0 && (\n <Stack\n role=\"note\"\n sx={{\n alignItems: 'flex-start',\n bgcolor: 'primary.lighter',\n borderRadius: '8px',\n flexDirection: 'row',\n gap: 8,\n p: 12,\n }}\n >\n <Box sx={{ pt: 2, px: 4 }}>\n <Icon aria-hidden={true} color=\"primary\" name=\"celebration\" size={20} />\n </Box>\n <Text\n color=\"primary.dark\"\n component=\"p\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {rich(\n copy.contributed_this_month,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontSize: 'inherit', fontWeight: 'fontWeightBold' }}\n >\n {cents(monthContribution)}\n </Text>,\n )}{' '}\n {copy.increase_your_transfer}\n </Text>\n </Stack>\n )}\n </Stack>\n </Box>\n <Stack\n component=\"form\"\n onSubmit={handleSubmit}\n sx={{\n bgcolor: 'background.paper',\n borderColor: 'divider',\n borderTop: '1px solid',\n gap: 32,\n p: 24,\n }}\n >\n <Stack sx={{ gap: 8 }}>\n <Stack\n aria-label={copy.estimated_contribution}\n role=\"group\"\n sx={{ border: '1px solid', borderColor: 'divider', borderRadius: '4px' }}\n >\n <Box sx={{ px: 8, py: 4 }}>\n <Text\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.4px', textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {rich(\n copy.next_savings_goal,\n <Text\n bold={true}\n component=\"span\"\n key=\"goal\"\n sx={{ color: 'text.primary', fontSize: 'inherit' }}\n >\n {whole(goal)}\n </Text>,\n )}\n </Text>\n </Box>\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.default',\n borderColor: 'divider',\n borderTop: '1px solid',\n p: 12,\n }}\n >\n <Stack sx={{ alignItems: 'flex-end', flexDirection: 'row', gap: 4 }}>\n <Text component=\"p\" sx={{ fontWeight: 'fontWeightBold' }} variant=\"h2\">\n {cents(estimate.amount)}\n </Text>\n <Text sx={{ fontWeight: 'fontWeightRegular' }} variant=\"subtitle2\">\n {estimate.suffix}\n </Text>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {copy.estimated_contribution}\n </Text>\n </Stack>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ textAlign: 'center' }}\n truncate={false}\n variant=\"caption\"\n >\n {copy.use_the_calculator}\n </Text>\n </Stack>\n <Stack sx={{ gap: 16 }}>\n <Select\n label={copy.how_often_will_you_contribute}\n onChange={setFrequency}\n options={FREQUENCIES.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n required={true}\n slotProps={{\n inputLabel: { shrink: true },\n select: {\n displayEmpty: true,\n renderValue: (v: unknown) =>\n v === '' ? copy.select_frequency : copy[FREQUENCIES[v as number].labelKey],\n },\n }}\n value={frequency}\n />\n <Stack aria-label={copy.meet_your_goal_within} role=\"group\" sx={{ flexDirection: 'row' }}>\n <TextField\n fullWidth={true}\n label={copy.meet_your_goal_within}\n onChange={(event) => setTimeline(toDigits(event.target.value))}\n placeholder={copy.add_timeline}\n slotProps={{\n htmlInput: { inputMode: 'numeric', pattern: '[0-9]*' },\n inputLabel: { shrink: true },\n }}\n sx={{\n '& .MuiOutlinedInput-root': { borderBottomRightRadius: 0, borderTopRightRadius: 0 },\n }}\n value={timeline}\n />\n <Select\n label=\"\"\n onChange={setUnit}\n slotProps={{\n select: {\n SelectDisplayProps: { 'aria-label': copy[DEADLINE_UNITS[unit].labelKey] },\n },\n }}\n options={DEADLINE_UNITS.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n sx={{\n minWidth: 120,\n '& .MuiOutlinedInput-root': { borderBottomLeftRadius: 0, borderTopLeftRadius: 0 },\n }}\n value={unit}\n />\n </Stack>\n <Button disabled={!canCalculate} fullWidth={true} type=\"submit\" variant=\"contained\">\n {copy.calculate}\n </Button>\n </Stack>\n </Stack>\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,IAAM,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOa,KAAA,CAAa,MACxB,EAAa,MAAA,CAAO,MAAQ,OAAO,EAAK,CAAA,KAAS,QAAQ,GAWrD,CAAC,GAAQ,GAAkB,CAAA,IAAmB,GAG9C,IAAc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M;AAAA,YAAvF,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,cACE,WAAW;AAAA,cACX,OAAO,EAAK;AAAA,cACZ,UAAA,CAAW,MAAU,EAAY,GAAS,EAAM,OAAO,KAAK,CAAC;AAAA,cAC7D,aAAa,EAAK;AAAA,cAClB,WAAW;AAAA,gBACT,WAAW;AAAA,kBAAE,WAAW;AAAA,kBAAW,SAAS;AAAA,gBAAS;AAAA,gBACrD,YAAY,EAAE,QAAQ,GAAK;AAAA,cAC7B;AAAA,cACA,IAAI,EACF,4BAA4B;AAAA,gBAAE,yBAAyB;AAAA,gBAAG,sBAAsB;AAAA,cAAE,EACpF;AAAA,cACA,OAAO;AAAA,YACR,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,cACE,OAAM;AAAA,cACN,UAAU;AAAA,cACV,WAAW,EACT,QAAQ,EACN,oBAAoB,EAAE,cAAc,EAAK,EAAe,CAAA,EAAM,QAAA,EAAU,EAC1E,EACF;AAAA,cACA,SAAS,EAAe,IAAA,CAAK,EAAE,UAAA,EAAA,GAAY,OAAQ;AAAA,gBAAE,IAAA;AAAA,gBAAI,OAAO,EAAK,CAAA;AAAA,cAAU,EAAE;AAAA,cACjF,IAAI;AAAA,gBACF,UAAU;AAAA,gBACV,4BAA4B;AAAA,kBAAE,wBAAwB;AAAA,kBAAG,qBAAqB;AAAA,gBAAE;AAAA,cAClF;AAAA,cACA,OAAO;AAAA,YACR,CAAA,CACI;AAAA;UACP,gBAAA,EAAC,GAAD;AAAA,YAAQ,UAAU,CAAC;AAAA,YAAc,WAAW;AAAA,YAAM,MAAK;AAAA,YAAS,SAAQ;AAAA,YACrE,UAAA,EAAK;AAAA,UACA,CAAA;AAAA,QACH;AAAA,MACF,CAAA,CAAA;AAAA,IACF,CAAA,CAAA;AAAA;AAEX,CAAC"}
|
|
1
|
+
{"version":3,"file":"EmergencySavingsV2.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.tsx"],"sourcesContent":["import React, { type ReactNode } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\nimport { alpha } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { Select } from '../../../common'\nimport { buildDynamicCopy } from '../../../core'\nimport type { EmergencySavingsCopy } from '../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { SMALL_CARD_SHADOW } from '../../components/shared/elevation'\n\nimport { CADENCES, calculateContribution, DEADLINE_UNITS } from './layout'\n\nconst V2_COPY_KEYS = [\n 'your_progress',\n 'more_to_go',\n 'saved_amount',\n 'goal_amount',\n 'contributed_this_month',\n 'increase_your_transfer',\n 'next_savings_goal',\n 'per_month',\n 'per_week',\n 'per_two_weeks',\n 'use_the_calculator',\n 'how_often_will_you_contribute',\n 'select_frequency',\n 'add_timeline',\n 'weekly',\n 'monthly',\n] as const\n\n/** The drawer's copy with every V2 key present. */\nexport type EmergencySavingsV2Copy = EmergencySavingsCopy &\n Required<Pick<EmergencySavingsCopy, (typeof V2_COPY_KEYS)[number]>>\n\n/** True once mrs_content ships the V2 drawer's words; otherwise the legacy drawer opens. */\nexport const hasV2Copy = (copy: EmergencySavingsCopy): copy is EmergencySavingsV2Copy =>\n V2_COPY_KEYS.every((key) => typeof copy[key] === 'string')\n\n/** The figures the V2 card's CTA carries (ditto monthly_emergency_savings_reminder_v2.yml). */\nexport interface EmergencySavingsFacts {\n balance: number\n goal: number\n remaining: number\n monthlyContribution: number\n monthContribution: number\n}\n\nconst [WEEKLY, EVERY_OTHER_WEEK, MONTHLY_CADENCE] = CADENCES\n\n// Figma 1152:27224: the frequency select (weekly / every other week / monthly).\nconst FREQUENCIES = [\n { cadence: WEEKLY, labelKey: 'weekly', suffixKey: 'per_week' },\n { cadence: EVERY_OTHER_WEEK, labelKey: 'every_other_week', suffixKey: 'per_two_weeks' },\n { cadence: MONTHLY_CADENCE, labelKey: 'monthly', suffixKey: 'per_month' },\n] as const\nconst MONTHLY = FREQUENCIES.findIndex(({ labelKey }) => labelKey === 'monthly')\nconst MONTHS = DEADLINE_UNITS.findIndex(({ labelKey }) => labelKey === 'months')\n// The card's monthly_contribution spreads what's left over six months, so the form starts there.\nconst DEFAULT_TIMELINE_MONTHS = '6'\n\n/** Rich copy (`_1{amount}` with an element) as a node. */\nconst rich = (copy: string, ...args: Parameters<typeof buildDynamicCopy>[1][]) =>\n buildDynamicCopy(copy, ...args) as ReactNode\n\nconst toDigits = (value: string) => value.replace(/[^0-9]/g, '')\nconst whole = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.whole)\nconst cents = (amount: number) => formatCurrency(amount, CURRENCY_FORMAT.cents)\n\ninterface Props {\n copy: EmergencySavingsV2Copy\n facts: EmergencySavingsFacts\n}\n\n/** The Build Emergency Savings drawer (Figma 1152:27224): progress, the month banner, the estimate and calculator. */\nexport const EmergencySavingsV2 = observer(function EmergencySavingsV2({ copy, facts }: Props) {\n const { balance, goal, monthContribution, monthlyContribution, remaining } = facts\n const isZeroState = balance <= 0\n const percent = goal > 0 ? Math.round(Math.min(100, Math.max(0, (balance / goal) * 100))) : 0\n\n // The zero state opens empty (Select frequency / Add timeline).\n const [frequency, setFrequency] = React.useState<number | ''>(isZeroState ? '' : MONTHLY)\n const [timeline, setTimeline] = React.useState(isZeroState ? '' : DEFAULT_TIMELINE_MONTHS)\n const [unit, setUnit] = React.useState(MONTHS)\n const [estimate, setEstimate] = React.useState({\n amount: monthlyContribution,\n suffix: copy.per_month,\n })\n\n const canCalculate = frequency !== '' && timeline !== '' && Number(timeline) > 0\n\n const handleSubmit = (event: React.FormEvent) => {\n event.preventDefault()\n if (frequency === '') return\n\n const { cadence, suffixKey } = FREQUENCIES[frequency]\n const amount = calculateContribution({\n balance,\n goal,\n cadence,\n deadline: DEADLINE_UNITS[unit],\n deadlineQuantity: Number(timeline),\n })\n if (amount !== undefined) setEstimate({ amount, suffix: copy[suffixKey] })\n }\n\n return (\n <Stack sx={{ bgcolor: 'background.default' }}>\n <Box sx={{ p: 24 }}>\n <Stack\n aria-label={copy.your_progress}\n role=\"region\"\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: SMALL_CARD_SHADOW,\n gap: 16,\n p: 16,\n }}\n >\n <Stack sx={{ gap: 12 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n <Box\n aria-hidden={true}\n sx={(theme) => ({\n alignItems: 'center',\n bgcolor: alpha(theme.palette.primary.main, 0.15),\n borderRadius: '4px',\n display: 'flex',\n flexShrink: 0,\n height: 40,\n justifyContent: 'center',\n width: 40,\n })}\n >\n <Icon color=\"primary\" name=\"savings\" size={20} />\n </Box>\n <Stack>\n <Text variant=\"caption\">{copy.your_progress}</Text>\n <Text component=\"p\" variant=\"body2\">\n {rich(\n copy.more_to_go,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontWeight: 'fontWeightBold' }}\n variant=\"h2\"\n >\n {whole(remaining)}\n </Text>,\n )}\n </Text>\n </Stack>\n </Stack>\n <Stack sx={{ gap: 4 }}>\n <Box\n aria-label={buildDynamicCopy(copy.saved_amount, whole(balance)) as string}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={percent}\n role=\"progressbar\"\n sx={{ bgcolor: 'divider', borderRadius: '6px', height: 8, overflow: 'hidden' }}\n >\n <Box\n sx={{\n bgcolor: 'primary.main',\n borderRadius: '6px',\n height: '100%',\n width: `${percent}%`,\n }}\n />\n </Box>\n <Stack sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.saved_amount, whole(balance))}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {rich(copy.goal_amount, whole(goal))}\n </Text>\n </Stack>\n </Stack>\n </Stack>\n {monthContribution > 0 && (\n <Stack\n role=\"note\"\n sx={{\n alignItems: 'flex-start',\n bgcolor: 'primary.lighter',\n borderRadius: '8px',\n flexDirection: 'row',\n gap: 8,\n p: 12,\n }}\n >\n <Box sx={{ pt: 2, px: 4 }}>\n <Icon aria-hidden={true} color=\"primary\" name=\"celebration\" size={20} />\n </Box>\n <Text\n color=\"primary.dark\"\n component=\"p\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {rich(\n copy.contributed_this_month,\n <Text\n component=\"span\"\n key=\"amount\"\n sx={{ fontSize: 'inherit', fontWeight: 'fontWeightBold' }}\n >\n {cents(monthContribution)}\n </Text>,\n )}{' '}\n {copy.increase_your_transfer}\n </Text>\n </Stack>\n )}\n </Stack>\n </Box>\n <Stack\n component=\"form\"\n onSubmit={handleSubmit}\n sx={{\n bgcolor: 'background.paper',\n borderTop: '1px solid',\n borderTopColor: 'divider',\n gap: 32,\n p: 24,\n }}\n >\n <Stack sx={{ gap: 8 }}>\n <Stack\n aria-label={copy.estimated_contribution}\n role=\"group\"\n sx={{ border: '1px solid', borderColor: 'divider', borderRadius: '4px' }}\n >\n <Box sx={{ px: 8, py: 4 }}>\n <Text\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.33px', textTransform: 'uppercase' }}\n variant=\"caption\"\n >\n {rich(\n copy.next_savings_goal,\n <Text\n component=\"span\"\n key=\"goal\"\n sx={{\n color: 'text.primary',\n fontSize: 'inherit',\n fontWeight: 'fontWeightBold',\n }}\n >\n {whole(goal)}\n </Text>,\n )}\n </Text>\n </Box>\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.default',\n borderTop: '1px solid',\n borderTopColor: 'divider',\n p: 12,\n }}\n >\n <Stack sx={{ alignItems: 'flex-end', flexDirection: 'row', gap: 4 }}>\n <Text component=\"p\" sx={{ fontWeight: 'fontWeightBold' }} variant=\"h2\">\n {cents(estimate.amount)}\n </Text>\n <Text sx={{ fontWeight: 'fontWeightRegular' }} variant=\"subtitle2\">\n {estimate.suffix}\n </Text>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n >\n {copy.estimated_contribution}\n </Text>\n </Stack>\n </Stack>\n <Text\n color=\"text.secondary\"\n sx={{ textAlign: 'center' }}\n truncate={false}\n variant=\"caption\"\n >\n {copy.use_the_calculator}\n </Text>\n </Stack>\n <Stack sx={{ gap: 16 }}>\n <Select\n label={copy.how_often_will_you_contribute}\n onChange={setFrequency}\n options={FREQUENCIES.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n required={true}\n slotProps={{\n inputLabel: { shrink: true },\n select: {\n displayEmpty: true,\n renderValue: (v: unknown) =>\n v === '' ? copy.select_frequency : copy[FREQUENCIES[v as number].labelKey],\n },\n }}\n value={frequency}\n />\n <Stack aria-label={copy.meet_your_goal_within} role=\"group\" sx={{ flexDirection: 'row' }}>\n <TextField\n fullWidth={true}\n label={copy.meet_your_goal_within}\n onChange={(event) => setTimeline(toDigits(event.target.value))}\n placeholder={copy.add_timeline}\n slotProps={{\n htmlInput: { inputMode: 'numeric', pattern: '[0-9]*' },\n inputLabel: { shrink: true },\n }}\n sx={{\n '& .MuiOutlinedInput-root': { borderBottomRightRadius: 0, borderTopRightRadius: 0 },\n }}\n value={timeline}\n />\n <Select\n label=\"\"\n onChange={setUnit}\n slotProps={{\n select: {\n SelectDisplayProps: { 'aria-label': copy[DEADLINE_UNITS[unit].labelKey] },\n },\n }}\n options={DEADLINE_UNITS.map(({ labelKey }, id) => ({ id, label: copy[labelKey] }))}\n sx={{\n minWidth: 120,\n '& .MuiOutlinedInput-root': { borderBottomLeftRadius: 0, borderTopLeftRadius: 0 },\n }}\n value={unit}\n />\n </Stack>\n <Button disabled={!canCalculate} fullWidth={true} type=\"submit\" variant=\"contained\">\n {copy.calculate}\n </Button>\n </Stack>\n </Stack>\n </Stack>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;AAoB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A;UACP,gBAAA,EAAC,GAAD;AAAA,YAAQ,UAAU,CAAC;AAAA,YAAc,WAAW;AAAA,YAAM,MAAK;AAAA,YAAS,SAAQ;AAAA,YACrE,UAAA,EAAK;AAAA,UACA,CAAA;AAAA,QACH;AAAA,MACF,CAAA,CAAA;AAAA,IACF,CAAA,CAAA;AAAA;AAEX,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Text as
|
|
1
|
+
import { Text as d } from "@mxenabled/mxui";
|
|
2
2
|
import { Icon as i } from "@mxenabled/mx-icons";
|
|
3
|
-
import { jsx as r, jsxs as
|
|
4
|
-
import { IconButton as o, Stack as
|
|
5
|
-
var
|
|
3
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
4
|
+
import { IconButton as o, Stack as c } from "@mui/material";
|
|
5
|
+
var h = ({ amount: a, onDecrement: n, onIncrement: t, copy: e }) => /* @__PURE__ */ m(c, {
|
|
6
6
|
sx: {
|
|
7
7
|
flexDirection: "row",
|
|
8
8
|
alignItems: "center",
|
|
9
|
-
|
|
10
|
-
borderColor: "divider",
|
|
9
|
+
boxShadow: (l) => `inset 0 0 0 1px ${l.palette.divider}`,
|
|
11
10
|
borderRadius: 1,
|
|
12
11
|
bgcolor: "background.paper",
|
|
13
12
|
flex: 1
|
|
@@ -15,7 +14,7 @@ var b = ({ amount: a, onDecrement: l, onIncrement: n, copy: e }) => /* @__PURE__
|
|
|
15
14
|
children: [
|
|
16
15
|
/* @__PURE__ */ r(o, {
|
|
17
16
|
"aria-label": e.decrement_aria_label,
|
|
18
|
-
onClick:
|
|
17
|
+
onClick: n,
|
|
19
18
|
sx: {
|
|
20
19
|
width: 44,
|
|
21
20
|
minHeight: 48
|
|
@@ -25,7 +24,7 @@ var b = ({ amount: a, onDecrement: l, onIncrement: n, copy: e }) => /* @__PURE__
|
|
|
25
24
|
sx: { color: "primary.main" }
|
|
26
25
|
})
|
|
27
26
|
}),
|
|
28
|
-
/* @__PURE__ */ r(
|
|
27
|
+
/* @__PURE__ */ r(d, {
|
|
29
28
|
sx: {
|
|
30
29
|
p: 12,
|
|
31
30
|
flex: 1,
|
|
@@ -39,7 +38,7 @@ var b = ({ amount: a, onDecrement: l, onIncrement: n, copy: e }) => /* @__PURE__
|
|
|
39
38
|
}),
|
|
40
39
|
/* @__PURE__ */ r(o, {
|
|
41
40
|
"aria-label": e.increment_aria_label,
|
|
42
|
-
onClick:
|
|
41
|
+
onClick: t,
|
|
43
42
|
sx: {
|
|
44
43
|
width: 44,
|
|
45
44
|
minHeight: 48
|
|
@@ -52,7 +51,7 @@ var b = ({ amount: a, onDecrement: l, onIncrement: n, copy: e }) => /* @__PURE__
|
|
|
52
51
|
]
|
|
53
52
|
});
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
h as BalanceStepper
|
|
56
55
|
};
|
|
57
56
|
|
|
58
57
|
//# sourceMappingURL=BalanceStepper.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BalanceStepper.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.tsx"],"sourcesContent":["import { IconButton, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\ninterface CopyContent {\n decrement_aria_label?: string\n increment_aria_label?: string\n}\n\ninterface BalanceStepperProps {\n amount: string\n onDecrement?: () => void\n onIncrement?: () => void\n copy: CopyContent\n}\n\nexport const BalanceStepper = ({ amount, onDecrement, onIncrement, copy }: BalanceStepperProps) => {\n return (\n <Stack\n sx={{\n flexDirection: 'row',\n alignItems: 'center',\n
|
|
1
|
+
{"version":3,"file":"BalanceStepper.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.tsx"],"sourcesContent":["import { IconButton, Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\ninterface CopyContent {\n decrement_aria_label?: string\n increment_aria_label?: string\n}\n\ninterface BalanceStepperProps {\n amount: string\n onDecrement?: () => void\n onIncrement?: () => void\n copy: CopyContent\n}\n\nexport const BalanceStepper = ({ amount, onDecrement, onIncrement, copy }: BalanceStepperProps) => {\n return (\n <Stack\n sx={{\n flexDirection: 'row',\n alignItems: 'center',\n // Drawn inside, so the 48px buttons make Figma's 48px stepper.\n boxShadow: (theme) => `inset 0 0 0 1px ${theme.palette.divider}`,\n borderRadius: 1,\n bgcolor: 'background.paper',\n flex: 1,\n }}\n >\n <IconButton\n aria-label={copy.decrement_aria_label}\n onClick={onDecrement}\n sx={{ width: 44, minHeight: 48 }}\n >\n <Icon name=\"remove\" sx={{ color: 'primary.main' }} />\n </IconButton>\n <Text\n sx={{\n p: 12,\n flex: 1,\n textAlign: 'center',\n borderLeft: '1px solid',\n borderRight: '1px solid',\n borderColor: 'divider',\n }}\n variant=\"h3\"\n >\n {amount}\n </Text>\n <IconButton\n aria-label={copy.increment_aria_label}\n onClick={onIncrement}\n sx={{ width: 44, minHeight: 48 }}\n >\n <Icon name=\"add\" sx={{ color: 'primary.main' }} />\n </IconButton>\n </Stack>\n )\n}\n"],"mappings":";;;;AAgBA,IAAa,IAAA,CAAkB,EAAE,QAAA,GAAQ,aAAA,GAAa,aAAA,GAAa,MAAA,EAAA,MAE/D,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,eAAe;AAAA,IACf,YAAY;AAAA,IAEZ,WAAA,CAAY,MAAU,mBAAmB,EAAM,QAAQ,OAAA;AAAA,IACvD,cAAc;AAAA,IACd,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EATF,UAAA;AAAA,IAWE,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAK;AAAA,MACjB,SAAS;AAAA,MACT,IAAI;AAAA,QAAE,OAAO;AAAA,QAAI,WAAW;AAAA,MAAG;AAAA,MAE/B,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAK;AAAA,QAAS,IAAI,EAAE,OAAO,eAAe;AAAA,MAAI,CAAA;AAAA,IAC1C,CAAA;AAAA,IACZ,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,GAAG;AAAA,QACH,MAAM;AAAA,QACN,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,MACA,SAAQ;AAAA,MAEP,UAAA;AAAA,IACG,CAAA;AAAA,IACN,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAK;AAAA,MACjB,SAAS;AAAA,MACT,IAAI;AAAA,QAAE,OAAO;AAAA,QAAI,WAAW;AAAA,MAAG;AAAA,MAE/B,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAK;AAAA,QAAM,IAAI,EAAE,OAAO,eAAe;AAAA,MAAI,CAAA;AAAA,IACvC,CAAA;AAAA,EACP"}
|
package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js
CHANGED
|
@@ -1,78 +1,77 @@
|
|
|
1
|
-
import { ThemedSVGImage as
|
|
2
|
-
import { ReactComponent as
|
|
1
|
+
import { ThemedSVGImage as p } from "../../components/chartblocks/ThemedSVGImage.es.js";
|
|
2
|
+
import { ReactComponent as x } from "../../components/shared/images/SaveEnoughToLiveOnBottom.es.js";
|
|
3
3
|
import a from "@mui/material/Stack";
|
|
4
|
-
import { H2 as
|
|
4
|
+
import { H2 as h, Text as n } from "@mxenabled/mxui";
|
|
5
5
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
7
|
-
var
|
|
6
|
+
import g from "@mui/material/Box";
|
|
7
|
+
var v = {
|
|
8
8
|
alignItems: "center",
|
|
9
9
|
flexDirection: "row",
|
|
10
10
|
height: 40,
|
|
11
11
|
justifyContent: "space-between",
|
|
12
12
|
px: 16,
|
|
13
13
|
py: 2
|
|
14
|
-
}, l = ({ label:
|
|
14
|
+
}, l = ({ label: t, value: o, withBorder: i = !1 }) => /* @__PURE__ */ r(a, {
|
|
15
15
|
sx: {
|
|
16
|
-
...
|
|
16
|
+
...v,
|
|
17
17
|
...i && {
|
|
18
18
|
borderBottom: "1px solid",
|
|
19
19
|
borderColor: "divider"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
children: [/* @__PURE__ */ e(
|
|
22
|
+
children: [/* @__PURE__ */ e(n, {
|
|
23
23
|
color: "text.secondary",
|
|
24
24
|
variant: "caption",
|
|
25
|
-
children:
|
|
26
|
-
}), /* @__PURE__ */ e(
|
|
25
|
+
children: t
|
|
26
|
+
}), /* @__PURE__ */ e(n, {
|
|
27
27
|
bold: !0,
|
|
28
28
|
variant: "body2",
|
|
29
|
-
children:
|
|
29
|
+
children: o
|
|
30
30
|
})]
|
|
31
|
-
}),
|
|
31
|
+
}), B = ({ content: t, leftLabel: o, leftValue: i, rightLabel: d, rightValue: s, sx: c }) => /* @__PURE__ */ r(a, {
|
|
32
32
|
sx: {
|
|
33
33
|
alignItems: "center",
|
|
34
34
|
gap: 12
|
|
35
35
|
},
|
|
36
|
-
children: [/* @__PURE__ */ r(
|
|
36
|
+
children: [/* @__PURE__ */ r(g, {
|
|
37
37
|
sx: {
|
|
38
38
|
display: "grid",
|
|
39
39
|
placeItems: "center"
|
|
40
40
|
},
|
|
41
|
-
children: [/* @__PURE__ */ e(
|
|
41
|
+
children: [/* @__PURE__ */ e(p, {
|
|
42
42
|
divProps: { style: {
|
|
43
43
|
height: "auto",
|
|
44
44
|
gridArea: "1 / 1",
|
|
45
45
|
lineHeight: 0
|
|
46
46
|
} },
|
|
47
|
-
image:
|
|
48
|
-
}), /* @__PURE__ */ e(
|
|
47
|
+
image: x
|
|
48
|
+
}), /* @__PURE__ */ e(h, {
|
|
49
49
|
sx: {
|
|
50
50
|
color: "neutral.contrastText",
|
|
51
51
|
gridArea: "1 / 1",
|
|
52
52
|
textAlign: "center"
|
|
53
53
|
},
|
|
54
|
-
children:
|
|
54
|
+
children: t
|
|
55
55
|
})]
|
|
56
56
|
}), /* @__PURE__ */ r(a, {
|
|
57
57
|
sx: {
|
|
58
|
-
|
|
59
|
-
borderColor: "divider",
|
|
58
|
+
boxShadow: (m) => `inset 0 0 0 1px ${m.palette.divider}`,
|
|
60
59
|
borderRadius: 2,
|
|
61
60
|
width: 288,
|
|
62
61
|
...c
|
|
63
62
|
},
|
|
64
63
|
children: [/* @__PURE__ */ e(l, {
|
|
65
|
-
label:
|
|
64
|
+
label: o,
|
|
66
65
|
value: i,
|
|
67
66
|
withBorder: !0
|
|
68
67
|
}), /* @__PURE__ */ e(l, {
|
|
69
|
-
label:
|
|
68
|
+
label: d,
|
|
70
69
|
value: s
|
|
71
70
|
})]
|
|
72
71
|
})]
|
|
73
72
|
});
|
|
74
73
|
export {
|
|
75
|
-
|
|
74
|
+
B as default
|
|
76
75
|
};
|
|
77
76
|
|
|
78
77
|
//# sourceMappingURL=SaveEnoughToLiveOnBottomSection.es.js.map
|