@mx-cartographer/experiences 8.1.10 → 8.2.0-alpha.bb0

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 (246) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-CMjOp7S2.mjs → Account-BTOmbrEK.mjs} +5 -5
  3. package/dist/{Account-BIKn4XEZ.mjs → Account-DC2d-cjn.mjs} +1 -1
  4. package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-IDZ6GTT0.mjs} +10 -10
  5. package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-BRAl-Hro.mjs} +6 -6
  6. package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-B8koowMf.mjs} +7 -7
  7. package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-Bc-SndzX.mjs} +1 -1
  8. package/dist/{Analytics-CxK7O19c.mjs → Analytics-vgPYa2Zt.mjs} +1 -1
  9. package/dist/AnalyticsApi-DwgSyZ6m.mjs +102 -0
  10. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  11. package/dist/BudgetUtil-CGchXaek.mjs +74 -0
  12. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  13. package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-nHEBR24E.mjs} +2 -2
  14. package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
  15. package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
  16. package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
  17. package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
  18. package/dist/CurrencyDialog-C7r7JqVu.mjs +371 -0
  19. package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-BUd8mAcE.mjs} +15 -16
  20. package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-Dd3NxFYY.mjs} +1 -1
  21. package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-BSktnUw6.mjs} +6 -7
  22. package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bdm-ZxFw.mjs} +1 -1
  23. package/dist/DebtUtils-DPn1cXKG.mjs +153 -0
  24. package/dist/EmbeddedCard-CAY_HJjE.mjs +856 -0
  25. package/dist/Error-Dogaw2jO.mjs +84 -0
  26. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  27. package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-DzeJOb_g.mjs} +6 -5
  28. package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
  29. package/dist/GlobalCopyApi-C75qVBk6.mjs +30 -0
  30. package/dist/GoalsUtil-B-Z6fq_t.mjs +107 -0
  31. package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
  32. package/dist/{Help-C_CM4gpK.mjs → Help-HoxJgoVt.mjs} +68 -67
  33. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  34. package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-DNynWPGz.mjs} +2 -2
  35. package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
  36. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  37. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  38. package/dist/Localization-Li21_krp.mjs +37 -0
  39. package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-C_FjST7B.mjs} +24 -24
  40. package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
  41. package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
  42. package/dist/NetWorthUtils-CyVz9bUn.mjs +95 -0
  43. package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-B8pH9TOv.mjs} +13 -13
  44. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  45. package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting-Dnk0YyfZ.mjs} +1 -1
  46. package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-BEBuqeS1.mjs} +4 -4
  47. package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-eQb1AS5x.mjs} +9 -9
  48. package/dist/RecurringTransactionsUtil-DbMNqEu_.mjs +253 -0
  49. package/dist/Select-BZRUpOib.mjs +51 -0
  50. package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
  51. package/dist/Sizes-DISGrlUg.mjs +6 -0
  52. package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-CktOElG1.mjs} +6 -6
  53. package/dist/{SpendingLegend-DLElSvH0.mjs → SpendingLegend-CM5L_1Ka.mjs} +4 -4
  54. package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-BP-sFltN.mjs} +33 -33
  55. package/dist/TransactionUtils-CvJW9wDu.mjs +234 -0
  56. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  57. package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-DWOpU5L8.mjs} +28 -30
  58. package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-CAgbD0ZS.mjs} +3 -3
  59. package/dist/accounts/hooks/useUiStore.d.ts +6 -1
  60. package/dist/accounts/index.d.ts +0 -1
  61. package/dist/accounts/index.es.js +52 -54
  62. package/dist/analytics/index.es.js +2 -2
  63. package/dist/budgets/index.es.js +18 -18
  64. package/dist/cashflow/context/hooks.d.ts +15 -1
  65. package/dist/cashflow/index.d.ts +0 -1
  66. package/dist/cashflow/index.es.js +28 -31
  67. package/dist/categories/context/hooks.d.ts +19 -1
  68. package/dist/categories/index.d.ts +0 -1
  69. package/dist/categories/index.es.js +4 -6
  70. package/dist/common/constants/ScheduledPayment.d.ts +1 -1
  71. package/dist/common/constants/index.d.ts +0 -3
  72. package/dist/common/context/GlobalDataProvider.d.ts +1 -1
  73. package/dist/common/context/hooks.d.ts +21 -21
  74. package/dist/common/index.d.ts +0 -1
  75. package/dist/common/index.es.js +203 -961
  76. package/dist/common/utils/AccountFilter.d.ts +1 -1
  77. package/dist/common/utils/index.d.ts +0 -4
  78. package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
  79. package/dist/core/constants/Transaction.d.ts +10 -0
  80. package/dist/core/constants/index.d.ts +2 -0
  81. package/dist/core/index.d.ts +1 -1
  82. package/dist/core/index.es.js +3060 -88
  83. package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
  84. package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
  85. package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
  86. package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
  87. package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
  88. package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
  89. package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
  90. package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
  91. package/dist/core/stores/DebtsStore.d.ts +22 -0
  92. package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
  93. package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
  94. package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
  95. package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
  96. package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
  97. package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
  98. package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
  99. package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
  100. package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
  101. package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
  102. package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
  103. package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
  104. package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
  105. package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
  106. package/dist/{common → core}/stores/UserStore.d.ts +2 -2
  107. package/dist/core/stores/index.d.ts +24 -0
  108. package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
  109. package/dist/core/types/Offer.d.ts +32 -0
  110. package/dist/core/types/index.d.ts +3 -1
  111. package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
  112. package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
  113. package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
  114. package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
  115. package/dist/core/utils/DebtUtils.d.ts +31 -0
  116. package/dist/core/utils/FinstrongUtils.d.ts +7 -0
  117. package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
  118. package/dist/core/utils/HelpUtil.d.ts +3 -0
  119. package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
  120. package/dist/core/utils/Localization.d.ts +2 -0
  121. package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
  122. package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
  123. package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
  124. package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
  125. package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
  126. package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
  127. package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
  128. package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
  129. package/dist/core/utils/index.d.ts +1 -1
  130. package/dist/dashboard/index.es.js +4 -4
  131. package/dist/debts/components/DebtsChart.d.ts +1 -1
  132. package/dist/debts/components/DebtsTable.d.ts +1 -1
  133. package/dist/debts/components/SnowballCard.d.ts +1 -1
  134. package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
  135. package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
  136. package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
  137. package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
  138. package/dist/debts/index.d.ts +0 -1
  139. package/dist/debts/index.es.js +568 -691
  140. package/dist/debts/utils/DebtsTable.d.ts +1 -1
  141. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  142. package/dist/finstrong/index.d.ts +0 -1
  143. package/dist/finstrong/index.es.js +1565 -1342
  144. package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
  145. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  146. package/dist/goals/index.d.ts +0 -1
  147. package/dist/goals/index.es.js +71 -73
  148. package/dist/help/index.es.js +4 -4
  149. package/dist/help/utils/index.d.ts +0 -1
  150. package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
  151. package/dist/insights/index.d.ts +0 -1
  152. package/dist/insights/index.es.js +52 -54
  153. package/dist/investments/components/AnalysisDetails.d.ts +1 -1
  154. package/dist/investments/index.es.js +6 -6
  155. package/dist/merchants/index.d.ts +0 -1
  156. package/dist/merchants/index.es.js +12 -14
  157. package/dist/microinsights/index.es.js +1 -1
  158. package/dist/microinsights/interfaces.d.ts +1 -33
  159. package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
  160. package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
  161. package/dist/networth/components/NetWorthChange.d.ts +1 -1
  162. package/dist/networth/components/NetWorthListItem.d.ts +1 -1
  163. package/dist/networth/components/NetWorthSummary.d.ts +1 -1
  164. package/dist/networth/index.d.ts +0 -4
  165. package/dist/networth/index.es.js +232 -237
  166. package/dist/notifications/index.d.ts +0 -2
  167. package/dist/notifications/index.es.js +23 -26
  168. package/dist/recurringtransactions/index.d.ts +0 -1
  169. package/dist/recurringtransactions/index.es.js +67 -71
  170. package/dist/settings/index.d.ts +0 -1
  171. package/dist/settings/index.es.js +11 -13
  172. package/dist/spending/index.es.js +10 -10
  173. package/dist/transactions/context/hooks.d.ts +1 -1
  174. package/dist/transactions/index.d.ts +0 -4
  175. package/dist/transactions/index.es.js +102 -109
  176. package/dist/trends/index.d.ts +0 -1
  177. package/dist/trends/index.es.js +67 -68
  178. package/dist/trends/utils/shared.d.ts +1 -1
  179. package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
  180. package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
  181. package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
  182. package/package.json +1 -1
  183. package/dist/AccountApi-WEM2M9tg.mjs +0 -19
  184. package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
  185. package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
  186. package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
  187. package/dist/BeatStore-C7-PIhpB.mjs +0 -163
  188. package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
  189. package/dist/CashflowStore-BEi92kJg.mjs +0 -91
  190. package/dist/CategoryApi-CogDFScz.mjs +0 -29
  191. package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
  192. package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
  193. package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
  194. package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
  195. package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
  196. package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
  197. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
  198. package/dist/Goal-MFBpoOIC.mjs +0 -29
  199. package/dist/GoalStore-BBAEbf43.mjs +0 -395
  200. package/dist/Localization-C_HZg9tJ.mjs +0 -15
  201. package/dist/Localization-CkQ49EKr.mjs +0 -26
  202. package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
  203. package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
  204. package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
  205. package/dist/NotificationApi-DF0obHoR.mjs +0 -20
  206. package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
  207. package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
  208. package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
  209. package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
  210. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
  211. package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
  212. package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
  213. package/dist/Transaction-Cn5_iFm0.mjs +0 -5
  214. package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
  215. package/dist/TransactionStore-amPYxHnA.mjs +0 -710
  216. package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
  217. package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
  218. package/dist/accounts/stores/UiStore.d.ts +0 -10
  219. package/dist/accounts/utils/index.d.ts +0 -1
  220. package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
  221. package/dist/categories/stores/UiStore.d.ts +0 -20
  222. package/dist/common/stores/index.d.ts +0 -3
  223. package/dist/common/utils/Categories.d.ts +0 -6
  224. package/dist/common/utils/Localization.d.ts +0 -3
  225. package/dist/debts/store/DebtsStore.d.ts +0 -10
  226. package/dist/debts/store/DebtsUiStore.d.ts +0 -13
  227. package/dist/debts/utils/DebtStore.d.ts +0 -4
  228. package/dist/debts/utils/DebtsWidget.d.ts +0 -20
  229. package/dist/debts/utils/shared.d.ts +0 -12
  230. package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
  231. package/dist/help/constants/index.d.ts +0 -1
  232. package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
  233. package/dist/transactions/analytics.d.ts +0 -3
  234. package/dist/transactions/constants/Transaction.d.ts +0 -2
  235. package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
  236. package/dist/transactions/stores/UiStore.d.ts +0 -25
  237. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
  238. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
  239. /package/dist/{common → core}/constants/Category.d.ts +0 -0
  240. /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
  241. /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
  242. /package/dist/{help → core}/constants/Help.d.ts +0 -0
  243. /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
  244. /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
  245. /package/dist/{common → core}/constants/Table.d.ts +0 -0
  246. /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
