@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
@@ -0,0 +1,89 @@
1
+ import { slot as f } from "../../../../core/types/Insights.es.js";
2
+ import { resolveVariantConfig as u } from "../../resolveVariantConfig.es.js";
3
+ import { asLogoRef as h, asNonEmptyText as p } from "../../slotReaders.es.js";
4
+ import { statusIconName as g } from "../../../components/statusIcon.es.js";
5
+ import { STRATEGIES_LAYOUT as T, tileColor as y } from "./layout.es.js";
6
+ import n from "@mui/material/Stack";
7
+ import { Text as d } from "@mxenabled/mxui";
8
+ import { Icon as v } from "@mxenabled/mx-icons";
9
+ import { jsx as i, jsxs as x } from "react/jsx-runtime";
10
+ import { alpha as S, useTheme as I } from "@mui/material/styles";
11
+ var N = (e) => {
12
+ if (typeof e != "object" || e === null) return;
13
+ const { logo: a, text: s, title: c } = e, t = p(c);
14
+ if (!t) return;
15
+ const r = h(a);
16
+ return {
17
+ color: r?.color,
18
+ iconName: g(r?.guid),
19
+ text: p(s),
20
+ title: t
21
+ };
22
+ }, B = ({ payload: e }) => {
23
+ const { palette: a } = I(), { data: s, variant: c } = e.instance_slot, t = u(T, c, "strategies", "StrategiesBlock"), r = f(s, "tiles"), l = (Array.isArray(r) ? r : []).map(N).filter((o) => !!o);
24
+ return l.length ? /* @__PURE__ */ i(n, {
25
+ component: "ul",
26
+ sx: {
27
+ gap: t.gap,
28
+ listStyle: "none",
29
+ m: 0,
30
+ pt: 8,
31
+ px: 16,
32
+ width: "100%"
33
+ },
34
+ children: l.map((o) => {
35
+ const m = y(a, o.color);
36
+ return /* @__PURE__ */ x(n, {
37
+ component: "li",
38
+ sx: {
39
+ alignItems: "center",
40
+ borderRadius: "8px",
41
+ boxShadow: "inset 0 0 0 1px var(--mui-palette-divider)",
42
+ flexDirection: "row",
43
+ gap: 12,
44
+ px: t.px,
45
+ py: t.py
46
+ },
47
+ children: [o.iconName && /* @__PURE__ */ i(n, {
48
+ "aria-hidden": !0,
49
+ "data-icon": o.iconName,
50
+ "data-testid": "strategy-tile-icon",
51
+ sx: {
52
+ alignItems: "center",
53
+ bgcolor: S(m, 0.25),
54
+ borderRadius: `${t.iconRadius}px`,
55
+ flexShrink: 0,
56
+ height: t.iconTile,
57
+ justifyContent: "center",
58
+ width: t.iconTile
59
+ },
60
+ children: /* @__PURE__ */ i(v, {
61
+ name: o.iconName,
62
+ size: t.iconSize,
63
+ sx: { color: m }
64
+ })
65
+ }), /* @__PURE__ */ x(n, {
66
+ sx: {
67
+ flex: 1,
68
+ minWidth: 0
69
+ },
70
+ children: [/* @__PURE__ */ i(d, {
71
+ component: "p",
72
+ sx: { fontWeight: 600 },
73
+ variant: "body1",
74
+ children: o.title
75
+ }), t.showText && o.text && /* @__PURE__ */ i(d, {
76
+ component: "p",
77
+ variant: "caption",
78
+ children: o.text
79
+ })]
80
+ })]
81
+ }, o.title);
82
+ })
83
+ }) : null;
84
+ };
85
+ export {
86
+ B as default
87
+ };
88
+
89
+ //# sourceMappingURL=StrategiesBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StrategiesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\nimport { alpha, useTheme } from '@mui/material/styles'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\nimport { slot } from '../../../../core'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asNonEmptyText } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\nimport { STRATEGIES_LAYOUT, TILE_TINT, tileColor, type StrategiesVariant } from './layout'\n\ninterface StrategyTile {\n title: string\n text?: string\n iconName?: string\n color?: string\n}\n\nconst toTile = (row: unknown): StrategyTile | undefined => {\n if (typeof row !== 'object' || row === null) return undefined\n const { logo, text, title } = row as Record<string, unknown>\n const name = asNonEmptyText(title)\n if (!name) return undefined\n const ref = asLogoRef(logo)\n\n return {\n color: ref?.color,\n iconName: statusIconName(ref?.guid),\n text: asNonEmptyText(text),\n title: name,\n }\n}\n\n/**\n * The strategy tiles (ditto `strategies_block`, Debt Payoff Strategies, Figma 1943:219418): each an\n * `ICO-` glyph on a 25% wash of its colour, with a title and, on full, a line of text.\n */\nconst StrategiesBlock = ({ payload }: BlockProps) => {\n const { palette } = useTheme()\n const { data, variant } = payload.instance_slot\n const layout = resolveVariantConfig<\n StrategiesVariant,\n (typeof STRATEGIES_LAYOUT)[StrategiesVariant]\n >(STRATEGIES_LAYOUT, variant, 'strategies', 'StrategiesBlock')\n const rows = slot<unknown[]>(data, 'tiles')\n const tiles = (Array.isArray(rows) ? rows : [])\n .map(toTile)\n .filter((tile): tile is StrategyTile => !!tile)\n if (!tiles.length) return null\n\n return (\n <Stack\n component=\"ul\"\n sx={{ gap: layout.gap, listStyle: 'none', m: 0, pt: 8, px: 16, width: '100%' }}\n >\n {tiles.map((tile) => {\n const color = tileColor(palette, tile.color)\n\n return (\n <Stack\n component=\"li\"\n key={tile.title}\n sx={{\n alignItems: 'center',\n borderRadius: '8px',\n // Figma's 1px stroke sits inside the tile's height (76px full, 56px compact), so draw it inset.\n boxShadow: 'inset 0 0 0 1px var(--mui-palette-divider)',\n flexDirection: 'row',\n gap: 12,\n px: layout.px,\n py: layout.py,\n }}\n >\n {tile.iconName && (\n <Stack\n aria-hidden={true}\n data-icon={tile.iconName}\n data-testid=\"strategy-tile-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: alpha(color, TILE_TINT),\n borderRadius: `${layout.iconRadius}px`,\n flexShrink: 0,\n height: layout.iconTile,\n justifyContent: 'center',\n width: layout.iconTile,\n }}\n >\n <Icon name={tile.iconName} size={layout.iconSize} sx={{ color }} />\n </Stack>\n )}\n <Stack sx={{ flex: 1, minWidth: 0 }}>\n <Text component=\"p\" sx={{ fontWeight: 600 }} variant=\"body1\">\n {tile.title}\n </Text>\n {layout.showText && tile.text && (\n <Text component=\"p\" variant=\"caption\">\n {tile.text}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n })}\n </Stack>\n )\n}\n\nexport default StrategiesBlock\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,IAAA,CAAU,MAA2C;AACzD,MAAI,OAAO,KAAQ,YAAY,MAAQ,KAAM;AAC7C,QAAM,EAAE,MAAA,GAAM,MAAA,GAAM,OAAA,EAAA,IAAU,GACxB,IAAO,EAAe,CAA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O,UAAA;AAAA,YACxB,YAAY;AAAA,YACZ,QAAQ,EAAO;AAAA,YACf,gBAAgB;AAAA,YAChB,OAAO,EAAO;AAAA,UAChB;AAAA,UAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM,EAAK;AAAA,YAAU,MAAM,EAAO;AAAA,YAAU,IAAI,EAAE,OAAA,EAAM;AAAA,UAAI,CAAA;AAAA,QAC7D,CAAA,GAET,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,MAAM;AAAA,YAAG,UAAU;AAAA,UAAE;AAAA,UAAlC,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAM,WAAU;AAAA,YAAI,IAAI,EAAE,YAAY,IAAI;AAAA,YAAG,SAAQ;AAAA,YAClD,UAAA,EAAK;AAAA,UACF,CAAA,GACL,EAAO,YAAY,EAAK,QACvB,gBAAA,EAAC,GAAD;AAAA,YAAM,WAAU;AAAA,YAAI,SAAQ;AAAA,YACzB,UAAA,EAAK;AAAA,UACF,CAAA,CAEH;AAAA,QACF,CAAA,CAAA;AAAA,MAxCA,GAAA,EAAK,KAwCL;AAAA,IAEX,CAAC;AAAA,EACI,CAAA,IAxDiB;AA0D5B"}
@@ -0,0 +1 @@
1
+ export { default as StrategiesBlock } from './StrategiesBlock';
@@ -0,0 +1,43 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ /** One design per ditto `strategies_block` variant: full draws each tile's line of text, mini titles only. */
3
+ export interface StrategiesLayout {
4
+ /** The tile's line of text under its title. */
5
+ showText: boolean;
6
+ /** Icon tile size and glyph size, px (Figma: 44 / 24 on full, 32 / 20 on mini). */
7
+ iconTile: number;
8
+ iconSize: number;
9
+ /** Icon tile corner radius and the gap between tiles, px. */
10
+ iconRadius: number;
11
+ gap: number;
12
+ /** Tile padding, theme spacing (Figma: 16 × 12 on full, 12 on mini). */
13
+ px: number;
14
+ py: number;
15
+ }
16
+ export declare const STRATEGIES_LAYOUT: {
17
+ strategies: {
18
+ showText: true;
19
+ iconTile: number;
20
+ iconSize: number;
21
+ iconRadius: number;
22
+ gap: number;
23
+ px: number;
24
+ py: number;
25
+ };
26
+ strategies_compact: {
27
+ showText: false;
28
+ iconTile: number;
29
+ iconSize: number;
30
+ iconRadius: number;
31
+ gap: number;
32
+ px: number;
33
+ py: number;
34
+ };
35
+ };
36
+ export type StrategiesVariant = keyof typeof STRATEGIES_LAYOUT;
37
+ /** Figma's 25% wash of the tile colour behind the glyph. */
38
+ export declare const TILE_TINT = 0.25;
39
+ /**
40
+ * The theme colour a tile's `logo.color` names (Figma's blue `chart.chart5` and purple
41
+ * `categories.entertainment`), through the shared allowlist since it is server data; else primary.
42
+ */
43
+ export declare const tileColor: (palette: Theme["palette"], color?: string | null) => string;
@@ -0,0 +1,28 @@
1
+ import { statusIconAccentColor as a } from "../../../components/statusIcon.es.js";
2
+ var r = {
3
+ strategies: {
4
+ showText: !0,
5
+ iconTile: 44,
6
+ iconSize: 24,
7
+ iconRadius: 6,
8
+ gap: 16,
9
+ px: 16,
10
+ py: 12
11
+ },
12
+ strategies_compact: {
13
+ showText: !1,
14
+ iconTile: 32,
15
+ iconSize: 20,
16
+ iconRadius: 4,
17
+ gap: 12,
18
+ px: 12,
19
+ py: 12
20
+ }
21
+ }, t = 0.25, c = (i, o) => a(i, o) ?? i.primary.main;
22
+ export {
23
+ r as STRATEGIES_LAYOUT,
24
+ t as TILE_TINT,
25
+ c as tileColor
26
+ };
27
+
28
+ //# sourceMappingURL=layout.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport { statusIconAccentColor } from '../../../components/statusIcon'\n\n/** One design per ditto `strategies_block` variant: full draws each tile's line of text, mini titles only. */\nexport interface StrategiesLayout {\n /** The tile's line of text under its title. */\n showText: boolean\n /** Icon tile size and glyph size, px (Figma: 44 / 24 on full, 32 / 20 on mini). */\n iconTile: number\n iconSize: number\n /** Icon tile corner radius and the gap between tiles, px. */\n iconRadius: number\n gap: number\n /** Tile padding, theme spacing (Figma: 16 × 12 on full, 12 on mini). */\n px: number\n py: number\n}\n\nexport const STRATEGIES_LAYOUT = {\n strategies: {\n showText: true,\n iconTile: 44,\n iconSize: 24,\n iconRadius: 6,\n gap: 16,\n px: 16,\n py: 12,\n },\n strategies_compact: {\n showText: false,\n iconTile: 32,\n iconSize: 20,\n iconRadius: 4,\n gap: 12,\n px: 12,\n py: 12,\n },\n} satisfies Record<string, StrategiesLayout>\n\nexport type StrategiesVariant = keyof typeof STRATEGIES_LAYOUT\n\n/** Figma's 25% wash of the tile colour behind the glyph. */\nexport const TILE_TINT = 0.25\n\n/**\n * The theme colour a tile's `logo.color` names (Figma's blue `chart.chart5` and purple\n * `categories.entertainment`), through the shared allowlist since it is server data; else primary.\n */\nexport const tileColor = (palette: Theme['palette'], color?: string | null): string =>\n statusIconAccentColor(palette, color) ?? palette.primary.main\n"],"mappings":";AAmBA,IAAa,IAAoB;AAAA,EAC/B,YAAY;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAAA,EACA,oBAAoB;AAAA,IAClB,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACF,GAKa,IAAY,MAMZ,IAAA,CAAa,GAA2B,MACnD,EAAsB,GAAS,CAAK,KAAK,EAAQ,QAAQ"}
@@ -1,51 +1,51 @@
1
- import { useGlobalCopyStore as D, useGlobalStore as H } from "../../../../common/context/hooks.es.js";
1
+ import { useGlobalCopyStore as H, useGlobalStore as P } from "../../../../common/context/hooks.es.js";
2
2
  import { slot as a } from "../../../../core/types/Insights.es.js";
