@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.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 (245) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +10 -10
  3. package/dist/Account-DR7Plrqy.mjs +119 -0
  4. package/dist/Account-DR7Plrqy.mjs.map +1 -0
  5. package/dist/AccountDetailsDrawer-CZPeLsCq.mjs +922 -0
  6. package/dist/AccountDetailsDrawer-CZPeLsCq.mjs.map +1 -0
  7. package/dist/AccountDetailsHeader-BvbCUQSS.mjs +231 -0
  8. package/dist/AccountDetailsHeader-BvbCUQSS.mjs.map +1 -0
  9. package/dist/AccountUtils-B8ZzWI-d.mjs +28 -0
  10. package/dist/AccountUtils-B8ZzWI-d.mjs.map +1 -0
  11. package/dist/Analytics-CkYXKvco.mjs +54 -0
  12. package/dist/Analytics-CkYXKvco.mjs.map +1 -0
  13. package/dist/Analytics-WeZYytR0.mjs +140 -0
  14. package/dist/Analytics-WeZYytR0.mjs.map +1 -0
  15. package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
  16. package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
  17. package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
  18. package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
  19. package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
  20. package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
  21. package/dist/Category-DEKZGLYe.mjs +302 -0
  22. package/dist/Category-DEKZGLYe.mjs.map +1 -0
  23. package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
  24. package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
  25. package/dist/Connect-BH0Pt6zc.mjs +43 -0
  26. package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
  27. package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
  28. package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
  29. package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
  30. package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
  31. package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
  32. package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
  33. package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
  34. package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
  35. package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
  36. package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
  37. package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
  38. package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
  39. package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
  40. package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
  41. package/dist/DateUtil-CzBmbjmA.mjs +75 -0
  42. package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
  43. package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
  44. package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
  45. package/dist/Dialog-Bvd2n8hz.mjs +67 -0
  46. package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
  47. package/dist/Donut-SzzfZDHF.mjs +89 -0
  48. package/dist/Donut-SzzfZDHF.mjs.map +1 -0
  49. package/dist/Drawer-DsnW2o0v.mjs +175 -0
  50. package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
  51. package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
  52. package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
  53. package/dist/EmptyState-CJUDc3kD.mjs +85 -0
  54. package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
  55. package/dist/Error-Dtw6yxkf.mjs +85 -0
  56. package/dist/Error-Dtw6yxkf.mjs.map +1 -0
  57. package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
  58. package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
  59. package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
  60. package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
  61. package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
  62. package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
  63. package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
  64. package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
  65. package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
  66. package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
  67. package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
  68. package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
  69. package/dist/Help-CkQTjORd.mjs +300 -0
  70. package/dist/Help-CkQTjORd.mjs.map +1 -0
  71. package/dist/Help-aERwhajy.mjs +3210 -0
  72. package/dist/Help-aERwhajy.mjs.map +1 -0
  73. package/dist/IconBacking-DgT8DCeh.mjs +40 -0
  74. package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
  75. package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
  76. package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
  77. package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
  78. package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
  79. package/dist/LineChart-CUfiH86G.mjs +613 -0
  80. package/dist/LineChart-CUfiH86G.mjs.map +1 -0
  81. package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
  82. package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
  83. package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
  84. package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
  85. package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
  86. package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
  87. package/dist/Loader-CxeBwuPG.mjs +22 -0
  88. package/dist/Loader-CxeBwuPG.mjs.map +1 -0
  89. package/dist/Localization-DnoVyBNK.mjs +39 -0
  90. package/dist/Localization-DnoVyBNK.mjs.map +1 -0
  91. package/dist/ManageIncome-Dcsnnz86.mjs +906 -0
  92. package/dist/ManageIncome-Dcsnnz86.mjs.map +1 -0
  93. package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
  94. package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
  95. package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
  96. package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
  97. package/dist/NetWorthUtils-DfSH3z70.mjs +96 -0
  98. package/dist/NetWorthUtils-DfSH3z70.mjs.map +1 -0
  99. package/dist/Notification-DTNYSd8P.mjs +8 -0
  100. package/dist/Notification-DTNYSd8P.mjs.map +1 -0
  101. package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
  102. package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
  103. package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
  104. package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
  105. package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
  106. package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
  107. package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
  108. package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
  109. package/dist/RecurringSettings-D8hBbXV_.mjs +89 -0
  110. package/dist/RecurringSettings-D8hBbXV_.mjs.map +1 -0
  111. package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
  112. package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
  113. package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
  114. package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
  115. package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
  116. package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
  117. package/dist/Select-CSpkK5cR.mjs +62 -0
  118. package/dist/Select-CSpkK5cR.mjs.map +1 -0
  119. package/dist/SelectionBox-B4xELRgp.mjs +49 -0
  120. package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
  121. package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
  122. package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
  123. package/dist/Sizes-DISGrlUg.mjs +7 -0
  124. package/dist/Sizes-DISGrlUg.mjs.map +1 -0
  125. package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
  126. package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
  127. package/dist/SpendingData-Fii_xATx.mjs +54 -0
  128. package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
  129. package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
  130. package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
  131. package/dist/StatusBar-CPfSXe80.mjs +31 -0
  132. package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
  133. package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
  134. package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
  135. package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
  136. package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
  137. package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
  138. package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
  139. package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
  140. package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
  141. package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
  142. package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
  143. package/dist/UserStore-C1fdL3Iu.mjs +3054 -0
  144. package/dist/UserStore-C1fdL3Iu.mjs.map +1 -0
  145. package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
  146. package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
  147. package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
  148. package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
  149. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
  150. package/dist/accounts/index.d.ts +1 -0
  151. package/dist/accounts/index.es.js +784 -12
  152. package/dist/accounts/index.es.js.map +1 -0
  153. package/dist/analytics/index.es.js +140 -155
  154. package/dist/analytics/index.es.js.map +1 -0
  155. package/dist/budgets/index.es.js +1267 -1317
  156. package/dist/budgets/index.es.js.map +1 -0
  157. package/dist/cashflow/index.es.js +943 -1047
  158. package/dist/cashflow/index.es.js.map +1 -0
  159. package/dist/categories/index.es.js +5 -4
  160. package/dist/categories/index.es.js.map +1 -0
  161. package/dist/common/components/DataRow.d.ts +1 -0
  162. package/dist/common/components/ListItemWrapper.d.ts +2 -1
  163. package/dist/common/constants/Analytics.d.ts +3 -0
  164. package/dist/common/index.es.js +310 -101
  165. package/dist/common/index.es.js.map +1 -0
  166. package/dist/core/index.es.js +105 -80
  167. package/dist/core/index.es.js.map +1 -0
  168. package/dist/core/stores/RecurringTransactionsStore.d.ts +29 -1
  169. package/dist/core/stores/TransactionStore.d.ts +1 -0
  170. package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
  171. package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
  172. package/dist/core/utils/DateUtil.d.ts +2 -0
  173. package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
  174. package/dist/dashboard/index.es.js +142 -185
  175. package/dist/dashboard/index.es.js.map +1 -0
  176. package/dist/debts/index.es.js +1273 -1384
  177. package/dist/debts/index.es.js.map +1 -0
  178. package/dist/finstrong/index.es.js +3473 -3367
  179. package/dist/finstrong/index.es.js.map +1 -0
  180. package/dist/goals/index.es.js +984 -1103
  181. package/dist/goals/index.es.js.map +1 -0
  182. package/dist/help/index.es.js +26 -3
  183. package/dist/help/index.es.js.map +1 -0
  184. package/dist/hooks-97sNJ_lf.mjs +78 -0
  185. package/dist/hooks-97sNJ_lf.mjs.map +1 -0
  186. package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
  187. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
  188. package/dist/insights/index.es.js +4871 -93
  189. package/dist/insights/index.es.js.map +1 -0
  190. package/dist/investments/index.es.js +1523 -1533
  191. package/dist/investments/index.es.js.map +1 -0
  192. package/dist/merchants/index.es.js +65 -75
  193. package/dist/merchants/index.es.js.map +1 -0
  194. package/dist/microinsights/index.es.js +826 -15
  195. package/dist/microinsights/index.es.js.map +1 -0
  196. package/dist/networth/index.es.js +504 -550
  197. package/dist/networth/index.es.js.map +1 -0
  198. package/dist/notifications/index.es.js +162 -169
  199. package/dist/notifications/index.es.js.map +1 -0
  200. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
  201. package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
  202. package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
  203. package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
  204. package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
  205. package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
  206. package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
  207. package/dist/recurringtransactions/index.es.js +1012 -10
  208. package/dist/recurringtransactions/index.es.js.map +1 -0
  209. package/dist/settings/index.es.js +892 -13
  210. package/dist/settings/index.es.js.map +1 -0
  211. package/dist/spending/index.es.js +457 -400
  212. package/dist/spending/index.es.js.map +1 -0
  213. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
  214. package/dist/transactions/index.es.js +604 -10
  215. package/dist/transactions/index.es.js.map +1 -0
  216. package/dist/trends/index.es.js +1408 -1268
  217. package/dist/trends/index.es.js.map +1 -0
  218. package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
  219. package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
  220. package/dist/useAriaLive-MkYebyUR.mjs +36 -0
  221. package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
  222. package/dist/useDimensions-CeDR9V8N.mjs +37 -0
  223. package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
  224. package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
  225. package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
  226. package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
  227. package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
  228. package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
  229. package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
  230. package/package.json +30 -30
  231. package/dist/Analytics-BKzTPees.mjs +0 -61
  232. package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
  233. package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
  234. package/dist/Loader-BlVzRtUd.mjs +0 -73
  235. package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
  236. package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
  237. package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
  238. package/dist/accounts-DkyAiLpg.mjs +0 -15632
  239. package/dist/core-BexP5oiV.mjs +0 -4047
  240. package/dist/help-CctDYrAH.mjs +0 -2308
  241. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
  242. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
  243. package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
  244. package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
  245. package/dist/settings-ZMHe439l.mjs +0 -1526
