@mx-cartographer/experiences 9.7.165 → 9.7.166
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 +9 -0
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +0 -2
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +1 -1
- package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.d.ts +1 -5
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +53 -58
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +92 -99
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +1 -3
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +72 -81
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +5 -6
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +16 -16
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +4 -32
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +59 -83
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.es.js +8 -7
- package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +4 -3
- package/dist/insights-v2/components/celebrationGradients.es.js +14 -14
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.es.js +0 -1
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [9.7.166] - 11-16-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Save Enough to Live On: 8px corners on the card table and the Make Transfer drawer's bottom card (WEC-2330)
|
|
4
|
+
- **CHANGED** - The Make Transfer drawer (Save Enough to Live On, Save an Extra 00) uses the default back arrow, not a close X (WEC-2330)
|
|
5
|
+
- **FIXED** - Switch Direct Deposit's default card wash is at Figma's 127° (WEC-2330)
|
|
6
|
+
- **FIXED** - Upcoming Bill's drawer tip has no close button (WEC-2330)
|
|
7
|
+
- **CHANGED** - Upcoming Bill's drawer shows only the paid bills and opens on the latest (WEC-2330)
|
|
8
|
+
- **REMOVED** - Upcoming Bill's projected-bill tab and its "Projected amount" row, and the ...
|
|
9
|
+
|
|
1
10
|
## [9.7.165] - 11-16-2026
|
|
2
11
|
|
|
3
12
|
- **CHANGED** - Insights 2.0 action block registry entries declare the data their block waits for; the shared runner shows the loader and the error card with Try Again instead of each block checking its own (WEC-2262)
|
|
@@ -16,8 +16,6 @@ export interface GeneralInsightsFeedCopy {
|
|
|
16
16
|
new_information_available: string;
|
|
17
17
|
tip_section_message: string;
|
|
18
18
|
tip_section_title: string;
|
|
19
|
-
/** Heads Upcoming Bill's projected-bill row in its drawer (legacy pulse's "PROJECTED AMOUNT"). */
|
|
20
|
-
projected_amount?: string;
|
|
21
19
|
transaction_history_title: string;
|
|
22
20
|
transaction_details_title: string;
|
|
23
21
|
/** Transaction-count pill (`_1{count}`); optional until mrs_content ships it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveEnoughToLiveOnBottomSection.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { type SxProps } from '@mui/material/styles'\n\nimport { H2, Text } from '@mxenabled/mxui'\n\nimport { ReactComponent as Image } from '../../components/shared/images/SaveEnoughToLiveOnBottom.svg'\nimport { ThemedSVGImage } from '../../components/chartblocks/ThemedSVGImage'\n\nconst ROW_STYLES = {\n alignItems: 'center',\n flexDirection: 'row',\n height: 40,\n justifyContent: 'space-between',\n px: 16,\n py: 2,\n}\n\ninterface BalanceRowProps {\n label: string\n value: string\n withBorder?: boolean\n}\n\nconst BalanceRow = ({ label, value, withBorder = false }: BalanceRowProps) => (\n <Stack\n sx={{\n ...ROW_STYLES,\n ...(withBorder && {\n borderBottom: '1px solid',\n borderColor: 'divider',\n }),\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} variant=\"body2\">\n {value}\n </Text>\n </Stack>\n)\n\ninterface SaveEnoughToLiveOnBottomSectionProps {\n content: string\n leftLabel: string\n leftValue: string\n rightLabel: string\n rightValue: string\n sx?: SxProps\n}\n\nconst SaveEnoughToLiveOnBottomSection = ({\n content,\n leftLabel,\n leftValue,\n rightLabel,\n rightValue,\n sx,\n}: SaveEnoughToLiveOnBottomSectionProps) => (\n <Stack sx={{ alignItems: 'center', gap: 12 }}>\n <Box sx={{ display: 'grid', placeItems: 'center' }}>\n <ThemedSVGImage\n divProps={{ style: { height: 'auto', gridArea: '1 / 1', lineHeight: 0 } }}\n image={Image}\n />\n <H2 sx={{ color: 'neutral.contrastText', gridArea: '1 / 1', textAlign: 'center' }}>\n {content}\n </H2>\n </Box>\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius:
|
|
1
|
+
{"version":3,"file":"SaveEnoughToLiveOnBottomSection.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { type SxProps } from '@mui/material/styles'\n\nimport { H2, Text } from '@mxenabled/mxui'\n\nimport { ReactComponent as Image } from '../../components/shared/images/SaveEnoughToLiveOnBottom.svg'\nimport { ThemedSVGImage } from '../../components/chartblocks/ThemedSVGImage'\n\nconst ROW_STYLES = {\n alignItems: 'center',\n flexDirection: 'row',\n height: 40,\n justifyContent: 'space-between',\n px: 16,\n py: 2,\n}\n\ninterface BalanceRowProps {\n label: string\n value: string\n withBorder?: boolean\n}\n\nconst BalanceRow = ({ label, value, withBorder = false }: BalanceRowProps) => (\n <Stack\n sx={{\n ...ROW_STYLES,\n ...(withBorder && {\n borderBottom: '1px solid',\n borderColor: 'divider',\n }),\n }}\n >\n <Text color=\"text.secondary\" variant=\"caption\">\n {label}\n </Text>\n <Text bold={true} variant=\"body2\">\n {value}\n </Text>\n </Stack>\n)\n\ninterface SaveEnoughToLiveOnBottomSectionProps {\n content: string\n leftLabel: string\n leftValue: string\n rightLabel: string\n rightValue: string\n sx?: SxProps\n}\n\nconst SaveEnoughToLiveOnBottomSection = ({\n content,\n leftLabel,\n leftValue,\n rightLabel,\n rightValue,\n sx,\n}: SaveEnoughToLiveOnBottomSectionProps) => (\n <Stack sx={{ alignItems: 'center', gap: 12 }}>\n <Box sx={{ display: 'grid', placeItems: 'center' }}>\n <ThemedSVGImage\n divProps={{ style: { height: 'auto', gridArea: '1 / 1', lineHeight: 0 } }}\n image={Image}\n />\n <H2 sx={{ color: 'neutral.contrastText', gridArea: '1 / 1', textAlign: 'center' }}>\n {content}\n </H2>\n </Box>\n <Stack\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 2,\n width: 288,\n ...sx,\n }}\n >\n <BalanceRow label={leftLabel} value={leftValue} withBorder={true} />\n <BalanceRow label={rightLabel} value={rightValue} />\n </Stack>\n </Stack>\n)\n\nexport default SaveEnoughToLiveOnBottomSection\n"],"mappings":";;;;;;AAUA,IAAM,IAAa;AAAA,EACjB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AACN,GAQM,IAAA,CAAc,EAAE,OAAA,GAAO,OAAA,GAAO,YAAA,IAAa,GAAA,MAC/C,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,GAAG;AAAA,IACH,GAAI,KAAc;AAAA,MAChB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,SAAQ;AAAA,IAClC,UAAA;AAAA,EACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,SAAQ;AAAA,IACvB,UAAA;AAAA,EACG,CAAA,CACD;IAYH,IAAA,CAAmC,EACvC,SAAA,GACA,WAAA,GACA,WAAA,GACA,YAAA,GACA,YAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EAAO,IAAI;AAAA,IAAE,YAAY;AAAA,IAAU,KAAK;AAAA,EAAG;AAAA,EAA3C,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI;AAAA,MAAE,SAAS;AAAA,MAAQ,YAAY;AAAA,IAAS;AAAA,IAAjD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,UAAU,EAAE,OAAO;AAAA,QAAE,QAAQ;AAAA,QAAQ,UAAU;AAAA,QAAS,YAAY;AAAA,MAAE,EAAE;AAAA,MACxE,OAAO;AAAA,IACR,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,MAAI,IAAI;AAAA,QAAE,OAAO;AAAA,QAAwB,UAAU;AAAA,QAAS,WAAW;AAAA,MAAS;AAAA,MAC7E,UAAA;AAAA,IACC,CAAA,CACD;AAAA,EACL,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MACd,OAAO;AAAA,MACP,GAAG;AAAA,IACL;AAAA,IAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,MAAY,OAAO;AAAA,MAAW,OAAO;AAAA,MAAW,YAAY;AAAA,IAAO,CAAA,GACnE,gBAAA,EAAC,GAAD;AAAA,MAAY,OAAO;AAAA,MAAY,OAAO;AAAA,IAAa,CAAA,CAC9C;AAAA,EACF,CAAA,CAAA"}
|
|
@@ -20,12 +20,8 @@ interface TransactionDrillDownProps {
|
|
|
20
20
|
transactionFilter?: (selectedIndex: number) => (transaction: Transaction) => boolean;
|
|
21
21
|
baseTransactions?: Transaction[];
|
|
22
22
|
subTabs?: Omit<SubTabsProps, 'id'>;
|
|
23
|
-
projectedRow?: {
|
|
24
|
-
heading: string;
|
|
25
|
-
transaction: Transaction;
|
|
26
|
-
};
|
|
27
23
|
}
|
|
28
|
-
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs,
|
|
24
|
+
export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
29
25
|
displayName: string;
|
|
30
26
|
};
|
|
31
27
|
export default TransactionDrillDown;
|
|
@@ -1,64 +1,62 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import { exportTransactionsToCSV as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { DRAWER_TIP_ICON as V } from "../../components/drawerTip.es.js";
|
|
8
|
-
import { SubTabs as q, subTabPanelProps as z } from "../../components/SubTabs.es.js";
|
|
1
|
+
import { useGlobalCopyStore as j, useTransactionStore as A } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { exportTransactionsToCSV as R } from "../../../core/utils/TransactionUtils.es.js";
|
|
3
|
+
import E from "../../../transactions/components/shared/TransactionList.es.js";
|
|
4
|
+
import { TipSection as N } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
|
|
5
|
+
import { DRAWER_TIP_ICON as G } from "../../components/drawerTip.es.js";
|
|
6
|
+
import { SubTabs as O, subTabPanelProps as U } from "../../components/SubTabs.es.js";
|
|
9
7
|
import "react";
|
|
10
|
-
import { observer as
|
|
11
|
-
import
|
|
12
|
-
import { H3 as
|
|
13
|
-
import
|
|
14
|
-
import { Icon as
|
|
8
|
+
import { observer as V } from "mobx-react-lite";
|
|
9
|
+
import m from "@mui/material/Stack";
|
|
10
|
+
import { H3 as q, Text as p } from "@mxenabled/mxui";
|
|
11
|
+
import z from "@mui/material/Button";
|
|
12
|
+
import { Icon as J } from "@mxenabled/mx-icons";
|
|
15
13
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
16
14
|
import t from "@mui/material/Box";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
var
|
|
20
|
-
const { transactions:
|
|
21
|
-
|
|
22
|
-
},
|
|
15
|
+
import K from "@mui/material/Tab";
|
|
16
|
+
import M from "@mui/material/Tabs";
|
|
17
|
+
var _ = "transaction-drill-down-panel", y = (b) => `transaction-details-tab-${b}`, C = "transaction-drill-down-series", mr = V(function({ ariaLabel: S, heading: e, subHeadingText: s, icon: D, tabs: f, selectedIndex: l, top: h, onSelectionChange: I, transactionFilter: x, tipSection: T, onEachRowClick: w, baseTransactions: B, subTabs: v }) {
|
|
18
|
+
const { transactions: c } = j(), { sortedTransactionsWithSplits: k, tags: P, detailedTransactions: W } = A(), d = !!f?.length, a = v?.tabs.length ? v : void 0, L = S ?? c.transactions_title, $ = (i, n) => {
|
|
19
|
+
I?.(n);
|
|
20
|
+
}, u = x ? (B ?? W).filter(x(l)) : void 0, g = u ?? k;
|
|
23
21
|
return /* @__PURE__ */ o(t, {
|
|
24
22
|
sx: {
|
|
25
23
|
bgcolor: "background.paper",
|
|
26
24
|
width: "100%"
|
|
27
25
|
},
|
|
28
|
-
children: [
|
|
29
|
-
"aria-label":
|
|
30
|
-
onChange:
|
|
26
|
+
children: [d && /* @__PURE__ */ r(M, {
|
|
27
|
+
"aria-label": L,
|
|
28
|
+
onChange: $,
|
|
31
29
|
sx: { mb: 0 },
|
|
32
30
|
value: l,
|
|
33
31
|
variant: "fullWidth",
|
|
34
|
-
children: f.map((
|
|
35
|
-
"aria-controls":
|
|
36
|
-
"aria-label":
|
|
37
|
-
id: y(
|
|
38
|
-
label:
|
|
32
|
+
children: f.map((i, n) => /* @__PURE__ */ r(K, {
|
|
33
|
+
"aria-controls": _,
|
|
34
|
+
"aria-label": i.ariaLabel,
|
|
35
|
+
id: y(n),
|
|
36
|
+
label: i.label,
|
|
39
37
|
sx: {
|
|
40
38
|
minWidth: "auto",
|
|
41
39
|
px: 0
|
|
42
40
|
}
|
|
43
|
-
}, `${
|
|
41
|
+
}, `${i.label}-${n}`))
|
|
44
42
|
}), /* @__PURE__ */ o(t, {
|
|
45
|
-
"aria-labelledby":
|
|
46
|
-
id:
|
|
47
|
-
role:
|
|
43
|
+
"aria-labelledby": d ? y(l) : void 0,
|
|
44
|
+
id: _,
|
|
45
|
+
role: d ? "tabpanel" : void 0,
|
|
48
46
|
children: [
|
|
49
|
-
(e || s) && /* @__PURE__ */ o(
|
|
47
|
+
(e || s) && /* @__PURE__ */ o(m, {
|
|
50
48
|
sx: {
|
|
51
49
|
gap: 4,
|
|
52
50
|
pt: 16,
|
|
53
51
|
px: 24
|
|
54
52
|
},
|
|
55
|
-
children: [e && /* @__PURE__ */ r(
|
|
53
|
+
children: [e && /* @__PURE__ */ r(q, { children: e }), s && /* @__PURE__ */ o(m, {
|
|
56
54
|
sx: {
|
|
57
55
|
alignItems: "center",
|
|
58
56
|
flexDirection: "row",
|
|
59
57
|
gap: 8
|
|
60
58
|
},
|
|
61
|
-
children: [
|
|
59
|
+
children: [D, /* @__PURE__ */ r(p, {
|
|
62
60
|
color: "text.secondary",
|
|
63
61
|
sx: { letterSpacing: "0.52px" },
|
|
64
62
|
textTransform: "uppercase",
|
|
@@ -67,24 +65,24 @@ var S = "transaction-drill-down-panel", y = (h) => `transaction-details-tab-${h}
|
|
|
67
65
|
})]
|
|
68
66
|
})]
|
|
69
67
|
}),
|
|
70
|
-
|
|
68
|
+
h && /* @__PURE__ */ r(t, {
|
|
71
69
|
sx: {
|
|
72
70
|
pb: 16,
|
|
73
71
|
pt: 16
|
|
74
72
|
},
|
|
75
|
-
children:
|
|
73
|
+
children: h
|
|
76
74
|
}),
|
|
77
|
-
|
|
78
|
-
icon:
|
|
79
|
-
...
|
|
75
|
+
T && /* @__PURE__ */ r(N, {
|
|
76
|
+
icon: G,
|
|
77
|
+
...T
|
|
80
78
|
}),
|
|
81
|
-
a && /* @__PURE__ */ r(
|
|
79
|
+
a && /* @__PURE__ */ r(O, {
|
|
82
80
|
...a,
|
|
83
81
|
id: C
|
|
84
82
|
}),
|
|
85
83
|
/* @__PURE__ */ o(t, {
|
|
86
|
-
...a &&
|
|
87
|
-
children: [/* @__PURE__ */ o(
|
|
84
|
+
...a && U(C, a.selectedIndex),
|
|
85
|
+
children: [/* @__PURE__ */ o(m, {
|
|
88
86
|
sx: {
|
|
89
87
|
alignItems: "center",
|
|
90
88
|
borderBottomColor: "divider",
|
|
@@ -96,30 +94,27 @@ var S = "transaction-drill-down-panel", y = (h) => `transaction-details-tab-${h}
|
|
|
96
94
|
pt: 16,
|
|
97
95
|
px: 24
|
|
98
96
|
},
|
|
99
|
-
children: [/* @__PURE__ */ r(
|
|
97
|
+
children: [/* @__PURE__ */ r(p, {
|
|
100
98
|
bold: !0,
|
|
101
99
|
variant: "body1",
|
|
102
|
-
children:
|
|
103
|
-
}),
|
|
100
|
+
children: c.transactions_title
|
|
101
|
+
}), g.length > 0 && /* @__PURE__ */ r(z, {
|
|
104
102
|
onClick: () => {
|
|
105
|
-
|
|
103
|
+
R(g, P);
|
|
106
104
|
},
|
|
107
|
-
startIcon: /* @__PURE__ */ r(
|
|
105
|
+
startIcon: /* @__PURE__ */ r(J, { name: "ios_share" }),
|
|
108
106
|
sx: { height: 28 },
|
|
109
|
-
children: /* @__PURE__ */ r(
|
|
107
|
+
children: /* @__PURE__ */ r(p, {
|
|
110
108
|
bold: !0,
|
|
111
109
|
variant: "body2",
|
|
112
|
-
children:
|
|
110
|
+
children: c.export_csv_btn
|
|
113
111
|
})
|
|
114
112
|
})]
|
|
115
|
-
}),
|
|
116
|
-
component: "div",
|
|
117
|
-
transaction: c.transaction
|
|
118
|
-
})] }) : /* @__PURE__ */ r(t, {
|
|
113
|
+
}), /* @__PURE__ */ r(t, {
|
|
119
114
|
sx: { bgcolor: "background.default" },
|
|
120
|
-
children: /* @__PURE__ */ r(
|
|
121
|
-
transaction:
|
|
122
|
-
onClick:
|
|
115
|
+
children: /* @__PURE__ */ r(E, {
|
|
116
|
+
transaction: u,
|
|
117
|
+
onClick: w
|
|
123
118
|
})
|
|
124
119
|
})]
|
|
125
120
|
})
|
|
@@ -128,8 +123,8 @@ var S = "transaction-drill-down-panel", y = (h) => `transaction-details-tab-${h}
|
|
|
128
123
|
});
|
|
129
124
|
});
|
|
130
125
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
mr as TransactionDrillDown,
|
|
127
|
+
mr as default
|
|
133
128
|
};
|
|
134
129
|
|
|
135
130
|
//# 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 {\n TipSection,\n type TipSectionProps,\n} from '../../../insights/components/shared/ChartDrawerTemplate/TipSection'\nimport { useGlobalCopyStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport SubheaderRow from '../../../common/components/SubheaderRow'\nimport { DRAWER_TIP_ICON } from '../../components/drawerTip'\nimport { TransactionList, TransactionRow } from '../../../transactions'\nimport { SubTabs, subTabPanelProps, type SubTabsProps } from '../../components/SubTabs'\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}`\nconst SUB_TABS_ID = 'transaction-drill-down-series'\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 // A second row of tabs between the chart and the list (the double-bar drawer's main / comparison\n // series, e.g. Spend / Income). Omitted for every single-series drawer.\n subTabs?: Omit<SubTabsProps, 'id'>\n // Shown instead of the list: one inert row under its own heading (Upcoming Bill's projected bill,\n // headed \"Projected amount\", as legacy pulse shows it). Not exported to CSV.\n projectedRow?: { heading: string; transaction: 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 subTabs,\n projectedRow,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n const hasTabs = !!tabs?.length\n // Only a non-empty row gets the tabs and their panel.\n const seriesTabs = subTabs?.tabs.length ? subTabs : undefined\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 // The title sits 16px below the tab bar, as in every Figma chart drawer; the theme's 8px\n // gap under Tabs would make it 24.\n sx={{ mb: 0 }}\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\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.52px' }}\n textTransform=\"uppercase\"\n variant=\"body2\"\n >\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n )}\n\n {/* Figma's chart drawer pads the chart 16px above and below; a drawer with no chart has no box. */}\n {top && <Box sx={{ pb: 16, pt: 16 }}>{top}</Box>}\n\n {/* Every Figma chart drawer puts the tip under the chart, above any sub-tabs. */}\n {tipSection && <TipSection icon={DRAWER_TIP_ICON} {...tipSection} />}\n\n {seriesTabs && <SubTabs {...seriesTabs} id={SUB_TABS_ID} />}\n\n {/* The content the sub-tabs control, as the month tabs' panel above. */}\n <Box {...(seriesTabs && subTabPanelProps(SUB_TABS_ID, seriesTabs.selectedIndex))}>\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 {projectedRow ? (\n <Box>\n <SubheaderRow>{projectedRow.heading}</SubheaderRow>\n <TransactionRow component=\"div\" transaction={projectedRow.transaction} />\n </Box>\n ) : (\n // The list's scroll box is taller than its rows; Figma fills the space below the last\n // row with background.default, and each row paints its own paper.\n <Box sx={{ bgcolor: 'background.default' }}>\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n )}\n </Box>\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,IAAM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cACJ,IAAI;AAAA,YACN;AAAA,YAXF,UAAA,CAaE,gBAAA,EAAC,GAAD;AAAA,cAAM,MAAM;AAAA,cAAM,SAAQ;AAAA,cACvB,UAAA,EAAiB;AAAA,YACd,CAAA,GACL,EAAmB,SAAS,KAC3B,gBAAA,EAAC,GAAD;AAAA,cACE,SAAA,MAAe;AACb,gBAAA,EAAwB,GAAoB,CAAI;AAAA,cAClD;AAAA,cACA,WAAW,gBAAA,EAAC,GAAD,EAAM,MAAK,YAAa,CAAA;AAAA,cACnC,IAAI,EAAE,QAAQ,GAAG;AAAA,cAEjB,UAAA,gBAAA,EAAC,GAAD;AAAA,gBAAM,MAAM;AAAA,gBAAM,SAAQ;AAAA,gBACvB,UAAA,EAAiB;AAAA,cACd,CAAA;AAAA,YACA,CAAA,CAEL;AAAA,UAEN,CAAA,GAAA,IACC,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD,EAAA,UAAe,EAAa,QAAsB,CAAA,GAClD,gBAAA,EAAC,GAAD;AAAA,YAAgB,WAAU;AAAA,YAAM,aAAa,EAAa;AAAA,UAAc,CAAA,CACrE,EAAA,CAAA,IAIL,gBAAA,EAAC,GAAD;AAAA,YAAK,IAAI,EAAE,SAAS,qBAAqB;AAAA,YACvC,UAAA,gBAAA,EAAC,GAAD;AAAA,cAAiB,aAAa;AAAA,cAAsB,SAAS;AAAA,YAAiB,CAAA;AAAA,UAC3E,CAAA,CAEJ;AAAA;MACF;AAAA,IACF,CAAA,CAAA;AAAA;AAET,CAAC"}
|
|
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 { useGlobalCopyStore, useTransactionStore } from '../../../common'\nimport type { Transaction } from '../../../core'\nimport { exportTransactionsToCSV } from '../../../core/utils/TransactionUtils'\nimport { DRAWER_TIP_ICON } from '../../components/drawerTip'\nimport { TransactionList } from '../../../transactions'\nimport { SubTabs, subTabPanelProps, type SubTabsProps } from '../../components/SubTabs'\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}`\nconst SUB_TABS_ID = 'transaction-drill-down-series'\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 // A second row of tabs between the chart and the list (the double-bar drawer's main / comparison\n // series, e.g. Spend / Income). Omitted for every single-series drawer.\n subTabs?: Omit<SubTabsProps, 'id'>\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 subTabs,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n const hasTabs = !!tabs?.length\n // Only a non-empty row gets the tabs and their panel.\n const seriesTabs = subTabs?.tabs.length ? subTabs : undefined\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 // The title sits 16px below the tab bar, as in every Figma chart drawer; the theme's 8px\n // gap under Tabs would make it 24.\n sx={{ mb: 0 }}\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\n color=\"text.secondary\"\n sx={{ letterSpacing: '0.52px' }}\n textTransform=\"uppercase\"\n variant=\"body2\"\n >\n {subHeadingText}\n </Text>\n </Stack>\n )}\n </Stack>\n )}\n\n {/* Figma's chart drawer pads the chart 16px above and below; a drawer with no chart has no box. */}\n {top && <Box sx={{ pb: 16, pt: 16 }}>{top}</Box>}\n\n {/* Every Figma chart drawer puts the tip under the chart, above any sub-tabs. */}\n {tipSection && <TipSection icon={DRAWER_TIP_ICON} {...tipSection} />}\n\n {seriesTabs && <SubTabs {...seriesTabs} id={SUB_TABS_ID} />}\n\n {/* The content the sub-tabs control, as the month tabs' panel above. */}\n <Box {...(seriesTabs && subTabPanelProps(SUB_TABS_ID, seriesTabs.selectedIndex))}>\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 {/* The list's scroll box is taller than its rows; Figma fills the space below the last row\n with background.default, and each row paints its own paper. */}\n <Box sx={{ bgcolor: 'background.default' }}>\n <TransactionList transaction={filteredTransactions} onClick={onEachRowClick} />\n </Box>\n </Box>\n </Box>\n </Box>\n )\n})\n\nexport default TransactionDrillDown\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAM,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IACtD,IAAc,iCAoBP,KAAuB,EAAS,SAA8B,EACzE,WAAA,GACA,SAAA,GACA,gBAAA,GACA,MAAA,GACA,MAAA,GACA,eAAA,GACA,KAAA,GACA,mBAAA,GACA,mBAAA,GACA,YAAA,GACA,gBAAA,GACA,kBAAA,GACA,SAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,cAAc,EAAA,IAAqB,EAAmB,GACxD,EAAE,8BAAA,GAA8B,MAAA,GAAM,sBAAA,EAAA,IAAyB,EAAoB,GAEnF,IAAU,CAAC,CAAC,GAAM,QAElB,IAAa,GAAS,KAAK,SAAS,IAAU,QAC9C,IAAe,KAAa,EAAiB,oBAE7C,IAAA,CAAuB,GAA8B,MAAqB;AAC9E,IAAA,IAAoB,CAAQ;AAAA,EAC9B,GAEM,IAAuB,KACxB,KAAoB,GAAsB,OAAO,EAAkB,CAAa,CAAC,IA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A,EAAC,GAAD;AAAA,cAAiB,aAAa;AAAA,cAAsB,SAAS;AAAA,YAAiB,CAAA;AAAA,UAC3E,CAAA,CACF;AAAA;MACF;AAAA,IACF,CAAA,CAAA;AAAA;AAET,CAAC"}
|
|
@@ -1,116 +1,110 @@
|
|
|
1
|
-
import { useGlobalCopyStore as
|
|
2
|
-
import { CURRENCY_FORMAT as
|
|
3
|
-
import
|
|
4
|
-
import { BAR_ARIA_LABEL as
|
|
5
|
-
import { BarChartV2 as
|
|
6
|
-
import { EmptyBarChart as
|
|
7
|
-
import { ANALYTICS_EVENTS_CONFIG as
|
|
8
|
-
import { useAnalyticsEvent as
|
|
9
|
-
import { DoubleBarChart as
|
|
10
|
-
import { toLegendItems as
|
|
11
|
-
import { getDefaultSelection as
|
|
12
|
-
import { useOpenedCta as
|
|
13
|
-
import { TransactionDrillDown as
|
|
14
|
-
import { useTransactionHistory as
|
|
15
|
-
import { TransactionDetailsBlock as
|
|
16
|
-
import { useRequiredCopy as
|
|
17
|
-
import { useLayoutEffect as
|
|
18
|
-
import { observer as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { useTheme as
|
|
21
|
-
var
|
|
22
|
-
const
|
|
23
|
-
slotData: $,
|
|
24
|
-
beatTransactions: J
|
|
25
|
-
}, B?.drilldown_data), { common: ot } = yt(), s = Pt(Wt), [at, R] = d(!1), [nt, st] = d(!1), E = Rt(), { dataSeries: p, chartData: g, comparisonBars: r } = jt({
|
|
1
|
+
import { useGlobalCopyStore as ft, useInsightsV2Store as ht } from "../../../common/context/hooks.es.js";
|
|
2
|
+
import { CURRENCY_FORMAT as Ct, formatCurrency as _t } from "../../../core/utils/NumberFormatting.es.js";
|
|
3
|
+
import yt from "../../../common/components/drawer/Drawer.es.js";
|
|
4
|
+
import { BAR_ARIA_LABEL as Tt } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
5
|
+
import { BarChartV2 as At } from "../../components/chartblocks/BarchartV2.es.js";
|
|
6
|
+
import { EmptyBarChart as Dt } from "../../components/chartblocks/EmptyBarChart.es.js";
|
|
7
|
+
import { ANALYTICS_EVENTS_CONFIG as M } from "../../analytics/analyticsEventsConfig.es.js";
|
|
8
|
+
import { useAnalyticsEvent as St } from "../../analytics/useAnalyticsEvent.es.js";
|
|
9
|
+
import { DoubleBarChart as vt } from "../../components/chartblocks/DoubleBarChart.es.js";
|
|
10
|
+
import { toLegendItems as Bt } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
|
|
11
|
+
import { getDefaultSelection as Lt, getDrillDownConfig as It, getFlattenedDataSeries as Et, resolveDrillDownSubHeader as Rt, toStoreFilter as xt } from "./utils.es.js";
|
|
12
|
+
import { useOpenedCta as Ft } from "../useOpenedCta.es.js";
|
|
13
|
+
import { TransactionDrillDown as Ot } from "./TransactionDrillDown.es.js";
|
|
14
|
+
import { useTransactionHistory as Gt } from "./useTransactionHistory.es.js";
|
|
15
|
+
import { TransactionDetailsBlock as Ht } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
16
|
+
import { useRequiredCopy as wt } from "../useRequiredCopy.es.js";
|
|
17
|
+
import { useLayoutEffect as Nt, useState as d } from "react";
|
|
18
|
+
import { observer as jt } from "mobx-react-lite";
|
|
19
|
+
import { Fragment as kt, jsx as l, jsxs as Mt } from "react/jsx-runtime";
|
|
20
|
+
import { useTheme as Kt } from "@mui/material/styles";
|
|
21
|
+
var Vt = (a) => a.insights_feed, me = jt(({ beat: a }) => {
|
|
22
|
+
const y = Kt(), { actionDrawer: K, setActionContext: T } = ht(), { insights_payload: A } = a, D = Ft(a), V = D?.variant, { top: e, filterMode: m, header: P, colors: z, filterStrategy: Y, tipSection: S, subTabAriaLabels: q, slotData: U, averageFormat: W, subTabs: $, boldLabel: J } = It(V ?? ""), { instanceSlotData: o, beatTransactions: u, spendCategoryGuids: v, allAccountGuids: B, categoryName: Q, displayedDateRange: f, transactionStore: X } = Gt(a, { slotData: U }, D?.drilldown_data), { common: Z } = ft(), r = wt(Vt), [tt, L] = d(!1), [et, ot] = d(!1), I = St(), { dataSeries: g, chartData: p, comparisonBars: s } = Et({
|
|
26
23
|
data: o?.data_series,
|
|
27
|
-
ariaLabel: e === "doubleBar" ?
|
|
24
|
+
ariaLabel: e === "doubleBar" ? r?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : Tt,
|
|
28
25
|
top: e,
|
|
29
26
|
beatTransactions: u
|
|
30
|
-
}), c = e === "doubleBar",
|
|
31
|
-
chartTabCount:
|
|
32
|
-
comparisonTabCount:
|
|
33
|
-
actionDrawer:
|
|
27
|
+
}), c = e === "doubleBar", at = e === "tabsOnly", i = c ? s : p, { chartBarIndex: E, subTabIndex: nt } = Lt({
|
|
28
|
+
chartTabCount: p.length,
|
|
29
|
+
comparisonTabCount: s.length,
|
|
30
|
+
actionDrawer: K,
|
|
34
31
|
beatGuid: a.guid
|
|
35
|
-
}), [n, h] = d(
|
|
36
|
-
i.length !==
|
|
37
|
-
const
|
|
32
|
+
}), [n, h] = d(E), [C, R] = d(nt), [rt, st] = d(i.length);
|
|
33
|
+
i.length !== rt && (st(i.length), h(E));
|
|
34
|
+
const x = (t) => Y({
|
|
38
35
|
beat: a,
|
|
39
36
|
beatTransactions: u,
|
|
40
|
-
dataSeries:
|
|
41
|
-
comparisonBars:
|
|
37
|
+
dataSeries: g,
|
|
38
|
+
comparisonBars: s,
|
|
42
39
|
selectedIndex: t,
|
|
43
40
|
subIndex: C,
|
|
44
41
|
isLastTab: t === i.length - 1,
|
|
45
42
|
instanceSlotData: o,
|
|
46
|
-
spendCategoryGuids:
|
|
43
|
+
spendCategoryGuids: v,
|
|
47
44
|
displayedDateRange: f
|
|
48
|
-
}),
|
|
45
|
+
}), it = u.map((t) => t.guid).join(","), lt = v.join(","), ct = B.join(","), dt = e === "list" || e === "tabsOnly" || e === "monthTabs" || g.length > 0, F = () => {
|
|
49
46
|
if (m !== "store") return;
|
|
50
|
-
const t =
|
|
47
|
+
const t = dt ? x(n) : {
|
|
51
48
|
accounts: [],
|
|
52
49
|
custom: () => !1
|
|
53
50
|
};
|
|
54
|
-
|
|
55
|
-
allAccountGuids:
|
|
51
|
+
X.setFilter(xt(t, {
|
|
52
|
+
allAccountGuids: B,
|
|
56
53
|
displayedDateRange: f
|
|
57
54
|
}));
|
|
58
55
|
};
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
Nt(() => {
|
|
57
|
+
F();
|
|
61
58
|
}, [
|
|
62
59
|
a.guid,
|
|
63
60
|
n,
|
|
64
61
|
C,
|
|
65
62
|
m,
|
|
66
|
-
|
|
63
|
+
g.length,
|
|
67
64
|
o,
|
|
68
65
|
f,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
lt,
|
|
67
|
+
ct,
|
|
68
|
+
it,
|
|
72
69
|
e
|
|
73
70
|
]);
|
|
74
|
-
const
|
|
75
|
-
title:
|
|
76
|
-
subHeader:
|
|
77
|
-
categoryName:
|
|
78
|
-
selectedDate:
|
|
71
|
+
const O = Rt(A), _ = P?.({
|
|
72
|
+
title: A?.title,
|
|
73
|
+
subHeader: O,
|
|
74
|
+
categoryName: Q,
|
|
75
|
+
selectedDate: p[n]?.date ?? void 0,
|
|
79
76
|
slotData: o
|
|
80
|
-
}),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, M = c ? xt([{
|
|
88
|
-
...G,
|
|
89
|
-
value: r[n]?.main
|
|
77
|
+
}), G = z(y, o?.category_guid), [H, w] = o?.legends ?? [], mt = m === "local" ? (t) => x(t).custom ?? (() => !0) : void 0, ut = m === "local" ? u : void 0, N = (t, b) => {
|
|
78
|
+
I(M.DRAWER_CHART_BAR_CLICKED), h(t), b !== void 0 && R(b);
|
|
79
|
+
}, gt = (t) => {
|
|
80
|
+
I(M.TAB_SELECTED), h(t);
|
|
81
|
+
}, j = c ? Bt([{
|
|
82
|
+
...H,
|
|
83
|
+
value: s[n]?.main
|
|
90
84
|
}, {
|
|
91
85
|
...w,
|
|
92
|
-
value:
|
|
93
|
-
}]) : void 0,
|
|
86
|
+
value: s[n]?.comparison
|
|
87
|
+
}]) : void 0, pt = q?.(r) ?? [], k = c ? (j ?? []).map((t, b) => ({
|
|
94
88
|
label: t.label,
|
|
95
|
-
ariaLabel:
|
|
96
|
-
})) :
|
|
89
|
+
ariaLabel: pt[b]
|
|
90
|
+
})) : at ? g.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : $?.({
|
|
97
91
|
instanceSlotData: o,
|
|
98
|
-
copy:
|
|
99
|
-
}).map((t) => ({ label: t })) ?? [],
|
|
100
|
-
bars:
|
|
101
|
-
boldLabel:
|
|
102
|
-
colors:
|
|
92
|
+
copy: r
|
|
93
|
+
}).map((t) => ({ label: t })) ?? [], bt = c || e === "singleBar" || e === "upcomingBill" ? i.length ? c ? /* @__PURE__ */ l(vt, {
|
|
94
|
+
bars: s,
|
|
95
|
+
boldLabel: J,
|
|
96
|
+
colors: G,
|
|
103
97
|
legendPosition: "top",
|
|
104
|
-
legends:
|
|
105
|
-
onBarClick:
|
|
98
|
+
legends: j,
|
|
99
|
+
onBarClick: N,
|
|
106
100
|
selectedIndex: n
|
|
107
|
-
}) : /* @__PURE__ */ l(
|
|
101
|
+
}) : /* @__PURE__ */ l(At, {
|
|
108
102
|
amounts: {
|
|
109
103
|
average: o?.average_amount,
|
|
110
|
-
formattedAverage:
|
|
104
|
+
formattedAverage: _t(o?.average_amount ?? 0, W ?? Ct.cents)
|
|
111
105
|
},
|
|
112
|
-
color:
|
|
113
|
-
data:
|
|
106
|
+
color: G[0] ?? y.palette.primary.main,
|
|
107
|
+
data: p,
|
|
114
108
|
legendPosition: "top",
|
|
115
109
|
heightOverride: 172,
|
|
116
110
|
margin: {
|
|
@@ -119,44 +113,43 @@ var Wt = (a) => a.insights_feed, he = zt(({ beat: a }) => {
|
|
|
119
113
|
left: 24,
|
|
120
114
|
right: 24
|
|
121
115
|
},
|
|
122
|
-
monthlyAmountLabel:
|
|
123
|
-
onBarClick:
|
|
116
|
+
monthlyAmountLabel: H?.label ?? r.general.monthly_amount,
|
|
117
|
+
onBarClick: N,
|
|
124
118
|
selectedTabIndex: n,
|
|
125
|
-
trendAmountLabel: w?.label ??
|
|
126
|
-
}) : /* @__PURE__ */ l(
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
baseTransactions:
|
|
129
|
-
projectedRow: ht,
|
|
119
|
+
trendAmountLabel: w?.label ?? r.general.trend
|
|
120
|
+
}) : /* @__PURE__ */ l(Dt, {}) : null;
|
|
121
|
+
return /* @__PURE__ */ Mt(kt, { children: [/* @__PURE__ */ l(Ot, {
|
|
122
|
+
baseTransactions: ut,
|
|
130
123
|
heading: _?.heading,
|
|
131
124
|
icon: _?.icon,
|
|
132
|
-
onSelectionChange:
|
|
125
|
+
onSelectionChange: gt,
|
|
133
126
|
selectedIndex: n,
|
|
134
127
|
subHeadingText: _?.subHeadingText,
|
|
135
128
|
tabs: i,
|
|
136
|
-
top:
|
|
137
|
-
...
|
|
138
|
-
tabs:
|
|
129
|
+
top: bt,
|
|
130
|
+
...k.length > 0 && { subTabs: {
|
|
131
|
+
tabs: k,
|
|
139
132
|
selectedIndex: C,
|
|
140
|
-
onChange:
|
|
133
|
+
onChange: R
|
|
141
134
|
} },
|
|
142
|
-
...S && { tipSection: !
|
|
143
|
-
transactionFilter:
|
|
135
|
+
...S && { tipSection: !et && (S(ot, r, O?.text, o) ?? !1) },
|
|
136
|
+
transactionFilter: mt,
|
|
144
137
|
onEachRowClick: (t) => {
|
|
145
|
-
|
|
138
|
+
T({ transaction_guid: t }), L(!0);
|
|
146
139
|
}
|
|
147
|
-
}), /* @__PURE__ */ l(
|
|
148
|
-
ariaLabelClose:
|
|
149
|
-
isOpen:
|
|
140
|
+
}), /* @__PURE__ */ l(yt, {
|
|
141
|
+
ariaLabelClose: Z.close_aria,
|
|
142
|
+
isOpen: tt,
|
|
150
143
|
onClose: () => {
|
|
151
|
-
|
|
144
|
+
L(!1), T({ transaction_guid: void 0 }), F();
|
|
152
145
|
},
|
|
153
|
-
title:
|
|
154
|
-
children: /* @__PURE__ */ l(
|
|
146
|
+
title: r.general.transaction_details_title,
|
|
147
|
+
children: /* @__PURE__ */ l(Ht, { beat: a })
|
|
155
148
|
})] });
|
|
156
149
|
});
|
|
157
150
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
me as TransactionHistoryBlock,
|
|
152
|
+
Vt as selectTransactionHistoryCopy
|
|
160
153
|
};
|
|
161
154
|
|
|
162
155
|
//# sourceMappingURL=TransactionHistoryBlock.es.js.map
|