@mx-cartographer/experiences 9.7.1 → 9.7.2

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 (44) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/core/types/InsightsInstanceSlotData.d.ts +6 -2
  3. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  4. package/dist/finstrong/components/ManageDOB.es.js +16 -16
  5. package/dist/goals/components/GoalList.es.js +1 -1
  6. package/dist/goals/components/actions/BirthdayAction.es.js +11 -11
  7. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js +9 -9
  8. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js +8 -8
  9. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js +9 -9
  10. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js +4 -4
  11. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +58 -58
  12. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  13. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +1 -3
  14. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +14 -13
  15. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -1
  16. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +8 -2
  17. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +56 -36
  18. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  19. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +7 -3
  20. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +30 -32
  21. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
  22. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +3 -2
  23. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +16 -15
  24. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
  25. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +5 -5
  26. package/dist/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js +6 -6
  27. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +4 -4
  28. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js +6 -6
  29. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +1 -1
  30. package/dist/insights-v2/components/BaseLayout.es.js +24 -24
  31. package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -2
  32. package/dist/insights-v2/components/CompactInsightCard.es.js +91 -59
  33. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  34. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +4 -4
  35. package/dist/insights-v2/index.es.js +122 -121
  36. package/dist/insights-v2/mappings/blocks.es.js +112 -99
  37. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  38. package/dist/microinsights/cards/InsightCard.es.js +10 -10
  39. package/dist/recurringtransactions/components/PaymentSchedule.es.js +11 -11
  40. package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +16 -16
  41. package/dist/settings/components/profile/ProfileTab.es.js +33 -33
  42. package/dist/transactions/components/shared/TransactionDetails.es.js +5 -4
  43. package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
  44. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [9.7.2] - 10-19-2026
2
+
3
+ - **CHANGED** - The per-bar aria label is built in the frontend (`BAR_ARIA_LABEL`, "{month}: {amount}") for the transaction-history drawer's month tabs, which had an empty aria-label; tupac sends none. The Category Spending V2, Monthly Spend Comparison V2 and Savings Account Balances Summary bar-chart mocks carry `instance_slot.data` so their stories render, with their former `sub_title` as the V2 `subtitle` + `logo` (WEC-1834)
4
+ - **CHANGED** - `BarchartBlock` and the transaction-history drawer read only the Insights 2.0 slot contract, `instance_slot.data` typed as `BarChartBlockData` (`series` as the `data_series` column, `category_guid`, `average_amount`, `additional_data` as the legend rows: `[0]` monthly amount, `[1]` trend), with no `instance_slot_data`. The drawer maps it through `toDrillDownSlotData` (beat transactions are the series' rows). `average_amount` lives on `BarChartBlockData` only. Bill Amount Not Standard is the first beat sending it (WEC-1834)
5
+ - **CHANGED** - The transaction-history drawer's sub-heading and tip read the Insights 2.0 envelope (`subtitle` as the text, the header `logo.guid` as the merchant logo) through `resolveDrillDownSubHeader` (WEC-1834)
6
+ - **ADDED** - Bill Amount Not Standard's Insights 2.0 embedded card (`CompactInsightCard`, rendered by `TransactionDetails` only when `shouldShowEmbeddedCard`): a `category_color` `InsightVisual` (the latest three bars in a `TinyBarChart`, tinted by `instance_slot.data.category_guid`, Figma 222:33404 / 226:33768). Given its `beat`, the card mounts its own `ActionBlockLayer`; a per-beat `BEAT_CTA_CONFIG` names the envelope key a beat's embedded CTA rides on (Bill Amount Not Standard: `in_description_cta`, as tupac sends it) and its drawer trigger, so "View History" calls `openActionDrawer` and opens the transaction history action block, as a bar click does on the full card. Every other beat keeps `primary_cta` and the host's `onCtaClick` (WEC-1834)
7
+
1
8
  ## [9.7.1] - 10-19-2026
2
9
 
3
10
  - **CHANGED** - `SaveExtraBlock` reads the Insights 2.0 envelope's `instance_slot.data` (`header_text`, `savings_amount`, `primary_text`, `amount`, `secondary_text`) for the Save an Extra $100 V2 template and renders the same `SaveAnExtraCard`; the V1 `instance_slot_data` read is removed. Without a numeric `savings_amount` the block renders nothing (no fabricated `$0.00`), and without `amount` the projected-balance footer is omitted. The Make Transfer drawer reads its facts from `drilldown_data` only (`resolveMakeTransferSlotData`), narrowing each figure to a finite number so a null or string value never reaches `formatCurrency`, and maps the ditto CTA variant `save_extra` explicitly. `ctaPostMessages` gains `SaveAnExtra100DollarsV2` (aliasing the V1 entry) so "Make a Transfer" posts the same `beat/cta` op_1 as V1. Mock payload adds the V2 envelope (WEC-1844)
@@ -1,8 +1,9 @@
1
1
  import { DataSeries, Legends } from '../../core';
2
- export interface InsightsInstanceSlotData extends Partial<BarChartBlockData>, Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
2
+ export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
3
3
  }