@@ -1,128 +1,115 @@
1
- import { J as F, ln as re, m as Y, un as oe, x as K } from "../core-BexP5oiV.mjs";
2
- import { An as ie, Gn as ae, i as se, jn as x, lr as U, mr as q, qn as ce, sr as w, yn as le } from "../accounts-DkyAiLpg.mjs";
3
- import { n as J } from "../Analytics-BKzTPees.mjs";
4
- import { d as B, h as Z, k as de, n as he, p as E, t as Q, x as j } from "../Loader-BlVzRtUd.mjs";
5
- import p from "react";
6
- import { observer as C } from "mobx-react-lite";
7
- import h from "@mui/material/Stack";
8
- import { Icon as R, P, Text as d } from "@mxenabled/mxui";
9
- import me from "@mui/material/Button";
10
- import { Icon as ee } from "@mxenabled/mx-icons";
11
- import { Fragment as N, jsx as e, jsxs as o } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e, Fragment as N } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { observer as _ } from "mobx-react-lite";
4
+ import m from "@mui/material/Stack";
5
+ import { P as Y, Text as d, Icon as R } from "@mxenabled/mxui";
6
+ import { Icon as Z } from "@mxenabled/mx-icons";
7
+ import { f as F } from "../NumberFormatting--XMeeBfr.mjs";
8
+ import { c as oe, f as $, u as E, a as q, x as j, D as re } from "../hooks-97sNJ_lf.mjs";
9
+ import { u as J } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
10
+ import { A as v } from "../Analytics-WeZYytR0.mjs";
11
+ import { L as Q } from "../Loader-CxeBwuPG.mjs";
12
+ import { M as ie } from "../MicroWidgetContainer-B2NnKBgW.mjs";
13
+ import { format as ae, fromUnixTime as se, differenceInMonths as ce } from "date-fns";
14
+ import P from "@mui/material/Box";
15
+ import { C as le } from "../ConnectionsDrawer-CZU9ku-k.mjs";
16
+ import { fromUnixTime as de } from "date-fns/fromUnixTime";
12
17
  import { useTheme as H } from "@mui/material/styles";
13
- import te from "@mui/material/Box";
14
- import { fromUnixTime as ue } from "date-fns/fromUnixTime";
15
- import { differenceInMonths as pe, format as fe, fromUnixTime as xe } from "date-fns";
16
- import { Stack as ge } from "@mui/material";
18
+ import { L as me } from "../LineChart-CUfiH86G.mjs";
19
+ import { u as ee } from "../useScreenSize-mWpmnh5w.mjs";
20
+ import { f as he, D as pe } from "../DateFormats-HudZ3Bjs.mjs";
21
+ import ue from "@mui/material/Button";
17
22
  import L from "@mui/material/Divider";
