@mx-cartographer/experiences 8.0.19 → 8.0.21

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 (55) hide show
  1. package/CHANGELOG.md +12 -4
  2. package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-B7zfcad7.mjs} +1 -1
  3. package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-DZpOoZQa.mjs} +1 -1
  4. package/dist/{EmbeddedCard-xngm4vLT.mjs → EmbeddedCard-D0Pgpiuq.mjs} +89 -81
  5. package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-CmnaZDS6.mjs} +27 -27
  6. package/dist/{Help-DBAosGjO.mjs → Help-BkmSY96v.mjs} +1 -1
  7. package/dist/{ManageIncome-CvfRTf-j.mjs → ManageIncome-DfKQ48km.mjs} +2 -2
  8. package/dist/{NotificationSettings-D7VqsrZy.mjs → NotificationSettings-DBT37CVB.mjs} +1 -1
  9. package/dist/{RecurringSettings-DJIUgK5A.mjs → RecurringSettings-CpFfjTIL.mjs} +1 -1
  10. package/dist/{SpendingLegend-BCnXkPCD.mjs → SpendingLegend-CypdabwS.mjs} +1 -1
  11. package/dist/{TransactionDetails-KklNHa-s.mjs → TransactionDetails-D57Cfnwh.mjs} +2 -2
  12. package/dist/WidgetContainer-DYKMArWw.mjs +468 -0
  13. package/dist/accounts/index.es.js +96 -94
  14. package/dist/budgets/index.es.js +448 -444
  15. package/dist/cashflow/index.es.js +234 -232
  16. package/dist/common/components/GlobalAccountFilter.d.ts +2 -1
  17. package/dist/common/components/WidgetContainer.d.ts +2 -1
  18. package/dist/common/components/WidgetDateRangeSelector.d.ts +12 -0
  19. package/dist/common/hooks/index.d.ts +1 -0
  20. package/dist/common/hooks/useWidgetHeaderStyles.d.ts +32 -0
  21. package/dist/common/index.es.js +133 -132
  22. package/dist/common/utils/PostMessage.d.ts +1 -0
  23. package/dist/core/types/Widgets.d.ts +1 -0
  24. package/dist/dashboard/index.es.js +3 -3
  25. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +2 -1
  26. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
  27. package/dist/debts/index.es.js +589 -587
  28. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  29. package/dist/finstrong/index.es.js +738 -746
  30. package/dist/goals/GoalsWidget.d.ts +1 -1
  31. package/dist/goals/index.es.js +439 -438
  32. package/dist/help/HelpWidget.d.ts +1 -1
  33. package/dist/help/index.es.js +21 -12
  34. package/dist/insights/components/index.d.ts +1 -0
  35. package/dist/insights/components/shared/InsightsCard/ClientConfigurableCta.d.ts +5 -0
  36. package/dist/insights/components/shared/InsightsCard/ContentAndDescription.d.ts +0 -2
  37. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +0 -2
  38. package/dist/insights/components/shared/InsightsCard/Description.d.ts +0 -2
  39. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +0 -2
  40. package/dist/insights/index.es.js +562 -579
  41. package/dist/insights/types/CommonBeat.d.ts +0 -1
  42. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  43. package/dist/investments/index.es.js +418 -417
  44. package/dist/networth/index.es.js +265 -278
  45. package/dist/notifications/index.es.js +1 -1
  46. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  47. package/dist/recurringtransactions/index.es.js +235 -232
  48. package/dist/settings/SettingsWidget.d.ts +1 -1
  49. package/dist/settings/index.es.js +283 -282
  50. package/dist/spending/index.es.js +110 -109
  51. package/dist/transactions/index.es.js +280 -277
  52. package/dist/trends/index.es.js +623 -616
  53. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-CUcpY7aJ.mjs} +1 -1
  54. package/package.json +2 -2
  55. package/dist/WidgetContainer-D-pbSa7L.mjs +0 -441
@@ -1,17 +1,17 @@
1
1
  import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { observer as L } from "mobx-react-lite";
3
+ import { observer as I } from "mobx-react-lite";
4
4
  import { startOfMonth as ot } from "date-fns/startOfMonth";
