@mx-cartographer/experiences 9.4.24 → 9.4.26
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 +14 -0
- package/dist/accounts/components/AccountListItem.es.js +6 -6
- package/dist/accounts/components/AccountsListCompact.es.js +6 -6
- package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js +8 -8
- package/dist/budgets/components/addbudget/RecalculateBudgetRow.es.js +5 -5
- package/dist/budgets/components/addbudget/UnbudgetedRow.es.js +6 -6
- package/dist/categories/components/CategoryRow.es.js +8 -8
- package/dist/common/components/DataRow.es.js +9 -9
- package/dist/common/components/GlobalAccountFilter.es.js +115 -90
- package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
- package/dist/common/components/ListItemRow.es.js +1 -1
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +2 -1
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js +114 -99
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js.map +1 -1
- package/dist/common/components/globalaccountfilter/TriStateCheckbox.d.ts +17 -0
- package/dist/common/components/globalaccountfilter/TriStateCheckbox.es.js +18 -0
- package/dist/common/components/globalaccountfilter/TriStateCheckbox.es.js.map +1 -0
- package/dist/common/components/globalaccountfilter/selection.d.ts +17 -0
- package/dist/common/components/globalaccountfilter/selection.es.js +10 -0
- package/dist/common/components/globalaccountfilter/selection.es.js.map +1 -0
- package/dist/common/components/listitems/CollapseExpandListItem.es.js +4 -4
- package/dist/common/components/listitems/ToggleButtonListItem.es.js +8 -8
- package/dist/core/types/Insights.d.ts +2 -1
- package/dist/core/types/localization/AccountFilterCopy.d.ts +2 -2
- package/dist/finstrong/components/ProfileList.es.js +7 -7
- package/dist/finstrong/components/shared/Accounts.es.js +4 -4
- package/dist/goals/components/AccountSelectionDrawer.es.js +6 -6
- package/dist/goals/components/actions/AccountAction.es.js +4 -4
- package/dist/goals/components/actions/ChangeAccountAction.es.js +1 -1
- package/dist/goals/components/addgoal/AddGoalListItem.es.js +2 -2
- package/dist/goals/components/managegoals/CompleteListItem.es.js +6 -6
- package/dist/goals/components/managegoals/OngoingListItem.es.js +8 -8
- package/dist/help/components/requestsupport/PopularTopicsRow.es.js +8 -8
- package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.es.js +6 -6
- package/dist/insights/components/shared/MenuAction.es.js +4 -4
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +3 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +39 -37
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +80 -71
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +5 -3
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +61 -53
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +3 -1
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +28 -24
- package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
- package/dist/insights-v2/components/BaseLayout.es.js +39 -39
- package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
- package/dist/insights-v2/components/OverflowMenu.es.js +4 -4
- package/dist/insights-v2/components/SubHeader.es.js +4 -4
- package/dist/insights-v2/components/SubHeader.es.js.map +1 -1
- package/dist/merchants/components/MerchantLookup.es.js +6 -6
- package/dist/networth/components/AssetsLiabilitiesDetail.es.js +1 -1
- package/dist/recurringtransactions/components/RecurrenceRow.es.js +6 -6
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js +4 -4
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.es.js +6 -6
- package/dist/settings/components/transactionrules/components/RuleListItem.es.js +4 -4
- package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.es.js +5 -5
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.es.js +11 -11
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.es.js +9 -9
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.es.js +9 -9
- package/dist/transactions/components/shared/transactionlist/TransactionRow.es.js +4 -4
- package/dist/transactions/components/tagmanager/TagRow.es.js +4 -4
- package/dist/trends/components/CategoryDetails.es.js +4 -4
- package/package.json +1 -1
|
@@ -11,19 +11,19 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
11
11
|
import T from "@mui/material/IconButton";
|
|
12
12
|
import { fromUnixTime as b } from "date-fns/fromUnixTime";
|
|
13
13
|
import A from "@mui/material/ListItem";
|
|
14
|
-
import I from "@mui/material/
|
|
15
|
-
import v from "@mui/material/
|
|
16
|
-
import C from "@mui/material/
|
|
17
|
-
import E from "@mui/material/
|
|
14
|
+
import I from "@mui/material/Avatar";
|
|
15
|
+
import v from "@mui/material/ListItemAvatar";
|
|
16
|
+
import C from "@mui/material/ListItemButton";
|
|
17
|
+
import E from "@mui/material/ListItemText";
|
|
18
18
|
var W = ({ goal: t, index: a, onUpClick: c }) => {
|
|
19
19
|
const { goals: e } = h(), { percentage: s } = y(e, t), l = t.goal_type === _.KEEP_BALANCE_BELOW || t.has_been_spent ? e.goal_completed : m(e.goal_percentage_reached, `${s * 100}`);
|
|
20
|
-
return /* @__PURE__ */ r(A, { children: /* @__PURE__ */ i(
|
|
20
|
+
return /* @__PURE__ */ r(A, { children: /* @__PURE__ */ i(C, {
|
|
21
21
|
disableRipple: !0,
|
|
22
22
|
sx: {
|
|
23
23
|
":hover": { backgroundColor: "unset" },
|
|
24
24
|
cursor: "default"
|
|
25
25
|
},
|
|
26
|
-
children: [t.track_type !== n.RETIREMENT_TRACK && /* @__PURE__ */ r(
|
|
26
|
+
children: [t.track_type !== n.RETIREMENT_TRACK && /* @__PURE__ */ r(v, {
|
|
27
27
|
sx: {
|
|
28
28
|
alignItems: "center",
|
|
29
29
|
display: "flex",
|
|
@@ -39,7 +39,7 @@ var W = ({ goal: t, index: a, onUpClick: c }) => {
|
|
|
39
39
|
color: "primary",
|
|
40
40
|
size: 24
|
|
41
41
|
})
|
|
42
|
-
}) : /* @__PURE__ */ r(
|
|
42
|
+
}) : /* @__PURE__ */ r(I, {
|
|
43
43
|
sx: {
|
|
44
44
|
bgcolor: "text.primary",
|
|
45
45
|
height: "16px",
|
|
@@ -51,7 +51,7 @@ var W = ({ goal: t, index: a, onUpClick: c }) => {
|
|
|
51
51
|
children: a + 1
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
|
-
}), /* @__PURE__ */ r(
|
|
54
|
+
}), /* @__PURE__ */ r(E, {
|
|
55
55
|
slotProps: { primary: { variant: "body1" } },
|
|
56
56
|
children: /* @__PURE__ */ i(p, {
|
|
57
57
|
alignItems: "center",
|
|
@@ -2,23 +2,23 @@ import { InstitutionLogo as s } from "@mxenabled/mxui";
|
|
|
2
2
|
import { ChevronRight as a } from "@mxenabled/mx-icons";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import p from "@mui/material/ListItem";
|
|
5
|
-
import l from "@mui/material/
|
|
6
|
-
import d from "@mui/material/
|
|
7
|
-
import c from "@mui/material/
|
|
8
|
-
import f from "@mui/material/
|
|
5
|
+
import l from "@mui/material/ListItemAvatar";
|
|
6
|
+
import d from "@mui/material/ListItemButton";
|
|
7
|
+
import c from "@mui/material/ListItemIcon";
|
|
8
|
+
import f from "@mui/material/ListItemText";
|
|
9
9
|
var P = ({ name: r, onClick: o, subtitle: m, guid: i, sx: e }) => /* @__PURE__ */ t(p, {
|
|
10
10
|
disableGutters: !0,
|
|
11
11
|
disablePadding: !0,
|
|
12
|
-
children: /* @__PURE__ */ n(
|
|
12
|
+
children: /* @__PURE__ */ n(d, {
|
|
13
13
|
"aria-label": r,
|
|
14
14
|
onClick: o,
|
|
15
15
|
children: [
|
|
16
|
-
i && /* @__PURE__ */ t(
|
|
16
|
+
i && /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(s, {
|
|
17
17
|
alt: r,
|
|
18
18
|
institutionGuid: i || "",
|
|
19
19
|
size: 32
|
|
20
20
|
}) }),
|
|
21
|
-
/* @__PURE__ */ t(
|
|
21
|
+
/* @__PURE__ */ t(f, {
|
|
22
22
|
primary: r,
|
|
23
23
|
secondary: m,
|
|
24
24
|
slotProps: {
|
|
@@ -29,7 +29,7 @@ var P = ({ name: r, onClick: o, subtitle: m, guid: i, sx: e }) => /* @__PURE__ *
|
|
|
29
29
|
secondary: { variant: "caption" }
|
|
30
30
|
}
|
|
31
31
|
}),
|
|
32
|
-
/* @__PURE__ */ t(
|
|
32
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(a, {}) })
|
|
33
33
|
]
|
|
34
34
|
})
|
|
35
35
|
});
|
|
@@ -6,8 +6,8 @@ import n from "@mui/material/Box";
|
|
|
6
6
|
import d from "@mui/material/IconButton";
|
|
7
7
|
import p from "@mui/material/List";
|
|
8
8
|
import m from "@mui/material/ListItem";
|
|
9
|
-
import h from "@mui/material/
|
|
10
|
-
import f from "@mui/material/
|
|
9
|
+
import h from "@mui/material/ListItemIcon";
|
|
10
|
+
import f from "@mui/material/ListItemText";
|
|
11
11
|
var L = ({ copy: r, sendResponseAnalytics: s }) => /* @__PURE__ */ e(a, {
|
|
12
12
|
height: "100%",
|
|
13
13
|
justifyContent: "space-between",
|
|
@@ -36,12 +36,12 @@ var L = ({ copy: r, sendResponseAnalytics: s }) => /* @__PURE__ */ e(a, {
|
|
|
36
36
|
mb: 12,
|
|
37
37
|
minHeight: "unset"
|
|
38
38
|
},
|
|
39
|
-
children: [/* @__PURE__ */ e(
|
|
39
|
+
children: [/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(o, {
|
|
40
40
|
color: "success",
|
|
41
41
|
name: "check_circle",
|
|
42
42
|
size: 16,
|
|
43
43
|
sx: { lineHeight: 1.2 }
|
|
44
|
-
}) }), /* @__PURE__ */ e(
|
|
44
|
+
}) }), /* @__PURE__ */ e(f, {
|
|
45
45
|
disableTypography: !0,
|
|
46
46
|
secondary: i,
|
|
47
47
|
sx: {
|
|
@@ -82,10 +82,10 @@ var L = ({ copy: r, sendResponseAnalytics: s }) => /* @__PURE__ */ e(a, {
|
|
|
82
82
|
mb: 24,
|
|
83
83
|
p: 16
|
|
84
84
|
},
|
|
85
|
-
children: [/* @__PURE__ */ e(
|
|
85
|
+
children: [/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(o, {
|
|
86
86
|
name: i.icon_name,
|
|
87
87
|
size: 24
|
|
88
|
-
}) }), /* @__PURE__ */ e(
|
|
88
|
+
}) }), /* @__PURE__ */ e(f, {
|
|
89
89
|
primary: i.title,
|
|
90
90
|
secondary: i.content,
|
|
91
91
|
sx: { "& > p": {
|
|
@@ -2,8 +2,8 @@ import { useState as g } from "react";
|
|
|
2
2
|
import { Icon as I } from "@mxenabled/mx-icons";
|
|
3
3
|
import { Fragment as z, jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
import M from "@mui/material/IconButton";
|
|
5
|
-
import v from "@mui/material/
|
|
6
|
-
import L from "@mui/material/
|
|
5
|
+
import v from "@mui/material/ListItemIcon";
|
|
6
|
+
import L from "@mui/material/ListItemText";
|
|
7
7
|
import O from "@mui/material/MenuItem";
|
|
8
8
|
import S from "@mui/material/Menu";
|
|
9
9
|
var P = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p, onOpen: c, tabIndex: h = 0, ...d }) => {
|
|
@@ -47,10 +47,10 @@ var P = ({ ariaHidden: l = !1, ariaLabel: m, menuItems: s = [], onItemClick: p,
|
|
|
47
47
|
children: s.map(({ icon: t, key: r, text: u }, x) => /* @__PURE__ */ a(O, {
|
|
48
48
|
onClick: () => f(x, r),
|
|
49
49
|
sx: { p: 12 },
|
|
50
|
-
children: [/* @__PURE__ */ o(
|
|
50
|
+
children: [/* @__PURE__ */ o(v, {
|
|
51
51
|
sx: { minWidth: "32px !important" },
|
|
52
52
|
children: t
|
|
53
|
-
}), /* @__PURE__ */ o(
|
|
53
|
+
}), /* @__PURE__ */ o(L, {
|
|
54
54
|
primary: u,
|
|
55
55
|
slotProps: { primary: {
|
|
56
56
|
fontWeight: "normal",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { TipSectionProps } from '../../../insights/components/shared/ChartDrawerTemplate/TipSection';
|
|
2
3
|
import { Transaction } from '../../../core';
|
|
3
4
|
interface TabItem {
|
|
4
5
|
label: string;
|
|
@@ -12,12 +13,13 @@ interface TransactionDrillDownProps {
|
|
|
12
13
|
tabs?: TabItem[];
|
|
13
14
|
selectedIndex: number;
|
|
14
15
|
top: React.ReactNode;
|
|
16
|
+
tipSection?: TipSectionProps | false;
|
|
15
17
|
onSelectionChange?: (selectedIndex: number) => void;
|
|
16
18
|
onEachRowClick?: (guid: string) => void;
|
|
17
19
|
transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean;
|
|
18
20
|
baseTransactions?: Transaction[];
|
|
19
21
|
}
|
|
20
|
-
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, onEachRowClick, baseTransactions, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
22
|
+
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
21
23
|
displayName: string;
|
|
22
24
|
};
|
|
23
25
|
export default TransactionDrillDown;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import { exportTransactionsToCSV as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { useGlobalCopyStore as $, useGlobalUiStore as j, useTransactionStore as G } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { exportTransactionsToCSV as P } from "../../../core/utils/TransactionUtils.es.js";
|
|
3
|
+
import A from "../../../common/components/Loader.es.js";
|
|
4
|
+
import E from "../../../transactions/components/shared/TransactionList.es.js";
|
|
5
|
+
import { TipSection as N } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
|
|
5
6
|
import "react";
|
|
6
|
-
import { observer as
|
|
7
|
+
import { observer as R } from "mobx-react-lite";
|
|
7
8
|
import c from "@mui/material/Stack";
|
|
8
|
-
import { H3 as
|
|
9
|
-
import
|
|
10
|
-
import { Icon as
|
|
9
|
+
import { H3 as U, Text as m } from "@mxenabled/mxui";
|
|
10
|
+
import V from "@mui/material/Button";
|
|
11
|
+
import { Icon as q } from "@mxenabled/mx-icons";
|
|
11
12
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
12
13
|
import p from "@mui/material/Box";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
const { transactions: l } =
|
|
17
|
-
if (!
|
|
18
|
-
const s = !!b?.length,
|
|
19
|
-
|
|
20
|
-
},
|
|
14
|
+
import z from "@mui/material/Tab";
|
|
15
|
+
import J from "@mui/material/Tabs";
|
|
16
|
+
var v = "transaction-drill-down-panel", T = (d) => `transaction-details-tab-${d}`, lo = R(function({ ariaLabel: y, heading: i, subHeadingText: n, icon: C, tabs: b, selectedIndex: e, top: g, onSelectionChange: _, transactionFilter: f, tipSection: h, onEachRowClick: w, baseTransactions: D }) {
|
|
17
|
+
const { transactions: l } = $(), { isCopyLoaded: S } = j(), { sortedTransactionsWithSplits: L, tags: B, detailedTransactions: I } = G();
|
|
18
|
+
if (!S) return /* @__PURE__ */ o(A, {});
|
|
19
|
+
const s = !!b?.length, k = y ?? l.transactions_title, W = (t, a) => {
|
|
20
|
+
_?.(a);
|
|
21
|
+
}, x = f ? (D ?? I).filter(f(e)) : void 0, u = x ?? L;
|
|
21
22
|
return /* @__PURE__ */ r(p, {
|
|
22
23
|
sx: {
|
|
23
24
|
bgcolor: "background.paper",
|
|
24
25
|
width: "100%"
|
|
25
26
|
},
|
|
26
|
-
children: [s && /* @__PURE__ */ o(
|
|
27
|
-
"aria-label":
|
|
28
|
-
onChange:
|
|
27
|
+
children: [s && /* @__PURE__ */ o(J, {
|
|
28
|
+
"aria-label": k,
|
|
29
|
+
onChange: W,
|
|
29
30
|
value: e,
|
|
30
31
|
variant: "fullWidth",
|
|
31
|
-
children: b.map((t, a) => /* @__PURE__ */ o(
|
|
32
|
-
"aria-controls":
|
|
32
|
+
children: b.map((t, a) => /* @__PURE__ */ o(z, {
|
|
33
|
+
"aria-controls": v,
|
|
33
34
|
"aria-label": t.ariaLabel,
|
|
34
|
-
id:
|
|
35
|
+
id: T(a),
|
|
35
36
|
label: t.label,
|
|
36
37
|
sx: {
|
|
37
38
|
minWidth: "auto",
|
|
@@ -39,8 +40,8 @@ var u = "transaction-drill-down-panel", v = (m) => `transaction-details-tab-${m}
|
|
|
39
40
|
}
|
|
40
41
|
}, `${t.label}-${a}`))
|
|
41
42
|
}), /* @__PURE__ */ r(p, {
|
|
42
|
-
"aria-labelledby": s ?
|
|
43
|
-
id:
|
|
43
|
+
"aria-labelledby": s ? T(e) : void 0,
|
|
44
|
+
id: v,
|
|
44
45
|
role: s ? "tabpanel" : void 0,
|
|
45
46
|
children: [
|
|
46
47
|
(i || n) && /* @__PURE__ */ r(c, {
|
|
@@ -49,13 +50,13 @@ var u = "transaction-drill-down-panel", v = (m) => `transaction-details-tab-${m}
|
|
|
49
50
|
pt: 16,
|
|
50
51
|
px: 24
|
|
51
52
|
},
|
|
52
|
-
children: [i && /* @__PURE__ */ o(
|
|
53
|
+
children: [i && /* @__PURE__ */ o(U, { children: i }), n && /* @__PURE__ */ r(c, {
|
|
53
54
|
sx: {
|
|
54
55
|
alignItems: "center",
|
|
55
56
|
flexDirection: "row",
|
|
56
57
|
gap: 8
|
|
57
58
|
},
|
|
58
|
-
children: [
|
|
59
|
+
children: [C, /* @__PURE__ */ o(m, {
|
|
59
60
|
textTransform: "uppercase",
|
|
60
61
|
variant: "body2",
|
|
61
62
|
children: n
|
|
@@ -64,8 +65,9 @@ var u = "transaction-drill-down-panel", v = (m) => `transaction-details-tab-${m}
|
|
|
64
65
|
}),
|
|
65
66
|
/* @__PURE__ */ o(p, {
|
|
66
67
|
sx: { pt: 16 },
|
|
67
|
-
children:
|
|
68
|
+
children: g
|
|
68
69
|
}),
|
|
70
|
+
h && /* @__PURE__ */ o(N, { ...h }),
|
|
69
71
|
/* @__PURE__ */ r(c, {
|
|
70
72
|
sx: {
|
|
71
73
|
alignItems: "center",
|
|
@@ -78,34 +80,34 @@ var u = "transaction-drill-down-panel", v = (m) => `transaction-details-tab-${m}
|
|
|
78
80
|
pt: 16,
|
|
79
81
|
px: 24
|
|
80
82
|
},
|
|
81
|
-
children: [/* @__PURE__ */ o(
|
|
83
|
+
children: [/* @__PURE__ */ o(m, {
|
|
82
84
|
bold: !0,
|
|
83
85
|
variant: "body1",
|
|
84
86
|
children: l.transactions_title
|
|
85
|
-
}),
|
|
87
|
+
}), u.length > 0 && /* @__PURE__ */ o(V, {
|
|
86
88
|
onClick: () => {
|
|
87
|
-
|
|
89
|
+
P(u, B);
|
|
88
90
|
},
|
|
89
|
-
startIcon: /* @__PURE__ */ o(
|
|
91
|
+
startIcon: /* @__PURE__ */ o(q, { name: "ios_share" }),
|
|
90
92
|
sx: { height: 28 },
|
|
91
|
-
children: /* @__PURE__ */ o(
|
|
93
|
+
children: /* @__PURE__ */ o(m, {
|
|
92
94
|
bold: !0,
|
|
93
95
|
variant: "body2",
|
|
94
96
|
children: l.export_csv_btn
|
|
95
97
|
})
|
|
96
98
|
})]
|
|
97
99
|
}),
|
|
98
|
-
/* @__PURE__ */ o(
|
|
99
|
-
transaction:
|
|
100
|
-
onClick:
|
|
100
|
+
/* @__PURE__ */ o(E, {
|
|
101
|
+
transaction: x,
|
|
102
|
+
onClick: w
|
|
101
103
|
})
|
|
102
104
|
]
|
|
103
105
|
})]
|
|
104
106
|
});
|
|
105
107
|
});
|
|
106
108
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
lo as TransactionDrillDown,
|
|
110
|
+
lo as default
|
|
109
111
|
};
|
|
110
112
|
|
|
111
113
|
//# sourceMappingURL=TransactionDrillDown.es.js.map
|
package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionDrillDown.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport { observer } from 'mobx-react-lite'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport { Loader, useGlobalCopyStore, useGlobalUiStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { TransactionList } from '../../../transactions'\n\ninterface TabItem {\n label: string\n ariaLabel?: string\n}\n\nconst PANEL_ID = 'transaction-drill-down-panel'\nconst tabId = (index: number) => `transaction-details-tab-${index}`\n\ninterface TransactionDrillDownProps {\n ariaLabel?: string\n heading?: string\n subHeadingText?: string\n icon?: React.ReactNode\n tabs?: TabItem[]\n selectedIndex: number\n top: React.ReactNode\n onSelectionChange?: (selectedIndex: number) => void\n onEachRowClick?: (guid: string) => void\n transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean\n baseTransactions?: Transaction[]\n}\n\nexport const TransactionDrillDown = observer(function TransactionDrillDown({\n ariaLabel,\n heading,\n subHeadingText,\n icon,\n tabs,\n selectedIndex,\n top,\n onSelectionChange,\n transactionFilter,\n onEachRowClick,\n baseTransactions,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { isCopyLoaded } = useGlobalUiStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n if (!isCopyLoaded) return <Loader />\n\n const hasTabs = !!tabs?.length\n const tablistLabel = ariaLabel ?? transactionsCopy.transactions_title\n\n const handlePrimaryChange = (_event: React.SyntheticEvent, newValue: number) => {\n onSelectionChange?.(newValue)\n }\n\n const filteredTransactions = transactionFilter\n ? (baseTransactions ?? detailedTransactions).filter(transactionFilter(selectedIndex))\n : undefined\n\n const exportTransactions = filteredTransactions ?? sortedTransactionsWithSplits\n\n return (\n <Box sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {hasTabs && (\n <Tabs\n aria-label={tablistLabel}\n onChange={handlePrimaryChange}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs!.map((tab, index) => (\n <Tab\n aria-controls={PANEL_ID}\n aria-label={tab.ariaLabel}\n id={tabId(index)}\n key={`${tab.label}-${index}`}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )}\n\n <Box\n aria-labelledby={hasTabs ? tabId(selectedIndex) : undefined}\n id={PANEL_ID}\n role={hasTabs ? 'tabpanel' : undefined}\n >\n {(heading || subHeadingText) && (\n <Stack sx={{ gap: 4, pt: 16, px: 24 }}>\n {heading && <H3>{heading}</H3>}\n {subHeadingText && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n {icon}\n <Text textTransform=\"uppercase\" variant=\"body2\">\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n )}\n\n <Box sx={{ pt: 16 }}>{top}</Box>\n\n <Stack\n sx={{\n alignItems: 'center',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n pb: 4,\n pt: 16,\n px: 24,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {transactionsCopy.transactions_title}\n </Text>\n {exportTransactions.length > 0 && (\n <Button\n onClick={() => {\n exportTransactionsToCSV(exportTransactions, tags)\n }}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransactionDrillDown.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\nimport { observer } from 'mobx-react-lite'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { H3, Text } from '@mxenabled/mxui'\n\nimport {\n TipSection,\n type TipSectionProps,\n} from '../../../insights/components/shared/ChartDrawerTemplate/TipSection'\nimport { Loader, useGlobalCopyStore, useGlobalUiStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { TransactionList } from '../../../transactions'\n\ninterface TabItem {\n label: string\n ariaLabel?: string\n}\n\nconst PANEL_ID = 'transaction-drill-down-panel'\nconst tabId = (index: number) => `transaction-details-tab-${index}`\n\ninterface TransactionDrillDownProps {\n ariaLabel?: string\n heading?: string\n subHeadingText?: string\n icon?: React.ReactNode\n tabs?: TabItem[]\n selectedIndex: number\n top: React.ReactNode\n tipSection?: TipSectionProps | false\n onSelectionChange?: (selectedIndex: number) => void\n onEachRowClick?: (guid: string) => void\n transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean\n baseTransactions?: Transaction[]\n}\n\nexport const TransactionDrillDown = observer(function TransactionDrillDown({\n ariaLabel,\n heading,\n subHeadingText,\n icon,\n tabs,\n selectedIndex,\n top,\n onSelectionChange,\n transactionFilter,\n tipSection,\n onEachRowClick,\n baseTransactions,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { isCopyLoaded } = useGlobalUiStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n if (!isCopyLoaded) return <Loader />\n\n const hasTabs = !!tabs?.length\n const tablistLabel = ariaLabel ?? transactionsCopy.transactions_title\n\n const handlePrimaryChange = (_event: React.SyntheticEvent, newValue: number) => {\n onSelectionChange?.(newValue)\n }\n\n const filteredTransactions = transactionFilter\n ? (baseTransactions ?? detailedTransactions).filter(transactionFilter(selectedIndex))\n : undefined\n\n const exportTransactions = filteredTransactions ?? sortedTransactionsWithSplits\n\n return (\n <Box sx={{ bgcolor: 'background.paper', width: '100%' }}>\n {hasTabs && (\n <Tabs\n aria-label={tablistLabel}\n onChange={handlePrimaryChange}\n value={selectedIndex}\n variant=\"fullWidth\"\n >\n {tabs!.map((tab, index) => (\n <Tab\n aria-controls={PANEL_ID}\n aria-label={tab.ariaLabel}\n id={tabId(index)}\n key={`${tab.label}-${index}`}\n label={tab.label}\n sx={{ minWidth: 'auto', px: 0 }}\n />\n ))}\n </Tabs>\n )}\n\n <Box\n aria-labelledby={hasTabs ? tabId(selectedIndex) : undefined}\n id={PANEL_ID}\n role={hasTabs ? 'tabpanel' : undefined}\n >\n {(heading || subHeadingText) && (\n <Stack sx={{ gap: 4, pt: 16, px: 24 }}>\n {heading && <H3>{heading}</H3>}\n {subHeadingText && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n {icon}\n <Text textTransform=\"uppercase\" variant=\"body2\">\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n )}\n\n <Box sx={{ pt: 16 }}>{top}</Box>\n\n {/* TODO: need to use a nseperate compnent from insight-v2, for now using insights-shared component which will be shifted under insights-v2 in future */}\n {tipSection && <TipSection {...tipSection} />}\n\n <Stack\n sx={{\n alignItems: 'center',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: 1,\n flexDirection: 'row',\n justifyContent: 'space-between',\n pb: 4,\n pt: 16,\n px: 24,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {transactionsCopy.transactions_title}\n </Text>\n {exportTransactions.length > 0 && (\n <Button\n onClick={() => {\n exportTransactionsToCSV(exportTransactions, tags)\n }}\n startIcon={<Icon name=\"ios_share\" />}\n sx={{ height: 28 }}\n >\n <Text bold={true} variant=\"body2\">\n {transactionsCopy.export_csv_btn}\n </Text>\n </Button>\n )}\n </Stack>\n\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IAiB/C,KAAuB,EAAS,SAA8B,EACzE,WAAA,GACA,SAAA,GACA,gBAAA,GACA,MAAA,GACA,MAAA,GACA,eAAA,GACA,KAAA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AA,YACd,CAAA;AAAA,UACA,CAAA,CAEL;AAAA;QAEP,gBAAA,EAAC,GAAD;AAAA,UAAiB,aAAa;AAAA,UAAsB,SAAS;AAAA,QAAiB,CAAA;AAAA,MAC3E;AAAA,IACF,CAAA,CAAA;AAAA;AAET,CAAC"}
|
|
@@ -1,105 +1,114 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import
|
|
3
|
-
import { formatCurrency as
|
|
4
|
-
import
|
|
5
|
-
import { BarChartV2 as
|
|
6
|
-
import { EmptyBarChart as
|
|
7
|
-
import { TransactionDrillDown as
|
|
8
|
-
import { useTransactionHistory as
|
|
9
|
-
import { getDefaultSelection as
|
|
10
|
-
import { TransactionDetailsBlock as
|
|
11
|
-
import { useLayoutEffect as
|
|
12
|
-
import { observer as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useTheme as
|
|
15
|
-
var
|
|
16
|
-
const
|
|
1
|
+
import { useGlobalCopyStore as Q, useGlobalUiStore as W, useInsightsV2Store as X } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import Y from "../../../common/components/drawer/Drawer.es.js";
|
|
3
|
+
import { formatCurrency as Z } from "../../../core/utils/NumberFormatting.es.js";
|
|
4
|
+
import tt from "../../../common/components/Loader.es.js";
|
|
5
|
+
import { BarChartV2 as et } from "../../components/chartblocks/BarchartV2.es.js";
|
|
6
|
+
import { EmptyBarChart as at } from "../../components/chartblocks/EmptyBarChart.es.js";
|
|
7
|
+
import { TransactionDrillDown as ot } from "./TransactionDrillDown.es.js";
|
|
8
|
+
import { useTransactionHistory as nt } from "./useTransactionHistory.es.js";
|
|
9
|
+
import { getDefaultSelection as rt, getDrillDownConfig as it, getFlattenedDataSeries as st, toStoreFilter as lt } from "./utils.es.js";
|
|
10
|
+
import { TransactionDetailsBlock as ct } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
11
|
+
import { useLayoutEffect as dt, useState as u } from "react";
|
|
12
|
+
import { observer as mt } from "mobx-react-lite";
|
|
13
|
+
import { Fragment as gt, jsx as o, jsxs as pt } from "react/jsx-runtime";
|
|
14
|
+
import { useTheme as ut } from "@mui/material/styles";
|
|
15
|
+
var It = mt(({ beat: a }) => {
|
|
16
|
+
const b = ut(), { instanceSlotData: e, beatTransactions: s, spendCategoryGuids: h, allAccountGuids: f, categoryName: v, displayedDateRange: m, transactionStore: x } = nt(a), { actionDrawer: y, setActionContext: C } = X(), { common: B, insights_feed: l } = Q(), { isCopyLoaded: F } = W(), [I, T] = u(!1), [G, A] = u(!1), { insights_payload: n } = a, j = y.trigger === "secondaryCta" ? n?.secondary_cta?.variant : n?.primary_cta?.variant, { top: g, filterMode: c, header: k, colors: w, filterStrategy: H, tipSection: S } = it(j ?? ""), { dataSeries: d, chartData: r, comparisonBars: E } = st({
|
|
17
17
|
data: e?.data_series,
|
|
18
18
|
ariaLabel: e?.ariaLabel ?? "",
|
|
19
|
-
top:
|
|
20
|
-
beatTransactions:
|
|
19
|
+
top: g,
|
|
20
|
+
beatTransactions: s,
|
|
21
21
|
payload: e
|
|
22
|
-
}), { chartBarIndex:
|
|
22
|
+
}), { chartBarIndex: K, subTabIndex: O } = rt({
|
|
23
23
|
chartTabCount: r.length,
|
|
24
|
-
comparisonTabCount:
|
|
25
|
-
actionDrawer:
|
|
24
|
+
comparisonTabCount: E.length,
|
|
25
|
+
actionDrawer: y,
|
|
26
26
|
beatGuid: a.guid
|
|
27
|
-
}), [
|
|
27
|
+
}), [i, _] = u(K), D = (t) => H({
|
|
28
28
|
beat: a,
|
|
29
|
-
beatTransactions:
|
|
30
|
-
dataSeries:
|
|
29
|
+
beatTransactions: s,
|
|
30
|
+
dataSeries: d,
|
|
31
31
|
selectedIndex: t,
|
|
32
|
-
subIndex:
|
|
33
|
-
isLastTab: t ===
|
|
32
|
+
subIndex: O,
|
|
33
|
+
isLastTab: t === d.length - 1,
|
|
34
34
|
instanceSlotData: e,
|
|
35
|
-
spendCategoryGuids:
|
|
36
|
-
displayedDateRange:
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
allAccountGuids:
|
|
40
|
-
displayedDateRange:
|
|
35
|
+
spendCategoryGuids: h,
|
|
36
|
+
displayedDateRange: m
|
|
37
|
+
}), V = s.map((t) => t.guid).join(","), R = h.join(","), M = f.join(","), L = () => {
|
|
38
|
+
c !== "store" || !d.length || x.setFilter(lt(D(i), {
|
|
39
|
+
allAccountGuids: f,
|
|
40
|
+
displayedDateRange: m
|
|
41
41
|
}));
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
dt(() => {
|
|
44
|
+
L();
|
|
45
45
|
}, [
|
|
46
46
|
a.guid,
|
|
47
|
-
|
|
48
|
-
s,
|
|
49
|
-
l.length,
|
|
50
|
-
e,
|
|
47
|
+
i,
|
|
51
48
|
c,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
d.length,
|
|
50
|
+
e,
|
|
51
|
+
m,
|
|
52
|
+
R,
|
|
53
|
+
M,
|
|
54
|
+
V
|
|
55
55
|
]);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
const p = k?.({
|
|
57
|
+
title: n?.title,
|
|
58
|
+
subHeader: n?.sub_title,
|
|
59
59
|
categoryName: v,
|
|
60
|
-
selectedDate: r[
|
|
61
|
-
}),
|
|
60
|
+
selectedDate: r[i]?.date ?? void 0
|
|
61
|
+
}), N = w(b, e?.category_guid);
|
|
62
|
+
if (!F) return /* @__PURE__ */ o(tt, {});
|
|
63
|
+
const P = [l.general.monthly_amount, l.general.trend], [U, $] = e?.legends?.length ? e.legends.map((t) => t.label) : P, q = c === "local" ? (t) => D(t).custom ?? (() => !0) : void 0, z = c === "local" ? s : void 0, J = g === "singleBar" || g === "upcomingBill" ? r.length ? /* @__PURE__ */ o(et, {
|
|
62
64
|
amounts: {
|
|
63
65
|
average: e?.average_amount,
|
|
64
|
-
formattedAverage:
|
|
66
|
+
formattedAverage: Z(e?.average_amount ?? 0, "0,0.00")
|
|
65
67
|
},
|
|
66
|
-
color:
|
|
68
|
+
color: N[0] ?? b.palette.primary.main,
|
|
67
69
|
data: r,
|
|
68
70
|
legendPosition: "top",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
margin: {
|
|
72
|
+
bottom: 30,
|
|
73
|
+
top: 20,
|
|
74
|
+
left: 24,
|
|
75
|
+
right: 24
|
|
76
|
+
},
|
|
77
|
+
monthlyAmountLabel: U,
|
|
78
|
+
onBarClick: _,
|
|
79
|
+
selectedTabIndex: i,
|
|
80
|
+
trendAmountLabel: $
|
|
81
|
+
}) : /* @__PURE__ */ o(at, {}) : null;
|
|
82
|
+
return /* @__PURE__ */ pt(gt, { children: [/* @__PURE__ */ o(ot, {
|
|
75
83
|
ariaLabel: e?.ariaLabel,
|
|
76
|
-
baseTransactions:
|
|
77
|
-
heading:
|
|
78
|
-
icon:
|
|
79
|
-
onSelectionChange:
|
|
80
|
-
selectedIndex:
|
|
81
|
-
subHeadingText:
|
|
84
|
+
baseTransactions: z,
|
|
85
|
+
heading: p?.heading,
|
|
86
|
+
icon: p?.icon,
|
|
87
|
+
onSelectionChange: _,
|
|
88
|
+
selectedIndex: i,
|
|
89
|
+
subHeadingText: p?.subHeadingText,
|
|
82
90
|
tabs: r.map((t) => ({
|
|
83
91
|
ariaLabel: t.ariaLabel,
|
|
84
92
|
label: t.label
|
|
85
93
|
})),
|
|
86
|
-
top:
|
|
87
|
-
|
|
94
|
+
top: J,
|
|
95
|
+
...S && { tipSection: !G && S(A, l, n?.sub_title?.text) },
|
|
96
|
+
transactionFilter: q,
|
|
88
97
|
onEachRowClick: (t) => {
|
|
89
|
-
|
|
98
|
+
C({ transaction_guid: t }), T(!0);
|
|
90
99
|
}
|
|
91
|
-
}), /* @__PURE__ */ o(
|
|
92
|
-
ariaLabelClose:
|
|
93
|
-
isOpen:
|
|
100
|
+
}), /* @__PURE__ */ o(Y, {
|
|
101
|
+
ariaLabelClose: B.close_aria,
|
|
102
|
+
isOpen: I,
|
|
94
103
|
onClose: () => {
|
|
95
|
-
|
|
104
|
+
T(!1), C({ transaction_guid: void 0 }), L();
|
|
96
105
|
},
|
|
97
|
-
title:
|
|
98
|
-
children: /* @__PURE__ */ o(
|
|
99
|
-
})] })
|
|
106
|
+
title: l.general.transaction_details_title,
|
|
107
|
+
children: /* @__PURE__ */ o(ct, { beat: a })
|
|
108
|
+
})] });
|
|
100
109
|
});
|
|
101
110
|
export {
|
|
102
|
-
|
|
111
|
+
It as TransactionHistoryBlock
|
|
103
112
|
};
|
|
104
113
|
|
|
105
114
|
//# sourceMappingURL=TransactionHistoryBlock.es.js.map
|
package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionHistoryBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.tsx"],"sourcesContent":["import { useLayoutEffect, useState } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\nimport { observer } from 'mobx-react-lite'\n\nimport type { Beat, DataSeries, Transaction } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n toStoreFilter,\n} from './utils'\nimport { Drawer, useInsightsV2Store, useGlobalCopyStore, useGlobalUiStore, Loader } from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\n\ninterface TransactionHistoryProp {\n beat: Beat\n}\n\nexport const TransactionHistoryBlock = observer(({ beat }: TransactionHistoryProp) => {\n const theme = useTheme()\n const {\n instanceSlotData,\n beatTransactions,\n primaryTransaction,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(beat)\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n\n const { isCopyLoaded } = useGlobalUiStore()\n\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n\n const { insights_payload } = beat\n\n const dynamicCtaVariant =\n actionDrawer.trigger === 'secondaryCta'\n ? insights_payload?.secondary_cta?.variant\n : insights_payload?.primary_cta?.variant\n\n const { top, filterMode, header, colors, filterStrategy } = getDrillDownConfig(\n dynamicCtaVariant ?? '',\n )\n\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel: instanceSlotData?.ariaLabel ?? '',\n top,\n beatTransactions,\n payload: instanceSlotData,\n })\n\n const { chartBarIndex, subTabIndex } = getDefaultSelection({\n chartTabCount: chartData.length,\n comparisonTabCount: comparisonBars.length,\n actionDrawer,\n beatGuid: beat.guid,\n })\n\n const [selectedIndex, setSelectedIndex] = useState(chartBarIndex)\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n selectedIndex: index,\n subIndex: subTabIndex,\n isLastTab: index === dataSeries.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Apply the current selection's filter. Store variants route through the store filter; local\n // (upcomingBill) variants filter beatTransactions directly and only backfill the cache when the\n // Stable primitive keys for the collections below: beatTransactions/spendCategoryGuids/\n // allAccountGuids are recomputed (new array identity) every render, so depending on them directly\n // re-fires the effect each render (REVIEW.md MEW-3732). Key on content instead.\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applies the current selection's filter to the shared transactionStore. Called both by the\n // effect below (on selection change) and when the nested TransactionDetailsBlock drawer closes:\n // AddMerchantBudgetAction (opened from within that drawer) overwrites transactionStore.filter\n // with a merchant_guid-only filter while its own drawer is open, and never restores it — leaving\n // the row list stuck showing only that one merchant's transactions after backing all the way out.\n // Re-running this on close re-derives the filter fresh instead of relying on whatever the nested\n // drawers left behind.\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store' || !dataSeries.length) return\n transactionStore.setFilter(\n toStoreFilter(resolveFilter(selectedIndex), { allAccountGuids, displayedDateRange }),\n )\n }\n\n // store variants route the selection through the shared store filter; local (upcomingBill) variants\n // filter beatTransactions directly, so there's nothing to push to the store for them.\n useLayoutEffect(() => {\n applyCurrentSelectionFilter()\n }, [\n beat.guid,\n selectedIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n ])\n\n const headerContent = header?.({\n htmlTitle: beat.html_title,\n primaryTransaction,\n categoryName,\n selectedDate: chartData[selectedIndex]?.date ?? undefined,\n })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n const [monthlyAmountLabel, trendAmountLabel] = (instanceSlotData?.legends ?? []).map(\n (legend) => legend.label,\n )\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? beatTransactions : undefined\n\n const isBarTop = top === 'singleBar' || top === 'upcomingBill'\n const chartTop = !isBarTop ? null : chartData.length ? (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(instanceSlotData?.average_amount ?? 0, '0,0.00'),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n monthlyAmountLabel={monthlyAmountLabel}\n onBarClick={setSelectedIndex}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={trendAmountLabel}\n />\n ) : (\n <EmptyBarChart />\n )\n if (!isCopyLoaded) return <Loader />\n return (\n <>\n <TransactionDrillDown\n ariaLabel={instanceSlotData?.ariaLabel}\n baseTransactions={baseTransactions}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={setSelectedIndex}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={chartData.map((bar) => ({\n ariaLabel: bar.ariaLabel,\n label: bar.label,\n }))}\n top={chartTop}\n transactionFilter={transactionFilter}\n onEachRowClick={(guid) => {\n setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns — setActionContext merges, so an\n // explicit `{}` would be a no-op and leave transaction_guid stuck in the shared\n // context, and the outer drawer's own context (e.g. chartBarIndex) must survive.\n setActionContext({ transaction_guid: undefined })\n // Re-apply this block's own filter: a further-nested AddMerchantBudgetAction drawer may\n // have overwritten transactionStore.filter (merchant_guid-only) without restoring it.\n applyCurrentSelectionFilter()\n }}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n\n )\n})\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GACjB,EACJ,kBAAA,GACA,kBAAA,GACA,oBAAA,GACA,oBAAA,GACA,iBAAA,GACA,cAAA,GACA,oBAAA,GACA,kBAAA,EAAA,IACE,GAAsB,CAAI,GAExB,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,EAAmB,GAExD,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GAEzE,EAAE,cAAA,EAAA,IAAiB,EAAiB,GAEpC,CAAC,GAA0B,CAAA,IAA+B,EAAS,EAAK,GAExE,EAAE,kBAAA,E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AAAA,IACnB,gBAAA,CAAiB,MAAS;AACxB,MAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAA4B,EAAI;AAAA,IAClC;AAAA,EACD,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAA,MAAe;AACb,MAAA,EAA4B,EAAK,GAIjC,EAAiB,EAAE,kBAAkB,OAAU,CAAC,GAGhD,EAA4B;AAAA,IAC9B;AAAA,IACA,OAAO,EAAa,QAAQ;AAAA,IAE5B,UAAA,gBAAA,EAAC,IAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,EAChC,CAAA,CACR,EAAA,CAAA,IAvCsB,gBAAA,EAAC,GAAD,CAAS,CAAA;AA0CrC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TransactionHistoryBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.tsx"],"sourcesContent":["import { useLayoutEffect, useState } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\nimport { observer } from 'mobx-react-lite'\n\nimport type { Beat, DataSeries, Transaction } from '../../../core'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n toStoreFilter,\n} from './utils'\nimport {\n Drawer,\n useInsightsV2Store,\n useGlobalCopyStore,\n useGlobalUiStore,\n Loader,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\n\ninterface TransactionHistoryProp {\n beat: Beat\n}\n\nexport const TransactionHistoryBlock = observer(({ beat }: TransactionHistoryProp) => {\n const theme = useTheme()\n const {\n instanceSlotData,\n beatTransactions,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(beat)\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n\n const { isCopyLoaded } = useGlobalUiStore()\n\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n\n const [closeTipSection, setCloseTipSection] = useState(false)\n\n const { insights_payload } = beat\n\n const dynamicCtaVariant =\n actionDrawer.trigger === 'secondaryCta'\n ? insights_payload?.secondary_cta?.variant\n : insights_payload?.primary_cta?.variant\n\n const { top, filterMode, header, colors, filterStrategy, tipSection } = getDrillDownConfig(\n dynamicCtaVariant ?? '',\n )\n\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel: instanceSlotData?.ariaLabel ?? '',\n top,\n beatTransactions,\n payload: instanceSlotData,\n })\n\n const { chartBarIndex, subTabIndex } = getDefaultSelection({\n chartTabCount: chartData.length,\n comparisonTabCount: comparisonBars.length,\n actionDrawer,\n beatGuid: beat.guid,\n })\n\n const [selectedIndex, setSelectedIndex] = useState(chartBarIndex)\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n selectedIndex: index,\n subIndex: subTabIndex,\n isLastTab: index === dataSeries.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Apply the current selection's filter. Store variants route through the store filter; local\n // (upcomingBill) variants filter beatTransactions directly and only backfill the cache when the\n // Stable primitive keys for the collections below: beatTransactions/spendCategoryGuids/\n // allAccountGuids are recomputed (new array identity) every render, so depending on them directly\n // re-fires the effect each render (REVIEW.md MEW-3732). Key on content instead.\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applies the current selection's filter to the shared transactionStore. Called both by the\n // effect below (on selection change) and when the nested TransactionDetailsBlock drawer closes:\n // AddMerchantBudgetAction (opened from within that drawer) overwrites transactionStore.filter\n // with a merchant_guid-only filter while its own drawer is open, and never restores it — leaving\n // the row list stuck showing only that one merchant's transactions after backing all the way out.\n // Re-running this on close re-derives the filter fresh instead of relying on whatever the nested\n // drawers left behind.\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store' || !dataSeries.length) return\n transactionStore.setFilter(\n toStoreFilter(resolveFilter(selectedIndex), { allAccountGuids, displayedDateRange }),\n )\n }\n\n // store variants route the selection through the shared store filter; local (upcomingBill) variants\n // filter beatTransactions directly, so there's nothing to push to the store for them.\n useLayoutEffect(() => {\n applyCurrentSelectionFilter()\n }, [\n beat.guid,\n selectedIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n ])\n\n const headerContent = header?.({\n title: insights_payload?.title,\n subHeader: insights_payload?.sub_title,\n categoryName,\n selectedDate: chartData[selectedIndex]?.date ?? undefined,\n })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n\n if (!isCopyLoaded) return <Loader />\n\n // TODO: Temporary fallback while the backend doesn't always send `legends` on every beat/variant.\n // Remove this once the backend guarantees `legends` on the payload.\n const legendFallbackLabels = [insightsCopy.general.monthly_amount, insightsCopy.general.trend]\n\n const [monthlyAmountLabel, trendAmountLabel] = instanceSlotData?.legends?.length\n ? instanceSlotData.legends.map((legend) => legend.label)\n : legendFallbackLabels\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? beatTransactions : undefined\n\n const isBarTop = top === 'singleBar' || top === 'upcomingBill'\n const chartTop = !isBarTop ? null : chartData.length ? (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(instanceSlotData?.average_amount ?? 0, '0,0.00'),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n margin={{\n bottom: 30,\n top: 20,\n left: 24,\n right: 24,\n }}\n monthlyAmountLabel={monthlyAmountLabel}\n onBarClick={setSelectedIndex}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={trendAmountLabel}\n />\n ) : (\n <EmptyBarChart />\n )\n\n return (\n <>\n <TransactionDrillDown\n ariaLabel={instanceSlotData?.ariaLabel}\n baseTransactions={baseTransactions}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={setSelectedIndex}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={chartData.map((bar) => ({\n ariaLabel: bar.ariaLabel,\n label: bar.label,\n }))}\n top={chartTop}\n {...(tipSection && {\n tipSection:\n !closeTipSection &&\n tipSection(setCloseTipSection, insightsCopy, insights_payload?.sub_title?.text),\n })}\n transactionFilter={transactionFilter}\n onEachRowClick={(guid) => {\n setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns — setActionContext merges, so an\n // explicit `{}` would be a no-op and leave transaction_guid stuck in the shared\n // context, and the outer drawer's own context (e.g. chartBarIndex) must survive.\n setActionContext({ transaction_guid: undefined })\n // Re-apply this block's own filter: a further-nested AddMerchantBudgetAction drawer may\n // have overwritten transactionStore.filter (merchant_guid-only) without restoring it.\n applyCurrentSelectionFilter()\n }}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GACjB,EACJ,kBAAA,GACA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