@mx-cartographer/experiences 7.3.3-alpha.mega1 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-YwUMFz93.mjs → Account-01wOyrH1.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-BgCST7mK.mjs → AccountDetailsContent-gke-5zMF.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-jAFWoHj7.mjs → AccountDetailsHeader-CRzfuFA2.mjs} +7 -7
  5. package/dist/{AccountFields-DPxMPBF0.mjs → AccountFields-CPkGZ3SD.mjs} +5 -5
  6. package/dist/{AccountListItem-D6rWAreC.mjs → AccountListItem-D4uG9yC-.mjs} +4 -4
  7. package/dist/{AccountStore-B5E98oM1.mjs → AccountStore-C1zMBzHq.mjs} +40 -29
  8. package/dist/{Accounts-UIlYCmHb.mjs → Accounts-D7QljYas.mjs} +1 -1
  9. package/dist/{BudgetUtil-CXvenbdN.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-Buy70Y3V.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +3 -3
  11. package/dist/{CategoryStore-BEdFs69_.mjs → CategoryStore-U7hOZAbP.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-CbxHKlRv.mjs → ConnectDrawer-CuUj16NH.mjs} +2 -2
  14. package/dist/{ConnectionsDrawer-C6kanU7I.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +3 -3
  15. package/dist/{CurrencyInput-lSC7oPDg.mjs → CurrencyInput-xH-hqry9.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-DgIcphe_.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Drawer-BEtCk82g.mjs +163 -0
  20. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  21. package/dist/{ExportCsvAction-DNSgmdyv.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  22. package/dist/FinstrongStore-CfD6bbJk.mjs +441 -0
  23. package/dist/{GoalStore-CAlmSu4U.mjs → GoalStore-j6QYHgEa.mjs} +3 -3
  24. package/dist/{Help-hi9I9EYP.mjs → Help-BnPXM_N2.mjs} +2 -2
  25. package/dist/LineChart-DttMO7uS.mjs +581 -0
  26. package/dist/{ListItemAction-BmL5buOf.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  27. package/dist/{ManageIncome-Cypo9qY4.mjs → ManageIncome-CU5C0AeO.mjs} +97 -95
  28. package/dist/{MicroWidgetContainer-CFdMGJKg.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  29. package/dist/{MiniWidgetContainer-BdgBvpga.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  30. package/dist/{NetWorthStore-CxqIxAgN.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
  31. package/dist/{NotificationSettings-DxytNHlN.mjs → NotificationSettings-DI5B1spM.mjs} +5 -5
  32. package/dist/{OriginalBalanceAction-V6FEoIDe.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
  33. package/dist/{RecurringSettings-iIupYxJW.mjs → RecurringSettings-Cm5Bqcai.mjs} +4 -4
  34. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  35. package/dist/{RecurringTransactionsStore-BiwCzScZ.mjs → RecurringTransactionsStore-Bc1wCiNB.mjs} +1 -1
  36. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  37. package/dist/SpendingLegend-B2BYr8B4.mjs +193 -0
  38. package/dist/{TransactionDetails-BUoNbsu-.mjs → TransactionDetails-CtbBBSoU.mjs} +396 -386
  39. package/dist/{TransactionStore-CtGTg0XS.mjs → TransactionStore-Dz-G8Wd0.mjs} +3 -3
  40. package/dist/{TrendsStore-5PvDT_o6.mjs → TrendsStore-BW9FGQeE.mjs} +1 -1
  41. package/dist/{User-Bj34_i8g.mjs → User-wXzDI4M8.mjs} +2 -2
  42. package/dist/{WidgetContainer-BnTgAfQn.mjs → WidgetContainer-6dsjtOVg.mjs} +4 -4
  43. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  44. package/dist/accounts/index.es.js +17 -17
  45. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  46. package/dist/analytics/index.es.js +2 -2
  47. package/dist/budgets/index.es.js +13 -13
  48. package/dist/cashflow/index.es.js +49 -49
  49. package/dist/categories/index.es.js +2 -2
  50. package/dist/common/components/Select.d.ts +4 -2
  51. package/dist/common/components/charts/LineChart.d.ts +12 -2
  52. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  53. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  54. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  55. package/dist/common/components/drawer/Footer.d.ts +17 -0
  56. package/dist/common/index.es.js +33 -33
  57. package/dist/common/types/Finstrong.d.ts +54 -0
  58. package/dist/common/types/Widgets.d.ts +1 -0
  59. package/dist/common/types/index.d.ts +1 -1
  60. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  61. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  62. package/dist/dashboard/index.es.js +2 -2
  63. package/dist/debts/index.es.js +11 -11
  64. package/dist/{exportTransactionsToCSV-C4PkIYP6.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +2 -2
  65. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  66. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  67. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  68. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  69. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  70. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  71. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  72. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  73. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  74. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  75. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  76. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  77. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  78. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  79. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  80. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  81. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  82. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  83. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  84. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  85. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  86. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  87. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  88. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  89. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  90. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  91. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  92. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  93. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  94. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  95. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  96. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  97. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  98. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  99. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  100. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  101. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  102. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  103. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  104. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  105. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  106. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  107. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  108. package/dist/finstrong/constants/index.d.ts +20 -0
  109. package/dist/finstrong/index.es.js +3174 -1069
  110. package/dist/finstrong/stores/FinstrongStore.d.ts +21 -2
  111. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  112. package/dist/goals/index.es.js +15 -15
  113. package/dist/help/index.es.js +3 -3
  114. package/dist/{hooks-Cy8JnjCg.mjs → hooks-C41HAxM5.mjs} +4 -4
  115. package/dist/investments/index.es.js +5 -5
  116. package/dist/merchants/index.es.js +1 -1
  117. package/dist/networth/index.es.js +33 -33
  118. package/dist/notifications/index.es.js +4 -4
  119. package/dist/recurringtransactions/index.es.js +43 -43
  120. package/dist/settings/index.es.js +8 -8
  121. package/dist/spending/index.es.js +261 -436
  122. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  123. package/dist/transactions/index.es.js +15 -15
  124. package/dist/trends/index.es.js +16 -16
  125. package/dist/{useAccountDisplayName-D6sQsNNQ.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
  126. package/dist/{useInsightsEnabled-BxytCjq5.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  127. package/package.json +1 -1
  128. package/dist/Drawer-kEE73B87.mjs +0 -113
  129. package/dist/FinstrongStore-CL7t5lBL.mjs +0 -101
  130. package/dist/LineChart-eK4IQImU.mjs +0 -541
  131. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
@@ -1,393 +1,218 @@
1
- import { jsxs as h, jsx as t, Fragment as St } from "react/jsx-runtime";
2
- import p from "react";
3
- import { observer as v } from "mobx-react-lite";
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
- import N from "@mui/material/Tab";
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
- import { f as w } from "../NumberFormatting-Buh7u8Oi.mjs";
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
- });
51
- }
52
- return l;
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
- 0
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
- }));
65
- if (a.length > 5) {
66
- const r = a.slice(z, e.length), m = r.reduce(
67
- (M, g) => M + g.amount,
68
- 0
69
- );
70
- c.push({
71
- guid: "other",
72
- color: s.palette.categories.others || "",
73
- name: d.saving_goal_other,
74
- categoryTotals: r,
75
- amount: m
76
- }), u.push({
77
- id: "other",
78
- color: s.palette.categories.others || "",
79
- label: d.saving_goal_other,
80
- value: m / i * 100
81
- });
82
- }
83
- return {
84
- categoryData: c,
85
- donutData: u,
86
- totalAmount: i
87
- };
88
- }, ht = (n, d, s) => {
89
- const l = n.filter(
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
- categoryTotals: [],
96
- amount: Math.abs(o.total)
97
- })), a = e.reduce(
98
- (o, c) => o + c.amount,
99
- 0
100
- ), i = e.map((o) => ({
101
- id: o.guid,
102
- color: o.color,
103
- label: o.name,
104
- value: o.amount / a * 100
105
- }));
106
- return {
107
- categoryData: e,
108
- donutData: i,
109
- totalAmount: a
110
- };
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
- data: n,
116
- isIncome: d = !1,
117
- onSelected: s,
118
- onViewTransactions: l,
119
- selectedId: e,
120
- size: a = 150,
121
- totalLabel: i,
122
- variant: o = "mini"
123
- }) => {
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
- );
128
- p.useEffect(() => {
129
- if (g) {
130
- const S = w(g.amount, "0,0");
131
- m(`${g.name}: ${S}`);
132
- }
133
- }, [g, m]);
134
- const b = p.useMemo(() => n.donutData.length > 0 ? n.donutData : [{ id: "0", color: u.palette.divider, value: 100 }], [n, u]), E = () => {
135
- l?.(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
- g && /* @__PURE__ */ h(
141
- f,
142
- {
143
- alignItems: "center",
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
- children: [
149
- /* @__PURE__ */ t(
150
- Mt,
151
- {
152
- categoryGuid: d ? _.INCOME : g.guid,
153
- size: o === "mini" ? 24 : x,
154
- variant: xt.Transparent
155
- }
156
- ),
157
- /* @__PURE__ */ t(
158
- C,
159
- {
160
- color: "secondary",
161
- noWrap: !0,
162
- variant: o === "mini" ? "Tiny" : "Body",
163
- children: g ? g.name : i
164
- }
165
- )
166
- ]
167
- }
168
- ),
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
- {
175
- "aria-label": `View ${g?.name || ""} Transactions`,
176
- disabled: n.categoryData.length === 0,
177
- onClick: E,
178
- sx: { mt: { xl: 4, xs: 0 }, zIndex: 1 },
179
- variant: "text",
180
- children: c.view_transactions
181
- }
182
- )
183
- ] }) }) })
184
- ] });
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
- };
189
- return /* @__PURE__ */ t(f, { gap: 8, height: "100%", justifyContent: "center", my: "auto", children: n.categoryData.map((e) => /* @__PURE__ */ h(
190
- f,
191
- {
192
- alignItems: "center",
193
- "aria-label": e.name,
194
- "aria-pressed": e.guid === s,
195
- direction: "row",
196
- gap: 8,
197
- onClick: () => d(e.guid),
198
- onKeyDown: (a) => l(a, e.guid),
199
- role: "button",
200
- sx: { cursor: "pointer" },
201
- tabIndex: 0,
202
- children: [
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
- ]
206
- },
207
- e.guid
208
- )) });
209
- }, Bt = () => {
210
- const n = Tt(), { goals: d, spending: s } = I(), { selectedAccounts: l } = k(), {
211
- categories: e,
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import { observer as x } from "mobx-react-lite";
4
+ import { startOfMonth as it } from "date-fns/startOfMonth";
5
+ import { endOfMonth as rt } from "date-fns/endOfMonth";
6
+ import M from "@mui/material/Box";
7
+ import C from "@mui/material/Stack";
8
+ import E from "@mui/material/Tab";
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-B2BYr8B4.mjs";
12
+ import { Text as y, Icon as bt } from "@mxenabled/mxui";
13
+ import { f as A } from "../NumberFormatting-Buh7u8Oi.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";
15
+ import { L as P } from "../Loader-DUaFpDGv.mjs";
16
+ import { M as St } from "../MiniWidgetContainer-CmXpTylX.mjs";
17
+ import { startOfToday as Z } from "date-fns/startOfToday";
18
+ import Tt from "@mui/material/Button";
19
+ 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-CtbBBSoU.mjs";
22
+ import Dt from "@mui/material/Collapse";
23
+ import z from "@mui/material/Divider";
24
+ import tt from "@mui/material/List";
25
+ import et from "@mui/material/ListItem";
26
+ import It from "@mui/material/ListItemButton";
27
+ import { u as Lt } from "../useScreenSize-B6JyS_Lj.mjs";
28
+ 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: [
32
+ /* @__PURE__ */ t(y, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: d }),
33
+ /* @__PURE__ */ t(y, { variant: "XSmall", children: A(e, "0,0") })
34
+ ] }), Et = () => {
35
+ const e = ft(), { goals: d, spending: o } = v(), { selectedAccounts: l } = R(), {
36
+ categories: r,
212
37
  dateRangeCategoryTotals: a,
213
- dataRangeTotalsLoaded: i,
214
- loadDateRangeCategoryTotals: o
215
- } = P(), c = p.useMemo(
38
+ dataRangeTotalsLoaded: n,
39
+ loadDateRangeCategoryTotals: u
40
+ } = F(), s = i.useMemo(
216
41
  () => [
217
- n.palette.chartMono.chartMono5,
218
- n.palette.chartMono.chartMono4,
219
- n.palette.chartMono.chartMono3,
220
- n.palette.chartMono.chartMono2,
221
- n.palette.chartMono.chartMono1,
222
- n.palette.chartMono.chartMono6
42
+ e.palette.chartMono.chartMono5,
43
+ e.palette.chartMono.chartMono4,
44
+ e.palette.chartMono.chartMono3,
45
+ e.palette.chartMono.chartMono2,
46
+ e.palette.chartMono.chartMono1,
47
+ e.palette.chartMono.chartMono6
223
48
  ],
224
- [n]
49
+ [e]
225
50
  );
226
- p.useEffect(() => {
227
- o(
51
+ i.useEffect(() => {
52
+ u(
228
53
  l,
229
- st(/* @__PURE__ */ new Date()),
230
- ct(/* @__PURE__ */ new Date())
54
+ it(/* @__PURE__ */ new Date()),
55
+ rt(/* @__PURE__ */ new Date())
231
56
  ).finally();
232
57
  }, [l]);
233
- const [u, r] = p.useState(""), [m, M] = p.useState(0), g = p.useMemo(
234
- () => mt(e, d, n, a),
235
- [e, a]
236
- ), b = p.useMemo(
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);
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]
64
+ ), O = (T, k) => {
65
+ w(k), p("");
66
+ }, S = (T) => {
67
+ p(m === T ? "" : T);
243
68
  };
244
- return i ? /* @__PURE__ */ h(D, { width: "100%", children: [
245
- /* @__PURE__ */ h(
246
- lt,
69
+ return n ? /* @__PURE__ */ c(M, { width: "100%", children: [
70
+ /* @__PURE__ */ c(
71
+ st,
247
72
  {
248
- "aria-label": s.mini_title,
249
- onChange: E,
250
- value: m,
73
+ "aria-label": o.mini_title,
74
+ onChange: O,
75
+ value: h,
251
76
  variant: "fullWidth",
252
77
  children: [
253
78
  /* @__PURE__ */ t(
254
- N,
79
+ E,
255
80
  {
256
81
  "aria-controls": "spending-tabpanel",
257
82
  id: "spending-tab",
258
83
  label: /* @__PURE__ */ t(
259
- W,
84
+ N,
260
85
  {
261
- amount: g.totalAmount,
262
- label: s.spend_tab_title
86
+ amount: _.totalAmount,
87
+ label: o.spend_tab_title
263
88
  }
264
89
  ),
265
- tabIndex: m === 0 ? 0 : -1
90
+ tabIndex: h === 0 ? 0 : -1
266
91
  }
267
92
  ),
268
93
  /* @__PURE__ */ t(
269
- N,
94
+ E,
270
95
  {
271
96
  "aria-controls": "income-tabpanel",
272
97
  id: "income-tab",
273
98
  label: /* @__PURE__ */ t(
274
- W,
99
+ N,
275
100
  {
276
- amount: b.totalAmount,
277
- label: s.income_tab_title
101
+ amount: f.totalAmount,
102
+ label: o.income_tab_title
278
103
  }
279
104
  ),
280
- tabIndex: m === 1 ? 0 : -1
105
+ tabIndex: h === 1 ? 0 : -1
281
106
  }
282
107
  )
283
108
  ]
284
109
  }
285
110
  ),
286
111
  /* @__PURE__ */ t(
287
- D,
112
+ M,
288
113
  {
289
114
  "aria-labelledby": "spending-tab",
290
- hidden: m !== 0,
115
+ hidden: h !== 0,
291
116
  id: "spending-tabpanel",
292
117
  role: "tabpanel",
293
- children: /* @__PURE__ */ h(f, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
118
+ children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
294
119
  /* @__PURE__ */ t(
295
- O,
120
+ W,
296
121
  {
297
- data: g,
298
- onSelected: x,
299
- selectedId: u,
300
- totalLabel: s.total_spending
122
+ data: _,
123
+ onSelected: S,
124
+ selectedId: m,
125
+ totalLabel: o.total_spending
301
126
  }
302
127
  ),
303
- /* @__PURE__ */ t(it, { data: g, onSelected: x, selectedId: u })
128
+ /* @__PURE__ */ t(Q, { data: _, onSelected: S, selectedId: m })
304
129
  ] })
305
130
  }
306
131
  ),
307
132
  /* @__PURE__ */ t(
308
- D,
133
+ M,
309
134
  {
310
135
  "aria-labelledby": "income-tab",
311
- hidden: m !== 1,
136
+ hidden: h !== 1,
312
137
  id: "income-tabpanel",
313
138
  role: "tabpanel",
314
- children: /* @__PURE__ */ h(f, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
139
+ children: /* @__PURE__ */ c(C, { direction: "row", gap: 16, justifyContent: "center", p: 24, children: [
315
140
  /* @__PURE__ */ t(
316
- O,
141
+ W,
317
142
  {
318
- data: b,
143
+ data: f,
319
144
  isIncome: !0,
320
- onSelected: x,
321
- selectedId: u,
322
- totalLabel: s.total_income
145
+ onSelected: S,
146
+ selectedId: m,
147
+ totalLabel: o.total_income
323
148
  }
324
149
  ),
325
- /* @__PURE__ */ t(it, { data: b, onSelected: x, selectedId: u })
150
+ /* @__PURE__ */ t(Q, { data: f, onSelected: S, selectedId: m })
326
151
  ] })
327
152
  }
328
153
  )
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
- return p.useEffect(() => {
333
- i(s);
334
- }, [s]), !e || !a ? /* @__PURE__ */ t(K, {}) : /* @__PURE__ */ t(
335
- Wt,
154
+ ] }) : /* @__PURE__ */ t(P, { height: 250 });
155
+ }, 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(() => {
158
+ n(o);
159
+ }, [o]), !r || !a ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
160
+ St,
336
161
  {
337
162
  className: "mx-exp-spending-miniwidget",
338
- onPrimaryCtaClick: n,
163
+ onPrimaryCtaClick: e,
339
164
  primaryCtaLabel: l.primary_cta,
340
165
  sx: d,
341
166
  title: l.mini_title,
342
- children: /* @__PURE__ */ t(Vt, {})
167
+ children: /* @__PURE__ */ t(Wt, {})
343
168
  }
344
169
  );
345
- }, ve = v(zt), Ft = ({
346
- data: n,
170
+ }, be = x(Nt), Rt = ({
171
+ data: e,
347
172
  onSelected: d,
348
- selectedId: s = "",
173
+ selectedId: o = "",
349
174
  title: l
350
175
  }) => {
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: [
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}` }),
179
+ /* @__PURE__ */ t(z, { "aria-hidden": "true" }),
180
+ /* @__PURE__ */ t(tt, { children: e.categoryData.map((n) => /* @__PURE__ */ c(i.Fragment, { children: [
356
181
  /* @__PURE__ */ t(
357
- nt,
182
+ et,
358
183
  {
359
184
  disableGutters: !0,
360
185
  disablePadding: !0,
361
186
  sx: {
362
187
  minHeight: 44
363
188
  },
364
- children: /* @__PURE__ */ h(
365
- Rt,
189
+ children: /* @__PURE__ */ c(
190
+ It,
366
191
  {
367
- "aria-expanded": a?.guid === i.guid,
368
- onClick: () => d(i.guid),
192
+ "aria-expanded": a?.guid === n.guid,
193
+ onClick: () => d(n.guid),
369
194
  sx: { minHeight: 44, px: 8, py: 0 },
370
195
  children: [
371
196
  /* @__PURE__ */ t(
372
- D,
197
+ M,
373
198
  {
374
199
  borderRadius: 4,
375
200
  flexShrink: 0,
376
201
  height: 8,
377
- sx: { backgroundColor: i.color, mr: 8 },
202
+ sx: { backgroundColor: n.color, mr: 8 },
378
203
  width: 8
379
204
  }
380
205
  ),
381
- /* @__PURE__ */ h(
382
- f,
206
+ /* @__PURE__ */ c(
207
+ C,
383
208
  {
384
209
  alignItems: "center",
385
210
  direction: "row",
386
211
  justifyContent: "space-between",
387
212
  width: "100%",
388
213
  children: [
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") })
214
+ /* @__PURE__ */ t(y, { bold: o === n.guid, children: n.name }),
215
+ /* @__PURE__ */ t(y, { bold: o === n.guid, variant: "Body", children: A(n.amount, "0,0") })
391
216
  ]
392
217
  }
393
218
  )
@@ -396,51 +221,51 @@ const z = 5, Gt = (n, d, s) => s.reduce((l, e) => {
396
221
  )
397
222
  }
398
223
  ),
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,
224
+ /* @__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(
227
+ et,
403
228
  {
404
229
  sx: {
405
230
  pl: 24,
406
231
  pr: 8,
407
232
  py: 0
408
233
  },
409
- children: /* @__PURE__ */ h(f, { direction: "row", justifyContent: "space-between", width: "100%", children: [
410
- /* @__PURE__ */ h(C, { children: [
411
- o.name,
234
+ children: /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", width: "100%", children: [
235
+ /* @__PURE__ */ c(y, { children: [
236
+ u.name,
412
237
  " "
413
238
  ] }),
414
- /* @__PURE__ */ t(C, { children: w(o.amount, "0,0") })
239
+ /* @__PURE__ */ t(y, { children: A(u.amount, "0,0") })
415
240
  ] })
416
241
  },
417
- o.guid
242
+ u.guid
418
243
  )),
419
- /* @__PURE__ */ t(V, {})
244
+ /* @__PURE__ */ t(z, {})
420
245
  ] }) })
421
- ] }, i.guid)) }),
422
- /* @__PURE__ */ t(C, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${e.total}: ${w(n.totalAmount, "0,0")}` })
246
+ ] }, n.guid)) }),
247
+ /* @__PURE__ */ t(y, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${r.total}: ${A(e.totalAmount, "0,0")}` })
423
248
  ] });
424
- }, Ht = v(Ft), Pt = ({
425
- data: n,
249
+ }, Ot = x(Rt), kt = ({
250
+ data: e,
426
251
  onSelected: d,
427
- onViewTransactions: s,
252
+ onViewTransactions: o,
428
253
  selectedId: l,
429
- title: e
254
+ title: r
430
255
  }) => {
431
- const { isDesktop: a, isMobile: i } = pt(), { isLoadingCategoryTotals: o } = P(), { spending: c } = I();
432
- return /* @__PURE__ */ h(
433
- f,
256
+ const { isDesktop: a, isMobile: n } = Lt(), { isLoadingCategoryTotals: u } = F(), { spending: s } = v();
257
+ return /* @__PURE__ */ c(
258
+ C,
434
259
  {
435
- alignItems: i ? "center" : "flex-start",
436
- direction: i ? "column" : "row",
260
+ alignItems: n ? "center" : "flex-start",
261
+ direction: n ? "column" : "row",
437
262
  gap: { xs: 16, md: 64, xl: 100 },
438
263
  justifyContent: "center",
439
264
  pt: 50,
440
265
  px: 8,
441
266
  children: [
442
- o && /* @__PURE__ */ t(
443
- O,
267
+ u && /* @__PURE__ */ t(
268
+ W,
444
269
  {
445
270
  data: {
446
271
  categoryData: [],
@@ -455,151 +280,151 @@ const z = 5, Gt = (n, d, s) => s.reduce((l, e) => {
455
280
  variant: "full"
456
281
  }
457
282
  ),
458
- !o && /* @__PURE__ */ t(
459
- O,
283
+ !u && /* @__PURE__ */ t(
284
+ W,
460
285
  {
461
- data: n,
286
+ data: e,
462
287
  onSelected: d,
463
- onViewTransactions: s,
288
+ onViewTransactions: o,
464
289
  selectedId: l,
465
290
  size: a ? 400 : 300,
466
- totalLabel: c.total_amount,
291
+ totalLabel: s.total_amount,
467
292
  variant: "full"
468
293
  }
469
294
  ),
470
- /* @__PURE__ */ t(Ht, { data: n, onSelected: d, selectedId: l, title: e })
295
+ /* @__PURE__ */ t(Ot, { data: e, onSelected: d, selectedId: l, title: r })
471
296
  ]
472
297
  }
473
298
  );
474
- }, rt = v(Pt), Kt = (n) => [
475
- n.palette.chartMono.chartMono5,
476
- n.palette.chartMono.chartMono4,
477
- n.palette.chartMono.chartMono3,
478
- n.palette.chartMono.chartMono2,
479
- n.palette.chartMono.chartMono1,
480
- n.palette.chartMono.chartMono6
481
- ], 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);
492
- p.useEffect(() => {
493
- i(
494
- m,
495
- r.start,
496
- r.end
299
+ }, at = x(kt), $t = (e) => [
300
+ e.palette.chartMono.chartMono5,
301
+ e.palette.chartMono.chartMono4,
302
+ e.palette.chartMono.chartMono3,
303
+ e.palette.chartMono.chartMono2,
304
+ e.palette.chartMono.chartMono1,
305
+ e.palette.chartMono.chartMono6
306
+ ], Bt = () => {
307
+ const e = Mt(), { onLoad: d } = _t(), { is_mobile_webview: o } = V(), { clientConfig: l } = V(), { categories: r, dateRangeCategoryTotals: a, loadDateRangeCategoryTotals: n } = F(), {
308
+ goals: u,
309
+ spending: s,
310
+ transactions: m
311
+ } = v(), { displayedDateRange: p, selectedAccounts: h, selectedAccountGuids: w } = R(), {
312
+ setFilter: _,
313
+ sortedTransactions: f,
314
+ sortedTransactionsWithSplits: O,
315
+ 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(
319
+ h,
320
+ p.start,
321
+ p.end
497
322
  ).finally(() => {
498
323
  d?.("SpendingWidget");
499
324
  });
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) => {
515
- const A = {
516
- accounts: S || M,
517
- dateRange: r
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
+ [K, f]
335
+ ), ut = (g, D) => {
336
+ pt(D), H("");
337
+ }, q = (g) => {
338
+ H($ === g || g === "0" ? "" : g);
339
+ }, J = (g) => {
340
+ const D = {
341
+ accounts: T || w,
342
+ dateRange: p
518
343
  };
519
344
  if (L === 0)
520
- if (y === "other") {
521
- const T = G.categoryData.find((B) => B.guid === "other");
522
- g({
523
- ...A,
524
- custom: (B) => !!T?.categoryTotals?.find((_t) => _t.guid === B.top_level_category_guid)
345
+ if (g === "other") {
346
+ const b = B.categoryData.find((j) => j.guid === "other");
347
+ _({
348
+ ...D,
349
+ custom: (j) => !!b?.categoryTotals?.find((ht) => ht.guid === j.top_level_category_guid)
525
350
  });
526
351
  } else
527
- g({
528
- ...A,
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
352
+ _({
353
+ ...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
531
356
  });
532
357
  else
533
- g({
534
- ...A,
535
- custom: (T) => y ? T.category_guid === y : T.category_guid === _.INCOME || T.top_level_category_guid === _.INCOME
358
+ _({
359
+ ...D,
360
+ custom: (b) => g ? b.category_guid === g : b.category_guid === I.INCOME || b.top_level_category_guid === I.INCOME
536
361
  });
537
- q(!0);
538
- }, bt = () => {
539
- Ot(E, x);
362
+ X(!0);
363
+ }, mt = () => {
364
+ xt(O, S);
540
365
  };
541
- return /* @__PURE__ */ h(D, { children: [
542
- /* @__PURE__ */ h(lt, { onChange: Ct, value: L, variant: "fullWidth", children: [
366
+ return /* @__PURE__ */ c(M, { children: [
367
+ /* @__PURE__ */ c(st, { onChange: ut, value: L, variant: "fullWidth", children: [
543
368
  /* @__PURE__ */ t(
544
- N,
369
+ E,
545
370
  {
546
371
  label: /* @__PURE__ */ t(
547
- W,
372
+ N,
548
373
  {
549
- amount: G.totalAmount,
550
- label: c.spend_tab_title
374
+ amount: B.totalAmount,
375
+ label: s.spend_tab_title
551
376
  }
552
377
  )
553
378
  }
554
379
  ),
555
380
  /* @__PURE__ */ t(
556
- N,
381
+ E,
557
382
  {
558
383
  label: /* @__PURE__ */ t(
559
- W,
384
+ N,
560
385
  {
561
- amount: J.totalAmount,
562
- label: c.income_tab_title
386
+ amount: Y.totalAmount,
387
+ label: s.income_tab_title
563
388
  }
564
389
  )
565
390
  }
566
391
  )
567
392
  ] }),
568
393
  L === 0 && /* @__PURE__ */ t(
569
- rt,
394
+ at,
570
395
  {
571
- data: G,
572
- onSelected: Q,
573
- onViewTransactions: Z,
396
+ data: B,
397
+ onSelected: q,
398
+ onViewTransactions: J,
574
399
  selectedId: $,
575
- title: c.spend_tab_title
400
+ title: s.spend_tab_title
576
401
  }
577
402
  ),
578
403
  L === 1 && /* @__PURE__ */ t(
579
- rt,
404
+ at,
580
405
  {
581
- data: J,
582
- onSelected: Q,
583
- onViewTransactions: Z,
406
+ data: Y,
407
+ onSelected: q,
408
+ onViewTransactions: J,
584
409
  selectedId: $,
585
- title: c.income_tab_title
410
+ title: s.income_tab_title
586
411
  }
587
412
  ),
588
413
  /* @__PURE__ */ t(
589
- ot,
414
+ nt,
590
415
  {
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,
416
+ ariaLabelClose: s.close_drawer_aria,
417
+ isOpen: gt,
418
+ 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(
422
+ Tt,
598
423
  {
599
- onClick: bt,
600
- startIcon: /* @__PURE__ */ t(Dt, { name: "ios_share" }),
424
+ onClick: mt,
425
+ startIcon: /* @__PURE__ */ t(bt, { name: "ios_share" }),
601
426
  variant: "text",
602
- children: u.export_csv_btn
427
+ children: m.export_csv_btn
603
428
  }
604
429
  ) }),
605
430
  /* @__PURE__ */ t(vt, { onClick: U })
@@ -607,40 +432,40 @@ const z = 5, Gt = (n, d, s) => s.reduce((l, e) => {
607
432
  }
608
433
  ),
609
434
  /* @__PURE__ */ t(
610
- ot,
435
+ nt,
611
436
  {
612
- ariaLabelClose: c.close_drawer_aria,
613
- isOpen: !!j,
437
+ ariaLabelClose: s.close_drawer_aria,
438
+ isOpen: !!G,
614
439
  onClose: () => U(""),
615
- title: c.transaction_details_drawer_title,
616
- children: j && /* @__PURE__ */ t(It, { transaction: j })
440
+ title: s.transaction_details_drawer_title,
441
+ children: G && /* @__PURE__ */ t(wt, { transaction: G })
617
442
  }
618
443
  )
619
444
  ] });
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);
622
- p.useEffect(() => {
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);
445
+ }, 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(() => {
448
+ 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);
626
451
  }, []);
627
- const g = (b) => {
628
- i(b[0], b[1]);
452
+ const _ = (f) => {
453
+ n(f[0], f[1]);
629
454
  };
630
- return !e || !a || !m ? /* @__PURE__ */ t(K, {}) : /* @__PURE__ */ t(
631
- $t,
455
+ return !r || !a || !h ? /* @__PURE__ */ t(P, {}) : /* @__PURE__ */ t(
456
+ At,
632
457
  {
633
- accountOptions: s,
634
- calendarActions: { onRangeChanged: g },
635
- onAccountsFilterClick: () => c(at.SPENDING_CLICK_FILTER),
636
- onBackClick: n,
458
+ accountOptions: o,
459
+ calendarActions: { onRangeChanged: _ },
460
+ onAccountsFilterClick: () => s(ot.SPENDING_CLICK_FILTER),
461
+ onBackClick: e,
637
462
  sx: d,
638
463
  title: l.title,
639
- children: /* @__PURE__ */ t(D, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Yt, {}) })
464
+ children: /* @__PURE__ */ t(M, { height: "calc(100dvh - 150px)", overflow: "scroll", width: "100%", children: /* @__PURE__ */ t(Gt, {}) })
640
465
  }
641
466
  );
642
- }, Ie = v(Ut);
467
+ }, _e = x(jt);
643
468
  export {
644
- ve as SpendingMiniWidget,
645
- Ie as SpendingWidget
469
+ be as SpendingMiniWidget,
470
+ _e as SpendingWidget
646
471
  };