@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,710 +0,0 @@
1
- import { jsx as I } from "react/jsx-runtime";
2
- import x from "@mui/material/Box";
3
- import P from "@mui/material/FormControlLabel";
4
- import B from "@mui/material/Radio";
5
- import H from "@mui/material/styles/useTheme";
6
- import K from "@mui/material/Tooltip";
7
- import { makeAutoObservable as f } from "mobx";
8
- import { endOfToday as O } from "date-fns/endOfToday";
9
- import { formatISO as V } from "date-fns/formatISO";
10
- import { getUnixTime as E } from "date-fns/getUnixTime";
11
- import { isBefore as U } from "date-fns/isBefore";
12
- import { startOfMonth as L } from "date-fns/startOfMonth";
13
- import { startOfToday as m } from "date-fns/startOfToday";
14
- import { subDays as v } from "date-fns/subDays";
15
- import { B as D } from "./BeatApi-C6pBa0Rb.mjs";
16
- import { O as n, f as Y } from "./exportTransactionsToCSV-CSvbZrvL.mjs";
17
- import { T as R } from "./TransactionApi-CLG2eSNe.mjs";
18
- import { a as y, T as b } from "./Transaction-Cn5_iFm0.mjs";
19
- import { b as F } from "./Category-Ccoew_sA.mjs";
20
- import { format as W } from "date-fns/format";
21
- import { fromUnixTime as $ } from "date-fns/fromUnixTime";
22
- import { f as C, D as u, O as k } from "./DateFormats-CaOj_4eI.mjs";
23
- import { f as z } from "./NumberFormatting-CyrvFgfd.mjs";
24
- import { endOfMonth as X } from "date-fns/endOfMonth";
25
- const ft = ({
26
- checked: l = !1,
27
- label: t,
28
- sx: a = {},
29
- tooltip: s = "",
30
- value: A
31
- }) => {
32
- const d = H(), e = d.palette.mode === "light" ? d.palette.grey[400] : d.palette.grey[700], c = l ? d.palette.action.active : e;
33
- return /* @__PURE__ */ I(
34
- x,
35
- {
36
- bgcolor: "background.paper",
37
- border: `${l ? 3 : 1}px solid`,
38
- borderColor: c,
39
- borderRadius: 2,
40
- mt: -2,
41
- mx: 8,
42
- pr: 8,
43
- py: 4,
44
- sx: { "&:hover": { borderColor: d.palette.action.active }, ...a },
45
- children: /* @__PURE__ */ I(K, { title: s, children: /* @__PURE__ */ I(
46
- P,
47
- {
48
- control: /* @__PURE__ */ I(
49
- B,
50
- {
51
- disableRipple: !0,
52
- sx: { "&.Mui-checked": { color: d.palette.action.active } }
53
- }
54
- ),
55
- label: t,
56
- labelPlacement: "start",
57
- sx: { ml: 0, pl: 8 },
58
- value: A
59
- }
60
- ) })
61
- }
62
- );
63
- }, G = {
64
- ASC: "ASC",
65
- DESC: "DESC"
66
- }, o = {
67
- ADD: "Add",
68
- ADD_CATEGORY: "Add Category",
69
- CHANGE_CATEGORY: "Change Category",
70
- CLOSE: "Close",
71
- DELETE: "Delete",
72
- EDIT: "Edit",
73
- SAVE: "Save",
74
- SPLIT: "Split",
75
- SELECT: "Select",
76
- UNSPLIT: "Unsplit"
77
- }, r = {
78
- TRANSACTION_DETAILS: "Transaction Details",
79
- TRANSACTIONS_LIST: "Transactions List",
80
- TRANSACTIONS_WIDGET: "Transactions Widget"
81
- }, T = {
82
- ADD_TRANSACTION: "Manual Transaction",
83
- CATEGORY: "Category",
84
- DATE: "Date",
85
- DELETE_MERCHANT_LOGO: "Merchant Logo",
86
- DELETE_TRANSACTION: "Delete Transaction",
87
- DESCRIPTION: "Description",
88
- EXPORT_CSV: "Export CSV",
89
- FLAG: "Flag",
90
- HIDE_TRANSACTION: "Exclude Transaction",
91
- MEMO: "Memo",
92
- SPLITS: "Split Transactions",
93
- TAGS: "Tags",
94
- TAG_ADD: "Add Tag",
95
- TAG_DELETE: "Delete Tag",
96
- TAG_EDIT: "Edit Tag",
97
- TRANSACTION: "Transaction",
98
- UNHIDE_TRANSACTION: "Include Transaction"
99
- }, p = {
100
- // splits
101
- [n.ON_TRANSACTION_SPLIT_CLICK]: {
102
- action: o.SELECT,
103
- category: r.TRANSACTION_DETAILS,
104
- label: T.SPLITS
105
- },
106
- [n.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
107
- action: o.ADD_CATEGORY,
108
- category: r.TRANSACTION_DETAILS,
109
- label: T.SPLITS
110
- },
111
- [n.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
112
- action: o.DELETE,
113
- category: r.TRANSACTION_DETAILS,
114
- label: T.SPLITS
115
- },
116
- [n.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
117
- action: o.SPLIT,
118
- category: r.TRANSACTION_DETAILS,
119
- label: T.SPLITS
120
- },
121
- [n.ON_TRANSACTION_UNSPLIT]: {
122
- action: o.UNSPLIT,
123
- category: r.TRANSACTION_DETAILS,
124
- label: T.SPLITS
125
- },
126
- // category
127
- [n.ON_TRANSACTION_CATEGORY_CLICK]: {
128
- action: o.SELECT,
129
- category: r.TRANSACTIONS_LIST,
130
- label: T.CATEGORY
131
- },
132
- [n.ON_TRANSACTION_CATEGORY_CHANGED]: {
133
- action: o.CHANGE_CATEGORY,
134
- category: r.TRANSACTION_DETAILS,
135
- label: T.CATEGORY
136
- },
137
- // date
138
- [n.ON_TRANSACTION_DATE_CHANGED]: {
139
- action: o.SAVE,
140
- category: r.TRANSACTION_DETAILS,
141
- label: T.DATE
142
- },
143
- [n.ON_TRANSACTION_DATE_CLICK]: {
144
- action: o.SELECT,
145
- category: r.TRANSACTION_DETAILS,
146
- label: T.DATE
147
- },
148
- // merchant logo
149
- [n.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
150
- action: o.CLOSE,
151
- category: r.TRANSACTION_DETAILS,
152
- label: T.DELETE_MERCHANT_LOGO
153
- },
154
- [n.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
155
- action: o.SELECT,
156
- category: r.TRANSACTION_DETAILS,
157
- label: T.DELETE_MERCHANT_LOGO
158
- },
159
- [n.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
160
- action: o.DELETE,
161
- category: r.TRANSACTION_DETAILS,
162
- label: T.DELETE_MERCHANT_LOGO
163
- },
164
- // description
165
- [n.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
166
- action: o.EDIT,
167
- category: r.TRANSACTION_DETAILS,
168
- label: T.DESCRIPTION
169
- },
170
- [n.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
171
- action: o.SAVE,
172
- category: r.TRANSACTION_DETAILS,
173
- label: T.DESCRIPTION
174
- },
175
- // hide transactions
176
- [n.ON_TRANSACTION_HIDDEN]: {
177
- action: o.SAVE,
178
- category: r.TRANSACTION_DETAILS,
179
- label: T.HIDE_TRANSACTION
180
- },
181
- [n.ON_TRANSACTION_HIDE_CLICK]: {
182
- action: o.SELECT,
183
- category: r.TRANSACTION_DETAILS,
184
- label: T.HIDE_TRANSACTION
185
- },
186
- [n.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
187
- action: o.CLOSE,
188
- category: r.TRANSACTION_DETAILS,
189
- label: T.HIDE_TRANSACTION
190
- },
191
- // transaction list
192
- [n.ON_TRANSACTION_LIST_ITEM_CLICK]: {
193
- action: o.SELECT,
194
- category: r.TRANSACTIONS_LIST,
195
- label: T.TRANSACTION
196
- },
197
- // memo
198
- [n.ON_TRANSACTION_MEMO_CHANGED]: {
199
- action: o.SAVE,
200
- category: r.TRANSACTION_DETAILS,
201
- label: T.MEMO
202
- },
203
- [n.ON_TRANSACTION_MEMO_CLICK]: {
204
- action: o.SELECT,
205
- category: r.TRANSACTION_DETAILS,
206
- label: T.MEMO
207
- },
208
- // tags
209
- [n.ON_TRANSACTION_TAGS_CHANGED]: {
210
- action: o.SAVE,
211
- category: r.TRANSACTION_DETAILS,
212
- label: T.TAGS
213
- },
214
- [n.ON_TRANSACTION_TAGS_CLICK]: {
215
- action: o.SELECT,
216
- category: r.TRANSACTION_DETAILS,
217
- label: T.TAGS
218
- },
219
- [n.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
220
- action: o.CLOSE,
221
- category: r.TRANSACTION_DETAILS,
222
- label: T.TAGS
223
- },
224
- [n.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
225
- action: o.ADD,
226
- category: r.TRANSACTION_DETAILS,
227
- label: T.TAG_ADD
228
- },
229
- [n.ON_TRANSACTION_TAGS_TAG_ADDED]: {
230
- action: o.SAVE,
231
- category: r.TRANSACTION_DETAILS,
232
- label: T.TAG_ADD
233
- },
234
- [n.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
235
- action: o.SELECT,
236
- category: r.TRANSACTION_DETAILS,
237
- label: T.TAG_DELETE
238
- },
239
- [n.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
240
- action: o.CLOSE,
241
- category: r.TRANSACTION_DETAILS,
242
- label: T.TAG_DELETE
243
- },
244
- [n.ON_TRANSACTION_TAGS_TAG_DELETED]: {
245
- action: o.SAVE,
246
- category: r.TRANSACTION_DETAILS,
247
- label: T.TAG_DELETE
248
- },
249
- [n.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
250
- action: o.EDIT,
251
- category: r.TRANSACTION_DETAILS,
252
- label: T.TAG_EDIT
253
- },
254
- [n.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
255
- action: o.SAVE,
256
- category: r.TRANSACTION_DETAILS,
257
- label: T.TAG_EDIT
258
- },
259
- // flag
260
- [n.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
261
- action: o.SELECT,
262
- category: r.TRANSACTION_DETAILS,
263
- label: T.FLAG
264
- },
265
- // hide
266
- [n.ON_TRANSACTION_UNHIDDEN]: {
267
- action: o.SAVE,
268
- category: r.TRANSACTION_DETAILS,
269
- label: T.UNHIDE_TRANSACTION
270
- },
271
- [n.ON_TRANSACTION_UNHIDE_CLICK]: {
272
- action: o.SELECT,
273
- category: r.TRANSACTION_DETAILS,
274
- label: T.UNHIDE_TRANSACTION
275
- },
276
- [n.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
277
- action: o.CLOSE,
278
- category: r.TRANSACTION_DETAILS,
279
- label: T.UNHIDE_TRANSACTION
280
- },
281
- // export CSV
282
- [n.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
283
- action: o.SELECT,
284
- category: r.TRANSACTIONS_WIDGET,
285
- label: T.EXPORT_CSV
286
- },
287
- // add transaction
288
- [n.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
289
- action: o.SELECT,
290
- category: r.TRANSACTIONS_WIDGET,
291
- label: T.ADD_TRANSACTION
292
- },
293
- [n.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
294
- action: o.ADD,
295
- category: r.TRANSACTIONS_WIDGET,
296
- label: T.ADD_TRANSACTION
297
- },
298
- [n.ON_TRANSACTION_DELETE_CLICK]: {
299
- action: o.SELECT,
300
- category: r.TRANSACTIONS_WIDGET,
301
- label: T.DELETE_TRANSACTION
302
- },
303
- [n.ON_TRANSACTION_DELETE_CANCEL]: {
304
- action: o.CLOSE,
305
- category: r.TRANSACTIONS_WIDGET,
306
- label: T.DELETE_TRANSACTION
307
- },
308
- [n.ON_TRANSACTION_DELETE_DELETED]: {
309
- action: o.DELETE,
310
- category: r.TRANSACTIONS_WIDGET,
311
- label: T.DELETE_TRANSACTION
312
- }
313
- }, j = async (l, t) => !t || !p[l] ? null : t.sendAnalyticEvent(p[l]), h = {
314
- DATE: "date",
315
- AMOUNT: "amount"
316
- }, Z = (l, t, a, s = []) => {
317
- const A = t.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), d = a.reduce((c, i) => ({ ...c, [i.guid]: i }), {}), e = s.reduce((c, i) => {
318
- const { transaction_guid: S, tag_guid: N } = i;
319
- if (!c[S])
320
- return {
321
- ...c,
322
- [S]: [N]
323
- };
324
- const g = [...c[S], N];
325
- return {
326
- ...c,
327
- [S]: g
328
- };
329
- }, {});
330
- return l.map((c) => {
331
- const i = A[c.account_guid], S = c.category_guid ? d[c.category_guid] : null, N = e[c.guid] ?? [];
332
- return {
333
- ...c,
334
- account: i?.user_name || "Unknown",
335
- accountIsClosed: i?.is_closed,
336
- accountIsHidden: i?.is_hidden,
337
- category: S?.name || "Uncategorized",
338
- isIncome: c.top_level_category_guid === F.INCOME,
339
- isPending: c.feed_status === y.PENDING,
340
- number: i?.account_number || "",
341
- payee: c.description,
342
- tags: N
343
- };
344
- });
345
- }, q = "uncategorized", J = (l, t, a, s, A, d) => {
346
- const e = Q(l, A, d), c = tt(e, a, s);
347
- return t.forEach((i) => {
348
- const S = c.findIndex((g) => g.guid === i), N = d.filter((g) => g.parent_guid === i);
349
- c.splice(S + 1, 0, ...N);
350
- }), c;
351
- }, Q = (l, t, a) => {
352
- const {
353
- accounts: s = [],
354
- dateRange: A = { start: L(m()), end: O() },
355
- custom: d = () => !0,
356
- searchTerm: e = "",
357
- showSplits: c = !1
358
- } = l;
359
- return a.filter((i) => c ? !i.has_been_split : !i.parent_guid).filter((i) => !!s.find((S) => S === i.account_guid)).filter((i) => i.date >= E(A.start) && i.date <= E(A.end)).filter(d).filter((i) => {
360
- if (e === q && i.has_been_split)
361
- return !1;
362
- if (/^spl/i.test(e) && (i.has_been_split || i.parent_guid))
363
- return !0;
364
- const N = i.tags.some(
365
- (w) => _(e, t.find((M) => M.guid === w)?.name)
366
- ), g = $(i.date);
367
- return _(e, i.payee) || _(e, i.feed_description) || _(e, i.category) || _(e, C(g, u.MONTH)) || _(e, C(g, u.DAY)) || _(e, C(g, u.FULL_MONTH_DAY)) || _(e, C(g, u.MONTH_DAY_YEAR)) || _(e, W(g, k)) || _(e, i.account) || _(e, z(i.amount, "0,0.00")) || _(e, i.memo) || N;
368
- });
369
- }, tt = (l, t, a) => [...l].sort((s, A) => {
370
- const d = t, e = (s[d] || "") > (A[d] || "");
371
- let c = e ? -1 : 1, i = e ? 1 : -1;
372
- return (t === h.DATE || t === h.AMOUNT) && (c = e ? 1 : -1, i = e ? -1 : 1), a === G.ASC ? c : i;
373
- }), _ = (l, t) => {
374
- const a = l.toLowerCase().split(" "), s = t?.toString().toLowerCase() ?? "";
375
- return a.every((A) => s.indexOf(A) > -1);
376
- }, at = {
377
- account_guid: "",
378
- amount: 0,
379
- currency_code: "",
380
- date: 0,
381
- description: "",
382
- duplicate: !1,
383
- feed_description: "",
384
- feed_status: y.POSTED,
385
- feed_transaction_date: 0,
386
- has_been_split: !1,
387
- has_been_viewed: !1,
388
- is_cleared: !1,
389
- is_flagged: !1,
390
- is_hidden: !1,
391
- is_manual: !0,
392
- is_personal: !0,
393
- is_reimbursable: !1,
394
- is_subscription: !1,
395
- is_void: !1,
396
- revision: 1,
397
- transaction_type: b.DEBIT,
398
- user_guid: "",
399
- is_duplicate: !1,
400
- feed_transacted_at: 0,
401
- guid: "",
402
- memo: void 0,
403
- tags: []
404
- };
405
- class et {
406
- beginDate = L(/* @__PURE__ */ new Date());
407
- endDate = X(/* @__PURE__ */ new Date());
408
- expandedSplits = [];
409
- height = 550;
410
- width = 1e3;
411
- shouldDisableDrawerScroll = !1;
412
- searchValue = "";
413
- selectedAccountGuids = [];
414
- manualTransaction = at;
415
- isAmountValid = !1;
416
- showInsights = !1;
417
- constructor() {
418
- f(this);
419
- }
420
- setDateRange = (t, a) => {
421
- this.beginDate = t, this.endDate = a;
422
- };
423
- setIsAmountValid = (t) => this.isAmountValid = t;
424
- setSearchValue = (t) => this.searchValue = t;
425
- setSelectedAccountGuids = (t) => this.selectedAccountGuids = t;
426
- setShouldDisableDrawerScroll = (t) => this.shouldDisableDrawerScroll = t;
427
- setShowInsights = (t) => {
428
- this.showInsights = t;
429
- };
430
- setSize = (t, a) => {
431
- this.height = t, this.width = a;
432
- };
433
- toggleSplit = (t) => {
434
- const a = [...this.expandedSplits], s = this.expandedSplits.findIndex((A) => A === t);
435
- s >= 0 ? a.splice(s, 1) : a.push(t), this.expandedSplits = a;
436
- };
437
- clearExpandedSplits = () => {
438
- this.expandedSplits.length !== 0 && (this.expandedSplits = []);
439
- };
440
- updateManualTransaction = (t) => {
441
- this.manualTransaction = t;
442
- };
443
- }
444
- class mt {
445
- globalStore;
446
- uiStore;
447
- api = new R("/", "");
448
- beatApi = new D("/", "");
449
- associatedBeats = [];
450
- associatedBeatsLoaded = !1;
451
- associatedBeatsLoading = !1;
452
- transactions = [];
453
- transactionsLoaded = !1;
454
- transactionsLoading = !1;
455
- taggings = [];
456
- taggingsLoaded = !1;
457
- taggingsLoading = !1;
458
- tags = [];
459
- tagsLoaded = !1;
460
- tagsLoading = !1;
461
- transactionRules = [];
462
- transactionRulesLoaded = !1;
463
- transactionRulesLoading = !1;
464
- cachedStartDate = v(m(), 90);
465
- filter = {};
466
- isLoading = !0;
467
- alert = "";
468
- sortColumn = h.DATE;
469
- sortDirection = G.DESC;
470
- onAnalyticEvent = j;
471
- constructor(t) {
472
- this.globalStore = t, this.uiStore = new et(), this.api = new R(
473
- t.endpoint,
474
- t.sessionToken,
475
- t.onError
476
- ), this.beatApi = new D(t.endpoint, t.sessionToken, t.onError), f(this);
477
- }
478
- loadTransactionData = async () => {
479
- this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData(), this.globalStore.categoryStore.categoriesLoaded || await this.globalStore.categoryStore.loadCategories(), await Promise.all([
480
- this.loadAssociatedBeats(L(/* @__PURE__ */ new Date())),
481
- this.loadTags(),
482
- this.loadTaggings(),
483
- this.loadTransactionRules(),
484
- // By default loads 90 days of transactions
485
- this.loadTransactions(this.cachedStartDate)
486
- ]);
487
- };
488
- get isTransactionDataLoaded() {
489
- return this.associatedBeatsLoaded && this.tagsLoaded && this.taggingsLoaded && this.transactionRulesLoaded && this.transactionsLoaded;
490
- }
491
- get detailedTransactions() {
492
- return this.isTransactionDataLoaded ? Z(
493
- this.transactions,
494
- this.globalStore.accountStore.visibleAccounts,
495
- this.globalStore.categoryStore.categories,
496
- this.taggings
497
- ) : [];
498
- }
499
- get sortedTransactions() {
500
- return J(
501
- this.filter,
502
- this.uiStore.expandedSplits,
503
- this.sortColumn,
504
- this.sortDirection,
505
- this.tags,
506
- this.detailedTransactions
507
- );
508
- }
509
- get sortedTransactionsWithSplits() {
510
- return Y(this.sortedTransactions, this.detailedTransactions);
511
- }
512
- setAssociatedBeats = (t) => {
513
- this.associatedBeats = t, this.associatedBeatsLoading = !1, this.associatedBeatsLoaded = !0;
514
- };
515
- setTaggings = (t) => {
516
- this.taggings = t, this.taggingsLoading = !1, this.taggingsLoaded = !0;
517
- };
518
- setTags = (t) => {
519
- this.tags = t, this.tagsLoading = !1, this.tagsLoaded = !0;
520
- };
521
- setTransactionRules = (t) => {
522
- this.transactionRules = t, this.transactionRulesLoading = !1, this.transactionRulesLoaded = !0;
523
- };
524
- setTransactions = (t) => {
525
- this.transactions = t, this.transactionsLoading = !1, this.transactionsLoaded = !0;
526
- };
527
- setAlert = (t) => {
528
- this.alert = t;
529
- };
530
- addTag = async (t) => {
531
- await this.api.addTag({ name: t }), await this.loadTags();
532
- };
533
- addTagging = async (t, a) => {
534
- await this.api.addTagging({
535
- tag_guid: t,
536
- transaction_guid: a
537
- });
538
- };
539
- addOrUpdateTransactionRule = async (t, a) => {
540
- const s = this.transactionRules.find(
541
- (A) => A.guid === a.user_transaction_rule_guid
542
- );
543
- s ? await this.api.updateTransactionRule({
544
- ...s,
545
- category_guid: t,
546
- description: a.description
547
- }) : await this.api.addTransactionRule({
548
- category_guid: t,
549
- description: a.description,
550
- match_description: a.description
551
- }), await this.loadTransactionRules();
552
- };
553
- addTransaction = async (t) => {
554
- const a = await this.api.addTransaction(t);
555
- if (a) {
556
- this.setTransactions([a, ...this.transactions]);
557
- const s = a.transaction_type === b.CREDIT ? a.amount : -a.amount;
558
- this.globalStore.accountStore.updateAccountBalance(a.account_guid, s);
559
- }
560
- };
561
- loadAssociatedBeats = async (t) => {
562
- if (this.associatedBeatsLoading) return;
563
- this.associatedBeatsLoading = !0;
564
- const a = t ? V(t, { representation: "date" }) : void 0;
565
- try {
566
- const s = await this.beatApi.getBeatsWithAssociatedTransaction(a);
567
- this.setAssociatedBeats(s);
568
- } catch (s) {
569
- console.error(`Error occurred while loading associated beats: ${s}`);
570
- }
571
- };
572
- loadTags = async () => {
573
- if (!this.tagsLoading) {
574
- this.tagsLoading = !0;
575
- try {
576
- const t = await this.api.getTags();
577
- this.setTags(t);
578
- } catch (t) {
579
- console.error(`Error occurred while loading tags: ${t}`);
580
- }
581
- }
582
- };
583
- loadTaggings = async () => {
584
- if (!this.taggingsLoading) {
585
- this.taggingsLoading = !0;
586
- try {
587
- const t = await this.api.getTaggings();
588
- this.setTaggings(t);
589
- } catch (t) {
590
- console.error(`Error occurred while loading taggings: ${t}`);
591
- }
592
- }
593
- };
594
- loadTransactionRules = async () => {
595
- if (this.transactionRulesLoading) return;
596
- this.transactionRulesLoading = !0;
597
- const t = await this.api.getTransactionRules();
598
- this.setTransactionRules(t);
599
- };
600
- loadTransactions = async (t = this.cachedStartDate) => {
601
- if (!this.transactionsLoading) {
602
- this.setIsLoading(!0), this.transactionsLoading = !0, this.transactions = [];
603
- try {
604
- const a = await this.api.getTransactionsByDateRange(
605
- E(t),
606
- E(O())
607
- );
608
- this.setTransactions(a);
609
- } catch (a) {
610
- console.error(`Error occurred while loading transactions: ${a}`);
611
- }
612
- this.setIsLoading(!1);
613
- }
614
- };
615
- modifyTransactionByAccountGuid = (t, a) => {
616
- this.transactions = this.transactions.map(
617
- (s) => s.account_guid === t ? { ...s, ...a } : s
618
- );
619
- };
620
- removeTag = async (t) => {
621
- await this.api.removeTag(t), await this.loadTags();
622
- };
623
- removeTagging = async (t) => {
624
- await this.api.removeTagging(t);
625
- };
626
- removeTransaction = async (t) => {
627
- await this.api.removeTransaction(t);
628
- const a = this.transactions.findIndex((s) => s.guid === t);
629
- if (a >= 0) {
630
- const s = [...this.transactions];
631
- s.splice(a, 1), this.setTransactions(s);
632
- }
633
- };
634
- setFilter = (t) => {
635
- this.filter = t, t.dateRange && U(t.dateRange.start, this.cachedStartDate) && this.loadTransactions(t.dateRange.start).then(() => {
636
- t.dateRange && (this.cachedStartDate = t.dateRange.start);
637
- });
638
- };
639
- setIsLoading = (t) => this.isLoading = t;
640
- splitTransaction = async (t, a) => {
641
- const s = await this.api.updateTransaction(t), A = [];
642
- for (let e = 0; e < a.length; e++) {
643
- const c = await this.api.addTransaction(a[e]);
644
- A.push(c);
645
- }
646
- const d = this.transactions.findIndex((e) => e.guid === t.guid);
647
- if (d >= 0) {
648
- const e = this.transactions.filter(
649
- (c) => c.guid !== t.guid && c.parent_guid !== t.guid
650
- );
651
- this.setTransactions([
652
- ...e.slice(0, d),
653
- s,
654
- ...A,
655
- ...e.slice(d)
656
- ]);
657
- }
658
- };
659
- unSplitTransaction = async (t) => {
660
- const a = this.transactions.filter((e) => e.parent_guid === t);
661
- await this.api.removeTransactionSplit(t);
662
- const s = [...this.transactions];
663
- a.forEach((e) => {
664
- const c = s.findIndex((i) => i.guid === e.guid);
665
- c >= 0 && s.splice(c, 1);
666
- });
667
- const A = s.findIndex((e) => e.guid === t), d = s[A];
668
- d.has_been_split = !1, A >= 0 && this.setTransactions([
669
- ...s.slice(0, A),
670
- d,
671
- ...s.slice(A + 1)
672
- ]);
673
- };
674
- updateTaggings = async (t, a) => {
675
- const s = this.taggings.filter((e) => e.transaction_guid === a), A = new Set(s.map((e) => e.tag_guid)), d = new Set(t);
676
- for (const e of t)
677
- A.has(e) || await this.addTagging(e, a);
678
- for (const e of s)
679
- d.has(e.tag_guid) || await this.removeTagging(e.guid);
680
- await this.loadTaggings();
681
- };
682
- updateTag = async (t) => {
683
- await this.api.updateTag(t), await this.loadTags();
684
- };
685
- updateTransaction = async (t) => {
686
- const a = await this.api.updateTransaction(t), s = this.transactions.findIndex((A) => A.guid === t.guid);
687
- s >= 0 && this.setTransactions([
688
- ...this.transactions.slice(0, s),
689
- a,
690
- ...this.transactions.slice(s + 1)
691
- ]);
692
- };
693
- // This is used for loading the transactions list on demand, on clicking the different transactions of the insightful beats.
694
- loadEmbeddedInstanceTransactions = async (t) => {
695
- try {
696
- const a = await this.api.getTransactionsByDateRange(
697
- E(t),
698
- E(O())
699
- );
700
- this.cachedStartDate = t, this.transactions = a;
701
- } catch (a) {
702
- console.error(`Error occurred while loading embedded instance transactions: ${a}`);
703
- }
704
- };
705
- }
706
- export {
707
- at as D,
708
- ft as S,
709
- mt as T
710
- };