@mx-cartographer/experiences 9.7.4 → 9.7.6
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 +9 -0
- package/dist/common/components/GlobalAccountFilter.es.js +56 -53
- package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
- package/dist/common/components/WidgetContainer.es.js +64 -60
- package/dist/common/components/WidgetContainer.es.js.map +1 -1
- package/dist/common/constants/Analytics.d.ts +0 -1
- package/dist/common/constants/Analytics.es.js +0 -1
- package/dist/common/constants/Analytics.es.js.map +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +6 -2
- package/dist/common/context/GlobalDataProvider.es.js +17 -11
- package/dist/common/context/GlobalDataProvider.es.js.map +1 -1
- package/dist/common/context/hooks.d.ts +4 -1
- package/dist/common/context/hooks.es.js +15 -14
- package/dist/common/context/hooks.es.js.map +1 -1
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +130 -129
- package/dist/core/types/Handlers.d.ts +11 -0
- package/dist/core/types/index.d.ts +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +38 -30
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +2 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +1 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/microinsights/cards/InsightCard.es.js +12 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n
|
|
1
|
+
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { statusIconName } from '../../../components/statusIcon'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n // The flat `icon_name`, else a V2 `ICO-` logo, both through statusIconName's mx-icons allowlist so\n // an unknown name draws nothing. Drawn here rather than through LogoFromGuid, which fills every\n // `ICO-` glyph. An `ICO-` logo needs a variant that styles the tile, or it would be a bare glyph.\n const iconName =\n statusIconName(slot.icon_name && `ICO-${slot.icon_name}`) ??\n (layoutConfig.logo_bGcolor ? statusIconName(logo?.guid) : undefined)\n if (iconName) {\n return (\n <Stack\n data-icon={iconName}\n data-testid=\"account-block-icon-tile\"\n sx={{\n alignItems: 'center',\n bgcolor: layoutConfig.logo_bGcolor,\n borderRadius: layoutConfig.logo_border_radius ?? '6px',\n flexShrink: 0,\n height: 48,\n justifyContent: 'center',\n width: 48,\n ...(layoutConfig.logo_border_color && {\n borderColor: layoutConfig.logo_border_color,\n borderStyle: 'solid',\n borderWidth: 1.5,\n }),\n }}\n >\n <Icon\n aria-hidden={true}\n name={iconName}\n size={24}\n sx={{ color: layoutConfig.logo_color }}\n />\n </Stack>\n )\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAa,IAAA,CAAiB,EAAE,MAAA,GAAM,SAAA,GAAS,MAAA,EAAA,MAA+B;AAC5E,QAAM,IAAQ,EAAS,GACjB,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAGA,MAAI,sBAAsB,KAAK,GAAM,QAAQ,EAAE,EAC7C,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,UAAU;AAAA,IAAW;AAAA,IAA9E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,GACpC,EAAa,SACZ,gBAAA,EAAC,GAAD;AAAA,MAAa,MAAM;AAAA,MAAI,IAAI;AAAA,QAAE,UAAU;AAAA,QAAY,OAAO;AAAA,QAAI,KAAK;AAAA,MAAG;AAAA,MACpE,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,eAAa;AAAA,QACb,OAAM;AAAA,QACN,eAAY;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,EAAa;AAAA,QACnB,MAAM;AAAA,QACN,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,SAAS;AAAA,UAAG,QAAQ;AAAA,QAAE;AAAA,MAC5C,CAAA;AAAA,IACU,CAAA,CAEV;AAAA;AAIX,MAAI,EAAK,iBACP,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,UAAU;AAAA,IAAW;AAAA,IAA9E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,GAAG,EAAK,gBAAA;AAAA,MACb,iBAAiB,GAAG,EAAK,gBAAA;AAAA,MACzB,MAAM;AAAA,IACP,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,MAAa,MAAM;AAAA,MAAI,IAAI;AAAA,QAAE,UAAU;AAAA,QAAY,OAAO;AAAA,QAAI,KAAK;AAAA,MAAG;AAAA,MACpE,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAK;AAAA,QACL,MAAM;AAAA,QACN,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,SAAS;AAAA,UAAG,QAAQ;AAAA,QAAE;AAAA,MAC5C,CAAA;AAAA,IACU,CAAA,CACR;AAAA;AAOX,QAAM,IACJ,EAAe,EAAK,aAAa,OAAO,EAAK,SAAA,EAAW,MACvD,EAAa,eAAe,EAAe,GAAM,IAAI,IAAI;AAC5D,SAAI,IAEA,gBAAA,EAAC,GAAD;AAAA,IACE,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,EAAa;AAAA,MACtB,cAAc,EAAa,sBAAsB;AAAA,MACjD,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,GAAI,EAAa,qBAAqB;AAAA,QACpC,aAAa,EAAa;AAAA,QAC1B,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,eAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,EAAa,WAAW;AAAA,IACtC,CAAA;AAAA,EACI,CAAA,IAIJ;AACT"}
|
|
@@ -5,6 +5,8 @@ export interface BlockLayoutConfig {
|
|
|
5
5
|
logo_color?: string;
|
|
6
6
|
logo_bGcolor?: string;
|
|
7
7
|
logo_border_color?: string;
|
|
8
|
+
/** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */
|
|
9
|
+
logo_border_radius?: string;
|
|
8
10
|
/** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */
|
|
9
11
|
sub_logo?: string;
|
|
10
12
|
/** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */
|
|
@@ -16,6 +16,7 @@ var i = { background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%,
|
|
|
16
16
|
status_off_track: {
|
|
17
17
|
logo_color: "background.paper",
|
|
18
18
|
logo_bGcolor: "error.main",
|
|
19
|
+
logo_border_radius: "4px",
|
|
19
20
|
background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)"
|
|
20
21
|
},
|
|
21
22
|
interest_charges_summary: {
|
|
@@ -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 WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\n\nimport {\n directDepositVariant,\n getLayoutConfig as getDirectDepositLayoutConfig,\n} from '../DirectDepositBlock/layout'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\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 /** 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 * When true, AccountBlock renders the \"Detailed\" account hero (overhanging institution logo,\n * account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.\n */\n isDetailed?: boolean\n /** Hero card style props for the detailed variants. */\n detailed?: DirectDepositCardStyleProps\n}\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:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n const directDepositLayout = getDirectDepositLayoutConfig(theme)\n\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 background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\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 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 // \"Detailed\" hero pair from the Insights UI Toolkit (architecture doc: Account -> Detailed -\n // Primary / Detailed - Success). It is the same hero the Direct Deposit block renders for its\n // beats, so the styling is read from that block's table rather than duplicated here:\n // primary = blue slot gradient + primary-tinted pill, success = green slot gradient + solid\n // success pill.\n detailed_primary: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.MissingInterestRate],\n },\n detailed_success: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.InterestRateAdded],\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":";;;
|
|
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 WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\n\nimport {\n directDepositVariant,\n getLayoutConfig as getDirectDepositLayoutConfig,\n} from '../DirectDepositBlock/layout'\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 /** 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 /** 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 * When true, AccountBlock renders the \"Detailed\" account hero (overhanging institution logo,\n * account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.\n */\n isDetailed?: boolean\n /** Hero card style props for the detailed variants. */\n detailed?: DirectDepositCardStyleProps\n}\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:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n const directDepositLayout = getDirectDepositLayoutConfig(theme)\n\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 background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\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 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 // \"Detailed\" hero pair from the Insights UI Toolkit (architecture doc: Account -> Detailed -\n // Primary / Detailed - Success). It is the same hero the Direct Deposit block renders for its\n // beats, so the styling is read from that block's table rather than duplicated here:\n // primary = blue slot gradient + primary-tinted pill, success = green slot gradient + solid\n // success pill.\n detailed_primary: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.MissingInterestRate],\n },\n detailed_success: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.InterestRateAdded],\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":";;;AAyDA,IAAM,IAAsC,EAC1C,YACE,0FACJ,GAEa,IAAA,CAAmB,MAAoD;AAClF,QAAM,IAAsB,EAA6B,CAAK;AAE9D,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,MAClC,UAAU;AAAA,IACZ;AAAA,IACA,mBAAmB;AAAA,IAEnB,aAAa;AAAA,MAAE,GAAG;AAAA,MAAkB,OAAO;AAAA,IAAQ;AAAA,IAGnD,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,cAAc;AAAA,MAEd,oBAAoB;AAAA,MACpB,YACE;AAAA,IACJ;AAAA,IACA,0BAA0B;AAAA,MACxB,YAAY;AAAA,MACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,MACrE,mBAAmB;AAAA,MACnB,YACE;AAAA,IACJ;AAAA,IAGA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,cAAc;AAAA,MACd,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,oBAAoB;AAAA,MAClB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,IAAI;AAAA,QAAI,IAAI;AAAA,MAAG;AAAA,MACjC,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IAMA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,mBAAA;AAAA,IACrD;AAAA,IACA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,iBAAA;AAAA,IACrD;AAAA,IAGA,SAAS,CAAC;AAAA,EACZ;AACF"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { slot as T } from "../../core/types/Insights.es.js";
|
|
2
2
|
import { resolveInsightRender as S } from "../../insights-v2/resolveInsightRender.es.js";
|
|
3
3
|
import F from "../../insights-v2/components/LogoFromGuid.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { statusIconName as O, statusIconPalette as v } from "../../insights-v2/components/statusIcon.es.js";
|
|
5
|
+
import { ON_CLICK_EVENT as A, ON_VIEW_EVENT as L, ON_VIEW_FIRST_TIME_EVENT as j } from "../constants/Analytics.es.js";
|
|
5
6
|
import V from "../beaticons/BeatMaterialIcon.es.js";
|
|
6
|
-
import { BeatIcon as
|
|
7
|
-
import { useCopyStore as
|
|
7
|
+
import { BeatIcon as w } from "../beaticons/BeatIcon.es.js";
|
|
8
|
+
import { useCopyStore as z, useEvent as G, useInsightsMicroWidgetStore as K } from "../context/hooks.es.js";
|
|
8
9
|
import k from "../MicroCardTemplate.es.js";
|
|
9
|
-
import
|
|
10
|
-
import { statusIconName as K, statusIconPalette as Z } from "../../insights-v2/components/statusIcon.es.js";
|
|
10
|
+
import Z from "../../insights-v2/components/InsightErrorCard.es.js";
|
|
11
11
|
import { useEffect as x } from "react";
|
|
12
12
|
import { jsx as o } from "react/jsx-runtime";
|
|
13
13
|
import { alpha as B, useTheme as $ } from "@mui/material/styles";
|
|
14
14
|
import q from "@mui/material/Box";
|
|
15
15
|
import { useInView as D } from "react-intersection-observer";
|
|
16
16
|
var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard: l, onCardClick: u, posthog: r, widthOverrides: n, variant: f, showIcon: h, heightOverrides: p }) => {
|
|
17
|
-
const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } =
|
|
17
|
+
const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } = z(), { onEvent: d } = G(), { updateBeat: P, updateOffer: R } = K();
|
|
18
18
|
x(() => {
|
|
19
|
-
m && (i.has_been_displayed ? d(
|
|
19
|
+
m && (i.has_been_displayed ? d(L(i.template)) : (i.guid.startsWith("OFR") ? R({
|
|
20
20
|
...i,
|
|
21
21
|
has_been_displayed: !0
|
|
22
22
|
}) : P({
|
|
23
23
|
...i,
|
|
24
24
|
has_been_displayed: !0
|
|
25
|
-
}), d(
|
|
25
|
+
}), d(j(i.template))));
|
|
26
26
|
}, [m]), x(() => {
|
|
27
27
|
if (m && i) if (i.template === "MarketingOffer") {
|
|
28
28
|
const t = i;
|
|
@@ -44,7 +44,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
44
44
|
m
|
|
45
45
|
]);
|
|
46
46
|
const s = () => {
|
|
47
|
-
if (u && u(i), d(
|
|
47
|
+
if (u && u(i), d(A(i.template)), i.template === "MarketingOffer") {
|
|
48
48
|
const t = i;
|
|
49
49
|
r?.capture("clicked_messaging_insight", {
|
|
50
50
|
template: i.template,
|
|
@@ -70,10 +70,10 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
70
70
|
minWidth: n ? `${n}px` : "100%",
|
|
71
71
|
my: 1
|
|
72
72
|
},
|
|
73
|
-
children: /* @__PURE__ */ o(
|
|
73
|
+
children: /* @__PURE__ */ o(Z, { beat: i })
|
|
74
74
|
});
|
|
75
75
|
if (e) {
|
|
76
|
-
const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C =
|
|
76
|
+
const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C = O(E?.guid), N = v(E?.color), W = e.primary_cta?.label || e.in_description_cta?.label || void 0;
|
|
77
77
|
return /* @__PURE__ */ o(k, {
|
|
78
78
|
"aria-roledescription": "slide",
|
|
79
79
|
ariaLabel: a,
|
|
@@ -107,7 +107,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
|
|
|
107
107
|
description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
|
|
108
108
|
elevation: g,
|
|
109
109
|
heightOverrides: p,
|
|
110
|
-
icon: h && /* @__PURE__ */ o(
|
|
110
|
+
icon: h && /* @__PURE__ */ o(w, { beat: i }),
|
|
111
111
|
isActiveCard: l,
|
|
112
112
|
onCardClick: s,
|
|
113
113
|
onPrimaryAction: s,
|