@mx-cartographer/experiences 8.1.12 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
  3. package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
  4. package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +21 -21
  5. package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
  6. package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-BYyeeCf6.mjs} +7 -7
  7. package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
  8. package/dist/{Analytics-CxK7O19c.mjs → Analytics-CkYXKvco.mjs} +1 -1
  9. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  10. package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
  11. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  12. package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +2 -2
  13. package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
  14. package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
  15. package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
  16. package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
  17. package/dist/CurrencyDialog-d4dL7vA5.mjs +371 -0
  18. package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-B59ugxPN.mjs} +15 -16
  19. package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
  20. package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-HudZ3Bjs.mjs} +6 -7
  21. package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
  22. package/dist/DebtUtils-DD3186U-.mjs +153 -0
  23. package/dist/EmbeddedCard-BNl3quCs.mjs +856 -0
  24. package/dist/Error-Dogaw2jO.mjs +84 -0
  25. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  26. package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-hDprC41l.mjs} +6 -5
  27. package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
  28. package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
  29. package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
  30. package/dist/{Help-C_CM4gpK.mjs → Help-BSQm9o29.mjs} +68 -67
  31. package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
  32. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  33. package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-CejWS_rh.mjs} +2 -2
  34. package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
  35. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  36. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  37. package/dist/Localization-DnoVyBNK.mjs +38 -0
  38. package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-DwylSiWs.mjs} +51 -51
  39. package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
  40. package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
  41. package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
  42. package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-CCg-Tml2.mjs} +13 -13
  43. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  44. package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
  45. package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +4 -4
  46. package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-CPXLW6AR.mjs} +9 -9
  47. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
  48. package/dist/Select-BZRUpOib.mjs +51 -0
  49. package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
  50. package/dist/Sizes-DISGrlUg.mjs +6 -0
  51. package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-PKlh8caU.mjs} +6 -6
  52. package/dist/{SpendingLegend-BS8mHUbu.mjs → SpendingLegend-BmkEr9Nh.mjs} +4 -4
  53. package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-CbBSxdOi.mjs} +33 -33
  54. package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
  55. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  56. package/dist/UserStore-CRpKQjpP.mjs +3002 -0
  57. package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +28 -30
  58. package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-DalWyz5A.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 +62 -64
  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 +20 -20
  74. package/dist/common/index.d.ts +3 -1
  75. package/dist/common/index.es.js +215 -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 +94 -79
  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 +3 -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 +92 -96
  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
