@mx-cartographer/experiences 9.3.8-alpha.al0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/accounts/components/AccountListItem.es.js +4 -4
  3. package/dist/accounts/components/AccountsListCompact.es.js +15 -15
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountActions.es.js +6 -6
  5. package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js +6 -6
  6. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetails.es.js +11 -11
  7. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js +6 -6
  8. package/dist/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.es.js +7 -7
  9. package/dist/accounts/components/detailsdrawer/Transactions/TransactionsTab.es.js +4 -4
  10. package/dist/budgets/components/BudgetsEmptyState.es.js +7 -7
  11. package/dist/budgets/components/budgetdetails/SubBudgetList.es.js +16 -16
  12. package/dist/budgets/components/budgetdetails/SubBudgetList.es.js.map +1 -1
  13. package/dist/cashflow/CashflowOnboarding.es.js +13 -13
  14. package/dist/cashflow/components/CashflowHeading.es.js +4 -4
  15. package/dist/cashflow/components/DetailsExpenseHeader.es.js +4 -4
  16. package/dist/common/components/DataRow.es.js +6 -6
  17. package/dist/common/components/MiniWidgetContainer.es.js +9 -9
  18. package/dist/common/components/charts/linechart/CustomLine.es.js +2 -2
  19. package/dist/common/components/charts/linechart/CustomMark.es.js +2 -2
  20. package/dist/common/context/hooks.d.ts +1 -0
  21. package/dist/common/context/hooks.es.js +12 -11
  22. package/dist/common/context/hooks.es.js.map +1 -1
  23. package/dist/common/context/index.d.ts +1 -1
  24. package/dist/common/index.es.js +116 -115
  25. package/dist/core/index.es.js +27 -25
  26. package/dist/core/stores/BudgetsStore.es.js +21 -28
  27. package/dist/core/stores/BudgetsStore.es.js.map +1 -1
  28. package/dist/core/stores/GlobalStore.d.ts +2 -1
  29. package/dist/core/stores/GlobalStore.es.js +11 -9
  30. package/dist/core/stores/GlobalStore.es.js.map +1 -1
  31. package/dist/core/stores/InsightsV2Store.d.ts +24 -0
  32. package/dist/core/stores/InsightsV2Store.es.js +41 -0
  33. package/dist/core/stores/InsightsV2Store.es.js.map +1 -0
  34. package/dist/core/stores/index.d.ts +2 -0
  35. package/dist/core/types/Beat.d.ts +2 -0
  36. package/dist/core/types/Beat.es.js.map +1 -1
  37. package/dist/core/types/Insights.d.ts +90 -0
  38. package/dist/core/types/InsightsInstanceSlotData.d.ts +93 -0
  39. package/dist/core/types/InsightsInstanceSlotData.es.js +8 -0
  40. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -0
  41. package/dist/core/types/index.d.ts +1 -0
  42. package/dist/core/utils/BudgetUtil.es.js +50 -56
  43. package/dist/core/utils/BudgetUtil.es.js.map +1 -1
  44. package/dist/debts/DebtsWidget.es.js +5 -5
  45. package/dist/debts/components/debtsdrawer/DebtDetailsContent.es.js +3 -3
  46. package/dist/debts/components/debtsdrawer/DebtDetailsTab.es.js +6 -6
  47. package/dist/debts/components/debtsdrawer/DebtScheduleTab.es.js +8 -8
  48. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.es.js +2 -2
  49. package/dist/finstrong/components/KeyIndicatorsTabItem.es.js +8 -8
  50. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.es.js +5 -5
  51. package/dist/finstrong/components/shared/Accounts.es.js +24 -24
  52. package/dist/finstrong/components/shared/ScoreHistoryTimeline.es.js +2 -2
  53. package/dist/finstrong/components/shared/Transactions.es.js +28 -28
  54. package/dist/finstrong/util/finstrongUtils.d.ts +1 -1
  55. package/dist/goals/GoalsWidget.es.js +12 -12
  56. package/dist/insights/components/insights/CustomTransaction/CustomTransaction.es.js +13 -13
  57. package/dist/insights/components/insights/UserFeedback/UserFeedback.es.js +14 -14
  58. package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.es.js +2 -2
  59. package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.es.js +9 -9
  60. package/dist/insights/components/shared/InsightsCard/BeatCard.es.js +4 -4
  61. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.es.js +4 -4
  62. package/dist/insights/components/shared/InsightsCard/ContentAndDescription.es.js +2 -2
  63. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.es.js +2 -2
  64. package/dist/insights/components/shared/MenuAction.es.js +16 -16
  65. package/dist/insights-v2/CommonUtils.d.ts +1 -0
  66. package/dist/insights-v2/CommonUtils.es.js +7 -0
  67. package/dist/insights-v2/CommonUtils.es.js.map +1 -0
  68. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +3 -0
  69. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +28 -0
  70. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -0
  71. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/index.d.ts +1 -0
  72. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.d.ts +9 -0
  73. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js +9 -0
  74. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/layout.es.js.map +1 -0
  75. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +18 -0
  76. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +34 -0
  77. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -0
  78. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +13 -0
  79. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +87 -0
  80. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -0
  81. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.d.ts +4 -0
  82. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +23 -0
  83. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -0
  84. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/index.d.ts +1 -0
  85. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +19 -0
  86. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +15 -0
  87. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -0
  88. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +3 -0
  89. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +11 -0
  90. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -0
  91. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.d.ts +7 -0
  92. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js +48 -0
  93. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/ChartLegend.es.js.map +1 -0
  94. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.d.ts +18 -0
  95. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js +45 -0
  96. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/CustomDoubleBar.es.js.map +1 -0
  97. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.d.ts +2 -0
  98. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js +125 -0
  99. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChart.es.js.map +1 -0
  100. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/index.d.ts +1 -0
  101. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +8 -0
  102. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +10 -0
  103. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -0
  104. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.d.ts +4 -0
  105. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js +28 -0
  106. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js.map +1 -0
  107. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.d.ts +8 -0
  108. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js +44 -0
  109. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/ProgressBar.es.js.map +1 -0
  110. package/dist/insights-v2/blocks/ChartBlocks/DoubleProgressBarBlock/index.d.ts +1 -0
  111. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +4 -0
  112. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +15 -0
  113. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -0
  114. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +9 -0
  115. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +13 -0
  116. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -0
  117. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.d.ts +19 -0
  118. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js +27 -0
  119. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/utils.es.js.map +1 -0
  120. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +5 -0
  121. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +78 -0
  122. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -0
  123. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.d.ts +5 -0
  124. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js +81 -0
  125. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithoutText.es.js.map +1 -0
  126. package/dist/insights-v2/blocks/ChartBlocks/index.d.ts +5 -0
  127. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +4 -0
  128. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +200 -0
  129. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -0
  130. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.d.ts +5 -0
  131. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js +26 -0
  132. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/HeaderComponent.es.js.map +1 -0
  133. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.d.ts +7 -0
  134. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +64 -0
  135. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -0
  136. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/index.d.ts +1 -0
  137. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +32 -0
  138. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +100 -0
  139. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -0
  140. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.d.ts +8 -0
  141. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js +41 -0
  142. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/ActionBlockLayer.es.js.map +1 -0
  143. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.d.ts +4 -0
  144. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js +32 -0
  145. package/dist/insights-v2/blocks/ComponentBlocks/ActionBlock/PlaceholderActionBlock.es.js.map +1 -0
  146. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.d.ts +3 -0
  147. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +50 -0
  148. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js.map +1 -0
  149. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/index.d.ts +1 -0
  150. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.d.ts +7 -0
  151. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js +12 -0
  152. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/util.es.js.map +1 -0
  153. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
  154. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.d.ts +4 -0
  155. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +35 -0
  156. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -0
  157. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.d.ts +3 -0
  158. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +20 -0
  159. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js.map +1 -0
  160. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +296 -0
  161. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +1 -0
  162. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +449 -0
  163. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -0
  164. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js +89 -0
  165. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHolidayCibc.es.js.map +1 -0
  166. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js +235 -0
  167. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js.map +1 -0
  168. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js +57 -0
  169. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlertCIBC.es.js.map +1 -0
  170. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/index.d.ts +1 -0
  171. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +7 -0
  172. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +15 -0
  173. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -0
  174. package/dist/insights-v2/blocks/ImageBlocks/index.d.ts +2 -0
  175. package/dist/insights-v2/blocks/index.d.ts +4 -0
  176. package/dist/insights-v2/blocks/types.d.ts +8 -0
  177. package/dist/insights-v2/components/AccountHeroCard.d.ts +35 -0
  178. package/dist/insights-v2/components/AccountHeroCard.es.js +91 -0
  179. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -0
  180. package/dist/insights-v2/components/AmountPill.d.ts +16 -0
  181. package/dist/insights-v2/components/AmountPill.es.js +25 -0
  182. package/dist/insights-v2/components/AmountPill.es.js.map +1 -0
  183. package/dist/insights-v2/components/BaseLayout.d.ts +6 -0
  184. package/dist/insights-v2/components/BaseLayout.es.js +77 -0
  185. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -0
  186. package/dist/insights-v2/components/ComponentBlocks/DepositLogo.d.ts +22 -0
  187. package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js +33 -0
  188. package/dist/insights-v2/components/ComponentBlocks/DepositLogo.es.js.map +1 -0
  189. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.d.ts +14 -0
  190. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js +65 -0
  191. package/dist/insights-v2/components/ComponentBlocks/StatusIndicator.es.js.map +1 -0
  192. package/dist/insights-v2/components/DesignateEmergencySavingsCard.d.ts +33 -0
  193. package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js +78 -0
  194. package/dist/insights-v2/components/DesignateEmergencySavingsCard.es.js.map +1 -0
  195. package/dist/insights-v2/components/Footer.d.ts +9 -0
  196. package/dist/insights-v2/components/Footer.es.js +25 -0
  197. package/dist/insights-v2/components/Footer.es.js.map +1 -0
  198. package/dist/insights-v2/components/Header.d.ts +8 -0
  199. package/dist/insights-v2/components/Header.es.js +41 -0
  200. package/dist/insights-v2/components/Header.es.js.map +1 -0
  201. package/dist/insights-v2/components/InsightTransactionRow.d.ts +23 -0
  202. package/dist/insights-v2/components/InsightTransactionRow.es.js +52 -0
  203. package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -0
  204. package/dist/insights-v2/components/LogoClusterCard.d.ts +40 -0
  205. package/dist/insights-v2/components/LogoClusterCard.es.js +104 -0
  206. package/dist/insights-v2/components/LogoClusterCard.es.js.map +1 -0
  207. package/dist/insights-v2/components/LogoTile.d.ts +31 -0
  208. package/dist/insights-v2/components/LogoTile.es.js +34 -0
  209. package/dist/insights-v2/components/LogoTile.es.js.map +1 -0
  210. package/dist/insights-v2/components/MerchantHighlightCard.d.ts +34 -0
  211. package/dist/insights-v2/components/MerchantHighlightCard.es.js +64 -0
  212. package/dist/insights-v2/components/MerchantHighlightCard.es.js.map +1 -0
  213. package/dist/insights-v2/components/P2PLogoStack.d.ts +32 -0
  214. package/dist/insights-v2/components/P2PLogoStack.es.js +55 -0
  215. package/dist/insights-v2/components/P2PLogoStack.es.js.map +1 -0
  216. package/dist/insights-v2/components/SaveAnExtraCard.d.ts +27 -0
  217. package/dist/insights-v2/components/SaveAnExtraCard.es.js +57 -0
  218. package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -0
  219. package/dist/insights-v2/components/SavingsOpportunityCard.d.ts +18 -0
  220. package/dist/insights-v2/components/SavingsOpportunityCard.es.js +71 -0
  221. package/dist/insights-v2/components/SavingsOpportunityCard.es.js.map +1 -0
  222. package/dist/insights-v2/components/StatusMessageCard.d.ts +28 -0
  223. package/dist/insights-v2/components/StatusMessageCard.es.js +45 -0
  224. package/dist/insights-v2/components/StatusMessageCard.es.js.map +1 -0
  225. package/dist/insights-v2/components/StatusPill.d.ts +26 -0
  226. package/dist/insights-v2/components/StatusPill.es.js +30 -0
  227. package/dist/insights-v2/components/StatusPill.es.js.map +1 -0
  228. package/dist/insights-v2/components/SubHeader.d.ts +6 -0
  229. package/dist/insights-v2/components/SubHeader.es.js +40 -0
  230. package/dist/insights-v2/components/SubHeader.es.js.map +1 -0
  231. package/dist/insights-v2/components/SubscriptionHeroCard.d.ts +27 -0
  232. package/dist/insights-v2/components/SubscriptionHeroCard.es.js +63 -0
  233. package/dist/insights-v2/components/SubscriptionHeroCard.es.js.map +1 -0
  234. package/dist/insights-v2/components/TransactionListCard.d.ts +45 -0
  235. package/dist/insights-v2/components/TransactionListCard.es.js +118 -0
  236. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -0
  237. package/dist/insights-v2/components/TransferLogoCard.d.ts +44 -0
  238. package/dist/insights-v2/components/TransferLogoCard.es.js +121 -0
  239. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -0
  240. package/dist/insights-v2/components/UpcomingBillCard.d.ts +41 -0
  241. package/dist/insights-v2/components/UpcomingBillCard.es.js +99 -0
  242. package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -0
  243. package/dist/insights-v2/components/celebrationGradients.d.ts +19 -0
  244. package/dist/insights-v2/components/celebrationGradients.es.js +7 -0
  245. package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -0
  246. package/dist/insights-v2/components/chartblocks/BarchartV2.d.ts +2 -0
  247. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js +148 -0
  248. package/dist/insights-v2/components/chartblocks/BarchartV2.es.js.map +1 -0
  249. package/dist/insights-v2/components/chartblocks/EmptyBarChart.d.ts +1 -0
  250. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +14 -0
  251. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -0
  252. package/dist/insights-v2/components/chartblocks/ThemedSVGImage.d.ts +2 -0
  253. package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js +49 -0
  254. package/dist/insights-v2/components/chartblocks/ThemedSVGImage.es.js.map +1 -0
  255. package/dist/insights-v2/components/logoShadow.d.ts +26 -0
  256. package/dist/insights-v2/components/logoShadow.es.js +12 -0
  257. package/dist/insights-v2/components/logoShadow.es.js.map +1 -0
  258. package/dist/insights-v2/components/shared/Confetti.d.ts +15 -0
  259. package/dist/insights-v2/components/shared/Confetti.es.js +33 -0
  260. package/dist/insights-v2/components/shared/Confetti.es.js.map +1 -0
  261. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +338 -0
  262. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -0
  263. package/dist/insights-v2/components/shared/images/PaidOffCard.es.js +85 -0
  264. package/dist/insights-v2/components/shared/images/PaidOffCard.es.js.map +1 -0
  265. package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js +124 -0
  266. package/dist/insights-v2/components/shared/images/SavingsAccountDeposit.es.js.map +1 -0
  267. package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js +104 -0
  268. package/dist/insights-v2/components/shared/images/SavingsOpportunityLeft.es.js.map +1 -0
  269. package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js +104 -0
  270. package/dist/insights-v2/components/shared/images/SavingsOpportunityLeftDark.es.js.map +1 -0
  271. package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js +38 -0
  272. package/dist/insights-v2/components/shared/images/SavingsOpportunityPerforation.es.js.map +1 -0
  273. package/dist/insights-v2/components/statusTokens.d.ts +12 -0
  274. package/dist/insights-v2/components/statusTokens.es.js +10 -0
  275. package/dist/insights-v2/components/statusTokens.es.js.map +1 -0
  276. package/dist/insights-v2/hooks/useContainerDimensions.d.ts +5 -0
  277. package/dist/insights-v2/hooks/useContainerDimensions.es.js +26 -0
  278. package/dist/insights-v2/hooks/useContainerDimensions.es.js.map +1 -0
  279. package/dist/insights-v2/index.d.ts +18 -0
  280. package/dist/insights-v2/index.es.js +55 -0
  281. package/dist/insights-v2/mappings/blocks.d.ts +14 -0
  282. package/dist/insights-v2/mappings/blocks.es.js +32 -0
  283. package/dist/insights-v2/mappings/blocks.es.js.map +1 -0
  284. package/dist/investments/InvestmentsWidget.es.js +10 -10
  285. package/dist/investments/components/AnalysisDetails.es.js +4 -4
  286. package/dist/investments/components/allocation/InvestementAllocationList.es.js +27 -27
  287. package/dist/microinsights/MicroCardTemplate.es.js +4 -4
  288. package/dist/microinsights/carousel/BeatList.es.js +9 -9
  289. package/dist/networth/NetWorthWidget.es.js +6 -6
  290. package/dist/networth/components/AssetsLiabilitiesDetail.es.js +2 -2
  291. package/dist/networth/components/GainsLossesDetail.es.js +13 -13
  292. package/dist/notifications/components/NotificationDrawer.es.js +5 -5
  293. package/dist/notifications/components/NotificationList.es.js +13 -13
  294. package/dist/recurringtransactions/components/MicroWidgetContent.es.js +13 -13
  295. package/dist/recurringtransactions/components/RecurrenceRow.es.js +6 -6
  296. package/dist/recurringtransactions/components/RecurringStatus.es.js +4 -4
  297. package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +19 -19
  298. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.es.js +9 -9
  299. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js +5 -5
  300. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransaction.es.js +25 -25
  301. package/dist/recurringtransactions/components/shared/recurringsettings/ManageIncome.es.js +5 -5
  302. package/dist/settings/components/notifications/NotificationSettings.es.js +12 -12
  303. package/dist/settings/components/profile/ProfileTab.es.js +20 -20
  304. package/dist/trends/TrendsWidget.es.js +25 -25
  305. package/package.json +1 -1