@@ -17,56 +17,56 @@ import tt from "@mui/material/Card";
17
17
  import ot from "@mui/material/CardContent";
18
18
  import Ne from "@mui/material/Divider";
19
19
  import ze from "@mui/material/Grid";
20
- import { u as R, l as Q, g as $, b as fe, h as ve, d as De, D as ye, p as nt, f as Be, a as st } from "../hooks-RzCoiTd0.mjs";
21
- import { b as rt } from "../Localization-CkQ49EKr.mjs";
22
- import { C as xe } from "../CurrencyText-oqd6cX3M.mjs";
23
- import { a as Re, b as $e, c as Wt } from "../Category-Ccoew_sA.mjs";
24
- import { f as X, D as G } from "../DateFormats-CaOj_4eI.mjs";
25
- import { f as se, a as Ot } from "../NumberFormatting-CyrvFgfd.mjs";
26
- import { a as Ke, c as Gt, g as Bt, L as Pt } from "../TrendsStore-bYjIGqyR.mjs";
27
- import { T as ms } from "../TrendsStore-bYjIGqyR.mjs";
28
- import { c as Vt, i as Ft, d as zt, e as $t, g as at, b as it, f as Ye } from "../SpendingData-Dj85XEUp.mjs";
29
- import Kt from "@mui/material/ToggleButton";
30
- import Yt from "@mui/material/ToggleButtonGroup";
20
+ import { b as nt } from "../Localization-Li21_krp.mjs";
21
+ import { u as R, l as Q, g as $, b as fe, h as ve, d as De, B as ye, D as st, f as Be, a as rt } from "../hooks-BaO_gOI6.mjs";
22
+ import { C as xe } from "../CurrencyText-Dd3NxFYY.mjs";
23
+ import { a as Re, C as $e, b as Wt } from "../Category-DEKZGLYe.mjs";
24
+ import { f as X, D as G } from "../DateFormats-BSktnUw6.mjs";
25
+ import { f as se, a as Ot } from "../NumberFormatting-Dnk0YyfZ.mjs";
26
+ import { a as Ke, c as Gt, g as Bt } from "../TrendsUtil-D9z3kIj_.mjs";
27
+ import { c as Pt, i as Vt, d as Ft, e as zt, g as at, b as it, f as Ye } from "../SpendingData-CktOElG1.mjs";
28
+ import $t from "@mui/material/ToggleButton";
29
+ import Kt from "@mui/material/ToggleButtonGroup";
31
30
  import { parseISO as lt } from "date-fns/parseISO";
