@mx-cartographer/experiences 7.4.7 → 7.4.8-alpha.mm0

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 (61) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{Account-01wOyrH1.mjs → Account-BrOTlmeK.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-B7FqH05C.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-C8MxsxhN.mjs} +4 -4
  5. package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-BQZ-o6Kj.mjs} +2 -2
  6. package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-aIE9WWTO.mjs} +4 -4
  7. package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-DqO84Aer.mjs} +2 -2
  8. package/dist/{Accounts-D7QljYas.mjs → Accounts-DC_A4UCa.mjs} +1 -1
  9. package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-SUgfE5GN.mjs} +1 -1
  11. package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-KL8t1qSC.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-DaK5uIL5.mjs} +2 -2
  13. package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
  14. package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-DVPZbv2C.mjs} +1 -1
  15. package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  16. package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-o4rrjGSJ.mjs} +2 -2
  17. package/dist/{Help-BnPXM_N2.mjs → Help-BjLMsuMS.mjs} +1 -1
  18. package/dist/{LineChart-bc1D9xBE.mjs → LineChart-BQRxZF3p.mjs} +1 -1
  19. package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-BxTkF6Tz.mjs} +1 -1
  20. package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-rcnDYsBJ.mjs} +75 -75
  21. package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
  23. package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-DG2X69jG.mjs} +2 -2
  24. package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-C7FYNM7I.mjs} +250 -248
  25. package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +3 -3
  26. package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-C81H1l38.mjs} +3 -3
  27. package/dist/{SpendingLegend-Bf-wbJvb.mjs → SpendingLegend-DqZxN_BZ.mjs} +2 -2
  28. package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-BA_E5nQ-.mjs} +5 -5
  29. package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-PRlwE-TF.mjs} +2 -2
  30. package/dist/{User-wXzDI4M8.mjs → User-Cnlegl1N.mjs} +1 -1
  31. package/dist/{ViewMoreMicroCard-C0832BMe.mjs → ViewMoreMicroCard-DfPXJzbv.mjs} +105 -101
  32. package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-CaPjoWeE.mjs} +2 -2
  33. package/dist/accounts/index.es.js +148 -140
  34. package/dist/analytics/index.es.js +2 -2
  35. package/dist/budgets/index.es.js +483 -478
  36. package/dist/cashflow/index.es.js +367 -362
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/hooks/index.d.ts +1 -0
  39. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  40. package/dist/common/index.es.js +35 -33
  41. package/dist/dashboard/index.es.js +90 -88
  42. package/dist/debts/index.es.js +346 -342
  43. package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +1 -1
  44. package/dist/finstrong/index.es.js +352 -350
  45. package/dist/goals/index.es.js +518 -511
  46. package/dist/help/index.es.js +13 -9
  47. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  48. package/dist/investments/index.es.js +395 -393
  49. package/dist/merchants/index.es.js +1 -1
  50. package/dist/microinsights/index.es.js +1 -1
  51. package/dist/networth/index.es.js +245 -240
  52. package/dist/notifications/index.es.js +2 -2
  53. package/dist/recurringtransactions/index.es.js +293 -285
  54. package/dist/settings/index.es.js +252 -249
  55. package/dist/spending/index.es.js +136 -124
  56. package/dist/transactions/index.es.js +77 -73
  57. package/dist/trends/index.es.js +601 -588
  58. package/dist/{useAccountDisplayName-CMMlIOXF.mjs → useAccountDisplayName-Cjx8YmKK.mjs} +2 -2
  59. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  60. package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +23 -0
  61. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import i from "react";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import a from "react";
3
3
  import { observer as x } from "mobx-react-lite";
4
4
  import { startOfMonth as it } from "date-fns/startOfMonth";
5
5
  import { endOfMonth as rt } from "date-fns/endOfMonth";
@@ -7,37 +7,43 @@ import M from "@mui/material/Box";
7
7
  import C from "@mui/material/Stack";
8
8
  import E from "@mui/material/Tab";
