@mx-cartographer/experiences 9.3.8-alpha.al0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/accounts/components/AccountListItem.es.js +4 -4
- package/dist/accounts/components/AccountsListCompact.es.js +15 -15
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActions.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetails.es.js +11 -11
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.es.js +7 -7
- package/dist/accounts/components/detailsdrawer/Transactions/TransactionsTab.es.js +4 -4
- package/dist/budgets/components/BudgetsEmptyState.es.js +7 -7
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js +16 -16
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js.map +1 -1
- package/dist/cashflow/CashflowOnboarding.es.js +13 -13
- package/dist/cashflow/components/CashflowHeading.es.js +4 -4
- package/dist/cashflow/components/DetailsExpenseHeader.es.js +4 -4
- package/dist/common/components/DataRow.es.js +6 -6
- package/dist/common/components/MiniWidgetContainer.es.js +9 -9
- package/dist/common/components/charts/linechart/CustomLine.es.js +2 -2
- package/dist/common/components/charts/linechart/CustomMark.es.js +2 -2
- package/dist/common/context/hooks.d.ts +1 -0
- package/dist/common/context/hooks.es.js +12 -11
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +116 -115
- package/dist/core/index.es.js +27 -25
- package/dist/core/stores/BudgetsStore.es.js +21 -28
- package/dist/core/stores/BudgetsStore.es.js.map +1 -1
- package/dist/core/stores/GlobalStore.d.ts +2 -1
- package/dist/core/stores/GlobalStore.es.js +11 -9
- package/dist/core/stores/GlobalStore.es.js.map +1 -1
- package/dist/core/stores/InsightsV2Store.d.ts +24 -0
- package/dist/core/stores/InsightsV2Store.es.js +41 -0
- package/dist/core/stores/InsightsV2Store.es.js.map +1 -0
- package/dist/core/stores/index.d.ts +2 -0
- package/dist/core/types/Beat.d.ts +2 -0
- package/dist/core/types/Beat.es.js.map +1 -1
- package/dist/core/types/Insights.d.ts +90 -0
- package/dist/core/types/InsightsInstanceSlotData.d.ts +93 -0
- package/dist/core/types/InsightsInstanceSlotData.es.js +8 -0
- package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/utils/BudgetUtil.es.js +50 -56
- package/dist/core/utils/BudgetUtil.es.js.map +1 -1
- package/dist/debts/DebtsWidget.es.js +5 -5
- package/dist/debts/components/debtsdrawer/DebtDetailsContent.es.js +3 -3
- package/dist/debts/components/debtsdrawer/DebtDetailsTab.es.js +6 -6
- package/dist/debts/components/debtsdrawer/DebtScheduleTab.es.js +8 -8
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.es.js +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.es.js +8 -8
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.es.js +5 -5
- package/dist/finstrong/components/shared/Accounts.es.js +24 -24
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.es.js +2 -2
- package/dist/finstrong/components/shared/Transactions.es.js +28 -28
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
- package/dist/goals/GoalsWidget.es.js +12 -12
- package/dist/insights/components/insights/CustomTransaction/CustomTransaction.es.js +13 -13
- package/dist/insights/components/insights/UserFeedback/UserFeedback.es.js +14 -14
- package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.es.js +2 -2
- package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.es.js +9 -9
- package/dist/insights/components/shared/InsightsCard/BeatCard.es.js +4 -4
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.es.js +4 -4
- package/dist/insights/components/shared/InsightsCard/ContentAndDescription.es.js +2 -2
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.es.js +2 -2
- package/dist/insights/components/shared/MenuAction.es.js +16 -16
- package/dist/insights-v2/CommonUtils.d.ts +1 -0
- package/dist/insights-v2/CommonUtils.es.js +7 -0
- package/dist/insights-v2/CommonUtils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +28 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.d.ts +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +18 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +34 -0
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +13 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +87 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +23 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +19 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +15 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +3 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +11 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.d.ts +7 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js +48 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.d.ts +18 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js +45 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.d.ts +2 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js +125 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +8 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +10 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js +28 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.d.ts +8 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js +44 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +15 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +9 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +13 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.d.ts +19 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js +27 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +5 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +78 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.d.ts +5 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js +81 -0
- package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +200 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.d.ts +5 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js +26 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +64 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +32 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +100 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.d.ts +8 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js +41 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js +32 -0
- package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +50 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.d.ts +7 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js +12 -0
- package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js.map +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.d.ts +4 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +35 -0
- package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.d.ts +3 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +20 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +296 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +449 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js +89 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js +235 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js +57 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/index.d.ts +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +7 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +15 -0
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -0
- package/dist/insights-v2/blocks/ImageBlocks/index.d.ts +2 -0
- package/dist/insights-v2/blocks/index.d.ts +4 -0
- package/dist/insights-v2/blocks/types.d.ts +8 -0
- package/dist/insights-v2/components/AccountHeroCard.d.ts +35 -0
- package/dist/insights-v2/components/AccountHeroCard.es.js +91 -0
- package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -0
- package/dist/insights-v2/components/AmountPill.d.ts +16 -0
- package/dist/insights-v2/components/AmountPill.es.js +25 -0
- package/dist/insights-v2/components/AmountPill.es.js.map +1 -0
- package/dist/insights-v2/components/BaseLayout.d.ts +6 -0
- package/dist/insights-v2/components/BaseLayout.es.js +77 -0
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.d.ts +22 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js +33 -0
- package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js.map +1 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.d.ts +14 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js +65 -0
- package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js.map +1 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.d.ts +33 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js +78 -0
- package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js.map +1 -0
- package/dist/insights-v2/components/Footer.d.ts +9 -0
- package/dist/insights-v2/components/Footer.es.js +25 -0
- package/dist/insights-v2/components/Footer.es.js.map +1 -0
- package/dist/insights-v2/components/Header.d.ts +8 -0
- package/dist/insights-v2/components/Header.es.js +41 -0
- package/dist/insights-v2/components/Header.es.js.map +1 -0
- package/dist/insights-v2/components/InsightTransactionRow.d.ts +23 -0
- package/dist/insights-v2/components/InsightTransactionRow.es.js +52 -0
- package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -0
- package/dist/insights-v2/components/LogoClusterCard.d.ts +40 -0
- package/dist/insights-v2/components/LogoClusterCard.es.js +104 -0
- package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -0
- package/dist/insights-v2/components/LogoTile.d.ts +31 -0
- package/dist/insights-v2/components/LogoTile.es.js +34 -0
- package/dist/insights-v2/components/LogoTile.es.js.map +1 -0
- package/dist/insights-v2/components/MerchantHighlightCard.d.ts +34 -0
- package/dist/insights-v2/components/MerchantHighlightCard.es.js +64 -0
- package/dist/insights-v2/components/MerchantHighlightCard.es.js.map +1 -0
- package/dist/insights-v2/components/P2PLogoStack.d.ts +32 -0
- package/dist/insights-v2/components/P2PLogoStack.es.js +55 -0
- package/dist/insights-v2/components/P2PLogoStack.es.js.map +1 -0
- package/dist/insights-v2/components/SaveAnExtraCard.d.ts +27 -0
- package/dist/insights-v2/components/SaveAnExtraCard.es.js +57 -0
- package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.d.ts +18 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js +71 -0
- package/dist/insights-v2/components/SavingsOpportunityCard.es.js.map +1 -0
- package/dist/insights-v2/components/StatusMessageCard.d.ts +28 -0
- package/dist/insights-v2/components/StatusMessageCard.es.js +45 -0
- package/dist/insights-v2/components/StatusMessageCard.es.js.map +1 -0
- package/dist/insights-v2/components/StatusPill.d.ts +26 -0
- package/dist/insights-v2/components/StatusPill.es.js +30 -0
- package/dist/insights-v2/components/StatusPill.es.js.map +1 -0
- package/dist/insights-v2/components/SubHeader.d.ts +6 -0
- package/dist/insights-v2/components/SubHeader.es.js +40 -0
- package/dist/insights-v2/components/SubHeader.es.js.map +1 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.d.ts +27 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.es.js +63 -0
- package/dist/insights-v2/components/SubscriptionHeroCard.es.js.map +1 -0
- package/dist/insights-v2/components/TransactionListCard.d.ts +45 -0
- package/dist/insights-v2/components/TransactionListCard.es.js +118 -0
- package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -0
- package/dist/insights-v2/components/TransferLogoCard.d.ts +44 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js +121 -0
- package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -0
- package/dist/insights-v2/components/UpcomingBillCard.d.ts +41 -0
- package/dist/insights-v2/components/UpcomingBillCard.es.js +99 -0
- package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -0
- package/dist/insights-v2/components/celebrationGradients.d.ts +19 -0
- package/dist/insights-v2/components/celebrationGradients.es.js +7 -0
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +2 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +148 -0
- package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.d.ts +1 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +14 -0
- package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.d.ts +2 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js +49 -0
- package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js.map +1 -0
- package/dist/insights-v2/components/logoShadow.d.ts +26 -0
- package/dist/insights-v2/components/logoShadow.es.js +12 -0
- package/dist/insights-v2/components/logoShadow.es.js.map +1 -0
- package/dist/insights-v2/components/shared/Confetti.d.ts +15 -0
- package/dist/insights-v2/components/shared/Confetti.es.js +33 -0
- package/dist/insights-v2/components/shared/Confetti.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +338 -0
- package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/PaidOffCard.es.js +85 -0
- package/dist/insights-v2/components/shared/images/PaidOffCard.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js +124 -0
- package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js +104 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js +104 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js.map +1 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js +38 -0
- package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js.map +1 -0
- package/dist/insights-v2/components/statusTokens.d.ts +12 -0
- package/dist/insights-v2/components/statusTokens.es.js +10 -0
- package/dist/insights-v2/components/statusTokens.es.js.map +1 -0
- package/dist/insights-v2/hooks/useContainerDimensions.d.ts +5 -0
- package/dist/insights-v2/hooks/useContainerDimensions.es.js +26 -0
- package/dist/insights-v2/hooks/useContainerDimensions.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +18 -0
- package/dist/insights-v2/index.es.js +55 -0
- package/dist/insights-v2/mappings/blocks.d.ts +14 -0
- package/dist/insights-v2/mappings/blocks.es.js +32 -0
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -0
- package/dist/investments/InvestmentsWidget.es.js +10 -10
- package/dist/investments/components/AnalysisDetails.es.js +4 -4
- package/dist/investments/components/allocation/InvestementAllocationList.es.js +27 -27
- package/dist/microinsights/MicroCardTemplate.es.js +4 -4
- package/dist/microinsights/carousel/BeatList.es.js +9 -9
- package/dist/networth/NetWorthWidget.es.js +6 -6
- package/dist/networth/components/AssetsLiabilitiesDetail.es.js +2 -2
- package/dist/networth/components/GainsLossesDetail.es.js +13 -13
- package/dist/notifications/components/NotificationDrawer.es.js +5 -5
- package/dist/notifications/components/NotificationList.es.js +13 -13
- package/dist/recurringtransactions/components/MicroWidgetContent.es.js +13 -13
- package/dist/recurringtransactions/components/RecurrenceRow.es.js +6 -6
- package/dist/recurringtransactions/components/RecurringStatus.es.js +4 -4
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +19 -19
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.es.js +9 -9
- package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js +5 -5
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransaction.es.js +25 -25
- package/dist/recurringtransactions/components/shared/recurringsettings/ManageIncome.es.js +5 -5
- package/dist/settings/components/notifications/NotificationSettings.es.js +12 -12
- package/dist/settings/components/profile/ProfileTab.es.js +20 -20
- package/dist/trends/TrendsWidget.es.js +25 -25
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DataSet } from '../../../../core/types/InsightsInstanceSlotData';
|
|
3
|
+
interface BarStyleProps extends React.CSSProperties {
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
}
|
|
7
|
+
interface CustomDoubleBarPlotMXUIProps {
|
|
8
|
+
color: string;
|
|
9
|
+
data: DataSet[];
|
|
10
|
+
series: Series;
|
|
11
|
+
style: BarStyleProps;
|
|
12
|
+
}
|
|
13
|
+
interface Series {
|
|
14
|
+
index: number;
|
|
15
|
+
type: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const CustomDoubleBarPlotMXUI: ({ color, data, series, style, ...restProps }: CustomDoubleBarPlotMXUIProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import $ from "react";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
var B = ({ color: h, data: f, series: i, style: n, ...m }) => {
|
|
4
|
+
const r = $.useRef(null);
|
|
5
|
+
$.useLayoutEffect(() => {
|
|
6
|
+
const s = new ResizeObserver(() => {
|
|
7
|
+
window.requestAnimationFrame(() => {
|
|
8
|
+
if (r.current) {
|
|
9
|
+
const { width: g } = r.current.getBoundingClientRect(), v = g / 2, u = r.current.querySelector("text");
|
|
10
|
+
u && u.setAttribute("transform", `translate(${v}, -8)`);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
return r.current && s.observe(r.current), () => {
|
|
15
|
+
r.current && s.unobserve(r.current);
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
const { ariaLabelComparison: p, ariaLabelMain: b } = f[i.index], d = i.type === 0 ? b : p, L = {
|
|
19
|
+
...n,
|
|
20
|
+
transition: "all 0.3s ease-in-out"
|
|
21
|
+
}, o = n.width || 0, c = n.height || 0, t = n.x || 0, e = n.y || 0, a = 4, x = `
|
|
22
|
+
M ${t + a},${e}
|
|
23
|
+
L ${t + o - a},${e}
|
|
24
|
+
Q ${t + o},${e} ${t + o},${e + a}
|
|
25
|
+
L ${t + o},${e + c}
|
|
26
|
+
L ${t},${e + c}
|
|
27
|
+
L ${t},${e + a}
|
|
28
|
+
Q ${t},${e} ${t + a},${e}
|
|
29
|
+
Z
|
|
30
|
+
`.trim();
|
|
31
|
+
return /* @__PURE__ */ l("g", {
|
|
32
|
+
"aria-label": d,
|
|
33
|
+
children: /* @__PURE__ */ l("path", {
|
|
34
|
+
...m,
|
|
35
|
+
d: x,
|
|
36
|
+
fill: h,
|
|
37
|
+
style: L
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
B as CustomDoubleBarPlotMXUI
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=CustomDoubleBar.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomDoubleBar.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.tsx"],"sourcesContent":["import React from 'react'\nimport type { DataSet } from '../../../../core/types/InsightsInstanceSlotData'\n\ninterface BarStyleProps extends React.CSSProperties {\n x?: number\n y?: number\n}\n\ninterface CustomDoubleBarPlotMXUIProps {\n color: string\n data: DataSet[]\n series: Series\n style: BarStyleProps\n}\n\ninterface Series {\n index: number\n type: number\n}\n\nexport const CustomDoubleBarPlotMXUI = ({\n color,\n data,\n series,\n style,\n ...restProps\n}: CustomDoubleBarPlotMXUIProps) => {\n const rectRef = React.useRef<SVGRectElement>(null)\n\n React.useLayoutEffect(() => {\n const resizeObserver = new ResizeObserver(() => {\n window.requestAnimationFrame(() => {\n if (rectRef.current) {\n const { width } = rectRef.current.getBoundingClientRect()\n\n const xValue = width / 2\n const textElement = rectRef.current.querySelector('text')\n if (textElement) {\n textElement.setAttribute('transform', `translate(${xValue}, -8)`)\n }\n }\n })\n })\n\n if (rectRef.current) resizeObserver.observe(rectRef.current)\n return () => {\n if (rectRef.current) resizeObserver.unobserve(rectRef.current)\n }\n }, [])\n\n const { ariaLabelComparison, ariaLabelMain } = data[series.index]\n\n const ariaLabel = series.type === 0 ? ariaLabelMain : ariaLabelComparison\n\n const rectStyle = {\n ...style,\n transition: 'all 0.3s ease-in-out',\n }\n\n // Create path with rounded top corners (10px radius) and square bottom corners\n const pathBarWidth = (style.width as number) || 0\n const pathBarHeight = (style.height as number) || 0\n const pathX = (style.x as number) || 0\n const pathY = (style.y as number) || 0\n const radius = 4\n\n const pathData = `\n M ${pathX + radius},${pathY}\n L ${pathX + pathBarWidth - radius},${pathY}\n Q ${pathX + pathBarWidth},${pathY} ${pathX + pathBarWidth},${pathY + radius}\n L ${pathX + pathBarWidth},${pathY + pathBarHeight}\n L ${pathX},${pathY + pathBarHeight}\n L ${pathX},${pathY + radius}\n Q ${pathX},${pathY} ${pathX + radius},${pathY}\n Z\n `.trim()\n\n return (\n <g aria-label={ariaLabel}>\n <path {...restProps} d={pathData} fill={color} style={rectStyle} />\n </g>\n )\n}\n"],"mappings":";;AAoBA,IAAa,IAAA,CAA2B,EACtC,OAAA,GACA,MAAA,GACA,QAAA,GACA,OAAA,GACA,GAAG,EAAA,MAC+B;AAClC,QAAM,IAAU,EAAM,OAAuB,IAAI;AAEjD,EAAA,EAAM,gBAAA,MAAsB;AAC1B,UAAM,IAAiB,IAAI,eAAA,MAAqB;AAC9C,aAAO,sBAAA,MAA4B;AACjC,YAAI,EAAQ,SAAS;AACnB,gBAAM,EAAE,OAAA,EAAA,IAAU,EAAQ,QAAQ,sBAAsB,GAElD,IAAS,IAAQ,GACjB,IAAc,EAAQ,QAAQ,cAAc,MAAM;AACxD,UAAI,KACF,EAAY,aAAa,aAAa,aAAa,CAAA,OAAa;AAAA,QAEpE;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAED,WAAI,EAAQ,WAAS,EAAe,QAAQ,EAAQ,OAAO,GAC3D,MAAa;AACX,MAAI,EAAQ,WAAS,EAAe,UAAU,EAAQ,OAAO;AAAA,IAC/D;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,EAAE,qBAAA,GAAqB,eAAA,EAAA,IAAkB,EAAK,EAAO,KAAA,GAErD,IAAY,EAAO,SAAS,IAAI,IAAgB,GAEhD,IAAY;AAAA,IAChB,GAAG;AAAA,IACH,YAAY;AAAA,EACd,GAGM,IAAgB,EAAM,SAAoB,GAC1C,IAAiB,EAAM,UAAqB,GAC5C,IAAS,EAAM,KAAgB,GAC/B,IAAS,EAAM,KAAgB,GAC/B,IAAS,GAET,IAAW;AAAA,QACX,IAAQ,CAAA,IAAU,CAAA;AAAA,QAClB,IAAQ,IAAe,CAAA,IAAU,CAAA;AAAA,QACjC,IAAQ,CAAA,IAAgB,CAAA,IAAS,IAAQ,CAAA,IAAgB,IAAQ,CAAA;AAAA,QACjE,IAAQ,CAAA,IAAgB,IAAQ,CAAA;AAAA,QAChC,CAAA,IAAS,IAAQ,CAAA;AAAA,QACjB,CAAA,IAAS,IAAQ,CAAA;AAAA,QACjB,CAAA,IAAS,CAAA,IAAS,IAAQ,CAAA,IAAU,CAAA;AAAA;AAAA,IAExC,KAAK;AAEP,SACE,gBAAA,EAAC,KAAD;AAAA,IAAG,cAAY;AAAA,IACb,UAAA,gBAAA,EAAC,QAAD;AAAA,MAAM,GAAI;AAAA,MAAW,GAAG;AAAA,MAAU,MAAM;AAAA,MAAO,OAAO;AAAA,IAAY,CAAA;AAAA,EACjE,CAAA;AAEP"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useInsightsV2Store as B } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { EmptyBarChart as A } from "../../../components/chartblocks/EmptyBarChart.es.js";
|
|
3
|
+
import { useContainerDimensions as v } from "../../../hooks/useContainerDimensions.es.js";
|
|
4
|
+
import { CustomDoubleBarPlotMXUI as T } from "./CustomDoubleBar.es.js";
|
|
5
|
+
import { Legend as L } from "./ChartLegend.es.js";
|
|
6
|
+
import { getLayoutConfig as R } from "./layout.es.js";
|
|
7
|
+
import D from "react";
|
|
8
|
+
import K from "@mui/material/Stack";
|
|
9
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { useTheme as M } from "@mui/material/styles";
|
|
11
|
+
import j from "@mui/material/Box";
|
|
12
|
+
import { BarPlot as G } from "@mui/x-charts/BarChart";
|
|
13
|
+
import { ChartContainer as N } from "@mui/x-charts/ChartContainer";
|
|
14
|
+
import { ChartsXAxis as P } from "@mui/x-charts/ChartsXAxis";
|
|
15
|
+
var Y = ({ payload: { instance_slot: h, instance_slot_data: s, widget_type: p }, beatGuid: f = "" }) => {
|
|
16
|
+
const { openChartDrilldown: y } = B(), l = p === "mini", { variant: g } = h, { data_series: i, legends: x } = s, a = i.length - 1, b = 5e-3, u = 0.16, C = M(), c = R(C, g).color, m = D.useRef(null), { height: I, width: k } = v(m), w = ({ dataIndex: e, seriesId: t }) => {
|
|
17
|
+
const o = Number(t.split("-").pop());
|
|
18
|
+
y(f, {
|
|
19
|
+
chartBarIndex: e,
|
|
20
|
+
tabIndex: o
|
|
21
|
+
});
|
|
22
|
+
}, n = x?.map((e, t) => ({
|
|
23
|
+
color: c[t],
|
|
24
|
+
...e
|
|
25
|
+
}));
|
|
26
|
+
return i.length > 0 ? /* @__PURE__ */ d(K, {
|
|
27
|
+
sx: {
|
|
28
|
+
mb: 0,
|
|
29
|
+
width: "100%",
|
|
30
|
+
p: 0
|
|
31
|
+
},
|
|
32
|
+
children: [/* @__PURE__ */ r(j, {
|
|
33
|
+
ref: m,
|
|
34
|
+
sx: {
|
|
35
|
+
height: l ? 120 : 172,
|
|
36
|
+
touchAction: "pan-y",
|
|
37
|
+
width: "100%",
|
|
38
|
+
p: 0,
|
|
39
|
+
m: 0,
|
|
40
|
+
"& svg": {
|
|
41
|
+
touchAction: "pan-y",
|
|
42
|
+
userSelect: "none"
|
|
43
|
+
},
|
|
44
|
+
"& .recharts-wrapper": { touchAction: "pan-y" }
|
|
45
|
+
},
|
|
46
|
+
children: /* @__PURE__ */ d(N, {
|
|
47
|
+
colors: c,
|
|
48
|
+
dataset: i,
|
|
49
|
+
height: I,
|
|
50
|
+
margin: {
|
|
51
|
+
bottom: 16,
|
|
52
|
+
left: 24,
|
|
53
|
+
right: 24,
|
|
54
|
+
top: 0
|
|
55
|
+
},
|
|
56
|
+
series: [{
|
|
57
|
+
dataKey: "main",
|
|
58
|
+
type: "bar"
|
|
59
|
+
}, {
|
|
60
|
+
dataKey: "comparison",
|
|
61
|
+
type: "bar"
|
|
62
|
+
}],
|
|
63
|
+
width: k,
|
|
64
|
+
xAxis: [{
|
|
65
|
+
barGapRatio: b,
|
|
66
|
+
categoryGapRatio: u,
|
|
67
|
+
dataKey: "label",
|
|
68
|
+
scaleType: "band"
|
|
69
|
+
}],
|
|
70
|
+
yAxis: [{ width: 0 }],
|
|
71
|
+
children: [/* @__PURE__ */ r(P, {
|
|
72
|
+
disableTicks: !1,
|
|
73
|
+
slots: { axisTickLabel: ({ text: e, ...t }) => {
|
|
74
|
+
const o = a !== void 0 ? s.data_series[a]?.label : void 0;
|
|
75
|
+
return /* @__PURE__ */ r("text", {
|
|
76
|
+
...t,
|
|
77
|
+
style: {
|
|
78
|
+
...t.style,
|
|
79
|
+
fontWeight: o === e ? 700 : 400
|
|
80
|
+
},
|
|
81
|
+
children: e
|
|
82
|
+
});
|
|
83
|
+
} },
|
|
84
|
+
sx: { ".MuiChartsAxis-line": { stroke: "border.darker" } },
|
|
85
|
+
tickLabelStyle: {
|
|
86
|
+
fontSize: 11,
|
|
87
|
+
fill: "text.secondary",
|
|
88
|
+
fontWeight: 400
|
|
89
|
+
}
|
|
90
|
+
}), /* @__PURE__ */ r(G, {
|
|
91
|
+
onItemClick: (e, { dataIndex: t, seriesId: o }) => w({
|
|
92
|
+
dataIndex: t,
|
|
93
|
+
seriesId: o.toString()
|
|
94
|
+
}),
|
|
95
|
+
slots: { bar: (e) => {
|
|
96
|
+
const { ownerState: t, ...o } = e, S = a === void 0 || a === t.dataIndex ? t.color : `${t.color}50`;
|
|
97
|
+
return /* @__PURE__ */ r(T, {
|
|
98
|
+
...o,
|
|
99
|
+
color: S,
|
|
100
|
+
data: i,
|
|
101
|
+
series: {
|
|
102
|
+
index: t.dataIndex,
|
|
103
|
+
type: Number(t.id?.toString().split("-").pop() ?? 0)
|
|
104
|
+
},
|
|
105
|
+
style: {
|
|
106
|
+
height: e.height,
|
|
107
|
+
x: e.x,
|
|
108
|
+
y: e.y,
|
|
109
|
+
width: e.width
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
} }
|
|
113
|
+
})]
|
|
114
|
+
})
|
|
115
|
+
}), n && !l && n.length > 0 && /* @__PURE__ */ r(L, {
|
|
116
|
+
legendItems: n,
|
|
117
|
+
legendStyle: { ml: 24 }
|
|
118
|
+
})]
|
|
119
|
+
}) : /* @__PURE__ */ r(A, {});
|
|
120
|
+
};
|
|
121
|
+
export {
|
|
122
|
+
Y as DoubleBarChartBlock
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=DoubleBarChart.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoubleBarChart.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\nimport { useTheme } from '@mui/material/styles'\n\nimport { useInsightsV2Store } from '../../../../common'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\nimport { BlockProps } from '../../types'\n\nimport { CustomDoubleBarPlotMXUI } from './CustomDoubleBar'\nimport { Legend } from './ChartLegend'\nimport { getLayoutConfig } from './layout'\nimport { EmptyBarChart } from '../../../components/chartblocks/EmptyBarChart'\nimport type { DataSet } from '../../../../core/types/InsightsInstanceSlotData'\nimport type { LegendProps } from '../../../../core/types/InsightsInstanceSlotData'\n\nexport const DoubleBarChartBlock = ({\n payload: { instance_slot, instance_slot_data, widget_type },\n beatGuid = '',\n}: BlockProps) => {\n const { openChartDrilldown } = useInsightsV2Store()\n const isMini = widget_type === 'mini'\n const { variant } = instance_slot\n const { data_series, legends } = instance_slot_data\n const selectedTabIndex = (data_series! as DataSet[]).length - 1\n const barGapRatio = 0.005\n const categoryGapRatio = 0.16\n\n const theme = useTheme()\n const colors = getLayoutConfig(theme, variant).color\n\n const containerRef = React.useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n\n const handleBarClick = ({ dataIndex, seriesId }: { dataIndex: number; seriesId: string }) => {\n const seriesType = Number(seriesId.split('-').pop())\n // chartBarIndex carries the clicked date column (same meaning as\n // BarchartBlock's chartBarIndex); tabIndex carries the clicked sub-series\n // within that column (0 = main, 1 = comparison).\n openChartDrilldown(beatGuid, {\n chartBarIndex: dataIndex,\n tabIndex: seriesType,\n })\n }\n\n const legendItems = legends?.map((legend, index) => ({\n color: colors[index],\n ...legend,\n })) as LegendProps[]\n\n //\n return (data_series as DataSet[]).length > 0 ? (\n <Stack sx={{ mb: 0, width: '100%', p: 0 }}>\n <Box\n ref={containerRef}\n sx={{\n height: isMini ? 120 : 172,\n touchAction: 'pan-y',\n width: '100%',\n p: 0,\n m: 0,\n '& svg': {\n touchAction: 'pan-y',\n userSelect: 'none',\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y',\n },\n }}\n >\n <ChartContainer\n colors={colors}\n dataset={data_series as any[]}\n height={height}\n margin={{\n bottom: 16,\n left: 24,\n right: 24,\n top: 0,\n }}\n series={[\n { dataKey: 'main', type: 'bar' },\n { dataKey: 'comparison', type: 'bar' },\n ]}\n width={width}\n xAxis={[\n {\n barGapRatio,\n categoryGapRatio,\n dataKey: 'label',\n scaleType: 'band',\n },\n ]}\n yAxis={[{ width: 0 }]}\n >\n <ChartsXAxis\n disableTicks={false}\n slots={{\n axisTickLabel: ({ text, ...restProps }) => {\n const selectedLabel =\n selectedTabIndex !== undefined\n ? (instance_slot_data.data_series as DataSet[])[selectedTabIndex]?.label\n : undefined\n return (\n <text\n {...restProps}\n style={\n {\n ...restProps.style,\n fontWeight: selectedLabel === text ? 700 : 400,\n } as React.CSSProperties\n }\n >\n {text}\n </text>\n )\n },\n }}\n sx={{\n '.MuiChartsAxis-line': {\n stroke: 'border.darker',\n },\n }}\n tickLabelStyle={{\n fontSize: 11,\n fill: 'text.secondary',\n fontWeight: 400,\n }}\n />\n <BarPlot\n onItemClick={(_, { dataIndex, seriesId }) =>\n handleBarClick({ dataIndex, seriesId: seriesId.toString() })\n }\n slots={{\n bar: (props) => {\n const { ownerState, ...defaultProps } = props\n const isSelected =\n selectedTabIndex === undefined || selectedTabIndex === ownerState.dataIndex\n const barColor = isSelected ? ownerState.color : `${ownerState.color}50`\n\n return (\n <CustomDoubleBarPlotMXUI\n {...defaultProps}\n color={barColor}\n data={data_series as DataSet[]}\n series={{\n index: ownerState.dataIndex,\n type: Number(ownerState.id?.toString().split('-').pop() ?? 0),\n }}\n style={{\n height: props.height,\n x: props.x,\n y: props.y,\n width: props.width,\n }}\n />\n )\n },\n }}\n />\n </ChartContainer>\n </Box>\n\n {legendItems && !isMini && legendItems.length > 0 && (\n <Legend legendItems={legendItems} legendStyle={{ ml: 24 }} />\n )}\n </Stack>\n ) : (\n <EmptyBarChart />\n )\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DoubleBarChart';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var a = (t, o) => ({
|
|
2
|
+
SpendToIncome: { color: [t.palette.categories.billsUtilities, t.palette.chart.chart1] },
|
|
3
|
+
DebtToIncome: { color: [t.palette.chart.chart1, t.palette.chart.chart5] },
|
|
4
|
+
SavingsToIncome: { color: [t.palette.chartMono.chartMono5, t.palette.chartMono.chartMono3] }
|
|
5
|
+
})[o];
|
|
6
|
+
export {
|
|
7
|
+
a as getLayoutConfig
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nexport const getLayoutConfig = (theme: Theme, variant: string | null) => {\n const config = {\n SpendToIncome: {\n color: [theme.palette.categories.billsUtilities, theme.palette.chart.chart1] as string[],\n },\n DebtToIncome: {\n color: [theme.palette.chart.chart1, theme.palette.chart.chart5] as string[],\n },\n SavingsToIncome: {\n color: [theme.palette.chartMono.chartMono5, theme.palette.chartMono.chartMono3] as string[],\n },\n }\n return config[variant as keyof typeof config]\n}\n"],"mappings":"AAEA,IAAa,IAAA,CAAmB,GAAc,OAYrC;AAAA,EAVL,eAAe,EACb,OAAO,CAAC,EAAM,QAAQ,WAAW,gBAAgB,EAAM,QAAQ,MAAM,MAAM,EAC7E;AAAA,EACA,cAAc,EACZ,OAAO,CAAC,EAAM,QAAQ,MAAM,QAAQ,EAAM,QAAQ,MAAM,MAAM,EAChE;AAAA,EACA,iBAAiB,EACf,OAAO,CAAC,EAAM,QAAQ,UAAU,YAAY,EAAM,QAAQ,UAAU,UAAU,EAChF;AAEK,GAAO,CAAA"}
|
package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DoubleProgressBarBlockData } from '../../../../core/types/InsightsInstanceSlotData';
|
|
2
|
+
import { BlockProps } from '../../types';
|
|
3
|
+
declare const DoubleProgressBarBlock: ({ payload }: BlockProps<DoubleProgressBarBlockData>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default DoubleProgressBarBlock;
|
package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import r from "./ProgressBar.es.js";
|
|
2
|
+
import u from "@mui/material/Stack";
|
|
3
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
var i = ({ payload: t }) => {
|
|
5
|
+
const { instance_slot_data: l } = t, { previous: e, latest: a } = l.doubleProgressBar, s = Math.round(e.value / a.value * 100);
|
|
6
|
+
return /* @__PURE__ */ n(u, {
|
|
7
|
+
sx: {
|
|
8
|
+
px: 16,
|
|
9
|
+
pt: 8,
|
|
10
|
+
gap: 16
|
|
11
|
+
},
|
|
12
|
+
children: [/* @__PURE__ */ o(r, {
|
|
13
|
+
amount: e.value,
|
|
14
|
+
label: e.label,
|
|
15
|
+
percentage: s
|
|
16
|
+
}), /* @__PURE__ */ o(r, {
|
|
17
|
+
amount: a.value,
|
|
18
|
+
isBold: !0,
|
|
19
|
+
label: a.label,
|
|
20
|
+
percentage: 100
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
i as default
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=DoubleProgressBarBlock.es.js.map
|
package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoubleProgressBarBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\nimport { DoubleProgressBarBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport type { BlockProps } from '../../types'\n\nimport ProgressBar from './ProgressBar'\n\nconst DoubleProgressBarBlock = ({ payload }: BlockProps<DoubleProgressBarBlockData>) => {\n const { instance_slot_data } = payload\n const { previous, latest } = instance_slot_data.doubleProgressBar\n const percentage = Math.round((previous.value / latest.value) * 100)\n\n return (\n <Stack sx={{ px: 16, pt: 8, gap: 16 }}>\n <ProgressBar amount={previous.value} label={previous.label} percentage={percentage} />\n <ProgressBar amount={latest.value} isBold={true} label={latest.label} percentage={100} />\n </Stack>\n )\n}\n\nexport default DoubleProgressBarBlock\n"],"mappings":";;;AAOA,IAAM,IAAA,CAA0B,EAAE,SAAA,EAAA,MAAsD;AACtF,QAAM,EAAE,oBAAA,EAAA,IAAuB,GACzB,EAAE,UAAA,GAAU,QAAA,EAAA,IAAW,EAAmB,mBAC1C,IAAa,KAAK,MAAO,EAAS,QAAQ,EAAO,QAAS,GAAG;AAEnE,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,IAAI;AAAA,MAAI,IAAI;AAAA,MAAG,KAAK;AAAA,IAAG;AAAA,IAApC,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAa,QAAQ,EAAS;AAAA,MAAO,OAAO,EAAS;AAAA,MAAmB,YAAA;AAAA,IAAa,CAAA,GACrF,gBAAA,EAAC,GAAD;AAAA,MAAa,QAAQ,EAAO;AAAA,MAAO,QAAQ;AAAA,MAAM,OAAO,EAAO;AAAA,MAAO,YAAY;AAAA,IAAM,CAAA,CACnF;AAAA;AAEX"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ProgressBarProps {
|
|
2
|
+
label: string;
|
|
3
|
+
amount: number;
|
|
4
|
+
percentage: number;
|
|
5
|
+
isBold?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ProgressBar: ({ label, amount, percentage, isBold }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { formatCurrency as c } from "../../../../core/utils/NumberFormatting.es.js";
|
|
2
|
+
import e from "@mui/material/Stack";
|
|
3
|
+
import { Text as o } from "@mxenabled/mxui";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { useTheme as l } from "@mui/material/styles";
|
|
6
|
+
import h from "@mui/material/Box";
|
|
7
|
+
var b = ({ label: n, amount: a, percentage: m, isBold: s }) => {
|
|
8
|
+
const t = l();
|
|
9
|
+
return /* @__PURE__ */ i(e, {
|
|
10
|
+
sx: { gap: 4 },
|
|
11
|
+
children: [/* @__PURE__ */ i(e, {
|
|
12
|
+
sx: {
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
justifyContent: "space-between"
|
|
16
|
+
},
|
|
17
|
+
children: [/* @__PURE__ */ r(o, {
|
|
18
|
+
variant: "caption",
|
|
19
|
+
children: n
|
|
20
|
+
}), /* @__PURE__ */ r(o, {
|
|
21
|
+
bold: s,
|
|
22
|
+
variant: "caption",
|
|
23
|
+
children: c(a, "0,0.00")
|
|
24
|
+
})]
|
|
25
|
+
}), /* @__PURE__ */ r(e, {
|
|
26
|
+
sx: {
|
|
27
|
+
bgcolor: t.palette.warning.lighter,
|
|
28
|
+
height: 12,
|
|
29
|
+
borderRadius: 6
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ r(h, { sx: {
|
|
32
|
+
bgcolor: t.palette.warning.main,
|
|
33
|
+
height: 12,
|
|
34
|
+
borderRadius: 6,
|
|
35
|
+
width: `${m}%`
|
|
36
|
+
} })
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
b as default
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=ProgressBar.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface ProgressBarProps {\n label: string\n amount: number\n percentage: number\n isBold?: boolean\n}\n\nconst ProgressBar = ({ label, amount, percentage, isBold }: ProgressBarProps) => {\n const theme = useTheme()\n return (\n <Stack sx={{ gap: 4 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text variant=\"caption\">{label}</Text>\n <Text bold={isBold} variant=\"caption\">\n {formatCurrency(amount, '0,0.00')}\n </Text>\n </Stack>\n <Stack sx={{ bgcolor: theme.palette.warning.lighter, height: 12, borderRadius: 6 }}>\n <Box\n sx={{\n bgcolor: theme.palette.warning.main,\n height: 12,\n borderRadius: 6,\n width: `${percentage}%`,\n }}\n />\n </Stack>\n </Stack>\n )\n}\n\nexport default ProgressBar\n"],"mappings":";;;;;;AAcA,IAAM,IAAA,CAAe,EAAE,OAAA,GAAO,QAAA,GAAQ,YAAA,GAAY,QAAA,EAAA,MAA+B;AAC/E,QAAM,IAAQ,EAAS;AACvB,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,KAAK,EAAE;AAAA,IAApB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,eAAe;AAAA,QAAO,gBAAgB;AAAA,MAAgB;AAAA,MAAzF,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAW,UAAA;AAAA,MAAY,CAAA,GACrC,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAQ,SAAQ;AAAA,QACzB,UAAA,EAAe,GAAQ,QAAQ;AAAA,MAC5B,CAAA,CACD;AAAA,IACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,SAAS,EAAM,QAAQ,QAAQ;AAAA,QAAS,QAAQ;AAAA,QAAI,cAAc;AAAA,MAAE;AAAA,MAC/E,UAAA,gBAAA,EAAC,GAAD,EACE,IAAI;AAAA,QACF,SAAS,EAAM,QAAQ,QAAQ;AAAA,QAC/B,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,OAAO,GAAG,CAAA;AAAA,MACZ,EACD,CAAA;AAAA,IACI,CAAA,CACF;AAAA;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DoubleProgressBarBlock';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StepChartBlockData } from '../../../../core/types/InsightsInstanceSlotData';
|
|
2
|
+
import { BlockProps } from '../..';
|
|
3
|
+
declare const StepChartBlock: ({ payload }: BlockProps<StepChartBlockData>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default StepChartBlock;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { variants as s } from "./index.es.js";
|
|
2
|
+
import i from "@mui/material/Stack";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
var m = ({ payload: a }) => {
|
|
5
|
+
const { instance_slot: { variant: r }, instance_slot_data: o } = a, n = s[r];
|
|
6
|
+
return /* @__PURE__ */ t(i, {
|
|
7
|
+
sx: { p: 16 },
|
|
8
|
+
children: /* @__PURE__ */ t(n, { slotData: o })
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
m as default
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=StepChartBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepChartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport type { StepChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport type { BlockProps } from '../..'\n\nimport { variants } from '.'\n\nconst StepChartBlock = ({ payload }: BlockProps<StepChartBlockData>) => {\n const {\n instance_slot: { variant },\n instance_slot_data,\n } = payload\n\n const Variant = variants[variant as keyof typeof variants]\n\n return (\n <Stack sx={{ p: 16 }}>\n <Variant slotData={instance_slot_data} />\n </Stack>\n )\n}\n\nexport default StepChartBlock\n"],"mappings":";;;AAQA,IAAM,IAAA,CAAkB,EAAE,SAAA,EAAA,MAA8C;AACtE,QAAM,EACJ,eAAe,EAAE,SAAA,EAAA,GACjB,oBAAA,EAAA,IACE,GAEE,IAAU,EAAS,CAAA;AAEzB,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAS,UAAU,EAAqB,CAAA;AAAA,EACnC,CAAA;AAEX"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default } from './StepChartBlock';
|
|
2
|
+
export declare const variants: {
|
|
3
|
+
WithoutText: ({ slotData }: {
|
|
4
|
+
slotData: import('../../../../core/types/InsightsInstanceSlotData').StepChartBlockData;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
WithText: ({ slotData }: {
|
|
7
|
+
slotData: import('../../../../core/types/InsightsInstanceSlotData').StepChartBlockData;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import t from "./variants/WithoutText.es.js";
|
|
2
|
+
import r from "./variants/WithText.es.js";
|
|
3
|
+
import m from "./StepChartBlock.es.js";
|
|
4
|
+
var e = {
|
|
5
|
+
WithoutText: t,
|
|
6
|
+
WithText: r
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
m as default,
|
|
10
|
+
e as variants
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/index.ts"],"sourcesContent":["import WithoutText from './variants/WithoutText'\nimport WithText from './variants/WithText'\n\nexport { default } from './StepChartBlock'\n\n// TODO: Replace all names with the corresponding backend variant names.\n\nexport const variants = {\n WithoutText: WithoutText,\n WithText: WithText,\n}\n"],"mappings":";;;AAOA,IAAa,IAAW;AAAA,EACT,aAAA;AAAA,EACH,UAAA;AACZ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
export declare const getStepColor: (theme: Theme, isActive: boolean) => string;
|
|
3
|
+
export declare const getStepStyles: (theme: Theme, completed: boolean, allCompleted: boolean) => {
|
|
4
|
+
dot: {
|
|
5
|
+
outlineColor: string;
|
|
6
|
+
width: number;
|
|
7
|
+
outline?: string | undefined;
|
|
8
|
+
bgcolor: string;
|
|
9
|
+
border: string;
|
|
10
|
+
borderColor: string;
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
connector: {
|
|
15
|
+
bgcolor: string;
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { alpha as o } from "@mui/material/styles";
|
|
2
|
+
var n = (i, r) => r ? "success.main" : o(i.palette.success.main, 0.12), c = (i, r, e) => {
|
|
3
|
+
const a = e ? i.palette.success.main : i.palette.primary.main, t = e ? "success.main" : "primary.main";
|
|
4
|
+
return {
|
|
5
|
+
dot: {
|
|
6
|
+
bgcolor: r ? t : "transparent",
|
|
7
|
+
border: "2px solid",
|
|
8
|
+
borderColor: r ? t : i.palette.divider,
|
|
9
|
+
borderRadius: "99999px",
|
|
10
|
+
height: 12,
|
|
11
|
+
...r && { outline: "4px solid" },
|
|
12
|
+
outlineColor: r ? o(a, 0.25) : i.palette.divider,
|
|
13
|
+
width: 12
|
|
14
|
+
},
|
|
15
|
+
connector: {
|
|
16
|
+
bgcolor: r ? t : "divider",
|
|
17
|
+
height: 2,
|
|
18
|
+
width: 61.33
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
n as getStepColor,
|
|
24
|
+
c as getStepStyles
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=utils.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\nexport const getStepColor = (theme: Theme, isActive: boolean) => {\n if (isActive) return 'success.main'\n\n return alpha(theme.palette.success.main, 0.12)\n}\n\nexport const getStepStyles = (theme: Theme, completed: boolean, allCompleted: boolean) => {\n const activeColor = allCompleted ? theme.palette.success.main : theme.palette.primary.main\n const activeKey = allCompleted ? 'success.main' : 'primary.main'\n\n return {\n dot: {\n bgcolor: completed ? activeKey : 'transparent',\n border: '2px solid',\n borderColor: completed ? activeKey : theme.palette.divider,\n borderRadius: '99999px',\n height: 12,\n\n ...(completed && { outline: '4px solid' }),\n outlineColor: completed ? alpha(activeColor, 0.25) : theme.palette.divider,\n\n width: 12,\n },\n connector: {\n bgcolor: completed ? activeKey : 'divider',\n height: 2,\n width: 61.33,\n },\n }\n}\n"],"mappings":";AAEA,IAAa,IAAA,CAAgB,GAAc,MACrC,IAAiB,iBAEd,EAAM,EAAM,QAAQ,QAAQ,MAAM,IAAI,GAGlC,IAAA,CAAiB,GAAc,GAAoB,MAA0B;AACxF,QAAM,IAAc,IAAe,EAAM,QAAQ,QAAQ,OAAO,EAAM,QAAQ,QAAQ,MAChF,IAAY,IAAe,iBAAiB;AAElD,SAAO;AAAA,IACL,KAAK;AAAA,MACH,SAAS,IAAY,IAAY;AAAA,MACjC,QAAQ;AAAA,MACR,aAAa,IAAY,IAAY,EAAM,QAAQ;AAAA,MACnD,cAAc;AAAA,MACd,QAAQ;AAAA,MAER,GAAI,KAAa,EAAE,SAAS,YAAY;AAAA,MACxC,cAAc,IAAY,EAAM,GAAa,IAAI,IAAI,EAAM,QAAQ;AAAA,MAEnE,OAAO;AAAA,IACT;AAAA,IACA,WAAW;AAAA,MACT,SAAS,IAAY,IAAY;AAAA,MACjC,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AACF"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { formatCurrency as g } from "../../../../../core/utils/NumberFormatting.es.js";
|
|
2
|
+
import { getStepColor as l } from "../utils.es.js";
|
|
3
|
+
import u from "react";
|
|
4
|
+
import o from "@mui/material/Stack";
|
|
5
|
+
import { H3 as b, Text as m } from "@mxenabled/mxui";
|
|
6
|
+
import { CheckCircle as C, CircleIcon as I } from "@mxenabled/mx-icons";
|
|
7
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
8
|
+
import n from "@mui/material/Box";
|
|
9
|
+
var a = [
|
|
10
|
+
100,
|
|
11
|
+
500,
|
|
12
|
+
1e3
|
|
13
|
+
], S = [
|
|
14
|
+
0,
|
|
15
|
+
1,
|
|
16
|
+
2
|
|
17
|
+
], j = ({ slotData: d }) => {
|
|
18
|
+
const { completed_steps: s, label_1: p, label_2: h } = d, x = a.length === s;
|
|
19
|
+
return /* @__PURE__ */ t(o, {
|
|
20
|
+
sx: {
|
|
21
|
+
bgcolor: "success.lighter",
|
|
22
|
+
border: "1px solid",
|
|
23
|
+
borderColor: "success.main",
|
|
24
|
+
borderRadius: "8px",
|
|
25
|
+
gap: 16,
|
|
26
|
+
py: 16
|
|
27
|
+
},
|
|
28
|
+
children: [/* @__PURE__ */ t(o, {
|
|
29
|
+
sx: { px: 16 },
|
|
30
|
+
children: [/* @__PURE__ */ r(m, {
|
|
31
|
+
color: "text.secondary",
|
|
32
|
+
variant: "tiny",
|
|
33
|
+
children: p
|
|
34
|
+
}), /* @__PURE__ */ r(b, {
|
|
35
|
+
color: "success.dark",
|
|
36
|
+
children: h
|
|
37
|
+
})]
|
|
38
|
+
}), /* @__PURE__ */ r(o, {
|
|
39
|
+
sx: { height: 40 },
|
|
40
|
+
children: /* @__PURE__ */ t(o, {
|
|
41
|
+
sx: { flexDirection: "row" },
|
|
42
|
+
children: [S.map((e) => {
|
|
43
|
+
const c = e < s, f = c ? C : I;
|
|
44
|
+
return /* @__PURE__ */ t(u.Fragment, { children: [/* @__PURE__ */ r(n, { sx: (i) => ({
|
|
45
|
+
bgcolor: l(i, c),
|
|
46
|
+
height: 2,
|
|
47
|
+
mt: 12,
|
|
48
|
+
width: 54
|
|
49
|
+
}) }), /* @__PURE__ */ t(o, {
|
|
50
|
+
sx: {
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
width: 24
|
|
53
|
+
},
|
|
54
|
+
children: [/* @__PURE__ */ r(f, {
|
|
55
|
+
filled: !0,
|
|
56
|
+
size: 24,
|
|
57
|
+
sx: (i) => ({ color: l(i, c) })
|
|
58
|
+
}), /* @__PURE__ */ r(m, {
|
|
59
|
+
color: c ? "text.primary" : "text.secondary",
|
|
60
|
+
variant: "caption",
|
|
61
|
+
children: g(a[e], "0")
|
|
62
|
+
})]
|
|
63
|
+
})] }, e);
|
|
64
|
+
}), /* @__PURE__ */ r(n, { sx: (e) => ({
|
|
65
|
+
bgcolor: l(e, x),
|
|
66
|
+
height: 2,
|
|
67
|
+
mt: 12,
|
|
68
|
+
width: 54
|
|
69
|
+
}) })]
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
j as default
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=WithText.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithText.es.js","names":[],"sources":["../../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { H3, Text } from '@mxenabled/mxui'\nimport { CheckCircle, CircleIcon } from '@mxenabled/mx-icons'\n\nimport { formatCurrency } from '../../../../../common'\nimport type { StepChartBlockData } from '../../../../../core/types/InsightsInstanceSlotData'\n\nimport { getStepColor } from '../utils'\n\nconst MILESTONES = [100, 500, 1000] as const\nconst MILESTONE_INDICES = [0, 1, 2] as const\n\n// TODO: Update bgColor, borderColor, and color based on the variants.\n\nconst WithText = ({ slotData }: { slotData: StepChartBlockData }) => {\n const { completed_steps: completedSteps, label_1, label_2 } = slotData\n const allCompleted = MILESTONES.length === completedSteps\n\n return (\n <Stack\n sx={{\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n gap: 16,\n py: 16,\n }}\n >\n <Stack sx={{ px: 16 }}>\n <Text color=\"text.secondary\" variant=\"tiny\">\n {label_1}\n </Text>\n <H3 color=\"success.dark\">{label_2}</H3>\n </Stack>\n <Stack sx={{ height: 40 }}>\n <Stack sx={{ flexDirection: 'row' }}>\n {MILESTONE_INDICES.map((index) => {\n const completed = index < completedSteps\n const Icon = completed ? CheckCircle : CircleIcon\n\n return (\n <React.Fragment key={index}>\n <Box\n sx={(theme) => ({\n bgcolor: getStepColor(theme, completed),\n height: 2,\n mt: 12,\n width: 54,\n })}\n />\n <Stack sx={{ alignItems: 'center', width: 24 }}>\n <Icon\n filled={true}\n size={24}\n sx={(theme) => ({ color: getStepColor(theme, completed) })}\n />\n <Text color={completed ? 'text.primary' : 'text.secondary'} variant=\"caption\">\n {formatCurrency(MILESTONES[index], '0')}\n </Text>\n </Stack>\n </React.Fragment>\n )\n })}\n <Box\n sx={(theme) => ({\n bgcolor: getStepColor(theme, allCompleted),\n height: 2,\n mt: 12,\n width: 54,\n })}\n />\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default WithText\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAa;AAAA,EAAC;AAAA,EAAK;AAAA,EAAK;AAAI,GAC5B,IAAoB;AAAA,EAAC;AAAA,EAAG;AAAA,EAAG;AAAC,GAI5B,IAAA,CAAY,EAAE,UAAA,EAAA,MAAiD;AACnE,QAAM,EAAE,iBAAiB,GAAgB,SAAA,GAAS,SAAA,EAAA,IAAY,GACxD,IAAe,EAAW,WAAW;AAE3C,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MACd,KAAK;AAAA,MACL,IAAI;AAAA,IACN;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI,EAAE,IAAI,GAAG;AAAA,MAApB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAiB,SAAQ;AAAA,QAClC,UAAA;AAAA,MACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QAAI,OAAM;AAAA,QAAgB,UAAA;AAAA,MAAY,CAAA,CACjC;AAAA,IACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI,EAAE,QAAQ,GAAG;AAAA,MACtB,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI,EAAE,eAAe,MAAM;AAAA,QAAlC,UAAA,CACG,EAAkB,IAAA,CAAK,MAAU;AAChC,gBAAM,IAAY,IAAQ,GACpB,IAAO,IAAY,IAAc;AAEvC,iBACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD,EACE,IAAA,CAAK,OAAW;AAAA,YACd,SAAS,EAAa,GAAO,CAAS;AAAA,YACtC,QAAQ;AAAA,YACR,IAAI;AAAA,YACJ,OAAO;AAAA,UACT,GACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,YAAO,IAAI;AAAA,cAAE,YAAY;AAAA,cAAU,OAAO;AAAA,YAAG;AAAA,YAA7C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,cACE,QAAQ;AAAA,cACR,MAAM;AAAA,cACN,IAAA,CAAK,OAAW,EAAE,OAAO,EAAa,GAAO,CAAS,EAAE;AAAA,YACzD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAO,IAAY,iBAAiB;AAAA,cAAkB,SAAQ;AAAA,cACjE,UAAA,EAAe,EAAW,CAAA,GAAQ,GAAG;AAAA,YAClC,CAAA,CACD;AAAA,UACO,CAAA,CAAA,EAAA,GAnBK,CAmBL;AAAA,QAEpB,CAAC,GACD,gBAAA,EAAC,GAAD,EACE,IAAA,CAAK,OAAW;AAAA,UACd,SAAS,EAAa,GAAO,CAAY;AAAA,UACzC,QAAQ;AAAA,UACR,IAAI;AAAA,UACJ,OAAO;AAAA,QACT,GACD,CAAA,CACI;AAAA;IACF,CAAA,CACF;AAAA;AAEX"}
|