@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,4 +1,4 @@
1
- import { useGlobalCopyStore as E, useTransactionStore as G } from "../../../common/context/hooks.es.js";
1
+ import { useGlobalCopyStore as G, useTransactionStore as L } from "../../../common/context/hooks.es.js";
2
2
  import { exportTransactionsToCSV as N } from "../../../core/utils/TransactionUtils.es.js";
3
3
  import O from "../../../transactions/components/shared/TransactionList.es.js";
4
4
  import { TipSection as U } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
@@ -7,42 +7,47 @@ import { SubTabs as q, subTabPanelProps as z } from "../../components/SubTabs.es
7
7
  import "react";
8
8
  import { observer as J } from "mobx-react-lite";
9
9
  import l from "@mui/material/Stack";
10
- import { H3 as K, Text as m } from "@mxenabled/mxui";
10
+ import { H3 as K, Text as p } from "@mxenabled/mxui";
11
11
  import M from "@mui/material/Button";
12
12
  import { Icon as Q } from "@mxenabled/mx-icons";
13
13
  import { jsx as r, jsxs as t } from "react/jsx-runtime";
14
14
  import o from "@mui/material/Box";
15
15
  import X from "@mui/material/Tab";
16
16
  import Y from "@mui/material/Tabs";
17
- var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}`, C = "transaction-drill-down-series", hr = J(function({ ariaLabel: D, heading: s, subHeadingText: c, icon: I, logo: h, tabs: f, selectedIndex: d, top: x, onSelectionChange: B, transactionFilter: u, tipSection: v, onEachRowClick: k, baseTransactions: W, subTabs: T, showTransactionsHeader: $ = !0, listLabel: g }) {
18
- const { transactions: a } = E(), { sortedTransactionsWithSplits: P, tags: j, detailedTransactions: A } = G(), p = !!f?.length, i = T?.tabs.length ? T : void 0, L = D ?? a.transactions_title, R = (n, e) => {
19
- B?.(e);
20
- }, _ = u ? (W ?? A).filter(u(d)) : void 0, y = _ ?? P;
17
+ var I = "transaction-drill-down-panel", S = (h) => `transaction-details-tab-${h}`, w = "transaction-drill-down-series", b = 44, fr = J(function({ ariaLabel: C, heading: s, subHeadingText: c, icon: B, logo: f, tabs: x, selectedIndex: d, top: T, onSelectionChange: W, transactionFilter: v, tipSection: u, onEachRowClick: k, baseTransactions: $, subTabs: g, showTransactionsHeader: A = !0, listLabel: _ }) {
18
+ const { transactions: i } = G(), { sortedTransactionsWithSplits: P, tags: R, detailedTransactions: E } = L(), m = !!x?.length, a = g?.tabs.length ? g : void 0, H = C ?? i.transactions_title, j = (n, e) => {
19
+ W?.(e);
20
+ }, y = v ? ($ ?? E).filter(v(d)) : void 0, D = y ?? P;
21
21
  return /* @__PURE__ */ t(o, {
22
22
  sx: {
23
23
  bgcolor: "background.paper",
24
24
  width: "100%"
25
25
  },
26
- children: [p && /* @__PURE__ */ r(Y, {
27
- "aria-label": L,
28
- onChange: R,
29
- sx: { mb: 0 },
26
+ children: [m && /* @__PURE__ */ r(Y, {
27
+ "aria-label": H,
28
+ onChange: j,
29
+ sx: {
30
+ mb: 0,
31
+ minHeight: b
32
+ },
30
33
  value: d,
31
34
  variant: "fullWidth",
32
- children: f.map((n, e) => /* @__PURE__ */ r(X, {
33
- "aria-controls": S,
35
+ children: x.map((n, e) => /* @__PURE__ */ r(X, {
36
+ "aria-controls": I,
34
37
  "aria-label": n.ariaLabel,
35
- id: w(e),
38
+ id: S(e),
36
39
  label: n.label,
37
40
  sx: {
41
+ minHeight: b,
38
42
  minWidth: "auto",
39
- px: 0
43
+ px: 0,
44
+ py: 0
40
45
  }
41
46
  }, `${n.label}-${e}`))
42
47
  }), /* @__PURE__ */ t(o, {
43
- "aria-labelledby": p ? w(d) : void 0,
44
- id: S,
45
- role: p ? "tabpanel" : void 0,
48
+ "aria-labelledby": m ? S(d) : void 0,
49
+ id: I,
50
+ role: m ? "tabpanel" : void 0,
46
51
  children: [
47
52
  (s || c) && /* @__PURE__ */ t(l, {
48
53
  sx: {
@@ -52,13 +57,13 @@ var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}
52
57
  pt: 16,
53
58
  px: 24
54
59
  },
55
- children: [h && /* @__PURE__ */ r(o, {
60
+ children: [f && /* @__PURE__ */ r(o, {
56
61
  "aria-hidden": !0,
57
62
  sx: {
58
63
  display: "flex",
59
64
  flexShrink: 0
60
65
  },
61
- children: h
66
+ children: f
62
67
  }), /* @__PURE__ */ t(l, {
63
68
  sx: {
64
69
  flexGrow: 1,
@@ -71,7 +76,7 @@ var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}
71
76
  flexDirection: "row",
72
77
  gap: 8
73
78
  },
74
- children: [I, /* @__PURE__ */ r(m, {
79
+ children: [B, /* @__PURE__ */ r(p, {
75
80
  color: "text.secondary",
76
81
  sx: { letterSpacing: "0.52px" },
77
82
  textTransform: "uppercase",
@@ -81,24 +86,25 @@ var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}
81
86
  })]
82
87
  })]
83
88
  }),
84
- x && /* @__PURE__ */ r(o, {
89
+ T && /* @__PURE__ */ r(o, {
85
90
  sx: {
86
91
  pb: 16,
87
92
  pt: 16
88
93
  },
89
- children: x
94
+ children: T
90
95
  }),
91
- v && /* @__PURE__ */ r(U, {
96
+ u && /* @__PURE__ */ r(U, {
92
97
  icon: V,
93
- ...v
98
+ ...u
94
99
  }),
95
- i && /* @__PURE__ */ r(q, {
96
- ...i,
97
- id: C
100
+ a && /* @__PURE__ */ r(q, {
101
+ ...a,
102
+ id: w,
103
+ tabHeight: b
98
104
  }),
99
105
  /* @__PURE__ */ t(o, {
100
- ...i && z(C, i.selectedIndex),
101
- children: [$ && /* @__PURE__ */ t(l, {
106
+ ...a && z(w, a.selectedIndex),
107
+ children: [A && /* @__PURE__ */ t(l, {
102
108
  sx: {
103
109
  alignItems: "center",
104
110
  borderBottomColor: "divider",
@@ -110,31 +116,31 @@ var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}
110
116
  pt: 16,
111
117
  px: 24
112
118
  },
113
- children: [/* @__PURE__ */ r(m, {
119
+ children: [/* @__PURE__ */ r(p, {
114
120
  bold: !0,
115
121
  variant: "body1",
116
- children: a.transactions_title
117
- }), y.length > 0 && /* @__PURE__ */ r(M, {
122
+ children: i.transactions_title
123
+ }), D.length > 0 && /* @__PURE__ */ r(M, {
118
124
  onClick: () => {
119
- N(y, j);
125
+ N(D, R);
120
126
  },
121
127
  startIcon: /* @__PURE__ */ r(Q, { name: "ios_share" }),
122
128
  sx: { height: 28 },
123
- children: /* @__PURE__ */ r(m, {
129
+ children: /* @__PURE__ */ r(p, {
124
130
  bold: !0,
125
131
  variant: "body2",
126
- children: a.export_csv_btn
132
+ children: i.export_csv_btn
127
133
  })
128
134
  })]
129
135
  }), /* @__PURE__ */ r(o, {
130
- ...g && {
131
- "aria-label": `${a.transactions_title}, ${g}`,
136
+ ..._ && {
137
+ "aria-label": `${i.transactions_title}, ${_}`,
132
138
  "aria-live": "polite",
133
139
  role: "region"
134
140
  },
135
141
  sx: { bgcolor: "background.default" },
136
142
  children: /* @__PURE__ */ r(O, {
137
- transaction: _,
143
+ transaction: y,
138
144
  onClick: k
139
145
  })
140
146
  })]
@@ -144,8 +150,8 @@ var S = "transaction-drill-down-panel", w = (b) => `transaction-details-tab-${b}
144
150
  });