32
31
  import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
33
- import { T as W, a as jt } from "../ViewMoreMicroCard-D1j0w64K.mjs";
34
- import { useGridApiContext as Ut, useGridRootProps as Xt, DataGridPro as Zt } from "@mui/x-data-grid-pro";
35
- import Qt from "@mui/material/Badge";
36
- import qt from "@mui/material/IconButton";
32
+ import { T as W, a as Yt } from "../ViewMoreMicroCard-DWOpU5L8.mjs";
33
+ import { useGridApiContext as jt, useGridRootProps as Ut, DataGridPro as Xt } from "@mui/x-data-grid-pro";
34
+ import Zt from "@mui/material/Badge";
35
+ import Qt from "@mui/material/IconButton";
37
36
  import { A as v } from "../Analytics-CzGzz_sE.mjs";
38
- import { T as ct } from "../EmbeddedCard-B9JoBaan.mjs";
39
- import { T as dt } from "../TransactionDetails-C_skrQk8.mjs";
37
+ import { T as ct } from "../EmbeddedCard-CAY_HJjE.mjs";
38
+ import { T as dt } from "../TransactionDetails-BP-sFltN.mjs";
40
39
  import { D as Pe } from "../Drawer-XPaLYjiO.mjs";
41
- import { u as Ie } from "../useWidgetLoadTimer-BZjr-BiE.mjs";
40
+ import { u as Ie } from "../useWidgetLoadTimer-CJb-RELP.mjs";
42
41
  import { L as Le } from "../Loader-CxeBwuPG.mjs";
43
- import { W as ut } from "../WidgetContainer-BPJoDkhL.mjs";
44
- import { L as Ve } from "../LineChart-CeZnCZ7j.mjs";
45
- import { M as Jt } from "../MiniWidgetContainer-BOv3n4iw.mjs";
46
- import { subMonths as eo } from "date-fns";
47
- import { TrendingUp as to, TrendingDown as oo, MultilineChart as no, ExpandLess as so, ExpandMore as ro, ChevronRight as ao, ArrowBack as io } from "@mxenabled/mx-icons";
48
- import { M as lo } from "../MicroWidgetContainer-DAesImQ6.mjs";
49
- import co from "@mui/material/Collapse";
42
+ import { W as ut } from "../WidgetContainer-CAgbD0ZS.mjs";
43
+ import { L as Ve } from "../LineChart-DNynWPGz.mjs";
44
+ import { M as qt } from "../MiniWidgetContainer-BdPiUU-u.mjs";
45
+ import { subMonths as Jt } from "date-fns";
46
+ import { TrendingUp as eo, TrendingDown as to, MultilineChart as oo, ExpandLess as no, ExpandMore as so, ChevronRight as ro, ArrowBack as ao } from "@mxenabled/mx-icons";
47
+ import { M as io } from "../MicroWidgetContainer-CfKdQfhi.mjs";
48
+ import lo from "@mui/material/Collapse";
50
49
  import We from "@mui/material/List";
51
50
  import mt from "@mui/material/ListItem";
52
- import uo from "@mui/material/ListItemButton";
53
- import mo from "@mui/material/ListItemIcon";
51
+ import co from "@mui/material/ListItemButton";
52
+ import uo from "@mui/material/ListItemIcon";
54
53
  import ht from "@mui/material/ListItemText";
55
54
  import gt from "@mui/material/styles/useTheme";
56
- import { b as Oe } from "../CategoryUtil-BJOHgYKS.mjs";
55
+ import { g as Oe } from "../TransactionUtils-CvJW9wDu.mjs";
56
+ import { L as mo } from "../ListItemRow-kH1rn8Xu.mjs";
57
57
  import { Stack as ho } from "@mui/material";