4
4
  interface CommonProps {
5
5
  amount?: number;
6
+ ariaLabel?: string;
6
7
  date?: string;
7
8
  legends?: Legends[];
8
9
  category_guid?: string;
@@ -12,8 +13,11 @@ interface CommonProps {
12
13
  primary_transaction_guid?: string;
13
14
  }
14
15
  export interface BarChartBlockData {
16
+ series?: DataSeries;
17
+ category_guid?: string;
15
18
  average_amount?: number;
16
- ariaLabel?: string;
19
+ /** [0] monthly amount, [1] trend. */
20
+ additional_data?: Legends[];
17
21
  }
18
22
  interface Main {
19
23
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BarChartBlockData>,\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block\nexport interface BarChartBlockData {\n average_amount?: number\n ariaLabel?: string\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AAsIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AAyIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
@@ -3,16 +3,16 @@ import g from "../../common/components/drawer/Drawer.es.js";
3
3
  import y from "react";
4
4
  import { observer as b } from "mobx-react-lite";
5
5
  import v from "@mui/material/Stack";
6
- import { jsx as e } from "react/jsx-runtime";
7
- import { alpha as o, useTheme as D } from "@mui/material/styles";
6
+ import { jsx as t } from "react/jsx-runtime";
7
+ import { alpha as e, useTheme as D } from "@mui/material/styles";
8
8
  import { AdapterDateFns as S } from "@mui/x-date-pickers/AdapterDateFns";
9
- import { LocalizationProvider as x } from "@mui/x-date-pickers/LocalizationProvider";
10
- import { StaticDatePicker as w } from "@mui/x-date-pickers";
11
- var B = ({ isOpen: n, onClose: a }) => {
12
- const { finstrong: l } = u(), t = D(), { updateUser: c, user: i } = f(), { loadPeerScore: m } = h(), [r, s] = y.useState(i.birthday), p = (d) => {
9
+ import { StaticDatePicker as x } from "@mui/x-date-pickers";
10
+ import { LocalizationProvider as P } from "@mui/x-date-pickers/LocalizationProvider";
11
+ var w = ({ isOpen: n, onClose: a }) => {
12
+ const { finstrong: l } = u(), o = D(), { updateUser: c, user: i } = f(), { loadPeerScore: m } = h(), [r, s] = y.useState(i.birthday), p = (d) => {
13
13
  s(Math.floor(new Date(d).getTime() / 1e3));
14
14
  };
15
- return /* @__PURE__ */ e(g, {
15
+ return /* @__PURE__ */ t(g, {
16
16
  footerStyles: {
17
17
  borderTop: 1,
18
18
  borderColor: "divider",
@@ -31,28 +31,28 @@ var B = ({ isOpen: n, onClose: a }) => {
31
31
  },
32
32
  onSecondaryAction: a,
33
33
  title: l.date_of_birth,
34
- children: /* @__PURE__ */ e(v, {
34
+ children: /* @__PURE__ */ t(v, {
35
35
  sx: {
36
36
  bgcolor: "background.default",
37
37
  height: "100%"
38
38
  },
39
- children: /* @__PURE__ */ e(x, {
39
+ children: /* @__PURE__ */ t(P, {
40
40
  dateAdapter: S,
41
- children: /* @__PURE__ */ e(w, {
41
+ children: /* @__PURE__ */ t(x, {
42
42
  disableFuture: !0,
43
43
  onChange: p,
44
44
  slotProps: {
45
45
  nextIconButton: { sx: {
46
46
  color: "primary.main",
47
- "&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
47
+ "&:hover": { bgcolor: e(o.palette.primary.light, 0.1) }
48
48
  } },
49
49
  previousIconButton: { sx: {
50
50
  color: "primary.main",
51
- "&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
51
+ "&:hover": { bgcolor: e(o.palette.primary.light, 0.1) }
52
52
  } },
53
53
  switchViewButton: { sx: {
54
54
  color: "primary.main",
55
- "&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
55
+ "&:hover": { bgcolor: e(o.palette.primary.light, 0.1) }
56
56
  } }
57
57
  },
58
58
  slots: {
@@ -63,7 +63,7 @@ var B = ({ isOpen: n, onClose: a }) => {
63
63
  width: "100%",
64
64
  "& .MuiIconButton-edgeEnd": {
65
65
  color: "primary.main",
66
- "&:hover": { bgcolor: o(t.palette.primary.light, 0.1) }
66
+ "&:hover": { bgcolor: e(o.palette.primary.light, 0.1) }
67
67
  }
68
68
  },
69
69
  value: r ? /* @__PURE__ */ new Date(r * 1e3) : /* @__PURE__ */ new Date()
@@ -71,9 +71,9 @@ var B = ({ isOpen: n, onClose: a }) => {
71
71
  })
72
72
  })
73
73
  });
74
- }, j = b(B);
74
+ }, O = b(w);
75
75
  export {
76
- j as default
76
+ O as default
77
77
  };
78
78
 
79
79
  //# sourceMappingURL=ManageDOB.es.js.map
@@ -12,8 +12,8 @@ import K from "@mui/material/Button";
12
12
  import { jsx as t, jsxs as i } from "react/jsx-runtime";
13
13
  import N from "@mui/material/Card";
14
14
  import z from "@mui/material/CardContent";
15
- import b from "@mui/material/Grid";
16
15
  import j from "@mui/material/CardActionArea";
16
+ import b from "@mui/material/Grid";
17
17
  var Y = w(({ trackType: c, onAddGoals: f }) => {
18
18
  const { isMobile: s } = G(), { goals: n } = R(), { selectedAccountGuids: y } = x(), { orderedGoals: C, setSelectedGoal: a } = A(), d = C.filter((e) => e.track_type === c && (e.track_type !== r.RETIREMENT_TRACK && y.includes(e.account_guid) || e.track_type === r.RETIREMENT_TRACK)), l = d.filter((e) => e.track_type === r.SAVINGS_TRACK && !e.has_been_spent || e.track_type !== r.SAVINGS_TRACK && !e.is_complete), m = d.filter((e) => e.track_type === r.SAVINGS_TRACK && e.has_been_spent || e.track_type !== r.SAVINGS_TRACK && e.is_complete), S = c === r.DEBT_TRACK ? n.zero_state_complete_debt : n.zero_state_complete_savings;
19
19
  return /* @__PURE__ */ i(o, {
@@ -1,23 +1,23 @@
1
1
  import { DATE_FORMATS_INTL as b, formatDate as f } from "../../../core/constants/DateFormats.es.js";
2
2
  import { useGlobalCopyStore as u, useGoalStore as _, useUserStore as S } from "../../../common/context/hooks.es.js";
3
- import { ListItemAction as A } from "../../../common/components/ListItemAction.es.js";
3
+ import { ListItemAction as v } from "../../../common/components/ListItemAction.es.js";
4
4
  import i from "react";
5
- import { observer as T } from "mobx-react-lite";
5
+ import { observer as A } from "mobx-react-lite";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
7
  import { fromUnixTime as s } from "date-fns/fromUnixTime";
8
- import { getUnixTime as v } from "date-fns/getUnixTime";
8
+ import { getUnixTime as T } from "date-fns/getUnixTime";
9
9
  import { AdapterDateFns as x } from "@mui/x-date-pickers/AdapterDateFns";
10
- import { LocalizationProvider as D } from "@mui/x-date-pickers/LocalizationProvider";
10
+ import { isValid as D } from "date-fns/isValid";
11
11
  import { DatePicker as g } from "@mui/x-date-pickers";
12
- import { isValid as E } from "date-fns/isValid";
13
- var O = T(({ goal: a }) => {
12
+ import { LocalizationProvider as E } from "@mui/x-date-pickers/LocalizationProvider";
13
+ var N = A(({ goal: a }) => {
14
14
  const { goals: r } = u(), { user: t, updateUser: d } = S(), { setAlert: m } = _(), [e, l] = i.useState(s(t.birthday ?? 0)), [n, p] = i.useState(null), c = a.is_complete, h = async () => {
15
- e && E(e) && (await d({
15
+ e && D(e) && (await d({
16
16
  ...t,
17
- birthday: v(e)
17
+ birthday: T(e)
18
18
  }), m(r.alert_goal_updated_birthday));
19
19
  };
20
- return /* @__PURE__ */ o(A, {
20
+ return /* @__PURE__ */ o(v, {
21
21
  isDisabled: c,
22
22
  isSaveDisabled: !!n,
23
23
  label: r.details_birthday,
@@ -25,7 +25,7 @@ var O = T(({ goal: a }) => {
25
25
  primaryText: r.details_birthday,
26
26
  secondaryText: `${f(s(t.birthday ?? 0), b.MONTH_DAY_YEAR)}`,
27
27
  zeroStateText: !a.guid && !t.birthday ? r.add_birthday : void 0,
28
- children: /* @__PURE__ */ o(D, {
28
+ children: /* @__PURE__ */ o(E, {
29
29
  dateAdapter: x,
30
30
  children: /* @__PURE__ */ o(g, {
31
31
  label: r.details_birthday,
@@ -38,7 +38,7 @@ var O = T(({ goal: a }) => {
38
38
  });
39
39
  });
40
40
  export {
41
- O as BirthdayAction
41
+ N as BirthdayAction
42
42
  };
43
43
 
44
44
  //# sourceMappingURL=BirthdayAction.es.js.map
@@ -1,18 +1,18 @@
1
- import { BarChart as g } from "../../shared/Charts/BarChart/BarChart.es.js";
2
- import { ThemedSVGImage as h } from "../../shared/ThemedSVGImage.es.js";
3
- import { BeatCard as d } from "../../shared/InsightsCard/BeatCard.es.js";
4
- import { InsightButton as l } from "../../shared/InsightsCard/InsightButton.es.js";
5
- import { ReactComponent as u } from "../../shared/images/EmptyBarChart.es.js";
1
+ import { ReactComponent as g } from "../../shared/images/EmptyBarChart.es.js";
2
+ import { BarChart as h } from "../../shared/Charts/BarChart/BarChart.es.js";
3
+ import { ThemedSVGImage as d } from "../../shared/ThemedSVGImage.es.js";
4
+ import { BeatCard as l } from "../../shared/InsightsCard/BeatCard.es.js";
5
+ import { InsightButton as u } from "../../shared/InsightsCard/InsightButton.es.js";
6
6
  import "react";
7
7
  import { jsx as r } from "react/jsx-runtime";
8
- var S = ({ amounts: i, beat: t, buttonProps: n, color: e, data: o, legendLabelAvg: a, legendLabelMain: f, onBarClick: p, ...m }) => /* @__PURE__ */ r(d, {
8
+ var S = ({ amounts: i, beat: t, buttonProps: n, color: e, data: o, legendLabelAvg: a, legendLabelMain: f, onBarClick: p, ...m }) => /* @__PURE__ */ r(l, {
9
9
  ...m,
10
10
  beat: t,
11
- button: /* @__PURE__ */ r(l, {
11
+ button: /* @__PURE__ */ r(u, {
12
12
  ...n,
13
13
  beat: t
14
14
  }),
15
- children: o.length > 0 ? /* @__PURE__ */ r(g, {
15
+ children: o.length > 0 ? /* @__PURE__ */ r(h, {
16
16
  amounts: i,
17
17
  color: e,
18
18
  data: o,
@@ -26,7 +26,7 @@ var S = ({ amounts: i, beat: t, buttonProps: n, color: e, data: o, legendLabelAv
26
26
  top: 24
27
27
  },
28
28
  onBarClick: p
29
- }) : /* @__PURE__ */ r(h, { image: u })
29
+ }) : /* @__PURE__ */ r(d, { image: g })
30
30
  });
31
31
  export {
32
32
  S as BillAmountNotStandard
@@ -1,18 +1,18 @@
1
- import { BarChartV2 as h } from "../../shared/Charts/BarChart/BarChartV2.es.js";
2
- import { ThemedSVGImage as l } from "../../shared/ThemedSVGImage.es.js";
3
- import { InsightButton as d } from "../../shared/InsightsCard/InsightButton.es.js";
4
- import { ReactComponent as s } from "../../shared/images/EmptyBarChart.es.js";
1
+ import { ReactComponent as h } from "../../shared/images/EmptyBarChart.es.js";
2
+ import { BarChartV2 as l } from "../../shared/Charts/BarChart/BarChartV2.es.js";
3
+ import { ThemedSVGImage as d } from "../../shared/ThemedSVGImage.es.js";
4
+ import { InsightButton as s } from "../../shared/InsightsCard/InsightButton.es.js";
5
5
  import { BeatCardMUI as u } from "../../shared/InsightsCard/BeatCardMUI.es.js";
6
6
  import "react";
7
7
  import { jsx as r } from "react/jsx-runtime";
8
8
  var S = ({ amounts: m, beat: o, buttonProps: i, color: e, data: t, trendAmountLabel: n, monthlyAmountLabel: a, onBarClick: p, selectedTabIndex: f, ...g }) => /* @__PURE__ */ r(u, {
9
9
  ...g,
10
10
  beat: o,
11
- button: t?.length > 0 && /* @__PURE__ */ r(d, {
11
+ button: t?.length > 0 && /* @__PURE__ */ r(s, {
12
12
  ...i,
13
13
  beat: o
14
14
  }),
15
- children: t.length > 0 ? /* @__PURE__ */ r(h, {
15
+ children: t.length > 0 ? /* @__PURE__ */ r(l, {
16
16
  amounts: m,
17
17
  color: e,
18
18
  data: t,
@@ -26,12 +26,12 @@ var S = ({ amounts: m, beat: o, buttonProps: i, color: e, data: t, trendAmountLa
26
26
  onBarClick: p,
27
27
  selectedTabIndex: f,
28
28
  trendAmountLabel: n
29
- }) : /* @__PURE__ */ r(l, {
29
+ }) : /* @__PURE__ */ r(d, {
30
30
  divProps: { style: {
31
31
  marginLeft: 2,
32
32
  marginRight: 2
33
33
  } },
34
- image: s
34
+ image: h
35
35
  })
36
36
  });
37
37
  export {
@@ -1,18 +1,18 @@
1
- import { BarChart as g } from "../../shared/Charts/BarChart/BarChart.es.js";
2
- import { ThemedSVGImage as h } from "../../shared/ThemedSVGImage.es.js";
3
- import { BeatCard as d } from "../../shared/InsightsCard/BeatCard.es.js";
4
- import { InsightButton as l } from "../../shared/InsightsCard/InsightButton.es.js";
5
- import { ReactComponent as s } from "../../shared/images/EmptyBarChart.es.js";
1
+ import { ReactComponent as g } from "../../shared/images/EmptyBarChart.es.js";
2
+ import { BarChart as h } from "../../shared/Charts/BarChart/BarChart.es.js";
3
+ import { ThemedSVGImage as d } from "../../shared/ThemedSVGImage.es.js";
4
+ import { BeatCard as l } from "../../shared/InsightsCard/BeatCard.es.js";
5
+ import { InsightButton as s } from "../../shared/InsightsCard/InsightButton.es.js";
6
6
  import "react";
7
7
  import { jsx as o } from "react/jsx-runtime";
8
- var S = ({ amounts: i, beat: r, buttonProps: n, color: e, data: t, legendLabelAvg: p, legendLabelMain: a, onBarClick: f, ...m }) => /* @__PURE__ */ o(d, {
8
+ var S = ({ amounts: i, beat: r, buttonProps: n, color: e, data: t, legendLabelAvg: p, legendLabelMain: a, onBarClick: f, ...m }) => /* @__PURE__ */ o(l, {
9
9
  ...m,
10
10
  beat: r,
11
- button: /* @__PURE__ */ o(l, {
11
+ button: /* @__PURE__ */ o(s, {
12
12
  ...n,
13
13
  beat: r
14
14
  }),
15
- children: t.length > 0 ? /* @__PURE__ */ o(g, {
15
+ children: t.length > 0 ? /* @__PURE__ */ o(h, {
16
16
  amounts: i,
17
17
  color: e,
18
18
  data: t,
@@ -26,7 +26,7 @@ var S = ({ amounts: i, beat: r, buttonProps: n, color: e, data: t, legendLabelAv
26
26
  top: 24
27
27
  },
28
28
  onBarClick: f
29
- }) : /* @__PURE__ */ o(h, { image: s })
29
+ }) : /* @__PURE__ */ o(d, { image: g })
30
30
  });
31
31
  export {
32
32
  S as MonthlySpendingComparisonV2
@@ -1,14 +1,14 @@
1
1
  import { useGlobalCopyStore as m } from "../../../common/context/hooks.es.js";
2
2
  import s from "../../../common/components/Loader.es.js";
3
- import c from "../../../transactions/components/shared/TransactionDetails.es.js";
4
- import { useTransactionDetailsBlock as l } from "./useTransactionDetailsBlock.es.js";
3
+ import { useTransactionDetailsBlock as c } from "./useTransactionDetailsBlock.es.js";
4
+ import l from "../../../transactions/components/shared/TransactionDetails.es.js";
5
5
  import { observer as f } from "mobx-react-lite";
6
6
  import p from "@mui/material/Stack";
7
7
  import { Text as d } from "@mxenabled/mxui";
8
8
  import { jsx as o } from "react/jsx-runtime";
9
9
  var S = f(function({ beat: t }) {
10
- const { common: i } = m(), { bottomActions: e, isLoading: n, topActions: a, transaction: r } = l(t);
11
- return n ? /* @__PURE__ */ o(s, {}) : r ? /* @__PURE__ */ o(c, {
10
+ const { common: i } = m(), { bottomActions: e, isLoading: n, topActions: a, transaction: r } = c(t);
11
+ return n ? /* @__PURE__ */ o(s, {}) : r ? /* @__PURE__ */ o(l, {
12
12
  bottomActions: e,
13
13
  shouldShowEmbeddedCard: !1,
14
14
  topActions: a,
@@ -1,75 +1,76 @@
1
- import { useGlobalCopyStore as X, useGlobalUiStore as Z, useInsightsV2Store as tt } from "../../../common/context/hooks.es.js";
2
- import { formatCurrency as et } from "../../../core/utils/NumberFormatting.es.js";
1
+ import { useGlobalCopyStore as Z, useGlobalUiStore as tt, useInsightsV2Store as et } from "../../../common/context/hooks.es.js";
2
+ import { formatCurrency as ot } from "../../../core/utils/NumberFormatting.es.js";
3
3
  import at from "../../../common/components/drawer/Drawer.es.js";
4
- import ot from "../../../common/components/Loader.es.js";
5
- import { BarChartV2 as nt } from "../../components/chartblocks/BarchartV2.es.js";
6
- import { EmptyBarChart as rt } from "../../components/chartblocks/EmptyBarChart.es.js";
7
- import { ANALYTICS_EVENTS_CONFIG as A } from "../../analytics/analyticsEventsConfig.es.js";
8
- import { useAnalyticsEvent as it } from "../../analytics/useAnalyticsEvent.es.js";
9
- import { TransactionDrillDown as st } from "./TransactionDrillDown.es.js";
10
- import { useTransactionHistory as lt } from "./useTransactionHistory.es.js";
11
- import { getDefaultSelection as ct, getDrillDownConfig as mt, getFlattenedDataSeries as dt, toStoreFilter as pt } from "./utils.es.js";
12
- import { getDynamicCtaBasedOnTriggers as gt } from "../util.es.js";
13
- import { TransactionDetailsBlock as ut } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
14
- import { useLayoutEffect as ft, useState as u } from "react";
15
- import { observer as ht } from "mobx-react-lite";
16
- import { Fragment as yt, jsx as n, jsxs as bt } from "react/jsx-runtime";
17
- import { useTheme as Ct } from "@mui/material/styles";
18
- var kt = ht(({ beat: a }) => {
19
- const f = Ct(), { instanceSlotData: e, beatTransactions: l, spendCategoryGuids: h, allAccountGuids: y, categoryName: x, displayedDateRange: p, transactionStore: B } = lt(a), { actionDrawer: b, setActionContext: C } = tt(), { common: E, insights_feed: c } = X(), { isCopyLoaded: I } = Z(), [F, T] = u(!1), [G, H] = u(!1), _ = it(), { insights_payload: o } = a, O = gt(b, o?.primary_cta, o?.secondary_cta, o?.in_description_cta)?.variant, { top: r, filterMode: m, header: R, colors: j, filterStrategy: k, tipSection: S } = mt(O ?? ""), { dataSeries: d, chartData: i, comparisonBars: w } = dt({
4
+ import nt from "../../../common/components/Loader.es.js";
5
+ import { BAR_ARIA_LABEL as rt } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
6
+ import { BarChartV2 as it } from "../../components/chartblocks/BarchartV2.es.js";
7
+ import { EmptyBarChart as st } from "../../components/chartblocks/EmptyBarChart.es.js";
8
+ import { ANALYTICS_EVENTS_CONFIG as B } from "../../analytics/analyticsEventsConfig.es.js";
9
+ import { useAnalyticsEvent as lt } from "../../analytics/useAnalyticsEvent.es.js";
10
+ import { TransactionDrillDown as ct } from "./TransactionDrillDown.es.js";
11
+ import { getDefaultSelection as mt, getDrillDownConfig as dt, getFlattenedDataSeries as pt, resolveDrillDownSubHeader as gt, toStoreFilter as ut } from "./utils.es.js";
12
+ import { useTransactionHistory as ft } from "./useTransactionHistory.es.js";
13
+ import { getDynamicCtaBasedOnTriggers as ht } from "../util.es.js";
14
+ import { TransactionDetailsBlock as yt } from "../TransactionDetailsBlock/TransactionDetailsBlock.es.js";
15
+ import { useLayoutEffect as Ct, useState as u } from "react";
16
+ import { observer as bt } from "mobx-react-lite";
17
+ import { Fragment as Tt, jsx as a, jsxs as _t } from "react/jsx-runtime";
18
+ import { useTheme as St } from "@mui/material/styles";
19
+ var Vt = bt(({ beat: o }) => {
20
+ const f = St(), { instanceSlotData: e, beatTransactions: l, spendCategoryGuids: h, allAccountGuids: y, categoryName: x, displayedDateRange: p, transactionStore: E } = ft(o), { actionDrawer: C, setActionContext: b } = et(), { common: I, insights_feed: c } = Z(), { isCopyLoaded: F } = tt(), [G, T] = u(!1), [R, H] = u(!1), _ = lt(), { insights_payload: n } = o, w = ht(C, n?.primary_cta, n?.secondary_cta, n?.in_description_cta)?.variant, { top: r, filterMode: m, header: O, colors: j, filterStrategy: k, tipSection: S } = dt(w ?? ""), { dataSeries: d, chartData: i, comparisonBars: K } = pt({
20
21
  data: e?.data_series,
21
- ariaLabel: e?.ariaLabel ?? "",
22
+ ariaLabel: rt,
22
23
  top: r,
23
24
  beatTransactions: l,
24
25
  payload: e
25
- }), { chartBarIndex: K, subTabIndex: N } = ct({
26
+ }), { chartBarIndex: N, subTabIndex: V } = mt({
26
27
  chartTabCount: i.length,
27
- comparisonTabCount: w.length,
28
- actionDrawer: b,
29
- beatGuid: a.guid
30
- }), [s, D] = u(K), L = (t) => k({
31
- beat: a,
28
+ comparisonTabCount: K.length,
29
+ actionDrawer: C,
30
+ beatGuid: o.guid
31
+ }), [s, D] = u(N), A = (t) => k({
32
+ beat: o,
32
33
  beatTransactions: l,
33
34
  dataSeries: d,
34
35
  selectedIndex: t,
35
- subIndex: N,
36
+ subIndex: V,
36
37
  isLastTab: t === d.length - 1,
37
38
  instanceSlotData: e,
38
39
  spendCategoryGuids: h,
39
40
  displayedDateRange: p
40
- }), V = l.map((t) => t.guid).join(","), M = h.join(","), P = y.join(","), U = r === "list" || d.length > 0, v = () => {
41
- m !== "store" || !U || B.setFilter(pt(L(s), {
41
+ }), M = l.map((t) => t.guid).join(","), P = h.join(","), U = y.join(","), W = r === "list" || d.length > 0, v = () => {
42
+ m !== "store" || !W || E.setFilter(ut(A(s), {
42
43
  allAccountGuids: y,
43
44
  displayedDateRange: p
44
45
  }));
45
46
  };
46
- ft(() => {
47
+ Ct(() => {
47
48
  v();
48
49
  }, [
49
- a.guid,
50
+ o.guid,
50
51
  s,
51
52
  m,
52
53
  d.length,
53
54
  e,
54
55
  p,
55
- M,
56
56
  P,
57
- V,
57
+ U,
58
+ M,
58
59
  r
59
60
  ]);
60
- const g = R?.({
61
- title: o?.title,
62
- subHeader: o?.sub_title,
61
+ const L = gt(n), g = O?.({
62
+ title: n?.title,
63
+ subHeader: L,
63
64
  categoryName: x,
64
65
  selectedDate: i[s]?.date ?? void 0
65
- }), W = j(f, e?.category_guid);
66
- if (!I) return /* @__PURE__ */ n(ot, {});
67
- const Y = [c.general.monthly_amount, c.general.trend], [$, q] = e?.legends?.length ? e.legends.map((t) => t.label) : Y, z = m === "local" ? (t) => L(t).custom ?? (() => !0) : void 0, J = m === "local" ? l : void 0, Q = r === "singleBar" || r === "upcomingBill" ? i.length ? /* @__PURE__ */ n(nt, {
66
+ }), Y = j(f, e?.category_guid);
67
+ if (!F) return /* @__PURE__ */ a(nt, {});
68
+ const $ = [c.general.monthly_amount, c.general.trend], [q, z] = e?.legends?.length ? e.legends.map((t) => t.label) : $, J = m === "local" ? (t) => A(t).custom ?? (() => !0) : void 0, Q = m === "local" ? l : void 0, X = r === "singleBar" || r === "upcomingBill" ? i.length ? /* @__PURE__ */ a(it, {
68
69
  amounts: {
69
70
  average: e?.average_amount,
70
- formattedAverage: et(e?.average_amount ?? 0, "0,0.00")
71
+ formattedAverage: ot(e?.average_amount ?? 0, "0,0.00")
71
72
  },
72
- color: W[0] ?? f.palette.primary.main,
73
+ color: Y[0] ?? f.palette.primary.main,
73
74
  data: i,
74
75
  legendPosition: "top",
75
76
  heightOverride: 142,
@@ -79,20 +80,19 @@ var kt = ht(({ beat: a }) => {
79
80
  left: 24,
80
81
  right: 24
81
82
  },
82
- monthlyAmountLabel: $,
83
+ monthlyAmountLabel: q,
83
84
  onBarClick: (t) => {
84
- _(A.DRAWER_CHART_BAR_CLICKED), D(t);
85
+ _(B.DRAWER_CHART_BAR_CLICKED), D(t);
85
86
  },
86
87
  selectedTabIndex: s,
87
- trendAmountLabel: q
88
- }) : /* @__PURE__ */ n(rt, {}) : null;
89
- return /* @__PURE__ */ bt(yt, { children: [/* @__PURE__ */ n(st, {
90
- ariaLabel: e?.ariaLabel,
91
- baseTransactions: J,
88
+ trendAmountLabel: z
89
+ }) : /* @__PURE__ */ a(st, {}) : null;
90
+ return /* @__PURE__ */ _t(Tt, { children: [/* @__PURE__ */ a(ct, {
91
+ baseTransactions: Q,
92
92
  heading: g?.heading,
93
93
  icon: g?.icon,
94
94
  onSelectionChange: (t) => {
95
- _(A.TAB_SELECTED), D(t);
95
+ _(B.TAB_SELECTED), D(t);
96
96
  },
97
97
  selectedIndex: s,
98
98
  subHeadingText: g?.subHeadingText,
@@ -100,24 +100,24 @@ var kt = ht(({ beat: a }) => {
100
100
  ariaLabel: t.ariaLabel,
101
101
  label: t.label
102
102
  })),
103
- top: Q,
104
- ...S && { tipSection: !G && S(H, c, o?.sub_title?.text) },
105
- transactionFilter: z,
103
+ top: X,
104
+ ...S && { tipSection: !R && S(H, c, L?.text) },
105
+ transactionFilter: J,
106
106
  onEachRowClick: (t) => {
107
- C({ transaction_guid: t }), T(!0);
107
+ b({ transaction_guid: t }), T(!0);
108
108
  }
109
- }), /* @__PURE__ */ n(at, {
110
- ariaLabelClose: E.close_aria,
111
- isOpen: F,
109
+ }), /* @__PURE__ */ a(at, {
110
+ ariaLabelClose: I.close_aria,
111
+ isOpen: G,
112
112
  onClose: () => {
113
- T(!1), C({ transaction_guid: void 0 }), v();
113
+ T(!1), b({ transaction_guid: void 0 }), v();
114
114
  },
115
115
  title: c.general.transaction_details_title,
116
- children: /* @__PURE__ */ n(ut, { beat: a })
116
+ children: /* @__PURE__ */ a(yt, { beat: o })
117
117
  })] });
118
118
  });
119
119
  export {
120
- kt as TransactionHistoryBlock
120
+ Vt as TransactionHistoryBlock
121
121
  };
122
122
 
123
123
  //# 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 { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n toStoreFilter,\n} from './utils'\nimport {\n Drawer,\n useInsightsV2Store,\n useGlobalCopyStore,\n useGlobalUiStore,\n Loader,\n} from '../../../common'\nimport { TransactionDetailsBlock } from '../TransactionDetailsBlock'\nimport { getDynamicCtaBasedOnTriggers } from '../util'\n\ninterface TransactionHistoryProp {\n beat: Beat\n}\n\nexport const TransactionHistoryBlock = observer(({ beat }: TransactionHistoryProp) => {\n const theme = useTheme()\n const {\n instanceSlotData,\n beatTransactions,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(beat)\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n\n const { isCopyLoaded } = useGlobalUiStore()\n\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n\n const [closeTipSection, setCloseTipSection] = useState(false)\n\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n const { insights_payload } = beat\n\n const dynamicCtaVariant = getDynamicCtaBasedOnTriggers(\n actionDrawer,\n insights_payload?.primary_cta,\n insights_payload?.secondary_cta,\n insights_payload?.in_description_cta,\n )?.variant\n\n const { top, filterMode, header, colors, filterStrategy, tipSection } = getDrillDownConfig(\n dynamicCtaVariant ?? '',\n )\n\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel: instanceSlotData?.ariaLabel ?? '',\n top,\n beatTransactions,\n payload: instanceSlotData,\n })\n\n const { chartBarIndex, subTabIndex } = getDefaultSelection({\n chartTabCount: chartData.length,\n comparisonTabCount: comparisonBars.length,\n actionDrawer,\n beatGuid: beat.guid,\n })\n\n const [selectedIndex, setSelectedIndex] = useState(chartBarIndex)\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n selectedIndex: index,\n subIndex: subTabIndex,\n isLastTab: index === dataSeries.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Apply the current selection's filter. Store variants route through the store filter; local\n // (upcomingBill) variants filter beatTransactions directly and only backfill the cache when the\n // Stable primitive keys for the collections below: beatTransactions/spendCategoryGuids/\n // allAccountGuids are recomputed (new array identity) every render, so depending on them directly\n // re-fires the effect each render (REVIEW.md MEW-3732). Key on content instead.\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applies the current selection's filter to the shared transactionStore. Called both by the\n // effect below (on selection change) and when the nested TransactionDetailsBlock drawer closes:\n // AddMerchantBudgetAction (opened from within that drawer) overwrites transactionStore.filter\n // with a merchant_guid-only filter while its own drawer is open, and never restores it — leaving\n // the row list stuck showing only that one merchant's transactions after backing all the way out.\n // Re-running this on close re-derives the filter fresh instead of relying on whatever the nested\n // drawers left behind.\n // A `list` drawer has no bars: it filters once from the beat alone.\n const canApplyFilter = top === 'list' || dataSeries.length > 0\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store' || !canApplyFilter) return\n transactionStore.setFilter(\n toStoreFilter(resolveFilter(selectedIndex), { allAccountGuids, displayedDateRange }),\n )\n }\n\n // store variants route the selection through the shared store filter; local (upcomingBill) variants\n // filter beatTransactions directly, so there's nothing to push to the store for them.\n useLayoutEffect(() => {\n applyCurrentSelectionFilter()\n }, [\n beat.guid,\n selectedIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n top,\n ])\n\n const headerContent = header?.({\n title: insights_payload?.title,\n subHeader: insights_payload?.sub_title,\n categoryName,\n selectedDate: chartData[selectedIndex]?.date ?? undefined,\n })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n\n if (!isCopyLoaded) return <Loader />\n\n // TODO: Temporary fallback while the backend doesn't always send `legends` on every beat/variant.\n // Remove this once the backend guarantees `legends` on the payload.\n const legendFallbackLabels = [insightsCopy.general.monthly_amount, insightsCopy.general.trend]\n\n const [monthlyAmountLabel, trendAmountLabel] = instanceSlotData?.legends?.length\n ? instanceSlotData.legends.map((legend) => legend.label)\n : legendFallbackLabels\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? beatTransactions : undefined\n\n const isBarTop = top === 'singleBar' || top === 'upcomingBill'\n const chartTop = !isBarTop ? null : chartData.length ? (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(instanceSlotData?.average_amount ?? 0, '0,0.00'),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n heightOverride={142}\n margin={{\n bottom: 8,\n top: 24,\n left: 24,\n right: 24,\n }}\n monthlyAmountLabel={monthlyAmountLabel}\n onBarClick={(index) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.DRAWER_CHART_BAR_CLICKED)\n setSelectedIndex(index)\n }}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={trendAmountLabel}\n />\n ) : (\n <EmptyBarChart />\n )\n\n return (\n <>\n <TransactionDrillDown\n ariaLabel={instanceSlotData?.ariaLabel}\n baseTransactions={baseTransactions}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={(index) => {\n // MUI Tabs only fires onChange on real user selection, not on mount.\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TAB_SELECTED)\n setSelectedIndex(index)\n }}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={chartData.map((bar) => ({\n ariaLabel: bar.ariaLabel,\n label: bar.label,\n }))}\n top={chartTop}\n {...(tipSection && {\n tipSection:\n !closeTipSection &&\n tipSection(setCloseTipSection, insightsCopy, insights_payload?.sub_title?.text),\n })}\n transactionFilter={transactionFilter}\n onEachRowClick={(guid) => {\n setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns — setActionContext merges, so an\n // explicit `{}` would be a no-op and leave transaction_guid stuck in the shared\n // context, and the outer drawer's own context (e.g. chartBarIndex) must survive.\n setActionContext({ transaction_guid: undefined })\n // Re-apply this block's own filter: a further-nested AddMerchantBudgetAction drawer may\n // have overwritten transactionStore.filter (merchant_guid-only) without restoring it.\n applyCurrentSelectionFilter()\n }}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GACjB,EACJ,kBAAA,GACA,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,cAAA,GACA,oBAAA,GACA,kBAAA,EAAA,IACE,GAAsB,CAAI,GAExB,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAmB,GAExD,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GAEzE,EAAE,cAAA,EAAA,IAAiB,EAAiB,GAEpC,CAAC,GAA0B,CAAA,IAA+B,EAAS,EAAK,GAExE,CAAC,GAAiB,CAAA,IAAsB,EAAS,EAAK,GAEtD,IAAqB,GAAkB,GAEvC,EAAE,kBAAA,EAAA,IAAqB,GAEvB,IAAoB,GACxB,GACA,GAAkB,aAClB,GAAkB,eAClB,GAAkB,kBACpB,GAAG,SAEG,EAAE,KAAA,GAAK,YAAA,GAAY,QAAA,GAAQ,QAAA,GAAQ,gBAAA,GAAgB,YAAA,EAAA,IAAe,GACtE,KAAqB,EACvB,GAEM,EAAE,YAAA,GAAY,WAAA,GAAW,gBAAA,EAAA,IAAmB,GAAuB;AAAA,IACvE,MAAM,GAAkB;AAAA,IACxB,WAAW,GAAkB,aAAa;AAAA,IAC1C,KAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAS;AAAA,EACX,CAAC,GAEK,EAAE,eAAA,GAAe,aAAA,EAAA,IAAgB,GAAoB;AAAA,IACzD,eAAe,EAAU;AAAA,IACzB,oBAAoB,EAAe;AAAA,IACnC,cAAA;AAAA,IACA,UAAU,EAAK;AAAA,EACjB,CAAC,GAEK,CAAC,GAAe,CAAA,IAAoB,EAAS,CAAa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iB,MAAS;AACxB,MAAA,EAAiB,EAAE,kBAAkB,EAAK,CAAC,GAC3C,EAA4B,EAAI;AAAA,IAClC;AAAA,EACD,CAAA,GACD,gBAAA,EAAC,IAAD;AAAA,IACE,gBAAgB,EAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAA,MAAe;AACb,MAAA,EAA4B,EAAK,GAIjC,EAAiB,EAAE,kBAAkB,OAAU,CAAC,GAGhD,EAA4B;AAAA,IAC9B;AAAA,IACA,OAAO,EAAa,QAAQ;AAAA,IAE5B,UAAA,gBAAA,EAAC,IAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,EAChC,CAAA,CACR,EAAA,CAAA;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 { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../../analytics'\nimport { BarChartV2 } from '../../components/chartblocks/BarchartV2'\nimport { EmptyBarChart } from '../../components/chartblocks/EmptyBarChart'\nimport { BAR_ARIA_LABEL } from '../../blocks/ChartBlocks/BarchartBlock/utils'\n\nimport { TransactionDrillDown } from './TransactionDrillDown'\nimport { useTransactionHistory } from './useTransactionHistory'\nimport {\n getDefaultSelection,\n getDrillDownConfig,\n getFlattenedDataSeries,\n resolveDrillDownSubHeader,\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 const {\n instanceSlotData,\n beatTransactions,\n spendCategoryGuids,\n allAccountGuids,\n categoryName,\n displayedDateRange,\n transactionStore,\n } = useTransactionHistory(beat)\n\n const { actionDrawer, setActionContext } = useInsightsV2Store()\n\n const { common: commonCopy, insights_feed: insightsCopy } = useGlobalCopyStore()\n\n const { isCopyLoaded } = useGlobalUiStore()\n\n const [isTransactionDetailsOpen, setIsTransactionDetailsOpen] = useState(false)\n\n const [closeTipSection, setCloseTipSection] = useState(false)\n\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n const { insights_payload } = beat\n\n const dynamicCtaVariant = getDynamicCtaBasedOnTriggers(\n actionDrawer,\n insights_payload?.primary_cta,\n insights_payload?.secondary_cta,\n insights_payload?.in_description_cta,\n )?.variant\n\n const { top, filterMode, header, colors, filterStrategy, tipSection } = getDrillDownConfig(\n dynamicCtaVariant ?? '',\n )\n\n const { dataSeries, chartData, comparisonBars } = getFlattenedDataSeries({\n data: instanceSlotData?.data_series as DataSeries,\n ariaLabel: BAR_ARIA_LABEL,\n top,\n beatTransactions,\n payload: instanceSlotData,\n })\n\n const { chartBarIndex, subTabIndex } = getDefaultSelection({\n chartTabCount: chartData.length,\n comparisonTabCount: comparisonBars.length,\n actionDrawer,\n beatGuid: beat.guid,\n })\n\n const [selectedIndex, setSelectedIndex] = useState(chartBarIndex)\n\n const resolveFilter = (index: number) =>\n filterStrategy({\n beat,\n beatTransactions,\n dataSeries,\n selectedIndex: index,\n subIndex: subTabIndex,\n isLastTab: index === dataSeries.length - 1,\n instanceSlotData,\n spendCategoryGuids,\n displayedDateRange,\n })\n\n // Apply the current selection's filter. Store variants route through the store filter; local\n // (upcomingBill) variants filter beatTransactions directly and only backfill the cache when the\n // Stable primitive keys for the collections below: beatTransactions/spendCategoryGuids/\n // allAccountGuids are recomputed (new array identity) every render, so depending on them directly\n // re-fires the effect each render (REVIEW.md MEW-3732). Key on content instead.\n const beatTransactionGuidsKey = beatTransactions.map((transaction) => transaction.guid).join(',')\n const spendCategoryGuidsKey = spendCategoryGuids.join(',')\n const allAccountGuidsKey = allAccountGuids.join(',')\n\n // Re-applies the current selection's filter to the shared transactionStore. Called both by the\n // effect below (on selection change) and when the nested TransactionDetailsBlock drawer closes:\n // AddMerchantBudgetAction (opened from within that drawer) overwrites transactionStore.filter\n // with a merchant_guid-only filter while its own drawer is open, and never restores it — leaving\n // the row list stuck showing only that one merchant's transactions after backing all the way out.\n // Re-running this on close re-derives the filter fresh instead of relying on whatever the nested\n // drawers left behind.\n // A `list` drawer has no bars: it filters once from the beat alone.\n const canApplyFilter = top === 'list' || dataSeries.length > 0\n const applyCurrentSelectionFilter = () => {\n if (filterMode !== 'store' || !canApplyFilter) return\n transactionStore.setFilter(\n toStoreFilter(resolveFilter(selectedIndex), { allAccountGuids, displayedDateRange }),\n )\n }\n\n // store variants route the selection through the shared store filter; local (upcomingBill) variants\n // filter beatTransactions directly, so there's nothing to push to the store for them.\n useLayoutEffect(() => {\n applyCurrentSelectionFilter()\n }, [\n beat.guid,\n selectedIndex,\n filterMode,\n dataSeries.length,\n instanceSlotData,\n displayedDateRange,\n spendCategoryGuidsKey,\n allAccountGuidsKey,\n beatTransactionGuidsKey,\n 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 })\n\n const barColors = colors(theme, instanceSlotData?.category_guid)\n\n if (!isCopyLoaded) return <Loader />\n\n // TODO: Temporary fallback while the backend doesn't always send `legends` on every beat/variant.\n // Remove this once the backend guarantees `legends` on the payload.\n const legendFallbackLabels = [insightsCopy.general.monthly_amount, insightsCopy.general.trend]\n\n const [monthlyAmountLabel, trendAmountLabel] = instanceSlotData?.legends?.length\n ? instanceSlotData.legends.map((legend) => legend.label)\n : legendFallbackLabels\n\n const transactionFilter =\n filterMode === 'local'\n ? (index: number) => resolveFilter(index).custom ?? (() => true)\n : undefined\n\n const baseTransactions: Transaction[] | undefined =\n filterMode === 'local' ? beatTransactions : undefined\n\n const isBarTop = top === 'singleBar' || top === 'upcomingBill'\n const chartTop = !isBarTop ? null : chartData.length ? (\n <BarChartV2\n amounts={{\n average: instanceSlotData?.average_amount,\n formattedAverage: formatCurrency(instanceSlotData?.average_amount ?? 0, '0,0.00'),\n }}\n color={barColors[0] ?? theme.palette.primary.main}\n data={chartData}\n legendPosition=\"top\"\n heightOverride={142}\n margin={{\n bottom: 8,\n top: 24,\n left: 24,\n right: 24,\n }}\n monthlyAmountLabel={monthlyAmountLabel}\n onBarClick={(index) => {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.DRAWER_CHART_BAR_CLICKED)\n setSelectedIndex(index)\n }}\n selectedTabIndex={selectedIndex}\n trendAmountLabel={trendAmountLabel}\n />\n ) : (\n <EmptyBarChart />\n )\n\n return (\n <>\n <TransactionDrillDown\n baseTransactions={baseTransactions}\n heading={headerContent?.heading}\n icon={headerContent?.icon}\n onSelectionChange={(index) => {\n // MUI Tabs only fires onChange on real user selection, not on mount.\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.TAB_SELECTED)\n setSelectedIndex(index)\n }}\n selectedIndex={selectedIndex}\n subHeadingText={headerContent?.subHeadingText}\n tabs={chartData.map((bar) => ({\n ariaLabel: bar.ariaLabel,\n label: bar.label,\n }))}\n top={chartTop}\n {...(tipSection && {\n tipSection:\n !closeTipSection && tipSection(setCloseTipSection, insightsCopy, subHeader?.text),\n })}\n transactionFilter={transactionFilter}\n onEachRowClick={(guid) => {\n setActionContext({ transaction_guid: guid })\n setIsTransactionDetailsOpen(true)\n }}\n />\n <Drawer\n ariaLabelClose={commonCopy.close_aria}\n isOpen={isTransactionDetailsOpen}\n onClose={() => {\n setIsTransactionDetailsOpen(false)\n // Clear only the key this nested drawer owns — setActionContext merges, so an\n // explicit `{}` would be a no-op and leave transaction_guid stuck in the shared\n // context, and the outer drawer's own context (e.g. chartBarIndex) must survive.\n setActionContext({ transaction_guid: undefined })\n // Re-apply this block's own filter: a further-nested AddMerchantBudgetAction drawer may\n // have overwritten transactionStore.filter (merchant_guid-only) without restoring it.\n applyCurrentSelectionFilter()\n }}\n title={insightsCopy.general.transaction_details_title}\n >\n <TransactionDetailsBlock beat={beat} />\n </Drawer>\n </>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,IAAa,KAA0B,GAAA,CAAU,EAAE,MAAA,EAAA,MAAmC;AACpF,QAAM,IAAQ,GAAS,GACjB,EACJ,kBAAA,GACA,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,cAAA,GACA,oBAAA,GACA,kBAAA,EAAA,IACE,GAAsB,CAAI,GAExB,EAAE,cAAA,GAAc,kBAAA,EAAA,IAAqB,GAAmB,GAExD,EAAE,QAAQ,GAAY,eAAe,EAAA,IAAiB,EAAmB,GAEzE,EAAE,cAAA,EAAA,IAAiB,GAAiB,GAEpC,CAAC,GAA0B,CAAA,IAA+B,EAAS,EAAK,GAExE,CAAC,GAAiB,CAAA,IAAsB,EAAS,EAAK,GAEtD,IAAqB,GAAkB,GAEvC,EAAE,kBAAA,EAAA,IAAqB,GAEvB,IAAoB,GACxB,GACA,GAAkB,aAClB,GAAkB,eAClB,GAAkB,kBACpB,GAAG,SAEG,EAAE,KAAA,GAAK,YAAA,GAAY,QAAA,GAAQ,QAAA,GAAQ,gBAAA,GAAgB,YAAA,EAAA,IAAe,GACtE,KAAqB,EACvB,GAEM,EAAE,YAAA,GAAY,WAAA,GAAW,gBAAA,EAAA,IAAmB,GAAuB;AAAA,IACvE,MAAM,GAAkB;AAAA,IACxB,WAAW;AAAA,IACX,KAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAS;AAAA,EACX,CAAC,GAEK,EAAE,eAAA,GAAe,aAAA,EAAA,IAAgB,GAAoB;AAAA,IACzD,eAAe,EAAU;AAAA,IACzB,oBAAoB,EAAe;AA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C,KAAmB,EAAW,GAAoB,GAAc,GAAW,IAAI,EACpF;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,EAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,SAAA,MAAe;AACb,MAAA,EAA4B,EAAK,GAIjC,EAAiB,EAAE,kBAAkB,OAAU,CAAC,GAGhD,EAA4B;AAAA,IAC9B;AAAA,IACA,OAAO,EAAa,QAAQ;AAAA,IAE5B,UAAA,gBAAA,EAAC,IAAD,EAA+B,MAAA,EAAO,CAAA;AAAA,EAChC,CAAA,CACR,EAAA,CAAA;AAEN,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { Beat } from '../../../core';
2
- import { InsightsInstanceSlotData } from '../../../core/types/InsightsInstanceSlotData';
3
2
  export declare const useTransactionHistory: (beat: Beat) => {
4
- instanceSlotData: InsightsInstanceSlotData;
3
+ instanceSlotData: import('./utils').DrillDownSlotData;
5
4
  beatTransactions: import('../../../core').Transaction[];
6
- primaryTransaction: import('../../../core').Transaction | undefined;
7
5
  spendCategoryGuids: string[];
8
6
  allAccountGuids: string[];
9
7
  categoryName: string;