145
151
  });
146
152
  export {
147
- hr as TransactionDrillDown,
148
- hr as default
153
+ fr as TransactionDrillDown,
154
+ fr as default
149
155
  };
150
156
 
151
157
  //# sourceMappingURL=TransactionDrillDown.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionDrillDown.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport { observer } from 'mobx-react-lite'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport {\n TipSection,\n type TipSectionProps,\n} from '../../../insights/components/shared/ChartDrawerTemplate/TipSection'\nimport { useGlobalCopyStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { DRAWER_TIP_ICON } from '../../components/drawerTip'\nimport { TransactionList } from '../../../transactions'\nimport { SubTabs, subTabPanelProps, type SubTabsProps } from '../../components/SubTabs'\n\ninterface TabItem {\n label: string\n ariaLabel?: string\n}\n\nconst PANEL_ID = 'transaction-drill-down-panel'\nconst tabId = (index: number) => `transaction-details-tab-${index}`\nconst SUB_TABS_ID = 'transaction-drill-down-series'\n\ninterface TransactionDrillDownProps {\n ariaLabel?: string\n heading?: string\n subHeadingText?: string\n icon?: React.ReactNode\n // A logo left of the heading and sub-heading (Top Merchant's merchant, Figma `<Logo>` 40px).\n logo?: React.ReactNode\n tabs?: TabItem[]\n selectedIndex: number\n top: React.ReactNode\n tipSection?: TipSectionProps | false\n onSelectionChange?: (selectedIndex: number) => void\n onEachRowClick?: (guid: string) => void\n transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean\n baseTransactions?: Transaction[]\n // A second row of tabs between the chart and the list (the double-bar drawer's main / comparison\n // series, e.g. Spend / Income). Omitted for every single-series drawer.\n subTabs?: Omit<SubTabsProps, 'id'>\n // false hides the \"Transactions\" heading and its Export CSV button.\n showTransactionsHeader?: boolean\n // With no tabs or heading to name it, the list is a polite live region named \"Transactions,\n // {listLabel}\" (the selected month): screen-reader users can find it, tell which month it lists, and\n // hear that it changed when a keyboard bar picks another month.\n listLabel?: string\n}\n\nexport const TransactionDrillDown = observer(function TransactionDrillDown({\n ariaLabel,\n heading,\n subHeadingText,\n icon,\n logo,\n tabs,\n selectedIndex,\n top,\n onSelectionChange,\n transactionFilter,\n tipSection,\n onEachRowClick,\n baseTransactions,\n subTabs,\n showTransactionsHeader = true,\n listLabel,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n const hasTabs = !!tabs?.length\n // Only a non-empty row gets the tabs and their panel.\n const seriesTabs = subTabs?.tabs.length ? subTabs : undefined\n const tablistLabel = ariaLabel ?? transactionsCopy.transactions_title\n\n const handlePrimaryChange = (_event: React.SyntheticEvent, newValue: number) => {\n onSelectionChange?.(newValue)\n }\n\n const filteredTransactions = transactionFilter\n ? (baseTransactions ?? detailedTransactions).filter(transactionFilter(selectedIndex))\n : undefined\n\n const exportTransactions = filteredTransactions ?? sortedTransactionsWithSplits\n\n return (\n <Box sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {hasTabs && (\n <Tabs\n aria-label={tablistLabel}\n onChange={handlePrimaryChange}\n // The title sits 16px below the tab bar, as in every Figma chart drawer; the theme's 8px\n // gap under Tabs would make it 24.\n sx={{ mb: 0 }}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs!.map((tab, index) => (\n <Tab\n aria-controls={PANEL_ID}\n aria-label={tab.ariaLabel}\n id={tabId(index)}\n key={`${tab.label}-${index}`}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )}\n\n <Box\n aria-labelledby={hasTabs ? tabId(selectedIndex) : undefined}\n id={PANEL_ID}\n role={hasTabs ? 'tabpanel' : undefined}\n >\n {(heading || subHeadingText) && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12, pt: 16, px: 24 }}>\n {logo && (\n <Box aria-hidden={true} sx={{ display: 'flex', flexShrink: 0 }}>\n {logo}\n </Box>\n )}\n <Stack sx={{ flexGrow: 1, gap: 4, minWidth: 0 }}>\n {heading && <H3>{heading}</H3>}\n {subHeadingText && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n {icon}\n <Text\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.52px' }}\n textTransform=\"uppercase\"\n variant=\"body2\"\n >\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n </Stack>\n )}\n\n {/* Figma's chart drawer pads the chart 16px above and below; a drawer with no chart has no box. */}\n {top && <Box sx={{ pb: 16, pt: 16 }}>{top}</Box>}\n\n {/* Every Figma chart drawer puts the tip under the chart, above any sub-tabs. */}\n {tipSection && <TipSection icon={DRAWER_TIP_ICON} {...tipSection} />}\n\n {seriesTabs && <SubTabs {...seriesTabs} id={SUB_TABS_ID} />}\n\n {/* The content the sub-tabs control, as the month tabs' panel above. */}\n <Box {...(seriesTabs && subTabPanelProps(SUB_TABS_ID, seriesTabs.selectedIndex))}>\n {showTransactionsHeader && (\n <Stack\n sx={{\n alignItems: 'center',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n pb: 4,\n pt: 16,\n px: 24,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {transactionsCopy.transactions_title}\n </Text>\n {exportTransactions.length > 0 && (\n <Button\n onClick={() => {\n exportTransactionsToCSV(exportTransactions, tags)\n }}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n )}\n\n {/* The list's scroll box is taller than its rows; Figma fills the space below the last row\n with background.default, and each row paints its own paper. */}\n <Box\n {...(listLabel && {\n 'aria-label': `${transactionsCopy.transactions_title}, ${listLabel}`,\n 'aria-live': 'polite' as const,\n role: 'region',\n })}\n sx={{ bgcolor: 'background.default' }}\n >\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n </Box>\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAM,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IACtD,IAAc,iCA4BP,KAAuB,EAAS,SAA8B,EACzE,WAAA,GACA,SAAA,GACA,gBAAA,GACA,MAAA,GACA,MAAA,GACA,MAAA,GACA,eAAA,GACA,KAAA,GACA,mBAAA,GACA,mBAAA,GACA,YAAA,GACA,gBAAA,GACA,kBAAA,GACA,SAAA,GACA,wBAAA,IAAyB,IACzB,WAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,cAAc,EAAA,IAAqB,EAAmB,GACxD,EAAE,8BAAA,GAA8B,MAAA,GAAM,sBAAA,EAAA,IAAyB,EAAoB,GAEnF,IAAU,CAAC,CAAC,GAAM,QAElB,IAAa,GAAS,KAAK,SAA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,MAAM;AAAA,cAAM,SAAQ;AAAA,cACvB,UAAA,EAAiB;AAAA,YACd,CAAA,GACL,EAAmB,SAAS,KAC3B,gBAAA,EAAC,GAAD;AAAA,cACE,SAAA,MAAe;AACb,gBAAA,EAAwB,GAAoB,CAAI;AAAA,cAClD;AAAA,cACA,WAAW,gBAAA,EAAC,GAAD,EAAM,MAAK,YAAa,CAAA;AAAA,cACnC,IAAI,EAAE,QAAQ,GAAG;AAAA,cAEjB,UAAA,gBAAA,EAAC,GAAD;AAAA,gBAAM,MAAM;AAAA,gBAAM,SAAQ;AAAA,gBACvB,UAAA,EAAiB;AAAA,cACd,CAAA;AAAA,YACA,CAAA,CAEL;AAAA,UAKT,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,YACE,GAAK,KAAa;AAAA,cAChB,cAAc,GAAG,EAAiB,kBAAA,KAAuB,CAAA;AAAA,cACzD,aAAa;AAAA,cACb,MAAM;AAAA,YACR;AAAA,YACA,IAAI,EAAE,SAAS,qBAAqB;AAAA,YAEpC,UAAA,gBAAA,EAAC,GAAD;AAAA,cAAiB,aAAa;AAAA,cAAsB,SAAS;AAAA,YAAiB,CAAA;AAAA,UAC3E,CAAA,CACF;AAAA;MACF;AAAA,IACF,CAAA,CAAA;AAAA;AAET,CAAC"}