58
58
  import go from "@mui/material/ListItemAvatar";
59
- import { E as po } from "../ExportCsvAction-BDFu6YIe.mjs";
60
- import { u as fo } from "../useInsightsEnabled-CzJoG8xi.mjs";
59
+ import { E as po } from "../ExportCsvAction-DzeJOb_g.mjs";
60
+ import { u as fo } from "../useInsightsEnabled-DaNLPmUU.mjs";
61
61
  import { E as yo } from "../EmptyState-DHAkGsjk.mjs";
62
- import { C as Co } from "../ConnectDrawer-DNnuF80E.mjs";
62
+ import { C as Co } from "../ConnectDrawer-DgfsTpyW.mjs";
63
63
  const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
64
64
  const { categories: s } = R(), { getCategoryName: o } = Q(), r = o(t);
65
65
  return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
66
66
  /* @__PURE__ */ e(
67
67
  H,
68
68
  {
69
- "aria-label": rt(s.category_icon_label_aria, r),
69
+ "aria-label": nt(s.category_icon_label_aria, r),
70
70
  mb: 4,
71
71
  role: "img",
72
72
  children: /* @__PURE__ */ e(we, { categoryGuid: n })
@@ -426,7 +426,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
426
426
  }, ft = ({ selectedTab: t, onTabChange: n }) => {
427
427
  const { common: s } = R();
428
428
  return /* @__PURE__ */ e(
429
- Yt,
429
+ Kt,
430
430
  {
431
431
  "aria-label": s.view_toggle,
432
432
  exclusive: !0,
@@ -434,7 +434,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
434
434
  orientation: "horizontal",
435
435
  value: t,
436
436
  children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
437
- Kt,
437
+ $t,
438
438
  {
439
439
  "aria-label": o === "Chart" ? s.view_chart : s.view_table,
440
440
  "aria-pressed": t === o,
@@ -567,7 +567,7 @@ const pt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
567
567
  const a = r.monthlyAmounts.reduce(Xe(o), 0);
568
568
  a !== 0 && c.push({
569
569
  id: `sub-${r.guid}`,
570
- category: rt(n.category_general, r.name),
570
+ category: nt(n.category_general, r.name),
571
571
  category_guid: r.guid,
572
572
  isParent: !0,
573
573
  top_level_category_guid: r.guid,
@@ -589,7 +589,7 @@ function Lo({
589
589
  className: r,
590
590
  field: c
591
591
  }) {
592
- const a = Ut(), d = Xt();
592
+ const a = jt(), d = Ut();
593
593
  let u = null;
594
594
  const i = {};
595
595
  if (t === "asc" ? u = d.slots.columnSortedAscendingIcon : t === "desc" ? u = d.slots.columnSortedDescendingIcon : (u = d.slots.columnUnsortedIcon ?? null, i.sortingOrder = s), !u) return null;
@@ -597,7 +597,7 @@ function Lo({
597
597
  let _ = "";
598
598
  t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
599
599
  const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, y = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...i }), T = /* @__PURE__ */ e(
600
- qt,
600
+ Qt,
601
601
  {
602
602
  disabled: o,
603
603
  size: "small",
@@ -609,7 +609,7 @@ function Lo({
609
609
  children: y
610
610
  }
611
611
  );
612
- return /* @__PURE__ */ e(Io, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(Qt, { badgeContent: n, color: "default", overlap: "circular", children: T }) : T });
612
+ return /* @__PURE__ */ e(Io, { className: "MuiDataGrid-iconButtonContainer", children: n != null ? /* @__PURE__ */ e(Zt, { badgeContent: n, color: "default", overlap: "circular", children: T }) : T });
613
613
  }
614
614
  const Eo = g.memo(Lo), Qe = ({
615
615
  columns: t,
@@ -620,7 +620,7 @@ const Eo = g.memo(Lo), Qe = ({
620
620
  }) => {
621
621
  const c = re(), { onEvent: a } = $(), d = c.palette.mode === "light";
622
622
  return /* @__PURE__ */ e(
623
- Zt,
623
+ Xt,
624
624
  {
625
625
  columns: t,
626
626
  disableColumnFilter: !0,
@@ -793,10 +793,10 @@ const Eo = g.memo(Lo), Qe = ({
793
793
  x.end
794
794
  ), l = O.length ? D.filter(
795
795
  (b) => b.top_level_category_guid === O || b.category_guid === O
796
- ) : Vt(D);
796
+ ) : Pt(D);
797
797
  return {
798
- stackedDatasets: l.filter(zt),
799
- unstackedDatasets: l.filter(Ft)
798
+ stackedDatasets: l.filter(Ft),
799
+ unstackedDatasets: l.filter(Vt)
800
800
  };
801
801
  }, [h, O, x]), U = (D, l) => {
802
802
  V(l ?? P), o(v.TRENDS_CLICK_TOGGLE_VIEW);
@@ -900,8 +900,8 @@ const Eo = g.memo(Lo), Qe = ({
900
900
  ]
901
901
  }
902
902
  );
903
- }, as = A(ko), Ho = () => {
904
- const { monthlyCategoryTotals: t } = Q(), { trends: n } = R(), s = re(), { availableHeight: o = 300 } = nt(), r = g.useMemo(() => $t(t), [t]);
903
+ }, is = A(ko), Ho = () => {
904
+ const { monthlyCategoryTotals: t } = Q(), { trends: n } = R(), s = re(), { availableHeight: o = 300 } = st(), r = g.useMemo(() => zt(t), [t]);
905
905
  return /* @__PURE__ */ e(
906
906
  Ve,
907
907
  {
@@ -928,7 +928,7 @@ const Eo = g.memo(Lo), Qe = ({
928
928
  }), g.useEffect(() => {
929
929
  a && s && r(u).finally();
930
930
  }, [s, a, u]), !s || !a || !c ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
931
- Jt,
931
+ qt,
932
932
  {
933
933
  contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
934
934
  onPrimaryCtaClick: t,
@@ -939,7 +939,7 @@ const Eo = g.memo(Lo), Qe = ({
939
939
  children: /* @__PURE__ */ e(No, {})
940
940
  }
941
941
  );
942
- }, is = A(Wo), Oo = 70, qe = ({
942
+ }, ls = A(Wo), Oo = 70, qe = ({
943
943
  title: t,
944
944
  totalAmount: n,
945
945
  transactionType: s,
@@ -947,7 +947,7 @@ const Eo = g.memo(Lo), Qe = ({
947
947
  secondaryLabel: r,
948
948
  shouldDisplayPercentage: c
949
949
  }) => {
950
- const { availableWidth: a } = nt(), d = g.useRef(null), u = g.useRef(null), i = Ot(Number(Math.abs(o)), {
950
+ const { availableWidth: a } = st(), d = g.useRef(null), u = g.useRef(null), i = Ot(Number(Math.abs(o)), {
951
951
  style: "percent",
952
952
  minimumIntegerDigits: 1
953
953
  }), f = a === 288 && se(n, "0,0.00").length > 10 ? se(n, "0,0") : se(n, "0,0.00"), m = s === "spending" ? o > 0 : o >= 0, _ = s === "spending" ? "error.main" : "success.main", h = s === "spending" ? "success.main" : "text.secondary", p = d?.current, y = u?.current, T = p && y ? p.scrollWidth > y.clientWidth - Oo : !1;
@@ -975,7 +975,7 @@ const Eo = g.memo(Lo), Qe = ({
975
975
  children: [
976
976
  /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
977
977
  c && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
978
- m ? /* @__PURE__ */ e(to, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(oo, { size: 20, sx: { color: h } }),
978
+ m ? /* @__PURE__ */ e(eo, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(to, { size: 20, sx: { color: h } }),
979
979
  /* @__PURE__ */ e(
980
980
  pe,
981
981
  {
@@ -1026,19 +1026,19 @@ const Eo = g.memo(Lo), Qe = ({
1026
1026
  }, Go = A(() => {
1027
1027
  const { trends: t } = R();
1028
1028
  return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
1029
- /* @__PURE__ */ e(no, { size: 32 }),
1029
+ /* @__PURE__ */ e(oo, { size: 32 }),
1030
1030
  /* @__PURE__ */ C(S, { children: [
1031
1031
  /* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
1032
1032
  /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
1033
1033
  ] })
1034
1034
  ] });
1035
- }), ls = A(({ onCtaClick: t }) => {
1035
+ }), cs = A(({ onCtaClick: t }) => {
1036
1036
  const { isAccountDataLoaded: n, loadAccountData: s, visibleAccounts: o } = De();
1037
1037
  g.useEffect(() => {
1038
1038
  n || s().finally();
1039
1039
  }, []);
1040
1040
  const { onEvent: r } = $(), { monthlyCategoryTotals: c, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: d } = Q(), u = {
1041
- start: eo(/* @__PURE__ */ new Date(), 1),
1041
+ start: Jt(/* @__PURE__ */ new Date(), 1),
1042
1042
  end: /* @__PURE__ */ new Date()
1043
1043
  }, { trends: i } = R(), { selectedAccounts: f, isInitialized: m } = fe();
1044
1044
  Ie({
@@ -1063,7 +1063,7 @@ const Eo = g.memo(Lo), Qe = ({
1063
1063
  ), t();
1064
1064
  };
1065
1065
  return !d || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
1066
- lo,
1066
+ io,
1067
1067
  {
1068
1068
  className: "mx-trends-microwidget",
1069
1069
  ctaLabel: i.micro_primary_cta_label,
@@ -1109,14 +1109,14 @@ const Eo = g.memo(Lo), Qe = ({
1109
1109
  }), Bo = A(
1110
1110
  ({ isExpanded: t, onClick: n }) => {
1111
1111
  const s = gt();
1112
- return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(uo, { onClick: n, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1112
+ return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(co, { onClick: n, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
1113
1113
  S,
1114
1114
  {
1115
1115
  sx: { color: s.palette.primary.main, flexDirection: "row", alignItems: "center" },
1116
1116
  children: [
1117
1117
  /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(z, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
1118
- /* @__PURE__ */ e(mo, { sx: { color: s.palette.primary.main }, children: t ? /* @__PURE__ */ e(so, {}) : /* @__PURE__ */ e(
1119
- ro,
1118
+ /* @__PURE__ */ e(uo, { sx: { color: s.palette.primary.main }, children: t ? /* @__PURE__ */ e(no, {}) : /* @__PURE__ */ e(
1119
+ so,
1120
1120
  {
1121
1121
  sx: {
1122
1122
  transition: "transform 0.3s ease-in-out",
@@ -1146,7 +1146,7 @@ const Eo = g.memo(Lo), Qe = ({
1146
1146
  };
1147
1147
  return /* @__PURE__ */ C(g.Fragment, { children: [
1148
1148
  /* @__PURE__ */ e(
1149
- Pt,
1149
+ mo,
1150
1150
  {
1151
1151
  leftIcon: n ? /* @__PURE__ */ e(
1152
1152
  we,
@@ -1161,7 +1161,7 @@ const Eo = g.memo(Lo), Qe = ({
1161
1161
  ) : void 0,
1162
1162
  onClick: m,
1163
1163
  rightContent: se(Math.abs(t), "0,0.00"),
1164
- rightIcon: r ? /* @__PURE__ */ e(ao, {}) : void 0,
1164
+ rightIcon: r ? /* @__PURE__ */ e(ro, {}) : void 0,
1165
1165
  subtitle: f,
1166
1166
  title: s
1167
1167
  }
@@ -1195,7 +1195,7 @@ const Eo = g.memo(Lo), Qe = ({
1195
1195
  p.guid
1196
1196
  )),
1197
1197
  /* @__PURE__ */ e(
1198
- co,
1198
+ lo,
1199
1199
  {
1200
1200
  component: "li",
1201
1201
  in: i,
@@ -1224,7 +1224,7 @@ const Eo = g.memo(Lo), Qe = ({
1224
1224
  n?.(T), s(v.TRENDS_CLICK_INSIGHT, W);
1225
1225
  }, h = i ? 200 : 170, p = i ? 170 : 124, y = t.length > 0 ? h : p;
1226
1226
  return /* @__PURE__ */ e(ho, { sx: { height: y }, children: /* @__PURE__ */ e(
1227
- jt,
1227
+ Yt,
1228
1228
  {
1229
1229
  areBeatsLoading: a.isLoading,
1230
1230
  beats: t,
@@ -1277,7 +1277,7 @@ const Eo = g.memo(Lo), Qe = ({
1277
1277
  }
1278
1278
  ) });
1279
1279
  }), $o = A(() => {
1280
- const t = gt(), { is_mobile_webview: n } = st(), { isDesktop: s, isSmallTablet: o, isTablet: r } = Z(), { common: c, trends: a } = R(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = ve(), [f, m] = g.useState(null);
1280
+ const t = gt(), { is_mobile_webview: n } = rt(), { isDesktop: s, isSmallTablet: o, isTablet: r } = Z(), { common: c, trends: a } = R(), { selectedCategoryData: d, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: i } = ve(), [f, m] = g.useState(null);
1281
1281
  if (!d)
1282
1282
  return null;
1283
1283
  const { guid: _, name: h, is_income: p, totalAmount: y } = d, T = Oe(_, t), N = p ? a.income_label : a.spending_label, x = ` ${d.transactions.length === 1 ? a.transaction : a.transactions} (${d.transactions.length})`, L = g.useMemo(
@@ -1417,7 +1417,7 @@ const Eo = g.memo(Lo), Qe = ({
1417
1417
  onInsightCardClick: s,
1418
1418
  sx: o
1419
1419
  }) => {
1420
- const { onEvent: r } = $(), { config: c } = st(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Z(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
1420
+ const { onEvent: r } = $(), { config: c } = rt(), { isDesktop: a, isLargeDesktop: d, isMobile: u } = Z(), { isAccountDataLoaded: i, loadAccountData: f, visibleAccounts: m } = De(), {
1421
1421
  categoriesLoaded: _,
1422
1422
  loadCategories: h,
1423
1423
  loadDateRangeCategoryTotals: p,
@@ -1528,7 +1528,7 @@ const Eo = g.memo(Lo), Qe = ({
1528
1528
  }
1529
1529
  ),
1530
1530
  /* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(H, { flexGrow: 1, children: ne && /* @__PURE__ */ C(Te, { onClick: xt, sx: { p: 0, pr: 5 }, children: [
1531
- /* @__PURE__ */ e(io, {}),
1531
+ /* @__PURE__ */ e(ao, {}),
1532
1532
  V.all_categories
1533
1533
  ] }) }) }),
1534
1534
  Fe && /* @__PURE__ */ e(
@@ -1605,11 +1605,10 @@ const Eo = g.memo(Lo), Qe = ({
1605
1605
  ]
1606
1606
  }
1607
1607
  );
1608
- }, cs = A(Qo);
1608
+ }, ds = A(Qo);
1609
1609
  export {
1610
- as as TrendsFullWidget,
1611
- ls as TrendsMicroWidget,
1612
- is as TrendsMiniWidget,
1613
- ms as TrendsStore,
1614
- cs as TrendsWidget
1610
+ is as TrendsFullWidget,
1611
+ cs as TrendsMicroWidget,
1612
+ ls as TrendsMiniWidget,
1613
+ ds as TrendsWidget
1615
1614
  };
@@ -1,5 +1,5 @@
1
1
  import { MonthlyCategoryTotals } from '../../core';
2
- import { StackedLineChartData } from './TrendsData';
2
+ import { StackedLineChartData } from '../../core/utils/TrendsUtil';
3
3
  type TotalsData = MonthlyCategoryTotals | StackedLineChartData;
4
4
  export declare const isIncome: (totals: TotalsData) => boolean;
5
5
  export declare const isExpense: (totals: TotalsData) => boolean;
@@ -1,6 +1,6 @@
1
1
  import e from "react";
2
2
  import { g as s } from "./AccountDisplayName-CO7z3v99.mjs";
3
- import { a as n } from "./hooks-RzCoiTd0.mjs";
3
+ import { a as n } from "./hooks-BaO_gOI6.mjs";
4
4
  const i = (o) => {
5
5
  const { config: a } = n();
6
6
  return e.useMemo(
@@ -1,5 +1,5 @@
1
1
  import { useState as n, useEffect as a } from "react";
2
- import { f as o } from "./hooks-RzCoiTd0.mjs";
2
+ import { f as o } from "./hooks-BaO_gOI6.mjs";
3
3
  const f = () => {
4
4
  const { isInitialized: e, appDataStore: t } = o(), [s, i] = n(!1);
5
5
  return a(() => {
@@ -1,5 +1,5 @@
1
1
  import { useRef as r, useEffect as c } from "react";
2
- import { g as l } from "./hooks-RzCoiTd0.mjs";
2
+ import { g as l } from "./hooks-BaO_gOI6.mjs";
3
3
  let n = !0;
4
4
  const d = ({ widgetName: i, isLoaded: u = !0 }) => {
5
5
  const { onEvent: o } = l(), t = r(null), s = r(!1), e = r(!1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "8.1.10",
3
+ "version": "8.2.0-alpha.bb0",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,19 +0,0 @@
1
- import { F as s, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
2
- class r {
3
- fetchInstance;
4
- constructor(t, c, n) {
5
- this.fetchInstance = new s(t, c, void 0, n);
6
- }
7
- createAccount = async (t) => this.fetchInstance.post(e.ACCOUNTS, t).then((c) => c.account).catch((c) => c);
8
- deleteAccount = async (t) => this.fetchInstance.delete(`${e.ACCOUNTS}/${t}`).catch((c) => c);
9
- getAccounts = async () => this.fetchInstance.get(e.ACCOUNTS).then((t) => t.accounts).catch((t) => t);
10
- getInstitutions = async () => this.fetchInstance.get(e.INSTITUTIONS).then((t) => t).catch((t) => t);
11
- getMembers = async () => this.fetchInstance.get(e.MEMBERS).then((t) => t.members).catch((t) => t);
12
- getMonthlyAccountBalances = async (t) => this.fetchInstance.get(`${e.ACCOUNTS}/${t}/monthly_account_balances`).then((c) => c.monthly_account_balances).catch((c) => c);
13
- mergeAccounts = async (t) => this.fetchInstance.put(`${e.ACCOUNTS}/merge`, { accounts: t }).then((c) => c).catch((c) => c);
14
- refreshAllMembers = async () => this.fetchInstance.get(`${e.MEMBERS}/refresh_all`).then((t) => t).catch((t) => t);
15
- updateAccount = async (t) => this.fetchInstance.put(`${e.ACCOUNTS}/${t.guid}`, t).then((c) => c.account).catch((c) => c);
16
- }
17
- export {
18
- r as A
19
- };
@@ -1,253 +0,0 @@
1
- import { makeAutoObservable as h, runInAction as a } from "mobx";
2
- import { i as g } from "./BudgetUtil-H9igoNVm.mjs";
3
- import { A as d } from "./AccountApi-WEM2M9tg.mjs";
4
- import { d as p } from "./Accounts-DX3xJE97.mjs";
5
- import { A as s, d as u } from "./Account-CMjOp7S2.mjs";
6
- class m {
7
- isLoading = !1;
8
- selectedAccount = {};
9
- selectedMember = {};
10
- constructor() {
11
- h(this);
12
- }
13
- setIsLoading = (t) => this.isLoading = t;
14
- setSelectedAccount = (t) => this.selectedAccount = t;
15
- setSelectedMember = (t) => this.selectedMember = t;
16
- }
17
- class E {
18
- globalStore;
19
- api = new d("/", "");
20
- accounts = [];
21
- accountsLoaded = !1;
22
- accountsLoading = !1;
23
- institutions = [];
24
- institutionsLoaded = !1;
25
- institutionsLoading = !1;
26
- members = [];
27
- membersLoaded = !1;
28
- membersLoading = !1;
29
- uiStore;
30
- constructor(t) {
31
- this.globalStore = t, this.uiStore = new m(), this.api = new d(t.endpoint, t.sessionToken, t.onError), h(this);
32
- }
33
- loadAccountData = async () => {
34
- await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
35
- };
36
- get isAccountDataLoaded() {
37
- return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
38
- }
39
- get detailedAccounts() {
40
- const t = this.globalStore.userStore.userFeatures, e = g(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS"), c = this.globalStore.appConfig.config.display_only_external_accounts_in_accounts && this.globalStore.appConfig.options.subtype === "accounts";
41
- return p(
42
- this.accounts,
43
- this.institutions,
44
- this.members,
45
- e,
46
- c
47
- );
48
- }
49
- get accountsByTypeMap() {
50
- return this.detailedAccounts.reduce((t, e) => {
51
- const c = e.account_type;
52
- let n = t.get(c);
53
- return n || (n = []), n.push(e), t.set(c, n), t;
54
- }, /* @__PURE__ */ new Map());
55
- }
56
- get cashAccounts() {
57
- return this.detailedAccounts.filter(
58
- (t) => t.account_type === s.CASH || t.account_type === s.CHECKING || t.account_type === s.PREPAID || t.account_type === s.SAVINGS || t.account_type === s.CHECKING_LINE_OF_CREDIT
59
- );
60
- }
61
- get cashBalance() {
62
- return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
63
- }
64
- get checkingAccounts() {
65
- return this.detailedAccounts.filter((t) => t.account_type === s.CHECKING);
66
- }
67
- get debtAccounts() {
68
- return this.detailedAccounts.filter(
69
- (t) => t.account_type === s.CREDIT_CARD || t.account_type === s.LOAN || t.account_type === s.MORTGAGE || t.account_type === s.LINE_OF_CREDIT || t.account_type === s.CHECKING_LINE_OF_CREDIT
70
- );
71
- }
72
- get finstrongAccounts() {
73
- const t = /* @__PURE__ */ new Set([
74
- s.CHECKING,
75
- s.SAVINGS,
76
- s.CREDIT_CARD,
77
- s.INVESTMENT
78
- ]);
79
- return this.detailedAccounts.filter((e) => t.has(e.account_type));
80
- }
81
- get investmentAccounts() {
82
- return this.detailedAccounts.filter(
83
- (t) => t.account_type === s.INVESTMENT
84
- );
85
- }
86
- get manualAccounts() {
87
- return this.detailedAccounts.filter((t) => t.is_manual);
88
- }
89
- get savingsAccounts() {
90
- return this.detailedAccounts.filter((t) => t.account_type === s.SAVINGS);
91
- }
92
- get retirementAccounts() {
93
- return this.detailedAccounts.filter(
94
- (t) => t.account_type === s.INVESTMENT || t.account_type === s.SAVINGS || t.account_type === s.CHECKING || t.account_type === s.CASH || t.account_type === s.PROPERTY || t.account_type === s.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
95
- );
96
- }
97
- get visibleAccounts() {
98
- return this.detailedAccounts.filter((t) => !t.is_hidden && !t.is_closed);
99
- }
100
- get visibleCashAccounts() {
101
- return this.cashAccounts.filter((t) => !t.is_hidden);
102
- }
103
- get visibleCashBalance() {
104
- return this.visibleCashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
105
- }
106
- get visibleCheckingAccounts() {
107
- return this.checkingAccounts.filter((t) => !t.is_hidden);
108
- }
109
- get visibleDebtAccounts() {
110
- return this.debtAccounts.filter((t) => !t.is_hidden);
111
- }
112
- get visibleFinstrongAccounts() {
113
- return this.finstrongAccounts.filter(
114
- (t) => !(t.is_closed || t.is_deleted || t.is_hidden)
115
- );
116
- }
117
- get visibleRetirementAccounts() {
118
- return this.retirementAccounts.filter((t) => !t.is_hidden);
119
- }
120
- get visibleInvestmentAccounts() {
121
- return this.investmentAccounts.filter((t) => !t.is_hidden);
122
- }
123
- get visibleSavingsAccounts() {
124
- return this.savingsAccounts.filter((t) => !t.is_hidden);
125
- }
126
- get savingsAndCheckingAccountsBalance() {
127
- return this.savingsAndCheckingAccounts.reduce(
128
- (e, c) => e + (c?.balance || 0),
129
- 0
130
- );
131
- }
132
- get savingsAndCheckingAccounts() {
133
- return this.accounts.filter(
134
- (e) => e.account_type === s.SAVINGS || e.account_type === s.CHECKING
135
- );
136
- }
137
- setAccounts = (t) => {
138
- this.accounts = t, this.accountsLoading = !1, this.accountsLoaded = !0;
139
- };
140
- setMembers = (t) => {
141
- this.members = t, this.membersLoading = !1, this.membersLoaded = !0;
142
- };
143
- setInstitutions = (t) => {
144
- this.institutions = t, this.institutionsLoading = !1, this.institutionsLoaded = !0;
145
- };
146
- addAccount = async (t) => {
147
- try {
148
- const e = await this.api.createAccount(t);
149
- a(() => {
150
- this.accounts = [...this.accounts, e];
151
- });
152
- } catch (e) {
153
- console.error(`Error occurred while adding an account: ${e}`);
154
- }
155
- };
156
- loadAccounts = async () => {
157
- if (!this.accountsLoading) {
158
- this.accountsLoading = !0;
159
- try {
160
- const t = await this.api.getAccounts();
161
- this.setAccounts(t);
162
- } catch (t) {
163
- console.error(`Error occurred while loading accounts: ${t}`);
164
- }
165
- }
166
- };
167
- loadInstitutions = async () => {
168
- if (!this.institutionsLoading) {
169
- this.institutionsLoading = !0;
170
- try {
171
- const t = await this.api.getInstitutions();
172
- this.setInstitutions(t);
173
- } catch (t) {
174
- console.error(`Error occurred while loading institutions: ${t}`);
175
- }
176
- }
177
- };
178
- loadMembers = async () => {
179
- if (!this.membersLoading) {
180
- this.membersLoading = !0;
181
- try {
182
- const t = await this.api.getMembers();
183
- this.setMembers(t);
184
- } catch (t) {
185
- console.error(`Error occurred while loading members: ${t}`);
186
- }
187
- }
188
- };
189
- mergeAccounts = async (t) => {
190
- try {
191
- const e = await this.api.mergeAccounts(t), c = e[Object.keys(e)[0]];
192
- a(() => {
193
- const n = this.accounts.findIndex((i) => i.guid === t[1]);
194
- this.accounts.splice(n, 1);
195
- const o = this.accounts.findIndex((i) => i.guid === t[0]);
196
- this.accounts.splice(o, 1, c);
197
- });
198
- } catch (e) {
199
- console.error(`Error occurred while merging accounts: ${e}`);
200
- }
201
- };
202
- refreshAccounts = async () => {
203
- this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions(), this.loadMembers()]), this.uiStore.setIsLoading(!1);
204
- };
205
- refreshMembers = async () => {
206
- try {
207
- await this.api.refreshAllMembers();
208
- } catch (t) {
209
- console.error(`Error occurredwhile refreshing members: ${t}`);
210
- }
211
- };
212
- removeAccount = async (t) => {
213
- try {
214
- await this.api.deleteAccount(t);
215
- const e = this.accounts.findIndex((c) => c.guid === t);
216
- this.accounts.splice(e, 1);
217
- } catch (e) {
218
- console.error(`Error occurred while removing an account: ${e}`);
219
- }
220
- };
221
- updateAccount = async (t) => {
222
- try {
223
- const e = await this.api.updateAccount(t), c = this.accounts.findIndex(
224
- (n) => n.guid === e.guid
225
- );
226
- this.accounts.splice(c, 1, e);
227
- } catch (e) {
228
- console.error(`Error occurred while updating account: ${e}`);
229
- }
230
- };
231
- updateAccountBalance = (t, e) => {
232
- const c = this.accounts.find((n) => n.guid === t);
233
- c && a(() => {
234
- c.balance = (c.balance || 0) + e;
235
- });
236
- };
237
- updateAccountFilter = async (t) => {
238
- const e = [];
239
- for (const [o, i] of t.entries()) {
240
- const r = this.accounts.find((A) => A.guid === o);
241
- r && r.is_excluded_from_accounts === i && (r.is_excluded_from_accounts = !i, e.push(this.api.updateAccount(r)));
242
- }
243
- const c = await Promise.all(e), n = [...this.accounts];
244
- for (const o of c) {
245
- const i = n.findIndex((r) => r.guid === o.guid);
246
- i !== -1 && n.splice(i, 1, o);
247
- }
248
- this.setAccounts(n);
249
- };
250
- }
251
- export {
252
- E as A
253
- };