@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.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 (104) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-YwUMFz93.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-BgCST7mK.mjs} +8 -8
  4. package/dist/AccountDetailsHeader-jAFWoHj7.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-DPxMPBF0.mjs} +2 -2
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-D6rWAreC.mjs} +8 -8
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-B5E98oM1.mjs} +100 -74
  8. package/dist/Accounts-UIlYCmHb.mjs +9 -0
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-CXvenbdN.mjs} +1 -1
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Buy70Y3V.mjs} +21 -19
  13. package/dist/CategoryStore-BEdFs69_.mjs +183 -0
  14. package/dist/CategoryUtil-BR3H5i6n.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-CbxHKlRv.mjs} +10 -10
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-C6kanU7I.mjs} +4 -4
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-lSC7oPDg.mjs} +1 -1
  18. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-DgIcphe_.mjs} +1 -1
  19. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DZ10CbWd.mjs} +3 -3
  20. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  21. package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CL7t5lBL.mjs} +1 -1
  22. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-CAlmSu4U.mjs} +112 -152
  23. package/dist/{Help-B6dIcujh.mjs → Help-hi9I9EYP.mjs} +1 -1
  24. package/dist/{LineChart-D4GI7nVh.mjs → LineChart-eK4IQImU.mjs} +2 -2
  25. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BmL5buOf.mjs} +1 -1
  26. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-Cypo9qY4.mjs} +66 -65
  27. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  28. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-CFdMGJKg.mjs} +1 -1
  29. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-BdgBvpga.mjs} +1 -1
  30. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-CxqIxAgN.mjs} +2 -2
  31. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-DxytNHlN.mjs} +240 -237
  32. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  33. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-V6FEoIDe.mjs} +3 -3
  34. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-iIupYxJW.mjs} +4 -4
  35. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-ej39mgA6.mjs} +3 -3
  36. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BiwCzScZ.mjs} +26 -29
  37. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  38. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  39. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  40. package/dist/{TransactionDetails-oP1eSuiS.mjs → TransactionDetails-BUoNbsu-.mjs} +402 -367
  41. package/dist/TransactionStore-C1oyQCZK.mjs +677 -0
  42. package/dist/TrendsStore-5PvDT_o6.mjs +182 -0
  43. package/dist/{User-BQUxBeZV.mjs → User-Bj34_i8g.mjs} +1 -1
  44. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-lihSDk2J.mjs} +517 -493
  45. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BnTgAfQn.mjs} +2 -2
  46. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  48. package/dist/accounts/index.es.js +241 -203
  49. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  50. package/dist/accounts/utils/Accounts.d.ts +1 -2
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/index.es.js +500 -507
  53. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  54. package/dist/cashflow/index.es.js +384 -382
  55. package/dist/categories/index.es.js +2 -2
  56. package/dist/categories/stores/CategoryStore.d.ts +1 -5
  57. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  58. package/dist/common/components/charts/index.d.ts +0 -2
  59. package/dist/common/index.es.js +391 -376
  60. package/dist/common/stores/AppDataStore.d.ts +1 -3
  61. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  62. package/dist/common/stores/GlobalStore.d.ts +10 -4
  63. package/dist/common/stores/UserStore.d.ts +2 -3
  64. package/dist/common/types/Account.d.ts +6 -9
  65. package/dist/common/types/Global.d.ts +1 -0
  66. package/dist/dashboard/index.es.js +2 -2
  67. package/dist/debts/index.es.js +506 -498
  68. package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-B8qpk5MU.mjs} +14 -13
  69. package/dist/finstrong/index.es.js +417 -415
  70. package/dist/goals/index.es.js +559 -557
  71. package/dist/goals/stores/GoalStore.d.ts +4 -17
  72. package/dist/help/index.es.js +3 -3
  73. package/dist/{hooks-D6XlXHf4.mjs → hooks-Cy8JnjCg.mjs} +2 -2
  74. package/dist/insights/index.es.js +1 -1
  75. package/dist/investments/index.es.js +437 -435
  76. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  77. package/dist/merchants/index.es.js +2 -2
  78. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  79. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -1
  80. package/dist/microinsights/index.es.js +1 -1
  81. package/dist/microinsights/interfaces.d.ts +0 -1
  82. package/dist/networth/index.es.js +176 -174
  83. package/dist/notifications/index.es.js +23 -23
  84. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  85. package/dist/recurringtransactions/index.es.js +175 -173
  86. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  87. package/dist/settings/index.es.js +285 -279
  88. package/dist/spending/index.es.js +282 -281
  89. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  90. package/dist/transactions/index.es.js +63 -64
  91. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  92. package/dist/trends/index.es.js +948 -583
  93. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-D6sQsNNQ.mjs} +2 -2
  94. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  95. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-BxytCjq5.mjs} +1 -1
  96. package/package.json +4 -4
  97. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  98. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  99. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  100. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  101. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  102. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  103. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  104. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,142 +1,141 @@
1
- import { jsxs as h, jsx as t, Fragment as mt } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as t, Fragment as ht } from "react/jsx-runtime";
2
2
  import p from "react";
3
- import { observer as v } from "mobx-react-lite";
4
- import { startOfMonth as nt } from "date-fns/startOfMonth";
5
- import { endOfMonth as ot } from "date-fns/endOfMonth";
6
- import x from "@mui/material/Box";
3
+ import { observer as I } from "mobx-react-lite";
4
+ import { startOfMonth as ot } from "date-fns/startOfMonth";
5
+ import { endOfMonth as at } from "date-fns/endOfMonth";
6
+ import w from "@mui/material/Box";
7
7
  import C from "@mui/material/Stack";
