@mx-cartographer/experiences 7.0.27-alpha.sms4 → 7.0.27-alpha.sms6
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/dist/{Account-BW3-oYEs.mjs → Account-CK-DrCEa.mjs} +1 -1
- package/dist/{AccountDetailsContent-UxSEMBo_.mjs → AccountDetailsContent-BZAbCT6q.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-DXTi1p0V.mjs} +11 -11
- package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-Bxvi1C4Z.mjs} +2 -2
- package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-CnE3rCVZ.mjs} +3 -3
- package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-DiGbJBUT.mjs} +2 -2
- package/dist/{Accounts-CA-nqAjT.mjs → Accounts-BBkQjUmS.mjs} +1 -1
- package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-D5jO0box.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-joMax4Fb.mjs} +1 -1
- package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-D86nRDxQ.mjs} +1 -1
- package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-BkNr5Up0.mjs} +2 -2
- package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-BkflFU_-.mjs} +1 -1
- package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-qrqY9Abz.mjs} +1 -1
- package/dist/{ExportCsvAction-CbdFfDV5.mjs → ExportCsvAction-DRfdZis1.mjs} +3 -3
- package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-BQRcowCN.mjs} +2 -2
- package/dist/{Help-KAAMEubC.mjs → Help-B3dFeYi2.mjs} +1 -1
- package/dist/{LineChart-BWWmmJxV.mjs → LineChart-Dyps2sOy.mjs} +1 -1
- package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-BgKx_n6d.mjs} +1 -1
- package/dist/{ManageIncome-DbsiKUoO.mjs → ManageIncome-CFh-N0KK.mjs} +4 -4
- package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-DPDsZIiS.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-BzW7V_04.mjs} +1 -1
- package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-DWG9Mkuu.mjs} +2 -2
- package/dist/NotificationSettings-BaG4tpPe.mjs +671 -0
- package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-B--pIAF0.mjs} +3 -3
- package/dist/{RecurringSettings-Dj29piAQ.mjs → RecurringSettings-C9TjSuS_.mjs} +3 -3
- package/dist/{TransactionDetails-C-z3HGTT.mjs → TransactionDetails-C2gYzV0z.mjs} +37 -37
- package/dist/{TransactionStore-Cep_Eeql.mjs → TransactionStore-CZOvxcSw.mjs} +2 -2
- package/dist/{TrendsStore-WrHxzdbQ.mjs → TrendsStore-pvzHAX6B.mjs} +225 -231
- package/dist/{User-Dq9Qj764.mjs → User-D-O9EHMb.mjs} +1 -1
- package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-Bn6JPnY3.mjs} +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +11 -11
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +105 -104
- package/dist/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-B5qAKd6C.mjs → exportTransactionsToCSV-zyHeWfQo.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +11 -11
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-DkUqN6JE.mjs → hooks-DlI63qSB.mjs} +8 -8
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +14 -14
- package/dist/transactions/index.es.js +13 -13
- package/dist/trends/index.es.js +70 -69
- package/dist/useInsightsEnabled-fGr6xrSj.mjs +11 -0
- package/package.json +1 -1
- package/dist/NotificationSettings-ClJT-Sg3.mjs +0 -664
package/dist/trends/index.es.js
CHANGED
|
@@ -7,52 +7,53 @@ import _ from "@mui/material/Stack";
|
|
|
7
7
|
import pe from "@mui/material/Button";
|
|
8
8
|
import { addSeconds as Ie } from "date-fns/addSeconds";
|
|
9
9
|
import { differenceInCalendarMonths as Ce } from "date-fns/differenceInCalendarMonths";
|
|
10
|
-
import { a as Ke, g as $e, S as je, L as Ee
|
|
11
|
-
import { T as
|
|
12
|
-
import { i as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { u as R,
|
|
10
|
+
import { a as Ke, g as $e, S as je, L as Ee } from "../TrendsStore-pvzHAX6B.mjs";
|
|
11
|
+
import { T as to } from "../TrendsStore-pvzHAX6B.mjs";
|
|
12
|
+
import { i as Ye, c as Ue, d as Xe, e as Ze, f as Qe, h as qe, b as Le, g as xe, j as _e } from "../SpendingData-D5vsfYKo.mjs";
|
|
13
|
+
import Je from "@mui/material/ToggleButton";
|
|
14
|
+
import et from "@mui/material/ToggleButtonGroup";
|
|
15
|
+
import { u as R, l as F, f as H, a as P, g as re, c as ae, v as q, e as ve, p as tt, m as nt } from "../hooks-DlI63qSB.mjs";
|
|
16
16
|
import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
17
|
import { f as Z, D as B } from "../Dialog-CWW597AF.mjs";
|
|
18
|
-
import { DataGridPro as
|
|
19
|
-
import { C as
|
|
18
|
+
import { DataGridPro as ot } from "@mui/x-data-grid-pro";
|
|
19
|
+
import { C as st } from "../CurrencyText-YUhH2caW.mjs";
|
|
20
20
|
import { c as Me } from "../Category-CevNQ03n.mjs";
|
|
21
|
-
import { b as
|
|
21
|
+
import { b as rt } from "../Localization-2MODESHW.mjs";
|
|
22
22
|
import { H as be } from "../HeaderCell-DjuifqHJ.mjs";
|
|
23
|
-
import { T as A, b as
|
|
24
|
-
import { A as y, W as Ae } from "../WidgetContainer-
|
|
25
|
-
import { a as Re, T as ke } from "../TransactionDetails-
|
|
23
|
+
import { T as A, b as at } from "../ViewMoreMicroCard-DFAY0tA8.mjs";
|
|
24
|
+
import { A as y, W as Ae } from "../WidgetContainer-Bn6JPnY3.mjs";
|
|
25
|
+
import { a as Re, T as ke } from "../TransactionDetails-C2gYzV0z.mjs";
|
|
26
26
|
import { D as fe } from "../Drawer-kEE73B87.mjs";
|
|
27
27
|
import { L as Q } from "../Loader-DUaFpDGv.mjs";
|
|
28
28
|
import { useTheme as He } from "@mui/material/styles";
|
|
29
|
-
import { L as ye } from "../LineChart-
|
|
30
|
-
import { M as
|
|
31
|
-
import { subMonths as
|
|
32
|
-
import { TrendingUp as
|
|
33
|
-
import { a as
|
|
34
|
-
import { M as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
29
|
+
import { L as ye } from "../LineChart-Dyps2sOy.mjs";
|
|
30
|
+
import { M as it } from "../MiniWidgetContainer-BzW7V_04.mjs";
|
|
31
|
+
import { subMonths as ct } from "date-fns";
|
|
32
|
+
import { TrendingUp as lt, TrendingDown as dt, MultilineChart as ht, ExpandLess as ut, ExpandMore as mt } from "@mxenabled/mx-icons";
|
|
33
|
+
import { a as gt, f as U } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
34
|
+
import { M as pt } from "../MicroWidgetContainer-DPDsZIiS.mjs";
|
|
35
|
+
import Ct from "@mui/material/Collapse";
|
|
36
|
+
import ft from "@mui/material/List";
|
|
37
|
+
import Tt from "@mui/material/ListItem";
|
|
38
|
+
import yt from "@mui/material/ListItemButton";
|
|
39
|
+
import _t from "@mui/material/ListItemIcon";
|
|
40
|
+
import bt from "@mui/material/ListItemText";
|
|
41
41
|
import Ne from "@mui/material/styles/useTheme";
|
|
42
|
-
import
|
|
43
|
-
import { useTheme as
|
|
44
|
-
import
|
|
45
|
-
import { b as
|
|
46
|
-
import { E as
|
|
42
|
+
import St from "@mui/material/Divider";
|
|
43
|
+
import { useTheme as wt, Stack as Dt } from "@mui/material";
|
|
44
|
+
import It from "@mui/material/Paper";
|
|
45
|
+
import { b as Et } from "../CategoryUtil-BR3H5i6n.mjs";
|
|
46
|
+
import { E as Lt } from "../ExportCsvAction-DRfdZis1.mjs";
|
|
47
|
+
import { u as xt } from "../useInsightsEnabled-fGr6xrSj.mjs";
|
|
47
48
|
import { E as vt } from "../EmptyState-C0lr9E5T.mjs";
|
|
48
49
|
const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
49
|
-
|
|
50
|
+
et,
|
|
50
51
|
{
|
|
51
52
|
exclusive: !0,
|
|
52
53
|
onChange: o,
|
|
53
54
|
orientation: "horizontal",
|
|
54
55
|
value: n,
|
|
55
|
-
children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(
|
|
56
|
+
children: ["Chart", "Table"].map((t) => /* @__PURE__ */ e(Je, { color: "primary", sx: { width: 56 }, value: t, children: t === "Chart" ? /* @__PURE__ */ e(se, { name: "table_chart_view" }) : /* @__PURE__ */ e(se, { name: "format_list_bulleted" }) }, t))
|
|
56
57
|
}
|
|
57
58
|
), Oe = ({ selectedDateRange: n, selectedCategoryGuid: o }) => {
|
|
58
59
|
const { trends: t } = R(), { isMobile: s, isDesktop: a } = K(), { getCategoryName: h } = F(), l = i.useMemo(() => {
|
|
@@ -84,14 +85,14 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
84
85
|
] });
|
|
85
86
|
}, Mt = (n) => {
|
|
86
87
|
const o = n.row[n.field];
|
|
87
|
-
return /* @__PURE__ */ e(_, { alignItems: "flex-end", tabIndex: n.tabIndex, children: /* @__PURE__ */ e(
|
|
88
|
+
return /* @__PURE__ */ e(_, { alignItems: "flex-end", tabIndex: n.tabIndex, children: /* @__PURE__ */ e(st, { amount: o, variant: "Small" }) });
|
|
88
89
|
}, At = ({ categoryGuid: n, topLevelCategoryGuid: o }) => {
|
|
89
90
|
const { categories: t } = R(), s = t.default_categories[n]?.replace(/&/g, "&") ?? Me[n];
|
|
90
91
|
return /* @__PURE__ */ f(_, { alignItems: "center", direction: "row", justifyContent: "center", children: [
|
|
91
92
|
/* @__PURE__ */ e(
|
|
92
93
|
O,
|
|
93
94
|
{
|
|
94
|
-
"aria-label":
|
|
95
|
+
"aria-label": rt(t.category_icon_label_aria, s),
|
|
95
96
|
role: "img",
|
|
96
97
|
children: /* @__PURE__ */ e(Te, { categoryGuid: o })
|
|
97
98
|
}
|
|
@@ -150,7 +151,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
150
151
|
)
|
|
151
152
|
], b = i.useMemo(() => {
|
|
152
153
|
const r = n.filter(
|
|
153
|
-
(p) => !
|
|
154
|
+
(p) => !Ye(p) && !Ue(p)
|
|
154
155
|
), T = (t ? r.filter(
|
|
155
156
|
(p) => p.category_guid === t || p.top_level_category_guid === t
|
|
156
157
|
) : r).reduce(
|
|
@@ -170,7 +171,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
170
171
|
return Object.values(T);
|
|
171
172
|
}, [n, t]);
|
|
172
173
|
return /* @__PURE__ */ e(O, { sx: { height: a, width: "100%", overflowX: "auto", boxShadow: "none", ...h }, children: /* @__PURE__ */ e(
|
|
173
|
-
|
|
174
|
+
ot,
|
|
174
175
|
{
|
|
175
176
|
columns: u,
|
|
176
177
|
disableColumnFilter: !0,
|
|
@@ -252,10 +253,10 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
252
253
|
u.end
|
|
253
254
|
), W = L.length ? S.filter(
|
|
254
255
|
(G) => G.top_level_category_guid === L || G.category_guid === L
|
|
255
|
-
) :
|
|
256
|
+
) : Xe(S);
|
|
256
257
|
return {
|
|
257
|
-
stackedDatasets: W.filter(
|
|
258
|
-
unstackedDatasets: W.filter(
|
|
258
|
+
stackedDatasets: W.filter(Ze),
|
|
259
|
+
unstackedDatasets: W.filter(Qe)
|
|
259
260
|
};
|
|
260
261
|
}, [d, L, u]), ne = (S, W) => {
|
|
261
262
|
x(W ?? N), t(y.TRENDS_CLICK_TOGGLE_VIEW);
|
|
@@ -360,8 +361,8 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
360
361
|
]
|
|
361
362
|
}
|
|
362
363
|
);
|
|
363
|
-
},
|
|
364
|
-
const n = He(), { monthlyCategoryTotals: o } = F(), { trends: t } = R(), s =
|
|
364
|
+
}, Xn = M(Ot), Vt = () => {
|
|
365
|
+
const n = He(), { monthlyCategoryTotals: o } = F(), { trends: t } = R(), s = qe(o);
|
|
365
366
|
return /* @__PURE__ */ e(
|
|
366
367
|
ye,
|
|
367
368
|
{
|
|
@@ -385,7 +386,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
385
386
|
}, [t]), i.useEffect(() => {
|
|
386
387
|
h && s(d).finally();
|
|
387
388
|
}, [h, d]), !c || !h ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ e(
|
|
388
|
-
|
|
389
|
+
it,
|
|
389
390
|
{
|
|
390
391
|
onPrimaryCtaClick: n,
|
|
391
392
|
primaryCtaLabel: l.primary_cta,
|
|
@@ -395,7 +396,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
395
396
|
children: a ? /* @__PURE__ */ e(Gt, {}) : /* @__PURE__ */ e(Q, {})
|
|
396
397
|
}
|
|
397
398
|
);
|
|
398
|
-
},
|
|
399
|
+
}, Zn = M(Bt), zt = 70, Se = ({
|
|
399
400
|
title: n,
|
|
400
401
|
totalAmount: o,
|
|
401
402
|
transactionType: t,
|
|
@@ -403,7 +404,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
403
404
|
secondaryLabel: a,
|
|
404
405
|
shouldDisplayPercentage: h
|
|
405
406
|
}) => {
|
|
406
|
-
const { availableWidth: l } =
|
|
407
|
+
const { availableWidth: l } = tt(), c = i.useRef(null), d = i.useRef(null), m = gt(Number(Math.abs(s)), {
|
|
407
408
|
style: "percent",
|
|
408
409
|
minimumIntegerDigits: 1
|
|
409
410
|
}), C = l === 288 && U(o, "0,0.00").length > 10 ? U(o, "0,0") : U(o, "0,0.00"), u = t === "spending" ? s > 0 : s >= 0, b = t === "spending" ? "error.main" : "success.main", r = t === "spending" ? "success.main" : "text.secondary", g = c?.current, T = d?.current, p = g && T ? g.scrollWidth > T.clientWidth - zt : !1;
|
|
@@ -431,7 +432,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
431
432
|
children: [
|
|
432
433
|
/* @__PURE__ */ e(Y, { color: "text.secondary", variant: "caption", children: n }),
|
|
433
434
|
h && /* @__PURE__ */ f(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
434
|
-
u ? /* @__PURE__ */ e(
|
|
435
|
+
u ? /* @__PURE__ */ e(lt, { size: 20, sx: { color: b } }) : /* @__PURE__ */ e(dt, { size: 20, sx: { color: r } }),
|
|
435
436
|
/* @__PURE__ */ e(
|
|
436
437
|
Y,
|
|
437
438
|
{
|
|
@@ -482,15 +483,15 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
482
483
|
}, Ft = M(() => {
|
|
483
484
|
const { trends: n } = R();
|
|
484
485
|
return /* @__PURE__ */ f(_, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
+
/* @__PURE__ */ e(ht, { size: 32 }),
|
|
486
487
|
/* @__PURE__ */ f(_, { children: [
|
|
487
488
|
/* @__PURE__ */ e(Y, { fontWeight: 600, variant: "body1", children: n.zero_state_content_header }),
|
|
488
489
|
/* @__PURE__ */ e(Y, { color: "text.secondary", variant: "subtitle2", children: n.zero_state_content_description })
|
|
489
490
|
] })
|
|
490
491
|
] });
|
|
491
|
-
}),
|
|
492
|
+
}), Qn = M(({ onCtaClick: n }) => {
|
|
492
493
|
const { visibleAccounts: o } = ae(), { onEvent: t } = H(), { monthlyCategoryTotals: s, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: h } = F(), l = {
|
|
493
|
-
start:
|
|
494
|
+
start: ct(/* @__PURE__ */ new Date(), 1),
|
|
494
495
|
end: /* @__PURE__ */ new Date()
|
|
495
496
|
}, { trends: c } = R(), { selectedAccounts: d, setSelectedAccounts: m, isInitialized: C } = P();
|
|
496
497
|
i.useEffect(() => {
|
|
@@ -514,7 +515,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
514
515
|
), n();
|
|
515
516
|
};
|
|
516
517
|
return !h || !C ? /* @__PURE__ */ e(Q, {}) : /* @__PURE__ */ e(
|
|
517
|
-
|
|
518
|
+
pt,
|
|
518
519
|
{
|
|
519
520
|
className: "mx-trends-microwidget",
|
|
520
521
|
ctaLabel: c.micro_primary_cta_label,
|
|
@@ -560,14 +561,14 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
560
561
|
}), Pt = M(
|
|
561
562
|
({ isExpanded: n, onClick: o }) => {
|
|
562
563
|
const t = Ne();
|
|
563
|
-
return /* @__PURE__ */ e(
|
|
564
|
+
return /* @__PURE__ */ e(Tt, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(yt, { onClick: o, sx: { justifyContent: "center" }, children: /* @__PURE__ */ f(
|
|
564
565
|
_,
|
|
565
566
|
{
|
|
566
567
|
sx: { color: t.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
567
568
|
children: [
|
|
568
|
-
/* @__PURE__ */ e(
|
|
569
|
-
/* @__PURE__ */ e(
|
|
570
|
-
|
|
569
|
+
/* @__PURE__ */ e(bt, { children: /* @__PURE__ */ e(X, { bold: !0, variant: "body2", children: n ? "View less" : "View more" }) }),
|
|
570
|
+
/* @__PURE__ */ e(_t, { sx: { color: t.palette.primary.main }, children: n ? /* @__PURE__ */ e(ut, {}) : /* @__PURE__ */ e(
|
|
571
|
+
mt,
|
|
571
572
|
{
|
|
572
573
|
sx: {
|
|
573
574
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -607,7 +608,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
607
608
|
title: t
|
|
608
609
|
}
|
|
609
610
|
),
|
|
610
|
-
l && /* @__PURE__ */ e(
|
|
611
|
+
l && /* @__PURE__ */ e(St, { sx: { ml: h ? 24 : 68 } })
|
|
611
612
|
] }, o);
|
|
612
613
|
}
|
|
613
614
|
), Kt = M(
|
|
@@ -622,7 +623,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
622
623
|
...A
|
|
623
624
|
});
|
|
624
625
|
}, r = s.length + (m ? t.length : 0);
|
|
625
|
-
return /* @__PURE__ */ e(_, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ f(
|
|
626
|
+
return /* @__PURE__ */ e(_, { sx: { bgColor: "background.paper", width: "100%" }, children: /* @__PURE__ */ f(ft, { children: [
|
|
626
627
|
/* @__PURE__ */ e(_, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(De, { children: c.categories }) }),
|
|
627
628
|
s.map((g, T) => /* @__PURE__ */ e(
|
|
628
629
|
we,
|
|
@@ -635,7 +636,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
635
636
|
g.guid
|
|
636
637
|
)),
|
|
637
638
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
639
|
+
Ct,
|
|
639
640
|
{
|
|
640
641
|
in: m,
|
|
641
642
|
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
@@ -692,15 +693,15 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
692
693
|
"WeeklyNoSpendDays",
|
|
693
694
|
"WeeklySmallPurchasesSummary"
|
|
694
695
|
], jt = ({ onInsightCardClick: n }) => {
|
|
695
|
-
const o =
|
|
696
|
+
const o = wt(), { onEvent: t } = H(), { isMobile: s, isDesktop: a, isLargeDesktop: h } = K(), { beatStore: l, endpoint: c, sessionToken: d } = ve(), { isInitialized: m } = P(), [C, u] = i.useState(!1), b = o.palette.mode === "dark", r = a || h, g = r || s ? 1 : 2;
|
|
696
697
|
i.useEffect(() => {
|
|
697
698
|
m && l.loadBeats().finally(() => u(!0));
|
|
698
699
|
}, [m]);
|
|
699
700
|
const T = i.useMemo(() => C ? l.getFilteredBeats({ templates: $t }) : [], [C]), p = () => null, E = (D) => {
|
|
700
701
|
n?.(D), t(y.TRENDS_CLICK_INSIGHT, A);
|
|
701
702
|
}, w = r ? 200 : 170, I = r ? 170 : 124, k = T.length > 0 ? w : I;
|
|
702
|
-
return /* @__PURE__ */ e(
|
|
703
|
-
|
|
703
|
+
return /* @__PURE__ */ e(Dt, { sx: { height: k }, children: /* @__PURE__ */ e(
|
|
704
|
+
at,
|
|
704
705
|
{
|
|
705
706
|
areBeatsLoading: l.isLoading,
|
|
706
707
|
beats: T,
|
|
@@ -757,7 +758,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
757
758
|
const o = Ne(), { onEvent: t } = H(), { common: s, trends: a } = R(), { selectedCategoryData: h, selectedDateRangeMonthRange: l } = q(), { sortedTransactions: c } = re(), [d, m] = i.useState(null);
|
|
758
759
|
if (!h)
|
|
759
760
|
return null;
|
|
760
|
-
const { guid: C, name: u, is_income: b, totalAmount: r } = h, g = b ? a.category_income : a.category_spending, T =
|
|
761
|
+
const { guid: C, name: u, is_income: b, totalAmount: r } = h, g = b ? a.category_income : a.category_spending, T = Et(C, o), p = b ? a.income_label : a.spending_label, E = ` ${h.transactions.length === 1 ? a.transaction : a.transactions} (${h.transactions.length})`, w = i.useMemo(
|
|
761
762
|
() => c.find((D) => D.guid === d),
|
|
762
763
|
[d, c]
|
|
763
764
|
), I = (D) => D.category_guid === C || D.top_level_category_guid === C, k = () => {
|
|
@@ -773,7 +774,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
773
774
|
title: g,
|
|
774
775
|
children: [
|
|
775
776
|
/* @__PURE__ */ f(_, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
776
|
-
/* @__PURE__ */ f(
|
|
777
|
+
/* @__PURE__ */ f(It, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
777
778
|
/* @__PURE__ */ e(
|
|
778
779
|
Ee,
|
|
779
780
|
{
|
|
@@ -786,7 +787,7 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
786
787
|
/* @__PURE__ */ e(Ut, { chartColor: T, chartLabel: p }),
|
|
787
788
|
/* @__PURE__ */ f(_, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
788
789
|
/* @__PURE__ */ e(X, { bold: !0, variant: "body1", children: E }),
|
|
789
|
-
/* @__PURE__ */ e(
|
|
790
|
+
/* @__PURE__ */ e(Lt, { filter: I })
|
|
790
791
|
] })
|
|
791
792
|
] }),
|
|
792
793
|
/* @__PURE__ */ e(
|
|
@@ -860,13 +861,13 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
860
861
|
}
|
|
861
862
|
);
|
|
862
863
|
}, Jt = M(qt), en = ({ onBackClick: n, onInsightCardClick: o, sx: t }) => {
|
|
863
|
-
const { onEvent: s } = H(), { config: a } =
|
|
864
|
+
const { onEvent: s } = H(), { config: a } = nt(), { isLargeDesktop: h, isDesktop: l, isMobile: c } = K(), { visibleAccounts: d } = ae(), { loadDateRangeCategoryTotals: m, loadMonthlyCategoryTotals: C, monthlyCategoryTotals: u } = F(), { setFilter: b } = re(), { selectedDateRange: r, setSelectedCategoryData: g, setSelectedDateRange: T } = q(), {
|
|
864
865
|
isCopyLoaded: p,
|
|
865
866
|
isInitialized: E,
|
|
866
867
|
selectedAccounts: w,
|
|
867
868
|
selectedAccountGuids: I,
|
|
868
869
|
setSelectedAccounts: k
|
|
869
|
-
} = P(), { trends: D } = R(), N =
|
|
870
|
+
} = P(), { trends: D } = R(), N = xt(), x = l || h, [L, $] = i.useState(!1), [z, ie] = i.useState("Chart"), [J, ee] = i.useState(""), [te, ne] = i.useState(!1), [oe, ce] = i.useState(window.innerHeight), le = oe - 208, de = oe - (N ? 494 : 266);
|
|
870
871
|
i.useEffect(() => {
|
|
871
872
|
const v = () => ce(window.innerHeight);
|
|
872
873
|
return window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
@@ -1019,11 +1020,11 @@ const We = ({ selectedTab: n, onTabChange: o }) => /* @__PURE__ */ e(
|
|
|
1019
1020
|
]
|
|
1020
1021
|
}
|
|
1021
1022
|
);
|
|
1022
|
-
},
|
|
1023
|
+
}, qn = M(en);
|
|
1023
1024
|
export {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1025
|
+
Xn as TrendsFullWidget,
|
|
1026
|
+
Qn as TrendsMicroWidget,
|
|
1027
|
+
Zn as TrendsMiniWidget,
|
|
1028
|
+
to as TrendsStore,
|
|
1029
|
+
qn as TrendsWidget
|
|
1029
1030
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useState as n, useEffect as a } from "react";
|
|
2
|
+
import { e as o } from "./hooks-DlI63qSB.mjs";
|
|
3
|
+
const f = () => {
|
|
4
|
+
const { isInitialized: e, appDataStore: t } = o(), [s, i] = n(!1);
|
|
5
|
+
return a(() => {
|
|
6
|
+
e && t.clientInsightProfile?.is_enabled && i(!0);
|
|
7
|
+
}, [e, t.clientInsightProfile]), s;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
f as u
|
|
11
|
+
};
|