@mx-cartographer/experiences 9.7.70 → 9.7.71-alpha-ram-usp-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/core/stores/GlobalCopyStore.d.ts +6 -0
  3. package/dist/core/stores/GlobalCopyStore.es.js +14 -8
  4. package/dist/core/stores/GlobalCopyStore.es.js.map +1 -1
  5. package/dist/core/types/localization/InsightsFeedCopy.d.ts +24 -0
  6. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.d.ts +6 -0
  7. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +168 -0
  8. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js.map +1 -0
  9. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +11 -11
  10. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistoryPrepare.es.js +3 -3
  11. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +92 -59
  12. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  13. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +9 -1
  14. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +9 -5
  15. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  16. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js +5 -5
  17. package/dist/insights-v2/components/AccountHeroCard.es.js +7 -5
  18. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  19. package/dist/insights-v2/components/BaseLayout.es.js +157 -138
  20. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  21. package/dist/insights-v2/components/CtaStatus.d.ts +14 -1
  22. package/dist/insights-v2/components/CtaStatus.es.js +76 -38
  23. package/dist/insights-v2/components/CtaStatus.es.js.map +1 -1
  24. package/dist/insights-v2/components/InsightTransactionRow.d.ts +3 -1
  25. package/dist/insights-v2/components/InsightTransactionRow.es.js +36 -20
  26. package/dist/insights-v2/components/InsightTransactionRow.es.js.map +1 -1
  27. package/dist/insights-v2/components/StatusPill.es.js +12 -11
  28. package/dist/insights-v2/components/StatusPill.es.js.map +1 -1
  29. package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.d.ts +4 -0
  30. package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js +10 -0
  31. package/dist/insights-v2/components/SubscriptionStatus/subscriptionFrequency.es.js.map +1 -0
  32. package/dist/insights-v2/components/TransactionListCard.d.ts +5 -1
  33. package/dist/insights-v2/components/TransactionListCard.es.js +69 -49
  34. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  35. package/dist/insights-v2/components/shared/StatusSnackbar.d.ts +10 -1
  36. package/dist/insights-v2/components/shared/StatusSnackbar.es.js +27 -11
  37. package/dist/insights-v2/components/shared/StatusSnackbar.es.js.map +1 -1
  38. package/dist/insights-v2/components/shared/elevation.d.ts +16 -0
  39. package/dist/insights-v2/components/shared/elevation.es.js +15 -0
  40. package/dist/insights-v2/components/shared/elevation.es.js.map +1 -0
  41. package/dist/insights-v2/ctaActions/ctaConfig.es.js +23 -9
  42. package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
  43. package/dist/insights-v2/ctaActions/runCtaAction.d.ts +7 -0
  44. package/dist/insights-v2/ctaActions/runCtaAction.es.js +73 -62
  45. package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
  46. package/dist/insights-v2/ctaActions/subscriptionAnswer.d.ts +10 -1
  47. package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js +115 -0
  48. package/dist/insights-v2/ctaActions/subscriptionAnswer.es.js.map +1 -0
  49. package/dist/insights-v2/ctaActions/types.d.ts +5 -2
  50. package/dist/insights-v2/ctaActions/useCtaAction.d.ts +6 -0
  51. package/dist/insights-v2/ctaActions/useCtaAction.es.js +32 -27
  52. package/dist/insights-v2/ctaActions/useCtaAction.es.js.map +1 -1
  53. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -0
  54. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -0
  55. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  56. package/dist/insights-v2/mappings/blocks.es.js +74 -68
  57. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  58. package/dist/microinsights/MicroCardTemplate.es.js +21 -17
  59. package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
  60. package/dist/microinsights/cards/InsightCard.es.js +91 -86
  61. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  62. package/dist/microinsights/cards/MicroCtaStatus.d.ts +18 -0
  63. package/dist/microinsights/cards/MicroCtaStatus.es.js +44 -0
  64. package/dist/microinsights/cards/MicroCtaStatus.es.js.map +1 -0
  65. package/dist/microinsights/stores/CopyStore.d.ts +4 -1
  66. package/dist/microinsights/stores/CopyStore.es.js +13 -10
  67. package/dist/microinsights/stores/CopyStore.es.js.map +1 -1
  68. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 20\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\") renders under the\n * `with_header_footer` variant, from `data.footer_text` with `data.footer_amount` beside it,\n * formatted like the row amounts (the contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const { background, cardVariant, showFooter, showHeader, statusMessage } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={slot<LogoRef>(data, 'icon')} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer = showFooter\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, '0,0.00'),\n }\n : undefined\n\n return (\n <TransactionListCard\n background={background}\n footer={footer}\n header={header}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,IAAgB,IAEhB,IAAgB,KAAK,MAAM,IAAgB,KAAK,GAChD,IAAmB,IAanB,IAAA,CAAiB,GAAsB,MAAsD;AACjG,QAAM,IAAO,EAAY,EAAI,MAAM,EAAI,YAAY;AAEnD,MAAK,GAEL;AAAA,QAAI,EAAK,UAEP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB,OAAO;AAAA,MACT;AAAA,MAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM,EAAK;AAAA,QAAW,MAAM;AAAA,QAAe,IAAI,EAAE,OAAO,EAAK,WAAW;AAAA,MAAI,CAAA;AAAA,IAC/E,CAAA;AAIT,QAAI,EAAK,cACP,QACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,EAAK,iBAAiB;AAAA,MAC3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AA,MAEE,SAAA;AAAA,IACV,CAAA;AAAA,EAEL;AAEA,QAAM,IAAS,EAAwB,GAAM,QAAQ,GAC/C,IAAa,EAAa,GAAM,aAAa;AAEnD,MAAI,CAAC,MAAM,QAAQ,CAAM,KAAK,CAAC,EAAO,OAAQ,QAAO;AAErD,QAAM,IAAS,KAAc,OAAO,KAAe,WAAW,IAAa,QAErE,IAAa,EAAa,GAAM,aAAa,GAC7C,IAAe,EAAa,GAAM,eAAe,GACjD,IAAS,IACX;AAAA,IACE,OAAO;AAAA,IACP,QAAQ,EAAe,GAAc,QAAQ;AAAA,EAC/C,IACA;AAEJ,SACE,gBAAA,EAAC,GAAD;AAAA,IACc,YAAA;AAAA,IACJ,QAAA;AAAA,IACA,QAAA;AAAA,IACR,SAAS;AAAA,IACT,MAAM,EAAO,IAAA,CAAK,OAAS;AAAA,MACzB,QAAQ,OAAO,EAAI,UAAW,WAAW,EAAe,EAAI,QAAQ,QAAQ,IAAI;AAAA,MAChF,SAAS,EAAc,GAAK,CAAuB;AAAA,MACnD,UAAU,EAAI,kBAAkB;AAAA,MAChC,OAAO,EAAI,gBAAgB;AAAA,IAC7B,EAAE;AAAA,EACH,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"TransactionBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon, InstitutionLogo, MerchantLogo } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useCategoryStore, useGlobalCopyStore, useGlobalStore } from '../../../../common'\nimport { slot } from '../../../../core'\nimport type { InsightsPayload, InstanceSlotRow, LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nimport { useBeatActions } from '../../../beatActions'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport StatusMessageCard from '../../../components/StatusMessageCard'\nimport TransactionListCard from '../../../components/TransactionListCard'\nimport { logoFromRef } from '../../../components/shared/EntityLogo'\nimport { statusIconName, statusIconPalette } from '../../../components/statusIcon'\nimport { subscriptionFrequency } from '../../../components/SubscriptionStatus/subscriptionFrequency'\nimport { repeatingTransactionOf, USER_RESPONSE } from '../../../ctaActions/subscriptionAnswer'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig, transactionBlockVariant } from './layout'\n\ninterface TransactionBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nconst ROW_LOGO_SIZE = 32\n// Same glyph-to-tile ratio mxui's `CategoryIcon` uses, so a status icon sits like the other logos.\nconst ROW_ICON_SIZE = Math.round(ROW_LOGO_SIZE * 0.625)\nconst STATUS_ICON_SIZE = 20\n// Status badge: palette disc, contrastText glyph.\nconst BADGE_SIZE = 32\nconst BADGE_GLYPH_SIZE = 20\n\n/** Status disc from `data.icon` / `data.reviewed_icon`. */\nconst SubscriptionBadge = ({ icon }: { icon?: LogoRef }) => {\n const name = statusIconName(icon?.guid)\n\n if (!name) return null\n\n return (\n <Box\n aria-hidden={true}\n data-icon={name}\n data-testid=\"subscription-badge\"\n sx={{\n alignItems: 'center',\n bgcolor: `${statusIconPalette(icon?.color)}.main`,\n borderRadius: '50%',\n display: 'flex',\n height: BADGE_SIZE,\n justifyContent: 'center',\n width: BADGE_SIZE,\n }}\n >\n <Icon\n fill={true}\n name={name}\n size={BADGE_GLYPH_SIZE}\n sx={{ color: `${statusIconPalette(icon?.color)}.contrastText` }}\n />\n </Box>\n )\n}\n\n/**\n * Renders the row's leading logo from its `LogoRef`: a status icon, or an entity guid whose prefix\n * names the entity. An unrecognized prefix renders no logo rather than guessing.\n *\n * `resolveTopLevelCategory`: mxui's `CategoryIcon` only knows the top-level category guids and\n * silently falls back to the Uncategorized icon for a sub-category. The details drawer avoids\n * this by passing `transaction.top_level_category_guid`; the row only has the raw guid, so it is\n * walked up to its parent here (identity until categories load). That applies both to a `CAT-`\n * row logo and to a merchant's `fallback_guid`, which `MerchantLogo` draws through the same\n * `CategoryIcon` when the merchant image fails to load.\n */\nconst renderRowLogo = (row: InstanceSlotRow, resolveTopLevelCategory: (guid: string) => string) => {\n const logo = logoFromRef(row.logo, row.primary_text)\n\n if (!logo) return undefined\n\n if (logo.logo_name) {\n // A fixed box the size of the other logos keeps the row's text column aligned.\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n height: ROW_LOGO_SIZE,\n justifyContent: 'center',\n width: ROW_LOGO_SIZE,\n }}\n >\n <Icon name={logo.logo_name} size={ROW_ICON_SIZE} sx={{ color: logo.logo_color }} />\n </Box>\n )\n }\n\n if (logo.merchant_guid) {\n return (\n <MerchantLogo\n alt={logo.merchant_name ?? ''}\n categoryGuid={logo.category_guid ? resolveTopLevelCategory(logo.category_guid) : ''}\n merchantGuid={logo.merchant_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.institution_guid) {\n return (\n <InstitutionLogo\n alt={logo.institution_name ?? ''}\n institutionGuid={logo.institution_guid}\n size={ROW_LOGO_SIZE}\n />\n )\n }\n\n if (logo.category_guid) {\n const topLevelGuid = resolveTopLevelCategory(logo.category_guid)\n return (\n <Box data-testid={`category-icon-${topLevelGuid}`} sx={{ display: 'flex' }}>\n <CategoryIcon categoryGuid={topLevelGuid} size={ROW_LOGO_SIZE} />\n </Box>\n )\n }\n\n return undefined\n}\n\n/**\n * The `transaction_block`: rows the backend already localized, carried inline on\n * `instance_slot.data.series` (`logo`, `primary_text`, `secondary_text`, `amount`). Only the\n * amount is formatted here, because the contract sends it as a number. `instance_slot.variant`\n * picks the header and slot treatment from `./layout.ts`.\n *\n * This is the full/mini shape. The reduced widgets (micro, embedded) resolve to the row logo\n * alone, carried flat on `data.logo` with no `series`, and are drawn by `CompactInsightCard`.\n *\n * `status_message` draws no rows: `data.message` beside the `data.icon` logo, as a\n * `StatusMessageCard` banner (Uncategorized Transactions V2 `complete`).\n *\n * A header, when the variant shows one, comes from `instance_slot.data.header_text` (the\n * transaction date, or \"{count} transactions\"). It deliberately does *not* come from the first\n * row: on a `with_merchant` card a row's `secondary_text` is the category, so reading it here\n * rendered the category twice and dropped the date entirely.\n *\n * A footer/summary row (Replenish Savings' \"Remaining Balance\") renders under the\n * `with_header_footer` variant, from `data.footer_text` with `data.footer_amount` beside it,\n * formatted like the row amounts (the contract sends it as a number).\n */\nexport const TransactionBlock = observer(({ payload }: TransactionBlockProps) => {\n const theme = useTheme()\n const { getTopLevelCategoryGuid } = useCategoryStore()\n const stores = useGlobalStore()\n const { recurring: recurringCopy } = useGlobalCopyStore()\n const { beat } = useBeatActions()\n const { data, variant } = payload.instance_slot\n // The plain row is the safe default: it adds nothing a wrong variant could misstate.\n const {\n answeredBackground,\n background,\n cardVariant,\n elevated,\n followsSubscription,\n showFooter,\n sx,\n showHeader,\n statusMessage,\n } = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n transactionBlockVariant.NoHeader,\n 'TransactionBlock',\n )\n\n // Follows the live repeating transaction (read-only).\n const tracked = followsSubscription && beat ? beat : undefined\n const repeating = tracked ? repeatingTransactionOf({ beat: tracked, stores }) : undefined\n const subscribed = repeating?.user_response === USER_RESPONSE.CONFIRMED\n\n if (statusMessage) {\n const message = slot<string>(data, 'message')\n if (typeof message !== 'string' || !message.trim()) {\n console.warn('[TransactionBlock] status_message has no message — rendering nothing.')\n return null\n }\n\n // The icon only decorates the message, so it is hidden from the status announcement.\n return (\n <StatusMessageCard\n icon={\n <Box aria-hidden=\"true\" sx={{ display: 'flex' }}>\n <LogoFromGuid logo={slot<LogoRef>(data, 'icon')} size={STATUS_ICON_SIZE} />\n </Box>\n }\n message={message}\n />\n )\n }\n\n const series = slot<InstanceSlotRow[]>(data, 'series')\n const headerText = slot<string>(data, 'header_text')\n\n if (!Array.isArray(series) || !series.length) return null\n\n const header = showHeader && typeof headerText === 'string' ? headerText : undefined\n\n const footerText = slot<string>(data, 'footer_text')\n const footerAmount = slot<number>(data, 'footer_amount')\n const footer = showFooter\n ? {\n label: footerText,\n amount: formatCurrency(footerAmount, '0,0.00'),\n }\n : undefined\n\n const frequency = tracked ? subscriptionFrequency(recurringCopy, repeating) : undefined\n const badge = followsSubscription ? (\n <SubscriptionBadge icon={slot<LogoRef>(data, subscribed ? 'reviewed_icon' : 'icon')} />\n ) : undefined\n\n return (\n <TransactionListCard\n background={subscribed && answeredBackground ? answeredBackground : background}\n badge={badge}\n elevated={elevated}\n footer={footer}\n header={header}\n sx={sx}\n variant={cardVariant}\n rows={series.map((row) => ({\n amount: typeof row.amount === 'number' ? formatCurrency(row.amount, '0,0.00') : '',\n amountCaption: frequency,\n leading: renderRowLogo(row, getTopLevelCategoryGuid),\n subtitle: row.secondary_text ?? '',\n title: row.primary_text ?? '',\n }))}\n />\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,IAAM,IAAgB,IAEhB,KAAgB,KAAK,MAAM,IAAgB,KAAK,GAChD,KAAmB,IAEnB,IAAa,IACb,KAAmB,IAGnB,KAAA,CAAqB,EAAE,MAAA,EAAA,MAA+B;AAC1D,QAAM,IAAO,EAAe,GAAM,IAAI;AAEtC,SAAK,IAGH,gBAAA,EAAC,GAAD;AAAA,IACE,eAAa;AAAA,IACb,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,GAAG,EAAkB,GAAM,KAAK,CAAA;AAAA,MACzC,cAAc;AAAA,MACd,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM;AAAA,MACA,MAAA;AAAA,MACN,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,GAAG,EAAkB,GAAM,KAAK,CAAA,gBAAiB;AAAA,IAC/D,CAAA;AAAA,EACE,CAAA,IAvBW;AAyBp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,IAAQ,IACZ,gBAAA,EAAC,IAAD,EAAmB,MAAM,EAAc,GAAM,IAAa,kBAAkB,MAAM,EAAI,CAAA,IACpF;AAEJ,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,YAAY,KAAc,IAAqB,IAAqB;AAAA,IAC7D,OAAA;AAAA,IACG,UAAA;AAAA,IACF,QAAA;AAAA,IACA,QAAA;AAAA,IACJ,IAAA;AAAA,IACJ,SAAS;AAAA,IACT,MAAM,EAAO,IAAA,CAAK,OAAS;AAAA,MACzB,QAAQ,OAAO,EAAI,UAAW,WAAW,EAAe,EAAI,QAAQ,QAAQ,IAAI;AAAA,MAChF,eAAe;AAAA,MACf,SAAS,GAAc,GAAK,CAAuB;AAAA,MACnD,UAAU,EAAI,kBAAkB;AAAA,MAChC,OAAO,EAAI,gBAAgB;AAAA,IAC7B,EAAE;AAAA,EACH,CAAA;AAEL,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Theme } from '@mui/material/styles';
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
2
  /**
3
3
  * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same
4
4
  * pre-localized rows through `TransactionListCard`; only the header and the slot differ.
@@ -35,6 +35,14 @@ export interface TransactionLayoutConfig {
35
35
  background?: string;
36
36
  /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */
