@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2

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 (513) hide show
  1. package/CHANGELOG.md +335 -0
  2. package/README.md +5 -3
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
  5. package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
  6. package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
  7. package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
  8. package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
  9. package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
  10. package/dist/Accounts-CseLC3lL.mjs +5 -0
  11. package/dist/Accounts-o7ohkngR.mjs +27 -0
  12. package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
  13. package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
  14. package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
  15. package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
  16. package/dist/CashflowStore-CeAzChyD.mjs +91 -0
  17. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  18. package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
  19. package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
  20. package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
  21. package/dist/Connect-eYIWqCEr.mjs +39 -0
  22. package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
  23. package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
  24. package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
  25. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
  26. package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
  27. package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
  28. package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
  29. package/dist/Dialog-Ck34yr-d.mjs +63 -0
  30. package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
  31. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
  32. package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
  33. package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
  34. package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
  35. package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
  36. package/dist/Goal-0loDagc5.mjs +6 -0
  37. package/dist/GoalStore-fgXt--2Y.mjs +418 -0
  38. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  39. package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
  40. package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
  41. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  42. package/dist/LineChart-EAr5ox5U.mjs +612 -0
  43. package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
  44. package/dist/Loader-D3rjKx72.mjs +21 -0
  45. package/dist/Localization-CPkpIwIx.mjs +37 -0
  46. package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
  47. package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
  48. package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
  49. package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
  50. package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
  51. package/dist/Notification-DTNYSd8P.mjs +7 -0
  52. package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
  53. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
  54. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
  55. package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
  56. package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
  57. package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
  58. package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
  59. package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
  60. package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
  61. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
  62. package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
  63. package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
  64. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
  65. package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
  66. package/dist/SpendingLegend-BgjazduU.mjs +193 -0
  67. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  68. package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
  69. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  70. package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
  71. package/dist/Transaction-Cn5_iFm0.mjs +5 -0
  72. package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
  73. package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
  74. package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
  75. package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
  76. package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
  77. package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
  78. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  79. package/dist/accounts/AccountsWidget.d.ts +1 -1
  80. package/dist/accounts/api/AccountApi.d.ts +1 -1
  81. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  82. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  83. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  84. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  85. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  86. package/dist/accounts/index.es.js +459 -368
  87. package/dist/accounts/stores/AccountStore.d.ts +2 -1
  88. package/dist/accounts/stores/UiStore.d.ts +1 -1
  89. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  90. package/dist/accounts/utils/AccountFields.d.ts +1 -1
  91. package/dist/accounts/utils/Accounts.d.ts +2 -2
  92. package/dist/analytics/index.es.js +93 -112
  93. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  94. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  95. package/dist/budgets/api/BudgetsApi.d.ts +5 -1
  96. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  97. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
  98. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  99. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  101. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  102. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  103. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  104. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  105. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  106. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  107. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  108. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  109. package/dist/budgets/index.es.js +851 -865
  110. package/dist/budgets/store/BudgetsStore.d.ts +15 -1
  111. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  112. package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
  113. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  114. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  115. package/dist/cashflow/api/CashflowApi.d.ts +1 -1
  116. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  117. package/dist/cashflow/index.es.js +290 -288
  118. package/dist/cashflow/stores/UiStore.d.ts +1 -1
  119. package/dist/cashflow/util/Filters.d.ts +1 -1
  120. package/dist/categories/components/CategoryRow.d.ts +1 -1
  121. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  122. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  123. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  124. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  125. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  126. package/dist/categories/index.es.js +2 -2
  127. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  128. package/dist/categories/util/CategoryUtil.d.ts +1 -1
  129. package/dist/common/api/AnalyticsApi.d.ts +1 -1
  130. package/dist/common/api/AppDataApi.d.ts +1 -1
  131. package/dist/common/api/BeatApi.d.ts +1 -1
  132. package/dist/common/api/CategoryApi.d.ts +1 -1
  133. package/dist/common/api/GlobalCopyApi.d.ts +1 -1
  134. package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
  135. package/dist/common/api/NotificationApi.d.ts +1 -1
  136. package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
  137. package/dist/common/api/UserApi.d.ts +1 -1
  138. package/dist/common/components/CurrencyDialog.d.ts +1 -1
  139. package/dist/common/components/CurrencyInput.d.ts +1 -1
  140. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  141. package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
  142. package/dist/common/components/Loader.d.ts +1 -2
  143. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  144. package/dist/common/components/WidgetContainer.d.ts +1 -1
  145. package/dist/common/components/charts/LineChart.d.ts +1 -0
  146. package/dist/common/components/charts/index.d.ts +1 -0
  147. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  148. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  149. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  150. package/dist/common/components/index.d.ts +0 -1
  151. package/dist/common/constants/Account.d.ts +1 -1
  152. package/dist/common/constants/Analytics.d.ts +10 -0
  153. package/dist/common/constants/ApiEndpoints.d.ts +1 -0
  154. package/dist/common/constants/DefaultConfig.d.ts +1 -1
  155. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  156. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  157. package/dist/common/constants/index.d.ts +2 -2
  158. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  159. package/dist/common/context/hooks.d.ts +4 -4
  160. package/dist/common/hooks/index.d.ts +1 -0
  161. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  162. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  163. package/dist/common/hooks/usePrevious.d.ts +2 -0
  164. package/dist/common/index.d.ts +0 -1
  165. package/dist/common/index.es.js +625 -860
  166. package/dist/common/stores/AppDataStore.d.ts +3 -3
  167. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  168. package/dist/common/stores/GlobalStore.d.ts +4 -2
  169. package/dist/common/stores/GlobalUiStore.d.ts +3 -3
  170. package/dist/common/stores/UserStore.d.ts +1 -1
  171. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  172. package/dist/common/utils/AccountFilter.d.ts +1 -1
  173. package/dist/common/utils/Analytics.d.ts +1 -1
  174. package/dist/common/utils/Categories.d.ts +1 -1
  175. package/dist/common/utils/Fetch.d.ts +1 -1
  176. package/dist/common/utils/Localization.d.ts +9 -1
  177. package/dist/common/utils/Theme.d.ts +3 -3
  178. package/dist/common/utils/User.d.ts +1 -1
  179. package/dist/common/utils/index.d.ts +1 -1
  180. package/dist/core/constants/index.d.ts +1 -0
  181. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  182. package/dist/core/index.d.ts +2 -0
  183. package/dist/core/index.es.js +41 -0
  184. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  185. package/dist/{common → core}/types/AppData.d.ts +1 -0
  186. package/dist/{common → core}/types/Beat.d.ts +2 -0
  187. package/dist/{common → core}/types/Budget.d.ts +8 -0
  188. package/dist/{common → core}/types/Expense.d.ts +2 -1
  189. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  190. package/dist/{common → core}/types/Notification.d.ts +15 -5
  191. package/dist/{common → core}/types/index.d.ts +1 -2
  192. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
  193. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  194. package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
  195. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  196. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  197. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  198. package/dist/dashboard/index.es.js +46 -45
  199. package/dist/debts/DebtsWidget.d.ts +1 -1
  200. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
  201. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  202. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
  203. package/dist/debts/index.es.js +705 -646
  204. package/dist/debts/store/DebtsStore.d.ts +2 -1
  205. package/dist/debts/utils/DebtStore.d.ts +1 -1
  206. package/dist/debts/utils/DebtsWidget.d.ts +7 -1
  207. package/dist/debts/utils/shared.d.ts +1 -1
  208. package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
  209. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  210. package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
  211. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  212. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  213. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  214. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  215. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  216. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  217. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  218. package/dist/finstrong/index.es.js +161 -159
  219. package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
  220. package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
  221. package/dist/goals/GoalsWidget.d.ts +1 -1
  222. package/dist/goals/api/GoalApi.d.ts +2 -2
  223. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  224. package/dist/goals/components/AddGoal.d.ts +1 -1
  225. package/dist/goals/components/GoalDetails.d.ts +1 -1
  226. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  227. package/dist/goals/components/GoalList.d.ts +1 -1
  228. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  229. package/dist/goals/components/ManageGoals.d.ts +1 -1
  230. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  231. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  232. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  233. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  234. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  235. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  236. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  237. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  238. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  239. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  240. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  241. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  242. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  243. package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
  244. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  245. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  246. package/dist/goals/index.es.js +445 -419
  247. package/dist/goals/stores/GoalStore.d.ts +2 -1
  248. package/dist/goals/util/GoalsUtil.d.ts +1 -1
  249. package/dist/help/HelpWidget.d.ts +1 -1
  250. package/dist/help/api/HelpApi.d.ts +1 -1
  251. package/dist/help/components/HelpContent.d.ts +1 -1
  252. package/dist/help/components/HelpList.d.ts +1 -1
  253. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  254. package/dist/help/components/content/ContentItem.d.ts +1 -1
  255. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  256. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  257. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  258. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  259. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  260. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  261. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  262. package/dist/help/components/content/section/Debts.d.ts +1 -1
  263. package/dist/help/components/content/section/General.d.ts +1 -1
  264. package/dist/help/components/content/section/Goals.d.ts +1 -1
  265. package/dist/help/components/content/section/Insights.d.ts +1 -1
  266. package/dist/help/components/content/section/Investments.d.ts +1 -1
  267. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  268. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  269. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  270. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  271. package/dist/help/components/content/section/Spending.d.ts +1 -1
  272. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  273. package/dist/help/components/content/section/Trends.d.ts +1 -1
  274. package/dist/help/components/content/section/index.d.ts +15 -15
  275. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  276. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  277. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  278. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  279. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  280. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  281. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  282. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  283. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  284. package/dist/help/index.es.js +8 -8
  285. package/dist/help/store/HelpStore.d.ts +5 -4
  286. package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
  287. package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
  288. package/dist/insights/components/feed/Header.d.ts +8 -0
  289. package/dist/insights/components/index.d.ts +4 -0
  290. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
  291. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
  292. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
  293. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
  294. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
  295. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  296. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  297. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  298. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
  299. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
  300. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  301. package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
  302. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  303. package/dist/insights/index.es.js +1361 -1081
  304. package/dist/insights/store/BeatStore.d.ts +1 -1
  305. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  306. package/dist/investments/api/HoldingApi.d.ts +1 -1
  307. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  308. package/dist/investments/index.es.js +258 -258
  309. package/dist/investments/stores/HoldingStore.d.ts +2 -1
  310. package/dist/investments/util/InvestmentUtil.d.ts +1 -1
  311. package/dist/merchants/api/MerchantApi.d.ts +1 -1
  312. package/dist/merchants/index.es.js +16 -16
  313. package/dist/merchants/stores/MerchantStore.d.ts +2 -1
  314. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
  315. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  316. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  317. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  318. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  319. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  320. package/dist/microinsights/beaticons/index.d.ts +3 -0
  321. package/dist/microinsights/cards/InsightCard.d.ts +1 -1
  322. package/dist/microinsights/carousel/BeatList.d.ts +1 -1
  323. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
  324. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
  325. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  326. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  327. package/dist/microinsights/context/hooks.d.ts +1 -1
  328. package/dist/microinsights/index.es.js +1 -1
  329. package/dist/microinsights/interfaces.d.ts +1 -1
  330. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  331. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  332. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  333. package/dist/microinsights/utils/colorType.d.ts +22 -0
  334. package/dist/networth/NetWorthWidget.d.ts +1 -1
  335. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  336. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  337. package/dist/networth/index.es.js +181 -174
  338. package/dist/networth/stores/NetWorthStore.d.ts +2 -1
  339. package/dist/networth/types/NetWorth.d.ts +1 -1
  340. package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
  341. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  342. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  343. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  344. package/dist/notifications/components/NotificationList.d.ts +2 -1
  345. package/dist/notifications/index.es.js +104 -92
  346. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  347. package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
  348. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  349. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  350. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
  351. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  352. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  353. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  354. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  355. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  356. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  357. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  358. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  359. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  360. package/dist/recurringtransactions/index.es.js +477 -451
  361. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
  362. package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
  363. package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
  364. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  365. package/dist/settings/SettingsWidget.d.ts +1 -1
  366. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  367. package/dist/settings/api/SettingsApi.d.ts +1 -2
  368. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  369. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  370. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  371. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  372. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  373. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  374. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  375. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  376. package/dist/settings/index.es.js +314 -323
  377. package/dist/settings/stores/SettingsStore.d.ts +3 -2
  378. package/dist/settings/util/Notifications.d.ts +1 -1
  379. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  380. package/dist/spending/SpendingWidget.d.ts +1 -1
  381. package/dist/spending/index.es.js +167 -166
  382. package/dist/spending/utils/SpendingData.d.ts +1 -1
  383. package/dist/transactions/TransactionWidget.d.ts +1 -1
  384. package/dist/transactions/api/TransactionApi.d.ts +1 -1
  385. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  386. package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
  387. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
  388. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  389. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  390. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  391. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  392. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  393. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  394. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  395. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  396. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  397. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
  398. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  399. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  400. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  401. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  402. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  403. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  404. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  405. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  406. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  407. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  408. package/dist/transactions/constants/Actions.d.ts +4 -3
  409. package/dist/transactions/constants/Transaction.d.ts +1 -1
  410. package/dist/transactions/index.es.js +195 -187
  411. package/dist/transactions/stores/TransactionStore.d.ts +2 -1
  412. package/dist/transactions/stores/UiStore.d.ts +1 -1
  413. package/dist/transactions/utils/Filters.d.ts +1 -1
  414. package/dist/transactions/utils/Transactions.d.ts +1 -1
  415. package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
  416. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
  417. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
  418. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  419. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  420. package/dist/trends/TrendsWidget.d.ts +1 -1
  421. package/dist/trends/components/CategoriesList.d.ts +1 -1
  422. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  423. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  424. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  425. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  426. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  427. package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
  428. package/dist/trends/index.es.js +817 -764
  429. package/dist/trends/stores/TrendsStore.d.ts +2 -1
  430. package/dist/trends/utils/SpendingData.d.ts +1 -1
  431. package/dist/trends/utils/TrendsData.d.ts +1 -1
  432. package/dist/trends/utils/TrendsTable.d.ts +1 -1
  433. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  434. package/dist/trends/utils/shared.d.ts +1 -1
  435. package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  436. package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
  437. package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  438. package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  439. package/package.json +17 -10
  440. package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
  441. package/dist/AccountListItem-k63LpVBs.mjs +0 -90
  442. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  443. package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
  444. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  445. package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
  446. package/dist/Dialog-jmgGw5WA.mjs +0 -58
  447. package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
  448. package/dist/GoalStore-BjHKNAVm.mjs +0 -421
  449. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  450. package/dist/LineChart-CnscUFUG.mjs +0 -580
  451. package/dist/Loader-icSc5MlE.mjs +0 -24
  452. package/dist/Localization-2MODESHW.mjs +0 -30
  453. package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
  454. package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
  455. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  456. package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
  457. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  458. package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
  459. package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
  460. package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
  461. package/dist/TransactionList-BDffKJMO.mjs +0 -204
  462. package/dist/User-DS18cMaz.mjs +0 -237
  463. package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
  464. package/dist/common/components/barchart/Bar.d.ts +0 -25
  465. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  466. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  467. package/dist/common/components/barchart/Legend.d.ts +0 -8
  468. package/dist/common/components/barchart/Util.d.ts +0 -42
  469. package/dist/common/components/barchart/index.d.ts +0 -1
  470. package/dist/common/types/SpendingPlan.d.ts +0 -44
  471. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  472. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  473. /package/dist/{common → core}/types/Account.d.ts +0 -0
  474. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  475. /package/dist/{common → core}/types/Category.d.ts +0 -0
  476. /package/dist/{common → core}/types/Client.d.ts +0 -0
  477. /package/dist/{common → core}/types/Date.d.ts +0 -0
  478. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  479. /package/dist/{common → core}/types/Global.d.ts +0 -0
  480. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  481. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  482. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  483. /package/dist/{common → core}/types/Help.d.ts +0 -0
  484. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  485. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  486. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  487. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  488. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  489. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  490. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  491. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  492. /package/dist/{common → core}/types/User.d.ts +0 -0
  493. /package/dist/{common → core}/types/Widgets.d.ts +0 -0
  494. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  495. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  496. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  497. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  498. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  499. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  500. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  501. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  502. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  503. /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
  504. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  505. /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
  506. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  507. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  508. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  509. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  510. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  511. /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
  512. /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
  513. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
