@mx-cartographer/experiences 9.7.147 → 9.7.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +58 -57
  3. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  4. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +1 -0
  5. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +22 -19
  6. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  7. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +17 -16
  8. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
  9. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -0
  10. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +18 -9
  11. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
  12. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js +47 -9
  13. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/UpcomingTaxDeadlineAlert.es.js.map +1 -1
  14. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  15. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +1 -1
  16. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  17. package/dist/insights-v2/components/chartblocks/ChartLegend.d.ts +3 -1
  18. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js +13 -9
  19. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js.map +1 -1
  20. package/dist/insights-v2/components/chartblocks/DoubleBarChart.d.ts +2 -1
  21. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +36 -35
  22. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
  23. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [9.7.149] - 11-13-2026
2
+
3
+ - **FIXED** - `SVGImageBlock` keys the Upcoming Tax Deadline Alert illustration under `reminder` (was `remainder`), the variant ditto emits, so the card shows its own art instead of the savings illustration; this reverses the key named in 9.7.33 (WEC-2044, WEC-2067)
4
+ - **FIXED** - The Upcoming Tax Deadline Alert illustration follows the brand theme: its colored nodes carry `brand300` / `brand200` / `brand100`, white fills and the CIBC art are unchanged (WEC-2140)
5
+
6
+ ## [9.7.148] - 11-13-2026
7
+
8
+ - **FIXED** - Monthly Spend to Income Comparison V2: Spend draws in `chart2` (was `categories.billsUtilities`) on the card and its drawer, per Figma (WEC-2101)
9
+ - **CHANGED** - Monthly Spend / Debt / Savings to Income: the legend label ("Spend:", "Debt:", "Savings:", "Income:") is bold, the amount regular, on the full card, the mini card and the drawer (WEC-2101)
10
+
1
11
  ## [9.7.147] - 11-12-2026
2
12
 
3
13
  - **FIXED** - Notification settings scroll and back button label on mobile when opened from a deep link (WELL-169, WELL-171)
@@ -1,39 +1,39 @@
1
- import { useGlobalCopyStore as At, useGlobalUiStore as Dt, useInsightsV2Store as Bt } from "../../../common/context/hooks.es.js";
1
+ import { useGlobalCopyStore as Dt, useGlobalUiStore as Bt, useInsightsV2Store as Lt } from "../../../common/context/hooks.es.js";
2
2
  import { CURRENCY_FORMAT as St, formatCurrency as vt } from "../../../core/utils/NumberFormatting.es.js";
3
- import Lt from "../../../common/components/drawer/Drawer.es.js";
4
- import It from "../../../common/components/Loader.es.js";
5
- import { BAR_ARIA_LABEL as Et } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
6
- import { BarChartV2 as Rt } from "../../components/chartblocks/BarchartV2.es.js";
7
- import { EmptyBarChart as xt } from "../../components/chartblocks/EmptyBarChart.es.js";
3
+ import It from "../../../common/components/drawer/Drawer.es.js";
4
+ import Et from "../../../common/components/Loader.es.js";
5
+ import { BAR_ARIA_LABEL as Rt } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
6
+ import { BarChartV2 as xt } from "../../components/chartblocks/BarchartV2.es.js";
7
+ import { EmptyBarChart as Ft } from "../../components/chartblocks/EmptyBarChart.es.js";
8
8
  import { ANALYTICS_EVENTS_CONFIG as V } from "../../analytics/analyticsEventsConfig.es.js";
