@mx-cartographer/experiences 9.7.96 → 9.7.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [9.7.98] - 11-04-2026
2
+
3
+ - **FIXED** - Celebrate Credit Card Payoff card spacing matches Figma (WEC-2170)
4
+ - **FIXED** - Insight card titles stay on one line and end with an ellipsis when too long (WEC-2170)
5
+
6
+ ## [9.7.97] - 11-03-2026
7
+
8
+ - **ADDED** - HSA Deposit beat on Insights 2.0: the `with_header_footer` transaction card whose CTA opens Transaction Details for one deposit and the Transaction List for several (WEC-2214)
9
+ - **FIXED** - `BaseLayout` no longer throws on a `null` primary or secondary CTA (WEC-2214)
10
+
1
11
  ## [9.7.96] - 11-03-2026
2
12
 
3
13
  - **FIXED** - Monthly Spend legend drops amount (MEW2-3428)
@@ -30,7 +30,7 @@ var vo = ({ payload: g }) => {
30
30
  flexShrink: 0,
31
31
  height: 32,
32
32
  position: "relative",
33
- width: 44
33
+ width: 48
34
34
  },
35
35
  children: /* @__PURE__ */ o(E, {
36
36
  "aria-hidden": !0,
@@ -1 +1 @@
1
- {"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to the card's real 44x32 footprint and shift the SVG up so it aligns with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 44 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={layoutConfig.logo_icon_size ?? 24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n // V2 sends it resolved as `data.secondary_text`; the flat fields remain the fallback.\n const dataSecondaryText = slot<unknown>(data, 'secondary_text')\n const payer =\n (typeof dataSecondaryText === 'string' && dataSecondaryText) ||\n (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,SAAA,GAAS,kBAAA,GAAkB,kBAAA,GAAkB,WAAA,GAAW,eAAA,EAAA,IAAkB;AAElF,MAAI,EAAyB,CAAO,EAAG,QAAO,gBAAA,EAAC,GAAD,EAA+B,SAAA,EAAU,CAAA;AAMvF,QAAM,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAa,EAAc,GAAM,QAAQ,GACzC,IAAS,IACX,OAAO,KAAe,YAAY,OAAO,SAAS,CAAU,IAC1D,IACA,SACF,EAAc,QAGZ,IAAc,EAAc,GAAM,UAAU,GAC5C,IAAY,OAAO,KAAgB,WA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../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to Figma's 48px graphic frame (the card is 44x32) and shift the SVG up so it aligns\n // with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 48 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={layoutConfig.logo_icon_size ?? 24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n // V2 sends it resolved as `data.secondary_text`; the flat fields remain the fallback.\n const dataSecondaryText = slot<unknown>(data, 'secondary_text')\n const payer =\n (typeof dataSecondaryText === 'string' && dataSecondaryText) ||\n (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EA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O,IAAI;AAAA,YAAE,KAAK;AAAA,YAAG,eAAe;AAAA,YAAO,YAAY;AAAA,UAAS;AAAA,UAAhE,UAAA,CACG,EAAa,YACZ,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAM,MAAM,EAAa;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA,GAE3E,KACC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
@@ -60,7 +60,7 @@ var e = { background: t }, s = (o) => ({
60
60
  graphic: "paidOffCard",
61
61
  amountVariant: "h2",
62
62
  rowSx: {
63
- gap: 24,
63
+ gap: 16,
64
64
  px: 24,
65
65
  py: 16
66
66
  },
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n ERROR_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 24, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";;AAqDA,IAAM,IAAsC,EAC1C,YAAY,EACd,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAA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Z,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n ERROR_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** Glyph size in px for an `ICO-` logo: on the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\n logo_icon_size?: number\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n}\n\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background: ERROR_WASH_GRADIENT,\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 16, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";;AAqDA,IAAM,IAAsC,EAC1C,YAAY,EACd,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IAEpB,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EACA,0BAA0B;AAAA,IACxB,YAAY;AAAA,IACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,IACrE,mBAAmB;AAAA,IACnB,YACE;AAAA,EACJ;AAAA,EAGA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
@@ -14,15 +14,15 @@ import { blocks as bo } from "../mappings/blocks.es.js";
14
14
  import { ActionBlockLayer as _o } from "../actionBlocks/ActionBlockLayer.es.js";
15
15
  import ko from "./Footer.es.js";
16
16
  import yo from "./Header.es.js";
17
- import { FeedbackBar as xo } from "./FeedbackBar.es.js";
18
- import { DismissInsightDialog as vo } from "./DismissInsightDialog.es.js";
17
+ import { FeedbackBar as vo } from "./FeedbackBar.es.js";
18
+ import { DismissInsightDialog as xo } from "./DismissInsightDialog.es.js";
19
19
  import { HiddenConfirmationCard as So } from "./HiddenConfirmationCard.es.js";
20
20
  import { LoadingCard as To } from "./LoadingCard.es.js";
21
21
  import { ObsolesceBanner as Lo } from "./ObsolesceBanner.es.js";
22
22
  import { useBeatFeedbackFlow as wo } from "../hooks/useBeatFeedbackFlow.es.js";
23
23
  import { useMemo as Ao } from "react";
24
24
  import { observer as Bo } from "mobx-react-lite";
25
- import v from "@mui/material/Stack";
25
+ import x from "@mui/material/Stack";
26
26
  import { P as Do } from "@mxenabled/mxui";
27
27
  import f from "@mui/material/Button";
28
28
  import { ChevronRight as I } from "@mxenabled/mx-icons";
@@ -66,7 +66,7 @@ var Eo = {}, Ho = {
66
66
  py: 12,
67
67
  "&.Mui-disabled": { color: "text.disabled" }
68
68
  }, Ci = Bo(({ beat: t, beatActions: l = Eo, obsolete: g, isLoading: F = !1, isError: E = !1 }) => {
69
- const H = eo(), P = ro(), { config: M } = to(), o = wo(t, l), b = no(), { runCta: N, primary: _, secondary: T, linkPresentation: R } = uo(t, l, t.insights_payload?.primary_cta, t.insights_payload?.secondary_cta, t.insights_payload?.in_description_cta), c = t.insights_payload?.widget_type === "mini", W = Ao(() => ({
69
+ const H = eo(), P = ro(), { config: M } = to(), o = wo(t, l), b = no(), { runCta: N, primary: _, secondary: T, linkPresentation: R } = uo(t, l, t.insights_payload?.primary_cta ?? void 0, t.insights_payload?.secondary_cta ?? void 0, t.insights_payload?.in_description_cta ?? void 0), c = t.insights_payload?.widget_type === "mini", W = Ao(() => ({
70
70
  ...o.wrappedActions,
71
71
  beat: t
72
72
  }), [o.wrappedActions, t]);
@@ -106,10 +106,10 @@ var Eo = {}, Ho = {
106
106
  template: t.template,
107
107
  handler: "cardClick"
108
108
  })));
109
- }, y = H.insights_feed?.general, x = g?.state === "not_refreshable" && !V && !!y;
109
+ }, y = H.insights_feed?.general, v = g?.state === "not_refreshable" && !V && !!y;
110
110
  return /* @__PURE__ */ i(ao, {
111
111
  value: W,
112
- children: /* @__PURE__ */ C(v, {
112
+ children: /* @__PURE__ */ C(x, {
113
113
  sx: { mb: 16 },
114
114
  children: [
115
115
  o.cardState === "confirming" ? /* @__PURE__ */ i(So, {
@@ -120,14 +120,14 @@ var Eo = {}, Ho = {
120
120
  ...g,
121
121
  copy: y
122
122
  }), /* @__PURE__ */ C(Fo, {
123
- inert: x,
124
- sx: { ...x && {
123
+ inert: v,
124
+ sx: { ...v && {
125
125
  position: "relative",
126
126
  zIndex: 2,
127
127
  pointerEvents: "none"
128
128
  } },
129
129
  children: [
130
- x && /* @__PURE__ */ i(Io, { sx: Ho }),
130
+ v && /* @__PURE__ */ i(Io, { sx: Ho }),
131
131
  /* @__PURE__ */ i(yo, {
132
132
  isMini: c,
133
133
  subtitle: K,
@@ -137,7 +137,7 @@ var Eo = {}, Ho = {
137
137
  beatGuid: L,
138
138
  payload: e
139
139
  }),
140
- /* @__PURE__ */ C(v, {
140
+ /* @__PURE__ */ C(x, {
141
141
  sx: {
142
142
  gap: 6,
143
143
  pb: 16,
@@ -173,7 +173,7 @@ var Eo = {}, Ho = {
173
173
  })
174
174
  ]
175
175
  }),
176
- Z && /* @__PURE__ */ C(v, {
176
+ Z && /* @__PURE__ */ C(x, {
177
177
  sx: {
178
178
  gap: 8,
179
179
  pb: 16,
@@ -208,14 +208,14 @@ var Eo = {}, Ho = {
208
208
  })
209
209
  ]
210
210
  }),
211
- /* @__PURE__ */ i(xo, {
211
+ /* @__PURE__ */ i(vo, {
212
212
  onTellUsMore: o.openRatingSurvey,
213
213
  show: o.isFeedbackBarShown
214
214
  })
215
215
  ]
216
216
  })] }),
217
217
  /* @__PURE__ */ i(_o, { beat: t }),
218
- /* @__PURE__ */ i(vo, {
218
+ /* @__PURE__ */ i(xo, {
219
219
  isOpen: o.isDismissOpen,
220
220
  onClose: o.closeDismissDialog,
221
221
  onDismiss: o.confirmDismiss
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLayout.es.js","names":[],"sources":["../../../src/insights-v2/components/BaseLayout.tsx"],"sourcesContent":["import { type MouseEvent, useMemo } from 'react'\n\nimport { observer } from 'mobx-react-lite'\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 { ChevronRight } from '@mxenabled/mx-icons'\nimport { P } from '@mxenabled/mxui'\n\nimport { blocks } from '../mappings/blocks'\nimport { actionBlocksKey } from '../mappings/actionBlocksKey'\nimport { isContactSupportCtaDisabled } from '../actionBlocks/ContactSupportActionBlock'\nimport { logoFromRef } from './shared/EntityLogo'\n\nimport Footer from './Footer'\nimport Header from './Header'\nimport FeedbackBar from './FeedbackBar'\nimport FeedbackDialog from './FeedbackDialog'\nimport DismissInsightDialog from './DismissInsightDialog'\nimport HiddenConfirmationCard from './HiddenConfirmationCard'\nimport ErrorCard from './ErrorCard'\nimport LoadingCard from './LoadingCard'\nimport { ObsolesceBanner, type ObsolesceBannerState } from './ObsolesceBanner'\nimport { useAppConfig, useGlobalCopyStore, useGlobalStore, useInsightsV2Store } from '../../common'\nimport { sendClientConfiguredCta } from '../../common/utils/PostMessage'\nimport type { Beat, PrimaryCTA, SecondaryCTA } from '../../core'\nimport { BeatActionsProvider, type BeatActions } from '../beatActions'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { HOST_ACTIONS, reportCtaClick, useBeatCtaActions } from '../ctaActions'\nimport { CtaStatus } from './CtaStatus'\nimport { useBeatFeedbackFlow } from '../hooks/useBeatFeedbackFlow'\n\nexport interface ObsoleteState {\n state: ObsolesceBannerState\n onRefresh: () => void\n onDismiss: () => void\n}\n\ninterface BaseLayoutProps {\n beat: Beat\n beatActions?: BeatActions\n obsolete?: ObsoleteState\n /** Swap only the block slot for a LoadingCard (e.g. while a sampled beat loads). */\n isLoading?: boolean\n /** Replace the entire card with an ErrorCard (e.g. when the sample fails to load). */\n isError?: boolean\n}\n\nconst NO_BEAT_ACTIONS: BeatActions = {}\n\nconst OBSOLETE_OVERLAY_SX = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'background.default',\n opacity: 0.7,\n // Above every block's own z-index (hero card 1, AccountBlock 2), or that section shows through.\n zIndex: 3,\n} as const\n\n// Figma's 24px text link: 13/16 semibold, 16px line plus 4px above and below, its text starting at the\n// card's 16px inset. A minimum height, not the theme's fixed 44px Button height, so a long or translated\n// label wraps instead of overflowing; MUI's 64px minimum width and centring are undone for the same inset.\n// The in-description links use it as is, with the Button's 20px chevron, so they are 28px tall, as in\n// Figma's Low Account Balance full card (node 438:27877); the 24px is the mini CTA's, which has no icon.\nconst TEXT_LINK_SX = {\n alignSelf: 'flex-start',\n fontSize: 13,\n fontWeight: 600,\n height: 'auto',\n justifyContent: 'flex-start',\n lineHeight: '16px',\n minHeight: 24,\n minWidth: 0,\n px: 0,\n py: 4,\n textAlign: 'left',\n} as const\n\n// Mini CTA label, which fits Pulse's 312px mini slide as a text link.\nconst MINI_CTA_SX = {\n ...TEXT_LINK_SX,\n alignItems: 'center',\n display: 'flex',\n textTransform: 'none',\n} as const\n\n// Full card's secondary CTA (e.g. Fee Detected's Contact Support): a quiet text button, 13/16\n// semibold in text.secondary, at least 40px tall with 12/16 padding, as in Figma. `color=\"inherit\"` keeps\n// hover, ripple and focus off the primary palette. An unavailable CTA (contact_support_block with no host\n// handler) is dimmed at the call site, as the primary CTA is, because it is only aria-disabled and so\n// never matches `.Mui-disabled`.\nconst SECONDARY_CTA_SX = {\n color: 'text.secondary',\n fontSize: 13,\n fontWeight: 600,\n height: 'auto',\n lineHeight: '16px',\n minHeight: 40,\n px: 16,\n py: 12,\n '&.Mui-disabled': { color: 'text.disabled' },\n} as const\n\nconst BaseLayout = observer(\n ({\n beat,\n beatActions = NO_BEAT_ACTIONS,\n obsolete,\n isLoading = false,\n isError = false,\n }: BaseLayoutProps) => {\n const copy = useGlobalCopyStore()\n const insightsV2Store = useInsightsV2Store()\n const { config } = useAppConfig()\n const flow = useBeatFeedbackFlow(beat, beatActions)\n\n const stores = useGlobalStore()\n const {\n runCta: handleCtaClick,\n primary: primaryCtaState,\n secondary: secondaryCtaState,\n linkPresentation,\n } = useBeatCtaActions(\n beat,\n beatActions,\n beat.insights_payload?.primary_cta,\n beat.insights_payload?.secondary_cta,\n beat.insights_payload?.in_description_cta,\n )\n\n // Guard: payload may not be loaded yet (isLoading/isError states).\n const isMini = beat.insights_payload?.widget_type === 'mini'\n\n // Memoized: an inline object here would change identity every render, making every\n // useAnalyticsEvent() consumer's callback (and its effect deps) unstable too.\n const beatActionsValue = useMemo(\n () => ({ ...flow.wrappedActions, beat }),\n [flow.wrappedActions, beat],\n )\n\n // Error replaces the entire card; loading only swaps the block slot (below).\n if (isError) return <ErrorCard />\n\n const insights_payload = beat.insights_payload\n\n if (!insights_payload) return null\n if (flow.cardState === 'dismissed') return null\n\n const { instance_slot, primary_cta, secondary_cta, sub_title, title, guid, dismissed_at } =\n insights_payload\n const { block } = instance_slot\n\n // Rebuild V1 subtitle shape; sub_title wins if present.\n const subtitle =\n sub_title ??\n (insights_payload.subtitle\n ? {\n logo: logoFromRef(insights_payload.logo),\n text: insights_payload.subtitle,\n }\n : undefined)\n\n // CTAs run via ctaActions; contact_support_block bypasses it.\n const isCtaDisabled = (ctaBlock: string | null | undefined) =>\n isContactSupportCtaDisabled(ctaBlock, config, beatActions.onContactSupport)\n\n const onCtaClick = async (slot: 'primary' | 'secondary', cta: PrimaryCTA | SecondaryCTA) => {\n if (isCtaDisabled(cta.block)) return\n\n if (cta.block === actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK) {\n // Bypasses the runner, but still reports the press like any other CTA: the generic\n // press event, and (on a first primary press) FIRST_TIME_PRIMARY_ACTION_SELECTED +\n // cta_clicked_at.\n reportCtaClick({ beat, stores, hostActions: beatActions, slot })\n beatActions.onContactSupport?.()\n return\n }\n\n await handleCtaClick(slot, cta)\n }\n\n const Block = blocks[block as keyof typeof blocks]\n\n const inDescriptionCta = insights_payload.in_description_cta\n // Full card: the envelope's link opens the drawer its block names. A link with no block (mini's\n // \"Make a Transfer\") is the card's action, drawn as the mini label below, never a dead link.\n const envelopeLink =\n !isMini && inDescriptionCta?.label && inDescriptionCta.block ? inDescriptionCta : undefined\n // The card's action label: the primary CTA's, else a block-less envelope link's (ditto ≥ 1.4.3\n // sends mini's action as in_description_cta). `||`, not `??`: the copy may send the primary label\n // as \"\" rather than omit it, and an empty string must fall through. It is a button only on a full\n // card with a primary CTA; otherwise a label, so a tap reaches the host's card handler.\n const ctaLabel =\n primary_cta?.label || (envelopeLink ? undefined : inDescriptionCta?.label) || undefined\n const isCtaButton = !isMini && !!primary_cta?.label\n const clientConfiguredLabel = beat.in_description_cta || beat.html_in_description_cta\n const onClientConfiguredLinkClick = () => {\n const { is_mobile_webview, clientConfig } = stores.appDataStore.appConfig\n\n sendClientConfiguredCta(beat.template, {\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: insights_payload.user_guid ?? beat.user_guid,\n })\n }\n // The primary step's presenter may draw a status or nothing instead of the button (full card only).\n const primaryPresentation = isCtaButton ? primaryCtaState.presentation : undefined\n const hidesAllCtas = primaryPresentation?.kind === 'hidden' && !!primaryPresentation.hideAll\n const showSecondaryCta = !isMini && !!secondary_cta?.label && !hidesAllCtas\n // Mini: the card's action (in_description_cta) mirrors the full card's state, as a label only.\n // Answered → the status's action word (Undo) and its answered title; hidden → no label. The tap\n // stays the host's (it opens the insight with its block), so nothing runs from mini itself.\n const miniPresentation = isMini ? linkPresentation : undefined\n const miniStatus = miniPresentation?.kind === 'status' ? miniPresentation : undefined\n const actionLabel = miniPresentation ? miniStatus?.action?.label : ctaLabel\n const cardTitle = miniPresentation?.title || title || ''\n const showActionLink = !!actionLabel && !isCtaButton\n const showCtaRow = (isCtaButton && primaryPresentation?.kind !== 'hidden') || showSecondaryCta\n const handleMiniActionClick = (event: MouseEvent) => {\n const { onCtaAction } = beatActions\n if (!onCtaAction) return\n event.stopPropagation()\n Promise.resolve()\n .then(() => onCtaAction({ beatGuid: beat.guid, name: HOST_ACTIONS.cardClick }))\n .catch((error) =>\n stores.captureException(error, {\n store: 'BaseLayout',\n template: beat.template,\n handler: 'cardClick',\n }),\n )\n }\n const obsoleteCopy = copy.insights_feed?.general\n const isObsoleteDimmed =\n obsolete?.state === 'not_refreshable' && !dismissed_at && !!obsoleteCopy\n\n return (\n <BeatActionsProvider value={beatActionsValue}>\n <Stack sx={{ mb: 16 }}>\n {flow.cardState === 'confirming' ? (\n <HiddenConfirmationCard\n onClose={flow.collapseConfirmation}\n onLeaveFeedback={flow.openHideSurvey}\n onUndo={flow.undoDismiss}\n />\n ) : (\n <>\n {obsolete && obsoleteCopy && <ObsolesceBanner {...obsolete} copy={obsoleteCopy} />}\n <Card\n inert={isObsoleteDimmed}\n sx={{\n ...(isObsoleteDimmed && {\n position: 'relative',\n zIndex: 2,\n pointerEvents: 'none',\n }),\n }}\n >\n {isObsoleteDimmed && <Box sx={OBSOLETE_OVERLAY_SX} />}\n <Header isMini={isMini} subtitle={subtitle} title={cardTitle} />\n {isLoading ? (\n <LoadingCard />\n ) : (\n Block && <Block beatGuid={guid} payload={insights_payload} />\n )}\n\n <Stack sx={{ gap: 6, pb: 16, pt: 12, px: 16 }}>\n <P\n dangerouslySetInnerHTML={{\n __html: insights_payload.description.html_text,\n }}\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n />\n {/* V2: the envelope's link opens the action block it names. */}\n {envelopeLink && (\n <Button\n endIcon={<ChevronRight />}\n onClick={() =>\n insightsV2Store.openActionDrawer({ guid, trigger: 'inDescriptionCta' })\n }\n sx={TEXT_LINK_SX}\n >\n {envelopeLink.label}\n </Button>\n )}\n {/* The card's action with no primary CTA button, never a drawer: mini hands its tap to\n the host (`cardClick`); a full card's block-less link bubbles to the host's card handler. */}\n {showActionLink && (\n <Button\n onClick={isMini ? handleMiniActionClick : undefined}\n sx={MINI_CTA_SX}\n variant=\"text\"\n >\n {actionLabel}\n </Button>\n )}\n {/* Custom-copy link when the envelope sends none; legacy mini shows it too, so no mini guard. */}\n {!inDescriptionCta?.label && clientConfiguredLabel && (\n <Button\n endIcon={<ChevronRight />}\n onClick={onClientConfiguredLinkClick}\n sx={TEXT_LINK_SX}\n >\n {clientConfiguredLabel}\n </Button>\n )}\n </Stack>\n\n {showCtaRow && (\n <Stack sx={{ gap: 8, pb: 16, px: 16 }}>\n {isCtaButton && primary_cta && primaryPresentation?.kind === 'status' && (\n <CtaStatus\n action={primaryPresentation.action}\n sx={primaryPresentation.sx}\n icon={primaryPresentation.icon}\n label={primaryPresentation.label}\n tone={primaryPresentation.tone}\n />\n )}\n {isCtaButton && primary_cta && !primaryPresentation && (\n <Button\n aria-disabled={isCtaDisabled(primary_cta.block) || primaryCtaState.disabled}\n disabled={primaryCtaState.disabled}\n onClick={() => onCtaClick('primary', primary_cta)}\n sx={{\n ...(isCtaDisabled(primary_cta.block) && { color: 'text.disabled' }),\n }}\n variant=\"outlined\"\n >\n {primary_cta.label}\n </Button>\n )}\n {/* Mini has room for one CTA. */}\n {showSecondaryCta && secondary_cta && (\n <Button\n aria-disabled={\n isCtaDisabled(secondary_cta.block) || secondaryCtaState.disabled\n }\n color=\"inherit\"\n disabled={secondaryCtaState.disabled}\n onClick={() => onCtaClick('secondary', secondary_cta)}\n sx={{\n ...SECONDARY_CTA_SX,\n ...(isCtaDisabled(secondary_cta.block) && { color: 'text.disabled' }),\n }}\n >\n {secondary_cta.label}\n </Button>\n )}\n </Stack>\n )}\n\n <FeedbackBar onTellUsMore={flow.openRatingSurvey} show={flow.isFeedbackBarShown} />\n </Card>\n </>\n )}\n\n <ActionBlockLayer beat={beat} />\n\n <DismissInsightDialog\n isOpen={flow.isDismissOpen}\n onClose={flow.closeDismissDialog}\n onDismiss={flow.confirmDismiss}\n />\n\n {flow.isSurveyOpen && (\n <FeedbackDialog\n characterLimitLabel={flow.survey.characterLimitLabel}\n closeAriaLabel={flow.survey.closeAriaLabel}\n isOpen={true}\n onBackClick={flow.feedbackDialogCallbacks.onBackClick}\n onClose={flow.closeSurvey}\n onSubmit={flow.submitSurvey}\n onTextInputFocus={flow.feedbackDialogCallbacks.onTextInputFocus}\n options={flow.survey.options}\n primaryText={flow.survey.submitText}\n secondaryText={flow.survey.backText}\n title={flow.survey.title}\n />\n )}\n\n {flow.cardState === 'visible' && insights_payload.footer && (\n <Footer footer={insights_payload.footer} />\n )}\n </Stack>\n </BeatActionsProvider>\n )\n },\n)\n\nexport default BaseLayout\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAM,KAA+B,CAAC,GAEhC,KAAsB;AAAA,EAC1B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,SAAS;AAAA,EAET,QAAQ;AACV,GAOM,IAAe;AAAA,EACnB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AACb,GAGM,KAAc;AAAA,EAClB,GAAG;AAAA,EACH,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,eAAe;AACjB,GAOM,KAAmB;AAAA,EACvB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,kBAAkB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EAAC,IAAD,EAAQ,QAAQ,EAAiB,OAAS,CAAA;AAAA,MAEvC;AAAA;EACY,CAAA;AAEzB,CACF"}
1
+ {"version":3,"file":"BaseLayout.es.js","names":[],"sources":["../../../src/insights-v2/components/BaseLayout.tsx"],"sourcesContent":["import { type MouseEvent, useMemo } from 'react'\n\nimport { observer } from 'mobx-react-lite'\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 { ChevronRight } from '@mxenabled/mx-icons'\nimport { P } from '@mxenabled/mxui'\n\nimport { blocks } from '../mappings/blocks'\nimport { actionBlocksKey } from '../mappings/actionBlocksKey'\nimport { isContactSupportCtaDisabled } from '../actionBlocks/ContactSupportActionBlock'\nimport { logoFromRef } from './shared/EntityLogo'\n\nimport Footer from './Footer'\nimport Header from './Header'\nimport FeedbackBar from './FeedbackBar'\nimport FeedbackDialog from './FeedbackDialog'\nimport DismissInsightDialog from './DismissInsightDialog'\nimport HiddenConfirmationCard from './HiddenConfirmationCard'\nimport ErrorCard from './ErrorCard'\nimport LoadingCard from './LoadingCard'\nimport { ObsolesceBanner, type ObsolesceBannerState } from './ObsolesceBanner'\nimport { useAppConfig, useGlobalCopyStore, useGlobalStore, useInsightsV2Store } from '../../common'\nimport { sendClientConfiguredCta } from '../../common/utils/PostMessage'\nimport type { Beat, PrimaryCTA, SecondaryCTA } from '../../core'\nimport { BeatActionsProvider, type BeatActions } from '../beatActions'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { HOST_ACTIONS, reportCtaClick, useBeatCtaActions } from '../ctaActions'\nimport { CtaStatus } from './CtaStatus'\nimport { useBeatFeedbackFlow } from '../hooks/useBeatFeedbackFlow'\n\nexport interface ObsoleteState {\n state: ObsolesceBannerState\n onRefresh: () => void\n onDismiss: () => void\n}\n\ninterface BaseLayoutProps {\n beat: Beat\n beatActions?: BeatActions\n obsolete?: ObsoleteState\n /** Swap only the block slot for a LoadingCard (e.g. while a sampled beat loads). */\n isLoading?: boolean\n /** Replace the entire card with an ErrorCard (e.g. when the sample fails to load). */\n isError?: boolean\n}\n\nconst NO_BEAT_ACTIONS: BeatActions = {}\n\nconst OBSOLETE_OVERLAY_SX = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'background.default',\n opacity: 0.7,\n // Above every block's own z-index (hero card 1, AccountBlock 2), or that section shows through.\n zIndex: 3,\n} as const\n\n// Figma's 24px text link: 13/16 semibold, 16px line plus 4px above and below, its text starting at the\n// card's 16px inset. A minimum height, not the theme's fixed 44px Button height, so a long or translated\n// label wraps instead of overflowing; MUI's 64px minimum width and centring are undone for the same inset.\n// The in-description links use it as is, with the Button's 20px chevron, so they are 28px tall, as in\n// Figma's Low Account Balance full card (node 438:27877); the 24px is the mini CTA's, which has no icon.\nconst TEXT_LINK_SX = {\n alignSelf: 'flex-start',\n fontSize: 13,\n fontWeight: 600,\n height: 'auto',\n justifyContent: 'flex-start',\n lineHeight: '16px',\n minHeight: 24,\n minWidth: 0,\n px: 0,\n py: 4,\n textAlign: 'left',\n} as const\n\n// Mini CTA label, which fits Pulse's 312px mini slide as a text link.\nconst MINI_CTA_SX = {\n ...TEXT_LINK_SX,\n alignItems: 'center',\n display: 'flex',\n textTransform: 'none',\n} as const\n\n// Full card's secondary CTA (e.g. Fee Detected's Contact Support): a quiet text button, 13/16\n// semibold in text.secondary, at least 40px tall with 12/16 padding, as in Figma. `color=\"inherit\"` keeps\n// hover, ripple and focus off the primary palette. An unavailable CTA (contact_support_block with no host\n// handler) is dimmed at the call site, as the primary CTA is, because it is only aria-disabled and so\n// never matches `.Mui-disabled`.\nconst SECONDARY_CTA_SX = {\n color: 'text.secondary',\n fontSize: 13,\n fontWeight: 600,\n height: 'auto',\n lineHeight: '16px',\n minHeight: 40,\n px: 16,\n py: 12,\n '&.Mui-disabled': { color: 'text.disabled' },\n} as const\n\nconst BaseLayout = observer(\n ({\n beat,\n beatActions = NO_BEAT_ACTIONS,\n obsolete,\n isLoading = false,\n isError = false,\n }: BaseLayoutProps) => {\n const copy = useGlobalCopyStore()\n const insightsV2Store = useInsightsV2Store()\n const { config } = useAppConfig()\n const flow = useBeatFeedbackFlow(beat, beatActions)\n\n const stores = useGlobalStore()\n const {\n runCta: handleCtaClick,\n primary: primaryCtaState,\n secondary: secondaryCtaState,\n linkPresentation,\n } = useBeatCtaActions(\n beat,\n beatActions,\n beat.insights_payload?.primary_cta ?? undefined,\n beat.insights_payload?.secondary_cta ?? undefined,\n beat.insights_payload?.in_description_cta ?? undefined,\n )\n\n // Guard: payload may not be loaded yet (isLoading/isError states).\n const isMini = beat.insights_payload?.widget_type === 'mini'\n\n // Memoized: an inline object here would change identity every render, making every\n // useAnalyticsEvent() consumer's callback (and its effect deps) unstable too.\n const beatActionsValue = useMemo(\n () => ({ ...flow.wrappedActions, beat }),\n [flow.wrappedActions, beat],\n )\n\n // Error replaces the entire card; loading only swaps the block slot (below).\n if (isError) return <ErrorCard />\n\n const insights_payload = beat.insights_payload\n\n if (!insights_payload) return null\n if (flow.cardState === 'dismissed') return null\n\n const { instance_slot, primary_cta, secondary_cta, sub_title, title, guid, dismissed_at } =\n insights_payload\n const { block } = instance_slot\n\n // Rebuild V1 subtitle shape; sub_title wins if present.\n const subtitle =\n sub_title ??\n (insights_payload.subtitle\n ? {\n logo: logoFromRef(insights_payload.logo),\n text: insights_payload.subtitle,\n }\n : undefined)\n\n // CTAs run via ctaActions; contact_support_block bypasses it.\n const isCtaDisabled = (ctaBlock: string | null | undefined) =>\n isContactSupportCtaDisabled(ctaBlock, config, beatActions.onContactSupport)\n\n const onCtaClick = async (slot: 'primary' | 'secondary', cta: PrimaryCTA | SecondaryCTA) => {\n if (isCtaDisabled(cta.block)) return\n\n if (cta.block === actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK) {\n // Bypasses the runner, but still reports the press like any other CTA: the generic\n // press event, and (on a first primary press) FIRST_TIME_PRIMARY_ACTION_SELECTED +\n // cta_clicked_at.\n reportCtaClick({ beat, stores, hostActions: beatActions, slot })\n beatActions.onContactSupport?.()\n return\n }\n\n await handleCtaClick(slot, cta)\n }\n\n const Block = blocks[block as keyof typeof blocks]\n\n const inDescriptionCta = insights_payload.in_description_cta\n // Full card: the envelope's link opens the drawer its block names. A link with no block (mini's\n // \"Make a Transfer\") is the card's action, drawn as the mini label below, never a dead link.\n const envelopeLink =\n !isMini && inDescriptionCta?.label && inDescriptionCta.block ? inDescriptionCta : undefined\n // The card's action label: the primary CTA's, else a block-less envelope link's (ditto ≥ 1.4.3\n // sends mini's action as in_description_cta). `||`, not `??`: the copy may send the primary label\n // as \"\" rather than omit it, and an empty string must fall through. It is a button only on a full\n // card with a primary CTA; otherwise a label, so a tap reaches the host's card handler.\n const ctaLabel =\n primary_cta?.label || (envelopeLink ? undefined : inDescriptionCta?.label) || undefined\n const isCtaButton = !isMini && !!primary_cta?.label\n const clientConfiguredLabel = beat.in_description_cta || beat.html_in_description_cta\n const onClientConfiguredLinkClick = () => {\n const { is_mobile_webview, clientConfig } = stores.appDataStore.appConfig\n\n sendClientConfiguredCta(beat.template, {\n isMobileWebview: is_mobile_webview,\n webviewScheme: clientConfig?.master?.ui_message_webview_url_scheme,\n userGuid: insights_payload.user_guid ?? beat.user_guid,\n })\n }\n // The primary step's presenter may draw a status or nothing instead of the button (full card only).\n const primaryPresentation = isCtaButton ? primaryCtaState.presentation : undefined\n const hidesAllCtas = primaryPresentation?.kind === 'hidden' && !!primaryPresentation.hideAll\n const showSecondaryCta = !isMini && !!secondary_cta?.label && !hidesAllCtas\n // Mini: the card's action (in_description_cta) mirrors the full card's state, as a label only.\n // Answered → the status's action word (Undo) and its answered title; hidden → no label. The tap\n // stays the host's (it opens the insight with its block), so nothing runs from mini itself.\n const miniPresentation = isMini ? linkPresentation : undefined\n const miniStatus = miniPresentation?.kind === 'status' ? miniPresentation : undefined\n const actionLabel = miniPresentation ? miniStatus?.action?.label : ctaLabel\n const cardTitle = miniPresentation?.title || title || ''\n const showActionLink = !!actionLabel && !isCtaButton\n const showCtaRow = (isCtaButton && primaryPresentation?.kind !== 'hidden') || showSecondaryCta\n const handleMiniActionClick = (event: MouseEvent) => {\n const { onCtaAction } = beatActions\n if (!onCtaAction) return\n event.stopPropagation()\n Promise.resolve()\n .then(() => onCtaAction({ beatGuid: beat.guid, name: HOST_ACTIONS.cardClick }))\n .catch((error) =>\n stores.captureException(error, {\n store: 'BaseLayout',\n template: beat.template,\n handler: 'cardClick',\n }),\n )\n }\n const obsoleteCopy = copy.insights_feed?.general\n const isObsoleteDimmed =\n obsolete?.state === 'not_refreshable' && !dismissed_at && !!obsoleteCopy\n\n return (\n <BeatActionsProvider value={beatActionsValue}>\n <Stack sx={{ mb: 16 }}>\n {flow.cardState === 'confirming' ? (\n <HiddenConfirmationCard\n onClose={flow.collapseConfirmation}\n onLeaveFeedback={flow.openHideSurvey}\n onUndo={flow.undoDismiss}\n />\n ) : (\n <>\n {obsolete && obsoleteCopy && <ObsolesceBanner {...obsolete} copy={obsoleteCopy} />}\n <Card\n inert={isObsoleteDimmed}\n sx={{\n ...(isObsoleteDimmed && {\n position: 'relative',\n zIndex: 2,\n pointerEvents: 'none',\n }),\n }}\n >\n {isObsoleteDimmed && <Box sx={OBSOLETE_OVERLAY_SX} />}\n <Header isMini={isMini} subtitle={subtitle} title={cardTitle} />\n {isLoading ? (\n <LoadingCard />\n ) : (\n Block && <Block beatGuid={guid} payload={insights_payload} />\n )}\n\n <Stack sx={{ gap: 6, pb: 16, pt: 12, px: 16 }}>\n <P\n dangerouslySetInnerHTML={{\n __html: insights_payload.description.html_text,\n }}\n sx={{ fontWeight: 'fontWeightRegular' }}\n variant=\"subtitle2\"\n />\n {/* V2: the envelope's link opens the action block it names. */}\n {envelopeLink && (\n <Button\n endIcon={<ChevronRight />}\n onClick={() =>\n insightsV2Store.openActionDrawer({ guid, trigger: 'inDescriptionCta' })\n }\n sx={TEXT_LINK_SX}\n >\n {envelopeLink.label}\n </Button>\n )}\n {/* The card's action with no primary CTA button, never a drawer: mini hands its tap to\n the host (`cardClick`); a full card's block-less link bubbles to the host's card handler. */}\n {showActionLink && (\n <Button\n onClick={isMini ? handleMiniActionClick : undefined}\n sx={MINI_CTA_SX}\n variant=\"text\"\n >\n {actionLabel}\n </Button>\n )}\n {/* Custom-copy link when the envelope sends none; legacy mini shows it too, so no mini guard. */}\n {!inDescriptionCta?.label && clientConfiguredLabel && (\n <Button\n endIcon={<ChevronRight />}\n onClick={onClientConfiguredLinkClick}\n sx={TEXT_LINK_SX}\n >\n {clientConfiguredLabel}\n </Button>\n )}\n </Stack>\n\n {showCtaRow && (\n <Stack sx={{ gap: 8, pb: 16, px: 16 }}>\n {isCtaButton && primary_cta && primaryPresentation?.kind === 'status' && (\n <CtaStatus\n action={primaryPresentation.action}\n sx={primaryPresentation.sx}\n icon={primaryPresentation.icon}\n label={primaryPresentation.label}\n tone={primaryPresentation.tone}\n />\n )}\n {isCtaButton && primary_cta && !primaryPresentation && (\n <Button\n aria-disabled={isCtaDisabled(primary_cta.block) || primaryCtaState.disabled}\n disabled={primaryCtaState.disabled}\n onClick={() => onCtaClick('primary', primary_cta)}\n sx={{\n ...(isCtaDisabled(primary_cta.block) && { color: 'text.disabled' }),\n }}\n variant=\"outlined\"\n >\n {primary_cta.label}\n </Button>\n )}\n {/* Mini has room for one CTA. */}\n {showSecondaryCta && secondary_cta && (\n <Button\n aria-disabled={\n isCtaDisabled(secondary_cta.block) || secondaryCtaState.disabled\n }\n color=\"inherit\"\n disabled={secondaryCtaState.disabled}\n onClick={() => onCtaClick('secondary', secondary_cta)}\n sx={{\n ...SECONDARY_CTA_SX,\n ...(isCtaDisabled(secondary_cta.block) && { color: 'text.disabled' }),\n }}\n >\n {secondary_cta.label}\n </Button>\n )}\n </Stack>\n )}\n\n <FeedbackBar onTellUsMore={flow.openRatingSurvey} show={flow.isFeedbackBarShown} />\n </Card>\n </>\n )}\n\n <ActionBlockLayer beat={beat} />\n\n <DismissInsightDialog\n isOpen={flow.isDismissOpen}\n onClose={flow.closeDismissDialog}\n onDismiss={flow.confirmDismiss}\n />\n\n {flow.isSurveyOpen && (\n <FeedbackDialog\n characterLimitLabel={flow.survey.characterLimitLabel}\n closeAriaLabel={flow.survey.closeAriaLabel}\n isOpen={true}\n onBackClick={flow.feedbackDialogCallbacks.onBackClick}\n onClose={flow.closeSurvey}\n onSubmit={flow.submitSurvey}\n onTextInputFocus={flow.feedbackDialogCallbacks.onTextInputFocus}\n options={flow.survey.options}\n primaryText={flow.survey.submitText}\n secondaryText={flow.survey.backText}\n title={flow.survey.title}\n />\n )}\n\n {flow.cardState === 'visible' && insights_payload.footer && (\n <Footer footer={insights_payload.footer} />\n )}\n </Stack>\n </BeatActionsProvider>\n )\n },\n)\n\nexport default BaseLayout\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAM,KAA+B,CAAC,GAEhC,KAAsB;AAAA,EAC1B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,SAAS;AAAA,EAET,QAAQ;AACV,GAOM,IAAe;AAAA,EACnB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AACb,GAGM,KAAc;AAAA,EAClB,GAAG;AAAA,EACH,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,eAAe;AACjB,GAOM,KAAmB;AAAA,EACvB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,kBAAkB,EAAE,O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,UAChD,gBAAA,EAAC,IAAD,EAAQ,QAAQ,EAAiB,OAAS,CAAA;AAAA,MAEvC;AAAA;EACY,CAAA;AAEzB,CACF"}
@@ -2,7 +2,7 @@ import { useBeatActions as s } from "../beatActions.es.js";
2
2
  import { InsightOptionsMenu as m } from "./InsightOptionsMenu.es.js";
3
3
  import a from "./SubHeader.es.js";
4
4
  import e from "@mui/material/Stack";
5
- import { H3 as f } from "@mxenabled/mxui";
5
+ import { H3 as c } from "@mxenabled/mxui";
6
6
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
7
7
  var g = ({ isMini: n, subtitle: t, title: i }) => {
8
8
  const { onMenuAction: p } = s();
@@ -20,7 +20,10 @@ var g = ({ isMini: n, subtitle: t, title: i }) => {
20
20
  flexDirection: "row",
21
21
  justifyContent: "space-between"
22
22
  },
23
- children: [/* @__PURE__ */ r(f, { children: i }), !n && p && /* @__PURE__ */ r(m, {})]
23
+ children: [/* @__PURE__ */ r(c, {
24
+ truncate: !0,
25
+ children: i
26
+ }), !n && p && /* @__PURE__ */ r(m, {})]
24
27
  }), t && /* @__PURE__ */ r(a, { subtitle: t })]
25
28
  });
26
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Header.es.js","names":[],"sources":["../../../src/insights-v2/components/Header.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport SubHeader from './SubHeader'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport { useBeatActions } from '../beatActions'\nimport type { Subtitle } from '../../core'\n\ninterface HeaderProps {\n isMini: boolean\n subtitle?: Subtitle\n title: string\n}\n\nconst Header = ({ isMini, subtitle, title }: HeaderProps) => {\n // The overflow menu appears only when the host wired a menu handler and this\n // isn't the compact/mini layout. Handlers are delivered via context.\n const { onMenuAction } = useBeatActions()\n\n return (\n <Stack sx={{ gap: 4, pb: 12, pl: 16, pr: 16, pt: 16 }}>\n <Stack\n sx={{ alignItems: 'flex-start', flexDirection: 'row', justifyContent: 'space-between' }}\n >\n <H3>{title}</H3>\n {!isMini && onMenuAction && <InsightOptionsMenu />}\n </Stack>\n\n {/* Sub Header */}\n {subtitle && <SubHeader subtitle={subtitle} />}\n </Stack>\n )\n}\n\nexport default Header\n"],"mappings":";;;;;;AAeA,IAAM,IAAA,CAAU,EAAE,QAAA,GAAQ,UAAA,GAAU,OAAA,EAAA,MAAyB;AAG3D,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAe;AAExC,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,KAAK;AAAA,MAAG,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAApD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QAAE,YAAY;AAAA,QAAc,eAAe;AAAA,QAAO,gBAAgB;AAAA,MAAgB;AAAA,MADxF,UAAA,CAGE,gBAAA,EAAC,GAAD,EAAA,UAAK,EAAU,CAAA,GACd,CAAC,KAAU,KAAgB,gBAAA,EAAC,GAAD,CAAqB,CAAA,CAC5C;AAAA,IAGN,CAAA,GAAA,KAAY,gBAAA,EAAC,GAAD,EAAqB,UAAA,EAAW,CAAA,CACxC;AAAA;AAEX"}
1
+ {"version":3,"file":"Header.es.js","names":[],"sources":["../../../src/insights-v2/components/Header.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport SubHeader from './SubHeader'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport { useBeatActions } from '../beatActions'\nimport type { Subtitle } from '../../core'\n\ninterface HeaderProps {\n isMini: boolean\n subtitle?: Subtitle\n title: string\n}\n\nconst Header = ({ isMini, subtitle, title }: HeaderProps) => {\n // The overflow menu appears only when the host wired a menu handler and this\n // isn't the compact/mini layout. Handlers are delivered via context.\n const { onMenuAction } = useBeatActions()\n\n return (\n <Stack sx={{ gap: 4, pb: 12, pl: 16, pr: 16, pt: 16 }}>\n <Stack\n sx={{ alignItems: 'flex-start', flexDirection: 'row', justifyContent: 'space-between' }}\n >\n <H3 truncate={true}>{title}</H3>\n {!isMini && onMenuAction && <InsightOptionsMenu />}\n </Stack>\n\n {/* Sub Header */}\n {subtitle && <SubHeader subtitle={subtitle} />}\n </Stack>\n )\n}\n\nexport default Header\n"],"mappings":";;;;;;AAeA,IAAM,IAAA,CAAU,EAAE,QAAA,GAAQ,UAAA,GAAU,OAAA,EAAA,MAAyB;AAG3D,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAe;AAExC,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,KAAK;AAAA,MAAG,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAApD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QAAE,YAAY;AAAA,QAAc,eAAe;AAAA,QAAO,gBAAgB;AAAA,MAAgB;AAAA,MADxF,UAAA,CAGE,gBAAA,EAAC,GAAD;AAAA,QAAI,UAAU;AAAA,QAAO,UAAA;AAAA,MAAU,CAAA,GAC9B,CAAC,KAAU,KAAgB,gBAAA,EAAC,GAAD,CAAqB,CAAA,CAC5C;AAAA,IAGN,CAAA,GAAA,KAAY,gBAAA,EAAC,GAAD,EAAqB,UAAA,EAAW,CAAA,CACxC;AAAA;AAEX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.96",
3
+ "version": "9.7.98",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",