@@ -0,0 +1,1469 @@
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import d from "react";
3
+ import { observer as E } from "mobx-react-lite";
4
+ import F from "@mui/material/Box";
5
+ import de from "@mui/material/Divider";
6
+ import ue from "@mui/material/List";
7
+ import ce from "@mui/material/Paper";
8
+ import v from "@mui/material/Stack";
9
+ import { useTheme as U, alpha as Ce } from "@mui/material/styles";
10
+ import { P as j, Text as x, H2 as Ge, MerchantLogo as Se, Toast as Be, CategoryIcon as Ne, CategoryIconVariants as De, TextField as Ie, Icon as le } from "@mxenabled/mxui";
11
+ import { g as $e, C as Ke, a as Fe, b as He, i as Ue } from "./BudgetUtil-CLhRnCoX.mjs";
12
+ import oe from "@mui/material/Button";
13
+ import Ve from "@mui/material/FormGroup";
14
+ import ae from "@mui/material/IconButton";
15
+ import Oe from "@mui/material/TextField";
16
+ import { u as pe } from "./useAriaLive-MkYebyUR.mjs";
17
+ import { O as y } from "./OnClickEvents-CseHDZ94.mjs";
18
+ import { u as S, h as O, m as Ye, d as ze, l as Le, g as w, b as We, o as je } from "./hooks-BxkfR-Ff.mjs";
19
+ import { A as H } from "./Analytics-BYItVAe-.mjs";
20
+ import qe from "@mui/material/ToggleButton";
21
+ import { ChevronRight as we, Icon as D, Delete as _e, Cancel as me, Search as Xe, Edit as Je, Flag as Qe } from "@mxenabled/mx-icons";
22
+ import { fromUnixTime as fe } from "date-fns/fromUnixTime";
23
+ import V from "@mui/material/Avatar";
24
+ import B from "@mui/material/ListItem";
25
+ import Y from "@mui/material/ListItemAvatar";
26
+ import $ from "@mui/material/ListItemText";
27
+ import { f as Re, D as Me } from "./DateFormats-BMpMrZpW.mjs";
28
+ import z from "@mui/material/ListItemButton";
29
+ import W from "@mui/material/ListItemIcon";
30
+ import { a as ke } from "./CategorySelectorDrawer-Dc9Widy9.mjs";
31
+ import { b as Ze, T as et, u as J } from "./StatusIndicator-4tWnjeKS.mjs";
32
+ import { D as X } from "./Dialog-Ck34yr-d.mjs";
33
+ import { b as I } from "./Localization-CPkpIwIx.mjs";
34
+ import { getUnixTime as tt } from "date-fns/getUnixTime";
35
+ import { D as ie } from "./Drawer-Bbe4AMB1.mjs";
36
+ import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
37
+ import rt from "@mui/material/styles/useTheme";
38
+ import Ee from "@mui/material/InputAdornment";
39
+ import nt from "@mui/material/Checkbox";
40
+ import { startOfMonth as at } from "date-fns/startOfMonth";
41
+ import { endOfMonth as ot } from "date-fns/endOfMonth";
42
+ import { i as it } from "./DateUtil-wcYTmDRD.mjs";
43
+ import xe from "@mui/material/Grid";
44
+ import { C as st } from "./CurrencyInput-DuMktPu3.mjs";
45
+ import ct from "@mui/material/Switch";
46
+ import { L as lt } from "./Loader-D3rjKx72.mjs";
47
+ var ne = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(ne || {}), Z = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(Z || {});
48
+ const dt = [
49
+ 0,
50
+ 1,
51
+ 2,
52
+ 3
53
+ /* Tags */
54
+ ], ut = [
55
+ 1,
56
+ 2,
57
+ 3
58
+ /* MerchantLogo */
59
+ ], _t = ({
60
+ startDate: t,
61
+ onViewHistory: a,
62
+ totalTransaction: i,
63
+ amount: r,
64
+ spentPercentage: o,
65
+ remainingAmount: n,
66
+ iconColor: s,
67
+ icon: l
68
+ }) => {
69
+ const { budgets: _ } = S();
70
+ return /* @__PURE__ */ e(d.Fragment, { children: /* @__PURE__ */ c(
71
+ F,
72
+ {
73
+ sx: {
74
+ bgcolor: "background.paper",
75
+ borderBottomColor: "divider",
76
+ borderBottomStyle: "solid",
77
+ borderBottomWidth: 1
78
+ },
79
+ children: [
80
+ /* @__PURE__ */ c(
81
+ v,
82
+ {
83
+ sx: {
84
+ alignItems: "center",
85
+ flexDirection: "row",
86
+ gap: 12,
87
+ justifyContent: "space-between",
88
+ pt: 16,
89
+ px: 24
90
+ },
91
+ children: [
92
+ /* @__PURE__ */ e(j, { bold: !0, variant: "subtitle1", children: it(t) }),
93
+ a && /* @__PURE__ */ e(oe, { endIcon: /* @__PURE__ */ e(we, {}), onClick: a, sx: { height: 28 }, children: /* @__PURE__ */ e(x, { bold: !0, variant: "body2", children: _.spending_history }) })
94
+ ]
95
+ }
96
+ ),
97
+ /* @__PURE__ */ e(
98
+ Ze,
99
+ {
100
+ amount: /* @__PURE__ */ c(v, { sx: { alignItems: "baseline", flexDirection: "row", gap: 4 }, children: [
101
+ /* @__PURE__ */ e(Ge, { children: q(i, "0,0.00") }),
102
+ /* @__PURE__ */ e(j, { color: "text.secondary", variant: "body2", children: "/" }),
103
+ /* @__PURE__ */ e(j, { color: "text.secondary", variant: "body2", children: q(r, "0,0.00") })
104
+ ] }),
105
+ completeColor: `${s}.main`,
106
+ icon: l,
107
+ label: _.spent_label,
108
+ leftLabel: I(_.percent_spent, o.toFixed()),
109
+ percentComplete: o,
110
+ rightLabel: I(
111
+ _.balance_left,
112
+ q(n, "0,0.00")
113
+ ),
114
+ sx: {
115
+ pb: 24,
116
+ pt: 16,
117
+ px: 24
118
+ }
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ ) });
124
+ }, mt = ({
125
+ merchantBudget: t,
126
+ transaction: a,
127
+ onClose: i,
128
+ isOpen: r,
129
+ setCurrencyDialogAction: o,
130
+ renderingToast: n
131
+ }) => {
132
+ const { budgets: s, common: l } = S(), { sortedTransactions: _ } = O(), u = d.useMemo(() => _.reduce((m, f) => f.parent_guid ? m : m + f.amount, 0), [_]), { remainingAmount: g, spentPercentage: p, iconColor: h } = $e(
133
+ u,
134
+ t.amount ?? 0
135
+ );
136
+ return /* @__PURE__ */ c(
137
+ ie,
138
+ {
139
+ ariaLabelClose: l.close_aria,
140
+ footerStyles: {
141
+ px: 24,
142
+ py: 16
143
+ },
144
+ isOpen: r,
145
+ onClose: i,
146
+ onPrimaryAction: () => o(Ae.EDIT),
147
+ onSecondaryAction: () => {
148
+ o(Ae.DELETE);
149
+ },
150
+ primaryText: s.details_edit_button,
151
+ secondaryColor: "error",
152
+ secondaryText: s.details_delete_button,
153
+ sx: {
154
+ "& .list-wrapper": {
155
+ pr: 24
156
+ }
157
+ },
158
+ title: I(s.details_type_title, t.merchant_name),
159
+ children: [
160
+ /* @__PURE__ */ e(
161
+ _t,
162
+ {
163
+ amount: t.amount,
164
+ icon: /* @__PURE__ */ e(
165
+ Se,
166
+ {
167
+ categoryGuid: a.top_level_category_guid || "",
168
+ merchantGuid: a.merchant_guid || ""
169
+ }
170
+ ),
171
+ iconColor: h,
172
+ remainingAmount: g,
173
+ spentPercentage: p,
174
+ startDate: a.date,
175
+ totalTransaction: u
176
+ }
177
+ ),
178
+ /* @__PURE__ */ e(et, {}),
179
+ n?.()
180
+ ]
181
+ }
182
+ );
183
+ }, pt = E(mt);
184
+ var Ae = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.EDIT = "edit", t.DELETE = "delete", t))(Ae || {});
185
+ const gt = E(({ transaction: t }) => {
186
+ const [a, i] = d.useState(null), [r, o] = d.useState(""), [n, s] = d.useState(!1), l = d.useRef(!1), [_, u] = d.useState(null), g = U(), {
187
+ addMerchantBudget: p,
188
+ updateMerchantBudget: h,
189
+ deleteMerchantBudget: m,
190
+ getMerchantBudgetByMerchantGuid: f,
191
+ alert: L,
192
+ setAlert: k
193
+ } = Ye(), { setFilter: A } = O(), { accounts: T } = ze(), R = g.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: b, common: Q } = S(), { announce: ge, ariaLive: he } = pe(), [ee, te] = d.useState(!1), K = t?.merchant_guid ? f(t.merchant_guid) : void 0, re = () => {
194
+ u(a), i(null), o("");
195
+ }, ye = () => {
196
+ K ? te(!0) : i(
197
+ "create"
198
+ /* CREATE */
199
+ );
200
+ }, C = {
201
+ create: {
202
+ content: I(
203
+ b.create_budget_content,
204
+ /* @__PURE__ */ e("strong", { children: t.description }),
205
+ `${q(t.amount, "0,0.00")}`
206
+ ),
207
+ title: b.dialog_create_budget_title,
208
+ primaryButtonText: b.dialog_primary_button_text,
209
+ errorAlertMessage: I(
210
+ b.alert_merchant_budget_not_created,
211
+ t.description
212
+ ),
213
+ errorRetryAction: () => i(
214
+ "create"
215
+ /* CREATE */
216
+ ),
217
+ successAlertMessage: I(
218
+ b.alert_budget_created,
219
+ t.description
220
+ ),
221
+ apiTrigger: async () => await p(t.merchant_guid, Number(r))
222
+ },
223
+ edit: {
224
+ content: I(
225
+ b.edit_budget_content,
226
+ /* @__PURE__ */ e("strong", { children: t.description })
227
+ ),
228
+ title: b.details_edit_title,
229
+ primaryButtonText: b.add_save_button,
230
+ errorAlertMessage: I(
231
+ b.error_alert_edit_merchant_budget,
232
+ t.description
233
+ ),
234
+ errorRetryAction: () => i(
235
+ "edit"
236
+ /* EDIT */
237
+ ),
238
+ successAlertMessage: I(
239
+ b.success_alert_edit_merchant_budget,
240
+ t.description
241
+ ),
242
+ apiTrigger: async () => await h({
243
+ ...K,
244
+ amount: Number(r)
245
+ })
246
+ },
247
+ delete: {
248
+ content: I(
249
+ b.delete_description,
250
+ /* @__PURE__ */ e("strong", { children: t.description })
251
+ ),
252
+ title: b.delete_title,
253
+ primaryButtonText: b.details_delete_button,
254
+ errorAlertMessage: I(
255
+ b.error_alert_delete_merchant_budget,
256
+ t.description
257
+ ),
258
+ errorRetryAction: () => i(
259
+ "delete"
260
+ /* DELETE */
261
+ ),
262
+ successAlertMessage: I(
263
+ b.success_alert_delete_merchant_budget,
264
+ t.description
265
+ ),
266
+ apiTrigger: async () => await m(K.guid)
267
+ }
268
+ }, P = async () => {
269
+ if (l.current) return;
270
+ l.current = !0;
271
+ const { apiTrigger: M, successAlertMessage: G, errorAlertMessage: Te } = C[a], { isSuccess: be } = await M(), ve = be ? G : Te;
272
+ re(), s(!be), k(ve), ge(ve), be && a === "delete" && te(!1), l.current = !1;
273
+ };
274
+ d.useEffect(() => {
275
+ const M = {
276
+ start: at(new Date(t.date * 1e3)),
277
+ end: ot(new Date(t.date * 1e3))
278
+ };
279
+ ee && A({
280
+ accounts: T.map((G) => G.guid),
281
+ custom: ee ? (G) => G.merchant_guid === t.merchant_guid : (G) => G.guid === t.guid,
282
+ dateRange: M
283
+ });
284
+ }, [ee, t, T]);
285
+ const N = () => /* @__PURE__ */ e(
286
+ Be,
287
+ {
288
+ actionText: b.autogenerate_budgets_error_primary_button,
289
+ autoHideDuration: 3500,
290
+ closeAriaLabel: Q.close_aria,
291
+ handleClose: () => k(""),
292
+ message: L,
293
+ onActionClick: C[_]?.errorRetryAction,
294
+ open: !!L,
295
+ severity: n ? "error" : "success",
296
+ showAction: n,
297
+ showClose: !0
298
+ }
299
+ );
300
+ return /* @__PURE__ */ c(d.Fragment, { children: [
301
+ he,
302
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(z, { onClick: ye, children: [
303
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: R }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
304
+ /* @__PURE__ */ e(
305
+ $,
306
+ {
307
+ primary: b.add_merchant_budget_primary_text,
308
+ primaryTypographyProps: { variant: "caption" },
309
+ secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: K ? `${q(K.amount, "0,0.00")} / ${Q.month_text}` : b.add_merchant_budget_secondary_text })
310
+ }
311
+ ),
312
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
313
+ ] }) }),
314
+ !!K && /* @__PURE__ */ e(
315
+ pt,
316
+ {
317
+ isOpen: ee,
318
+ merchantBudget: K,
319
+ onClose: () => te(!1),
320
+ renderingToast: () => L && N(),
321
+ setCurrencyDialogAction: (M) => {
322
+ M === "edit" && o(K?.amount.toString() || ""), i(M);
323
+ },
324
+ transaction: t
325
+ }
326
+ ),
327
+ a && /* @__PURE__ */ e(
328
+ Ke,
329
+ {
330
+ closeAriaLabel: Q.close_aria,
331
+ content: C[a].content,
332
+ handleInputChange: o,
333
+ handleModalClose: re,
334
+ handlePrimaryAction: P,
335
+ handleSecondaryAction: re,
336
+ inputLabel: a !== "delete" ? Q.amount_text : "",
337
+ inputValue: r,
338
+ isOpen: !!a,
339
+ primaryText: C[a].primaryButtonText,
340
+ secondaryText: Q.cancel_button,
341
+ title: C[a].title
342
+ }
343
+ ),
344
+ !!L && N()
345
+ ] });
346
+ }), ht = ({ transaction: t }) => {
347
+ const { addOrUpdateTransactionRule: a, updateTransaction: i } = O(), { categories: r } = Le(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: n, updateManualTransaction: s } = J(), { transactions: l } = S(), _ = U(), [u, g] = d.useState(!1), [p, h] = d.useState(""), m = async (T) => {
348
+ await i({ ...t, category_guid: p }), T && await a(p, t), h(""), o(H.TRANSACTION_DETAILS_CLICK_CATEGORY, {
349
+ transaction_guid: t.guid
350
+ });
351
+ }, f = (T) => {
352
+ if (t.is_manual && !t.guid) {
353
+ const R = r.find((b) => b.guid === T);
354
+ s({
355
+ ...t,
356
+ category: R?.name,
357
+ category_guid: T,
358
+ top_level_category_guid: R?.parent_guid || T
359
+ });
360
+ } else
361
+ h(T);
362
+ L();
363
+ }, L = () => {
364
+ g(!1), n(!1);
365
+ }, k = d.useMemo(
366
+ () => r.find((T) => T.guid === p),
367
+ [p]
368
+ ), A = _.palette.mode === "dark" ? "grey.800" : "grey.100";
369
+ return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
370
+ /* @__PURE__ */ c(
371
+ z,
372
+ {
373
+ onClick: () => {
374
+ o(y.ON_TRANSACTION_CATEGORY_CLICK), g(!0);
375
+ },
376
+ children: [
377
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: A }, variant: "rounded", children: /* @__PURE__ */ e(
378
+ Ne,
379
+ {
380
+ categoryGuid: t.top_level_category_guid,
381
+ size: 24,
382
+ sx: { color: "text.primary" },
383
+ variant: De.Transparent
384
+ }
385
+ ) }) }),
386
+ /* @__PURE__ */ e(
387
+ $,
388
+ {
389
+ primary: l.category_title,
390
+ primaryTypographyProps: { variant: "caption" },
391
+ secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.category ?? l.actions_select_a_category })
392
+ }
393
+ ),
394
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
395
+ ]
396
+ }
397
+ ),
398
+ /* @__PURE__ */ e(
399
+ ke,
400
+ {
401
+ initialSelected: t.category_guid,
402
+ onClose: L,
403
+ onSelect: f,
404
+ showDrawer: u,
405
+ title: l.actions_select_a_category
406
+ }
407
+ ),
408
+ /* @__PURE__ */ e(
409
+ X,
410
+ {
411
+ copy: {
412
+ title: I(
413
+ l.actions_apply_to_all_transaction_types,
414
+ t.description
415
+ )
416
+ },
417
+ isOpen: !!p,
418
+ onClose: () => h(""),
419
+ onPrimaryAction: () => m(!0),
420
+ onSecondaryAction: () => m(!1),
421
+ primaryText: l.actions_apply_to_all,
422
+ secondaryText: l.actions_this_time_only,
423
+ children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: I(
424
+ l.actions_all_past_and_future,
425
+ t.description,
426
+ k?.name
427
+ ) })
428
+ }
429
+ )
430
+ ] });
431
+ }, yt = ({ transaction: t }) => {
432
+ const { onEvent: a } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: n } = S(), s = U(), [l, _] = d.useState(!1), [u, g] = d.useState(t.date), p = (f) => {
433
+ g(tt(f));
434
+ }, h = async () => {
435
+ if (t.is_manual && !t.guid) {
436
+ r({ ...t, date: u }), _(!1);
437
+ return;
438
+ }
439
+ await i({ ...t, date: u }), a(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), _(!1);
440
+ }, m = s.palette.mode === "dark" ? "grey.800" : "grey.100";
441
+ return /* @__PURE__ */ c(B, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
442
+ /* @__PURE__ */ c(
443
+ z,
444
+ {
445
+ onClick: () => {
446
+ a(y.ON_TRANSACTION_DATE_CLICK), _(!0);
447
+ },
448
+ children: [
449
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: m }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
450
+ /* @__PURE__ */ e(
451
+ $,
452
+ {
453
+ primary: n.date_title,
454
+ primaryTypographyProps: { variant: "caption" },
455
+ secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: Re(fe(t.date), Me.YEAR_MONTH_DAY) })
456
+ }
457
+ ),
458
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
459
+ ]
460
+ }
461
+ ),
462
+ /* @__PURE__ */ e(
463
+ ie,
464
+ {
465
+ ariaLabelClose: o.close_aria,
466
+ isOpen: l,
467
+ onClose: () => _(!1),
468
+ onPrimaryAction: h,
469
+ primaryText: o.save_button,
470
+ secondaryText: o.cancel_button,
471
+ title: n.date_edit_title,
472
+ children: /* @__PURE__ */ e(v, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
473
+ Fe,
474
+ {
475
+ beginDate: fe(u),
476
+ copy: {
477
+ nextAria: n.date_next_aria,
478
+ prevAria: n.date_prev_aria,
479
+ today: o.date_range_picker.today
480
+ },
481
+ onDateSelected: p,
482
+ selectionType: He.Single
483
+ }
484
+ ) })
485
+ }
486
+ )
487
+ ] });
488
+ }, Tt = ({ transaction: t }) => {
489
+ const { onEvent: a } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: n } = S(), [s, l] = d.useState(!1), _ = async () => {
490
+ await i(t.guid), a(y.ON_TRANSACTION_DELETE_DELETED);
491
+ };
492
+ return /* @__PURE__ */ c(F, { className: "mx-txn-delete", children: [
493
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
494
+ z,
495
+ {
496
+ onClick: () => {
497
+ a(y.ON_TRANSACTION_DELETE_CLICK), r(!0), l(!0);
498
+ },
499
+ children: [
500
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { variant: "rounded", children: /* @__PURE__ */ e(_e, { color: "secondary", fontSize: "small" }) }) }),
501
+ /* @__PURE__ */ e(
502
+ $,
503
+ {
504
+ primary: n.manual_transaction_delete_title,
505
+ secondary: n.manual_transaction_delete_subtitle
506
+ }
507
+ ),
508
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(_e, {}) })
509
+ ]
510
+ }
511
+ ) }),
512
+ /* @__PURE__ */ e(
513
+ X,
514
+ {
515
+ copy: { title: n.manual_transaction_delete_title },
516
+ isOpen: s,
517
+ onClose: () => {
518
+ r(!1), l(!1);
519
+ },
520
+ onPrimaryAction: _,
521
+ onSecondaryAction: () => a(y.ON_TRANSACTION_DELETE_CANCEL),
522
+ primaryText: o.delete_button,
523
+ secondaryText: o.cancel_button,
524
+ children: /* @__PURE__ */ e(x, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: n.manual_transaction_delete_description })
525
+ }
526
+ )
527
+ ] });
528
+ }, bt = E(Tt), Ct = ({ transaction: t }) => {
529
+ const { onEvent: a } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: n } = S(), s = U(), [l, _] = d.useState(!1), u = async () => {
530
+ await i({ ...t, merchant_guid: "" }), a(H.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
531
+ transaction_guid: t.guid
532
+ });
533
+ }, g = s.palette.mode === "dark" ? "grey.800" : "grey.100";
534
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
535
+ /* @__PURE__ */ c(
536
+ z,
537
+ {
538
+ onClick: () => {
539
+ a(y.ON_TRANSACTION_DELETE_LOGO_CLICK), _(!0);
540
+ },
541
+ children: [
542
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "delete", sx: { color: "text.primary" } }) }) }),
543
+ /* @__PURE__ */ e($, { primary: n.merchant_logo_title, secondary: n.merchant_logo_desc }),
544
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
545
+ ]
546
+ }
547
+ ),
548
+ /* @__PURE__ */ c(
549
+ X,
550
+ {
551
+ copy: { title: n.merchant_logo_modal_title },
552
+ isOpen: l,
553
+ onClose: () => {
554
+ r(!1), _(!1);
555
+ },
556
+ onPrimaryAction: u,
557
+ onSecondaryAction: () => a(y.ON_TRANSACTION_DELETE_LOGO_CANCEL),
558
+ primaryText: o.delete_button,
559
+ secondaryText: o.cancel_button,
560
+ title: n.merchant_logo_modal_title,
561
+ children: [
562
+ /* @__PURE__ */ e(x, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: n.merchant_logo_modal_desc }),
563
+ /* @__PURE__ */ e(x, { bold: !0, sx: { whiteSpace: "normal" }, variant: "subtitle1", children: ` ${n.merchant_logo_modal_desc_bold}` })
564
+ ]
565
+ }
566
+ )
567
+ ] }) });
568
+ }, xt = E(Ct), ft = ({ transaction: t }) => {
569
+ const { onEvent: a } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: n } = S(), s = U(), [l, _] = d.useState(!1), u = t.is_hidden, g = async () => {
570
+ await i({ ...t, is_hidden: !t.is_hidden }), a(
571
+ u ? y.ON_TRANSACTION_UNHIDDEN : y.ON_TRANSACTION_HIDDEN
572
+ );
573
+ }, p = s.palette.mode === "dark" ? "grey.800" : "grey.100";
574
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
575
+ /* @__PURE__ */ c(
576
+ z,
577
+ {
578
+ "aria-checked": u,
579
+ "aria-labelledby": "hide-transaction-text",
580
+ onClick: () => {
581
+ a(
582
+ u ? y.ON_TRANSACTION_UNHIDE_CLICK : y.ON_TRANSACTION_HIDE_CLICK
583
+ ), a(
584
+ u ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
585
+ {
586
+ transaction_guid: t.guid
587
+ }
588
+ ), _(!0);
589
+ },
590
+ role: "switch",
591
+ children: [
592
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: p }, variant: "rounded", children: u ? /* @__PURE__ */ e(D, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(D, { name: "visibility", sx: { color: "text.primary" } }) }) }),
593
+ /* @__PURE__ */ e(
594
+ $,
595
+ {
596
+ id: "hide-transaction-text",
597
+ primary: u ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
598
+ secondary: u ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding
599
+ }
600
+ ),
601
+ /* @__PURE__ */ e(W, { "aria-hidden": "true", children: /* @__PURE__ */ e(
602
+ ct,
603
+ {
604
+ checked: u,
605
+ inputProps: { tabIndex: -1 },
606
+ sx: { pointerEvents: "none" },
607
+ tabIndex: -1
608
+ }
609
+ ) })
610
+ ]
611
+ }
612
+ ),
613
+ /* @__PURE__ */ e(
614
+ X,
615
+ {
616
+ copy: {
617
+ title: u ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
618
+ },
619
+ isOpen: l,
620
+ onClose: () => {
621
+ r(!1), _(!1);
622
+ },
623
+ onPrimaryAction: g,
624
+ onSecondaryAction: () => a(
625
+ u ? y.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : y.ON_TRANSACTION_HIDE_CANCEL_CLICK
626
+ ),
627
+ primaryText: u ? o.unhide_button : o.hide_button,
628
+ secondaryText: o.cancel_button,
629
+ children: /* @__PURE__ */ e(x, { truncate: !1, variant: "subtitle1", children: u ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
630
+ }
631
+ )
632
+ ] }) });
633
+ }, At = E(ft), Pe = ({ transaction: t }) => {
634
+ const { amount: a, description: i, isIncome: r, merchant_guid: o, payee: n, top_level_category_guid: s } = t;
635
+ return /* @__PURE__ */ c(v, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
636
+ /* @__PURE__ */ e(
637
+ Se,
638
+ {
639
+ categoryGuid: s || "",
640
+ merchantGuid: o || "",
641
+ size: 64
642
+ }
643
+ ),
644
+ /* @__PURE__ */ c(v, { overflow: "hidden'", children: [
645
+ /* @__PURE__ */ e(x, { bold: !0, mb: 4, truncate: !0, variant: "body1", children: i || n }),
646
+ /* @__PURE__ */ c(j, { color: r ? "success.main" : "text.primary", truncate: !0, variant: "h1", children: [
647
+ r ? "+" : "",
648
+ q(a, "0,0.00")
649
+ ] })
650
+ ] })
651
+ ] });
652
+ }, St = ({ transaction: t }) => {
653
+ const { onEvent: a } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: n } = S(), s = U(), [l, _] = d.useState(!1), [u, g] = d.useState("");
654
+ d.useEffect(() => {
655
+ l && g(t.memo ? t.memo : "");
656
+ }, [l]);
657
+ const p = async () => {
658
+ if (t.is_manual && !t.guid) {
659
+ r({ ...t, memo: u }), _(!1);
660
+ return;
661
+ }
662
+ await i({ ...t, memo: u }), a(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), _(!1);
663
+ }, h = s.palette.mode === "dark" ? "grey.800" : "grey.100";
664
+ return /* @__PURE__ */ c(B, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
665
+ /* @__PURE__ */ c(
666
+ z,
667
+ {
668
+ onClick: () => {
669
+ a(y.ON_TRANSACTION_MEMO_CLICK), _(!0);
670
+ },
671
+ children: [
672
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "article", sx: { color: "text.primary" } }) }) }),
673
+ /* @__PURE__ */ e(
674
+ $,
675
+ {
676
+ primary: n.memo_title,
677
+ primaryTypographyProps: { variant: "caption" },
678
+ secondary: /* @__PURE__ */ e(
679
+ x,
680
+ {
681
+ bold: !0,
682
+ sx: { overflowWrap: "break-word", whiteSpace: "wrap", color: "text.primary" },
683
+ variant: "body1",
684
+ children: t.memo ? t.memo : n.memo_desc
685
+ }
686
+ )
687
+ }
688
+ ),
689
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
690
+ ]
691
+ }
692
+ ),
693
+ /* @__PURE__ */ c(
694
+ ie,
695
+ {
696
+ ariaLabelClose: o.close_aria,
697
+ isOpen: l,
698
+ onClose: () => _(!1),
699
+ onPrimaryAction: p,
700
+ title: n.memo_title,
701
+ children: [
702
+ /* @__PURE__ */ e(Pe, { transaction: t }),
703
+ /* @__PURE__ */ e(
704
+ Oe,
705
+ {
706
+ "aria-label": n.memo_desc_aria,
707
+ focused: !0,
708
+ multiline: !0,
709
+ name: "memo",
710
+ onChange: (m) => g(m.target.value),
711
+ placeholder: n.memo_desc,
712
+ rows: 4,
713
+ sx: { mx: 16, width: "calc(100% - 32px)" },
714
+ value: u
715
+ }
716
+ )
717
+ ]
718
+ }
719
+ )
720
+ ] });
721
+ }, Nt = E(St), It = ({
722
+ index: t,
723
+ onDeleteRow: a,
724
+ onCategoryChanged: i,
725
+ onUpdateAmount: r,
726
+ split: o
727
+ }) => {
728
+ const { onEvent: n } = w(), { transactions: s } = S(), [l, _] = d.useState(`${o.amount}`), [u, g] = d.useState(!1), p = t === 0, h = (m) => {
729
+ isNaN(Number(m)) || (_(m), r(t, Number(m)));
730
+ };
731
+ return /* @__PURE__ */ c(F, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
732
+ /* @__PURE__ */ c(xe, { alignItems: p ? "center" : "start", container: !0, children: [
733
+ /* @__PURE__ */ e(xe, { item: !0, xs: 7, children: /* @__PURE__ */ c(v, { alignItems: "start", children: [
734
+ /* @__PURE__ */ e(
735
+ oe,
736
+ {
737
+ endIcon: /* @__PURE__ */ e(we, {}),
738
+ onClick: () => g(!0),
739
+ startIcon: /* @__PURE__ */ e(Ne, { categoryGuid: o.top_level_category_guid }),
740
+ sx: { px: 12, py: 8 },
741
+ children: o.category
742
+ }
743
+ ),
744
+ /* @__PURE__ */ e(F, { children: !o.category_guid && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
745
+ /* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
746
+ /* @__PURE__ */ e(x, { variant: "body2", children: s.split_transaction_errors_select_category })
747
+ ] }) })
748
+ ] }) }),
749
+ /* @__PURE__ */ e(xe, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(x, { children: q(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(v, { alignItems: "start", children: [
750
+ /* @__PURE__ */ c(v, { alignItems: "start", direction: "row", gap: 8, children: [
751
+ /* @__PURE__ */ e(
752
+ st,
753
+ {
754
+ amount: l,
755
+ ariaLabel: s.split_transaction_edit_split_amount,
756
+ label: s.split_transaction_edit_split_amount,
757
+ minAmount: 0.01,
758
+ name: "split-amount-input",
759
+ setAmount: h,
760
+ sx: {
761
+ ".MuiOutlinedInput-input": { p: 12 }
762
+ },
763
+ type: "number"
764
+ }
765
+ ),
766
+ /* @__PURE__ */ e(
767
+ ae,
768
+ {
769
+ "aria-label": s.split_transaction_delete_split_btn,
770
+ color: "secondary",
771
+ onClick: () => {
772
+ n(y.ON_TRANSACTION_SPLIT_DELETE_CLICK), a(t);
773
+ },
774
+ sx: { w: 44, h: 44 },
775
+ children: /* @__PURE__ */ e(_e, {})
776
+ }
777
+ )
778
+ ] }),
779
+ !l && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
780
+ /* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
781
+ /* @__PURE__ */ e(x, { variant: "body2", children: s.split_transaction_errors_enter_an_amount })
782
+ ] })
783
+ ] }) })
784
+ ] }),
785
+ /* @__PURE__ */ e(
786
+ ke,
787
+ {
788
+ initialSelected: o.category_guid,
789
+ onClose: () => g(!1),
790
+ onSelect: (m) => {
791
+ i(t, m), g(!1);
792
+ },
793
+ showDrawer: u,
794
+ title: s.actions_select_a_category
795
+ }
796
+ )
797
+ ] });
798
+ }, vt = E(It), Et = ({
799
+ onAddSplit: t,
800
+ onCategoryChanged: a,
801
+ onDeleteSplit: i,
802
+ onUpdateAmount: r,
803
+ splits: o,
804
+ transaction: n
805
+ }) => {
806
+ const { transactions: s } = S(), { onEvent: l } = w(), [_, u] = d.useState(""), { announce: g, ariaLive: p } = pe();
807
+ return d.useEffect(() => {
808
+ if (o.length <= 1)
809
+ u(s.split_transaction_errors_min_splits), g(s.split_transaction_errors_min_splits);
810
+ else if (o[0].amount < 0) {
811
+ const h = I(
812
+ s.split_transaction_errors_totals_must_equal_amount,
813
+ q(n.amount, "0,0.00")
814
+ );
815
+ u(h), g(h);
816
+ } else
817
+ u(""), g("");
818
+ }, [o]), /* @__PURE__ */ c(F, { className: "mx-txn-split-manager", children: [
819
+ p,
820
+ o.map((h, m) => /* @__PURE__ */ e(
821
+ vt,
822
+ {
823
+ index: m,
824
+ onCategoryChanged: a,
825
+ onDeleteRow: i,
826
+ onUpdateAmount: r,
827
+ split: h
828
+ },
829
+ m
830
+ )),
831
+ _ && /* @__PURE__ */ c(v, { bgcolor: "background.paper", color: "error.main", direction: "row", gap: 8, p: 16, children: [
832
+ /* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
833
+ /* @__PURE__ */ e(x, { variant: "body2", children: _ })
834
+ ] }),
835
+ /* @__PURE__ */ e(F, { p: 16, children: /* @__PURE__ */ e(
836
+ oe,
837
+ {
838
+ "aria-label": s.split_transaction_add_split_btn,
839
+ onClick: () => {
840
+ l(y.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
841
+ },
842
+ children: s.split_transaction_add_split_btn
843
+ }
844
+ ) })
845
+ ] });
846
+ }, Dt = E(Et), Ot = ({ transaction: t }) => {
847
+ const { onEvent: a } = w(), { announce: i, ariaLive: r } = pe(), { splitTransaction: o, unSplitTransaction: n } = O(), { common: s, transactions: l } = S(), { setShouldDisableDrawerScroll: _ } = J(), { categories: u } = Le(), g = U(), p = {
848
+ ...t,
849
+ amount: t.amount - 1,
850
+ guid: "",
851
+ has_been_split: !1,
852
+ parent_guid: t.guid
853
+ }, h = {
854
+ ...t,
855
+ amount: 1,
856
+ category_guid: void 0,
857
+ category: l.split_transaction_select_category_btn,
858
+ guid: "",
859
+ has_been_split: !1,
860
+ parent_guid: t.guid,
861
+ top_level_category_guid: void 0
862
+ }, [m, f] = d.useState(!1), [L, k] = d.useState(!1), [A, T] = d.useState([]), R = () => {
863
+ const C = [...A];
864
+ C.push({ ...h }), C[0].amount -= 1, T(C), i(
865
+ I(
866
+ l.split_transaction_add_split_announcement,
867
+ C.length
868
+ )
869
+ );
870
+ }, b = (C) => {
871
+ if (C > 0) {
872
+ const P = A[C], N = [...A];
873
+ N.splice(C, 1), N[0].amount += P.amount, T(N), i(
874
+ I(l.split_transaction_delete_split_announcement, C + 1)
875
+ );
876
+ }
877
+ }, Q = (C, P) => {
878
+ const N = [...A];
879
+ N[C].amount = P, N[0].amount = t.amount - N.reduce(
880
+ (M, G, Te) => M + (Te !== 0 ? G.amount : 0),
881
+ 0
882
+ ), T(N);
883
+ }, ge = (C, P) => {
884
+ const N = [...A], M = u.find((G) => G.guid === P);
885
+ M && (N[C] = {
886
+ ...N[C],
887
+ category_guid: P,
888
+ category: M.name,
889
+ top_level_category_guid: M.parent_guid || P
890
+ }, T(N), i(
891
+ I(
892
+ l.split_transaction_select_category_announcement,
893
+ M.name,
894
+ C + 1
895
+ )
896
+ ));
897
+ }, he = () => {
898
+ if (t.parent_guid || t.has_been_split) {
899
+ k(!0);
900
+ return;
901
+ }
902
+ T([{ ...p }, { ...h }]), a(H.TRANSACTION_DETAILS_CLICK_SPLIT, {
903
+ transaction_guid: t.guid
904
+ }), f(!0);
905
+ }, ee = async () => {
906
+ a(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 }, A), f(!1);
907
+ }, te = async () => {
908
+ a(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ...p }, { ...h }]), f(!1);
909
+ }, K = async () => {
910
+ a(H.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
911
+ transaction_guid: t.guid
912
+ });
913
+ const C = t.parent_guid ?? t.guid;
914
+ await n(C);
915
+ }, re = d.useMemo(() => {
916
+ const C = A.some((N) => !N.category_guid), P = A.some((N) => N.amount <= 0);
917
+ return C || P;
918
+ }, [A]), ye = g.palette.mode === "dark" ? "grey.800" : "grey.100";
919
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
920
+ /* @__PURE__ */ c(z, { onClick: he, children: [
921
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: ye }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "call_split", sx: { color: "text.primary" } }) }) }),
922
+ /* @__PURE__ */ e(
923
+ $,
924
+ {
925
+ primary: t.has_been_split || t.parent_guid ? l.split_transaction_unsplit_title : l.split_transaction_title,
926
+ secondary: t.has_been_split || t.parent_guid ? l.split_transaction_unsplit_subtitle : l.split_transaction_desc
927
+ }
928
+ ),
929
+ /* @__PURE__ */ e(W, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(D, { name: "delete" }) : /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
930
+ ] }),
931
+ /* @__PURE__ */ c(
932
+ ie,
933
+ {
934
+ ariaLabelClose: s.close_aria,
935
+ isOpen: m,
936
+ isPrimaryDisabled: re,
937
+ onClose: te,
938
+ onPrimaryAction: ee,
939
+ primaryText: s.save_button,
940
+ secondaryText: s.cancel_button,
941
+ title: l.split_transaction_title,
942
+ children: [
943
+ r,
944
+ /* @__PURE__ */ e(Pe, { transaction: t }),
945
+ /* @__PURE__ */ e(
946
+ Dt,
947
+ {
948
+ onAddSplit: R,
949
+ onCategoryChanged: ge,
950
+ onDeleteSplit: b,
951
+ onUpdateAmount: Q,
952
+ splits: A,
953
+ transaction: t
954
+ }
955
+ )
956
+ ]
957
+ }
958
+ ),
959
+ /* @__PURE__ */ e(
960
+ X,
961
+ {
962
+ copy: { title: l.split_transaction_unsplit_title },
963
+ isOpen: L,
964
+ onClose: () => {
965
+ _(!1), k(!1);
966
+ },
967
+ onPrimaryAction: K,
968
+ onSecondaryAction: () => {
969
+ a(y.ON_TRANSACTION_UNSPLIT_CANCEL);
970
+ },
971
+ primaryText: s.delete_button,
972
+ secondaryText: s.cancel_button,
973
+ children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: I(
974
+ l.split_transaction_unsplit_description,
975
+ t.description
976
+ ) })
977
+ }
978
+ )
979
+ ] }) });
980
+ }, Lt = E(Ot), wt = () => {
981
+ const t = rt(), { onEvent: a } = w(), { addTag: i } = O(), { transactions: r } = S(), [o, n] = d.useState(!1), [s, l] = d.useState(""), [_, u] = d.useState(""), g = d.useRef(null);
982
+ d.useEffect(() => {
983
+ o && g?.current?.focus();
984
+ }, [o]);
985
+ const p = () => {
986
+ a(
987
+ o ? y.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : y.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
988
+ ), o || l(""), n(!o);
989
+ }, h = async () => {
990
+ a(y.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), n(!1);
991
+ };
992
+ return d.useEffect(() => {
993
+ u(s.length > 40 ? r.tags_error_name_must_be_40_chars : "");
994
+ }, [s]), /* @__PURE__ */ c(F, { className: "mx-txn-tag-manager-header", children: [
995
+ /* @__PURE__ */ c(
996
+ v,
997
+ {
998
+ alignItems: "center",
999
+ bgcolor: t.palette.background.default,
1000
+ direction: "row",
1001
+ justifyContent: "space-between",
1002
+ px: 24,
1003
+ py: 16,
1004
+ children: [
1005
+ /* @__PURE__ */ e(x, { bold: !0, children: r.tags_your_tags }),
1006
+ /* @__PURE__ */ e(
1007
+ oe,
1008
+ {
1009
+ "aria-expanded": o,
1010
+ "aria-label": r.tags_add_tag_btn_aria,
1011
+ onClick: p,
1012
+ children: r.tags_add_tag_btn
1013
+ }
1014
+ )
1015
+ ]
1016
+ }
1017
+ ),
1018
+ /* @__PURE__ */ c(
1019
+ X,
1020
+ {
1021
+ copy: { title: r.tags_add_tag_btn },
1022
+ isOpen: o,
1023
+ onClose: () => n(!1),
1024
+ onPrimaryAction: h,
1025
+ onSecondaryAction: () => n(!1),
1026
+ children: [
1027
+ /* @__PURE__ */ e(
1028
+ Ie,
1029
+ {
1030
+ "aria-label": r.tags_placeholder,
1031
+ name: "add-tag",
1032
+ onChange: (m) => l(m.target.value),
1033
+ placeholder: r.tags_placeholder,
1034
+ sx: { width: "100%" },
1035
+ value: s
1036
+ }
1037
+ ),
1038
+ /* @__PURE__ */ e(j, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: _ })
1039
+ ]
1040
+ }
1041
+ )
1042
+ ] });
1043
+ }, Rt = E(wt), Mt = ({ onSearchValueChanged: t, searchValue: a }) => {
1044
+ const { common: i, transactions: r } = S(), o = /* @__PURE__ */ e(
1045
+ ae,
1046
+ {
1047
+ "aria-label": r.tags_cancel_search || "Search",
1048
+ onClick: () => t(""),
1049
+ children: /* @__PURE__ */ e(me, {})
1050
+ }
1051
+ );
1052
+ return /* @__PURE__ */ e(F, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
1053
+ Ie,
1054
+ {
1055
+ InputProps: {
1056
+ startAdornment: /* @__PURE__ */ e(Ee, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
1057
+ endAdornment: /* @__PURE__ */ e(Ee, { position: "end", sx: { padding: 0 }, children: a ? o : null })
1058
+ },
1059
+ "aria-label": i.search_aria,
1060
+ name: "search",
1061
+ onChange: (n) => t(n.target.value),
1062
+ placeholder: i.search_placeholder,
1063
+ sx: { bgcolor: "background.paper", width: "100%" },
1064
+ value: a
1065
+ }
1066
+ ) });
1067
+ }, kt = E(Mt), Pt = ({ onTagChecked: t, selectedTags: a, tag: i }) => {
1068
+ const { onEvent: r } = w(), { removeTag: o, updateTag: n } = O(), { common: s, transactions: l } = S(), [_, u] = d.useState(!1), [g, p] = d.useState(!1), [h, m] = d.useState(""), [f, L] = d.useState(""), k = async () => {
1069
+ r(y.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await n({ ...i, name: h }), u(!1);
1070
+ }, A = async () => {
1071
+ r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
1072
+ };
1073
+ d.useEffect(() => {
1074
+ L(h.length > 40 ? l.tags_error_name_must_be_40_chars : "");
1075
+ }, [h]);
1076
+ const T = () => {
1077
+ r(y.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), m(i.name), u(!0);
1078
+ }, R = () => {
1079
+ r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
1080
+ };
1081
+ return /* @__PURE__ */ c(
1082
+ B,
1083
+ {
1084
+ className: "mx-txn-transaction-manager-row",
1085
+ disableGutters: !0,
1086
+ disablePadding: !0,
1087
+ secondaryAction: !i.is_default_tag && /* @__PURE__ */ c(v, { direction: "row", children: [
1088
+ /* @__PURE__ */ e(
1089
+ ae,
1090
+ {
1091
+ "aria-label": `Edit ${i.name} tag`,
1092
+ color: "secondary",
1093
+ onClick: T,
1094
+ children: /* @__PURE__ */ e(Je, { color: "secondary" })
1095
+ }
1096
+ ),
1097
+ /* @__PURE__ */ e(
1098
+ ae,
1099
+ {
1100
+ "aria-label": `Delete ${i.name} tag`,
1101
+ color: "secondary",
1102
+ onClick: R,
1103
+ children: /* @__PURE__ */ e(_e, { color: "secondary" })
1104
+ }
1105
+ )
1106
+ ] }),
1107
+ children: [
1108
+ /* @__PURE__ */ c(
1109
+ z,
1110
+ {
1111
+ "aria-checked": a.includes(i.guid),
1112
+ onClick: () => t(i.guid),
1113
+ role: "checkbox",
1114
+ children: [
1115
+ /* @__PURE__ */ e(W, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
1116
+ nt,
1117
+ {
1118
+ "aria-hidden": !0,
1119
+ checked: a.includes(i.guid),
1120
+ edge: "start",
1121
+ tabIndex: -1
1122
+ }
1123
+ ) }),
1124
+ /* @__PURE__ */ e($, { children: i.name })
1125
+ ]
1126
+ }
1127
+ ),
1128
+ /* @__PURE__ */ c(
1129
+ X,
1130
+ {
1131
+ copy: { title: "Update tag name" },
1132
+ isOpen: _,
1133
+ onClose: () => u(!1),
1134
+ onPrimaryAction: k,
1135
+ onSecondaryAction: () => u(!1),
1136
+ children: [
1137
+ /* @__PURE__ */ e(
1138
+ Ie,
1139
+ {
1140
+ "aria-describedby": f ? "update-tag-error" : void 0,
1141
+ "aria-label": l.tags_update_the_tag_name,
1142
+ name: "update-tag",
1143
+ onChange: (b) => m(b.target.value),
1144
+ placeholder: "Tag name",
1145
+ sx: { width: "100%" },
1146
+ value: h
1147
+ }
1148
+ ),
1149
+ /* @__PURE__ */ e(j, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: f })
1150
+ ]
1151
+ }
1152
+ ),
1153
+ /* @__PURE__ */ e(
1154
+ X,
1155
+ {
1156
+ copy: { title: l.tags_delete_title },
1157
+ isOpen: g,
1158
+ onClose: () => p(!1),
1159
+ onPrimaryAction: A,
1160
+ onSecondaryAction: () => r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
1161
+ primaryText: s.delete_button,
1162
+ secondaryText: s.cancel_button,
1163
+ children: /* @__PURE__ */ e(x, { truncate: !1, children: l.tags_deleting_this_tag_will_remove_it })
1164
+ }
1165
+ )
1166
+ ]
1167
+ }
1168
+ );
1169
+ }, Gt = E(Pt), Bt = ({ selectedTags: t, onTagChecked: a }) => {
1170
+ const { tags: i } = O(), [r, o] = d.useState(""), n = i.filter(
1171
+ (s) => s.name.toLowerCase().includes(r.toLowerCase())
1172
+ );
1173
+ return /* @__PURE__ */ c("div", { className: "mx-txn-tag-manager", children: [
1174
+ /* @__PURE__ */ e(
1175
+ kt,
1176
+ {
1177
+ onSearchValueChanged: (s) => o(s),
1178
+ searchValue: r
1179
+ }
1180
+ ),
1181
+ /* @__PURE__ */ e(Rt, {}),
1182
+ /* @__PURE__ */ e(ce, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(ue, { children: n.map((s) => /* @__PURE__ */ c(d.Fragment, { children: [
1183
+ /* @__PURE__ */ e(Gt, { onTagChecked: a, selectedTags: t, tag: s }),
1184
+ /* @__PURE__ */ e(de, { sx: { ml: 24 } })
1185
+ ] }, s.guid)) }) })
1186
+ ] });
1187
+ }, $t = E(Bt), Kt = ({ transaction: t }) => {
1188
+ const { onEvent: a } = w(), { tags: i, updateTaggings: r, updateTransaction: o } = O(), { common: n, transactions: s } = S(), { updateManualTransaction: l } = J(), _ = U(), [u, g] = d.useState(!1), [p, h] = d.useState(t.tags);
1189
+ d.useEffect(() => {
1190
+ h(t.tags);
1191
+ }, [u, t]);
1192
+ const m = (A) => {
1193
+ const T = [...p], R = p.indexOf(A);
1194
+ R >= 0 ? T.splice(R, 1) : T.push(A), h(T);
1195
+ }, f = async () => {
1196
+ if (t.is_manual && !t.guid) {
1197
+ l({ ...t, tags: p }), g(!1);
1198
+ return;
1199
+ }
1200
+ await r(p, t.guid), await o({ ...t, tags: p }), a(H.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), g(!1);
1201
+ }, L = d.useMemo(
1202
+ () => t.tags.map(
1203
+ (A, T, R) => `${i.find((b) => b.guid === A)?.name}${T < R.length - 1 ? " / " : ""}`
1204
+ ),
1205
+ [i, t]
1206
+ ), k = _.palette.mode === "dark" ? "grey.800" : "grey.100";
1207
+ return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
1208
+ /* @__PURE__ */ c(
1209
+ z,
1210
+ {
1211
+ onClick: () => {
1212
+ a(y.ON_TRANSACTION_TAGS_CLICK), g(!0);
1213
+ },
1214
+ children: [
1215
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: k }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
1216
+ /* @__PURE__ */ e(
1217
+ $,
1218
+ {
1219
+ primary: s.tags_title,
1220
+ primaryTypographyProps: { variant: "caption" },
1221
+ secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.tags?.length > 0 ? L : s.tags_desc })
1222
+ }
1223
+ ),
1224
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
1225
+ ]
1226
+ }
1227
+ ),
1228
+ /* @__PURE__ */ e(
1229
+ ie,
1230
+ {
1231
+ ariaLabelClose: n.close_aria,
1232
+ isOpen: u,
1233
+ onClose: () => g(!1),
1234
+ onPrimaryAction: f,
1235
+ primaryText: n.save_button,
1236
+ secondaryText: n.cancel_button,
1237
+ title: s.tags_title,
1238
+ children: /* @__PURE__ */ e($t, { onTagChecked: m, selectedTags: p })
1239
+ }
1240
+ )
1241
+ ] });
1242
+ }, Ft = E(Kt), Ht = ({ transaction: t, viewOnly: a = !1 }) => {
1243
+ const { updateTransaction: i } = O(), { common: r, transactions: o } = S(), { onEvent: n } = w(), { announce: s, ariaLive: l } = pe(), [_, u] = d.useState(!1), [g, p] = d.useState(""), h = d.useRef(null);
1244
+ d.useEffect(() => {
1245
+ _ && (p(t.description), h?.current?.focus());
1246
+ }, [_]);
1247
+ const m = () => {
1248
+ u(!0), n(y.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
1249
+ }, f = async () => {
1250
+ n(H.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
1251
+ transaction_guid: t.guid
1252
+ }), await i({ ...t, description: g }), u(!1), s(`${o.payee_title}: ${g}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
1253
+ };
1254
+ return /* @__PURE__ */ c(F, { className: "mx-txn-transaction-description", children: [
1255
+ l,
1256
+ _ ? /* @__PURE__ */ c(Ve, { row: !0, children: [
1257
+ /* @__PURE__ */ e(
1258
+ Oe,
1259
+ {
1260
+ "aria-label": o.payee_title,
1261
+ id: "transaction-description-input",
1262
+ inputProps: { maxLength: 140 },
1263
+ label: o.payee_title,
1264
+ name: o.payee_title,
1265
+ onChange: (L) => p(L.target.value),
1266
+ ref: h,
1267
+ sx: {
1268
+ backgroundColor: "background.paper",
1269
+ ".MuiOutlinedInput-root": { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
1270
+ ".MuiOutlinedInput-input": { p: 11 },
1271
+ width: 250
1272
+ },
1273
+ value: g
1274
+ }
1275
+ ),
1276
+ /* @__PURE__ */ e(
1277
+ oe,
1278
+ {
1279
+ disabled: !g,
1280
+ onClick: f,
1281
+ sx: {
1282
+ borderTopLeftRadius: 0,
1283
+ borderBottomLeftRadius: 0
1284
+ },
1285
+ variant: "outlined",
1286
+ children: r.save_button
1287
+ }
1288
+ )
1289
+ ] }) : /* @__PURE__ */ c(v, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
1290
+ /* @__PURE__ */ e(x, { bold: !0, children: t.description }),
1291
+ !a && /* @__PURE__ */ e(
1292
+ ae,
1293
+ {
1294
+ "aria-label": o.payee_edit,
1295
+ id: "transaction-description-edit-button",
1296
+ onClick: m,
1297
+ sx: { color: "action.active" },
1298
+ children: /* @__PURE__ */ e(le, { name: "create", size: 22 })
1299
+ }
1300
+ )
1301
+ ] })
1302
+ ] });
1303
+ }, Ut = E(Ht), Vt = ({ transaction: t }) => {
1304
+ const { updateTransaction: a } = O(), { transactions: i } = S(), { onEvent: r } = w(), o = U(), n = o.palette.mode === "dark", s = async () => {
1305
+ r(H.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await a({ ...t, is_flagged: !t.is_flagged });
1306
+ };
1307
+ return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
1308
+ qe,
1309
+ {
1310
+ "aria-label": i.flag_btn_aria,
1311
+ "aria-pressed": t.is_flagged,
1312
+ color: n ? "primary" : "warning",
1313
+ onClick: s,
1314
+ selected: t.is_flagged,
1315
+ sx: {
1316
+ borderRadius: 6,
1317
+ color: n ? "common.white" : "secondary.main",
1318
+ "&.Mui-selected": {
1319
+ color: n ? "primary.main" : "common.white",
1320
+ backgroundColor: n ? Ce(o.palette.primary.main, 0.25) : "warning.dark",
1321
+ ":hover": {
1322
+ color: n ? "primary.main" : "common.white",
1323
+ backgroundColor: n ? Ce(o.palette.primary.main, 0.2) : "warning.main"
1324
+ }
1325
+ },
1326
+ ":hover": {
1327
+ color: n ? "common.white" : "warning.contrastText",
1328
+ backgroundColor: n ? Ce(o.palette.primary.main, 0.2) : "warning.light"
1329
+ }
1330
+ },
1331
+ value: "flagged",
1332
+ children: /* @__PURE__ */ e(Qe, { color: "inherit" })
1333
+ }
1334
+ ) });
1335
+ }, Yt = E(Vt), se = (t, a, i, r = !0, o = "inset") => r ? /* @__PURE__ */ c(d.Fragment, { children: [
1336
+ /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
1337
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: t }) }),
1338
+ /* @__PURE__ */ e(
1339
+ $,
1340
+ {
1341
+ primary: a,
1342
+ primaryTypographyProps: { variant: "caption" },
1343
+ secondary: i
1344
+ }
1345
+ )
1346
+ ] }),
1347
+ /* @__PURE__ */ e(de, { variant: o })
1348
+ ] }) : null, zt = ({ transaction: t }) => {
1349
+ const { transactions: a } = S(), { tags: i } = O(), r = d.useMemo(() => {
1350
+ const o = new Map(i.map((n) => [n.guid, n.name]));
1351
+ return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
1352
+ }, [i, t.tags]);
1353
+ return /* @__PURE__ */ c(ue, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
1354
+ se(
1355
+ /* @__PURE__ */ e(
1356
+ Ne,
1357
+ {
1358
+ categoryGuid: t.top_level_category_guid,
1359
+ size: 24,
1360
+ sx: { color: "text.primary" },
1361
+ variant: De.Transparent
1362
+ }
1363
+ ),
1364
+ a.category_title,
1365
+ /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: t.category ?? a.actions_select_a_category })
1366
+ ),
1367
+ se(
1368
+ /* @__PURE__ */ e(le, { name: "calendar_month", sx: { color: "text.primary" } }),
1369
+ a.date_title,
1370
+ /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: Re(fe(t.date), Me.YEAR_MONTH_DAY) })
1371
+ ),
1372
+ se(
1373
+ /* @__PURE__ */ e(le, { name: "article", sx: { color: "text.primary" } }),
1374
+ a.memo_title,
1375
+ /* @__PURE__ */ e(x, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "body1", children: t.memo ?? a.memo_desc }),
1376
+ !!t.memo,
1377
+ t.tags?.length > 0 ? "inset" : "fullWidth"
1378
+ ),
1379
+ se(
1380
+ /* @__PURE__ */ e(le, { name: "local_offer", sx: { color: "text.primary" } }),
1381
+ a.tags_title,
1382
+ /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: t.tags?.length ? r : a.tags_desc }),
1383
+ !!t.tags?.length,
1384
+ "fullWidth"
1385
+ )
1386
+ ] });
1387
+ }, Wt = E(zt), jt = ({
1388
+ bottomActions: t = ut,
1389
+ canFlagTransaction: a = !0,
1390
+ topActions: i = dt,
1391
+ transaction: r
1392
+ }) => {
1393
+ const { onEvent: o } = w(), { isCopyLoaded: n } = We(), { userFeatures: s } = je(), { accounts: l } = S(), _ = U(), u = r?.number && r.number.length > 4;
1394
+ d.useEffect(
1395
+ () => o(H.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
1396
+ []
1397
+ );
1398
+ const g = t.includes(Z.MerchantBudget) && !r?.merchant_guid ? t.filter((m) => m !== Z.MerchantBudget) : t;
1399
+ if (!n)
1400
+ return /* @__PURE__ */ e(lt, {});
1401
+ const p = Ue(s, "MX_TXN_DETAILS_VIEW_ONLY"), h = _.palette.mode === "dark" ? "grey.800" : "grey.100";
1402
+ return /* @__PURE__ */ e(F, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ c(v, { children: [
1403
+ /* @__PURE__ */ c(v, { gap: 12, p: 24, children: [
1404
+ /* @__PURE__ */ e(ce, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
1405
+ Se,
1406
+ {
1407
+ categoryGuid: r.top_level_category_guid || "",
1408
+ merchantGuid: r.merchant_guid || "",
1409
+ size: 64
1410
+ }
1411
+ ) }),
1412
+ /* @__PURE__ */ e(Ut, { transaction: r, viewOnly: p }),
1413
+ /* @__PURE__ */ c(v, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
1414
+ /* @__PURE__ */ c(j, { color: r.isIncome ? "success.main" : "text.primary", variant: "h1", children: [
1415
+ r.isIncome ? "+" : "",
1416
+ q(r.amount, "0,0.00")
1417
+ ] }),
1418
+ !p && a && /* @__PURE__ */ e(Yt, { transaction: r })
1419
+ ] }),
1420
+ /* @__PURE__ */ c(v, { sx: { bgcolor: h, borderRadius: "4px", gap: 4, p: 8 }, children: [
1421
+ /* @__PURE__ */ e(x, { bold: !0, children: `${r.account}
1422
+ ${u ? r.number : "•".repeat(4).concat(r.number ?? "")}` }),
1423
+ /* @__PURE__ */ e(x, { bold: !0, variant: "tiny", children: r.feed_description })
1424
+ ] })
1425
+ ] }),
1426
+ /* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: p ? /* @__PURE__ */ e(Wt, { transaction: r }) : /* @__PURE__ */ e(ue, { children: i.map((m, f) => /* @__PURE__ */ c(d.Fragment, { children: [
1427
+ m === ne.Category && /* @__PURE__ */ e(ht, { transaction: r }),
1428
+ m === ne.Date && /* @__PURE__ */ e(yt, { transaction: r }),
1429
+ m === ne.Memo && /* @__PURE__ */ e(Nt, { transaction: r }),
1430
+ m === ne.Tags && /* @__PURE__ */ e(Ft, { transaction: r }),
1431
+ /* @__PURE__ */ e(
1432
+ de,
1433
+ {
1434
+ component: "li",
1435
+ variant: f < i.length - 1 ? "inset" : "fullWidth"
1436
+ }
1437
+ )
1438
+ ] }, m)) }) }),
1439
+ !p && g.length > 0 && /* @__PURE__ */ c(d.Fragment, { children: [
1440
+ /* @__PURE__ */ e(x, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: l.actions }),
1441
+ /* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ c(ue, { children: [
1442
+ g.map((m, f) => /* @__PURE__ */ c(d.Fragment, { children: [
1443
+ m === Z.MerchantBudget && /* @__PURE__ */ e(gt, { transaction: r }),
1444
+ m === Z.SplitTransaction && /* @__PURE__ */ e(Lt, { transaction: r }),
1445
+ m === Z.HideTransaction && /* @__PURE__ */ e(At, { transaction: r }),
1446
+ m === Z.MerchantLogo && /* @__PURE__ */ e(xt, { transaction: r }),
1447
+ /* @__PURE__ */ e(
1448
+ de,
1449
+ {
1450
+ component: "li",
1451
+ variant: f < g.length - 1 ? "inset" : "fullWidth"
1452
+ }
1453
+ )
1454
+ ] }, m)),
1455
+ r.is_manual && !r.parent_guid && !r.has_been_split && /* @__PURE__ */ e(bt, { transaction: r })
1456
+ ] }) })
1457
+ ] })
1458
+ ] }) });
1459
+ }, Fr = E(jt);
1460
+ export {
1461
+ Z as B,
1462
+ ht as C,
1463
+ yt as D,
1464
+ Nt as M,
1465
+ Fr as T,
1466
+ Ft as a,
1467
+ ne as b,
1468
+ _t as c
1469
+ };