@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,59 +1,59 @@
1
- import { formatCurrency as R, generateEqualIntervals as I, roundedAverage as ut } from "../../../core/utils/NumberFormatting.es.js";
2
- import { stripChartSlotProps as xt } from "./chartSlotProps.es.js";
3
- import { getMarkerShape as gt } from "./linechart/utils/markerShapes.es.js";
4
- import bt from "./linechart/CustomLegend.es.js";
5
- import { CustomLine as kt } from "./linechart/CustomLine.es.js";
6
- import { CustomMark as Lt } from "./linechart/CustomMark.es.js";
7
- import { CustomTooltip as Mt } from "./linechart/CustomTooltip.es.js";
1
+ import { formatCurrency as I, generateEqualIntervals as S, roundedAverage as gt } from "../../../core/utils/NumberFormatting.es.js";
2
+ import { stripChartSlotProps as bt } from "./chartSlotProps.es.js";
3
+ import { getMarkerShape as kt } from "./linechart/utils/markerShapes.es.js";
4
+ import Lt from "./linechart/CustomLegend.es.js";
5
+ import { CustomLine as Mt } from "./linechart/CustomLine.es.js";
6
+ import { CustomMark as vt } from "./linechart/CustomMark.es.js";
7
+ import { CustomTooltip as Tt } from "./linechart/CustomTooltip.es.js";
8
8
  import "react";
