@mx-cartographer/experiences 9.7.40 → 9.7.42

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 (35) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/core/types/InsightsInstanceSlotData.d.ts +6 -1
  3. package/dist/core/types/InsightsInstanceSlotData.es.js.map +1 -1
  4. package/dist/core/types/localization/InsightsFeedCopy.d.ts +2 -0
  5. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js +20 -14
  6. package/dist/insights-v2/actionBlocks/ConnectWidgetActionBlock.es.js.map +1 -1
  7. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.d.ts +4 -4
  8. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js +45 -31
  9. package/dist/insights-v2/actionBlocks/FeedbackModalActionBlock.es.js.map +1 -1
  10. package/dist/insights-v2/analytics/analyticsEventsConfig.d.ts +6 -0
  11. package/dist/insights-v2/analytics/analyticsEventsConfig.es.js +4 -0
  12. package/dist/insights-v2/analytics/analyticsEventsConfig.es.js.map +1 -1
  13. package/dist/insights-v2/analytics/resolveAnalyticsEvent.es.js +7 -6
  14. package/dist/insights-v2/analytics/resolveAnalyticsEvent.es.js.map +1 -1
  15. package/dist/insights-v2/beatActions.d.ts +7 -2
  16. package/dist/insights-v2/beatActions.es.js.map +1 -1
  17. package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.d.ts +5 -2
  18. package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js +21 -23
  19. package/dist/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js.map +1 -1
  20. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +29 -20
  21. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
  22. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +27 -24
  23. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
  24. package/dist/insights-v2/components/BaseLayout.es.js +1 -1
  25. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  26. package/dist/insights-v2/components/CompactInsightCard.es.js +148 -82
  27. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  28. package/dist/insights-v2/components/FeedbackModal.d.ts +5 -1
  29. package/dist/insights-v2/components/FeedbackModal.es.js +29 -28
  30. package/dist/insights-v2/components/FeedbackModal.es.js.map +1 -1
  31. package/dist/insights-v2/hooks/useBeatFeedbackFlow.es.js +27 -25
  32. package/dist/insights-v2/hooks/useBeatFeedbackFlow.es.js.map +1 -1
  33. package/dist/microinsights/beatActions.es.js +4 -4
  34. package/dist/microinsights/beatActions.es.js.map +1 -1
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [9.7.42] - 10-26-2026
2
+
3
+ - **CHANGED** - `AccountSwitchBlock` reads only the Insights 2.0 envelope's `instance_slot.data` (`from_logo`, `to_logo`, each `{ guid, alt }`) and renders the same `TransferLogoCard`, each logo through `LogoFromGuid`, which draws nothing for a missing slot or a guid that fails `isLogoGuid`. The flat `instance_slot_data` fallback is removed: tupac never sends it on an Insights 2.0 envelope, and the V1 Discovered Accounts and Switch Direct Deposit cards render through the legacy `insights` components, not this block. The block's stories move to the `data` shape (WEC-1980)
4
+ - **ADDED** - `CompactInsightCard` gains the `linked_logos` visual (ditto layout variant): two institution logos overlapping with a decorative link badge, for Discovered Accounts V2's embedded card. The visual receives the slot's whole `data` beside `logo` (WEC-1980)
5
+ - **CHANGED** - `ConnectWidgetActionBlock` opens the Connect widget on the discovered institution (`current_institution_guid`) when the envelope's `drilldown_data.discovered_institution_guid` passes `isLogoGuid`, matching V1; otherwise it opens institution search as before (WEC-1980)
6
+ - **ADDED** - Mock payload `AccountSwitchBlockPayload.json` with the Discovered Accounts V2 envelopes per widget and variant, wrapped as beats in `AccountSwitchBlockBeats.ts` and shown in the `InsightsV2/Insights/ConnectDiscoveredAccountsV2` stories (full and mini per variant, micro, embedded `linked_logos`, notification). A fixture test renders every envelope and checks each CTA names a registered action block (WEC-1980)
7
+ - **FIXED** - Discovered Accounts V2's embedded card shows its "Connect Account(s)" link: tupac sends that CTA as `in_description_cta` only (no `primary_cta`), so `CompactInsightCard`'s `BEAT_CTA_CONFIG` now maps `ConnectDiscoveredAccountsV2` to it and opens `connect_widget_block` in the card's own `ActionBlockLayer`. Without the entry the card read `primary_cta` and drew no link in Transaction Details. The full and embedded fixtures are now the sand API responses (no `to_logo` for a user with no FI-managed account, drawn as the discovered logo alone); the Micro story renders through the micro carousel's `InsightCard` and the Notification story is dropped, as experiences does not render that surface (WEC-1980)
8
+ - **CHANGED** - Mock copy only: `GlobalCopy.json`'s `insights_feed.connection_details` carries V1's Learn More wording (the longer description, five benefits, the full shared-info paragraph and card text), mirroring the mrs_content change so the Connection Details drawer story matches Figma 1943:219219. The hand-built Discovered Accounts V2 fixtures use institution guids that have CDN logos (Chase, Gringotts) so their stories show brand logos; the sand envelopes keep their real guid (WEC-1980)
9
+ - **ADDED** - Exported type `AccountSwitchBlockV2Data` beside `AccountSwitchBlockData` in `InsightsInstanceSlotData.ts`: the Discovered Accounts V2 `instance_slot.data` slots (`from_logo`, `to_logo`, `logo`, each an optional `LogoRef`). `AccountSwitchBlock` and `CompactInsightCard`'s `linked_logos` read their logos through it instead of untyped `slot<LogoRef>()` lookups (WEC-1980)
10
+ - **CHANGED** - Discovered Accounts V2 guards its guids with the existing `isLogoGuid` instead of a separate `isInstitutionGuid`, which is removed from `LogoFromGuid`. `linked_logos` and `AccountSwitchBlock`'s V2 `from_logo` / `to_logo` render each logo through `LogoFromGuid` directly, which already draws nothing for a guid that is not a logo guid (WEC-1980)
11
+
12
+ ## [9.7.41] - 10-26-2026
13
+
14
+ - **FIXED** - The neutral status pill on the Set Up Direct Deposit card (`direct_deposit_block`, `set_up_direct_deposit` and `detailed_neutral`) is `grey.100` in light mode and `grey.800` in dark mode, so `text.primary` reads on it in both. It was `grey.200` in both, which left the dark-mode label at about 1.4:1 contrast because the grey tokens do not change with the mode (WEC-2059)
15
+ - **ADDED** - `BeatActions.onFeedbackSurveyShown(variant)` fires when the hide survey opens ("Leave feedback" on the hidden-confirmation card), and `onFeedbackDialogClose` now receives the survey's `variant` as a second argument. Both are optional, so hosts that ignore them are unchanged. Pulse uses them for PostHog `survey shown` / `survey dismissed`, which the legacy dismissed card sent and V2 did not. Applies to every Insights 2.0 beat with the hide survey (WEC-2059)
16
+ - **FIXED** - The obsolete "not refreshable" dimming overlay sits above every block's own stacking (`zIndex` 3, was 1), so a raised section such as the Set Up Direct Deposit hero card is dimmed with the rest of the card instead of showing through (WEC-2059)
17
+ - **CHANGED** - `DetailedAccountBlock` (`direct_deposit_block`) reads the account facts (`account_name`, `account_type`, `status_text`, `institution_guid`, `institution_name`) from `instance_slot.data` first, and keeps the flat slot fields as the fallback, so the V1 payload and the existing fixtures render unchanged. A missing fact is omitted, never drawn blank or as `undefined`. Insights 2.0 Set Up Direct Deposit sends them in `data` (WEC-2059)
18
+ - **CHANGED** - The tile's logo alt is the localized "{institution} Institution Logo" (the legacy wording, `insights_feed.general.institution_Logo`), built from the name in the logo's own `alt` or the flat `institution_name`; it falls back to the envelope's alt when the copy or name is missing, and a micro widget with no `GlobalDataProvider` keeps working (WEC-2059)
19
+ - **CHANGED** - `FeedbackModalActionBlock` ("Not Interested") now behaves as the legacy Set Up Direct Deposit modal did. It records the dismissal once through the host's `onDismissInsight` (`always`, which hides the card and disables the template), reports `Beat Dismissed` with the picked reason, then sends the feedback as a dismissal survey (`source: 'not_interested'`, new on `FeedbackParams.source`, so the host records the reason as legacy did; a host that does not know it must handle it first, see the pulse MR); a failed send leaves the beat dismissed and Try Again re-sends only the feedback. A host that can dismiss shows the hidden-confirmation card instead of the success snackbar (`FeedbackModal` gains `showSuccessMessage`, default true, and `onTextInputFocus`); the error snackbar with Try Again is unchanged, and a host that cannot dismiss (the micro widget) keeps the success snackbar. The first focus of the free-text box reaches the host's `onFeedbackTextFocus`. The dialog names the account from `instance_slot.data.account_name`, falling back to the flat name (WEC-2059)
20
+ - **ADDED** - `AnalyticsEventPayload` and the analytics catalogue entries can carry an optional `value` (stored with the Firefly event), and the catalogue has `BEAT_DISMISSED`. The micro widget's host sends the value instead of `null`. Pulse must forward `value` in its `onAnalyticsEvent` for the reason to reach Firefly (WEC-2059)
21
+ - **ADDED** - Insights 2.0 fixtures and stories for Set Up Direct Deposit (`SetUpDirectDepositV2`, `DirectDepositCompleteV2`) with the slot data under `instance_slot.data`; `insights_feed.general.institution_Logo` added to the typed copy and the mock copy (WEC-2059)
22
+
1
23
  ## [9.7.40] - 10-23-2026
2
24
 
3
25
  - **FIXED** - date range year in the trends category details (MEW-4019)
@@ -1,4 +1,4 @@
1
- import { DataSeries, Legends } from '../../core';
1
+ import { DataSeries, Legends, LogoRef } from '../../core';
2
2
  export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CreditUtilizationBlockData>, Partial<CommonProps> {
3
3
  }