9
- import { useAnalyticsEvent as Ft } from "../../analytics/useAnalyticsEvent.es.js";
10
- import { DoubleBarChart as Ot } from "../../components/chartblocks/DoubleBarChart.es.js";
11
- import { toLegendItems as jt } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
12
- import { getDefaultSelection as Gt, getDrillDownConfig as Ht, getFlattenedDataSeries as wt, resolveDrillDownSubHeader as Nt, splitProjectedTransaction as kt, toStoreFilter as Mt } from "./utils.es.js";
13
- import { getDynamicCtaBasedOnTriggers as Kt } from "../util.es.js";
14
- import { TransactionDrillDown as Pt } from "./TransactionDrillDown.es.js";
15
- import { useTransactionHistory as Vt } from "./useTransactionHistory.es.js";
16
- import { TransactionDetailsBlock as zt } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
17
- import { useLayoutEffect as Ut, useState as m } from "react";
18
- import { observer as Yt } from "mobx-react-lite";
19
- import { Fragment as Wt, jsx as r, jsxs as $t } from "react/jsx-runtime";
20
- import { useTheme as qt } from "@mui/material/styles";
21
- var _e = Yt(({ beat: s }) => {
22
- const D = qt(), { actionDrawer: B, setActionContext: S } = Bt(), { insights_payload: c } = s, v = Kt(B, c?.primary_cta, c?.secondary_cta, c?.in_description_cta), z = v?.variant, { top: e, filterMode: u, header: U, colors: Y, filterStrategy: W, tipSection: L, subTabAriaLabels: $, slotData: q, beatTransactions: J, hideListHeader: Q, averageFormat: X, subTabs: Z } = Ht(z ?? ""), { instanceSlotData: o, beatTransactions: g, spendCategoryGuids: I, allAccountGuids: E, categoryName: tt, displayedDateRange: h, transactionStore: et } = Vt(s, {
9
+ import { useAnalyticsEvent as Ot } from "../../analytics/useAnalyticsEvent.es.js";
10
+ import { DoubleBarChart as jt } from "../../components/chartblocks/DoubleBarChart.es.js";
11
+ import { toLegendItems as Gt } from "../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils.es.js";
12
+ import { getDefaultSelection as Ht, getDrillDownConfig as wt, getFlattenedDataSeries as Nt, resolveDrillDownSubHeader as kt, splitProjectedTransaction as Mt, toStoreFilter as Kt } from "./utils.es.js";
13
+ import { getDynamicCtaBasedOnTriggers as Pt } from "../util.es.js";
14
+ import { TransactionDrillDown as Vt } from "./TransactionDrillDown.es.js";
15
+ import { useTransactionHistory as zt } from "./useTransactionHistory.es.js";
16
+ import { TransactionDetailsBlock as Ut } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
17
+ import { useLayoutEffect as Yt, useState as m } from "react";
18
+ import { observer as Wt } from "mobx-react-lite";
19
+ import { Fragment as $t, jsx as r, jsxs as qt } from "react/jsx-runtime";
20
+ import { useTheme as Jt } from "@mui/material/styles";
21
+ var Ce = Wt(({ beat: s }) => {
22
+ const D = Jt(), { actionDrawer: B, setActionContext: L } = Lt(), { insights_payload: c } = s, S = Pt(B, c?.primary_cta, c?.secondary_cta, c?.in_description_cta), z = S?.variant, { top: e, filterMode: u, header: U, colors: Y, filterStrategy: W, tipSection: v, subTabAriaLabels: $, slotData: q, beatTransactions: J, hideListHeader: Q, averageFormat: X, subTabs: Z, boldLabel: tt } = wt(z ?? ""), { instanceSlotData: o, beatTransactions: g, spendCategoryGuids: I, allAccountGuids: E, categoryName: et, displayedDateRange: h, transactionStore: ot } = zt(s, {
23
23
  slotData: q,
24
24
  beatTransactions: J
25
- }, v?.drilldown_data), { common: ot, insights_feed: n } = At(), { isCopyLoaded: at } = Dt(), [nt, R] = m(!1), [rt, st] = m(!1), x = Ft(), { dataSeries: p, chartData: b, comparisonBars: i } = wt({
25
+ }, S?.drilldown_data), { common: at, insights_feed: n } = Dt(), { isCopyLoaded: nt } = Bt(), [rt, R] = m(!1), [st, it] = m(!1), x = Ot(), { dataSeries: p, chartData: b, comparisonBars: i } = Nt({
26
26
  data: o?.data_series,
27
- ariaLabel: e === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : Et,
27
+ ariaLabel: e === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : Rt,
28
28
  top: e,
29
29
  beatTransactions: g
30
- }), d = e === "doubleBar", it = e === "tabsOnly", l = d ? i : b, { chartBarIndex: F, subTabIndex: lt } = Gt({
30
+ }), d = e === "doubleBar", lt = e === "tabsOnly", l = d ? i : b, { chartBarIndex: F, subTabIndex: ct } = Ht({
31
31
  chartTabCount: b.length,
32
32
  comparisonTabCount: i.length,
33
33
  actionDrawer: B,
34
34
  beatGuid: s.guid
35
- }), [a, _] = m(F), [C, O] = m(lt), [ct, dt] = m(l.length);
36
- l.length !== ct && (dt(l.length), _(F));
35
+ }), [a, _] = m(F), [C, O] = m(ct), [dt, mt] = m(l.length);
36
+ l.length !== dt && (mt(l.length), _(F));
37
37
  const T = (t) => W({
38
38
  beat: s,
39
39
  beatTransactions: g,
@@ -45,18 +45,18 @@ var _e = Yt(({ beat: s }) => {
45
45
  instanceSlotData: o,
46
46
  spendCategoryGuids: I,
47
47
  displayedDateRange: h
48
- }), mt = g.map((t) => t.guid).join(","), ut = I.join(","), gt = E.join(","), pt = e === "list" || e === "tabsOnly" || e === "monthTabs" || p.length > 0, j = () => {
48
+ }), ut = g.map((t) => t.guid).join(","), gt = I.join(","), pt = E.join(","), bt = e === "list" || e === "tabsOnly" || e === "monthTabs" || p.length > 0, j = () => {
49
49
  if (u !== "store") return;
50
- const t = pt ? T(a) : {
50
+ const t = bt ? T(a) : {
51
51
  accounts: [],
52
52
  custom: () => !1
53
53
  };
54
- et.setFilter(Mt(t, {
54
+ ot.setFilter(Kt(t, {
55
55
  allAccountGuids: E,
56
56
  displayedDateRange: h
57
57
  }));
58
58
  };
59
- Ut(() => {
59
+ Yt(() => {
60
60
  j();
61
61
  }, [
62
62
  s.guid,
@@ -66,46 +66,47 @@ var _e = Yt(({ beat: s }) => {
66
66
  p.length,
67
67
  o,
68
68
  h,
69
- ut,
70
69
  gt,
71
- mt,
70
+ pt,
71
+ ut,
72
72
  e
73
73
  ]);
74
- const G = Nt(c), y = U?.({
74
+ const G = kt(c), y = U?.({
75
75
  title: c?.title,
76
76
  subHeader: G,
77
- categoryName: tt,
77
+ categoryName: et,
78
78
  selectedDate: b[a]?.date ?? void 0,
79
79
  slotData: o
80
80
  }), H = Y(D, o?.category_guid);
81
- if (!at) return /* @__PURE__ */ r(It, {});
82
- const [w, N] = o?.legends ?? [], bt = u === "local" ? (t) => T(t).custom ?? (() => !0) : void 0, { transactions: ft, projectedTransaction: A } = kt(g), ht = u === "local" ? ft : void 0, k = n.general.projected_amount, _t = A && k && T(a).custom?.(A) ? {
81
+ if (!nt) return /* @__PURE__ */ r(Et, {});
82
+ const [w, N] = o?.legends ?? [], ft = u === "local" ? (t) => T(t).custom ?? (() => !0) : void 0, { transactions: ht, projectedTransaction: A } = Mt(g), _t = u === "local" ? ht : void 0, k = n.general.projected_amount, Ct = A && k && T(a).custom?.(A) ? {
83
83
  heading: k,
84
84
  transaction: A
85
85
  } : void 0, M = (t, f) => {
86
86
  x(V.DRAWER_CHART_BAR_CLICKED), _(t), f !== void 0 && O(f);
87
- }, Ct = (t) => {
87
+ }, Tt = (t) => {
88
88
  x(V.TAB_SELECTED), _(t);
89
- }, K = d ? jt([{
89
+ }, K = d ? Gt([{
90
90
  ...w,
91
91
  value: i[a]?.main
92
92
  }, {
93
93
  ...N,
94
94
  value: i[a]?.comparison
95
- }]) : void 0, Tt = $?.(n) ?? [], P = d ? (K ?? []).map((t, f) => ({
95
+ }]) : void 0, yt = $?.(n) ?? [], P = d ? (K ?? []).map((t, f) => ({
96
96
  label: t.label,
97
- ariaLabel: Tt[f]
98
- })) : it ? p.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : Z?.({
97
+ ariaLabel: yt[f]
98
+ })) : lt ? p.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : Z?.({
99
99
  instanceSlotData: o,
100
100
  copy: n
101
- }).map((t) => ({ label: t })) ?? [], yt = d || e === "singleBar" || e === "upcomingBill" ? l.length ? d ? /* @__PURE__ */ r(Ot, {
101
+ }).map((t) => ({ label: t })) ?? [], At = d || e === "singleBar" || e === "upcomingBill" ? l.length ? d ? /* @__PURE__ */ r(jt, {
102
102
  bars: i,
103
+ boldLabel: tt,
103
104
  colors: H,
104
105
  legendPosition: "top",
105
106
  legends: K,
106
107
  onBarClick: M,
107
108
  selectedIndex: a
108
- }) : /* @__PURE__ */ r(Rt, {
109
+ }) : /* @__PURE__ */ r(xt, {
109
110
  amounts: {
110
111
  average: o?.average_amount,
111
112
  formattedAverage: vt(o?.average_amount ?? 0, X ?? St.cents)
@@ -124,40 +125,40 @@ var _e = Yt(({ beat: s }) => {
124
125
  onBarClick: M,
125
126
  selectedTabIndex: a,
126
127
  trendAmountLabel: N?.label ?? n.general.trend
127
- }) : /* @__PURE__ */ r(xt, {}) : null;
128
- return /* @__PURE__ */ $t(Wt, { children: [/* @__PURE__ */ r(Pt, {
129
- baseTransactions: ht,
128
+ }) : /* @__PURE__ */ r(Ft, {}) : null;
129
+ return /* @__PURE__ */ qt($t, { children: [/* @__PURE__ */ r(Vt, {
130
+ baseTransactions: _t,
130
131
  hideListHeader: Q,
131
- projectedRow: _t,
132
+ projectedRow: Ct,
132
133
  heading: y?.heading,
133
134
  icon: y?.icon,
134
- onSelectionChange: Ct,
135
+ onSelectionChange: Tt,
135
136
  selectedIndex: a,
136
137
  subHeadingText: y?.subHeadingText,
137
138
  tabs: l,
138
- top: yt,
139
+ top: At,
139
140
  ...P.length > 0 && { subTabs: {
140
141
  tabs: P,
141
142
  selectedIndex: C,
142
143
  onChange: O
143
144
  } },
144
- ...L && { tipSection: !rt && (L(st, n, G?.text, o) ?? !1) },
145
- transactionFilter: bt,
145
+ ...v && { tipSection: !st && (v(it, n, G?.text, o) ?? !1) },
146
+ transactionFilter: ft,
146
147
  onEachRowClick: (t) => {
147
- S({ transaction_guid: t }), R(!0);
148
+ L({ transaction_guid: t }), R(!0);
148
149
  }
149
- }), /* @__PURE__ */ r(Lt, {
150
- ariaLabelClose: ot.close_aria,
151
- isOpen: nt,
150
+ }), /* @__PURE__ */ r(It, {
151
+ ariaLabelClose: at.close_aria,
152
+ isOpen: rt,
152
153
  onClose: () => {
153
- R(!1), S({ transaction_guid: void 0 }), j();
154
+ R(!1), L({ transaction_guid: void 0 }), j();
154
155
  },
155
156
  title: n.general.transaction_details_title,
156
- children: /* @__PURE__ */ r(zt, { beat: s })
157
+ children: /* @__PURE__ */ r(Ut, { beat: s })
157
158
  })] });
158
159
  });
159
160
  export {
160
- _e as TransactionHistoryBlock
161
+ Ce as TransactionHistoryBlock
161
162
  };
162
163
 
163
164
  //# sourceMappingURL=TransactionHistoryBlock.es.js.map
@@ -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 { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { DoubleBarChart } from '../../components/chartblocks/DoubleBarChart'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\nimport { BAR_ARIA_LABEL } from '../../blocks/ChartBlocks/BarchartBlock/utils'\nimport {\n COMPARISON_BAR_ARIA_LABEL,\n toLegendItems,\n} from '../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n resolveDrillDownSubHeader,\n splitProjectedTransaction,\n toStoreFilter,\n} from './utils'\nimport {\n Drawer,\n useInsightsV2Store,\n useGlobalCopyStore,\n useGlobalUiStore,\n Loader,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { getDynamicCtaBasedOnTriggers } from '../util'\n\ninterface TransactionHistoryProp {\n beat: Beat\n}\n\nexport const TransactionHistoryBlock = observer(({ beat }: TransactionHistoryProp) => {\n const theme = useTheme()\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { insights_payload } = beat\n\n // The CTA that opened the drawer: its variant picks the view, and its drilldown_data feeds a\n // variant that reads its facts from the opener (Monthly Debt to Income). Only drilldown_data is passed\n // on: it is the payload's own object, stable across renders, while the opener may be rebuilt per call.\n const openedCta = getDynamicCtaBasedOnTriggers(\n actionDrawer,\n insights_payload?.primary_cta,\n insights_payload?.secondary_cta,\n insights_payload?.in_description_cta,\n )\n const dynamicCtaVariant = openedCta?.variant\n\n const {\n top,\n filterMode,\n header,\n colors,\n filterStrategy,\n tipSection,\n subTabAriaLabels,\n slotData,\n beatTransactions: resolveBeatTransactions,\n hideListHeader,\n averageFormat,\n subTabs,\n } = getDrillDownConfig(dynamicCtaVariant ?? '')\n\n const {\n instanceSlotData,\n beatTransactions,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(\n beat,\n { slotData, beatTransactions: resolveBeatTransactions },\n openedCta?.drilldown_data,\n )\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 fireAnalyticsEvent = useAnalyticsEvent()\n\n // `getFlattenedDataSeries` runs ahead of the copy-loaded guard below, hence the literal fallback.\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel:\n top === 'doubleBar'\n ? (insightsCopy?.general?.in_month_you_had_a_category_of_amount ??\n COMPARISON_BAR_ARIA_LABEL)\n : BAR_ARIA_LABEL,\n top,\n beatTransactions,\n })\n\n const isDoubleBar = top === 'doubleBar'\n const isTabsOnly = top === 'tabsOnly'\n // The drawer's columns (and tabs): the double bar's month pairs, or the single bar's bars.\n const bars = isDoubleBar ? comparisonBars : chartData\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 // The double-bar drawer's series tab (0 = main, e.g. Spend; 1 = comparison, e.g. Income).\n const [subIndex, setSubIndex] = useState(subTabIndex)\n\n // Bars built from the transaction store (Upcoming Bill's paid bills) can arrive after the drawer\n // opens: re-select the default when the bar count changes. Payload-built bars never change count.\n const [defaultedTabCount, setDefaultedTabCount] = useState(bars.length)\n if (bars.length !== defaultedTabCount) {\n setDefaultedTabCount(bars.length)\n setSelectedIndex(chartBarIndex)\n }\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n comparisonBars,\n selectedIndex: index,\n subIndex,\n isLastTab: index === bars.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Content keys for the effect deps: these arrays get a new identity every render (MEW-3732).\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applied on selection change and when the nested details drawer closes: AddMerchantBudgetAction\n // overwrites transactionStore.filter and never restores it. Chartless tops filter with no bars.\n const canApplyFilter =\n top === 'list' || top === 'tabsOnly' || top === 'monthTabs' || dataSeries.length > 0\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store') return\n // A chart drawer with no bars can name no rows: fail closed rather than keep the store's default\n // (every account) or a previous drawer's filter.\n const filter = canApplyFilter\n ? resolveFilter(selectedIndex)\n : { accounts: [], custom: () => false }\n transactionStore.setFilter(toStoreFilter(filter, { allAccountGuids, displayedDateRange }))\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 subIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n top,\n ])\n\n const subHeader = resolveDrillDownSubHeader(insights_payload)\n\n const headerContent = header?.({\n title: insights_payload?.title,\n subHeader,\n categoryName,\n selectedDate: chartData[selectedIndex]?.date ?? undefined,\n slotData: instanceSlotData,\n })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n\n if (!isCopyLoaded) return <Loader />\n\n // `legends` is the block's additional_data ([0] main, [1] second series), as BarchartBlock reads it.\n const [mainLegend, comparisonLegend] = instanceSlotData?.legends ?? []\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n // Upcoming Bill appends a synthesized projected bill: it draws the last bar and its own labelled\n // row, but is never a plain list row or a CSV line.\n const { transactions: listTransactions, projectedTransaction } =\n splitProjectedTransaction(beatTransactions)\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? listTransactions : undefined\n\n const projectedHeading = insightsCopy.general.projected_amount\n const projectedRow =\n projectedTransaction &&\n projectedHeading &&\n resolveFilter(selectedIndex).custom?.(projectedTransaction)\n ? { heading: projectedHeading, transaction: projectedTransaction }\n : undefined\n\n // A chart bar click selects its column (and, on the double bar, its series); a month tab change\n // selects the month. MUI Tabs only fires onChange on real user selection, not on mount. The\n // series (Spend / Income) tab fires its own analytics via the shared SubTabs component.\n const selectBar = (index: number, seriesIndex?: number) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.DRAWER_CHART_BAR_CLICKED)\n setSelectedIndex(index)\n if (seriesIndex !== undefined) setSubIndex(seriesIndex)\n }\n const selectMonth = (index: number) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TAB_SELECTED)\n setSelectedIndex(index)\n }\n\n // Double bar: the Spend / Income labels come from copy (additional_data); the legend carries the\n // selected month's two totals, and its labels name the series tabs.\n const doubleBarLegends = isDoubleBar\n ? toLegendItems([\n { ...mainLegend, value: comparisonBars[selectedIndex]?.main },\n { ...comparisonLegend, value: comparisonBars[selectedIndex]?.comparison },\n ])\n : undefined\n\n // Legacy pulse named these tabs \"Spend transactions\" / \"Income transactions\" for screen readers.\n const seriesAriaLabels = subTabAriaLabels?.(insightsCopy) ?? []\n\n // The second tab row: the double bar's series, a tabs-only drawer's sides, or the variant's `subTabs`.\n const sideTabs = isDoubleBar\n ? (doubleBarLegends ?? []).map((legend, index) => ({\n label: legend.label,\n ariaLabel: seriesAriaLabels[index],\n }))\n : isTabsOnly\n ? dataSeries.flatMap((row) => (row.localized_label ? [{ label: row.localized_label }] : []))\n : (subTabs?.({ instanceSlotData, copy: insightsCopy }).map((label) => ({ label })) ?? [])\n\n const renderChart = () => {\n if (!bars.length) return <EmptyBarChart />\n\n return isDoubleBar ? (\n <DoubleBarChart\n bars={comparisonBars}\n colors={barColors}\n legendPosition=\"top\"\n legends={doubleBarLegends}\n onBarClick={selectBar}\n selectedIndex={selectedIndex}\n />\n ) : (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(\n instanceSlotData?.average_amount ?? 0,\n averageFormat ?? CURRENCY_FORMAT.cents,\n ),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n // Figma's chart drawer: 172px of bars under the 24px legend, 200px in all.\n heightOverride={172}\n margin={{\n bottom: 8,\n top: 24,\n left: 24,\n right: 24,\n }}\n // TODO: Temporary fallback while the backend doesn't always send `legends` on every\n // beat/variant. Remove this once the backend guarantees `legends` on the payload.\n monthlyAmountLabel={mainLegend?.label ?? insightsCopy.general.monthly_amount}\n onBarClick={selectBar}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={comparisonLegend?.label ?? insightsCopy.general.trend}\n />\n )\n }\n\n // `list` (Low Account Balance), `tabsOnly` (Non-Essential Category Summary) and `monthTabs`\n // (Monthly Subscription Aggregate) drawers have no chart above their transaction list.\n const chartTop =\n isDoubleBar || top === 'singleBar' || top === 'upcomingBill' ? renderChart() : null\n\n return (\n <>\n <TransactionDrillDown\n baseTransactions={baseTransactions}\n hideListHeader={hideListHeader}\n projectedRow={projectedRow}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={selectMonth}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={bars}\n top={chartTop}\n {...(sideTabs.length > 0 && {\n subTabs: { tabs: sideTabs, selectedIndex: subIndex, onChange: setSubIndex },\n })}\n {...(tipSection && {\n tipSection:\n !closeTipSection &&\n (tipSection(setCloseTipSection, insightsCopy, subHeader?.text, instanceSlotData) ??\n false),\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":";;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GAEjB,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAmB,GAExD,EAAE,kBAAA,EAAA,IAAqB,GAKvB,IAAY,GAChB,GACA,GAAkB,aAClB,GAAkB,eAClB,GAAkB,kBACpB,GACM,IAAoB,GAAW,SAE/B,EACJ,KAAA,GACA,YAAA,GACA,QAAA,GACA,QAAA,GACA,gBAAA,GACA,YAAA,GACA,kBAAA,GACA,UAAA,GACA,kBAAkB,GAClB,gBAAA,GACA,eAAA,GACA,SAAA,EAAA,IACE,GAAmB,KAAqB,EAAE,GAExC,EACJ,kBAAA,GACA,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,cAAA,IACA,oBAAA,GACA,kBAAA,GAAA,IACE,GACF,GACA;AAAA,IAAE,UAAA;AAAA,IAAU,kBAAkB;AAAA,EAAwB,GACtD,GAAW,cACb,GAEM,EAAE,QAAQ,IAAY,eAAe,EAAA,IAAiB,GAAmB,GAEzE,EAAE,cAAA,GAAA,IAAiB,GAAiB,GAEpC,CAAC,IAA0B,CAAA,IAA+B,EAAS,EAAK,GAExE,CAAC,IAAiB,EAAA,IAAsB,EAAS,EAAK,GAEtD,IAAqB,GAAkB,GAGvC,EAAE,YAAA,GAAY,WAAA,GAAW,gBAAA,EAAA,IAAmB,GAAuB;AAAA,IACvE,MAAM,GAAkB;AAAA,IACxB,WACE,MAA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SACE,gBAAA,GAAA,IAAA,EAAA,UAAA,CACE,gBAAA,EAAC,IAAD;AAAA,IACoB,kBAAA;AAAA,IACF,gBAAA;AAAA,IACF,cAAA;AAAA,IACd,SAAS,GAAe;AAAA,IACxB,MAAM,GAAe;AAAA,IACrB,mBAAmB;AAAA,IACJ,eAAA;AAAA,IACf,gBAAgB,GAAe;AAAA,IAC/B,MAAM;AAAA,IACN,KAAK;AAAA,IACL,GAAK,EAAS,SAAS,KAAK,EAC1B,SAAS;AAAA,MAAE,MAAM;AAAA,MAAU,eAAe;AAAA,MAAU,UAAU;AAAA,IAAY,EAC5E;AAAA,IACA,GAAK,KAAc,EACjB,YACE,CAAC,OACA,EAAW,IAAoB,GAAc,GAAW,MAAM,CAAgB,KAC7E,IACN;AAAA,IACmB,mBAAA;AAAA,IACnB,gBAAA,CAAiB,MAAS;AACxB,MAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAA4B,EAAI;AAAA,IAClC;AAAA,EACD,CAAA,GACD,gBAAA,EAAC,IAAD;AAAA,IACE,gBAAgB,GAAW;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;AAEN,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 { CURRENCY_FORMAT, formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { DoubleBarChart } from '../../components/chartblocks/DoubleBarChart'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\nimport { BAR_ARIA_LABEL } from '../../blocks/ChartBlocks/BarchartBlock/utils'\nimport {\n COMPARISON_BAR_ARIA_LABEL,\n toLegendItems,\n} from '../../blocks/ChartBlocks/DoubleBarChartBlock/comparisonUtils'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n resolveDrillDownSubHeader,\n splitProjectedTransaction,\n toStoreFilter,\n} from './utils'\nimport {\n Drawer,\n useInsightsV2Store,\n useGlobalCopyStore,\n useGlobalUiStore,\n Loader,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { getDynamicCtaBasedOnTriggers } from '../util'\n\ninterface TransactionHistoryProp {\n beat: Beat\n}\n\nexport const TransactionHistoryBlock = observer(({ beat }: TransactionHistoryProp) => {\n const theme = useTheme()\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { insights_payload } = beat\n\n // The CTA that opened the drawer: its variant picks the view, and its drilldown_data feeds a\n // variant that reads its facts from the opener (Monthly Debt to Income). Only drilldown_data is passed\n // on: it is the payload's own object, stable across renders, while the opener may be rebuilt per call.\n const openedCta = getDynamicCtaBasedOnTriggers(\n actionDrawer,\n insights_payload?.primary_cta,\n insights_payload?.secondary_cta,\n insights_payload?.in_description_cta,\n )\n const dynamicCtaVariant = openedCta?.variant\n\n const {\n top,\n filterMode,\n header,\n colors,\n filterStrategy,\n tipSection,\n subTabAriaLabels,\n slotData,\n beatTransactions: resolveBeatTransactions,\n hideListHeader,\n averageFormat,\n subTabs,\n boldLabel,\n } = getDrillDownConfig(dynamicCtaVariant ?? '')\n\n const {\n instanceSlotData,\n beatTransactions,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(\n beat,\n { slotData, beatTransactions: resolveBeatTransactions },\n openedCta?.drilldown_data,\n )\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 fireAnalyticsEvent = useAnalyticsEvent()\n\n // `getFlattenedDataSeries` runs ahead of the copy-loaded guard below, hence the literal fallback.\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel:\n top === 'doubleBar'\n ? (insightsCopy?.general?.in_month_you_had_a_category_of_amount ??\n COMPARISON_BAR_ARIA_LABEL)\n : BAR_ARIA_LABEL,\n top,\n beatTransactions,\n })\n\n const isDoubleBar = top === 'doubleBar'\n const isTabsOnly = top === 'tabsOnly'\n // The drawer's columns (and tabs): the double bar's month pairs, or the single bar's bars.\n const bars = isDoubleBar ? comparisonBars : chartData\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 // The double-bar drawer's series tab (0 = main, e.g. Spend; 1 = comparison, e.g. Income).\n const [subIndex, setSubIndex] = useState(subTabIndex)\n\n // Bars built from the transaction store (Upcoming Bill's paid bills) can arrive after the drawer\n // opens: re-select the default when the bar count changes. Payload-built bars never change count.\n const [defaultedTabCount, setDefaultedTabCount] = useState(bars.length)\n if (bars.length !== defaultedTabCount) {\n setDefaultedTabCount(bars.length)\n setSelectedIndex(chartBarIndex)\n }\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n comparisonBars,\n selectedIndex: index,\n subIndex,\n isLastTab: index === bars.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Content keys for the effect deps: these arrays get a new identity every render (MEW-3732).\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applied on selection change and when the nested details drawer closes: AddMerchantBudgetAction\n // overwrites transactionStore.filter and never restores it. Chartless tops filter with no bars.\n const canApplyFilter =\n top === 'list' || top === 'tabsOnly' || top === 'monthTabs' || dataSeries.length > 0\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store') return\n // A chart drawer with no bars can name no rows: fail closed rather than keep the store's default\n // (every account) or a previous drawer's filter.\n const filter = canApplyFilter\n ? resolveFilter(selectedIndex)\n : { accounts: [], custom: () => false }\n transactionStore.setFilter(toStoreFilter(filter, { allAccountGuids, displayedDateRange }))\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 subIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n top,\n ])\n\n const subHeader = resolveDrillDownSubHeader(insights_payload)\n\n const headerContent = header?.({\n title: insights_payload?.title,\n subHeader,\n categoryName,\n selectedDate: chartData[selectedIndex]?.date ?? undefined,\n slotData: instanceSlotData,\n })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n\n if (!isCopyLoaded) return <Loader />\n\n // `legends` is the block's additional_data ([0] main, [1] second series), as BarchartBlock reads it.\n const [mainLegend, comparisonLegend] = instanceSlotData?.legends ?? []\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n // Upcoming Bill appends a synthesized projected bill: it draws the last bar and its own labelled\n // row, but is never a plain list row or a CSV line.\n const { transactions: listTransactions, projectedTransaction } =\n splitProjectedTransaction(beatTransactions)\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? listTransactions : undefined\n\n const projectedHeading = insightsCopy.general.projected_amount\n const projectedRow =\n projectedTransaction &&\n projectedHeading &&\n resolveFilter(selectedIndex).custom?.(projectedTransaction)\n ? { heading: projectedHeading, transaction: projectedTransaction }\n : undefined\n\n // A chart bar click selects its column (and, on the double bar, its series); a month tab change\n // selects the month. MUI Tabs only fires onChange on real user selection, not on mount. The\n // series (Spend / Income) tab fires its own analytics via the shared SubTabs component.\n const selectBar = (index: number, seriesIndex?: number) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.DRAWER_CHART_BAR_CLICKED)\n setSelectedIndex(index)\n if (seriesIndex !== undefined) setSubIndex(seriesIndex)\n }\n const selectMonth = (index: number) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TAB_SELECTED)\n setSelectedIndex(index)\n }\n\n // Double bar: the Spend / Income labels come from copy (additional_data); the legend carries the\n // selected month's two totals, and its labels name the series tabs.\n const doubleBarLegends = isDoubleBar\n ? toLegendItems([\n { ...mainLegend, value: comparisonBars[selectedIndex]?.main },\n { ...comparisonLegend, value: comparisonBars[selectedIndex]?.comparison },\n ])\n : undefined\n\n // Legacy pulse named these tabs \"Spend transactions\" / \"Income transactions\" for screen readers.\n const seriesAriaLabels = subTabAriaLabels?.(insightsCopy) ?? []\n\n // The second tab row: the double bar's series, a tabs-only drawer's sides, or the variant's `subTabs`.\n const sideTabs = isDoubleBar\n ? (doubleBarLegends ?? []).map((legend, index) => ({\n label: legend.label,\n ariaLabel: seriesAriaLabels[index],\n }))\n : isTabsOnly\n ? dataSeries.flatMap((row) => (row.localized_label ? [{ label: row.localized_label }] : []))\n : (subTabs?.({ instanceSlotData, copy: insightsCopy }).map((label) => ({ label })) ?? [])\n\n const renderChart = () => {\n if (!bars.length) return <EmptyBarChart />\n\n return isDoubleBar ? (\n <DoubleBarChart\n bars={comparisonBars}\n boldLabel={boldLabel}\n colors={barColors}\n legendPosition=\"top\"\n legends={doubleBarLegends}\n onBarClick={selectBar}\n selectedIndex={selectedIndex}\n />\n ) : (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(\n instanceSlotData?.average_amount ?? 0,\n averageFormat ?? CURRENCY_FORMAT.cents,\n ),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n // Figma's chart drawer: 172px of bars under the 24px legend, 200px in all.\n heightOverride={172}\n margin={{\n bottom: 8,\n top: 24,\n left: 24,\n right: 24,\n }}\n // TODO: Temporary fallback while the backend doesn't always send `legends` on every\n // beat/variant. Remove this once the backend guarantees `legends` on the payload.\n monthlyAmountLabel={mainLegend?.label ?? insightsCopy.general.monthly_amount}\n onBarClick={selectBar}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={comparisonLegend?.label ?? insightsCopy.general.trend}\n />\n )\n }\n\n // `list` (Low Account Balance), `tabsOnly` (Non-Essential Category Summary) and `monthTabs`\n // (Monthly Subscription Aggregate) drawers have no chart above their transaction list.\n const chartTop =\n isDoubleBar || top === 'singleBar' || top === 'upcomingBill' ? renderChart() : null\n\n return (\n <>\n <TransactionDrillDown\n baseTransactions={baseTransactions}\n hideListHeader={hideListHeader}\n projectedRow={projectedRow}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={selectMonth}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={bars}\n top={chartTop}\n {...(sideTabs.length > 0 && {\n subTabs: { tabs: sideTabs, selectedIndex: subIndex, onChange: setSubIndex },\n })}\n {...(tipSection && {\n tipSection:\n !closeTipSection &&\n (tipSection(setCloseTipSection, insightsCopy, subHeader?.text, instanceSlotData) ??\n false),\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":";;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GAEjB,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAmB,GAExD,EAAE,kBAAA,EAAA,IAAqB,GAKvB,IAAY,GAChB,GACA,GAAkB,aAClB,GAAkB,eAClB,GAAkB,kBACpB,GACM,IAAoB,GAAW,SAE/B,EACJ,KAAA,GACA,YAAA,GACA,QAAA,GACA,QAAA,GACA,gBAAA,GACA,YAAA,GACA,kBAAA,GACA,UAAA,GACA,kBAAkB,GAClB,gBAAA,GACA,eAAA,GACA,SAAA,GACA,WAAA,GAAA,IACE,GAAmB,KAAqB,EAAE,GAExC,EACJ,kBAAA,GACA,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,cAAA,IACA,oBAAA,GACA,kBAAA,GAAA,IACE,GACF,GACA;AAAA,IAAE,UAAA;AAAA,IAAU,kBAAkB;AAAA,EAAwB,GACtD,GAAW,cACb,GAEM,EAAE,QAAQ,IAAY,eAAe,EAAA,IAAiB,GAAmB,GAEzE,EAAE,cAAA,GAAA,IAAiB,GAAiB,GAEpC,CAAC,IAA0B,C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y: InsightsFeedCopy) => (string | undefined)[];
80
80
  hideListHeader?: boolean;
81
81
  averageFormat?: CurrencyFormat;
82
+ boldLabel?: boolean;
82
83
  }
83
84
  export declare const resolveUpcomingBillSlotData: SlotDataResolver;
84
85
  export declare const resolveSavingsContributionsSlotData: SlotDataResolver;
@@ -1,4 +1,4 @@
1
- import { buildDynamicCopy as T } from "../../../core/utils/Localization.es.js";
1
+ import { buildDynamicCopy as b } from "../../../core/utils/Localization.es.js";
2
2
  import { DATE_FORMATS_INTL as N, formatDate as O } from "../../../core/constants/DateFormats.es.js";
3
3
  import { TransactionStatus as H } from "../../../core/types/Transaction.es.js";
4
4
  import { fromUnixUTC as L } from "../../../core/utils/DateUtil.es.js";
@@ -6,7 +6,7 @@ import { CURRENCY_FORMAT as Y } from "../../../core/utils/NumberFormatting.es.js
6
6
  import { getCategoryColor as F } from "../../../core/utils/CategoryUtil.es.js";
7
7
  import { buildDataSeries as R } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
8
8
  import { asGuidList as A, asNonEmptyText as l, asNumber as m } from "../../blocks/slotReaders.es.js";
9
- import { getLayoutConfig as b } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
9
+ import { getLayoutConfig as y } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
10
10
  import k from "../../components/LogoMark.es.js";
11
11
  import { buildProjectedBillTransaction as V, calendarDateOf as x, toDrillDownSlotData as W } from "./utils.es.js";
12
12
  import { Icon as B } from "@mxenabled/mx-icons";
@@ -27,7 +27,7 @@ var n = {
27
27
  LOW_BALANCE: "low_balance",
28
28
  SUBSCRIPTION_AGGREGATE: "monthly_subscription_aggregate",
29
29
  MERCHANT_BUDGET: "merchant_budget"
30
- }, g = (t, e) => e && F(e, t) || t.palette.primary.main, h = (t) => typeof t == "string" ? u(t) : new Date(t ?? NaN), v = (t) => ({
30
+ }, g = (t, e) => e && F(e, t) || t.palette.primary.main, h = (t) => typeof t == "string" ? u(t) : new Date(t ?? NaN), T = (t) => ({
31
31
  start: I(h(t)),
32
32
  end: M(h(t))
33
33
  }), U = (t) => t?.length ? { accounts: t } : {}, j = ({ beat: t }) => {
@@ -93,7 +93,7 @@ var n = {
93
93
  const a = e.transaction_history_block?.monthly_debt_to_income_tip_message, r = e.transaction_history_block?.monthly_debt_to_income_tip_limit;
94
94
  if (!(!a || !r))
95
95
  return {
96
- message: T(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
96
+ message: b(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
97
97
  onDismiss: () => t(!0)
98
98
  };
99
99
  }, $ = (t, e) => {
@@ -103,7 +103,7 @@ var n = {
103
103
  const a = e.transaction_history_block?.savings_to_income_tip_message, r = e.transaction_history_block?.savings_to_income_tip_percentage;
104
104
  if (!(!a || !r))
105
105
  return {
106
- message: T(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
106
+ message: b(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
107
107
  onDismiss: () => t(!0)
108
108
  };
109
109
  }, et = (t) => R(_(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), at = (t, e) => {
@@ -115,27 +115,27 @@ var n = {
115
115
  const i = e.transaction_history_block?.upcoming_bill_tip_message;
116
116
  if (i)
117
117
  return {
118
- message: T(i, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), o, O(u(s), N.FULL_MONTH_DAY)),
118
+ message: b(i, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), o, O(u(s), N.FULL_MONTH_DAY)),
119
119
  onDismiss: () => t(!0)
120
120
  };
121
121
  }, D = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
122
122
  const r = e[a], o = r?.guid, s = t.find((i) => i.guid === o)?.has_been_split;
123
123
  return {
124
124
  custom: (i) => i.guid === o,
125
- dateRange: v(r?.date),
125
+ dateRange: T(r?.date),
126
126
  showSplits: !s
127
127
  };
128
128
  }, ot = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
129
129
  const r = t[e], o = a.category_guid ?? r?.guid;
130
130
  return {
131
131
  custom: (s) => s.category_guid === o || s.top_level_category_guid === o,
132
- dateRange: v(r?.date)
132
+ dateRange: T(r?.date)
133
133
  };
134
134
  }, st = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
135
135
  const o = t[e];
136
136
  return {
137
137
  custom: (s) => !!s.top_level_category_guid && a.includes(s.top_level_category_guid),
138
- dateRange: v(o?.date),
138
+ dateRange: T(o?.date),
139
139
  ...U(r.account_guids)
140
140
  };
141
141
  }, nt = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
@@ -151,7 +151,7 @@ var n = {
151
151
  }
152
152
  };
153
153
  }, it = (t) => typeof t == "number" ? z(t) : u(t ?? ""), ct = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
154
- const s = e[a], { start: i, end: p } = v(s?.date), d = it(t.created_at), S = o.account_guids, C = {
154
+ const s = e[a], { start: i, end: p } = T(s?.date), d = it(t.created_at), S = o.account_guids, C = {
155
155
  start: i,
156
156
  end: r && E(d) && d < p ? d : p
157
157
  };
@@ -163,7 +163,7 @@ var n = {
163
163
  accounts: [],
164
164
  custom: () => !1
165
165
  };
166
- }, y = (t, e, a) => {
166
+ }, v = (t, e, a) => {
167
167
  const r = new Set(t), o = u(e ?? "");
168
168
  return !r.size || !E(o) ? {
169
169
  accounts: [],
@@ -176,12 +176,12 @@ var n = {
176
176
  },
177
177
  ...U(a)
178
178
  };
179
- }, lt = ({ beat: t, dataSeries: e, selectedIndex: a }) => y(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), f = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
179
+ }, lt = ({ beat: t, dataSeries: e, selectedIndex: a }) => v(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), f = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
180
180
  const o = e[a];
181
- return y(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
182
- }, _t = ({ beat: t, dataSeries: e, subIndex: a }) => y(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), dt = (t) => {
181
+ return v(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
182
+ }, _t = ({ beat: t, dataSeries: e, subIndex: a }) => v(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), dt = (t) => {
183
183
  const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, s = e[a], i = new Set(o.income_transaction_guids), p = w[r] === "income", d = o.sub_tab_labels ? s?.aggregated_guids?.filter((S) => i.has(S) === p) : s?.aggregated_guids;
184
- return y(d, s?.date);
184
+ return v(d, s?.date);
185
185
  }, At = {
186
186
  [n.TRANSACTION]: {
187
187
  top: "singleBar",
@@ -204,7 +204,7 @@ var n = {
204
204
  };
205
205
  },
206
206
  tipSection: (t, e, a = "") => ({
207
- message: T(e.general.tip_section_message, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: a })),
207
+ message: b(e.general.tip_section_message, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: a })),
208
208
  onDismiss: () => t(!0)
209
209
  })
210
210
  },
@@ -298,7 +298,8 @@ var n = {
298
298
  filterStrategy: f,
299
299
  scope: "store",
300
300
  filterMode: "store",
301
- colors: (t) => b(t, "spend_to_income")?.color ?? [],
301
+ colors: (t) => y(t, "spend_to_income")?.color ?? [],
302
+ boldLabel: !0,
302
303
  subTabAriaLabels: (t) => [t.general.spend_transactions, t.general.income_transactions]
303
304
  },
304
305
  [n.COST_OF_LIVING]: {
@@ -314,7 +315,8 @@ var n = {
314
315
  filterStrategy: f,
315
316
  scope: "store",
316
317
  filterMode: "store",
317
- colors: (t) => b(t, "debt_to_income")?.color ?? [],
318
+ colors: (t) => y(t, "debt_to_income")?.color ?? [],
319
+ boldLabel: !0,
318
320
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions],
319
321
  slotData: P,
320
322
  fetchMissingTransactions: G,
@@ -325,7 +327,8 @@ var n = {
325
327
  filterStrategy: f,
326
328
  scope: "store",
327
329
  filterMode: "store",
328
- colors: (t) => b(t, "savings_to_income")?.color ?? [],
330
+ colors: (t) => y(t, "savings_to_income")?.color ?? [],
331
+ boldLabel: !0,
329
332
  subTabAriaLabels: (t) => [t.general.savings_transactions, t.general.income_transactions],
330
333
  slotData: $,
331
334
  fetchMissingTransactions: G,