@@ -1,124 +1,124 @@
1
1
  import { buildDynamicCopy as r, buildPluralCopy as t } from "../core/utils/Localization.es.js";
2
2
  import m, { CalendarSelectionTypes as i } from "./components/calendar/Calendar.es.js";
3
3
  import a from "./components/charts/StatusBar.es.js";
4
- import s from "./components/charts/Donut.es.js";
4
+ import p from "./components/charts/Donut.es.js";
5
5
  import u from "./hooks/useAccountDisplayName.es.js";
6
6
  import { useCombineEvents as S, useCombinePageviews as C } from "./hooks/useCombineEvents.es.js";
7
7
  import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
8
8
  import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
9
- import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as w, useLoad as h, useMerchantStore as x, useNetWorthStore as M, useNotificationStore as Y, usePageView as H, useRecurringTransactionsStore as F, useSettingsStore as z, useTransactionStore as V, useTrendsStore as k, useUserStore as q, useWidgetContainerProvider as K } from "./context/hooks.es.js";
10
- import { useInsightsEnabled as j } from "./hooks/useInsightsEnabled.es.js";
11
- import { useScreenSize as Q } from "./hooks/useScreenSize.es.js";
12
- import $ from "./hooks/usePrevious.es.js";
13
- import { useWidgetHeaderStyles as ro } from "./hooks/useWidgetHeaderStyles.es.js";
14
- import { useWidgetLoadTimer as eo } from "./hooks/useWidgetLoadTimer.es.js";
15
- import io from "./components/dialog/Dialog.es.js";
16
- import ao from "./components/drawer/Drawer.es.js";
17
- import so from "./components/daterangeselector/DateRangeSelector.es.js";
18
- import { ANALYTICS_EVENTS as uo } from "./constants/Analytics.es.js";
19
- import { CONNECTIONS_WIDGET_ID as So, CONNECT_WIDGET_ID as Co, MemberConnectionStatus as go } from "./constants/Connect.es.js";
20
- import { formatCurrency as To, formatOrdinal as Eo, formatPercentage as Do, generateEqualIntervals as Io, getCurrencyCodes as _o, getPluralRules as No } from "../core/utils/NumberFormatting.es.js";
21
- import { GlobalStore as Ao } from "../core/stores/GlobalStore.es.js";
22
- import { INCOME_ACCOUNT_TYPES as bo, PAYMENT_ACCOUNT_TYPES as Oo, SPENDING_ACCOUNT_TYPES as Go } from "./constants/Account.es.js";
23
- import { RECURRENCE_COPY as Lo } from "./constants/ScheduledPayment.es.js";
24
- import { LOADING_STATUS as Uo } from "./constants/SpendingPlan.es.js";
25
- import { DEFAULT_DONUT_SIZE as Bo, DEFAULT_STROKE_WIDTH as wo } from "./constants/Donut.es.js";
26
- import { Sizes as xo, TOUCH_TARGET as Mo } from "./constants/Sizes.es.js";
27
- import Ho from "./components/donuts/MultiSegmentDonut.es.js";
9
+ import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as V, useSettingsStore as z, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as Z } from "./context/hooks.es.js";
10
+ import { useInsightsEnabled as J } from "./hooks/useInsightsEnabled.es.js";
11
+ import { useScreenSize as X } from "./hooks/useScreenSize.es.js";
12
+ import oo from "./hooks/usePrevious.es.js";
13
+ import { useWidgetHeaderStyles as to } from "./hooks/useWidgetHeaderStyles.es.js";
14
+ import { useWidgetLoadTimer as mo } from "./hooks/useWidgetLoadTimer.es.js";
15
+ import no from "./components/dialog/Dialog.es.js";
16
+ import so from "./components/drawer/Drawer.es.js";
17
+ import fo from "./components/daterangeselector/DateRangeSelector.es.js";
18
+ import { ANALYTICS_EVENTS as lo } from "./constants/Analytics.es.js";
19
+ import { CONNECTIONS_WIDGET_ID as Co, CONNECT_WIDGET_ID as go, MemberConnectionStatus as co } from "./constants/Connect.es.js";
20
+ import { formatCurrency as Eo, formatOrdinal as Do, formatPercentage as Io, generateEqualIntervals as _o, getCurrencyCodes as No, getPluralRules as yo } from "../core/utils/NumberFormatting.es.js";
21
+ import { GlobalStore as Po } from "../core/stores/GlobalStore.es.js";
22
+ import { INCOME_ACCOUNT_TYPES as Oo, PAYMENT_ACCOUNT_TYPES as Go, SPENDING_ACCOUNT_TYPES as Wo } from "./constants/Account.es.js";
23
+ import { RECURRENCE_COPY as Ro } from "./constants/ScheduledPayment.es.js";
24
+ import { LOADING_STATUS as vo } from "./constants/SpendingPlan.es.js";
25
+ import { DEFAULT_DONUT_SIZE as ho, DEFAULT_STROKE_WIDTH as wo } from "./constants/Donut.es.js";
26
+ import { Sizes as Mo, TOUCH_TARGET as Yo } from "./constants/Sizes.es.js";
27
+ import Fo from "./components/donuts/MultiSegmentDonut.es.js";
28
28
  import zo from "./components/donuts/SingleSegmentDonut.es.js";
