@mx-cartographer/experiences 9.3.8-alpha.al1 → 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 +14 -3
- 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/BudgetDetailsDrawer.es.js +95 -134
- package/dist/budgets/components/BudgetDetailsDrawer.es.js.map +1 -1
- package/dist/budgets/components/BudgetsEmptyState.es.js +7 -7
- package/dist/budgets/components/budgetdetails/AddSubBudget.es.js +56 -57
- package/dist/budgets/components/budgetdetails/AddSubBudget.es.js.map +1 -1
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js +34 -35
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js.map +1 -1
- package/dist/budgets/components/shared/BudgetAmount.d.ts +3 -7
- package/dist/budgets/components/shared/BudgetAmount.es.js +19 -40
- package/dist/budgets/components/shared/BudgetAmount.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
|
@@ -5,15 +5,15 @@ import { ContentAndDescription as g } from "./ContentAndDescription.es.js";
|
|
|
5
5
|
import "react";
|
|
6
6
|
import j from "@mui/material/Stack";
|
|
7
7
|
import { Fragment as u, jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
8
|
-
var R = ({ altLoadingText: a = "", asteriskText: l, beat: e, button: d = null, children: f, contentProps:
|
|
8
|
+
var R = ({ altLoadingText: a = "", asteriskText: l, beat: e, button: d = null, children: f, contentProps: n, errorText: p = "", feedback: i, header: c, isError: h = !1, isLoading: o = !1, isMini: t = !1 }) => /* @__PURE__ */ m(j, {
|
|
9
9
|
sx: { height: "100%" },
|
|
10
10
|
children: [/* @__PURE__ */ r(x, {
|
|
11
11
|
...c,
|
|
12
12
|
isMini: t,
|
|
13
13
|
title: e.html_title
|
|
14
|
-
}), h ? /* @__PURE__ */ r(s, { erroredText:
|
|
14
|
+
}), h ? /* @__PURE__ */ r(s, { erroredText: p }) : /* @__PURE__ */ m(u, { children: [
|
|
15
15
|
/* @__PURE__ */ r(g, {
|
|
16
|
-
...
|
|
16
|
+
...n,
|
|
17
17
|
asteriskText: l,
|
|
18
18
|
beat: e,
|
|
19
19
|
isLoading: o,
|
|
@@ -21,7 +21,7 @@ var R = ({ altLoadingText: a = "", asteriskText: l, beat: e, button: d = null, c
|
|
|
21
21
|
children: o ? /* @__PURE__ */ r(C, { altLoadingText: a }) : f
|
|
22
22
|
}),
|
|
23
23
|
!t && d,
|
|
24
|
-
|
|
24
|
+
i
|
|
25
25
|
] })]
|
|
26
26
|
});
|
|
27
27
|
export {
|
|
@@ -5,14 +5,14 @@ import { ContentAndDescriptionMUI as g } from "./ContentAndDescriptionMUI.es.js"
|
|
|
5
5
|
import "react";
|
|
6
6
|
import I from "@mui/material/Stack";
|
|
7
7
|
import { Fragment as U, jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
8
|
+
var E = ({ altLoadingText: a = "", asteriskText: l, beat: e, button: d = null, children: f, contentProps: p, errorText: n = "", feedback: i, header: c, isError: h = !1, isLoading: o = !1, isMini: t = !1 }) => /* @__PURE__ */ m(I, {
|
|
9
9
|
gap: 12,
|
|
10
10
|
sx: { height: "100%" },
|
|
11
11
|
children: [/* @__PURE__ */ r(C, {
|
|
12
12
|
...c,
|
|
13
13
|
isMini: t,
|
|
14
14
|
title: e.html_title
|
|
15
|
-
}), h ? /* @__PURE__ */ r(s, { erroredText:
|
|
15
|
+
}), h ? /* @__PURE__ */ r(s, { erroredText: n }) : /* @__PURE__ */ m(U, { children: [
|
|
16
16
|
/* @__PURE__ */ r(g, {
|
|
17
17
|
...p,
|
|
18
18
|
asteriskText: l,
|
|
@@ -22,11 +22,11 @@ var F = ({ altLoadingText: a = "", asteriskText: l, beat: e, button: d = null, c
|
|
|
22
22
|
children: o ? /* @__PURE__ */ r(x, { altLoadingText: a }) : f
|
|
23
23
|
}),
|
|
24
24
|
!t && d,
|
|
25
|
-
|
|
25
|
+
i
|
|
26
26
|
] })]
|
|
27
27
|
});
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
E as BeatCardMUI
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
//# sourceMappingURL=BeatCardMUI.es.js.map
|
|
@@ -3,7 +3,7 @@ import { Description as a } from "./Description.es.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import x from "@mui/material/Stack";
|
|
5
5
|
import { Text as d } from "@mxenabled/mxui";
|
|
6
|
-
import { Fragment as
|
|
6
|
+
import { Fragment as g, jsx as r, jsxs as D } from "react/jsx-runtime";
|
|
7
7
|
var b = ({ asteriskText: o, beat: t, children: c, descriptionPlacement: n = "bottom", hideDescription: s = !1, isLoading: l = !1, isMini: i = !1, hasFullWidthImage: e, sx: m }) => {
|
|
8
8
|
const p = () => s || !t.html_description ? null : i ? /* @__PURE__ */ r(f, {
|
|
9
9
|
content: t.html_description,
|
|
@@ -14,7 +14,7 @@ var b = ({ asteriskText: o, beat: t, children: c, descriptionPlacement: n = "bot
|
|
|
14
14
|
hasFullWidthImage: e,
|
|
15
15
|
sx: m
|
|
16
16
|
});
|
|
17
|
-
return /* @__PURE__ */ g
|
|
17
|
+
return /* @__PURE__ */ D(g, { children: [
|
|
18
18
|
n === "top" && p(),
|
|
19
19
|
/* @__PURE__ */ r(x, {
|
|
20
20
|
sx: {
|
|
@@ -3,7 +3,7 @@ import { DescriptionMUI as a } from "./DescriptionMUI.es.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import x from "@mui/material/Stack";
|
|
5
5
|
import { Text as d } from "@mxenabled/mxui";
|
|
6
|
-
import { Fragment as
|
|
6
|
+
import { Fragment as g, jsx as r, jsxs as D } from "react/jsx-runtime";
|
|
7
7
|
var y = ({ asteriskText: o, beat: t, children: n, descriptionPlacement: i = "bottom", hideDescription: s = !1, isLoading: f = !1, isMini: e = !1, hasFullWidthImage: m, sx: p }) => {
|
|
8
8
|
const c = () => s || !t.html_description ? null : e ? /* @__PURE__ */ r(l, {
|
|
9
9
|
content: t.html_description,
|
|
@@ -14,7 +14,7 @@ var y = ({ asteriskText: o, beat: t, children: n, descriptionPlacement: i = "bot
|
|
|
14
14
|
hasFullWidthImage: m,
|
|
15
15
|
sx: p
|
|
16
16
|
});
|
|
17
|
-
return /* @__PURE__ */ g
|
|
17
|
+
return /* @__PURE__ */ D(g, { children: [
|
|
18
18
|
i === "top" && c(),
|
|
19
19
|
n && /* @__PURE__ */ r(x, {
|
|
20
20
|
sx: {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useState as g } from "react";
|
|
2
2
|
import { Icon as I } from "@mxenabled/mx-icons";
|
|
3
|
-
import { Fragment as z, jsx as
|
|
3
|
+
import { Fragment as z, jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
import M from "@mui/material/IconButton";
|
|
5
5
|
import v from "@mui/material/ListItemText";
|
|
6
6
|
import L from "@mui/material/ListItemIcon";
|
|
7
7
|
import O from "@mui/material/MenuItem";
|
|
8
8
|
import S from "@mui/material/Menu";
|
|
9
|
-
var
|
|
10
|
-
const [
|
|
11
|
-
e(), p(
|
|
9
|
+
var P = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p, onOpen: c, tabIndex: h = 0, ...d }) => {
|
|
10
|
+
const [n, i] = g(null), e = () => i(null), f = (t, r) => {
|
|
11
|
+
e(), p(t, r);
|
|
12
12
|
};
|
|
13
|
-
return /* @__PURE__ */ a(z, { children: [/* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ a(z, { children: [/* @__PURE__ */ o(M, {
|
|
14
14
|
"aria-hidden": l,
|
|
15
15
|
"aria-label": m,
|
|
16
|
-
onClick: (
|
|
17
|
-
|
|
16
|
+
onClick: (t) => {
|
|
17
|
+
i(t.currentTarget), c();
|
|
18
18
|
},
|
|
19
19
|
sx: {
|
|
20
20
|
position: "relative !important",
|
|
@@ -22,7 +22,7 @@ var T = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p,
|
|
|
22
22
|
},
|
|
23
23
|
tabIndex: h,
|
|
24
24
|
...d,
|
|
25
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ o(I, {
|
|
26
26
|
name: "more_horiz",
|
|
27
27
|
size: 24,
|
|
28
28
|
sx: {
|
|
@@ -30,27 +30,27 @@ var T = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p,
|
|
|
30
30
|
fontVariationSettings: "initial"
|
|
31
31
|
}
|
|
32
32
|
})
|
|
33
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ o(S, {
|
|
34
34
|
MenuListProps: { sx: { width: 212 } },
|
|
35
|
-
anchorEl:
|
|
35
|
+
anchorEl: n,
|
|
36
36
|
anchorOrigin: {
|
|
37
37
|
horizontal: "right",
|
|
38
38
|
vertical: "top"
|
|
39
39
|
},
|
|
40
40
|
disableScrollLock: !0,
|
|
41
41
|
onClose: e,
|
|
42
|
-
open: !!
|
|
42
|
+
open: !!n,
|
|
43
43
|
transformOrigin: {
|
|
44
44
|
horizontal: "right",
|
|
45
45
|
vertical: "top"
|
|
46
46
|
},
|
|
47
|
-
children: s.map(({ icon:
|
|
47
|
+
children: s.map(({ icon: t, key: r, text: u }, x) => /* @__PURE__ */ a(O, {
|
|
48
48
|
onClick: () => f(x, r),
|
|
49
49
|
sx: { p: 12 },
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ o(L, {
|
|
51
51
|
sx: { minWidth: "32px !important" },
|
|
52
|
-
children:
|
|
53
|
-
}), /* @__PURE__ */
|
|
52
|
+
children: t
|
|
53
|
+
}), /* @__PURE__ */ o(v, {
|
|
54
54
|
primary: u,
|
|
55
55
|
slotProps: { primary: {
|
|
56
56
|
fontWeight: "normal",
|
|
@@ -62,7 +62,7 @@ var T = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p,
|
|
|
62
62
|
})] });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
P as MenuAction
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
//# sourceMappingURL=MenuAction.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatValueByType: (value: number, type: string, format: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonUtils.es.js","names":[],"sources":["../../src/insights-v2/CommonUtils.ts"],"sourcesContent":["import { formatCurrency } from '../core/utils/NumberFormatting'\n\nexport const formatValueByType = (value: number, type: string, format: string): string => {\n if (type === 'amount') return formatCurrency(value, format)\n if (type === 'percent') return `${value}%`\n return String(value)\n}\n"],"mappings":";AAEA,IAAa,IAAA,CAAqB,GAAe,GAAc,MACzD,MAAS,WAAiB,EAAe,GAAO,CAAM,IACtD,MAAS,YAAkB,GAAG,CAAA,MAC3B,OAAO,CAAK"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useInsightsV2Store as g } from "../../../../common/context/hooks.es.js";
|
|
2
|
+
import { formatCurrency as C } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import { BarChartV2 as B } from "../../../components/chartblocks/BarchartV2.es.js";
|
|
4
|
+
import { EmptyBarChart as _ } from "../../../components/chartblocks/EmptyBarChart.es.js";
|
|
5
|
+
import { barChartVariant as v, buildChartData as x, buildDataSeries as D } from "./utils.es.js";
|
|
6
|
+
import y from "react";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
import { useTheme as A } from "@mui/material/styles";
|
|
9
|
+
var E = ({ payload: n, beatGuid: m = "" }) => {
|
|
10
|
+
const s = A(), { openChartDrilldown: c } = g(), { instance_slot: i, instance_slot_data: r } = n, { data_series: l, ariaLabel: h = "", average_amount: e = 0, legends: d = [] } = r, t = x(D(l), h), [p] = y.useState(t.length - 1), { color: u } = v(i, r, s), [f, b] = d.map((a) => a.label);
|
|
11
|
+
return t.length ? /* @__PURE__ */ o(B, {
|
|
12
|
+
amounts: {
|
|
13
|
+
average: e,
|
|
14
|
+
formattedAverage: C(e, "0,0")
|
|
15
|
+
},
|
|
16
|
+
color: u,
|
|
17
|
+
data: t,
|
|
18
|
+
monthlyAmountLabel: f,
|
|
19
|
+
onBarClick: (a) => c(m, { chartBarIndex: a }),
|
|
20
|
+
selectedTabIndex: p,
|
|
21
|
+
trendAmountLabel: b
|
|
22
|
+
}) : /* @__PURE__ */ o(_, {});
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
E as BarchartBlock
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=BarchartBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarchartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.tsx"],"sourcesContent":["import React from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { formatCurrency, useInsightsV2Store } from '../../../../common'\nimport type { DataSeries } from '../../../../core'\nimport type { BarChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport { BarChartV2 } from '../../../components/chartblocks/BarchartV2'\nimport { EmptyBarChart } from '../../../components/chartblocks/EmptyBarChart'\n\nimport type { BlockProps } from '../../types'\n\nimport { barChartVariant, buildChartData, buildDataSeries } from './utils'\n\nexport const BarchartBlock = ({ payload, beatGuid = '' }: BlockProps<BarChartBlockData>) => {\n const theme = useTheme()\n const { openChartDrilldown } = useInsightsV2Store()\n const { instance_slot, instance_slot_data } = payload\n const { data_series, ariaLabel = '', average_amount = 0, legends = [] } = instance_slot_data\n const chartData = buildChartData(buildDataSeries(data_series as DataSeries), ariaLabel)\n const [selectedTabIndex] = React.useState(chartData.length - 1)\n const { color } = barChartVariant(instance_slot, instance_slot_data, theme)\n\n const [monthlyAmountLabel, trendAmountLabel] = legends.map((legend) => legend.label)\n\n return chartData.length ? (\n <BarChartV2\n amounts={{\n average: average_amount,\n formattedAverage: formatCurrency(average_amount, '0,0'),\n }}\n color={color}\n data={chartData}\n monthlyAmountLabel={monthlyAmountLabel}\n onBarClick={(index) => openChartDrilldown(beatGuid, { chartBarIndex: index })}\n selectedTabIndex={selectedTabIndex}\n trendAmountLabel={trendAmountLabel}\n />\n ) : (\n <EmptyBarChart />\n )\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,IAAA,CAAiB,EAAE,SAAA,GAAS,UAAA,IAAW,GAAA,MAAwC;AAC1F,QAAM,IAAQ,EAAS,GACjB,EAAE,oBAAA,EAAA,IAAuB,EAAmB,GAC5C,EAAE,eAAA,GAAe,oBAAA,EAAA,IAAuB,GACxC,EAAE,aAAA,GAAa,WAAA,IAAY,IAAI,gBAAA,IAAiB,GAAG,SAAA,IAAU,CAAC,EAAA,IAAM,GACpE,IAAY,EAAe,EAAgB,CAAyB,GAAG,CAAS,GAChF,CAAC,CAAA,IAAoB,EAAM,SAAS,EAAU,SAAS,CAAC,GACxD,EAAE,OAAA,EAAA,IAAU,EAAgB,GAAe,GAAoB,CAAK,GAEpE,CAAC,GAAoB,CAAA,IAAoB,EAAQ,IAAA,CAAK,MAAW,EAAO,KAAK;AAEnF,SAAO,EAAU,SACf,gBAAA,EAAC,GAAD;AAAA,IACE,SAAS;AAAA,MACP,SAAS;AAAA,MACT,kBAAkB,EAAe,GAAgB,KAAK;AAAA,IACxD;AAAA,IACO,OAAA;AAAA,IACP,MAAM;AAAA,IACc,oBAAA;AAAA,IACpB,YAAA,CAAa,MAAU,EAAmB,GAAU,EAAE,eAAe,EAAM,CAAC;AAAA,IAC1D,kBAAA;AAAA,IACA,kBAAA;AAAA,EACnB,CAAA,IAED,gBAAA,EAAC,GAAD,CAAgB,CAAA;AAEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BarchartBlock } from './BarchartBlock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles'\nexport const getLayoutConfig = (theme: Theme) => {\n return {\n SavingsAccountBalancesSummary: {\n color: theme.palette.success.main,\n },\n MonthlySpendComparison: {\n color: theme.palette.chart.chart5,\n },\n }\n}\n"],"mappings":"AACA,IAAa,IAAA,CAAmB,OACvB;AAAA,EACL,+BAA+B,EAC7B,OAAO,EAAM,QAAQ,QAAQ,KAC/B;AAAA,EACA,wBAAwB,EACtB,OAAO,EAAM,QAAQ,MAAM,OAC7B;AACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { DataSeries, InstanceSlot } from '../../../../core';
|
|
3
|
+
import { InsightsInstanceSlotData } from '../../../../core/types/InsightsInstanceSlotData';
|
|
4
|
+
export declare const BAR_CHART_VARIANTS: {
|
|
5
|
+
CATEGORY_COLOR: string;
|
|
6
|
+
SAVINGS_ACCOUNT_BALANCES_SUMMARY: string;
|
|
7
|
+
MONTHLY_SPEND_COMPARISON: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const buildDataSeries: (data: DataSeries | undefined) => any[];
|
|
10
|
+
export declare const buildChartData: (dataSeries: any[], ariaLabel: string) => {
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: any;
|
|
14
|
+
formattedAmount: string;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const barChartVariant: (instanceSlot: InstanceSlot, instanceSlotData: InsightsInstanceSlotData, theme: Theme) => {
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { buildDynamicCopy as m } from "../../../../core/utils/Localization.es.js";
|
|
2
|
+
import { DATE_FORMATS_INTL as i, formatDate as u } from "../../../../core/constants/DateFormats.es.js";
|
|
3
|
+
import { getCategoryColor as C } from "../../../../core/utils/CategoryUtil.es.js";
|
|
4
|
+
import { formatCurrency as n } from "../../../../core/utils/NumberFormatting.es.js";
|
|
5
|
+
import { getLayoutConfig as A } from "./layout.es.js";
|
|
6
|
+
var p = {
|
|
7
|
+
CATEGORY_COLOR: "CategoryColor",
|
|
8
|
+
SAVINGS_ACCOUNT_BALANCES_SUMMARY: "SavingsAccountBalancesSummary",
|
|
9
|
+
MONTHLY_SPEND_COMPARISON: "MonthlySpendComparison"
|
|
10
|
+
}, y = (a) => a ? a.data ? a.data.map((t) => {
|
|
11
|
+
const r = {};
|
|
12
|
+
return a.names?.map((o, e) => {
|
|
13
|
+
r[o] = t[e];
|
|
14
|
+
}), r;
|
|
15
|
+
}) : [] : [], S = (a, t) => a.map((r) => {
|
|
16
|
+
const o = u(r.date, i.MONTH_SHORT);
|
|
17
|
+
return {
|
|
18
|
+
ariaLabel: m(t, o, n(r.amount, "0.00")),
|
|
19
|
+
label: o,
|
|
20
|
+
value: r.amount,
|
|
21
|
+
formattedAmount: n(r.amount, "0,0")
|
|
22
|
+
};
|
|
23
|
+
}), R = (a, t, r) => {
|
|
24
|
+
const { variant: o } = a, e = A(r);
|
|
25
|
+
return o === p.CATEGORY_COLOR && t.category_guid ? { color: C(t.category_guid, r) } : { color: e[o]?.color ?? r.palette.primary.main };
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
p as BAR_CHART_VARIANTS,
|
|
29
|
+
R as barChartVariant,
|
|
30
|
+
S as buildChartData,
|
|
31
|
+
y as buildDataSeries
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=utils.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles'\n\nimport { getCategoryColor } from '../../../../core/utils/CategoryUtil'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../../core/constants'\nimport type { DataSeries, InstanceSlot } from '../../../../core'\nimport type { InsightsInstanceSlotData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { getLayoutConfig } from './layout'\n\nexport const BAR_CHART_VARIANTS = {\n CATEGORY_COLOR: 'CategoryColor',\n SAVINGS_ACCOUNT_BALANCES_SUMMARY: 'SavingsAccountBalancesSummary',\n MONTHLY_SPEND_COMPARISON: 'MonthlySpendComparison',\n}\n\nexport const buildDataSeries = (data: DataSeries | undefined) => {\n if (!data) {\n return []\n }\n\n if (data.data) {\n return data.data.map((d) => {\n const item: any = {}\n\n data.names?.map((name, index) => {\n item[name] = d[index]\n })\n return item\n })\n } else {\n return []\n }\n}\n\nexport const buildChartData = (dataSeries: any[], ariaLabel: string) => {\n const data = dataSeries.map((total) => {\n const label = formatDate(total.date, DATE_FORMATS_INTL.MONTH_SHORT)\n\n return {\n ariaLabel: buildDynamicCopy(ariaLabel, label, formatCurrency(total.amount, '0.00')) as string,\n label,\n value: total.amount,\n formattedAmount: formatCurrency(total.amount, '0,0'),\n }\n })\n\n return data\n}\n\nexport const barChartVariant = (\n instanceSlot: InstanceSlot,\n instanceSlotData: InsightsInstanceSlotData,\n theme: Theme,\n) => {\n const { variant } = instanceSlot\n const barChartLayout = getLayoutConfig(theme)\n if (variant === BAR_CHART_VARIANTS.CATEGORY_COLOR && instanceSlotData.category_guid) {\n const categoryColor = getCategoryColor(instanceSlotData.category_guid, theme)\n return {\n color: categoryColor,\n }\n }\n return {\n color:\n barChartLayout[variant as keyof typeof barChartLayout]?.color ?? theme.palette.primary.main,\n }\n}\n"],"mappings":";;;;;AAUA,IAAa,IAAqB;AAAA,EAChC,gBAAgB;AAAA,EAChB,kCAAkC;AAAA,EAClC,0BAA0B;AAC5B,GAEa,IAAA,CAAmB,MACzB,IAID,EAAK,OACA,EAAK,KAAK,IAAA,CAAK,MAAM;AAC1B,QAAM,IAAY,CAAC;AAEnB,SAAA,EAAK,OAAO,IAAA,CAAK,GAAM,MAAU;AAC/B,IAAA,EAAK,CAAA,IAAQ,EAAE,CAAA;AAAA,EACjB,CAAC,GACM;AACT,CAAC,IAEM,CAAC,IAbD,CAAC,GAiBC,IAAA,CAAkB,GAAmB,MACnC,EAAW,IAAA,CAAK,MAAU;AACrC,QAAM,IAAQ,EAAW,EAAM,MAAM,EAAkB,WAAW;AAElE,SAAO;AAAA,IACL,WAAW,EAAiB,GAAW,GAAO,EAAe,EAAM,QAAQ,MAAM,CAAC;AAAA,IAClF,OAAA;AAAA,IACA,OAAO,EAAM;AAAA,IACb,iBAAiB,EAAe,EAAM,QAAQ,KAAK;AAAA,EACrD;AACF,CAEO,GAGI,IAAA,CACX,GACA,GACA,MACG;AACH,QAAM,EAAE,SAAA,EAAA,IAAY,GACd,IAAiB,EAAgB,CAAK;AAC5C,SAAI,MAAY,EAAmB,kBAAkB,EAAiB,gBAE7D,EACL,OAFoB,EAAiB,EAAiB,eAAe,CAE9D,EACT,IAEK,EACL,OACE,EAAe,CAAA,GAAyC,SAAS,EAAM,QAAQ,QAAQ,KAC3F;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface DonutSegment {
|
|
2
|
+
color: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
labelValue?: React.ReactNode;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
interface DonutChartV2Props {
|
|
8
|
+
data: DonutSegment[];
|
|
9
|
+
centerLabel?: string;
|
|
10
|
+
centerValue: string;
|
|
11
|
+
}
|
|
12
|
+
declare const DonutChartV2: ({ data, centerLabel, centerValue }: DonutChartV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default DonutChartV2;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import o from "@mui/material/Stack";
|
|
2
|
+
import { Text as l } from "@mxenabled/mxui";
|
|
3
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import c from "@mui/material/Box";
|
|
5
|
+
import { PieChart as m } from "@mui/x-charts/PieChart";
|
|
6
|
+
var w = ({ data: n, centerLabel: a, centerValue: h }) => {
|
|
7
|
+
const d = n.some((t) => t.label && t.labelValue), r = !d, u = n.map((t, s) => ({
|
|
8
|
+
id: s,
|
|
9
|
+
color: t.color,
|
|
10
|
+
value: t.value
|
|
11
|
+
})), x = r ? 30 : 53, p = r ? 35 : 63, f = 2, b = () => r ? "body1" : a ? "h3" : "h2";
|
|
12
|
+
return /* @__PURE__ */ i(o, {
|
|
13
|
+
sx: {
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
flexDirection: "row",
|
|
16
|
+
px: 16,
|
|
17
|
+
py: 4
|
|
18
|
+
},
|
|
19
|
+
children: [/* @__PURE__ */ i(c, {
|
|
20
|
+
sx: {
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
display: "flex",
|
|
23
|
+
justifyContent: "center",
|
|
24
|
+
position: "relative"
|
|
25
|
+
},
|
|
26
|
+
children: [/* @__PURE__ */ e(m, {
|
|
27
|
+
height: r ? 72 : 125,
|
|
28
|
+
series: [{
|
|
29
|
+
cornerRadius: f,
|
|
30
|
+
data: u,
|
|
31
|
+
innerRadius: x,
|
|
32
|
+
outerRadius: p
|
|
33
|
+
}],
|
|
34
|
+
slots: { tooltip: () => null },
|
|
35
|
+
width: r ? 72 : 125
|
|
36
|
+
}), /* @__PURE__ */ i(c, {
|
|
37
|
+
sx: {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
textAlign: "center"
|
|
40
|
+
},
|
|
41
|
+
children: [/* @__PURE__ */ e(l, {
|
|
42
|
+
sx: { ...r && { fontWeight: 600 } },
|
|
43
|
+
variant: b(),
|
|
44
|
+
children: h
|
|
45
|
+
}), a && /* @__PURE__ */ e(l, {
|
|
46
|
+
sx: { color: "text.secondary" },
|
|
47
|
+
variant: r ? "caption" : "body2",
|
|
48
|
+
children: a
|
|
49
|
+
})]
|
|
50
|
+
})]
|
|
51
|
+
}), d && /* @__PURE__ */ e(o, {
|
|
52
|
+
sx: {
|
|
53
|
+
gap: 24,
|
|
54
|
+
pl: 24
|
|
55
|
+
},
|
|
56
|
+
children: n.map((t, s) => t.label && t.labelValue && /* @__PURE__ */ i(o, { children: [/* @__PURE__ */ i(o, {
|
|
57
|
+
sx: {
|
|
58
|
+
gap: 8,
|
|
59
|
+
flexDirection: "row",
|
|
60
|
+
alignItems: "center"
|
|
61
|
+
},
|
|
62
|
+
children: [/* @__PURE__ */ e(c, { sx: {
|
|
63
|
+
backgroundColor: t.color,
|
|
64
|
+
borderRadius: "2px",
|
|
65
|
+
height: 12,
|
|
66
|
+
width: 12
|
|
67
|
+
} }), /* @__PURE__ */ e(l, {
|
|
68
|
+
sx: { fontWeight: 400 },
|
|
69
|
+
variant: "subtitle2",
|
|
70
|
+
children: t.label
|
|
71
|
+
})]
|
|
72
|
+
}), /* @__PURE__ */ e(l, {
|
|
73
|
+
sx: {
|
|
74
|
+
fontWeight: 400,
|
|
75
|
+
pl: 20
|
|
76
|
+
},
|
|
77
|
+
variant: "subtitle2",
|
|
78
|
+
children: t.labelValue
|
|
79
|
+
})] }, s))
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
w as default
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
//# sourceMappingURL=DonutChart.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonutChart.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { Text } from '@mxenabled/mxui'\nimport { PieChart } from '@mui/x-charts/PieChart'\ninterface DonutSegment {\n color: string\n label?: string\n labelValue?: React.ReactNode\n value: number\n}\n\ninterface DonutChartV2Props {\n data: DonutSegment[]\n centerLabel?: string\n centerValue: string\n}\n\nconst DonutChartV2 = ({ data, centerLabel, centerValue }: DonutChartV2Props) => {\n const hasLegend = data.some((segment) => segment.label && segment.labelValue)\n const isEmbedded = !hasLegend\n\n const chartData = data.map((item, index) => ({\n id: index,\n color: item.color,\n value: item.value,\n }))\n const innerRadius = isEmbedded ? 30 : 53\n const outerRadius = isEmbedded ? 35 : 63\n const cornerRadius = 2\n\n const getCenterValueVariant = () => {\n if (isEmbedded) return 'body1'\n if (centerLabel) return 'h3'\n return 'h2'\n }\n\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', px: 16, py: 4 }}>\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n position: 'relative',\n }}\n >\n <PieChart\n height={isEmbedded ? 72 : 125}\n series={[\n {\n cornerRadius,\n data: chartData,\n innerRadius,\n outerRadius,\n },\n ]}\n slots={{ tooltip: () => null }}\n width={isEmbedded ? 72 : 125}\n />\n\n <Box sx={{ position: 'absolute', textAlign: 'center' }}>\n <Text sx={{ ...(isEmbedded && { fontWeight: 600 }) }} variant={getCenterValueVariant()}>\n {centerValue}\n </Text>\n {centerLabel && (\n <Text sx={{ color: 'text.secondary' }} variant={isEmbedded ? 'caption' : 'body2'}>\n {centerLabel}\n </Text>\n )}\n </Box>\n </Box>\n\n {hasLegend && (\n <Stack sx={{ gap: 24, pl: 24 }}>\n {data.map(\n (segment, index) =>\n segment.label &&\n segment.labelValue && (\n <Stack key={index}>\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n <Box\n sx={{\n backgroundColor: segment.color,\n borderRadius: '2px',\n height: 12,\n width: 12,\n }}\n />\n <Text sx={{ fontWeight: 400 }} variant=\"subtitle2\">\n {segment.label}\n </Text>\n </Stack>\n <Text sx={{ fontWeight: 400, pl: 20 }} variant=\"subtitle2\">\n {segment.labelValue}\n </Text>\n </Stack>\n ),\n )}\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default DonutChartV2\n"],"mappings":";;;;;AAiBA,IAAM,IAAA,CAAgB,EAAE,MAAA,GAAM,aAAA,GAAa,aAAA,EAAA,MAAqC;AAC9E,QAAM,IAAY,EAAK,KAAA,CAAM,MAAY,EAAQ,SAAS,EAAQ,UAAU,GACtE,IAAa,CAAC,GAEd,IAAY,EAAK,IAAA,CAAK,GAAM,OAAW;AAAA,IAC3C,IAAI;AAAA,IACJ,OAAO,EAAK;AAAA,IACZ,OAAO,EAAK;AAAA,EACd,EAAE,GACI,IAAc,IAAa,KAAK,IAChC,IAAc,IAAa,KAAK,IAChC,IAAe,GAEf,IAAA,MACA,IAAmB,UACnB,IAAoB,OACjB;AAGT,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,IAAI;AAAA,MAAI,IAAI;AAAA,IAAE;AAAA,IAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,UAAU;AAAA,MACZ;AAAA,MANF,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,QACE,QAAQ,IAAa,KAAK;AAAA,QAC1B,QAAQ,CACN;AAAA,UACE,cAAA;AAAA,UACA,MAAM;AAAA,UACN,aAAA;AAAA,UACA,aAAA;AAAA,QACF,CACF;AAAA,QACA,OAAO,EAAE,SAAA,MAAe,KAAK;AAAA,QAC7B,OAAO,IAAa,KAAK;AAAA,MAC1B,CAAA,GAED,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,UAAU;AAAA,UAAY,WAAW;AAAA,QAAS;AAAA,QAArD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,GAAI,KAAc,EAAE,YAAY,IAAI,EAAG;AAAA,UAAG,SAAS,EAAsB;AAAA,UAClF,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,OAAO,iBAAiB;AAAA,UAAG,SAAS,IAAa,YAAY;AAAA,UACtE,UAAA;AAAA,QACG,CAAA,CAEL;AAAA,MACF,CAAA,CAAA;AAAA,IAEJ,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,KAAK;AAAA,QAAI,IAAI;AAAA,MAAG;AAAA,MAC1B,UAAA,EAAK,IAAA,CACH,GAAS,MACR,EAAQ,SACR,EAAQ,cACN,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,KAAK;AAAA,UAAG,eAAe;AAAA,UAAO,YAAY;AAAA,QAAS;AAAA,QAAhE,UAAA,CACE,gBAAA,EAAC,GAAD,EACE,IAAI;AAAA,UACF,iBAAiB,EAAQ;AAAA,UACzB,cAAc;AAAA,UACd,QAAQ;AAAA,UACR,OAAO;AAAA,QACT,EACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,YAAY,IAAI;AAAA,UAAG,SAAQ;AAAA,UACpC,UAAA,EAAQ;AAAA,QACL,CAAA,CACD;AAAA,MACP,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI;AAAA,UAAE,YAAY;AAAA,UAAK,IAAI;AAAA,QAAG;AAAA,QAAG,SAAQ;AAAA,QAC5C,UAAA,EAAQ;AAAA,MACL,CAAA,CACD,EAAA,GAjBK,CAiBL,CAEb;AAAA,IACK,CAAA,CAEJ;AAAA;AAEX"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DonutChartBlockData } from '../../../../core/types/InsightsInstanceSlotData';
|
|
2
|
+
import { BlockProps } from '../../types';
|
|
3
|
+
declare const DonutChartBlock: ({ payload }: BlockProps<DonutChartBlockData>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default DonutChartBlock;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { formatValueByType as o } from "../../../CommonUtils.es.js";
|
|
2
|
+
import v from "./DonutChart.es.js";
|
|
3
|
+
import { getDonutChartColors as _ } from "./utils.es.js";
|
|
4
|
+
import { Fragment as b, jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import { useTheme as f } from "@mui/material/styles";
|
|
6
|
+
var D = ({ payload: r }) => {
|
|
7
|
+
const u = f(), { instance_slot: n, instance_slot_data: l } = r, { variant: i } = n, { legends: s = [], main: t } = l, m = _(i, l, u), c = s.map((a, p) => ({
|
|
8
|
+
value: a.value,
|
|
9
|
+
color: m[p],
|
|
10
|
+
label: a.label,
|
|
11
|
+
labelValue: /* @__PURE__ */ d(b, { children: [/* @__PURE__ */ e("b", { children: o(a.value, a.value_type, "0,0.00") }), a.additional_value && a.additional_value_type ? ` (${o(a.additional_value, a.additional_value_type, "0,0.00")})` : null] })
|
|
12
|
+
}));
|
|
13
|
+
return /* @__PURE__ */ e(v, {
|
|
14
|
+
centerLabel: t.label,
|
|
15
|
+
centerValue: o(Number(t.value), t.value_type, "0,0"),
|
|
16
|
+
data: c
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
D as default
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=DonutChartBlock.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonutChartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\n\nimport type { DonutChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport { formatValueByType } from '../../../CommonUtils'\n\nimport type { BlockProps } from '../../types'\n\nimport DonutChartV2 from './DonutChart'\nimport { getDonutChartColors } from './utils'\n\nconst DonutChartBlock = ({ payload }: BlockProps<DonutChartBlockData>) => {\n const theme = useTheme()\n const { instance_slot, instance_slot_data } = payload\n const { variant } = instance_slot\n const { legends = [], main } = instance_slot_data\n const colors = getDonutChartColors(variant, instance_slot_data, theme)\n\n const data = legends.map((legend: (typeof legends)[number], index: number) => ({\n value: legend.value,\n color: colors[index],\n label: legend.label,\n labelValue: (\n <>\n <b>{formatValueByType(legend.value, legend.value_type, '0,0.00')}</b>\n {legend.additional_value && legend.additional_value_type\n ? ` (${formatValueByType(legend.additional_value, legend.additional_value_type, '0,0.00')})`\n : null}\n </>\n ),\n }))\n\n return (\n <DonutChartV2\n centerLabel={main.label}\n centerValue={formatValueByType(Number(main.value), main.value_type, '0,0')}\n data={data}\n />\n )\n}\n\nexport default DonutChartBlock\n"],"mappings":";;;;;AAWA,IAAM,IAAA,CAAmB,EAAE,SAAA,EAAA,MAA+C;AACxE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,GAAe,oBAAA,EAAA,IAAuB,GACxC,EAAE,SAAA,EAAA,IAAY,GACd,EAAE,SAAA,IAAU,CAAC,GAAG,MAAA,EAAA,IAAS,GACzB,IAAS,EAAoB,GAAS,GAAoB,CAAK,GAE/D,IAAO,EAAQ,IAAA,CAAK,GAAkC,OAAmB;AAAA,IAC7E,OAAO,EAAO;AAAA,IACd,OAAO,EAAO,CAAA;AAAA,IACd,OAAO,EAAO;AAAA,IACd,YACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,KAAD,EAAA,UAAI,EAAkB,EAAO,OAAO,EAAO,YAAY,QAAQ,EAAK,CAAA,GACnE,EAAO,oBAAoB,EAAO,wBAC/B,KAAK,EAAkB,EAAO,kBAAkB,EAAO,uBAAuB,QAAQ,CAAA,MACtF,IACJ,EAAA,CAAA;AAAA,EAEN,EAAE;AAEF,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,aAAa,EAAK;AAAA,IAClB,aAAa,EAAkB,OAAO,EAAK,KAAK,GAAG,EAAK,YAAY,KAAK;AAAA,IACnE,MAAA;AAAA,EACP,CAAA;AAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DonutChartBlock';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
export declare const getLayoutConfig: (theme: Theme) => {
|
|
3
|
+
CostOfLivingToIncome: {
|
|
4
|
+
secondaryColor: string;
|
|
5
|
+
};
|
|
6
|
+
MonthlyDepositSummaryV2: {
|
|
7
|
+
colors: string[];
|
|
8
|
+
};
|
|
9
|
+
MonthlyNonEssentialCategorySummaryV2: {
|
|
10
|
+
colors: (string | undefined)[];
|
|
11
|
+
};
|
|
12
|
+
CreditCardCloseToLimit: {
|
|
13
|
+
colors: string[];
|
|
14
|
+
};
|
|
15
|
+
CreditUtilization: {
|
|
16
|
+
dynamicPrimary: string;
|
|
17
|
+
secondaryColor: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var t = (o) => ({
|
|
2
|
+
CostOfLivingToIncome: { secondaryColor: o.palette.divider },
|
|
3
|
+
MonthlyDepositSummaryV2: { colors: [o.palette.success.main, o.palette.success.light] },
|
|
4
|
+
MonthlyNonEssentialCategorySummaryV2: { colors: [o.palette.chartMono.chartMono3, o.palette.chartMono.chartMono5] },
|
|
5
|
+
CreditCardCloseToLimit: { colors: [o.palette.warning.main, o.palette.divider] },
|
|
6
|
+
CreditUtilization: {
|
|
7
|
+
dynamicPrimary: "creditUtilization",
|
|
8
|
+
secondaryColor: o.palette.divider
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
t as getLayoutConfig
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles'\nexport const getLayoutConfig = (theme: Theme) => {\n return {\n CostOfLivingToIncome: {\n secondaryColor: theme.palette.divider,\n },\n MonthlyDepositSummaryV2: {\n colors: [theme.palette.success.main, theme.palette.success.light],\n },\n MonthlyNonEssentialCategorySummaryV2: {\n colors: [theme.palette.chartMono.chartMono3, theme.palette.chartMono.chartMono5],\n },\n CreditCardCloseToLimit: {\n colors: [theme.palette.warning.main, theme.palette.divider],\n },\n CreditUtilization: {\n dynamicPrimary: 'creditUtilization',\n secondaryColor: theme.palette.divider,\n },\n }\n}\n"],"mappings":"AACA,IAAa,IAAA,CAAmB,OACvB;AAAA,EACL,sBAAsB,EACpB,gBAAgB,EAAM,QAAQ,QAChC;AAAA,EACA,yBAAyB,EACvB,QAAQ,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,QAAQ,KAAK,EAClE;AAAA,EACA,sCAAsC,EACpC,QAAQ,CAAC,EAAM,QAAQ,UAAU,YAAY,EAAM,QAAQ,UAAU,UAAU,EACjF;AAAA,EACA,wBAAwB,EACtB,QAAQ,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,OAAO,EAC5D;AAAA,EACA,mBAAmB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB,EAAM,QAAQ;AAAA,EAChC;AACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { InsightsInstanceSlotData } from '../../../../core/types/InsightsInstanceSlotData';
|
|
3
|
+
export declare const getDonutChartColors: (variant: string | null, blockData: InsightsInstanceSlotData, theme: Theme) => [string, string];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getCategoryColor as a } from "../../../../core/utils/CategoryUtil.es.js";
|
|
2
|
+
import { getLayoutConfig as t } from "./layout.es.js";
|
|
3
|
+
var g = (n, i, o) => {
|
|
4
|
+
const r = t(o)[n];
|
|
5
|
+
return "dynamicPrimary" in r && r.dynamicPrimary === "creditUtilization" ? [Number(i.main?.value ?? 0) > 30 ? o.palette.error.main : o.palette.warning.main, r.secondaryColor] : "secondaryColor" in r ? [a(i.category_guid ?? "", o), r.secondaryColor] : r.colors;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
g as getDonutChartColors
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=utils.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles'\nimport { getCategoryColor } from '../../../../core/utils/CategoryUtil'\nimport { getLayoutConfig } from './layout'\nimport type { InsightsInstanceSlotData } from '../../../../core/types/InsightsInstanceSlotData'\n\nexport const getDonutChartColors = (\n variant: string | null,\n blockData: InsightsInstanceSlotData,\n theme: Theme,\n): [string, string] => {\n const layouts = getLayoutConfig(theme)\n const variantConfig = layouts[variant as keyof ReturnType<typeof getLayoutConfig>] as\n | { dynamicPrimary: string; secondaryColor: string }\n | { secondaryColor: string }\n | { colors: [string, string] }\n\n if ('dynamicPrimary' in variantConfig && variantConfig.dynamicPrimary === 'creditUtilization') {\n const utilization = Number(blockData.main?.value ?? 0)\n const primaryColor = utilization > 30 ? theme.palette.error.main : theme.palette.warning.main\n return [primaryColor, variantConfig.secondaryColor]\n }\n\n if ('secondaryColor' in variantConfig) {\n const categoryColor = getCategoryColor(blockData.category_guid ?? '', theme)\n return [categoryColor, variantConfig.secondaryColor]\n }\n\n return variantConfig.colors\n}\n"],"mappings":";;AAKA,IAAa,IAAA,CACX,GACA,GACA,MACqB;AAErB,QAAM,IADU,EAAgB,CACV,EAAQ,CAAA;AAK9B,SAAI,oBAAoB,KAAiB,EAAc,mBAAmB,sBAGjE,CAFa,OAAO,EAAU,MAAM,SAAS,CAC/B,IAAc,KAAK,EAAM,QAAQ,MAAM,OAAO,EAAM,QAAQ,QAAQ,MACnE,EAAc,cAAc,IAGhD,oBAAoB,IAEf,CADe,EAAiB,EAAU,iBAAiB,IAAI,CAC9D,GAAe,EAAc,cAAc,IAG9C,EAAc;AACvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material/styles';
|
|
2
|
+
import { LegendProps } from '../../../../core/types/InsightsInstanceSlotData';
|
|
3
|
+
export interface LegendComponentProps {
|
|
4
|
+
legendItems: LegendProps[];
|
|
5
|
+
legendStyle?: SxProps;
|
|
6
|
+
}
|
|
7
|
+
export declare const Legend: ({ legendItems, legendStyle }: LegendComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import a from "@mui/material/Stack";
|
|
2
|
+
import { Text as c } from "@mxenabled/mxui";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
var f = ({ legendItems: h, legendStyle: l }) => /* @__PURE__ */ t(a, {
|
|
5
|
+
sx: {
|
|
6
|
+
alignItems: "flex-start",
|
|
7
|
+
flexDirection: "row",
|
|
8
|
+
gap: 24,
|
|
9
|
+
justifyContent: "flex-start",
|
|
10
|
+
py: 4,
|
|
11
|
+
width: "100%",
|
|
12
|
+
...l
|
|
13
|
+
},
|
|
14
|
+
children: h.map(({ color: o, label: e, formattedAmount: i }, r) => e && /* @__PURE__ */ n(a, {
|
|
15
|
+
sx: {
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
gap: 8
|
|
19
|
+
},
|
|
20
|
+
children: [/* @__PURE__ */ t("svg", {
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
"aria-labelledby": r === 0 ? "chartLegendLabel" : e,
|
|
23
|
+
fill: "none",
|
|
24
|
+
height: "12",
|
|
25
|
+
role: "figure",
|
|
26
|
+
width: "12",
|
|
27
|
+
children: /* @__PURE__ */ t("rect", {
|
|
28
|
+
fill: o,
|
|
29
|
+
height: "12",
|
|
30
|
+
rx: "2",
|
|
31
|
+
width: "12"
|
|
32
|
+
})
|
|
33
|
+
}), /* @__PURE__ */ n(c, {
|
|
34
|
+
id: r === 0 ? "chartLegendLabel" : e,
|
|
35
|
+
variant: "caption",
|
|
36
|
+
children: [
|
|
37
|
+
e,
|
|
38
|
+
" ",
|
|
39
|
+
i ? `: ${i}` : ""
|
|
40
|
+
]
|
|
41
|
+
})]
|
|
42
|
+
}, r))
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
f as Legend
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=ChartLegend.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartLegend.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.tsx"],"sourcesContent":["import { Text } from '@mxenabled/mxui'\n\nimport Stack from '@mui/material/Stack'\n\nimport type { SxProps } from '@mui/material/styles'\nimport type { LegendProps } from '../../../../core/types/InsightsInstanceSlotData'\n\nexport interface LegendComponentProps {\n legendItems: LegendProps[]\n legendStyle?: SxProps\n}\n\nexport const Legend = ({ legendItems, legendStyle }: LegendComponentProps) => {\n return (\n <Stack\n sx={{\n alignItems: 'flex-start',\n flexDirection: 'row',\n gap: 24,\n justifyContent: 'flex-start',\n py: 4,\n width: '100%',\n ...legendStyle,\n }}\n >\n {legendItems.map(\n ({ color, label, formattedAmount }, index) =>\n label && (\n <Stack key={index} sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n <svg\n aria-hidden=\"true\"\n aria-labelledby={index === 0 ? 'chartLegendLabel' : label}\n fill=\"none\"\n height=\"12\"\n role=\"figure\"\n width=\"12\"\n >\n <rect fill={color} height=\"12\" rx=\"2\" width=\"12\" />\n </svg>\n <Text id={index === 0 ? 'chartLegendLabel' : label} variant=\"caption\">\n {label} {formattedAmount ? `: ${formattedAmount}` : ''}\n </Text>\n </Stack>\n ),\n )}\n </Stack>\n )\n}\n"],"mappings":";;;AAYA,IAAa,IAAA,CAAU,EAAE,aAAA,GAAa,aAAA,EAAA,MAElC,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,KAAK;AAAA,IACL,gBAAgB;AAAA,IAChB,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AAAA,EAEC,UAAA,EAAY,IAAA,CACV,EAAE,OAAA,GAAO,OAAA,GAAO,iBAAA,EAAA,GAAmB,MAClC,KACE,gBAAA,EAAC,GAAD;AAAA,IAAmB,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,KAAK;AAAA,IAAE;AAAA,IAA5E,UAAA,CACE,gBAAA,EAAC,OAAD;AAAA,MACE,eAAY;AAAA,MACZ,mBAAiB,MAAU,IAAI,qBAAqB;AAAA,MACpD,MAAK;AAAA,MACL,QAAO;AAAA,MACP,MAAK;AAAA,MACL,OAAM;AAAA,MAEN,UAAA,gBAAA,EAAC,QAAD;AAAA,QAAM,MAAM;AAAA,QAAO,QAAO;AAAA,QAAK,IAAG;AAAA,QAAI,OAAM;AAAA,MAAM,CAAA;AAAA,IAC/C,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,MAAM,IAAI,MAAU,IAAI,qBAAqB;AAAA,MAAO,SAAQ;AAAA,MAA5D,UAAA;AAAA,QACG;AAAA,QAAM;AAAA,QAAE,IAAkB,KAAK,CAAA,KAAoB;AAAA,MAChD;AAAA,IACD,CAAA,CAAA;AAAA,EAdK,GAAA,CAcL,CAEb;AACK,CAAA"}
|