9
- import { jsx as e, jsxs as x } from "react/jsx-runtime";
10
- import { useTheme as vt } from "@mui/material/styles";
11
- import Tt from "@mui/material/Box";
12
- import { BarPlot as At } from "@mui/x-charts/BarChart";
13
- import { ChartContainer as Ct } from "@mui/x-charts/ChartContainer";
14
- import { ChartsAxisHighlight as Pt } from "@mui/x-charts/ChartsAxisHighlight";
15
- import { ChartsText as S } from "@mui/x-charts/ChartsText";
16
- import { ChartsReferenceLine as Rt } from "@mui/x-charts/ChartsReferenceLine";
17
- import { ChartsTooltipContainer as It } from "@mui/x-charts/ChartsTooltip";
18
- import { ChartsXAxis as St } from "@mui/x-charts/ChartsXAxis";
19
- import { ChartsYAxis as wt } from "@mui/x-charts/ChartsYAxis";
20
- import { AreaPlot as Ot, LinePlot as _t, MarkPlot as Dt } from "@mui/x-charts/LineChart";
21
- var Gt = (a) => {
22
- const f = typeof a.text == "string" ? a.text : "", c = Array.from(f.trim())[0] ?? "";
23
- return c ? /* @__PURE__ */ e(S, {
24
- ...a,
25
- "aria-label": f,
9
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
10
+ import { useTheme as At } from "@mui/material/styles";
11
+ import Ct from "@mui/material/Box";
12
+ import { BarPlot as Pt } from "@mui/x-charts/BarChart";
13
+ import { ChartContainer as Rt } from "@mui/x-charts/ChartContainer";
14
+ import { ChartsAxisHighlight as It } from "@mui/x-charts/ChartsAxisHighlight";
15
+ import { ChartsText as w } from "@mui/x-charts/ChartsText";
16
+ import { ChartsReferenceLine as St } from "@mui/x-charts/ChartsReferenceLine";
17
+ import { ChartsTooltipContainer as wt } from "@mui/x-charts/ChartsTooltip";
18
+ import { ChartsXAxis as Ot } from "@mui/x-charts/ChartsXAxis";
19
+ import { ChartsYAxis as _t } from "@mui/x-charts/ChartsYAxis";
20
+ import { AreaPlot as Dt, LinePlot as Gt, MarkPlot as Nt } from "@mui/x-charts/LineChart";
21
+ var Wt = (r) => {
22
+ const p = typeof r.text == "string" ? r.text : "", c = Array.from(p.trim())[0] ?? "";
23
+ return c ? /* @__PURE__ */ e(w, {
24
+ ...r,
25
+ "aria-label": p,
26
26
  role: "img",
27
27
  text: c
28
- }) : /* @__PURE__ */ e(S, { ...a });
29
- }, Nt = { axisTickLabel: Gt }, ie = ({ areaColor: a, areaGradientColor: f, averageLineStyle: c, axisColor: n, baseline: w = "max", chartFor: g, chartXaxisSx: O, chartYaxisSx: _, colors: L, curveType: D = "linear", customLegendVariant: G, customLegendSx: N, customLegendBoxSx: W, customTooltipLabels: X, datasets: h, height: $, isCurrency: j, isGraphClippingXAxis: E = !1, labels: M, labelBackgroundColor: v, labelFontColor: q, labelFontSize: z, margin: H, markHandlers: Y, markVariant: B, markStyles: J, minRange: K, maxRange: Q, narrowXAxisLabels: T = !1, showAllXAxisLabels: U = !1, onItemClick: b, peerAverage: V, showArea: A = !1, showAverage: C = !1, showAxisHighlight: Z = !1, showBars: k = !1, showLegend: F = !1, showMark: tt = !0, showMarkLabel: et = !1, showTooltip: at = !1, showXAxis: rt = !1, showXAxisTicks: it = !1, showYAxis: ot = !1, showYAxisTicks: nt = !1, tickIntervals: st, title: lt, useCustomMark: mt = !1, valueFormatterString: o, width: pt, xAxisScaleType: ft, yAxisValueFormatter: ct }) => {
30
- const r = vt(), ht = h.flat().map((t) => t.x), s = h.flat().map((t) => t.y), P = V || ut(s), l = s.length ? Math.floor(Math.min(...s) / 100) * 100 : 0, m = s.length ? Math.ceil(Math.max(...s) / 100) * 100 : 0, y = h.map((t, u) => ({
31
- type: k ? "bar" : "line",
32
- curve: D,
33
- color: k ? r.palette.chart?.chart6 : L[u] ?? r.palette.primary.main,
28
+ }) : /* @__PURE__ */ e(w, { ...r });
29
+ }, Xt = { axisTickLabel: Wt }, ne = ({ areaColor: r, areaGradientColor: p, averageLineStyle: c, axisColor: n, baseline: O = "max", chartFor: b, chartXaxisSx: _, chartYaxisSx: D, colors: M, curveType: G = "linear", customLegendVariant: N, customLegendSx: W, customLegendBoxSx: X, customTooltipLabels: $, datasets: h, height: j, isCurrency: E, isGraphClippingXAxis: q = !1, labels: v, labelBackgroundColor: T, labelFontColor: H, labelFontSize: Y, margin: z, markHandlers: B, markVariant: J, markStyles: K, minRange: Q, maxRange: U, narrowXAxisLabels: A = !1, showAllXAxisLabels: V = !1, onItemClick: k, peerAverage: Z, showArea: C = !1, showAverage: P = !1, showAxisHighlight: F = !1, showBars: L = !1, showLegend: tt = !1, showMark: et = !0, showMarkLabel: rt = !1, showTooltip: at = !1, showXAxis: it = !1, showXAxisTicks: ot = !1, showYAxis: nt = !1, showYAxisTicks: st = !1, tickIntervals: lt, title: mt, useCustomMark: ft = !1, circleMarks: pt = !1, tickLabelFontSize: y, valueFormatterString: o, width: ct, xAxisScaleType: ht, yAxisValueFormatter: yt }) => {
30
+ const a = At(), dt = h.flat().map((t) => t.x), s = h.flat().map((t) => t.y), R = Z || gt(s), l = s.length ? Math.floor(Math.min(...s) / 100) * 100 : 0, m = s.length ? Math.ceil(Math.max(...s) / 100) * 100 : 0, d = h.map((t, x) => ({
31
+ type: L ? "bar" : "line",
32
+ curve: G,
33
+ color: L ? a.palette.chart?.chart6 : M[x] ?? a.palette.primary.main,
34
34
  data: t.map((i) => i.y),
35
- area: A,
36
- baseline: w,
35
+ area: C,
36
+ baseline: O,
37
37
  showMark: !0,
38
- shape: gt(u),
39
- valueFormatter: (i) => o ? R(i || 0, o) : String(i)
40
- })), yt = {
38
+ shape: pt ? "circle" : kt(x),
39
+ valueFormatter: (i) => o ? I(i || 0, o) : String(i)
40
+ })), ut = {
41
41
  top: 60,
42
42
  right: 35,
43
43
  bottom: 25,
44
44
  left: -10,
45
- ...H
45
+ ...z
46
46
  };
47
- let p = K ?? l, d = Q ?? m;
48
- if (g === "networthChart") {
49
- const t = m - l, u = t < m * 0.05 ? 0.25 : 0.2, i = Math.max(t * u, m * 0.015);
50
- p = l - i < 0 ? l : l - i, d = m + i;
47
+ let f = Q ?? l, u = U ?? m;
48
+ if (b === "networthChart") {
49
+ const t = m - l, x = t < m * 0.05 ? 0.25 : 0.2, i = Math.max(t * x, m * 0.015);
50
+ f = l - i < 0 ? l : l - i, u = m + i;
51
51
  }
52
- const dt = () => {
53
- if (g === "creditOverTime") return I(p, 850, 5);
54
- if (g === "networthChart") return I(p, d, 5);
52
+ const xt = () => {
53
+ if (b === "creditOverTime") return S(f, 850, 5);
54
+ if (b === "networthChart") return S(f, u, 5);
55
55
  };
56
- return /* @__PURE__ */ x(Tt, {
56
+ return /* @__PURE__ */ g(Ct, {
57
57
  sx: {
58
58
  position: "relative",
59
59
  touchAction: "pan-y",
@@ -63,52 +63,54 @@ var Gt = (a) => {
63
63
  },
64
64
  "& .recharts-wrapper": { touchAction: "pan-y" }
65
65
  },
66
- children: [/* @__PURE__ */ x(Ct, {
67
- height: $,
66
+ children: [/* @__PURE__ */ g(Rt, {
67
+ height: j,
68
68
  tabIndex: -1,
69
- margin: yt,
70
- series: y,
69
+ margin: ut,
70
+ series: d,
71
71
  sx: {
72
72
  "& .MuiBarLabel-root": {
73
73
  fontSize: 10,
74
74
  fontWeight: 600
75
75
  },
76
76
  "& .MuiAreaElement-root": { opacity: 0.15 },
77
- "& .MuiChartsAxis-tickLabel > tspan": { fontFamily: r.typography.body2.fontFamily },
78
- "& .MuiLineChart-markLabel": { fontFamily: r.typography.body2.fontFamily }
77
+ "& .MuiChartsAxis-tickLabel > tspan": { fontFamily: a.typography.body2.fontFamily },
78
+ "& .MuiLineChart-markLabel": { fontFamily: a.typography.body2.fontFamily }
79
79
  },
80
- width: pt,
80
+ width: ct,
81
81
  xAxis: [{
82
- data: ht,
83
- scaleType: ft || (k ? "band" : "point"),
84
- ...(U || T) && { tickLabelInterval: () => !0 }
82
+ data: dt,
83
+ scaleType: ht || (L ? "band" : "point"),
84
+ ...(V || A) && { tickLabelInterval: () => !0 },
85
+ ...y !== void 0 && { tickLabelStyle: { fontSize: y } }
85
86
  }],
86
87
  yAxis: [{
87
- tickInterval: st ?? dt(),
88
- min: E ? -22 : p,
89
- max: d || 100,
90
- colorMap: A && y.length < 2 ? {
88
+ tickInterval: lt ?? xt(),
89
+ min: q ? -22 : f,
90
+ max: u || 100,
91
+ colorMap: C && d.length < 2 ? {
91
92
  type: "continuous",
92
- min: p,
93
- max: d,
94
- color: [r.palette.background.paper, f ?? L[0] ?? r.palette.primary.main]
93
+ min: f,
94
+ max: u,
95
+ color: [a.palette.background.paper, p ?? M[0] ?? a.palette.primary.main]
95
96
  } : void 0,
96
- valueFormatter: ct ?? ((t) => o ? R(t, o) : String(t)),
97
+ valueFormatter: yt ?? ((t) => o ? I(t, o) : String(t)),
98
+ ...y !== void 0 && { tickLabelStyle: { fontSize: y } },
97
99
  width: 62
98
100
  }],
99
101
  children: [
100
- C && /* @__PURE__ */ e(Rt, {
102
+ P && /* @__PURE__ */ e(St, {
101
103
  lineStyle: {
102
- stroke: v ? r.palette.neutral.main : r.palette.neutral.dark,
104
+ stroke: T ? a.palette.neutral.main : a.palette.neutral.dark,
103
105
  strokeDasharray: "10, 8",
104
106
  strokeWidth: 2,
105
107
  ...c
106
108
  },
107
- y: P
109
+ y: R
108
110
  }),
109
- /* @__PURE__ */ e(Ot, {
110
- onItemClick: b,
111
- ...a && { slots: { area: (t) => /* @__PURE__ */ x("g", { children: [/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ x("linearGradient", {
111
+ /* @__PURE__ */ e(Dt, {
112
+ onItemClick: k,
113
+ ...r && { slots: { area: (t) => /* @__PURE__ */ g("g", { children: [/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ g("linearGradient", {
112
114
  id: "customGradient",
113
115
  x1: "0",
114
116
  x2: "0",
@@ -116,94 +118,94 @@ var Gt = (a) => {
116
118
  y2: "1",
117
119
  children: [/* @__PURE__ */ e("stop", {
118
120
  offset: "0%",
119
- stopColor: a
121
+ stopColor: r
120
122
  }), /* @__PURE__ */ e("stop", {
121
123
  offset: "100%",
122
- stopColor: a,
124
+ stopColor: r,
123
125
  stopOpacity: 0.02
124
126
  })]
125
127
  }) }), /* @__PURE__ */ e("path", {
126
- ...xt(t),
128
+ ...bt(t),
127
129
  fill: "url(#customGradient)"
128
130
  })] }) } }
129
131
  }),
130
- /* @__PURE__ */ e(_t, {
131
- onItemClick: b,
132
- slots: { line: (t) => /* @__PURE__ */ e(kt, {
132
+ /* @__PURE__ */ e(Gt, {
133
+ onItemClick: k,
134
+ slots: { line: (t) => /* @__PURE__ */ e(Mt, {
133
135
  ...t,
134
- lineColor: a ?? t.ownerState.color ?? r.palette.primary.main
136
+ lineColor: r ?? t.ownerState.color ?? a.palette.primary.main
135
137
  }) }
136
138
  }),
137
- /* @__PURE__ */ e(Dt, {
138
- onItemClick: b,
139
- slots: mt ? { mark: (t) => /* @__PURE__ */ e(Lt, {
140
- handlers: Y,
141
- labelBackgroundColor: v,
142
- labelFontColor: q,
143
- labelFontSize: z,
144
- showLabel: et,
145
- showMark: tt || t.dataIndex === h[0].length - 1,
146
- style: J?.(t.dataIndex) ?? {},
139
+ /* @__PURE__ */ e(Nt, {
140
+ onItemClick: k,
141
+ slots: ft ? { mark: (t) => /* @__PURE__ */ e(vt, {
142
+ handlers: B,
143
+ labelBackgroundColor: T,
144
+ labelFontColor: H,
145
+ labelFontSize: Y,
146
+ showLabel: rt,
147
+ showMark: et || t.dataIndex === h[0].length - 1,
148
+ style: K?.(t.dataIndex) ?? {},
147
149
  valueFormatterString: o,
148
- variant: B,
150
+ variant: J,
149
151
  yData: s,
150
152
  ...t
151
153
  }) } : void 0
152
154
  }),
153
- /* @__PURE__ */ e(At, {
155
+ /* @__PURE__ */ e(Pt, {
154
156
  barLabel: (t) => Number(t.value) > 0 ? `$${t.value}` : null,
155
157
  borderRadius: 10
156
158
  }),
157
- /* @__PURE__ */ e(St, {
158
- disableLine: !rt,
159
- disableTicks: !it,
160
- slots: T ? Nt : void 0,
159
+ /* @__PURE__ */ e(Ot, {
160
+ disableLine: !it,
161
+ disableTicks: !ot,
162
+ slots: A ? Xt : void 0,
161
163
  slotProps: n ? {
162
164
  axisLine: { style: { stroke: n } },
163
165
  axisTick: { style: { stroke: n } }
164
166
  } : {},
165
- sx: { ...O }
167
+ sx: { ..._ }
166
168
  }),
167
- /* @__PURE__ */ e(wt, {
168
- disableLine: !ot,
169
- disableTicks: !nt,
169
+ /* @__PURE__ */ e(_t, {
170
+ disableLine: !nt,
171
+ disableTicks: !st,
170
172
  slotProps: n ? {
171
173
  axisLine: { style: { stroke: n } },
172
174
  axisTick: { style: { stroke: n } }
173
175
  } : {},
174
- sx: { ..._ }
176
+ sx: { ...D }
175
177
  }),
176
- Z && /* @__PURE__ */ e(Pt, { x: "line" }),
177
- at && /* @__PURE__ */ e(It, {
178
+ F && /* @__PURE__ */ e(It, { x: "line" }),
179
+ at && /* @__PURE__ */ e(wt, {
178
180
  trigger: "axis",
179
- children: /* @__PURE__ */ e(Mt, {
180
- customLabels: X,
181
- isCurrency: j,
182
- labels: M,
183
- series: y,
181
+ children: /* @__PURE__ */ e(Tt, {
182
+ customLabels: $,
183
+ isCurrency: E,
184
+ labels: v,
185
+ series: d,
184
186
  valueFormatterString: o
185
187
  })
186
188
  })
187
189
  ]
188
- }), F && /* @__PURE__ */ e(bt, {
189
- average: C ? P : void 0,
190
- customLegendBoxSx: W,
191
- customLegendVariant: G,
192
- labels: M,
193
- series: y,
190
+ }), tt && /* @__PURE__ */ e(Lt, {
191
+ average: P ? R : void 0,
192
+ customLegendBoxSx: X,
193
+ customLegendVariant: N,
194
+ labels: v,
195
+ series: d,
194
196
  style: {
195
197
  position: "absolute",
196
198
  top: 16,
197
199
  left: 16,
198
- ...N
200
+ ...W
199
201
  },
200
- title: lt,
202
+ title: mt,
201
203
  valueFormatterString: o
202
204
  })]
203
205
  });
204
206
  };
205
207
  export {
206
- ie as LineChart
208
+ ne as LineChart
207
209
  };
208
210
 
209
211
  //# sourceMappingURL=LineChart.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.es.js","names":[],"sources":["../../../../src/common/components/charts/LineChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport type { AllSeriesType } from '@mui/x-charts'\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer as ResponsiveChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight'\nimport { ChartsText, type ChartsTextProps } from '@mui/x-charts/ChartsText'\nimport { ChartsReferenceLine } from '@mui/x-charts/ChartsReferenceLine'\nimport { ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\nimport { ChartsYAxis } from '@mui/x-charts/ChartsYAxis'\nimport { AreaPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart'\n\nimport { stripChartSlotProps } from './chartSlotProps'\nimport CustomLegend from './linechart/CustomLegend'\nimport { getMarkerShape } from './linechart/utils/markerShapes'\nimport { CustomLine } from './linechart/CustomLine'\nimport { CustomMark, MarkHandlers, type MarkVariant } from './linechart/CustomMark'\nimport { CustomTooltip } from './linechart/CustomTooltip'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { generateEqualIntervals, roundedAverage } from '../../../core/utils/NumberFormatting'\n\nexport type LineChartDataset = { x: string; y: number }[]\nexport type LineChartLabel = string | { label: string; amount: number }\nexport type TooltipLabel = LineChartLabel & { header?: string }\n\n// X-axis tick that shows only the first letter of the label (e.g. \"J\" for\n// \"Jan\") so all labels fit in small/narrow views. role=\"img\" + aria-label give\n// the tick a reliable accessible name (aria-label alone on a bare SVG <text> is\n// inconsistently announced), so screen readers still get the full label.\nconst NarrowXAxisTickLabel = (props: ChartsTextProps) => {\n const fullLabel = typeof props.text === 'string' ? props.text : ''\n // Array.from keeps surrogate pairs / combining marks intact (non-Latin locales).\n const singleLetter = Array.from(fullLabel.trim())[0] ?? ''\n if (!singleLetter) return <ChartsText {...props} />\n return <ChartsText {...props} aria-label={fullLabel} role=\"img\" text={singleLetter} />\n}\n\nconst NARROW_X_AXIS_SLOTS = { axisTickLabel: NarrowXAxisTickLabel }\n\ntype LineChartCurve =\n | 'catmullRom'\n | 'linear'\n | 'monotoneX'\n | 'monotoneY'\n | 'natural'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\n | 'bump'\n | 'bumpX'\n | 'bumpY'\n\ninterface LineChartProps {\n areaColor?: string\n areaGradientColor?: string\n averageLineStyle?: React.CSSProperties\n axisColor?: string\n baseline?: string\n chartFor?: string\n chartXaxisSx?: SxProps\n chartYaxisSx?: SxProps\n // Because theme chart colors are typed string|undefined\n colors: (string | undefined)[]\n curveType?: LineChartCurve\n customLegendVariant?: string\n customLegendSx?: SxProps\n customLegendBoxSx?: SxProps\n customTooltipLabels?: TooltipLabel[][]\n datasets: LineChartDataset[]\n height?: number\n isCurrency?: boolean\n isGraphClippingXAxis?: boolean\n labels: LineChartLabel[]\n labelBackgroundColor?: string\n labelFontColor?: string\n labelFontSize?: number\n margin?: { top?: number; right?: number; bottom?: number; left?: number }\n markHandlers?: MarkHandlers\n markVariant?: MarkVariant\n markStyles?: (markIndex: number) => React.CSSProperties & {\n markLabelStyles?: React.CSSProperties\n }\n minRange?: number\n maxRange?: number\n // When true, x-axis labels render as a single letter (with the full label kept\n // as the accessible name), so months don't overlap and get dropped in\n // small/narrow views. Implies showAllXAxisLabels.\n narrowXAxisLabels?: boolean\n onItemClick?: () => void\n // When true, every x-axis tick label is shown instead of letting x-charts drop\n // overlapping ones. Opt-in so it doesn't affect other charts that rely on the\n // default thinning.\n showAllXAxisLabels?: boolean\n peerAverage?: number\n showArea?: boolean\n showAverage?: boolean\n showAxisHighlight?: boolean\n showBars?: boolean\n showLegend?: boolean\n showMark?: boolean\n showMarkLabel?: boolean\n showTooltip?: boolean\n showXAxis?: boolean\n showXAxisTicks?: boolean\n showYAxis?: boolean\n showYAxisTicks?: boolean\n tickIntervals?: any[] | 'auto' | ((value: any, index: number) => boolean) | undefined\n title?: string\n useCustomMark?: boolean\n valueFormatterString?: string\n width?: number\n xAxisScaleType?: 'band' | 'point'\n yAxisValueFormatter?: (value: number) => string\n}\n\n// TODO: Remove negative values and use a proper layout to support X-Charts v8\n\nexport const LineChart: React.FC<LineChartProps> = ({\n areaColor,\n areaGradientColor,\n averageLineStyle,\n axisColor,\n baseline = 'max',\n chartFor,\n chartXaxisSx,\n chartYaxisSx,\n colors,\n curveType = 'linear',\n customLegendVariant,\n customLegendSx,\n customLegendBoxSx,\n customTooltipLabels,\n datasets,\n height,\n isCurrency,\n isGraphClippingXAxis = false,\n labels,\n labelBackgroundColor,\n labelFontColor,\n labelFontSize,\n margin,\n markHandlers,\n markVariant,\n markStyles,\n minRange,\n maxRange,\n narrowXAxisLabels = false,\n showAllXAxisLabels = false,\n onItemClick,\n peerAverage,\n showArea = false,\n showAverage = false,\n showAxisHighlight = false,\n showBars = false,\n showLegend = false,\n showMark = true,\n showMarkLabel = false,\n showTooltip = false,\n showXAxis = false,\n showXAxisTicks = false,\n showYAxis = false,\n showYAxisTicks = false,\n tickIntervals,\n title,\n useCustomMark = false,\n valueFormatterString,\n width,\n xAxisScaleType,\n yAxisValueFormatter,\n}) => {\n const theme = useTheme()\n\n // Data for the X axis\n const xData = datasets.flat().map((item) => item.x)\n const yData = datasets.flat().map((item) => item.y)\n\n // Guard the empty-data case: with no points, reduce()/Math.min()/Math.max()\n // produce NaN/±Infinity which flow into the y-axis and make x-charts warn\n // \"the value NaN does not exist in the data of y axis\". Default to 0 so an\n // empty/loading chart renders a valid (flat) axis instead.\n const average = peerAverage || roundedAverage(yData)\n\n // Used for the min and max Y axis values\n const yMin = yData.length ? Math.floor(Math.min(...yData) / 100) * 100 : 0\n const yMax = yData.length ? Math.ceil(Math.max(...yData) / 100) * 100 : 0\n\n const series = datasets.map((data, index) => {\n return {\n type: showBars ? 'bar' : 'line',\n curve: curveType,\n color: showBars ? theme.palette.chart?.chart6 : (colors[index] ?? theme.palette.primary.main),\n data: data.map((item) => item.y),\n area: showArea,\n baseline: baseline,\n showMark: true,\n shape: getMarkerShape(index),\n valueFormatter: (value: number) =>\n valueFormatterString ? formatCurrency(value || 0, valueFormatterString) : String(value),\n }\n })\n\n const defaultMargin = {\n top: 60,\n right: 35,\n bottom: 25,\n left: -10,\n }\n\n // Merge default margin with any provided custom margin\n const chartMargin = {\n ...defaultMargin,\n ...margin,\n }\n\n let rangeMin = minRange ?? yMin\n let rangeMax = maxRange ?? yMax\n if (chartFor === 'networthChart') {\n const valueRange = yMax - yMin\n\n const paddingRatio = valueRange < yMax * 0.05 ? 0.25 : 0.2\n const padding = Math.max(valueRange * paddingRatio, yMax * 0.015)\n rangeMin = yMin - padding < 0 ? yMin : yMin - padding\n rangeMax = yMax + padding\n }\n\n const getTickInterval = () => {\n if (chartFor === 'creditOverTime') {\n return generateEqualIntervals(rangeMin, 850, 5)\n } else if (chartFor === 'networthChart') {\n return generateEqualIntervals(rangeMin, rangeMax, 5)\n }\n return undefined\n }\n return (\n <Box\n sx={{\n position: 'relative',\n touchAction: 'pan-y', // Allow vertical scrolling\n '& svg': {\n touchAction: 'pan-y', // Allow vertical scrolling on SVG\n userSelect: 'none', // Prevent text selection\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y', // For Recharts library specifically\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n // Without this, Chrome adds the chart to the Tab order (MUI X Charts puts focus\n // listeners on the SVG), but the chart has no keyboard actions.\n tabIndex={-1}\n margin={chartMargin}\n series={series as AllSeriesType[]}\n sx={{\n '& .MuiBarLabel-root': {\n fontSize: 10,\n fontWeight: 600,\n },\n '& .MuiAreaElement-root': {\n opacity: 0.15,\n },\n '& .MuiChartsAxis-tickLabel > tspan': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n '& .MuiLineChart-markLabel': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n }}\n width={width}\n xAxis={[\n {\n data: xData,\n scaleType: xAxisScaleType || (showBars ? 'band' : 'point'),\n // Show every tick instead of letting x-charts drop overlapping ones.\n ...((showAllXAxisLabels || narrowXAxisLabels) && { tickLabelInterval: () => true }),\n },\n ]}\n yAxis={[\n {\n tickInterval: tickIntervals ?? getTickInterval(),\n min: isGraphClippingXAxis ? -22 : rangeMin,\n max: rangeMax || 100,\n colorMap:\n showArea && series.length < 2\n ? {\n type: 'continuous',\n min: rangeMin,\n max: rangeMax,\n color: [\n theme.palette.background.paper,\n areaGradientColor ?? colors[0] ?? theme.palette.primary.main,\n ],\n }\n : undefined,\n valueFormatter:\n yAxisValueFormatter ??\n ((value: number) =>\n valueFormatterString ? formatCurrency(value, valueFormatterString) : String(value)),\n width: 62,\n },\n ]}\n >\n {/** Provides the average line - positioned first to be behind other elements **/}\n {showAverage && (\n <ChartsReferenceLine\n lineStyle={{\n stroke: labelBackgroundColor\n ? theme.palette.neutral.main\n : theme.palette.neutral.dark,\n strokeDasharray: '10, 8',\n strokeWidth: 2,\n ...averageLineStyle,\n }}\n y={average}\n />\n )}\n\n {/** Area plot provides gradiant below the line **/}\n {/* Note: Must be above the LinePlot for some style rules to work */}\n <AreaPlot\n onItemClick={onItemClick}\n {...(areaColor && {\n slots: {\n area: (props) => {\n return (\n <g>\n <defs>\n <linearGradient id=\"customGradient\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={areaColor} />\n <stop offset=\"100%\" stopColor={areaColor} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <path {...stripChartSlotProps(props)} fill={`url(#customGradient)`} />\n </g>\n )\n },\n },\n })}\n />\n\n {/** Line plot provides the data line **/}\n <LinePlot\n onItemClick={onItemClick}\n slots={{\n line: (props) => (\n <CustomLine\n {...props}\n lineColor={areaColor ?? props.ownerState.color ?? theme.palette.primary.main}\n />\n ),\n }}\n />\n\n {/** Mark plot provides the circles **/}\n <MarkPlot\n onItemClick={onItemClick}\n slots={\n useCustomMark\n ? {\n mark: (props) => {\n return (\n <CustomMark\n handlers={markHandlers}\n labelBackgroundColor={labelBackgroundColor}\n labelFontColor={labelFontColor}\n labelFontSize={labelFontSize}\n showLabel={showMarkLabel}\n showMark={showMark || props.dataIndex === datasets[0].length - 1}\n style={markStyles?.(props.dataIndex) ?? {}}\n valueFormatterString={valueFormatterString}\n variant={markVariant}\n yData={yData}\n {...props}\n />\n )\n },\n }\n : undefined\n }\n />\n\n <BarPlot\n barLabel={(item) => (Number(item.value) > 0 ? `$${item.value}` : null)}\n borderRadius={10}\n />\n\n {/** Provides the X axis line and values **/}\n <ChartsXAxis\n disableLine={!showXAxis}\n disableTicks={!showXAxisTicks}\n slots={narrowXAxisLabels ? NARROW_X_AXIS_SLOTS : undefined}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartXaxisSx }}\n />\n\n {/** Provides the Y axis values **/}\n <ChartsYAxis\n disableLine={!showYAxis}\n disableTicks={!showYAxisTicks}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartYaxisSx }}\n />\n\n {/* Add vertical crosshair on hover */}\n {showAxisHighlight && <ChartsAxisHighlight x=\"line\" />}\n\n {showTooltip && (\n <ChartsTooltipContainer trigger=\"axis\">\n <CustomTooltip\n customLabels={customTooltipLabels}\n isCurrency={isCurrency}\n labels={labels}\n series={series}\n valueFormatterString={valueFormatterString}\n />\n </ChartsTooltipContainer>\n )}\n </ResponsiveChartContainer>\n\n {showLegend && (\n <CustomLegend\n average={showAverage ? average : undefined}\n customLegendBoxSx={customLegendBoxSx}\n customLegendVariant={customLegendVariant}\n labels={labels}\n series={series}\n style={{\n position: 'absolute',\n top: 16,\n left: 16,\n ...customLegendSx,\n }}\n title={title}\n valueFormatterString={valueFormatterString}\n />\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,KAAA,CAAwB,MAA2B;AACvD,QAAM,IAAY,OAAO,EAAM,QAAS,WAAW,EAAM,OAAO,IAE1D,IAAe,MAAM,KAAK,EAAU,KAAK,CAAC,EAAE,CAAA,KAAM;AACxD,SAAK,IACE,gBAAA,EAAC,GAAD;AAAA,IAAY,GAAI;AAAA,IAAO,cAAY;AAAA,IAAW,MAAK;AAAA,IAAM,MAAM;AAAA,EAAe,CAAA,IAD3D,gBAAA,EAAC,GAAD,EAAY,GAAI,EAAQ,CAAA;AAEpD,GAEM,KAAsB,EAAE,eAAe,GAAqB,GAgFrD,KAAA,CAAuC,EAClD,WAAA,GACA,mBAAA,GACA,kBAAA,GACA,WAAA,GACA,UAAA,IAAW,OACX,UAAA,GACA,cAAA,GACA,cAAA,GACA,QAAA,GACA,WAAA,IAAY,UACZ,qBAAA,GACA,gBAAA,GACA,mBAAA,GACA,qBAAA,GACA,UAAA,GACA,QAAA,GACA,YAAA,GACA,sBAAA,IAAuB,IACvB,QAAA,GACA,sBAAA,GACA,gBAAA,GACA,eAAA,GACA,QAAA,GACA,cAAA,GACA,aAAA,GACA,YAAA,GACA,UAAA,GACA,UAAA,GACA,mBAAA,IAAoB,IACpB,oBAAA,IAAqB,IACrB,aAAA,GACA,aAAA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,EACV,EACF;AAAA,UACF,IACA,CAAC;AAAA,UAEP,IAAI,EAAE,GAAG,EAAa;AAAA,QACvB,CAAA;AAAA,QAGA,KAAqB,gBAAA,EAAC,IAAD,EAAqB,GAAE,OAAQ,CAAA;AAAA,QAEpD,MACC,gBAAA,EAAC,IAAD;AAAA,UAAwB,SAAQ;AAAA,UAC9B,UAAA,gBAAA,EAAC,IAAD;AAAA,YACE,cAAc;AAAA,YACF,YAAA;AAAA,YACJ,QAAA;AAAA,YACA,QAAA;AAAA,YACc,sBAAA;AAAA,UACvB,CAAA;AAAA,QACqB,CAAA;AAAA,MAEF;AAAA,IAEzB,CAAA,GAAA,KACC,gBAAA,EAAC,IAAD;AAAA,MACE,SAAS,IAAc,IAAU;AAAA,MACd,mBAAA;AAAA,MACE,qBAAA;AAAA,MACb,QAAA;AAAA,MACA,QAAA;AAAA,MACR,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,GAAG;AAAA,MACL;AAAA,MACO,OAAA;AAAA,MACe,sBAAA;AAAA,IACvB,CAAA,CAEA;AAAA;AAET"}
1
+ {"version":3,"file":"LineChart.es.js","names":[],"sources":["../../../../src/common/components/charts/LineChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport type { AllSeriesType } from '@mui/x-charts'\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer as ResponsiveChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight'\nimport { ChartsText, type ChartsTextProps } from '@mui/x-charts/ChartsText'\nimport { ChartsReferenceLine } from '@mui/x-charts/ChartsReferenceLine'\nimport { ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\nimport { ChartsYAxis } from '@mui/x-charts/ChartsYAxis'\nimport { AreaPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart'\n\nimport { stripChartSlotProps } from './chartSlotProps'\nimport CustomLegend from './linechart/CustomLegend'\nimport { getMarkerShape } from './linechart/utils/markerShapes'\nimport { CustomLine } from './linechart/CustomLine'\nimport { CustomMark, MarkHandlers, type MarkVariant } from './linechart/CustomMark'\nimport { CustomTooltip } from './linechart/CustomTooltip'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { generateEqualIntervals, roundedAverage } from '../../../core/utils/NumberFormatting'\n\nexport type LineChartDataset = { x: string; y: number }[]\nexport type LineChartLabel = string | { label: string; amount: number }\nexport type TooltipLabel = LineChartLabel & { header?: string }\n\n// X-axis tick that shows only the first letter of the label (e.g. \"J\" for\n// \"Jan\") so all labels fit in small/narrow views. role=\"img\" + aria-label give\n// the tick a reliable accessible name (aria-label alone on a bare SVG <text> is\n// inconsistently announced), so screen readers still get the full label.\nconst NarrowXAxisTickLabel = (props: ChartsTextProps) => {\n const fullLabel = typeof props.text === 'string' ? props.text : ''\n // Array.from keeps surrogate pairs / combining marks intact (non-Latin locales).\n const singleLetter = Array.from(fullLabel.trim())[0] ?? ''\n if (!singleLetter) return <ChartsText {...props} />\n return <ChartsText {...props} aria-label={fullLabel} role=\"img\" text={singleLetter} />\n}\n\nconst NARROW_X_AXIS_SLOTS = { axisTickLabel: NarrowXAxisTickLabel }\n\ntype LineChartCurve =\n | 'catmullRom'\n | 'linear'\n | 'monotoneX'\n | 'monotoneY'\n | 'natural'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\n | 'bump'\n | 'bumpX'\n | 'bumpY'\n\ninterface LineChartProps {\n areaColor?: string\n areaGradientColor?: string\n averageLineStyle?: React.CSSProperties\n axisColor?: string\n baseline?: string\n chartFor?: string\n chartXaxisSx?: SxProps\n chartYaxisSx?: SxProps\n // Because theme chart colors are typed string|undefined\n colors: (string | undefined)[]\n curveType?: LineChartCurve\n customLegendVariant?: string\n customLegendSx?: SxProps\n customLegendBoxSx?: SxProps\n customTooltipLabels?: TooltipLabel[][]\n datasets: LineChartDataset[]\n height?: number\n isCurrency?: boolean\n isGraphClippingXAxis?: boolean\n labels: LineChartLabel[]\n labelBackgroundColor?: string\n labelFontColor?: string\n labelFontSize?: number\n margin?: { top?: number; right?: number; bottom?: number; left?: number }\n markHandlers?: MarkHandlers\n markVariant?: MarkVariant\n markStyles?: (markIndex: number) => React.CSSProperties & {\n markLabelStyles?: React.CSSProperties\n }\n minRange?: number\n maxRange?: number\n // When true, x-axis labels render as a single letter (with the full label kept\n // as the accessible name), so months don't overlap and get dropped in\n // small/narrow views. Implies showAllXAxisLabels.\n narrowXAxisLabels?: boolean\n onItemClick?: () => void\n // When true, every x-axis tick label is shown instead of letting x-charts drop\n // overlapping ones. Opt-in so it doesn't affect other charts that rely on the\n // default thinning.\n showAllXAxisLabels?: boolean\n peerAverage?: number\n showArea?: boolean\n showAverage?: boolean\n showAxisHighlight?: boolean\n showBars?: boolean\n showLegend?: boolean\n showMark?: boolean\n showMarkLabel?: boolean\n showTooltip?: boolean\n showXAxis?: boolean\n showXAxisTicks?: boolean\n showYAxis?: boolean\n showYAxisTicks?: boolean\n tickIntervals?: any[] | 'auto' | ((value: any, index: number) => boolean) | undefined\n title?: string\n useCustomMark?: boolean\n /** Draw every series' marks as circles (Figma's Account Details charts), not the per-series shape sequence. */\n circleMarks?: boolean\n /** Axis tick label size in px (MUI X sets 12px inline, so an sx override cannot shrink it). */\n tickLabelFontSize?: number\n valueFormatterString?: string\n width?: number\n xAxisScaleType?: 'band' | 'point'\n yAxisValueFormatter?: (value: number) => string\n}\n\n// TODO: Remove negative values and use a proper layout to support X-Charts v8\n\nexport const LineChart: React.FC<LineChartProps> = ({\n areaColor,\n areaGradientColor,\n averageLineStyle,\n axisColor,\n baseline = 'max',\n chartFor,\n chartXaxisSx,\n chartYaxisSx,\n colors,\n curveType = 'linear',\n customLegendVariant,\n customLegendSx,\n customLegendBoxSx,\n customTooltipLabels,\n datasets,\n height,\n isCurrency,\n isGraphClippingXAxis = false,\n labels,\n labelBackgroundColor,\n labelFontColor,\n labelFontSize,\n margin,\n markHandlers,\n markVariant,\n markStyles,\n minRange,\n maxRange,\n narrowXAxisLabels = false,\n showAllXAxisLabels = false,\n onItemClick,\n peerAverage,\n showArea = false,\n showAverage = false,\n showAxisHighlight = false,\n showBars = false,\n showLegend = false,\n showMark = true,\n showMarkLabel = false,\n showTooltip = false,\n showXAxis = false,\n showXAxisTicks = false,\n showYAxis = false,\n showYAxisTicks = false,\n tickIntervals,\n title,\n useCustomMark = false,\n circleMarks = false,\n tickLabelFontSize,\n valueFormatterString,\n width,\n xAxisScaleType,\n yAxisValueFormatter,\n}) => {\n const theme = useTheme()\n\n // Data for the X axis\n const xData = datasets.flat().map((item) => item.x)\n const yData = datasets.flat().map((item) => item.y)\n\n // Guard the empty-data case: with no points, reduce()/Math.min()/Math.max()\n // produce NaN/±Infinity which flow into the y-axis and make x-charts warn\n // \"the value NaN does not exist in the data of y axis\". Default to 0 so an\n // empty/loading chart renders a valid (flat) axis instead.\n const average = peerAverage || roundedAverage(yData)\n\n // Used for the min and max Y axis values\n const yMin = yData.length ? Math.floor(Math.min(...yData) / 100) * 100 : 0\n const yMax = yData.length ? Math.ceil(Math.max(...yData) / 100) * 100 : 0\n\n const series = datasets.map((data, index) => {\n return {\n type: showBars ? 'bar' : 'line',\n curve: curveType,\n color: showBars ? theme.palette.chart?.chart6 : (colors[index] ?? theme.palette.primary.main),\n data: data.map((item) => item.y),\n area: showArea,\n baseline: baseline,\n showMark: true,\n shape: circleMarks ? 'circle' : getMarkerShape(index),\n valueFormatter: (value: number) =>\n valueFormatterString ? formatCurrency(value || 0, valueFormatterString) : String(value),\n }\n })\n\n const defaultMargin = {\n top: 60,\n right: 35,\n bottom: 25,\n left: -10,\n }\n\n // Merge default margin with any provided custom margin\n const chartMargin = {\n ...defaultMargin,\n ...margin,\n }\n\n let rangeMin = minRange ?? yMin\n let rangeMax = maxRange ?? yMax\n if (chartFor === 'networthChart') {\n const valueRange = yMax - yMin\n\n const paddingRatio = valueRange < yMax * 0.05 ? 0.25 : 0.2\n const padding = Math.max(valueRange * paddingRatio, yMax * 0.015)\n rangeMin = yMin - padding < 0 ? yMin : yMin - padding\n rangeMax = yMax + padding\n }\n\n const getTickInterval = () => {\n if (chartFor === 'creditOverTime') {\n return generateEqualIntervals(rangeMin, 850, 5)\n } else if (chartFor === 'networthChart') {\n return generateEqualIntervals(rangeMin, rangeMax, 5)\n }\n return undefined\n }\n return (\n <Box\n sx={{\n position: 'relative',\n touchAction: 'pan-y', // Allow vertical scrolling\n '& svg': {\n touchAction: 'pan-y', // Allow vertical scrolling on SVG\n userSelect: 'none', // Prevent text selection\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y', // For Recharts library specifically\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n // Without this, Chrome adds the chart to the Tab order (MUI X Charts puts focus\n // listeners on the SVG), but the chart has no keyboard actions.\n tabIndex={-1}\n margin={chartMargin}\n series={series as AllSeriesType[]}\n sx={{\n '& .MuiBarLabel-root': {\n fontSize: 10,\n fontWeight: 600,\n },\n '& .MuiAreaElement-root': {\n opacity: 0.15,\n },\n '& .MuiChartsAxis-tickLabel > tspan': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n '& .MuiLineChart-markLabel': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n }}\n width={width}\n xAxis={[\n {\n data: xData,\n scaleType: xAxisScaleType || (showBars ? 'band' : 'point'),\n // Show every tick instead of letting x-charts drop overlapping ones.\n ...((showAllXAxisLabels || narrowXAxisLabels) && { tickLabelInterval: () => true }),\n ...(tickLabelFontSize !== undefined && {\n tickLabelStyle: { fontSize: tickLabelFontSize },\n }),\n },\n ]}\n yAxis={[\n {\n tickInterval: tickIntervals ?? getTickInterval(),\n min: isGraphClippingXAxis ? -22 : rangeMin,\n max: rangeMax || 100,\n colorMap:\n showArea && series.length < 2\n ? {\n type: 'continuous',\n min: rangeMin,\n max: rangeMax,\n color: [\n theme.palette.background.paper,\n areaGradientColor ?? colors[0] ?? theme.palette.primary.main,\n ],\n }\n : undefined,\n valueFormatter:\n yAxisValueFormatter ??\n ((value: number) =>\n valueFormatterString ? formatCurrency(value, valueFormatterString) : String(value)),\n ...(tickLabelFontSize !== undefined && {\n tickLabelStyle: { fontSize: tickLabelFontSize },\n }),\n width: 62,\n },\n ]}\n >\n {/** Provides the average line - positioned first to be behind other elements **/}\n {showAverage && (\n <ChartsReferenceLine\n lineStyle={{\n stroke: labelBackgroundColor\n ? theme.palette.neutral.main\n : theme.palette.neutral.dark,\n strokeDasharray: '10, 8',\n strokeWidth: 2,\n ...averageLineStyle,\n }}\n y={average}\n />\n )}\n\n {/** Area plot provides gradiant below the line **/}\n {/* Note: Must be above the LinePlot for some style rules to work */}\n <AreaPlot\n onItemClick={onItemClick}\n {...(areaColor && {\n slots: {\n area: (props) => {\n return (\n <g>\n <defs>\n <linearGradient id=\"customGradient\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={areaColor} />\n <stop offset=\"100%\" stopColor={areaColor} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <path {...stripChartSlotProps(props)} fill={`url(#customGradient)`} />\n </g>\n )\n },\n },\n })}\n />\n\n {/** Line plot provides the data line **/}\n <LinePlot\n onItemClick={onItemClick}\n slots={{\n line: (props) => (\n <CustomLine\n {...props}\n lineColor={areaColor ?? props.ownerState.color ?? theme.palette.primary.main}\n />\n ),\n }}\n />\n\n {/** Mark plot provides the circles **/}\n <MarkPlot\n onItemClick={onItemClick}\n slots={\n useCustomMark\n ? {\n mark: (props) => {\n return (\n <CustomMark\n handlers={markHandlers}\n labelBackgroundColor={labelBackgroundColor}\n labelFontColor={labelFontColor}\n labelFontSize={labelFontSize}\n showLabel={showMarkLabel}\n showMark={showMark || props.dataIndex === datasets[0].length - 1}\n style={markStyles?.(props.dataIndex) ?? {}}\n valueFormatterString={valueFormatterString}\n variant={markVariant}\n yData={yData}\n {...props}\n />\n )\n },\n }\n : undefined\n }\n />\n\n <BarPlot\n barLabel={(item) => (Number(item.value) > 0 ? `$${item.value}` : null)}\n borderRadius={10}\n />\n\n {/** Provides the X axis line and values **/}\n <ChartsXAxis\n disableLine={!showXAxis}\n disableTicks={!showXAxisTicks}\n slots={narrowXAxisLabels ? NARROW_X_AXIS_SLOTS : undefined}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartXaxisSx }}\n />\n\n {/** Provides the Y axis values **/}\n <ChartsYAxis\n disableLine={!showYAxis}\n disableTicks={!showYAxisTicks}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartYaxisSx }}\n />\n\n {/* Add vertical crosshair on hover */}\n {showAxisHighlight && <ChartsAxisHighlight x=\"line\" />}\n\n {showTooltip && (\n <ChartsTooltipContainer trigger=\"axis\">\n <CustomTooltip\n customLabels={customTooltipLabels}\n isCurrency={isCurrency}\n labels={labels}\n series={series}\n valueFormatterString={valueFormatterString}\n />\n </ChartsTooltipContainer>\n )}\n </ResponsiveChartContainer>\n\n {showLegend && (\n <CustomLegend\n average={showAverage ? average : undefined}\n customLegendBoxSx={customLegendBoxSx}\n customLegendVariant={customLegendVariant}\n labels={labels}\n series={series}\n style={{\n position: 'absolute',\n top: 16,\n left: 16,\n ...customLegendSx,\n }}\n title={title}\n valueFormatterString={valueFormatterString}\n />\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,KAAA,CAAwB,MAA2B;AACvD,QAAM,IAAY,OAAO,EAAM,QAAS,WAAW,EAAM,OAAO,IAE1D,IAAe,MAAM,KAAK,EAAU,KAAK,CAAC,EAAE,CAAA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,MACC,gBAAA,EAAC,IAAD;AAAA,MACE,SAAS,IAAc,IAAU;AAAA,MACd,mBAAA;AAAA,MACE,qBAAA;AAAA,MACb,QAAA;AAAA,MACA,QAAA;AAAA,MACR,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,GAAG;AAAA,MACL;AAAA,MACO,OAAA;AAAA,MACe,sBAAA;AAAA,IACvB,CAAA,CAEA;AAAA;AAET"}
@@ -7,20 +7,20 @@ import { Text as i } from "@mxenabled/mxui";
7
7
  import { Fragment as C, jsx as o, jsxs as l } from "react/jsx-runtime";
8
8
  import f from "@mui/material/Box";
9
9
  var R = ({ label: r, customLegendVariant: n }) => {
10
- const e = n || "body2";
10
+ const t = n || "body2";
11
11
  return typeof r == "string" ? /* @__PURE__ */ o(i, {
12
- variant: e,
12
+ variant: t,
13
13
  children: r
14
14
  }) : typeof r == "object" && r.amount !== void 0 && r.label ? /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ o(i, {
15
- variant: e,
15
+ variant: t,
16
16
  children: r.label
17
17
  }), /* @__PURE__ */ o(i, {
18
18
  bold: !0,
19
19
  sx: { marginLeft: 8 },
20
- variant: e,
20
+ variant: t,
21
21
  children: p(r.amount, "0,0")
22
22
  })] }) : null;
23
- }, S = ({ average: r, customLegendVariant: n, customLegendBoxSx: e, labels: u = [], series: g, style: x, title: a, valueFormatterString: c }) => {
23
+ }, S = ({ average: r, customLegendVariant: n, customLegendBoxSx: t, labels: u = [], series: g, style: x, title: m, valueFormatterString: c }) => {
24
24
  const { common: y } = v(), h = n || "body2";
25
25
  return /* @__PURE__ */ l(d, {
26
26
  style: {
@@ -28,21 +28,24 @@ var R = ({ label: r, customLegendVariant: n }) => {
28
28
  gap: 24,
29
29
  ...x
30
30
  },
31
- children: [g.map((t, m) => {
32
- const s = u[m];
31
+ children: [g.map((e, a) => {
32
+ const s = u[a];
33
33
  return s ? /* @__PURE__ */ l(d, {
34
34
  style: {
35
35
  alignItems: "center",
36
36
  flexDirection: "row",
37
37
  flexWrap: "wrap"
38
38
  },
39
- children: [e !== void 0 ? /* @__PURE__ */ o(f, { sx: {
40
- width: 10,
41
- height: 10,
42
- backgroundColor: t.color,
43
- marginRight: 8,
44
- ...e
45
- } }) : /* @__PURE__ */ o("svg", {
39
+ children: [t !== void 0 ? /* @__PURE__ */ o(f, {
40
+ "data-testid": "chart-legend-chip",
41
+ sx: {
42
+ width: 10,
43
+ height: 10,
44
+ backgroundColor: e.color,
45
+ marginRight: 8,
46
+ ...t
47
+ }
48
+ }) : /* @__PURE__ */ o("svg", {
46
49
  "aria-hidden": "true",
47
50
  height: 14,
48
51
  style: {
@@ -52,16 +55,16 @@ var R = ({ label: r, customLegendVariant: n }) => {
52
55
  viewBox: "-6 -6 12 12",
53
56
  width: 14,
54
57
  children: /* @__PURE__ */ o("path", {
55
- d: w[b(m)],
56
- fill: t.color,
57
- stroke: t.color,
58
+ d: w[b(a)],
59
+ fill: e.color,
60
+ stroke: e.color,
58
61
  strokeWidth: 1
59
62
  })
60
63
  }), /* @__PURE__ */ o(R, {
61
64
  customLegendVariant: n,
62
65
  label: s
63
66
  })]
64
- }, m) : null;
67
+ }, a) : null;
65
68
  }), r !== void 0 && /* @__PURE__ */ l(d, {
66
69
  sx: {
67
70
  alignItems: "center",
@@ -73,16 +76,16 @@ var R = ({ label: r, customLegendVariant: n }) => {
73
76
  direction: "row",
74
77
  gap: 2,
75
78
  mr: 8,
76
- children: [0, 1].map((t) => /* @__PURE__ */ o(f, { sx: {
79
+ children: [0, 1].map((e) => /* @__PURE__ */ o(f, { sx: {
77
80
  bgcolor: "neutral.dark",
78
81
  borderRadius: 1,
79
82
  height: 2,
80
83
  width: 5
81
- } }, t))
84
+ } }, e))
82
85
  }),
83
86
  /* @__PURE__ */ o(i, {
84
87
  variant: h,
85
- children: a || y.average
88
+ children: m || y.average
86
89
  }),
87
90
  /* @__PURE__ */ o(i, {
88
91
  bold: !0,
@@ -1 +1 @@
1
- {"version":3,"file":"CustomLegend.es.js","names":[],"sources":["../../../../../src/common/components/charts/linechart/CustomLegend.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { LineChartLabel } from '../LineChart'\nimport { getMarkerShape, MARKER_SHAPE_PATHS } from './utils/markerShapes'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nexport const CustomLegendLabel = ({\n label,\n customLegendVariant,\n}: {\n label: LineChartLabel\n customLegendVariant?: string\n}) => {\n const variant = (customLegendVariant as any) || 'body2'\n\n if (typeof label === 'string') {\n return <Text variant={variant}>{label}</Text>\n }\n if (typeof label === 'object' && label.amount !== undefined && label.label) {\n return (\n <>\n <Text variant={variant}>{label.label}</Text>\n <Text bold={true} sx={{ marginLeft: 8 }} variant={variant}>\n {formatCurrency(label.amount, '0,0')}\n </Text>\n </>\n )\n }\n return null\n}\n\nconst CustomLegend = ({\n average,\n customLegendVariant,\n customLegendBoxSx,\n labels = [],\n series,\n style,\n title,\n valueFormatterString,\n}: {\n average?: number\n customLegendVariant?: string\n customLegendBoxSx?: SxProps\n labels?: LineChartLabel[]\n series: any[]\n title?: string\n style: any\n valueFormatterString?: string\n}) => {\n const { common: commonCopy } = useGlobalCopyStore()\n const variant = (customLegendVariant as any) || 'body2'\n\n return (\n <Stack style={{ flexDirection: 'row', gap: 24, ...style }}>\n {series.map((s, index) => {\n const label = labels[index]\n // Skip series without a label\n return label ? (\n <Stack\n key={index}\n style={{ alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap' }}\n >\n {customLegendBoxSx !== undefined ? (\n <Box\n sx={{\n width: 10,\n height: 10,\n backgroundColor: s.color,\n marginRight: 8,\n ...customLegendBoxSx,\n }}\n />\n ) : (\n <svg\n aria-hidden=\"true\"\n height={14}\n style={{ marginRight: 8, flexShrink: 0 }}\n viewBox=\"-6 -6 12 12\"\n width={14}\n >\n <path\n d={MARKER_SHAPE_PATHS[getMarkerShape(index)]}\n fill={s.color}\n stroke={s.color}\n strokeWidth={1}\n />\n </svg>\n )}\n <CustomLegendLabel customLegendVariant={customLegendVariant} label={label} />\n </Stack>\n ) : null\n })}\n {average !== undefined && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row' }}>\n <Stack aria-hidden=\"true\" direction=\"row\" gap={2} mr={8}>\n {[0, 1].map((dash) => (\n <Box\n key={dash}\n sx={{ bgcolor: 'neutral.dark', borderRadius: 1, height: 2, width: 5 }}\n />\n ))}\n </Stack>\n <Text variant={variant}>{title ? title : commonCopy.average}</Text>\n <Text bold={true} sx={{ ml: 4 }} variant={variant}>\n {valueFormatterString ? formatCurrency(average, valueFormatterString) : average}\n </Text>\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(CustomLegend)\n"],"mappings":";;;;;;;;AAYA,IAAa,IAAA,CAAqB,EAChC,OAAA,GACA,qBAAA,EAAA,MAII;AACJ,QAAM,IAAW,KAA+B;AAEhD,SAAI,OAAO,KAAU,WACZ,gBAAA,EAAC,GAAD;AAAA,IAAe,SAAA;AAAA,IAAU,UAAA;AAAA,EAAY,CAAA,IAE1C,OAAO,KAAU,YAAY,EAAM,WAAW,UAAa,EAAM,QAEjE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAe,SAAA;AAAA,IAAU,UAAA,EAAM;AAAA,EAAY,CAAA,GAC3C,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,IAAI,EAAE,YAAY,EAAE;AAAA,IAAY,SAAA;AAAA,IAC/C,UAAA,EAAe,EAAM,QAAQ,KAAK;AAAA,EAC/B,CAAA,CACN,EAAA,CAAA,IAGC;AACT,GAEM,IAAA,CAAgB,EACpB,SAAA,GACA,qBAAA,GACA,mBAAA,GACA,QAAA,IAAS,CAAC,GACV,QAAA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AA,EAAC,GAAD;AAAA,UAAO,eAAY;AAAA,UAAO,WAAU;AAAA,UAAM,KAAK;AAAA,UAAG,IAAI;AAAA,UACnD,UAAA,CAAC,GAAG,CAAC,EAAE,IAAA,CAAK,MACX,gBAAA,EAAC,GAAD,EAEE,IAAI;AAAA,YAAE,SAAS;AAAA,YAAgB,cAAc;AAAA,YAAG,QAAQ;AAAA,YAAG,OAAO;AAAA,UAAE,EACrE,GAFM,CAEN,CACF;AAAA,QACI,CAAA;AAAA,QACP,gBAAA,EAAC,GAAD;AAAA,UAAe,SAAA;AAAA,UAAU,UAAA,KAAgB,EAAW;AAAA,QAAc,CAAA;AAAA,QAClE,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,IAAI,EAAE,IAAI,EAAE;AAAA,UAAY,SAAA;AAAA,UACvC,UAAA,IAAuB,EAAe,GAAS,CAAoB,IAAI;AAAA,QACpE,CAAA;AAAA,MACD;AAAA,IAEJ,CAAA,CAAA;AAAA;AAEX,GAEA,IAAe,EAAS,CAAY"}
1
+ {"version":3,"file":"CustomLegend.es.js","names":[],"sources":["../../../../../src/common/components/charts/linechart/CustomLegend.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { LineChartLabel } from '../LineChart'\nimport { getMarkerShape, MARKER_SHAPE_PATHS } from './utils/markerShapes'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nexport const CustomLegendLabel = ({\n label,\n customLegendVariant,\n}: {\n label: LineChartLabel\n customLegendVariant?: string\n}) => {\n const variant = (customLegendVariant as any) || 'body2'\n\n if (typeof label === 'string') {\n return <Text variant={variant}>{label}</Text>\n }\n if (typeof label === 'object' && label.amount !== undefined && label.label) {\n return (\n <>\n <Text variant={variant}>{label.label}</Text>\n <Text bold={true} sx={{ marginLeft: 8 }} variant={variant}>\n {formatCurrency(label.amount, '0,0')}\n </Text>\n </>\n )\n }\n return null\n}\n\nconst CustomLegend = ({\n average,\n customLegendVariant,\n customLegendBoxSx,\n labels = [],\n series,\n style,\n title,\n valueFormatterString,\n}: {\n average?: number\n customLegendVariant?: string\n customLegendBoxSx?: SxProps\n labels?: LineChartLabel[]\n series: any[]\n title?: string\n style: any\n valueFormatterString?: string\n}) => {\n const { common: commonCopy } = useGlobalCopyStore()\n const variant = (customLegendVariant as any) || 'body2'\n\n return (\n <Stack style={{ flexDirection: 'row', gap: 24, ...style }}>\n {series.map((s, index) => {\n const label = labels[index]\n // Skip series without a label\n return label ? (\n <Stack\n key={index}\n style={{ alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap' }}\n >\n {customLegendBoxSx !== undefined ? (\n <Box\n data-testid=\"chart-legend-chip\"\n sx={{\n width: 10,\n height: 10,\n backgroundColor: s.color,\n marginRight: 8,\n ...customLegendBoxSx,\n }}\n />\n ) : (\n <svg\n aria-hidden=\"true\"\n height={14}\n style={{ marginRight: 8, flexShrink: 0 }}\n viewBox=\"-6 -6 12 12\"\n width={14}\n >\n <path\n d={MARKER_SHAPE_PATHS[getMarkerShape(index)]}\n fill={s.color}\n stroke={s.color}\n strokeWidth={1}\n />\n </svg>\n )}\n <CustomLegendLabel customLegendVariant={customLegendVariant} label={label} />\n </Stack>\n ) : null\n })}\n {average !== undefined && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row' }}>\n <Stack aria-hidden=\"true\" direction=\"row\" gap={2} mr={8}>\n {[0, 1].map((dash) => (\n <Box\n key={dash}\n sx={{ bgcolor: 'neutral.dark', borderRadius: 1, height: 2, width: 5 }}\n />\n ))}\n </Stack>\n <Text variant={variant}>{title ? title : commonCopy.average}</Text>\n <Text bold={true} sx={{ ml: 4 }} variant={variant}>\n {valueFormatterString ? formatCurrency(average, valueFormatterString) : average}\n </Text>\n </Stack>\n )}\n </Stack>\n )\n}\n\nex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uB,EAAe,GAAS,CAAoB,IAAI;AAAA,QACpE,CAAA;AAAA,MACD;AAAA,IAEJ,CAAA,CAAA;AAAA;AAEX,GAEA,IAAe,EAAS,CAAY"}
@@ -42,7 +42,7 @@ export type DrilldownRow = Record<string, string | number | boolean | null>;
42
42
  * (memo, tags, hide, flag come from the transaction store). Values come from the server, so a reader
43
43
  * still checks each value's runtime shape.
44
44
  */
45
- export type DrilldownData = Record<string, string | number | boolean | null | string[] | DataSeries | DrilldownRow[]>;
45
+ export type DrilldownData = Record<string, string | number | boolean | null | string[] | DataSeries | DrilldownRow[] | LogoRef>;
46
46
  export interface InsightsPayload {
47
47
  widget_type: WidgetType;
48
48
  instance_slot: InstanceSlot;
@@ -206,6 +206,10 @@ export interface PrimaryCTA {
206
206
  */
207
207
  action_key?: string | null;
208
208
  metadata?: CtaPostMessageMetadata | null;
209
+ /** tupac's flat host message for the CTA (`action` plus fields); see `InDescriptionCTA`. */
210
+ post_message_metadata?: ({
211
+ action?: string | null;
212
+ } & Record<string, unknown>) | null;
209
213
  /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */
210
214
  drilldown_data?: DrilldownData;
211
215
  }
@@ -220,6 +224,10 @@ export interface SecondaryCTA {
220
224
  /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */
221
225
  action_key?: string | null;
222
226
  metadata?: CtaPostMessageMetadata | null;
227
+ /** tupac's flat host message for the CTA (`action` plus fields); see `InDescriptionCTA`. */
228
+ post_message_metadata?: ({
229
+ action?: string | null;
230
+ } & Record<string, unknown>) | null;
223
231
  /** Figures this CTA's drilldown renders (e.g. a summary header's amount/dates/count). */
224
232
  drilldown_data?: DrilldownData;
225
233
  }