@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,479 +0,0 @@
1
- import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
- import k from "react";
3
- import { css as R } from "@mxenabled/cssinjs";
4
- import { addDays as G } from "date-fns/addDays";
5
- import { addMonths as P } from "date-fns/addMonths";
6
- import { eachDayOfInterval as Y } from "date-fns/eachDayOfInterval";
7
- import { eachWeekOfInterval as Z } from "date-fns/eachWeekOfInterval";
8
- import { endOfMonth as q } from "date-fns/endOfMonth";
9
- import { format as z } from "date-fns/format";
10
- import { isBefore as J } from "date-fns/isBefore";
11
- import { isSameMonth as K } from "date-fns/isSameMonth";
12
- import { startOfMonth as Q } from "date-fns/startOfMonth";
13
- import { startOfToday as I } from "date-fns/startOfToday";
14
- import { subMonths as U } from "date-fns/subMonths";
15
- import C from "@mui/material/Button";
16
- import V from "@mui/material/Paper";
17
- import { H2 as X, Text as D, H3 as tt, P as et } from "@mxenabled/mxui";
18
- import { ChevronLeft as nt, ChevronRight as ot, Icon as rt } from "@mxenabled/mx-icons";
19
- import { f as at, D as it } from "./DateFormats-CaOj_4eI.mjs";
20
- import { isSameDay as f } from "date-fns/isSameDay";
21
- import { isWithinInterval as st } from "date-fns/isWithinInterval";
22
- import ct from "@mui/material/styles/useTheme";
23
- import lt from "@mui/material/Dialog";
24
- import dt from "@mui/material/DialogActions";
25
- import mt from "@mui/material/DialogContent";
26
- import ut from "@mui/material/IconButton";
27
- import gt from "@mui/material/InputAdornment";
28
- import T from "@mui/material/Stack";
29
- import ft from "@mui/material/TextField";
30
- import { u as pt } from "./useScreenSize-CeFhWTt_.mjs";
31
- import { m as ht } from "./hooks-RzCoiTd0.mjs";
32
- import { b as $ } from "./Category-Ccoew_sA.mjs";
33
- import { b as j } from "./Localization-CkQ49EKr.mjs";
34
- import { f as O } from "./NumberFormatting-CyrvFgfd.mjs";
35
- const xt = ({ copy: t, date: n, onNextClick: e, onPreviousClick: o }) => {
36
- const a = yt();
37
- return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${a}`, children: [
38
- /* @__PURE__ */ r(X, { className: "mx-cmn-calendar-header-title", variant: "h3", children: at(n, it.MONTH_YEAR) }),
39
- /* @__PURE__ */ h("div", { className: "mx-cmn-calendar-header-button-container", children: [
40
- /* @__PURE__ */ r(C, { "aria-label": t.prevAria, onClick: o, children: /* @__PURE__ */ r(nt, { size: 24 }) }),
41
- /* @__PURE__ */ r(C, { "aria-label": t.nextAria, onClick: e, children: /* @__PURE__ */ r(ot, { size: 24 }) })
42
- ] })
43
- ] });
44
- }, yt = () => R({
45
- alignItems: "center",
46
- display: "flex",
47
- marginBottom: 16,
48
- marginRight: -16,
49
- paddingLeft: 8,
50
- "& .mx-cmn-calendar-header-title": {
51
- flexGrow: 1
52
- },
53
- "& .mx-cmn-calendar-header-button-container": {
54
- display: "flex",
55
- gap: 4
56
- }
57
- }), bt = ({ beginDate: t, date: n, endDate: e, isInMonth: o, onClick: a }) => {
58
- const s = ct(), d = Ct(s), i = t && e && st(n, { start: t, end: e }) && !f(n, t) && !f(n, e), l = t && e && f(t, n) && !f(t, e), m = e && t && f(e, n) && !f(t, e), u = t && f(t, n) || e && f(e, n), p = f(n, I());
59
- return /* @__PURE__ */ r(
60
- "div",
61
- {
62
- className: `
63
- mx-cmn-calendar-day
64
- ${d}
65
- ${o ? "" : "mx-cmn-out-of-month"}
66
- ${i ? "mx-cmn-date-interval" : ""}
67
- `,
68
- children: /* @__PURE__ */ r(
69
- C,
70
- {
71
- className: `
72
- mx-cmn-calendar-day-button
73
- ${l ? "mx-cmn-range-start" : ""}
74
- ${m ? "mx-cmn-range-end" : ""}
75
- `,
76
- color: u ? "primary" : "secondary",
77
- onClick: () => a(n),
78
- variant: u ? "contained" : "text",
79
- children: /* @__PURE__ */ r(
80
- D,
81
- {
82
- className: `
83
- mx-cmn-calendar-day-text
84
- ${u ? "mx-cmn-day-selected" : ""}
85
- ${p ? "mx-cmn-today" : ""}`,
86
- variant: "body2",
87
- children: z(n, "d")
88
- }
89
- )
90
- }
91
- )
92
- }
93
- );
94
- }, Ct = (t) => R({
95
- height: B,
96
- width: B,
97
- display: "flex",
98
- justifyContent: "center",
99
- "&.mx-cmn-out-of-month": {
100
- backgroundColor: t.palette.background.default
101
- },
102
- "&.mx-cmn-date-interval": {
103
- backgroundColor: t.palette.secondary.light
104
- },
105
- "& .MuiButton-root": {
106
- maxWidth: 44,
107
- minWidth: 44,
108
- height: 44,
109
- padding: 0,
110
- width: 44,
111
- "&.mx-cmn-range-start": {
112
- borderTopRightRadius: 0,
113
- borderBottomRightRadius: 0,
114
- "&:focus": {
115
- boxShadow: "none"
116
- }
117
- },
118
- "&.mx-cmn-range-end": {
119
- borderTopLeftRadius: 0,
120
- borderBottomLeftRadius: 0,
121
- "&:focus": {
122
- boxShadow: "none"
123
- }
124
- }
125
- },
126
- "& .mx-cmn-calendar-day-text": {
127
- "&.mx-cmn-day-selected": {
128
- color: t.palette.primary,
129
- "&.mx-cmn-day-selected": {
130
- borderColor: t.palette.common.white
131
- }
132
- },
133
- "&.mx-cmn-today": {
134
- borderBottom: `solid 2px ${t.palette.primary.main}`,
135
- marginBottom: -6,
136
- paddingBottom: 5
137
- }
138
- }
139
- }), vt = 340, B = 44;
140
- var kt = /* @__PURE__ */ ((t) => (t.None = "None", t.Single = "Single", t.Range = "Range", t))(kt || {});
141
- const ie = ({
142
- copy: t,
143
- beginDate: n = void 0,
144
- endDate: e = void 0,
145
- onDateSelected: o,
146
- onRangeSelected: a,
147
- selectionType: s = "Single"
148
- /* Single */
149
- }) => {
150
- const d = Bt(), [i, l] = k.useState(I), [m, u] = k.useState(n), [p, g] = k.useState(e);
151
- k.useEffect(() => {
152
- u(n), g(e), n && l(n);
153
- }, [n, e]);
154
- const v = k.useMemo(() => {
155
- const c = Z({ start: Q(i), end: q(i) }), y = [];
156
- for (let b = 0; b < c.length; b++) {
157
- const w = c[b], A = Y({ start: w, end: G(w, 6) }), E = [];
158
- for (let M = 0; M < A.length; M++)
159
- E.push(A[M]);
160
- y.push(E);
161
- }
162
- return y;
163
- }, [i]), _ = (c) => {
164
- if (s !== "None") {
165
- if (s === "Single") {
166
- u(c), o?.(c);
167
- return;
168
- }
169
- !m || p ? (u(c), g(void 0)) : J(c, m) ? (g(m), u(c), a?.(c, m)) : (g(c), a?.(m, c));
170
- }
171
- }, S = () => {
172
- const c = I();
173
- l(c), s !== "None" && (u(c), s === "Single" ? o?.(c) : (g(c), a?.(c, c)));
174
- }, N = () => {
175
- l(P(i, 1));
176
- }, x = () => {
177
- l(U(i, 1));
178
- };
179
- return /* @__PURE__ */ r("div", { className: `mx-cmn-calendar ${d}`, children: /* @__PURE__ */ h(V, { sx: { boxShadow: "none" }, children: [
180
- /* @__PURE__ */ r(
181
- xt,
182
- {
183
- copy: t,
184
- date: i,
185
- onNextClick: N,
186
- onPreviousClick: x
187
- }
188
- ),
189
- /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-header-row", children: v[0].map((c, y) => /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ r(D, { bold: !0, variant: "body2", children: z(c, "EEEEE") }) }, y)) }),
190
- v.map((c, y) => /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-week", children: c.map((b, w) => /* @__PURE__ */ r(
191
- bt,
192
- {
193
- beginDate: m,
194
- date: b,
195
- endDate: p,
196
- isInMonth: K(b, i),
197
- onClick: _
198
- },
199
- w
200
- )) }, `w-${y}`)),
201
- /* @__PURE__ */ r("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ r(C, { onClick: S, size: "small", variant: "text", children: t.today }) })
202
- ] }) });
203
- }, Bt = () => R({
204
- width: vt,
205
- "& .MuiPaper-root": {
206
- paddingLeft: 24,
207
- paddingRight: 24,
208
- paddingTop: 4,
209
- paddingBottom: 4
210
- },
211
- "& .mx-cmn-calendar-header-row": {
212
- display: "flex",
213
- justifyContent: "center",
214
- textAlign: "center",
215
- "& .mx-cmn-calendar-header-cell": {
216
- height: B,
217
- width: B,
218
- minWidth: B,
219
- "& .kmui-text": {
220
- alignItems: "center",
221
- display: "flex",
222
- height: "100%",
223
- justifyContent: "center",
224
- width: "100%"
225
- }
226
- }
227
- },
228
- "& .mx-cmn-calendar-week": {
229
- display: "flex",
230
- justifyContent: "center",
231
- textAlign: "center"
232
- },
233
- "& .mx-cmn-calendar-today-container": {
234
- display: "block",
235
- marginTop: 16,
236
- textAlign: "center",
237
- width: "100%",
238
- "& > .MuiButton-root": {
239
- display: "inline-block",
240
- marginLeft: "auto",
241
- marginRight: "auto"
242
- }
243
- }
244
- }), se = ({
245
- closeAriaLabel: t,
246
- content: n,
247
- inputLabel: e,
248
- inputValue: o,
249
- isOpen: a,
250
- handleInputChange: s,
251
- handleModalClose: d,
252
- handlePrimaryAction: i,
253
- handleSecondaryAction: l,
254
- primaryColor: m = "primary",
255
- primaryText: u,
256
- secondaryColor: p = "primary",
257
- secondaryText: g,
258
- title: v
259
- }) => {
260
- const _ = parseFloat(o ?? "0"), S = o !== "" && o !== "0" && !isNaN(_), { isSmallMobile: N } = pt();
261
- return /* @__PURE__ */ r(
262
- lt,
263
- {
264
- "aria-label": v,
265
- "aria-labelledby": "modal-title",
266
- maxWidth: "xs",
267
- onClose: d,
268
- open: a,
269
- role: "dialog",
270
- sx: {
271
- "& .MuiDialogContent-root": { p: 0 },
272
- ...N && { "& .MuiDialog-paper": { minWidth: "100%" } }
273
- },
274
- children: /* @__PURE__ */ r(mt, { children: /* @__PURE__ */ h(
275
- "form",
276
- {
277
- onSubmit: (x) => {
278
- x.preventDefault(), i();
279
- },
280
- children: [
281
- /* @__PURE__ */ h(
282
- T,
283
- {
284
- sx: {
285
- alignItems: "center",
286
- flexDirection: "row",
287
- justifyContent: "space-between",
288
- pb: 12,
289
- pl: 24,
290
- position: "relative",
291
- pr: 16,
292
- pt: 24
293
- },
294
- children: [
295
- /* @__PURE__ */ r(tt, { id: "modal-title", children: v }),
296
- /* @__PURE__ */ r(
297
- ut,
298
- {
299
- "aria-label": t,
300
- onClick: d,
301
- sx: { minHeight: 24, position: "absolute", right: 8, top: 18 },
302
- children: /* @__PURE__ */ r(rt, { name: "close", sx: { color: "action.active" } })
303
- }
304
- )
305
- ]
306
- }
307
- ),
308
- /* @__PURE__ */ h(T, { sx: { gap: 24, px: 24 }, children: [
309
- /* @__PURE__ */ r(et, { variant: "subtitle1", children: n }),
310
- e && /* @__PURE__ */ r(
311
- ft,
312
- {
313
- InputProps: {
314
- startAdornment: /* @__PURE__ */ r(gt, { position: "start", children: "$" })
315
- },
316
- autoFocus: !0,
317
- inputMode: "decimal",
318
- inputProps: {
319
- "aria-label": e,
320
- noValidate: !0,
321
- pattern: "[0-9]*\\.?[0-9]*"
322
- },
323
- label: e,
324
- onChange: ({ target: { value: x } }) => {
325
- /^\d*\.?\d*$/.test(x) && s?.(x);
326
- },
327
- type: "text",
328
- value: o
329
- }
330
- )
331
- ] }),
332
- /* @__PURE__ */ h(
333
- dt,
334
- {
335
- sx: {
336
- justifyContent: "flex-end",
337
- gap: 16,
338
- p: 24,
339
- ">:not(style)~:not(style)": { ml: 0 }
340
- },
341
- children: [
342
- g && /* @__PURE__ */ r(
343
- C,
344
- {
345
- "aria-label": g,
346
- color: p,
347
- onClick: l,
348
- children: g
349
- }
350
- ),
351
- /* @__PURE__ */ r(
352
- C,
353
- {
354
- "aria-label": u,
355
- color: m,
356
- disabled: e ? !S : !1,
357
- onClick: i,
358
- variant: "contained",
359
- children: u
360
- }
361
- )
362
- ]
363
- }
364
- )
365
- ]
366
- }
367
- ) })
368
- }
369
- );
370
- }, W = (t, n) => t.find((e) => e.guid === n), wt = (t, n) => t.find((e) => e.guid === n), _t = (t, n) => {
371
- const e = t.find((o) => o.subCategories.find((a) => a.guid === n));
372
- if (e)
373
- return e.subCategories.find((o) => o.guid === n);
374
- }, ce = (t, n) => {
375
- const e = [];
376
- for (const o of n) {
377
- const a = W(t, o.category_guid);
378
- if (!a) continue;
379
- const s = a.parent_guid ?? a.guid, d = W(t, s);
380
- if (!d) continue;
381
- const i = {
382
- amount: o.total,
383
- category: a,
384
- guid: a.guid,
385
- subCategoryTotals: []
386
- }, l = e.find((m) => m.guid === s);
387
- l ? (l.amount += o.total, l.subCategoryTotals.push(i)) : e.push({
388
- amount: o.total,
389
- category: d,
390
- guid: s,
391
- subCategoryTotals: [i]
392
- });
393
- }
394
- return e;
395
- }, le = (t, n) => {
396
- const e = t.find((o) => o.guid === n);
397
- return e ? e.guid === $.INCOME || e.parent_guid === $.INCOME : !1;
398
- }, de = (t, n) => !!t.find((e) => e.feature_name === n)?.is_enabled, H = (t, n) => !t && !n ? 0 : !t && n ? 101 : n / t * 100, F = (t, n) => {
399
- const e = {
400
- background: n.palette.success.main,
401
- description: t <= 100 ? n.palette.text.secondary : n.palette.error.main,
402
- text: n.palette.common.white,
403
- mercury: n.palette.success.lighter
404
- };
405
- return t > 100 ? (e.background = n.palette.error.main, e.mercury = n.palette.error.lighter) : t > 80 && (e.background = n.palette.warning.main, e.text = n.palette.grey[900], e.mercury = n.palette.warning.lighter), e;
406
- }, me = () => {
407
- const { detailedBudgets: t } = ht();
408
- return t.map((e) => {
409
- const o = e.transaction_total;
410
- return e.amount - o;
411
- }).reduce((e, o) => e + o, 0);
412
- }, ue = (t, n, e, o) => {
413
- const a = [];
414
- for (const s of t) {
415
- const d = wt(n, s.category_guid);
416
- if (!d) continue;
417
- const i = d.totalAmount, l = H(s.amount, i), m = s.amount - i;
418
- a.push({
419
- ...s,
420
- budgetColors: F(l, o),
421
- category: d,
422
- description: j(
423
- m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
424
- O(Math.abs(m), "0,0")
425
- ),
426
- percentage: l,
427
- subBudgets: [],
428
- transaction_total: i
429
- });
430
- }
431
- for (const s of t) {
432
- const d = _t(n, s.category_guid);
433
- if (!d) continue;
434
- const i = d.currentAmount, l = a.find((p) => p.category_guid === d.parent_guid);
435
- if (!l) continue;
436
- const m = s.amount - i, u = H(s.amount, i);
437
- l && l.subBudgets.push({
438
- ...s,
439
- budgetColors: F(u, o),
440
- category: d,
441
- description: j(
442
- m < 0 ? e.budget_remaining_over : e.budget_remaining_left,
443
- O(Math.abs(m), "0,0")
444
- ),
445
- percentage: u,
446
- subBudgets: [],
447
- transaction_total: i
448
- });
449
- }
450
- return a;
451
- }, L = (t, n) => t.find((e) => e.guid === n), ge = (t, n, e) => {
452
- const o = L(t, e);
453
- if (o)
454
- return L(o.subBudgets, n);
455
- }, fe = (t, n) => {
456
- const e = Math.max(0, n - t), o = n > 0 ? Math.min(100, t / n * 100) : 0;
457
- let a = "success";
458
- return o >= 100 ? a = "error" : o >= 50 && (a = "warning"), {
459
- remainingAmount: e,
460
- spentPercentage: o,
461
- iconColor: a
462
- };
463
- };
464
- export {
465
- ie as C,
466
- ge as a,
467
- ue as b,
468
- kt as c,
469
- se as d,
470
- ce as e,
471
- L as f,
472
- W as g,
473
- wt as h,
474
- de as i,
475
- _t as j,
476
- le as k,
477
- fe as l,
478
- me as u
479
- };
@@ -1,91 +0,0 @@
1
- import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { useState as l } from "react";
3
- import p from "@mui/material/IconButton";
4
- import d from "@mui/material/Stack";
5
- import f from "@mui/material/Tooltip";
6
- import { Icon as h, Text as a } from "@mxenabled/mxui";
7
- import { makeAutoObservable as c } from "mobx";
8
- import { addDays as u } from "date-fns/addDays";
9
- import { differenceInDays as x } from "date-fns/differenceInDays";
10
- import { endOfMonth as g } from "date-fns/endOfMonth";
11
- import { isBefore as S } from "date-fns/isBefore";
12
- import { startOfToday as s } from "date-fns/startOfToday";
13
- const _ = ({
14
- body: o,
15
- iconName: e = "info",
16
- title: n
17
- }) => {
18
- const [i, r] = l(!1);
19
- return /* @__PURE__ */ t(
20
- f,
21
- {
22
- open: i,
23
- title: /* @__PURE__ */ m(d, { gap: 2, p: 12, sx: { textOverflow: "none" }, children: [
24
- /* @__PURE__ */ t(a, { bold: !0, variant: "body1", children: n }),
25
- /* @__PURE__ */ t(a, { sx: { whiteSpace: "unset" }, variant: "body2", children: o })
26
- ] }),
27
- children: /* @__PURE__ */ t(
28
- p,
29
- {
30
- "aria-label": n,
31
- onClick: () => r(!i),
32
- onMouseEnter: () => r(!0),
33
- onMouseLeave: () => r(!1),
34
- sx: {
35
- minHeight: 0,
36
- minWidth: 0,
37
- p: 0
38
- },
39
- children: /* @__PURE__ */ t(h, { name: e, sx: { color: "primary.main", fontSize: 16 } })
40
- }
41
- )
42
- }
43
- );
44
- };
45
- class b {
46
- // Cashflow is hard-coded to display 30 days starting from today
47
- dateRange = { start: s(), end: u(s(), 30) };
48
- isDirty = !1;
49
- nextIncome = void 0;
50
- upcomingExpenses = [];
51
- selectedCashAccounts = [];
52
- constructor() {
53
- c(this);
54
- }
55
- // Returns the number of days until the next income activity or 0 if there is no income activity
56
- get daysUntilNextIncome() {
57
- return this.nextIncome ? Math.abs(x(s(), this.nextIncome.expectedDate)) : 0;
58
- }
59
- // Returns the expenses (Activities) until the next income activity or the end of the month
60
- // if there is no income activity
61
- get expensesTilNextIncome() {
62
- return this.upcomingExpenses.filter(
63
- (e) => S(e.expectedDate, this.nextIncome?.expectedDate || g(/* @__PURE__ */ new Date()))
64
- );
65
- }
66
- setNextIncome = (e) => {
67
- this.nextIncome = e;
68
- };
69
- setUpcomingExpenses = (e) => {
70
- this.upcomingExpenses = e;
71
- };
72
- setSelectedCashAccounts = (e) => this.selectedCashAccounts = e;
73
- }
74
- class k {
75
- globalStore;
76
- uiStore;
77
- constructor(e) {
78
- this.globalStore = e, this.uiStore = new b(), c(this);
79
- }
80
- completeOnboarding = async () => {
81
- const e = {
82
- ...this.globalStore.userStore.userProfile,
83
- has_completed_cash_flow_onboarding: !0
84
- };
85
- await this.globalStore.userStore.updateUserProfile(e);
86
- };
87
- }
88
- export {
89
- k as C,
90
- _ as I
91
- };
@@ -1,29 +0,0 @@
1
- import { F as c, A as s } from "./ApiEndpoints-C5IA97i7.mjs";
2
- class y {
3
- fetchInstance;
4
- constructor(t, e, r) {
5
- this.fetchInstance = new c(t, e, void 0, r);
6
- }
7
- addCategory = async (t) => this.fetchInstance.post(s.CATEGORIES, t).then((e) => e.category);
8
- getCategories = async () => this.fetchInstance.get(s.CATEGORIES).then((t) => t.categories);
9
- getDateRangeCategoryTotals = async (t, e, r) => r.length === 0 ? [] : this.fetchInstance.post(`${s.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${e}`, {
10
- account_guid: r.map((n) => n.guid)
11
- }).then((n) => n.date_range_category_totals);
12
- getMonthlyCategoryTotals = async (t, e, r) => {
13
- try {
14
- const n = `${s.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${e}`;
15
- if (r) {
16
- const o = r.length === 0 ? [""] : r.map((a) => a.guid);
17
- return (await this.fetchInstance.post(n, { account_guid: o })).monthly_category_totals;
18
- } else
19
- return (await this.fetchInstance.get(n)).monthly_category_totals;
20
- } catch (n) {
21
- throw console.error("Error fetching monthly category totals:", n), n;
22
- }
23
- };
24
- removeCategory = async (t) => this.fetchInstance.delete(`${s.CATEGORIES}/${t}`);
25
- updateCategory = async (t) => this.fetchInstance.put(`${s.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
26
- }
27
- export {
28
- y as C
29
- };