29
- import ko from "./components/ErrorBoundary.es.js";
30
- import Ko from "./components/Error.es.js";
31
- import jo from "./components/MicroWidgetContainer.es.js";
32
- import Qo from "./components/MiniWidgetContainer.es.js";
33
- import { GlobalAccountFilter as $o } from "./components/GlobalAccountFilter.es.js";
34
- import rr from "./components/Loader.es.js";
35
- import { WidgetContainer as er } from "./components/WidgetContainer.es.js";
36
- import ir from "./components/ConnectDrawer.es.js";
37
- import ar from "./components/CurrencyDialog.es.js";
38
- import sr from "./components/CurrencyInput.es.js";
39
- import ur from "./components/ResponsiveButton.es.js";
40
- import Sr from "./components/SearchBox.es.js";
41
- import gr from "./components/SelectionBox.es.js";
42
- import Tr from "./components/TabContentContainer.es.js";
43
- import Er from "./components/IconBacking.es.js";
44
- import Ir from "./components/DataRow.es.js";
45
- import Nr from "./components/InformationTooltip.es.js";
46
- import { ConnectCard as Ar } from "./components/ConnectCard.es.js";
47
- import { CurrencyText as br } from "./components/CurrencyText.es.js";
48
- import { EmptyState as Gr } from "./components/EmptyState.es.js";
49
- import { ListItemAction as Lr } from "./components/ListItemAction.es.js";
50
- import { ListItemRow as Ur } from "./components/ListItemRow.es.js";
51
- import { ListItemWrapper as Br } from "./components/ListItemWrapper.es.js";
52
- import { Select as hr } from "./components/Select.es.js";
53
- import { ToggleButtonListItem as Mr } from "./components/listitems/ToggleButtonListItem.es.js";
54
- import { ToggleListItem as Hr } from "./components/listitems/ToggleListItem.es.js";
29
+ import qo from "./components/ErrorBoundary.es.js";
30
+ import Zo from "./components/Error.es.js";
31
+ import Jo from "./components/MicroWidgetContainer.es.js";
32
+ import Xo from "./components/MiniWidgetContainer.es.js";
33
+ import { GlobalAccountFilter as or } from "./components/GlobalAccountFilter.es.js";
34
+ import tr from "./components/Loader.es.js";
35
+ import { WidgetContainer as mr } from "./components/WidgetContainer.es.js";
36
+ import nr from "./components/ConnectDrawer.es.js";
37
+ import sr from "./components/CurrencyDialog.es.js";
38
+ import fr from "./components/CurrencyInput.es.js";
39
+ import lr from "./components/ResponsiveButton.es.js";
40
+ import Cr from "./components/SearchBox.es.js";
41
+ import cr from "./components/SelectionBox.es.js";
42
+ import dr from "./components/TabContentContainer.es.js";
43
+ import Dr from "./components/IconBacking.es.js";
44
+ import _r from "./components/DataRow.es.js";
45
+ import yr from "./components/InformationTooltip.es.js";
46
+ import { ConnectCard as Pr } from "./components/ConnectCard.es.js";
47
+ import { CurrencyText as Or } from "./components/CurrencyText.es.js";
48
+ import { EmptyState as Wr } from "./components/EmptyState.es.js";
49
+ import { ListItemAction as Rr } from "./components/ListItemAction.es.js";
50
+ import { ListItemRow as vr } from "./components/ListItemRow.es.js";
51
+ import { ListItemWrapper as hr } from "./components/ListItemWrapper.es.js";
52
+ import { Select as xr } from "./components/Select.es.js";
53
+ import { ToggleButtonListItem as Yr } from "./components/listitems/ToggleButtonListItem.es.js";
54
+ import { ToggleListItem as Fr } from "./components/listitems/ToggleListItem.es.js";
55
55
  import { analyticsSession as zr } from "./utils/Analytics.es.js";