5
5
  import { endOfMonth as at } from "date-fns/endOfMonth";
6
- import w from "@mui/material/Box";
7
- import C from "@mui/material/Stack";
8
- import N from "@mui/material/Tab";
6
+ import L from "@mui/material/Box";
7
+ import y from "@mui/material/Stack";
8
+ import $ from "@mui/material/Tab";
9
9
  import it from "@mui/material/Tabs";
10
10
  import _t from "@mui/material/styles/useTheme";
11
- import { g as rt, a as st, S as $, b as Y } from "../SpendingLegend-BCnXkPCD.mjs";
11
+ import { g as rt, a as st, S as O, b as Y } from "../SpendingLegend-CypdabwS.mjs";
12
12
  import { Text as T, Icon as bt } from "@mxenabled/mxui";
13
- import { f as R } from "../NumberFormatting-QCaNwbjv.mjs";
14
- import { u as I, l as A, d as lt, b as V, a as F, h as ct, g as yt } from "../hooks-BxkfR-Ff.mjs";
13
+ import { f as N } from "../NumberFormatting-QCaNwbjv.mjs";
14
+ import { u as A, l as W, d as lt, b as z, a as V, h as ct, g as yt } from "../hooks-BxkfR-Ff.mjs";
15
15
  import { u as dt } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
16
16
  import { L as gt } from "../Loader-D3rjKx72.mjs";
17
17
  import { M as Ct } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
@@ -19,24 +19,24 @@ import { startOfToday as q } from "date-fns/startOfToday";
19
19
  import St from "@mui/material/Button";
20
20
  import { useTheme as Tt } from "@mui/material";
21
21
  import { e as Mt } from "../exportTransactionsToCSV-DgdB3TBt.mjs";
22
- import { T as Dt } from "../EmbeddedCard-xngm4vLT.mjs";
23
- import { T as xt } from "../TransactionDetails-KklNHa-s.mjs";
22
+ import { T as Dt } from "../EmbeddedCard-D0Pgpiuq.mjs";
23
+ import { T as xt } from "../TransactionDetails-D57Cfnwh.mjs";
24
24
  import vt from "@mui/material/Collapse";
25
25
  import wt from "@mui/material/Divider";
26
26
  import J from "@mui/material/List";
27
27
  import Q from "@mui/material/ListItem";
28
28
  import X from "@mui/material/ListItemButton";
29
- import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
29
+ import { u as Lt } from "../useScreenSize-CUcpY7aJ.mjs";
30
30
  import { D as Z } from "../Drawer-Bbe4AMB1.mjs";
31
- import { b as v } from "../Category-CevNQ03n.mjs";
31
+ import { b as w } from "../Category-CevNQ03n.mjs";
32
32
  import { parseISO as tt } from "date-fns/parseISO";
33
33
  import { A as et } from "../Analytics-0Xm_BjHU.mjs";
