@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4

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 (222) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
  3. package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
  4. package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
  6. package/dist/AccountListItem-wgmlex-_.mjs +90 -0
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
  12. package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
  13. package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
  14. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
  15. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
  16. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
  17. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
  18. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
  19. package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
  20. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  21. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
  22. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
  23. package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
  24. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  25. package/dist/Drawer-BF40nbsH.mjs +163 -0
  26. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  27. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
  28. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  29. package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
  30. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
  31. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  32. package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
  33. package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
  34. package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
  35. package/dist/LineChart-C1PxNf7P.mjs +581 -0
  36. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
  37. package/dist/Loader-Ckqi9Rx6.mjs +21 -0
  38. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
  39. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  40. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
  41. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
  42. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
  43. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
  44. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  45. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  46. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
  47. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
  48. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
  49. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
  50. package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
  51. package/dist/SearchBox-B7km148n.mjs +39 -0
  52. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
  53. package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
  54. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  55. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
  56. package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
  57. package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
  58. package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
  59. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  60. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  61. package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
  62. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
  63. package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
  64. package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
  65. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
  66. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
  67. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  68. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  69. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  70. package/dist/accounts/index.es.js +228 -199
  71. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  72. package/dist/analytics/index.es.js +27 -27
  73. package/dist/budgets/index.es.js +459 -462
  74. package/dist/cashflow/index.es.js +419 -428
  75. package/dist/categories/index.es.js +2 -2
  76. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  77. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  78. package/dist/common/components/Loader.d.ts +1 -2
  79. package/dist/common/components/Select.d.ts +4 -2
  80. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  81. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  82. package/dist/common/components/charts/LineChart.d.ts +12 -2
  83. package/dist/common/components/charts/index.d.ts +0 -3
  84. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  85. package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
  86. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  87. package/dist/common/components/drawer/Footer.d.ts +17 -0
  88. package/dist/common/components/index.d.ts +0 -1
  89. package/dist/common/hooks/index.d.ts +0 -1
  90. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  91. package/dist/common/index.es.js +413 -674
  92. package/dist/common/stores/GlobalStore.d.ts +7 -1
  93. package/dist/common/stores/GlobalUiStore.d.ts +3 -2
  94. package/dist/common/types/Finstrong.d.ts +54 -0
  95. package/dist/common/types/Global.d.ts +1 -0
  96. package/dist/common/types/Widgets.d.ts +1 -0
  97. package/dist/common/types/index.d.ts +1 -1
  98. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  99. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  100. package/dist/common/utils/Theme.d.ts +1 -3
  101. package/dist/dashboard/index.es.js +21 -21
  102. package/dist/debts/components/DebtsChart.d.ts +1 -2
  103. package/dist/debts/index.es.js +673 -665
  104. package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
  105. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  106. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  107. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  108. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  109. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  110. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  111. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  113. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  115. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  116. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  117. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  118. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  119. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  120. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  121. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  122. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  123. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  124. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  125. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  126. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  127. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  128. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  129. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  130. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  131. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  132. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  133. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  134. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  135. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  136. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  137. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  138. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  139. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  140. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  141. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  142. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  143. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  144. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  145. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  146. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  147. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  148. package/dist/finstrong/constants/index.d.ts +9 -0
  149. package/dist/finstrong/index.es.js +3175 -1067
  150. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  151. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  152. package/dist/goals/index.es.js +580 -570
  153. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  154. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  155. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  156. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  157. package/dist/help/index.es.js +6 -6
  158. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  159. package/dist/insights/index.es.js +1 -1
  160. package/dist/investments/index.es.js +537 -536
  161. package/dist/merchants/index.es.js +9 -9
  162. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  163. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  164. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  165. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  166. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  167. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  168. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  169. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  170. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  171. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  172. package/dist/microinsights/constants/App.d.ts +0 -1
  173. package/dist/microinsights/index.d.ts +3 -3
  174. package/dist/microinsights/index.es.js +7 -7
  175. package/dist/microinsights/interfaces.d.ts +0 -6
  176. package/dist/networth/components/NetWorthChange.d.ts +3 -1
  177. package/dist/networth/index.es.js +262 -254
  178. package/dist/notifications/index.es.js +90 -91
  179. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  180. package/dist/recurringtransactions/index.es.js +586 -562
  181. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  182. package/dist/settings/index.es.js +371 -365
  183. package/dist/spending/index.es.js +267 -419
  184. package/dist/spending/utils/SpendingData.d.ts +2 -1
  185. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  186. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  187. package/dist/transactions/index.es.js +231 -226
  188. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  189. package/dist/transactions/stores/UiStore.d.ts +0 -2
  190. package/dist/trends/index.es.js +988 -612
  191. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
  192. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
  193. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  194. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
  195. package/package.json +51 -56
  196. package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
  197. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  198. package/dist/AccountListItem-JFMZROh7.mjs +0 -90
  199. package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
  200. package/dist/Drawer-kEE73B87.mjs +0 -113
  201. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  202. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  203. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  204. package/dist/Loader-DUaFpDGv.mjs +0 -24
  205. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  206. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  207. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  208. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  209. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  210. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  211. package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
  212. package/dist/common/components/barchart/Bar.d.ts +0 -25
  213. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  214. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  215. package/dist/common/components/barchart/Legend.d.ts +0 -8
  216. package/dist/common/components/barchart/Util.d.ts +0 -42
  217. package/dist/common/components/barchart/index.d.ts +0 -1
  218. package/dist/common/hooks/usePrevious.d.ts +0 -2
  219. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  220. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  221. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  222. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,91 +1,91 @@