8
- import N from "@mui/material/Tab";
9
- import at from "@mui/material/Tabs";
10
- import ht from "@mui/material/styles/useTheme";
11
- import { b as V } from "../CategoryUtil-pZRIYOgN.mjs";
12
- import { b as S } from "../Category-CevNQ03n.mjs";
13
- import { Text as y, CategoryIcon as ft, CategoryIconVariants as yt } from "@mxenabled/mxui";
14
- import { f as w } from "../NumberFormatting-Buh7u8Oi.mjs";
15
- import { u as bt } from "../useAriaLive-B3_pRUio.mjs";
16
- import Ct from "@mui/material/Button";
17
- import { useTheme as it } from "@mui/material";
18
- import { u as I, b as R, m as z, d as rt, a as st, h as _t, g as St } from "../hooks-D6XlXHf4.mjs";
19
- import { u as lt } from "../useScreenSize-B6JyS_Lj.mjs";
20
- import { D as Tt } from "../Donut-oaQFlbit.mjs";
8
+ import L from "@mui/material/Tab";
9
+ import it from "@mui/material/Tabs";
10
+ import ft from "@mui/material/styles/useTheme";
11
+ import { b as V } from "../CategoryUtil-BR3H5i6n.mjs";
12
+ import { b as _ } from "../Category-CevNQ03n.mjs";
13
+ import { Text as y, CategoryIcon as yt, CategoryIconVariants as bt } from "@mxenabled/mxui";
14
+ import { f as v } from "../NumberFormatting-Buh7u8Oi.mjs";
15
+ import { c as Ct, T as _t, a as St } from "../TransactionDetails-BUoNbsu-.mjs";
16
+ import Tt from "@mui/material/Button";
17
+ import { useTheme as rt } from "@mui/material";
18
+ import { u as E, b as O, m as z, d as st, n as Mt, a as lt, h as Dt, g as xt } from "../hooks-Cy8JnjCg.mjs";
19
+ import { u as ct } from "../useScreenSize-B6JyS_Lj.mjs";
20
+ import { D as wt } from "../Donut-oaQFlbit.mjs";
21
21
  import { L as F } from "../Loader-DUaFpDGv.mjs";
