@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.1

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 (248) hide show
  1. package/CHANGELOG.md +80 -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-C1hhmlmI.mjs +922 -0
  6. package/dist/AccountDetailsDrawer-C1hhmlmI.mjs.map +1 -0
  7. package/dist/AccountDetailsHeader-BliEZhz7.mjs +230 -0
  8. package/dist/AccountDetailsHeader-BliEZhz7.mjs.map +1 -0
  9. package/dist/AccountUtils-Cbh8r9cP.mjs +29 -0
  10. package/dist/AccountUtils-Cbh8r9cP.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-Be9WHv-s.mjs +906 -0
  92. package/dist/ManageIncome-Be9WHv-s.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-Dj7CgAg2.mjs +96 -0
  98. package/dist/NetWorthUtils-Dj7CgAg2.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-kRqAViNn.mjs +89 -0
  110. package/dist/RecurringSettings-kRqAViNn.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-BjnNCO5a.mjs +3121 -0
  144. package/dist/UserStore-BjnNCO5a.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/context/hooks.d.ts +7 -6
  158. package/dist/cashflow/index.es.js +944 -1076
  159. package/dist/cashflow/index.es.js.map +1 -0
  160. package/dist/categories/index.es.js +5 -4
  161. package/dist/categories/index.es.js.map +1 -0
  162. package/dist/common/components/DataRow.d.ts +1 -0
  163. package/dist/common/components/ListItemWrapper.d.ts +2 -1
  164. package/dist/common/constants/Analytics.d.ts +3 -0
  165. package/dist/common/index.es.js +310 -101
  166. package/dist/common/index.es.js.map +1 -0
  167. package/dist/core/index.es.js +105 -80
  168. package/dist/core/index.es.js.map +1 -0
  169. package/dist/core/stores/CashflowStore.d.ts +8 -7
  170. package/dist/core/stores/RecurringTransactionsStore.d.ts +53 -1
  171. package/dist/core/stores/TransactionStore.d.ts +1 -0
  172. package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
  173. package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
  174. package/dist/core/utils/AccountUtils.d.ts +8 -0
  175. package/dist/core/utils/DateUtil.d.ts +2 -0
  176. package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
  177. package/dist/dashboard/index.es.js +142 -185
  178. package/dist/dashboard/index.es.js.map +1 -0
  179. package/dist/debts/index.es.js +1273 -1384
  180. package/dist/debts/index.es.js.map +1 -0
  181. package/dist/finstrong/index.es.js +3473 -3367
  182. package/dist/finstrong/index.es.js.map +1 -0
  183. package/dist/goals/index.es.js +984 -1103
  184. package/dist/goals/index.es.js.map +1 -0
  185. package/dist/help/index.es.js +26 -3
  186. package/dist/help/index.es.js.map +1 -0
  187. package/dist/hooks-97sNJ_lf.mjs +78 -0
  188. package/dist/hooks-97sNJ_lf.mjs.map +1 -0
  189. package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
  190. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
  191. package/dist/insights/index.es.js +4871 -93
  192. package/dist/insights/index.es.js.map +1 -0
  193. package/dist/investments/index.es.js +1523 -1533
  194. package/dist/investments/index.es.js.map +1 -0
  195. package/dist/merchants/index.es.js +65 -75
  196. package/dist/merchants/index.es.js.map +1 -0
  197. package/dist/microinsights/index.es.js +826 -15
  198. package/dist/microinsights/index.es.js.map +1 -0
  199. package/dist/networth/index.es.js +504 -550
  200. package/dist/networth/index.es.js.map +1 -0
  201. package/dist/notifications/index.es.js +162 -169
  202. package/dist/notifications/index.es.js.map +1 -0
  203. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
  204. package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
  205. package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
  206. package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
  207. package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
  208. package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
  209. package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
  210. package/dist/recurringtransactions/index.es.js +1012 -10
  211. package/dist/recurringtransactions/index.es.js.map +1 -0
  212. package/dist/settings/index.es.js +892 -13
  213. package/dist/settings/index.es.js.map +1 -0
  214. package/dist/spending/index.es.js +457 -400
  215. package/dist/spending/index.es.js.map +1 -0
  216. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
  217. package/dist/transactions/index.es.js +604 -10
  218. package/dist/transactions/index.es.js.map +1 -0
  219. package/dist/trends/index.es.js +1408 -1268
  220. package/dist/trends/index.es.js.map +1 -0
  221. package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
  222. package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
  223. package/dist/useAriaLive-MkYebyUR.mjs +36 -0
  224. package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
  225. package/dist/useDimensions-CeDR9V8N.mjs +37 -0
  226. package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
  227. package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
  228. package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
  229. package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
  230. package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
  231. package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
  232. package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
  233. package/package.json +30 -30
  234. package/dist/Analytics-BKzTPees.mjs +0 -61
  235. package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
  236. package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
  237. package/dist/Loader-BlVzRtUd.mjs +0 -73
  238. package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
  239. package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
  240. package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
  241. package/dist/accounts-DkyAiLpg.mjs +0 -15632
  242. package/dist/core-BexP5oiV.mjs +0 -4047
  243. package/dist/help-CctDYrAH.mjs +0 -2308
  244. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
  245. package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
  246. package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
  247. package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
  248. package/dist/settings-ZMHe439l.mjs +0 -1526