37
37
  statusMessage?: boolean;
38
+ /** Frequency, badge and answered wash from the live repeating transaction. */
39
+ followsSubscription?: boolean;
40
+ /** Wash once subscribed. */
41
+ answeredBackground?: string;
42
+ /** The rows' card on the wash gets `elevation/1` (needs `background`). */
43
+ elevated?: boolean;
44
+ /** Slot padding override (CSS shorthand). */
45
+ sx?: SxProps;
38
46
  }
39
47
  /** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */
40
48
  export declare const getLayoutConfig: (theme: Theme) => Record<TransactionBlockVariant, TransactionLayoutConfig>;
@@ -1,4 +1,4 @@
1
- import { WARNING_WASH_GRADIENT as r, getPrimaryWashGradient as t } from "../../../components/celebrationGradients.es.js";
1
+ import { WARM_LIME_ACCENT_GRADIENT as r, WARNING_WASH_GRADIENT as t, getPrimaryWashGradient as o } from "../../../components/celebrationGradients.es.js";
2
2
  var e = {
3
3
  WithHeader: "with_header",
4
4
  WithHeaderFooter: "with_header_footer",
@@ -7,7 +7,7 @@ var e = {
7
7
  InfoWash: "info_wash",
8
8
  WarningWash: "warning_wash",
9
9
  StatusMessage: "status_message"
10
- }, s = (a) => ({
10
+ }, n = (a) => ({
11
11
  [e.WithHeader]: { showHeader: !0 },
12
12
  [e.WithHeaderFooter]: {
13
13
  showHeader: !0,
@@ -20,11 +20,15 @@ var e = {
20
20
  },
21
21
  [e.InfoWash]: {
22
22
  showHeader: !1,
23
- background: t(a)
23
+ background: o(a)
24
24
  },
25
25
  [e.WarningWash]: {
26
26
  showHeader: !1,
27
- background: r
27
+ background: t,
28
+ followsSubscription: !0,
29
+ answeredBackground: r,
30
+ elevated: !0,
31
+ sx: { p: "28px 24px 24px 32px" }
28
32
  },
29
33
  [e.StatusMessage]: {
30
34
  showHeader: !1,
@@ -32,7 +36,7 @@ var e = {
32
36
  }
33
37
  });
34
38
  export {
35
- s as getLayoutConfig,
39
+ n as getLayoutConfig,
36
40
  e as transactionBlockVariant
37
41
  };
38
42
 
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport {\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — borderless row on the blue slot wash (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** CSS background for the slot behind the card; the card then renders borderless on paper. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n [transactionBlockVariant.WithHeader]: { showHeader: true },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n },\n [transactionBlockVariant.StatusMessage]: { showHeader: false, statusMessage: true },\n})\n"],"mappings":";AAsBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB,GAmBa,IAAA,CACX,OAC8D;AAAA,EAC7D,CAAA,EAAwB,UAAA,GAAa,EAAE,YAAY,GAAK;AAAA,EACxD,CAAA,EAAwB,gBAAA,GAAmB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EAChF,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,wBAAA,GAA2B;AAAA,IAAE,YAAY;AAAA,IAAM,aAAa;AAAA,EAAU;AAAA,EAC9F,CAAA,EAAwB,QAAA,GAAW;AAAA,IAClC,YAAY;AAAA,IACZ,YAAY,EAAuB,CAAK;AAAA,EAC1C;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IAAE,YAAY;AAAA,IAAO,eAAe;AAAA,EAAK;AACpF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles'\n\nimport {\n WARM_LIME_ACCENT_GRADIENT,\n WARNING_WASH_GRADIENT,\n getPrimaryWashGradient,\n} from '../../../components/celebrationGradients'\n\n/**\n * Transaction block variants, keyed by the backend `instance_slot.variant`. All render the same\n * pre-localized rows through `TransactionListCard`; only the header and the slot differ.\n *\n * - `WithHeader` — row under a date header (Fee Detected, Large Transaction).\n * - `WithHeaderFooter` — date header above the rows plus the footer/summary row from\n * `data.footer_text` / `data.footer_amount` (Replenish Savings' \"Remaining Balance\").\n * - `NoHeader` — the row alone (Large Transaction without a merchant).\n * - `UncategorizedTransaction` — filled primary header (\"{count} transactions\").\n * - `InfoWash` — borderless row on the blue slot wash (e.g. Subscription Detected).\n * - `WarningWash` — borderless row on the warning slot wash (e.g. Unexpected\n * Subscription Payment). Treatment names, not beat names, so any beat can reuse the wash.\n * - `StatusMessage` — no rows: an icon + message banner from `data.icon` / `data.message`\n * (Uncategorized Transactions V2 `complete`, \"All Categorized!\").\n */\nexport const transactionBlockVariant = {\n WithHeader: 'with_header',\n WithHeaderFooter: 'with_header_footer',\n NoHeader: 'no_header',\n UncategorizedTransaction: 'uncategorized_transaction',\n InfoWash: 'info_wash',\n WarningWash: 'warning_wash',\n StatusMessage: 'status_message',\n} as const\n\nexport type TransactionBlockVariant =\n (typeof transactionBlockVariant)[keyof typeof transactionBlockVariant]\n\nexport interface TransactionLayoutConfig {\n /** Show `instance_slot.data.header_text` above the rows. */\n showHeader: boolean\n /** Show the `data.footer_text` / `data.footer_amount` summary row beneath the rows. */\n showFooter?: boolean\n /** `TransactionListCard` style: grey utility header, or filled primary header. */\n cardVariant?: 'default' | 'primary'\n /** CSS background for the slot behind the card; the card then renders borderless on paper. */\n background?: string\n /** Render `data.message` as a `StatusMessageCard` banner instead of the rows. */\n statusMessage?: boolean\n /** Frequency, badge and answered wash from the live repeating transaction. */\n followsSubscription?: boolean\n /** Wash once subscribed. */\n answeredBackground?: string\n /** The rows' card on the wash gets `elevation/1` (needs `background`). */\n elevated?: boolean\n /** Slot padding override (CSS shorthand). */\n sx?: SxProps\n}\n\n/** Per-variant `TransactionListCard` props (mirrors DetailedAccountBlock's `getLayoutConfig`). */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<TransactionBlockVariant, TransactionLayoutConfig> => ({\n [transactionBlockVariant.WithHeader]: { showHeader: true },\n [transactionBlockVariant.WithHeaderFooter]: { showHeader: true, showFooter: true },\n [transactionBlockVariant.NoHeader]: { showHeader: false },\n [transactionBlockVariant.UncategorizedTransaction]: { showHeader: true, cardVariant: 'primary' },\n [transactionBlockVariant.InfoWash]: {\n showHeader: false,\n background: getPrimaryWashGradient(theme),\n },\n [transactionBlockVariant.WarningWash]: {\n showHeader: false,\n background: WARNING_WASH_GRADIENT,\n followsSubscription: true,\n // Answered wash.\n answeredBackground: WARM_LIME_ACCENT_GRADIENT,\n // Figma: the row card on the wash is elevation/1.\n elevated: true,\n // Room for the badge.\n sx: { p: '28px 24px 24px 32px' },\n },\n [transactionBlockVariant.StatusMessage]: { showHeader: false, statusMessage: true },\n})\n"],"mappings":";AAuBA,IAAa,IAA0B;AAAA,EACrC,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,0BAA0B;AAAA,EAC1B,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AACjB,GA2Ba,IAAA,CACX,OAC8D;AAAA,EAC7D,CAAA,EAAwB,UAAA,GAAa,EAAE,YAAY,GAAK;AAAA,EACxD,CAAA,EAAwB,gBAAA,GAAmB;AAAA,IAAE,YAAY;AAAA,IAAM,YAAY;AAAA,EAAK;AAAA,EAChF,CAAA,EAAwB,QAAA,GAAW,EAAE,YAAY,GAAM;AAAA,EACvD,CAAA,EAAwB,wBAAA,GAA2B;AAAA,IAAE,YAAY;AAAA,IAAM,aAAa;AAAA,EAAU;AAAA,EAC9F,CAAA,EAAwB,QAAA,GAAW;AAAA,IAClC,YAAY;AAAA,IACZ,YAAY,EAAuB,CAAK;AAAA,EAC1C;AAAA,EACC,CAAA,EAAwB,WAAA,GAAc;AAAA,IACrC,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,qBAAqB;AAAA,IAErB,oBAAoB;AAAA,IAEpB,UAAU;AAAA,IAEV,IAAI,EAAE,GAAG,sBAAsB;AAAA,EACjC;AAAA,EACC,CAAA,EAAwB,aAAA,GAAgB;AAAA,IAAE,YAAY;AAAA,IAAO,eAAe;AAAA,EAAK;AACpF"}
@@ -1,12 +1,12 @@
1
1
  import { ThemedSVGImage as f } from "../../../components/chartblocks/ThemedSVGImage.es.js";
2
- import { resolveVariantConfig as p } from "../../resolveVariantConfig.es.js";
3
- import { getLayoutConfig as d } from "./layout.es.js";
4
- import { CtaStatus as v } from "../../../components/CtaStatus.es.js";
2
+ import { CtaStatus as p } from "../../../components/CtaStatus.es.js";
3
+ import { resolveVariantConfig as d } from "../../resolveVariantConfig.es.js";
4
+ import { getLayoutConfig as v } from "./layout.es.js";
5
5
  import { EmergencySavingsAccountPicker as h } from "./EmergencySavingsAccountPicker.es.js";
6
6
  import s from "@mui/material/Stack";
7
7
  import { jsx as o, jsxs as u } from "react/jsx-runtime";
8
8
  var V = ({ payload: { instance_slot: m, instance_slot_data: n, widget_type: t }, beatGuid: c }) => {
9
- const l = t === "mini", a = t === "full", { variant: g, data: e } = m, i = p(d(n?.isCIBC), g, "savings", "SVGImageBlock"), r = typeof e?.saved_label == "string" ? e.saved_label.trim() : "";
9
+ const l = t === "mini", a = t === "full", { variant: g, data: e } = m, i = d(v(n?.isCIBC), g, "savings", "SVGImageBlock"), r = typeof e?.saved_label == "string" ? e.saved_label.trim() : "";
10
10
  return /* @__PURE__ */ u(s, {
11
11
  alignItems: "center",
12
12
  sx: { width: "100%" },
@@ -25,7 +25,7 @@ var V = ({ payload: { instance_slot: m, instance_slot_data: n, widget_type: t },
25
25
  px: 16,
26
26
  width: "100%"
27
27
  },
28
- children: /* @__PURE__ */ o(v, {
28
+ children: /* @__PURE__ */ o(p, {
29
29
  icon: "check_circle",
30
30
  label: r,
31
31
  tone: "success"
@@ -3,7 +3,7 @@ import r from "@mui/material/Stack";
3
3
  import { Text as d } from "@mxenabled/mxui";
4
4
  import { jsx as t, jsxs as e } from "react/jsx-runtime";
5
5
  import i from "@mui/material/Box";
6
- var v = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo: p, name: c, nameVariant: x = "body2", status: a, subtitle: l, sx: h }) => /* @__PURE__ */ e(i, {
6
+ var v = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo: p, name: x, nameVariant: c = "body2", status: a, subtitle: l, sx: h }) => /* @__PURE__ */ e(i, {
7
7
  sx: {
8
8
  alignItems: "center",
9
9
  bgcolor: s,
@@ -62,10 +62,12 @@ var v = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo
62
62
  width: "100%"
63
63
  },
64
64
  children: [/* @__PURE__ */ t(d, {
65
- sx: { fontWeight: 600 },
66
- truncate: !0,
67
- variant: x,
68
- children: c
65
+ sx: {
66
+ fontWeight: 600,
67
+ textAlign: "center"
68
+ },
69
+ variant: c,
70
+ children: x
69
71
  }), l && /* @__PURE__ */ t(d, {
70
72
  color: "text.secondary",
71
73
  truncate: !0,
@@ -1 +1 @@
1
- {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /**\n * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics\n * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).\n * Both render at weight 600.\n */\n nameVariant?: 'body1' | 'body2'\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 (13/16) or body1 (15/20) metrics at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. */}\n <Text sx={{ fontWeight: 600 }} truncate={true} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AAoDA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,QAAA,GACA,UAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,SAAS;AAAA,IACT,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AAAA,EAbF,UAAA,CAeG,KACC,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa;AAAA,IAAM,IAAI;AAAA,MAAE,OAAO;AAAA,MAAG,UAAU;AAAA,MAAY,QAAQ;AAAA,IAAE;AAAA,IACrE,UAAA;AAAA,EACE,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MAGZ,SAAS;AAAA,MACT,cAAc;AAAA,MAEd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,MAAM;AAAA,QACN,UAAU;AAAA,QACV,KAAK;AAAA,QACL,WAAW;AAAA,MACb;AAAA,MAEC,UAAA;AAAA,IACE,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,KAAK;AAAA,QAAI,UAAU;AAAA,QAAG,OAAO;AAAA,MAAO;AAAA,MAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,UAAU;AAAA,UAAG,OAAO;AAAA,QAAO;AAAA,QAA9D,UAAA,CAGE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,YAAY,IAAI;AAAA,UAAG,UAAU;AAAA,UAAM,SAAS;AAAA,UACrD,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
1
+ {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /**\n * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics\n * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).\n * Both render at weight 600.\n */\n nameVariant?: 'body1' | 'body2'\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 (13/16) or body1 (15/20) metrics at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. A long name\n wraps, centred, across the card's width. */}\n <Text sx={{ fontWeight: 600, textAlign: 'center' }} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AAoDA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,QAAA,GACA,UAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,SAAS;AAAA,IACT,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,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A;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
@@ -1,34 +1,34 @@
1
- import { useAppConfig as K, useGlobalCopyStore as Y, useGlobalStore as $, useInsightsV2Store as q } from "../../common/context/hooks.es.js";
2
- import { sendClientConfiguredCta as J } from "../../common/utils/PostMessage.es.js";
3
- import { BeatActionsProvider as Q } from "../beatActions.es.js";
4
- import { isContactSupportCtaDisabled as Z } from "../actionBlocks/ContactSupportActionBlock.es.js";
5
- import { reportCtaClick as oo } from "../ctaActions/runCtaAction.es.js";
6
- import { useBeatCtaActions as eo } from "../ctaActions/useCtaAction.es.js";
7
- import { actionBlocksKey as io } from "../mappings/actionBlocksKey.es.js";
8
- import { logoFromRef as to } from "./shared/EntityLogo.es.js";
9
- import { CtaStatus as ro } from "./CtaStatus.es.js";
10
- import no from "./FeedbackDialog.es.js";
11
- import { ErrorCard as so } from "./ErrorCard.es.js";
12
- import { blocks as ao } from "../mappings/blocks.es.js";
13
- import { ActionBlockLayer as lo } from "../actionBlocks/ActionBlockLayer.es.js";
14
- import co from "./Footer.es.js";
15
- import mo from "./Header.es.js";
16
- import { FeedbackBar as po } from "./FeedbackBar.es.js";
17
- import { DismissInsightDialog as uo } from "./DismissInsightDialog.es.js";
18
- import { HiddenConfirmationCard as fo } from "./HiddenConfirmationCard.es.js";
19
- import { LoadingCard as bo } from "./LoadingCard.es.js";
20
- import { ObsolesceBanner as Co } from "./ObsolesceBanner.es.js";
21
- import { useBeatFeedbackFlow as ho } from "../hooks/useBeatFeedbackFlow.es.js";
22
- import { useMemo as go } from "react";
23
- import { observer as yo } from "mobx-react-lite";
24
- import x from "@mui/material/Stack";
25
- import { P as _o } from "@mxenabled/mxui";
26
- import p from "@mui/material/Button";
27
- import { ChevronRight as A } from "@mxenabled/mx-icons";
28
- import { Fragment as ko, jsx as e, jsxs as u } from "react/jsx-runtime";
29
- import xo from "@mui/material/Box";
30
- import vo from "@mui/material/Card";
31
- var So = {}, wo = {
1
+ import { useAppConfig as Q, useGlobalCopyStore as Z, useGlobalStore as tt, useInsightsV2Store as ot } from "../../common/context/hooks.es.js";
2
+ import { sendClientConfiguredCta as it } from "../../common/utils/PostMessage.es.js";
3
+ import { BeatActionsProvider as et } from "../beatActions.es.js";
4
+ import { isContactSupportCtaDisabled as nt } from "../actionBlocks/ContactSupportActionBlock.es.js";
5
+ import { CtaStatus as rt } from "./CtaStatus.es.js";
6
+ import { reportCtaClick as st } from "../ctaActions/runCtaAction.es.js";
7
+ import { useBeatCtaActions as at } from "../ctaActions/useCtaAction.es.js";
8
+ import { actionBlocksKey as lt } from "../mappings/actionBlocksKey.es.js";
9
+ import { logoFromRef as ct } from "./shared/EntityLogo.es.js";
10
+ import dt from "./FeedbackDialog.es.js";
11
+ import { ErrorCard as mt } from "./ErrorCard.es.js";
12
+ import { blocks as pt } from "../mappings/blocks.es.js";
13
+ import { ActionBlockLayer as ut } from "../actionBlocks/ActionBlockLayer.es.js";
14
+ import ft from "./Footer.es.js";
15
+ import bt from "./Header.es.js";
16
+ import { FeedbackBar as Ct } from "./FeedbackBar.es.js";
17
+ import { DismissInsightDialog as ht } from "./DismissInsightDialog.es.js";
18
+ import { HiddenConfirmationCard as gt } from "./HiddenConfirmationCard.es.js";
19
+ import { LoadingCard as yt } from "./LoadingCard.es.js";
20
+ import { ObsolesceBanner as kt } from "./ObsolesceBanner.es.js";
21
+ import { useBeatFeedbackFlow as xt } from "../hooks/useBeatFeedbackFlow.es.js";
22
+ import { useMemo as _t } from "react";
23
+ import { observer as vt } from "mobx-react-lite";
24
+ import v from "@mui/material/Stack";
25
+ import { P as St } from "@mxenabled/mxui";
26
+ import u from "@mui/material/Button";
27
+ import { ChevronRight as I } from "@mxenabled/mx-icons";
28
+ import { Fragment as wt, jsx as o, jsxs as f } from "react/jsx-runtime";
29
+ import Dt from "@mui/material/Box";
30
+ import Lt from "@mui/material/Card";
31
+ var Tt = {}, Bt = {
32
32
  position: "absolute",
33
33
  top: 0,
34
34
  left: 0,
@@ -37,83 +37,97 @@ var So = {}, wo = {
37
37
  backgroundColor: "background.default",
38
38
  opacity: 0.7,
39
39
  zIndex: 3
40
- }, Do = {
40
+ }, At = {
41
41
  alignItems: "center",
42
42
  alignSelf: "flex-start",
43
43
  display: "flex",
44
+ fontSize: 13,
44
45
  fontWeight: 600,
45
- height: 44,
46
- px: 2,
46
+ height: "auto",
47
+ justifyContent: "flex-start",
48
+ lineHeight: "16px",
49
+ minHeight: 24,
50
+ minWidth: 0,
51
+ px: 0,
52
+ py: 4,
53
+ textAlign: "left",
47
54
  textTransform: "none"
48
- }, Bo = {
55
+ }, It = {
56
+ display: "-webkit-box",
57
+ overflow: "hidden",
58
+ WebkitBoxOrient: "vertical",
59
+ WebkitLineClamp: 3
60
+ }, Ot = {
49
61
  color: "text.secondary",
62
+ height: 40,
63
+ minHeight: 40,
50
64
  fontSize: 13,
51
65
  fontWeight: 600,
52
66
  lineHeight: "16px",
53
67
  "&.Mui-disabled": { color: "text.disabled" }
54
- }, re = yo(({ beat: i, beatActions: l = So, obsolete: C, isLoading: O = !1, isError: I = !1 }) => {
55
- const F = Y(), R = q(), { config: E } = K(), o = ho(i, l), v = $(), { runCta: M, primary: h, secondary: S } = eo(i, l, i.insights_payload?.primary_cta, i.insights_payload?.secondary_cta), f = i.insights_payload?.widget_type === "mini", N = go(() => ({
56
- ...o.wrappedActions,
68
+ }, co = vt(({ beat: i, beatActions: c = Tt, obsolete: h, isLoading: O = !1, isError: F = !1 }) => {
69
+ const R = Z(), E = ot(), { config: H } = Q(), t = xt(i, c), S = tt(), { runCta: M, primary: g, secondary: w, action: N } = at(i, c, i.insights_payload?.primary_cta, i.insights_payload?.secondary_cta), s = i.insights_payload?.widget_type === "mini", W = _t(() => ({
70
+ ...t.wrappedActions,
57
71
  beat: i
58
- }), [o.wrappedActions, i]);
59
- if (I) return /* @__PURE__ */ e(so, {});
60
- const t = i.insights_payload;
61
- if (!t || o.cardState === "dismissed") return null;
62
- const { instance_slot: H, primary_cta: n, secondary_cta: s, sub_title: P, title: W, guid: w, dismissed_at: G } = t, { block: V } = H, z = P ?? (t.subtitle ? {
63
- logo: to(t.logo),
64
- text: t.subtitle
65
- } : void 0), c = (a) => Z(a, E, l.onContactSupport), D = async (a, m) => {
66
- if (!c(m.block)) {
67
- if (m.block === io.CONTACT_SUPPORT_ACTION_BLOCK) {
68
- oo({
72
+ }), [t.wrappedActions, i]);
73
+ if (F) return /* @__PURE__ */ o(mt, {});
74
+ const e = i.insights_payload;
75
+ if (!e || t.cardState === "dismissed") return null;
76
+ const { instance_slot: P, primary_cta: r, secondary_cta: a, sub_title: z, title: G, guid: D, dismissed_at: V } = e, { block: X } = P, j = z ?? (e.subtitle ? {
77
+ logo: ct(e.logo),
78
+ text: e.subtitle
79
+ } : void 0), d = (l) => nt(l, H, c.onContactSupport), L = async (l, p) => {
80
+ if (!d(p.block)) {
81
+ if (p.block === lt.CONTACT_SUPPORT_ACTION_BLOCK) {
82
+ st({
69
83
  beat: i,
70
- stores: v,
71
- hostActions: l,
72
- slot: a
73
- }), l.onContactSupport?.();
84
+ stores: S,
85
+ hostActions: c,
86
+ slot: l
87
+ }), c.onContactSupport?.();
74
88
  return;
75
89
  }
76
- await M(a, m);
90
+ await M(l, p);
77
91
  }
78
- }, B = ao[V], d = t.in_description_cta, g = !f && d?.label && d.block ? d : void 0, y = n?.label || (g ? void 0 : d?.label) || void 0, b = !f && !!n?.label, L = i.in_description_cta || i.html_in_description_cta, U = () => {
79
- const { is_mobile_webview: a, clientConfig: m } = v.appDataStore.appConfig;
80
- J(i.template, {
81
- isMobileWebview: a,
82
- webviewScheme: m?.master?.ui_message_webview_url_scheme,
83
- userGuid: t.user_guid ?? i.user_guid
92
+ }, T = pt[X], m = e.in_description_cta, y = !s && m?.label && m.block ? m : void 0, U = r?.label || (y ? void 0 : m?.label) || void 0, b = !s && !!r?.label, B = i.in_description_cta || i.html_in_description_cta, K = () => {
93
+ const { is_mobile_webview: l, clientConfig: p } = S.appDataStore.appConfig;
94
+ it(i.template, {
95
+ isMobileWebview: l,
96
+ webviewScheme: p?.master?.ui_message_webview_url_scheme,
97
+ userGuid: e.user_guid ?? i.user_guid
84
98
  });
85
- }, r = b ? h.presentation : void 0, X = r?.kind === "hidden" && !!r.hideAll, T = !f && !!s?.label && !X, j = !!y && r?.kind !== "hidden" || T, _ = F.insights_feed?.general, k = C?.state === "not_refreshable" && !G && !!_;
86
- return /* @__PURE__ */ e(Q, {
87
- value: N,
88
- children: /* @__PURE__ */ u(x, {
99
+ }, n = b ? g.presentation : void 0, Y = n?.kind === "hidden" && !!n.hideAll, A = !s && !!a?.label && !Y, C = s ? N.presentation : void 0, $ = C?.kind === "status" ? C : void 0, k = C ? $?.action?.label : U, q = C?.title || G || "", J = !!k && n?.kind !== "hidden" || A, x = R.insights_feed?.general, _ = h?.state === "not_refreshable" && !V && !!x;
100
+ return /* @__PURE__ */ o(et, {
101
+ value: W,
102
+ children: /* @__PURE__ */ f(v, {
89
103
  sx: { mb: 16 },
90
104
  children: [
91
- o.cardState === "confirming" ? /* @__PURE__ */ e(fo, {
92
- onClose: o.collapseConfirmation,
93
- onLeaveFeedback: o.openHideSurvey,
94
- onUndo: o.undoDismiss
95
- }) : /* @__PURE__ */ u(ko, { children: [C && _ && /* @__PURE__ */ e(Co, {
96
- ...C,
97
- copy: _
98
- }), /* @__PURE__ */ u(vo, {
99
- inert: k,
100
- sx: { ...k && {
105
+ t.cardState === "confirming" ? /* @__PURE__ */ o(gt, {
106
+ onClose: t.collapseConfirmation,
107
+ onLeaveFeedback: t.openHideSurvey,
108
+ onUndo: t.undoDismiss
109
+ }) : /* @__PURE__ */ f(wt, { children: [h && x && /* @__PURE__ */ o(kt, {
110
+ ...h,
111
+ copy: x
112
+ }), /* @__PURE__ */ f(Lt, {
113
+ inert: _,
114
+ sx: { ..._ && {
101
115
  position: "relative",
102
116
  zIndex: 2,
103
117
  pointerEvents: "none"
104
118
  } },
105
119
  children: [
106
- k && /* @__PURE__ */ e(xo, { sx: wo }),
107
- /* @__PURE__ */ e(mo, {
108
- isMini: f,
109
- subtitle: z,
110
- title: W ?? ""
120
+ _ && /* @__PURE__ */ o(Dt, { sx: Bt }),
121
+ /* @__PURE__ */ o(bt, {
122
+ isMini: s,
123
+ subtitle: j,
124
+ title: q
111
125
  }),
112
- O ? /* @__PURE__ */ e(bo, {}) : B && /* @__PURE__ */ e(B, {
113
- beatGuid: w,
114
- payload: t
126
+ O ? /* @__PURE__ */ o(yt, {}) : T && /* @__PURE__ */ o(T, {
127
+ beatGuid: D,
128
+ payload: e
115
129
  }),
116
- /* @__PURE__ */ u(x, {
130
+ /* @__PURE__ */ f(v, {
117
131
  sx: {
118
132
  gap: 6,
119
133
  pb: 16,
@@ -121,15 +135,18 @@ var So = {}, wo = {
121
135
  px: 16
122
136
  },
123
137
  children: [
124
- /* @__PURE__ */ e(_o, {
125
- dangerouslySetInnerHTML: { __html: t.description.html_text },
126
- sx: { fontWeight: "fontWeightRegular" },
138
+ /* @__PURE__ */ o(St, {
139
+ dangerouslySetInnerHTML: { __html: e.description.html_text },
140
+ sx: {
141
+ fontWeight: "fontWeightRegular",
142
+ ...s && It
143
+ },
127
144
  variant: "subtitle2"
128
145
  }),
129
- g && /* @__PURE__ */ e(p, {
130
- endIcon: /* @__PURE__ */ e(A, {}),
131
- onClick: () => R.openActionDrawer({
132
- guid: w,
146
+ y && /* @__PURE__ */ o(u, {
147
+ endIcon: /* @__PURE__ */ o(I, {}),
148
+ onClick: () => E.openActionDrawer({
149
+ guid: D,
133
150
  trigger: "inDescriptionCta"
134
151
  }),
135
152
  sx: {
@@ -137,91 +154,93 @@ var So = {}, wo = {
137
154
  p: 4,
138
155
  width: "max-content"
139
156
  },
140
- children: g.label
157
+ children: y.label
141
158
  }),
142
- !d?.label && L && /* @__PURE__ */ e(p, {
143
- endIcon: /* @__PURE__ */ e(A, {}),
144
- onClick: U,
159
+ !m?.label && B && /* @__PURE__ */ o(u, {
160
+ endIcon: /* @__PURE__ */ o(I, {}),
161
+ onClick: K,
145
162
  sx: {
146
163
  height: 24,
147
164
  p: 4,
148
165
  width: "max-content"
149
166
  },
150
- children: L
167
+ children: B
151
168
  })
152
169
  ]
153
170
  }),
154
- j && /* @__PURE__ */ u(x, {
171
+ J && /* @__PURE__ */ f(v, {
155
172
  sx: {
156
173
  gap: 8,
157
174
  pb: 16,
158
175
  px: 16
159
176
  },
160
177
  children: [
161
- y && !b && /* @__PURE__ */ e(p, {
162
- sx: Do,
178
+ k && !b && /* @__PURE__ */ o(u, {
179
+ sx: At,
163
180
  variant: "text",
164
- children: y
181
+ children: k
165
182
  }),
166
- b && n && r?.kind === "status" && /* @__PURE__ */ e(ro, {
167
- action: r.action,
168
- icon: r.icon,
169
- label: r.label,
170
- tone: r.tone
183
+ b && r && n?.kind === "status" && /* @__PURE__ */ o(rt, {
184
+ action: n.action,
185
+ sx: n.sx,
186
+ variant: n.variant,
187
+ icon: n.icon,
188
+ label: n.label,
189
+ tone: n.tone
171
190
  }),
172
- b && n && !r && /* @__PURE__ */ e(p, {
173
- "aria-disabled": c(n.block) || h.disabled,
174
- disabled: h.disabled,
175
- onClick: () => D("primary", n),
176
- sx: { ...c(n.block) && { color: "text.disabled" } },
191
+ b && r && !n && /* @__PURE__ */ o(u, {
192
+ "aria-disabled": d(r.block) || g.disabled,
193
+ disabled: g.disabled,
194
+ onClick: () => L("primary", r),
195
+ sx: { ...d(r.block) && { color: "text.disabled" } },
177
196
  variant: "outlined",
178
- children: n.label
197
+ children: r.label
179
198
  }),
180
- T && s && /* @__PURE__ */ e(p, {
181
- "aria-disabled": c(s.block) || S.disabled,
199
+ A && a && /* @__PURE__ */ o(u, {
200
+ "aria-disabled": d(a.block) || w.disabled,
182
201
  color: "inherit",
183
- disabled: S.disabled,
184
- onClick: () => D("secondary", s),
202
+ disabled: w.disabled,
203
+ onClick: () => L("secondary", a),
185
204
  sx: {
186
- ...Bo,
187
- ...c(s.block) && { color: "text.disabled" }
205
+ ...Ot,
206
+ ...d(a.block) && { color: "text.disabled" }
188
207
  },
189
- children: s.label
208
+ children: a.label
190
209
  })
191
210
  ]
192
211
  }),
193
- /* @__PURE__ */ e(po, {
194
- onTellUsMore: o.openRatingSurvey,
195
- show: o.isFeedbackBarShown
212
+ /* @__PURE__ */ o(Ct, {
213
+ onTellUsMore: t.openRatingSurvey,
214
+ show: t.isFeedbackBarShown
196
215
  })
197
216
  ]
198
217
  })] }),
199
- /* @__PURE__ */ e(lo, { beat: i }),
200
- /* @__PURE__ */ e(uo, {
201
- isOpen: o.isDismissOpen,
202
- onClose: o.closeDismissDialog,
203
- onDismiss: o.confirmDismiss
218
+ /* @__PURE__ */ o(ut, { beat: i }),
219
+ /* @__PURE__ */ o(ht, {
220
+ isOpen: t.isDismissOpen,
221
+ onClose: t.closeDismissDialog,
222
+ onDismiss: t.confirmDismiss
204
223
  }),
205
- o.isSurveyOpen && /* @__PURE__ */ e(no, {
206
- characterLimitLabel: o.survey.characterLimitLabel,
207
- closeAriaLabel: o.survey.closeAriaLabel,
224
+ t.isSurveyOpen && /* @__PURE__ */ o(dt, {
225
+ characterLimitLabel: t.survey.characterLimitLabel,
226
+ closeAriaLabel: t.survey.closeAriaLabel,
208
227
  isOpen: !0,
209
- onBackClick: o.feedbackDialogCallbacks.onBackClick,
210
- onClose: o.closeSurvey,
211
- onSubmit: o.submitSurvey,
212
- onTextInputFocus: o.feedbackDialogCallbacks.onTextInputFocus,
213
- options: o.survey.options,
214
- primaryText: o.survey.submitText,
215
- secondaryText: o.survey.backText,
216
- title: o.survey.title
228
+ onBackClick: t.feedbackDialogCallbacks.onBackClick,
229
+ onClose: t.closeSurvey,
230
+ onSubmit: t.submitSurvey,
231
+ onTextInputFocus: t.feedbackDialogCallbacks.onTextInputFocus,
232
+ options: t.survey.options,
233
+ primaryText: t.survey.submitText,
234
+ secondaryText: t.survey.backText,
235
+ title: t.survey.title
217
236
  }),
218
- o.cardState === "visible" && t.footer && /* @__PURE__ */ e(co, { footer: t.footer })
237
+ t.cardState === "visible" && e.footer && /* @__PURE__ */ o(ft, { footer: e.footer })
219
238
  ]
220
239
  })
221
240
  });
222
241
  });
223
242
  export {
224
- re as default
243
+ co as default
225
244
  };
226
245
 
227
246
  //# sourceMappingURL=BaseLayout.es.js.map