@mx-cartographer/experiences 9.7.206 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +2 -0
  3. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js +39 -23
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js.map +1 -1
  5. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +3 -1
  6. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js +37 -33
  7. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js.map +1 -1
  8. package/dist/accounts/utils/AccountFields.d.ts +3 -1
  9. package/dist/accounts/utils/AccountFields.es.js +39 -39
  10. package/dist/accounts/utils/AccountFields.es.js.map +1 -1
  11. package/dist/common/components/charts/LineChart.d.ts +4 -0
  12. package/dist/common/components/charts/LineChart.es.js +114 -112
  13. package/dist/common/components/charts/LineChart.es.js.map +1 -1
  14. package/dist/common/components/charts/linechart/CustomLegend.es.js +24 -21
  15. package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
  16. package/dist/core/types/Insights.d.ts +9 -1
  17. package/dist/core/types/Insights.es.js.map +1 -1
  18. package/dist/core/types/localization/InsightsFeedCopy.d.ts +42 -0
  19. package/dist/core/types/localization/index.d.ts +1 -1
  20. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.d.ts +7 -1
  21. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +39 -20
  22. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
  23. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.d.ts +4 -0
  24. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js +42 -0
  25. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js.map +1 -0
  26. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.d.ts +7 -0
  27. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js +54 -0
  28. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js.map +1 -0
  29. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +10 -10
  30. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js +24 -23
  31. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js.map +1 -1
  32. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +75 -73
  33. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
  34. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.d.ts +5 -1
  35. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +21 -21
  36. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
  37. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.d.ts +11 -0
  38. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +65 -58
  39. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
  40. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
  41. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
  42. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js +9 -10
  43. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js.map +1 -1
  44. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +21 -22
  45. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
  46. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +35 -35
  47. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
  48. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.d.ts +1 -1
  49. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js +44 -49
  50. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js.map +1 -1
  51. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +1 -1
  52. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +19 -16
  53. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
  54. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.d.ts +2 -2
  55. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js +212 -166
  56. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js.map +1 -1
  57. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.d.ts +4 -0
  58. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js +24 -0
  59. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js.map +1 -0
  60. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.d.ts +6 -5
  61. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js +38 -38
  62. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js.map +1 -1
  63. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +1 -1
  64. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
  65. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
  66. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
  67. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
  68. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
  69. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
  70. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +46 -40
  71. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  72. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +141 -126
  73. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  74. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +8 -1
  75. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +243 -200
  76. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  77. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +2 -0
  78. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  79. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +54 -53
  80. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
  81. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +6 -1
  82. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +14 -13
  83. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
  84. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +4 -3
  85. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +24 -21
  86. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
  87. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +14 -4
  88. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +79 -67
  89. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  90. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +3 -1
  91. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +48 -32
  92. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
  93. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +19 -14
  94. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
  95. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +4 -0
  96. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +19 -15
  97. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
  98. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +26 -19
  99. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
  100. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -0
  101. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +17 -21
  102. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
  103. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
  104. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +11 -11
  105. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
  106. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +15 -11
  107. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
  108. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.d.ts +20 -0
  109. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js +21 -0
  110. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js.map +1 -0
  111. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
  112. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
  113. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
  114. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +10 -2
  115. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +115 -54
  116. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -1
  117. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +1 -1
  118. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +37 -36
  119. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
  120. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +27 -22
  121. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  122. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +8 -8
  123. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
  124. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
  125. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
  126. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
  127. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +13 -0
  128. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +22 -0
  129. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
  130. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +29 -21
  131. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
  132. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
  133. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
  134. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
  135. package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js +5 -6
  136. package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js.map +1 -1
  137. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.d.ts +3 -7
  138. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js +120 -306
  139. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js.map +1 -1
  140. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.d.ts +17 -0
  141. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js +93 -0
  142. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js.map +1 -0
  143. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.d.ts +5 -0
  144. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js +21 -0
  145. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js.map +1 -0
  146. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.d.ts +18 -0
  147. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js +71 -0
  148. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js.map +1 -0
  149. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.d.ts +82 -8
  150. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js +66 -15
  151. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js.map +1 -1
  152. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
  153. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  154. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
  155. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
  156. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  157. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
  158. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
  159. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
  160. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js +25 -20
  161. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js.map +1 -1
  162. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.d.ts +22 -0
  163. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js +24 -0
  164. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js.map +1 -0
  165. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.d.ts +7 -0
  166. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js +89 -0
  167. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js.map +1 -0
  168. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/index.d.ts +1 -0
  169. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.d.ts +43 -0
  170. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js +28 -0
  171. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js.map +1 -0
  172. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
  173. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  174. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +7 -3
  175. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +20 -11
  176. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  177. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +29 -28
  178. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
  179. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
  180. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +6 -5
  181. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -1
  182. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +117 -71
  183. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -1
  184. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  185. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +10 -7
  186. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  187. package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
  188. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  189. package/dist/insights-v2/components/BaseLayout.d.ts +3 -1
  190. package/dist/insights-v2/components/BaseLayout.es.js +134 -119
  191. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  192. package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +28 -0
  193. package/dist/insights-v2/components/CompactDirectDepositCard.es.js +78 -0
  194. package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
  195. package/dist/insights-v2/components/CompactInsightCard.es.js +122 -118
  196. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  197. package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
  198. package/dist/insights-v2/components/DirectDepositCard.es.js +24 -22
  199. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
  200. package/dist/insights-v2/components/LoadingCard.es.js +13 -9
  201. package/dist/insights-v2/components/LoadingCard.es.js.map +1 -1
  202. package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
  203. package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
  204. package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
  205. package/dist/insights-v2/components/SaveAnExtraCard.d.ts +4 -1
  206. package/dist/insights-v2/components/SaveAnExtraCard.es.js +32 -20
  207. package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -1
  208. package/dist/insights-v2/components/SubTabs.d.ts +2 -1
  209. package/dist/insights-v2/components/SubTabs.es.js +29 -24
  210. package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
  211. package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
  212. package/dist/insights-v2/components/TransactionListCard.es.js +39 -37
  213. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  214. package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
  215. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  216. package/dist/insights-v2/components/UpcomingBillCard.es.js +39 -35
  217. package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -1
  218. package/dist/insights-v2/components/celebrationGradients.d.ts +17 -8
  219. package/dist/insights-v2/components/celebrationGradients.es.js +14 -14
  220. package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
  221. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js +16 -10
  222. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js.map +1 -1
  223. package/dist/insights-v2/components/chartblocks/DoubleBarChart.d.ts +10 -4
  224. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +62 -61
  225. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
  226. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +13 -6
  227. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -1
  228. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +2 -3
  229. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -1
  230. package/dist/insights-v2/components/statusIcon.d.ts +2 -1
  231. package/dist/insights-v2/components/statusIcon.es.js +10 -8
  232. package/dist/insights-v2/components/statusIcon.es.js.map +1 -1
  233. package/dist/insights-v2/ctaActions/ctaConfig.es.js +19 -17
  234. package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
  235. package/dist/insights-v2/ctaActions/ctaHandlers.d.ts +5 -1
  236. package/dist/insights-v2/ctaActions/ctaHandlers.es.js +71 -54
  237. package/dist/insights-v2/ctaActions/ctaHandlers.es.js.map +1 -1
  238. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js +41 -24
  239. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js.map +1 -1
  240. package/dist/insights-v2/ctaActions/feedbackSurvey.d.ts +9 -0
  241. package/dist/insights-v2/ctaActions/feedbackSurvey.es.js +51 -0
  242. package/dist/insights-v2/ctaActions/feedbackSurvey.es.js.map +1 -0
  243. package/dist/insights-v2/ctaActions/runCtaAction.es.js +36 -35
  244. package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
  245. package/dist/insights-v2/ctaActions/types.d.ts +7 -0
  246. package/dist/insights-v2/index.es.js +126 -120
  247. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -1
  248. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -1
  249. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  250. package/dist/insights-v2/mappings/blocks.es.js +126 -122
  251. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  252. package/dist/microinsights/MicroCardTemplate.es.js +1 -1
  253. package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
  254. package/dist/microinsights/cards/InsightCard.es.js +53 -53
  255. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  256. package/package.json +1 -1
  257. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +0 -13
  258. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +0 -296
  259. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +0 -1
@@ -1,90 +1,106 @@
1
+ import { VISUALLY_HIDDEN_SX as v } from "../../../../common/constants/Styles.es.js";
1
2
  import o from "@mui/material/Stack";
