@mx-cartographer/experiences 7.3.0-alpha.sms1 → 7.3.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 (105) hide show
  1. package/CHANGELOG.md +75 -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-DNSgmdyv.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-CtGTg0XS.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-C4PkIYP6.mjs +48 -0
  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 +328 -304
  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 +3 -3
  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/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  105. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,218 +1,218 @@
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 St } from "react/jsx-runtime";
2
2
  import p from "react";
3
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";
7
- import C from "@mui/material/Stack";
4
+ import { startOfMonth as st } from "date-fns/startOfMonth";
5
+ import { endOfMonth as ct } from "date-fns/endOfMonth";
6
+ import D from "@mui/material/Box";
7
+ import f from "@mui/material/Stack";
8
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";
9
+ import lt from "@mui/material/Tabs";
10
+ import Tt from "@mui/material/styles/useTheme";
11
+ import { b as F } from "../CategoryUtil-BR3H5i6n.mjs";
12
+ import { b as _ } from "../Category-CevNQ03n.mjs";
13
+ import { Text as C, CategoryIcon as Mt, CategoryIconVariants as xt, Icon as Dt } from "@mxenabled/mxui";
14
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";
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";
26
- 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);
37
- 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,
46
- name: e.name,
47
- color: V(e.guid, c),
48
- categoryTotals: [d],
49
- amount: a.total
15
+ import { c as wt, T as vt, a as It } from "../TransactionDetails-BUoNbsu-.mjs";
16
+ import dt from "@mui/material/Button";
17
+ import { useTheme as gt } from "@mui/material";
18
+ import { u as I, b as k, m as P, d as ut, n as Et, a as H, h as At, g as Lt } from "../hooks-Cy8JnjCg.mjs";
19
+ import { u as pt } from "../useScreenSize-B6JyS_Lj.mjs";
20
+ import { D as Nt } from "../Donut-oaQFlbit.mjs";
21
+ import { L as K } from "../Loader-DUaFpDGv.mjs";
22
+ import { M as Wt } from "../MiniWidgetContainer-BdgBvpga.mjs";
23
+ import { startOfToday as tt } from "date-fns/startOfToday";
24
+ import { e as Ot } from "../exportTransactionsToCSV-C4PkIYP6.mjs";
25
+ import kt from "@mui/material/Collapse";
26
+ import V from "@mui/material/Divider";
27
+ import et from "@mui/material/List";
28
+ import nt from "@mui/material/ListItem";
29
+ import Rt from "@mui/material/ListItemButton";
30
+ import { D as ot } from "../Drawer-kEE73B87.mjs";
31
+ import { A as at, W as $t } from "../WidgetContainer-BnTgAfQn.mjs";
32
+ const z = 5, Gt = (n, d, s) => s.reduce((l, e) => {
33
+ if (e.total > 0) {
34
+ const a = n.find((r) => r.guid === e.category_guid);
35
+ if (!a) return l;
36
+ const i = a.parent_guid ?? a.guid, o = n.find((r) => r.guid === i);
37
+ if (!o) return l;
38
+ const c = {
39
+ guid: a.guid,
40
+ name: a.guid === i ? `General ${a.name}` : a.name,
41
+ color: F(o.guid, d),
42
+ amount: e.total
43
+ }, u = l.find((r) => r.guid === i);
44
+ u ? (u.amount += e.total, u.categoryTotals?.push(c)) : l.push({
45
+ guid: i,
46
+ name: o.name,
47
+ color: F(o.guid, d),
48
+ categoryTotals: [c],
49
+ amount: e.total
50
50
  });
51
51
  }
52
52
  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(
57
- (s, m) => s + m.amount,
53
+ }, []), mt = (n, d, s, l) => {
54
+ const e = Gt(n, s, l), a = e.filter(
55
+ (r) => r.guid !== _.INCOME && r.guid !== _.INVESTMENTS && r.guid !== _.TRANSFER
56
+ ).sort((r, m) => m.amount - r.amount), i = a.reduce(
57
+ (r, m) => r + m.amount,
58
58
  0
59
- ), e = i.length > j ? j : i.length, d = i.slice(0, e), u = d.map((s) => ({
60
- id: s.guid,
61
- color: V(s.guid, r),
62
- label: s.name,
63
- value: s.amount / o * 100
59
+ ), o = a.length > z ? z : a.length, c = a.slice(0, o), u = c.map((r) => ({
60
+ id: r.guid,
61
+ color: F(r.guid, s),
62
+ label: r.name,
63
+ value: r.amount / i * 100
64
64
  }));
65
- if (i.length > 5) {
66
- const s = i.slice(j, a.length), m = s.reduce(
67
- (T, g) => T + g.amount,
65
+ if (a.length > 5) {
66
+ const r = a.slice(z, e.length), m = r.reduce(
67
+ (M, g) => M + g.amount,
68
68
  0
69
69
  );
70
- d.push({
70
+ c.push({
71
71
  guid: "other",
72
- color: r.palette.categories.others || "",
73
- name: c.saving_goal_other,
74
- categoryTotals: s,
72
+ color: s.palette.categories.others || "",
73
+ name: d.saving_goal_other,
74
+ categoryTotals: r,
75
75
  amount: m
76
76
  }), u.push({
77
77
  id: "other",
78
- color: r.palette.categories.others || "",
79
- label: c.saving_goal_other,
80
- value: m / o * 100
78
+ color: s.palette.categories.others || "",
79
+ label: d.saving_goal_other,
80
+ value: m / i * 100
81
81
  });
82
82
  }
83
83
  return {
84
- categoryData: d,
84
+ categoryData: c,
85
85
  donutData: u,
86
- totalAmount: o
86
+ totalAmount: i
87
87
  };
88
- }, dt = (n, c, r) => {
88
+ }, ht = (n, d, s) => {
89
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) => ({
92
- guid: e.category_guid,
93
- name: n.find((u) => u.guid === e.category_guid)?.name,
94
- color: r[d],
90
+ (o) => o.guid === _.INCOME || o.parent_guid === _.INCOME
91
+ ), e = d.filter((o) => l.some((c) => c.guid === o.category_guid)).sort((o, c) => o.total - c.total).map((o, c) => ({
92
+ guid: o.category_guid,
93
+ name: n.find((u) => u.guid === o.category_guid)?.name,
94
+ color: s[c],
95
95
  categoryTotals: [],
96
- amount: Math.abs(e.total)
97
- })), i = a.reduce(
98
- (e, d) => e + d.amount,
96
+ amount: Math.abs(o.total)
97
+ })), a = e.reduce(
98
+ (o, c) => o + c.amount,
99
99
  0
100
- ), o = a.map((e) => ({
101
- id: e.guid,
102
- color: e.color,
103
- label: e.name,
104
- value: e.amount / i * 100
100
+ ), i = e.map((o) => ({
101
+ id: o.guid,
102
+ color: o.color,
103
+ label: o.name,
104
+ value: o.amount / a * 100
105
105
  }));
106
106
  return {
107
- categoryData: a,
108
- donutData: o,
109
- totalAmount: i
107
+ categoryData: e,
108
+ donutData: i,
109
+ totalAmount: a
110
110
  };
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 = ({
111
+ }, W = ({ amount: n, label: d }) => /* @__PURE__ */ h(f, { direction: "column", children: [
112
+ /* @__PURE__ */ t(C, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
113
+ /* @__PURE__ */ t(C, { variant: "XSmall", children: w(n, "0,0") })
114
+ ] }), jt = ({
115
115
  data: n,
116
- isIncome: c = !1,
117
- onSelected: r,
116
+ isIncome: d = !1,
117
+ onSelected: s,
118
118
  onViewTransactions: l,
119
- selectedId: a,
120
- size: i = 150,
121
- totalLabel: o,
122
- variant: e = "mini"
119
+ selectedId: e,
120
+ size: a = 150,
121
+ totalLabel: i,
122
+ variant: o = "mini"
123
123
  }) => {
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]
124
+ const { spending: c } = I(), u = gt(), { isTablet: r } = pt(), { announce: m, ariaLive: M } = wt(), g = p.useMemo(
125
+ () => e ? n.categoryData.find((S) => S.guid === e) : void 0,
126
+ [e]
127
127
  );
128
128
  p.useEffect(() => {
129
129
  if (g) {
130
- const D = w(g.amount, "0,0");
131
- m(`${g.name}: ${D}`);
130
+ const S = w(g.amount, "0,0");
131
+ m(`${g.name}: ${S}`);
132
132
  }
133
133
  }, [g, m]);
134
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: [
135
+ l?.(e);
136
+ }, x = r ? 32 : 48;
137
+ return /* @__PURE__ */ h(St, { children: [
138
+ M,
139
+ /* @__PURE__ */ t(Nt, { data: b, onClick: s, selectedId: e, size: a, children: /* @__PURE__ */ t(f, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ h(f, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: [
140
140
  g && /* @__PURE__ */ h(
141
- C,
141
+ f,
142
142
  {
143
143
  alignItems: "center",
144
- gap: e === "mini" ? 0 : 8,
145
- mb: e === "mini" ? 0 : 8,
146
- mt: e === "mini" ? 0 : -16,
147
- sx: e === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
144
+ gap: o === "mini" ? 0 : 8,
145
+ mb: o === "mini" ? 0 : 8,
146
+ mt: o === "mini" ? 0 : -16,
147
+ sx: o === "mini" ? { gap: 0, mb: 0 } : { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } },
148
148
  children: [
149
149
  /* @__PURE__ */ t(
150
- ft,
150
+ Mt,
151
151
  {
152
- categoryGuid: c ? S.INCOME : g.guid,
153
- size: e === "mini" ? 24 : _,
154
- variant: yt.Transparent
152
+ categoryGuid: d ? _.INCOME : g.guid,
153
+ size: o === "mini" ? 24 : x,
154
+ variant: xt.Transparent
155
155
  }
156
156
  ),
157
157
  /* @__PURE__ */ t(
158
- y,
158
+ C,
159
159
  {
160
160
  color: "secondary",
161
161
  noWrap: !0,
162
- variant: e === "mini" ? "Tiny" : "Body",
163
- children: g ? g.name : o
162
+ variant: o === "mini" ? "Tiny" : "Body",
163
+ children: g ? g.name : i
164
164
  }
165
165
  )
166
166
  ]
167
167
  }
168
168
  ),
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 }),
172
- e === "full" && /* @__PURE__ */ t(
173
- Ct,
169
+ !g && o === "full" && /* @__PURE__ */ t(C, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: i }),
170
+ /* @__PURE__ */ t(C, { variant: o === "mini" ? "H2" : "H1", children: g ? w(g.amount, "0,0") : w(n.totalAmount, "0,0") }),
171
+ !g && o === "mini" && /* @__PURE__ */ t(C, { color: "secondary", noWrap: !0, variant: "Tiny", children: i }),
172
+ o === "full" && /* @__PURE__ */ t(
173
+ dt,
174
174
  {
175
175
  "aria-label": `View ${g?.name || ""} Transactions`,
176
176
  disabled: n.categoryData.length === 0,
177
177
  onClick: E,
178
178
  sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
179
179
  variant: "text",
180
- children: d.view_transactions
180
+ children: c.view_transactions
181
181
  }
182
182
  )
183
183
  ] }) }) })
184
184
  ] });
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));
185
+ }, O = v(jt), it = ({ data: n, onSelected: d, selectedId: s }) => {
186
+ const l = (e, a) => {
187
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d(a));
188
188
  };
189
- return /* @__PURE__ */ t(C, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((a) => /* @__PURE__ */ h(
190
- C,
189
+ return /* @__PURE__ */ t(f, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((e) => /* @__PURE__ */ h(
190
+ f,
191
191
  {
192
192
  alignItems: "center",
193
- "aria-label": a.name,
194
- "aria-pressed": a.guid === r,
193
+ "aria-label": e.name,
194
+ "aria-pressed": e.guid === s,
195
195
  direction: "row",
196
196
  gap: 8,
197
- onClick: () => c(a.guid),
198
- onKeyDown: (i) => l(i, a.guid),
197
+ onClick: () => d(e.guid),
198
+ onKeyDown: (a) => l(a, e.guid),
199
199
  role: "button",
200
200
  sx: { cursor: "pointer" },
201
201
  tabIndex: 0,
202
202
  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 })
203
+ /* @__PURE__ */ t(D, { borderRadius: 4, height: 8, sx: { backgroundColor: e.color }, width: 8 }),
204
+ /* @__PURE__ */ t(C, { bold: e.guid === s, variant: "XSmall", children: e.name })
205
205
  ]
206
206
  },
207
- a.guid
207
+ e.guid
208
208
  )) });
209
- }, Lt = () => {
210
- const n = ht(), { goals: c, spending: r } = I(), { selectedAccounts: l } = R(), {
211
- categories: a,
212
- dateRangeCategoryTotals: i,
213
- dataRangeTotalsLoaded: o,
214
- loadDateRangeCategoryTotals: e
215
- } = z(), d = p.useMemo(
209
+ }, Bt = () => {
210
+ const n = Tt(), { goals: d, spending: s } = I(), { selectedAccounts: l } = k(), {
211
+ categories: e,
212
+ dateRangeCategoryTotals: a,
213
+ dataRangeTotalsLoaded: i,
214
+ loadDateRangeCategoryTotals: o
215
+ } = P(), c = p.useMemo(
216
216
  () => [
217
217
  n.palette.chartMono.chartMono5,
218
218
  n.palette.chartMono.chartMono4,
@@ -224,28 +224,28 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
224
224
  [n]
225
225
  );
226
226
  p.useEffect(() => {
227
- e(
227
+ o(
228
228
  l,
229
- nt(/* @__PURE__ */ new Date()),
230
- ot(/* @__PURE__ */ new Date())
229
+ st(/* @__PURE__ */ new Date()),
230
+ ct(/* @__PURE__ */ new Date())
231
231
  ).finally();
232
232
  }, [l]);
233
- const [u, s] = p.useState(""), [m, T] = p.useState(0), g = p.useMemo(
234
- () => ct(a, c, n, i),
235
- [a, i]
233
+ const [u, r] = p.useState(""), [m, M] = p.useState(0), g = p.useMemo(
234
+ () => mt(e, d, n, a),
235
+ [e, a]
236
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);
237
+ () => ht(e, a, c),
238
+ [e, a, c]
239
+ ), E = (S, R) => {
240
+ M(R), r("");
241
+ }, x = (S) => {
242
+ r(u === S ? "" : S);
243
243
  };
244
- return o ? /* @__PURE__ */ h(x, { width: "100%", children: [
244
+ return i ? /* @__PURE__ */ h(D, { width: "100%", children: [
245
245
  /* @__PURE__ */ h(
246
- at,
246
+ lt,
247
247
  {
248
- "aria-label": r.mini_title,
248
+ "aria-label": s.mini_title,
249
249
  onChange: E,
250
250
  value: m,
251
251
  variant: "fullWidth",
@@ -259,7 +259,7 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
259
259
  W,
260
260
  {
261
261
  amount: g.totalAmount,
262
- label: r.spend_tab_title
262
+ label: s.spend_tab_title
263
263
  }
264
264
  ),
265
265
  tabIndex: m === 0 ? 0 : -1
@@ -274,7 +274,7 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
274
274
  W,
275
275
  {
276
276
  amount: b.totalAmount,
277
- label: r.income_tab_title
277
+ label: s.income_tab_title
278
278
  }
279
279
  ),
280
280
  tabIndex: m === 1 ? 0 : -1
@@ -284,77 +284,77 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
284
284
  }
285
285
  ),
286
286
  /* @__PURE__ */ t(
287
- x,
287
+ D,
288
288
  {
289
289
  "aria-labelledby": "spending-tab",
290
290
  hidden: m !== 0,
291
291
  id: "spending-tabpanel",
292
292
  role: "tabpanel",
293
- children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
293
+ children: /* @__PURE__ */ h(f, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
294
294
  /* @__PURE__ */ t(
295
295
  O,
296
296
  {
297
297
  data: g,
298
- onSelected: _,
298
+ onSelected: x,
299
299
  selectedId: u,
300
- totalLabel: r.total_spending
300
+ totalLabel: s.total_spending
301
301
  }
302
302
  ),
303
- /* @__PURE__ */ t(tt, { data: g, onSelected: _, selectedId: u })
303
+ /* @__PURE__ */ t(it, { data: g, onSelected: x, selectedId: u })
304
304
  ] })
305
305
  }
306
306
  ),
307
307
  /* @__PURE__ */ t(
308
- x,
308
+ D,
309
309
  {
310
310
  "aria-labelledby": "income-tab",
311
311
  hidden: m !== 1,
312
312
  id: "income-tabpanel",
313
313
  role: "tabpanel",
314
- children: /* @__PURE__ */ h(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
314
+ children: /* @__PURE__ */ h(f, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
315
315
  /* @__PURE__ */ t(
316
316
  O,
317
317
  {
318
318
  data: b,
319
319
  isIncome: !0,
320
- onSelected: _,
320
+ onSelected: x,
321
321
  selectedId: u,
322
- totalLabel: r.total_income
322
+ totalLabel: s.total_income
323
323
  }
324
324
  ),
325
- /* @__PURE__ */ t(tt, { data: b, onSelected: _, selectedId: u })
325
+ /* @__PURE__ */ t(it, { data: b, onSelected: x, selectedId: u })
326
326
  ] })
327
327
  }
328
328
  )
329
- ] }) : /* @__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
+ ] }) : /* @__PURE__ */ t(K, { height: 250 });
330
+ }, Vt = v(Bt), zt = ({ onPrimaryCtaClick: n, sx: d = {} }) => {
331
+ const { visibleAccounts: s } = ut(), { spending: l } = I(), { isCopyLoaded: e, isInitialized: a, setSelectedAccounts: i } = k();
332
332
  return p.useEffect(() => {
333
- o(r);
334
- }, [r]), !a || !i ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
335
- Mt,
333
+ i(s);
334
+ }, [s]), !e || !a ? /* @__PURE__ */ t(K, {}) : /* @__PURE__ */ t(
335
+ Wt,
336
336
  {
337
337
  className: "mx-exp-spending-miniwidget",
338
338
  onPrimaryCtaClick: n,
339
339
  primaryCtaLabel: l.primary_cta,
340
- sx: c,
340
+ sx: d,
341
341
  title: l.mini_title,
342
- children: /* @__PURE__ */ t(Nt, {})
342
+ children: /* @__PURE__ */ t(Vt, {})
343
343
  }
344
344
  );