3
3
  import { CURRENCY_FORMAT as x, formatCurrency as C } from "../../../../core/utils/NumberFormatting.es.js";
4
- import { useBeatActions as P } from "../../../beatActions.es.js";
5
- import { resolveVariantConfig as U } from "../../resolveVariantConfig.es.js";
4
+ import { useBeatActions as U } from "../../../beatActions.es.js";
5
+ import { resolveVariantConfig as V } from "../../resolveVariantConfig.es.js";
6
6
  import { asLogoRef as I } from "../../slotReaders.es.js";
7
- import { USER_RESPONSE as V, repeatingTransactionOf as W } from "../../../ctaActions/subscriptionAnswer.es.js";
8
- import Y from "../../../components/CategoryTile.es.js";
9
- import K, { isKnownIcon as J } from "../../../components/LogoMark.es.js";
10
- import { logoFromRef as Q } from "../../../components/shared/EntityLogo.es.js";
11
- import X from "../../../components/LogoFromGuid.es.js";
12
- import { statusIconName as oo, statusIconPalette as S } from "../../../components/statusIcon.es.js";
13
- import ro from "../../../components/StatusMessageCard.es.js";
14
- import to from "../../../components/TransactionListCard.es.js";
15
- import { subscriptionFrequency as eo } from "../../../components/SubscriptionStatus/subscriptionFrequency.es.js";
16
- import { getLayoutConfig as no, transactionBlockVariant as io } from "./layout.es.js";
17
- import { observer as ao } from "mobx-react-lite";
18
- import { Icon as R } from "@mxenabled/mx-icons";
7
+ import { USER_RESPONSE as W, repeatingTransactionOf as Y } from "../../../ctaActions/subscriptionAnswer.es.js";
8
+ import K from "../../../components/CategoryTile.es.js";
9
+ import J, { isKnownIcon as Q } from "../../../components/LogoMark.es.js";
10
+ import { logoFromRef as X } from "../../../components/shared/EntityLogo.es.js";
11
+ import oo from "../../../components/LogoFromGuid.es.js";
12
+ import { statusIconName as ro, statusIconPalette as R } from "../../../components/statusIcon.es.js";
13
+ import to from "../../../components/StatusMessageCard.es.js";
14
+ import eo from "../../../components/TransactionListCard.es.js";
15
+ import { subscriptionFrequency as no } from "../../../components/SubscriptionStatus/subscriptionFrequency.es.js";
16
+ import { getLayoutConfig as io, transactionBlockVariant as ao } from "./layout.es.js";
17
+ import { observer as so } from "mobx-react-lite";
18
+ import { Icon as T } from "@mxenabled/mx-icons";
19
19
  import { jsx as t } from "react/jsx-runtime";