2
- import { Text as l } from "@mxenabled/mxui";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- import c from "@mui/material/Box";
5
- import { PieChart as v } from "@mui/x-charts/PieChart";
6
- var w = ({ data: n, centerLabel: a, centerValue: h, compact: u = !1 }) => {
7
- const d = n.some((t) => t.label && t.labelValue), e = !d, x = n.map((t, s) => ({
8
- id: s,
3
+ import { Text as n } from "@mxenabled/mxui";
4
+ import { Fragment as y, jsx as r, jsxs as e } from "react/jsx-runtime";
5
+ import l from "@mui/material/Box";
6
+ import { PieChart as C } from "@mui/x-charts/PieChart";
7
+ var R = ({ data: a, centerLabel: s, centerValue: d, centerValueLabel: h, compact: u = !1 }) => {
8
+ const p = a.some((t) => t.label && t.labelValue), i = !p, x = a.map((t, c) => ({
9
+ id: c,
9
10
  color: t.color,
10
11
  value: t.value
11
- })), p = e ? 30 : 53, f = e ? 35 : 63, b = 2, m = () => e ? "body1" : a ? "h3" : "h2";
12
- return /* @__PURE__ */ i(o, {
12
+ })), f = i ? 30 : 53, m = i ? 35 : 63, b = 2, g = () => i ? "body1" : s ? "h3" : "h2";
13
+ return /* @__PURE__ */ e(o, {
13
14
  sx: {
14
15
  alignItems: "center",
15
16
  flexDirection: "row",
16
- justifyContent: e ? void 0 : "center",
17
+ justifyContent: i ? void 0 : "center",
17
18
  ...!u && {
18
19
  px: 16,
19
20
  py: 4
20
21
  }
21
22
  },
22
- children: [/* @__PURE__ */ i(c, {
23
+ children: [/* @__PURE__ */ e(l, {
23
24
  sx: {
24
25
  alignItems: "center",
25
26
  display: "flex",
26
27
  justifyContent: "center",
27
28
  position: "relative"
28
29
  },
29
- children: [/* @__PURE__ */ r(v, {
30
- height: e ? 72 : 125,
30
+ children: [/* @__PURE__ */ r(C, {
31
+ height: i ? 72 : 125,
31
32
  series: [{
32
33
  cornerRadius: b,
33
34
  data: x,
34
- innerRadius: p,
35
- outerRadius: f
35
+ innerRadius: f,
36
+ outerRadius: m
36
37
  }],
37
38
  slots: { tooltip: () => null },
38
- width: e ? 72 : 125
39
- }), /* @__PURE__ */ i(c, {
39
+ width: i ? 72 : 125
40
+ }), /* @__PURE__ */ e(o, {
40
41
  sx: {
42
+ alignItems: "center",
41
43
  position: "absolute",
42
44
  textAlign: "center"
43
45
  },
44
- children: [/* @__PURE__ */ r(l, {
45
- sx: { ...e && { fontWeight: 600 } },
46
- variant: m(),
47
- children: h
48
- }), a && /* @__PURE__ */ r(l, {
49
- sx: { color: "text.secondary" },
50
- variant: e ? "caption" : "body2",
51
- children: a
46
+ children: [/* @__PURE__ */ r(n, {
47
+ sx: {
48
+ display: "block",
49
+ ...i && { fontWeight: 600 }
50
+ },
51
+ variant: g(),
52
+ children: h ? /* @__PURE__ */ e(y, { children: [/* @__PURE__ */ r(l, {
53
+ "aria-hidden": !0,
54
+ component: "span",
55
+ children: d
56
+ }), /* @__PURE__ */ r(l, {
57
+ component: "span",
58
+ sx: v,
59
+ children: h
60
+ })] }) : d
61
+ }), s && /* @__PURE__ */ r(n, {
62
+ sx: {
63
+ color: "text.secondary",
64
+ display: "block"
65
+ },
66
+ variant: i ? "caption" : "body2",
67
+ children: s
52
68
  })]
53
69
  })]
54
- }), d && /* @__PURE__ */ r(o, {
70
+ }), p && /* @__PURE__ */ r(o, {
55
71
  sx: {
56
72
  gap: 24,
57
73
  pl: 24
58
74
  },
59
- children: n.map((t, s) => t.label && t.labelValue && /* @__PURE__ */ i(o, { children: [/* @__PURE__ */ i(o, {
75
+ children: a.map((t, c) => t.label && t.labelValue && /* @__PURE__ */ e(o, { children: [/* @__PURE__ */ e(o, {
60
76
  sx: {
61
77
  gap: 8,
62
78
  flexDirection: "row",
63
79
  alignItems: "center"
64
80
  },
65
- children: [/* @__PURE__ */ r(c, { sx: {
81
+ children: [/* @__PURE__ */ r(l, { sx: {
66
82
  backgroundColor: t.color,
67
83
  borderRadius: "2px",
68
84
  height: 12,
69
85
  width: 12
70
- } }), /* @__PURE__ */ r(l, {
86
+ } }), /* @__PURE__ */ r(n, {
71
87
  sx: { fontWeight: 400 },
72
88
  variant: "subtitle2",
73
89
  children: t.label
74
90
  })]
75
- }), /* @__PURE__ */ r(l, {
91
+ }), /* @__PURE__ */ r(n, {
76
92
  sx: {
77
93
  fontWeight: 400,
78
94
  pl: 20
79
95
  },
80
96
  variant: "subtitle2",
81
97
  children: t.labelValue
82
- })] }, t.label ?? s))
98
+ })] }, t.label ?? c))
83
99
  })]
84
100
  });
85
101
  };
86
102
  export {
87
- w as default
103
+ R as default
88
104
  };
89
105
 
90
106
  //# sourceMappingURL=DonutChart.es.js.map
@@ -1 +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 /** The embedded card's donut: exactly the chart's box, with no padding around it. */\n compact?: boolean\n}\n\nconst DonutChartV2 = ({ data, centerLabel, centerValue, compact = false }: 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 // A card wider than Figma's 320px keeps the donut and legend centred (design QA #20).\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: isEmbedded ? undefined : 'center',\n ...(!compact && { px: 16, py: 4 }),\n }}\n >\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={segment.label ?? 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":";;;;;AAmBA,IAAM,IAAA,CAAgB,EAAE,MAAA,GAAM,aAAA,GAAa,aAAA,GAAa,SAAA,IAAU,GAAA,MAA+B;AAC/F,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,SAEE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,gBAAgB,IAAa,SAAY;AAAA,MACzC,GAAI,CAAC,KAAW;AAAA,QAAE,IAAI;AAAA,QAAI,IAAI;AAAA,MAAE;AAAA,IAClC;AAAA,IANF,UAAA,CAQE,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,EAAQ,SAAS,CAiBtB,CAEb;AAAA,IACK,CAAA,CAEJ;AAAA;AAEX"}
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'\n\nimport { VISUALLY_HIDDEN_SX } from '../../../../common'\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 /** The full amount for screen readers when `centerValue` is abbreviated ($2.5K); the short form is then hidden. */\n centerValueLabel?: string\n /** The embedded card's donut: exactly the chart's box, with no padding around it. */\n compact?: boolean\n}\n\nconst DonutChartV2 = ({\n data,\n centerLabel,\n centerValue,\n centerValueLabel,\n compact = false,\n}: 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 // A card wider than Figma's 320px keeps the donut and legend centred (design QA #20).\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: isEmbedded ? undefined : 'center',\n ...(!compact && { px: 16, py: 4 }),\n }}\n >\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 {/* Two block lines, no gap between them (Figma 1347:182135). */}\n <Stack sx={{ alignItems: 'center', position: 'absolute', textAlign: 'center' }}>\n <Text\n sx={{ display: 'block', ...(isEmbedded && { fontWeight: 600 }) }}\n variant={getCenterValueVariant()}\n >\n {centerValueLabel ? (\n <>\n <Box aria-hidden={true} component=\"span\">\n {centerValue}\n </Box>\n <Box component=\"span\" sx={VISUALLY_HIDDEN_SX}>\n {centerValueLabel}\n </Box>\n </>\n ) : (\n centerValue\n )}\n </Text>\n {centerLabel && (\n <Text\n sx={{ color: 'text.secondary', display: 'block' }}\n variant={isEmbedded ? 'caption' : 'body2'}\n >\n {centerLabel}\n </Text>\n )}\n </Stack>\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={segment.label ?? 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":";;;;;;AAuBA,IAAM,IAAA,CAAgB,EACpB,MAAA,GACA,aAAA,GACA,aAAA,GACA,kBAAA,GACA,SAAA,IAAU,GAAA,MACa;AACvB,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,SAEE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,gBAAgB,IAAa,SAAY;AAAA,MACzC,GAAI,CAAC,KAAW;AAAA,QAAE,IAAI;AAAA,QAAI,IAAI;AAAA,MAAE;AAAA,IAClC;AAAA,IANF,UAAA,CAQE,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,GAGD,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,UAAU;AAAA,UAAY,WAAW;AAAA,QAAS;AAAA,QAA7E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UACE,IAAI;AAAA,YAAE,SAAS;AAAA,YAAS,GAAI,KAAc,EAAE,YAAY,IAAI;AAAA,UAAG;AAAA,UAC/D,SAAS,EAAsB;AAAA,UAE9B,UAAA,IACC,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAK,eAAa;AAAA,YAAM,WAAU;AAAA,YAC/B,UAAA;AAAA,UACE,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,YAAK,WAAU;AAAA,YAAO,IAAI;AAAA,YACvB,UAAA;AAAA,UACE,CAAA,CACL,EAAA,CAAA,IAEF;AAAA,QAEE,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UACE,IAAI;AAAA,YAAE,OAAO;AAAA,YAAkB,SAAS;AAAA,UAAQ;AAAA,UAChD,SAAS,IAAa,YAAY;AAAA,UAEjC,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MACJ,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,EAAQ,SAAS,CAiBtB,CAEb;AAAA,IACK,CAAA,CAEJ;AAAA;AAEX"}
@@ -1,25 +1,30 @@
1
1
  import { CURRENCY_FORMAT as e } from "../../../../core/utils/NumberFormatting.es.js";
2
- import f from "./DonutChart.es.js";
3
- import { getDonutSegments as b } from "./utils.es.js";
2
+ import y from "./DonutChart.es.js";
3
+ import { getDonutSegments as g } from "./utils.es.js";
4
4
  import { formatValueByType as r } from "../../../CommonUtils.es.js";
5
- import { Fragment as h, jsx as i, jsxs as g } from "react/jsx-runtime";
5
+ import { Fragment as h, jsx as u, jsxs as b } from "react/jsx-runtime";
6
6
  import { useTheme as D } from "@mui/material/styles";
7
+ import x from "@mui/material/Box";
7
8
  var k = ({ payload: m }) => {
8
- const _ = D(), { instance_slot: l, instance_slot_data: n } = m, { variant: d } = l, s = l.data, t = s?.main ? s : n ?? {}, u = Array.isArray(t.legends) ? t.legends : [], { main: o } = t;
9
+ const p = D(), { instance_slot: l, instance_slot_data: n } = m, { variant: _ } = l, s = l.data, a = s?.main ? s : n ?? {}, i = Array.isArray(a.legends) ? a.legends : [], { main: o } = a;
9
10
  if (!o) return null;
10
- const { colors: p, arcs: v } = b(d, {
11
- ...t,
12
- category_guid: t.category_guid ?? n?.category_guid
13
- }, u, _), y = u.map((a, c) => ({
14
- value: v[c],
15
- color: p[c],
16
- label: a.label,
17
- labelValue: /* @__PURE__ */ g(h, { children: [/* @__PURE__ */ i("b", { children: r(a.value, a.value_type ?? "amount", e.cents) }), a.additional_value && a.additional_value_type ? ` (${r(a.additional_value, a.additional_value_type, e.cents)})` : null] })
11
+ const { colors: d, arcs: f } = g(_, {
12
+ ...a,
13
+ category_guid: a.category_guid ?? n?.category_guid
14
+ }, i, p), v = i.map((t, c) => ({
15
+ value: f[c],
16
+ color: d[c],
17
+ label: t.label,
18
+ labelValue: /* @__PURE__ */ b(h, { children: [/* @__PURE__ */ u(x, {
19
+ component: "strong",
20
+ sx: { fontWeight: 600 },
21
+ children: r(t.value, t.value_type ?? "amount", e.cents)
22
+ }), t.additional_value && t.additional_value_type ? ` (${r(t.additional_value, t.additional_value_type, e.cents)})` : null] })
18
23
  }));
19
- return /* @__PURE__ */ i(f, {
24
+ return /* @__PURE__ */ u(y, {
20
25
  centerLabel: o.label,
21
26
  centerValue: r(Number(o.value), o.value_type, e.whole),
22
- data: y
27
+ data: v
23
28
  });
24
29
  };
25
30
  export {
@@ -1 +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'\nimport { CURRENCY_FORMAT } from '../../../../core/utils/NumberFormatting'\n\nimport { formatValueByType } from '../../../CommonUtils'\n\nimport type { BlockProps } from '../../types'\n\nimport DonutChartV2 from './DonutChart'\nimport { getDonutSegments } from './utils'\n\n/** `donut_chart_block`: a donut with a centre total and a two-row legend; V1 `instance_slot_data` is the fallback. */\nconst DonutChartBlock = ({ payload }: BlockProps<Partial<DonutChartBlockData>>) => {\n const theme = useTheme()\n const { instance_slot, instance_slot_data } = payload\n const { variant } = instance_slot\n // V2 contract first (`instance_slot.data`), V1 `instance_slot_data` as the legacy alias.\n const slotData = instance_slot.data as Partial<DonutChartBlockData> | undefined\n const blockData: Partial<DonutChartBlockData> = slotData?.main\n ? slotData\n : (instance_slot_data ?? {})\n const legends = Array.isArray(blockData.legends) ? blockData.legends : []\n const { main } = blockData\n\n if (!main) return null\n\n const { colors, arcs } = getDonutSegments(\n variant,\n { ...blockData, category_guid: blockData.category_guid ?? instance_slot_data?.category_guid },\n legends,\n theme,\n )\n\n const data = legends.map((legend, index) => ({\n value: arcs[index],\n color: colors[index],\n label: legend.label,\n labelValue: (\n <>\n <b>\n {formatValueByType(legend.value, legend.value_type ?? 'amount', CURRENCY_FORMAT.cents)}\n </b>\n {legend.additional_value && legend.additional_value_type\n ? ` (${formatValueByType(legend.additional_value, legend.additional_value_type, CURRENCY_FORMAT.cents)})`\n : null}\n </>\n ),\n }))\n\n return (\n <DonutChartV2\n centerLabel={main.label}\n centerValue={formatValueByType(Number(main.value), main.value_type, CURRENCY_FORMAT.whole)}\n data={data}\n />\n )\n}\n\nexport default DonutChartBlock\n"],"mappings":";;;;;;AAaA,IAAM,IAAA,CAAmB,EAAE,SAAA,EAAA,MAAwD;AACjF,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,GAAe,oBAAA,EAAA,IAAuB,GACxC,EAAE,SAAA,EAAA,IAAY,GAEd,IAAW,EAAc,MACzB,IAA0C,GAAU,OACtD,IACC,KAAsB,CAAC,GACtB,IAAU,MAAM,QAAQ,EAAU,OAAO,IAAI,EAAU,UAAU,CAAC,GAClE,EAAE,MAAA,EAAA,IAAS;AAEjB,MAAI,CAAC,EAAM,QAAO;AAElB,QAAM,EAAE,QAAA,GAAQ,MAAA,EAAA,IAAS,EACvB,GACA;AAAA,IAAE,GAAG;AAAA,IAAW,eAAe,EAAU,iBAAiB,GAAoB;AAAA,EAAc,GAC5F,GACA,CACF,GAEM,IAAO,EAAQ,IAAA,CAAK,GAAQ,OAAW;AAAA,IAC3C,OAAO,EAAK,CAAA;AAAA,IACZ,OAAO,EAAO,CAAA;AAAA,IACd,OAAO,EAAO;AAAA,IACd,YACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,KAAD,EAAA,UACG,EAAkB,EAAO,OAAO,EAAO,cAAc,UAAU,EAAgB,KAAK,EACpF,CAAA,GACF,EAAO,oBAAoB,EAAO,wBAC/B,KAAK,EAAkB,EAAO,kBAAkB,EAAO,uBAAuB,EAAgB,KAAK,CAAA,MACnG,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,EAAgB,KAAK;AAAA,IACnF,MAAA;AAAA,EACP,CAAA;AAEL"}
1
+ {"version":3,"file":"DonutChartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\nimport Box from '@mui/material/Box'\n\nimport type { DonutChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { CURRENCY_FORMAT } from '../../../../core/utils/NumberFormatting'\n\nimport { formatValueByType } from '../../../CommonUtils'\n\nimport type { BlockProps } from '../../types'\n\nimport DonutChartV2 from './DonutChart'\nimport { getDonutSegments } from './utils'\n\n/** `donut_chart_block`: a donut with a centre total and a two-row legend; V1 `instance_slot_data` is the fallback. */\nconst DonutChartBlock = ({ payload }: BlockProps<Partial<DonutChartBlockData>>) => {\n const theme = useTheme()\n const { instance_slot, instance_slot_data } = payload\n const { variant } = instance_slot\n // V2 contract first (`instance_slot.data`), V1 `instance_slot_data` as the legacy alias.\n const slotData = instance_slot.data as Partial<DonutChartBlockData> | undefined\n const blockData: Partial<DonutChartBlockData> = slotData?.main\n ? slotData\n : (instance_slot_data ?? {})\n const legends = Array.isArray(blockData.legends) ? blockData.legends : []\n const { main } = blockData\n\n if (!main) return null\n\n const { colors, arcs } = getDonutSegments(\n variant,\n { ...blockData, category_guid: blockData.category_guid ?? instance_slot_data?.category_guid },\n legends,\n theme,\n )\n\n const data = legends.map((legend, index) => ({\n value: arcs[index],\n color: colors[index],\n label: legend.label,\n labelValue: (\n <>\n <Box component=\"strong\" sx={{ fontWeight: 600 }}>\n {formatValueByType(legend.value, legend.value_type ?? 'amount', CURRENCY_FORMAT.cents)}\n </Box>\n {legend.additional_value && legend.additional_value_type\n ? ` (${formatValueByType(legend.additional_value, legend.additional_value_type, CURRENCY_FORMAT.cents)})`\n : null}\n </>\n ),\n }))\n\n return (\n <DonutChartV2\n centerLabel={main.label}\n centerValue={formatValueByType(Number(main.value), main.value_type, CURRENCY_FORMAT.whole)}\n data={data}\n />\n )\n}\n\nexport default DonutChartBlock\n"],"mappings":";;;;;;;AAcA,IAAM,IAAA,CAAmB,EAAE,SAAA,EAAA,MAAwD;AACjF,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,GAAe,oBAAA,EAAA,IAAuB,GACxC,EAAE,SAAA,EAAA,IAAY,GAEd,IAAW,EAAc,MACzB,IAA0C,GAAU,OACtD,IACC,KAAsB,CAAC,GACtB,IAAU,MAAM,QAAQ,EAAU,OAAO,IAAI,EAAU,UAAU,CAAC,GAClE,EAAE,MAAA,EAAA,IAAS;AAEjB,MAAI,CAAC,EAAM,QAAO;AAElB,QAAM,EAAE,QAAA,GAAQ,MAAA,EAAA,IAAS,EACvB,GACA;AAAA,IAAE,GAAG;AAAA,IAAW,eAAe,EAAU,iBAAiB,GAAoB;AAAA,EAAc,GAC5F,GACA,CACF,GAEM,IAAO,EAAQ,IAAA,CAAK,GAAQ,OAAW;AAAA,IAC3C,OAAO,EAAK,CAAA;AAAA,IACZ,OAAO,EAAO,CAAA;AAAA,IACd,OAAO,EAAO;AAAA,IACd,YACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAK,WAAU;AAAA,MAAS,IAAI,EAAE,YAAY,IAAI;AAAA,MAC3C,UAAA,EAAkB,EAAO,OAAO,EAAO,cAAc,UAAU,EAAgB,KAAK;AAAA,IAClF,CAAA,GACJ,EAAO,oBAAoB,EAAO,wBAC/B,KAAK,EAAkB,EAAO,kBAAkB,EAAO,uBAAuB,EAAgB,KAAK,CAAA,MACnG,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,EAAgB,KAAK;AAAA,IACnF,MAAA;AAAA,EACP,CAAA;AAEL"}
@@ -6,6 +6,10 @@ export declare const donutChartVariant: {
6
6
  readonly CreditLimit: "credit_limit";
7
7
  /** Credit Utilization: the arc coloured by the utilization in the centre. */
8
8
  readonly CreditUtilization: "credit_utilization";
9
+ /** Cost of Living to Income: the beat category's colour over a divider remainder. */
10
+ readonly CostOfLiving: "cost_of_living";
11
+ /** Essential / non-essential split (Monthly Non-Essential Category Summary V2). */
12
+ readonly EssentialSplit: "essential_split";
9
13
  };
10
14
  export type DonutChartVariant = (typeof donutChartVariant)[keyof typeof donutChartVariant];
11
15
  /** `remainderOfTotal`: the second arc is what is left of the second legend value after the first. */
@@ -1,29 +1,33 @@
1
- var i = {
1
+ var t = {
2
2
  DepositSummary: "deposit_summary",
3
3
  CreditLimit: "credit_limit",
4
- CreditUtilization: "credit_utilization"
5
- }, e = (t) => {
6
- const o = { colors: [t.palette.success.main, t.palette.success.light] }, r = [t.palette.warning.main, t.palette.divider], a = {
4
+ CreditUtilization: "credit_utilization",
5
+ CostOfLiving: "cost_of_living",
6
+ EssentialSplit: "essential_split"
7
+ }, n = (i) => {
8
+ const o = { colors: [i.palette.success.main, i.palette.success.light] }, r = { secondaryColor: i.palette.divider }, a = [i.palette.warning.main, i.palette.divider], e = { colors: [i.palette.chartMono.chartMono3 ?? i.palette.text.primary, i.palette.chartMono.chartMono5 ?? i.palette.divider] }, s = {
7
9
  dynamicPrimary: "creditUtilization",
8
- secondaryColor: t.palette.divider
10
+ secondaryColor: i.palette.divider
9
11
  };
10
12
  return {
11
- [i.DepositSummary]: o,
12
- [i.CreditLimit]: {
13
- colors: r,
13
+ [t.DepositSummary]: o,
14
+ [t.EssentialSplit]: e,
15
+ [t.CreditLimit]: {
16
+ colors: a,
14
17
  arcs: "remainderOfTotal"
15
18
  },
16
- [i.CreditUtilization]: a,
17
- CostOfLivingToIncome: { secondaryColor: t.palette.divider },
19
+ [t.CreditUtilization]: s,
20
+ [t.CostOfLiving]: r,
21
+ CostOfLivingToIncome: r,
18
22
  MonthlyDepositSummaryV2: o,
19
- MonthlyNonEssentialCategorySummaryV2: { colors: [t.palette.chartMono.chartMono3 ?? t.palette.text.primary, t.palette.chartMono.chartMono5 ?? t.palette.divider] },
20
- CreditCardCloseToLimit: { colors: r },
21
- CreditUtilization: a
23
+ MonthlyNonEssentialCategorySummaryV2: e,
24
+ CreditCardCloseToLimit: { colors: a },
25
+ CreditUtilization: s
22
26
  };
23
27
  };
24
28
  export {
25
- i as donutChartVariant,
26
- e as getLayoutConfig
29
+ t as donutChartVariant,
30
+ n as getLayoutConfig
27
31
  };
28
32
 
29
33
  //# sourceMappingURL=layout.es.js.map
@@ -1 +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'\n\n/** Ditto's `donut_chart_block` variants; the template-name keys below are V1 aliases. */\nexport const donutChartVariant = {\n DepositSummary: 'deposit_summary',\n /** Credit Card Close to Limit; the embedded card's small donut reuses it. */\n CreditLimit: 'credit_limit',\n /** Credit Utilization: the arc coloured by the utilization in the centre. */\n CreditUtilization: 'credit_utilization',\n} as const\n\nexport type DonutChartVariant = (typeof donutChartVariant)[keyof typeof donutChartVariant]\n\n/** `remainderOfTotal`: the second arc is what is left of the second legend value after the first. */\ntype DonutArcs = { arcs?: 'remainderOfTotal' }\n\nexport type DonutChartLayoutConfig = DonutArcs &\n (\n | { colors: [string, string] }\n | { secondaryColor: string }\n | { dynamicPrimary: 'creditUtilization'; secondaryColor: string }\n )\n\nexport const getLayoutConfig = (theme: Theme): Record<string, DonutChartLayoutConfig> => {\n const depositSummary: DonutChartLayoutConfig = {\n colors: [theme.palette.success.main, theme.palette.success.light],\n }\n\n const creditLimitColors: [string, string] = [theme.palette.warning.main, theme.palette.divider]\n const creditUtilization: DonutChartLayoutConfig = {\n dynamicPrimary: 'creditUtilization',\n secondaryColor: theme.palette.divider,\n }\n\n return {\n [donutChartVariant.DepositSummary]: depositSummary,\n // Spending and the rest of the limit, while the legend shows the full limit (pulse Chart.js).\n [donutChartVariant.CreditLimit]: { colors: creditLimitColors, arcs: 'remainderOfTotal' },\n [donutChartVariant.CreditUtilization]: creditUtilization,\n\n // V1 aliases: the template name as the variant.\n CostOfLivingToIncome: {\n secondaryColor: theme.palette.divider,\n },\n MonthlyDepositSummaryV2: depositSummary,\n MonthlyNonEssentialCategorySummaryV2: {\n colors: [\n theme.palette.chartMono.chartMono3 ?? theme.palette.text.primary,\n theme.palette.chartMono.chartMono5 ?? theme.palette.divider,\n ],\n },\n CreditCardCloseToLimit: { colors: creditLimitColors },\n CreditUtilization: creditUtilization,\n }\n}\n"],"mappings":"AAGA,IAAa,IAAoB;AAAA,EAC/B,gBAAgB;AAAA,EAEhB,aAAa;AAAA,EAEb,mBAAmB;AACrB,GAca,IAAA,CAAmB,MAAyD;AACvF,QAAM,IAAyC,EAC7C,QAAQ,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,QAAQ,KAAK,EAClE,GAEM,IAAsC,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,OAAO,GACxF,IAA4C;AAAA,IAChD,gBAAgB;AAAA,IAChB,gBAAgB,EAAM,QAAQ;AAAA,EAChC;AAEA,SAAO;AAAA,IACJ,CAAA,EAAkB,cAAA,GAAiB;AAAA,IAEnC,CAAA,EAAkB,WAAA,GAAc;AAAA,MAAE,QAAQ;AAAA,MAAmB,MAAM;AAAA,IAAmB;AAAA,IACtF,CAAA,EAAkB,iBAAA,GAAoB;AAAA,IAGvC,sBAAsB,EACpB,gBAAgB,EAAM,QAAQ,QAChC;AAAA,IACA,yBAAyB;AAAA,IACzB,sCAAsC,EACpC,QAAQ,CACN,EAAM,QAAQ,UAAU,cAAc,EAAM,QAAQ,KAAK,SACzD,EAAM,QAAQ,UAAU,cAAc,EAAM,QAAQ,OACtD,EACF;AAAA,IACA,wBAAwB,EAAE,QAAQ,EAAkB;AAAA,IACpD,mBAAmB;AAAA,EACrB;AACF"}
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'\n\n/** Ditto's `donut_chart_block` variants; the template-name keys below are V1 aliases. */\nexport const donutChartVariant = {\n DepositSummary: 'deposit_summary',\n /** Credit Card Close to Limit; the embedded card's small donut reuses it. */\n CreditLimit: 'credit_limit',\n /** Credit Utilization: the arc coloured by the utilization in the centre. */\n CreditUtilization: 'credit_utilization',\n /** Cost of Living to Income: the beat category's colour over a divider remainder. */\n CostOfLiving: 'cost_of_living',\n /** Essential / non-essential split (Monthly Non-Essential Category Summary V2). */\n EssentialSplit: 'essential_split',\n} as const\n\nexport type DonutChartVariant = (typeof donutChartVariant)[keyof typeof donutChartVariant]\n\n/** `remainderOfTotal`: the second arc is what is left of the second legend value after the first. */\ntype DonutArcs = { arcs?: 'remainderOfTotal' }\n\nexport type DonutChartLayoutConfig = DonutArcs &\n (\n | { colors: [string, string] }\n | { secondaryColor: string }\n | { dynamicPrimary: 'creditUtilization'; secondaryColor: string }\n )\n\nexport const getLayoutConfig = (theme: Theme): Record<string, DonutChartLayoutConfig> => {\n const depositSummary: DonutChartLayoutConfig = {\n colors: [theme.palette.success.main, theme.palette.success.light],\n }\n\n const costOfLiving: DonutChartLayoutConfig = { secondaryColor: theme.palette.divider }\n const creditLimitColors: [string, string] = [theme.palette.warning.main, theme.palette.divider]\n // Monthly Non-Essential Category Summary V2: Essentials (first) light, Flexible (second) dark.\n const essentialSplit: DonutChartLayoutConfig = {\n colors: [\n theme.palette.chartMono.chartMono3 ?? theme.palette.text.primary,\n theme.palette.chartMono.chartMono5 ?? theme.palette.divider,\n ],\n }\n\n const creditUtilization: DonutChartLayoutConfig = {\n dynamicPrimary: 'creditUtilization',\n secondaryColor: theme.palette.divider,\n }\n\n return {\n [donutChartVariant.DepositSummary]: depositSummary,\n [donutChartVariant.EssentialSplit]: essentialSplit,\n // Spending and the rest of the limit, while the legend shows the full limit (pulse Chart.js).\n [donutChartVariant.CreditLimit]: { colors: creditLimitColors, arcs: 'remainderOfTotal' },\n [donutChartVariant.CreditUtilization]: creditUtilization,\n [donutChartVariant.CostOfLiving]: costOfLiving,\n\n // V1 aliases: the template name as the variant.\n CostOfLivingToIncome: costOfLiving,\n MonthlyDepositSummaryV2: depositSummary,\n MonthlyNonEssentialCategorySummaryV2: essentialSplit,\n CreditCardCloseToLimit: { colors: creditLimitColors },\n CreditUtilization: creditUtilization,\n }\n}\n"],"mappings":"AAGA,IAAa,IAAoB;AAAA,EAC/B,gBAAgB;AAAA,EAEhB,aAAa;AAAA,EAEb,mBAAmB;AAAA,EAEnB,cAAc;AAAA,EAEd,gBAAgB;AAClB,GAca,IAAA,CAAmB,MAAyD;AACvF,QAAM,IAAyC,EAC7C,QAAQ,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,QAAQ,KAAK,EAClE,GAEM,IAAuC,EAAE,gBAAgB,EAAM,QAAQ,QAAQ,GAC/E,IAAsC,CAAC,EAAM,QAAQ,QAAQ,MAAM,EAAM,QAAQ,OAAO,GAExF,IAAyC,EAC7C,QAAQ,CACN,EAAM,QAAQ,UAAU,cAAc,EAAM,QAAQ,KAAK,SACzD,EAAM,QAAQ,UAAU,cAAc,EAAM,QAAQ,OACtD,EACF,GAEM,IAA4C;AAAA,IAChD,gBAAgB;AAAA,IAChB,gBAAgB,EAAM,QAAQ;AAAA,EAChC;AAEA,SAAO;AAAA,IACJ,CAAA,EAAkB,cAAA,GAAiB;AAAA,IACnC,CAAA,EAAkB,cAAA,GAAiB;AAAA,IAEnC,CAAA,EAAkB,WAAA,GAAc;AAAA,MAAE,QAAQ;AAAA,MAAmB,MAAM;AAAA,IAAmB;AAAA,IACtF,CAAA,EAAkB,iBAAA,GAAoB;AAAA,IACtC,CAAA,EAAkB,YAAA,GAAe;AAAA,IAGlC,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,IACzB,sCAAsC;AAAA,IACtC,wBAAwB,EAAE,QAAQ,EAAkB;AAAA,IACpD,mBAAmB;AAAA,EACrB;AACF"}
@@ -1,35 +1,42 @@
1
- import { useGlobalCopyStore as b, useInsightsV2Store as g } from "../../../../common/context/hooks.es.js";
2
- import { actionBlocksKey as h } from "../../../mappings/actionBlocksKey.es.js";
3
- import { DoubleBarChart as C } from "../../../components/chartblocks/DoubleBarChart.es.js";
4
- import { buildComparisonSeries as _, toLegendItems as B } from "./comparisonUtils.es.js";
1
+ import { useGlobalCopyStore as u, useInsightsV2Store as b } from "../../../../common/context/hooks.es.js";
2
+ import { actionBlocksKey as C } from "../../../mappings/actionBlocksKey.es.js";
3
+ import { DoubleBarChart as _ } from "../../../components/chartblocks/DoubleBarChart.es.js";
4
+ import { buildComparisonSeries as h, toLegendItems as S } from "./comparisonUtils.es.js";
5
5
  import { getLayoutConfig as I } from "./layout.es.js";
6
- import { jsx as S } from "react/jsx-runtime";
7
- import { useTheme as y } from "@mui/material/styles";
8
- var N = ({ payload: { instance_slot: r, widget_type: t }, beatGuid: e = "" }) => {
9
- const a = y(), { openActionDrawer: i } = g(), n = b().insights_feed?.general?.in_month_you_had_a_category_of_amount, { variant: s } = r, { series: l, additional_data: m } = r.data ?? {}, c = _(l, n), d = B(m), o = I(a, s), f = o?.color ?? [];
10
- return /* @__PURE__ */ S(C, {
6
+ import { jsx as A } from "react/jsx-runtime";
7
+ import { useTheme as B } from "@mui/material/styles";
8
+ var x = {
9
+ left: 16,
10
+ right: 16,
11
+ top: 14,
12
+ bottom: 5
13
+ }, L = { gap: 4 }, O = ({ payload: { instance_slot: t, widget_type: r }, beatGuid: a = "" }) => {
14
+ const e = B(), { openActionDrawer: i } = b(), n = u().insights_feed?.general?.in_month_you_had_a_category_of_amount, { variant: l } = t, { series: s, additional_data: m } = t.data ?? {}, c = h(s, n), f = S(m), o = I(e, l), d = o?.color ?? [];
15
+ return /* @__PURE__ */ A(_, {
11
16
  bars: c,
12
17
  boldLabel: o?.boldLabel,
13
- plotSize: o?.plotSize,
14
- colors: f,
15
- isMini: t === "mini",
16
- legends: d,
17
- onBarClick: (u, p) => {
18
- if (t !== "full") return !1;
18
+ plotSize: r === "mini" ? o?.miniPlotSize : o?.plotSize,
19
+ colors: d,
20
+ isMini: r === "mini",
21
+ legends: f,
22
+ margin: x,
23
+ sx: L,
24
+ onBarClick: (g, p) => {
25
+ if (r !== "full") return !1;
19
26
  i({
20
- guid: e,
27
+ guid: a,
21
28
  trigger: "chartBar",
22
29
  context: {
23
- chartBarIndex: u,
30
+ chartBarIndex: g,
24
31
  tabIndex: p,
25
- block: h.TRANSCATION_HISTORY_ACTION_BLOCK
32
+ block: C.TRANSCATION_HISTORY_ACTION_BLOCK
26
33
  }
27
34
  });
28
35
  }
29
36
  });
30
37
  };
31
38
  export {
32
- N as DoubleBarChartBlock
39
+ O as DoubleBarChartBlock
33
40
  };
34
41
 
35
42
  //# sourceMappingURL=DoubleBarChartBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoubleBarChartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../../../common'\nimport type { DrilldownPayload } from '../../../../core'\nimport type { BarChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { DoubleBarChart } from '../../../components/chartblocks/DoubleBarChart'\n\nimport type { BlockProps } from '../../types'\n\nimport { buildComparisonSeries, toLegendItems } from './comparisonUtils'\nimport { getLayoutConfig } from './layout'\nimport { actionBlocksKey } from '../../../mappings/actionBlocksKey'\n\n/**\n * Card block for the double-bar chart. Mirrors BarchartBlock: it builds the shaped series\n * (buildComparisonSeries) and resolves the card palette (getLayoutConfig), then renders the reusable\n * DoubleBarChart and injects the card click behavior \\u2014 open the shared drawer scoped to this beat\n * (chartBarIndex = clicked column, tabIndex = clicked sub-series).\n */\nexport const DoubleBarChartBlock = ({\n payload: { instance_slot, widget_type },\n beatGuid = '',\n}: BlockProps) => {\n const theme = useTheme()\n const { openActionDrawer } = useInsightsV2Store()\n const ariaLabel =\n useGlobalCopyStore().insights_feed?.general?.in_month_you_had_a_category_of_amount\n const { variant } = instance_slot\n // The slots ditto fills on instance_slot.data, read as BarchartBlock reads them.\n const { series, additional_data } = (instance_slot.data ?? {}) as BarChartBlockData\n const bars = buildComparisonSeries(series, ariaLabel)\n const legendItems = toLegendItems(additional_data)\n // getLayoutConfig returns undefined for an unknown/unsupported variant; fall back to an empty\n // palette so an unregistered beat can't throw on mount.\n const layoutConfig = getLayoutConfig(theme, variant)\n const colors = layoutConfig?.color ?? []\n\n return (\n <DoubleBarChart\n bars={bars}\n boldLabel={layoutConfig?.boldLabel}\n plotSize={layoutConfig?.plotSize}\n colors={colors}\n isMini={widget_type === 'mini'}\n legends={legendItems}\n onBarClick={(columnIndex, subIndex) => {\n if (widget_type !== 'full') return false\n\n openActionDrawer({\n guid: beatGuid,\n trigger: 'chartBar',\n context: {\n chartBarIndex: columnIndex,\n tabIndex: subIndex,\n block: actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK,\n } satisfies DrilldownPayload,\n })\n }}\n />\n )\n}\n"],"mappings":";;;;;;;AAmBA,IAAa,IAAA,CAAuB,EAClC,SAAS,EAAE,eAAA,GAAe,aAAA,EAAA,GAC1B,UAAA,IAAW,GAAA,MACK;AAChB,QAAM,IAAQ,EAAS,GACjB,EAAE,kBAAA,EAAA,IAAqB,EAAmB,GAC1C,IACJ,EAAmB,EAAE,eAAe,SAAS,uCACzC,EAAE,SAAA,EAAA,IAAY,GAEd,EAAE,QAAA,GAAQ,iBAAA,EAAA,IAAqB,EAAc,QAAQ,CAAC,GACtD,IAAO,EAAsB,GAAQ,CAAS,GAC9C,IAAc,EAAc,CAAe,GAG3C,IAAe,EAAgB,GAAO,CAAO,GAC7C,IAAS,GAAc,SAAS,CAAC;AAEvC,SACE,gBAAA,EAAC,GAAD;AAAA,IACQ,MAAA;AAAA,IACN,WAAW,GAAc;AAAA,IACzB,UAAU,GAAc;AAAA,IAChB,QAAA;AAAA,IACR,QAAQ,MAAgB;AAAA,IACxB,SAAS;AAAA,IACT,YAAA,CAAa,GAAa,MAAa;AACrC,UAAI,MAAgB,OAAQ,QAAO;AAEnC,MAAA,EAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,UACP,eAAe;AAAA,UACf,UAAU;AAAA,UACV,OAAO,EAAgB;AAAA,QACzB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACD,CAAA;AAEL"}
1
+ {"version":3,"file":"DoubleBarChartBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../../../common'\nimport type { DrilldownPayload } from '../../../../core'\nimport type { BarChartBlockData } from '../../../../core/types/InsightsInstanceSlotData'\nimport { DoubleBarChart } from '../../../components/chartblocks/DoubleBarChart'\n\nimport type { BlockProps } from '../../types'\n\nimport { buildComparisonSeries, toLegendItems } from './comparisonUtils'\nimport { getLayoutConfig } from './layout'\nimport { actionBlocksKey } from '../../../mappings/actionBlocksKey'\n\n// Figma's card chart (Insights/Content px-16): bars 14px below the slot top, the legend 4px under the\n// chart and inset 16px with it. `bottom: 5` (not 0) lands the axis line at Figma's 30px band under the\n// bars: MUI's x-axis height defaults to 25px, so the 5px margin makes up the rest.\nconst CARD_MARGIN = { left: 16, right: 16, top: 14, bottom: 5 }\nconst CARD_STACK_SX = { gap: 4 }\n\n/**\n * Card block for the double-bar chart. Mirrors BarchartBlock: it builds the shaped series\n * (buildComparisonSeries) and resolves the card palette (getLayoutConfig), then renders the reusable\n * DoubleBarChart and injects the card click behavior \\u2014 open the shared drawer scoped to this beat\n * (chartBarIndex = clicked column, tabIndex = clicked sub-series).\n */\nexport const DoubleBarChartBlock = ({\n payload: { instance_slot, widget_type },\n beatGuid = '',\n}: BlockProps) => {\n const theme = useTheme()\n const { openActionDrawer } = useInsightsV2Store()\n const ariaLabel =\n useGlobalCopyStore().insights_feed?.general?.in_month_you_had_a_category_of_amount\n const { variant } = instance_slot\n // The slots ditto fills on instance_slot.data, read as BarchartBlock reads them.\n const { series, additional_data } = (instance_slot.data ?? {}) as BarChartBlockData\n const bars = buildComparisonSeries(series, ariaLabel)\n const legendItems = toLegendItems(additional_data)\n // getLayoutConfig returns undefined for an unknown/unsupported variant; fall back to an empty\n // palette so an unregistered beat can't throw on mount.\n const layoutConfig = getLayoutConfig(theme, variant)\n const colors = layoutConfig?.color ?? []\n\n return (\n <DoubleBarChart\n bars={bars}\n boldLabel={layoutConfig?.boldLabel}\n plotSize={widget_type === 'mini' ? layoutConfig?.miniPlotSize : layoutConfig?.plotSize}\n colors={colors}\n isMini={widget_type === 'mini'}\n legends={legendItems}\n margin={CARD_MARGIN}\n sx={CARD_STACK_SX}\n onBarClick={(columnIndex, subIndex) => {\n if (widget_type !== 'full') return false\n\n openActionDrawer({\n guid: beatGuid,\n trigger: 'chartBar',\n context: {\n chartBarIndex: columnIndex,\n tabIndex: subIndex,\n block: actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK,\n } satisfies DrilldownPayload,\n })\n }}\n />\n )\n}\n"],"mappings":";;;;;;;AAgBA,IAAM,IAAc;AAAA,EAAE,MAAM;AAAA,EAAI,OAAO;AAAA,EAAI,KAAK;AAAA,EAAI,QAAQ;AAAE,GACxD,IAAgB,EAAE,KAAK,EAAE,GAQlB,IAAA,CAAuB,EAClC,SAAS,EAAE,eAAA,GAAe,aAAA,EAAA,GAC1B,UAAA,IAAW,GAAA,MACK;AAChB,QAAM,IAAQ,EAAS,GACjB,EAAE,kBAAA,EAAA,IAAqB,EAAmB,GAC1C,IACJ,EAAmB,EAAE,eAAe,SAAS,uCACzC,EAAE,SAAA,EAAA,IAAY,GAEd,EAAE,QAAA,GAAQ,iBAAA,EAAA,IAAqB,EAAc,QAAQ,CAAC,GACtD,IAAO,EAAsB,GAAQ,CAAS,GAC9C,IAAc,EAAc,CAAe,GAG3C,IAAe,EAAgB,GAAO,CAAO,GAC7C,IAAS,GAAc,SAAS,CAAC;AAEvC,SACE,gBAAA,EAAC,GAAD;AAAA,IACQ,MAAA;AAAA,IACN,WAAW,GAAc;AAAA,IACzB,UAAU,MAAgB,SAAS,GAAc,eAAe,GAAc;AAAA,IACtE,QAAA;AAAA,IACR,QAAQ,MAAgB;AAAA,IACxB,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,YAAA,CAAa,GAAa,MAAa;AACrC,UAAI,MAAgB,OAAQ,QAAO;AAEnC,MAAA,EAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,UACP,eAAe;AAAA,UACf,UAAU;AAAA,UACV,OAAO,EAAgB;AAAA,QACzB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACD,CAAA;AAEL"}
@@ -4,5 +4,6 @@ export interface DoubleBarLayoutConfig {
4
4
  boldLabel?: boolean;
5
5
  color: string[];
6
6
  plotSize?: PlotSize;
7
+ miniPlotSize?: PlotSize;
7
8
  }
8
9
  export declare const getLayoutConfig: (theme: Theme, variant?: string | null) => DoubleBarLayoutConfig | undefined;
@@ -1,34 +1,30 @@
1
- var c = (o) => ({
1
+ var a = (o) => ({
2
2
  boldLabel: !0,
3
3
  color: [o.palette.chart.chart2, o.palette.chart.chart1],
4
- plotSize: {
5
- height: 122,
6
- top: 0,
7
- bottom: 16
8
- }
9
- }), e = (o) => ({
4
+ plotSize: { height: 122 },
5
+ miniPlotSize: { height: 122 }
6
+ }), c = (o) => ({
10
7
  boldLabel: !0,
11
8
  color: [o.palette.chartMono.chartMono5, o.palette.chartMono.chartMono3],
12
- plotSize: {
13
- height: 144,
14
- top: 14,
15
- bottom: 6
16
- }
17
- }), r = (o, t) => {
18
- const a = {
19
- SpendToIncome: c(o),
20
- spend_to_income: c(o),
9
+ plotSize: { height: 144 },
10
+ miniPlotSize: { height: 114 }
11
+ }), i = (o, t) => {
12
+ const e = {
13
+ SpendToIncome: a(o),
14
+ spend_to_income: a(o),
21
15
  debt_to_income: {
22
16
  boldLabel: !0,
23
- color: [o.palette.chart.chart5, o.palette.chart.chart1]
17
+ color: [o.palette.chart.chart5, o.palette.chart.chart1],
18
+ plotSize: { height: 172 },
19
+ miniPlotSize: { height: 114 }
24
20
  },
25
- SavingsToIncome: e(o),
26
- savings_to_income: e(o)
21
+ SavingsToIncome: c(o),
22
+ savings_to_income: c(o)
27
23
  };
28
- return t && Object.hasOwn(a, t) ? a[t] : void 0;
24
+ return t && Object.hasOwn(e, t) ? e[t] : void 0;
29
25
  };
30
26
  export {
31
- r as getLayoutConfig
27
+ i as getLayoutConfig
32
28
  };
33
29
 
34
30
  //# sourceMappingURL=layout.es.js.map
@@ -1 +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\nimport type { PlotSize } from '../../../components/chartblocks/DoubleBarChart'\n\nexport interface DoubleBarLayoutConfig {\n boldLabel?: boolean\n color: string[]\n plotSize?: PlotSize\n}\n\n// One palette per comparison; ditto's snake_case variant shares the legacy PascalCase entry's palette.\n// Spend chart2, Income chart1 (Figma 1941:137446); the card and its drawer both read it. boldLabel: Figma\n// bolds the legend label (\"Spend:\") on these three beats; any other variant leaves it unset (regular).\nconst spendToIncome = (theme: Theme): DoubleBarLayoutConfig => ({\n boldLabel: true,\n color: [theme.palette.chart.chart2, theme.palette.chart.chart1] as string[],\n // Figma 1941:137490: a 122px chart above the legend, 150px slot in all.\n plotSize: { height: 122, top: 0, bottom: 16 },\n})\n\nconst savingsToIncome = (theme: Theme): DoubleBarLayoutConfig => ({\n boldLabel: true,\n color: [theme.palette.chartMono.chartMono5, theme.palette.chartMono.chartMono3] as string[],\n // Figma 1243:73833's full card plot.\n plotSize: { height: 144, top: 14, bottom: 6 },\n})\n\nexport const getLayoutConfig = (\n theme: Theme,\n variant?: string | null,\n): DoubleBarLayoutConfig | undefined => {\n const config: Record<string, DoubleBarLayoutConfig> = {\n SpendToIncome: spendToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Spend to Income Comparison.\n spend_to_income: spendToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Debt to Income Comparison. Debt (main) chart5,\n // Income chart1 (Figma 1117:8564); the card and its drawer both read it.\n debt_to_income: {\n boldLabel: true,\n color: [theme.palette.chart.chart5, theme.palette.chart.chart1] as string[],\n },\n SavingsToIncome: savingsToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Savings to Income Comparison.\n savings_to_income: savingsToIncome(theme),\n }\n // Object.hasOwn: the variant is backend-controlled, and an inherited name like `constructor`\n // would otherwise return a truthy non-config.\n return variant && Object.hasOwn(config, variant) ? config[variant] : undefined\n}\n"],"mappings":"AAaA,IAAM,IAAA,CAAiB,OAAyC;AAAA,EAC9D,WAAW;AAAA,EACX,OAAO,CAAC,EAAM,QAAQ,MAAM,QAAQ,EAAM,QAAQ,MAAM,MAAM;AAAA,EAE9D,UAAU;AAAA,IAAE,QAAQ;AAAA,IAAK,KAAK;AAAA,IAAG,QAAQ;AAAA,EAAG;AAC9C,IAEM,IAAA,CAAmB,OAAyC;AAAA,EAChE,WAAW;AAAA,EACX,OAAO,CAAC,EAAM,QAAQ,UAAU,YAAY,EAAM,QAAQ,UAAU,UAAU;AAAA,EAE9E,UAAU;AAAA,IAAE,QAAQ;AAAA,IAAK,KAAK;AAAA,IAAI,QAAQ;AAAA,EAAE;AAC9C,IAEa,IAAA,CACX,GACA,MACsC;AACtC,QAAM,IAAgD;AAAA,IACpD,eAAe,EAAc,CAAK;AAAA,IAElC,iBAAiB,EAAc,CAAK;AAAA,IAGpC,gBAAgB;AAAA,MACd,WAAW;AAAA,MACX,OAAO,CAAC,EAAM,QAAQ,MAAM,QAAQ,EAAM,QAAQ,MAAM,MAAM;AAAA,IAChE;AAAA,IACA,iBAAiB,EAAgB,CAAK;AAAA,IAEtC,mBAAmB,EAAgB,CAAK;AAAA,EAC1C;AAGA,SAAO,KAAW,OAAO,OAAO,GAAQ,CAAO,IAAI,EAAO,CAAA,IAAW;AACvE"}
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\nimport type { PlotSize } from '../../../components/chartblocks/DoubleBarChart'\n\nexport interface DoubleBarLayoutConfig {\n boldLabel?: boolean\n color: string[]\n // Each card's plot box, Figma's <BarChart> height (14px above the bars, a 30px axis band below).\n plotSize?: PlotSize\n miniPlotSize?: PlotSize\n}\n\n// One palette per comparison; ditto's snake_case variant shares the legacy PascalCase entry's palette.\n// Spend chart2, Income chart1 (Figma 1941:137446); the card and its drawer both read it. boldLabel: Figma\n// bolds the legend label (\"Spend:\") on these three beats; any other variant leaves it unset (regular).\nconst spendToIncome = (theme: Theme): DoubleBarLayoutConfig => ({\n boldLabel: true,\n color: [theme.palette.chart.chart2, theme.palette.chart.chart1] as string[],\n // Figma 1941:137490: a 122px chart above the legend.\n plotSize: { height: 122 },\n // Figma 1941:137481: the mini card's own 122px chart.\n miniPlotSize: { height: 122 },\n})\n\nconst savingsToIncome = (theme: Theme): DoubleBarLayoutConfig => ({\n boldLabel: true,\n color: [theme.palette.chartMono.chartMono5, theme.palette.chartMono.chartMono3] as string[],\n // Figma 1243:73833's full card plot.\n plotSize: { height: 144 },\n // Figma 1250:79966: the mini card's own 114px chart.\n miniPlotSize: { height: 114 },\n})\n\nexport const getLayoutConfig = (\n theme: Theme,\n variant?: string | null,\n): DoubleBarLayoutConfig | undefined => {\n const config: Record<string, DoubleBarLayoutConfig> = {\n SpendToIncome: spendToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Spend to Income Comparison.\n spend_to_income: spendToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Debt to Income Comparison. Debt (main) chart5,\n // Income chart1 (Figma 1117:8564); the card and its drawer both read it.\n debt_to_income: {\n boldLabel: true,\n color: [theme.palette.chart.chart5, theme.palette.chart.chart1] as string[],\n // Figma 1124:12365 (full) and 1124:13524 (mini).\n plotSize: { height: 172 },\n miniPlotSize: { height: 114 },\n },\n SavingsToIncome: savingsToIncome(theme),\n // Insights 2.0: ditto's layout variant for Monthly Savings to Income Comparison.\n savings_to_income: savingsToIncome(theme),\n }\n // Object.hasOwn: the variant is backend-controlled, and an inherited name like `constructor`\n // would otherwise return a truthy non-config.\n return variant && Object.hasOwn(config, variant) ? config[variant] : undefined\n}\n"],"mappings":"AAeA,IAAM,IAAA,CAAiB,OAAyC;AAAA,EAC9D,WAAW;AAAA,EACX,OAAO,CAAC,EAAM,QAAQ,MAAM,QAAQ,EAAM,QAAQ,MAAM,MAAM;AAAA,EAE9D,UAAU,EAAE,QAAQ,IAAI;AAAA,EAExB,cAAc,EAAE,QAAQ,IAAI;AAC9B,IAEM,IAAA,CAAmB,OAAyC;AAAA,EAChE,WAAW;AAAA,EACX,OAAO,CAAC,EAAM,QAAQ,UAAU,YAAY,EAAM,QAAQ,UAAU,UAAU;AAAA,EAE9E,UAAU,EAAE,QAAQ,IAAI;AAAA,EAExB,cAAc,EAAE,QAAQ,IAAI;AAC9B,IAEa,IAAA,CACX,GACA,MACsC;AACtC,QAAM,IAAgD;AAAA,IACpD,eAAe,EAAc,CAAK;AAAA,IAElC,iBAAiB,EAAc,CAAK;AAAA,IAGpC,gBAAgB;AAAA,MACd,WAAW;AAAA,MACX,OAAO,CAAC,EAAM,QAAQ,MAAM,QAAQ,EAAM,QAAQ,MAAM,MAAM;AAAA,MAE9D,UAAU,EAAE,QAAQ,IAAI;AAAA,MACxB,cAAc,EAAE,QAAQ,IAAI;AAAA,IAC9B;AAAA,IACA,iBAAiB,EAAgB,CAAK;AAAA,IAEtC,mBAAmB,EAAgB,CAAK;AAAA,EAC1C;AAGA,SAAO,KAAW,OAAO,OAAO,GAAQ,CAAO,IAAI,EAAO,CAAA,IAAW;AACvE"}
@@ -1,4 +1,4 @@
1
1
  import { StepChartBlockData } from '../../../../core/types/InsightsInstanceSlotData';
2
2
  import { BlockProps } from '../../types';
3
- declare const StepChartBlock: ({ beatGuid, payload }: BlockProps<StepChartBlockData>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const StepChartBlock: ({ beatGuid, payload }: BlockProps<StepChartBlockData>) => import("react/jsx-runtime").JSX.Element | null;
4
4
  export default StepChartBlock;
@@ -1,17 +1,17 @@
1
- import { slotVariants as c, variants as e } from "./index.es.js";
2
- import l from "@mui/material/Stack";
3
- import { jsx as t } from "react/jsx-runtime";
4
- var u = ({ beatGuid: o, payload: a }) => {
5
- const { instance_slot: { variant: r }, instance_slot_data: s } = a, n = c[r];
6
- if (n) return /* @__PURE__ */ t(n, {
7
- beatGuid: o,
1
+ import { slotVariants as e, variants as l } from "./index.es.js";
2
+ import c from "@mui/material/Stack";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ var u = ({ beatGuid: r, payload: a }) => {
5
+ const { instance_slot: { variant: t }, instance_slot_data: s } = a, o = e[t];
6
+ if (o) return /* @__PURE__ */ n(o, {
7
+ beatGuid: r,
8
8
  payload: a
9
9
  });
10
- const i = e[r];
11
- return /* @__PURE__ */ t(l, {
10
+ const i = l[t];
11
+ return i ? /* @__PURE__ */ n(c, {
12
12
  sx: { p: 16 },
13
- children: /* @__PURE__ */ t(i, { slotData: s })
14
- });
13
+ children: /* @__PURE__ */ n(i, { slotData: s })
14
+ }) : (console.warn(`[StepChartBlock] ${r ?? "unknown beat"}: unknown variant "${String(t)}", rendering nothing`), null);
15
15
  };
16
16
  export {
17
17
  u as default
@@ -1 +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 '../../types'\n\nimport { slotVariants, variants } from '.'\n\nconst StepChartBlock = ({ beatGuid, payload }: BlockProps<StepChartBlockData>) => {\n const {\n instance_slot: { variant },\n instance_slot_data,\n } = payload\n\n // Insights 2.0 variants read only instance_slot.data (ditto step_chart_block).\n const SlotVariant = slotVariants[variant as keyof typeof slotVariants]\n if (SlotVariant) return <SlotVariant beatGuid={beatGuid} payload={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,UAAA,GAAU,SAAA,EAAA,MAA8C;AAChF,QAAM,EACJ,eAAe,EAAE,SAAA,EAAA,GACjB,oBAAA,EAAA,IACE,GAGE,IAAc,EAAa,CAAA;AACjC,MAAI,EAAa,QAAO,gBAAA,EAAC,GAAD;AAAA,IAAuB,UAAA;AAAA,IAAmB,SAAA;AAAA,EAAU,CAAA;AAE5E,QAAM,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"}
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 '../../types'\n\nimport { slotVariants, variants } from '.'\n\nconst StepChartBlock = ({ beatGuid, payload }: BlockProps<StepChartBlockData>) => {\n const {\n instance_slot: { variant },\n instance_slot_data,\n } = payload\n\n // Insights 2.0 variants read only instance_slot.data (ditto step_chart_block).\n const SlotVariant = slotVariants[variant as keyof typeof slotVariants]\n if (SlotVariant) return <SlotVariant beatGuid={beatGuid} payload={payload} />\n\n const Variant = variants[variant as keyof typeof variants]\n if (!Variant) {\n console.warn(\n `[StepChartBlock] ${beatGuid ?? 'unknown beat'}: unknown variant \"${String(variant)}\", rendering nothing`,\n )\n return null\n }\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,UAAA,GAAU,SAAA,EAAA,MAA8C;AAChF,QAAM,EACJ,eAAe,EAAE,SAAA,EAAA,GACjB,oBAAA,EAAA,IACE,GAGE,IAAc,EAAa,CAAA;AACjC,MAAI,EAAa,QAAO,gBAAA,EAAC,GAAD;AAAA,IAAuB,UAAA;AAAA,IAAmB,SAAA;AAAA,EAAU,CAAA;AAE5E,QAAM,IAAU,EAAS,CAAA;AACzB,SAAK,IAQH,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,GAAG,GAAG;AAAA,IACjB,UAAA,gBAAA,EAAC,GAAD,EAAS,UAAU,EAAqB,CAAA;AAAA,EACnC,CAAA,KATP,QAAQ,KACN,oBAAoB,KAAY,cAAA,sBAAoC,OAAO,CAAO,CAAA,sBACpF,GACO;AAQX"}
@@ -1,15 +1,19 @@
1
- import { MilestoneProgressBlock as r } from "./variants/MilestoneProgress.es.js";
2
- import t from "./variants/WithoutText.es.js";
3
- import o from "./variants/WithText.es.js";
4
- import m from "./StepChartBlock.es.js";
5
- var p = {
6
- WithoutText: t,
7
- WithText: o
8
- }, l = { milestone_progress: r };
1
+ import { MilestoneProgressBlock as t } from "./variants/MilestoneProgress.es.js";
2
+ import o from "./variants/WithoutText.es.js";
3
+ import { stepChartVariant as r } from "./layout.es.js";
4
+ import e, { WithTextSlotBlock as i } from "./variants/WithText.es.js";
5
+ import n from "./StepChartBlock.es.js";
6
+ var f = {
7
+ WithoutText: o,
8
+ WithText: e
9
+ }, h = {
10
+ milestone_progress: t,
11
+ [r.MilestoneAmounts]: i
12
+ };
9
13
  export {
10
- m as default,
11
- l as slotVariants,
12
- p as variants
14
+ n as default,
15
+ h as slotVariants,
16
+ f as variants
13
17
  };
14
18
 
15
19
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/index.ts"],"sourcesContent":["import { MilestoneProgressBlock } from './variants/MilestoneProgress'\nimport 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\n/** Insights 2.0 variants: each reads the slot contract from `instance_slot.data`. */\nexport const slotVariants = {\n milestone_progress: MilestoneProgressBlock,\n}\n"],"mappings":";;;;AAQA,IAAa,IAAW;AAAA,EACT,aAAA;AAAA,EACH,UAAA;AACZ,GAGa,IAAe,EAC1B,oBAAoB,EACtB"}
1
+ {"version":3,"file":"index.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ChartBlocks/StepChartBlock/index.ts"],"sourcesContent":["import { MilestoneProgressBlock } from './variants/MilestoneProgress'\nimport WithoutText from './variants/WithoutText'\nimport WithText, { WithTextSlotBlock } from './variants/WithText'\nimport { stepChartVariant } from './layout'\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\n/** Insights 2.0 variants: each reads the slot contract from `instance_slot.data`. */\nexport const slotVariants = {\n milestone_progress: MilestoneProgressBlock,\n [stepChartVariant.MilestoneAmounts]: WithTextSlotBlock,\n}\n"],"mappings":";;;;;AASA,IAAa,IAAW;AAAA,EACT,aAAA;AAAA,EACH,UAAA;AACZ,GAGa,IAAe;AAAA,EAC1B,oBAAoB;AAAA,EACnB,CAAA,EAAiB,gBAAA,GAAmB;AACvC"}
@@ -0,0 +1,20 @@
1
+ /** step_chart_block variants: the V1 component names and ditto's Insights 2.0 layouts. */
2
+ export declare const stepChartVariant: {
3
+ readonly WithText: "WithText";
4
+ readonly WithoutText: "WithoutText";
5
+ /** Emergency Savings Milestone Reached: the $100 / $500 / $1,000 stepper drawn by WithText. */
6
+ readonly MilestoneAmounts: "milestone_amounts";
7
+ };
8
+ export interface StepChartLayoutConfig {
9
+ /** Gradient wash with confetti behind the card, which is raised to elevation/1; none = the bare card. */
10
+ wash?: string;
11
+ /** Uppercase, letter-spaced eyebrow. */
12
+ capsEyebrow?: boolean;
13
+ /** Track segments share the row width instead of a fixed 54px each. */
14
+ fluidTrack?: boolean;
15
+ /** Bold amount under each reached step. */
16
+ boldReached?: boolean;
17
+ /** Steps as a list with aria-current and a hidden "completed" / "not reached" status. */
18
+ announceSteps?: boolean;
19
+ }
20
+ export declare const STEP_CHART_LAYOUT: Record<string, StepChartLayoutConfig>;
@@ -0,0 +1,21 @@
1
+ import { WARM_LIME_ACCENT_GRADIENT as e } from "../../../components/celebrationGradients.es.js";
2
+ var t = {
3
+ WithText: "WithText",
4
+ WithoutText: "WithoutText",
5
+ MilestoneAmounts: "milestone_amounts"
6
+ }, r = {
7
+ [t.WithText]: {},
8
+ [t.MilestoneAmounts]: {
9
+ wash: e,
10
+ capsEyebrow: !0,
11
+ fluidTrack: !0,
12
+ boldReached: !0,
13
+ announceSteps: !0
14
+ }
15
+ };
16
+ export {
17
+ r as STEP_CHART_LAYOUT,
18
+ t as stepChartVariant
19
+ };
20
+
21
+ //# sourceMappingURL=layout.es.js.map