1
+ {"version":3,"file":"TransactionDrillDown.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport { observer } from 'mobx-react-lite'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport {\n TipSection,\n type TipSectionProps,\n} from '../../../insights/components/shared/ChartDrawerTemplate/TipSection'\nimport { useGlobalCopyStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { DRAWER_TIP_ICON } from '../../components/drawerTip'\nimport { TransactionList } from '../../../transactions'\nimport { SubTabs, subTabPanelProps, type SubTabsProps } from '../../components/SubTabs'\n\ninterface TabItem {\n label: string\n ariaLabel?: string\n}\n\nconst PANEL_ID = 'transaction-drill-down-panel'\nconst tabId = (index: number) => `transaction-details-tab-${index}`\nconst SUB_TABS_ID = 'transaction-drill-down-series'\n\ninterface TransactionDrillDownProps {\n ariaLabel?: string\n heading?: string\n subHeadingText?: string\n icon?: React.ReactNode\n // A logo left of the heading and sub-heading (Top Merchant's merchant, Figma `<Logo>` 40px).\n logo?: React.ReactNode\n tabs?: TabItem[]\n selectedIndex: number\n top: React.ReactNode\n tipSection?: TipSectionProps | false\n onSelectionChange?: (selectedIndex: number) => void\n onEachRowClick?: (guid: string) => void\n transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean\n baseTransactions?: Transaction[]\n // A second row of tabs between the chart and the list (the double-bar drawer's main / comparison\n // series, e.g. Spend / Income). Omitted for every single-series drawer.\n subTabs?: Omit<SubTabsProps, 'id'>\n // false hides the \"Transactions\" heading and its Export CSV button.\n showTransactionsHeader?: boolean\n // With no tabs or heading to name it, the list is a polite live region named \"Transactions,\n // {listLabel}\" (the selected month): screen-reader users can find it, tell which month it lists, and\n // hear that it changed when a keyboard bar picks another month.\n listLabel?: string\n}\n\n// Figma's drawer tab rows (month and series) are 44px in every transaction-list drawer; MUI's is 48.\nconst DRAWER_TAB_HEIGHT = 44\n\nexport const TransactionDrillDown = observer(function TransactionDrillDown({\n ariaLabel,\n heading,\n subHeadingText,\n icon,\n logo,\n tabs,\n selectedIndex,\n top,\n onSelectionChange,\n transactionFilter,\n tipSection,\n onEachRowClick,\n baseTransactions,\n subTabs,\n showTransactionsHeader = true,\n listLabel,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n const hasTabs = !!tabs?.length\n // Only a non-empty row gets the tabs and their panel.\n const seriesTabs = subTabs?.tabs.length ? subTabs : undefined\n const tablistLabel = ariaLabel ?? transactionsCopy.transactions_title\n\n const handlePrimaryChange = (_event: React.SyntheticEvent, newValue: number) => {\n onSelectionChange?.(newValue)\n }\n\n const filteredTransactions = transactionFilter\n ? (baseTransactions ?? detailedTransactions).filter(transactionFilter(selectedIndex))\n : undefined\n\n const exportTransactions = filteredTransactions ?? sortedTransactionsWithSplits\n\n return (\n <Box sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {hasTabs && (\n <Tabs\n aria-label={tablistLabel}\n onChange={handlePrimaryChange}\n // The title sits 16px below the tab bar, as in every Figma chart drawer; the theme's 8px\n // gap under Tabs would make it 24.\n sx={{ mb: 0, minHeight: DRAWER_TAB_HEIGHT }}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs!.map((tab, index) => (\n <Tab\n aria-controls={PANEL_ID}\n aria-label={tab.ariaLabel}\n id={tabId(index)}\n key={`${tab.label}-${index}`}\n label={tab.label}\n sx={{ minHeight: DRAWER_TAB_HEIGHT, minWidth: 'auto', px: 0, py: 0 }}\n />\n ))}\n </Tabs>\n )}\n\n <Box\n aria-labelledby={hasTabs ? tabId(selectedIndex) : undefined}\n id={PANEL_ID}\n role={hasTabs ? 'tabpanel' : undefined}\n >\n {(heading || subHeadingText) && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12, pt: 16, px: 24 }}>\n {logo && (\n <Box aria-hidden={true} sx={{ display: 'flex', flexShrink: 0 }}>\n {logo}\n </Box>\n )}\n <Stack sx={{ flexGrow: 1, gap: 4, minWidth: 0 }}>\n {heading && <H3>{heading}</H3>}\n {subHeadingText && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n {icon}\n <Text\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.52px' }}\n textTransform=\"uppercase\"\n variant=\"body2\"\n >\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n </Stack>\n )}\n\n {/* Figma's chart drawer pads the chart 16px above and below; a drawer with no chart has no box. */}\n {top && <Box sx={{ pb: 16, pt: 16 }}>{top}</Box>}\n\n {/* Every Figma chart drawer puts the tip under the chart, above any sub-tabs. */}\n {tipSection && <TipSection icon={DRAWER_TIP_ICON} {...tipSection} />}\n\n {seriesTabs && <SubTabs {...seriesTabs} id={SUB_TABS_ID} tabHeight={DRAWER_TAB_HEIGHT} />}\n\n {/* The content the sub-tabs control, as the month tabs' panel above. */}\n <Box {...(seriesTabs && subTabPanelProps(SUB_TABS_ID, seriesTabs.selectedIndex))}>\n {showTransactionsHeader && (\n <Stack\n sx={{\n alignItems: 'center',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n pb: 4,\n pt: 16,\n px: 24,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {transactionsCopy.transactions_title}\n </Text>\n {exportTransactions.length > 0 && (\n <Button\n onClick={() => {\n exportTransactionsToCSV(exportTransactions, tags)\n }}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n )}\n\n {/* The list's scroll box is taller than its rows; Figma fills the space below the last row\n with background.default, and each row paints its own paper. */}\n <Box\n {...(listLabel && {\n 'aria-label': `${transactionsCopy.transactions_title}, ${listLabel}`,\n 'aria-live': 'polite' as const,\n role: 'region',\n })}\n sx={{ bgcolor: 'background.default' }}\n >\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n </Box>\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAM,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IACtD,IAAc,iCA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E,CAAA,CACF;AAAA;MACF;AAAA,IACF,CAAA,CAAA;AAAA;AAET,CAAC"}
@@ -1,162 +1,177 @@
1
- import { useGlobalCopyStore as Dt, useInsightsV2Store as Lt } from "../../../common/context/hooks.es.js";
2
- import { CURRENCY_FORMAT as St, formatCurrency as vt } from "../../../core/utils/NumberFormatting.es.js";
3
- import Bt from "../../../common/components/drawer/Drawer.es.js";
4
- import { BAR_ARIA_LABEL as It } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
5
- import { BarChartV2 as Et } from "../../components/chartblocks/BarchartV2.es.js";
6
- import { EmptyBarChart as Rt } from "../../components/chartblocks/EmptyBarChart.es.js";
7
- import { ANALYTICS_EVENTS_CONFIG as V } from "../../analytics/analyticsEventsConfig.es.js";
8
- import { useAnalyticsEvent as xt } from "../../analytics/useAnalyticsEvent.es.js";
9
- import { DoubleBarChart as Ft } from "../../components/chartblocks/DoubleBarChart.es.js";
10
- import { toLegendItems as Ot } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
11
- import { getDefaultSelection as wt, getDrillDownConfig as Ht, getFlattenedDataSeries as Gt, resolveDrillDownSubHeader as Mt, toStoreFilter as kt } from "./utils.es.js";
12
- import { useOpenedCta as Nt } from "../useOpenedCta.es.js";
13
- import { TransactionDrillDown as jt } from "./TransactionDrillDown.es.js";
14
- import { useTransactionHistory as Vt } from "./useTransactionHistory.es.js";
15
- import { TransactionDetailsBlock as Kt } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
16
- import { useRequiredCopy as Pt } from "../useRequiredCopy.es.js";
17
- import { useLayoutEffect as zt, useState as d } from "react";
18
- import { observer as Yt } from "mobx-react-lite";
19
- import { Fragment as qt, jsx as l, jsxs as Ut } from "react/jsx-runtime";
20
- import { useTheme as Wt } from "@mui/material/styles";
21
- var $t = (a) => a.insights_feed, Ce = Yt(({ beat: a, cta: K }) => {
22
- const _ = Wt(), { actionDrawer: P, setActionContext: A } = Lt(), { insights_payload: D } = a, z = Nt(a), L = K ?? z, Y = L?.variant, { top: e, filterMode: m, header: q, colors: U, filterStrategy: W, tipSection: S, subTabAriaLabels: $, slotData: J, averageFormat: Q, subTabs: X, boldLabel: Z, barLegendLabel: tt, showMonthlyAmount: et, showMonthTabs: ot = !0, showTransactionsHeader: at = !0 } = Ht(Y ?? ""), f = !ot && e === "singleBar", { instanceSlotData: o, beatTransactions: u, spendCategoryGuids: v, allAccountGuids: B, categoryName: nt, displayedDateRange: C, transactionStore: rt } = Vt(a, { slotData: J }, L?.drilldown_data), { common: st } = Dt(), n = Pt($t), [it, I] = d(!1), [lt, ct] = d(!1), E = xt(), { dataSeries: g, chartData: p, comparisonBars: i } = Gt({
23
- data: o?.data_series,
24
- ariaLabel: e === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : It,
25
- top: e,
26
- beatTransactions: u
27
- }), c = e === "doubleBar", dt = e === "tabsOnly", s = c ? i : p, { chartBarIndex: R, subTabIndex: mt } = wt({
1
+ import { useCategoryStore as Ie, useGlobalCopyStore as xe, useInsightsV2Store as Ee } from "../../../common/context/hooks.es.js";
2
+ import { CURRENCY_FORMAT as Re, formatCurrency as we } from "../../../core/utils/NumberFormatting.es.js";
3
+ import Fe from "../../../common/components/drawer/Drawer.es.js";
4
+ import { getLocalizedCategoryName as Oe } from "../../../core/utils/CategoryUtil.es.js";
5
+ import { BAR_ARIA_LABEL as ke } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
6
+ import { BarChartV2 as He } from "../../components/chartblocks/BarchartV2.es.js";
7
+ import { EmptyBarChart as Me } from "../../components/chartblocks/EmptyBarChart.es.js";
8
+ import { ANALYTICS_EVENTS_CONFIG as P } from "../../analytics/analyticsEventsConfig.es.js";
9
+ import { useAnalyticsEvent as Ge } from "../../analytics/useAnalyticsEvent.es.js";
10
+ import { DoubleBarChart as Ne } from "../../components/chartblocks/DoubleBarChart.es.js";
11
+ import { toLegendItems as je } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
12
+ import { getDefaultSelection as Ve, getDrillDownConfig as Ke, getFlattenedDataSeries as Pe, resolveDrillDownSubHeader as ze, toStoreFilter as qe } from "./utils.es.js";
13
+ import { useOpenedCta as Ye } from "../useOpenedCta.es.js";
14
+ import { TransactionDrillDown as Ue } from "./TransactionDrillDown.es.js";
15
+ import { useTransactionHistory as We } from "./useTransactionHistory.es.js";
16
+ import { TransactionDetailsBlock as $e } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
17
+ import { useRequiredCopy as Je } from "../useRequiredCopy.es.js";
18
+ import { useLayoutEffect as Qe, useState as d } from "react";
19
+ import { observer as Xe } from "mobx-react-lite";
20
+ import { Fragment as Ze, jsx as i, jsxs as et } from "react/jsx-runtime";
21
+ import { useTheme as tt } from "@mui/material/styles";
22
+ import ot from "@mui/material/Box";
23
+ var at = (a) => a.insights_feed, It = Xe(({ beat: a, cta: z }) => {
24
+ const T = tt(), { actionDrawer: q, closeActionDrawer: Y, openActionDrawer: U, setActionContext: A } = Ee(), { insights_payload: D } = a, W = Ye(a), v = z ?? W, $ = v?.variant, { top: o, filterMode: m, header: J, colors: Q, filterStrategy: X, tipSection: L, subTabAriaLabels: Z, slotData: ee, averageFormat: te, subTabs: oe, boldLabel: ae, barLegendLabel: ne, showMonthlyAmount: re, showMonthTabs: se = !0, showTransactionsHeader: ie = !0 } = Ke($ ?? ""), C = !se && o === "singleBar", { instanceSlotData: t, beatTransactions: g, spendCategoryGuids: B, allAccountGuids: S, categoryName: I, displayedDateRange: f, transactionStore: le } = We(a, { slotData: ee }, v?.drilldown_data), { budgets: ce, categories: de, common: me } = xe(), x = Ie().categories.find(({ guid: e }) => e === t?.budget_category_guid), n = Je(at), [ge, E] = d(!1), [ue, pe] = d(!1), R = Ge(), { dataSeries: u, chartData: p, comparisonBars: l } = Pe({
25
+ data: t?.data_series,
26
+ ariaLabel: o === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : ke,
27
+ top: o,
28
+ beatTransactions: g
29
+ }), c = o === "doubleBar", be = o === "tabsOnly", s = c ? l : p, { chartBarIndex: w, subTabIndex: he } = Ve({
28
30
  chartTabCount: p.length,
29
- comparisonTabCount: i.length,
30
- actionDrawer: P,
31
+ comparisonTabCount: l.length,
32
+ actionDrawer: q,
31
33
  beatGuid: a.guid
32
- }), [r, y] = d(R), [T, x] = d(mt), [ut, gt] = d(s.length);
33
- s.length !== ut && (gt(s.length), y(R));
34
- const F = (t) => W({
34
+ }), [r, y] = d(w), [_, F] = d(he), [Ce, fe] = d(s.length);
35
+ s.length !== Ce && (fe(s.length), y(w));
36
+ const O = (e) => X({
35
37
  beat: a,
36
- beatTransactions: u,
37
- dataSeries: g,
38
- comparisonBars: i,
39
- selectedIndex: t,
40
- subIndex: T,
41
- isLastTab: t === s.length - 1,
42
- instanceSlotData: o,
43
- spendCategoryGuids: v,
44
- displayedDateRange: C
45
- }), pt = u.map((t) => t.guid).join(","), bt = v.join(","), ht = B.join(","), ft = e === "list" || e === "tabsOnly" || e === "monthTabs" || g.length > 0, O = () => {
38
+ beatTransactions: g,
39
+ dataSeries: u,
40
+ comparisonBars: l,
41
+ selectedIndex: e,
42
+ subIndex: _,
43
+ isLastTab: e === s.length - 1,
44
+ instanceSlotData: t,
45
+ spendCategoryGuids: B,
46
+ displayedDateRange: f
47
+ }), ye = g.map((e) => e.guid).join(","), _e = B.join(","), Te = S.join(","), Ae = o === "list" || o === "tabsOnly" || o === "monthTabs" || u.length > 0, k = () => {
46
48
  if (m !== "store") return;
47
- const t = ft ? F(r) : {
49
+ const e = Ae ? O(r) : {
48
50
  accounts: [],
49
51
  custom: () => !1
50
52
  };
51
- rt.setFilter(kt(t, {
52
- allAccountGuids: B,
53
- displayedDateRange: C
53
+ le.setFilter(qe(e, {
54
+ allAccountGuids: S,
55
+ displayedDateRange: f
54
56
  }));
55
57
  };
56
- zt(() => {
57
- O();
58
+ Qe(() => {
59
+ k();
58
60
  }, [
59
61
  a.guid,
60
62
  r,
61
- T,
63
+ _,
62
64
  m,
63
- g.length,
64
- o,
65
- C,
66
- bt,
67
- ht,
68
- pt,
69
- e
65
+ u.length,
66
+ t,
67
+ f,
68
+ _e,
69
+ Te,
70
+ ye,
71
+ o
70
72
  ]);
71
- const w = Mt(D), b = q?.({
73
+ const H = ze(D), b = J?.({
72
74
  title: D?.title,
73
- subHeader: w,
74
- categoryName: nt,
75
+ subHeader: H,
76
+ categoryName: I,
75
77
  selectedDate: p[r]?.date ?? void 0,
76
- slotData: o,
78
+ slotData: t,
77
79
  copy: n
78
- }), H = U(_, o?.category_guid), [G, M] = o?.legends ?? [], Ct = m === "local" ? (t) => F(t).custom ?? (() => !0) : void 0, yt = m === "local" ? u : void 0, k = (t, h) => {
79
- E(V.DRAWER_CHART_BAR_CLICKED), y(t), h !== void 0 && x(h);
80
- }, Tt = (t) => {
81
- E(V.TAB_SELECTED), y(t);
82
- }, N = c ? Ot([{
80
+ }), M = Q(T, t?.category_guid), [G, N] = t?.legends ?? [], De = m === "local" ? (e) => O(e).custom ?? (() => !0) : void 0, ve = m === "local" ? g : void 0, j = (e, h) => {
81
+ R(P.DRAWER_CHART_BAR_CLICKED), y(e), h !== void 0 && F(h);
82
+ }, Le = (e) => {
83
+ R(P.TAB_SELECTED), y(e);
84
+ }, V = c ? je([{
83
85
  ...G,
84
- value: i[r]?.main
86
+ value: l[r]?.main
85
87
  }, {
86
- ...M,
87
- value: i[r]?.comparison
88
- }]) : void 0, _t = $?.(n) ?? [], j = c ? (N ?? []).map((t, h) => ({
89
- label: t.label,
90
- ariaLabel: _t[h]
91
- })) : dt ? g.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : X?.({
92
- instanceSlotData: o,
88
+ ...N,
89
+ value: l[r]?.comparison
90
+ }]) : void 0, Be = Z?.(n) ?? [], K = c ? (V ?? []).map((e, h) => ({
91
+ label: e.label,
92
+ ariaLabel: Be[h]
93
+ })) : be ? u.flatMap((e) => e.localized_label ? [{ label: e.localized_label }] : []) : oe?.({
94
+ instanceSlotData: t,
93
95
  copy: n
94
- }).map((t) => ({ label: t })) ?? [], At = c || e === "singleBar" || e === "upcomingBill" ? s.length ? c ? /* @__PURE__ */ l(Ft, {
95
- bars: i,
96
- boldLabel: Z,
97
- colors: H,
98
- legendPosition: "top",
99
- legendVariant: "body2",
100
- legends: N,
101
- onBarClick: k,
102
- selectedIndex: r
103
- }) : /* @__PURE__ */ l(Et, {
104
- amounts: {
105
- average: o?.average_amount,
106
- formattedAverage: vt(o?.average_amount ?? 0, Q ?? St.cents)
107
- },
108
- color: H[0] ?? _.palette.primary.main,
109
- data: p,
110
- legendPosition: "top",
111
- heightOverride: 172,
112
- margin: {
113
- bottom: 8,
114
- top: 24,
115
- left: 24,
116
- right: 24
117
- },
118
- monthlyAmountLabel: tt?.(n) ?? G?.label ?? n.general.monthly_amount,
119
- keyboardSelectable: f,
120
- onBarClick: k,
121
- selectedTabIndex: r,
122
- showMonthlyAmount: et,
123
- trendAmountLabel: M?.label ?? n.general.trend
124
- }) : /* @__PURE__ */ l(Rt, {}) : null;
125
- return /* @__PURE__ */ Ut(qt, { children: [/* @__PURE__ */ l(jt, {
126
- baseTransactions: yt,
96
+ }).map((e) => ({ label: e })) ?? [], Se = c || o === "singleBar" || o === "upcomingBill" ? /* @__PURE__ */ i(ot, {
97
+ sx: { "& > div > div:has(> div)": { mb: 18 } },
98
+ children: s.length ? c ? /* @__PURE__ */ i(Ne, {
99
+ bars: l,
100
+ boldLabel: ae,
101
+ colors: M,
102
+ legendPosition: "top",
103
+ legendVariant: "body2",
104
+ legends: V,
105
+ onBarClick: j,
106
+ selectedIndex: r
107
+ }) : /* @__PURE__ */ i(He, {
108
+ amounts: {
109
+ average: t?.average_amount,
110
+ formattedAverage: we(t?.average_amount ?? 0, te ?? Re.cents)
111
+ },
112
+ color: M[0] ?? T.palette.primary.main,
113
+ data: p,
114
+ legendPosition: "top",
115
+ heightOverride: 172,
116
+ margin: {
117
+ bottom: 8,
118
+ top: 24,
119
+ left: 24,
120
+ right: 24
121
+ },
122
+ monthlyAmountLabel: ne?.(n) ?? G?.label ?? n.general.monthly_amount,
123
+ keyboardSelectable: C,
124
+ onBarClick: j,
125
+ selectedTabIndex: r,
126
+ showMonthlyAmount: re,
127
+ trendAmountLabel: N?.label ?? n.general.trend
128
+ }) : /* @__PURE__ */ i(Me, {})
129
+ }) : null;
130
+ return /* @__PURE__ */ et(Ze, { children: [/* @__PURE__ */ i(Ue, {
131
+ baseTransactions: ve,
127
132
  heading: b?.heading,
128
133
  icon: b?.icon,
129
134
  logo: b?.logo,
130
- onSelectionChange: Tt,
135
+ onSelectionChange: Le,
131
136
  selectedIndex: r,
132
137
  subHeadingText: b?.subHeadingText,
133
- showTransactionsHeader: at,
134
- tabs: f ? void 0 : s,
135
- ...f && { listLabel: s[r]?.label },
136
- top: At,
137
- ...j.length > 0 && { subTabs: {
138
- tabs: j,
139
- selectedIndex: T,
140
- onChange: x
138
+ showTransactionsHeader: ie,
139
+ tabs: C ? void 0 : s,
140
+ ...C && { listLabel: s[r]?.label },
141
+ top: Se,
142
+ ...K.length > 0 && { subTabs: {
143
+ tabs: K,
144
+ selectedIndex: _,
145
+ onChange: F
141
146
  } },
142
- ...S && { tipSection: !lt && (S(ct, n, w?.text, o) ?? !1) },
143
- transactionFilter: Ct,
144
- onEachRowClick: (t) => {
145
- A({ transaction_guid: t }), I(!0);
147
+ ...L && { tipSection: !ue && (L(pe, n, H?.text, t, {
148
+ categoryName: t?.budget_category_guid ? x ? Oe(x, de) : "" : I,
149
+ actionLabel: ce.dialog_create_budget_title,
150
+ openBlock: (e) => {
151
+ Y(), queueMicrotask(() => U({
152
+ guid: a.guid,
153
+ trigger: "inDescriptionCta",
154
+ cta: e
155
+ }));
156
+ }
157
+ }) ?? !1) },
158
+ transactionFilter: De,
159
+ onEachRowClick: (e) => {
160
+ A({ transaction_guid: e }), E(!0);
146
161
  }
147
- }), /* @__PURE__ */ l(Bt, {
148
- ariaLabelClose: st.close_aria,
149
- isOpen: it,
162
+ }), /* @__PURE__ */ i(Fe, {
163
+ ariaLabelClose: me.close_aria,
164
+ isOpen: ge,
150
165
  onClose: () => {
151
- I(!1), A({ transaction_guid: void 0 }), O();
166
+ E(!1), A({ transaction_guid: void 0 }), k();
152
167
  },
153
168
  title: n.general.transaction_details_title,
154
- children: /* @__PURE__ */ l(Kt, { beat: a })
169
+ children: /* @__PURE__ */ i($e, { beat: a })
155
170
  })] });
156
171
  });
157
172
  export {
158
- Ce as TransactionHistoryBlock,
159
- $t as selectTransactionHistoryCopy
173
+ It as TransactionHistoryBlock,
174
+ at as selectTransactionHistoryCopy
160
175
  };
161
176
 
162
177
  //# sourceMappingURL=TransactionHistoryBlock.es.js.map