@mx-cartographer/experiences 9.7.152 → 9.7.153

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## [9.7.153] - 11-13-2026
2
+
3
+ - **FIXED** - Insights 2.0 Expense Details: the Remove button matches Figma (WEC-2316)
4
+ - **FIXED** - Low Account Balance drawer shows the Transactions heading with Export CSV, as the other drawers do (WEC-2316)
5
+ - **CHANGED** - Storybook: the Fee Detected no-merchant micro uses its mrs_content copy (WEC-2278)
6
+
1
7
  ## [9.7.152] - 11-13-2026
2
8
 
3
9
  - **ADDED** - Monthly Subscription Aggregate: the Subscriptions drawer shows the subscription count, the month and a tip above the list, and captions each row's amount with its merchant's frequency; tapping a row opens that subscription's Expense Details (WEC-2298)
@@ -1,24 +1,25 @@
1
- import { useGlobalCopyStore as x, useInsightsV2Store as y, useTransactionStore as D } from "../../../common/context/hooks.es.js";
2
- import L from "../../../common/components/Loader.es.js";
3
- import { RecurringTransactionDetails as B } from "../../../recurringtransactions/components/RecurringTransactionDetails.es.js";
4
- import { ErrorCard as E } from "../../components/ErrorCard.es.js";
5
- import { useRecurringTransactionBlock as b } from "./useRecurringTransactionBlock.es.js";
6
- import { useRecurringTransactionLoad as h } from "./useRecurringTransactionPrepare.es.js";
1
+ import { useGlobalCopyStore as x, useInsightsV2Store as y, useTransactionStore as B } from "../../../common/context/hooks.es.js";
2
+ import D from "../../../common/components/Loader.es.js";
3
+ import { RecurringTransactionDetails as L } from "../../../recurringtransactions/components/RecurringTransactionDetails.es.js";
4
+ import { ErrorCard as h } from "../../components/ErrorCard.es.js";
5
+ import { useRecurringTransactionBlock as E } from "./useRecurringTransactionBlock.es.js";
6
+ import { useRecurringTransactionLoad as b } from "./useRecurringTransactionPrepare.es.js";
7
7
  import r from "react";
8
8
  import { observer as k } from "mobx-react-lite";
9
9
  import { Text as S } from "@mxenabled/mxui";
10
10
  import { jsx as t } from "react/jsx-runtime";