345
- }, be = v(Wt), Ot = ({
345
+ }, ve = v(zt), Ft = ({
346
346
  data: n,
347
- onSelected: c,
348
- selectedId: r = "",
347
+ onSelected: d,
348
+ selectedId: s = "",
349
349
  title: l
350
350
  }) => {
351
- const { spending: a } = I(), i = n.categoryData.find((o) => o.guid === r);
352
- 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}` }),
354
- /* @__PURE__ */ t(B, { "aria-hidden": "true" }),
355
- /* @__PURE__ */ t(q, { children: n.categoryData.map((o) => /* @__PURE__ */ h(p.Fragment, { children: [
351
+ const { spending: e } = I(), a = n.categoryData.find((i) => i.guid === s);
352
+ return /* @__PURE__ */ h(f, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
353
+ /* @__PURE__ */ t(C, { bold: !0, sx: { py: 12 }, children: `${l} ${e.by_category}` }),
354
+ /* @__PURE__ */ t(V, { "aria-hidden": "true" }),
355
+ /* @__PURE__ */ t(et, { children: n.categoryData.map((i) => /* @__PURE__ */ h(p.Fragment, { children: [
356
356
  /* @__PURE__ */ t(
357
- J,
357
+ nt,
358
358
  {
359
359
  disableGutters: !0,
360
360
  disablePadding: !0,
@@ -362,32 +362,32 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
362
362
  minHeight: 44
363
363
  },
364
364
  children: /* @__PURE__ */ h(
365
- vt,
365
+ Rt,
366
366
  {
367
- "aria-expanded": i?.guid === o.guid,
368
- onClick: () => c(o.guid),
367
+ "aria-expanded": a?.guid === i.guid,
368
+ onClick: () => d(i.guid),
369
369
  sx: { minHeight: 44, px: 8, py: 0 },
370
370
  children: [
371
371
  /* @__PURE__ */ t(
372
- x,
372
+ D,
373
373
  {
374
374
  borderRadius: 4,
375
375
  flexShrink: 0,
376
376
  height: 8,
377
- sx: { backgroundColor: o.color, mr: 8 },
377
+ sx: { backgroundColor: i.color, mr: 8 },
378
378
  width: 8
379
379
  }
380
380
  ),
381
381
  /* @__PURE__ */ h(
382
- C,
382
+ f,
383
383
  {
384
384
  alignItems: "center",
385
385
  direction: "row",
386
386
  justifyContent: "space-between",
387
387
  width: "100%",
388
388
  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") })
389
+ /* @__PURE__ */ t(C, { bold: s === i.guid, children: i.name }),
390
+ /* @__PURE__ */ t(C, { bold: s === i.guid, variant: "Body", children: w(i.amount, "0,0") })
391
391
  ]
392
392
  }
393
393
  )
@@ -396,50 +396,50 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
396
396
  )
397
397
  }
398
398
  ),
399
- /* @__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
+ /* @__PURE__ */ t(V, {}),
400
+ i.categoryTotals && i.categoryTotals.length > 0 && /* @__PURE__ */ t(kt, { in: a?.guid === i.guid, unmountOnExit: !0, children: /* @__PURE__ */ h(et, { children: [
401
+ a?.categoryTotals?.map((o) => /* @__PURE__ */ t(
402
+ nt,
403
403
  {
404
404
  sx: {
405
405
  pl: 24,
406
406
  pr: 8,
407
407
  py: 0
408
408
  },
409
- children: /* @__PURE__ */ h(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
410
- /* @__PURE__ */ h(y, { children: [
411
- e.name,
409
+ children: /* @__PURE__ */ h(f, { direction: "row", justifyContent: "space-between", width: "100%", children: [
410
+ /* @__PURE__ */ h(C, { children: [
411
+ o.name,
412
412
  " "
413
413
  ] }),
414
- /* @__PURE__ */ t(y, { children: w(e.amount, "0,0") })
414
+ /* @__PURE__ */ t(C, { children: w(o.amount, "0,0") })
415
415
  ] })
416
416
  },
417
- e.guid
417
+ o.guid
418
418
  )),
419
- /* @__PURE__ */ t(B, {})
419
+ /* @__PURE__ */ t(V, {})
420
420
  ] }) })
421
- ] }, o.guid)) }),
422
- /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${a.total}: ${w(n.totalAmount, "0,0")}` })
421
+ ] }, i.guid)) }),
422
+ /* @__PURE__ */ t(C, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${e.total}: ${w(n.totalAmount, "0,0")}` })
423
423
  ] });
424
- }, Rt = v(Ot), kt = ({
424
+ }, Ht = v(Ft), Pt = ({
425
425
  data: n,
426
- onSelected: c,
427
- onViewTransactions: r,
426
+ onSelected: d,
427
+ onViewTransactions: s,
428
428
  selectedId: l,
429
- title: a
429
+ title: e
430
430
  }) => {
431
- const { isDesktop: i, isMobile: o } = lt(), { isLoadingCategoryTotals: e } = z(), { spending: d } = I();
431
+ const { isDesktop: a, isMobile: i } = pt(), { isLoadingCategoryTotals: o } = P(), { spending: c } = I();
432
432
  return /* @__PURE__ */ h(
433
- C,
433
+ f,
434
434
  {
435
- alignItems: o ? "center" : "flex-start",
436
- direction: o ? "column" : "row",
435
+ alignItems: i ? "center" : "flex-start",
436
+ direction: i ? "column" : "row",
437
437
  gap: { xs: 16, md: 64, xl: 100 },
438
438
  justifyContent: "center",
439
439
  pt: 50,
440
440
  px: 8,
441
441
  children: [
442
- e && /* @__PURE__ */ t(
442
+ o && /* @__PURE__ */ t(
443
443
  O,
444
444
  {
445
445
  data: {
@@ -450,91 +450,104 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
450
450
  onSelected: () => {
451
451
  },
452
452
  selectedId: "",
453
- size: i ? 400 : 300,
453
+ size: a ? 400 : 300,
454
454
  totalLabel: "Loading ...",
455
455
  variant: "full"
456
456
  }
457
457
  ),
458
- !e && /* @__PURE__ */ t(
458
+ !o && /* @__PURE__ */ t(
459
459
  O,
460
460
  {
461
461
  data: n,
462
- onSelected: c,
463
- onViewTransactions: r,
462
+ onSelected: d,
463
+ onViewTransactions: s,
464
464
  selectedId: l,
465
- size: i ? 400 : 300,
466
- totalLabel: d.total_amount,
465
+ size: a ? 400 : 300,
466
+ totalLabel: c.total_amount,
467
467
  variant: "full"
468
468
  }
469
469
  ),
470
- /* @__PURE__ */ t(Rt, { data: n, onSelected: c, selectedId: l, title: a })
470
+ /* @__PURE__ */ t(Ht, { data: n, onSelected: d, selectedId: l, title: e })
471
471
  ]
472
472
  }
473
473
  );
474
- }, et = v(kt), $t = (n) => [
474
+ }, rt = v(Pt), Kt = (n) => [
475
475
  n.palette.chartMono.chartMono5,
476
476
  n.palette.chartMono.chartMono4,
477
477
  n.palette.chartMono.chartMono3,
478
478
  n.palette.chartMono.chartMono2,
479
479
  n.palette.chartMono.chartMono1,
480
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);
481
+ ], Xt = () => {
482
+ const n = gt(), { onLoad: d } = Et(), { is_mobile_webview: s } = H(), { clientConfig: l } = H(), { categories: e, dateRangeCategoryTotals: a, loadDateRangeCategoryTotals: i } = P(), {
483
+ goals: o,
484
+ spending: c,
485
+ transactions: u
486
+ } = I(), { displayedDateRange: r, selectedAccounts: m, selectedAccountGuids: M } = k(), {
487
+ setFilter: g,
488
+ sortedTransactions: b,
489
+ sortedTransactionsWithSplits: E,
490
+ tags: x
491
+ } = At(), S = l?.master?.deep_link_params?.account_guids, R = l?.master?.deep_link_params?.view, [$, X] = p.useState(""), [L, ft] = p.useState(R === "income" ? 1 : 0), [Y, U] = p.useState(""), [yt, q] = p.useState(!1);
483
492
  p.useEffect(() => {
484
- a(
485
- d,
486
- e.start,
487
- e.end
488
- ).finally();
489
- }, [d, e]);
490
- 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]
496
- ), $ = 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);
503
- }, Y = (f) => {
493
+ i(
494
+ m,
495
+ r.start,
496
+ r.end
497
+ ).finally(() => {
498
+ d?.("SpendingWidget");
499
+ });
500
+ }, [m, r]);
501
+ const G = p.useMemo(
502
+ () => mt(e, o, n, a),
503
+ [e, a]
504
+ ), J = p.useMemo(
505
+ () => ht(e, a, Kt(n)),
506
+ [e, a]
507
+ ), j = p.useMemo(
508
+ () => b.find((y) => y.guid === Y),
509
+ [Y, b]
510
+ ), Ct = (y, A) => {
511
+ ft(A), X("");
512
+ }, Q = (y) => {
513
+ X($ === y || y === "0" ? "" : y);
514
+ }, Z = (y) => {
504
515
  const A = {
505
- accounts: T || u,
506
- dateRange: e
516
+ accounts: S || M,
517
+ dateRange: r
507
518
  };
508
- if (_ === 0)
509
- if (f === "other") {
510
- const M = k.categoryData.find((G) => G.guid === "other");
511
- s({
519
+ if (L === 0)
520
+ if (y === "other") {
521
+ const T = G.categoryData.find((B) => B.guid === "other");
522
+ g({
512
523
  ...A,
513
- custom: (G) => !!M?.categoryTotals?.find((pt) => pt.guid === G.top_level_category_guid)
524
+ custom: (B) => !!T?.categoryTotals?.find((_t) => _t.guid === B.top_level_category_guid)
514
525
  });
515
526
  } else
516
- s({
527
+ g({
517
528
  ...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
- showSplits: !!f
529
+ custom: (T) => y ? T.top_level_category_guid === y : T.top_level_category_guid !== _.INCOME && T.top_level_category_guid !== _.INVESTMENTS && T.top_level_category_guid !== _.TRANSFER,
530
+ showSplits: !!y
520
531
  });
521
532
  else
522
- s({
533
+ g({
523
534
  ...A,
524
- custom: (M) => f ? M.category_guid === f : M.category_guid === S.INCOME || M.top_level_category_guid === S.INCOME
535
+ custom: (T) => y ? T.category_guid === y : T.category_guid === _.INCOME || T.top_level_category_guid === _.INCOME
525
536
  });
526
- P(!0);
537
+ q(!0);
538
+ }, bt = () => {
539
+ Ot(E, x);
527
540
  };
528
- return /* @__PURE__ */ h(x, { children: [
529
- /* @__PURE__ */ h(at, { onChange: ut, value: _, variant: "fullWidth", children: [
541
+ return /* @__PURE__ */ h(D, { children: [
542
+ /* @__PURE__ */ h(lt, { onChange: Ct, value: L, variant: "fullWidth", children: [
530
543
  /* @__PURE__ */ t(
531
544
  N,
532
545
  {
533
546
  label: /* @__PURE__ */ t(
534
547
  W,
535
548
  {
536
- amount: k.totalAmount,
537
- label: o.spend_tab_title
549
+ amount: G.totalAmount,
550
+ label: c.spend_tab_title
538
551
  }
539
552
  )
540
553
  }
@@ -545,78 +558,89 @@ const j = 5, Et = (n, c, r) => r.reduce((l, a) => {
545
558
  label: /* @__PURE__ */ t(
546
559
  W,
547
560
  {
548
- amount: K.totalAmount,
549
- label: o.income_tab_title
561
+ amount: J.totalAmount,
562
+ label: c.income_tab_title
550
563
  }
551
564
  )
552
565
  }
553
566
  )
554
567
  ] }),
555
- _ === 0 && /* @__PURE__ */ t(
556
- et,
568
+ L === 0 && /* @__PURE__ */ t(
569
+ rt,
557
570
  {
558
- data: k,
559
- onSelected: X,
560
- onViewTransactions: Y,
561
- selectedId: b,
562
- title: o.spend_tab_title
571
+ data: G,
572
+ onSelected: Q,
573
+ onViewTransactions: Z,
574
+ selectedId: $,
575
+ title: c.spend_tab_title
563
576
  }
564
577
  ),
565
- _ === 1 && /* @__PURE__ */ t(
566
- et,
578
+ L === 1 && /* @__PURE__ */ t(
579
+ rt,
567
580
  {
568
- data: K,
569
- onSelected: X,
570
- onViewTransactions: Y,
571
- selectedId: b,
572
- title: o.income_tab_title
581
+ data: J,
582
+ onSelected: Q,
583
+ onViewTransactions: Z,
584
+ selectedId: $,
585
+ title: c.income_tab_title
573
586
  }
574
587
  ),
575
588
  /* @__PURE__ */ t(
576
- Q,
589
+ ot,
577
590
  {
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 })
591
+ ariaLabelClose: c.close_drawer_aria,
592
+ isOpen: yt,
593
+ onClose: () => q(!1),
594
+ title: c.transactions_drawer_title,
595
+ children: /* @__PURE__ */ h(f, { children: [
596
+ !s && b.length > 0 && /* @__PURE__ */ t(f, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ t(
597
+ dt,
598
+ {
599
+ onClick: bt,
600
+ startIcon: /* @__PURE__ */ t(Dt, { name: "ios_share" }),
601
+ variant: "text",
602
+ children: u.export_csv_btn
603
+ }
604
+ ) }),
605
+ /* @__PURE__ */ t(vt, { onClick: U })
606
+ ] })
583
607
  }
584
608
  ),
585
609
  /* @__PURE__ */ t(
586
- Q,
610
+ ot,
587
611
  {
588
- ariaLabelClose: o.close_drawer_aria,
589
- isOpen: !!$,
590
- onClose: () => H(""),
591
- title: o.transaction_details_drawer_title,
592
- children: $ && /* @__PURE__ */ t(xt, { transaction: $ })
612
+ ariaLabelClose: c.close_drawer_aria,
613
+ isOpen: !!j,
614
+ onClose: () => U(""),
615
+ title: c.transaction_details_drawer_title,
616
+ children: j && /* @__PURE__ */ t(It, { transaction: j })
593
617
  }
594
618
  )
595
619
  ] });
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);
620
+ }, Yt = v(Xt), Ut = ({ onBackClick: n, sx: d = {} }) => {
621
+ const { visibleAccounts: s } = ut(), { spending: l } = I(), { isCopyLoaded: e, isInitialized: a, setDisplayedDate: i, setSelectedAccounts: o } = k(), { onEvent: c } = Lt(), { clientConfig: u } = H(), r = u?.master?.deep_link_params?.date_range, [m, M] = p.useState(!1);
598
622
  p.useEffect(() => {
599
- e(r);
600
- }, [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);
623
+ o(s);
624
+ }, [s]), p.useEffect(() => {
625
+ r && Array.isArray(r) && r.length === 2 ? i(r[0], r[1]) : i(st(tt()), ct(tt())), M(!0), c(at.SPENDING_VIEW);
602
626
  }, []);
603
627
  const g = (b) => {
604
- o(b[0], b[1]);
628
+ i(b[0], b[1]);
605
629
  };
606
- return !a || !i || !m ? /* @__PURE__ */ t(F, {}) : /* @__PURE__ */ t(
607
- It,
630
+ return !e || !a || !m ? /* @__PURE__ */ t(K, {}) : /* @__PURE__ */ t(
631
+ $t,
608
632
  {
609
- accountOptions: r,
633
+ accountOptions: s,
610
634
  calendarActions: { onRangeChanged: g },
611
- onAccountsFilterClick: () => d(Z.SPENDING_CLICK_FILTER),
635
+ onAccountsFilterClick: () => c(at.SPENDING_CLICK_FILTER),
612
636
  onBackClick: n,
613
- sx: c,
637
+ sx: d,
614
638
  title: l.title,
615
- children: /* @__PURE__ */ t(x, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Bt, {}) })
639
+ children: /* @__PURE__ */ t(D, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Yt, {}) })
616
640
  }
617
641
  );
618
- }, Ce = v(jt);
642
+ }, Ie = v(Ut);
619
643
  export {
620
- be as SpendingMiniWidget,
621
- Ce as SpendingWidget
644
+ ve as SpendingMiniWidget,
645
+ Ie as SpendingWidget
622
646
  };