@mx-cartographer/experiences 9.7.159 → 9.7.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/common/components/CurrencyDialog.d.ts +11 -1
- package/dist/common/components/CurrencyDialog.es.js +50 -44
- package/dist/common/components/CurrencyDialog.es.js.map +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -0
- package/dist/common/components/ErrorBoundary.es.js +1 -1
- package/dist/common/components/ErrorBoundary.es.js.map +1 -1
- package/dist/common/components/index.d.ts +1 -1
- package/dist/core/types/localization/InsightsFeedCopy.d.ts +8 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js +39 -39
- package/dist/insights-v2/actionBlocks/AccountListBlock/AccountListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AccountListBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js +40 -35
- package/dist/insights-v2/actionBlocks/ActionBlockLayer.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +91 -91
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.d.ts +42 -2
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js +75 -15
- package/dist/insights-v2/actionBlocks/AmountInputModalBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +73 -74
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js +20 -21
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/CreditUtilizationBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js +36 -38
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js +29 -30
- package/dist/insights-v2/actionBlocks/OverdraftBlock/OverdraftBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/OverdraftBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +60 -59
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +20 -20
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/PlaceholderActionBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js +3 -3
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.d.ts +2 -0
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js +36 -36
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/RemainingCashBlock/index.d.ts +1 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.d.ts +2 -1
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +77 -76
- package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +64 -59
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.d.ts +11 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js +138 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListCreditLimitHeader.es.js.map +1 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +13 -0
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +80 -63
- package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/actionBlocks/useRequiredCopy.d.ts +3 -0
- package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js +11 -0
- package/dist/insights-v2/actionBlocks/useRequiredCopy.es.js.map +1 -0
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +14 -14
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +9 -2
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +14 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.d.ts +7 -1
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js +14 -7
- package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/utils.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js +1 -1
- package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +4 -4
- package/dist/insights-v2/components/CompactInsightCard.es.js +164 -138
- package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
- package/dist/insights-v2/mappings/blocks.d.ts +1 -0
- package/dist/insights-v2/mappings/blocks.es.js +190 -178
- package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { useGlobalStore, useInsightsV2Store } from '../../common'\nimport { TinyBarChart } from '../../common/components/TinyBarChart'\nimport { slot } from '../../core'\nimport type {\n Beat,\n DataSeries,\n InsightsPayload,\n InstanceSlotData,\n InstanceSlotRow,\n LogoRef,\n PrimaryCTA,\n} from '../../core'\nimport type { ActionDrawerTrigger } from '../../core/stores'\nimport type { AccountSwitchBlockV2Data } from '../../core/types/InsightsInstanceSlotData'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\nimport {\n BAR_ARIA_LABEL,\n buildChartData,\n buildDataSeries,\n} from '../blocks/ChartBlocks/BarchartBlock/utils'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport { postCtaMessage } from '../ctaActions'\nimport { asLogoRef, asNonEmptyText, asNumber } from '../blocks/slotReaders'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport { ReactComponent as FeeDetectedIllustration } from './shared/images/FeeDetected.svg'\nimport { ThemedSVGImage } from './chartblocks/ThemedSVGImage'\nimport StatusBadge from './StatusBadge'\n\nconst DESCRIPTION_MAX_LINES = 2\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The slot's `logo`, when ditto's variant declares and fills one. */\n logo?: LogoRef | null\n /** The slot's whole `data`, for a visual drawn from more than the logo (`category_color`, `linked_logos`). */\n data?: InstanceSlotData\n /** The envelope's template, for a beat's own badge on `linked_logos`. */\n template?: string\n}\n\n// Figma 1943:219189: 36px logos at opposite corners of a 75×74 box, the badge and rings centred.\nconst LINKED_LOGO_SIZE = 36\nconst LINKED_BOX_WIDTH = 75\nconst LINKED_BOX_HEIGHT = 74\n\nconst CENTRED = {\n left: '50%',\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n} as const\n\n/** Figma 222:33404 (Embedded | Bill Amount Not Standard) shows the latest three bars. */\nconst BAR_CHART_BAR_COUNT = 3\n\nconst EMBEDDED_BAR_CHART_HEIGHT = 54\nconst EMBEDDED_BAR_CHART_WIDTH = 75\n\n/** The slot's logo, or the neutral insight glyph when the slot carries none. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `with_warning_badge`: the logo badged with a status glyph (Figma 1941:111897). */\nconst WarningBadgeVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\nconst STACKED_LOGO_SIZE = 24\n\n/** ditto `stacked_logos`: the row logo twice, plus an error badge. The copy is `aria-hidden`, so the logo is named once. */\nconst StackedLogosVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n bottomLeft={\n logo ? (\n <Box\n aria-hidden={true}\n sx={{\n borderRadius: '6px',\n display: 'flex',\n outline: '2px solid',\n outlineColor: 'background.paper',\n overflow: 'hidden',\n }}\n >\n <LogoFromGuid logo={{ ...logo, alt: undefined }} size={STACKED_LOGO_SIZE} />\n </Box>\n ) : undefined\n }\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"error\" />}\n />\n)\n\n/**\n * ditto `with_illustration`: artwork in place of the logo tile (Fee Detected's search illustration).\n * A single SVG themed at runtime by `ThemedSVGImage`: its `brand300` elements are recolored to the\n * theme's `primary.main` (so it follows dark mode), while `fill=\"white\"` areas stay white. The\n * slot's `logo` is deliberately unused: the illustration replaces the tile.\n */\nconst IllustrationVisual = () => {\n return (\n <ThemedSVGImage\n divProps={{ style: { flexShrink: 0, lineHeight: 0, width: 'max-content' } }}\n image={FeeDetectedIllustration}\n />\n )\n}\n\nconst SWAP_BADGE_SIZE = 24\n\nconst LinkBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.main',\n border: '2px solid',\n borderColor: 'primary.contrastText',\n borderRadius: '12px',\n display: 'flex',\n justifyContent: 'center',\n p: 2,\n zIndex: 1,\n }}\n >\n <Icon name=\"link\" size={16} sx={{ color: 'primary.contrastText' }} />\n </Box>\n)\n\n/**\n * Switch Direct Deposit (Figma 1941:167601): the outlined `swap_vertical_circle`, turned horizontal,\n * over a contrast disc: a primary ring and arrows on white. Drawn 1.2× so its circle fills 24px.\n */\nconst SwapBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.contrastText',\n borderRadius: '50%',\n display: 'flex',\n height: SWAP_BADGE_SIZE,\n justifyContent: 'center',\n overflow: 'hidden',\n width: SWAP_BADGE_SIZE,\n zIndex: 1,\n }}\n >\n <Icon\n name=\"swap_vertical_circle\"\n size={SWAP_BADGE_SIZE * 1.2}\n sx={{ color: 'primary.main', flexShrink: 0, transform: 'rotate(-90deg)' }}\n />\n </Box>\n)\n\n/**\n * ditto `linked_logos` (Figma 1943:219189, Embedded | Discovered Accounts): the two institutions at\n * opposite corners of a 75×74 box — `from_logo` top-left, `to_logo` bottom-right — meeting on the\n * diagonal, with a badge over two rings at the centre (Switch Direct Deposit: the swap badge on an\n * outlined inner ring). The rings and badge are decorative (`aria-hidden`); each logo's accessible\n * name is its `alt`.\n */\nconst LinkedLogosVisual = ({ data, template }: InsightVisualProps) => {\n const { from_logo, to_logo } = (data ?? {}) as AccountSwitchBlockV2Data\n const isSwap = template === 'SwitchDirectDeposit'\n\n return (\n <Box\n sx={{\n flexShrink: 0,\n height: LINKED_BOX_HEIGHT,\n position: 'relative',\n width: LINKED_BOX_WIDTH,\n }}\n >\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n borderRadius: '50%',\n height: 36,\n width: 36,\n ...(isSwap\n ? { border: '2px solid', borderColor: 'primary.light' }\n : { bgcolor: 'primary.light' }),\n }}\n />\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '50%',\n height: 48,\n width: 48,\n }}\n />\n <Box sx={{ borderRadius: '4px', left: 0, overflow: 'hidden', position: 'absolute', top: 0 }}>\n <LogoFromGuid logo={from_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n <Box\n sx={{ borderRadius: '4px', bottom: 0, overflow: 'hidden', position: 'absolute', right: 0 }}\n >\n <LogoFromGuid logo={to_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n {isSwap ? <SwapBadge /> : <LinkBadge />}\n </Box>\n )\n}\n\n/**\n * ditto `category_color`: a tiny bar chart of the latest bars in place of the logo tile, tinted by\n * the slot's category, the newest bar solid (Figma 222:33404). Draws nothing without a series.\n */\nconst BarChartVisual = ({ data }: InsightVisualProps) => {\n const series = buildDataSeries(slot<DataSeries>(data, 'series'))\n if (!series.length) return null\n\n const categoryGuid = slot<string>(data, 'category_guid')\n const bars = buildChartData(series, BAR_ARIA_LABEL).slice(-BAR_CHART_BAR_COUNT)\n\n return (\n <Box data-testid=\"compact-insight-card-bar-chart\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) =>\n categoryGuid ? getCategoryColor(categoryGuid, theme) : theme.palette.primary.main\n }\n data={bars}\n height={EMBEDDED_BAR_CHART_HEIGHT}\n width={EMBEDDED_BAR_CHART_WIDTH}\n />\n </Box>\n )\n}\n\nconst COMPARISON_WIDTH = 75\nconst COMPARISON_HEIGHT = 50\n\nconst asComparisonBar = (row: InstanceSlotRow | undefined) => {\n const label = asNonEmptyText(row?.primary_text)\n const value = asNumber(row?.amount)\n if (label === undefined || value === undefined) return undefined\n const formattedAmount = formatCurrency(value, CURRENCY_FORMAT.cents)\n return { ariaLabel: `${label}: ${formattedAmount}`, formattedAmount, label, value }\n}\n\n/**\n * ditto `compact_comparison` (Subscription Price Increase, Figma 1286:25608): the previous and new amounts as two labelled bars,\n * the new one solid, in the full card's progress-bar colour. Draws nothing without two distinct labelled rows.\n */\nconst ComparisonVisual = ({ data }: InsightVisualProps) => {\n const series = slot<InstanceSlotRow[]>(data, 'compact_series')\n const [previous, latest] = (Array.isArray(series) ? series.slice(0, 2) : []).map(asComparisonBar)\n // Equal labels share one band on the chart's x axis, so the bars would overlap.\n if (!previous || !latest || previous.label === latest.label) return null\n const bars = [previous, latest]\n\n return (\n <Box data-testid=\"compact-insight-card-comparison\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) => theme.palette.warning.main}\n data={bars}\n height={COMPARISON_HEIGHT}\n width={COMPARISON_WIDTH}\n />\n </Box>\n )\n}\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight or a surface — `with_header` already serves\n * both Large Transaction and Fee Detected — so an insight wanting the badged logo reuses\n * `with_warning_badge`. Only a genuinely different visual registers a new entry, and existing ones\n * are never touched.\n *\n * `minimal` draws the plain logo and is registered explicitly even though it matches the fallback:\n * micro and notification resolve it on every render, and an unregistered variant warns. The\n * fallback is for variants we genuinely do not know.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: {\n category_color: BarChartVisual,\n compact_comparison: ComparisonVisual,\n linked_logos: LinkedLogosVisual,\n minimal: PlainVisual,\n stacked_logos: StackedLogosVisual,\n with_illustration: IllustrationVisual,\n with_warning_badge: WarningBadgeVisual,\n },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\n/**\n * Beats whose embedded CTA the card reads from its own envelope key and opens in this card's\n * `ActionBlockLayer`, as a bar click does on the full card. The trigger names that key, so the layer\n * resolves the same CTA. Without a trigger the link posts its host message instead (Switch Direct\n * Deposit's op_1: Atomic runs only in pulse). Every other beat keeps `primary_cta` and hands it to\n * the host's `onCtaClick` (e.g. `contact_support_block`). A new beat adds its template here.\n */\nconst BEAT_CTA_CONFIG: Record<\n string,\n { key: 'primary_cta' | 'in_description_cta'; trigger?: ActionDrawerTrigger }\n> = {\n BillAmountNotStandard: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n ConnectDiscoveredAccountsV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n DuplicatePaymentV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n SwitchDirectDeposit: { key: 'in_description_cta' },\n}\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /** The envelope's beat; when given, the card mounts its `ActionBlockLayer` for CTA drawers. */\n beat?: Beat\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the slot's `logo` in a\n * `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under\n * `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n beat,\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const stores = useGlobalStore()\n const { openActionDrawer } = useInsightsV2Store()\n const { description, instance_slot, primary_cta, title } = payload\n const beatCta = BEAT_CTA_CONFIG[payload.template ?? '']\n const cta = beatCta ? payload[beatCta.key] : primary_cta\n const message = payload.in_description_cta?.post_message_metadata\n // A link that posts needs its beat and message; without them it draws nothing.\n const canAct = !beatCta || !!beatCta.trigger || (!!beat && !!message)\n // Reduced variants (`minimal`, `with_warning_badge`) declare a bare `logo` slot.\n const rowLogo = asLogoRef(slot(instance_slot.data, 'logo'))\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !cta) return\n\n if (beatCta) {\n if (beat && beatCta.trigger) openActionDrawer({ guid: beat.guid, trigger: beatCta.trigger })\n else if (beat && message) {\n const { action, ...extras } = message\n postCtaMessage({ beat, stores }, { action, payload: extras })\n }\n return\n }\n if (primary_cta) onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <>\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{\n minWidth: 288,\n pb: 12,\n pl: 8,\n pr: 16,\n pt: 8,\n ...(onTap && { cursor: 'pointer' }),\n }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, pl: 8 }}>\n <Stack sx={{ alignSelf: 'stretch', flex: 1, gap: 8, minWidth: 0, pt: 2 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n sx={{\n display: '-webkit-box',\n fontWeight: 'fontWeightRegular',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: DESCRIPTION_MAX_LINES,\n }}\n variant=\"subtitle2\"\n />\n {cta?.label && canAct && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // The label lines up with the description (the column pads 8; the tap target keeps\n // its padding). `my: 0` drops the theme's -12px text-button margin.\n ml: -8,\n my: 0,\n px: 8,\n ...(isCtaDisabled && {\n color: 'text.disabled',\n cursor: 'default',\n }),\n }}\n variant=\"text\"\n >\n <Text bold={true} variant=\"body2\">\n {cta.label}\n </Text>\n </Button>\n )}\n </Stack>\n\n <InsightVisual\n data={instance_slot.data}\n logo={rowLogo}\n template={payload.template}\n variant={instance_slot.variant}\n />\n </Stack>\n </Card>\n {/* Outside the Card: the drawer is a portal, and its clicks would otherwise bubble to `onTap`. */}\n {beat && <ActionBlockLayer beat={beat} />}\n </>\n )\n}\n\nexport default CompactInsightCard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAM,KAAwB,GAGxB,IAAY,IAYZ,IAAmB,IACnB,KAAmB,IACnB,KAAoB,IAEpB,IAAU;AAAA,EACd,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AAAA,EACL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AA,YACJ,GAAI,KAAiB;AAAA,cACnB,OAAO;AAAA,cACP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,UAER,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,SAAQ;AAAA,YACvB,UAAA,EAAI;AAAA,UACD,CAAA;AAAA,QACA,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,IAAD;AAAA,QACE,MAAM,EAAc;AAAA,QACpB,MAAM;AAAA,QACN,UAAU,EAAQ;AAAA,QAClB,SAAS,EAAc;AAAA,MACxB,CAAA,CACI;AAAA,IACH,CAAA,CAAA;AAAA,EAEL,CAAA,GAAA,KAAQ,gBAAA,EAAC,GAAD,EAAwB,MAAA,EAAO,CAAA,CACxC,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { useGlobalStore, useInsightsV2Store } from '../../common'\nimport { TinyBarChart } from '../../common/components/TinyBarChart'\nimport { slot } from '../../core'\nimport type {\n Beat,\n DataSeries,\n InsightsPayload,\n InstanceSlotData,\n InstanceSlotRow,\n LogoRef,\n PrimaryCTA,\n} from '../../core'\nimport type { ActionDrawerTrigger } from '../../core/stores'\nimport type { AccountSwitchBlockV2Data } from '../../core/types/InsightsInstanceSlotData'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\nimport {\n BAR_ARIA_LABEL,\n buildChartData,\n buildDataSeries,\n} from '../blocks/ChartBlocks/BarchartBlock/utils'\nimport DonutChartV2 from '../blocks/ChartBlocks/DonutChartBlock/DonutChart'\nimport { donutChartVariant } from '../blocks/ChartBlocks/DonutChartBlock/layout'\nimport { getDonutSegments } from '../blocks/ChartBlocks/DonutChartBlock/utils'\nimport { formatValueByType } from '../CommonUtils'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport { postCtaMessage } from '../ctaActions'\nimport { asLogoRef, asNonEmptyText, asNumber } from '../blocks/slotReaders'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport { ReactComponent as FeeDetectedIllustration } from './shared/images/FeeDetected.svg'\nimport { ThemedSVGImage } from './chartblocks/ThemedSVGImage'\nimport StatusBadge from './StatusBadge'\n\nconst DESCRIPTION_MAX_LINES = 2\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The slot's `logo`, when ditto's variant declares and fills one. */\n logo?: LogoRef | null\n /** The slot's whole `data`, for a visual drawn from more than the logo (`category_color`, `linked_logos`). */\n data?: InstanceSlotData\n /** The envelope's template, for a beat's own badge on `linked_logos`. */\n template?: string\n}\n\n// Figma 1943:219189: 36px logos at opposite corners of a 75×74 box, the badge and rings centred.\nconst LINKED_LOGO_SIZE = 36\nconst LINKED_BOX_WIDTH = 75\nconst LINKED_BOX_HEIGHT = 74\n\nconst CENTRED = {\n left: '50%',\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n} as const\n\n/** Figma 222:33404 (Embedded | Bill Amount Not Standard) shows the latest three bars. */\nconst BAR_CHART_BAR_COUNT = 3\n\nconst EMBEDDED_BAR_CHART_HEIGHT = 54\nconst EMBEDDED_BAR_CHART_WIDTH = 75\n\n/** The slot's logo, or the neutral insight glyph when the slot carries none. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `with_warning_badge`: the logo badged with a status glyph (Figma 1941:111897). */\nconst WarningBadgeVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\nconst STACKED_LOGO_SIZE = 24\n\n/** ditto `stacked_logos`: the row logo twice, plus an error badge. The copy is `aria-hidden`, so the logo is named once. */\nconst StackedLogosVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n bottomLeft={\n logo ? (\n <Box\n aria-hidden={true}\n sx={{\n borderRadius: '6px',\n display: 'flex',\n outline: '2px solid',\n outlineColor: 'background.paper',\n overflow: 'hidden',\n }}\n >\n <LogoFromGuid logo={{ ...logo, alt: undefined }} size={STACKED_LOGO_SIZE} />\n </Box>\n ) : undefined\n }\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"error\" />}\n />\n)\n\n/**\n * ditto `with_illustration`: artwork in place of the logo tile (Fee Detected's search illustration).\n * A single SVG themed at runtime by `ThemedSVGImage`: its `brand300` elements are recolored to the\n * theme's `primary.main` (so it follows dark mode), while `fill=\"white\"` areas stay white. The\n * slot's `logo` is deliberately unused: the illustration replaces the tile.\n */\nconst IllustrationVisual = () => {\n return (\n <ThemedSVGImage\n divProps={{ style: { flexShrink: 0, lineHeight: 0, width: 'max-content' } }}\n image={FeeDetectedIllustration}\n />\n )\n}\n\nconst SWAP_BADGE_SIZE = 24\n\nconst LinkBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.main',\n border: '2px solid',\n borderColor: 'primary.contrastText',\n borderRadius: '12px',\n display: 'flex',\n justifyContent: 'center',\n p: 2,\n zIndex: 1,\n }}\n >\n <Icon name=\"link\" size={16} sx={{ color: 'primary.contrastText' }} />\n </Box>\n)\n\n/**\n * Switch Direct Deposit (Figma 1941:167601): the outlined `swap_vertical_circle`, turned horizontal,\n * over a contrast disc: a primary ring and arrows on white. Drawn 1.2× so its circle fills 24px.\n */\nconst SwapBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.contrastText',\n borderRadius: '50%',\n display: 'flex',\n height: SWAP_BADGE_SIZE,\n justifyContent: 'center',\n overflow: 'hidden',\n width: SWAP_BADGE_SIZE,\n zIndex: 1,\n }}\n >\n <Icon\n name=\"swap_vertical_circle\"\n size={SWAP_BADGE_SIZE * 1.2}\n sx={{ color: 'primary.main', flexShrink: 0, transform: 'rotate(-90deg)' }}\n />\n </Box>\n)\n\n/**\n * ditto `linked_logos` (Figma 1943:219189, Embedded | Discovered Accounts): the two institutions at\n * opposite corners of a 75×74 box — `from_logo` top-left, `to_logo` bottom-right — meeting on the\n * diagonal, with a badge over two rings at the centre (Switch Direct Deposit: the swap badge on an\n * outlined inner ring). The rings and badge are decorative (`aria-hidden`); each logo's accessible\n * name is its `alt`.\n */\nconst LinkedLogosVisual = ({ data, template }: InsightVisualProps) => {\n const { from_logo, to_logo } = (data ?? {}) as AccountSwitchBlockV2Data\n const isSwap = template === 'SwitchDirectDeposit'\n\n return (\n <Box\n sx={{\n flexShrink: 0,\n height: LINKED_BOX_HEIGHT,\n position: 'relative',\n width: LINKED_BOX_WIDTH,\n }}\n >\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n borderRadius: '50%',\n height: 36,\n width: 36,\n ...(isSwap\n ? { border: '2px solid', borderColor: 'primary.light' }\n : { bgcolor: 'primary.light' }),\n }}\n />\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '50%',\n height: 48,\n width: 48,\n }}\n />\n <Box sx={{ borderRadius: '4px', left: 0, overflow: 'hidden', position: 'absolute', top: 0 }}>\n <LogoFromGuid logo={from_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n <Box\n sx={{ borderRadius: '4px', bottom: 0, overflow: 'hidden', position: 'absolute', right: 0 }}\n >\n <LogoFromGuid logo={to_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n {isSwap ? <SwapBadge /> : <LinkBadge />}\n </Box>\n )\n}\n\n/**\n * ditto `category_color`: a tiny bar chart of the latest bars in place of the logo tile, tinted by\n * the slot's category, the newest bar solid (Figma 222:33404). Draws nothing without a series.\n */\nconst BarChartVisual = ({ data }: InsightVisualProps) => {\n const series = buildDataSeries(slot<DataSeries>(data, 'series'))\n if (!series.length) return null\n\n const categoryGuid = slot<string>(data, 'category_guid')\n const bars = buildChartData(series, BAR_ARIA_LABEL).slice(-BAR_CHART_BAR_COUNT)\n\n return (\n <Box data-testid=\"compact-insight-card-bar-chart\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) =>\n categoryGuid ? getCategoryColor(categoryGuid, theme) : theme.palette.primary.main\n }\n data={bars}\n height={EMBEDDED_BAR_CHART_HEIGHT}\n width={EMBEDDED_BAR_CHART_WIDTH}\n />\n </Box>\n )\n}\n\n/** ditto `with_donut`: the `credit_limit` donut, small, with no legend; another beat needs its own variant. */\nconst DonutVisual = ({ data }: InsightVisualProps) => {\n const theme = useTheme()\n const main = slot<{ label?: unknown; value?: unknown; value_type?: unknown }>(data, 'main')\n const legends = slot<{ value?: unknown }[]>(data, 'legends')\n const centre = asNumber(main?.value)\n const values = (Array.isArray(legends) ? legends : []).map((legend) => asNumber(legend?.value))\n if (centre === undefined || values.length !== 2 || values.some((v) => v === undefined))\n return null\n\n const { colors, arcs } = getDonutSegments(\n donutChartVariant.CreditLimit,\n {},\n values.map((value) => ({ value: value as number })),\n theme,\n )\n const valueType = typeof main?.value_type === 'string' ? main.value_type : 'amount'\n\n return (\n <Box data-testid=\"compact-insight-card-donut\" sx={{ flexShrink: 0 }}>\n <DonutChartV2\n centerLabel={asNonEmptyText(main?.label)}\n centerValue={formatValueByType(centre, valueType, CURRENCY_FORMAT.whole)}\n data={arcs.map((value, index) => ({ color: colors[index], value }))}\n />\n </Box>\n )\n}\n\nconst COMPARISON_WIDTH = 75\nconst COMPARISON_HEIGHT = 50\n\nconst asComparisonBar = (row: InstanceSlotRow | undefined) => {\n const label = asNonEmptyText(row?.primary_text)\n const value = asNumber(row?.amount)\n if (label === undefined || value === undefined) return undefined\n const formattedAmount = formatCurrency(value, CURRENCY_FORMAT.cents)\n return { ariaLabel: `${label}: ${formattedAmount}`, formattedAmount, label, value }\n}\n\n/**\n * ditto `compact_comparison` (Subscription Price Increase, Figma 1286:25608): the previous and new amounts as two labelled bars,\n * the new one solid, in the full card's progress-bar colour. Draws nothing without two distinct labelled rows.\n */\nconst ComparisonVisual = ({ data }: InsightVisualProps) => {\n const series = slot<InstanceSlotRow[]>(data, 'compact_series')\n const [previous, latest] = (Array.isArray(series) ? series.slice(0, 2) : []).map(asComparisonBar)\n // Equal labels share one band on the chart's x axis, so the bars would overlap.\n if (!previous || !latest || previous.label === latest.label) return null\n const bars = [previous, latest]\n\n return (\n <Box data-testid=\"compact-insight-card-comparison\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) => theme.palette.warning.main}\n data={bars}\n height={COMPARISON_HEIGHT}\n width={COMPARISON_WIDTH}\n />\n </Box>\n )\n}\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight or a surface — `with_header` already serves\n * both Large Transaction and Fee Detected — so an insight wanting the badged logo reuses\n * `with_warning_badge`. Only a genuinely different visual registers a new entry, and existing ones\n * are never touched.\n *\n * `minimal` draws the plain logo and is registered explicitly even though it matches the fallback:\n * micro and notification resolve it on every render, and an unregistered variant warns. The\n * fallback is for variants we genuinely do not know.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: {\n category_color: BarChartVisual,\n compact_comparison: ComparisonVisual,\n linked_logos: LinkedLogosVisual,\n minimal: PlainVisual,\n stacked_logos: StackedLogosVisual,\n with_donut: DonutVisual,\n with_illustration: IllustrationVisual,\n with_warning_badge: WarningBadgeVisual,\n },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\n/**\n * Beats whose embedded CTA the card reads from its own envelope key and opens in this card's\n * `ActionBlockLayer`, as a bar click does on the full card. The trigger names that key, so the layer\n * resolves the same CTA. Without a trigger the link posts its host message instead (Switch Direct\n * Deposit's op_1: Atomic runs only in pulse). Every other beat keeps `primary_cta` and hands it to\n * the host's `onCtaClick` (e.g. `contact_support_block`). A new beat adds its template here.\n */\nconst BEAT_CTA_CONFIG: Record<\n string,\n { key: 'primary_cta' | 'in_description_cta'; trigger?: ActionDrawerTrigger }\n> = {\n BillAmountNotStandard: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n CreditCardCloseToLimit: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n ConnectDiscoveredAccountsV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n DuplicatePaymentV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n SwitchDirectDeposit: { key: 'in_description_cta' },\n}\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /** The envelope's beat; when given, the card mounts its `ActionBlockLayer` for CTA drawers. */\n beat?: Beat\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the slot's `logo` in a\n * `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under\n * `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n beat,\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const stores = useGlobalStore()\n const { openActionDrawer } = useInsightsV2Store()\n const { description, instance_slot, primary_cta, title } = payload\n const beatCta = BEAT_CTA_CONFIG[payload.template ?? '']\n const cta = beatCta ? payload[beatCta.key] : primary_cta\n const message = payload.in_description_cta?.post_message_metadata\n // A link that posts needs its beat and message; without them it draws nothing.\n const canAct = !beatCta || !!beatCta.trigger || (!!beat && !!message)\n // Reduced variants (`minimal`, `with_warning_badge`) declare a bare `logo` slot.\n const rowLogo = asLogoRef(slot(instance_slot.data, 'logo'))\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !cta) return\n\n if (beatCta) {\n if (beat && beatCta.trigger) openActionDrawer({ guid: beat.guid, trigger: beatCta.trigger })\n else if (beat && message) {\n const { action, ...extras } = message\n postCtaMessage({ beat, stores }, { action, payload: extras })\n }\n return\n }\n if (primary_cta) onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <>\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{\n minWidth: 288,\n pb: 12,\n pl: 8,\n pr: 16,\n pt: 8,\n ...(onTap && { cursor: 'pointer' }),\n }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, pl: 8 }}>\n <Stack sx={{ alignSelf: 'stretch', flex: 1, gap: 8, minWidth: 0, pt: 2 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n sx={{\n display: '-webkit-box',\n fontWeight: 'fontWeightRegular',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: DESCRIPTION_MAX_LINES,\n }}\n variant=\"subtitle2\"\n />\n {cta?.label && canAct && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // The label lines up with the description (the column pads 8; the tap target keeps\n // its padding). `my: 0` drops the theme's -12px text-button margin.\n ml: -8,\n my: 0,\n px: 8,\n ...(isCtaDisabled && {\n color: 'text.disabled',\n cursor: 'default',\n }),\n }}\n variant=\"text\"\n >\n <Text bold={true} variant=\"body2\">\n {cta.label}\n </Text>\n </Button>\n )}\n </Stack>\n\n <InsightVisual\n data={instance_slot.data}\n logo={rowLogo}\n template={payload.template}\n variant={instance_slot.variant}\n />\n </Stack>\n </Card>\n {/* Outside the Card: the drawer is a portal, and its clicks would otherwise bubble to `onTap`. */}\n {beat && <ActionBlockLayer beat={beat} />}\n </>\n )\n}\n\nexport default CompactInsightCard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,IAAM,KAAwB,GAGxB,IAAY,IAYZ,IAAmB,IACnB,KAAmB,IACnB,KAAoB,IAEpB,IAAU;AAAA,EACd,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AAAA,EACL,WAAW;AACb,GAKM,KAA4B,IAC5B,KAA2B,IAG3B,IAAA,CAAkB,EAAE,MAAA,EAAA,MACxB,IACE,gBAAA,EAAC,GAAD;AAAA,EAAoB,MAAA;AAAA,EAAM,MAAM;AAAY,CAAA,IAE5C,gBAAA,EAAC,GAAD;AAAA,EACE,eAAY;AAAA,EACZ,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,OAAO;AAAA,EACT;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAAM,OAAM;AAAA,IAAU,MAAM;AAAA,IAAM,MAAK;AAAA,IAAY,MAAM;AAAA,EAAK,CAAA;AAC3D,CAAA,GAIH,IAAA,CAAe,EAAE,MAAA,EAAA,MACrB,gBAAA,EAAC,GAAD;AAAA,EAAY,QAAQ,gB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,EAAC,IAAD;AAAA,UACE,yBAAyB,EAAE,QAAQ,EAAY,UAAU;AAAA,UACzD,eAAY;AAAA,UACZ,IAAI;AAAA,YACF,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,iBAAiB;AAAA,YACjB,iBAAiB;AAAA,UACnB;AAAA,UACA,SAAQ;AAAA,QACT,CAAA,GACA,GAAK,SAAS,KACb,gBAAA,EAAC,IAAD;AAAA,UACE,iBAAe;AAAA,UACf,SAAS;AAAA,UACT,MAAK;AAAA,UACL,IAAI;AAAA,YACF,WAAW;AAAA,YAGX,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,GAAI,KAAiB;AAAA,cACnB,OAAO;AAAA,cACP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,UAER,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,SAAQ;AAAA,YACvB,UAAA,EAAI;AAAA,UACD,CAAA;AAAA,QACA,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,IAAD;AAAA,QACE,MAAM,EAAc;AAAA,QACpB,MAAM;AAAA,QACN,UAAU,EAAQ;AAAA,QAClB,SAAS,EAAc;AAAA,MACxB,CAAA,CACI;AAAA,IACH,CAAA,CAAA;AAAA,EAEL,CAAA,GAAA,KAAQ,gBAAA,EAAC,IAAD,EAAwB,MAAA,EAAO,CAAA,CACxC,EAAA,CAAA;AAEN"}
|
|
@@ -7,6 +7,7 @@ export interface ActionBlockEntry {
|
|
|
7
7
|
Component: React.ComponentType<ActionBlockProps>;
|
|
8
8
|
usePrepare: (props: ActionBlockProps) => void;
|
|
9
9
|
title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string;
|
|
10
|
+
copy?: (copy: GlobalCopy) => unknown;
|
|
10
11
|
presentation?: 'drawer' | 'modal';
|
|
11
12
|
headerAction?: 'back' | 'close';
|
|
12
13
|
}
|
|
@@ -1,245 +1,257 @@
|
|
|
1
|
-
import { buildDynamicCopy as
|
|
2
|
-
import { ContactSupportActionBlock as
|
|
3
|
-
import { resolveBudgetSubject as
|
|
4
|
-
import { hasDrawerBlock as
|
|
1
|
+
import { buildDynamicCopy as f } from "../../core/utils/Localization.es.js";
|
|
2
|
+
import { ContactSupportActionBlock as k } from "../actionBlocks/ContactSupportActionBlock.es.js";
|
|
3
|
+
import { resolveBudgetSubject as A } from "../actionBlocks/BudgetDetailsBlock/layout.es.js";
|
|
4
|
+
import { hasDrawerBlock as ho } from "./hasDrawerBlock.es.js";
|
|
5
5
|
import { actionBlocksKey as t } from "./actionBlocksKey.es.js";
|
|
6
|
-
import { BarchartBlock as
|
|
7
|
-
import { DoubleBarChartBlock as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { BudgetBlock as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { TransactionBlock as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { SVGImageBlock as
|
|
31
|
-
import { FeedbackModalActionBlock as
|
|
32
|
-
import { ConnectionDetailActionBlock as
|
|
33
|
-
import { ConnectWidgetActionBlock as
|
|
34
|
-
import { getDrawerHeaderTitle as
|
|
35
|
-
import { SurveyModalActionBlock as
|
|
36
|
-
import { SubscriptionStatusModalBlock as
|
|
37
|
-
import { PlaceholderActionBlock as
|
|
38
|
-
import { getMakeTransferDrawerTitle as
|
|
39
|
-
import { MakeTransferActionBlockLayer as
|
|
40
|
-
import { TransactionDetailsBlock as
|
|
6
|
+
import { BarchartBlock as T } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
7
|
+
import { DoubleBarChartBlock as O } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
8
|
+
import d from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
9
|
+
import g from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
10
|
+
import P from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
11
|
+
import I from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
12
|
+
import N from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
|
|
13
|
+
import y from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
|
|
14
|
+
import { BudgetBlock as b } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
|
|
15
|
+
import L from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
16
|
+
import S from "../blocks/ComponentBlocks/GasPurchaseBlock/GasPurchaseBlock.es.js";
|
|
17
|
+
import D from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
|
|
18
|
+
import h from "../blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js";
|
|
19
|
+
import E from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
|
|
20
|
+
import K from "../blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js";
|
|
21
|
+
import p from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
22
|
+
import v from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
23
|
+
import R from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
24
|
+
import M from "../blocks/ComponentBlocks/SavingsSummaryBlock/SavingsSummaryBlock.es.js";
|
|
25
|
+
import { TransactionBlock as U } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
26
|
+
import w from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
27
|
+
import G from "../blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js";
|
|
28
|
+
import H from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
29
|
+
import F from "../blocks/ImageBlocks/ImageBlock.es.js";
|
|
30
|
+
import { SVGImageBlock as z } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
31
|
+
import { FeedbackModalActionBlock as Y } from "../actionBlocks/FeedbackModalActionBlock.es.js";
|
|
32
|
+
import { ConnectionDetailActionBlock as x } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
|
|
33
|
+
import { ConnectWidgetActionBlock as V } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
|
|
34
|
+
import { getDrawerHeaderTitle as W } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
|
|
35
|
+
import { SurveyModalActionBlock as q } from "../actionBlocks/SurveyModalActionBlock.es.js";
|
|
36
|
+
import { SubscriptionStatusModalBlock as Q } from "../actionBlocks/SubscriptionStatusModalBlock.es.js";
|
|
37
|
+
import { PlaceholderActionBlock as j } from "../actionBlocks/PlaceholderActionBlock.es.js";
|
|
38
|
+
import { getMakeTransferDrawerTitle as Z } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
|
|
39
|
+
import { MakeTransferActionBlockLayer as J } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
|
|
40
|
+
import { TransactionDetailsBlock as X } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
|
|
41
41
|
import { useTransactionDetailsPrepare as n } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
|
|
42
|
-
import { TransactionHistoryBlock as
|
|
43
|
-
import { useTransactionHistoryPrepare as
|
|
44
|
-
import { useRecurringTransactionPrepare as
|
|
45
|
-
import { RecurringTransactionBlock as
|
|
46
|
-
import { HelpBlock as
|
|
47
|
-
import { getTransactionListDrawerTitle as
|
|
48
|
-
import { TransactionListBlock as
|
|
49
|
-
import { RemainingCashBlock as
|
|
50
|
-
import { AmountInputModalBlock as
|
|
51
|
-
import { OverdraftBlock as
|
|
52
|
-
import { AccountDetailsBlock as
|
|
53
|
-
import { useAccountDetailsPrepare as
|
|
54
|
-
import { AccountListBlock as
|
|
55
|
-
import { useAccountListPrepare as
|
|
56
|
-
import { EmergencySavingsBlock as
|
|
57
|
-
import { CreditUtilizationBlock as
|
|
58
|
-
import { useCreditUtilizationPrepare as
|
|
59
|
-
import { PayoffCalculatorBlock as
|
|
60
|
-
import { BudgetDetailsBlock as
|
|
61
|
-
import { useBudgetDetailsPrepare as
|
|
62
|
-
import { PayoffStrategiesBlock as
|
|
63
|
-
import { usePayoffStrategiesPrepare as
|
|
64
|
-
import { QuizMerchantBlock as
|
|
65
|
-
var i = (
|
|
66
|
-
},
|
|
42
|
+
import { TransactionHistoryBlock as $, selectTransactionHistoryCopy as oo } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
|
|
43
|
+
import { useTransactionHistoryPrepare as to } from "../actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js";
|
|
44
|
+
import { useRecurringTransactionPrepare as l } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
|
|
45
|
+
import { RecurringTransactionBlock as eo } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
|
|
46
|
+
import { HelpBlock as ro } from "../actionBlocks/HelpBlock/HelpBlock.es.js";
|
|
47
|
+
import { getTransactionListDrawerTitle as io } from "../actionBlocks/TransactionListBlock/layout.es.js";
|
|
48
|
+
import { TransactionListBlock as ao } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
|
|
49
|
+
import { RemainingCashBlock as no, selectRemainingCashCopy as m } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
|
|
50
|
+
import { AmountInputModalBlock as s } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
|
|
51
|
+
import { OverdraftBlock as co, selectOverdraftCopy as po, useOverdraftPrepare as lo } from "../actionBlocks/OverdraftBlock/OverdraftBlock.es.js";
|
|
52
|
+
import { AccountDetailsBlock as mo } from "../actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js";
|
|
53
|
+
import { useAccountDetailsPrepare as so } from "../actionBlocks/AccountDetailsBlock/useAccountDetailsPrepare.es.js";
|
|
54
|
+
import { AccountListBlock as _o, selectAccountListCopy as _ } from "../actionBlocks/AccountListBlock/AccountListBlock.es.js";
|
|
55
|
+
import { useAccountListPrepare as Co } from "../actionBlocks/AccountListBlock/useAccountListPrepare.es.js";
|
|
56
|
+
import { EmergencySavingsBlock as uo, selectEmergencySavingsCopy as Bo } from "../actionBlocks/EmergencySavingsBlock/EmergencySavingsBlock.es.js";
|
|
57
|
+
import { CreditUtilizationBlock as fo, selectCreditUtilizationCopy as C } from "../actionBlocks/CreditUtilizationBlock/CreditUtilizationBlock.es.js";
|
|
58
|
+
import { useCreditUtilizationPrepare as ko } from "../actionBlocks/CreditUtilizationBlock/useCreditUtilizationPrepare.es.js";
|
|
59
|
+
import { PayoffCalculatorBlock as Ao, selectPayoffCalculatorCopy as u, usePayoffCalculatorPrepare as To } from "../actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js";
|
|
60
|
+
import { BudgetDetailsBlock as Oo, selectBudgetDetailsCopy as go } from "../actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js";
|
|
61
|
+
import { useBudgetDetailsPrepare as Po } from "../actionBlocks/BudgetDetailsBlock/useBudgetDetailsPrepare.es.js";
|
|
62
|
+
import { PayoffStrategiesBlock as Io, selectPayoffStrategiesCopy as B } from "../actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js";
|
|
63
|
+
import { usePayoffStrategiesPrepare as No } from "../actionBlocks/PayoffStrategiesBlock/usePayoffStrategiesPrepare.es.js";
|
|
64
|
+
import { QuizMerchantBlock as yo } from "../actionBlocks/QuizMerchantBlock/QuizMerchantBlock.es.js";
|
|
65
|
+
var i = (r) => {
|
|
66
|
+
}, e = (r) => ({
|
|
67
67
|
get Component() {
|
|
68
|
-
return
|
|
68
|
+
return r().Component;
|
|
69
69
|
},
|
|
70
70
|
get usePrepare() {
|
|
71
|
-
return
|
|
71
|
+
return r().usePrepare;
|
|
72
72
|
},
|
|
73
73
|
get title() {
|
|
74
|
-
return
|
|
74
|
+
return r().title;
|
|
75
|
+
},
|
|
76
|
+
get copy() {
|
|
77
|
+
return r().copy;
|
|
75
78
|
},
|
|
76
79
|
get presentation() {
|
|
77
|
-
return
|
|
80
|
+
return r().presentation;
|
|
78
81
|
},
|
|
79
82
|
get headerAction() {
|
|
80
|
-
return
|
|
83
|
+
return r().headerAction;
|
|
81
84
|
}
|
|
82
|
-
}),
|
|
83
|
-
[t.PLACEHOLDER_ACTION_BLOCK]:
|
|
84
|
-
Component:
|
|
85
|
+
}), wt = {
|
|
86
|
+
[t.PLACEHOLDER_ACTION_BLOCK]: e(() => ({
|
|
87
|
+
Component: j,
|
|
85
88
|
usePrepare: i,
|
|
86
89
|
title: () => "Action Block Layer Drilldown"
|
|
87
90
|
})),
|
|
88
|
-
[t.MAKE_TRANSFER_ACTION_BLOCK]:
|
|
89
|
-
Component:
|
|
91
|
+
[t.MAKE_TRANSFER_ACTION_BLOCK]: e(() => ({
|
|
92
|
+
Component: J,
|
|
90
93
|
headerAction: "close",
|
|
91
94
|
usePrepare: i,
|
|
92
|
-
title:
|
|
95
|
+
title: Z
|
|
93
96
|
})),
|
|
94
|
-
[t.TRANSCATION_HISTORY_ACTION_BLOCK]:
|
|
95
|
-
Component:
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
[t.TRANSCATION_HISTORY_ACTION_BLOCK]: e(() => ({
|
|
98
|
+
Component: $,
|
|
99
|
+
copy: oo,
|
|
100
|
+
usePrepare: to,
|
|
101
|
+
title: W
|
|
98
102
|
})),
|
|
99
|
-
[t.TRANSACTION_DETAILS_ACTION_BLOCK]:
|
|
100
|
-
Component:
|
|
103
|
+
[t.TRANSACTION_DETAILS_ACTION_BLOCK]: e(() => ({
|
|
104
|
+
Component: X,
|
|
101
105
|
usePrepare: n,
|
|
102
106
|
title: () => "Transaction Details"
|
|
103
107
|
})),
|
|
104
|
-
[t.RECURRING_TRANSACTION_ACTION_BLOCK]:
|
|
105
|
-
Component:
|
|
106
|
-
usePrepare:
|
|
107
|
-
title: (
|
|
108
|
+
[t.RECURRING_TRANSACTION_ACTION_BLOCK]: e(() => ({
|
|
109
|
+
Component: eo,
|
|
110
|
+
usePrepare: l,
|
|
111
|
+
title: (r, o) => o.recurring?.expense_details ?? ""
|
|
108
112
|
})),
|
|
109
|
-
[t.REMAINING_CASH_ACTION_BLOCK]:
|
|
110
|
-
Component:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
[t.REMAINING_CASH_ACTION_BLOCK]: e(() => ({
|
|
114
|
+
Component: no,
|
|
115
|
+
copy: m,
|
|
116
|
+
usePrepare: l,
|
|
117
|
+
title: (r, o) => m(o)?.title ?? ""
|
|
113
118
|
})),
|
|
114
|
-
[t.CONTACT_SUPPORT_ACTION_BLOCK]:
|
|
115
|
-
Component:
|
|
119
|
+
[t.CONTACT_SUPPORT_ACTION_BLOCK]: e(() => ({
|
|
120
|
+
Component: k,
|
|
116
121
|
usePrepare: i,
|
|
117
|
-
title: (
|
|
122
|
+
title: (r, o) => o.help?.request_support ?? ""
|
|
118
123
|
})),
|
|
119
|
-
[t.FEEDBACK_MODAL_ACTION_BLOCK]:
|
|
120
|
-
Component:
|
|
124
|
+
[t.FEEDBACK_MODAL_ACTION_BLOCK]: e(() => ({
|
|
125
|
+
Component: Y,
|
|
121
126
|
usePrepare: i,
|
|
122
127
|
presentation: "modal"
|
|
123
128
|
})),
|
|
124
|
-
[t.CONNECTION_DETAIL_ACTION_BLOCK]:
|
|
125
|
-
Component:
|
|
129
|
+
[t.CONNECTION_DETAIL_ACTION_BLOCK]: e(() => ({
|
|
130
|
+
Component: x,
|
|
126
131
|
usePrepare: i,
|
|
127
|
-
title: (
|
|
132
|
+
title: (r, o) => o.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
|
|
128
133
|
})),
|
|
129
|
-
[t.CONNECT_WIDGET_ACTION_BLOCK]:
|
|
130
|
-
Component:
|
|
134
|
+
[t.CONNECT_WIDGET_ACTION_BLOCK]: e(() => ({
|
|
135
|
+
Component: V,
|
|
131
136
|
usePrepare: i
|
|
132
137
|
})),
|
|
133
|
-
[t.SURVEY_MODAL_ACTION_BLOCK]:
|
|
134
|
-
Component:
|
|
138
|
+
[t.SURVEY_MODAL_ACTION_BLOCK]: e(() => ({
|
|
139
|
+
Component: q,
|
|
135
140
|
usePrepare: i,
|
|
136
141
|
presentation: "modal"
|
|
137
142
|
})),
|
|
138
|
-
[t.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]:
|
|
139
|
-
Component:
|
|
143
|
+
[t.SUBSCRIPTION_STATUS_MODAL_ACTION_BLOCK]: e(() => ({
|
|
144
|
+
Component: Q,
|
|
140
145
|
usePrepare: i,
|
|
141
146
|
presentation: "modal"
|
|
142
147
|
})),
|
|
143
|
-
[t.TRANSACTION_LIST_ACTION_BLOCK]:
|
|
144
|
-
Component:
|
|
148
|
+
[t.TRANSACTION_LIST_ACTION_BLOCK]: e(() => ({
|
|
149
|
+
Component: ao,
|
|
145
150
|
usePrepare: n,
|
|
146
|
-
title:
|
|
151
|
+
title: io
|
|
147
152
|
})),
|
|
148
|
-
[t.AMOUNT_INPUT_MODAL_ACTION_BLOCK]:
|
|
149
|
-
Component:
|
|
153
|
+
[t.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: e(() => ({
|
|
154
|
+
Component: s,
|
|
150
155
|
presentation: "modal",
|
|
151
156
|
usePrepare: i
|
|
152
157
|
})),
|
|
153
|
-
[t.SAFETY_NET_ACTION_BLOCK]:
|
|
154
|
-
Component:
|
|
158
|
+
[t.SAFETY_NET_ACTION_BLOCK]: e(() => ({
|
|
159
|
+
Component: s,
|
|
155
160
|
presentation: "modal",
|
|
156
161
|
usePrepare: i
|
|
157
162
|
})),
|
|
158
|
-
[t.OVERDRAFT_ACTION_BLOCK]:
|
|
159
|
-
Component:
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
[t.OVERDRAFT_ACTION_BLOCK]: e(() => ({
|
|
164
|
+
Component: co,
|
|
165
|
+
copy: po,
|
|
166
|
+
usePrepare: lo,
|
|
167
|
+
title: (r, o, a) => a?.insights_payload?.title ?? ""
|
|
162
168
|
})),
|
|
163
|
-
[t.CREDIT_UTILIZATION_ACTION_BLOCK]:
|
|
164
|
-
Component:
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
[t.CREDIT_UTILIZATION_ACTION_BLOCK]: e(() => ({
|
|
170
|
+
Component: fo,
|
|
171
|
+
copy: C,
|
|
172
|
+
usePrepare: ko,
|
|
173
|
+
title: (r, o) => C(o)?.title ?? ""
|
|
167
174
|
})),
|
|
168
|
-
[t.EMERGENCY_SAVINGS_ACTION_BLOCK]:
|
|
169
|
-
Component:
|
|
175
|
+
[t.EMERGENCY_SAVINGS_ACTION_BLOCK]: e(() => ({
|
|
176
|
+
Component: uo,
|
|
177
|
+
copy: Bo,
|
|
170
178
|
usePrepare: i,
|
|
171
|
-
title: (
|
|
179
|
+
title: (r, o, a) => a?.insights_payload?.title ?? ""
|
|
172
180
|
})),
|
|
173
|
-
[t.PAYOFF_CALCULATOR_ACTION_BLOCK]:
|
|
174
|
-
Component:
|
|
175
|
-
|
|
176
|
-
|
|
181
|
+
[t.PAYOFF_CALCULATOR_ACTION_BLOCK]: e(() => ({
|
|
182
|
+
Component: Ao,
|
|
183
|
+
copy: u,
|
|
184
|
+
usePrepare: To,
|
|
185
|
+
title: (r, o) => u(o)?.title ?? ""
|
|
177
186
|
})),
|
|
178
|
-
[t.BUDGET_DETAILS_ACTION_BLOCK]:
|
|
179
|
-
Component:
|
|
187
|
+
[t.BUDGET_DETAILS_ACTION_BLOCK]: e(() => ({
|
|
188
|
+
Component: Oo,
|
|
189
|
+
copy: go,
|
|
180
190
|
headerAction: "close",
|
|
181
|
-
usePrepare:
|
|
182
|
-
title: (
|
|
183
|
-
const
|
|
184
|
-
return
|
|
191
|
+
usePrepare: Po,
|
|
192
|
+
title: (r, o, a) => {
|
|
193
|
+
const c = a ? A(r, a, o) : void 0;
|
|
194
|
+
return c && o.budgets?.details_type_title ? f(o.budgets.details_type_title, c) : a?.insights_payload?.title || o.budgets?.details_title || "";
|
|
185
195
|
}
|
|
186
196
|
})),
|
|
187
|
-
[t.ACCOUNT_DETAILS_ACTION_BLOCK]:
|
|
188
|
-
Component:
|
|
189
|
-
usePrepare:
|
|
190
|
-
title: (
|
|
197
|
+
[t.ACCOUNT_DETAILS_ACTION_BLOCK]: e(() => ({
|
|
198
|
+
Component: mo,
|
|
199
|
+
usePrepare: so,
|
|
200
|
+
title: (r, o) => o.accounts?.account_details ?? ""
|
|
191
201
|
})),
|
|
192
|
-
[t.ACCOUNT_LIST_ACTION_BLOCK]:
|
|
193
|
-
Component:
|
|
194
|
-
|
|
195
|
-
|
|
202
|
+
[t.ACCOUNT_LIST_ACTION_BLOCK]: e(() => ({
|
|
203
|
+
Component: _o,
|
|
204
|
+
copy: _,
|
|
205
|
+
usePrepare: Co,
|
|
206
|
+
title: (r, o) => _(o)?.title ?? ""
|
|
196
207
|
})),
|
|
197
|
-
[t.HELP_ACTION_BLOCK]:
|
|
198
|
-
Component:
|
|
208
|
+
[t.HELP_ACTION_BLOCK]: e(() => ({
|
|
209
|
+
Component: ro,
|
|
199
210
|
usePrepare: i
|
|
200
211
|
})),
|
|
201
|
-
[t.PAYOFF_STRATEGIES_ACTION_BLOCK]:
|
|
202
|
-
Component:
|
|
203
|
-
|
|
204
|
-
|
|
212
|
+
[t.PAYOFF_STRATEGIES_ACTION_BLOCK]: e(() => ({
|
|
213
|
+
Component: Io,
|
|
214
|
+
copy: B,
|
|
215
|
+
usePrepare: No,
|
|
216
|
+
title: (r, o) => B(o)?.debt_payoff_strategies ?? ""
|
|
205
217
|
})),
|
|
206
|
-
[t.QUIZ_MERCHANT_ACTION_BLOCK]:
|
|
207
|
-
Component:
|
|
218
|
+
[t.QUIZ_MERCHANT_ACTION_BLOCK]: e(() => ({
|
|
219
|
+
Component: yo,
|
|
208
220
|
usePrepare: n,
|
|
209
|
-
title: (
|
|
221
|
+
title: (r, o) => o.insights_feed?.quiz_block?.drawer_title ?? ""
|
|
210
222
|
}))
|
|
211
|
-
},
|
|
212
|
-
account_block:
|
|
213
|
-
account_switch_block:
|
|
214
|
-
direct_deposit_block:
|
|
215
|
-
bar_chart_block:
|
|
216
|
-
budget_block:
|
|
217
|
-
debts_block:
|
|
218
|
-
donut_chart_block:
|
|
219
|
-
double_bar_chart_block:
|
|
220
|
-
double_progress_bar_block:
|
|
221
|
-
gas_purchase_block:
|
|
222
|
-
goals_block:
|
|
223
|
-
image_block:
|
|
224
|
-
merchant_block:
|
|
225
|
-
no_spend_days_block:
|
|
226
|
-
quiz_block:
|
|
227
|
-
repeating_transaction_block:
|
|
228
|
-
save_extra_block:
|
|
229
|
-
savings_amount_block:
|
|
230
|
-
savings_summary_block:
|
|
231
|
-
step_chart_block:
|
|
232
|
-
svg_image_block:
|
|
233
|
-
upcoming_bill_block:
|
|
234
|
-
upcoming_subscription_block:
|
|
235
|
-
weekly_small_purchases_block:
|
|
236
|
-
withdrawal_block:
|
|
237
|
-
transaction_block:
|
|
223
|
+
}, Gt = {
|
|
224
|
+
account_block: N,
|
|
225
|
+
account_switch_block: y,
|
|
226
|
+
direct_deposit_block: I,
|
|
227
|
+
bar_chart_block: T,
|
|
228
|
+
budget_block: b,
|
|
229
|
+
debts_block: L,
|
|
230
|
+
donut_chart_block: g,
|
|
231
|
+
double_bar_chart_block: O,
|
|
232
|
+
double_progress_bar_block: P,
|
|
233
|
+
gas_purchase_block: S,
|
|
234
|
+
goals_block: D,
|
|
235
|
+
image_block: F,
|
|
236
|
+
merchant_block: h,
|
|
237
|
+
no_spend_days_block: E,
|
|
238
|
+
quiz_block: K,
|
|
239
|
+
repeating_transaction_block: p,
|
|
240
|
+
save_extra_block: v,
|
|
241
|
+
savings_amount_block: R,
|
|
242
|
+
savings_summary_block: M,
|
|
243
|
+
step_chart_block: d,
|
|
244
|
+
svg_image_block: z,
|
|
245
|
+
upcoming_bill_block: p,
|
|
246
|
+
upcoming_subscription_block: w,
|
|
247
|
+
weekly_small_purchases_block: G,
|
|
248
|
+
withdrawal_block: H,
|
|
249
|
+
transaction_block: U
|
|
238
250
|
};
|
|
239
251
|
export {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
252
|
+
wt as actionBlocks,
|
|
253
|
+
Gt as blocks,
|
|
254
|
+
ho as hasDrawerBlock
|
|
243
255
|
};
|
|
244
256
|
|
|
245
257
|
//# sourceMappingURL=blocks.es.js.map
|