22
- import { M as Mt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
23
- import { startOfToday as U } from "date-fns/startOfToday";
24
- import { T as Dt, a as xt } from "../TransactionDetails-oP1eSuiS.mjs";
25
- import wt from "@mui/material/Collapse";
22
+ import { M as vt } from "../MiniWidgetContainer-BdgBvpga.mjs";
23
+ import { startOfToday as q } from "date-fns/startOfToday";
24
+ import It from "@mui/material/Collapse";
26
25
  import B from "@mui/material/Divider";
27
- import q from "@mui/material/List";
28
- import J from "@mui/material/ListItem";
29
- import vt from "@mui/material/ListItemButton";
30
- import { D as Q } from "../Drawer-kEE73B87.mjs";
31
- import { A as Z, W as It } from "../WidgetContainer-BHWANqT4.mjs";
32
- const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
33
- if (a.total > 0) {
34
- const i = n.find((s) => s.guid === a.category_guid);
35
- if (!i) return l;
36
- const o = i.parent_guid ?? i.guid, e = n.find((s) => s.guid === o);
26
+ import J from "@mui/material/List";
27
+ import Q from "@mui/material/ListItem";
28
+ import Et from "@mui/material/ListItemButton";
29
+ import { D as Z } from "../Drawer-kEE73B87.mjs";
30
+ import { A as tt, W as At } from "../WidgetContainer-BnTgAfQn.mjs";
31
+ const j = 5, Lt = (o, d, r) => r.reduce((l, n) => {
32
+ if (n.total > 0) {
33
+ const a = o.find((s) => s.guid === n.category_guid);
34
+ if (!a) return l;
35
+ const i = a.parent_guid ?? a.guid, e = o.find((s) => s.guid === i);
37
36
  if (!e) return l;
38
- const d = {
39
- guid: i.guid,
40
- name: i.guid === o ? `General ${i.name}` : i.name,
41
- color: V(e.guid, c),
42
- amount: a.total
43
- }, u = l.find((s) => s.guid === o);
44
- u ? (u.amount += a.total, u.categoryTotals?.push(d)) : l.push({
45
- guid: o,
37
+ const c = {
38
+ guid: a.guid,
39
+ name: a.guid === i ? `General ${a.name}` : a.name,
40
+ color: V(e.guid, d),
41
+ amount: n.total
42
+ }, u = l.find((s) => s.guid === i);
43
+ u ? (u.amount += n.total, u.categoryTotals?.push(c)) : l.push({
44
+ guid: i,
46
45
  name: e.name,
47
- color: V(e.guid, c),
48
- categoryTotals: [d],
49
- amount: a.total
46
+ color: V(e.guid, d),
47
+ categoryTotals: [c],
48
+ amount: n.total
50
49
  });
51
50
  }
52
51
  return l;
53
- }, []), ct = (n, c, r, l) => {
54
- const a = Et(n, r, l), i = a.filter(
55
- (s) => s.guid !== S.INCOME && s.guid !== S.INVESTMENTS && s.guid !== S.TRANSFER
56
- ).sort((s, m) => m.amount - s.amount), o = i.reduce(
52
+ }, []), dt = (o, d, r, l) => {
53
+ const n = Lt(o, r, l), a = n.filter(
54
+ (s) => s.guid !== _.INCOME && s.guid !== _.INVESTMENTS && s.guid !== _.TRANSFER
55
+ ).sort((s, m) => m.amount - s.amount), i = a.reduce(
57
56
  (s, m) => s + m.amount,
58
57
  0
59
- ), e = i.length > j ? j : i.length, d = i.slice(0, e), u = d.map((s) => ({
58
+ ), e = a.length > j ? j : a.length, c = a.slice(0, e), u = c.map((s) => ({
60
59
  id: s.guid,
61
60
  color: V(s.guid, r),
62
61
  label: s.name,
63
- value: s.amount / o * 100
62
+ value: s.amount / i * 100
64
63
  }));
65
- if (i.length > 5) {
66
- const s = i.slice(j, a.length), m = s.reduce(
67
- (T, g) => T + g.amount,
64
+ if (a.length > 5) {
65
+ const s = a.slice(j, n.length), m = s.reduce(
66
+ (S, g) => S + g.amount,
68
67
  0
69
68
  );
70
- d.push({
69
+ c.push({
71
70
  guid: "other",
72
71
  color: r.palette.categories.others || "",
73
- name: c.saving_goal_other,
72
+ name: d.saving_goal_other,
74
73
  categoryTotals: s,
75
74
  amount: m
76
75
  }), u.push({
77
76
  id: "other",
78
77
  color: r.palette.categories.others || "",
79
- label: c.saving_goal_other,
80
- value: m / o * 100
78
+ label: d.saving_goal_other,
79
+ value: m / i * 100
81
80
  });
82
81
  }
83
82
  return {
84
- categoryData: d,
83
+ categoryData: c,
85
84
  donutData: u,
86
- totalAmount: o
85
+ totalAmount: i
87
86
  };
88
- }, dt = (n, c, r) => {
89
- const l = n.filter(
90
- (e) => e.guid === S.INCOME || e.parent_guid === S.INCOME
91
- ), a = c.filter((e) => l.some((d) => d.guid === e.category_guid)).sort((e, d) => e.total - d.total).map((e, d) => ({
87
+ }, gt = (o, d, r) => {
88
+ const l = o.filter(
89
+ (e) => e.guid === _.INCOME || e.parent_guid === _.INCOME
90
+ ), n = d.filter((e) => l.some((c) => c.guid === e.category_guid)).sort((e, c) => e.total - c.total).map((e, c) => ({
92
91
  guid: e.category_guid,
93
- name: n.find((u) => u.guid === e.category_guid)?.name,
94
- color: r[d],
92
+ name: o.find((u) => u.guid === e.category_guid)?.name,
93
+ color: r[c],
95
94
  categoryTotals: [],
96
95
  amount: Math.abs(e.total)
97
- })), i = a.reduce(
98
- (e, d) => e + d.amount,
96
+ })), a = n.reduce(
97
+ (e, c) => e + c.amount,
99
98
  0
100
- ), o = a.map((e) => ({
99
+ ), i = n.map((e) => ({
101
100
  id: e.guid,
102
101
  color: e.color,
103
102
  label: e.name,
104
- value: e.amount / i * 100
103
+ value: e.amount / a * 100
105
104
  }));
106
105
  return {
107
- categoryData: a,
108
- donutData: o,
109
- totalAmount: i
106
+ categoryData: n,
107
+ donutData: i,
108
+ totalAmount: a
110
109
  };
111
- }, W = ({ amount: n, label: c }) => /* @__PURE__ */ h(C, { direction: "column", children: [
112
- /* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: c }),
113
- /* @__PURE__ */ t(y, { variant: "XSmall", children: w(n, "0,0") })
114
- ] }), At = ({
115
- data: n,
116
- isIncome: c = !1,
110
+ }, N = ({ amount: o, label: d }) => /* @__PURE__ */ h(C, { direction: "column", children: [
111
+ /* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
112
+ /* @__PURE__ */ t(y, { variant: "XSmall", children: v(o, "0,0") })
113
+ ] }), Nt = ({
114
+ data: o,
115
+ isIncome: d = !1,
117
116
  onSelected: r,
118
117
  onViewTransactions: l,
119
- selectedId: a,
120
- size: i = 150,
121
- totalLabel: o,
118
+ selectedId: n,
119
+ size: a = 150,
120
+ totalLabel: i,
122
121
  variant: e = "mini"
123
122
  }) => {
124
- const { spending: d } = I(), u = it(), { isTablet: s } = lt(), { announce: m, ariaLive: T } = bt(), g = p.useMemo(
125
- () => a ? n.categoryData.find((D) => D.guid === a) : void 0,
126
- [a]
123
+ const { spending: c } = E(), u = rt(), { isTablet: s } = ct(), { announce: m, ariaLive: S } = Ct(), g = p.useMemo(
124
+ () => n ? o.categoryData.find((b) => b.guid === n) : void 0,
125
+ [n]
127
126
  );
128
127
  p.useEffect(() => {
129
128
  if (g) {
130
- const D = w(g.amount, "0,0");
131
- m(`${g.name}: ${D}`);
129
+ const b = v(g.amount, "0,0");
130
+ m(`${g.name}: ${b}`);
132
131
  }
133
132
  }, [g, m]);
134
- const b = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), E = () => {
135
- l?.(a);
136
- }, _ = s ? 32 : 48;
137
- return /* @__PURE__ */ h(mt, { children: [
138
- T,
139
- /* @__PURE__ */ t(Tt, { data: b, onClick: r, selectedId: a, size: i, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(C, { alignItems: "center", justifyContent: "center", minHeight: i, minWidth: i, children: [
133
+ const T = p.useMemo(() => o.donutData.length > 0 ? o.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [o, u]), x = () => {
134
+ l?.(n);
135
+ }, D = s ? 32 : 48;
136
+ return /* @__PURE__ */ h(ht, { children: [
137
+ S,
138
+ /* @__PURE__ */ t(wt, { data: T, onClick: r, selectedId: n, size: a, children: /* @__PURE__ */ t(C, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(C, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: [
140
139
  g && /* @__PURE__ */ h(
141
140
  C,
142
141
  {
@@ -147,11 +146,11 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
147
146
  sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
148
147
  children: [
149
148
  /* @__PURE__ */ t(
150
- ft,
149
+ yt,
151
150
  {
152
- categoryGuid: c ? S.INCOME : g.guid,
153
- size: e === "mini" ? 24 : _,
154
- variant: yt.Transparent
151
+ categoryGuid: d ? _.INCOME : g.guid,
152
+ size: e === "mini" ? 24 : D,
153
+ variant: bt.Transparent
155
154
  }
156
155
  ),
157
156
  /* @__PURE__ */ t(
@@ -160,103 +159,103 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
160
159
  color: "secondary",
161
160
  noWrap: !0,
162
161
  variant: e === "mini" ? "Tiny" : "Body",
163
- children: g ? g.name : o
162
+ children: g ? g.name : i
164
163
  }
165
164
  )
166
165
  ]
167
166
  }
168
167
  ),
169
- !g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: o }),
170
- /* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ? w(g.amount, "0,0") : w(n.totalAmount, "0,0") }),
171
- !g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children: o }),
168
+ !g && e === "full" && /* @__PURE__ */ t(y, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: i }),
169
+ /* @__PURE__ */ t(y, { variant: e === "mini" ? "H2" : "H1", children: g ? v(g.amount, "0,0") : v(o.totalAmount, "0,0") }),
170
+ !g && e === "mini" && /* @__PURE__ */ t(y, { color: "secondary", noWrap: !0, variant: "Tiny", children: i }),
172
171
  e === "full" && /* @__PURE__ */ t(
173
- Ct,
172
+ Tt,
174
173
  {
175
174
  "aria-label": `View ${g?.name || ""} Transactions`,
176
- disabled: n.categoryData.length === 0,
177
- onClick: E,
175
+ disabled: o.categoryData.length === 0,
176
+ onClick: x,
178
177
  sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
179
178
  variant: "text",
180
- children: d.view_transactions
179
+ children: c.view_transactions
181
180
  }
182
181
  )
183
182
  ] }) }) })
184
183
  ] });
185
- }, O = v(At), tt = ({ data: n, onSelected: c, selectedId: r }) => {
186
- const l = (a, i) => {
187
- (a.key === "Enter" || a.key === " ") && (a.preventDefault(), c(i));
184
+ }, W = I(Nt), et = ({ data: o, onSelected: d, selectedId: r }) => {
185
+ const l = (n, a) => {
186
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), d(a));
188
187
  };
189
- return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((a) => /* @__PURE__ */ h(
188
+ return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: o.categoryData.map((n) => /* @__PURE__ */ h(
190
189
  C,
191
190
  {
192
191
  alignItems: "center",
193
- "aria-label": a.name,
194
- "aria-pressed": a.guid === r,
192
+ "aria-label": n.name,
193
+ "aria-pressed": n.guid === r,
195
194
  direction: "row",
196
195
  gap: 8,
197
- onClick: () => c(a.guid),
198
- onKeyDown: (i) => l(i, a.guid),
196
+ onClick: () => d(n.guid),
197
+ onKeyDown: (a) => l(a, n.guid),
199
198
  role: "button",
200
199
  sx: { cursor: "pointer" },
201
200
  tabIndex: 0,
202
201
  children: [
203
- /* @__PURE__ */ t(x, { borderRadius: 4, height: 8, sx: { backgroundColor: a.color }, width: 8 }),
204
- /* @__PURE__ */ t(y, { bold: a.guid === r, variant: "XSmall", children: a.name })
202
+ /* @__PURE__ */ t(w, { borderRadius: 4, height: 8, sx: { backgroundColor: n.color }, width: 8 }),
203
+ /* @__PURE__ */ t(y, { bold: n.guid === r, variant: "XSmall", children: n.name })
205
204
  ]
206
205
  },
207
- a.guid
206
+ n.guid
208
207
  )) });
209
- }, Lt = () => {
210
- const n = ht(), { goals: c, spending: r } = I(), { selectedAccounts: l } = R(), {
211
- categories: a,
212
- dateRangeCategoryTotals: i,
213
- dataRangeTotalsLoaded: o,
208
+ }, Wt = () => {
209
+ const o = ft(), { goals: d, spending: r } = E(), { selectedAccounts: l } = O(), {
210
+ categories: n,
211
+ dateRangeCategoryTotals: a,
212
+ dataRangeTotalsLoaded: i,
214
213
  loadDateRangeCategoryTotals: e
215
- } = z(), d = p.useMemo(
214
+ } = z(), c = p.useMemo(
216
215
  () => [
217
- n.palette.chartMono.chartMono5,
218
- n.palette.chartMono.chartMono4,
219
- n.palette.chartMono.chartMono3,
220
- n.palette.chartMono.chartMono2,
221
- n.palette.chartMono.chartMono1,
222
- n.palette.chartMono.chartMono6
216
+ o.palette.chartMono.chartMono5,
217
+ o.palette.chartMono.chartMono4,
218
+ o.palette.chartMono.chartMono3,
219
+ o.palette.chartMono.chartMono2,
220
+ o.palette.chartMono.chartMono1,
221
+ o.palette.chartMono.chartMono6
223
222
  ],
224
- [n]
223
+ [o]
225
224
  );
226
225
  p.useEffect(() => {
227
226
  e(
228
227
  l,
229
- nt(/* @__PURE__ */ new Date()),
230
- ot(/* @__PURE__ */ new Date())
228
+ ot(/* @__PURE__ */ new Date()),
229
+ at(/* @__PURE__ */ new Date())
231
230
  ).finally();
232
231
  }, [l]);
233
- const [u, s] = p.useState(""), [m, T] = p.useState(0), g = p.useMemo(
234
- () => ct(a, c, n, i),
235
- [a, i]
236
- ), b = p.useMemo(
237
- () => dt(a, i, d),
238
- [a, i, d]
239
- ), E = (D, L) => {
240
- T(L), s("");
241
- }, _ = (D) => {
242
- s(u === D ? "" : D);
232
+ const [u, s] = p.useState(""), [m, S] = p.useState(0), g = p.useMemo(
233
+ () => dt(n, d, o, a),
234
+ [n, a]
235
+ ), T = p.useMemo(
236
+ () => gt(n, a, c),
237
+ [n, a, c]
238
+ ), x = (b, R) => {
239
+ S(R), s("");
240
+ }, D = (b) => {
241
+ s(u === b ? "" : b);
243
242
  };
244
- return o ? /* @__PURE__ */ h(x, { width: "100%", children: [
243
+ return i ? /* @__PURE__ */ h(w, { width: "100%", children: [
245
244
  /* @__PURE__ */ h(
246
- at,
245
+ it,
247
246
  {
248
247
  "aria-label": r.mini_title,
249
- onChange: E,
248
+ onChange: x,
250
249
  value: m,
251
250
  variant: "fullWidth",
252
251
  children: [
253
252
  /* @__PURE__ */ t(
254
- N,
253
+ L,
255
254
  {
256
255
  "aria-controls": "spending-tabpanel",
257
256
  id: "spending-tab",
258
257
  label: /* @__PURE__ */ t(
259
- W,
258
+ N,
260
259
  {
261
260
  amount: g.totalAmount,
262
261
  label: r.spend_tab_title
@@ -266,14 +265,14 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
266
265
  }
267
266
  ),
268
267
  /* @__PURE__ */ t(
269
- N,
268
+ L,
270
269
  {
271
270
  "aria-controls": "income-tabpanel",
272
271
  id: "income-tab",
273
272
  label: /* @__PURE__ */ t(
274
- W,
273
+ N,
275
274
  {
276
- amount: b.totalAmount,
275
+ amount: T.totalAmount,
277
276
  label: r.income_tab_title
278
277
  }
279
278
  ),
@@ -284,7 +283,7 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
284
283
  }
285
284
  ),
286
285
  /* @__PURE__ */ t(
287
- x,
286
+ w,
288
287
  {
289
288
  "aria-labelledby": "spending-tab",
290
289
  hidden: m !== 0,
@@ -292,20 +291,20 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
292
291
  role: "tabpanel",
293
292
  children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
294
293
  /* @__PURE__ */ t(
295
- O,
294
+ W,
296
295
  {
297
296
  data: g,
298
- onSelected: _,
297
+ onSelected: D,
299
298
  selectedId: u,
300
299
  totalLabel: r.total_spending
301
300
  }
302
301
  ),
303
- /* @__PURE__ */ t(tt, { data: g, onSelected: _, selectedId: u })
302
+ /* @__PURE__ */ t(et, { data: g, onSelected: D, selectedId: u })
304
303
  ] })
305
304
  }
306
305
  ),
307
306
  /* @__PURE__ */ t(
308
- x,
307
+ w,
309
308
  {
310
309
  "aria-labelledby": "income-tab",
311
310
  hidden: m !== 1,
@@ -313,48 +312,48 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
313
312
  role: "tabpanel",
314
313
  children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
315
314
  /* @__PURE__ */ t(
316
- O,
315
+ W,
317
316
  {
318
- data: b,
317
+ data: T,
319
318
  isIncome: !0,
320
- onSelected: _,
319
+ onSelected: D,
321
320
  selectedId: u,
322
321
  totalLabel: r.total_income
323
322
  }
324
323
  ),
325
- /* @__PURE__ */ t(tt, { data: b, onSelected: _, selectedId: u })
324
+ /* @__PURE__ */ t(et, { data: T, onSelected: D, selectedId: u })
326
325
  ] })
327
326
  }
328
327
  )
329
328
  ] }) : /* @__PURE__ */ t(F, { height: 250 });
330
- }, Nt = v(Lt), Wt = ({ onPrimaryCtaClick: n, sx: c = {} }) => {
331
- const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setSelectedAccounts: o } = R();
329
+ }, Ot = I(Wt), Rt = ({ onPrimaryCtaClick: o, sx: d = {} }) => {
330
+ const { visibleAccounts: r } = st(), { spending: l } = E(), { isCopyLoaded: n, isInitialized: a, setSelectedAccounts: i } = O();
332
331
  return p.useEffect(() => {
333
- o(r);
334
- }, [r]), !a || !i ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
335
- Mt,
332
+ i(r);
333
+ }, [r]), !n || !a ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
334
+ vt,
336
335
  {
337
336
  className: "mx-exp-spending-miniwidget",
338
- onPrimaryCtaClick: n,
337
+ onPrimaryCtaClick: o,
339
338
  primaryCtaLabel: l.primary_cta,
340
- sx: c,
339
+ sx: d,
341
340
  title: l.mini_title,
342
- children: /* @__PURE__ */ t(Nt, {})
341
+ children: /* @__PURE__ */ t(Ot, {})
343
342
  }
344
343
  );
345
- }, be = v(Wt), Ot = ({
346
- data: n,
347
- onSelected: c,
344
+ }, Ce = I(Rt), kt = ({
345
+ data: o,
346
+ onSelected: d,
348
347
  selectedId: r = "",
349
348
  title: l
350
349
  }) => {
351
- const { spending: a } = I(), i = n.categoryData.find((o) => o.guid === r);
350
+ const { spending: n } = E(), a = o.categoryData.find((i) => i.guid === r);
352
351
  return /* @__PURE__ */ h(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
353
- /* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${a.by_category}` }),
352
+ /* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${n.by_category}` }),
354
353
  /* @__PURE__ */ t(B, { "aria-hidden": "true" }),
355
- /* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ h(p.Fragment, { children: [
354
+ /* @__PURE__ */ t(J, { children: o.categoryData.map((i) => /* @__PURE__ */ h(p.Fragment, { children: [
356
355
  /* @__PURE__ */ t(
357
- J,
356
+ Q,
358
357
  {
359
358
  disableGutters: !0,
360
359
  disablePadding: !0,
@@ -362,19 +361,19 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
362
361
  minHeight: 44
363
362
  },
364
363
  children: /* @__PURE__ */ h(
365
- vt,
364
+ Et,
366
365
  {
367
- "aria-expanded": i?.guid === o.guid,
368
- onClick: () => c(o.guid),
366
+ "aria-expanded": a?.guid === i.guid,
367
+ onClick: () => d(i.guid),
369
368
  sx: { minHeight: 44, px: 8, py: 0 },
370
369
  children: [
371
370
  /* @__PURE__ */ t(
372
- x,
371
+ w,
373
372
  {
374
373
  borderRadius: 4,
375
374
  flexShrink: 0,
376
375
  height: 8,
377
- sx: { backgroundColor: o.color, mr: 8 },
376
+ sx: { backgroundColor: i.color, mr: 8 },
378
377
  width: 8
379
378
  }
380
379
  ),
@@ -386,8 +385,8 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
386
385
  justifyContent: "space-between",
387
386
  width: "100%",
388
387
  children: [
389
- /* @__PURE__ */ t(y, { bold: r === o.guid, children: o.name }),
390
- /* @__PURE__ */ t(y, { bold: r === o.guid, variant: "Body", children: w(o.amount, "0,0") })
388
+ /* @__PURE__ */ t(y, { bold: r === i.guid, children: i.name }),
389
+ /* @__PURE__ */ t(y, { bold: r === i.guid, variant: "Body", children: v(i.amount, "0,0") })
391
390
  ]
392
391
  }
393
392
  )
@@ -397,9 +396,9 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
397
396
  }
398
397
  ),
399
398
  /* @__PURE__ */ t(B, {}),
400
- o.categoryTotals && o.categoryTotals.length > 0 && /* @__PURE__ */ t(wt, { in: i?.guid === o.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(q, { children: [
401
- i?.categoryTotals?.map((e) => /* @__PURE__ */ t(
402
- J,
399
+ i.categoryTotals && i.categoryTotals.length > 0 && /* @__PURE__ */ t(It, { in: a?.guid === i.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(J, { children: [
400
+ a?.categoryTotals?.map((e) => /* @__PURE__ */ t(
401
+ Q,
403
402
  {
404
403
  sx: {
405
404
  pl: 24,
@@ -411,36 +410,36 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
411
410
  e.name,
412
411
  " "
413
412
  ] }),
414
- /* @__PURE__ */ t(y, { children: w(e.amount, "0,0") })
413
+ /* @__PURE__ */ t(y, { children: v(e.amount, "0,0") })
415
414
  ] })
416
415
  },
417
416
  e.guid
418
417
  )),
419
418
  /* @__PURE__ */ t(B, {})
420
419
  ] }) })
421
- ] }, o.guid)) }),
422
- /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${a.total}: ${w(n.totalAmount, "0,0")}` })
420
+ ] }, i.guid)) }),
421
+ /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${n.total}: ${v(o.totalAmount, "0,0")}` })
423
422
  ] });
424
- }, Rt = v(Ot), kt = ({
425
- data: n,
426
- onSelected: c,
423
+ }, $t = I(kt), Gt = ({
424
+ data: o,
425
+ onSelected: d,
427
426
  onViewTransactions: r,
428
427
  selectedId: l,
429
- title: a
428
+ title: n
430
429
  }) => {
431
- const { isDesktop: i, isMobile: o } = lt(), { isLoadingCategoryTotals: e } = z(), { spending: d } = I();
430
+ const { isDesktop: a, isMobile: i } = ct(), { isLoadingCategoryTotals: e } = z(), { spending: c } = E();
432
431
  return /* @__PURE__ */ h(
433
432
  C,
434
433
  {
435
- alignItems: o ? "center" : "flex-start",
436
- direction: o ? "column" : "row",
434
+ alignItems: i ? "center" : "flex-start",
435
+ direction: i ? "column" : "row",
437
436
  gap: { xs: 16, md: 64, xl: 100 },
438
437
  justifyContent: "center",
439
438
  pt: 50,
440
439
  px: 8,
441
440
  children: [
442
441
  e && /* @__PURE__ */ t(
443
- O,
442
+ W,
444
443
  {
445
444
  data: {
446
445
  categoryData: [],
@@ -450,173 +449,175 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
450
449
  onSelected: () => {
451
450
  },
452
451
  selectedId: "",
453
- size: i ? 400 : 300,
452
+ size: a ? 400 : 300,
454
453
  totalLabel: "Loading ...",
455
454
  variant: "full"
456
455
  }
457
456
  ),
458
457
  !e && /* @__PURE__ */ t(
459
- O,
458
+ W,
460
459
  {
461
- data: n,
462
- onSelected: c,
460
+ data: o,
461
+ onSelected: d,
463
462
  onViewTransactions: r,
464
463
  selectedId: l,
465
- size: i ? 400 : 300,
466
- totalLabel: d.total_amount,
464
+ size: a ? 400 : 300,
465
+ totalLabel: c.total_amount,
467
466
  variant: "full"
468
467
  }
469
468
  ),
470
- /* @__PURE__ */ t(Rt, { data: n, onSelected: c, selectedId: l, title: a })
469
+ /* @__PURE__ */ t($t, { data: o, onSelected: d, selectedId: l, title: n })
471
470
  ]
472
471
  }
473
472
  );
474
- }, et = v(kt), $t = (n) => [
475
- n.palette.chartMono.chartMono5,
476
- n.palette.chartMono.chartMono4,
477
- n.palette.chartMono.chartMono3,
478
- n.palette.chartMono.chartMono2,
479
- n.palette.chartMono.chartMono1,
480
- n.palette.chartMono.chartMono6
481
- ], Gt = () => {
482
- const n = it(), { clientConfig: c } = st(), { categories: r, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: a } = z(), { goals: i, spending: o } = I(), { displayedDateRange: e, selectedAccounts: d, selectedAccountGuids: u } = R(), { setFilter: s, sortedTransactions: m } = _t(), T = c?.master?.deep_link_params?.account_guids, g = c?.master?.deep_link_params?.view, [b, E] = p.useState(""), [_, D] = p.useState(g === "income" ? 1 : 0), [L, H] = p.useState(""), [gt, P] = p.useState(!1);
473
+ }, nt = I(Gt), Bt = (o) => [
474
+ o.palette.chartMono.chartMono5,
475
+ o.palette.chartMono.chartMono4,
476
+ o.palette.chartMono.chartMono3,
477
+ o.palette.chartMono.chartMono2,
478
+ o.palette.chartMono.chartMono1,
479
+ o.palette.chartMono.chartMono6
480
+ ], jt = () => {
481
+ const o = rt(), { onLoad: d } = Mt(), { clientConfig: r } = lt(), { categories: l, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: a } = z(), { goals: i, spending: e } = E(), { displayedDateRange: c, selectedAccounts: u, selectedAccountGuids: s } = O(), { setFilter: m, sortedTransactions: S } = Dt(), g = r?.master?.deep_link_params?.account_guids, T = r?.master?.deep_link_params?.view, [x, D] = p.useState(""), [b, R] = p.useState(T === "income" ? 1 : 0), [H, P] = p.useState(""), [ut, K] = p.useState(!1);
483
482
  p.useEffect(() => {
484
483
  a(
485
- d,
486
- e.start,
487
- e.end
488
- ).finally();
489
- }, [d, e]);
484
+ u,
485
+ c.start,
486
+ c.end
487
+ ).finally(() => {
488
+ d?.("SpendingWidget");
489
+ });
490
+ }, [u, c]);
490
491
  const k = p.useMemo(
491
- () => ct(r, i, n, l),
492
- [r, l]
493
- ), K = p.useMemo(
494
- () => dt(r, l, $t(n)),
495
- [r, l]
492
+ () => dt(l, i, o, n),
493
+ [l, n]
494
+ ), X = p.useMemo(
495
+ () => gt(l, n, Bt(o)),
496
+ [l, n]
496
497
  ), $ = p.useMemo(
497
- () => m.find((f) => f.guid === L),
498
- [L, m]
499
- ), ut = (f, A) => {
500
- D(A), E("");
501
- }, X = (f) => {
502
- E(b === f || f === "0" ? "" : f);
498
+ () => S.find((f) => f.guid === H),
499
+ [H, S]
500
+ ), pt = (f, A) => {
501
+ R(A), D("");
503
502
  }, Y = (f) => {
503
+ D(x === f || f === "0" ? "" : f);
504
+ }, U = (f) => {
504
505
  const A = {
505
- accounts: T || u,
506
- dateRange: e
506
+ accounts: g || s,
507
+ dateRange: c
507
508
  };
508
- if (_ === 0)
509
+ if (b === 0)
509
510
  if (f === "other") {
510
511
  const M = k.categoryData.find((G) => G.guid === "other");
511
- s({
512
+ m({
512
513
  ...A,
513
- custom: (G) => !!M?.categoryTotals?.find((pt) => pt.guid === G.top_level_category_guid)
514
+ custom: (G) => !!M?.categoryTotals?.find((mt) => mt.guid === G.top_level_category_guid)
514
515
  });
515
516
  } else
516
- s({
517
+ m({
517
518
  ...A,
518
- custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !== S.INCOME && M.top_level_category_guid !== S.INVESTMENTS && M.top_level_category_guid !== S.TRANSFER,
519
+ custom: (M) => f ? M.top_level_category_guid === f : M.top_level_category_guid !== _.INCOME && M.top_level_category_guid !== _.INVESTMENTS && M.top_level_category_guid !== _.TRANSFER,
519
520
  showSplits: !!f
520
521
  });
521
522
  else
522
- s({
523
+ m({
523
524
  ...A,
524
- custom: (M) => f ? M.category_guid === f : M.category_guid === S.INCOME || M.top_level_category_guid === S.INCOME
525
+ custom: (M) => f ? M.category_guid === f : M.category_guid === _.INCOME || M.top_level_category_guid === _.INCOME
525
526
  });
526
- P(!0);
527
+ K(!0);
527
528
  };
528
- return /* @__PURE__ */ h(x, { children: [
529
- /* @__PURE__ */ h(at, { onChange: ut, value: _, variant: "fullWidth", children: [
529
+ return /* @__PURE__ */ h(w, { children: [
530
+ /* @__PURE__ */ h(it, { onChange: pt, value: b, variant: "fullWidth", children: [
530
531
  /* @__PURE__ */ t(
531
- N,
532
+ L,
532
533
  {
533
534
  label: /* @__PURE__ */ t(
534
- W,
535
+ N,
535
536
  {
536
537
  amount: k.totalAmount,
537
- label: o.spend_tab_title
538
+ label: e.spend_tab_title
538
539
  }
539
540
  )
540
541
  }
541
542
  ),
542
543
  /* @__PURE__ */ t(
543
- N,
544
+ L,
544
545
  {
545
546
  label: /* @__PURE__ */ t(
546
- W,
547
+ N,
547
548
  {
548
- amount: K.totalAmount,
549
- label: o.income_tab_title
549
+ amount: X.totalAmount,
550
+ label: e.income_tab_title
550
551
  }
551
552
  )
552
553
  }
553
554
  )
554
555
  ] }),
555
- _ === 0 && /* @__PURE__ */ t(
556
- et,
556
+ b === 0 && /* @__PURE__ */ t(
557
+ nt,
557
558
  {
558
559
  data: k,
559
- onSelected: X,
560
- onViewTransactions: Y,
561
- selectedId: b,
562
- title: o.spend_tab_title
560
+ onSelected: Y,
561
+ onViewTransactions: U,
562
+ selectedId: x,
563
+ title: e.spend_tab_title
563
564
  }
564
565
  ),
565
- _ === 1 && /* @__PURE__ */ t(
566
- et,
566
+ b === 1 && /* @__PURE__ */ t(
567
+ nt,
567
568
  {
568
- data: K,
569
- onSelected: X,
570
- onViewTransactions: Y,
571
- selectedId: b,
572
- title: o.income_tab_title
569
+ data: X,
570
+ onSelected: Y,
571
+ onViewTransactions: U,
572
+ selectedId: x,
573
+ title: e.income_tab_title
573
574
  }
574
575
  ),
575
576
  /* @__PURE__ */ t(
576
- Q,
577
+ Z,
577
578
  {
578
- ariaLabelClose: o.close_drawer_aria,
579
- isOpen: gt,
580
- onClose: () => P(!1),
581
- title: o.transactions_drawer_title,
582
- children: /* @__PURE__ */ t(Dt, { onClick: H })
579
+ ariaLabelClose: e.close_drawer_aria,
580
+ isOpen: ut,
581
+ onClose: () => K(!1),
582
+ title: e.transactions_drawer_title,
583
+ children: /* @__PURE__ */ t(_t, { onClick: P })
583
584
  }
584
585
  ),
585
586
  /* @__PURE__ */ t(
586
- Q,
587
+ Z,
587
588
  {
588
- ariaLabelClose: o.close_drawer_aria,
589
+ ariaLabelClose: e.close_drawer_aria,
589
590
  isOpen: !!$,
590
- onClose: () => H(""),
591
- title: o.transaction_details_drawer_title,
592
- children: $ && /* @__PURE__ */ t(xt, { transaction: $ })
591
+ onClose: () => P(""),
592
+ title: e.transaction_details_drawer_title,
593
+ children: $ && /* @__PURE__ */ t(St, { transaction: $ })
593
594
  }
594
595
  )
595
596
  ] });
596
- }, Bt = v(Gt), jt = ({ onBackClick: n, sx: c = {} }) => {
597
- const { visibleAccounts: r } = rt(), { spending: l } = I(), { isCopyLoaded: a, isInitialized: i, setDisplayedDate: o, setSelectedAccounts: e } = R(), { onEvent: d } = St(), { clientConfig: u } = st(), s = u?.master?.deep_link_params?.date_range, [m, T] = p.useState(!1);
597
+ }, Vt = I(jt), zt = ({ onBackClick: o, sx: d = {} }) => {
598
+ const { visibleAccounts: r } = st(), { spending: l } = E(), { isCopyLoaded: n, isInitialized: a, setDisplayedDate: i, setSelectedAccounts: e } = O(), { onEvent: c } = xt(), { clientConfig: u } = lt(), s = u?.master?.deep_link_params?.date_range, [m, S] = p.useState(!1);
598
599
  p.useEffect(() => {
599
600
  e(r);
600
601
  }, [r]), p.useEffect(() => {
601
- s && Array.isArray(s) && s.length === 2 ? o(s[0], s[1]) : o(nt(U()), ot(U())), T(!0), d(Z.SPENDING_VIEW);
602
+ s && Array.isArray(s) && s.length === 2 ? i(s[0], s[1]) : i(ot(q()), at(q())), S(!0), c(tt.SPENDING_VIEW);
602
603
  }, []);
603
- const g = (b) => {
604
- o(b[0], b[1]);
604
+ const g = (T) => {
605
+ i(T[0], T[1]);
605
606
  };
606
- return !a || !i || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
607
- It,
607
+ return !n || !a || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
608
+ At,
608
609
  {
609
610
  accountOptions: r,
610
611
  calendarActions: { onRangeChanged: g },
611
- onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
612
- onBackClick: n,
613
- sx: c,
612
+ onAccountsFilterClick: () => c(tt.SPENDING_CLICK_FILTER),
613
+ onBackClick: o,
614
+ sx: d,
614
615
  title: l.title,
615
- children: /* @__PURE__ */ t(x, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
616
+ children: /* @__PURE__ */ t(w, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Vt, {}) })
616
617
  }
617
618
  );
618
- }, Ce = v(jt);
619
+ }, _e = I(zt);
619
620
  export {
620
- be as SpendingMiniWidget,
621
- Ce as SpendingWidget
621
+ Ce as SpendingMiniWidget,
622
+ _e as SpendingWidget
622
623
  };