9
9
  import st from "@mui/material/Tabs";
10
- import ft from "@mui/material/styles/useTheme";
11
- import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-Bf-wbJvb.mjs";
12
- import { Text as y, Icon as bt } from "@mxenabled/mxui";
10
+ import bt from "@mui/material/styles/useTheme";
11
+ import { g as ct, a as lt, S as W, b as Q } from "../SpendingLegend-DqZxN_BZ.mjs";
12
+ import { Text as y, Icon as _t } from "@mxenabled/mxui";
13
13
  import { f as A } from "../NumberFormatting-DjTD0t3W.mjs";
14
- import { u as v, b as R, m as F, d as dt, n as _t, a as V, h as Ct, g as yt } from "../hooks-C41HAxM5.mjs";
14
+ import { u as w, b as R, m as F, d as dt, a as V, h as Ct, g as yt } from "../hooks-ZMp65DFz.mjs";
15
+ import { u as gt } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
15
16
  import { L as P } from "../Loader-DUaFpDGv.mjs";
16
- import { M as St } from "../MiniWidgetContainer-CmXpTylX.mjs";
17
+ import { M as St } from "../MiniWidgetContainer-98-hKFqm.mjs";
17
18
  import { startOfToday as Z } from "date-fns/startOfToday";
18
19
  import Tt from "@mui/material/Button";
19
20
  import { useTheme as Mt } from "@mui/material";
20
- import { e as xt } from "../exportTransactionsToCSV-Cz2t0lmA.mjs";
21
- import { T as vt, a as wt } from "../TransactionDetails-COH0OKNG.mjs";
21
+ import { e as xt } from "../exportTransactionsToCSV-DuAaI5XA.mjs";
22
+ import { T as wt, a as vt } from "../TransactionDetails-BA_E5nQ-.mjs";
22
23
  import Dt from "@mui/material/Collapse";
23
24
  import z from "@mui/material/Divider";
24
25
  import tt from "@mui/material/List";
25
26
  import et from "@mui/material/ListItem";
26
- import It from "@mui/material/ListItemButton";
27
- import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
27
+ import Lt from "@mui/material/ListItemButton";
28
+ import { u as It } from "../useScreenSize-B6JyS_Lj.mjs";
28
29
  import { D as nt } from "../Drawer-BEtCk82g.mjs";