20
- import { alpha as so, useTheme as co } from "@mui/material/styles";
20
+ import { alpha as co, useTheme as mo } from "@mui/material/styles";
21
21
  import g from "@mui/material/Box";
22
- var c = 32, mo = Math.round(c * 0.625), uo = 24, T = 32, lo = 20, go = ({ icon: i }) => {
23
- const e = oo(i?.guid);
22
+ var c = 32, uo = Math.round(c * 0.625), lo = 24, S = 32, go = 20, fo = ({ icon: i }) => {
23
+ const e = ro(i?.guid);
24
24
  return e ? /* @__PURE__ */ t(g, {
25
25
  "aria-hidden": !0,
26
26
  "data-icon": e,
27
27
  "data-testid": "subscription-badge",
28
28
  sx: {
29
29
  alignItems: "center",
30
- bgcolor: `${S(i?.color)}.main`,
30
+ bgcolor: `${R(i?.color)}.main`,
31
31
  borderRadius: "50%",
32
32
  display: "flex",
33
- height: T,
33
+ height: S,
34
34
  justifyContent: "center",
35
- width: T
35
+ width: S
36
36
  },
37
- children: /* @__PURE__ */ t(R, {
37
+ children: /* @__PURE__ */ t(T, {
38
38
  fill: !0,
39
39
  name: e,
40
- size: lo,
41
- sx: { color: `${S(i?.color)}.contrastText` }
40
+ size: go,
41
+ sx: { color: `${R(i?.color)}.contrastText` }
42
42
  })
43
43
  }) : null;
44
- }, fo = (i, e, m) => {
45
- const o = Q(i.logo, i.primary_text);
44
+ }, po = (i, e, m) => {
45
+ const o = X(i.logo, i.primary_text);
46
46
  if (o) {
47
47
  if (o.logo_name) {
48
- if (!J(o.logo_name)) return;
48
+ if (!Q(o.logo_name)) return;
49
49
  const s = !!o.logo_fill, n = o.logo_color ?? e.palette.chart.chart2 ?? e.palette.primary.main;
50
50
  return /* @__PURE__ */ t(g, {
51
51
  sx: {
@@ -55,41 +55,41 @@ var c = 32, mo = Math.round(c * 0.625), uo = 24, T = 32, lo = 20, go = ({ icon:
55
55
  justifyContent: "center",
56
56
  width: c,
57
57
  ...s && {
58
- bgcolor: so(n, 0.15),
58
+ bgcolor: co(n, 0.15),
59
59
  borderRadius: `${e.shape.borderRadius}px`
60
60
  }
61
61
  },
62
- children: /* @__PURE__ */ t(R, {
62
+ children: /* @__PURE__ */ t(T, {
63
63
  name: o.logo_name,
64
- size: mo,
64
+ size: uo,
65
65
  sx: { color: s ? n : o.logo_color }
66
66
  })
67
67
  });
68
68
  }
69
- if (o.merchant_guid || o.institution_guid) return /* @__PURE__ */ t(K, {
69
+ if (o.merchant_guid || o.institution_guid) return /* @__PURE__ */ t(J, {
70
70
  logo: o,
71
71
  size: c
72
72
  });
73
- if (o.category_guid) return /* @__PURE__ */ t(Y, {
73
+ if (o.category_guid) return /* @__PURE__ */ t(K, {
74
74
  categoryGuid: o.category_guid,
75
75
  size: c,
76
76
  tint: m
77
77
  });
78
78
  }
79
- }, Mo = ao(({ payload: i }) => {
80
- const e = co(), m = H(), { recurring: o } = D(), { beat: s } = P(), { data: n, variant: E } = i.instance_slot, { answeredBackground: f, background: u, cardVariant: k, categoryTint: B, creditAmounts: O, elevated: A, followsSubscription: l, headerColor: G, raised: L, showFooter: F, showFrequency: p, showHeader: N, statusMessage: M, sx: w } = U(no(e), E, io.NoHeader, "TransactionBlock"), _ = (p || l) && s ? W({
79
+ }, wo = so(({ payload: i }) => {
80
+ const e = mo(), m = P(), { recurring: o } = H(), { beat: s } = U(), { data: n, variant: E } = i.instance_slot, { answeredBackground: f, background: u, cardVariant: k, categoryTint: B, creditAmounts: O, elevated: A, followsSubscription: l, headerColor: G, headerRegular: L, raised: F, showFooter: N, showFrequency: p, showHeader: M, statusMessage: w, sx: z } = V(io(e), E, ao.NoHeader, "TransactionBlock"), _ = (p || l) && s ? Y({
81
81
  beat: s,
82
82
  stores: m
83
- }) : void 0, y = !!l && _?.user_response === V.CONFIRMED;
84
- if (M) {
83
+ }) : void 0, h = !!l && _?.user_response === W.CONFIRMED;
84
+ if (w) {
85
85
  const r = a(n, "message");
86
- return typeof r != "string" || !r.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ t(ro, {
86
+ return typeof r != "string" || !r.trim() ? (console.warn("[TransactionBlock] status_message has no message — rendering nothing."), null) : /* @__PURE__ */ t(to, {
87
87
  icon: /* @__PURE__ */ t(g, {
88
88
  "aria-hidden": "true",
89
89
  sx: { display: "flex" },
90
- children: /* @__PURE__ */ t(X, {
90
+ children: /* @__PURE__ */ t(oo, {
91
91
  logo: I(a(n, "icon")),
92
- size: uo
92
+ size: lo
93
93
  })
94
94
  }),
95
95
  message: r,
@@ -99,34 +99,35 @@ var c = 32, mo = Math.round(c * 0.625), uo = 24, T = 32, lo = 20, go = ({ icon:
99
99
  } : void 0
100
100
  });
101
101
  }
102
- const d = a(n, "series"), h = a(n, "header_text");
102
+ const d = a(n, "series"), y = a(n, "header_text");
103
103
  if (!Array.isArray(d) || !d.length) return null;
104
- const z = N && typeof h == "string" ? h : void 0, b = a(n, "footer_text"), Z = a(n, "footer_amount"), $ = F && typeof b == "string" ? {
104
+ const Z = M && typeof y == "string" ? y : void 0, b = a(n, "footer_text"), $ = a(n, "footer_amount"), j = N && typeof b == "string" ? {
105
105
  label: b,
106
- amount: C(Z, x.cents)
107
- } : void 0, j = p ? eo(o, _) : void 0, q = l ? /* @__PURE__ */ t(go, { icon: I(a(n, y ? "reviewed_icon" : "icon")) }) : void 0, v = (r) => !!O && typeof r == "number" && r > 0;
108
- return /* @__PURE__ */ t(to, {
109
- background: y && f ? f : u,
110
- badge: q,
106
+ amount: C($, x.cents)
107
+ } : void 0, q = p ? no(o, _) : void 0, D = l ? /* @__PURE__ */ t(fo, { icon: I(a(n, h ? "reviewed_icon" : "icon")) }) : void 0, v = (r) => !!O && typeof r == "number" && r > 0;
108
+ return /* @__PURE__ */ t(eo, {
109
+ background: h && f ? f : u,
110
+ badge: D,
111
111
  elevated: A,
112
- footer: $,
113
- header: z,
112
+ footer: j,
113
+ header: Z,
114
114
  headerColor: G,
115
- raised: L,
116
- sx: w,
115
+ headerRegular: L,
116
+ raised: F,
117
+ sx: z,
117
118
  variant: k,
118
119
  rows: d.map((r) => ({
119
120
  amount: typeof r.amount == "number" ? `${v(r.amount) ? "+" : ""}${C(r.amount, x.cents)}` : "",
120
121
  amountColor: v(r.amount) ? "success.main" : void 0,
121
- amountCaption: j,
122
- leading: fo(r, e, B),
122
+ amountCaption: q,
123
+ leading: po(r, e, B),
123
124
  subtitle: r.secondary_text ?? "",
124
125
  title: r.primary_text ?? ""
125
126
  }))
126
127
  });
127
128
  });
128
129
  export {
129
- Mo as TransactionBlock
130
+ wo as TransactionBlock
130
131
  };
131
132
 
132
133
  //# sourceMappingURL=TransactionBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\nimport type { Theme } from '@mui/material/styles'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore, useGlobalStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport { useBeatActions } from '../../../beatActions'\nimport CategoryTile from '../../../components/CategoryTile'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport LogoMark, { isKnownIcon } from '../../../components/LogoMark'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\nimport { statusIconName, statusIconPalette } from '../../../components/statusIcon'\nimport { subscriptionFrequency } from '../../../components/SubscriptionStatus/subscriptionFrequency'\nimport { repeatingTransactionOf, USER_RESPONSE } from '../../../ctaActions/subscriptionAnswer'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef } from '../../slotReaders'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 24\n// Status badge: palette disc, contrastText glyph.\nconst BADGE_SIZE = 32\nconst BADGE_GLYPH_SIZE = 20\n\n/** Status disc from `data.icon` / `data.reviewed_icon`. */\nconst SubscriptionBadge = ({ icon }: { icon?: LogoRef }) => {\n const name = statusIconName(icon?.guid)\n\n if (!name) return null\n\n return (\n <Box\n aria-hidden={true}\n data-icon={name}\n data-testid=\"subscription-badge\"\n sx={{\n alignItems: 'center',\n bgcolor: `${statusIconPalette(icon?.color)}.main`,\n borderRadius: '50%',\n display: 'flex',\n height: BADGE_SIZE,\n justifyContent: 'center',\n width: BADGE_SIZE,\n }}\n >\n <Icon\n fill={true}\n name={name}\n size={BADGE_GLYPH_SIZE}\n sx={{ color: `${statusIconPalette(icon?.color)}.contrastText` }}\n />\n </Box>\n )\n}\n\n/**\n * The row's leading logo from its `LogoRef`; an unrecognized guid prefix draws none rather than\n * guessing. The variant's `categoryTint` styles only a `CAT-` row; a merchant's `fallback_guid`\n * keeps `MerchantLogo`'s untinted fallback.\n */\nconst renderRowLogo = (row: InstanceSlotRow, theme: Theme, categoryTint?: number) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n if (!isKnownIcon(logo.logo_name)) return undefined\n\n // A status `{ icon, color }` logo is a bare coloured glyph. An `ICO-` fill logo (Weekly New\n // Merchants' \"Others\" row) is Figma's accent tile: its colour, else chart-2, at 15% behind the glyph.\n const accentTile = !!logo.logo_fill\n const tileColor = logo.logo_color ?? theme.palette.chart.chart2 ?? theme.palette.primary.main\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n ...(accentTile && {\n bgcolor: alpha(tileColor, 0.15),\n // Figma: match the row's other logo tiles.\n borderRadius: `${theme.shape.borderRadius}px`,\n }),\n }}\n >\n <Icon\n name={logo.logo_name}\n size={ROW_ICON_SIZE}\n sx={{ color: accentTile ? tileColor : logo.logo_color }}\n />\n </Box>\n )\n }\n\n if (logo.merchant_guid || logo.institution_guid) {\n return <LogoMark logo={logo} size={ROW_LOGO_SIZE} />\n }\n\n if (logo.category_guid) {\n return (\n <CategoryTile categoryGuid={logo.category_guid} size={ROW_LOGO_SIZE} tint={categoryTint} />\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\", Weekly New Merchants' \"Total\")\n * renders when the variant's `showFooter` config is set (`with_header_footer`, `with_footer`), from\n * `data.footer_text` with `data.footer_amount` beside it, formatted like the row amounts (the\n * contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const stores = useGlobalStore()\n const { recurring: recurringCopy } = useGlobalCopyStore()\n const { beat } = useBeatActions()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const {\n answeredBackground,\n background,\n cardVariant,\n categoryTint,\n creditAmounts,\n elevated,\n followsSubscription,\n headerColor,\n raised,\n showFooter,\n showFrequency,\n showHeader,\n statusMessage,\n sx,\n } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n // The live repeating transaction (read-only), for the frequency and the badge / answered wash.\n const repeating =\n (showFrequency || followsSubscription) && beat\n ? repeatingTransactionOf({ beat, stores })\n : undefined\n const subscribed = !!followsSubscription && repeating?.user_response === USER_RESPONSE.CONFIRMED\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={asLogoRef(slot(data, 'icon'))} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n // The 20% wash layers over paper, as Figma's slot does.\n sx={background ? { backgroundImage: background, bgcolor: 'background.paper' } : undefined}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer =\n showFooter && typeof footerText === 'string'\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, CURRENCY_FORMAT.cents),\n }\n : undefined\n\n // Live, as pulse: the repeating transaction the CTA's `prepare` loads.\n const frequency = showFrequency ? subscriptionFrequency(recurringCopy, repeating) : undefined\n const badge = followsSubscription ? (\n <SubscriptionBadge icon={asLogoRef(slot(data, subscribed ? 'reviewed_icon' : 'icon'))} />\n ) : undefined\n\n // Only a positive amount reads as a credit.\n const isCredit = (amount: unknown) => !!creditAmounts && typeof amount === 'number' && amount > 0\n\n return (\n <TransactionListCard\n background={subscribed && answeredBackground ? answeredBackground : background}\n badge={badge}\n elevated={elevated}\n footer={footer}\n header={header}\n headerColor={headerColor}\n raised={raised}\n sx={sx}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount:\n typeof row.amount === 'number'\n ? `${isCredit(row.amount) ? '+' : ''}${formatCurrency(row.amount, CURRENCY_FORMAT.cents)}`\n : '',\n amountColor: isCredit(row.amount) ? 'success.main' : undefined,\n amountCaption: frequency,\n leading: renderRowLogo(row, theme, categoryTint),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,IAAgB,IAEhB,KAAgB,KAAK,MAAM,IAAgB,KAAK,GAChD,KAAmB,IAEnB,IAAa,IACb,KAAmB,IAGnB,KAAA,CAAqB,EAAE,MAAA,EAAA,MAA+B;AAC1D,QAAM,IAAO,GAAe,GAAM,IAAI;AAEtC,SAAK,IAGH,gBAAA,EAAC,GAAD;AAAA,IACE,eAAa;AAAA,IACb,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,GAAG,EAAkB,GAAM,KAAK,CAAA;AAAA,MACzC,cAAc;AAAA,MACd,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM;AAAA,MACA,MAAA;AAAA,MACN,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,GAAG,EAAkB,GAAM,KAAK,CAAA,gBAAiB;AAAA,IAC/D,CAAA;AAAA,EACE,CAAA,IAvBW;AAyBpB,GAOM,KAAA,CAAiB,GAAsB,GAAc,MAA0B;AACnF,QAAM,IAAO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,IACZ,gBAAA,EAAC,IAAD,EAAmB,MAAM,EAAU,EAAK,GAAM,IAAa,kBAAkB,MAAM,CAAC,EAAI,CAAA,IACtF,QAGE,IAAA,CAAY,MAAoB,CAAC,CAAC,KAAiB,OAAO,KAAW,YAAY,IAAS;AAEhG,SACE,gBAAA,EAAC,IAAD;AAAA,IACE,YAAY,KAAc,IAAqB,IAAqB;AAAA,IAC7D,OAAA;AAAA,IACG,UAAA;AAAA,IACF,QAAA;AAAA,IACA,QAAA;AAAA,IACK,aAAA;AAAA,IACL,QAAA;AAAA,IACJ,IAAA;AAAA,IACJ,SAAS;AAAA,IACT,MAAM,EAAO,IAAA,CAAK,OAAS;AAAA,MACzB,QACE,OAAO,EAAI,UAAW,WAClB,GAAG,EAAS,EAAI,MAAM,IAAI,MAAM,EAAA,GAAK,EAAe,EAAI,QAAQ,EAAgB,KAAK,CAAA,KACrF;AAAA,MACN,aAAa,EAAS,EAAI,MAAM,IAAI,iBAAiB;AAAA,MACrD,eAAe;AAAA,MACf,SAAS,GAAc,GAAK,GAAO,CAAY;AAAA,MAC/C,UAAU,EAAI,kBAAkB;AAAA,MAChC,OAAO,EAAI,gBAAgB;AAAA,IAC7B,EAAE;AAAA,EACH,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\nimport type { Theme } from '@mui/material/styles'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore, useGlobalStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport { useBeatActions } from '../../../beatActions'\nimport CategoryTile from '../../../components/CategoryTile'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport LogoMark, { isKnownIcon } from '../../../components/LogoMark'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\nimport { statusIconName, statusIconPalette } from '../../../components/statusIcon'\nimport { subscriptionFrequency } from '../../../components/SubscriptionStatus/subscriptionFrequency'\nimport { repeatingTransactionOf, USER_RESPONSE } from '../../../ctaActions/subscriptionAnswer'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef } from '../../slotReaders'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 24\n// Status badge: palette disc, contrastText glyph.\nconst BADGE_SIZE = 32\nconst BADGE_GLYPH_SIZE = 20\n\n/** Status disc from `data.icon` / `data.reviewed_icon`. */\nconst SubscriptionBadge = ({ icon }: { icon?: LogoRef }) => {\n const name = statusIconName(icon?.guid)\n\n if (!name) return null\n\n return (\n <Box\n aria-hidden={true}\n data-icon={name}\n data-testid=\"subscription-badge\"\n sx={{\n alignItems: 'center',\n bgcolor: `${statusIconPalette(icon?.color)}.main`,\n borderRadius: '50%',\n display: 'flex',\n height: BADGE_SIZE,\n justifyContent: 'center',\n width: BADGE_SIZE,\n }}\n >\n <Icon\n fill={true}\n name={name}\n size={BADGE_GLYPH_SIZE}\n sx={{ color: `${statusIconPalette(icon?.color)}.contrastText` }}\n />\n </Box>\n )\n}\n\n/**\n * The row's leading logo from its `LogoRef`; an unrecognized guid prefix draws none rather than\n * guessing. The variant's `categoryTint` styles only a `CAT-` row; a merchant's `fallback_guid`\n * keeps `MerchantLogo`'s untinted fallback.\n */\nconst renderRowLogo = (row: InstanceSlotRow, theme: Theme, categoryTint?: number) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n if (!isKnownIcon(logo.logo_name)) return undefined\n\n // A status `{ icon, color }` logo is a bare coloured glyph. An `ICO-` fill logo (Weekly New\n // Merchants' \"Others\" row) is Figma's accent tile: its colour, else chart-2, at 15% behind the glyph.\n const accentTile = !!logo.logo_fill\n const tileColor = logo.logo_color ?? theme.palette.chart.chart2 ?? theme.palette.primary.main\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n ...(accentTile && {\n bgcolor: alpha(tileColor, 0.15),\n // Figma: match the row's other logo tiles.\n borderRadius: `${theme.shape.borderRadius}px`,\n }),\n }}\n >\n <Icon\n name={logo.logo_name}\n size={ROW_ICON_SIZE}\n sx={{ color: accentTile ? tileColor : logo.logo_color }}\n />\n </Box>\n )\n }\n\n if (logo.merchant_guid || logo.institution_guid) {\n return <LogoMark logo={logo} size={ROW_LOGO_SIZE} />\n }\n\n if (logo.category_guid) {\n return (\n <CategoryTile categoryGuid={logo.category_guid} size={ROW_LOGO_SIZE} tint={categoryTint} />\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\", Weekly New Merchants' \"Total\")\n * renders when the variant's `showFooter` config is set (`with_header_footer`, `with_footer`), from\n * `data.footer_text` with `data.footer_amount` beside it, formatted like the row amounts (the\n * contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const stores = useGlobalStore()\n const { recurring: recurringCopy } = useGlobalCopyStore()\n const { beat } = useBeatActions()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const {\n answeredBackground,\n background,\n cardVariant,\n categoryTint,\n creditAmounts,\n elevated,\n followsSubscription,\n headerColor,\n headerRegular,\n raised,\n showFooter,\n showFrequency,\n showHeader,\n statusMessage,\n sx,\n } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n // The live repeating transaction (read-only), for the frequency and the badge / answered wash.\n const repeating =\n (showFrequency || followsSubscription) && beat\n ? repeatingTransactionOf({ beat, stores })\n : undefined\n const subscribed = !!followsSubscription && repeating?.user_response === USER_RESPONSE.CONFIRMED\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={asLogoRef(slot(data, 'icon'))} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n // The 20% wash layers over paper, as Figma's slot does.\n sx={background ? { backgroundImage: background, bgcolor: 'background.paper' } : undefined}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer =\n showFooter && typeof footerText === 'string'\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, CURRENCY_FORMAT.cents),\n }\n : undefined\n\n // Live, as pulse: the repeating transaction the CTA's `prepare` loads.\n const frequency = showFrequency ? subscriptionFrequency(recurringCopy, repeating) : undefined\n const badge = followsSubscription ? (\n <SubscriptionBadge icon={asLogoRef(slot(data, subscribed ? 'reviewed_icon' : 'icon'))} />\n ) : undefined\n\n // Only a positive amount reads as a credit.\n const isCredit = (amount: unknown) => !!creditAmounts && typeof amount === 'number' && amount > 0\n\n return (\n <TransactionListCard\n background={subscribed && answeredBackground ? answeredBackground : background}\n badge={badge}\n elevated={elevated}\n footer={footer}\n header={header}\n headerColor={headerColor}\n headerRegular={headerRegular}\n raised={raised}\n sx={sx}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount:\n typeof row.amount === 'number'\n ? `${isCredit(row.amount) ? '+' : ''}${formatCurrency(row.amount, CURRENCY_FORMAT.cents)}`\n : '',\n amountColor: isCredit(row.amount) ? 'success.main' : undefined,\n amountCaption: frequency,\n leading: renderRowLogo(row, theme, categoryTint),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,IAAgB,IAEhB,KAAgB,KAAK,MAAM,IAAgB,KAAK,GAChD,KAAmB,IAEnB,IAAa,IACb,KAAmB,IAGnB,KAAA,CAAqB,EAAE,MAAA,EAAA,MAA+B;AAC1D,QAAM,IAAO,GAAe,GAAM,IAAI;AAEtC,SAAK,IAGH,gBAAA,EAAC,GAAD;AAAA,IACE,eAAa;AAAA,IACb,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,GAAG,EAA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ui/material/styles';
15
15
  * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`
16
16
  * (Uncategorized Transactions V2 `complete`, "All Categorized!").
17
17
  * - `ListWithHeaderFooter` — every row under a date header plus a total row (Duplicate Payment).
18
- * - `SpendingSummary` — header, rows and footer, with the header text in `primary.main`
19
- * (Weekend Spending Summary: the weekend above one row per category and "Total spent").
18
+ * - `WithPrimaryHeaderFooter` — a regular `primary.main` header over the rows (each category on its
19
+ * tinted tile) and a total row (Weekend Spending Summary: "Showing x of y categories", "Total Spend").
20
20
  * - `CreditListWithHeader` — the date above the rows, each amount a green "+" credit (Micro Deposits' full).
21
21
  * - `CreditSummary` — credit rows, header never shown (Micro Deposits' mini sends one summed row).
22
+ * - `CreditListWithHeaderFooter` — `CreditListWithHeader` plus the footer row (HSA Deposit's "New Balance").
22
23
  */
23
24
  export declare const transactionBlockVariant: {
24
25
  readonly WithHeader: "with_header";
@@ -31,9 +32,10 @@ export declare const transactionBlockVariant: {
31
32
  readonly InfoWash: "info_wash";
32
33
  readonly WarningWash: "warning_wash";
33
34
  readonly StatusMessage: "status_message";
34
- readonly SpendingSummary: "spending_summary";
35
+ readonly WithPrimaryHeaderFooter: "with_primary_header_footer";
35
36
  readonly CreditListWithHeader: "credit_list_with_header";
36
37
  readonly CreditSummary: "credit_summary";
38
+ readonly CreditListWithHeaderFooter: "credit_list_with_header_footer";
37
39
  };
38
40
  export type TransactionBlockVariant = (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant];
39
41
  export interface TransactionLayoutConfig {
@@ -45,6 +47,8 @@ export interface TransactionLayoutConfig {
45
47
  cardVariant?: 'default' | 'primary';
46
48
  /** Theme colour for the header text, over the card style's own. */
47
49
  headerColor?: string;
50
+ /** Header text in the regular weight, not the grey utility header's bold (Figma "Showing x of y categories"). */
51
+ headerRegular?: boolean;
48
52
  /** CSS background for the slot behind the card; the card renders borderless unless `raised`. */
49
53
  background?: string;
50
54
  /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */
@@ -1,4 +1,4 @@
1
- import { WARM_LIME_ACCENT_GRADIENT as r, WARNING_WASH_GRADIENT as o, getPrimaryWashGradient as s } from "../../../components/celebrationGradients.es.js";
1
+ import { WARM_LIME_ACCENT_GRADIENT as t, WARNING_WASH_GRADIENT as o, getPrimaryWashGradient as i } from "../../../components/celebrationGradients.es.js";
2
2
  var e = {
3
3
  WithHeader: "with_header",
4
4
  WithHeaderFooter: "with_header_footer",
@@ -10,10 +10,11 @@ var e = {
10
10
  InfoWash: "info_wash",
11
11
  WarningWash: "warning_wash",
12
12
  StatusMessage: "status_message",
13
- SpendingSummary: "spending_summary",
13
+ WithPrimaryHeaderFooter: "with_primary_header_footer",
14
14
  CreditListWithHeader: "credit_list_with_header",
15
- CreditSummary: "credit_summary"
16
- }, t = 0.25, d = (a) => ({
15
+ CreditSummary: "credit_summary",
16
+ CreditListWithHeaderFooter: "credit_list_with_header_footer"
17
+ }, r = 0.25, d = (a) => ({
17
18
  [e.WithHeader]: {
18
19
  showHeader: !0,
19
20
  categoryTint: 0.15
@@ -38,7 +39,7 @@ var e = {
38
39
  },
39
40
  [e.InfoWash]: {
40
41
  showHeader: !1,
41
- background: s(a),
42
+ background: i(a),
42
43
  raised: !0,
43
44
  showFrequency: !0
44
45
  },
@@ -47,28 +48,36 @@ var e = {
47
48
  background: o,
48
49
  showFrequency: !0,
49
50
  followsSubscription: !0,
50
- answeredBackground: r,
51
+ answeredBackground: t,
51
52
  elevated: !0,
52
53
  sx: { p: "28px 24px 24px 32px" }
53
54
  },
54
55
  [e.StatusMessage]: {
55
56
  showHeader: !1,
56
57
  statusMessage: !0,
57
- background: r
58
+ background: t
58
59
  },
59
- [e.SpendingSummary]: {
60
+ [e.WithPrimaryHeaderFooter]: {
60
61
  showHeader: !0,
61
62
  showFooter: !0,
62
- headerColor: "primary.main"
63
+ headerColor: "primary.main",
64
+ headerRegular: !0,
65
+ categoryTint: r
63
66
  },
64
67
  [e.CreditListWithHeader]: {
65
68
  showHeader: !0,
66
- categoryTint: t,
69
+ categoryTint: r,
67
70
  creditAmounts: !0
68
71
  },
69
72
  [e.CreditSummary]: {
70
73
  showHeader: !1,
71
- categoryTint: t,
74
+ categoryTint: r,
75
+ creditAmounts: !0
76
+ },
77
+ [e.CreditListWithHeaderFooter]: {
78
+ showHeader: !0,
79
+ showFooter: !0,
80
+ categoryTint: r,
72
81
  creditAmounts: !0
73
82
  }
74
83
  });
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles'\n\nimport {\n WARM_LIME_ACCENT_GRADIENT,\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — raised row (border + shadow) on the blue slot wash, with the\n * subscription's live frequency under the amount (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n * - `ListWithHeaderFooter` — every row under a date header plus a total row (Duplicate Payment).\n * - `SpendingSummary` — header, rows and footer, with the header text in `primary.main`\n * (Weekend Spending Summary: the weekend above one row per category and \"Total spent\").\n * - `CreditListWithHeader` — the date above the rows, each amount a green \"+\" credit (Micro Deposits' full).\n * - `CreditSummary` — credit rows, header never shown (Micro Deposits' mini sends one summed row).\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n // A multi-row list with no in-card header plus a \"Total\" summary row (Weekly New Merchants; the\n // date range is the card subtitle). The plain no-footer list reuses `NoHeader`.\n WithFooter: 'with_footer',\n ListWithHeaderFooter: 'list_with_header_footer',\n List: 'list',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n SpendingSummary: 'spending_summary',\n CreditListWithHeader: 'credit_list_with_header',\n CreditSummary: 'credit_summary',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** Theme colour for the header text, over the card style's own. */\n headerColor?: string\n /** CSS background for the slot behind the card; the card renders borderless unless `raised`. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n /** Caption each amount with the beat's live repeating transaction frequency. */\n showFrequency?: boolean\n /** Status badge and answered wash from the live repeating transaction. */\n followsSubscription?: boolean\n /** Wash once subscribed. */\n answeredBackground?: string\n /** Row card at `elevation/1` (needs `background`). */\n elevated?: boolean\n /** Slot padding override (CSS shorthand). */\n sx?: SxProps\n /** Border and shadow on the row card. */\n raised?: boolean\n /** A `CAT-` row logo's accent tile: the category colour at this opacity (0–1), bordered in it. */\n categoryTint?: number\n /** Draw each amount as a credit: a \"+\" prefix in `success.main`. */\n creditAmounts?: boolean\n}\n\n/** Figma's category background token: the category colour at 25%. */\nconst CATEGORY_BACKGROUND_TINT = 0.25\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n // `with_header` is Replenish Savings' multi-account card: its one summary row is a `CAT-` Transfer\n // logo, which we tint at its own 15% accent. (Other `with_header` beats, e.g. Large Transaction, use\n // a merchant logo, so the `CAT-` tint path never runs for them.)\n [transactionBlockVariant.WithHeader]: { showHeader: true, categoryTint: 0.15 },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.WithFooter]: { showHeader: false, showFooter: true },\n [transactionBlockVariant.ListWithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.List]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n raised: true,\n showFrequency: true,\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n showFrequency: true,\n followsSubscription: true,\n answeredBackground: WARM_LIME_ACCENT_GRADIENT,\n elevated: true,\n // Room for the badge.\n sx: { p: '28px 24px 24px 32px' },\n },\n // Figma 1941:207336: the banner sits on the warm-to-lime slot wash.\n [transactionBlockVariant.StatusMessage]: {\n showHeader: false,\n statusMessage: true,\n background: WARM_LIME_ACCENT_GRADIENT,\n },\n [transactionBlockVariant.SpendingSummary]: {\n showHeader: true,\n showFooter: true,\n headerColor: 'primary.main',\n },\n [transactionBlockVariant.CreditListWithHeader]: {\n showHeader: true,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n creditAmounts: true,\n },\n [transactionBlockVariant.CreditSummary]: {\n showHeader: false,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n creditAmounts: true,\n },\n})\n"],"mappings":";AA6BA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;A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d;AAAA,EACC,CAAA,EAAwB,eAAA,GAAkB;AAAA,IACzC,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACC,CAAA,EAAwB,oBAAA,GAAuB;AAAA,IAC9C,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,EACjB;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IACvC,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,EACjB;AACF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles'\n\nimport {\n WARM_LIME_ACCENT_GRADIENT,\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — raised row (border + shadow) on the blue slot wash, with the\n * subscription's live frequency under the amount (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n * - `ListWithHeaderFooter` — every row under a date header plus a total row (Duplicate Payment).\n * - `WithPrimaryHeaderFooter` — a regular `primary.main` header over the rows (each category on its\n * tinted tile) and a total row (Weekend Spending Summary: \"Showing x of y categories\", \"Total Spend\").\n * - `CreditListWithHeader` — the date above the rows, each amount a green \"+\" credit (Micro Deposits' full).\n * - `CreditSummary` — credit rows, header never shown (Micro Deposits' mini sends one summed row).\n * - `CreditListWithHeaderFooter` — `CreditListWithHeader` plus the footer row (HSA Deposit's \"New Balance\").\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n // A multi-row list with no in-card header plus a \"Total\" summary row (Weekly New Merchants; the\n // date range is the card subtitle). The plain no-footer list reuses `NoHeader`.\n WithFooter: 'with_footer',\n ListWithHeaderFooter: 'list_with_header_footer',\n List: 'list',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n WithPrimaryHeaderFooter: 'with_primary_header_footer',\n CreditListWithHeader: 'credit_list_with_header',\n CreditSummary: 'credit_summary',\n CreditListWithHeaderFooter: 'credit_list_with_header_footer',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** Theme colour for the header text, over the card style's own. */\n headerColor?: string\n /** Header text in the regular weight, not the grey utility header's bold (Figma \"Showing x of y categories\"). */\n headerRegular?: boolean\n /** CSS background for the slot behind the card; the card renders borderless unless `raised`. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n /** Caption each amount with the beat's live repeating transaction frequency. */\n showFrequency?: boolean\n /** Status badge and answered wash from the live repeating transaction. */\n followsSubscription?: boolean\n /** Wash once subscribed. */\n answeredBackground?: string\n /** Row card at `elevation/1` (needs `background`). */\n elevated?: boolean\n /** Slot padding override (CSS shorthand). */\n sx?: SxProps\n /** Border and shadow on the row card. */\n raised?: boolean\n /** A `CAT-` row logo's accent tile: the category colour at this opacity (0–1), bordered in it. */\n categoryTint?: number\n /** Draw each amount as a credit: a \"+\" prefix in `success.main`. */\n creditAmounts?: boolean\n}\n\n/** Figma's category background token: the category colour at 25%. */\nconst CATEGORY_BACKGROUND_TINT = 0.25\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n // `with_header` is Replenish Savings' multi-account card: its one summary row is a `CAT-` Transfer\n // logo, which we tint at its own 15% accent. (Other `with_header` beats, e.g. Large Transaction, use\n // a merchant logo, so the `CAT-` tint path never runs for them.)\n [transactionBlockVariant.WithHeader]: { showHeader: true, categoryTint: 0.15 },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.WithFooter]: { showHeader: false, showFooter: true },\n [transactionBlockVariant.ListWithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.List]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n raised: true,\n showFrequency: true,\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n showFrequency: true,\n followsSubscription: true,\n answeredBackground: WARM_LIME_ACCENT_GRADIENT,\n elevated: true,\n // Room for the badge.\n sx: { p: '28px 24px 24px 32px' },\n },\n // Figma 1941:207336: the banner sits on the warm-to-lime slot wash.\n [transactionBlockVariant.StatusMessage]: {\n showHeader: false,\n statusMessage: true,\n background: WARM_LIME_ACCENT_GRADIENT,\n },\n // Figma 1283:89587: \"Showing x of y categories\" in 11px regular primary, each category tile at its 25% background.\n [transactionBlockVariant.WithPrimaryHeaderFooter]: {\n showHeader: true,\n showFooter: true,\n headerColor: 'primary.main',\n headerRegular: true,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n },\n [transactionBlockVariant.CreditListWithHeader]: {\n showHeader: true,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n creditAmounts: true,\n },\n [transactionBlockVariant.CreditSummary]: {\n showHeader: false,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n creditAmounts: true,\n },\n // Figma 433:101398: HSA Deposit's dated credits with the \"New Balance\" line.\n [transactionBlockVariant.CreditListWithHeaderFooter]: {\n showHeader: true,\n showFooter: true,\n categoryTint: CATEGORY_BACKGROUND_TINT,\n creditAmounts: true,\n },\n})\n"],"mappings":";AA8BA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EAGV,YAAY;AAAA,EACZ,sBAAsB;AAAA,EACtB,MAAM;AAAA,EACN,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,4BAA4B;AAC9B,GAuCM,IAA2B,MAGpB,IAAA,CACX,OAC8D;AAAA,EAI7D,CAAA,EAAwB,UAAA,GAAa;AAAA,IAAE,YAAY;AAAA,IAAM,cAAc;AAAA,EAAK;AAAA,EAC5E,CAAA,EAAwB,gBAAA,GAAmB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EAChF,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,UAAA,GAAa;AAAA,IAAE,YAAY;AAAA,IAAO,YAAY;AAAA,EAAK;AAAA,EAC3E,CAAA,EAAwB,oBAAA,GAAuB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EACpF,CAAA,EAAwB,IAAA,GAAO,EAAE,YAAY,GAAM;AAAA,E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