@@ -1,175 +1,190 @@
1
- import { f as w } from "../GlobalCopyApi-BeXzaDH9.mjs";
2
- import { J as $, s as _e } from "../core-BexP5oiV.mjs";
3
- import { $t as ye, Gn as be, c as Ce, lr as Y, mr as Se, sr as q } from "../accounts-DkyAiLpg.mjs";
4
- import { n as oe } from "../Analytics-BKzTPees.mjs";
5
- import { E as ie, d as Te, h as P, i as H, n as re, p as I, s as W, t as se } from "../Loader-BlVzRtUd.mjs";
6
- import { t as ve } from "../MiniWidgetContainer-COwnjfy7.mjs";
7
- import { i as le, n as k, r as de, t as Q } from "../SpendingLegend-D15ixlQ1.mjs";
8
- import d from "react";
9
- import { observer as A } from "mobx-react-lite";
10
- import C from "@mui/material/Stack";
11
- import { Icon as Me, Text as T } from "@mxenabled/mxui";
12
- import { endOfMonth as ce } from "date-fns/endOfMonth";
13
- import { startOfMonth as ge } from "date-fns/startOfMonth";
14
- import { startOfToday as X } from "date-fns/startOfToday";
15
- import xe from "@mui/material/Button";
16
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
17
- import { useTheme as De } from "@mui/material/styles";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import { observer as I } from "mobx-react-lite";
4
+ import { startOfMonth as at } from "date-fns/startOfMonth";
5
+ import { endOfMonth as it } from "date-fns/endOfMonth";
18
6
  import L from "@mui/material/Box";
19
- import B from "@mui/material/Tab";
20
- import pe from "@mui/material/Tabs";
21
- import { parseISO as Z } from "date-fns/parseISO";
22
- import { useTheme as we } from "@mui/material";
23
- import Le from "@mui/material/Divider";
24
- import ee from "@mui/material/List";
25
- import te from "@mui/material/ListItem";
26
- import ae from "@mui/material/ListItemButton";
27
- import Ie from "@mui/material/Collapse";
28
- var G = ({ amount: a, label: g, variant: n = "full" }) => /* @__PURE__ */ u(C, {
29
- direction: "column",
30
- children: [/* @__PURE__ */ e(T, {
31
- bold: !0,
32
- sx: { textTransform: "none" },
33
- variant: "body1",
34
- children: g
35
- }), /* @__PURE__ */ e(T, {
36
- variant: "caption",
37
- children: $(a, n === "mini" ? "0,0" : "0,0.00")
38
- })]
39
- }), Ae = () => {
40
- const a = De(), { goals: g, spending: n } = I(), { categories: o, dateRangeCategoryTotals: i } = W(), p = d.useMemo(() => [
41
- a.palette.chartMono.chartMono5,
42
- a.palette.chartMono.chartMono4,
43
- a.palette.chartMono.chartMono3,
44
- a.palette.chartMono.chartMono2,
45
- a.palette.chartMono.chartMono1,
46
- a.palette.chartMono.chartMono6
47
- ], [a]), [t, r] = d.useState(""), [s, y] = d.useState(0), c = d.useMemo(() => le(o, g, a, i), [o, i]), b = d.useMemo(() => de(o, i, p), [
48
- o,
49
- i,
50
- p
51
- ]), v = (h, M) => {
52
- y(M), r("");
53
- }, m = (h) => {
54
- r(t === h ? "" : h);
7
+ import y from "@mui/material/Stack";
8
+ import $ from "@mui/material/Tab";
9
+ import rt from "@mui/material/Tabs";
10
+ import { useTheme as _t } from "@mui/material/styles";
11
+ import { g as st, a as lt, S as B, b as q } from "../SpendingLegend-CxvNOg3c.mjs";
12
+ import { Text as T, Icon as bt } from "@mxenabled/mxui";
13
+ import { f as k } from "../NumberFormatting--XMeeBfr.mjs";
14
+ import { u as A, l as R, c as ct, a as P, i as H, g as dt, f as yt } from "../hooks-97sNJ_lf.mjs";
15
+ import { u as gt } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
16
+ import { L as pt } from "../Loader-CxeBwuPG.mjs";
17
+ import { M as Ct } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
18
+ import { startOfToday as J } from "date-fns/startOfToday";
19
+ import St from "@mui/material/Button";
20
+ import { useTheme as Tt } from "@mui/material";
21
+ import { e as Mt } from "../TransactionUtils-BphBJBbU.mjs";
22
+ import { T as Dt } from "../EmbeddedCard-DH8vQ3qN.mjs";
23
+ import { T as xt } from "../TransactionDetails-roZ5xLq8.mjs";
24
+ import vt from "@mui/material/Collapse";
25
+ import wt from "@mui/material/Divider";
26
+ import Q from "@mui/material/List";
27
+ import X from "@mui/material/ListItem";
28
+ import Z from "@mui/material/ListItemButton";
29
+ import { u as Lt } from "../useScreenSize-mWpmnh5w.mjs";
30
+ import { D as tt } from "../Drawer-DsnW2o0v.mjs";
31
+ import { C as w } from "../Category-DEKZGLYe.mjs";
32
+ import { parseISO as et } from "date-fns/parseISO";
33
+ import { A as nt } from "../Analytics-WeZYytR0.mjs";
34
+ import { W as It } from "../WidgetContainer-DJnp6t6c.mjs";
35
+ const G = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
36
+ /* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
37
+ /* @__PURE__ */ t(T, { variant: "caption", children: k(n, o === "mini" ? "0,0" : "0,0.00") })
38
+ ] }), At = () => {
39
+ const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } = R(), g = c.useMemo(
40
+ () => [
41
+ n.palette.chartMono.chartMono5,
42
+ n.palette.chartMono.chartMono4,
43
+ n.palette.chartMono.chartMono3,
44
+ n.palette.chartMono.chartMono2,
45
+ n.palette.chartMono.chartMono1,
46
+ n.palette.chartMono.chartMono6
47
+ ],
48
+ [n]
49
+ ), [e, r] = c.useState(""), [s, b] = c.useState(0), u = c.useMemo(
50
+ () => st(a, d, n, i),
51
+ [a, i]
52
+ ), h = c.useMemo(
53
+ () => lt(a, i, g),
54
+ [a, i, g]
55
+ ), M = (_, D) => {
56
+ b(D), r("");
57
+ }, f = (_) => {
58
+ r(e === _ ? "" : _);
55
59
  };