18
- import G from "@mui/material/List";
19
- import A from "@mui/material/ListItem";
20
- import ne from "@mui/material/ListItemButton";
21
- import V from "@mui/material/ListItemIcon";
22
- import v from "@mui/material/ListItemText";
23
- import O from "@mui/material/ListSubheader";
24
- import ye from "@mui/material/Collapse";
25
- var _e = ({ amount: t, copy: s, trendValue: i }) => {
26
- const n = i > 0, r = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
27
- return /* @__PURE__ */ o(h, {
28
- sx: {
29
- flexDirection: "row",
30
- justifyContent: "space-between"
31
- },
32
- children: [/* @__PURE__ */ e(P, {
33
- variant: "h1",
34
- children: F(t, "0,0")
35
- }), t !== 0 && /* @__PURE__ */ o(h, {
36
- sx: { color: n ? "success.main" : "text.secondary" },
37
- children: [/* @__PURE__ */ o(h, {
38
- sx: {
39
- flexDirection: "row",
40
- gap: 8
41
- },
42
- children: [/* @__PURE__ */ e(ee, {
43
- name: r,
44
- size: 20
45
- }), /* @__PURE__ */ e(d, {
46
- sx: {
47
- fontWeight: 600,
48
- textAlign: "right"
49
- },
50
- variant: "body1",
51
- children: F(i, "0,0.00")
52
- })]
53
- }), /* @__PURE__ */ e(d, {
54
- sx: {
55
- display: "block",
56
- textAlign: "right"
57
- },
58
- variant: "caption",
59
- children: s.this_month
60
- })]
61
- })]
62
- });
63
- }, ve = ({ copy: t }) => /* @__PURE__ */ o(h, {
64
- sx: {
65
- flexDirection: "row",
66
- gap: 12
67
- },
68
- children: [/* @__PURE__ */ e(ee, {
69
- name: "elevation",
70
- size: 32,
71
- sx: { color: "text.primary" }
72
- }), /* @__PURE__ */ o(h, { children: [/* @__PURE__ */ e(d, {
73
- sx: {
74
- display: "block",
75
- fontWeight: 600
76
- },
77
- variant: "body1",
78
- children: t.empty_widget_header
79
- }), /* @__PURE__ */ e(P, {
80
- sx: { color: "text.secondary" },
81
- variant: "body2",
82
- children: t.zero_state_description
83
- })] })]
84
- }), it = C(({ onCTAClick: t }) => {
85
- const { visibleAccounts: s } = he(), { onEvent: i } = B(), { net_worth: n, common: r } = E(), { isInitialized: a } = Z(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = j();
86
- if (p.useEffect(() => {
23
+ import z from "@mui/material/List";
24
+ import A from "@mui/material/ListSubheader";
25
+ import O from "@mui/material/ListItem";
26
+ import te from "@mui/material/ListItemButton";
27
+ import b from "@mui/material/ListItemText";
28
+ import { l as ne } from "../DateUtil-CzBmbjmA.mjs";
29
+ import { C as x } from "../CurrencyText-CCbE6MmF.mjs";
30
+ import { Stack as fe } from "@mui/material";
31
+ import xe from "@mui/material/Collapse";
32
+ import K from "@mui/material/ListItemIcon";
33
+ import { g as U } from "../NetWorthUtils-DfSH3z70.mjs";
34
+ import { D as V } from "../Drawer-DsnW2o0v.mjs";
35
+ import { W as ge } from "../WidgetContainer-DJnp6t6c.mjs";
36
+ import { E as ye } from "../EmptyState-CJUDc3kD.mjs";
37
+ const Ce = ({ amount: t, copy: s, trendValue: i }) => {
38
+ const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
39
+ return /* @__PURE__ */ r(m, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
40
+ /* @__PURE__ */ e(Y, { variant: "h1", children: F(t, "0,0") }),
41
+ t !== 0 && /* @__PURE__ */ r(m, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
42
+ /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 8 }, children: [
43
+ /* @__PURE__ */ e(Z, { name: o, size: 20 }),
44
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: F(i, "0,0.00") })
45
+ ] }),
46
+ /* @__PURE__ */ e(d, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
47
+ ] })
48
+ ] });
49
+ }, be = ({ copy: t }) => /* @__PURE__ */ r(m, { sx: { flexDirection: "row", gap: 12 }, children: [
50
+ /* @__PURE__ */ e(Z, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
51
+ /* @__PURE__ */ r(m, { children: [
52
+ /* @__PURE__ */ e(d, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
53
+ /* @__PURE__ */ e(Y, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
54
+ ] })
55
+ ] }), gt = _(({ onCTAClick: t }) => {
56
+ const { visibleAccounts: s } = oe(), { onEvent: i } = $(), { net_worth: n, common: a } = E(), { isInitialized: o } = q(), { isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthData: g, selectedData: f } = j();
57
+ if (u.useEffect(() => {
87
58
  c || l().finally();
88
59
  }, []), J({
89
60
  widgetName: "NetWorthMicroWidget",
90
61
  isLoaded: c
91
- }), p.useEffect(() => {
92
- c && i(w.NET_WORTH_LOAD_WIDGET, { state: s?.length ? "default" : "zeroState" });
93
- }, [c]), !a || !c) return /* @__PURE__ */ e(Q, { height: 100 });
94
- const S = () => {
95
- i(s.length ? w.NET_WORTH_CLICK_VIEW_DETAILS : w.NET_WORTH_CLICK_GET_STARTED), t();
62
+ }), u.useEffect(() => {
63
+ c && i(v.NET_WORTH_LOAD_WIDGET, {
64
+ state: s?.length ? "default" : "zeroState"
65
+ });
66
+ }, [c]), !o || !c) return /* @__PURE__ */ e(Q, { height: 100 });
67
+ const W = () => {
68
+ i(
69
+ s.length ? v.NET_WORTH_CLICK_VIEW_DETAILS : v.NET_WORTH_CLICK_GET_STARTED
70
+ ), t();
96
71
  };
97
- return /* @__PURE__ */ e(ce, {
98
- className: "mx-networth-microwidget",
99
- ctaLabel: r.see_details,
100
- onCTAClick: S,
101
- title: n.net_worth,
102
- children: g.accounts.length ? /* @__PURE__ */ e(_e, {
103
- amount: f?.y,
104
- copy: n,
105
- trendValue: f?.change
106
- }) : /* @__PURE__ */ e(ve, { copy: n })
107
- });
108
- }), Ce = () => {
109
- const { isMobile: t } = q(), { availableWidth: s } = de(), i = H(), { hoveredData: n, netWorthChartData: r, selectedData: a, setHoveredIndex: c, setSelectedIndex: l } = j(), g = s - 320, f = r.map((m) => ({
110
- x: oe(ue(m.x), re.MONTH_SHORT),
111
- y: m.y
112
- })), S = a ? { index: r.findIndex((m) => m.x === a.x) } : void 0, W = n ? { index: r.findIndex((m) => m.x === n.x) } : void 0, b = (m) => ({
113
- fill: m === S?.index ? i.palette.success.main : "",
114
- filter: m === W?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
72
+ return /* @__PURE__ */ e(
73
+ ie,
74
+ {
75
+ className: "mx-networth-microwidget",
76
+ ctaLabel: a.see_details,
77
+ onCTAClick: W,
78
+ title: n.net_worth,
79
+ children: g.accounts.length ? /* @__PURE__ */ e(
80
+ Ce,
81
+ {
82
+ amount: f?.y,
83
+ copy: n,
84
+ trendValue: f?.change
85
+ }
86
+ ) : /* @__PURE__ */ e(be, { copy: n })
87
+ }
88
+ );
89
+ }), _e = () => {
90
+ const { isMobile: t } = ee(), { availableWidth: s } = re(), i = H(), {
91
+ hoveredData: n,
92
+ netWorthChartData: a,
93
+ selectedData: o,
94
+ setHoveredIndex: c,
95
+ setSelectedIndex: l
96
+ } = j(), g = s - 320, f = a.map((h) => ({
97
+ x: he(de(h.x), pe.MONTH_SHORT),
98
+ y: h.y
99
+ })), W = o ? { index: a.findIndex((h) => h.x === o.x) } : void 0, S = n ? { index: a.findIndex((h) => h.x === n.x) } : void 0, w = (h) => ({
100
+ fill: h === W?.index ? i.palette.success.main : "",
101
+ filter: h === S?.index ? `drop-shadow(0px 0px 10px ${i.palette.success.main})` : "none",
115
102
  stroke: i.palette.success.main
116
- }), y = (m, M) => {
103
+ }), y = (h, M) => {
117
104
  l(M);
118
- }, k = (m) => {
119
- c(m);
105
+ }, k = (h) => {
106
+ c(h);
120
107
  }, D = () => {
121
108
  c(-1);
122
109
  };
123
- return /* @__PURE__ */ e(h, {
124
- sx: { width: "100%" },
125
- children: /* @__PURE__ */ e(le, {
110
+ return /* @__PURE__ */ e(m, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
111
+ me,
112
+ {
126
113
  baseline: "min",
127
114
  chartFor: "networthChart",
128
115
  chartXaxisSx: { "& .MuiChartsAxis-tickLabel": { transform: "translateX(8px)" } },
@@ -131,481 +118,448 @@ var _e = ({ amount: t, copy: s, trendValue: i }) => {
131
118
  datasets: [f],
132
119
  height: 350,
133
120
  labels: [],
134
- margin: {
135
- right: 20,
136
- left: 38
137
- },
138
- markHandlers: {
139
- onMarkClick: y,
140
- onMouseEnter: k,
141
- onMouseLeave: D
142
- },
143
- markStyles: b,
121
+ margin: { right: 20, left: 38 },
122
+ markHandlers: { onMarkClick: y, onMouseEnter: k, onMouseLeave: D },
123
+ markStyles: w,
144
124
  showArea: !0,
145
125
  useCustomMark: !0,
146
126
  valueFormatterString: "0.0[0]a",
147
127
  width: t ? s - 48 : g
148
- })
128
+ }
129
+ ) });
130
+ }, we = _(_e), ve = ({
131
+ item: t,
132
+ getStyles: s,
133
+ isHovered: i = !1,
134
+ isSelected: n = !1,
135
+ onItemClick: a,
136
+ onMouseEnter: o,
137
+ onMouseLeave: c
138
+ }) => {
139
+ const [l, g] = u.useState({
140
+ color: ""
149
141
  });
150
- }, be = C(Ce), we = ({ item: t, getStyles: s, isHovered: i = !1, isSelected: n = !1, onItemClick: r, onMouseEnter: a, onMouseLeave: c }) => {
151
- const [l, g] = p.useState({ color: "" });
152
- return p.useEffect(() => {
142
+ return u.useEffect(() => {
153
143
  g(s(t));
154
- }, [i, n]), /* @__PURE__ */ o(p.Fragment, { children: [/* @__PURE__ */ e(A, {
155
- sx: {
156
- ...l,
157
- minHeight: 44,
158
- "&:hover": { color: n ? "inherit" : l.color }
159
- },
160
- children: /* @__PURE__ */ e(ne, {
161
- onClick: (f) => r?.(f, t.x),
162
- onMouseEnter: () => a(t.x),
163
- onMouseLeave: () => c(),
164
- sx: {
165
- minHeight: 20,
166
- padding: 12
167
- },
168
- children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
169
- direction: "row",
170
- justifyContent: "space-between",
171
- sx: { fontWeight: 400 },
172
- children: [/* @__PURE__ */ e(d, {
173
- variant: "body1",
174
- children: Y(t.x)
175
- }), /* @__PURE__ */ e(x, {
176
- amount: t.y,
177
- sx: { color: "inherit" },
178
- variant: "body1"
179
- })]
180
- }) })
181
- })
182
- }), /* @__PURE__ */ e(L, {})] }, t.x);
183
- }, Se = C(we), We = ({ currencyLabel: t, currencyVariant: s = "body2", iconSize: i, netWorth: n, theme: r }) => {
184
- let a = r.palette.secondary.main, c = r.palette.secondary.main, l = "trending_flat";
185
- return n.change < 0 ? l = "trending_down" : n.change > 0 && (a = r.palette.success.main, c = r.palette.success.main, l = "trending_up"), /* @__PURE__ */ o(ge, {
186
- alignItems: "center",
187
- direction: "row",
188
- spacing: 4,
189
- children: [
190
- /* @__PURE__ */ e(R, {
144
+ }, [i, n]), /* @__PURE__ */ r(u.Fragment, { children: [
145
+ /* @__PURE__ */ e(
146
+ O,
147
+ {
148
+ sx: {
149
+ ...l,
150
+ minHeight: 44,
151
+ "&:hover": { color: n ? "inherit" : l.color }
152
+ },
153
+ children: /* @__PURE__ */ e(
154
+ te,
155
+ {
156
+ onClick: (f) => a?.(f, t.x),
157
+ onMouseEnter: () => o(t.x),
158
+ onMouseLeave: () => c(),
159
+ sx: { minHeight: 20, padding: 12 },
160
+ children: /* @__PURE__ */ e(
161
+ b,
162
+ {
163
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
164
+ /* @__PURE__ */ e(d, { variant: "body1", children: ne(t.x) }),
165
+ /* @__PURE__ */ e(x, { amount: t.y, sx: { color: "inherit" }, variant: "body1" })
166
+ ] })
167
+ }
168
+ )
169
+ }
170
+ )
171
+ }
172
+ ),
173
+ /* @__PURE__ */ e(L, {})
174
+ ] }, t.x);
175
+ }, We = _(ve), Se = ({
176
+ currencyLabel: t,
177
+ currencyVariant: s = "body2",
178
+ iconSize: i,
179
+ netWorth: n,
180
+ theme: a
181
+ }) => {
182
+ let o = a.palette.secondary.main, c = a.palette.secondary.main, l = "trending_flat";
183
+ return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = a.palette.success.main, c = a.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(fe, { alignItems: "center", direction: "row", spacing: 4, children: [
184
+ /* @__PURE__ */ e(
185
+ R,
186
+ {
191
187
  name: l,
192
188
  size: i,
193
- sx: { color: a }
194
- }),
195
- /* @__PURE__ */ e(x, {
196
- amount: n.change,
197
- color: c,
198
- variant: s
199
- }),
200
- /* @__PURE__ */ e(d, {
201
- variant: "body2",
202
- children: t
203
- })
204
- ]
205
- });
206
- }, $ = C(We), Te = ({ netWorth: t, gains: s, losses: i, totalGains: n, totalLosses: r }) => {
207
- const { net_worth: a } = E(), c = H();
208
- return /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ o(h, {
209
- alignItems: "center",
210
- justifyContent: "space-between",
211
- mb: 8,
212
- pt: 24,
213
- children: [
214
- /* @__PURE__ */ e(d, {
215
- variant: "body2",
216
- children: Y(t?.x)
217
- }),
218
- /* @__PURE__ */ e(d, {
219
- variant: "body1",
220
- children: a.total_change
221
- }),
222
- t && /* @__PURE__ */ e($, {
223
- currencyVariant: "h1",
224
- iconSize: 32,
225
- netWorth: t,
226
- theme: c
227
- })
228
- ]
229
- }), /* @__PURE__ */ o(G, { children: [
230
- /* @__PURE__ */ e(O, {
231
- sx: {
232
- mb: 8,
233
- mt: 12,
234
- mx: 8
235
- },
236
- children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
237
- direction: "row",
238
- justifyContent: "space-between",
239
- children: [/* @__PURE__ */ e(d, {
240
- sx: { fontWeight: 700 },
241
- variant: "caption",
242
- children: a.gains
243
- }), /* @__PURE__ */ e(x, {
244
- amount: n,
245
- sx: { fontWeight: 400 },
246
- variant: "caption"
247
- })]
248
- }) })
249
- }),
250
- s?.map((l) => /* @__PURE__ */ o(p.Fragment, { children: [/* @__PURE__ */ e(A, {
251
- sx: {
252
- backgroundColor: c.palette.background.paper,
253
- py: 14
254
- },
255
- children: /* @__PURE__ */ e(v, {
256
- primary: /* @__PURE__ */ o(h, {
257
- direction: "row",
258
- justifyContent: "space-between",
259
- children: [/* @__PURE__ */ e(d, {
260
- sx: { mr: 10 },
261
- variant: "body1",
262
- children: l.accountName
263
- }), /* @__PURE__ */ e(x, {
264
- amount: l.gain,
265
- sx: {
266
- color: c.palette.success.main,
267
- flexShrink: 0,
268
- fontWeight: 700
269
- },
270
- variant: "body1"
271
- })]
272
- }),
273
- sx: { px: 16 }
274
- })
275
- }), /* @__PURE__ */ e(L, {})] }, l.accountName)),
276
- /* @__PURE__ */ e(O, {
277
- sx: {
278
- mb: 8,
279
- mt: 12,
280
- mx: 8
281
- },
282
- children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
283
- direction: "row",
284
- justifyContent: "space-between",
285
- children: [/* @__PURE__ */ e(d, {
286
- sx: { fontWeight: 700 },
287
- variant: "caption",
288
- children: a.losses
289
- }), /* @__PURE__ */ e(x, {
290
- amount: r,
291
- sx: { fontWeight: 400 },
292
- variant: "caption"
293
- })]
294
- }) })
295
- }),
296
- i?.map((l) => /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ e(A, {
297
- sx: {
298
- backgroundColor: c.palette.background.paper,
299
- py: 14
300
- },
301
- children: /* @__PURE__ */ e(v, {
302
- primary: /* @__PURE__ */ o(h, {
303
- direction: "row",
189
+ sx: {
190
+ color: o
191
+ }
192
+ }
193
+ ),
194
+ /* @__PURE__ */ e(x, { amount: n.change, color: c, variant: s }),
195
+ /* @__PURE__ */ e(d, { variant: "body2", children: t })
196
+ ] });
197
+ }, B = _(Se), Ie = ({
198
+ netWorth: t,
199
+ gains: s,
200
+ losses: i,
201
+ totalGains: n,
202
+ totalLosses: a
203
+ }) => {
204
+ const { net_worth: o } = E(), c = H();
205
+ return /* @__PURE__ */ r(N, { children: [
206
+ /* @__PURE__ */ r(m, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
207
+ /* @__PURE__ */ e(d, { variant: "body2", children: ne(t?.x) }),
208
+ /* @__PURE__ */ e(d, { variant: "body1", children: o.total_change }),
209
+ t && /* @__PURE__ */ e(B, { currencyVariant: "h1", iconSize: 32, netWorth: t, theme: c })
210
+ ] }),
211
+ /* @__PURE__ */ r(z, { children: [
212
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
213
+ b,
214
+ {
215
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
216
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
217
+ /* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
218
+ ] })
219
+ }
220
+ ) }),
221
+ s?.map((l) => /* @__PURE__ */ r(u.Fragment, { children: [
222
+ /* @__PURE__ */ e(O, { sx: { backgroundColor: c.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
223
+ b,
224
+ {
225
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
226
+ /* @__PURE__ */ e(d, { sx: { mr: 10 }, variant: "body1", children: l.accountName }),
227
+ /* @__PURE__ */ e(
228
+ x,
229
+ {
230
+ amount: l.gain,
231
+ sx: { color: c.palette.success.main, flexShrink: 0, fontWeight: 700 },
232
+ variant: "body1"
233
+ }
234
+ )
235
+ ] }),
236
+ sx: { px: 16 }
237
+ }
238
+ ) }),
239
+ /* @__PURE__ */ e(L, {})
240
+ ] }, l.accountName)),
241
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
242
+ b,
243
+ {
244
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
245
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
246
+ /* @__PURE__ */ e(x, { amount: a, sx: { fontWeight: 400 }, variant: "caption" })
247
+ ] })
248
+ }
249
+ ) }),
250
+ i?.map((l) => /* @__PURE__ */ r(N, { children: [
251
+ /* @__PURE__ */ e(
252
+ O,
253
+ {
254
+ sx: { backgroundColor: c.palette.background.paper, py: 14 },
255
+ children: /* @__PURE__ */ e(
256
+ b,
257
+ {
258
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
259
+ /* @__PURE__ */ e(
260
+ d,
261
+ {
262
+ sx: {
263
+ mr: 10
264
+ },
265
+ variant: "body1",
266
+ children: l.accountName
267
+ }
268
+ ),
269
+ /* @__PURE__ */ e(
270
+ x,
271
+ {
272
+ amount: l.loss,
273
+ sx: { flexShrink: 0, fontWeight: 700 },
274
+ variant: "body1"
275
+ }
276
+ )
277
+ ] }),
278
+ sx: { px: 16 }
279
+ }
280
+ )
281
+ },
282
+ l.accountName
283
+ ),
284
+ /* @__PURE__ */ e(L, {})
285
+ ] }))
286
+ ] })
287
+ ] });
288
+ }, Te = _(Ie), Le = ({ accounts: t, name: s, icon: i }) => {
289
+ const [n, a] = u.useState(!1);
290
+ return /* @__PURE__ */ r(N, { children: [
291
+ /* @__PURE__ */ e(O, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(te, { onClick: () => a(!n), children: [
292
+ i && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(R, { name: i, size: 24, sx: { mr: 12 } }) }),
293
+ /* @__PURE__ */ e(
294
+ b,
295
+ {
296
+ primary: /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "body1", children: s })
297
+ }
298
+ ),
299
+ /* @__PURE__ */ e(K, { children: n ? /* @__PURE__ */ e(R, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(R, { name: "expand_more", size: 24 }) })
300
+ ] }) }),
301
+ /* @__PURE__ */ e(L, {}),
302
+ /* @__PURE__ */ e(xe, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, c) => /* @__PURE__ */ r(z, { children: [
303
+ /* @__PURE__ */ e(O, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
304
+ b,
305
+ {
306
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
307
+ /* @__PURE__ */ e(
308
+ d,
309
+ {
310
+ sx: {
311
+ marginRight: 10
312
+ },
313
+ variant: "body1",
314
+ children: o.accountName
315
+ }
316
+ ),
317
+ /* @__PURE__ */ e(
318
+ x,
319
+ {
320
+ amount: o.balance,
321
+ sx: {
322
+ flexShrink: 0
323
+ },
324
+ variant: "body2"
325
+ }
326
+ )
327
+ ] }),
328
+ sx: { pl: 72, pr: 16 }
329
+ }
330
+ ) }),
331
+ c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})
332
+ ] }, o.accountName)) })
333
+ ] });
334
+ }, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Le, { accounts: s, icon: i, name: n }, n)) }), De = ({
335
+ netWorth: t,
336
+ assets: s,
337
+ liabilities: i,
338
+ totalAssets: n,
339
+ totalLiabilities: a
340
+ }) => {
341
+ const { net_worth: o } = E(), c = H();
342
+ return /* @__PURE__ */ r(N, { children: [
343
+ /* @__PURE__ */ r(
344
+ P,
345
+ {
346
+ sx: {
347
+ alignItems: "center",
348
+ display: "flex",
349
+ flexDirection: "column",
304
350
  justifyContent: "space-between",
305
- children: [/* @__PURE__ */ e(d, {
306
- sx: { mr: 10 },
307
- variant: "body1",
308
- children: l.accountName
309
- }), /* @__PURE__ */ e(x, {
310
- amount: l.loss,
311
- sx: {
312
- flexShrink: 0,
313
- fontWeight: 700
314
- },
315
- variant: "body1"
316
- })]
317
- }),
318
- sx: { px: 16 }
319
- })
320
- }, l.accountName), /* @__PURE__ */ e(L, {})] }))
321
- ] })] });
322
- }, Ie = C(Te), Le = ({ accounts: t, name: s, icon: i }) => {
323
- const [n, r] = p.useState(!1);
324
- return /* @__PURE__ */ o(N, { children: [
325
- /* @__PURE__ */ e(A, {
326
- sx: (a) => ({ backgroundColor: a.palette.background.paper }),
327
- children: /* @__PURE__ */ o(ne, {
328
- onClick: () => r(!n),
351
+ paddingTop: 24,
352
+ marginBottom: 8
353
+ },
329
354
  children: [
330
- i && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(R, {
331
- name: i,
332
- size: 24,
333
- sx: { mr: 12 }
334
- }) }),
335
- /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ e(d, {
336
- sx: { fontWeight: 700 },
337
- variant: "body1",
338
- children: s
339
- }) }),
340
- /* @__PURE__ */ e(V, { children: n ? /* @__PURE__ */ e(R, {
341
- name: "expand_less",
342
- size: 24
343
- }) : /* @__PURE__ */ e(R, {
344
- name: "expand_more",
345
- size: 24
346
- }) })
355
+ /* @__PURE__ */ e(d, { variant: "body1", children: o.current_net_worth }),
356
+ /* @__PURE__ */ e(x, { amount: t?.y ?? 0, variant: "h1" }),
357
+ t && /* @__PURE__ */ e(
358
+ B,
359
+ {
360
+ currencyLabel: o.this_month,
361
+ iconSize: 20,
362
+ netWorth: t,
363
+ theme: c
364
+ }
365
+ )
347
366
  ]
348
- })
349
- }),
350
- /* @__PURE__ */ e(L, {}),
351
- /* @__PURE__ */ e(ye, {
352
- in: n,
353
- timeout: "auto",
354
- unmountOnExit: !0,
355
- children: t.map((a, c) => /* @__PURE__ */ o(G, { children: [/* @__PURE__ */ e(A, {
356
- sx: () => ({ py: 14 }),
357
- children: /* @__PURE__ */ e(v, {
358
- primary: /* @__PURE__ */ o(h, {
359
- direction: "row",
360
- justifyContent: "space-between",
361
- sx: { fontWeight: 400 },
362
- children: [/* @__PURE__ */ e(d, {
363
- sx: { marginRight: 10 },
364
- variant: "body1",
365
- children: a.accountName
366
- }), /* @__PURE__ */ e(x, {
367
- amount: a.balance,
368
- sx: { flexShrink: 0 },
369
- variant: "body2"
370
- })]
371
- }),
372
- sx: {
373
- pl: 72,
374
- pr: 16
375
- }
376
- })
377
- }), c < t.length - 1 ? /* @__PURE__ */ e(L, { variant: "inset" }) : /* @__PURE__ */ e(L, {})] }, a.accountName))
378
- })
367
+ }
368
+ ),
369
+ /* @__PURE__ */ r(z, { children: [
370
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
371
+ b,
372
+ {
373
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
374
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
375
+ /* @__PURE__ */ e(x, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
376
+ ] })
377
+ }
378
+ ) }),
379
+ /* @__PURE__ */ e(X, { groupedAccounts: U(s) }),
380
+ /* @__PURE__ */ e(A, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
381
+ b,
382
+ {
383
+ primary: /* @__PURE__ */ r(m, { direction: "row", justifyContent: "space-between", children: [
384
+ /* @__PURE__ */ e(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
385
+ /* @__PURE__ */ e(
386
+ x,
387
+ {
388
+ amount: a,
389
+ sx: { fontWeight: 400 },
390
+ variant: "caption"
391
+ }
392
+ )
393
+ ] })
394
+ }
395
+ ) }),
396
+ /* @__PURE__ */ e(X, { groupedAccounts: U(i) })
397
+ ] })
379
398
  ] });