@@ -1,250 +0,0 @@
1
- import { makeAutoObservable as w, runInAction as s } from "mobx";
2
- import { S as g } from "./SettingsApi-D9d7SLhB.mjs";
3
- import { I as i, A as n, B as u } from "./Notification-DTNYSd8P.mjs";
4
- import { T as m } from "./TransactionApi-CLG2eSNe.mjs";
5
- const y = "PARENT-ENTITY", D = (c, e) => ({
6
- [u.BudgetExceeded]: e.notification_budget_exceeded,
7
- [u.BudgetOffTarget]: e.notification_budget_off_target,
8
- [n.DebtPaymentReminder]: e.notification_debt_payment_reminder,
9
- [n.AccountBalanceLow]: e.notification_low_balance,
10
- [n.AccountDepositLargePosted]: e.notification_large_deposit,
11
- [n.AccountDepositLarge]: e.notification_large_deposit,
12
- [n.TransactionExpenseLarge]: e.notification_large_expense,
13
- [n.TransactionFeeCharge]: e.notification_transaction_fee,
14
- [n.InternationalTransaction]: e.notification_transaction_is_international,
15
- [i.AccountBalanceLow]: e.account_balance_low,
16
- [i.BillAmountNotStandard]: e.bill_amount_not_standard,
17
- [i.CategorySpending]: e.category_spending,
18
- [i.CreditCardCloseToLimit]: e.credit_card_close_to_limit,
19
- [i.DebtPaymentReminder]: e.debt_payment_reminder,
20
- [i.DuplicatePayment]: e.duplicate_payment,
21
- [i.MonthlySpendComparison]: e.monthly_spend_comparison,
22
- [i.MonthlySpendToIncomeComparison]: e.monthly_spend_to_income_comparison,
23
- [i.MonthlySubscriptionAggregate]: e.monthly_subscription_aggregate,
24
- [i.MonthlyTopMerchantSpending]: e.monthly_top_merchant_spending,
25
- [i.SaveAnExtra100Dollars]: e.save_an_extra_100_dollars,
26
- [i.SavingsOpportunity]: e.savings_opportunity,
27
- [i.SetUpDirectDeposit]: e.set_up_direct_deposit,
28
- [i.SwitchDirectDeposit]: e.switch_direct_deposit,
29
- [i.UncategorizedTransactions]: e.uncategorized_transactions,
30
- [i.UnifiedDeposit]: e.unified_deposit,
31
- [i.UpcomingBill]: e.upcoming_bill,
32
- [i.WeekendSpendingSummary]: e.weekend_spending_summary,
33
- [i.WeeklyNewMerchants]: e.weekly_new_merchants,
34
- [i.DiscoveredAccounts]: e.discovered_account,
35
- [i.TransactionExpenseLarge]: e.large_transaction,
36
- [i.PromotionalCampaignMessages]: e.promotional_campaign_messages,
37
- [i.TransparentOverdraft]: e.transparent_overdraft
38
- })[c] || "", R = (c, e, t, o, l, h) => {
39
- const p = [], {
40
- email_notifications_enabled: v,
41
- sms_notifications_enabled: b,
42
- push_notifications_enabled: P
43
- } = e, {
44
- opted_out_of_email_notifications: T,
45
- opted_out_of_sms_notifications: A,
46
- opted_out_of_push_notifications: S
47
- } = l;
48
- for (const r of o.filter((d) => d.entity_guid === y)) {
49
- const d = D(r.notification_type, t), E = o.filter(
50
- (a) => a.entity_guid !== y && a.notification_type === r.notification_type && c.some((f) => f.guid === a.entity_guid)
51
- ), _ = [];
52
- v && !T && r.email_channel && h.email && _.push(t.delivery_method_email_label), b && !A && r.sms_channel && h.phone && _.push(t.delivery_method_sms_label), P && !S && r.push_channel && _.push(t.delivery_method_push_label), p.push({
53
- ...r,
54
- children: E.map((a) => ({
55
- ...a,
56
- account: c.find((f) => f.guid === a.entity_guid),
57
- label: d
58
- })),
59
- deliveryMethodsLabel: _.join(", "),
60
- label: d
61
- });
62
- }
63
- return p;
64
- };
65
- class L {
66
- globalStore;
67
- api = new g("/", "");
68
- transactionApi = new m("/", "");
69
- alert = { message: "", severity: void 0 };
70
- devices = [];
71
- notificationProfiles = [];
72
- selectedRule = void 0;
73
- transactionRules = [];
74
- constructor(e) {
75
- this.globalStore = e, this.api = new g(e.endpoint, e.sessionToken, e.onError), this.transactionApi = new m(
76
- e.endpoint,
77
- e.sessionToken,
78
- e.onError
79
- ), w(this);
80
- }
81
- get accountProfiles() {
82
- const e = this.globalStore.appDataStore.clientCommunicationProfile;
83
- return this.detailedNotificationProfiles.filter(
84
- (t) => t.notification_type === n.DebtPaymentReminder && e.debt_payment_reminder_notifications_enabled || t.notification_type === n.AccountBalanceLow && e.low_balance_notifications_enabled || t.notification_type === n.AccountDepositLarge && e.large_deposit_notifications_enabled || t.notification_type === n.TransactionExpenseLarge && e.large_expense_notifications_enabled || t.notification_type === n.TransactionFeeCharge && e.transaction_fee_notifications_enabled || t.notification_type === n.InternationalTransaction && e.transaction_is_international_notifications_enabled || t.notification_type === n.AccountDepositLargePosted && e.large_deposit_posted_notifications_enabled
85
- );
86
- }
87
- get budgetProfiles() {
88
- const e = this.globalStore.appDataStore.clientCommunicationProfile;
89
- return this.detailedNotificationProfiles.filter(
90
- (t) => t.notification_type === u.BudgetExceeded && e.budget_exceeded_notifications_enabled || t.notification_type === u.BudgetOffTarget && e.budget_off_target_notifications_enabled
91
- );
92
- }
93
- get insightsProfiles() {
94
- return this.detailedNotificationProfiles.filter(
95
- (e) => Object.values(i).includes(e.notification_type)
96
- );
97
- }
98
- get clientCommunicationProfile() {
99
- return this.globalStore.appDataStore.clientCommunicationProfile;
100
- }
101
- get copy() {
102
- return this.globalStore.copyStore.copy.settings;
103
- }
104
- get detailedNotificationProfiles() {
105
- return this.globalStore.isInitialized ? R(
106
- this.globalStore.accountStore.accounts,
107
- this.clientCommunicationProfile,
108
- this.copy,
109
- this.notificationProfiles,
110
- this.userCommunicationsProfile,
111
- this.globalStore.userStore.user
112
- ) : [];
113
- }
114
- get userCommunicationsProfile() {
115
- return this.globalStore.appDataStore.userCommunicationProfile;
116
- }
117
- deleteDevice = async (e) => {
118
- try {
119
- await this.api.deleteDevice(e);
120
- const t = this.devices.findIndex((o) => o.guid === e);
121
- return t >= 0 && s(() => {
122
- this.devices.splice(t, 1);
123
- }), { success: !0 };
124
- } catch {
125
- return console.error(`Error deleting device: ${e}`), { success: !1 };
126
- }
127
- };
128
- deleteTransactionRule = async () => {
129
- this.selectedRule && this.transactionApi.removeTransactionRule(this.selectedRule?.guid).then(() => {
130
- this.setAlert(this.copy.delete_rule_success, "success"), this.loadTransactionRules();
131
- }).catch(() => {
132
- this.setAlert(this.copy.delete_rule_error, "error");
133
- });
134
- };
135
- generateDeviceToken = async () => {
136
- try {
137
- return await this.api.generateDeviceToken();
138
- } catch (e) {
139
- console.error(`Error generating device token: ${e}`);
140
- }
141
- };
142
- loadDevices = async () => {
143
- try {
144
- const e = await this.api.getDevices();
145
- s(() => {
146
- this.devices = e;
147
- });
148
- } catch (e) {
149
- console.error(`Error loading devices: ${e}`);
150
- }
151
- };
152
- loadNotificationProfiles = async () => {
153
- try {
154
- const e = await this.api.getNotificationProfiles();
155
- s(() => {
156
- this.notificationProfiles = e;
157
- });
158
- } catch (e) {
159
- console.error(`Error loading notification profiles: ${e}`);
160
- }
161
- };
162
- loadTransactionRules = async () => {
163
- try {
164
- const e = await this.transactionApi.getTransactionRules();
165
- s(() => {
166
- this.transactionRules = e;
167
- });
168
- } catch (e) {
169
- console.error(`Error loading transaction rules: ${e}`);
170
- }
171
- };
172
- sendEmailVerification = async () => {
173
- try {
174
- await this.api.sendEmailVerification(), this.setAlert(this.copy.verification_sent_success, "success");
175
- } catch (e) {
176
- console.error(`Error sending email verification: ${e}`), this.setAlert(this.copy.verification_sent_error, "error");
177
- }
178
- };
179
- sendPhoneVerification = async () => {
180
- try {
181
- await this.api.sendPhoneVerification(), this.setAlert(this.copy.verification_sent_success, "success");
182
- } catch (e) {
183
- console.error(`Error sending phone verification: ${e}`), this.setAlert(this.copy.verification_sent_error, "error");
184
- }
185
- };
186
- setAlert = (e, t = void 0) => this.alert = { message: e, severity: t };
187
- setSelectedRule = (e) => {
188
- this.selectedRule = e;
189
- };
190
- updateDevice = async (e) => {
191
- try {
192
- const t = await this.api.updateDevice(e), o = this.devices.findIndex((l) => l.guid === e.guid);
193
- return o >= 0 && s(() => {
194
- this.devices[o] = t;
195
- }), { success: !0 };
196
- } catch (t) {
197
- return console.error(`Error updating device: ${t}`), { success: !1 };
198
- }
199
- };
200
- updateNotificationProfile = async (e) => {
201
- try {
202
- const t = await this.api.updateNotificationProfile(e), o = this.notificationProfiles.findIndex((l) => l.guid === e.guid);
203
- o >= 0 && s(() => {
204
- this.notificationProfiles[o] = t;
205
- });
206
- } catch (t) {
207
- console.error(`Error updating notification profile: ${t}`);
208
- }
209
- };
210
- updateRuleCategory = async (e) => {
211
- this.transactionApi.updateTransactionRule(e).then(() => {
212
- this.loadTransactionRules();
213
- });
214
- };
215
- updateRulePayee = async (e) => {
216
- this.transactionApi.updateTransactionRule(e).then(() => {
217
- this.setAlert(this.copy.edit_payee_success, "success"), this.loadTransactionRules();
218
- }).catch(() => {
219
- this.setAlert(this.copy.edit_payee_error, "error");
220
- });
221
- };
222
- updateUser = async (e) => {
223
- this.globalStore.userStore.updateUser(e).then(() => {
224
- this.setAlert(this.copy.information_updated_success, "success");
225
- }).catch(() => {
226
- this.setAlert(this.copy.information_updated_error, "error");
227
- });
228
- };
229
- updateUserCommunicationProfile = async (e) => {
230
- try {
231
- const t = await this.api.updateUserCommunicationProfile(e);
232
- this.globalStore.appDataStore.setUserCommunicationProfile(t);
233
- } catch (t) {
234
- console.error(`Error occurred while updating user communication profile: ${t}`);
235
- }
236
- };
237
- verifyPhoneToken = async (e) => {
238
- try {
239
- const { verified: t } = await this.api.verifyPhoneToken(e);
240
- if (!t)
241
- throw new Error();
242
- this.setAlert(this.copy.verified_phone_success, "success");
243
- } catch (t) {
244
- console.error(`Error verifying phone token: ${t}`), this.setAlert(this.copy.verified_phone_error, "error");
245
- }
246
- };
247
- }
248
- export {
249
- L as S
250
- };
@@ -1,5 +0,0 @@
1
- var E = /* @__PURE__ */ ((D) => (D[D.CREDIT = 1] = "CREDIT", D[D.DEBIT = 2] = "DEBIT", D))(E || {}), I = /* @__PURE__ */ ((D) => (D[D.POSTED = 1] = "POSTED", D[D.PENDING = 2] = "PENDING", D))(I || {});
2
- export {
3
- E as T,
4
- I as a
5
- };
@@ -1,86 +0,0 @@
1
- import { F as g, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
2
- class u {
3
- fetchInstance;
4
- constructor(n, t, a) {
5
- this.fetchInstance = new g(n, t, void 0, a);
6
- }
7
- addTag = async (n) => this.fetchInstance.post(e.TAGS, n).then((t) => t.tag).catch((t) => t);
8
- addTagging = async (n) => this.fetchInstance.post(e.TAGGINGS, n).then((t) => t.tagging).catch((t) => t);
9
- addTransaction = async (n) => this.fetchInstance.post(e.TRANSACTIONS, n).then((t) => t.transaction).catch((t) => t);
10
- addTransactionRule = async (n) => this.fetchInstance.post(e.TRANSACTION_RULES, n).then((t) => t).catch((t) => t);
11
- getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((n) => n.map((t) => t.tagging));
12
- getTags = async () => this.fetchInstance.get(e.TAGS).then((n) => n.map((t) => t.tag));
13
- getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((n) => n.transaction_rules);
14
- getTransactionsByDateRange = async (n, t) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${t}`).then((a) => a.map((c) => c.transaction));
15
- // DEPRECATED
16
- getTransactionsByAccountsAndDateRange = async (n, t, a) => {
17
- console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
18
- const c = n.reduce(
19
- (o, s, r) => `${o}account_guids[]=${s}${r !== n.length - 1 ? "&" : ""}`,
20
- ""
21
- );
22
- return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${a}?${c}`).then((o) => o.map((s) => s.transaction));
23
- };
24
- // DEPRECATED
25
- getTransactionsByGuids = async (n) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: n.join("+") }).then((t) => t.map((a) => a.transaction)));
26
- // DEPRECATED
27
- getTransactionsByCategoryAndDate = async (n, t, a) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
28
- `${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}`
29
- ).then((c) => c.map((o) => o.transaction)));
30
- // DEPRECATED
31
- getTransactionsByCategoryDateAndAccounts = async (n, t, a, c) => {
32
- console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
33
- const o = c.reduce(
34
- (s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
35
- ""
36
- );
37
- return this.fetchInstance.get(
38
- `${e.TRANSACTIONS}/by_category_guid/${n}/by_date/${t}/${a}?${o}`
39
- ).then((s) => s.map((r) => r.transaction));
40
- };
41
- // DEPRECATED
42
- getTransactionsByCategoriesDateAndAccounts = async (n, t, a, c) => {
43
- console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
44
- const o = c.reduce(
45
- (s, r, i) => `${s}account_guids[]=${r}${i !== c.length - 1 ? "&" : ""}`,
46
- ""
47
- );
48
- return this.fetchInstance.get(
49
- `${e.TRANSACTIONS}/by_category_guids/${n.join(
50
- "+"
51
- )}/by_date/${t}/${a}?${o}`
52
- ).then((s) => s.map((r) => r.transaction));
53
- };
54
- /**
55
- * DEPRECATED
56
- * Get all transactions by the top level category, between begin date and end date, and optionally
57
- * filtered by accounts
58
- * @param categoryGuid The top level category guid
59
- * @param beginDate the start date
60
- * @param endDate the end date
61
- * @param accountGuids an optional list of account guids
62
- */
63
- getTransactionsByTopLevelCategoryAndDate = async (n, t, a, c = []) => {
64
- console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
65
- let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${n}/by_date/${t}/${a}`;
66
- if (c.length > 0) {
67
- const s = c.reduce(
68
- (r, i, h) => `${r}account_guids[]=${i}${h !== c.length - 1 ? "&" : ""}`,
69
- ""
70
- );
71
- o += `?${s}`;
72
- }
73
- return this.fetchInstance.get(o).then((s) => s.map((r) => r.transaction));
74
- };
75
- removeTag = async (n) => this.fetchInstance.delete(`${e.TAGS}/${n}`).then((t) => t).catch((t) => t);
76
- removeTagging = async (n) => this.fetchInstance.delete(`${e.TAGGINGS}/${n}`).then((t) => t).catch((t) => t);
77
- removeTransaction = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}`).then((t) => t);
78
- removeTransactionRule = async (n) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${n}`).catch((t) => t);
79
- removeTransactionSplit = async (n) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${n}/unsplit`).then((t) => t).catch((t) => t);
80
- updateTransactionRule = async (n) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${n.guid}`, n).then((t) => t).catch((t) => t);
81
- updateTag = async (n) => this.fetchInstance.put(`${e.TAGS}/${n.guid}`, n).then((t) => t.tag).catch((t) => t);
82
- updateTransaction = async (n) => this.fetchInstance.put(`${e.TRANSACTIONS}/${n.guid}`, n).then((t) => t.transaction).catch((t) => t);
83
- }
84
- export {
85
- u as T
86
- };