11
11
  var z = k(function({ beat: f, layout: l = "default", onDeleted: m, repeatingTransactionGuid: d, selectedRecurrence: p = null }) {
12
- const { closeActionDrawer: R } = y(), { recurring: g } = x(), { filter: T, setFilter: n } = D(), { hasLoadError: i, isLoading: c, repeatingTransaction: o } = b(f, d), v = h(), e = r.useRef(null);
12
+ const { closeActionDrawer: R } = y(), { recurring: g } = x(), { filter: T, setFilter: n } = B(), { hasLoadError: i, isLoading: c, repeatingTransaction: o } = E(f, d), v = b(), e = r.useRef(null);
13
13
  e.current === null && (e.current = { ...T });
14
14
  const s = r.useRef(n), a = r.useRef(!1), u = !c && !i && o !== void 0;
15
15
  return s.current = n, r.useEffect(() => {
16
16
  u && (a.current = !0);
17
17
  }, [u]), r.useEffect(() => () => {
18
18
  a.current && e.current && s.current(e.current);
19
- }, []), c ? /* @__PURE__ */ t(L, {}) : i ? /* @__PURE__ */ t(E, { onRetry: () => {
19
+ }, []), c ? /* @__PURE__ */ t(D, {}) : i ? /* @__PURE__ */ t(h, { onRetry: () => {
20
20
  v();
21
- } }) : o ? /* @__PURE__ */ t(B, {
21
+ } }) : o ? /* @__PURE__ */ t(L, {
22
+ insightsRemoveButton: !0,
22
23
  layout: l,
23
24
  onDeleted: m ?? R,
24
25
  recurringTransaction: o,
@@ -1 +1 @@
1
- {"version":3,"file":"RecurringTransactionBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Loader,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Recurrence } from '../../../core'\nimport type { TransactionFilter } from '../../../core/stores/TransactionStore'\nimport { RecurringTransactionDetails } from '../../../recurringtransactions/components/RecurringTransactionDetails'\nimport { ErrorCard } from '../../components/ErrorCard'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport { useRecurringTransactionBlock } from './useRecurringTransactionBlock'\nimport { useRecurringTransactionLoad } from './useRecurringTransactionPrepare'\n\n/**\n * Expense Details drawer: resolves which recurring transaction, then renders `RecurringTransactionDetails`.\n * A nested opener (a tapped row) passes the guid, occurrence and its own close; a CTA passes none.\n */\nexport const RecurringTransactionBlock = observer(function RecurringTransactionBlock({\n beat,\n layout = 'default',\n onDeleted,\n repeatingTransactionGuid,\n selectedRecurrence = null,\n}: ActionBlockProps & {\n /** `insights` is the Monthly Obligations Expense Details layout; other beats keep `default`. */\n layout?: 'default' | 'insights'\n onDeleted?: () => void\n repeatingTransactionGuid?: string\n selectedRecurrence?: Recurrence | null\n}) {\n const { closeActionDrawer } = useInsightsV2Store()\n const { recurring: copy } = useGlobalCopyStore()\n const { filter, setFilter } = useTransactionStore()\n const { hasLoadError, isLoading, repeatingTransaction } = useRecurringTransactionBlock(\n beat,\n repeatingTransactionGuid,\n )\n const retryLoad = useRecurringTransactionLoad()\n\n // The details view narrows the shared TransactionStore filter and never restores it: snapshot it by\n // value now, and put it back on unmount only if the details actually rendered.\n const filterBeforeOpen = React.useRef<TransactionFilter | null>(null)\n\n if (filterBeforeOpen.current === null) filterBeforeOpen.current = { ...filter }\n\n const setFilterRef = React.useRef(setFilter)\n const didRenderDetails = React.useRef(false)\n const isDetailsRendered = !isLoading && !hasLoadError && repeatingTransaction !== undefined\n\n setFilterRef.current = setFilter\n\n React.useEffect(() => {\n if (isDetailsRendered) didRenderDetails.current = true\n }, [isDetailsRendered])\n\n React.useEffect(\n () => () => {\n if (didRenderDetails.current && filterBeforeOpen.current) {\n setFilterRef.current(filterBeforeOpen.current)\n }\n },\n [],\n )\n\n if (isLoading) return <Loader />\n\n if (hasLoadError) return <ErrorCard onRetry={() => void retryLoad()} />\n\n // Deleted, never detected, or the beat names none.\n if (!repeatingTransaction) {\n return (\n <Text color=\"text.secondary\" sx={{ m: 24, textAlign: 'center' }} variant=\"body1\">\n {copy.no_activities}\n </Text>\n )\n }\n\n return (\n <RecurringTransactionDetails\n layout={layout}\n onDeleted={onDeleted ?? closeActionDrawer}\n recurringTransaction={repeatingTransaction}\n selectedRecurrence={selectedRecurrence}\n />\n )\n})\n"],"mappings":";;;;;;;;;;AAwBA,IAAa,IAA4B,EAAS,SAAmC,EACnF,MAAA,GACA,QAAA,IAAS,WACT,WAAA,GACA,0BAAA,GACA,oBAAA,IAAqB,KAAA,GAOpB;AACD,QAAM,EAAE,mBAAA,EAAA,IAAsB,EAAmB,GAC3C,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,EAAE,QAAA,GAAQ,WAAA,EAAA,IAAc,EAAoB,GAC5C,EAAE,cAAA,GAAc,WAAA,GAAW,sBAAA,EAAA,IAAyB,EACxD,GACA,CACF,GACM,IAAY,EAA4B,GAIxC,IAAmB,EAAM,OAAiC,IAAI;AAEpE,EAAI,EAAiB,YAAY,SAAM,EAAiB,UAAU,EAAE,GAAG,EAAO;AAE9E,QAAM,IAAe,EAAM,OAAO,CAAS,GACrC,IAAmB,EAAM,OAAO,EAAK,GACrC,IAAoB,CAAC,KAAa,CAAC,KAAgB,MAAyB;AAiBlF,SAfA,EAAa,UAAU,GAEvB,EAAM,UAAA,MAAgB;AACpB,IAAI,MAAmB,EAAiB,UAAU;AAAA,EACpD,GAAG,CAAC,CAAiB,CAAC,GAEtB,EAAM,UAAA,MAAA,MACQ;AACV,IAAI,EAAiB,WAAW,EAAiB,WAC/C,EAAa,QAAQ,EAAiB,OAAO;AAAA,EAEjD,GACA,CAAC,CACH,GAEI,IAAkB,gBAAA,EAAC,GAAD,CAAS,CAAA,IAE3B,IAAqB,gBAAA,EAAC,GAAD,EAAW,SAAA,MAAA;AAAe,IAAK,EAAU;AAAA,IAAI,CAAA,IAGjE,IASH,gBAAA,EAAC,GAAD;AAAA,IACU,QAAA;AAAA,IACR,WAAW,KAAa;AAAA,IACxB,sBAAsB;AAAA,IACF,oBAAA;AAAA,EACrB,CAAA,IAZC,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,IAAI;AAAA,MAAE,GAAG;AAAA,MAAI,WAAW;AAAA,IAAS;AAAA,IAAG,SAAQ;AAAA,IACtE,UAAA,EAAK;AAAA,EACF,CAAA;AAYZ,CAAC"}
1
+ {"version":3,"file":"RecurringTransactionBlock.es.js","names":[],"sources":["../../../../src/insights-v2/actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '@mxenabled/mxui'\nimport { observer } from 'mobx-react-lite'\n\nimport {\n Loader,\n useGlobalCopyStore,\n useInsightsV2Store,\n useTransactionStore,\n} from '../../../common'\nimport type { Recurrence } from '../../../core'\nimport type { TransactionFilter } from '../../../core/stores/TransactionStore'\nimport { RecurringTransactionDetails } from '../../../recurringtransactions/components/RecurringTransactionDetails'\nimport { ErrorCard } from '../../components/ErrorCard'\nimport type { ActionBlockProps } from '../../mappings/blocks'\n\nimport { useRecurringTransactionBlock } from './useRecurringTransactionBlock'\nimport { useRecurringTransactionLoad } from './useRecurringTransactionPrepare'\n\n/**\n * Expense Details drawer: resolves which recurring transaction, then renders `RecurringTransactionDetails`.\n * A nested opener (a tapped row) passes the guid, occurrence and its own close; a CTA passes none.\n */\nexport const RecurringTransactionBlock = observer(function RecurringTransactionBlock({\n beat,\n layout = 'default',\n onDeleted,\n repeatingTransactionGuid,\n selectedRecurrence = null,\n}: ActionBlockProps & {\n /** `insights` is the Monthly Obligations Expense Details layout; other beats keep `default`. */\n layout?: 'default' | 'insights'\n onDeleted?: () => void\n repeatingTransactionGuid?: string\n selectedRecurrence?: Recurrence | null\n}) {\n const { closeActionDrawer } = useInsightsV2Store()\n const { recurring: copy } = useGlobalCopyStore()\n const { filter, setFilter } = useTransactionStore()\n const { hasLoadError, isLoading, repeatingTransaction } = useRecurringTransactionBlock(\n beat,\n repeatingTransactionGuid,\n )\n const retryLoad = useRecurringTransactionLoad()\n\n // The details view narrows the shared TransactionStore filter and never restores it: snapshot it by\n // value now, and put it back on unmount only if the details actually rendered.\n const filterBeforeOpen = React.useRef<TransactionFilter | null>(null)\n\n if (filterBeforeOpen.current === null) filterBeforeOpen.current = { ...filter }\n\n const setFilterRef = React.useRef(setFilter)\n const didRenderDetails = React.useRef(false)\n const isDetailsRendered = !isLoading && !hasLoadError && repeatingTransaction !== undefined\n\n setFilterRef.current = setFilter\n\n React.useEffect(() => {\n if (isDetailsRendered) didRenderDetails.current = true\n }, [isDetailsRendered])\n\n React.useEffect(\n () => () => {\n if (didRenderDetails.current && filterBeforeOpen.current) {\n setFilterRef.current(filterBeforeOpen.current)\n }\n },\n [],\n )\n\n if (isLoading) return <Loader />\n\n if (hasLoadError) return <ErrorCard onRetry={() => void retryLoad()} />\n\n // Deleted, never detected, or the beat names none.\n if (!repeatingTransaction) {\n return (\n <Text color=\"text.secondary\" sx={{ m: 24, textAlign: 'center' }} variant=\"body1\">\n {copy.no_activities}\n </Text>\n )\n }\n\n return (\n <RecurringTransactionDetails\n insightsRemoveButton={true}\n layout={layout}\n onDeleted={onDeleted ?? closeActionDrawer}\n recurringTransaction={repeatingTransaction}\n selectedRecurrence={selectedRecurrence}\n />\n )\n})\n"],"mappings":";;;;;;;;;;AAwBA,IAAa,IAA4B,EAAS,SAAmC,EACnF,MAAA,GACA,QAAA,IAAS,WACT,WAAA,GACA,0BAAA,GACA,oBAAA,IAAqB,KAAA,GAOpB;AACD,QAAM,EAAE,mBAAA,EAAA,IAAsB,EAAmB,GAC3C,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,EAAE,QAAA,GAAQ,WAAA,EAAA,IAAc,EAAoB,GAC5C,EAAE,cAAA,GAAc,WAAA,GAAW,sBAAA,EAAA,IAAyB,EACxD,GACA,CACF,GACM,IAAY,EAA4B,GAIxC,IAAmB,EAAM,OAAiC,IAAI;AAEpE,EAAI,EAAiB,YAAY,SAAM,EAAiB,UAAU,EAAE,GAAG,EAAO;AAE9E,QAAM,IAAe,EAAM,OAAO,CAAS,GACrC,IAAmB,EAAM,OAAO,EAAK,GACrC,IAAoB,CAAC,KAAa,CAAC,KAAgB,MAAyB;AAiBlF,SAfA,EAAa,UAAU,GAEvB,EAAM,UAAA,MAAgB;AACpB,IAAI,MAAmB,EAAiB,UAAU;AAAA,EACpD,GAAG,CAAC,CAAiB,CAAC,GAEtB,EAAM,UAAA,MAAA,MACQ;AACV,IAAI,EAAiB,WAAW,EAAiB,WAC/C,EAAa,QAAQ,EAAiB,OAAO;AAAA,EAEjD,GACA,CAAC,CACH,GAEI,IAAkB,gBAAA,EAAC,GAAD,CAAS,CAAA,IAE3B,IAAqB,gBAAA,EAAC,GAAD,EAAW,SAAA,MAAA;AAAe,IAAK,EAAU;AAAA,IAAI,CAAA,IAGjE,IASH,gBAAA,EAAC,GAAD;AAAA,IACE,sBAAsB;AAAA,IACd,QAAA;AAAA,IACR,WAAW,KAAa;AAAA,IACxB,sBAAsB;AAAA,IACF,oBAAA;AAAA,EACrB,CAAA,IAbC,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAiB,IAAI;AAAA,MAAE,GAAG;AAAA,MAAI,WAAW;AAAA,IAAS;AAAA,IAAG,SAAQ;AAAA,IACtE,UAAA,EAAK;AAAA,EACF,CAAA;AAaZ,CAAC"}
@@ -24,9 +24,8 @@ interface TransactionDrillDownProps {
24
24
  heading: string;
25
25
  transaction: Transaction;
26
26
  };
27
- hideListHeader?: boolean;
28
27
  }
29
- export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs, projectedRow, hideListHeader, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
28
+ export declare const TransactionDrillDown: (({ ariaLabel, heading, subHeadingText, icon, tabs, selectedIndex, top, onSelectionChange, transactionFilter, tipSection, onEachRowClick, baseTransactions, subTabs, projectedRow, }: TransactionDrillDownProps) => import("react/jsx-runtime").JSX.Element) & {
30
29
  displayName: string;
31
30
  };
32
31
  export default TransactionDrillDown;
@@ -1,128 +1,128 @@
1
- import { useGlobalCopyStore as G, useGlobalUiStore as N, useTransactionStore as U } from "../../../common/context/hooks.es.js";
2
- import { exportTransactionsToCSV as j } from "../../../core/utils/TransactionUtils.es.js";
3
- import O from "../../../common/components/Loader.es.js";
4
- import V from "../../../transactions/components/shared/transactionlist/TransactionRow.es.js";
5
- import q from "../../../common/components/SubheaderRow.es.js";
6
- import z from "../../../transactions/components/shared/TransactionList.es.js";
7
- import { TipSection as J } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
8
- import { DRAWER_TIP_ICON as K } from "../../components/drawerTip.es.js";
9
- import { SubTabs as M, subTabPanelProps as Q } from "../../components/SubTabs.es.js";
1
+ import { useGlobalCopyStore as E, useGlobalUiStore as G, useTransactionStore as N } from "../../../common/context/hooks.es.js";
2
+ import { exportTransactionsToCSV as U } from "../../../core/utils/TransactionUtils.es.js";
3
+ import j from "../../../common/components/Loader.es.js";
4
+ import O from "../../../transactions/components/shared/transactionlist/TransactionRow.es.js";
5
+ import V from "../../../common/components/SubheaderRow.es.js";
6
+ import q from "../../../transactions/components/shared/TransactionList.es.js";
7
+ import { TipSection as z } from "../../../insights/components/shared/ChartDrawerTemplate/TipSection.es.js";
8
+ import { DRAWER_TIP_ICON as J } from "../../components/drawerTip.es.js";
9
+ import { SubTabs as K, subTabPanelProps as M } from "../../components/SubTabs.es.js";
10
10
  import "react";
11
- import { observer as X } from "mobx-react-lite";
12
- import f from "@mui/material/Stack";
13
- import { H3 as Y, Text as h } from "@mxenabled/mxui";
14
- import Z from "@mui/material/Button";
15
- import { Icon as F } from "@mxenabled/mx-icons";
11
+ import { observer as Q } from "mobx-react-lite";
12
+ import p from "@mui/material/Stack";
13
+ import { H3 as X, Text as b } from "@mxenabled/mxui";
14
+ import Y from "@mui/material/Button";
15
+ import { Icon as Z } from "@mxenabled/mx-icons";
16
16
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
17
17
  import t from "@mui/material/Box";
18
- import H from "@mui/material/Tab";
19
- import rr from "@mui/material/Tabs";
20
- var y = "transaction-drill-down-panel", C = (x) => `transaction-details-tab-${x}`, D = "transaction-drill-down-series", _r = X(function({ ariaLabel: I, heading: e, subHeadingText: l, icon: w, tabs: u, selectedIndex: s, top: T, onSelectionChange: B, transactionFilter: v, tipSection: g, onEachRowClick: k, baseTransactions: P, subTabs: _, projectedRow: c, hideListHeader: d = !1 }) {
21
- const { transactions: m } = G(), { isCopyLoaded: W } = N(), { sortedTransactionsWithSplits: L, tags: $, detailedTransactions: A } = U();
22
- if (!W) return /* @__PURE__ */ r(O, {});
23
- const p = !!u?.length, a = _?.tabs.length ? _ : void 0, R = I ?? m.transactions_title, E = (n, i) => {
24
- B?.(i);
25
- }, S = v ? (P ?? A).filter(v(s)) : void 0, b = S ?? L;
18
+ import F from "@mui/material/Tab";
19
+ import H from "@mui/material/Tabs";
20
+ var S = "transaction-drill-down-panel", y = (f) => `transaction-details-tab-${f}`, C = "transaction-drill-down-series", gr = Q(function({ ariaLabel: D, heading: e, subHeadingText: s, icon: I, tabs: h, selectedIndex: l, top: x, onSelectionChange: w, transactionFilter: u, tipSection: T, onEachRowClick: B, baseTransactions: L, subTabs: v, projectedRow: c }) {
21
+ const { transactions: d } = E(), { isCopyLoaded: k } = G(), { sortedTransactionsWithSplits: P, tags: W, detailedTransactions: $ } = N();
22
+ if (!k) return /* @__PURE__ */ r(j, {});
23
+ const m = !!h?.length, a = v?.tabs.length ? v : void 0, A = D ?? d.transactions_title, R = (i, n) => {
24
+ w?.(n);
25
+ }, g = u ? (L ?? $).filter(u(l)) : void 0, _ = g ?? P;
26
26
  return /* @__PURE__ */ o(t, {
27
27
  sx: {
28
28
  bgcolor: "background.paper",
29
29
  width: "100%"
30
30
  },
31
- children: [p && /* @__PURE__ */ r(rr, {
32
- "aria-label": R,
33
- onChange: E,
31
+ children: [m && /* @__PURE__ */ r(H, {
32
+ "aria-label": A,
33
+ onChange: R,
34
34
  sx: { mb: 0 },
35
- value: s,
35
+ value: l,
36
36
  variant: "fullWidth",
37
- children: u.map((n, i) => /* @__PURE__ */ r(H, {
38
- "aria-controls": y,
39
- "aria-label": n.ariaLabel,
40
- id: C(i),
41
- label: n.label,
37
+ children: h.map((i, n) => /* @__PURE__ */ r(F, {
38
+ "aria-controls": S,
39
+ "aria-label": i.ariaLabel,
40
+ id: y(n),
41
+ label: i.label,
42
42
  sx: {
43
43
  minWidth: "auto",
44
44
  px: 0
45
45
  }
46
- }, `${n.label}-${i}`))
46
+ }, `${i.label}-${n}`))
47
47
  }), /* @__PURE__ */ o(t, {
48
- "aria-labelledby": p ? C(s) : void 0,
49
- id: y,
50
- role: p ? "tabpanel" : void 0,
48
+ "aria-labelledby": m ? y(l) : void 0,
49
+ id: S,
50
+ role: m ? "tabpanel" : void 0,
51
51
  children: [
52
- (e || l) && /* @__PURE__ */ o(f, {
52
+ (e || s) && /* @__PURE__ */ o(p, {
53
53
  sx: {
54
54
  gap: 4,
55
55
  pt: 16,
56
56
  px: 24
57
57
  },
58
- children: [e && /* @__PURE__ */ r(Y, { children: e }), l && /* @__PURE__ */ o(f, {
58
+ children: [e && /* @__PURE__ */ r(X, { children: e }), s && /* @__PURE__ */ o(p, {
59
59
  sx: {
60
60
  alignItems: "center",
61
61
  flexDirection: "row",
62
62
  gap: 8
63
63
  },
64
- children: [w, /* @__PURE__ */ r(h, {
64
+ children: [I, /* @__PURE__ */ r(b, {
65
65
  color: "text.secondary",
66
66
  sx: { letterSpacing: "0.52px" },
67
67
  textTransform: "uppercase",
68
68
  variant: "body2",
69
- children: l
69
+ children: s
70
70
  })]
71
71
  })]
72
72
  }),
73
73
  /* @__PURE__ */ r(t, {
74
74
  sx: {
75
- pb: T ? 16 : 0,
75
+ pb: x ? 16 : 0,
76
76
  pt: 16
77
77
  },
78
- children: T
78
+ children: x
79
79
  }),
80
- g && /* @__PURE__ */ r(J, {
81
- icon: K,
82
- ...g
80
+ T && /* @__PURE__ */ r(z, {
81
+ icon: J,
82
+ ...T
83
83
  }),
84
- a && /* @__PURE__ */ r(M, {
84
+ a && /* @__PURE__ */ r(K, {
85
85
  ...a,
86
- id: D
86
+ id: C
87
87
  }),
88
88
  /* @__PURE__ */ o(t, {
89
- ...a && Q(D, a.selectedIndex),
90
- children: [(!d || b.length > 0) && /* @__PURE__ */ o(f, {
89
+ ...a && M(C, a.selectedIndex),
90
+ children: [/* @__PURE__ */ o(p, {
91
91
  sx: {
92
92
  alignItems: "center",
93
93
  borderBottomColor: "divider",
94
94
  borderBottomStyle: "solid",
95
95
  borderBottomWidth: 1,
96
96
  flexDirection: "row",
97
- justifyContent: d ? "flex-end" : "space-between",
97
+ justifyContent: "space-between",
98
98
  pb: 4,
99
99
  pt: 16,
100
100
  px: 24
101
101
  },
102
- children: [!d && /* @__PURE__ */ r(h, {
102
+ children: [/* @__PURE__ */ r(b, {
103
103
  bold: !0,
104
104
  variant: "body1",
105
- children: m.transactions_title
106
- }), b.length > 0 && /* @__PURE__ */ r(Z, {
105
+ children: d.transactions_title
106
+ }), _.length > 0 && /* @__PURE__ */ r(Y, {
107
107
  onClick: () => {
108
- j(b, $);
108
+ U(_, W);
109
109
  },
110
- startIcon: /* @__PURE__ */ r(F, { name: "ios_share" }),
110
+ startIcon: /* @__PURE__ */ r(Z, { name: "ios_share" }),
111
111
  sx: { height: 28 },
112
- children: /* @__PURE__ */ r(h, {
112
+ children: /* @__PURE__ */ r(b, {
113
113
  bold: !0,
114
114
  variant: "body2",
115
- children: m.export_csv_btn
115
+ children: d.export_csv_btn
116
116
  })
117
117
  })]
118
- }), c ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ r(q, { children: c.heading }), /* @__PURE__ */ r(V, {
118
+ }), c ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ r(V, { children: c.heading }), /* @__PURE__ */ r(O, {
119
119
  component: "div",
120
120
  transaction: c.transaction
121
121
  })] }) : /* @__PURE__ */ r(t, {
122
122
  sx: { bgcolor: "background.default" },
123
- children: /* @__PURE__ */ r(z, {
124
- transaction: S,
125
- onClick: k
123
+ children: /* @__PURE__ */ r(q, {
124
+ transaction: g,
125
+ onClick: B
126
126
  })
127
127
  })]
128
128
  })
@@ -131,8 +131,8 @@ var y = "transaction-drill-down-panel", C = (x) => `transaction-details-tab-${x}
131
131
  });
132
132
  });
133
133
  export {
134
- _r as TransactionDrillDown,
135
- _r as default
134
+ gr as TransactionDrillDown,
135
+ gr as default
136
136
  };
137
137
 
138
138
  //# sourceMappingURL=TransactionDrillDown.es.js.map
@@ -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 { Loader, useGlobalCopyStore, useGlobalUiStore, 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 // Drops the Transactions heading above the list; the CSV export, when there is one, stays.\n hideListHeader?: boolean\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 hideListHeader = false,\n}: TransactionDrillDownProps) {\n const { transactions: transactionsCopy } = useGlobalCopyStore()\n const { isCopyLoaded } = useGlobalUiStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n if (!isCopyLoaded) return <Loader />\n\n const hasTabs = !!tabs?.length\n // 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. */}\n <Box sx={{ pb: top ? 16 : 0, 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 {(!hideListHeader || exportTransactions.length > 0) && (\n <Stack\n sx={{\n alignItems: 'center',\n borderBottomColor: 'divider',\n borderBottomStyle: 'solid',\n borderBottomWidth: 1,\n flexDirection: 'row',\n // Without the heading, the export keeps its place on the right.\n justifyContent: hideListHeader ? 'flex-end' : 'space-between',\n pb: 4,\n pt: 16,\n px: 24,\n }}\n >\n {!hideListHeader && (\n <Text bold={true} variant=\"body1\">\n {transactionsCopy.transactions_title}\n </Text>\n )}\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\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,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IACtD,IAAc,iCAyBP,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,GACA,cAAA,GACA,gBAAA,IAAiB,GAAA,GACW;AAC5B,QAAM,EAAE,cAAc,EAAA,IAAqB,EAAmB,GACxD,EAAE,cAAA,EAAA,IAAiB,EAAiB,GACpC,EAAE,8BAAA,GAA8B,MAAA,GAAM,sBAAA,EAAA,IAAyB,EAAoB;AAEzF,MAAI,CAAC,EAAc,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAEnC,QAAM,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,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,YACA,CAAA,CAEL;AAAA,UAGR,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 { Loader, useGlobalCopyStore, useGlobalUiStore, 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 { isCopyLoaded } = useGlobalUiStore()\n const { sortedTransactionsWithSplits, tags, detailedTransactions } = useTransactionStore()\n\n if (!isCopyLoaded) return <Loader />\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. */}\n <Box sx={{ pb: top ? 16 : 0, 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,IAAW,gCACX,IAAA,CAAS,MAAkB,2BAA2B,CAAA,IACtD,IAAc,iCAuBP,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,GACA,cAAA,EAAA,GAC4B;AAC5B,QAAM,EAAE,cAAc,EAAA,IAAqB,EAAmB,GACxD,EAAE,cAAA,EAAA,IAAiB,EAAiB,GACpC,EAAE,8BAAA,GAA8B,MAAA,GAAM,sBAAA,EAAA,IAAyB,EAAoB;AAEzF,MAAI,CAAC,EAAc,QAAO,gBAAA,EAAC,GAAD,CAAS,CAAA;AAEnC,QAAM,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,IAClF,QAEE,IAAqB,KAAwB;AAEnD,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AAC,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,39 +1,39 @@
1
- import { useGlobalCopyStore as Dt, useGlobalUiStore as Bt, useInsightsV2Store as Lt } from "../../../common/context/hooks.es.js";
1
+ import { useGlobalCopyStore as At, useGlobalUiStore as Dt, useInsightsV2Store as Bt } from "../../../common/context/hooks.es.js";
2
2
  import { CURRENCY_FORMAT as St, formatCurrency as vt } from "../../../core/utils/NumberFormatting.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";
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";
8
8
  import { ANALYTICS_EVENTS_CONFIG as V } from "../../analytics/analyticsEventsConfig.es.js";
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, {
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, averageFormat: Q, subTabs: X, boldLabel: Z } = Ht(z ?? ""), { instanceSlotData: o, beatTransactions: g, spendCategoryGuids: I, allAccountGuids: E, categoryName: tt, displayedDateRange: h, transactionStore: et } = Vt(s, {
23
23
  slotData: q,
24
24
  beatTransactions: J
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({
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({
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}" : Rt,
27
+ ariaLabel: e === "doubleBar" ? n?.general?.in_month_you_had_a_category_of_amount ?? "_1{month}, _2{category}: _3{amount}" : Et,
28
28
  top: e,
29
29
  beatTransactions: g
30
- }), d = e === "doubleBar", lt = e === "tabsOnly", l = d ? i : b, { chartBarIndex: F, subTabIndex: ct } = Ht({
30
+ }), d = e === "doubleBar", it = e === "tabsOnly", l = d ? i : b, { chartBarIndex: F, subTabIndex: lt } = Gt({
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(ct), [dt, mt] = m(l.length);
36
- l.length !== dt && (mt(l.length), _(F));
35
+ }), [a, _] = m(F), [C, O] = m(lt), [ct, dt] = m(l.length);
36
+ l.length !== ct && (dt(l.length), _(F));
37
37
  const T = (t) => W({
38
38
  beat: s,
39
39
  beatTransactions: g,
@@ -45,18 +45,18 @@ var Ce = Wt(({ beat: s }) => {
45
45
  instanceSlotData: o,
46
46
  spendCategoryGuids: I,
47
47
  displayedDateRange: h
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 = () => {
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 = () => {
49
49
  if (u !== "store") return;
50
- const t = bt ? T(a) : {
50
+ const t = pt ? T(a) : {
51
51
  accounts: [],
52
52
  custom: () => !1
53
53
  };
54
- ot.setFilter(Kt(t, {
54
+ et.setFilter(Mt(t, {
55
55
  allAccountGuids: E,
56
56
  displayedDateRange: h
57
57
  }));
58
58
  };
59
- Yt(() => {
59
+ Ut(() => {
60
60
  j();
61
61
  }, [
62
62
  s.guid,
@@ -66,50 +66,50 @@ var Ce = Wt(({ beat: s }) => {
66
66
  p.length,
67
67
  o,
68
68
  h,
69
- gt,
70
- pt,
71
69
  ut,
70
+ gt,
71
+ mt,
72
72
  e
73
73
  ]);
74
- const G = kt(c), y = U?.({
74
+ const G = Nt(c), y = U?.({
75
75
  title: c?.title,
76
76
  subHeader: G,
77
- categoryName: et,
77
+ categoryName: tt,
78
78
  selectedDate: b[a]?.date ?? void 0,
79
79
  slotData: o
80
80
  }), H = Y(D, o?.category_guid);
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) ? {
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) ? {
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
- }, Tt = (t) => {
87
+ }, Ct = (t) => {
88
88
  x(V.TAB_SELECTED), _(t);
89
- }, K = d ? Gt([{
89
+ }, K = d ? jt([{
90
90
  ...w,
91
91
  value: i[a]?.main
92
92
  }, {
93
93
  ...N,
94
94
  value: i[a]?.comparison
95
- }]) : void 0, yt = $?.(n) ?? [], P = d ? (K ?? []).map((t, f) => ({
95
+ }]) : void 0, Tt = $?.(n) ?? [], P = d ? (K ?? []).map((t, f) => ({
96
96
  label: t.label,
97
- ariaLabel: yt[f]
98
- })) : lt ? p.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : Z?.({
97
+ ariaLabel: Tt[f]
98
+ })) : it ? p.flatMap((t) => t.localized_label ? [{ label: t.localized_label }] : []) : X?.({
99
99
  instanceSlotData: o,
100
100
  copy: n
101
- }).map((t) => ({ label: t })) ?? [], At = d || e === "singleBar" || e === "upcomingBill" ? l.length ? d ? /* @__PURE__ */ r(jt, {
101
+ }).map((t) => ({ label: t })) ?? [], yt = d || e === "singleBar" || e === "upcomingBill" ? l.length ? d ? /* @__PURE__ */ r(Ot, {
102
102
  bars: i,
103
- boldLabel: tt,
103
+ boldLabel: Z,
104
104
  colors: H,
105
105
  legendPosition: "top",
106
106
  legends: K,
107
107
  onBarClick: M,
108
108
  selectedIndex: a
109
- }) : /* @__PURE__ */ r(xt, {
109
+ }) : /* @__PURE__ */ r(Rt, {
110
110
  amounts: {
111
111
  average: o?.average_amount,
112
- formattedAverage: vt(o?.average_amount ?? 0, X ?? St.cents)
112
+ formattedAverage: vt(o?.average_amount ?? 0, Q ?? St.cents)
113
113
  },
114
114
  color: H[0] ?? D.palette.primary.main,
115
115
  data: b,
@@ -125,40 +125,39 @@ var Ce = Wt(({ beat: s }) => {
125
125
  onBarClick: M,
126
126
  selectedTabIndex: a,
127
127
  trendAmountLabel: N?.label ?? n.general.trend
128
- }) : /* @__PURE__ */ r(Ft, {}) : null;
129
- return /* @__PURE__ */ qt($t, { children: [/* @__PURE__ */ r(Vt, {
130
- baseTransactions: _t,
131
- hideListHeader: Q,
132
- projectedRow: Ct,
128
+ }) : /* @__PURE__ */ r(xt, {}) : null;
129
+ return /* @__PURE__ */ $t(Wt, { children: [/* @__PURE__ */ r(Pt, {
130
+ baseTransactions: ht,
131
+ projectedRow: _t,
133
132
  heading: y?.heading,
134
133
  icon: y?.icon,
135
- onSelectionChange: Tt,
134
+ onSelectionChange: Ct,
136
135
  selectedIndex: a,
137
136
  subHeadingText: y?.subHeadingText,
138
137
  tabs: l,
139
- top: At,
138
+ top: yt,
140
139
  ...P.length > 0 && { subTabs: {
141
140
  tabs: P,
142
141
  selectedIndex: C,
143
142
  onChange: O
144
143
  } },
145
- ...v && { tipSection: !st && (v(it, n, G?.text, o) ?? !1) },
146
- transactionFilter: ft,
144
+ ...L && { tipSection: !rt && (L(st, n, G?.text, o) ?? !1) },
145
+ transactionFilter: bt,
147
146
  onEachRowClick: (t) => {
148
- L({ transaction_guid: t }), R(!0);
147
+ S({ transaction_guid: t }), R(!0);
149
148
  }
150
- }), /* @__PURE__ */ r(It, {
151
- ariaLabelClose: at.close_aria,
152
- isOpen: rt,
149
+ }), /* @__PURE__ */ r(Lt, {
150
+ ariaLabelClose: ot.close_aria,
151
+ isOpen: nt,
153
152
  onClose: () => {
154
- R(!1), L({ transaction_guid: void 0 }), j();
153
+ R(!1), S({ transaction_guid: void 0 }), j();
155
154
  },
156
155
  title: n.general.transaction_details_title,
157
- children: /* @__PURE__ */ r(Ut, { beat: s })
156
+ children: /* @__PURE__ */ r(zt, { beat: s })
158
157
  })] });
159
158
  });
160
159
  export {
161
- Ce as TransactionHistoryBlock
160
+ _e as TransactionHistoryBlock
162
161
  };
163
162
 
164
163
  //# sourceMappingURL=TransactionHistoryBlock.es.js.map