380
- }, X = ({ groupedAccounts: t }) => /* @__PURE__ */ e(N, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(Le, {
381
- accounts: s,
382
- icon: i,
383
- name: n
384
- }, n)) }), De = ({ netWorth: t, assets: s, liabilities: i, totalAssets: n, totalLiabilities: r }) => {
385
- const { net_worth: a } = E(), c = H();
386
- return /* @__PURE__ */ o(N, { children: [/* @__PURE__ */ o(te, {
387
- sx: {
388
- alignItems: "center",
389
- display: "flex",
390
- flexDirection: "column",
391
- justifyContent: "space-between",
392
- paddingTop: 24,
393
- marginBottom: 8
394
- },
395
- children: [
396
- /* @__PURE__ */ e(d, {
397
- variant: "body1",
398
- children: a.current_net_worth
399
- }),
400
- /* @__PURE__ */ e(x, {
401
- amount: t?.y ?? 0,
402
- variant: "h1"
403
- }),
404
- t && /* @__PURE__ */ e($, {
405
- currencyLabel: a.this_month,
406
- iconSize: 20,
407
- netWorth: t,
408
- theme: c
409
- })
410
- ]
411
- }), /* @__PURE__ */ o(G, { children: [
412
- /* @__PURE__ */ e(O, {
413
- sx: {
414
- mb: 8,
415
- mt: 12,
416
- mx: 8
417
- },
418
- children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
419
- direction: "row",
420
- justifyContent: "space-between",
421
- children: [/* @__PURE__ */ e(d, {
422
- sx: { fontWeight: 700 },
423
- variant: "caption",
424
- children: a.assets
425
- }), /* @__PURE__ */ e(x, {
426
- amount: n,
427
- sx: { fontWeight: 400 },
428
- variant: "caption"
429
- })]
430
- }) })
431
- }),
432
- /* @__PURE__ */ e(X, { groupedAccounts: K(s) }),
433
- /* @__PURE__ */ e(O, {
434
- sx: {
435
- mb: 8,
436
- mt: 12,
437
- mx: 8
438
- },
439
- children: /* @__PURE__ */ e(v, { primary: /* @__PURE__ */ o(h, {
440
- direction: "row",
441
- justifyContent: "space-between",
442
- children: [/* @__PURE__ */ e(d, {
443
- sx: { fontWeight: 700 },
444
- variant: "caption",
445
- children: a.liabilities
446
- }), /* @__PURE__ */ e(x, {
447
- amount: r,
448
- sx: { fontWeight: 400 },
449
- variant: "caption"
450
- })]
451
- }) })
452
- }),
453
- /* @__PURE__ */ e(X, { groupedAccounts: K(i) })
454
- ] })] });
455
- }, Ne = C(De), Ee = () => {
456
- const { net_worth: t } = E(), s = H(), { onEvent: i } = B(), { assetsLiabilities: n, gainsLosses: r, hoveredData: a, netWorthChartData: c, selectedData: l, setHoveredIndex: g, setSelectedIndex: f } = j(), [S, W] = p.useState(!1), [b, y] = p.useState(!1), k = (u) => {
457
- const _ = u.x === a?.x, T = u.x === l?.x, I = {
399
+ }, Ne = _(De), Ee = () => {
400
+ const { net_worth: t } = E(), s = H(), { onEvent: i } = $(), {
401
+ assetsLiabilities: n,
402
+ gainsLosses: a,
403
+ hoveredData: o,
404
+ netWorthChartData: c,
405
+ selectedData: l,
406
+ setHoveredIndex: g,
407
+ setSelectedIndex: f
408
+ } = j(), [W, S] = u.useState(!1), [w, y] = u.useState(!1), k = (p) => {
409
+ const C = p.x === o?.x, I = p.x === l?.x, T = {
458
410
  backgroundColor: "inherit",
459
411
  borderBottom: "inherit",
460
412
  color: "inherit"
461
413
  };
462
- return _ && (I.color = T ? "inherit" : I.color, I.backgroundColor = s.palette.action.hover), T && (I.backgroundColor = s.palette.primary.main, I.borderBottom = s.palette.neutral.light, I.color = s.palette.common.white), I;
463
- }, D = (u, _) => {
464
- f(_), u.currentTarget instanceof HTMLDivElement && W(!0);
465
- }, m = () => {
466
- y(!0), i(w.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
467
- }, M = (u) => {
468
- g(u);
469
- }, z = () => {
414
+ return C && (T.color = I ? "inherit" : T.color, T.backgroundColor = s.palette.action.hover), I && (T.backgroundColor = s.palette.primary.main, T.borderBottom = s.palette.neutral.light, T.color = s.palette.common.white), T;
415
+ }, D = (p, C) => {
416
+ f(C), p.currentTarget instanceof HTMLDivElement && S(!0);
417
+ }, h = () => {
418
+ y(!0), i(v.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES);
419
+ }, M = (p) => {
420
+ g(p);
421
+ }, G = () => {
470
422
  g(-1);
471
423
  };
472
- return /* @__PURE__ */ o(h, {
473
- direction: "column",
474
- sx: { width: 320 },
475
- children: [
476
- /* @__PURE__ */ o(G, { children: [
477
- /* @__PURE__ */ e(O, {
478
- sx: {
479
- backgroundColor: "transparent",
480
- mb: 8,
481
- mt: 12,
482
- px: 12
483
- },
484
- children: /* @__PURE__ */ e(d, {
485
- bold: !0,
486
- component: "h2",
487
- variant: "body1",
488
- children: t.monthly_totals
489
- })
490
- }),
491
- /* @__PURE__ */ e(L, {}),
492
- c.map((u, _) => /* @__PURE__ */ e(Se, {
424
+ return /* @__PURE__ */ r(m, { direction: "column", sx: { width: 320 }, children: [
425
+ /* @__PURE__ */ r(z, { children: [
426
+ /* @__PURE__ */ e(A, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(d, { bold: !0, component: "h2", variant: "body1", children: t.monthly_totals }) }),
427
+ /* @__PURE__ */ e(L, {}),
428
+ c.map((p, C) => /* @__PURE__ */ e(
429
+ We,
430
+ {
493
431
  getStyles: k,
494
- isHovered: u.x === a?.x,
495
- isSelected: u.x === l?.x,
496
- item: u,
497
- onItemClick: (T) => D(T, _),
498
- onMouseEnter: () => M(_),
499
- onMouseLeave: () => z()
500
- }, u.x))
501
- ] }),
502
- /* @__PURE__ */ e(me, {
503
- onClick: () => m(),
504
- sx: {
505
- alignSelf: "center",
506
- marginTop: 16,
507
- width: "fit-content"
432
+ isHovered: p.x === o?.x,
433
+ isSelected: p.x === l?.x,
434
+ item: p,
435
+ onItemClick: (I) => D(I, C),
436
+ onMouseEnter: () => M(C),
437
+ onMouseLeave: () => G()
508
438
  },
439
+ p.x
440
+ ))
441
+ ] }),
442
+ /* @__PURE__ */ e(
443
+ ue,
444
+ {
445
+ onClick: () => h(),
446
+ sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
509
447
  variant: "outlined",
510
448
  children: t.view_assets_and_liabilities
511
- }),
512
- /* @__PURE__ */ e(U, {
449
+ }
450
+ ),
451
+ /* @__PURE__ */ e(
452
+ V,
453
+ {
513
454
  ariaLabelClose: "Close",
514
- isOpen: S,
515
- onClose: () => W(!1),
455
+ isOpen: W,
456
+ onClose: () => S(!1),
516
457
  shouldShowHeaderBorders: !1,
517
458
  shouldShowHeaderShadow: !0,
518
459
  title: t.gains_and_losses,
519
- children: r && /* @__PURE__ */ e(Ie, { ...r })
520
- }),
521
- /* @__PURE__ */ e(U, {
460
+ children: a && /* @__PURE__ */ e(Te, { ...a })
461
+ }
462
+ ),
463
+ /* @__PURE__ */ e(
464
+ V,
465
+ {
522
466
  ariaLabelClose: "Close",
523
- isOpen: b,
467
+ isOpen: w,
524
468
  onClose: () => y(!1),
525
469
  shouldShowHeaderBorders: !1,
526
470
  shouldShowHeaderShadow: !0,
527
471
  title: t.assets_and_liabilities,
528
472
  children: n && /* @__PURE__ */ e(Ne, { ...n })
529
- })
530
- ]
531
- });
532
- }, ke = C(Ee), Me = ({ hoveredData: t, selectedData: s }) => {
533
- const { net_worth: i } = E(), n = H(), r = t || s, a = fe(xe(r.x), "MMMM");
534
- return /* @__PURE__ */ o(h, {
535
- alignItems: "center",
536
- direction: "column",
537
- m: 24,
538
- children: [
539
- /* @__PURE__ */ e(d, {
540
- color: n.palette.secondary.main,
541
- variant: "body2",
542
- children: `${a} ${i.net_worth}`
543
- }),
544
- /* @__PURE__ */ e(x, {
545
- amount: r.y,
546
- variant: "h2"
547
- }),
548
- /* @__PURE__ */ e($, {
549
- currencyLabel: i.this_month,
550
- netWorth: r,
551
- theme: n
552
- })
553
- ]
554
- });
555
- }, Ae = C(Me), at = C(({ onBackClick: t, onMenuClick: s }) => {
556
- const { isInitialized: i } = Z(), { accounts: n, net_worth: r } = E(), { hoveredData: a, isNetWorthDataLoaded: c, loadNetWorthData: l, netWorthChartData: g, selectedData: f, setTimeframe: S, timeframe: W } = j(), { isMobile: b } = q(), { onEvent: y } = B(), [k, D] = p.useState(!1);
473
+ }
474
+ )
475
+ ] });
476
+ }, ke = _(Ee), Me = ({ hoveredData: t, selectedData: s }) => {
477
+ const { net_worth: i } = E(), n = H(), a = t || s, o = ae(se(a.x), "MMMM");
478
+ return /* @__PURE__ */ r(m, { alignItems: "center", direction: "column", m: 24, children: [
479
+ /* @__PURE__ */ e(d, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
480
+ /* @__PURE__ */ e(x, { amount: a.y, variant: "h2" }),
481
+ /* @__PURE__ */ e(B, { currencyLabel: i.this_month, netWorth: a, theme: n })
482
+ ] });
483
+ }, Ae = _(Me), yt = _(({ onBackClick: t, onMenuClick: s }) => {
484
+ const { isInitialized: i } = q(), { accounts: n, net_worth: a } = E(), {
485
+ hoveredData: o,
486
+ isNetWorthDataLoaded: c,
487
+ loadNetWorthData: l,
488
+ netWorthChartData: g,
489
+ selectedData: f,
490
+ setTimeframe: W,
491
+ timeframe: S
492
+ } = j(), { isMobile: w } = ee(), { onEvent: y } = $(), [k, D] = u.useState(!1);
557
493
  J({
558
494
  widgetName: "NetWorthWidget",
559
495
  isLoaded: c
560
- }), p.useEffect(() => {
561
- c || l().finally(), y(w.NET_WORTH_VIEW);
562
- }, []), p.useEffect(() => {
563
- y(w.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: W + "M" });
564
- }, [W]);
565
- const m = async (u) => {
566
- const _ = u[0], T = u[1];
567
- _ && T && S(pe(T, _));
496
+ }), u.useEffect(() => {
497
+ c || l().finally(), y(v.NET_WORTH_VIEW);
498
+ }, []), u.useEffect(() => {
499
+ y(v.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: S + "M" });
500
+ }, [S]);
501
+ const h = async (p) => {
502
+ const C = p[0], I = p[1];
503
+ C && I && W(ce(I, C));
568
504
  }, M = () => {
569
- D(!0), y(w.ACCOUNTS_CLICK_CONNECT);
505
+ D(!0), y(v.ACCOUNTS_CLICK_CONNECT);
570
506
  };
571
507
  if (!i || !c) return /* @__PURE__ */ e(Q, {});
572
- const z = g.length === 0;
573
- return /* @__PURE__ */ o(ae, {
574
- calendarActions: { onRangeChanged: m },
575
- dateRangeVariant: b ? "timeframetabs" : "timeframebuttons",
576
- onAccountsFilterClick: () => y(w.NET_WORTH_WIDGET_CLICK_FILTER),
577
- onBackClick: t,
578
- onMenuClick: s,
579
- title: r.net_worth,
580
- children: [z ? /* @__PURE__ */ e(te, {
581
- sx: { justifyItems: "center" },
582
- children: /* @__PURE__ */ e(ie, {
583
- header: r.empty_widget_header,
584
- icon: "elevation",
585
- onClick: M,
586
- primaryButton: r.empty_widget_button,
587
- subText: r.empty_widget_description,
588
- sx: {
589
- width: { sm: 432 },
590
- ".buttons-footer": { width: 167 }
591
- }
592
- })
593
- }) : /* @__PURE__ */ o(N, { children: [f && /* @__PURE__ */ e(Ae, {
594
- hoveredData: a,
595
- selectedData: f
596
- }), /* @__PURE__ */ o(h, {
597
- alignItems: b ? "center" : "flex-start",
598
- direction: b ? "column" : "row",
599
- spacing: b ? 0 : 48,
600
- children: [/* @__PURE__ */ e(be, {}), /* @__PURE__ */ e(ke, {})]
601
- })] }), /* @__PURE__ */ e(se, {
602
- onClose: () => D(!1),
603
- showConnectionsWidget: k,
604
- title: n.manage_connections
605
- })]
606
- });
508
+ const G = g.length === 0;
509
+ return /* @__PURE__ */ r(
510
+ ge,
511
+ {
512
+ calendarActions: { onRangeChanged: h },
513
+ dateRangeVariant: w ? "timeframetabs" : "timeframebuttons",
514
+ onAccountsFilterClick: () => y(v.NET_WORTH_WIDGET_CLICK_FILTER),
515
+ onBackClick: t,
516
+ onMenuClick: s,
517
+ title: a.net_worth,
518
+ children: [
519
+ G ? /* @__PURE__ */ e(P, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
520
+ ye,
521
+ {
522
+ header: a.empty_widget_header,
523
+ icon: "elevation",
524
+ onClick: M,
525
+ primaryButton: a.empty_widget_button,
526
+ subText: a.empty_widget_description,
527
+ sx: {
528
+ width: { sm: 432 },
529
+ ".buttons-footer": {
530
+ width: 167
531
+ }
532
+ }
533
+ }
534
+ ) }) : /* @__PURE__ */ r(N, { children: [
535
+ f && /* @__PURE__ */ e(Ae, { hoveredData: o, selectedData: f }),
536
+ /* @__PURE__ */ r(
537
+ m,
538
+ {
539
+ alignItems: w ? "center" : "flex-start",
540
+ direction: w ? "column" : "row",
541
+ spacing: w ? 0 : 48,
542
+ children: [
543
+ /* @__PURE__ */ e(we, {}),
544
+ /* @__PURE__ */ e(ke, {})
545
+ ]
546
+ }
547
+ )
548
+ ] }),
549
+ /* @__PURE__ */ e(
550
+ le,
551
+ {
552
+ onClose: () => D(!1),
553
+ showConnectionsWidget: k,
554
+ title: n.manage_connections
555
+ }
556
+ )
557
+ ]
558
+ }
559
+ );
607
560
  });
608
561
  export {
609
- it as NetWorthMicroWidget,
610
- at as NetWorthWidget
562
+ gt as NetWorthMicroWidget,
563
+ yt as NetWorthWidget
611
564
  };
565
+ //# sourceMappingURL=index.es.js.map