56
- return /* @__PURE__ */ u(L, {
57
- width: "100%",
58
- children: [
59
- /* @__PURE__ */ u(pe, {
60
- "aria-label": n.mini_title,
61
- onChange: v,
60
+ return /* @__PURE__ */ p(L, { width: "100%", children: [
61
+ /* @__PURE__ */ p(
62
+ rt,
63
+ {
64
+ "aria-label": o.mini_title,
65
+ onChange: M,
62
66
  sx: { touchAction: "manipulation" },
63
67
  value: s,
64
68
  variant: "fullWidth",
65
- children: [/* @__PURE__ */ e(B, {
66
- "aria-controls": "spending-tabpanel",
67
- id: "spending-tab",
68
- label: /* @__PURE__ */ e(G, {
69
- amount: c.totalAmount,
70
- label: n.spend_tab_title,
71
- variant: "mini"
72
- }),
73
- tabIndex: s === 0 ? 0 : -1
74
- }), /* @__PURE__ */ e(B, {
75
- "aria-controls": "income-tabpanel",
76
- id: "income-tab",
77
- label: /* @__PURE__ */ e(G, {
78
- amount: b.totalAmount,
79
- label: n.income_tab_title,
80
- variant: "mini"
81
- }),
82
- tabIndex: s === 1 ? 0 : -1
83
- })]
84
- }),
85
- /* @__PURE__ */ e(L, {
69
+ children: [
70
+ /* @__PURE__ */ t(
71
+ $,
72
+ {
73
+ "aria-controls": "spending-tabpanel",
74
+ id: "spending-tab",
75
+ label: /* @__PURE__ */ t(
76
+ G,
77
+ {
78
+ amount: u.totalAmount,
79
+ label: o.spend_tab_title,
80
+ variant: "mini"
81
+ }
82
+ ),
83
+ tabIndex: s === 0 ? 0 : -1
84
+ }
85
+ ),
86
+ /* @__PURE__ */ t(
87
+ $,
88
+ {
89
+ "aria-controls": "income-tabpanel",
90
+ id: "income-tab",
91
+ label: /* @__PURE__ */ t(
92
+ G,
93
+ {
94
+ amount: h.totalAmount,
95
+ label: o.income_tab_title,
96
+ variant: "mini"
97
+ }
98
+ ),
99
+ tabIndex: s === 1 ? 0 : -1
100
+ }
101
+ )
102
+ ]
103
+ }
104
+ ),
105
+ /* @__PURE__ */ t(
106
+ L,
107
+ {
86
108
  "aria-labelledby": "spending-tab",
87
109
  hidden: s !== 0,
88
110
  id: "spending-tabpanel",
89
111
  role: "tabpanel",
90
- children: /* @__PURE__ */ u(C, {
91
- direction: "row",
92
- gap: 16,
93
- justifyContent: "center",
94
- p: 24,
95
- children: [/* @__PURE__ */ e(k, {
96
- data: c,
97
- onSelected: m,
98
- selectedId: t,
99
- totalLabel: n.total_spending
100
- }), /* @__PURE__ */ e(Q, {
101
- data: c,
102
- onSelected: m,
103
- selectedId: t
104
- })]
105
- })
106
- }),
107
- /* @__PURE__ */ e(L, {
112
+ children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
113
+ /* @__PURE__ */ t(
114
+ B,
115
+ {
116
+ data: u,
117
+ onSelected: f,
118
+ selectedId: e,
119
+ totalLabel: o.total_spending
120
+ }
121
+ ),
122
+ /* @__PURE__ */ t(q, { data: u, onSelected: f, selectedId: e })
123
+ ] })
124
+ }
125
+ ),
126
+ /* @__PURE__ */ t(
127
+ L,
128
+ {
108
129
  "aria-labelledby": "income-tab",
109
130
  hidden: s !== 1,
110
131
  id: "income-tabpanel",
111
132
  role: "tabpanel",
112
- children: /* @__PURE__ */ u(C, {
113
- direction: "row",
114
- gap: 16,
115
- justifyContent: "center",
116
- p: 24,
117
- children: [/* @__PURE__ */ e(k, {
118
- data: b,
119
- isIncome: !0,
120
- onSelected: m,
121
- selectedId: t,
122
- totalLabel: n.total_income
123
- }), /* @__PURE__ */ e(Q, {
124
- data: b,
125
- onSelected: m,
126
- selectedId: t
127
- })]
128
- })
129
- })
130
- ]
131
- });
132
- }, Ee = A(Ae), Re = ({ onPrimaryCtaClick: a, sx: g = {} }) => {
133
- const { isAccountDataLoaded: n, loadAccountData: o } = re(), { dateRangeTotalsLoaded: i, categoriesLoaded: p, loadCategories: t, loadDateRangeCategoryTotals: r } = W(), { spending: s } = I(), { isInitialized: y, selectedAccounts: c } = P();
134
- return oe({
133
+ children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
134
+ /* @__PURE__ */ t(
135
+ B,
136
+ {
137
+ data: h,
138
+ isIncome: !0,
139
+ onSelected: f,
140
+ selectedId: e,
141
+ totalLabel: o.total_income
142
+ }
143
+ ),
144
+ /* @__PURE__ */ t(q, { data: h, onSelected: f, selectedId: e })
145
+ ] })
146
+ }
147
+ )
148
+ ] });
149
+ }, Et = I(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
150
+ const { isAccountDataLoaded: o, loadAccountData: a } = ct(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = R(), { spending: s } = A(), { isInitialized: b, selectedAccounts: u } = P();
151
+ return gt({
135
152
  widgetName: "SpendingMiniWidget",
136
153
  isLoaded: i
137
- }), d.useEffect(() => {
138
- n || o().finally(), p || t().finally();
139
- }, []), d.useEffect(() => {
140
- r(c, ge(/* @__PURE__ */ new Date()), ce(/* @__PURE__ */ new Date())).finally();
141
- }, [c]), y ? /* @__PURE__ */ e(ve, {
142
- className: "mx-exp-spending-miniwidget",
143
- onPrimaryCtaClick: a,
144
- primaryCtaLabel: s.primary_cta,
145
- primaryCtaLabelAria: s.primary_cta_aria,
146
- sx: {
147
- height: "100%",
148
- ...g
149
- },
150
- title: s.mini_title,
151
- children: /* @__PURE__ */ e(Ee, {})
152
- }) : /* @__PURE__ */ e(se, {});
153
- }, ut = A(Re), We = ({ data: a, onSelected: g, selectedId: n = "", title: o }) => {
154
- const { spending: i } = I(), p = a.categoryData.find((t) => t.guid === n);
155
- return /* @__PURE__ */ u(C, {
156
- direction: "column",
157
- justifyContent: "center",
158
- maxWidth: 400,
159
- minWidth: 275,
160
- width: "100%",
161
- children: [
162
- /* @__PURE__ */ e(T, {
163
- bold: !0,
164
- id: "spending-list-title",
165
- sx: { py: 12 },
166
- variant: "h3",
167
- children: `${o} ${i.by_category}`
168
- }),
169
- /* @__PURE__ */ e(Le, { "aria-hidden": "true" }),
170
- /* @__PURE__ */ e(ee, {
171
- "aria-labelledby": "spending-list-title",
172
- children: a.categoryData.map((t) => /* @__PURE__ */ u(d.Fragment, { children: [/* @__PURE__ */ e(te, {
154
+ }), c.useEffect(() => {
155
+ o || a().finally(), g || e().finally();
156
+ }, []), c.useEffect(() => {
157
+ r(
158
+ u,
159
+ at(/* @__PURE__ */ new Date()),
160
+ it(/* @__PURE__ */ new Date())
161
+ ).finally();
162
+ }, [u]), b ? /* @__PURE__ */ t(
163
+ Ct,
164
+ {
165
+ className: "mx-exp-spending-miniwidget",
166
+ onPrimaryCtaClick: n,
167
+ primaryCtaLabel: s.primary_cta,
168
+ primaryCtaLabelAria: s.primary_cta_aria,
169
+ sx: { height: "100%", ...d },
170
+ title: s.mini_title,
171
+ children: /* @__PURE__ */ t(Et, {})
172
+ }
173
+ ) : /* @__PURE__ */ t(pt, {});
174
+ }, Ce = I(Wt), Rt = ({
175
+ data: n,
176
+ onSelected: d,
177
+ selectedId: o = "",
178
+ title: a
179
+ }) => {
180
+ const { spending: i } = A(), g = n.categoryData.find((e) => e.guid === o);
181
+ return /* @__PURE__ */ p(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
182
+ /* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${a} ${i.by_category}` }),
183
+ /* @__PURE__ */ t(wt, { "aria-hidden": "true" }),
184
+ /* @__PURE__ */ t(Q, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ p(c.Fragment, { children: [
185
+ /* @__PURE__ */ t(
186
+ X,
187
+ {
173
188
  disableGutters: !0,
174
189
  disablePadding: !0,
175
190
  sx: {
@@ -177,260 +192,302 @@ var G = ({ amount: a, label: g, variant: n = "full" }) => /* @__PURE__ */ u(C, {
177
192
  borderColor: "divider",
178
193
  minHeight: 44
179
194
  },
180
- children: /* @__PURE__ */ u(ae, {
181
- "aria-expanded": p?.guid === t.guid,
182
- id: `spending-list-category-${t.guid}`,
183
- onClick: () => g(t.guid),
184
- sx: {
185
- minHeight: 44,
186
- px: 8,
187
- py: 0
195
+ children: /* @__PURE__ */ p(
196
+ Z,
197
+ {
198
+ "aria-expanded": g?.guid === e.guid,
199
+ id: `spending-list-category-${e.guid}`,
200
+ onClick: () => d(e.guid),
201
+ sx: { minHeight: 44, px: 8, py: 0 },
202
+ children: [
203
+ /* @__PURE__ */ t(
204
+ L,
205
+ {
206
+ "aria-hidden": "true",
207
+ borderRadius: 4,
208
+ flexShrink: 0,
209
+ height: 8,
210
+ role: "presentation",
211
+ sx: { backgroundColor: e.color, mr: 8 },
212
+ width: 8
213
+ }
214
+ ),
215
+ /* @__PURE__ */ p(
216
+ y,
217
+ {
218
+ alignItems: "center",
219
+ direction: "row",
220
+ justifyContent: "space-between",
221
+ width: "100%",
222
+ children: [
223
+ /* @__PURE__ */ t(T, { bold: o === e.guid, children: e.name }),
224
+ /* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: k(e.amount, "0,0.00") })
225
+ ]
226
+ }
227
+ )
228
+ ]
229
+ }
230
+ )
231
+ }
232
+ ),
233
+ e.categoryTotals && e.categoryTotals.length > 0 && /* @__PURE__ */ t(vt, { in: g?.guid === e.guid, unmountOnExit: !0, children: /* @__PURE__ */ t(Q, { sx: { borderBottom: 1, borderColor: "divider" }, children: g?.categoryTotals?.map((r) => /* @__PURE__ */ t(
234
+ X,
235
+ {
236
+ sx: {
237
+ pl: 12,
238
+ py: 0
239
+ },
240
+ children: /* @__PURE__ */ t(
241
+ Z,
242
+ {
243
+ id: `spending-list-subcategory-${r.guid}`,
244
+ onClick: () => d(r.guid, !0),
245
+ sx: { minHeight: 44, px: 8, py: 0 },
246
+ children: /* @__PURE__ */ p(y, { direction: "row", justifyContent: "space-between", width: "100%", children: [
247
+ /* @__PURE__ */ p(T, { children: [
248
+ r.name,
249
+ " "
250
+ ] }),
251
+ /* @__PURE__ */ t(T, { children: k(r.amount, "0,0.00") })
252
+ ] })
253
+ }
254
+ )
255
+ },
256
+ r.guid
257
+ )) }) })
258
+ ] }, e.guid)) }),
259
+ /* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${k(n.totalAmount, "0,0.00")}` })
260
+ ] });
261
+ }, Nt = I(Rt), Ot = ({
262
+ data: n,
263
+ onSelected: d,
264
+ onViewTransactions: o,
265
+ selectedId: a,
266
+ title: i
267
+ }) => {
268
+ const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = R(), { spending: s } = A();
269
+ return /* @__PURE__ */ p(
270
+ y,
271
+ {
272
+ alignItems: e ? "center" : "flex-start",
273
+ direction: e ? "column" : "row",
274
+ gap: { xs: 16, md: 64, xl: 100 },
275
+ justifyContent: "center",
276
+ pt: 50,
277
+ px: 8,
278
+ children: [
279
+ r && /* @__PURE__ */ t(
280
+ B,
281
+ {
282
+ data: {
283
+ categoryData: [],
284
+ donutData: [],
285
+ totalAmount: 0
188
286
  },
189
- children: [/* @__PURE__ */ e(L, {
190
- "aria-hidden": "true",
191
- borderRadius: 4,
192
- flexShrink: 0,
193
- height: 8,
194
- role: "presentation",
195
- sx: {
196
- backgroundColor: t.color,
197
- mr: 8
198
- },
199
- width: 8
200
- }), /* @__PURE__ */ u(C, {
201
- alignItems: "center",
202
- direction: "row",
203
- justifyContent: "space-between",
204
- width: "100%",
205
- children: [/* @__PURE__ */ e(T, {
206
- bold: n === t.guid,
207
- children: t.name
208
- }), /* @__PURE__ */ e(T, {
209
- bold: n === t.guid,
210
- variant: "body1",
211
- children: $(t.amount, "0,0.00")
212
- })]
213
- })]
214
- })
215
- }), t.categoryTotals && t.categoryTotals.length > 0 && /* @__PURE__ */ e(Ie, {
216
- in: p?.guid === t.guid,
217
- unmountOnExit: !0,
218
- children: /* @__PURE__ */ e(ee, {
219
- sx: {
220
- borderBottom: 1,
221
- borderColor: "divider"
287
+ onSelected: () => {
222
288
  },
223
- children: p?.categoryTotals?.map((r) => /* @__PURE__ */ e(te, {
224
- sx: {
225
- pl: 12,
226
- py: 0
227
- },
228
- children: /* @__PURE__ */ e(ae, {
229
- id: `spending-list-subcategory-${r.guid}`,
230
- onClick: () => g(r.guid, !0),
231
- sx: {
232
- minHeight: 44,
233
- px: 8,
234
- py: 0
235
- },
236
- children: /* @__PURE__ */ u(C, {
237
- direction: "row",
238
- justifyContent: "space-between",
239
- width: "100%",
240
- children: [/* @__PURE__ */ u(T, { children: [r.name, " "] }), /* @__PURE__ */ e(T, { children: $(r.amount, "0,0.00") })]
241
- })
242
- })
243
- }, r.guid))
244
- })
245
- })] }, t.guid))
246
- }),
247
- /* @__PURE__ */ e(T, {
248
- bold: !0,
249
- sx: {
250
- mt: 12,
251
- pr: 8,
252
- textAlign: "right"
253
- },
254
- children: `${i.total}: ${$(a.totalAmount, "0,0.00")}`
255
- })
256
- ]
257
- });
258
- }, Ne = A(We), Oe = ({ data: a, onSelected: g, onViewTransactions: n, selectedId: o, title: i }) => {
259
- const { isDesktop: p, isMobile: t } = Se(), { dateRangeTotalsLoading: r } = W(), { spending: s } = I();
260
- return /* @__PURE__ */ u(C, {
261
- alignItems: t ? "center" : "flex-start",
262
- direction: t ? "column" : "row",
263
- gap: {
264
- xs: 16,
265
- md: 64,
266
- xl: 100
267
- },
268
- justifyContent: "center",
269
- pt: 50,
270
- px: 8,
271
- children: [
272
- r && /* @__PURE__ */ e(k, {
273
- data: {
274
- categoryData: [],
275
- donutData: [],
276
- totalAmount: 0
277
- },
278
- onSelected: () => {
279
- },
280
- selectedId: "",
281
- size: p ? 400 : 300,
282
- totalLabel: "Loading ...",
283
- variant: "full"
284
- }),
285
- !r && /* @__PURE__ */ e(k, {
286
- data: a,
287
- onSelected: (c) => {
288
- g(c), setTimeout(() => document.getElementById(`spending-list-category-${c}`)?.focus(), 0);
289
- },
290
- onViewTransactions: n,
291
- selectedId: o,
292
- size: p ? 400 : 300,
293
- totalLabel: s.total_amount,
294
- variant: "full"
295
- }),
296
- /* @__PURE__ */ e(Ne, {
297
- data: a,
298
- onSelected: g,
299
- selectedId: o,
300
- title: i
301
- })
302
- ]
303
- });
304
- }, ne = A(Oe), $e = (a) => [
305
- a.palette.chartMono.chartMono5,
306
- a.palette.chartMono.chartMono4,
307
- a.palette.chartMono.chartMono3,
308
- a.palette.chartMono.chartMono2,
309
- a.palette.chartMono.chartMono1,
310
- a.palette.chartMono.chartMono6
311
- ], ke = () => {
312
- const a = we(), { is_mobile_webview: g } = H(), { clientConfig: n } = H(), { categories: o, dateRangeCategoryTotals: i } = W(), { goals: p, spending: t, transactions: r } = I(), { displayedDateRange: s, selectedAccountGuids: y } = P(), { setFilter: c, sortedTransactions: b, sortedTransactionsWithSplits: v, tags: m } = ie(), h = n?.master?.deep_link_params?.account_guids, M = n?.master?.deep_link_params?.view, [x, N] = d.useState(""), [D, S] = d.useState(M === "income" ? 1 : 0), [E, R] = d.useState(""), [O, j] = d.useState(!1), V = d.useMemo(() => le(o, p, a, i), [o, i]), J = d.useMemo(() => de(o, i, $e(a)), [o, i]), z = d.useMemo(() => b.find((l) => l.guid === E), [E, b]), ue = (l, _) => {
313
- S(_), N("");
314
- }, K = (l, _ = !1) => {
315
- _ ? me(l) : N(x === l || l === "0" ? "" : l);
316
- }, me = (l) => {
317
- c({
318
- accounts: h || y,
319
- dateRange: s,
320
- custom: (_) => x === "other" ? _.top_level_category_guid === l : _.category_guid === l,
289
+ selectedId: "",
290
+ size: g ? 400 : 300,
291
+ totalLabel: "Loading ...",
292
+ variant: "full"
293
+ }
294
+ ),
295
+ !r && /* @__PURE__ */ t(
296
+ B,
297
+ {
298
+ data: n,
299
+ onSelected: (h) => {
300
+ d(h), setTimeout(() => document.getElementById(`spending-list-category-${h}`)?.focus(), 0);
301
+ },
302
+ onViewTransactions: o,
303
+ selectedId: a,
304
+ size: g ? 400 : 300,
305
+ totalLabel: s.total_amount,
306
+ variant: "full"
307
+ }
308
+ ),
309
+ /* @__PURE__ */ t(Nt, { data: n, onSelected: d, selectedId: a, title: i })
310
+ ]
311
+ }
312
+ );
313
+ }, ot = I(Ot), kt = (n) => [
314
+ n.palette.chartMono.chartMono5,
315
+ n.palette.chartMono.chartMono4,
316
+ n.palette.chartMono.chartMono3,
317
+ n.palette.chartMono.chartMono2,
318
+ n.palette.chartMono.chartMono1,
319
+ n.palette.chartMono.chartMono6
320
+ ], $t = () => {
321
+ const n = Tt(), { is_mobile_webview: d } = H(), { clientConfig: o } = H(), { categories: a, dateRangeCategoryTotals: i } = R(), {
322
+ goals: g,
323
+ spending: e,
324
+ transactions: r
325
+ } = A(), { displayedDateRange: s, selectedAccountGuids: b } = P(), {
326
+ setFilter: u,
327
+ sortedTransactions: h,
328
+ sortedTransactionsWithSplits: M,
329
+ tags: f
330
+ } = dt(), _ = o?.master?.deep_link_params?.account_guids, D = o?.master?.deep_link_params?.view, [x, N] = c.useState(""), [v, C] = c.useState(D === "income" ? 1 : 0), [E, W] = c.useState(""), [O, j] = c.useState(!1), F = c.useMemo(
331
+ () => st(a, g, n, i),
332
+ [a, i]
333
+ ), K = c.useMemo(
334
+ () => lt(a, i, kt(n)),
335
+ [a, i]
336
+ ), V = c.useMemo(
337
+ () => h.find((l) => l.guid === E),
338
+ [E, h]
339
+ ), ut = (l, S) => {
340
+ C(S), N("");
341
+ }, U = (l, S = !1) => {
342
+ S ? mt(l) : N(x === l || l === "0" ? "" : l);
343
+ }, mt = (l) => {
344
+ u({
345
+ ...{
346
+ accounts: _ || b,
347
+ dateRange: s
348
+ },
349
+ custom: (m) => x === "other" ? m.top_level_category_guid === l : m.category_guid === l,
321
350
  showSplits: !0
322
351
  }), j(!0);
323
- }, U = (l) => {
324
- const _ = {
325
- accounts: h || y,
352
+ }, Y = (l) => {
353
+ const S = {
354
+ accounts: _ || b,
326
355
  dateRange: s
327
356
  };
328
- if (D === 0) if (l === "other") {
329
- const f = V.categoryData.find((F) => F.guid === "other");
330
- c({
331
- ..._,
332
- custom: (F) => !!f?.categoryTotals?.find((fe) => fe.guid === F.top_level_category_guid)
357
+ if (v === 0)
358
+ if (l === "other") {
359
+ const m = F.categoryData.find((z) => z.guid === "other");
360
+ u({
361
+ ...S,
362
+ custom: (z) => !!m?.categoryTotals?.find((ft) => ft.guid === z.top_level_category_guid)
363
+ });
364
+ } else
365
+ u({
366
+ ...S,
367
+ custom: (m) => l ? m.top_level_category_guid === l : m.top_level_category_guid !== w.INCOME && m.category_guid !== w.INCOME && m.top_level_category_guid !== w.INVESTMENTS && m.top_level_category_guid !== w.TRANSFER,
368
+ showSplits: !!l
369
+ });
370
+ else
371
+ u({
372
+ ...S,
373
+ custom: (m) => l ? m.category_guid === l : m.category_guid === w.INCOME || m.top_level_category_guid === w.INCOME
333
374
  });
334
- } else c({
335
- ..._,
336
- custom: (f) => l ? f.top_level_category_guid === l : f.top_level_category_guid !== w.INCOME && f.category_guid !== w.INCOME && f.top_level_category_guid !== w.INVESTMENTS && f.top_level_category_guid !== w.TRANSFER,
337
- showSplits: !!l
338
- });
339
- else c({
340
- ..._,
341
- custom: (f) => l ? f.category_guid === l : f.category_guid === w.INCOME || f.top_level_category_guid === w.INCOME
342
- });
343
375
  j(!0);
344
- }, he = () => {
345
- _e(v, m);
376
+ }, ht = () => {
377
+ Mt(M, f);
346
378
  };
347
- return /* @__PURE__ */ u(L, { children: [
348
- /* @__PURE__ */ u(pe, {
349
- onChange: ue,
350
- value: D,
351
- variant: "fullWidth",
352
- children: [/* @__PURE__ */ e(B, { label: /* @__PURE__ */ e(G, {
353
- amount: V.totalAmount,
354
- label: t.spend_tab_title
355
- }) }), /* @__PURE__ */ e(B, { label: /* @__PURE__ */ e(G, {
356
- amount: J.totalAmount,
357
- label: t.income_tab_title
358
- }) })]
359
- }),
360
- D === 0 && /* @__PURE__ */ e(ne, {
361
- data: V,
362
- onSelected: K,
363
- onViewTransactions: U,
364
- selectedId: x,
365
- title: t.spend_tab_title
366
- }),
367
- D === 1 && /* @__PURE__ */ e(ne, {
368
- data: J,
369
- onSelected: K,
370
- onViewTransactions: U,
371
- selectedId: x,
372
- title: t.income_tab_title
373
- }),
374
- /* @__PURE__ */ e(Y, {
375
- ariaLabelClose: t.close_drawer_aria,
376
- isOpen: O,
377
- onClose: () => j(!1),
378
- title: t.transactions_drawer_title,
379
- children: /* @__PURE__ */ u(C, { children: [!g && b.length > 0 && /* @__PURE__ */ e(C, {
380
- direction: "row",
381
- justifyContent: "right",
382
- mb: -24,
383
- mr: 8,
384
- mt: 8,
385
- zIndex: 1,
386
- children: /* @__PURE__ */ e(xe, {
387
- onClick: he,
388
- startIcon: /* @__PURE__ */ e(Me, { name: "ios_share" }),
389
- variant: "text",
390
- children: r.export_csv_btn
391
- })
392
- }), /* @__PURE__ */ e(ye, { onClick: R })] })
393
- }),
394
- /* @__PURE__ */ e(Y, {
395
- ariaLabelClose: t.close_drawer_aria,
396
- isOpen: !!z,
397
- onClose: () => R(""),
398
- title: t.transaction_details_drawer_title,
399
- children: z && /* @__PURE__ */ e(Ce, { transaction: z })
400
- })
379
+ return /* @__PURE__ */ p(L, { children: [
380
+ /* @__PURE__ */ p(rt, { onChange: ut, value: v, variant: "fullWidth", children: [
381
+ /* @__PURE__ */ t(
382
+ $,
383
+ {
384
+ label: /* @__PURE__ */ t(
385
+ G,
386
+ {
387
+ amount: F.totalAmount,
388
+ label: e.spend_tab_title
389
+ }
390
+ )
391
+ }
392
+ ),
393
+ /* @__PURE__ */ t(
394
+ $,
395
+ {
396
+ label: /* @__PURE__ */ t(
397
+ G,
398
+ {
399
+ amount: K.totalAmount,
400
+ label: e.income_tab_title
401
+ }
402
+ )
403
+ }
404
+ )
405
+ ] }),
406
+ v === 0 && /* @__PURE__ */ t(
407
+ ot,
408
+ {
409
+ data: F,
410
+ onSelected: U,
411
+ onViewTransactions: Y,
412
+ selectedId: x,
413
+ title: e.spend_tab_title
414
+ }
415
+ ),
416
+ v === 1 && /* @__PURE__ */ t(
417
+ ot,
418
+ {
419
+ data: K,
420
+ onSelected: U,
421
+ onViewTransactions: Y,
422
+ selectedId: x,
423
+ title: e.income_tab_title
424
+ }
425
+ ),
426
+ /* @__PURE__ */ t(
427
+ tt,
428
+ {
429
+ ariaLabelClose: e.close_drawer_aria,
430
+ isOpen: O,
431
+ onClose: () => j(!1),
432
+ title: e.transactions_drawer_title,
433
+ children: /* @__PURE__ */ p(y, { children: [
434
+ !d && h.length > 0 && /* @__PURE__ */ t(y, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
435
+ St,
436
+ {
437
+ onClick: ht,
438
+ startIcon: /* @__PURE__ */ t(bt, { name: "ios_share" }),
439
+ variant: "text",
440
+ children: r.export_csv_btn
441
+ }
442
+ ) }),
443
+ /* @__PURE__ */ t(Dt, { onClick: W })
444
+ ] })
445
+ }
446
+ ),
447
+ /* @__PURE__ */ t(
448
+ tt,
449
+ {
450
+ ariaLabelClose: e.close_drawer_aria,
451
+ isOpen: !!V,
452
+ onClose: () => W(""),
453
+ title: e.transaction_details_drawer_title,
454
+ children: V && /* @__PURE__ */ t(xt, { transaction: V })
455
+ }
456
+ )
401
457
  ] });
402
- }, Be = A(ke), Ge = ({ onBackClick: a, onMenuClick: g, sx: n = {} }) => {
403
- const { isAccountDataLoaded: o, loadAccountData: i } = re(), { categoriesLoaded: p, dateRangeTotalsLoaded: t, loadCategories: r, loadDateRangeCategoryTotals: s } = W(), { isTransactionDataLoaded: y, loadTransactionData: c } = ie(), { spending: b } = I(), { displayedDateRange: v, isInitialized: m, setDisplayedDate: h, selectedAccounts: M } = P(), { onEvent: x } = Te(), { clientConfig: N } = H();
404
- oe({
458
+ }, Bt = I($t), Gt = ({ onBackClick: n, onMenuClick: d, sx: o = {} }) => {
459
+ const { isAccountDataLoaded: a, loadAccountData: i } = ct(), { categoriesLoaded: g, dateRangeTotalsLoaded: e, loadCategories: r, loadDateRangeCategoryTotals: s } = R(), { isTransactionDataLoaded: b, loadTransactionData: u } = dt(), { spending: h } = A(), { displayedDateRange: M, isInitialized: f, setDisplayedDate: _, selectedAccounts: D } = P(), { onEvent: x } = yt(), { clientConfig: N } = H();
460
+ gt({
405
461
  widgetName: "SpendingWidget",
406
- isLoaded: t
407
- }), d.useEffect(() => {
408
- const S = N?.master?.deep_link_params, E = S?.date_range ? [Z(S.date_range.from), Z(S.date_range.to)] : [ge(X()), ce(X())], R = E[0], O = E[1];
409
- h(R, O), o || i().finally(), p || r().finally(), y || c().finally(), m && s(M, R, O).finally(), x(q.SPENDING_VIEW);
410
- }, []), d.useEffect(() => {
411
- m && s(M, v.start, v.end).finally();
412
- }, [
413
- v,
414
- m,
415
- M
416
- ]);
417
- const D = (S) => {
418
- h(S[0], S[1]);
462
+ isLoaded: e
463
+ }), c.useEffect(() => {
464
+ const C = N?.master?.deep_link_params, E = C?.date_range ? [et(C.date_range.from), et(C.date_range.to)] : [at(J()), it(J())], W = E[0], O = E[1];
465
+ _(W, O), a || i().finally(), g || r().finally(), b || u().finally(), f && s(D, W, O).finally(), x(nt.SPENDING_VIEW);
466
+ }, []), c.useEffect(() => {
467
+ f && s(
468
+ D,
469
+ M.start,
470
+ M.end
471
+ ).finally();
472
+ }, [M, f, D]);
473
+ const v = (C) => {
474
+ _(C[0], C[1]);
419
475
  };
420
- return m ? /* @__PURE__ */ e(be, {
421
- calendarActions: { onRangeChanged: D },
422
- onAccountsFilterClick: () => x(q.SPENDING_CLICK_FILTER),
423
- onBackClick: a,
424
- onMenuClick: g,
425
- sx: n,
426
- title: b.title,
427
- children: /* @__PURE__ */ e(L, {
428
- width: "100%",
429
- children: /* @__PURE__ */ e(Be, {})
430
- })
431
- }) : /* @__PURE__ */ e(se, {});
432
- }, mt = A(Ge);
476
+ return f ? /* @__PURE__ */ t(
477
+ It,
478
+ {
479
+ calendarActions: { onRangeChanged: v },
480
+ onAccountsFilterClick: () => x(nt.SPENDING_CLICK_FILTER),
481
+ onBackClick: n,
482
+ onMenuClick: d,
483
+ sx: o,
484
+ title: h.title,
485
+ children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
486
+ }
487
+ ) : /* @__PURE__ */ t(pt, {});
488
+ }, Se = I(Gt);
433
489
  export {
434
- ut as SpendingMiniWidget,
435
- mt as SpendingWidget
490
+ Ce as SpendingMiniWidget,
491
+ Se as SpendingWidget
436
492
  };
493
+ //# sourceMappingURL=index.es.js.map