56
- import { getClientPaletteOptions as kr, getClientTheme as qr } from "./utils/Theme.es.js";
56
+ import { getClientPaletteOptions as qr, getClientTheme as Kr } from "./utils/Theme.es.js";
57
57
  export {
58
- uo as ANALYTICS_EVENTS,
59
- So as CONNECTIONS_WIDGET_ID,
60
- Co as CONNECT_WIDGET_ID,
58
+ lo as ANALYTICS_EVENTS,
59
+ Co as CONNECTIONS_WIDGET_ID,
60
+ go as CONNECT_WIDGET_ID,
61
61
  m as Calendar,
62
62
  i as CalendarSelectionTypes,
63
- Ar as ConnectCard,
64
- ir as ConnectDrawer,
65
- ar as CurrencyDialog,
66
- sr as CurrencyInput,
67
- br as CurrencyText,
68
- Bo as DEFAULT_DONUT_SIZE,
63
+ Pr as ConnectCard,
64
+ nr as ConnectDrawer,
65
+ sr as CurrencyDialog,
66
+ fr as CurrencyInput,
67
+ Or as CurrencyText,
68
+ ho as DEFAULT_DONUT_SIZE,
69
69
  wo as DEFAULT_STROKE_WIDTH,
70
- Ir as DataRow,
71
- so as DateRangeSelector,
72
- io as Dialog,
73
- s as Donut,
74
- ao as Drawer,
75
- Gr as EmptyState,
76
- Ko as Error,
77
- ko as ErrorBoundary,
78
- $o as GlobalAccountFilter,
70
+ _r as DataRow,
71
+ fo as DateRangeSelector,
72
+ no as Dialog,
73
+ p as Donut,
74
+ so as Drawer,
75
+ Wr as EmptyState,
76
+ Zo as Error,
77
+ qo as ErrorBoundary,
78
+ or as GlobalAccountFilter,
79
79
  c as GlobalDataContext,
80
80
  T as GlobalDataProvider,
81
- Ao as GlobalStore,
82
- bo as INCOME_ACCOUNT_TYPES,
83
- Er as IconBacking,
84
- Nr as InformationTooltip,
85
- Uo as LOADING_STATUS,
86
- Lr as ListItemAction,
87
- Ur as ListItemRow,
88
- Br as ListItemWrapper,
89
- rr as Loader,
90
- go as MemberConnectionStatus,
91
- jo as MicroWidgetContainer,
92
- Qo as MiniWidgetContainer,
93
- Ho as MultiSegmentDonut,
94
- Oo as PAYMENT_ACCOUNT_TYPES,
95
- Lo as RECURRENCE_COPY,
96
- ur as ResponsiveButton,
97
- Go as SPENDING_ACCOUNT_TYPES,
98
- Sr as SearchBox,
99
- hr as Select,
100
- gr as SelectionBox,
81
+ Po as GlobalStore,
82
+ Oo as INCOME_ACCOUNT_TYPES,
83
+ Dr as IconBacking,
84
+ yr as InformationTooltip,
85
+ vo as LOADING_STATUS,
86
+ Rr as ListItemAction,
87
+ vr as ListItemRow,
88
+ hr as ListItemWrapper,
89
+ tr as Loader,
90
+ co as MemberConnectionStatus,
91
+ Jo as MicroWidgetContainer,
92
+ Xo as MiniWidgetContainer,
93
+ Fo as MultiSegmentDonut,
94
+ Go as PAYMENT_ACCOUNT_TYPES,
95
+ Ro as RECURRENCE_COPY,
96
+ lr as ResponsiveButton,
97
+ Wo as SPENDING_ACCOUNT_TYPES,
98
+ Cr as SearchBox,
99
+ xr as Select,
100
+ cr as SelectionBox,
101
101
  zo as SingleSegmentDonut,
102
- xo as Sizes,
102
+ Mo as Sizes,
103
103
  a as StatusBar,
104
- Mo as TOUCH_TARGET,
105
- Tr as TabContentContainer,
106
- Mr as ToggleButtonListItem,
107
- Hr as ToggleListItem,
108
- er as WidgetContainer,
104
+ Yo as TOUCH_TARGET,
105
+ dr as TabContentContainer,
106
+ Yr as ToggleButtonListItem,
107
+ Fr as ToggleListItem,
108
+ mr as WidgetContainer,
109
109
  E as WidgetContainerContext,
110
110
  D as WidgetContainerProvider,
111
111
  zr as analyticsSession,
112
112
  r as buildDynamicCopy,
113
113
  t as buildPluralCopy,
114
- To as formatCurrency,
115
- Eo as formatOrdinal,
116
- Do as formatPercentage,
117
- Io as generateEqualIntervals,
118
- kr as getClientPaletteOptions,
119
- qr as getClientTheme,
120
- _o as getCurrencyCodes,
121
- No as getPluralRules,
114
+ Eo as formatCurrency,
115
+ Do as formatOrdinal,
116
+ Io as formatPercentage,
117
+ _o as generateEqualIntervals,
118
+ qr as getClientPaletteOptions,
119
+ Kr as getClientTheme,
120
+ No as getCurrencyCodes,
121
+ yo as getPluralRules,
122
122
  u as useAccountDisplayName,
123
123
  _ as useAccountStore,
124
124
  N as useAppConfig,
@@ -136,21 +136,22 @@ export {
136
136
  U as useGlobalUiStore,
137
137
  v as useGoalStore,
138
138
  B as useHelpStore,
139
- w as useHoldingStore,
140
- j as useInsightsEnabled,
141
- h as useLoad,
142
- x as useMerchantStore,
143
- M as useNetWorthStore,
144
- Y as useNotificationStore,
145
- H as usePageView,
146
- $ as usePrevious,
147
- F as useRecurringTransactionsStore,
148
- Q as useScreenSize,
139
+ h as useHoldingStore,
140
+ J as useInsightsEnabled,
141
+ w as useInsightsV2Store,
142
+ x as useLoad,
143
+ M as useMerchantStore,
144
+ Y as useNetWorthStore,
145
+ H as useNotificationStore,
146
+ F as usePageView,
147
+ oo as usePrevious,
148
+ V as useRecurringTransactionsStore,
149
+ X as useScreenSize,
149
150
  z as useSettingsStore,
150
- V as useTransactionStore,
151
- k as useTrendsStore,
152
- q as useUserStore,
153
- K as useWidgetContainerProvider,
154
- ro as useWidgetHeaderStyles,
155
- eo as useWidgetLoadTimer
151
+ k as useTransactionStore,
152
+ q as useTrendsStore,
153
+ K as useUserStore,
154
+ Z as useWidgetContainerProvider,
155
+ to as useWidgetHeaderStyles,
156
+ mo as useWidgetLoadTimer
156
157
  };
@@ -11,8 +11,8 @@ import { FinstrongApi as h } from "./api/FinstrongApi.es.js";
11
11
  import { GlobalCopyApi as G } from "./api/GlobalCopyApi.es.js";
12
12
  import { GoalApi as L } from "./api/GoalApi.es.js";
13
13
  import { HelpApi as E } from "./api/HelpApi.es.js";
14
- import { HoldingApi as R } from "./api/HoldingApi.es.js";
15
- import { MerchantApi as H } from "./api/MerchantApi.es.js";
14
+ import { HoldingApi as P } from "./api/HoldingApi.es.js";
15
+ import { MerchantApi as F } from "./api/MerchantApi.es.js";
16
16
  import { NotificationApi as M } from "./api/NotificationApi.es.js";
17
17
  import { RepeatingTransactionsApi as V } from "./api/RepeatingTransactionsApi.es.js";
18
18
  import { ScheduledPaymentsApi as O } from "./api/ScheduledPaymentsApi.es.js";
@@ -27,7 +27,7 @@ import { GoalType as uo, MetaType as yo, TrackType as To } from "./types/Goal.es
27
27
  import { AccountNotificationTypes as go, BudgetNotificationTypes as Co, InsightNotificationTypes as No, NotificationTypes as ho } from "./types/Notification.es.js";
28
28
  import { TransactionStatus as Go, TransactionType as Bo } from "./types/Transaction.es.js";
29
29
  import { ScreenSize as Do } from "./types/ScreenSize.es.js";
30
- import { Frequency as Po, RecurrenceStatus as Ro, RecurrenceType as Fo, RepeatingType as Ho } from "./types/RepeatingTransaction.es.js";
30
+ import { Frequency as Io, RecurrenceStatus as Po, RecurrenceType as Ro, RepeatingType as Fo } from "./types/RepeatingTransaction.es.js";
31
31
  import { AccountStore as Mo } from "./stores/AccountStore.es.js";
32
32
  import { AppDataStore as Vo } from "./stores/AppDataStore.es.js";
33
33
  import { AnalyticsStore as Oo } from "./stores/AnalyticsStore.es.js";
@@ -44,14 +44,15 @@ import { GlobalCopyStore as mr } from "./stores/GlobalCopyStore.es.js";
44
44
  import { GoalStore as pr } from "./stores/GoalStore.es.js";
45
45
  import { HelpStore as ar } from "./stores/HelpStore.es.js";
46
46
  import { HoldingStore as cr } from "./stores/HoldingStore.es.js";
47
- import { MerchantStore as Sr } from "./stores/MerchantStore.es.js";
48
- import { NetWorthStore as ur } from "./stores/NetWorthStore.es.js";
49
- import { NotificationStore as Tr } from "./stores/NotificationStore.es.js";
50
- import { RecurringTransactionsStore as gr } from "./stores/RecurringTransactionsStore.es.js";
51
- import { SettingsStore as Cr } from "./stores/SettingsStore.es.js";
52
- import { TransactionStore as hr } from "./stores/TransactionStore.es.js";
53
- import { TrendsStore as Gr } from "./stores/TrendsStore.es.js";
54
- import { UserStore as Lr } from "./stores/UserStore.es.js";
47
+ import { InsightsV2Store as Sr } from "./stores/InsightsV2Store.es.js";
48
+ import { MerchantStore as ur } from "./stores/MerchantStore.es.js";
49
+ import { NetWorthStore as Tr } from "./stores/NetWorthStore.es.js";
50
+ import { NotificationStore as gr } from "./stores/NotificationStore.es.js";
51
+ import { RecurringTransactionsStore as Cr } from "./stores/RecurringTransactionsStore.es.js";
52
+ import { SettingsStore as hr } from "./stores/SettingsStore.es.js";
53
+ import { TransactionStore as Gr } from "./stores/TransactionStore.es.js";
54
+ import { TrendsStore as Lr } from "./stores/TrendsStore.es.js";
55
+ import { UserStore as Er } from "./stores/UserStore.es.js";
55
56
  export {
56
57
  a as AccountApi,
57
58
  K as AccountIcon,
@@ -83,7 +84,7 @@ export {
83
84
  p as Fetch,
84
85
  h as FinstrongApi,
85
86
  Zo as FinstrongStore,
86
- Po as Frequency,
87
+ Io as Frequency,
87
88
  G as GlobalCopyApi,
88
89
  mr as GlobalCopyStore,
89
90
  or as GlobalStore,
@@ -93,41 +94,42 @@ export {
93
94
  uo as GoalType,
94
95
  E as HelpApi,
95
96
  ar as HelpStore,
96
- R as HoldingApi,
97
+ P as HoldingApi,
97
98
  cr as HoldingStore,
98
99
  No as InsightNotificationTypes,
100
+ Sr as InsightsV2Store,
99
101
  r as LOCALES,
100
- H as MerchantApi,
101
- Sr as MerchantStore,
102
+ F as MerchantApi,
103
+ ur as MerchantStore,
102
104
  yo as MetaType,
103
105
  to as MfaStatuses,
104
- ur as NetWorthStore,
106
+ Tr as NetWorthStore,
105
107
  io as NonConnectedStatuses,
106
108
  M as NotificationApi,
107
- Tr as NotificationStore,
109
+ gr as NotificationStore,
108
110
  ho as NotificationTypes,
109
111
  mo as ProcessingStatuses,
110
112
  eo as PropertyType,
111
113
  po as PropertyTypeName,
112
- Ro as RecurrenceStatus,
113
- Fo as RecurrenceType,
114
- gr as RecurringTransactionsStore,
114
+ Po as RecurrenceStatus,
115
+ Ro as RecurrenceType,
116
+ Cr as RecurringTransactionsStore,
115
117
  V as RepeatingTransactionsApi,
116
- Ho as RepeatingType,
118
+ Fo as RepeatingType,
117
119
  So as ScheduledPaymentTypes,
118
120
  O as ScheduledPaymentsApi,
119
121
  Do as ScreenSize,
120
122
  k as SettingsApi,
121
- Cr as SettingsStore,
123
+ hr as SettingsStore,
122
124
  no as StatusName,
123
125
  To as TrackType,
124
126
  w as TransactionApi,
125
127
  Go as TransactionStatus,
126
- hr as TransactionStore,
128
+ Gr as TransactionStore,
127
129
  Bo as TransactionType,
128
- Gr as TrendsStore,
130
+ Lr as TrendsStore,
129
131
  _ as UserApi,
130
- Lr as UserStore,
132
+ Er as UserStore,
131
133
  fo as UserVerification,
132
134
  t as VALID_LOCALES,
133
135
  v as WidgetApi,
@@ -1,18 +1,18 @@
1
1
  import { CategoryGuids as i } from "../constants/Category.es.js";
2
2
  import { BudgetsApi as o } from "../api/BudgetsApi.es.js";
3
- import { upsertByGuid as g } from "../utils/upsertByGuid.es.js";
4
- import { augmentBudgets as n, findBudget as h, findSubBudget as l } from "../utils/BudgetUtil.es.js";
3
+ import { upsertByGuid as u } from "../utils/upsertByGuid.es.js";
4
+ import { augmentBudgets as g, findBudget as h, findSubBudget as l } from "../utils/BudgetUtil.es.js";
5
5
  import { endOfMonth as B } from "date-fns/endOfMonth";
6
6
  import { startOfMonth as p } from "date-fns/startOfMonth";
7
- import { startOfToday as c } from "date-fns/startOfToday";
8
- import { makeAutoObservable as b, reaction as S, runInAction as a } from "mobx";
7
+ import { startOfToday as n } from "date-fns/startOfToday";
8
+ import { makeAutoObservable as b, reaction as S, runInAction as d } from "mobx";
9
9
  var _ = class {
10
10
  api = new o("/", "");
11
11
  globalStore;
12
12
  alert = "";
13
13
  dateRange = {
14
- start: p(c()),
15
- end: B(c())
14
+ start: p(n()),
15
+ end: B(n())
16
16
  };
17
17
  budgets = [];
18
18
  selectedBudget;
@@ -34,10 +34,10 @@ var _ = class {
34
34
  });
35
35
  };
36
36
  get detailedBudgets() {
37
- return n(this.budgets.filter((t) => t.category_guid !== i.INCOME && t.category_guid !== i.TRANSFER && t.category_guid !== i.INVESTMENTS), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
37
+ return g(this.budgets.filter((t) => t.category_guid !== i.INCOME && t.category_guid !== i.TRANSFER && t.category_guid !== i.INVESTMENTS), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
38
38
  }
39
39
  get incomeBudget() {
40
- return n(this.budgets.filter((t) => !t.parent_guid), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).reduce((t, e) => e.category_guid !== i.INCOME ? t : !t || e.percentage > t.percentage ? e : t, void 0)?.amount;
40
+ return g(this.budgets.filter((t) => !t.parent_guid), this.globalStore.categoryStore.detailedCategories, this.globalStore.copyStore.copy.budgets, this.theme).reduce((t, e) => e.category_guid !== i.INCOME ? t : !t || e.percentage > t.percentage ? e : t, void 0)?.amount;
41
41
  }
42
42
  get unbudgetedCategories() {
43
43
  return this.globalStore.categoryStore.spendCategories.filter((t) => !this.detailedBudgets.find((e) => e.category_guid === t.guid));
@@ -48,8 +48,8 @@ var _ = class {
48
48
  addBudget = async (t, e, r = null) => {
49
49
  try {
50
50
  const s = await this.api.addBudget(t, e, r);
51
- a(() => {
52
- this.budgets = g(this.budgets, s);
51
+ d(() => {
52
+ this.budgets = u(this.budgets, s);
53
53
  });
54
54
  } catch (s) {
55
55
  console.error("Error adding budget:", s), this.globalStore.captureException(s, { store: "BudgetsStore" });
@@ -57,16 +57,9 @@ var _ = class {
57
57
  };
58
58
  deleteBudget = async (t) => {
59
59
  try {
60
- const e = this.detailedBudgets.find((d) => d.guid === t), r = /* @__PURE__ */ new Set();
61
- this.budgets.forEach((d) => {
62
- d.parent_guid === t && r.add(d.guid);
63
- }), e?.subBudgets && e.subBudgets.forEach((d) => {
64
- r.add(d.guid);
65
- });
66
- const s = [t, ...Array.from(r)];
67
- await Promise.all(s.map((d) => this.api.deleteBudget(d))), a(() => {
68
- const d = new Set(s);
69
- this.budgets = this.budgets.filter((u) => !d.has(u.guid));
60
+ await this.api.deleteBudget(t), d(() => {
61
+ const e = this.budgets.findIndex((r) => r.guid === t);
62
+ e >= 0 && this.budgets.splice(e, 1);
70
63
  });
71
64
  } catch (e) {
72
65
  console.error("Error deleting budget:", e), this.globalStore.captureException(e, { store: "BudgetsStore" });
@@ -91,7 +84,7 @@ var _ = class {
91
84
  recalculateBudgets = async (t) => {
92
85
  try {
93
86
  for (const r of t) {
94
- const s = this.budgets.find((d) => d.category_guid === r.guid);
87
+ const s = this.budgets.find((a) => a.category_guid === r.guid);
95
88
  s ? await this.api.updateBudget({
96
89
  ...s,
97
90
  amount: r.totalAverageAmount
@@ -113,7 +106,7 @@ var _ = class {
113
106
  updateBudget = async (t) => {
114
107
  try {
115
108
  const e = await this.api.updateBudget(t);
116
- a(() => {
109
+ d(() => {
117
110
  const r = this.budgets.findIndex((s) => s.guid === t.guid);
118
111
  r >= 0 && (this.budgets[r] = e);
119
112
  });
@@ -128,8 +121,8 @@ var _ = class {
128
121
  addMerchantBudget = async (t, e) => {
129
122
  try {
130
123
  const r = await this.api.addMerchantBudget(t, e);
131
- return a(() => {
132
- this.merchantBudgets = g(this.merchantBudgets, r);
124
+ return d(() => {
125
+ this.merchantBudgets = u(this.merchantBudgets, r);
133
126
  }), { isSuccess: !0 };
134
127
  } catch (r) {
135
128
  return console.error("Error adding merchant budget:", r), this.globalStore.captureException(r, { store: "BudgetsStore" }), { isSuccess: !1 };
@@ -138,9 +131,9 @@ var _ = class {
138
131
  updateMerchantBudget = async (t) => {
139
132
  try {
140
133
  const { guid: e, amount: r } = t, s = await this.api.updateMerchantBudget(e, r);
141
- return a(() => {
142
- const d = this.merchantBudgets.findIndex((u) => u.guid === t.guid);
143
- d >= 0 && (this.merchantBudgets[d] = s);
134
+ return d(() => {
135
+ const a = this.merchantBudgets.findIndex((c) => c.guid === t.guid);
136
+ a >= 0 && (this.merchantBudgets[a] = s);
144
137
  }), { isSuccess: !0 };
145
138
  } catch (e) {
146
139
  return console.error("Error updating merchant budget:", e), this.globalStore.captureException(e, { store: "BudgetsStore" }), { isSuccess: !1 };
@@ -148,7 +141,7 @@ var _ = class {
148
141
  };
149
142
  deleteMerchantBudget = async (t) => {
150
143
  try {
151
- return await this.api.deleteMerchantBudget(t), a(() => {
144
+ return await this.api.deleteMerchantBudget(t), d(() => {
152
145
  this.merchantBudgets = this.merchantBudgets.filter((e) => e.guid !== t);
153
146
  }), { isSuccess: !0 };
154
147
  } catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"BudgetsStore.es.js","names":[],"sources":["../../../src/core/stores/BudgetsStore.ts"],"sourcesContent":["import { makeAutoObservable, reaction, runInAction } from 'mobx'\n\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\n\nimport { Theme } from '@mui/system'\n\nimport { BudgetsApi } from '../api'\nimport { upsertByGuid } from '../utils/upsertByGuid'\nimport { CategoryGuids } from '../constants'\nimport { augmentBudgets, findBudget, findSubBudget } from '../utils/BudgetUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\nimport type {\n Budget,\n Category,\n DateRange,\n DetailedBudget,\n DetailedCategory,\n MerchantBudget,\n} from '../types'\n\nexport class BudgetsStore {\n api: BudgetsApi = new BudgetsApi('/', '')\n\n globalStore: GlobalStore\n\n alert: string = ''\n dateRange: DateRange = { start: startOfMonth(startOfToday()), end: endOfMonth(startOfToday()) }\n budgets: Budget[] = []\n selectedBudget: DetailedBudget | undefined\n selectedSubBudget: DetailedBudget | undefined\n isDataLoaded = false\n theme = {} as Theme\n merchantBudgets: MerchantBudget[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BudgetsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadBudgetData = async () => {\n if (!this.globalStore.recurringTransactionsStore.isDataLoaded) {\n await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData()\n }\n await this.loadBudgets()\n\n /** Reaction to update the selected budget/sub-budget if detailedBudgets is updated **/\n reaction(\n () => this.detailedBudgets,\n (detailedBudgets) => {\n if (detailedBudgets) {\n const budget = this.selectedBudget\n if (budget) {\n this.selectedBudget = findBudget(detailedBudgets, budget.guid)\n }\n\n const subBudget = this.selectedSubBudget\n if (subBudget && subBudget.parent_guid) {\n this.selectedSubBudget = findSubBudget(\n detailedBudgets,\n subBudget.guid,\n subBudget.parent_guid,\n )\n }\n }\n },\n )\n }\n\n get detailedBudgets(): DetailedBudget[] {\n return augmentBudgets(\n this.budgets.filter(\n (budget: Budget) =>\n budget.category_guid !== CategoryGuids.INCOME &&\n budget.category_guid !== CategoryGuids.TRANSFER &&\n budget.category_guid !== CategoryGuids.INVESTMENTS,\n ),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n ).sort((a, b) => {\n if (a.percentage > b.percentage) return -1\n if (a.percentage < b.percentage) return 1\n return 0\n })\n }\n\n // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.\n get incomeBudget(): number | undefined {\n const filteredBudgets = augmentBudgets(\n this.budgets.filter((budget: Budget) => !budget.parent_guid),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n )\n\n const incomeBudget = filteredBudgets.reduce(\n (acc, curr) => {\n if (curr.category_guid !== CategoryGuids.INCOME) return acc\n if (!acc || curr.percentage > acc.percentage) return curr\n return acc\n },\n undefined as DetailedBudget | undefined,\n )\n\n return incomeBudget?.amount\n }\n\n get unbudgetedCategories(): DetailedCategory[] {\n return this.globalStore.categoryStore.spendCategories.filter(\n (category) => !this.detailedBudgets.find((budget) => budget.category_guid === category.guid),\n )\n }\n\n get totalBudgeted(): number {\n return this.detailedBudgets.reduce((total, budget) => total + budget.amount, 0)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n try {\n const budget = await this.api.addBudget(category, amount, parentGuid)\n runInAction(() => {\n this.budgets = upsertByGuid(this.budgets, budget)\n })\n } catch (error) {\n console.error('Error adding budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n deleteBudget = async (guid: string) => {\n try {\n const detailedParent = this.detailedBudgets.find((b) => b.guid === guid)\n const subBudgetGuids = new Set<string>()\n\n this.budgets.forEach((b) => {\n if (b.parent_guid === guid) {\n subBudgetGuids.add(b.guid)\n }\n })\n\n if (detailedParent?.subBudgets) {\n detailedParent.subBudgets.forEach((sb) => {\n subBudgetGuids.add(sb.guid)\n })\n }\n\n const allGuidsToDelete = [guid, ...Array.from(subBudgetGuids)]\n\n await Promise.all(allGuidsToDelete.map((id) => this.api.deleteBudget(id)))\n\n runInAction(() => {\n const guidsSet = new Set(allGuidsToDelete)\n this.budgets = this.budgets.filter((budget) => !guidsSet.has(budget.guid))\n })\n } catch (error) {\n console.error('Error deleting budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n loadBudgets = async () => {\n try {\n const budgets = await this.api.getBudgets()\n this.setBudgets(budgets)\n } catch (error) {\n console.error('Error occurred while loading budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n throw error\n }\n }\n\n setAlert = (alert: string) => (this.alert = alert)\n\n setBudgets = (budgets: Budget[]) => {\n this.budgets = budgets\n this.isDataLoaded = true\n }\n\n setDateRange = (dateRange: DateRange) => (this.dateRange = dateRange)\n\n setSelectedBudget = (budget: DetailedBudget | undefined) => (this.selectedBudget = budget)\n\n setSelectedSubBudget = (budget: DetailedBudget | undefined) => (this.selectedSubBudget = budget)\n\n setTheme = (theme: Theme) => (this.theme = theme)\n\n /**\n * Recalculate budget by using the average amount from top-level categories\n * @param categories Detailed categories\n */\n recalculateBudgets = async (categories: DetailedCategory[]) => {\n try {\n for (const category of categories) {\n const budget = this.budgets.find((budget) => budget.category_guid === category.guid)\n if (budget) {\n await this.api.updateBudget({\n ...budget,\n amount: category.totalAverageAmount,\n })\n } else {\n await this.api.addBudget(category, category.totalAverageAmount)\n }\n }\n const budgetsToDelete = this.budgets.filter(\n (budget) => !categories.find((c) => c.guid === budget.category_guid),\n )\n\n for (const budgetToDelete of budgetsToDelete) {\n await this.api.deleteBudget(budgetToDelete.guid)\n }\n\n await this.loadBudgets()\n\n return { data: this.budgets, isSuccess: true }\n } catch (error) {\n console.error('Error recalculating budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { data: [], isSuccess: false }\n }\n }\n\n updateBudget = async (budget: Budget) => {\n try {\n const updatedBudget = await this.api.updateBudget(budget)\n\n runInAction(() => {\n const index = this.budgets.findIndex((b) => b.guid === budget.guid)\n if (index >= 0) {\n this.budgets[index] = updatedBudget\n }\n })\n } catch (error) {\n console.error('Error updating budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n getMerchantBudgetByMerchantGuid = (merchantGuid: string): MerchantBudget | undefined => {\n return this.merchantBudgets.find(\n (eachMerchantBudget) => eachMerchantBudget?.merchant_guid === merchantGuid,\n )\n }\n\n setMerchantBudgets = (merchantBudgets: MerchantBudget[]) => {\n this.merchantBudgets = merchantBudgets\n }\n\n addMerchantBudget = async (merchantGuid: string, amount: number) => {\n try {\n const newMerchantBudget = await this.api.addMerchantBudget(merchantGuid, amount)\n\n runInAction(() => {\n this.merchantBudgets = upsertByGuid(this.merchantBudgets, newMerchantBudget)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error adding merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n updateMerchantBudget = async (merchantBudget: MerchantBudget) => {\n try {\n const { guid: merchantBudgetGuid, amount } = merchantBudget\n const updatedMerchantBudget = await this.api.updateMerchantBudget(merchantBudgetGuid, amount)\n\n runInAction(() => {\n const index = this.merchantBudgets.findIndex((b) => b.guid === merchantBudget.guid)\n if (index >= 0) {\n this.merchantBudgets[index] = updatedMerchantBudget\n }\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error updating merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n deleteMerchantBudget = async (merchantBudgetGuid: string) => {\n try {\n await this.api.deleteMerchantBudget(merchantBudgetGuid)\n\n runInAction(() => {\n this.merchantBudgets = this.merchantBudgets.filter((b) => b.guid !== merchantBudgetGuid)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error deleting merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAb,MAA0B;AAAA,EACxB,MAAkB,IAAI,EAAW,KAAK,EAAE;AAAA,EAExC;AAAA,EAEA,QAAgB;AAAA,EAChB,YAAuB;AAAA,IAAE,OAAO,EAAa,EAAa,CAAC;AAAA,IAAG,KAAK,EAAW,EAAa,CAAC;AAAA,EAAE;AAAA,EAC9F,UAAoB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,QAAQ,CAAC;AAAA,EACT,kBAAoC,CAAC;AAAA,EAErC,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,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AA,EAAA,IAAW,GACvC,IAAwB,MAAM,KAAK,IAAI,qBAAqB,GAAoB,CAAM;AAE5F,aAAA,EAAA,MAAkB;AAChB,cAAM,IAAQ,KAAK,gBAAgB,UAAA,CAAW,MAAM,EAAE,SAAS,EAAe,IAAI;AAClF,QAAI,KAAS,MACX,KAAK,gBAAgB,CAAA,IAAS;AAAA,MAElC,CAAC,GACM,EAAE,WAAW,GAAK;AAAA,IAC3B,SAAS,GAAO;AACd,qBAAQ,MAAM,mCAAmC,CAAK,GACtD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,eAAe,CAAC,GAC3D,EAAE,WAAW,GAAM;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,uBAAuB,OAAO,MAA+B;AAC3D,QAAI;AACF,mBAAM,KAAK,IAAI,qBAAqB,CAAkB,GAEtD,EAAA,MAAkB;AAChB,aAAK,kBAAkB,KAAK,gBAAgB,OAAA,CAAQ,MAAM,EAAE,SAAS,CAAkB;AAAA,MACzF,CAAC,GACM,EAAE,WAAW,GAAK;AAAA,IAC3B,SAAS,GAAO;AACd,qBAAQ,MAAM,mCAAmC,CAAK,GACtD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,eAAe,CAAC,GAC3D,EAAE,WAAW,GAAM;AAAA,IAC5B;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"BudgetsStore.es.js","names":[],"sources":["../../../src/core/stores/BudgetsStore.ts"],"sourcesContent":["import { makeAutoObservable, reaction, runInAction } from 'mobx'\n\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\n\nimport { Theme } from '@mui/system'\n\nimport { BudgetsApi } from '../api'\nimport { upsertByGuid } from '../utils/upsertByGuid'\nimport { CategoryGuids } from '../constants'\nimport { augmentBudgets, findBudget, findSubBudget } from '../utils/BudgetUtil'\n\nimport { GlobalStore } from './GlobalStore'\n\nimport type {\n Budget,\n Category,\n DateRange,\n DetailedBudget,\n DetailedCategory,\n MerchantBudget,\n} from '../types'\n\nexport class BudgetsStore {\n api: BudgetsApi = new BudgetsApi('/', '')\n\n globalStore: GlobalStore\n\n alert: string = ''\n dateRange: DateRange = { start: startOfMonth(startOfToday()), end: endOfMonth(startOfToday()) }\n budgets: Budget[] = []\n selectedBudget: DetailedBudget | undefined\n selectedSubBudget: DetailedBudget | undefined\n isDataLoaded = false\n theme = {} as Theme\n merchantBudgets: MerchantBudget[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BudgetsApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n loadBudgetData = async () => {\n if (!this.globalStore.recurringTransactionsStore.isDataLoaded) {\n await this.globalStore.recurringTransactionsStore.loadRepeatingTransactionData()\n }\n await this.loadBudgets()\n\n /** Reaction to update the selected budget/sub-budget if detailedBudgets is updated **/\n reaction(\n () => this.detailedBudgets,\n (detailedBudgets) => {\n if (detailedBudgets) {\n const budget = this.selectedBudget\n if (budget) {\n this.selectedBudget = findBudget(detailedBudgets, budget.guid)\n }\n\n const subBudget = this.selectedSubBudget\n if (subBudget && subBudget.parent_guid) {\n this.selectedSubBudget = findSubBudget(\n detailedBudgets,\n subBudget.guid,\n subBudget.parent_guid,\n )\n }\n }\n },\n )\n }\n\n get detailedBudgets(): DetailedBudget[] {\n return augmentBudgets(\n this.budgets.filter(\n (budget: Budget) =>\n budget.category_guid !== CategoryGuids.INCOME &&\n budget.category_guid !== CategoryGuids.TRANSFER &&\n budget.category_guid !== CategoryGuids.INVESTMENTS,\n ),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n ).sort((a, b) => {\n if (a.percentage > b.percentage) return -1\n if (a.percentage < b.percentage) return 1\n return 0\n })\n }\n\n // TODO: Replace this with income from recurring transactions. Income budgets are deprecated.\n get incomeBudget(): number | undefined {\n const filteredBudgets = augmentBudgets(\n this.budgets.filter((budget: Budget) => !budget.parent_guid),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n )\n\n const incomeBudget = filteredBudgets.reduce(\n (acc, curr) => {\n if (curr.category_guid !== CategoryGuids.INCOME) return acc\n if (!acc || curr.percentage > acc.percentage) return curr\n return acc\n },\n undefined as DetailedBudget | undefined,\n )\n\n return incomeBudget?.amount\n }\n\n get unbudgetedCategories(): DetailedCategory[] {\n return this.globalStore.categoryStore.spendCategories.filter(\n (category) => !this.detailedBudgets.find((budget) => budget.category_guid === category.guid),\n )\n }\n\n get totalBudgeted(): number {\n return this.detailedBudgets.reduce((total, budget) => total + budget.amount, 0)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n try {\n const budget = await this.api.addBudget(category, amount, parentGuid)\n runInAction(() => {\n this.budgets = upsertByGuid(this.budgets, budget)\n })\n } catch (error) {\n console.error('Error adding budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n deleteBudget = async (guid: string) => {\n try {\n await this.api.deleteBudget(guid)\n\n runInAction(() => {\n const index = this.budgets.findIndex((budget) => budget.guid === guid)\n if (index >= 0) {\n this.budgets.splice(index, 1)\n }\n })\n } catch (error) {\n console.error('Error deleting budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n loadBudgets = async () => {\n try {\n const budgets = await this.api.getBudgets()\n this.setBudgets(budgets)\n } catch (error) {\n console.error('Error occurred while loading budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n throw error\n }\n }\n\n setAlert = (alert: string) => (this.alert = alert)\n\n setBudgets = (budgets: Budget[]) => {\n this.budgets = budgets\n this.isDataLoaded = true\n }\n\n setDateRange = (dateRange: DateRange) => (this.dateRange = dateRange)\n\n setSelectedBudget = (budget: DetailedBudget | undefined) => (this.selectedBudget = budget)\n\n setSelectedSubBudget = (budget: DetailedBudget | undefined) => (this.selectedSubBudget = budget)\n\n setTheme = (theme: Theme) => (this.theme = theme)\n\n /**\n * Recalculate budget by using the average amount from top-level categories\n * @param categories Detailed categories\n */\n recalculateBudgets = async (categories: DetailedCategory[]) => {\n try {\n for (const category of categories) {\n const budget = this.budgets.find((budget) => budget.category_guid === category.guid)\n if (budget) {\n await this.api.updateBudget({\n ...budget,\n amount: category.totalAverageAmount,\n })\n } else {\n await this.api.addBudget(category, category.totalAverageAmount)\n }\n }\n const budgetsToDelete = this.budgets.filter(\n (budget) => !categories.find((c) => c.guid === budget.category_guid),\n )\n\n for (const budgetToDelete of budgetsToDelete) {\n await this.api.deleteBudget(budgetToDelete.guid)\n }\n\n await this.loadBudgets()\n\n return { data: this.budgets, isSuccess: true }\n } catch (error) {\n console.error('Error recalculating budgets:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { data: [], isSuccess: false }\n }\n }\n\n updateBudget = async (budget: Budget) => {\n try {\n const updatedBudget = await this.api.updateBudget(budget)\n\n runInAction(() => {\n const index = this.budgets.findIndex((b) => b.guid === budget.guid)\n if (index >= 0) {\n this.budgets[index] = updatedBudget\n }\n })\n } catch (error) {\n console.error('Error updating budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n }\n }\n\n getMerchantBudgetByMerchantGuid = (merchantGuid: string): MerchantBudget | undefined => {\n return this.merchantBudgets.find(\n (eachMerchantBudget) => eachMerchantBudget?.merchant_guid === merchantGuid,\n )\n }\n\n setMerchantBudgets = (merchantBudgets: MerchantBudget[]) => {\n this.merchantBudgets = merchantBudgets\n }\n\n addMerchantBudget = async (merchantGuid: string, amount: number) => {\n try {\n const newMerchantBudget = await this.api.addMerchantBudget(merchantGuid, amount)\n\n runInAction(() => {\n this.merchantBudgets = upsertByGuid(this.merchantBudgets, newMerchantBudget)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error adding merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n updateMerchantBudget = async (merchantBudget: MerchantBudget) => {\n try {\n const { guid: merchantBudgetGuid, amount } = merchantBudget\n const updatedMerchantBudget = await this.api.updateMerchantBudget(merchantBudgetGuid, amount)\n\n runInAction(() => {\n const index = this.merchantBudgets.findIndex((b) => b.guid === merchantBudget.guid)\n if (index >= 0) {\n this.merchantBudgets[index] = updatedMerchantBudget\n }\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error updating merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n\n deleteMerchantBudget = async (merchantBudgetGuid: string) => {\n try {\n await this.api.deleteMerchantBudget(merchantBudgetGuid)\n\n runInAction(() => {\n this.merchantBudgets = this.merchantBudgets.filter((b) => b.guid !== merchantBudgetGuid)\n })\n return { isSuccess: true }\n } catch (error) {\n console.error('Error deleting merchant budget:', error)\n this.globalStore.captureException(error, { store: 'BudgetsStore' })\n return { isSuccess: false }\n }\n }\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAb,MAA0B;AAAA,EACxB,MAAkB,IAAI,EAAW,KAAK,EAAE;AAAA,EAExC;AAAA,EAEA,QAAgB;AAAA,EAChB,YAAuB;AAAA,IAAE,OAAO,EAAa,EAAa,CAAC;AAAA,IAAG,KAAK,EAAW,EAAa,CAAC;AAAA,EAAE;AAAA,EAC9F,UAAoB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,QAAQ,CAAC;AAAA,EACT,kBAAoC,CAAC;AAAA,EAErC,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAW,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAE7F,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,iBAAiB,YAAY;AAC3B,IAAK,KAAK,YAAY,2BAA2B,gBAC/C,MAAM,KAAK,YAAY,2BAA2B,6BAA6B,GAEjF,MAAM,KAAK,YAAY,GAGvB,EAAA,MACQ,KAAK,iBAAA,CACV,MAA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d,qBAAQ,MAAM,mCAAmC,CAAK,GACtD,KAAK,YAAY,iBAAiB,GAAO,EAAE,OAAO,eAAe,CAAC,GAC3D,EAAE,WAAW,GAAM;AAAA,IAC5B;AAAA,EACF;AACF"}
@@ -1,4 +1,4 @@
1
- import { AccountStore, AnalyticsStore, AppDataStore, BeatStore, BudgetsStore, CashflowStore, CategoryStore, ConnectStore, DebtsStore, FinstrongStore, GlobalCopyStore, GlobalUiStore, GoalStore, HelpStore, HoldingStore, MerchantStore, NetWorthStore, NotificationStore, RecurringTransactionsStore, SettingsStore, TransactionStore, TrendsStore, UserStore } from '../stores';
1
+ import { AccountStore, AnalyticsStore, AppDataStore, BeatStore, BudgetsStore, CashflowStore, CategoryStore, ConnectStore, DebtsStore, FinstrongStore, GlobalCopyStore, GlobalUiStore, GoalStore, HelpStore, HoldingStore, InsightsV2Store, MerchantStore, NetWorthStore, NotificationStore, RecurringTransactionsStore, SettingsStore, TransactionStore, TrendsStore, UserStore } from '../stores';
2
2
  import { Account, Category, Institution, Member, AppConfig, AppData, Beat, GlobalCaptureException, GlobalErrorHandler, MerchantBudget, Tag, Tagging, Transaction, TransactionRule, UserFeature } from '../types';
3
3
  interface LoadDataProps {
4
4
  accounts?: Account[];
@@ -48,6 +48,7 @@ export declare class GlobalStore {
48
48
  trendsStore: TrendsStore;
49
49
  userStore: UserStore;
50
50
  globalUiStore: GlobalUiStore;
51
+ insightsV2Store: InsightsV2Store;
51
52
  constructor(appConfig?: AppConfig, endpoint?: string, onError?: GlobalErrorHandler, onStoreUpdate?: OnStoreUpdate, onCaptureException?: GlobalCaptureException);
52
53
  get isInitialized(): boolean;
53
54
  captureException: (error: unknown, context?: Record<string, string>) => void;
@@ -14,16 +14,17 @@ import { GlobalCopyStore as C } from "./GlobalCopyStore.es.js";
14
14
  import { GoalStore as U } from "./GoalStore.es.js";
15
15
  import { HelpStore as D } from "./HelpStore.es.js";
16
16
  import { HoldingStore as A } from "./HoldingStore.es.js";
17
- import { MerchantStore as T } from "./MerchantStore.es.js";
18
- import { NetWorthStore as E } from "./NetWorthStore.es.js";
19
- import { NotificationStore as x } from "./NotificationStore.es.js";
20
- import { RecurringTransactionsStore as k } from "./RecurringTransactionsStore.es.js";
21
- import { SettingsStore as G } from "./SettingsStore.es.js";
17
+ import { InsightsV2Store as T } from "./InsightsV2Store.es.js";
18
+ import { MerchantStore as E } from "./MerchantStore.es.js";
19
+ import { NetWorthStore as x } from "./NetWorthStore.es.js";
20
+ import { NotificationStore as k } from "./NotificationStore.es.js";
21
+ import { RecurringTransactionsStore as G } from "./RecurringTransactionsStore.es.js";
22
+ import { SettingsStore as I } from "./SettingsStore.es.js";
22
23
  import { TransactionStore as M } from "./TransactionStore.es.js";
23
- import { TrendsStore as I } from "./TrendsStore.es.js";
24
+ import { TrendsStore as V } from "./TrendsStore.es.js";
24
25
  import { UserStore as W } from "./UserStore.es.js";
25
26
  import { autorun as v, makeAutoObservable as z } from "mobx";
26
- var nt = class {
27
+ var St = class {
27
28
  appConfig = h;
28
29
  endpoint = "/";
29
30
  sessionToken = "";
@@ -53,8 +54,9 @@ var nt = class {
53
54
  trendsStore;
54
55
  userStore;
55
56
  globalUiStore;
57
+ insightsV2Store;
56
58
  constructor(t = h, o = "/", r, e, i) {
57
- this.appConfig = t, this.endpoint = o, this.sessionToken = t.options.session_token ?? "", this.onCaptureException = i, this.onError = r, this.onStoreUpdate = e, this.accountStore = new p(this), this.appDataStore = new c(this), this.analyticsStore = new m(this), this.beatStore = new f(this), this.budgetsStore = new l(this), this.cashflowStore = new g(this), this.categoryStore = new w(this), this.connectStore = new d(this), this.copyStore = new C(this), this.debtsStore = new u(this), this.finstrongStore = new b(this), this.goalStore = new U(this), this.helpStore = new D(this), this.holdingStore = new A(this), this.merchantStore = new T(this), this.netWorthStore = new E(this), this.notificationStore = new x(this), this.recurringTransactionsStore = new k(this), this.settingsStore = new G(this), this.transactionStore = new M(this), this.trendsStore = new I(this), this.userStore = new W(this), this.globalUiStore = new y(this), z(this), v(() => {
59
+ this.appConfig = t, this.endpoint = o, this.sessionToken = t.options.session_token ?? "", this.onCaptureException = i, this.onError = r, this.onStoreUpdate = e, this.accountStore = new p(this), this.appDataStore = new c(this), this.analyticsStore = new m(this), this.beatStore = new f(this), this.budgetsStore = new l(this), this.cashflowStore = new g(this), this.categoryStore = new w(this), this.connectStore = new d(this), this.copyStore = new C(this), this.debtsStore = new u(this), this.finstrongStore = new b(this), this.goalStore = new U(this), this.helpStore = new D(this), this.holdingStore = new A(this), this.merchantStore = new E(this), this.netWorthStore = new x(this), this.notificationStore = new k(this), this.recurringTransactionsStore = new G(this), this.settingsStore = new I(this), this.transactionStore = new M(this), this.trendsStore = new V(this), this.userStore = new W(this), this.globalUiStore = new y(this), this.insightsV2Store = new T(this), z(this), v(() => {
58
60
  const { transactions: s } = this.transactionStore;
59
61
  this.emitUpdate({ transactions: s });
60
62
  });
@@ -81,7 +83,7 @@ var nt = class {
81
83
  };
82
84
  };
83
85
  export {
84
- nt as GlobalStore
86
+ St as GlobalStore
85
87
  };
86
88
 
87
89
  //# sourceMappingURL=GlobalStore.es.js.map