4
4
  interface CommonProps {
@@ -83,6 +83,11 @@ export interface AccountSwitchBlockData {
83
83
  held_institution_guid: string;
84
84
  held_institution_name: string;
85
85
  }
86
+ export interface AccountSwitchBlockV2Data {
87
+ from_logo?: LogoRef;
88
+ to_logo?: LogoRef;
89
+ logo?: LogoRef;
90
+ }
86
91
  export interface StepChartBlockData {
87
92
  completed_steps: number;
88
93
  label_1: 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<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CreditUtilizationBlockData>,\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\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\n// Credit Utilization action block. The per-card rows are the beat's `data_series` table\n// (`guid`, `label`, `amount`, `total_amount`, `percentage`), carried on `CommonProps.data_series`.\nexport interface CreditUtilizationBlockData {\n accounts_balance_sum?: number\n accounts_credit_limit_sum?: number\n credit_utilization_percentage?: number\n}\n"],"mappings":"AA8HA,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, LogoRef } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CreditUtilizationBlockData>,\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\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// AccountSwitch Block: `instance_slot.data` (Insights 2.0, Discovered Accounts V2). Each slot is\n// optional: tupac omits `to_logo` when the user holds no FI-managed account. `logo` is the compact\n// card's (micro, notification) discovered institution.\nexport interface AccountSwitchBlockV2Data {\n from_logo?: LogoRef\n to_logo?: LogoRef\n logo?: LogoRef\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\n// Credit Utilization action block. The per-card rows are the beat's `data_series` table\n// (`guid`, `label`, `amount`, `total_amount`, `percentage`), carried on `CommonProps.data_series`.\nexport interface CreditUtilizationBlockData {\n accounts_balance_sum?: number\n accounts_credit_limit_sum?: number\n credit_utilization_percentage?: number\n}\n"],"mappings":"AAuIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
@@ -23,6 +23,8 @@ interface GeneralInsightsFeedCopy {
23
23
  update: string;
24
24
  updating: string;
25
25
  dollar_bill?: string;
26
+ /** `_1{institution}` — the alt text of an institution's logo, e.g. "Chase Institution Logo". */
27
+ institution_Logo?: string;
26
28
  weekly_no_spending_component_alt_text?: DynamicKeyValue;
27
29
  }
28
30
  interface SettingsMenuCopy {
@@ -1,22 +1,28 @@
1
- import { useAccountStore as u, useInsightsV2Store as m } from "../../common/context/hooks.es.js";
2
- import a from "../../common/components/ConnectWidgetPanel.es.js";
1
+ import { useAccountStore as f, useInsightsV2Store as a } from "../../common/context/hooks.es.js";
2
+ import m from "../../common/components/ConnectWidgetPanel.es.js";
3
3
  import { ANALYTICS_EVENTS_CONFIG as p } from "../analytics/analyticsEventsConfig.es.js";
4
- import { useAnalyticsEvent as A } from "../analytics/useAnalyticsEvent.es.js";
5
- import { useEffect as c, useRef as i } from "react";
6
- import { observer as E } from "mobx-react-lite";
7
- import { jsx as C } from "react/jsx-runtime";
8
- var S = E(function({ beat: s }) {
9
- const { actionDrawer: e } = m(), { refreshAccounts: f } = u(), r = A(), t = e.isDrawerOpen && e.guid === s.guid, n = i(t);
4
+ import { useAnalyticsEvent as g } from "../analytics/useAnalyticsEvent.es.js";
5
+ import { isLogoGuid as l } from "../components/LogoFromGuid.es.js";
6
+ import { useEffect as c, useRef as u } from "react";
7
+ import { observer as _ } from "mobx-react-lite";
8
+ import { jsx as A } from "react/jsx-runtime";
9
+ var D = _(function({ beat: r }) {
10
+ const { actionDrawer: i } = a(), { refreshAccounts: d } = f(), e = g(), t = i.isDrawerOpen && i.guid === r.guid, n = u(t);
10
11
  c(() => {
11
- n.current && !t && f(), n.current = t;
12
+ n.current && !t && d(), n.current = t;
12
13
  }, [t]);
13
- const o = i(!1);
14
- return c(() => {
15
- t && !o.current && r(p.OPENED_CONNECT_DRAWER), o.current = t;
16
- }, [t, r]), /* @__PURE__ */ C(a, { isActive: t });
14
+ const s = u(!1);
15
+ c(() => {
16
+ t && !s.current && e(p.OPENED_CONNECT_DRAWER), s.current = t;
17
+ }, [t, e]);
18
+ const o = r.insights_payload?.drilldown_data?.discovered_institution_guid;
19
+ return /* @__PURE__ */ A(m, {
20
+ isActive: t,
21
+ loadWidgetProps: typeof o == "string" && l(o) ? { current_institution_guid: o } : void 0
22
+ });
17
23
  });
18
24
  export {
19
- S as ConnectWidgetActionBlock
25
+ D as ConnectWidgetActionBlock
20
26
  };
21
27
 
22
28
  //# sourceMappingURL=ConnectWidgetActionBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectWidgetActionBlock.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/ConnectWidgetActionBlock.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { ConnectWidgetPanel, useAccountStore, useInsightsV2Store } from '../../common'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\nimport type { ActionBlockProps } from '../mappings/blocks'\n\n/**\n * `connect_widget_block` — opens MX's Connect widget itself via the shared\n * `ConnectWidgetPanel` (src/common): SSO url via ConnectStore and the\n * iframe-based `@mxenabled/web-widget-sdk` ConnectWidget, with loading/error\n * statuses.\n *\n * Renders the panel directly (not `ConnectDrawer`, which wraps it in its own\n * `Drawer`) — `ActionBlockLayer` already supplies the action drawer's chrome\n * (title from the CTA label, close button), so a second nested `Drawer` here\n * would produce two stacked drawers with two headers and two close buttons.\n *\n * `ActionBlockLayer` does not unmount a drawer-presentation block when the\n * drawer closes — it only toggles the `Drawer`'s `isOpen` — so the account\n * refresh (parity with `ConnectDrawer`'s own `onClose`) is driven by watching\n * this beat's `actionDrawer.isDrawerOpen` transition from true to false,\n * rather than an unmount effect, which would never fire.\n */\nexport const ConnectWidgetActionBlock = observer(function ConnectWidgetActionBlock({\n beat,\n}: ActionBlockProps) {\n const { actionDrawer } = useInsightsV2Store()\n const { refreshAccounts } = useAccountStore()\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n const isCurrentBeatOpen = actionDrawer.isDrawerOpen && actionDrawer.guid === beat.guid\n const wasOpen = useRef(isCurrentBeatOpen)\n\n useEffect(() => {\n if (wasOpen.current && !isCurrentBeatOpen) {\n void refreshAccounts()\n }\n wasOpen.current = isCurrentBeatOpen\n }, [isCurrentBeatOpen])\n\n // OPENED_CONNECT_DRAWER: the drawer actually opened (any path — CTA or otherwise). Own ref +\n // effect, separate from the refresh logic above: this one is rising-edge, so its ref starts\n // `false` — the block's first render typically happens with the drawer already open (children\n // render on open), and that first open must fire too. Fires once per open, re-arms on close.\n // Pulse parity: ConnectDiscoveredAccounts/Beat.js onPrimaryCtaClick's `opened_connect_drawer`.\n const hasFiredOpen = useRef(false)\n\n useEffect(() => {\n if (isCurrentBeatOpen && !hasFiredOpen.current) {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.OPENED_CONNECT_DRAWER)\n }\n hasFiredOpen.current = isCurrentBeatOpen\n }, [isCurrentBeatOpen, fireAnalyticsEvent])\n\n return <ConnectWidgetPanel isActive={isCurrentBeatOpen} />\n})\n"],"mappings":";;;;;;;AAwBA,IAAa,IAA2B,EAAS,SAAkC,EACjF,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAmB,GACtC,EAAE,iBAAA,EAAA,IAAoB,EAAgB,GACtC,IAAqB,EAAkB,GAEvC,IAAoB,EAAa,gBAAgB,EAAa,SAAS,EAAK,MAC5E,IAAU,EAAO,CAAiB;AAExC,EAAA,EAAA,MAAgB;AACd,IAAI,EAAQ,WAAW,CAAC,KACtB,EAAqB,GAEvB,EAAQ,UAAU;AAAA,EACpB,GAAG,CAAC,CAAiB,CAAC;AAOtB,QAAM,IAAe,EAAO,EAAK;AAEjC,SAAA,EAAA,MAAgB;AACd,IAAI,KAAqB,CAAC,EAAa,WACrC,EAAmB,EAAwB,qBAAqB,GAElE,EAAa,UAAU;AAAA,EACzB,GAAG,CAAC,GAAmB,CAAkB,CAAC,GAEnC,gBAAA,EAAC,GAAD,EAAoB,UAAU,EAAoB,CAAA;AAC3D,CAAC"}
1
+ {"version":3,"file":"ConnectWidgetActionBlock.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/ConnectWidgetActionBlock.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport { ConnectWidgetPanel, useAccountStore, useInsightsV2Store } from '../../common'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\nimport { isLogoGuid } from '../components/LogoFromGuid'\nimport type { ActionBlockProps } from '../mappings/blocks'\n\n/**\n * `connect_widget_block` — opens MX's Connect widget itself via the shared\n * `ConnectWidgetPanel` (src/common): SSO url via ConnectStore and the\n * iframe-based `@mxenabled/web-widget-sdk` ConnectWidget, with loading/error\n * statuses.\n *\n * Renders the panel directly (not `ConnectDrawer`, which wraps it in its own\n * `Drawer`) — `ActionBlockLayer` already supplies the action drawer's chrome\n * (title from the CTA label, close button), so a second nested `Drawer` here\n * would produce two stacked drawers with two headers and two close buttons.\n *\n * `ActionBlockLayer` does not unmount a drawer-presentation block when the\n * drawer closes — it only toggles the `Drawer`'s `isOpen` — so the account\n * refresh (parity with `ConnectDrawer`'s own `onClose`) is driven by watching\n * this beat's `actionDrawer.isDrawerOpen` transition from true to false,\n * rather than an unmount effect, which would never fire.\n */\nexport const ConnectWidgetActionBlock = observer(function ConnectWidgetActionBlock({\n beat,\n}: ActionBlockProps) {\n const { actionDrawer } = useInsightsV2Store()\n const { refreshAccounts } = useAccountStore()\n const fireAnalyticsEvent = useAnalyticsEvent()\n\n const isCurrentBeatOpen = actionDrawer.isDrawerOpen && actionDrawer.guid === beat.guid\n const wasOpen = useRef(isCurrentBeatOpen)\n\n useEffect(() => {\n if (wasOpen.current && !isCurrentBeatOpen) {\n void refreshAccounts()\n }\n wasOpen.current = isCurrentBeatOpen\n }, [isCurrentBeatOpen])\n\n // OPENED_CONNECT_DRAWER: the drawer actually opened (any path — CTA or otherwise). Own ref +\n // effect, separate from the refresh logic above: this one is rising-edge, so its ref starts\n // `false` — the block's first render typically happens with the drawer already open (children\n // render on open), and that first open must fire too. Fires once per open, re-arms on close.\n // Pulse parity: ConnectDiscoveredAccounts/Beat.js onPrimaryCtaClick's `opened_connect_drawer`.\n const hasFiredOpen = useRef(false)\n\n useEffect(() => {\n if (isCurrentBeatOpen && !hasFiredOpen.current) {\n fireAnalyticsEvent(ANALYTICS_EVENTS_CONFIG.OPENED_CONNECT_DRAWER)\n }\n hasFiredOpen.current = isCurrentBeatOpen\n }, [isCurrentBeatOpen, fireAnalyticsEvent])\n\n // V1 parity (pulse ConnectDiscoveredAccounts/Beat.js `current_institution_guid`): open the Connect\n // widget on the discovered institution. tupac's `drilldown_data` names it only while the account is\n // not yet connected; a missing or malformed guid opens institution search instead.\n const guid = beat.insights_payload?.drilldown_data?.discovered_institution_guid\n\n return (\n <ConnectWidgetPanel\n isActive={isCurrentBeatOpen}\n loadWidgetProps={\n typeof guid === 'string' && isLogoGuid(guid)\n ? { current_institution_guid: guid }\n : undefined\n }\n />\n )\n})\n"],"mappings":";;;;;;;;AAyBA,IAAa,IAA2B,EAAS,SAAkC,EACjF,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAmB,GACtC,EAAE,iBAAA,EAAA,IAAoB,EAAgB,GACtC,IAAqB,EAAkB,GAEvC,IAAoB,EAAa,gBAAgB,EAAa,SAAS,EAAK,MAC5E,IAAU,EAAO,CAAiB;AAExC,EAAA,EAAA,MAAgB;AACd,IAAI,EAAQ,WAAW,CAAC,KACtB,EAAqB,GAEvB,EAAQ,UAAU;AAAA,EACpB,GAAG,CAAC,CAAiB,CAAC;AAOtB,QAAM,IAAe,EAAO,EAAK;AAEjC,EAAA,EAAA,MAAgB;AACd,IAAI,KAAqB,CAAC,EAAa,WACrC,EAAmB,EAAwB,qBAAqB,GAElE,EAAa,UAAU;AAAA,EACzB,GAAG,CAAC,GAAmB,CAAkB,CAAC;AAK1C,QAAM,IAAO,EAAK,kBAAkB,gBAAgB;AAEpD,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,UAAU;AAAA,IACV,iBACE,OAAO,KAAS,YAAY,EAAW,CAAI,IACvC,EAAE,0BAA0B,EAAK,IACjC;AAAA,EAEP,CAAA;AAEL,CAAC"}
@@ -4,10 +4,10 @@ import { ActionBlockProps } from '../mappings/blocks';
4
4
  * block; its content is a MODAL (the dialog portals over the drawer).
5
5
  *
6
6
  * Flow: the CTA (e.g. Set Up Direct Deposit's "Not Interested") opens the
7
- * "Can you tell us why?" survey (Figma `1941:192803`). Submit forwards the
8
- * selection to the host via `beatActions.onSubmitFeedback` (source `cta`) and
9
- * swaps the dialog for the success snackbar (Figma `1941:167636`); closing the
10
- * snackbar — or dismissing the dialog — ends the action-drawer session.
7
+ * "Can you tell us why?" survey (Figma `1941:192803`). Submit dismisses the insight
8
+ * (`onDismissInsight`), then forwards the selection via `onSubmitFeedback` (source
9
+ * `hide`). A host that can dismiss shows its own confirmation; otherwise the dialog
10
+ * swaps for the success snackbar (Figma `1941:167636`). Closing ends the drawer session.
11
11
  *
12
12
  * Copy comes from `insights_feed.feedback_modal` in GlobalCopy; the
13
13
  * description interpolates the beat's account name (`_1{account_name}`).
@@ -1,39 +1,53 @@
1
- import { buildDynamicCopy as l } from "../../core/utils/Localization.es.js";
2
- import { useGlobalCopyStore as m, useInsightsV2Store as u } from "../../common/context/hooks.es.js";
3
- import { useBeatActions as d } from "../beatActions.es.js";
4
- import b from "../components/FeedbackModal.es.js";
5
- import { observer as p } from "mobx-react-lite";
6
- import { jsx as _ } from "react/jsx-runtime";
7
- var C = p(function({ beat: t }) {
8
- const { closeActionDrawer: s } = u(), { onSubmitFeedback: a } = d(), i = m(), e = t.insights_payload, o = i.insights_feed?.feedback_modal;
9
- if (!e || !o) return null;
10
- const r = {
11
- title: o.title,
12
- description: l(o.description, e.instance_slot?.account_name ?? ""),
13
- options: Object.values(o.options ?? {}),
14
- submitText: o.submit,
15
- cancelText: o.no_thanks,
16
- closeAriaLabel: o.close_aria,
17
- characterLimitLabel: o.character_limit,
18
- successMessage: o.success_message,
19
- errorMessage: o.error_message,
20
- tryAgainText: o.try_again,
21
- toastCloseAriaLabel: o.toast_close_aria
1
+ import { buildDynamicCopy as p } from "../../core/utils/Localization.es.js";
2
+ import { useGlobalCopyStore as b, useInsightsV2Store as _ } from "../../common/context/hooks.es.js";
3
+ import { slot as f } from "../../core/types/Insights.es.js";
4
+ import { useBeatActions as y } from "../beatActions.es.js";
5
+ import { ANALYTICS_EVENTS_CONFIG as g } from "../analytics/analyticsEventsConfig.es.js";
6
+ import { useAnalyticsEvent as S } from "../analytics/useAnalyticsEvent.es.js";
7
+ import h from "../components/FeedbackModal.es.js";
8
+ import { useRef as A } from "react";
9
+ import { observer as k } from "mobx-react-lite";
10
+ import { jsx as F } from "react/jsx-runtime";
11
+ var N = k(function({ beat: i }) {
12
+ const { closeActionDrawer: r } = _(), { onDismissInsight: o, onFeedbackTextFocus: n, onSubmitFeedback: c } = y(), l = b(), m = S(), s = A(!1), t = i.insights_payload, e = l.insights_feed?.feedback_modal;
13
+ if (!t || !e) return null;
14
+ const u = {
15
+ title: e.title,
16
+ description: p(e.description, f(t.instance_slot?.data, "account_name") ?? t.instance_slot?.account_name ?? ""),
17
+ options: Object.values(e.options ?? {}),
18
+ submitText: e.submit,
19
+ cancelText: e.no_thanks,
20
+ closeAriaLabel: e.close_aria,
21
+ characterLimitLabel: e.character_limit,
22
+ successMessage: e.success_message,
23
+ errorMessage: e.error_message,
24
+ tryAgainText: e.try_again,
25
+ toastCloseAriaLabel: e.toast_close_aria
22
26
  };
23
- return /* @__PURE__ */ _(b, {
24
- copy: r,
27
+ return /* @__PURE__ */ F(h, {
28
+ copy: u,
25
29
  isOpen: !0,
26
- onClose: () => s(),
27
- onSubmit: (c, n) => a?.({
28
- beatGuid: e.guid,
29
- source: "cta",
30
- option: c,
31
- detail: n
32
- })
30
+ onClose: () => r(),
31
+ onSubmit: async (a, d) => {
32
+ s.current || (s.current = !0, o?.({
33
+ beatGuid: t.guid,
34
+ type: "always"
35
+ }), m({
36
+ ...g.BEAT_DISMISSED,
37
+ value: a
38
+ })), await c?.({
39
+ beatGuid: t.guid,
40
+ source: "not_interested",
41
+ option: a,
42
+ detail: d
43
+ });
44
+ },
45
+ onTextInputFocus: n,
46
+ showSuccessMessage: !o
33
47
  });
34
48
  });
35
49
  export {
36
- C as FeedbackModalActionBlock
50
+ N as FeedbackModalActionBlock
37
51
  };
38
52
 
39
53
  //# sourceMappingURL=FeedbackModalActionBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackModalActionBlock.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/FeedbackModalActionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../common'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\nimport FeedbackModal, { type FeedbackModalContent } from '../components/FeedbackModal'\nimport { useBeatActions } from '../beatActions'\nimport type { ActionBlockProps } from '../mappings/blocks'\n\n/**\n * `feedback_modal_block` — a CTA drilldown registered like any other drawer\n * block; its content is a MODAL (the dialog portals over the drawer).\n *\n * Flow: the CTA (e.g. Set Up Direct Deposit's \"Not Interested\") opens the\n * \"Can you tell us why?\" survey (Figma `1941:192803`). Submit forwards the\n * selection to the host via `beatActions.onSubmitFeedback` (source `cta`) and\n * swaps the dialog for the success snackbar (Figma `1941:167636`); closing the\n * snackbar — or dismissing the dialog — ends the action-drawer session.\n *\n * Copy comes from `insights_feed.feedback_modal` in GlobalCopy; the\n * description interpolates the beat's account name (`_1{account_name}`).\n */\nexport const FeedbackModalActionBlock = observer(function FeedbackModalActionBlock({\n beat,\n}: ActionBlockProps) {\n const { closeActionDrawer } = useInsightsV2Store()\n const { onSubmitFeedback } = useBeatActions()\n const copyStore = useGlobalCopyStore()\n\n const insights_payload = beat.insights_payload\n const modalCopy = copyStore.insights_feed?.feedback_modal\n\n if (!insights_payload || !modalCopy) return null\n\n const copy: FeedbackModalContent = {\n title: modalCopy.title,\n description: buildDynamicCopy(\n modalCopy.description,\n // `account_name` lands on InstanceSlot with the Direct Deposit block (WEC-1875);\n // narrow-cast until that merges so the modal stays beat-agnostic.\n (insights_payload.instance_slot as { account_name?: string })?.account_name ?? '',\n ) as string,\n options: Object.values(modalCopy.options ?? {}),\n submitText: modalCopy.submit,\n cancelText: modalCopy.no_thanks,\n closeAriaLabel: modalCopy.close_aria,\n characterLimitLabel: modalCopy.character_limit,\n successMessage: modalCopy.success_message,\n errorMessage: modalCopy.error_message,\n tryAgainText: modalCopy.try_again,\n toastCloseAriaLabel: modalCopy.toast_close_aria,\n }\n\n // Returned (not just fired): a host promise rejection drives the modal's\n // error snackbar + Try Again retry.\n\n //TODO: Need to update the onSubmit functionality as per pulse. This function is mis-matching with the current approach of switchdirectdeposit and setupdirectdeposit\n\n const handleSubmit = (option: string, detail?: string) =>\n onSubmitFeedback?.({\n beatGuid: insights_payload.guid,\n source: 'cta',\n option,\n detail,\n })\n\n return (\n <FeedbackModal\n copy={copy}\n isOpen={true}\n onClose={() => closeActionDrawer()}\n onSubmit={handleSubmit}\n />\n )\n})\n"],"mappings":";;;;;;AAqBA,IAAa,IAA2B,EAAS,SAAkC,EACjF,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,mBAAA,EAAA,IAAsB,EAAmB,GAC3C,EAAE,kBAAA,EAAA,IAAqB,EAAe,GACtC,IAAY,EAAmB,GAE/B,IAAmB,EAAK,kBACxB,IAAY,EAAU,eAAe;AAE3C,MAAI,CAAC,KAAoB,CAAC,EAAW,QAAO;AAE5C,QAAM,IAA6B;AAAA,IACjC,OAAO,EAAU;AAAA,IACjB,aAAa,EACX,EAAU,aAGT,EAAiB,eAA6C,gBAAgB,EACjF;AAAA,IACA,SAAS,OAAO,OAAO,EAAU,WAAW,CAAC,CAAC;AAAA,IAC9C,YAAY,EAAU;AAAA,IACtB,YAAY,EAAU;AAAA,IACtB,gBAAgB,EAAU;AAAA,IAC1B,qBAAqB,EAAU;AAAA,IAC/B,gBAAgB,EAAU;AAAA,IAC1B,cAAc,EAAU;AAAA,IACxB,cAAc,EAAU;AAAA,IACxB,qBAAqB,EAAU;AAAA,EACjC;AAeA,SACE,gBAAA,EAAC,GAAD;AAAA,IACQ,MAAA;AAAA,IACN,QAAQ;AAAA,IACR,SAAA,MAAe,EAAkB;AAAA,IACjC,UAbE,CAAgB,GAAgB,MACpC,IAAmB;AAAA,MACjB,UAAU,EAAiB;AAAA,MAC3B,QAAQ;AAAA,MACR,QAAA;AAAA,MACA,QAAA;AAAA,IACF,CAAC;AAAA,EAQA,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"FeedbackModalActionBlock.es.js","names":[],"sources":["../../../src/insights-v2/actionBlocks/FeedbackModalActionBlock.tsx"],"sourcesContent":["import { useRef } from 'react'\n\nimport { observer } from 'mobx-react-lite'\n\nimport { useGlobalCopyStore, useInsightsV2Store } from '../../common'\nimport { slot } from '../../core'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\nimport FeedbackModal, { type FeedbackModalContent } from '../components/FeedbackModal'\nimport { ANALYTICS_EVENTS_CONFIG, useAnalyticsEvent } from '../analytics'\nimport { useBeatActions } from '../beatActions'\nimport type { ActionBlockProps } from '../mappings/blocks'\n\n/**\n * `feedback_modal_block` — a CTA drilldown registered like any other drawer\n * block; its content is a MODAL (the dialog portals over the drawer).\n *\n * Flow: the CTA (e.g. Set Up Direct Deposit's \"Not Interested\") opens the\n * \"Can you tell us why?\" survey (Figma `1941:192803`). Submit dismisses the insight\n * (`onDismissInsight`), then forwards the selection via `onSubmitFeedback` (source\n * `hide`). A host that can dismiss shows its own confirmation; otherwise the dialog\n * swaps for the success snackbar (Figma `1941:167636`). Closing ends the drawer session.\n *\n * Copy comes from `insights_feed.feedback_modal` in GlobalCopy; the\n * description interpolates the beat's account name (`_1{account_name}`).\n */\nexport const FeedbackModalActionBlock = observer(function FeedbackModalActionBlock({\n beat,\n}: ActionBlockProps) {\n const { closeActionDrawer } = useInsightsV2Store()\n const { onDismissInsight, onFeedbackTextFocus, onSubmitFeedback } = useBeatActions()\n const copyStore = useGlobalCopyStore()\n const fireAnalyticsEvent = useAnalyticsEvent()\n // So a retry does not dismiss twice.\n const hasDismissed = useRef(false)\n\n const insights_payload = beat.insights_payload\n const modalCopy = copyStore.insights_feed?.feedback_modal\n\n if (!insights_payload || !modalCopy) return null\n\n const copy: FeedbackModalContent = {\n title: modalCopy.title,\n description: buildDynamicCopy(\n modalCopy.description,\n // `data` first, the flat name is the earlier shape.\n slot<string>(insights_payload.instance_slot?.data, 'account_name') ??\n insights_payload.instance_slot?.account_name ??\n '',\n ) as string,\n options: Object.values(modalCopy.options ?? {}),\n submitText: modalCopy.submit,\n cancelText: modalCopy.no_thanks,\n closeAriaLabel: modalCopy.close_aria,\n characterLimitLabel: modalCopy.character_limit,\n successMessage: modalCopy.success_message,\n errorMessage: modalCopy.error_message,\n tryAgainText: modalCopy.try_again,\n toastCloseAriaLabel: modalCopy.toast_close_aria,\n }\n\n // As legacy: dismiss first (once), then send the survey. A failed send keeps the beat dismissed and\n // Try Again re-sends only the feedback. Awaited so a rejection drives the error snackbar.\n const handleSubmit = async (option: string, detail?: string) => {\n if (!hasDismissed.current) {\n hasDismissed.current = true\n onDismissInsight?.({ beatGuid: insights_payload.guid, type: 'always' })\n // The reason is the event's value, as legacy.\n fireAnalyticsEvent({ ...ANALYTICS_EVENTS_CONFIG.BEAT_DISMISSED, value: option })\n }\n\n await onSubmitFeedback?.({\n beatGuid: insights_payload.guid,\n source: 'not_interested',\n option,\n detail,\n })\n }\n\n return (\n <FeedbackModal\n copy={copy}\n isOpen={true}\n onClose={() => closeActionDrawer()}\n onSubmit={handleSubmit}\n onTextInputFocus={onFeedbackTextFocus}\n // A host that dismisses shows its own confirmation; the micro widget keeps the snackbar.\n showSuccessMessage={!onDismissInsight}\n />\n )\n})\n"],"mappings":";;;;;;;;;;AAyBA,IAAa,IAA2B,EAAS,SAAkC,EACjF,MAAA,EAAA,GACmB;AACnB,QAAM,EAAE,mBAAA,EAAA,IAAsB,EAAmB,GAC3C,EAAE,kBAAA,GAAkB,qBAAA,GAAqB,kBAAA,EAAA,IAAqB,EAAe,GAC7E,IAAY,EAAmB,GAC/B,IAAqB,EAAkB,GAEvC,IAAe,EAAO,EAAK,GAE3B,IAAmB,EAAK,kBACxB,IAAY,EAAU,eAAe;AAE3C,MAAI,CAAC,KAAoB,CAAC,EAAW,QAAO;AAE5C,QAAM,IAA6B;AAAA,IACjC,OAAO,EAAU;AAAA,IACjB,aAAa,EACX,EAAU,aAEV,EAAa,EAAiB,eAAe,MAAM,cAAc,KAC/D,EAAiB,eAAe,gBAChC,EACJ;AAAA,IACA,SAAS,OAAO,OAAO,EAAU,WAAW,CAAC,CAAC;AAAA,IAC9C,YAAY,EAAU;AAAA,IACtB,YAAY,EAAU;AAAA,IACtB,gBAAgB,EAAU;AAAA,IAC1B,qBAAqB,EAAU;AAAA,IAC/B,gBAAgB,EAAU;AAAA,IAC1B,cAAc,EAAU;AAAA,IACxB,cAAc,EAAU;AAAA,IACxB,qBAAqB,EAAU;AAAA,EACjC;AAoBA,SACE,gBAAA,EAAC,GAAD;AAAA,IACQ,MAAA;AAAA,IACN,QAAQ;AAAA,IACR,SAAA,MAAe,EAAkB;AAAA,IACjC,UArBiB,OAAO,GAAgB,MAAoB;AAC9D,MAAK,EAAa,YAChB,EAAa,UAAU,IACvB,IAAmB;AAAA,QAAE,UAAU,EAAiB;AAAA,QAAM,MAAM;AAAA,MAAS,CAAC,GAEtE,EAAmB;AAAA,QAAE,GAAG,EAAwB;AAAA,QAAgB,OAAO;AAAA,MAAO,CAAC,IAGjF,MAAM,IAAmB;AAAA,QACvB,UAAU,EAAiB;AAAA,QAC3B,QAAQ;AAAA,QACR,QAAA;AAAA,QACA,QAAA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IAQI,kBAAkB;AAAA,IAElB,oBAAoB,CAAC;AAAA,EACtB,CAAA;AAEL,CAAC"}
@@ -4,6 +4,8 @@ type Resolvable = string | ((beat: Beat) => string);
4
4
  export interface AnalyticsEventConfigEntry {
5
5
  category?: Resolvable;
6
6
  action?: Resolvable;
7
+ /** Detail stored with the Firefly event, e.g. a survey reason. */
8
+ value?: Resolvable;
7
9
  postHog?: {
8
10
  eventName: string;
9
11
  properties?: (beat: Beat) => Record<string, unknown>;
@@ -22,6 +24,10 @@ export declare const ANALYTICS_EVENTS_CONFIG: {
22
24
  readonly category: "Beat Interaction";
23
25
  readonly action: "First Time Primary Action Selected";
24
26
  };
27
+ readonly BEAT_DISMISSED: {
28
+ readonly category: "Beat Interaction";
29
+ readonly action: "Beat Dismissed";
30
+ };
25
31
  readonly CHART_BAR_CLICKED: {
26
32
  readonly category: "Beat Chart";
27
33
  readonly action: (beat: Beat) => string;
@@ -11,6 +11,10 @@ var t = (e) => e?.replace(/([A-Z]+)/g, " $1")?.replace(/^ /, "") ?? "", a = {
11
11
  category: "Beat Interaction",
12
12
  action: "First Time Primary Action Selected"
13
13
  },
14
+ BEAT_DISMISSED: {
15
+ category: "Beat Interaction",
16
+ action: "Beat Dismissed"
17
+ },
14
18
  CHART_BAR_CLICKED: {
15
19
  category: "Beat Chart",
16
20
  action: (e) => `${t(e.template)} - Bar Clicked`
@@ -1 +1 @@
1
- {"version":3,"file":"analyticsEventsConfig.es.js","names":[],"sources":["../../../src/insights-v2/analytics/analyticsEventsConfig.ts"],"sourcesContent":["import type { Beat } from '../../core'\n\n// PascalCase template to label, ported from Pulse.\nexport const sentenceCaseTemplate = (template?: string | null): string =>\n template?.replace(/([A-Z]+)/g, ' $1')?.replace(/^ /, '') ?? ''\n\n// Fixed or beat-computed value.\ntype Resolvable = string | ((beat: Beat) => string)\n\n// Source of truth for insights-v2 analytics events. Mirrors Pulse's strings.\n// Entry has a Firefly half (action/category) and/or a postHog half.\nexport interface AnalyticsEventConfigEntry {\n category?: Resolvable\n action?: Resolvable\n postHog?: {\n eventName: string\n properties?: (beat: Beat) => Record<string, unknown>\n }\n}\n\nexport const ANALYTICS_EVENTS_CONFIG = {\n // Primary/secondary CTA click, fired via sendCtaAnalytics.\n PRIMARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'Primary Action Selected',\n },\n SECONDARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'Secondary Action Selected',\n },\n // Fires once, gated on !beat.cta_clicked_at.\n FIRST_TIME_PRIMARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'First Time Primary Action Selected',\n },\n\n // Bar click on the card's inline chart.\n CHART_BAR_CLICKED: {\n category: 'Beat Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Bar Clicked`,\n },\n // Bar click inside the drill-down drawer.\n DRAWER_CHART_BAR_CLICKED: {\n category: 'Drawer Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Bar Clicked`,\n },\n // Month/tab change inside the drill-down drawer.\n TAB_SELECTED: {\n category: 'Drawer Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Month Tab Selected`,\n },\n\n // LowAccountBalance threshold dialog.\n EDIT_INSIGHT_THRESHOLD_SAVE: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Save',\n },\n EDIT_INSIGHT_THRESHOLD_CANCELED: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Canceled',\n },\n EDIT_INSIGHT_THRESHOLD_INPUT_SELECTED: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Input Selected',\n },\n\n // SavingsOpportunityV2 safety-net dialog.\n EDIT_SAFETY_NET_SAVE: {\n category: 'Safety Net',\n action: 'Edit Safety Net',\n },\n // Ported verbatim from Pulse (uses '=' not '-').\n EDIT_SAFETY_NET_CANCEL: {\n category: 'Safety Net',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} = Edit Safety Net - Cancel`,\n },\n\n // Designate Emergency Savings Account (picker pick, Save, Open a Savings Account). Pulse's strings.\n EMERGENCY_SAVINGS_ACCT_SELECTED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account Selected',\n },\n EMERGENCY_SAVINGS_ACCT_SAVED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account Saved',\n },\n EMERGENCY_SAVINGS_ACCT_CREATED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account - Savings Account Created',\n },\n\n // Connect drawer opened. PostHog-only.\n OPENED_CONNECT_DRAWER: {\n postHog: {\n eventName: 'opened_connect_drawer',\n properties: (beat) => ({ beat_guid: beat.guid, template: beat.template }),\n },\n },\n} as const satisfies Record<string, AnalyticsEventConfigEntry>\n"],"mappings":"AAGA,IAAa,IAAA,CAAwB,MACnC,GAAU,QAAQ,aAAa,KAAK,GAAG,QAAQ,MAAM,EAAE,KAAK,IAgBjD,IAA0B;AAAA,EAErC,yBAAyB;AAAA,IACvB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,2BAA2B;AAAA,IACzB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAEA,oCAAoC;AAAA,IAClC,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAEA,0BAA0B;AAAA,IACxB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAEA,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAGA,6BAA6B;AAAA,IAC3B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,iCAAiC;AAAA,IAC/B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,uCAAuC;AAAA,IACrC,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,sBAAsB;AAAA,IACpB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAEA,wBAAwB;AAAA,IACtB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAGA,iCAAiC;AAAA,IAC/B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,8BAA8B;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,gCAAgC;AAAA,IAC9B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,uBAAuB,EACrB,SAAS;AAAA,IACP,WAAW;AAAA,IACX,YAAA,CAAa,OAAU;AAAA,MAAE,WAAW,EAAK;AAAA,MAAM,UAAU,EAAK;AAAA,IAAS;AAAA,EACzE,EACF;AACF"}
1
+ {"version":3,"file":"analyticsEventsConfig.es.js","names":[],"sources":["../../../src/insights-v2/analytics/analyticsEventsConfig.ts"],"sourcesContent":["import type { Beat } from '../../core'\n\n// PascalCase template to label, ported from Pulse.\nexport const sentenceCaseTemplate = (template?: string | null): string =>\n template?.replace(/([A-Z]+)/g, ' $1')?.replace(/^ /, '') ?? ''\n\n// Fixed or beat-computed value.\ntype Resolvable = string | ((beat: Beat) => string)\n\n// Source of truth for insights-v2 analytics events. Mirrors Pulse's strings.\n// Entry has a Firefly half (action/category) and/or a postHog half.\nexport interface AnalyticsEventConfigEntry {\n category?: Resolvable\n action?: Resolvable\n /** Detail stored with the Firefly event, e.g. a survey reason. */\n value?: Resolvable\n postHog?: {\n eventName: string\n properties?: (beat: Beat) => Record<string, unknown>\n }\n}\n\nexport const ANALYTICS_EVENTS_CONFIG = {\n // Primary/secondary CTA click, fired via sendCtaAnalytics.\n PRIMARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'Primary Action Selected',\n },\n SECONDARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'Secondary Action Selected',\n },\n // Fires once, gated on !beat.cta_clicked_at.\n FIRST_TIME_PRIMARY_ACTION_SELECTED: {\n category: 'Beat Interaction',\n action: 'First Time Primary Action Selected',\n },\n\n // \"Not Interested\" survey submitted; the call site sets the picked reason as `value`.\n BEAT_DISMISSED: {\n category: 'Beat Interaction',\n action: 'Beat Dismissed',\n },\n\n // Bar click on the card's inline chart.\n CHART_BAR_CLICKED: {\n category: 'Beat Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Bar Clicked`,\n },\n // Bar click inside the drill-down drawer.\n DRAWER_CHART_BAR_CLICKED: {\n category: 'Drawer Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Bar Clicked`,\n },\n // Month/tab change inside the drill-down drawer.\n TAB_SELECTED: {\n category: 'Drawer Chart',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} - Month Tab Selected`,\n },\n\n // LowAccountBalance threshold dialog.\n EDIT_INSIGHT_THRESHOLD_SAVE: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Save',\n },\n EDIT_INSIGHT_THRESHOLD_CANCELED: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Canceled',\n },\n EDIT_INSIGHT_THRESHOLD_INPUT_SELECTED: {\n category: 'User Configurable Settings',\n action: 'Edit Insight Threshold Input Selected',\n },\n\n // SavingsOpportunityV2 safety-net dialog.\n EDIT_SAFETY_NET_SAVE: {\n category: 'Safety Net',\n action: 'Edit Safety Net',\n },\n // Ported verbatim from Pulse (uses '=' not '-').\n EDIT_SAFETY_NET_CANCEL: {\n category: 'Safety Net',\n action: (beat) => `${sentenceCaseTemplate(beat.template)} = Edit Safety Net - Cancel`,\n },\n\n // Designate Emergency Savings Account (picker pick, Save, Open a Savings Account). Pulse's strings.\n EMERGENCY_SAVINGS_ACCT_SELECTED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account Selected',\n },\n EMERGENCY_SAVINGS_ACCT_SAVED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account Saved',\n },\n EMERGENCY_SAVINGS_ACCT_CREATED: {\n category: 'Emergency Savings',\n action: 'Designate Emergency Savings Account - Savings Account Created',\n },\n\n // Connect drawer opened. PostHog-only.\n OPENED_CONNECT_DRAWER: {\n postHog: {\n eventName: 'opened_connect_drawer',\n properties: (beat) => ({ beat_guid: beat.guid, template: beat.template }),\n },\n },\n} as const satisfies Record<string, AnalyticsEventConfigEntry>\n"],"mappings":"AAGA,IAAa,IAAA,CAAwB,MACnC,GAAU,QAAQ,aAAa,KAAK,GAAG,QAAQ,MAAM,EAAE,KAAK,IAkBjD,IAA0B;AAAA,EAErC,yBAAyB;AAAA,IACvB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,2BAA2B;AAAA,IACzB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAEA,oCAAoC;AAAA,IAClC,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,gBAAgB;AAAA,IACd,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAEA,0BAA0B;AAAA,IACxB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAEA,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAGA,6BAA6B;AAAA,IAC3B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,iCAAiC;AAAA,IAC/B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,uCAAuC;AAAA,IACrC,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,sBAAsB;AAAA,IACpB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAEA,wBAAwB;AAAA,IACtB,UAAU;AAAA,IACV,QAAA,CAAS,MAAS,GAAG,EAAqB,EAAK,QAAQ,CAAA;AAAA,EACzD;AAAA,EAGA,iCAAiC;AAAA,IAC/B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,8BAA8B;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,gCAAgC;AAAA,IAC9B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EAGA,uBAAuB,EACrB,SAAS;AAAA,IACP,WAAW;AAAA,IACX,YAAA,CAAa,OAAU;AAAA,MAAE,WAAW,EAAK;AAAA,MAAM,UAAU,EAAK;AAAA,IAAS;AAAA,EACzE,EACF;AACF"}
@@ -1,10 +1,11 @@
1
- import { sentenceCaseTemplate as s } from "./analyticsEventsConfig.es.js";
2
- var p = (e, t) => typeof e == "function" ? e(t) : e, a = (e, t) => {
3
- const o = p(e.action, t), r = p(e.category, t);
1
+ import { sentenceCaseTemplate as a } from "./analyticsEventsConfig.es.js";
2
+ var s = (e, t) => typeof e == "function" ? e(t) : e, l = (e, t) => {
3
+ const o = s(e.action, t), r = s(e.category, t), p = s(e.value, t);
4
4
  return {
5
5
  ...o && { action: o },
6
6
  ...r && { category: r },
7
- ...(o || r) && { label: s(t.template) },
7
+ ...(o || r) && { label: a(t.template) },
8
+ ...p && { value: p },
8
9
  ...e.postHog && { postHog: {
9
10
  eventName: e.postHog.eventName,
10
11
  properties: e.postHog.properties?.(t) ?? {}
@@ -12,8 +13,8 @@ var p = (e, t) => typeof e == "function" ? e(t) : e, a = (e, t) => {
12
13
  };
13
14
  };
14
15
  export {
15
- a as resolveAnalyticsEvent,
16
- s as sentenceCaseTemplate
16
+ l as resolveAnalyticsEvent,
17
+ a as sentenceCaseTemplate
17
18
  };
18
19
 
19
20
  //# sourceMappingURL=resolveAnalyticsEvent.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveAnalyticsEvent.es.js","names":[],"sources":["../../../src/insights-v2/analytics/resolveAnalyticsEvent.ts"],"sourcesContent":["import type { AnalyticsEventPayload } from '../beatActions'\nimport type { Beat } from '../../core'\nimport { sentenceCaseTemplate, type AnalyticsEventConfigEntry } from './analyticsEventsConfig'\n\nexport { sentenceCaseTemplate }\n\nconst resolve = (\n value: string | ((beat: Beat) => string) | undefined,\n beat: Beat,\n): string | undefined => (typeof value === 'function' ? value(beat) : value)\n\n// Resolves a catalogue entry (e.g. ANALYTICS_EVENTS_CONFIG.PRIMARY_ACTION_SELECTED) + beat into\n// a final analytics payload. Takes the entry directly, not a lookup key: the call site already\n// has the entry via property access, so there is nothing to look up and nothing to mistype.\nexport const resolveAnalyticsEvent = (\n config: AnalyticsEventConfigEntry,\n beat: Beat,\n): AnalyticsEventPayload => {\n const action = resolve(config.action, beat)\n const category = resolve(config.category, beat)\n\n return {\n ...(action && { action }),\n ...(category && { category }),\n ...((action || category) && { label: sentenceCaseTemplate(beat.template) }),\n ...(config.postHog && {\n postHog: {\n eventName: config.postHog.eventName,\n properties: config.postHog.properties?.(beat) ?? {},\n },\n }),\n }\n}\n"],"mappings":";AAMA,IAAM,IAAA,CACJ,GACA,MACwB,OAAO,KAAU,aAAa,EAAM,CAAI,IAAI,GAKzD,IAAA,CACX,GACA,MAC0B;AAC1B,QAAM,IAAS,EAAQ,EAAO,QAAQ,CAAI,GACpC,IAAW,EAAQ,EAAO,UAAU,CAAI;AAE9C,SAAO;AAAA,IACL,GAAI,KAAU,EAAE,QAAA,EAAO;AAAA,IACvB,GAAI,KAAY,EAAE,UAAA,EAAS;AAAA,IAC3B,IAAK,KAAU,MAAa,EAAE,OAAO,EAAqB,EAAK,QAAQ,EAAE;AAAA,IACzE,GAAI,EAAO,WAAW,EACpB,SAAS;AAAA,MACP,WAAW,EAAO,QAAQ;AAAA,MAC1B,YAAY,EAAO,QAAQ,aAAa,CAAI,KAAK,CAAC;AAAA,IACpD,EACF;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"resolveAnalyticsEvent.es.js","names":[],"sources":["../../../src/insights-v2/analytics/resolveAnalyticsEvent.ts"],"sourcesContent":["import type { AnalyticsEventPayload } from '../beatActions'\nimport type { Beat } from '../../core'\nimport { sentenceCaseTemplate, type AnalyticsEventConfigEntry } from './analyticsEventsConfig'\n\nexport { sentenceCaseTemplate }\n\nconst resolve = (\n value: string | ((beat: Beat) => string) | undefined,\n beat: Beat,\n): string | undefined => (typeof value === 'function' ? value(beat) : value)\n\n// Resolves a catalogue entry (e.g. ANALYTICS_EVENTS_CONFIG.PRIMARY_ACTION_SELECTED) + beat into\n// a final analytics payload. Takes the entry directly, not a lookup key: the call site already\n// has the entry via property access, so there is nothing to look up and nothing to mistype.\nexport const resolveAnalyticsEvent = (\n config: AnalyticsEventConfigEntry,\n beat: Beat,\n): AnalyticsEventPayload => {\n const action = resolve(config.action, beat)\n const category = resolve(config.category, beat)\n const value = resolve(config.value, beat)\n\n return {\n ...(action && { action }),\n ...(category && { category }),\n ...((action || category) && { label: sentenceCaseTemplate(beat.template) }),\n ...(value && { value }),\n ...(config.postHog && {\n postHog: {\n eventName: config.postHog.eventName,\n properties: config.postHog.properties?.(beat) ?? {},\n },\n }),\n }\n}\n"],"mappings":";AAMA,IAAM,IAAA,CACJ,GACA,MACwB,OAAO,KAAU,aAAa,EAAM,CAAI,IAAI,GAKzD,IAAA,CACX,GACA,MAC0B;AAC1B,QAAM,IAAS,EAAQ,EAAO,QAAQ,CAAI,GACpC,IAAW,EAAQ,EAAO,UAAU,CAAI,GACxC,IAAQ,EAAQ,EAAO,OAAO,CAAI;AAExC,SAAO;AAAA,IACL,GAAI,KAAU,EAAE,QAAA,EAAO;AAAA,IACvB,GAAI,KAAY,EAAE,UAAA,EAAS;AAAA,IAC3B,IAAK,KAAU,MAAa,EAAE,OAAO,EAAqB,EAAK,QAAQ,EAAE;AAAA,IACzE,GAAI,KAAS,EAAE,OAAA,EAAM;AAAA,IACrB,GAAI,EAAO,WAAW,EACpB,SAAS;AAAA,MACP,WAAW,EAAO,QAAQ;AAAA,MAC1B,YAAY,EAAO,QAAQ,aAAa,CAAI,KAAK,CAAC;AAAA,IACpD,EACF;AAAA,EACF;AACF"}
@@ -14,7 +14,7 @@ export interface UpdateParams {
14
14
  }
15
15
  export interface FeedbackParams {
16
16
  beatGuid: string;
17
- source: InsightRating | 'hide' | 'cta';
17
+ source: InsightRating | 'hide' | 'cta' | 'not_interested';
18
18
  option: string;
19
19
  detail?: string;
20
20
  }
@@ -26,6 +26,8 @@ export interface AnalyticsEventPayload {
26
26
  action?: string;
27
27
  category?: string;
28
28
  label?: string;
29
+ /** Detail stored with the Firefly event, e.g. a survey reason. */
30
+ value?: string;
29
31
  postHog?: {
30
32
  eventName: string;
31
33
  properties?: Record<string, unknown>;
@@ -46,7 +48,10 @@ export interface BeatActions {
46
48
  onUndoDismiss?: (params: {
47
49
  beatGuid: string;
48
50
  }) => void;
49
- onFeedbackDialogClose?: (reason: FeedbackDialogCloseReason) => void;
51
+ /** The survey for `variant` opened (the hide survey, from "Leave feedback"). */
52
+ onFeedbackSurveyShown?: (variant: InsightRating | 'hide') => void;
53
+ /** The survey closed unsent; `variant` says which one it was. */
54
+ onFeedbackDialogClose?: (reason: FeedbackDialogCloseReason, variant?: InsightRating | 'hide') => void;
50
55
  onFeedbackDialogBack?: () => void;
51
56
  onFeedbackTextFocus?: () => void;
52
57
  onAnalyticsEvent?: (payload: AnalyticsEventPayload) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"beatActions.es.js","names":[],"sources":["../../src/insights-v2/beatActions.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from 'react'\n\nimport type { Beat } from '../core'\nimport type { DismissType } from './components/DismissInsightDialog'\nimport type { FeedbackDialogCloseReason } from './components/FeedbackDialog'\n\nexport type InsightMenuAction = 'helpful' | 'not_helpful' | 'hide'\nexport type InsightRating = 'helpful' | 'not_helpful'\n\nexport interface MenuActionHandlers {\n onAction: (action: InsightMenuAction) => void\n onOpen?: () => void\n disabled?: boolean\n}\n\nexport interface UpdateParams {\n beatGuid: string\n}\n\nexport interface FeedbackParams {\n beatGuid: string\n source: InsightRating | 'hide' | 'cta'\n option: string\n detail?: string\n}\n\nexport interface DismissParams {\n beatGuid: string\n type: DismissType\n}\n\n// Raw analytics payload for the host.\nexport interface AnalyticsEventPayload {\n action?: string\n category?: string\n label?: string\n postHog?: {\n eventName: string\n properties?: Record<string, unknown>\n }\n}\n/** A host-side CTA effect. See ctaActions/README.md. */\nexport interface CtaActionParams {\n beatGuid: string\n name: string\n params?: Record<string, unknown>\n}\n\n/** Host callbacks for a beat card. */\nexport interface BeatActions {\n onMenuAction?: MenuActionHandlers\n onUpdate?: (params: UpdateParams) => void\n onSubmitFeedback?: (params: FeedbackParams) => void | Promise<void>\n onDismissInsight?: (params: DismissParams) => void\n onUndoDismiss?: (params: { beatGuid: string }) => void\n onFeedbackDialogClose?: (reason: FeedbackDialogCloseReason) => void\n onFeedbackDialogBack?: () => void\n onFeedbackTextFocus?: () => void\n // Raw analytics callback; use useAnalyticsEvent() instead.\n onAnalyticsEvent?: (payload: AnalyticsEventPayload) => void\n // Host's contact-support flow for a contact_support_block CTA.\n onContactSupport?: () => void\n onCtaAction?: (params: CtaActionParams) => Promise<void> | void\n}\n\n// BeatActions plus beat, for useAnalyticsEvent().\ninterface BeatActionsContextValue extends BeatActions {\n beat?: Beat\n}\n\nconst BeatActionsContext = createContext<BeatActionsContextValue>({})\n\nexport const BeatActionsProvider = ({\n value,\n children,\n}: {\n value: BeatActionsContextValue\n children: ReactNode\n}) => <BeatActionsContext.Provider value={value}>{children}</BeatActionsContext.Provider>\n\nexport const useBeatActions = () => useContext(BeatActionsContext)\n"],"mappings":";;AAsEA,IAAM,IAAqB,EAAuC,CAAC,CAAC,GAEvD,IAAA,CAAuB,EAClC,OAAA,GACA,UAAA,EAAA,MAII,gBAAA,EAAC,EAAmB,UAApB;AAAA,EAAoC,OAAA;AAAA,EAAQ,UAAA;AAAsC,CAAA,GAE3E,IAAA,MAAuB,EAAW,CAAkB"}
1
+ {"version":3,"file":"beatActions.es.js","names":[],"sources":["../../src/insights-v2/beatActions.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from 'react'\n\nimport type { Beat } from '../core'\nimport type { DismissType } from './components/DismissInsightDialog'\nimport type { FeedbackDialogCloseReason } from './components/FeedbackDialog'\n\nexport type InsightMenuAction = 'helpful' | 'not_helpful' | 'hide'\nexport type InsightRating = 'helpful' | 'not_helpful'\n\nexport interface MenuActionHandlers {\n onAction: (action: InsightMenuAction) => void\n onOpen?: () => void\n disabled?: boolean\n}\n\nexport interface UpdateParams {\n beatGuid: string\n}\n\nexport interface FeedbackParams {\n beatGuid: string\n source: InsightRating | 'hide' | 'cta' | 'not_interested'\n option: string\n detail?: string\n}\n\nexport interface DismissParams {\n beatGuid: string\n type: DismissType\n}\n\n// Raw analytics payload for the host.\nexport interface AnalyticsEventPayload {\n action?: string\n category?: string\n label?: string\n /** Detail stored with the Firefly event, e.g. a survey reason. */\n value?: string\n postHog?: {\n eventName: string\n properties?: Record<string, unknown>\n }\n}\n/** A host-side CTA effect. See ctaActions/README.md. */\nexport interface CtaActionParams {\n beatGuid: string\n name: string\n params?: Record<string, unknown>\n}\n\n/** Host callbacks for a beat card. */\nexport interface BeatActions {\n onMenuAction?: MenuActionHandlers\n onUpdate?: (params: UpdateParams) => void\n onSubmitFeedback?: (params: FeedbackParams) => void | Promise<void>\n onDismissInsight?: (params: DismissParams) => void\n onUndoDismiss?: (params: { beatGuid: string }) => void\n /** The survey for `variant` opened (the hide survey, from \"Leave feedback\"). */\n onFeedbackSurveyShown?: (variant: InsightRating | 'hide') => void\n /** The survey closed unsent; `variant` says which one it was. */\n onFeedbackDialogClose?: (\n reason: FeedbackDialogCloseReason,\n variant?: InsightRating | 'hide',\n ) => void\n onFeedbackDialogBack?: () => void\n onFeedbackTextFocus?: () => void\n // Raw analytics callback; use useAnalyticsEvent() instead.\n onAnalyticsEvent?: (payload: AnalyticsEventPayload) => void\n // Host's contact-support flow for a contact_support_block CTA.\n onContactSupport?: () => void\n onCtaAction?: (params: CtaActionParams) => Promise<void> | void\n}\n\n// BeatActions plus beat, for useAnalyticsEvent().\ninterface BeatActionsContextValue extends BeatActions {\n beat?: Beat\n}\n\nconst BeatActionsContext = createContext<BeatActionsContextValue>({})\n\nexport const BeatActionsProvider = ({\n value,\n children,\n}: {\n value: BeatActionsContextValue\n children: ReactNode\n}) => <BeatActionsContext.Provider value={value}>{children}</BeatActionsContext.Provider>\n\nexport const useBeatActions = () => useContext(BeatActionsContext)\n"],"mappings":";;AA8EA,IAAM,IAAqB,EAAuC,CAAC,CAAC,GAEvD,IAAA,CAAuB,EAClC,OAAA,GACA,UAAA,EAAA,MAII,gBAAA,EAAC,EAAmB,UAApB;AAAA,EAAoC,OAAA;AAAA,EAAQ,UAAA;AAAsC,CAAA,GAE3E,IAAA,MAAuB,EAAW,CAAkB"}
@@ -1,8 +1,11 @@
1
- import { AccountSwitchBlockData } from '../../../../core/types/InsightsInstanceSlotData';
2
1
  import { BlockProps } from '../../types';
3
2
  /**
4
3
  * Two institution logos on a transfer track, shared by Discovered Accounts and Switch
5
4
  * Direct Deposit. `instance_slot.variant` picks the design branch from `./layout.ts`.
5
+ *
6
+ * The logos are the `from_logo` / `to_logo` slots on `instance_slot.data`; `LogoFromGuid` draws
7
+ * nothing for a missing slot or a guid that is not a logo guid (tupac omits `to_logo` when the user
8
+ * holds no FI-managed account).
6
9
  */
7
- declare const AccountSwitchBlock: ({ payload }: BlockProps<AccountSwitchBlockData>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const AccountSwitchBlock: ({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element;
8
11
  export default AccountSwitchBlock;
@@ -1,34 +1,32 @@
1
- import { resolveVariantConfig as _ } from "../../resolveVariantConfig.es.js";
2
- import l from "../../../components/TransferLogoCard.es.js";
3
- import { accountSwitchVariant as g, getLayoutConfig as h } from "./layout.es.js";
4
- import { InstitutionLogo as i } from "@mxenabled/mxui";
5
- import { Icon as p } from "@mxenabled/mx-icons";
6
- import { jsx as t } from "react/jsx-runtime";
7
- import { useTheme as v } from "@mui/material/styles";
8
- var n = 64, A = ({ payload: o }) => {
9
- const r = v(), { variant: e } = o.instance_slot, { discovered_institution_guid: c, discovered_institution_name: s, held_institution_guid: a, held_institution_name: m } = o.instance_slot_data, { badgeIcon: u, badgeIconColor: d, ...f } = _(h(r), e, g.AccountConnect, "AccountSwitchBlock");
10
- return /* @__PURE__ */ t(l, {
11
- ...f,
12
- from: /* @__PURE__ */ t(i, {
13
- alt: s,
14
- institutionGuid: c,
15
- size: n
1
+ import r from "../../../components/LogoFromGuid.es.js";
2
+ import { resolveVariantConfig as l } from "../../resolveVariantConfig.es.js";
3
+ import u from "../../../components/TransferLogoCard.es.js";
4
+ import { accountSwitchVariant as d, getLayoutConfig as p } from "./layout.es.js";
5
+ import { Icon as h } from "@mxenabled/mx-icons";
6
+ import { jsx as o } from "react/jsx-runtime";
7
+ import { useTheme as C } from "@mui/material/styles";
8
+ var t = 64, z = ({ payload: c }) => {
9
+ const n = C(), { data: a, variant: i } = c.instance_slot, { from_logo: e, to_logo: m } = a ?? {}, { badgeIcon: s, badgeIconColor: f, ...g } = l(p(n), i, d.AccountConnect, "AccountSwitchBlock");
10
+ return /* @__PURE__ */ o(u, {
11
+ ...g,
12
+ from: /* @__PURE__ */ o(r, {
13
+ logo: e,
14
+ size: t
16
15
  }),
17
- icon: /* @__PURE__ */ t(p, {
16
+ icon: /* @__PURE__ */ o(h, {
18
17
  "aria-hidden": !0,
19
- name: u,
18
+ name: s,
20
19
  size: 20,
21
- sx: { color: d }
20
+ sx: { color: f }
22
21
  }),
23
- to: /* @__PURE__ */ t(i, {
24
- alt: m,
25
- institutionGuid: a,
26
- size: n
22
+ to: /* @__PURE__ */ o(r, {
23
+ logo: m,
24
+ size: t
27
25
  })
28
26
  });
29
27
  };
30
28
  export {
31
- A as default
29
+ z as default
32
30
  };
33
31
 
34
32
  //# sourceMappingURL=AccountSwitchBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSwitchBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport type { AccountSwitchBlockData } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport TransferLogoCard from '../../../components/TransferLogoCard'\n\nimport type { BlockProps } from '../../types'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { accountSwitchVariant, getLayoutConfig } from './layout'\n\nconst LOGO_SIZE = 64\n\n/**\n * Two institution logos on a transfer track, shared by Discovered Accounts and Switch\n * Direct Deposit. `instance_slot.variant` picks the design branch from `./layout.ts`.\n */\nconst AccountSwitchBlock = ({ payload }: BlockProps<AccountSwitchBlockData>) => {\n const theme = useTheme()\n const { variant } = payload.instance_slot\n const {\n discovered_institution_guid,\n discovered_institution_name,\n held_institution_guid,\n held_institution_name,\n } = payload.instance_slot_data\n\n // Pending connect is the safe default: it promises nothing (no success badge, no confetti).\n const { badgeIcon, badgeIconColor, ...cardProps } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n accountSwitchVariant.AccountConnect,\n 'AccountSwitchBlock',\n )\n\n return (\n <TransferLogoCard\n {...cardProps}\n from={\n <InstitutionLogo\n alt={discovered_institution_name}\n institutionGuid={discovered_institution_guid}\n size={LOGO_SIZE}\n />\n }\n icon={<Icon aria-hidden={true} name={badgeIcon} size={20} sx={{ color: badgeIconColor }} />}\n to={\n <InstitutionLogo\n alt={held_institution_name}\n institutionGuid={held_institution_guid}\n size={LOGO_SIZE}\n />\n }\n />\n )\n}\n\nexport default AccountSwitchBlock\n"],"mappings":";;;;;;;AAYA,IAAM,IAAY,IAMZ,IAAA,CAAsB,EAAE,SAAA,EAAA,MAAkD;AAC9E,QAAM,IAAQ,EAAS,GACjB,EAAE,SAAA,EAAA,IAAY,EAAQ,eACtB,EACJ,6BAAA,GACA,6BAAA,GACA,uBAAA,GACA,uBAAA,EAAA,IACE,EAAQ,oBAGN,EAAE,WAAA,GAAW,gBAAA,GAAgB,GAAG,EAAA,IAAc,EAClD,EAAgB,CAAK,GACrB,GACA,EAAqB,gBACrB,oBACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK;AAAA,MACL,iBAAiB;AAAA,MACjB,MAAM;AAAA,IACP,CAAA;AAAA,IAEH,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAM,eAAa;AAAA,MAAM,MAAM;AAAA,MAAW,MAAM;AAAA,MAAI,IAAI,EAAE,OAAO,EAAe;AAAA,IAAI,CAAA;AAAA,IAC1F,IACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK;AAAA,MACL,iBAAiB;AAAA,MACjB,MAAM;AAAA,IACP,CAAA;AAAA,EAEJ,CAAA;AAEL"}
1
+ {"version":3,"file":"AccountSwitchBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport type { AccountSwitchBlockV2Data } from '../../../../core/types/InsightsInstanceSlotData'\n\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport TransferLogoCard from '../../../components/TransferLogoCard'\n\nimport type { BlockProps } from '../../types'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { accountSwitchVariant, getLayoutConfig } from './layout'\n\nconst LOGO_SIZE = 64\n\n/**\n * Two institution logos on a transfer track, shared by Discovered Accounts and Switch\n * Direct Deposit. `instance_slot.variant` picks the design branch from `./layout.ts`.\n *\n * The logos are the `from_logo` / `to_logo` slots on `instance_slot.data`; `LogoFromGuid` draws\n * nothing for a missing slot or a guid that is not a logo guid (tupac omits `to_logo` when the user\n * holds no FI-managed account).\n */\nconst AccountSwitchBlock = ({ payload }: BlockProps) => {\n const theme = useTheme()\n const { data, variant } = payload.instance_slot\n const { from_logo, to_logo } = (data ?? {}) as AccountSwitchBlockV2Data\n\n // Pending connect is the safe default: it promises nothing (no success badge, no confetti).\n const { badgeIcon, badgeIconColor, ...cardProps } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n accountSwitchVariant.AccountConnect,\n 'AccountSwitchBlock',\n )\n\n return (\n <TransferLogoCard\n {...cardProps}\n from={<LogoFromGuid logo={from_logo} size={LOGO_SIZE} />}\n icon={<Icon aria-hidden={true} name={badgeIcon} size={20} sx={{ color: badgeIconColor }} />}\n to={<LogoFromGuid logo={to_logo} size={LOGO_SIZE} />}\n />\n )\n}\n\nexport default AccountSwitchBlock\n"],"mappings":";;;;;;;AAYA,IAAM,IAAY,IAUZ,IAAA,CAAsB,EAAE,SAAA,EAAA,MAA0B;AACtD,QAAM,IAAQ,EAAS,GACjB,EAAE,MAAA,GAAM,SAAA,EAAA,IAAY,EAAQ,eAC5B,EAAE,WAAA,GAAW,SAAA,EAAA,IAAa,KAAQ,CAAC,GAGnC,EAAE,WAAA,GAAW,gBAAA,GAAgB,GAAG,EAAA,IAAc,EAClD,EAAgB,CAAK,GACrB,GACA,EAAqB,gBACrB,oBACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAc,MAAM;AAAA,MAAW,MAAM;AAAA,IAAY,CAAA;AAAA,IACvD,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAM,eAAa;AAAA,MAAM,MAAM;AAAA,MAAW,MAAM;AAAA,MAAI,IAAI,EAAE,OAAO,EAAe;AAAA,IAAI,CAAA;AAAA,IAC1F,IAAI,gBAAA,EAAC,GAAD;AAAA,MAAc,MAAM;AAAA,MAAS,MAAM;AAAA,IAAY,CAAA;AAAA,EACpD,CAAA;AAEL"}
@@ -1,28 +1,37 @@
1
- import { slot as d } from "../../../../core/types/Insights.es.js";
2
- import f from "../../../components/LogoFromGuid.es.js";
3
- import { resolveVariantConfig as g } from "../../resolveVariantConfig.es.js";
4
- import p from "../../../components/DirectDepositCard.es.js";
5
- import { detailedAccountVariant as _, getLayoutConfig as v } from "./layout.es.js";
6
- import { jsx as i } from "react/jsx-runtime";
7
- import { useTheme as D } from "@mui/material/styles";
8
- var k = ({ payload: e }) => {
9
- const a = D(), { account_name: r, account_type: n, data: u, institution_guid: t, institution_name: m, status_text: s, variant: l } = e.instance_slot, o = d(u, "logo") ?? (t ? {
10
- alt: m ?? t,
11
- guid: t
12
- } : void 0), c = g(v(a), l, _.Neutral, "DetailedAccountBlock");
13
- return /* @__PURE__ */ i(p, {
14
- ...c,
15
- logo: o?.guid ? /* @__PURE__ */ i(f, {
16
- logo: o,
1
+ import { buildDynamicCopy as l } from "../../../../core/utils/Localization.es.js";
2
+ import { GlobalDataContext as u } from "../../../../common/context/GlobalDataProvider.es.js";
3
+ import { slot as s } from "../../../../core/types/Insights.es.js";
4
+ import c from "../../../components/LogoFromGuid.es.js";
5
+ import { resolveVariantConfig as d } from "../../resolveVariantConfig.es.js";
6
+ import g from "../../../components/DirectDepositCard.es.js";
7
+ import { detailedAccountVariant as p, getLayoutConfig as f } from "./layout.es.js";
8
+ import { useContext as _ } from "react";
9
+ import { jsx as m } from "react/jsx-runtime";
10
+ import { useTheme as v } from "@mui/material/styles";
11
+ var n = (o, r) => s(o.data, r) ?? o[r], y = (o, r) => {
12
+ const t = s(o.data, "logo"), e = n(o, "institution_guid"), a = t?.alt ?? n(o, "institution_name"), i = t ?? (e ? {
13
+ guid: e,
14
+ alt: a ?? e
15
+ } : void 0);
16
+ return !i || !a ? i : {
17
+ ...i,
18
+ alt: r ? l(r, a) : a
19
+ };
20
+ }, G = ({ payload: o }) => {
21
+ const r = v(), { instance_slot: t } = o, e = _(u)?.globalStore.copyStore.copy.insights_feed?.general?.institution_Logo, a = y(t, e), i = d(f(r), t.variant, p.Neutral, "DetailedAccountBlock");
22
+ return /* @__PURE__ */ m(g, {
23
+ ...i,
24
+ logo: a?.guid ? /* @__PURE__ */ m(c, {
25
+ logo: a,
17
26
  size: 48
18
27
  }) : null,
19
- name: r,
20
- statusLabel: s,
21
- subtitle: n
28
+ name: n(t, "account_name"),
29
+ statusLabel: n(t, "status_text"),
30
+ subtitle: n(t, "account_type")
22
31
  });
23
32
  };
24
33
  export {
25
- k as default
34
+ G as default
26
35
  };
27
36
 
28
37
  //# sourceMappingURL=DetailedAccountBlock.es.js.map