@mx-cartographer/experiences 7.2.9-alpha.san4 → 7.2.10
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.
- package/CHANGELOG.md +4 -0
- package/dist/{Account-CBQnFO6w.mjs → Account-B-CuHOYf.mjs} +1 -1
- package/dist/{AccountDetailsContent-CmdOOZw1.mjs → AccountDetailsContent-DfzPOeMI.mjs} +10 -10
- package/dist/{AccountDetailsHeader-CaIoP_2Q.mjs → AccountDetailsHeader-vcy67tuH.mjs} +8 -8
- package/dist/{AccountFields-CLbLAhLf.mjs → AccountFields-cUP-9Hm6.mjs} +5 -5
- package/dist/{AccountListItem-CPm3572e.mjs → AccountListItem-DChcf3SN.mjs} +4 -4
- package/dist/{AccountStore-DttEGFeu.mjs → AccountStore-D6KiXA1B.mjs} +29 -40
- package/dist/{Accounts-B5Yr0e_o.mjs → Accounts-IeEtQjzA.mjs} +1 -1
- package/dist/{BudgetUtil-wjoNuj7B.mjs → BudgetUtil-B2ZXyw-g.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-ZO9N26Kx.mjs → CategorySelectorDrawer-DUe4lH5-.mjs} +3 -3
- package/dist/{CategoryStore-C1IfDPCE.mjs → CategoryStore-BCcpI3oJ.mjs} +1 -1
- package/dist/{CategoryUtil-DUM8NuGO.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
- package/dist/{ConnectDrawer-FyY0AWYQ.mjs → ConnectDrawer-DaFRU5st.mjs} +2 -2
- package/dist/{ConnectionsDrawer-Cd_rztVC.mjs → ConnectionsDrawer-DHJ7qdWL.mjs} +3 -3
- package/dist/{CurrencyInput-CBOkNlNP.mjs → CurrencyInput-CsCy7uaS.mjs} +1 -1
- package/dist/{DateUtil-CBdcsyuk.mjs → DateUtil-BcuH7ErC.mjs} +3 -3
- package/dist/{DebtsStore-DB5U2WMC.mjs → DebtsStore-z3VARSO6.mjs} +1 -1
- package/dist/{Dialog-BPTr3qHE.mjs → Dialog-CWW597AF.mjs} +2 -2
- package/dist/Drawer-kEE73B87.mjs +113 -0
- package/dist/{ExportCsvAction-DlGZfm4y.mjs → ExportCsvAction-sX8Rg4Ov.mjs} +3 -3
- package/dist/FinstrongStore-F2c607dj.mjs +101 -0
- package/dist/{GoalStore-deVLYr7n.mjs → GoalStore-TD0BfzWX.mjs} +3 -3
- package/dist/{Help-BnPXM_N2.mjs → Help-B6dIcujh.mjs} +2 -2
- package/dist/{LineChart-Ct9DNmhS.mjs → LineChart-D4GI7nVh.mjs} +181 -209
- package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-DHa3KJPs.mjs} +10 -10
- package/dist/{ManageIncome-DB_lKOIy.mjs → ManageIncome-D3n1EWxe.mjs} +61 -63
- package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-DpeqN9n3.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-D0gfmbaF.mjs} +1 -1
- package/dist/{NetWorthStore-CUz0bwVm.mjs → NetWorthStore-B_1oulrt.mjs} +2 -2
- package/dist/{NotificationSettings-Bfb3T7nN.mjs → NotificationSettings-BRm_EJZV.mjs} +5 -5
- package/dist/{OriginalBalanceAction-BLiU-7Lf.mjs → OriginalBalanceAction-CAaVbVMO.mjs} +3 -3
- package/dist/{RecurringSettings-dJJxtLyU.mjs → RecurringSettings-C28GrQcP.mjs} +4 -4
- package/dist/{RecurringTransactions-CngsRZ3K.mjs → RecurringTransactions-ej39mgA6.mjs} +44 -45
- package/dist/{RecurringTransactionsStore-C4RVULF8.mjs → RecurringTransactionsStore-DrzS1LmF.mjs} +1 -1
- package/dist/{SpendingData-BuJ03S9d.mjs → SpendingData-D5vsfYKo.mjs} +16 -16
- package/dist/{TransactionDetails-CJvE4LNC.mjs → TransactionDetails-BWffqew4.mjs} +8 -11
- package/dist/{TransactionStore-DvOEbOzL.mjs → TransactionStore-DxPLdF3B.mjs} +3 -3
- package/dist/{TrendsStore-BVNxGsE4.mjs → TrendsStore-DCYbpXPO.mjs} +14 -14
- package/dist/{User-wXzDI4M8.mjs → User-BQUxBeZV.mjs} +2 -2
- package/dist/{WidgetContainer-GoNq8wwm.mjs → WidgetContainer-C88Ecu2W.mjs} +4 -4
- package/dist/accounts/index.es.js +14 -14
- package/dist/accounts/stores/AccountStore.d.ts +0 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +12 -12
- package/dist/cashflow/index.es.js +44 -44
- package/dist/categories/index.es.js +2 -2
- package/dist/common/components/Select.d.ts +2 -4
- package/dist/common/components/charts/LineChart.d.ts +2 -8
- package/dist/common/components/charts/linechart/CustomMark.d.ts +0 -4
- package/dist/common/components/drawer/Drawer.d.ts +0 -3
- package/dist/common/hooks/useAriaLive.d.ts +8 -0
- package/dist/common/index.es.js +33 -33
- package/dist/common/types/Finstrong.d.ts +0 -50
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +1 -58
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +11 -11
- package/dist/{exportTransactionsToCSV-hrNpJ77n.mjs → exportTransactionsToCSV-7bVS7KXf.mjs} +2 -2
- package/dist/finstrong/api/FinstrongApi.d.ts +0 -5
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +1 -3
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -4
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +3 -4
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/index.es.js +1055 -3130
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -9
- package/dist/finstrong/util/finstrongUtils.d.ts +1 -58
- package/dist/finstrong/utils/Finstrong.d.ts +6 -0
- package/dist/goals/index.es.js +14 -14
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-C41HAxM5.mjs → hooks-D6XlXHf4.mjs} +3 -3
- package/dist/investments/index.es.js +4 -4
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +34 -34
- package/dist/notifications/index.es.js +4 -4
- package/dist/recurringtransactions/index.es.js +13 -13
- package/dist/settings/index.es.js +8 -8
- package/dist/spending/index.es.js +373 -222
- package/dist/transactions/index.es.js +307 -271
- package/dist/trends/index.es.js +94 -94
- package/dist/{useAccountDisplayName-B5O6hQ1B.mjs → useAccountDisplayName-BcRqfar8.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-DBpwEq10.mjs} +1 -1
- package/package.json +1 -1
- package/dist/Drawer-BEtCk82g.mjs +0 -163
- package/dist/FinstrongStore-rVhw737g.mjs +0 -432
- package/dist/SpendingLegend-squvjEhu.mjs +0 -170
- package/dist/accounts/components/AccountsListCompact.d.ts +0 -10
- package/dist/common/components/drawer/Footer.d.ts +0 -17
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +0 -4
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +0 -3
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +0 -4
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +0 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +0 -10
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +0 -6
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +0 -4
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +0 -4
- package/dist/finstrong/components/ProgressBar.d.ts +0 -15
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +0 -3
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +0 -4
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +0 -3
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +0 -4
- package/dist/finstrong/components/StatusChip.d.ts +0 -5
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +0 -2
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +0 -11
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +0 -8
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +0 -14
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +0 -8
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +0 -4
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +0 -4
- package/dist/finstrong/components/shared/Accounts.d.ts +0 -8
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +0 -25
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +0 -28
- package/dist/finstrong/components/shared/LineGraph.d.ts +0 -7
- package/dist/finstrong/components/shared/TotalCard.d.ts +0 -8
- package/dist/finstrong/components/shared/TransactionList.d.ts +0 -15
- package/dist/finstrong/components/shared/Transactions.d.ts +0 -11
- package/dist/finstrong/constants/index.d.ts +0 -8
package/dist/trends/index.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as e, jsxs as C, Fragment as Qe } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { observer as x } from "mobx-react-lite";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as ae, Text as Z, CategoryIcon as fe, P as U, H3 as xe, ChevronRightIcon as Je } from "@mxenabled/mxui";
|
|
5
5
|
import O from "@mui/material/Box";
|
|
6
6
|
import b from "@mui/material/Stack";
|
|
7
7
|
import me from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as ve } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as pe } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { a as et, g as tt, S as nt, L as Me } from "../TrendsStore-
|
|
11
|
-
import { T as Co } from "../TrendsStore-
|
|
12
|
-
import { i as ot, c as st, d as
|
|
10
|
+
import { a as et, g as tt, S as nt, L as Me } from "../TrendsStore-DCYbpXPO.mjs";
|
|
11
|
+
import { T as Co } from "../TrendsStore-DCYbpXPO.mjs";
|
|
12
|
+
import { i as ot, c as st, d as rt, e as at, f as it, h as ct, b as Ae, g as Re, j as De } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
13
|
import lt from "@mui/material/ToggleButton";
|
|
14
14
|
import dt from "@mui/material/ToggleButtonGroup";
|
|
15
|
-
import { u as A, m as P, g as H, b as J, h as ie, d as ce, w as ee, f as Te, q as ht, n as ut, a as gt } from "../hooks-
|
|
15
|
+
import { u as A, m as P, g as H, b as J, h as ie, d as ce, w as ee, f as Te, q as ht, n as ut, a as gt } from "../hooks-D6XlXHf4.mjs";
|
|
16
16
|
import { u as $ } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
|
-
import { f as q,
|
|
17
|
+
import { f as q, D as z } from "../Dialog-CWW597AF.mjs";
|
|
18
18
|
import { DataGridPro as mt } from "@mui/x-data-grid-pro";
|
|
19
19
|
import { C as pt } from "../CurrencyText-kyC1aseI.mjs";
|
|
20
20
|
import { b as Ct } from "../Localization-2MODESHW.mjs";
|
|
21
21
|
import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
|
|
22
22
|
import { T as M, b as ft } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
|
|
23
|
-
import { A as _, W as ke } from "../WidgetContainer-
|
|
23
|
+
import { A as _, W as ke } from "../WidgetContainer-C88Ecu2W.mjs";
|
|
24
24
|
import { c as Tt } from "../Category-CevNQ03n.mjs";
|
|
25
|
-
import { a as Ne, T as He } from "../TransactionDetails-
|
|
26
|
-
import { D as Ce } from "../Drawer-
|
|
25
|
+
import { a as Ne, T as He } from "../TransactionDetails-BWffqew4.mjs";
|
|
26
|
+
import { D as Ce } from "../Drawer-kEE73B87.mjs";
|
|
27
27
|
import { L as Q } from "../Loader-DUaFpDGv.mjs";
|
|
28
28
|
import { useTheme as We } from "@mui/material/styles";
|
|
29
|
-
import { L as ye } from "../LineChart-
|
|
30
|
-
import { M as yt } from "../MiniWidgetContainer-
|
|
29
|
+
import { L as ye } from "../LineChart-D4GI7nVh.mjs";
|
|
30
|
+
import { M as yt } from "../MiniWidgetContainer-D0gfmbaF.mjs";
|
|
31
31
|
import { subMonths as _t } from "date-fns";
|
|
32
32
|
import { TrendingUp as bt, TrendingDown as St, MultilineChart as wt, ExpandLess as Dt, ExpandMore as It } from "@mxenabled/mx-icons";
|
|
33
33
|
import { a as Et, f as X } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
34
|
-
import { M as Lt } from "../MicroWidgetContainer-
|
|
34
|
+
import { M as Lt } from "../MicroWidgetContainer-DpeqN9n3.mjs";
|
|
35
35
|
import xt from "@mui/material/Collapse";
|
|
36
36
|
import vt from "@mui/material/List";
|
|
37
37
|
import Mt from "@mui/material/ListItem";
|
|
@@ -42,11 +42,11 @@ import Oe from "@mui/material/styles/useTheme";
|
|
|
42
42
|
import Nt from "@mui/material/Divider";
|
|
43
43
|
import { useTheme as Ht, Stack as Wt } from "@mui/material";
|
|
44
44
|
import Ot from "@mui/material/Paper";
|
|
45
|
-
import { b as Vt } from "../CategoryUtil-
|
|
46
|
-
import { E as Gt } from "../ExportCsvAction-
|
|
47
|
-
import { u as Bt } from "../useInsightsEnabled-
|
|
45
|
+
import { b as Vt } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
46
|
+
import { E as Gt } from "../ExportCsvAction-sX8Rg4Ov.mjs";
|
|
47
|
+
import { u as Bt } from "../useInsightsEnabled-DBpwEq10.mjs";
|
|
48
48
|
import { E as zt } from "../EmptyState-DA_lfRBv.mjs";
|
|
49
|
-
import { l as Pt } from "../ConnectDrawer-
|
|
49
|
+
import { l as Pt } from "../ConnectDrawer-DaFRU5st.mjs";
|
|
50
50
|
const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
51
51
|
dt,
|
|
52
52
|
{
|
|
@@ -54,10 +54,10 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
54
54
|
onChange: o,
|
|
55
55
|
orientation: "horizontal",
|
|
56
56
|
value: t,
|
|
57
|
-
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(lt, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(
|
|
57
|
+
children: ["Chart", "Table"].map((n) => /* @__PURE__ */ e(lt, { color: "primary", sx: { width: 56 }, value: n, children: n === "Chart" ? /* @__PURE__ */ e(ae, { name: "table_chart_view" }) : /* @__PURE__ */ e(ae, { name: "format_list_bulleted" }) }, n))
|
|
58
58
|
}
|
|
59
59
|
), Ge = ({ selectedDateRange: t, selectedCategoryGuid: o }) => {
|
|
60
|
-
const { trends: n } = A(), { isMobile: s, isDesktop:
|
|
60
|
+
const { trends: n } = A(), { isMobile: s, isDesktop: r } = $(), { getCategoryName: l } = P(), d = i.useMemo(() => {
|
|
61
61
|
const h = q(
|
|
62
62
|
t.start,
|
|
63
63
|
s ? z.MONTH_SHORT_YEAR : z.MONTH_YEAR
|
|
@@ -78,27 +78,27 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
78
78
|
overflow: "visible",
|
|
79
79
|
textOverflow: "unset"
|
|
80
80
|
},
|
|
81
|
-
variant:
|
|
81
|
+
variant: r ? "H3" : "Body",
|
|
82
82
|
children: l(o) || n.sub_title
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
/* @__PURE__ */ e(Z, { variant:
|
|
85
|
+
/* @__PURE__ */ e(Z, { variant: r ? "Body" : "Small", children: d })
|
|
86
86
|
] });
|
|
87
87
|
}, Ft = (t) => {
|
|
88
88
|
const o = t.row[t.field];
|
|
89
89
|
return /* @__PURE__ */ e(b, { alignItems: "flex-end", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(pt, { amount: o, variant: "Small" }) });
|
|
90
90
|
}, Kt = ({ categoryGuid: t, topLevelCategoryGuid: o }) => {
|
|
91
|
-
const { getCategoryName: n } = P(), { categories: s } = A(),
|
|
91
|
+
const { getCategoryName: n } = P(), { categories: s } = A(), r = s.default_categories[t]?.replace(/&/g, "&") ?? n(t);
|
|
92
92
|
return /* @__PURE__ */ C(b, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
93
93
|
/* @__PURE__ */ e(
|
|
94
94
|
O,
|
|
95
95
|
{
|
|
96
|
-
"aria-label": Ct(s.category_icon_label_aria,
|
|
96
|
+
"aria-label": Ct(s.category_icon_label_aria, r),
|
|
97
97
|
role: "img",
|
|
98
98
|
children: /* @__PURE__ */ e(fe, { categoryGuid: o })
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
/* @__PURE__ */ e(Z, { sx: { ml: 12, pb: 6 }, variant: "Small", children:
|
|
101
|
+
/* @__PURE__ */ e(Z, { sx: { ml: 12, pb: 6 }, variant: "Small", children: r })
|
|
102
102
|
] });
|
|
103
103
|
}, $t = (t) => /* @__PURE__ */ e(b, { alignItems: "center", direction: "row", height: "100%", width: "100%", children: /* @__PURE__ */ e(
|
|
104
104
|
Kt,
|
|
@@ -109,8 +109,8 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
109
109
|
) }), jt = (t, o) => {
|
|
110
110
|
const n = [], s = new Date(t);
|
|
111
111
|
for (; s <= o; ) {
|
|
112
|
-
const
|
|
113
|
-
n.push(
|
|
112
|
+
const r = q(s, z.MONTH);
|
|
113
|
+
n.push(r), s.setMonth(s.getMonth() + 1);
|
|
114
114
|
}
|
|
115
115
|
return n;
|
|
116
116
|
}, Be = ({
|
|
@@ -118,7 +118,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
118
118
|
selectedDateRange: o,
|
|
119
119
|
selectedCategory: n,
|
|
120
120
|
onClickRow: s,
|
|
121
|
-
height:
|
|
121
|
+
height: r = "100dvh",
|
|
122
122
|
sx: l = {}
|
|
123
123
|
}) => {
|
|
124
124
|
const { onEvent: d } = H(), h = q(/* @__PURE__ */ new Date(), z.MONTH_SHORT), [c, u] = i.useState([
|
|
@@ -171,7 +171,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
171
171
|
);
|
|
172
172
|
return Object.values(y);
|
|
173
173
|
}, [t, n]);
|
|
174
|
-
return /* @__PURE__ */ e(O, { sx: { height:
|
|
174
|
+
return /* @__PURE__ */ e(O, { sx: { height: r, width: "100%", overflowX: "auto", boxShadow: "none", ...l }, children: /* @__PURE__ */ e(
|
|
175
175
|
mt,
|
|
176
176
|
{
|
|
177
177
|
columns: g,
|
|
@@ -202,7 +202,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
202
202
|
isOpen: n,
|
|
203
203
|
onClose: s
|
|
204
204
|
}) => {
|
|
205
|
-
const { onEvent:
|
|
205
|
+
const { onEvent: r } = H(), { selectedAccountGuids: l } = J(), { common: d } = A(), { setFilter: h, sortedTransactions: c } = ie(), [u, f] = i.useState(""), g = i.useMemo(
|
|
206
206
|
() => c.find((m) => m.guid === u),
|
|
207
207
|
[u, c]
|
|
208
208
|
);
|
|
@@ -213,7 +213,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
213
213
|
custom: (m) => t === "" || t === m.category_guid || t === m.top_level_category_guid,
|
|
214
214
|
showSplits: !!t
|
|
215
215
|
});
|
|
216
|
-
}, [l, t, o]), i.useEffect(() =>
|
|
216
|
+
}, [l, t, o]), i.useEffect(() => r(_.TRENDS_VIEW_TRANSACTIONS), []);
|
|
217
217
|
const T = () => {
|
|
218
218
|
f(""), s();
|
|
219
219
|
};
|
|
@@ -231,21 +231,21 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
}, Xt = x(Ut), Zt = ({ onBackClick: t, sx: o }) => {
|
|
234
|
-
const { onEvent: n } = H(), { isDesktop: s, isTablet:
|
|
234
|
+
const { onEvent: n } = H(), { isDesktop: s, isTablet: r, isMobile: l } = $(), { visibleAccounts: d } = ce(), { loadMonthlyCategoryTotals: h, monthlyCategoryTotals: c, getCategoryName: u } = P(), { sortedTransactions: f } = ie(), { selectedDateRange: g, setSelectedDateRange: T } = ee(), { isCopyLoaded: m, isInitialized: a, selectedAccounts: y, setSelectedAccounts: p } = J(), { trends: E } = A(), [w, D] = i.useState(!1), [R, v] = i.useState(!1), [k, N] = i.useState("Chart"), [I, te] = i.useState(""), [ne, B] = i.useState(window.innerHeight), le = ne - (l ? 315 : 345);
|
|
235
235
|
i.useEffect(() => {
|
|
236
236
|
const S = () => B(window.innerHeight);
|
|
237
237
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
238
238
|
}, []), i.useEffect(() => {
|
|
239
239
|
p(d);
|
|
240
240
|
}, [d]), i.useEffect(() => {
|
|
241
|
-
|
|
241
|
+
a && h(
|
|
242
242
|
y,
|
|
243
243
|
g.start,
|
|
244
244
|
g.end
|
|
245
245
|
).finally(() => {
|
|
246
246
|
D(!0);
|
|
247
247
|
});
|
|
248
|
-
}, [
|
|
248
|
+
}, [a, y, g]);
|
|
249
249
|
const F = i.useMemo(() => {
|
|
250
250
|
if (!w) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
251
251
|
const S = tt(
|
|
@@ -254,9 +254,9 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
254
254
|
g.end
|
|
255
255
|
), W = I.length ? S.filter(
|
|
256
256
|
(V) => V.top_level_category_guid === I || V.category_guid === I
|
|
257
|
-
) :
|
|
257
|
+
) : rt(S);
|
|
258
258
|
return {
|
|
259
|
-
stackedDatasets: W.filter(
|
|
259
|
+
stackedDatasets: W.filter(at),
|
|
260
260
|
unstackedDatasets: W.filter(it)
|
|
261
261
|
};
|
|
262
262
|
}, [c, I, g]), de = (S, W) => {
|
|
@@ -276,10 +276,10 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
276
276
|
n(_.TRENDS_HOVER_LEGEND, { category: u(S) });
|
|
277
277
|
}, se = (S) => {
|
|
278
278
|
n(_.TRENDS_HOVER_AREA, { category: S });
|
|
279
|
-
},
|
|
279
|
+
}, re = (S) => {
|
|
280
280
|
n(_.TRENDS_HOVER_POINT, { category: S });
|
|
281
281
|
};
|
|
282
|
-
return !m || !
|
|
282
|
+
return !m || !a || !w ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ C(
|
|
283
283
|
ke,
|
|
284
284
|
{
|
|
285
285
|
accountOptions: d,
|
|
@@ -296,7 +296,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
296
296
|
{
|
|
297
297
|
sx: {
|
|
298
298
|
// eslint-disable-next-line no-nested-ternary
|
|
299
|
-
px: s ? 48 :
|
|
299
|
+
px: s ? 48 : r ? 24 : 12
|
|
300
300
|
},
|
|
301
301
|
children: [
|
|
302
302
|
/* @__PURE__ */ C(
|
|
@@ -319,7 +319,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
319
319
|
),
|
|
320
320
|
/* @__PURE__ */ C(b, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
321
321
|
/* @__PURE__ */ e(O, { flexGrow: 1, children: I && /* @__PURE__ */ C(me, { onClick: () => te(""), sx: { p: 0, pr: 5 }, children: [
|
|
322
|
-
/* @__PURE__ */ e(
|
|
322
|
+
/* @__PURE__ */ e(ae, { name: "arrow_back" }),
|
|
323
323
|
E.all_categories
|
|
324
324
|
] }) }),
|
|
325
325
|
/* @__PURE__ */ e(me, { onClick: () => v(!0), sx: { px: 5 }, children: `${E.view_transactions} (${f.length})` })
|
|
@@ -332,7 +332,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
332
332
|
onClickLegend: oe,
|
|
333
333
|
onHoverArea: se,
|
|
334
334
|
onHoverLegend: ue,
|
|
335
|
-
onHoverPoint:
|
|
335
|
+
onHoverPoint: re,
|
|
336
336
|
stackedDatasets: F.stackedDatasets,
|
|
337
337
|
unstackedDatasets: F.unstackedDatasets
|
|
338
338
|
}
|
|
@@ -381,7 +381,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}, Qt = x(qt), Jt = ({ onPrimaryCtaClick: t, sx: o }) => {
|
|
384
|
-
const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded:
|
|
384
|
+
const { visibleAccounts: n } = ce(), { loadMonthlyCategoryTotals: s, monthlyTotalsLoaded: r } = P(), { isInitialized: l } = Te(), { trends: d } = A(), { isCopyLoaded: h, selectedAccounts: c, setSelectedAccounts: u } = J();
|
|
385
385
|
return i.useEffect(() => {
|
|
386
386
|
u(n);
|
|
387
387
|
}, [n]), i.useEffect(() => {
|
|
@@ -394,7 +394,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
394
394
|
subTitle: d.sub_title,
|
|
395
395
|
sx: o,
|
|
396
396
|
title: d.mini_title,
|
|
397
|
-
children:
|
|
397
|
+
children: r ? /* @__PURE__ */ e(Qt, {}) : /* @__PURE__ */ e(Q, {})
|
|
398
398
|
}
|
|
399
399
|
);
|
|
400
400
|
}, ho = x(Jt), en = 70, Ee = ({
|
|
@@ -402,13 +402,13 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
402
402
|
totalAmount: o,
|
|
403
403
|
transactionType: n,
|
|
404
404
|
percentage: s,
|
|
405
|
-
secondaryLabel:
|
|
405
|
+
secondaryLabel: r,
|
|
406
406
|
shouldDisplayPercentage: l
|
|
407
407
|
}) => {
|
|
408
408
|
const { availableWidth: d } = ht(), h = i.useRef(null), c = i.useRef(null), u = Et(Number(Math.abs(s)), {
|
|
409
409
|
style: "percent",
|
|
410
410
|
minimumIntegerDigits: 1
|
|
411
|
-
}), f = d === 288 && X(o, "0,0.00").length > 10 ? X(o, "0,0") : X(o, "0,0.00"), g = n === "spending" ? s > 0 : s >= 0, T = n === "spending" ? "error.main" : "success.main", m = n === "spending" ? "success.main" : "text.secondary",
|
|
411
|
+
}), f = d === 288 && X(o, "0,0.00").length > 10 ? X(o, "0,0") : X(o, "0,0.00"), g = n === "spending" ? s > 0 : s >= 0, T = n === "spending" ? "error.main" : "success.main", m = n === "spending" ? "success.main" : "text.secondary", a = h?.current, y = c?.current, p = a && y ? a.scrollWidth > y.clientWidth - en : !1;
|
|
412
412
|
return /* @__PURE__ */ C(
|
|
413
413
|
b,
|
|
414
414
|
{
|
|
@@ -472,7 +472,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
472
472
|
{
|
|
473
473
|
color: g ? T : m,
|
|
474
474
|
variant: "caption",
|
|
475
|
-
children:
|
|
475
|
+
children: r
|
|
476
476
|
}
|
|
477
477
|
)
|
|
478
478
|
]
|
|
@@ -491,14 +491,14 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
491
491
|
] })
|
|
492
492
|
] });
|
|
493
493
|
}), uo = x(({ onCtaClick: t }) => {
|
|
494
|
-
const { visibleAccounts: o } = ce(), { onEvent: n } = H(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals:
|
|
494
|
+
const { visibleAccounts: o } = ce(), { onEvent: n } = H(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: l } = P(), d = {
|
|
495
495
|
start: _t(/* @__PURE__ */ new Date(), 1),
|
|
496
496
|
end: /* @__PURE__ */ new Date()
|
|
497
497
|
}, { trends: h } = A(), { selectedAccounts: c, setSelectedAccounts: u, isInitialized: f } = J();
|
|
498
498
|
i.useEffect(() => {
|
|
499
499
|
u(o);
|
|
500
500
|
}, [o]), i.useEffect(() => {
|
|
501
|
-
f &&
|
|
501
|
+
f && r(c, d.start).then(() => {
|
|
502
502
|
n(_.TRENDS_LOAD_WIDGET, {
|
|
503
503
|
state: o?.length ? "default" : "zeroState"
|
|
504
504
|
});
|
|
@@ -510,7 +510,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
510
510
|
incomeData: Re(s, d)
|
|
511
511
|
}),
|
|
512
512
|
[s, d]
|
|
513
|
-
), [m,
|
|
513
|
+
), [m, a] = g, [y, p] = T, E = De(a.y, m.y), w = De(p.y, y.y), D = f && !o?.length, R = () => {
|
|
514
514
|
n(
|
|
515
515
|
D ? _.TRENDS_CLICK_GET_STARTED : _.TRENDS_CLICK_VIEW_MORE
|
|
516
516
|
), t();
|
|
@@ -537,9 +537,9 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
537
537
|
{
|
|
538
538
|
percentage: E,
|
|
539
539
|
secondaryLabel: h.micro_secondary_label,
|
|
540
|
-
shouldDisplayPercentage:
|
|
540
|
+
shouldDisplayPercentage: a.y !== 0 && m.y !== 0,
|
|
541
541
|
title: h.spending_label,
|
|
542
|
-
totalAmount:
|
|
542
|
+
totalAmount: a.y,
|
|
543
543
|
transactionType: "spending"
|
|
544
544
|
}
|
|
545
545
|
),
|
|
@@ -587,12 +587,12 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
587
587
|
guid: o,
|
|
588
588
|
name: n,
|
|
589
589
|
transactions: s,
|
|
590
|
-
onClick:
|
|
590
|
+
onClick: r,
|
|
591
591
|
isLastItem: l = !1,
|
|
592
592
|
showDivider: d = !0
|
|
593
593
|
}) => {
|
|
594
594
|
const { trends: h } = A(), { onEvent: c } = H(), u = `${s.length} ${s.length === 1 ? h.transaction : h.transactions}`, f = () => {
|
|
595
|
-
|
|
595
|
+
r?.(), c(_.TRENDS_CLICK_LIST_ITEM, {
|
|
596
596
|
...M,
|
|
597
597
|
listItem: n
|
|
598
598
|
});
|
|
@@ -604,7 +604,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
604
604
|
leftIcon: o ? /* @__PURE__ */ e(fe, { categoryGuid: o }) : void 0,
|
|
605
605
|
onClick: f,
|
|
606
606
|
rightContent: X(Math.abs(t), "0,0.00"),
|
|
607
|
-
rightIcon:
|
|
607
|
+
rightIcon: r ? /* @__PURE__ */ e(Je, {}) : void 0,
|
|
608
608
|
subtitle: u,
|
|
609
609
|
title: n
|
|
610
610
|
}
|
|
@@ -614,10 +614,10 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
614
614
|
}
|
|
615
615
|
), on = x(
|
|
616
616
|
({ availableHeight: t = 0, onCategoryClick: o }) => {
|
|
617
|
-
const { collapsedCategories: n, visibleCategories: s, setVisibleListLength:
|
|
617
|
+
const { collapsedCategories: n, visibleCategories: s, setVisibleListLength: r } = ee(), { isLargeDesktop: l, isDesktop: d } = $(), { trends: h } = A(), { onEvent: c } = H(), [u, f] = i.useState(!1), g = d || l;
|
|
618
618
|
i.useEffect(() => {
|
|
619
|
-
const
|
|
620
|
-
|
|
619
|
+
const a = Math.floor(t / 64) - 1, y = s.length + n.length;
|
|
620
|
+
a !== s.length && (r(g ? Math.max(a, 5) : 5), f(a >= y));
|
|
621
621
|
}, [t]);
|
|
622
622
|
const T = () => {
|
|
623
623
|
f(!u), c(_.TRENDS_CLICK_VIEW_MORE, {
|
|
@@ -626,32 +626,32 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
626
626
|
}, m = s.length + (u ? n.length : 0);
|
|
627
627
|
return /* @__PURE__ */ e(b, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ C(vt, { children: [
|
|
628
628
|
/* @__PURE__ */ e(b, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(xe, { children: h.categories }) }),
|
|
629
|
-
s.map((
|
|
629
|
+
s.map((a, y) => /* @__PURE__ */ e(
|
|
630
630
|
Le,
|
|
631
631
|
{
|
|
632
|
-
...
|
|
632
|
+
...a,
|
|
633
633
|
isLastItem: y === m - 1,
|
|
634
|
-
onClick:
|
|
634
|
+
onClick: a.transactions.length > 0 ? () => o(a) : void 0,
|
|
635
635
|
showDivider: !0
|
|
636
636
|
},
|
|
637
|
-
|
|
637
|
+
a.guid
|
|
638
638
|
)),
|
|
639
639
|
/* @__PURE__ */ e(
|
|
640
640
|
xt,
|
|
641
641
|
{
|
|
642
642
|
in: u,
|
|
643
643
|
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
644
|
-
children: n.map((
|
|
644
|
+
children: n.map((a, y) => {
|
|
645
645
|
const p = s.length + y;
|
|
646
646
|
return /* @__PURE__ */ e(
|
|
647
647
|
Le,
|
|
648
648
|
{
|
|
649
|
-
...
|
|
649
|
+
...a,
|
|
650
650
|
isLastItem: p === m - 1,
|
|
651
|
-
onClick:
|
|
651
|
+
onClick: a.transactions.length > 0 ? () => o(a) : void 0,
|
|
652
652
|
showDivider: !0
|
|
653
653
|
},
|
|
654
|
-
|
|
654
|
+
a.guid
|
|
655
655
|
);
|
|
656
656
|
})
|
|
657
657
|
}
|
|
@@ -660,7 +660,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
660
660
|
] }) });
|
|
661
661
|
}
|
|
662
662
|
), sn = ({ beats: t, onInsightCardClick: o }) => {
|
|
663
|
-
const n = Ht(), { onEvent: s } = H(), { isMobile:
|
|
663
|
+
const n = Ht(), { onEvent: s } = H(), { isMobile: r, isDesktop: l, isLargeDesktop: d } = $(), { beatStore: h, endpoint: c, sessionToken: u } = Te(), f = n.palette.mode === "dark", g = l || d, T = g || r ? 1 : 2, m = () => null, a = (R) => {
|
|
664
664
|
o?.(R), s(_.TRENDS_CLICK_INSIGHT, M);
|
|
665
665
|
}, y = g ? 200 : 170, p = g ? 170 : 124, E = g ? 56 : 0, w = t.length > 0 ? y + E : p, D = g && t.length > 0 ? y : void 0;
|
|
666
666
|
return /* @__PURE__ */ e(Wt, { sx: { height: w }, children: /* @__PURE__ */ e(
|
|
@@ -671,7 +671,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
671
671
|
endpoint: c,
|
|
672
672
|
heightOverrides: D,
|
|
673
673
|
logOutUser: m,
|
|
674
|
-
onCardClick:
|
|
674
|
+
onCardClick: a,
|
|
675
675
|
showBorder: !0,
|
|
676
676
|
showCTAColocatedWithText: !1,
|
|
677
677
|
showCarouselControls: !0,
|
|
@@ -685,9 +685,9 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
685
685
|
visibleCardsCount: T
|
|
686
686
|
}
|
|
687
687
|
) });
|
|
688
|
-
},
|
|
688
|
+
}, rn = x(sn), an = x(({ chartLabel: t, chartColor: o }) => {
|
|
689
689
|
const { onEvent: n } = H(), {
|
|
690
|
-
categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels:
|
|
690
|
+
categoryDetailsChartData: { monthlyAmounts: s, tooltipLabels: r }
|
|
691
691
|
} = ee();
|
|
692
692
|
return /* @__PURE__ */ e(b, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
693
693
|
ye,
|
|
@@ -695,7 +695,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
695
695
|
baseline: "min",
|
|
696
696
|
colors: [o],
|
|
697
697
|
curveType: "bump",
|
|
698
|
-
customTooltipLabels:
|
|
698
|
+
customTooltipLabels: r,
|
|
699
699
|
datasets: [s],
|
|
700
700
|
height: 265,
|
|
701
701
|
labels: [t],
|
|
@@ -719,10 +719,10 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
719
719
|
}
|
|
720
720
|
) });
|
|
721
721
|
}), cn = x(({ onClose: t }) => {
|
|
722
|
-
const o = Oe(), { onEvent: n } = H(), { common: s, trends:
|
|
722
|
+
const o = Oe(), { onEvent: n } = H(), { common: s, trends: r } = A(), { selectedCategoryData: l, selectedDateRangeMonthRange: d } = ee(), { sortedTransactions: h } = ie(), [c, u] = i.useState(null);
|
|
723
723
|
if (!l)
|
|
724
724
|
return null;
|
|
725
|
-
const { guid: f, name: g, is_income: T, totalAmount: m } = l,
|
|
725
|
+
const { guid: f, name: g, is_income: T, totalAmount: m } = l, a = T ? r.category_income : r.category_spending, y = Vt(f, o), p = T ? r.income_label : r.spending_label, E = ` ${l.transactions.length === 1 ? r.transaction : r.transactions} (${l.transactions.length})`, w = i.useMemo(
|
|
726
726
|
() => h.find((v) => v.guid === c),
|
|
727
727
|
[c, h]
|
|
728
728
|
), D = (v) => v.category_guid === f || v.top_level_category_guid === f, R = () => {
|
|
@@ -731,11 +731,11 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
731
731
|
return /* @__PURE__ */ C(
|
|
732
732
|
Ce,
|
|
733
733
|
{
|
|
734
|
-
ariaLabelClose:
|
|
734
|
+
ariaLabelClose: r.close_category_details,
|
|
735
735
|
isOpen: !0,
|
|
736
736
|
onClose: R,
|
|
737
737
|
shouldShowHeaderShadow: !0,
|
|
738
|
-
title:
|
|
738
|
+
title: a,
|
|
739
739
|
children: [
|
|
740
740
|
/* @__PURE__ */ C(b, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
741
741
|
/* @__PURE__ */ C(Ot, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
@@ -748,7 +748,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
748
748
|
title: g
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
|
-
/* @__PURE__ */ e(
|
|
751
|
+
/* @__PURE__ */ e(an, { chartColor: y, chartLabel: p }),
|
|
752
752
|
/* @__PURE__ */ C(b, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
753
753
|
/* @__PURE__ */ e(Z, { bold: !0, variant: "body1", children: E }),
|
|
754
754
|
/* @__PURE__ */ e(Gt, { filter: D })
|
|
@@ -770,7 +770,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
770
770
|
ariaLabelClose: s.close_aria,
|
|
771
771
|
isOpen: !!w,
|
|
772
772
|
onClose: () => u(""),
|
|
773
|
-
title:
|
|
773
|
+
title: r.transaction,
|
|
774
774
|
children: w && /* @__PURE__ */ e(Ne, { transaction: w })
|
|
775
775
|
}
|
|
776
776
|
)
|
|
@@ -779,11 +779,11 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
779
779
|
);
|
|
780
780
|
}), ln = (t, o) => {
|
|
781
781
|
const n = Re(t, o), s = Ae(t, o);
|
|
782
|
-
return [n, s].filter((
|
|
782
|
+
return [n, s].filter((r) => r.length > 0);
|
|
783
783
|
}, dn = (t, o) => {
|
|
784
|
-
const [n, s] = t,
|
|
785
|
-
if (
|
|
786
|
-
const h =
|
|
784
|
+
const [n, s] = t, r = n, l = s ?? n, d = [];
|
|
785
|
+
if (r) {
|
|
786
|
+
const h = r.reduce((c, u) => c + u.y, 0);
|
|
787
787
|
d.push({ label: o.income_label, amount: h });
|
|
788
788
|
}
|
|
789
789
|
if (l) {
|
|
@@ -797,7 +797,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
797
797
|
selectedDateRange: n,
|
|
798
798
|
totals: s
|
|
799
799
|
}) => {
|
|
800
|
-
const
|
|
800
|
+
const r = We(), { onEvent: l } = H(), { trends: d } = A(), { isSmallMobile: h, isMobile: c, isSmallTablet: u, isTablet: f } = $(), g = [r.palette.chart?.chart1, r.palette.chart?.chart2], T = ln(s, n), m = dn(T, d), [a, y] = i.useState(0), p = 458, E = 195, w = 56, D = c || h ? E : u || f ? p : a;
|
|
801
801
|
return i.useEffect(() => {
|
|
802
802
|
const v = Math.max(t - w, o);
|
|
803
803
|
y(v);
|
|
@@ -859,13 +859,13 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
859
859
|
"WeeklyNoSpendDays",
|
|
860
860
|
"WeeklySmallPurchasesSummary"
|
|
861
861
|
], mn = ({ onBackClick: t, onInsightCardClick: o, sx: n }) => {
|
|
862
|
-
const { onEvent: s } = H(), { onLoad:
|
|
862
|
+
const { onEvent: s } = H(), { onLoad: r } = ut(), { config: l } = gt(), { isLargeDesktop: d, isDesktop: h, isMobile: c } = $(), { visibleAccounts: u } = ce(), { loadDateRangeCategoryTotals: f, loadMonthlyCategoryTotals: g, monthlyCategoryTotals: T } = P(), { setFilter: m } = ie(), { selectedDateRange: a, setSelectedCategoryData: y, setSelectedDateRange: p } = ee(), {
|
|
863
863
|
isCopyLoaded: E,
|
|
864
864
|
isInitialized: w,
|
|
865
865
|
selectedAccounts: D,
|
|
866
866
|
selectedAccountGuids: R,
|
|
867
867
|
setSelectedAccounts: v
|
|
868
|
-
} = J(), { trends: k, connect: N } = A(), { beatStore: I } = Te(), ne = Bt() && l.show_insights_widget_in_master, B = h || d, [_e, le] = i.useState(!1), [F, de] = i.useState(!1), [K, he] = i.useState("Chart"), [j, oe] = i.useState(""), [ue, se] = i.useState(!1), [
|
|
868
|
+
} = J(), { trends: k, connect: N } = A(), { beatStore: I } = Te(), ne = Bt() && l.show_insights_widget_in_master, B = h || d, [_e, le] = i.useState(!1), [F, de] = i.useState(!1), [K, he] = i.useState("Chart"), [j, oe] = i.useState(""), [ue, se] = i.useState(!1), [re, S] = i.useState(window.innerHeight), W = B ? 56 : 0, V = re - 208, ge = re - (ne ? 550 + W : 266), [ze, be] = i.useState(!1), Pe = l.show_connections_widget_in_master ? "buttons" : "no-buttons", Se = i.useMemo(
|
|
869
869
|
() => u && u.length === 0 || T.length === 0,
|
|
870
870
|
[u, T]
|
|
871
871
|
);
|
|
@@ -879,23 +879,23 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
879
879
|
}, []), i.useEffect(() => {
|
|
880
880
|
v(u);
|
|
881
881
|
}, [u]), i.useEffect(() => {
|
|
882
|
-
w && f(D,
|
|
882
|
+
w && f(D, a.start, a.end).then(() => {
|
|
883
883
|
g(
|
|
884
884
|
D,
|
|
885
|
-
|
|
886
|
-
|
|
885
|
+
a.start,
|
|
886
|
+
a.end
|
|
887
887
|
);
|
|
888
888
|
}).finally(() => {
|
|
889
889
|
le(!0), s(_.TRENDS_LOAD_WIDGET, {
|
|
890
890
|
...M,
|
|
891
|
-
time_period: `${pe(
|
|
892
|
-
}),
|
|
891
|
+
time_period: `${pe(a.end, a.start)}M`
|
|
892
|
+
}), r?.("TrendsWidget");
|
|
893
893
|
});
|
|
894
|
-
}, [w, D,
|
|
894
|
+
}, [w, D, a]), i.useEffect(() => {
|
|
895
895
|
if (T.length !== 0) {
|
|
896
896
|
const L = {
|
|
897
897
|
accounts: R,
|
|
898
|
-
dateRange: { start:
|
|
898
|
+
dateRange: { start: a.start, end: a.end }
|
|
899
899
|
};
|
|
900
900
|
m({
|
|
901
901
|
...L,
|
|
@@ -937,7 +937,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
937
937
|
{
|
|
938
938
|
accountOptions: u,
|
|
939
939
|
calendarActions: { onRangeChanged: Ye },
|
|
940
|
-
dateRange:
|
|
940
|
+
dateRange: a,
|
|
941
941
|
dateRangeVariant: c ? "timeframetabs" : "timeframebuttons",
|
|
942
942
|
onAccountsFilterClick: Ue,
|
|
943
943
|
onBackClick: t,
|
|
@@ -974,7 +974,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
974
974
|
Ge,
|
|
975
975
|
{
|
|
976
976
|
selectedCategoryGuid: j,
|
|
977
|
-
selectedDateRange:
|
|
977
|
+
selectedDateRange: a
|
|
978
978
|
}
|
|
979
979
|
),
|
|
980
980
|
/* @__PURE__ */ e(Ve, { onTabChange: je, selectedTab: K })
|
|
@@ -982,7 +982,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
984
|
/* @__PURE__ */ e(b, { alignItems: "center", flexDirection: "row", width: "100%", children: /* @__PURE__ */ e(O, { flexGrow: 1, children: j && /* @__PURE__ */ C(me, { onClick: Ze, sx: { p: 0, pr: 5 }, children: [
|
|
985
|
-
/* @__PURE__ */ e(
|
|
985
|
+
/* @__PURE__ */ e(ae, { name: "arrow_back" }),
|
|
986
986
|
k.all_categories
|
|
987
987
|
] }) }) }),
|
|
988
988
|
/* @__PURE__ */ C(b, { flexDirection: B ? "row" : "column", gap: B ? 48 : 16, children: [
|
|
@@ -992,13 +992,13 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
992
992
|
{
|
|
993
993
|
availableHeight: V,
|
|
994
994
|
minHeight: 450,
|
|
995
|
-
selectedDateRange:
|
|
995
|
+
selectedDateRange: a,
|
|
996
996
|
totals: T
|
|
997
997
|
}
|
|
998
998
|
) }),
|
|
999
999
|
/* @__PURE__ */ C(b, { gap: 16, sx: { width: B ? "32%" : "100%" }, children: [
|
|
1000
1000
|
ne && F && we.length > 0 && /* @__PURE__ */ e(
|
|
1001
|
-
|
|
1001
|
+
rn,
|
|
1002
1002
|
{
|
|
1003
1003
|
beats: we,
|
|
1004
1004
|
onInsightCardClick: o
|
|
@@ -1020,7 +1020,7 @@ const Ve = ({ selectedTab: t, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
1020
1020
|
monthlyCategoryTotals: T,
|
|
1021
1021
|
onClickRow: Xe,
|
|
1022
1022
|
selectedCategory: j,
|
|
1023
|
-
selectedDateRange:
|
|
1023
|
+
selectedDateRange: a
|
|
1024
1024
|
}
|
|
1025
1025
|
) })
|
|
1026
1026
|
] }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import s from "react";
|
|
2
|
-
import { g as e } from "./ConnectDrawer-
|
|
3
|
-
import { a as n } from "./hooks-
|
|
2
|
+
import { g as e } from "./ConnectDrawer-DaFRU5st.mjs";
|
|
3
|
+
import { a as n } from "./hooks-D6XlXHf4.mjs";
|
|
4
4
|
const i = (o) => {
|
|
5
5
|
const { config: a } = n();
|
|
6
6
|
return s.useMemo(
|