29
- import { b as I } from "../Category-CevNQ03n.mjs";
30
- import { A as ot, W as At } from "../WidgetContainer-6dsjtOVg.mjs";
31
- const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column", children: [
30
+ import { b as L } from "../Category-CevNQ03n.mjs";
31
+ import { A as ot, W as At } from "../WidgetContainer-CaPjoWeE.mjs";
32
+ const N = ({ amount: e, label: d }) => /* @__PURE__ */ l(C, { direction: "column", children: [
32
33
  /* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
33
34
  /* @__PURE__ */ t(y, { variant: "XSmall", children: A(e, "0,0") })
34
35
  ] }), Et = () => {
35
- const e = ft(), { goals: d, spending: o } = v(), { selectedAccounts: l } = R(), {
36
- categories: r,
37
- dateRangeCategoryTotals: a,
36
+ const e = bt(), { goals: d, spending: o } = w(), { selectedAccounts: r } = R(), {
37
+ categories: i,
38
+ dateRangeCategoryTotals: s,
38
39
  dataRangeTotalsLoaded: n,
39
40
  loadDateRangeCategoryTotals: u
40
- } = F(), s = i.useMemo(
41
+ } = F();
42
+ gt({
43
+ widgetName: "SpendingMiniWidget",
44
+ isLoaded: n
45
+ });
46
+ const c = a.useMemo(
41
47
  () => [
42
48
  e.palette.chartMono.chartMono5,
43
49
  e.palette.chartMono.chartMono4,
@@ -48,26 +54,26 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
48
54
  ],
49
55
  [e]
50
56
  );
51
- i.useEffect(() => {
57
+ a.useEffect(() => {
52
58
  u(
53
- l,
59
+ r,
54
60
  it(/* @__PURE__ */ new Date()),
55
61
  rt(/* @__PURE__ */ new Date())
56
62
  ).finally();
57
- }, [l]);
58
- const [m, p] = i.useState(""), [h, w] = i.useState(0), _ = i.useMemo(
59
- () => ct(r, d, e, a),
60
- [r, a]
61
- ), f = i.useMemo(
62
- () => lt(r, a, s),
63
- [r, a, s]
63
+ }, [r]);
64
+ const [m, g] = a.useState(""), [h, v] = a.useState(0), _ = a.useMemo(
65
+ () => ct(i, d, e, s),
66
+ [i, s]
67
+ ), f = a.useMemo(
68
+ () => lt(i, s, c),
69
+ [i, s, c]
64
70
  ), O = (T, k) => {
65
- w(k), p("");
71
+ v(k), g("");
66
72
  }, S = (T) => {
67
- p(m === T ? "" : T);
73
+ g(m === T ? "" : T);
68
74
  };
69
- return n ? /* @__PURE__ */ c(M, { width: "100%", children: [
70
- /* @__PURE__ */ c(
75
+ return n ? /* @__PURE__ */ l(M, { width: "100%", children: [
76
+ /* @__PURE__ */ l(
71
77
  st,
72
78
  {
73
79
  "aria-label": o.mini_title,
@@ -115,7 +121,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
115
121
  hidden: h !== 0,
116
122
  id: "spending-tabpanel",
117
123
  role: "tabpanel",
118
- children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
124
+ children: /* @__PURE__ */ l(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
119
125
  /* @__PURE__ */ t(
120
126
  W,
121
127
  {
@@ -136,7 +142,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
136
142
  hidden: h !== 1,
137
143
  id: "income-tabpanel",
138
144
  role: "tabpanel",
139
- children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
145
+ children: /* @__PURE__ */ l(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
140
146
  /* @__PURE__ */ t(
141
147
  W,
142
148
  {
@@ -153,31 +159,31 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
153
159
  )
154
160
  ] }) : /* @__PURE__ */ t(P, { height: 250 });
155
161
  }, Wt = x(Et), Nt = ({ onPrimaryCtaClick: e, sx: d = {} }) => {
156
- const { visibleAccounts: o } = dt(), { spending: l } = v(), { isCopyLoaded: r, isInitialized: a, setSelectedAccounts: n } = R();
157
- return i.useEffect(() => {
162
+ const { visibleAccounts: o } = dt(), { spending: r } = w(), { isCopyLoaded: i, isInitialized: s, setSelectedAccounts: n } = R();
163
+ return a.useEffect(() => {
158
164
  n(o);
159
- }, [o]), !r || !a ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
165
+ }, [o]), !i || !s ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
160
166
  St,
161
167
  {
162
168
  className: "mx-exp-spending-miniwidget",
163
169
  onPrimaryCtaClick: e,
164
- primaryCtaLabel: l.primary_cta,
170
+ primaryCtaLabel: r.primary_cta,
165
171
  sx: { height: "100%", ...d },
166
- title: l.mini_title,
172
+ title: r.mini_title,
167
173
  children: /* @__PURE__ */ t(Wt, {})
168
174
  }
169
175
  );
170
- }, be = x(Nt), Rt = ({
176
+ }, _e = x(Nt), Rt = ({
171
177
  data: e,
172
178
  onSelected: d,
173
179
  selectedId: o = "",
174
- title: l
180
+ title: r
175
181
  }) => {
176
- const { spending: r } = v(), a = e.categoryData.find((n) => n.guid === o);
177
- return /* @__PURE__ */ c(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
178
- /* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${l} ${r.by_category}` }),
182
+ const { spending: i } = w(), s = e.categoryData.find((n) => n.guid === o);
183
+ return /* @__PURE__ */ l(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
184
+ /* @__PURE__ */ t(y, { bold: !0, sx: { py: 12 }, children: `${r} ${i.by_category}` }),
179
185
  /* @__PURE__ */ t(z, { "aria-hidden": "true" }),
180
- /* @__PURE__ */ t(tt, { children: e.categoryData.map((n) => /* @__PURE__ */ c(i.Fragment, { children: [
186
+ /* @__PURE__ */ t(tt, { children: e.categoryData.map((n) => /* @__PURE__ */ l(a.Fragment, { children: [
181
187
  /* @__PURE__ */ t(
182
188
  et,
183
189
  {
@@ -186,10 +192,10 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
186
192
  sx: {
187
193
  minHeight: 44
188
194
  },
189
- children: /* @__PURE__ */ c(
190
- It,
195
+ children: /* @__PURE__ */ l(
196
+ Lt,
191
197
  {
192
- "aria-expanded": a?.guid === n.guid,
198
+ "aria-expanded": s?.guid === n.guid,
193
199
  onClick: () => d(n.guid),
194
200
  sx: { minHeight: 44, px: 8, py: 0 },
195
201
  children: [
@@ -203,7 +209,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
203
209
  width: 8
204
210
  }
205
211
  ),
206
- /* @__PURE__ */ c(
212
+ /* @__PURE__ */ l(
207
213
  C,
208
214
  {
209
215
  alignItems: "center",
@@ -222,8 +228,8 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
222
228
  }
223
229
  ),
224
230
  /* @__PURE__ */ t(z, {}),
225
- n.categoryTotals && n.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in: a?.guid === n.guid, unmountOnExit: !0, children: /* @__PURE__ */ c(tt, { children: [
226
- a?.categoryTotals?.map((u) => /* @__PURE__ */ t(
231
+ n.categoryTotals && n.categoryTotals.length > 0 && /* @__PURE__ */ t(Dt, { in: s?.guid === n.guid, unmountOnExit: !0, children: /* @__PURE__ */ l(tt, { children: [
232
+ s?.categoryTotals?.map((u) => /* @__PURE__ */ t(
227
233
  et,
228
234
  {
229
235
  sx: {
@@ -231,8 +237,8 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
231
237
  pr: 8,
232
238
  py: 0
233
239
  },
234
- children: /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
235
- /* @__PURE__ */ c(y, { children: [
240
+ children: /* @__PURE__ */ l(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
241
+ /* @__PURE__ */ l(y, { children: [
236
242
  u.name,
237
243
  " "
238
244
  ] }),
@@ -244,17 +250,17 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
244
250
  /* @__PURE__ */ t(z, {})
245
251
  ] }) })
246
252
  ] }, n.guid)) }),
247
- /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${r.total}: ${A(e.totalAmount, "0,0")}` })
253
+ /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${A(e.totalAmount, "0,0")}` })
248
254
  ] });
249
255
  }, Ot = x(Rt), kt = ({
250
256
  data: e,
251
257
  onSelected: d,
252
258
  onViewTransactions: o,
253
- selectedId: l,
254
- title: r
259
+ selectedId: r,
260
+ title: i
255
261
  }) => {
256
- const { isDesktop: a, isMobile: n } = Lt(), { isLoadingCategoryTotals: u } = F(), { spending: s } = v();
257
- return /* @__PURE__ */ c(
262
+ const { isDesktop: s, isMobile: n } = It(), { isLoadingCategoryTotals: u } = F(), { spending: c } = w();
263
+ return /* @__PURE__ */ l(
258
264
  C,
259
265
  {
260
266
  alignItems: n ? "center" : "flex-start",
@@ -275,7 +281,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
275
281
  onSelected: () => {
276
282
  },
277
283
  selectedId: "",
278
- size: a ? 400 : 300,
284
+ size: s ? 400 : 300,
279
285
  totalLabel: "Loading ...",
280
286
  variant: "full"
281
287
  }
@@ -286,13 +292,13 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
286
292
  data: e,
287
293
  onSelected: d,
288
294
  onViewTransactions: o,
289
- selectedId: l,
290
- size: a ? 400 : 300,
291
- totalLabel: s.total_amount,
295
+ selectedId: r,
296
+ size: s ? 400 : 300,
297
+ totalLabel: c.total_amount,
292
298
  variant: "full"
293
299
  }
294
300
  ),
295
- /* @__PURE__ */ t(Ot, { data: e, onSelected: d, selectedId: l, title: r })
301
+ /* @__PURE__ */ t(Ot, { data: e, onSelected: d, selectedId: r, title: i })
296
302
  ]
297
303
  }
298
304
  );
@@ -304,67 +310,73 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
304
310
  e.palette.chartMono.chartMono1,
305
311
  e.palette.chartMono.chartMono6
306
312
  ], Bt = () => {
307
- const e = Mt(), { onLoad: d } = _t(), { is_mobile_webview: o } = V(), { clientConfig: l } = V(), { categories: r, dateRangeCategoryTotals: a, loadDateRangeCategoryTotals: n } = F(), {
313
+ const e = Mt(), { is_mobile_webview: d } = V(), { clientConfig: o } = V(), {
314
+ categories: r,
315
+ dateRangeCategoryTotals: i,
316
+ loadDateRangeCategoryTotals: s,
317
+ dataRangeTotalsLoaded: n
318
+ } = F(), {
308
319
  goals: u,
309
- spending: s,
320
+ spending: c,
310
321
  transactions: m
311
- } = v(), { displayedDateRange: p, selectedAccounts: h, selectedAccountGuids: w } = R(), {
322
+ } = w(), { displayedDateRange: g, selectedAccounts: h, selectedAccountGuids: v } = R(), {
312
323
  setFilter: _,
313
324
  sortedTransactions: f,
314
325
  sortedTransactionsWithSplits: O,
315
326
  tags: S
316
- } = Ct(), T = l?.master?.deep_link_params?.account_guids, k = l?.master?.deep_link_params?.view, [$, H] = i.useState(""), [L, pt] = i.useState(k === "income" ? 1 : 0), [K, U] = i.useState(""), [gt, X] = i.useState(!1);
317
- i.useEffect(() => {
318
- n(
327
+ } = Ct(), T = o?.master?.deep_link_params?.account_guids, k = o?.master?.deep_link_params?.view, [$, H] = a.useState(""), [I, pt] = a.useState(k === "income" ? 1 : 0), [K, U] = a.useState(""), [ut, X] = a.useState(!1);
328
+ gt({
329
+ widgetName: "SpendingWidget",
330
+ isLoaded: n
331
+ }), a.useEffect(() => {
332
+ s(
319
333
  h,
320
- p.start,
321
- p.end
322
- ).finally(() => {
323
- d?.("SpendingWidget");
324
- });
325
- }, [h, p]);
326
- const B = i.useMemo(
327
- () => ct(r, u, e, a),
328
- [r, a]
329
- ), Y = i.useMemo(
330
- () => lt(r, a, $t(e)),
331
- [r, a]
332
- ), G = i.useMemo(
333
- () => f.find((g) => g.guid === K),
334
+ g.start,
335
+ g.end
336
+ ).finally();
337
+ }, [h, g]);
338
+ const B = a.useMemo(
339
+ () => ct(r, u, e, i),
340
+ [r, i]
341
+ ), Y = a.useMemo(
342
+ () => lt(r, i, $t(e)),
343
+ [r, i]
344
+ ), G = a.useMemo(
345
+ () => f.find((p) => p.guid === K),
334
346
  [K, f]
335
- ), ut = (g, D) => {
347
+ ), mt = (p, D) => {
336
348
  pt(D), H("");
337
- }, q = (g) => {
338
- H($ === g || g === "0" ? "" : g);
339
- }, J = (g) => {
349
+ }, q = (p) => {
350
+ H($ === p || p === "0" ? "" : p);
351
+ }, J = (p) => {
340
352
  const D = {
341
- accounts: T || w,
342
- dateRange: p
353
+ accounts: T || v,
354
+ dateRange: g
343
355
  };
344
- if (L === 0)
345
- if (g === "other") {
356
+ if (I === 0)
357
+ if (p === "other") {
346
358
  const b = B.categoryData.find((j) => j.guid === "other");
347
359
  _({
348
360
  ...D,
349
- custom: (j) => !!b?.categoryTotals?.find((ht) => ht.guid === j.top_level_category_guid)
361
+ custom: (j) => !!b?.categoryTotals?.find((ft) => ft.guid === j.top_level_category_guid)
350
362
  });
351
363
  } else
352
364
  _({
353
365
  ...D,
354
- custom: (b) => g ? b.top_level_category_guid === g : b.top_level_category_guid !== I.INCOME && b.top_level_category_guid !== I.INVESTMENTS && b.top_level_category_guid !== I.TRANSFER,
355
- showSplits: !!g
366
+ custom: (b) => p ? b.top_level_category_guid === p : b.top_level_category_guid !== L.INCOME && b.top_level_category_guid !== L.INVESTMENTS && b.top_level_category_guid !== L.TRANSFER,
367
+ showSplits: !!p
356
368
  });
357
369
  else
358
370
  _({
359
371
  ...D,
360
- custom: (b) => g ? b.category_guid === g : b.category_guid === I.INCOME || b.top_level_category_guid === I.INCOME
372
+ custom: (b) => p ? b.category_guid === p : b.category_guid === L.INCOME || b.top_level_category_guid === L.INCOME
361
373
  });
362
374
  X(!0);
363
- }, mt = () => {
375
+ }, ht = () => {
364
376
  xt(O, S);
365
377
  };
366
- return /* @__PURE__ */ c(M, { children: [
367
- /* @__PURE__ */ c(st, { onChange: ut, value: L, variant: "fullWidth", children: [
378
+ return /* @__PURE__ */ l(M, { children: [
379
+ /* @__PURE__ */ l(st, { onChange: mt, value: I, variant: "fullWidth", children: [
368
380
  /* @__PURE__ */ t(
369
381
  E,
370
382
  {
@@ -372,7 +384,7 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
372
384
  N,
373
385
  {
374
386
  amount: B.totalAmount,
375
- label: s.spend_tab_title
387
+ label: c.spend_tab_title
376
388
  }
377
389
  )
378
390
  }
@@ -384,88 +396,88 @@ const N = ({ amount: e, label: d }) => /* @__PURE__ */ c(C, { direction: "column
384
396
  N,
385
397
  {
386
398
  amount: Y.totalAmount,
387
- label: s.income_tab_title
399
+ label: c.income_tab_title
388
400
  }
389
401
  )
390
402
  }
391
403
  )
392
404
  ] }),
393
- L === 0 && /* @__PURE__ */ t(
405
+ I === 0 && /* @__PURE__ */ t(
394
406
  at,
395
407
  {
396
408
  data: B,
397
409
  onSelected: q,
398
410
  onViewTransactions: J,
399
411
  selectedId: $,
400
- title: s.spend_tab_title
412
+ title: c.spend_tab_title
401
413
  }
402
414
  ),
403
- L === 1 && /* @__PURE__ */ t(
415
+ I === 1 && /* @__PURE__ */ t(
404
416
  at,
405
417
  {
406
418
  data: Y,
407
419
  onSelected: q,
408
420
  onViewTransactions: J,
409
421
  selectedId: $,
410
- title: s.income_tab_title
422
+ title: c.income_tab_title
411
423
  }
412
424
  ),
413
425
  /* @__PURE__ */ t(
414
426
  nt,
415
427
  {
416
- ariaLabelClose: s.close_drawer_aria,
417
- isOpen: gt,
428
+ ariaLabelClose: c.close_drawer_aria,
429
+ isOpen: ut,
418
430
  onClose: () => X(!1),
419
- title: s.transactions_drawer_title,
420
- children: /* @__PURE__ */ c(C, { children: [
421
- !o && f.length > 0 && /* @__PURE__ */ t(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
431
+ title: c.transactions_drawer_title,
432
+ children: /* @__PURE__ */ l(C, { children: [
433
+ !d && f.length > 0 && /* @__PURE__ */ t(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
422
434
  Tt,
423
435
  {
424
- onClick: mt,
425
- startIcon: /* @__PURE__ */ t(bt, { name: "ios_share" }),
436
+ onClick: ht,
437
+ startIcon: /* @__PURE__ */ t(_t, { name: "ios_share" }),
426
438
  variant: "text",
427
439
  children: m.export_csv_btn
428
440
  }
429
441
  ) }),
430
- /* @__PURE__ */ t(vt, { onClick: U })
442
+ /* @__PURE__ */ t(wt, { onClick: U })
431
443
  ] })
432
444
  }
433
445
  ),
434
446
  /* @__PURE__ */ t(
435
447
  nt,
436
448
  {
437
- ariaLabelClose: s.close_drawer_aria,
449
+ ariaLabelClose: c.close_drawer_aria,
438
450
  isOpen: !!G,
439
451
  onClose: () => U(""),
440
- title: s.transaction_details_drawer_title,
441
- children: G && /* @__PURE__ */ t(wt, { transaction: G })
452
+ title: c.transaction_details_drawer_title,
453
+ children: G && /* @__PURE__ */ t(vt, { transaction: G })
442
454
  }
443
455
  )
444
456
  ] });
445
457
  }, Gt = x(Bt), jt = ({ onBackClick: e, sx: d = {} }) => {
446
- const { visibleAccounts: o } = dt(), { spending: l } = v(), { isCopyLoaded: r, isInitialized: a, setDisplayedDate: n, setSelectedAccounts: u } = R(), { onEvent: s } = yt(), { clientConfig: m } = V(), p = m?.master?.deep_link_params?.date_range, [h, w] = i.useState(!1);
447
- i.useEffect(() => {
458
+ const { visibleAccounts: o } = dt(), { spending: r } = w(), { isCopyLoaded: i, isInitialized: s, setDisplayedDate: n, setSelectedAccounts: u } = R(), { onEvent: c } = yt(), { clientConfig: m } = V(), g = m?.master?.deep_link_params?.date_range, [h, v] = a.useState(!1);
459
+ a.useEffect(() => {
448
460
  u(o);
449
- }, [o]), i.useEffect(() => {
450
- p && Array.isArray(p) && p.length === 2 ? n(p[0], p[1]) : n(it(Z()), rt(Z())), w(!0), s(ot.SPENDING_VIEW);
461
+ }, [o]), a.useEffect(() => {
462
+ g && Array.isArray(g) && g.length === 2 ? n(g[0], g[1]) : n(it(Z()), rt(Z())), v(!0), c(ot.SPENDING_VIEW);
451
463
  }, []);
452
464
  const _ = (f) => {
453
465
  n(f[0], f[1]);
454
466
  };
455
- return !r || !a || !h ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
467
+ return !i || !s || !h ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
456
468
  At,
457
469
  {
458
470
  accountOptions: o,
459
471
  calendarActions: { onRangeChanged: _ },
460
- onAccountsFilterClick: () => s(ot.SPENDING_CLICK_FILTER),
472
+ onAccountsFilterClick: () => c(ot.SPENDING_CLICK_FILTER),
461
473
  onBackClick: e,
462
474
  sx: d,
463
- title: l.title,
475
+ title: r.title,
464
476
  children: /* @__PURE__ */ t(M, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Gt, {}) })
465
477
  }
466
478
  );
467
- }, _e = x(jt);
479
+ }, Ce = x(jt);
468
480
  export {
469
- be as SpendingMiniWidget,
470
- _e as SpendingWidget
481
+ _e as SpendingMiniWidget,
482
+ Ce as SpendingWidget
471
483
  };