34
- import { W as It } from "../WidgetContainer-D-pbSa7L.mjs";
35
- const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C, { direction: "column", children: [
34
+ import { W as It } from "../WidgetContainer-DYKMArWw.mjs";
35
+ const k = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
36
36
  /* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
37
- /* @__PURE__ */ t(T, { variant: "caption", children: R(n, o === "mini" ? "0,0" : "0,0.00") })
37
+ /* @__PURE__ */ t(T, { variant: "caption", children: N(n, o === "mini" ? "0,0" : "0,0.00") })
38
38
  ] }), At = () => {
39
- const n = _t(), { goals: d, spending: o } = I(), { categories: a, dateRangeCategoryTotals: i } = A(), g = l.useMemo(
39
+ const n = _t(), { goals: d, spending: o } = A(), { categories: a, dateRangeCategoryTotals: i } = W(), g = l.useMemo(
40
40
  () => [
41
41
  n.palette.chartMono.chartMono5,
42
42
  n.palette.chartMono.chartMono4,
@@ -49,15 +49,15 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
49
49
  ), [e, r] = l.useState(""), [c, b] = l.useState(0), u = l.useMemo(
50
50
  () => rt(a, d, n, i),
51
51
  [a, i]
52
- ), m = l.useMemo(
52
+ ), h = l.useMemo(
53
53
  () => st(a, i, g),
54
54
  [a, i, g]
55
- ), M = (f, D) => {
56
- b(D), r("");
57
- }, y = (f) => {
55
+ ), M = (f, x) => {
56
+ b(x), r("");
57
+ }, _ = (f) => {
58
58
  r(e === f ? "" : f);
59
59
  };
60
- return /* @__PURE__ */ p(w, { width: "100%", children: [
60
+ return /* @__PURE__ */ p(L, { width: "100%", children: [
61
61
  /* @__PURE__ */ p(
62
62
  it,
63
63
  {
@@ -67,12 +67,12 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
67
67
  variant: "fullWidth",
68
68
  children: [
69
69
  /* @__PURE__ */ t(
70
- N,
70
+ $,
71
71
  {
72
72
  "aria-controls": "spending-tabpanel",
73
73
  id: "spending-tab",
74
74
  label: /* @__PURE__ */ t(
75
- O,
75
+ k,
76
76
  {
77
77
  amount: u.totalAmount,
78
78
  label: o.spend_tab_title,
@@ -83,14 +83,14 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
83
83
  }
84
84
  ),
85
85
  /* @__PURE__ */ t(
86
- N,
86
+ $,
87
87
  {
88
88
  "aria-controls": "income-tabpanel",
89
89
  id: "income-tab",
90
90
  label: /* @__PURE__ */ t(
91
- O,
91
+ k,
92
92
  {
93
- amount: m.totalAmount,
93
+ amount: h.totalAmount,
94
94
  label: o.income_tab_title,
95
95
  variant: "mini"
96
96
  }
@@ -102,51 +102,51 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
102
102
  }
103
103
  ),
104
104
  /* @__PURE__ */ t(
105
- w,
105
+ L,
106
106
  {
107
107
  "aria-labelledby": "spending-tab",
108
108
  hidden: c !== 0,
109
109
  id: "spending-tabpanel",
110
110
  role: "tabpanel",
111
- children: /* @__PURE__ */ p(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
111
+ children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
112
112
  /* @__PURE__ */ t(
113
- $,
113
+ O,
114
114
  {
115
115
  data: u,
116
- onSelected: y,
116
+ onSelected: _,
117
117
  selectedId: e,
118
118
  totalLabel: o.total_spending
119
119
  }
120
120
  ),
121
- /* @__PURE__ */ t(Y, { data: u, onSelected: y, selectedId: e })
121
+ /* @__PURE__ */ t(Y, { data: u, onSelected: _, selectedId: e })
122
122
  ] })
123
123
  }
124
124
  ),
125
125
  /* @__PURE__ */ t(
126
- w,
126
+ L,
127
127
  {
128
128
  "aria-labelledby": "income-tab",
129
129
  hidden: c !== 1,
130
130
  id: "income-tabpanel",
131
131
  role: "tabpanel",
132
- children: /* @__PURE__ */ p(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
132
+ children: /* @__PURE__ */ p(y, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
133
133
  /* @__PURE__ */ t(
134
- $,
134
+ O,
135
135
  {
136
- data: m,
136
+ data: h,
137
137
  isIncome: !0,
138
- onSelected: y,
138
+ onSelected: _,
139
139
  selectedId: e,
140
140
  totalLabel: o.total_income
141
141
  }
142
142
  ),
143
- /* @__PURE__ */ t(Y, { data: m, onSelected: y, selectedId: e })
143
+ /* @__PURE__ */ t(Y, { data: h, onSelected: _, selectedId: e })
144
144
  ] })
145
145
  }
146
146
  )
147
147
  ] });
148
- }, Et = L(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
149
- const { isAccountDataLoaded: o, loadAccountData: a } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = A(), { spending: c } = I(), { isInitialized: b, selectedAccounts: u } = V();
148
+ }, Et = I(At), Wt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
149
+ const { isAccountDataLoaded: o, loadAccountData: a } = lt(), { dateRangeTotalsLoaded: i, categoriesLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = W(), { spending: c } = A(), { isInitialized: b, selectedAccounts: u } = z();
150
150
  return dt({
151
151
  widgetName: "SpendingMiniWidget",
152
152
  isLoaded: i
@@ -170,14 +170,14 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
170
170
  children: /* @__PURE__ */ t(Et, {})
171
171
  }
172
172
  ) : /* @__PURE__ */ t(gt, {});
173
- }, Ce = L(Wt), Rt = ({
173
+ }, Ce = I(Wt), Rt = ({
174
174
  data: n,
175
175
  onSelected: d,
176
176
  selectedId: o = "",
177
177
  title: a
178
178
  }) => {
179
- const { spending: i } = I(), g = n.categoryData.find((e) => e.guid === o);
180
- return /* @__PURE__ */ p(C, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
179
+ const { spending: i } = A(), g = n.categoryData.find((e) => e.guid === o);
180
+ return /* @__PURE__ */ p(y, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
181
181
  /* @__PURE__ */ t(T, { bold: !0, id: "spending-list-title", sx: { py: 12 }, variant: "h3", children: `${a} ${i.by_category}` }),
182
182
  /* @__PURE__ */ t(wt, { "aria-hidden": "true" }),
183
183
  /* @__PURE__ */ t(J, { "aria-labelledby": "spending-list-title", children: n.categoryData.map((e) => /* @__PURE__ */ p(l.Fragment, { children: [
@@ -200,7 +200,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
200
200
  sx: { minHeight: 44, px: 8, py: 0 },
201
201
  children: [
202
202
  /* @__PURE__ */ t(
203
- w,
203
+ L,
204
204
  {
205
205
  "aria-hidden": "true",
206
206
  borderRadius: 4,
@@ -212,7 +212,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
212
212
  }
213
213
  ),
214
214
  /* @__PURE__ */ p(
215
- C,
215
+ y,
216
216
  {
217
217
  alignItems: "center",
218
218
  direction: "row",
@@ -220,7 +220,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
220
220
  width: "100%",
221
221
  children: [
222
222
  /* @__PURE__ */ t(T, { bold: o === e.guid, children: e.name }),
223
- /* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: R(e.amount, "0,0.00") })
223
+ /* @__PURE__ */ t(T, { bold: o === e.guid, variant: "body1", children: N(e.amount, "0,0.00") })
224
224
  ]
225
225
  }
226
226
  )
@@ -242,12 +242,12 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
242
242
  id: `spending-list-subcategory-${r.guid}`,
243
243
  onClick: () => d(r.guid, !0),
244
244
  sx: { minHeight: 44, px: 8, py: 0 },
245
- children: /* @__PURE__ */ p(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
245
+ children: /* @__PURE__ */ p(y, { direction: "row", justifyContent: "space-between", width: "100%", children: [
246
246
  /* @__PURE__ */ p(T, { children: [
247
247
  r.name,
248
248
  " "
249
249
  ] }),
250
- /* @__PURE__ */ t(T, { children: R(r.amount, "0,0.00") })
250
+ /* @__PURE__ */ t(T, { children: N(r.amount, "0,0.00") })
251
251
  ] })
252
252
  }
253
253
  )
@@ -255,18 +255,18 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
255
255
  r.guid
256
256
  )) }) })
257
257
  ] }, e.guid)) }),
258
- /* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${R(n.totalAmount, "0,0.00")}` })
258
+ /* @__PURE__ */ t(T, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${i.total}: ${N(n.totalAmount, "0,0.00")}` })
259
259
  ] });
260
- }, Nt = L(Rt), $t = ({
260
+ }, Nt = I(Rt), $t = ({
261
261
  data: n,
262
262
  onSelected: d,
263
263
  onViewTransactions: o,
264
264
  selectedId: a,
265
265
  title: i
266
266
  }) => {
267
- const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = A(), { spending: c } = I();
267
+ const { isDesktop: g, isMobile: e } = Lt(), { dateRangeTotalsLoading: r } = W(), { spending: c } = A();
268
268
  return /* @__PURE__ */ p(
269
- C,
269
+ y,
270
270
  {
271
271
  alignItems: e ? "center" : "flex-start",
272
272
  direction: e ? "column" : "row",
@@ -276,7 +276,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
276
276
  px: 8,
277
277
  children: [
278
278
  r && /* @__PURE__ */ t(
279
- $,
279
+ O,
280
280
  {
281
281
  data: {
282
282
  categoryData: [],
@@ -292,11 +292,11 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
292
292
  }
293
293
  ),
294
294
  !r && /* @__PURE__ */ t(
295
- $,
295
+ O,
296
296
  {
297
297
  data: n,
298
- onSelected: (m) => {
299
- d(m), setTimeout(() => document.getElementById(`spending-list-category-${m}`)?.focus(), 0);
298
+ onSelected: (h) => {
299
+ d(h), setTimeout(() => document.getElementById(`spending-list-category-${h}`)?.focus(), 0);
300
300
  },
301
301
  onViewTransactions: o,
302
302
  selectedId: a,
@@ -309,7 +309,7 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
309
309
  ]
310
310
  }
311
311
  );
312
- }, nt = L($t), Ot = (n) => [
312
+ }, nt = I($t), Ot = (n) => [
313
313
  n.palette.chartMono.chartMono5,
314
314
  n.palette.chartMono.chartMono4,
315
315
  n.palette.chartMono.chartMono3,
@@ -317,83 +317,83 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
317
317
  n.palette.chartMono.chartMono1,
318
318
  n.palette.chartMono.chartMono6
319
319
  ], kt = () => {
320
- const n = Tt(), { is_mobile_webview: d } = F(), { clientConfig: o } = F(), { categories: a, dateRangeCategoryTotals: i } = A(), {
320
+ const n = Tt(), { is_mobile_webview: d } = V(), { clientConfig: o } = V(), { categories: a, dateRangeCategoryTotals: i } = W(), {
321
321
  goals: g,
322
322
  spending: e,
323
323
  transactions: r
324
- } = I(), { displayedDateRange: c, selectedAccountGuids: b } = V(), {
324
+ } = A(), { displayedDateRange: c, selectedAccountGuids: b } = z(), {
325
325
  setFilter: u,
326
- sortedTransactions: m,
326
+ sortedTransactions: h,
327
327
  sortedTransactionsWithSplits: M,
328
- tags: y
329
- } = ct(), f = o?.master?.deep_link_params?.account_guids, D = o?.master?.deep_link_params?.view, [x, E] = l.useState(""), [_, W] = l.useState(D === "income" ? 1 : 0), [z, H] = l.useState(""), [pt, k] = l.useState(!1), B = l.useMemo(
328
+ tags: _
329
+ } = ct(), f = o?.master?.deep_link_params?.account_guids, x = o?.master?.deep_link_params?.view, [D, R] = l.useState(""), [v, C] = l.useState(x === "income" ? 1 : 0), [E, H] = l.useState(""), [pt, B] = l.useState(!1), G = l.useMemo(
330
330
  () => rt(a, g, n, i),
331
331
  [a, i]
332
332
  ), P = l.useMemo(
333
333
  () => st(a, i, Ot(n)),
334
334
  [a, i]
335
- ), G = l.useMemo(
336
- () => m.find((s) => s.guid === z),
337
- [z, m]
335
+ ), j = l.useMemo(
336
+ () => h.find((s) => s.guid === E),
337
+ [E, h]
338
338
  ), ut = (s, S) => {
339
- W(S), E("");
339
+ C(S), R("");
340
340
  }, K = (s, S = !1) => {
341
- S ? mt(s) : E(x === s || s === "0" ? "" : s);
341
+ S ? mt(s) : R(D === s || s === "0" ? "" : s);
342
342
  }, mt = (s) => {
343
343
  u({
344
344
  ...{
345
345
  accounts: f || b,
346
346
  dateRange: c
347
347
  },
348
- custom: (h) => x === "other" ? h.top_level_category_guid === s : h.category_guid === s,
348
+ custom: (m) => D === "other" ? m.top_level_category_guid === s : m.category_guid === s,
349
349
  showSplits: !0
350
- }), k(!0);
350
+ }), B(!0);
351
351
  }, U = (s) => {
352
352
  const S = {
353
353
  accounts: f || b,
354
354
  dateRange: c
355
355
  };
356
- if (_ === 0)
356
+ if (v === 0)
357
357
  if (s === "other") {
358
- const h = B.categoryData.find((j) => j.guid === "other");
358
+ const m = G.categoryData.find((F) => F.guid === "other");
359
359
  u({
360
360
  ...S,
361
- custom: (j) => !!h?.categoryTotals?.find((ft) => ft.guid === j.top_level_category_guid)
361
+ custom: (F) => !!m?.categoryTotals?.find((ft) => ft.guid === F.top_level_category_guid)
362
362
  });
363
363
  } else
364
364
  u({
365
365
  ...S,
366
- custom: (h) => s ? h.top_level_category_guid === s : h.top_level_category_guid !== v.INCOME && h.category_guid !== v.INCOME && h.top_level_category_guid !== v.INVESTMENTS && h.top_level_category_guid !== v.TRANSFER,
366
+ custom: (m) => s ? m.top_level_category_guid === s : 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,
367
367
  showSplits: !!s
368
368
  });
369
369
  else
370
370
  u({
371
371
  ...S,
372
- custom: (h) => s ? h.category_guid === s : h.category_guid === v.INCOME || h.top_level_category_guid === v.INCOME
372
+ custom: (m) => s ? m.category_guid === s : m.category_guid === w.INCOME || m.top_level_category_guid === w.INCOME
373
373
  });
374
- k(!0);
374
+ B(!0);
375
375
  }, ht = () => {
376
- Mt(M, y);
376
+ Mt(M, _);
377
377
  };
378
- return /* @__PURE__ */ p(w, { children: [
379
- /* @__PURE__ */ p(it, { onChange: ut, value: _, variant: "fullWidth", children: [
378
+ return /* @__PURE__ */ p(L, { children: [
379
+ /* @__PURE__ */ p(it, { onChange: ut, value: v, variant: "fullWidth", children: [
380
380
  /* @__PURE__ */ t(
381
- N,
381
+ $,
382
382
  {
383
383
  label: /* @__PURE__ */ t(
384
- O,
384
+ k,
385
385
  {
386
- amount: B.totalAmount,
386
+ amount: G.totalAmount,
387
387
  label: e.spend_tab_title
388
388
  }
389
389
  )
390
390
  }
391
391
  ),
392
392
  /* @__PURE__ */ t(
393
- N,
393
+ $,
394
394
  {
395
395
  label: /* @__PURE__ */ t(
396
- O,
396
+ k,
397
397
  {
398
398
  amount: P.totalAmount,
399
399
  label: e.income_tab_title
@@ -402,23 +402,23 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
402
402
  }
403
403
  )
404
404
  ] }),
405
- _ === 0 && /* @__PURE__ */ t(
405
+ v === 0 && /* @__PURE__ */ t(
406
406
  nt,
407
407
  {
408
- data: B,
408
+ data: G,
409
409
  onSelected: K,
410
410
  onViewTransactions: U,
411
- selectedId: x,
411
+ selectedId: D,
412
412
  title: e.spend_tab_title
413
413
  }
414
414
  ),
415
- _ === 1 && /* @__PURE__ */ t(
415
+ v === 1 && /* @__PURE__ */ t(
416
416
  nt,
417
417
  {
418
418
  data: P,
419
419
  onSelected: K,
420
420
  onViewTransactions: U,
421
- selectedId: x,
421
+ selectedId: D,
422
422
  title: e.income_tab_title
423
423
  }
424
424
  ),
@@ -427,10 +427,10 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
427
427
  {
428
428
  ariaLabelClose: e.close_drawer_aria,
429
429
  isOpen: pt,
430
- onClose: () => k(!1),
430
+ onClose: () => B(!1),
431
431
  title: e.transactions_drawer_title,
432
- children: /* @__PURE__ */ p(C, { children: [
433
- !d && m.length > 0 && /* @__PURE__ */ t(C, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
432
+ children: /* @__PURE__ */ p(y, { children: [
433
+ !d && h.length > 0 && /* @__PURE__ */ t(y, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
434
434
  St,
435
435
  {
436
436
  onClick: ht,
@@ -447,43 +447,44 @@ const O = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(C,
447
447
  Z,
448
448
  {
449
449
  ariaLabelClose: e.close_drawer_aria,
450
- isOpen: !!G,
450
+ isOpen: !!j,
451
451
  onClose: () => H(""),
452
452
  title: e.transaction_details_drawer_title,
453
- children: G && /* @__PURE__ */ t(xt, { transaction: G })
453
+ children: j && /* @__PURE__ */ t(xt, { transaction: j })
454
454
  }
455
455
  )
456
456
  ] });
457
- }, Bt = L(kt), Gt = ({ onBackClick: n, sx: d = {} }) => {
458
- const { isAccountDataLoaded: o, loadAccountData: a } = lt(), { categoriesLoaded: i, dateRangeTotalsLoaded: g, loadCategories: e, loadDateRangeCategoryTotals: r } = A(), { isTransactionDataLoaded: c, loadTransactionData: b } = ct(), { spending: u } = I(), { displayedDateRange: m, isInitialized: M, setDisplayedDate: y, selectedAccounts: f } = V(), { onEvent: D } = yt(), { clientConfig: x } = F();
457
+ }, Bt = I(kt), Gt = ({ onBackClick: n, onMenuClick: d, sx: o = {} }) => {
458
+ const { isAccountDataLoaded: a, loadAccountData: i } = lt(), { categoriesLoaded: g, dateRangeTotalsLoaded: e, loadCategories: r, loadDateRangeCategoryTotals: c } = W(), { isTransactionDataLoaded: b, loadTransactionData: u } = ct(), { spending: h } = A(), { displayedDateRange: M, isInitialized: _, setDisplayedDate: f, selectedAccounts: x } = z(), { onEvent: D } = yt(), { clientConfig: R } = V();
459
459
  dt({
460
460
  widgetName: "SpendingWidget",
461
- isLoaded: g
461
+ isLoaded: e
462
462
  }), l.useEffect(() => {
463
- const _ = x?.master?.deep_link_params, W = _?.date_range ? [tt(_.date_range.from), tt(_.date_range.to)] : [ot(q()), at(q())];
464
- y(W[0], W[1]), o || a().finally(), i || e().finally(), c || b().finally(), D(et.SPENDING_VIEW);
463
+ const C = R?.master?.deep_link_params, E = C?.date_range ? [tt(C.date_range.from), tt(C.date_range.to)] : [ot(q()), at(q())];
464
+ f(E[0], E[1]), a || i().finally(), g || r().finally(), b || u().finally(), D(et.SPENDING_VIEW);
465
465
  }, []), l.useEffect(() => {
466
- M && r(
467
- f,
468
- m.start,
469
- m.end
466
+ _ && c(
467
+ x,
468
+ M.start,
469
+ M.end
470
470
  ).finally();
471
- }, [m, M, f]);
472
- const E = (_) => {
473
- y(_[0], _[1]);
471
+ }, [M, _, x]);
472
+ const v = (C) => {
473
+ f(C[0], C[1]);
474
474
  };
475
- return M ? /* @__PURE__ */ t(
475
+ return _ ? /* @__PURE__ */ t(
476
476
  It,
477
477
  {
478
- calendarActions: { onRangeChanged: E },
478
+ calendarActions: { onRangeChanged: v },
479
479
  onAccountsFilterClick: () => D(et.SPENDING_CLICK_FILTER),
480
480
  onBackClick: n,
481
- sx: d,
482
- title: u.title,
483
- children: /* @__PURE__ */ t(w, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
481
+ onMenuClick: d,
482
+ sx: o,
483
+ title: h.title,
484
+ children: /* @__PURE__ */ t(L, { width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
484
485
  }
485
486
  ) : /* @__PURE__ */ t(gt, {});
486
- }, Se = L(Gt);
487
+ }, Se = I(Gt);
487
488
  export {
488
489
  Ce as SpendingMiniWidget,
489
490
  Se as SpendingWidget