1
- import { jsx as e, jsxs as a, Fragment as X } from "react/jsx-runtime";
2
- import h from "react";
3
- import { observer as T } from "mobx-react-lite";
4
- import { endOfMonth as z } from "date-fns/endOfMonth";
5
- import { endOfToday as de } from "date-fns/endOfToday";
6
- import { startOfMonth as k } from "date-fns/startOfMonth";
7
- import { startOfToday as ue } from "date-fns/startOfToday";
8
- import { subDays as me } from "date-fns/subDays";
9
- import ae from "@mui/material/Skeleton";
10
- import c from "@mui/material/Stack";
11
- import { R as Ee } from "../RecurringSettings-A_rAGCTP.mjs";
12
- import { M as En } from "../RecurringSettings-A_rAGCTP.mjs";
13
- import { addMonths as ze } from "date-fns/addMonths";
14
- import { subMonths as Fe } from "date-fns/subMonths";
15
- import { isBefore as Ue } from "date-fns/isBefore";
16
- import se from "@mui/material/Unstable_Grid2";
17
- import Se from "@mui/material/IconButton";
18
- import _e from "@mui/material/Tab";
19
- import je from "@mui/material/Tabs";
20
- import { Schedule as Ke, MonetizationOn as Ye, Cancel as Ge, CheckCircle as Ne, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as qe } from "@mxenabled/mx-icons";
21
- import { Text as p, MerchantLogo as pe, InstitutionLogo as Ze, H3 as Je, P as ce } from "@mxenabled/mxui";
22
- import { getWeeksInMonth as we } from "date-fns/getWeeksInMonth";
23
- import ge from "@mui/material/styles/useTheme";
24
- import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
- import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
26
- import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
27
- import { isSameDay as nt } from "date-fns/isSameDay";
28
- import it from "@mui/material/Badge";
29
- import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
30
- import { I as q } from "../IconBacking-B9oC6uL2.mjs";
31
- import { u as D, b as Z, j as I, g as J, q as Oe, d as he, h as fe } from "../hooks-D6XlXHf4.mjs";
32
- import { d as M, c as S, g as Ie, f as ot } from "../RecurringTransactions-DK8dWldr.mjs";
33
- import { T as B } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
34
- import { R as Nn } from "../RecurringTransactionsStore-C4YOD7_D.mjs";
35
- import { A as w, W as at } from "../WidgetContainer-BHWANqT4.mjs";
36
- import st from "@mui/material/Button";
37
- import le from "@mui/material/Divider";
38
- import ve from "@mui/material/List";
39
- import ke from "@mui/material/ListItem";
40
- import ct from "@mui/material/ListSubheader";
41
- import lt from "@mui/material/ListItemAvatar";
42
- import dt from "@mui/material/ListItemButton";
43
- import ut from "@mui/material/ListItemText";
44
- import { b as mt } from "../ManageIncome-1s_q5W4X.mjs";
45
- import { c as kn, M as Wn, S as $n } from "../ManageIncome-1s_q5W4X.mjs";
46
- import { f as L } from "../NumberFormatting-Buh7u8Oi.mjs";
47
- import { D as xe } from "../Drawer-kEE73B87.mjs";
48
- import { b as N } from "../Localization-2MODESHW.mjs";
49
- import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
50
- import O from "@mui/material/Box";
51
- import { S as We } from "../StatusBar-BK_uYHAB.mjs";
52
- import { u as ye } from "../useScreenSize-B6JyS_Lj.mjs";
53
- import { L as V } from "../Loader-DUaFpDGv.mjs";
54
- import { M as pt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
55
- import { u as gt } from "../useDimensions-27p2evRx.mjs";
56
- import { M as ht } from "../MicroWidgetContainer-DpeqN9n3.mjs";
57
- const Q = {
1
+ import { jsx as e, jsxs as a, Fragment as P } from "react/jsx-runtime";
2
+ import x from "react";
3
+ import { observer as C } from "mobx-react-lite";
4
+ import { endOfMonth as W } from "date-fns/endOfMonth";
5
+ import { endOfToday as X } from "date-fns/endOfToday";
6
+ import { startOfMonth as N } from "date-fns/startOfMonth";
7
+ import { startOfToday as J } from "date-fns/startOfToday";
8
+ import { subDays as Q } from "date-fns/subDays";
9
+ import { R as De } from "../RecurringSettings-DAncu--R.mjs";
10
+ import { M as vn } from "../RecurringSettings-DAncu--R.mjs";
11
+ import { addMonths as We } from "date-fns/addMonths";
12
+ import { subMonths as $e } from "date-fns/subMonths";
13
+ import { isBefore as Pe } from "date-fns/isBefore";
14
+ import q from "@mui/material/Grid";
15
+ import ge from "@mui/material/IconButton";
16
+ import d from "@mui/material/Stack";
17
+ import he from "@mui/material/Tab";
18
+ import ze from "@mui/material/Tabs";
19
+ import { Cancel as Te, CheckCircle as we, Schedule as Be, MonetizationOn as Fe, ChevronLeft as He, ChevronRight as Ue, CurrencyExchange as je } from "@mxenabled/mx-icons";
20
+ import { Text as f, MerchantLogo as ee, InstitutionLogo as Ke, H3 as Ye, P as V } from "@mxenabled/mxui";
21
+ import { getWeeksInMonth as fe } from "date-fns/getWeeksInMonth";
22
+ import { useTheme as te } from "@mui/material/styles";
23
+ import { AdapterDateFns as qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
24
+ import { DateCalendar as Ve } from "@mui/x-date-pickers/DateCalendar";
25
+ import { LocalizationProvider as Ze } from "@mui/x-date-pickers/LocalizationProvider";
26
+ import { isSameDay as Xe } from "date-fns/isSameDay";
27
+ import Je from "@mui/material/Badge";
28
+ import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
29
+ import { I as z } from "../IconBacking-DgT8DCeh.mjs";
30
+ import { u as R, b as B, j as _, g as F, q as Se, d as ne, h as re, n as et } from "../hooks-C41HAxM5.mjs";
31
+ import { d as M, c as T, g as xe, f as tt } from "../RecurringTransactions-CxcSL1dY.mjs";
32
+ import { T as O } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
33
+ import { R as An } from "../RecurringTransactionsStore-CNFxyGB6.mjs";
34
+ import { A as I, W as nt } from "../WidgetContainer-CDh9fjpR.mjs";
35
+ import rt from "@mui/material/Button";
36
+ import Z from "@mui/material/Divider";
37
+ import be from "@mui/material/List";
38
+ import _e from "@mui/material/ListItem";
39
+ import it from "@mui/material/ListSubheader";
40
+ import ot from "@mui/material/ListItemAvatar";
41
+ import at from "@mui/material/ListItemButton";
42
+ import st from "@mui/material/ListItemText";
43
+ import { b as ct } from "../ManageIncome-8EsStyIQ.mjs";
44
+ import { c as Gn, M as Nn, S as On } from "../ManageIncome-8EsStyIQ.mjs";
45
+ import { D as ie } from "../Drawer-BF40nbsH.mjs";
46
+ import { f as v } from "../NumberFormatting-DjTD0t3W.mjs";
47
+ import { b as E } from "../Localization-2MODESHW.mjs";
48
+ import { f as L, a as A } from "../Dialog-CDV0kKxj.mjs";
49
+ import G from "@mui/material/Box";
50
+ import { S as Ie } from "../StatusBar-CPfSXe80.mjs";
51
+ import { u as oe } from "../useScreenSize-B5afALev.mjs";
52
+ import { S as Me } from "../SkeletonLoader-BaNboJjD.mjs";
53
+ import { L as ae } from "../Loader-Ckqi9Rx6.mjs";
54
+ import { M as lt } from "../MiniWidgetContainer-CKzf_Ira.mjs";
55
+ import { u as dt } from "../useDimensions-27p2evRx.mjs";
56
+ import { M as ut } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
57
+ const H = {
58
58
  gridRow: 1,
59
59
  gridColumn: 1,
60
60
  zIndex: 2
61
- }, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...Q } }) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(
62
- Ye,
61
+ }, U = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, se = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Be, { color: "primary", filled: !0, sx: { fontSize: n, ...H } }) }), ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(
62
+ Fe,
63
63
  {
64
64
  filled: !0,
65
- sx: { color: "categories.income", fontSize: n, ...Q }
65
+ sx: { color: "categories.income", fontSize: n, ...H }
66
66
  }
67
- ) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ge, { color: "error", filled: !0, sx: { fontSize: n, ...Q } }) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(q, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...Q } }) }), ft = T(
68
- ({ day: t, outsideCurrentMonth: n, ...i }) => {
69
- const { recurring: r } = D(), { selectedAccountGuids: o } = Z(), { recurrences: l, setSelectedDay: m } = I(), s = h.useMemo(
70
- () => l.filter((d) => o.includes(d.accountGuid)),
71
- [o, l]
67
+ ) }), le = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(Te, { color: "error", filled: !0, sx: { fontSize: n, ...H } }) }), de = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(z, { size: n, sx: { ...U(t) }, children: /* @__PURE__ */ e(we, { color: "success", filled: !0, sx: { fontSize: n, ...H } }) }), mt = C(
68
+ ({ day: t, outsideCurrentMonth: n, ...r }) => {
69
+ const { recurring: i } = R(), { selectedAccountGuids: o } = B(), { recurrences: c, setSelectedDay: u } = _(), s = x.useMemo(
70
+ () => c.filter((g) => o.includes(g.accountGuid)),
71
+ [o, c]
72
72
  ).filter(
73
- (d) => nt(d.occurredOnDate || d.expectedDate, t)
74
- ), u = s.some(
75
- (d) => d.type !== M.Income && d.status === S.Upcoming
76
- ), f = s.some(
77
- (d) => d.type !== M.Income && d.status === S.Missed
78
- ), x = s.some(
79
- (d) => d.type !== M.Income && d.status === S.Paid
80
- ), C = s.some((d) => d.type === M.Income), y = (u ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
73
+ (g) => Xe(g.occurredOnDate || g.expectedDate, t)
74
+ ), l = s.some(
75
+ (g) => g.type !== M.Income && g.status === T.Upcoming
76
+ ), m = s.some(
77
+ (g) => g.type !== M.Income && g.status === T.Missed
78
+ ), h = s.some(
79
+ (g) => g.type !== M.Income && g.status === T.Paid
80
+ ), b = s.some((g) => g.type === M.Income), y = (l ? 1 : 0) + (m ? 1 : 0) + (h ? 1 : 0) + (b ? 1 : 0);
81
81
  return /* @__PURE__ */ e(
82
- it,
82
+ Je,
83
83
  {
84
- badgeContent: s.length > 0 && /* @__PURE__ */ a(X, { children: [
85
- f && /* @__PURE__ */ e(Re, { isOffset: !0 }),
86
- x && /* @__PURE__ */ e(Te, { isOffset: !0 }),
87
- u && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
88
- C && /* @__PURE__ */ e(be, { isOffset: !0 })
84
+ badgeContent: s.length > 0 && /* @__PURE__ */ a(P, { children: [
85
+ m && /* @__PURE__ */ e(le, { isOffset: !0 }),
86
+ h && /* @__PURE__ */ e(de, { isOffset: !0 }),
87
+ l && /* @__PURE__ */ e(se, { isOffset: !0 }),
88
+ b && /* @__PURE__ */ e(ce, { isOffset: !0 })
89
89
  ] }),
90
90
  overlap: "circular",
91
91
  sx: {
@@ -96,15 +96,15 @@ const Q = {
96
96
  }
97
97
  },
98
98
  children: /* @__PURE__ */ e(
99
- rt,
99
+ Qe,
100
100
  {
101
101
  "aria-label": `
102
- ${x && r.paid},
103
- ${f && r.missed},
104
- ${u && r.upcoming},
105
- ${C && r.income}`,
102
+ ${h && i.paid},
103
+ ${m && i.missed},
104
+ ${l && i.upcoming},
105
+ ${b && i.income}`,
106
106
  day: t,
107
- onClick: () => m(t),
107
+ onClick: () => u(t),
108
108
  outsideCurrentMonth: n,
109
109
  sx: {
110
110
  "&.MuiPickersDay-root": {
@@ -113,19 +113,19 @@ const Q = {
113
113
  }
114
114
  }
115
115
  },
116
- ...i
116
+ ...r
117
117
  }
118
118
  )
119
119
  }
120
120
  );
121
121
  }
122
- ), Y = ({ icon: t, label: n }) => /* @__PURE__ */ a(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
122
+ ), $ = ({ icon: t, label: n }) => /* @__PURE__ */ a(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
123
123
  /* @__PURE__ */ e(t, {}),
124
- /* @__PURE__ */ e(p, { variant: "XSmall", children: n })
125
- ] }), xt = T(() => {
126
- const { recurring: t } = D();
124
+ /* @__PURE__ */ e(f, { variant: "caption", children: n })
125
+ ] }), pt = C(() => {
126
+ const { recurring: t } = R();
127
127
  return /* @__PURE__ */ a(
128
- c,
128
+ d,
129
129
  {
130
130
  alignItems: "center",
131
131
  "aria-hidden": !0,
@@ -134,29 +134,35 @@ const Q = {
134
134
  justifyContent: "center",
135
135
  mt: 12,
136
136
  children: [
137
- /* @__PURE__ */ e(Y, { icon: Ce, label: t.expense }),
138
- /* @__PURE__ */ e(Y, { icon: be, label: t.income }),
139
- /* @__PURE__ */ e(Y, { icon: Re, label: t.missed }),
140
- /* @__PURE__ */ e(Y, { icon: Te, label: t.paid })
137
+ /* @__PURE__ */ e($, { icon: se, label: t.expense }),
138
+ /* @__PURE__ */ e($, { icon: ce, label: t.income }),
139
+ /* @__PURE__ */ e($, { icon: le, label: t.missed }),
140
+ /* @__PURE__ */ e($, { icon: de, label: t.paid })
141
141
  ]
142
142
  }
143
143
  );
144
- }), Me = 58, $e = T(() => {
145
- const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange: r } = I(), [o, l] = h.useState(
146
- we(/* @__PURE__ */ new Date()) * B + Me
147
- ), m = (s) => {
148
- l(we(s) * B + Me), r({
149
- start: k(s),
150
- end: z(s)
151
- }), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
- }, g = /* @__PURE__ */ e(
153
- et,
144
+ }), ye = 58, ve = C(() => {
145
+ const t = te(), { onEvent: n } = F(), { selectedDay: r, setDateRange: i } = _(), [o, c] = x.useState(
146
+ fe(/* @__PURE__ */ new Date()) * O + ye
147
+ ), u = (m) => {
148
+ c(fe(m) * O + ye), i({
149
+ start: N(m),
150
+ end: W(m)
151
+ }), p(m), n(I.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
+ }, p = (m) => {
153
+ m && requestAnimationFrame(() => {
154
+ const h = document.getElementById("recurrence-list");
155
+ h?.setAttribute("tabindex", "-1"), h?.focus();
156
+ });
157
+ }, s = /* @__PURE__ */ e(
158
+ Ve,
154
159
  {
155
- minDate: k(/* @__PURE__ */ new Date()),
156
- onMonthChange: m,
160
+ minDate: N(/* @__PURE__ */ new Date()),
161
+ onChange: p,
162
+ onMonthChange: u,
157
163
  showDaysOutsideCurrentMonth: !0,
158
164
  slots: {
159
- day: ft
165
+ day: mt
160
166
  },
161
167
  sx: {
162
168
  "& .MuiPickersArrowSwitcher-button": {
@@ -177,19 +183,19 @@ const Q = {
177
183
  pr: 8
178
184
  },
179
185
  "& .MuiPickersCalendarHeader-label": {
180
- fontFamily: t.typography.Body.fontFamily,
181
- fontSize: t.typography.Body.fontSize,
186
+ fontFamily: t.typography.body1.fontFamily,
187
+ fontSize: t.typography.body1.fontSize,
182
188
  fontWeight: 600
183
189
  },
184
190
  "& .MuiDayCalendar-slideTransition": {
185
191
  minHeight: o
186
192
  },
187
193
  "&.MuiDateCalendar-root": {
188
- minHeight: o + B
194
+ minHeight: o + O
189
195
  },
190
196
  "& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
191
- height: B,
192
- width: B,
197
+ height: O,
198
+ width: O,
193
199
  margin: 0
194
200
  },
195
201
  "& .MuiDayCalendar-weekDayLabel": {
@@ -197,104 +203,132 @@ const Q = {
197
203
  fontSize: t.typography.body2.fontSize
198
204
  }
199
205
  },
200
- value: i,
206
+ value: r,
201
207
  views: ["day"]
202
208
  }
203
209
  );
204
- return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ a(tt, { dateAdapter: Qe, children: [
205
- i && g,
206
- !i && g,
207
- /* @__PURE__ */ e(xt, {})
208
- ] }) });
209
- }), yt = (t) => {
210
+ return /* @__PURE__ */ a(
211
+ d,
212
+ {
213
+ "aria-describedby": "calendar-description",
214
+ "aria-labelledby": "calendar-label",
215
+ justifyContent: "center",
216
+ children: [
217
+ /* @__PURE__ */ e(
218
+ "span",
219
+ {
220
+ id: "calendar-label",
221
+ style: {
222
+ position: "absolute",
223
+ width: "1px",
224
+ height: "1px",
225
+ padding: 0,
226
+ margin: "-1px",
227
+ overflow: "hidden",
228
+ clip: "rect(0, 0, 0, 0)",
229
+ whiteSpace: "nowrap",
230
+ border: 0
231
+ },
232
+ children: "Calendar filter for recurring transactions list. Filter by month or select specific date."
233
+ }
234
+ ),
235
+ /* @__PURE__ */ a(Ze, { dateAdapter: qe, children: [
236
+ r && s,
237
+ !r && s,
238
+ /* @__PURE__ */ e(pt, {})
239
+ ] })
240
+ ]
241
+ }
242
+ );
243
+ }), gt = (t) => {
210
244
  if (t.type === M.Income)
211
- return /* @__PURE__ */ e(be, {});
245
+ return /* @__PURE__ */ e(ce, {});
212
246
  switch (t.status) {
213
- case S.Missed:
214
- return /* @__PURE__ */ e(Re, {});
215
- case S.Paid:
216
- return /* @__PURE__ */ e(Te, {});
247
+ case T.Missed:
248
+ return /* @__PURE__ */ e(le, {});
249
+ case T.Paid:
250
+ return /* @__PURE__ */ e(de, {});
217
251
  default:
218
- return /* @__PURE__ */ e(Ce, {});
252
+ return /* @__PURE__ */ e(se, {});
219
253
  }
220
- }, Ct = (t, n) => {
254
+ }, ht = (t, n) => {
221
255
  switch (t.status) {
222
- case S.Paid:
223
- return t.expectedDate ? N(
256
+ case T.Paid:
257
+ return t.expectedDate ? E(
224
258
  n.paid_on,
225
- A(
259
+ L(
226
260
  t.occurredOnDate || t.expectedDate,
227
- E.MONTH_DAY
261
+ A.MONTH_DAY
228
262
  )
229
263
  ) : n.paid;
230
- case S.Missed:
231
- return N(
264
+ case T.Missed:
265
+ return E(
232
266
  n.missed_on,
233
- A(t.expectedDate, E.MONTH_DAY)
267
+ L(t.expectedDate, A.MONTH_DAY)
234
268
  );
235
- case S.Upcoming:
236
- return N(
269
+ case T.Upcoming:
270
+ return E(
237
271
  n.upcoming_on,
238
- A(t.expectedDate, E.MONTH_DAY)
272
+ L(t.expectedDate, A.MONTH_DAY)
239
273
  );
240
274
  default:
241
275
  return n.unknown;
242
276
  }
243
- }, Le = ({
277
+ }, Ce = ({
244
278
  recurrence: t,
245
279
  isMini: n = !1,
246
- onRecurrenceClick: i = () => {
280
+ onRecurrenceClick: r = () => {
247
281
  },
248
- showOrdinal: r = !1
282
+ showOrdinal: i = !1
249
283
  }) => {
250
- const { recurring: o } = D(), { repeatingTransactions: l } = I(), [m, g] = h.useState(!1), s = h.useMemo(
251
- () => l.find((b) => b.guid === t.repeatingTransactionGuid),
252
- [t, l]
253
- ), u = t.type === M.Income, f = t.status === S.Paid, x = t.status === S.Missed, C = t.status === S.Upcoming;
284
+ const { recurring: o } = R(), { detailedRepeatingTransactions: c } = _(), [u, p] = x.useState(!1), s = x.useMemo(
285
+ () => c.find((D) => D.guid === t.repeatingTransactionGuid),
286
+ [t, c]
287
+ ), l = t.type === M.Income, m = t.status === T.Paid, h = t.status === T.Missed, b = t.status === T.Upcoming;
254
288
  let y = o.paid?.toLowerCase();
255
- return x ? y = o.missed?.toLowerCase() : C && (y = r ? Ie(o, s || {}, !0) : Ie(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
256
- /* @__PURE__ */ a(ke, { disableGutters: !0, disablePadding: !0, children: [
257
- /* @__PURE__ */ a(dt, { onClick: () => {
258
- g(!0), i(t);
289
+ return h ? y = o.missed?.toLowerCase() : b && (y = i ? xe(o, s || {}, !0) : xe(o, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
290
+ /* @__PURE__ */ a(_e, { disableGutters: !0, disablePadding: !0, children: [
291
+ /* @__PURE__ */ a(at, { onClick: () => {
292
+ p(!0), r(t);
259
293
  }, children: [
260
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
261
- pe,
294
+ /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(
295
+ ee,
262
296
  {
263
297
  categoryGuid: t.categoryGuid,
264
298
  merchantGuid: t.merchantGuid
265
299
  }
266
300
  ) }),
267
- /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ a(
268
- c,
301
+ /* @__PURE__ */ e(st, { children: /* @__PURE__ */ a(
302
+ d,
269
303
  {
270
304
  direction: "row",
271
305
  gap: 4,
272
306
  sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
273
307
  children: [
274
- /* @__PURE__ */ a(c, { direction: "column", width: "50%", children: [
275
- /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
276
- /* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(c, { direction: "row", gap: 4, children: [
277
- yt(t),
278
- /* @__PURE__ */ e(p, { variant: "caption", children: Ct(t, o) })
279
- ] }) : /* @__PURE__ */ a(X, { children: [
308
+ /* @__PURE__ */ a(d, { direction: "column", width: "50%", children: [
309
+ /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: t.name }),
310
+ /* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
311
+ gt(t),
312
+ /* @__PURE__ */ e(f, { variant: "caption", children: ht(t, o) })
313
+ ] }) : /* @__PURE__ */ a(P, { children: [
280
314
  t.institutionGuid && /* @__PURE__ */ e(
281
- Ze,
315
+ Ke,
282
316
  {
283
- alt: t.institutionName,
317
+ alt: `${t.institutionName} institution logo`,
284
318
  institutionGuid: t.institutionGuid,
285
319
  size: 12
286
320
  }
287
321
  ),
288
- /* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
322
+ /* @__PURE__ */ e(f, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
289
323
  ] }) })
290
324
  ] }),
291
- /* @__PURE__ */ a(c, { alignItems: "flex-end", width: "100%", children: [
292
- /* @__PURE__ */ a(p, { bold: !0, color: u ? "success.main" : "text.primary", variant: "body1", children: [
293
- u ? "+" : "",
294
- L(t.amount, "0,0.00")
325
+ /* @__PURE__ */ a(d, { alignItems: "flex-end", width: "100%", children: [
326
+ /* @__PURE__ */ a(f, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
327
+ l ? "+" : "",
328
+ v(t.amount, "0,0.00")
295
329
  ] }),
296
330
  !n && /* @__PURE__ */ a(
297
- c,
331
+ d,
298
332
  {
299
333
  direction: "row",
300
334
  sx: {
@@ -305,9 +339,9 @@ const Q = {
305
339
  width: "100%"
306
340
  },
307
341
  children: [
308
- f && /* @__PURE__ */ e(Ne, { color: "success", filled: !0, size: 12 }),
309
- x && /* @__PURE__ */ e(Ge, { color: "error", filled: !0, size: 12 }),
310
- /* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
342
+ m && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
343
+ h && /* @__PURE__ */ e(Te, { color: "error", filled: !0, size: 12 }),
344
+ /* @__PURE__ */ e(f, { bold: !0, color: "text.secondary", variant: "caption", children: y })
311
345
  ]
312
346
  }
313
347
  )
@@ -317,240 +351,240 @@ const Q = {
317
351
  ) })
318
352
  ] }),
319
353
  /* @__PURE__ */ e(
320
- xe,
354
+ ie,
321
355
  {
322
356
  ariaLabelClose: o.close_drawer_aria,
323
- isOpen: m,
324
- onClose: () => g(!1),
357
+ isOpen: u,
358
+ onClose: () => p(!1),
325
359
  title: t.type === M.Income ? o.income_details : o.expense_details,
326
360
  children: s && /* @__PURE__ */ e(
327
- mt,
361
+ ct,
328
362
  {
329
- onDeleted: () => g(!1),
363
+ onDeleted: () => p(!1),
330
364
  recurringTransaction: s
331
365
  }
332
366
  )
333
367
  }
334
368
  )
335
369
  ] });
336
- }, H = T(
370
+ }, k = C(
337
371
  ({
338
372
  recurrences: t,
339
373
  isMini: n = !1,
340
- onResetClick: i,
341
- onRecurrenceClick: r,
374
+ onResetClick: r,
375
+ onRecurrenceClick: i,
342
376
  sx: o = {},
343
- title: l
377
+ title: c
344
378
  }) => {
345
- const { recurring: m } = D(), g = h.useMemo(() => ot(t), [t]);
346
- return /* @__PURE__ */ a(c, { sx: { gap: 8, mt: 4, ...o }, children: [
347
- l && /* @__PURE__ */ a(
348
- c,
379
+ const { recurring: u } = R(), p = x.useMemo(() => tt(t), [t]);
380
+ return /* @__PURE__ */ a(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, "tab-index": -1, children: [
381
+ c && /* @__PURE__ */ a(
382
+ d,
349
383
  {
350
384
  sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
351
385
  children: [
352
- /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: l }),
353
- i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children: m.reset })
386
+ /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: c }),
387
+ r && /* @__PURE__ */ e(rt, { onClick: r, variant: "text", children: u.reset })
354
388
  ]
355
389
  }
356
390
  ),
357
- t.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(ve, { children: n ? t.map((s, u) => /* @__PURE__ */ a(h.Fragment, { children: [
391
+ t.length === 0 ? /* @__PURE__ */ e(f, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: u.no_activities }) : /* @__PURE__ */ e(be, { children: n ? t.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
358
392
  /* @__PURE__ */ e(
359
- Le,
393
+ Ce,
360
394
  {
361
395
  isMini: n,
362
- onRecurrenceClick: r,
396
+ onRecurrenceClick: i,
363
397
  recurrence: s
364
398
  }
365
399
  ),
366
- /* @__PURE__ */ e(le, { sx: { mx: 24 } })
367
- ] }, `recurrence-${u}`)) : g.map((s, u) => /* @__PURE__ */ a(h.Fragment, { children: [
368
- /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ e(
369
- ve,
400
+ /* @__PURE__ */ e(Z, { sx: { mx: 24 } })
401
+ ] }, `recurrence-${l}`)) : p.map((s, l) => /* @__PURE__ */ a(x.Fragment, { children: [
402
+ /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ e(
403
+ be,
370
404
  {
371
- subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
405
+ subheader: /* @__PURE__ */ e(it, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: L(s.date, A.DAY_OF_WEEK_MONTH_DAY) }) }),
372
406
  sx: { width: "100%" },
373
- children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
374
- Le,
407
+ children: s.recurrences.map((m, h) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
408
+ Ce,
375
409
  {
376
410
  isMini: n,
377
- onRecurrenceClick: r,
378
- recurrence: f
411
+ onRecurrenceClick: i,
412
+ recurrence: m
379
413
  }
380
- ) }, `day-recurrence-${x}`))
414
+ ) }, `day-recurrence-${h}`))
381
415
  }
382
416
  ) }, s.id),
383
- /* @__PURE__ */ e(le, { sx: { mx: 24 } })
384
- ] }, `recurrence-${u}`)) })
417
+ /* @__PURE__ */ e(Z, { sx: { mx: 24 } })
418
+ ] }, `recurrence-${l}`)) })
385
419
  ] });
386
420
  }
387
- ), Ae = T(
388
- ({ expected: t, isExpense: n = !0, missed: i, paid: r, title: o, total: l, upcoming: m }) => {
389
- const g = ge(), { isSmallMobile: s } = ye(), { recurring: u } = D(), f = h.useMemo(() => {
390
- const x = [{ color: g.palette.success.main, percentage: `${r / t}` }];
391
- return i && x.push({ color: g.palette.error.main, percentage: `${i / t}` }), x;
392
- }, [r, t, i]);
393
- return /* @__PURE__ */ a(c, { children: [
394
- /* @__PURE__ */ a(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
395
- /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${o} (${l})` }),
396
- /* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
421
+ ), Re = C(
422
+ ({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: c, upcoming: u }) => {
423
+ const p = te(), { isSmallMobile: s } = oe(), { recurring: l } = R(), m = x.useMemo(() => {
424
+ const h = [{ color: p.palette.success.main, percentage: `${i / t}` }];
425
+ return r && h.push({ color: p.palette.error.main, percentage: `${r / t}` }), h;
426
+ }, [i, t, r]);
427
+ return /* @__PURE__ */ a(d, { children: [
428
+ /* @__PURE__ */ a(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
429
+ /* @__PURE__ */ e(f, { bold: !0, variant: "body1", children: `${o} (${c})` }),
430
+ /* @__PURE__ */ e(f, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${v(t, "0,0.00")}` })
397
431
  ] }),
398
- /* @__PURE__ */ e(We, { data: f, height: 12 }),
399
- /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
400
- /* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
401
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
402
- /* @__PURE__ */ e(p, { variant: "caption", children: u.paid?.toLowerCase() }),
403
- i !== void 0 && /* @__PURE__ */ a(X, { children: [
404
- /* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
405
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
406
- /* @__PURE__ */ e(p, { variant: "caption", children: u.missed?.toLowerCase() })
432
+ /* @__PURE__ */ e(Ie, { data: m, height: 12 }),
433
+ /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
434
+ /* @__PURE__ */ e(G, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
435
+ !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(i, "0,0.00") }),
436
+ /* @__PURE__ */ e(f, { variant: "caption", children: l.paid?.toLowerCase() }),
437
+ r !== void 0 && /* @__PURE__ */ a(P, { children: [
438
+ /* @__PURE__ */ e(G, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
439
+ !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(r, "0,0.00") }),
440
+ /* @__PURE__ */ e(f, { variant: "caption", children: l.missed?.toLowerCase() })
407
441
  ] }),
408
- /* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
409
- !s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
410
- /* @__PURE__ */ e(p, { variant: "caption", children: u.upcoming })
442
+ /* @__PURE__ */ e(G, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
443
+ !s && /* @__PURE__ */ e(f, { bold: !0, variant: "body2", children: v(u, "0,0.00") }),
444
+ /* @__PURE__ */ e(f, { variant: "caption", children: l.upcoming })
411
445
  ] })
412
446
  ] });
413
447
  }
414
- ), bt = T(() => {
415
- const { recurring: t } = D(), { availableWidth: n } = Oe(), { isDesktop: i, isSmallMobile: r, isMobile: o } = ye(n), { onEvent: l } = J(), {
416
- currentMonthExpenses: m,
417
- currentMonthIncome: g,
448
+ ), ft = C(() => {
449
+ const { recurring: t } = R(), { availableWidth: n } = Se(), { isDesktop: r, isSmallMobile: i, isMobile: o } = oe(n), { onEvent: c } = F(), {
450
+ currentMonthExpenses: u,
451
+ currentMonthIncome: p,
418
452
  dateRange: s,
419
- expenseTotal: u,
420
- incomeTotal: f,
421
- missedExpenseTotal: x,
422
- pastRecurrences: C,
453
+ expenseTotal: l,
454
+ incomeTotal: m,
455
+ missedExpenseTotal: h,
456
+ pastRecurrences: b,
423
457
  paidExpenseTotal: y,
424
- paidIncomeTotal: d,
425
- selectedDay: b,
426
- selectedDayRecurrences: W,
427
- setDateRange: F,
428
- upcomingExpenseTotal: te,
429
- upcomingIncomeTotal: ne,
430
- upcomingRecurrences: U
431
- } = I(), [$, _] = h.useState(0), ie = Ue(s.start, /* @__PURE__ */ new Date()), v = (R, oe) => {
432
- _(oe);
433
- }, j = (R) => {
434
- l(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
435
- transaction_guid: R.transaction?.guid
458
+ paidIncomeTotal: g,
459
+ selectedDay: D,
460
+ selectedDayRecurrences: j,
461
+ setDateRange: S,
462
+ upcomingExpenseTotal: K,
463
+ upcomingIncomeTotal: Le,
464
+ upcomingRecurrences: ue
465
+ } = _(), [Y, Ae] = x.useState(0), Ee = Pe(s.start, /* @__PURE__ */ new Date()), Ge = (w, ke) => {
466
+ Ae(ke);
467
+ }, me = (w) => {
468
+ c(I.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
469
+ transaction_guid: w.transaction?.guid
436
470
  });
437
- }, K = (R) => {
438
- l(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
439
- transaction_guid: R.transaction?.guid
471
+ }, pe = (w) => {
472
+ c(I.RECURRING_TRANSACTIONS_CLICK_PAID, {
473
+ transaction_guid: w.transaction?.guid
440
474
  });
441
- }, P = () => {
442
- const R = ze(s.start, 1);
443
- F({
444
- start: k(R),
445
- end: z(R)
475
+ }, Ne = () => {
476
+ const w = We(s.start, 1);
477
+ S({
478
+ start: N(w),
479
+ end: W(w)
446
480
  });
447
- }, re = () => {
448
- const R = Fe(s.start, 1);
449
- F({
450
- start: k(R),
451
- end: z(R)
481
+ }, Oe = () => {
482
+ const w = $e(s.start, 1);
483
+ S({
484
+ start: N(w),
485
+ end: W(w)
452
486
  });
453
487
  };
454
488
  return /* @__PURE__ */ a(
455
- se,
489
+ q,
456
490
  {
457
491
  container: !0,
458
492
  sx: {
459
493
  pt: 16
460
494
  },
461
495
  children: [
462
- /* @__PURE__ */ a(se, { md: !0, sm: 12, width: "100%", children: [
463
- /* @__PURE__ */ a(c, { sx: { gap: 16, px: i ? 48 : 24 }, children: [
464
- /* @__PURE__ */ a(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
465
- /* @__PURE__ */ e(Je, { children: N(
496
+ /* @__PURE__ */ a(q, { size: { md: "grow", sm: 12 }, width: "100%", children: [
497
+ /* @__PURE__ */ a(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
498
+ /* @__PURE__ */ a(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
499
+ /* @__PURE__ */ e(Ye, { children: E(
466
500
  t.header_title,
467
- A(s.start, E.MONTH_LONG)
501
+ L(s.start, A.MONTH_LONG)
468
502
  ) }),
469
- !i && /* @__PURE__ */ a(c, { direction: "row", gap: 4, children: [
503
+ !r && /* @__PURE__ */ a(d, { direction: "row", gap: 4, children: [
470
504
  /* @__PURE__ */ e(
471
- Se,
505
+ ge,
472
506
  {
473
507
  color: "primary",
474
- disabled: ie,
475
- onClick: re,
476
- children: /* @__PURE__ */ e(Ve, {})
508
+ disabled: Ee,
509
+ onClick: Oe,
510
+ children: /* @__PURE__ */ e(He, {})
477
511
  }
478
512
  ),
479
- /* @__PURE__ */ e(Se, { color: "primary", onClick: P, children: /* @__PURE__ */ e(Xe, {}) })
513
+ /* @__PURE__ */ e(ge, { color: "primary", onClick: Ne, children: /* @__PURE__ */ e(Ue, {}) })
480
514
  ] })
481
515
  ] }),
482
516
  /* @__PURE__ */ e(
483
- Ae,
517
+ Re,
484
518
  {
485
- expected: u,
486
- missed: x,
519
+ expected: l,
520
+ missed: h,
487
521
  paid: y,
488
522
  title: t.expenses,
489
- total: m.length,
490
- upcoming: te
523
+ total: u.length,
524
+ upcoming: K
491
525
  }
492
526
  ),
493
527
  /* @__PURE__ */ e(
494
- Ae,
528
+ Re,
495
529
  {
496
- expected: f,
530
+ expected: m,
497
531
  isExpense: !1,
498
- paid: d,
532
+ paid: g,
499
533
  title: t.deposits,
500
- total: g.length,
501
- upcoming: ne
534
+ total: p.length,
535
+ upcoming: Le
502
536
  }
503
537
  ),
504
- i && /* @__PURE__ */ e(
505
- H,
538
+ r && /* @__PURE__ */ e(
539
+ k,
506
540
  {
507
- onRecurrenceClick: j,
508
- recurrences: U,
541
+ onRecurrenceClick: me,
542
+ recurrences: ue,
509
543
  title: t.upcoming_activity
510
544
  }
511
545
  )
512
546
  ] }),
513
- !i && /* @__PURE__ */ a(c, { sx: { px: o ? 0 : 24 }, children: [
514
- /* @__PURE__ */ a(je, { onChange: v, value: $, variant: "fullWidth", children: [
547
+ !r && /* @__PURE__ */ a(d, { sx: { px: o ? 0 : 24 }, children: [
548
+ /* @__PURE__ */ a(ze, { onChange: Ge, value: Y, variant: "fullWidth", children: [
515
549
  /* @__PURE__ */ e(
516
- _e,
550
+ he,
517
551
  {
518
- label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.upcoming : t.upcoming_activity })
552
+ label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
519
553
  }
520
554
  ),
521
555
  /* @__PURE__ */ e(
522
- _e,
556
+ he,
523
557
  {
524
- label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: r ? t.past : t.past_transactions })
558
+ label: /* @__PURE__ */ e(f, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
525
559
  }
526
560
  )
527
561
  ] }),
528
- $ === 0 && /* @__PURE__ */ e(
529
- H,
562
+ Y === 0 && /* @__PURE__ */ e(
563
+ k,
530
564
  {
531
- onRecurrenceClick: j,
532
- recurrences: U
565
+ onRecurrenceClick: me,
566
+ recurrences: ue
533
567
  }
534
568
  ),
535
- $ === 1 && /* @__PURE__ */ e(
536
- H,
569
+ Y === 1 && /* @__PURE__ */ e(
570
+ k,
537
571
  {
538
- onRecurrenceClick: K,
539
- recurrences: C
572
+ onRecurrenceClick: pe,
573
+ recurrences: b
540
574
  }
541
575
  )
542
576
  ] })
543
577
  ] }),
544
- i && /* @__PURE__ */ e(se, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ a(c, { gap: 24, children: [
545
- /* @__PURE__ */ e($e, {}),
578
+ r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ a(d, { gap: 24, children: [
579
+ /* @__PURE__ */ e(ve, {}),
546
580
  /* @__PURE__ */ e(
547
- H,
581
+ k,
548
582
  {
549
- onRecurrenceClick: K,
550
- recurrences: W || C,
551
- title: b ? N(
583
+ onRecurrenceClick: pe,
584
+ recurrences: j || b,
585
+ title: D ? E(
552
586
  t.day_transactions,
553
- A(b, E.MONTH_DAY)
587
+ L(D, A.MONTH_DAY)
554
588
  ) : t.past_transactions
555
589
  }
556
590
  )
@@ -558,131 +592,154 @@ const Q = {
558
592
  ]
559
593
  }
560
594
  );
561
- }), wn = T(({ onBackClick: t, sx: n = {} }) => {
562
- const { accounts: i } = he(), { recurring: r } = D(), { isCopyLoaded: o, isInitialized: l, selectedAccountGuids: m, setSelectedAccounts: g } = Z(), { isDataLoaded: s, loadRepeatingTransactions: u, setDateRange: f } = I(), { setFilter: x } = fe(), { onEvent: C } = J(), { isMobile: y } = ye(), [d, b] = h.useState(!1);
563
- return h.useEffect(() => {
564
- g(i);
565
- }, [i]), h.useEffect(() => {
566
- l && (x({
567
- dateRange: { start: me(ue(), 90), end: de() },
568
- accounts: m
569
- }), f({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), u().finally());
570
- }, [l]), o ? /* @__PURE__ */ a(
571
- at,
595
+ }), Tn = C(({ onBackClick: t, sx: n = {} }) => {
596
+ const { accounts: r } = ne(), { recurring: i } = R(), { isInitialized: o, selectedAccountGuids: c, setSelectedAccounts: u } = B(), { isDataLoaded: p, loadRepeatingTransactionData: s, setDateRange: l } = _(), { setFilter: m } = re(), { onEvent: h } = F(), { onLoad: b } = et(), { isMobile: y } = oe(), [g, D] = x.useState(!1);
597
+ return x.useEffect(() => {
598
+ p || s().finally(() => {
599
+ b?.("RecurringTransactionsWidget");
600
+ });
601
+ }, []), x.useEffect(() => {
602
+ u(r);
603
+ }, [r]), x.useEffect(() => {
604
+ m({
605
+ dateRange: { start: Q(J(), 90), end: X() },
606
+ accounts: c
607
+ }), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) });
608
+ }, [c]), o ? /* @__PURE__ */ a(
609
+ nt,
572
610
  {
573
- accountOptions: i,
611
+ accountOptions: r,
574
612
  actions: [
575
613
  {
576
- label: r.action_title,
614
+ label: i.action_title,
577
615
  iconName: "credit_card_gear",
578
616
  onClick: () => {
579
- b(!0), C(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
617
+ D(!0), h(I.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
580
618
  }
581
619
  }
582
620
  ],
583
621
  hasDivider: y,
584
- onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
622
+ onAccountsFilterClick: () => h(I.RECURRING_TRANSACTIONS_CLICK_FILTER),
585
623
  onBackClick: t,
586
624
  sx: n,
587
- title: r.title,
625
+ title: i.title,
588
626
  children: [
589
- l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ a(c, { direction: "column", p: 48, spacing: 24, children: [
590
- /* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
591
- /* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
592
- /* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
593
- ] }),
627
+ p ? /* @__PURE__ */ e(ft, {}) : /* @__PURE__ */ e(Me, { variant: "list" }),
594
628
  /* @__PURE__ */ e(
595
- xe,
629
+ ie,
596
630
  {
597
- ariaLabelClose: r.close_drawer_aria,
598
- isOpen: d,
599
- onClose: () => b(!1),
631
+ ariaLabelClose: i.close_drawer_aria,
632
+ isOpen: g,
633
+ onClose: () => D(!1),
600
634
  shouldShowHeaderBorders: !1,
601
- title: r.action_title,
602
- children: /* @__PURE__ */ e(Ee, {})
635
+ title: i.action_title,
636
+ children: /* @__PURE__ */ e(De, {})
603
637
  }
604
638
  )
605
639
  ]
606
640
  }
607
- ) : /* @__PURE__ */ e(V, {});
608
- }), Rt = T(() => {
609
- const { recurring: t } = D(), { availableWidth: n } = Oe(), { selectedDay: i, selectedDayRecurrences: r, setSelectedDay: o, upcomingRecurrences: l } = I(), m = n < 750;
610
- return /* @__PURE__ */ a(c, { flexDirection: m ? "column" : "row", width: "100%", children: [
611
- /* @__PURE__ */ e($e, {}),
612
- !m && /* @__PURE__ */ e(le, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
641
+ ) : /* @__PURE__ */ e(ae, {});
642
+ }), xt = C(() => {
643
+ const { recurring: t } = R(), { availableWidth: n } = Se(), { selectedDay: r, selectedDayRecurrences: i, setSelectedDay: o, upcomingRecurrences: c } = _(), u = n < 750;
644
+ return /* @__PURE__ */ a(d, { flexDirection: u ? "column" : "row", width: "100%", children: [
645
+ /* @__PURE__ */ e(ve, {}),
646
+ !u && /* @__PURE__ */ e(Z, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
613
647
  /* @__PURE__ */ e(
614
- H,
648
+ k,
615
649
  {
616
650
  isMini: !0,
617
- onResetClick: i ? () => o(i) : void 0,
618
- recurrences: r || l.slice(0, 5),
619
- sx: { width: m ? "100%" : "calc(100% - 336px)", mt: 12 },
620
- title: i ? N(
651
+ onResetClick: r ? () => o(r) : void 0,
652
+ recurrences: i || c.slice(0, 5),
653
+ sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
654
+ title: r ? E(
621
655
  t.day_transactions,
622
- A(i, E.MONTH_DAY)
656
+ L(r, A.MONTH_DAY)
623
657
  ) : t.upcoming_activity
624
658
  }
625
659
  )
626
660
  ] });
627
- }), In = T(
661
+ }), wn = C(
628
662
  ({ onPrimaryCtaClick: t, sx: n }) => {
629
- const { accounts: i } = he(), { recurring: r } = D(), { setFilter: o } = fe(), { isDataLoaded: l, loadRepeatingTransactions: m } = I(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: u, selectedAccountGuids: f } = Z();
630
- return h.useEffect(() => {
631
- s && u(i);
632
- }, [s]), h.useEffect(() => {
633
- f.length > 0 && (o({
634
- dateRange: { start: me(ue(), 90), end: de() },
635
- accounts: f
636
- }), m().finally());
637
- }, [f]), !g || !s ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(
638
- pt,
663
+ const { accounts: r } = ne(), { recurring: i } = R(), { setFilter: o } = re(), { isDataLoaded: c, loadRepeatingTransactionData: u } = _(), { isInitialized: p, setSelectedAccounts: s, selectedAccountGuids: l } = B();
664
+ return x.useEffect(() => {
665
+ c || u().finally();
666
+ }, []), x.useEffect(() => {
667
+ s(r);
668
+ }, [r]), x.useEffect(() => {
669
+ l.length > 0 && o({
670
+ dateRange: { start: Q(J(), 90), end: X() },
671
+ accounts: l
672
+ });
673
+ }, [l]), p ? /* @__PURE__ */ e(
674
+ lt,
639
675
  {
640
676
  className: "mx-exp-recurring-transactions-miniwidget",
641
677
  onPrimaryCtaClick: t,
642
- primaryCtaLabel: r.primary_cta,
643
- subTitle: r.sub_title,
678
+ primaryCtaLabel: i.primary_cta,
679
+ subTitle: i.sub_title,
644
680
  sx: n,
645
- title: r.mini_title,
646
- children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(V, {})
681
+ title: i.mini_title,
682
+ children: c ? /* @__PURE__ */ e(xt, {}) : /* @__PURE__ */ e(Me, { sx: { mx: 16 }, variant: "list" })
647
683
  }
648
- );
684
+ ) : /* @__PURE__ */ e(ae, {});
649
685
  }
650
- ), Tt = ({
651
- upcomingRecurrences: t,
652
- maxLogos: n = 3
653
- }) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, r) => /* @__PURE__ */ e(
654
- pe,
655
- {
656
- categoryGuid: i.categoryGuid || "",
657
- merchantGuid: i.merchantGuid || ""
658
- },
659
- `${i.categoryGuid}-${i.merchantGuid}-${r}`
660
- )) }), Dt = ({
686
+ ), bt = C(() => {
687
+ const { recurring: t } = R();
688
+ return /* @__PURE__ */ a(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
689
+ /* @__PURE__ */ e(je, { size: 32 }),
690
+ /* @__PURE__ */ a(d, { children: [
691
+ /* @__PURE__ */ e(V, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
692
+ /* @__PURE__ */ e(V, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
693
+ ] })
694
+ ] });
695
+ }), yt = ({
696
+ amount: t,
697
+ bgcolor: n,
698
+ isLargeScreen: r,
699
+ isSmallScreen: i,
700
+ label: o
701
+ }) => /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
702
+ /* @__PURE__ */ e(
703
+ G,
704
+ {
705
+ sx: {
706
+ borderRadius: "2px",
707
+ bgcolor: n,
708
+ height: 8,
709
+ width: 8
710
+ }
711
+ }
712
+ ),
713
+ /* @__PURE__ */ a(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
714
+ !i && /* @__PURE__ */ e(f, { bold: !0, variant: "caption", children: v(t, t === 0 || !r ? "0,0" : "0,0.00") }),
715
+ /* @__PURE__ */ e(f, { variant: "caption", children: o })
716
+ ] })
717
+ ] }), Ct = ({
661
718
  upcomingRecurrences: t,
662
719
  logoSize: n = 32,
663
- maxLogos: i = 3
720
+ maxLogos: r = 3
664
721
  }) => {
665
- const r = (o) => o * (n / 2);
722
+ const i = (o) => o * (n / 2);
666
723
  return /* @__PURE__ */ e(
667
- O,
724
+ G,
668
725
  {
669
726
  sx: {
670
727
  position: "relative",
671
728
  width: 64
672
729
  },
673
- children: t.map((o, l) => l < i ? /* @__PURE__ */ e(
674
- O,
730
+ children: t.map((o, c) => c < r ? /* @__PURE__ */ e(
731
+ G,
675
732
  {
676
733
  sx: {
677
734
  borderRadius: "4px",
678
- left: r(l),
735
+ left: i(c),
679
736
  outlineColor: "common.white",
680
737
  outlineStyle: "solid",
681
738
  outlineWidth: 2,
682
739
  position: "absolute"
683
740
  },
684
741
  children: /* @__PURE__ */ e(
685
- pe,
742
+ ee,
686
743
  {
687
744
  categoryGuid: o.categoryGuid || "",
688
745
  merchantGuid: o.merchantGuid || "",
@@ -690,218 +747,185 @@ const Q = {
690
747
  }
691
748
  )
692
749
  },
693
- `${o.categoryGuid}-${o.merchantGuid}-${l}`
750
+ `${o.categoryGuid}-${o.merchantGuid}-${c}`
694
751
  ) : null)
695
752
  }
696
753
  );
697
- }, St = ({
698
- amount: t,
699
- bgcolor: n,
700
- isLargeScreen: i,
701
- isSmallScreen: r,
702
- label: o
703
- }) => /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
704
- /* @__PURE__ */ e(
705
- O,
754
+ }, Rt = ({
755
+ upcomingRecurrences: t,
756
+ maxLogos: n = 3
757
+ }) => /* @__PURE__ */ e(d, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((r, i) => /* @__PURE__ */ e(
758
+ ee,
759
+ {
760
+ categoryGuid: r.categoryGuid || "",
761
+ merchantGuid: r.merchantGuid || ""
762
+ },
763
+ `${r.categoryGuid}-${r.merchantGuid}-${i}`
764
+ )) }), Dt = C(() => {
765
+ const t = te(), [n, { width: r }] = dt(), {
766
+ upcomingRecurrences: i,
767
+ expenseTotal: o,
768
+ missedExpenseTotal: c,
769
+ paidExpenseTotal: u,
770
+ upcomingExpenseTotal: p
771
+ } = _(), { recurring: s } = R(), l = r <= 288, m = r >= 450, h = 32, b = i.length > 0, y = x.useMemo(() => v(o, o === 0 ? "0,0" : "0,0.00"), [o]), g = x.useMemo(() => {
772
+ const S = [
773
+ { color: t.palette.success.main, percentage: `${u / o}` }
774
+ ];
775
+ return c && S.push({
776
+ color: t.palette.error.main,
777
+ percentage: `${c / o}`
778
+ }), S;
779
+ }, [
780
+ u,
781
+ o,
782
+ c,
783
+ t.palette.success.main,
784
+ t.palette.error.main
785
+ ]), D = () => b ? l ? /* @__PURE__ */ e(
786
+ Ct,
706
787
  {
707
- sx: {
708
- borderRadius: "2px",
709
- bgcolor: n,
710
- height: 8,
711
- width: 8
712
- }
788
+ logoSize: h,
789
+ maxLogos: 3,
790
+ upcomingRecurrences: i.slice(0, 3)
713
791
  }
714
- ),
715
- /* @__PURE__ */ a(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
716
- !r && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
717
- /* @__PURE__ */ e(p, { variant: "caption", children: o })
718
- ] })
719
- ] }), _t = T(() => {
720
- const { recurring: t } = D();
721
- return /* @__PURE__ */ a(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
722
- /* @__PURE__ */ e(qe, { size: 32 }),
723
- /* @__PURE__ */ a(c, { children: [
724
- /* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
725
- /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
792
+ ) : /* @__PURE__ */ e(Rt, { maxLogos: 3, upcomingRecurrences: i.slice(0, 3) }) : /* @__PURE__ */ e(d, { sx: { width: l ? 64 : 104 } }), j = [
793
+ {
794
+ amount: u,
795
+ bgColor: "success.main",
796
+ label: s.paid
797
+ },
798
+ {
799
+ amount: c,
800
+ bgColor: "error.main",
801
+ label: s.missed
802
+ },
803
+ {
804
+ amount: p,
805
+ bgColor: "neutral.light",
806
+ label: s.upcoming
807
+ }
808
+ ];
809
+ return /* @__PURE__ */ a(P, { children: [
810
+ /* @__PURE__ */ a(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
811
+ /* @__PURE__ */ a(
812
+ d,
813
+ {
814
+ sx: [
815
+ y.length >= 10 && l ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
816
+ {
817
+ alignItems: "baseline",
818
+ overflow: "hidden",
819
+ textOverflow: "ellipsis",
820
+ whiteSpace: "nowrap"
821
+ }
822
+ ],
823
+ children: [
824
+ /* @__PURE__ */ e(
825
+ f,
826
+ {
827
+ sx: { width: "100%" },
828
+ variant: y.length >= 10 && l ? "h3" : "h2",
829
+ children: y
830
+ }
831
+ ),
832
+ /* @__PURE__ */ e(V, { sx: { pr: 12 }, variant: "caption", children: s.expected })
833
+ ]
834
+ }
835
+ ),
836
+ D()
837
+ ] }),
838
+ /* @__PURE__ */ a(d, { sx: { pt: 12 }, children: [
839
+ /* @__PURE__ */ e(Ie, { data: g }),
840
+ /* @__PURE__ */ e(
841
+ d,
842
+ {
843
+ sx: {
844
+ alignItems: "center",
845
+ flexDirection: "row",
846
+ gap: 16,
847
+ mt: 4
848
+ },
849
+ children: j.map((S, K) => /* @__PURE__ */ e(
850
+ yt,
851
+ {
852
+ amount: S.amount,
853
+ bgcolor: S.bgColor,
854
+ isLargeScreen: m,
855
+ isSmallScreen: l,
856
+ label: S.label
857
+ },
858
+ `recurrence-legend-${K}`
859
+ ))
860
+ }
861
+ )
726
862
  ] })
727
863
  ] });
728
- }), vn = T(
864
+ }), Sn = C(
729
865
  ({ onCTAClick: t }) => {
730
- const [n, i] = h.useState(!1), { onEvent: r } = J(), o = ge(), { accounts: l } = he(), [m, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: u, selectedAccountGuids: f, setSelectedAccounts: x } = Z(), {
731
- loadRepeatingTransactions: C,
732
- upcomingRecurrences: y,
733
- expenseTotal: d,
734
- missedExpenseTotal: b,
735
- paidExpenseTotal: W,
736
- repeatingTransactions: F,
737
- setDateRange: te,
738
- upcomingExpenseTotal: ne,
739
- isDataLoaded: U
740
- } = I(), { setFilter: $ } = fe(), { recurring: _, budgets: ie } = D();
741
- h.useEffect(() => {
742
- x(l);
743
- }, [l]), h.useEffect(() => {
744
- u && ($({
745
- dateRange: { start: me(ue(), 90), end: de() },
746
- accounts: f
747
- }), te({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
748
- }, [u]), h.useEffect(() => {
749
- n && r(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
750
- state: y.length > 0 ? "default" : "zeroState"
866
+ const { onEvent: n } = F(), { accounts: r } = ne(), { isInitialized: i, selectedAccountGuids: o, setSelectedAccounts: c } = B(), {
867
+ loadRepeatingTransactionData: u,
868
+ upcomingRecurrences: p,
869
+ repeatingTransactions: s,
870
+ setDateRange: l,
871
+ isDataLoaded: m
872
+ } = _(), { setFilter: h } = re(), { recurring: b, budgets: y } = R();
873
+ x.useEffect(() => {
874
+ m || u().finally(() => {
875
+ n(I.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
876
+ state: p.length > 0 ? "default" : "zeroState"
877
+ });
751
878
  });
752
- }, [n]);
753
- const v = g <= 288, j = g >= 450, K = h.useMemo(() => {
754
- const G = [
755
- { color: o.palette.success.main, percentage: `${W / d}` }
756
- ];
757
- return b && G.push({
758
- color: o.palette.error.main,
759
- percentage: `${b / d}`
760
- }), G;
761
- }, [
762
- W,
763
- d,
764
- b,
765
- o.palette.success.main,
766
- o.palette.error.main
767
- ]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
768
- r(
769
- y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
879
+ }, []), x.useEffect(() => {
880
+ i && c(r);
881
+ }, [i, r]), x.useEffect(() => {
882
+ i && (h({
883
+ dateRange: { start: Q(J(), 90), end: X() },
884
+ accounts: o
885
+ }), l({ start: N(/* @__PURE__ */ new Date()), end: W(/* @__PURE__ */ new Date()) }));
886
+ }, [i, o]);
887
+ const g = () => {
888
+ n(
889
+ p.length > 0 ? I.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : I.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
770
890
  ), t();
771
891
  };
772
- if (!s || !n || !U) return /* @__PURE__ */ e(V, { height: 100 });
773
- const R = 32, oe = y.length > 0, Pe = () => oe ? v ? /* @__PURE__ */ e(
774
- Dt,
775
- {
776
- logoSize: R,
777
- maxLogos: 3,
778
- upcomingRecurrences: y.slice(0, 3)
779
- }
780
- ) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: v ? 64 : 104 } }), Be = [
781
- {
782
- amount: W,
783
- bgColor: "success.main",
784
- label: _.paid
785
- },
786
- {
787
- amount: b,
788
- bgColor: "error.main",
789
- label: _.missed
790
- },
791
- {
792
- amount: ne,
793
- bgColor: "border.light",
794
- label: _.upcoming
795
- }
796
- ], De = !F?.length;
892
+ if (!i || !m) return /* @__PURE__ */ e(ae, { height: 100 });
893
+ const D = !s?.length;
797
894
  return /* @__PURE__ */ e(
798
- ht,
895
+ ut,
799
896
  {
800
897
  className: "mx-recurring-transaction-microwidget",
801
- ctaLabel: De ? ie.get_started_cta : _.primary_cta,
802
- onCTAClick: re,
803
- title: _.recurring_expenses,
804
- children: De ? /* @__PURE__ */ e(_t, {}) : /* @__PURE__ */ a(X, { children: [
805
- /* @__PURE__ */ a(
806
- c,
807
- {
808
- ref: m,
809
- sx: {
810
- flexDirection: "row",
811
- justifyContent: "space-between"
812
- },
813
- children: [
814
- /* @__PURE__ */ a(
815
- c,
816
- {
817
- sx: [
818
- P.length >= 10 && v ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
819
- {
820
- alignItems: "baseline",
821
- overflow: "hidden",
822
- textOverflow: "ellipsis",
823
- whiteSpace: "nowrap"
824
- }
825
- ],
826
- children: [
827
- /* @__PURE__ */ e(
828
- p,
829
- {
830
- sx: { width: "100%" },
831
- variant: P.length >= 10 && v ? "H3" : "H2",
832
- children: P
833
- }
834
- ),
835
- /* @__PURE__ */ e(
836
- ce,
837
- {
838
- sx: {
839
- pr: 12
840
- },
841
- variant: "XSmall",
842
- children: _.expected
843
- }
844
- )
845
- ]
846
- }
847
- ),
848
- Pe()
849
- ]
850
- }
851
- ),
852
- /* @__PURE__ */ a(c, { sx: { pt: 12 }, children: [
853
- /* @__PURE__ */ e(We, { data: K }),
854
- /* @__PURE__ */ e(
855
- c,
856
- {
857
- sx: {
858
- alignItems: "center",
859
- flexDirection: "row",
860
- gap: 16,
861
- mt: 4
862
- },
863
- children: Be.map((G, He) => /* @__PURE__ */ e(
864
- St,
865
- {
866
- amount: G.amount,
867
- bgcolor: G.bgColor,
868
- isLargeScreen: j,
869
- isSmallScreen: v,
870
- label: G.label
871
- },
872
- `recurrence-legend-${He}`
873
- ))
874
- }
875
- )
876
- ] })
877
- ] })
898
+ ctaLabel: D ? y.get_started_cta : b.primary_cta,
899
+ onCTAClick: g,
900
+ title: b.recurring_expenses,
901
+ children: D ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ e(Dt, {})
878
902
  }
879
903
  );
880
904
  }
881
- ), Mn = T(
882
- ({ isOpen: t, onClose: n, selectedTab: i }) => {
883
- const { cashflow: r } = D();
905
+ ), _n = C(
906
+ ({ isOpen: t, onClose: n, selectedTab: r }) => {
907
+ const { cashflow: i } = R();
884
908
  return /* @__PURE__ */ e(
885
- xe,
909
+ ie,
886
910
  {
887
- ariaLabelClose: r.close_settings_aria,
911
+ ariaLabelClose: i.close_settings_aria,
888
912
  isOpen: t,
889
913
  onClose: n,
890
- title: r.cashflow_settings,
891
- children: /* @__PURE__ */ e(Ee, { defaultSelectedTab: i })
914
+ title: i.cashflow_settings,
915
+ children: /* @__PURE__ */ e(De, { defaultSelectedTab: r })
892
916
  }
893
917
  );
894
918
  }
895
919
  );
896
920
  export {
897
- kn as AddRecurringTransactionDetails,
898
- En as ManageExpenses,
899
- Wn as ManageIncome,
900
- Ee as RecurringSettings,
901
- Mn as RecurringSettingsDrawer,
902
- vn as RecurringTransactionsMicroWidget,
903
- In as RecurringTransactionsMiniWidget,
904
- Nn as RecurringTransactionsStore,
905
- wn as RecurringTransactionsWidget,
906
- $n as SelectTransaction
921
+ Gn as AddRecurringTransactionDetails,
922
+ vn as ManageExpenses,
923
+ Nn as ManageIncome,
924
+ De as RecurringSettings,
925
+ _n as RecurringSettingsDrawer,
926
+ Sn as RecurringTransactionsMicroWidget,
927
+ wn as RecurringTransactionsMiniWidget,
928
+ An as RecurringTransactionsStore,
929
+ Tn as RecurringTransactionsWidget,
930
+ On as SelectTransaction
907
931
  };