@mx-cartographer/experiences 9.7.15 → 9.7.17
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 +8 -0
- package/dist/core/types/Insights.d.ts +8 -0
- package/dist/core/types/Insights.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.d.ts +8 -12
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js +7 -8
- package/dist/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js.map +1 -1
- package/dist/insights-v2/components/AmountBreakdownCard.d.ts +15 -0
- package/dist/insights-v2/components/AmountBreakdownCard.es.js +90 -0
- package/dist/insights-v2/components/AmountBreakdownCard.es.js.map +1 -0
- package/dist/insights-v2/index.d.ts +1 -0
- package/dist/insights-v2/index.es.js +41 -39
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [9.7.17] - 10-20-2026
|
|
2
|
+
|
|
3
|
+
- **CHANGED** - `withdrawal_block` reads the Emergency Fund Withdrawal card flat from `instance_slot` (`amount`, `amount_label`, `withdrawal_date`, `balance`, `balance_label` beside `block` and `variant`, no `data.series`), matching ditto's `WithdrawalBlock`. `InstanceSlot` declares the four new fields and the mock mirrors the envelope tupac sends (WEC-1941)
|
|
4
|
+
|
|
5
|
+
## [9.7.16] - 10-20-2026
|
|
6
|
+
|
|
7
|
+
- **ADDED** - `AmountBreakdownCard` presentational component (MEW2-3346)
|
|
8
|
+
|
|
1
9
|
## [9.7.15] - 10-20-2026
|
|
2
10
|
|
|
3
11
|
- **CHANGED** - The `detailed_primary` / `detailed_success` account hero moves out of `AccountBlock` into its own `DetailedAccountBlock` block, which `account_block` still routes those variants to. Its stories move with it and gain a `detailed_celebration` confetti variant (MEW2-3344)
|
|
@@ -315,6 +315,14 @@ export interface InstanceSlot {
|
|
|
315
315
|
institution_name?: string;
|
|
316
316
|
/** Dollar amount (unformatted); the block formats it as currency. */
|
|
317
317
|
amount?: number;
|
|
318
|
+
/** Pre-localized lead-in for the date line, e.g. "Withdrawn on". */
|
|
319
|
+
amount_label?: string;
|
|
320
|
+
/** The withdrawal's calendar day, `YYYY-MM-DD` (e.g. `2026-10-20`); the card formats it. */
|
|
321
|
+
withdrawal_date?: string;
|
|
322
|
+
/** Account balance after the withdrawal (unformatted); the card formats it as currency. */
|
|
323
|
+
balance?: number;
|
|
324
|
+
/** Pre-localized label for the balance row, e.g. "Balance". */
|
|
325
|
+
balance_label?: string;
|
|
318
326
|
/** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */
|
|
319
327
|
merchant_guid?: string;
|
|
320
328
|
/** Merchant display name — shown as logo alt text and as the merchant/hero label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Insights.es.js","names":[],"sources":["../../../src/core/types/Insights.ts"],"sourcesContent":["// ============ Core InsightsV2 Types ============\n\nimport { InsightsInstanceSlotData } from './InsightsInstanceSlotData'\n\nexport interface ThemedSVGImageProps {\n divProps?: React.HTMLAttributes<HTMLDivElement>\n image: React.ComponentType<React.SVGProps<SVGSVGElement>>\n isMini?: boolean\n}\n\n/**\n * Emitted by a block when the user drills into a specific datum (e.g. clicks a\n * chart bar). Named fields rather than positional args so blocks with differing\n * shapes can extend this without the call sites transposing values.\n */\nexport interface DrilldownPayload {\n chartBarIndex: number\n tabIndex?: number\n transaction_guid?: string\n block?: string\n}\n\n/**\n * Which envelope a beat was fetched with. `embedded` (the transaction-row pill + details-drawer\n * card) and `notification` are V2 additions; a surface asks for one with `widget_type=` on the fetch.\n */\nexport type WidgetType = 'full' | 'mini' | 'micro' | 'embedded' | 'notification'\n\n/**\n * V2: the transaction-row tag, its own small section of the `embedded` envelope (the same grammar\n * as `description` / `footer`, with room for a tone or an icon later). Omitted for an insight that\n * tags no transaction row. It deliberately is *not* `short_title`, which stays a per-variant\n * attribute with a second consumer (the bank-holiday sub-header).\n */\nexport interface Pill {\n text: string\n}\n\n/**\n * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction\n * Details drawer), or the guid list a list drawer shows (`transaction_guids`). Scalars or string\n * lists, shared by every CTA of the card, omitted when the insight has none. Never carries copy or\n * user actions (memo, tags, hide, flag come from the transaction store). Values come from the\n * server, so a reader still checks each value's runtime shape.\n */\nexport type DrilldownData = Record<string, string | number | boolean | null | string[]>\n\nexport interface InsightsPayload {\n widget_type: WidgetType\n instance_slot: InstanceSlot\n /**\n * V1 only. The v2 contract carries everything a block needs on `instance_slot.data`,\n * and omits this key entirely (see the LargeTransactionV2 payload). Blocks that still require it\n * get it as a required field through `BlockProps`, which re-declares it.\n */\n instance_slot_data?: InsightsInstanceSlotData\n description: Description\n primary_cta?: PrimaryCTA\n secondary_cta?: SecondaryCTA\n title?: string\n sub_title?: Subtitle\n /**\n * V2 rename of `sub_title`: a flat string, with the logo promoted to the payload-level `logo`\n * field below. `sub_title` wins when both are present.\n */\n subtitle?: string\n /** V2: header logo paired with the flat `subtitle`: an entity guid or a status icon (`LogoRef`). */\n logo?: LogoRef\n /** V2: which design branch the backend picked (e.g. `no_merchant`). */\n variant?: string\n /** V2, `embedded` envelope only: the transaction-row pill. */\n pill?: Pill\n /**\n * V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`, or the guid list a list\n * drawer shows (`{ transaction_guids: [...] }`).\n */\n drilldown_data?: DrilldownData\n footer?: Footer\n /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\n guid: string\n user_guid: string\n client_guid?: string\n /** Template name, e.g. `LargeTransactionV2`. */\n template?: string\n revision?: number\n /** Unix seconds. */\n created_at?: number\n /** Unix seconds. */\n updated_at?: number\n /** Unix seconds. */\n active_at?: number\n displayed_at?: number | null\n dismissed_at: number | null\n cta_clicked_at?: number | null\n has_been_displayed?: boolean\n is_dismissed: boolean\n is_deleted?: boolean\n is_hidden_by_system?: boolean\n is_obsolete?: boolean\n is_refreshable?: boolean\n is_sampled?: boolean\n is_zero_state?: boolean\n status?: string | null\n /**\n * V2 (LargeTransactionV2 onward): the entities the beat is about, carried on the payload so\n * action blocks do not have to reach back out to the beat envelope.\n */\n primary_account_guid?: string | null\n primary_transaction_guid?: string | null\n primary_category_guid?: string | null\n primary_merchant_guid?: string | null\n /**\n * V2: the repeating transaction a subscription beat is about (Upcoming Subscription, Subscription\n * Price Increase). Read by `recurring_transaction_block`, see\n * `actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts`.\n */\n primary_repeating_transaction_guid?: string | null\n}\n\nexport interface Legends {\n label: string\n value: number\n additional_value?: number\n additional_value_type?: string\n value_type?: string\n}\n\nexport interface Logo {\n category_guid?: string\n category_name?: string\n institution_guid?: string\n institution_name?: string\n logo_color?: string\n /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\n logo_name?: string\n merchant_guid?: string\n merchant_name?: string\n}\n\nexport interface Subtitle {\n logo?: Logo\n text: string\n}\n\n/**\n * A V2 logo, shared by the header (`InsightsPayload.logo`) and every instance-slot row. It takes\n * one of two shapes:\n *\n * - **Entity**: `guid`, whose prefix (`INS-` / `MCH-` / `CAT-`) picks the logo component, plus an\n * optional `fallback_guid` for when that component's asset cannot load. Today that is the\n * category behind an `MCH-` guid, which `MerchantLogo` shows as a tile when the merchant image\n * is missing.\n * - **Status icon**: `icon` (an mx-icons name, e.g. `warning`) and `color` (a theme palette path,\n * e.g. `error.main`), for subheaders that show a state rather than an entity (V1's\n * `logo_name` / `logo_color`).\n *\n * `alt` is the accessible name for either shape. A logo sends one shape; if it sends both, `icon`\n * wins, as `logo_name` does in V1's `SubHeader`.\n */\nexport interface LogoRef {\n alt?: string\n color?: string\n fallback_guid?: string\n guid?: string\n icon?: string\n}\n\nexport interface CategoryLogo {\n category_guid: string\n category_name: string\n}\n\nexport interface MerchantLogo {\n merchant_guid: string\n merchant_name: string\n}\n\nexport interface InstitutionLogo {\n institution_guid: string\n institution_name: string\n}\n\nexport interface Description {\n text: string\n html_text: string\n}\n\n/**\n * Post message a CTA press sends to the host, resolved by the backend for the beat's current\n * state. Absent/null = the backend has not described one: the frontend uses the template's\n * interim `ctaPostMessages` entry if there is one, else sends no message. `payload` carries only\n * beat-specific extras; the frontend always adds `beat_guid`, `beat_template`, `user_guid` and\n * `action_string`.\n */\nexport interface CtaPostMessageMetadata {\n /** Post message event; defaults to `beat/cta`. */\n event?: string | null\n /** Operation the host should perform, e.g. `op_1`, `op_2`, `op_3`. Defaults to `op_1`. */\n action?: string | null\n /** Beat-specific fields merged into the message metadata (account ids, amounts, ...). */\n payload?: Record<string, unknown> | null\n}\n\nexport interface PrimaryCTA {\n label: string\n block: string\n variant?: string | null\n /**\n * What pressing the CTA does beyond opening its block, named by the backend (ditto\n * `primary_cta_action`, passed through by tupac). Looked up in `insights-v2/ctaActions`;\n * null / absent / unknown means the CTA only opens its block or posts its message.\n */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface SecondaryCTA {\n label: string\n /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | null\n}\n\nexport interface Footer {\n /** V1: a pre-formatted date string. */\n date?: string\n /**\n * The account label, on both V1 and V2. The backend resolves the plurality: one account sends\n * its name (e.g. `Epic Bank`), several send a localized count (e.g. `2 Accounts`), none sends\n * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\n /**\n * V2 (LargeTransactionV2 onward): unix seconds, formatted by `Footer` for display.\n * Replaces `date`; `date` wins when a beat somehow sends both.\n */\n timestamp?: number\n}\n\n// ============ Instance Slot Types ============\n// Values are the snake_case block names the backend sends on a beat's instance slot; the PascalCase\n// keys stay as friendly references (e.g. BlockType.BarChartBlock === 'bar_chart_block').\nexport const BlockType = {\n AccountBlock: 'account_block',\n AccountSwitchBlock: 'account_switch_block',\n BarChartBlock: 'bar_chart_block',\n BudgetBlock: 'budget_block',\n DirectDepositBlock: 'direct_deposit_block',\n ImageBlock: 'image_block',\n TransactionBlock: 'transaction_block',\n DonutChartBlock: 'donut_chart_block',\n DoubleBarChartBlock: 'double_bar_chart_block',\n DoubleProgressBarBlock: 'double_progress_bar_block',\n DebtsBlock: 'debts_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_block',\n WithdrawalBlock: 'withdrawal_block',\n} as const\n\nexport type BlockType = (typeof BlockType)[keyof typeof BlockType]\n\n/**\n * A pre-localized row on a V2 instance slot. The backend resolves the copy and formatting; the\n * logo is a `LogoRef` (an entity guid or a status icon, see `logoFromRef`).\n */\nexport interface InstanceSlotRow {\n amount?: number\n logo?: LogoRef\n primary_text?: string\n secondary_text?: string\n}\n\n/**\n * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any\n * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the\n * kind the caller expects.\n */\nexport interface InstanceSlotData {\n [slot: string]: unknown\n}\n\n/**\n * Reads one slot off a block's `data`; undefined when ditto did not fill it.\n *\n * The caller names the kind, because the slot's kind lives in the block's ditto schema and not\n * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold\n * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).\n */\nexport const slot = <T = unknown>(\n data: InstanceSlotData | undefined,\n name: string,\n): T | undefined => data?.[name] as T | undefined\n\n/**\n * V2: which block renders this beat's content, and what it renders.\n *\n * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the\n * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface\n * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs\n * — that union left `block` reading as required and typed a promise it did not keep.\n *\n * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat\n * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a\n * nil variant rather than sending null, which is why the type is `string | null | undefined`.\n */\nexport interface InstanceSlot {\n block?: BlockType\n variant?: string | null\n /** The slots this block's variant declares in ditto. */\n data?: InstanceSlotData\n // Direct Deposit block (Set Up Direct Deposit, Switch Direct Deposit, Missing\n // Interest Rate): account facts carried flat on the slot, beside `data`.\n /** Primary line on the hero card, e.g. \"Epic Bank Checking, *1234\". */\n account_name?: string\n /** Secondary line beneath the name, e.g. \"Checking Account\" / \"Credit Card\". */\n account_type?: string\n /** Status pill label, e.g. \"Direct Deposit Not Set Up\" / \"Interest Rate: 19.99% APR\". */\n status_text?: string\n institution_guid?: string\n institution_name?: string\n // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AA8TA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
|
|
1
|
+
{"version":3,"file":"Insights.es.js","names":[],"sources":["../../../src/core/types/Insights.ts"],"sourcesContent":["// ============ Core InsightsV2 Types ============\n\nimport { InsightsInstanceSlotData } from './InsightsInstanceSlotData'\n\nexport interface ThemedSVGImageProps {\n divProps?: React.HTMLAttributes<HTMLDivElement>\n image: React.ComponentType<React.SVGProps<SVGSVGElement>>\n isMini?: boolean\n}\n\n/**\n * Emitted by a block when the user drills into a specific datum (e.g. clicks a\n * chart bar). Named fields rather than positional args so blocks with differing\n * shapes can extend this without the call sites transposing values.\n */\nexport interface DrilldownPayload {\n chartBarIndex: number\n tabIndex?: number\n transaction_guid?: string\n block?: string\n}\n\n/**\n * Which envelope a beat was fetched with. `embedded` (the transaction-row pill + details-drawer\n * card) and `notification` are V2 additions; a surface asks for one with `widget_type=` on the fetch.\n */\nexport type WidgetType = 'full' | 'mini' | 'micro' | 'embedded' | 'notification'\n\n/**\n * V2: the transaction-row tag, its own small section of the `embedded` envelope (the same grammar\n * as `description` / `footer`, with room for a tone or an icon later). Omitted for an insight that\n * tags no transaction row. It deliberately is *not* `short_title`, which stays a per-variant\n * attribute with a second consumer (the bank-holiday sub-header).\n */\nexport interface Pill {\n text: string\n}\n\n/**\n * V2: facts a drilldown shows that the card does not (e.g. the account number for the Transaction\n * Details drawer), or the guid list a list drawer shows (`transaction_guids`). Scalars or string\n * lists, shared by every CTA of the card, omitted when the insight has none. Never carries copy or\n * user actions (memo, tags, hide, flag come from the transaction store). Values come from the\n * server, so a reader still checks each value's runtime shape.\n */\nexport type DrilldownData = Record<string, string | number | boolean | null | string[]>\n\nexport interface InsightsPayload {\n widget_type: WidgetType\n instance_slot: InstanceSlot\n /**\n * V1 only. The v2 contract carries everything a block needs on `instance_slot.data`,\n * and omits this key entirely (see the LargeTransactionV2 payload). Blocks that still require it\n * get it as a required field through `BlockProps`, which re-declares it.\n */\n instance_slot_data?: InsightsInstanceSlotData\n description: Description\n primary_cta?: PrimaryCTA\n secondary_cta?: SecondaryCTA\n title?: string\n sub_title?: Subtitle\n /**\n * V2 rename of `sub_title`: a flat string, with the logo promoted to the payload-level `logo`\n * field below. `sub_title` wins when both are present.\n */\n subtitle?: string\n /** V2: header logo paired with the flat `subtitle`: an entity guid or a status icon (`LogoRef`). */\n logo?: LogoRef\n /** V2: which design branch the backend picked (e.g. `no_merchant`). */\n variant?: string\n /** V2, `embedded` envelope only: the transaction-row pill. */\n pill?: Pill\n /**\n * V2: drilldown-only facts, e.g. `{ account_number: 'XXXXXXXX043' }`, or the guid list a list\n * drawer shows (`{ transaction_guids: [...] }`).\n */\n drilldown_data?: DrilldownData\n footer?: Footer\n /**\n * V2: the link inside the description: on the full card a drawer of its own (Low Account\n * Balance's \"Transactions ›\"); on mini and micro the card's action, sent instead of `primary_cta`.\n * Absent when the beat has no link.\n */\n in_description_cta?: InDescriptionCTA\n guid: string\n user_guid: string\n client_guid?: string\n /** Template name, e.g. `LargeTransactionV2`. */\n template?: string\n revision?: number\n /** Unix seconds. */\n created_at?: number\n /** Unix seconds. */\n updated_at?: number\n /** Unix seconds. */\n active_at?: number\n displayed_at?: number | null\n dismissed_at: number | null\n cta_clicked_at?: number | null\n has_been_displayed?: boolean\n is_dismissed: boolean\n is_deleted?: boolean\n is_hidden_by_system?: boolean\n is_obsolete?: boolean\n is_refreshable?: boolean\n is_sampled?: boolean\n is_zero_state?: boolean\n status?: string | null\n /**\n * V2 (LargeTransactionV2 onward): the entities the beat is about, carried on the payload so\n * action blocks do not have to reach back out to the beat envelope.\n */\n primary_account_guid?: string | null\n primary_transaction_guid?: string | null\n primary_category_guid?: string | null\n primary_merchant_guid?: string | null\n /**\n * V2: the repeating transaction a subscription beat is about (Upcoming Subscription, Subscription\n * Price Increase). Read by `recurring_transaction_block`, see\n * `actionBlocks/RecurringTransactionBlock/subscriptionBeats.ts`.\n */\n primary_repeating_transaction_guid?: string | null\n}\n\nexport interface Legends {\n label: string\n value: number\n additional_value?: number\n additional_value_type?: string\n value_type?: string\n}\n\nexport interface Logo {\n category_guid?: string\n category_name?: string\n institution_guid?: string\n institution_name?: string\n logo_color?: string\n /** Draw the `logo_name` icon filled (V2 `ICO-` logos). */\n logo_fill?: boolean\n logo_name?: string\n merchant_guid?: string\n merchant_name?: string\n}\n\nexport interface Subtitle {\n logo?: Logo\n text: string\n}\n\n/**\n * A V2 logo, shared by the header (`InsightsPayload.logo`) and every instance-slot row. It takes\n * one of two shapes:\n *\n * - **Entity**: `guid`, whose prefix (`INS-` / `MCH-` / `CAT-`) picks the logo component, plus an\n * optional `fallback_guid` for when that component's asset cannot load. Today that is the\n * category behind an `MCH-` guid, which `MerchantLogo` shows as a tile when the merchant image\n * is missing.\n * - **Status icon**: `icon` (an mx-icons name, e.g. `warning`) and `color` (a theme palette path,\n * e.g. `error.main`), for subheaders that show a state rather than an entity (V1's\n * `logo_name` / `logo_color`).\n *\n * `alt` is the accessible name for either shape. A logo sends one shape; if it sends both, `icon`\n * wins, as `logo_name` does in V1's `SubHeader`.\n */\nexport interface LogoRef {\n alt?: string\n color?: string\n fallback_guid?: string\n guid?: string\n icon?: string\n}\n\nexport interface CategoryLogo {\n category_guid: string\n category_name: string\n}\n\nexport interface MerchantLogo {\n merchant_guid: string\n merchant_name: string\n}\n\nexport interface InstitutionLogo {\n institution_guid: string\n institution_name: string\n}\n\nexport interface Description {\n text: string\n html_text: string\n}\n\n/**\n * Post message a CTA press sends to the host, resolved by the backend for the beat's current\n * state. Absent/null = the backend has not described one: the frontend uses the template's\n * interim `ctaPostMessages` entry if there is one, else sends no message. `payload` carries only\n * beat-specific extras; the frontend always adds `beat_guid`, `beat_template`, `user_guid` and\n * `action_string`.\n */\nexport interface CtaPostMessageMetadata {\n /** Post message event; defaults to `beat/cta`. */\n event?: string | null\n /** Operation the host should perform, e.g. `op_1`, `op_2`, `op_3`. Defaults to `op_1`. */\n action?: string | null\n /** Beat-specific fields merged into the message metadata (account ids, amounts, ...). */\n payload?: Record<string, unknown> | null\n}\n\nexport interface PrimaryCTA {\n label: string\n block: string\n variant?: string | null\n /**\n * What pressing the CTA does beyond opening its block, named by the backend (ditto\n * `primary_cta_action`, passed through by tupac). Looked up in `insights-v2/ctaActions`;\n * null / absent / unknown means the CTA only opens its block or posts its message.\n */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\nexport interface SecondaryCTA {\n label: string\n /**\n * Drawer block to open. `null` when the CTA opens nothing (ditto `secondary_cta_block: null`,\n * e.g. Fee Detected's \"Contact Support\"): the press posts its message to the host instead.\n */\n block: string | null\n variant?: string | null\n /** See `PrimaryCTA.action_key` (ditto `secondary_cta_action`). */\n action_key?: string | null\n metadata?: CtaPostMessageMetadata | null\n}\n\n/**\n * The description link: its label, the action block it opens and, like a CTA's, the variant that\n * tells that block what to show (ditto's `in_description_cta_variant`, e.g. `low_balance`). On mini\n * and micro it words the card's action; `block` is empty when that action opens no drawer.\n */\nexport interface InDescriptionCTA {\n label: string\n block?: string\n variant?: string | null\n action_key?: string | null\n}\n\nexport interface Footer {\n /** V1: a pre-formatted date string. */\n date?: string\n /**\n * The account label, on both V1 and V2. The backend resolves the plurality: one account sends\n * its name (e.g. `Epic Bank`), several send a localized count (e.g. `2 Accounts`), none sends\n * `null` (tupac's `footer_account_label` returns nil for a beat with no accounts, as Payday Cash\n * Left Over Status does). There is deliberately no separate `accounts` key.\n */\n account?: string | null\n /**\n * V2 (LargeTransactionV2 onward): unix seconds, formatted by `Footer` for display.\n * Replaces `date`; `date` wins when a beat somehow sends both.\n */\n timestamp?: number\n}\n\n// ============ Instance Slot Types ============\n// Values are the snake_case block names the backend sends on a beat's instance slot; the PascalCase\n// keys stay as friendly references (e.g. BlockType.BarChartBlock === 'bar_chart_block').\nexport const BlockType = {\n AccountBlock: 'account_block',\n AccountSwitchBlock: 'account_switch_block',\n BarChartBlock: 'bar_chart_block',\n BudgetBlock: 'budget_block',\n DirectDepositBlock: 'direct_deposit_block',\n ImageBlock: 'image_block',\n TransactionBlock: 'transaction_block',\n DonutChartBlock: 'donut_chart_block',\n DoubleBarChartBlock: 'double_bar_chart_block',\n DoubleProgressBarBlock: 'double_progress_bar_block',\n DebtsBlock: 'debts_block',\n RepeatingTransactionBlock: 'repeating_transaction_block',\n SaveExtraBlock: 'save_extra_block',\n SavingsOpportunityBlock: 'savings_opportunity_block',\n StepChartBlock: 'step_chart_block',\n SVGImageBlock: 'svg_image_block',\n UpcomingBillBlock: 'upcoming_bill_block',\n UpcomingSubscriptionBlock: 'upcoming_subscription_block',\n WithdrawalBlock: 'withdrawal_block',\n} as const\n\nexport type BlockType = (typeof BlockType)[keyof typeof BlockType]\n\n/**\n * A pre-localized row on a V2 instance slot. The backend resolves the copy and formatting; the\n * logo is a `LogoRef` (an entity guid or a status icon, see `logoFromRef`).\n */\nexport interface InstanceSlotRow {\n amount?: number\n logo?: LogoRef\n primary_text?: string\n secondary_text?: string\n}\n\n/**\n * V2: the slots a block's variant filled, keyed by slot name; ditto owns the names and omits any\n * slot it has no value for (`lib/ditto/blocks/<block>.yml`). Read with `slot()`, which names the\n * kind the caller expects.\n */\nexport interface InstanceSlotData {\n [slot: string]: unknown\n}\n\n/**\n * Reads one slot off a block's `data`; undefined when ditto did not fill it.\n *\n * The caller names the kind, because the slot's kind lives in the block's ditto schema and not\n * here — a block fills slots with whatever its card needs, so no fixed list of kinds would hold\n * (`account_switch_block` alone carries a boolean and `budget_block` a nested object).\n */\nexport const slot = <T = unknown>(\n data: InstanceSlotData | undefined,\n name: string,\n): T | undefined => data?.[name] as T | undefined\n\n/**\n * V2: which block renders this beat's content, and what it renders.\n *\n * `block` is optional: a beat whose template has no ditto config arrives as an empty `{}` and the\n * card renders its copy and CTAs alone, so a reader cannot assume a block is named. One interface\n * with `block` optional rather than a union with `Record<string, never>`, which TypeScript absorbs\n * — that union left `block` reading as required and typed a promise it did not keep.\n *\n * `variant` is optional for the same reason — the empty `{}` carries neither. Every ditto beat\n * file that names a block also names a variant, so a *filled* slot always has one; ditto drops a\n * nil variant rather than sending null, which is why the type is `string | null | undefined`.\n */\nexport interface InstanceSlot {\n block?: BlockType\n variant?: string | null\n /** The slots this block's variant declares in ditto. */\n data?: InstanceSlotData\n // Direct Deposit block (Set Up Direct Deposit, Switch Direct Deposit, Missing\n // Interest Rate): account facts carried flat on the slot, beside `data`.\n /** Primary line on the hero card, e.g. \"Epic Bank Checking, *1234\". */\n account_name?: string\n /** Secondary line beneath the name, e.g. \"Checking Account\" / \"Credit Card\". */\n account_type?: string\n /** Status pill label, e.g. \"Direct Deposit Not Set Up\" / \"Interest Rate: 19.99% APR\". */\n status_text?: string\n institution_guid?: string\n institution_name?: string\n // Shared across multiple V2 component blocks:\n // `amount` — UpcomingBillBlock (projected bill), SavingsOpportunityBlock (coupon),\n // UpcomingSubscriptionBlock (price per cadence).\n // `merchant_guid` / `merchant_name` — UpcomingBillBlock (bill row logo + name),\n // UpcomingSubscriptionBlock (hero logo + name).\n /** Dollar amount (unformatted); the block formats it as currency. */\n amount?: number\n // Withdrawal block (Emergency Fund Withdrawal): one row flat on the slot - `amount` above is the\n // withdrawal, shown with its date line \"{amount_label} {withdrawal_date}\" over the balance row.\n /** Pre-localized lead-in for the date line, e.g. \"Withdrawn on\". */\n amount_label?: string\n /** The withdrawal's calendar day, `YYYY-MM-DD` (e.g. `2026-10-20`); the card formats it. */\n withdrawal_date?: string\n /** Account balance after the withdrawal (unformatted); the card formats it as currency. */\n balance?: number\n /** Pre-localized label for the balance row, e.g. \"Balance\". */\n balance_label?: string\n /** Merchant guid used to render the inline / hero logo via `LogoFromGuid` (`MCH-...`). */\n merchant_guid?: string\n /** Merchant display name — shown as logo alt text and as the merchant/hero label. */\n merchant_name?: string\n // Upcoming Bill block (Projected Bill Payment): the block derives the Sun→Sat week strip\n // around `due_date` at render time.\n /** Due date of the projected bill in ISO form (e.g. `2025-10-30`). */\n due_date?: string\n // Savings Opportunity block (Save An Extra, Potential Savings, Embedded): purely data-driven\n // coupon card. Backend sends the caption and the amount, plus `slot` to toggle the green\n // gradient background when the card is embedded in a parent surface that supplies its own.\n /** Caption shown above the amount, e.g. `Save an extra` or `Potential savings`. */\n label?: string\n /**\n * Whether to render the green gradient slot behind the coupon. Defaults to true. Backend sends\n * `false` when the coupon is embedded in a parent surface that supplies its own background.\n */\n slot?: boolean\n // Upcoming Subscription block: billing cadence for the price pill (`${amount} / ${cadence}`).\n /** Billing cadence word that trails the price, e.g. `month` or `year`. */\n cadence?: string\n // Account block (status on/off-track, deposit, payoff variants): card content carried flat on\n // the slot (the V2 contract drops `instance_slot_data`). `amount`, `label`, `merchant_guid`,\n // `merchant_name`, `institution_guid`, `institution_name` are shared fields declared above.\n /** Secondary line beneath the amount on the standard card, e.g. \"Remaining after expenses\". */\n sub_text?: string\n /** Header bar text (standard card) or the colored category strip label (deposit cards). */\n header_text?: string\n /** Generic-tile icon name used when no merchant/institution logo is available. */\n icon_name?: string\n /** Category guid used to render the deposit-card logo fallback. */\n category_guid?: string\n // Debts block: `amount` is the current balance; the shared account/institution fields above.\n /** Projected payoff date in ISO form (e.g. `2027-03-01`); the block formats it as month + year. */\n payoff_date?: string\n /** Monthly payment toward the debt (unformatted); the block formats it as currency. */\n monthly_payment?: number\n /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */\n interest_rate?: number\n}\n"],"mappings":"AA8TA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
import { InstanceSlot } from '../../../../core';
|
|
1
2
|
import { BlockProps } from '../../types';
|
|
2
|
-
/** The
|
|
3
|
-
export
|
|
4
|
-
amount?: number;
|
|
5
|
-
amount_label?: string;
|
|
6
|
-
balance?: number;
|
|
7
|
-
balance_label?: string;
|
|
8
|
-
withdrawal_date?: string;
|
|
9
|
-
}
|
|
3
|
+
/** The withdrawal card's fields, flat on `instance_slot` beside `block` and `variant`. */
|
|
4
|
+
export type WithdrawalSlot = Pick<InstanceSlot, 'amount' | 'amount_label' | 'withdrawal_date' | 'balance' | 'balance_label'>;
|
|
10
5
|
/**
|
|
11
|
-
* The `withdrawal_block` (Highlight Withdrawal)
|
|
12
|
-
* `instance_slot
|
|
13
|
-
*
|
|
14
|
-
* card. Renders nothing unless
|
|
6
|
+
* The `withdrawal_block` (Highlight Withdrawal). Ditto's WithdrawalBlock puts the card's fields flat
|
|
7
|
+
* on `instance_slot` - `{ block, variant, amount, amount_label, withdrawal_date, balance,
|
|
8
|
+
* balance_label }` - with no `data`. The labels render as sent; `amount` and `balance` are numbers
|
|
9
|
+
* and `withdrawal_date` a `YYYY-MM-DD` day, which the card formats. Renders nothing unless both
|
|
10
|
+
* numbers are present.
|
|
15
11
|
*/
|
|
16
12
|
declare const WithdrawalBlock: ({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
13
|
export default WithdrawalBlock;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import n from "@mui/material/Stack";
|
|
1
|
+
import e from "../../../components/WithdrawalCard.es.js";
|
|
2
|
+
import r from "@mui/material/Stack";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
return !Number.isFinite(a
|
|
4
|
+
var m = ({ payload: l }) => {
|
|
5
|
+
const a = l.instance_slot ?? {};
|
|
6
|
+
return !Number.isFinite(a.amount) || !Number.isFinite(a.balance) ? null : /* @__PURE__ */ t(r, {
|
|
8
7
|
sx: { px: 16 },
|
|
9
|
-
children: /* @__PURE__ */ t(
|
|
8
|
+
children: /* @__PURE__ */ t(e, {
|
|
10
9
|
amount: a.amount,
|
|
11
10
|
amountLabel: a.amount_label,
|
|
12
11
|
balance: a.balance,
|
|
@@ -16,7 +15,7 @@ var c = ({ payload: e }) => {
|
|
|
16
15
|
});
|
|
17
16
|
};
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
m as default
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=WithdrawalBlock.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithdrawalBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport {
|
|
1
|
+
{"version":3,"file":"WithdrawalBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport type { InstanceSlot } from '../../../../core'\nimport WithdrawalCard from '../../../components/WithdrawalCard'\nimport type { BlockProps } from '../../types'\n\n/** The withdrawal card's fields, flat on `instance_slot` beside `block` and `variant`. */\nexport type WithdrawalSlot = Pick<\n InstanceSlot,\n 'amount' | 'amount_label' | 'withdrawal_date' | 'balance' | 'balance_label'\n>\n\n/**\n * The `withdrawal_block` (Highlight Withdrawal). Ditto's WithdrawalBlock puts the card's fields flat\n * on `instance_slot` - `{ block, variant, amount, amount_label, withdrawal_date, balance,\n * balance_label }` - with no `data`. The labels render as sent; `amount` and `balance` are numbers\n * and `withdrawal_date` a `YYYY-MM-DD` day, which the card formats. Renders nothing unless both\n * numbers are present.\n */\nconst WithdrawalBlock = ({ payload }: BlockProps) => {\n const slot: WithdrawalSlot = payload.instance_slot ?? {}\n\n if (!Number.isFinite(slot.amount) || !Number.isFinite(slot.balance)) return null\n\n return (\n <Stack sx={{ px: 16 }}>\n <WithdrawalCard\n amount={slot.amount as number}\n amountLabel={slot.amount_label}\n balance={slot.balance as number}\n balanceLabel={slot.balance_label}\n withdrawalDate={slot.withdrawal_date}\n />\n </Stack>\n )\n}\n\nexport default WithdrawalBlock\n"],"mappings":";;;AAmBA,IAAM,IAAA,CAAmB,EAAE,SAAA,EAAA,MAA0B;AACnD,QAAM,IAAuB,EAAQ,iBAAiB,CAAC;AAEvD,SAAI,CAAC,OAAO,SAAS,EAAK,MAAM,KAAK,CAAC,OAAO,SAAS,EAAK,OAAO,IAAU,OAG1E,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,IAAI,GAAG;AAAA,IAClB,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,QAAQ,EAAK;AAAA,MACb,aAAa,EAAK;AAAA,MAClB,SAAS,EAAK;AAAA,MACd,cAAc,EAAK;AAAA,MACnB,gBAAgB,EAAK;AAAA,IACtB,CAAA;AAAA,EACI,CAAA;AAEX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface AmountBreakdownRow {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
amount: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface AmountBreakdownTotal {
|
|
7
|
+
amount: ReactNode;
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface AmountBreakdownCardProps {
|
|
11
|
+
rows: AmountBreakdownRow[];
|
|
12
|
+
total: AmountBreakdownTotal;
|
|
13
|
+
}
|
|
14
|
+
declare const AmountBreakdownCard: ({ rows, total }: AmountBreakdownCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export default AmountBreakdownCard;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { useId as c } from "react";
|
|
2
|
+
import e from "@mui/material/Stack";
|
|
3
|
+
import { Text as t } from "@mxenabled/mxui";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import p from "@mui/material/Divider";
|
|
6
|
+
var h = ({ rows: o, total: n }) => {
|
|
7
|
+
const a = c();
|
|
8
|
+
return o.length === 0 ? null : /* @__PURE__ */ i(e, {
|
|
9
|
+
sx: {
|
|
10
|
+
bgcolor: "background.paper",
|
|
11
|
+
borderRadius: "8px",
|
|
12
|
+
boxShadow: 1,
|
|
13
|
+
gap: 16,
|
|
14
|
+
p: 16,
|
|
15
|
+
width: "100%"
|
|
16
|
+
},
|
|
17
|
+
children: [/* @__PURE__ */ r(e, {
|
|
18
|
+
divider: /* @__PURE__ */ r(p, {
|
|
19
|
+
"aria-hidden": !0,
|
|
20
|
+
role: "presentation"
|
|
21
|
+
}),
|
|
22
|
+
role: "list",
|
|
23
|
+
sx: {
|
|
24
|
+
border: "1px solid",
|
|
25
|
+
borderColor: "divider",
|
|
26
|
+
borderRadius: "8px",
|
|
27
|
+
overflow: "hidden",
|
|
28
|
+
width: "100%"
|
|
29
|
+
},
|
|
30
|
+
children: o.map((d, l) => /* @__PURE__ */ i(e, {
|
|
31
|
+
role: "listitem",
|
|
32
|
+
sx: {
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
gap: 16,
|
|
36
|
+
justifyContent: "space-between",
|
|
37
|
+
minHeight: 44,
|
|
38
|
+
px: 12,
|
|
39
|
+
py: 14
|
|
40
|
+
},
|
|
41
|
+
children: [/* @__PURE__ */ r(t, {
|
|
42
|
+
color: "text.primary",
|
|
43
|
+
truncate: !0,
|
|
44
|
+
variant: "body1",
|
|
45
|
+
children: d.label
|
|
46
|
+
}), /* @__PURE__ */ r(t, {
|
|
47
|
+
bold: !0,
|
|
48
|
+
color: "text.primary",
|
|
49
|
+
sx: {
|
|
50
|
+
flexShrink: 0,
|
|
51
|
+
fontVariantNumeric: "tabular-nums",
|
|
52
|
+
letterSpacing: "-0.15px"
|
|
53
|
+
},
|
|
54
|
+
variant: "body1",
|
|
55
|
+
children: d.amount
|
|
56
|
+
})]
|
|
57
|
+
}, l))
|
|
58
|
+
}), /* @__PURE__ */ i(e, {
|
|
59
|
+
sx: {
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
bgcolor: "background.default",
|
|
62
|
+
borderRadius: "8px",
|
|
63
|
+
justifyContent: "center",
|
|
64
|
+
minHeight: 72,
|
|
65
|
+
p: 12,
|
|
66
|
+
width: "100%"
|
|
67
|
+
},
|
|
68
|
+
children: [/* @__PURE__ */ r(t, {
|
|
69
|
+
"aria-describedby": a,
|
|
70
|
+
color: "text.primary",
|
|
71
|
+
component: "p",
|
|
72
|
+
sx: { fontVariantNumeric: "tabular-nums" },
|
|
73
|
+
variant: "h2",
|
|
74
|
+
children: n.amount
|
|
75
|
+
}), /* @__PURE__ */ r(t, {
|
|
76
|
+
color: "text.secondary",
|
|
77
|
+
component: "p",
|
|
78
|
+
id: a,
|
|
79
|
+
sx: { fontWeight: 400 },
|
|
80
|
+
variant: "subtitle2",
|
|
81
|
+
children: n.label
|
|
82
|
+
})]
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
h as default
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=AmountBreakdownCard.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmountBreakdownCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AmountBreakdownCard.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react'\n\nimport Divider from '@mui/material/Divider'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nexport interface AmountBreakdownRow {\n label: ReactNode\n amount: ReactNode\n}\n\nexport interface AmountBreakdownTotal {\n amount: ReactNode\n label: ReactNode\n}\n\nexport interface AmountBreakdownCardProps {\n rows: AmountBreakdownRow[]\n total: AmountBreakdownTotal\n}\n\nconst AmountBreakdownCard = ({ rows, total }: AmountBreakdownCardProps) => {\n const totalLabelId = useId()\n\n if (rows.length === 0) return null\n\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: 1,\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <Stack\n divider={<Divider aria-hidden={true} role=\"presentation\" />}\n role=\"list\"\n sx={{\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '8px',\n overflow: 'hidden',\n width: '100%',\n }}\n >\n {rows.map((row, index) => (\n <Stack\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n role=\"listitem\"\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'space-between',\n minHeight: 44,\n px: 12,\n py: 14,\n }}\n >\n <Text color=\"text.primary\" truncate={true} variant=\"body1\">\n {row.label}\n </Text>\n <Text\n bold={true}\n color=\"text.primary\"\n sx={{ flexShrink: 0, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.15px' }}\n variant=\"body1\"\n >\n {row.amount}\n </Text>\n </Stack>\n ))}\n </Stack>\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.default',\n borderRadius: '8px',\n justifyContent: 'center',\n minHeight: 72,\n p: 12,\n width: '100%',\n }}\n >\n <Text\n aria-describedby={totalLabelId}\n color=\"text.primary\"\n component=\"p\"\n sx={{ fontVariantNumeric: 'tabular-nums' }}\n variant=\"h2\"\n >\n {total.amount}\n </Text>\n <Text\n color=\"text.secondary\"\n component=\"p\"\n id={totalLabelId}\n sx={{ fontWeight: 400 }}\n variant=\"subtitle2\"\n >\n {total.label}\n </Text>\n </Stack>\n </Stack>\n )\n}\n\nexport default AmountBreakdownCard\n"],"mappings":";;;;;AAsBA,IAAM,IAAA,CAAuB,EAAE,MAAA,GAAM,OAAA,EAAA,MAAsC;AACzE,QAAM,IAAe,EAAM;AAE3B,SAAI,EAAK,WAAW,IAAU,OAG5B,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,cAAc;AAAA,MACd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,IACT;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAS,eAAa;AAAA,QAAM,MAAK;AAAA,MAAgB,CAAA;AAAA,MAC1D,MAAK;AAAA,MACL,IAAI;AAAA,QACF,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,UAAU;AAAA,QACV,OAAO;AAAA,MACT;AAAA,MAEC,UAAA,EAAK,IAAA,CAAK,GAAK,MACd,gBAAA,EAAC,GAAD;AAAA,QAGE,MAAK;AAAA,QACL,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,KAAK;AAAA,UACL,gBAAgB;AAAA,UAChB,WAAW;AAAA,UACX,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QAZF,UAAA,CAcE,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAe,UAAU;AAAA,UAAM,SAAQ;AAAA,UAChD,UAAA,EAAI;AAAA,QACD,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,UACE,MAAM;AAAA,UACN,OAAM;AAAA,UACN,IAAI;AAAA,YAAE,YAAY;AAAA,YAAG,oBAAoB;AAAA,YAAgB,eAAe;AAAA,UAAU;AAAA,UAClF,SAAQ;AAAA,UAEP,UAAA,EAAI;AAAA,QACD,CAAA,CACD;AAAA,MAvBA,GAAA,CAuBA,CACR;AAAA,IACI,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,WAAW;AAAA,QACX,GAAG;AAAA,QACH,OAAO;AAAA,MACT;AAAA,MATF,UAAA,CAWE,gBAAA,EAAC,GAAD;AAAA,QACE,oBAAkB;AAAA,QAClB,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI,EAAE,oBAAoB,eAAe;AAAA,QACzC,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,WAAU;AAAA,QACV,IAAI;AAAA,QACJ,IAAI,EAAE,YAAY,IAAI;AAAA,QACtB,SAAQ;AAAA,QAEP,UAAA,EAAM;AAAA,MACH,CAAA,CACD;AAAA,IACF,CAAA,CAAA;AAAA;AAEX"}
|
|
@@ -4,6 +4,7 @@ export { default as ConnectionDetailDrillDown, type ConnectionDetailContent, } f
|
|
|
4
4
|
export { default as DirectDepositCard, type DirectDepositCardStyleProps, type DirectDepositPillConfig, } from './components/DirectDepositCard';
|
|
5
5
|
export { default as DebtPayoffCard, type DebtPayoffCardStyleProps, type DebtPayoffPillConfig, type DebtPayoffStat, } from './components/DebtPayoffCard';
|
|
6
6
|
export { default as AmountPill } from './components/AmountPill';
|
|
7
|
+
export { default as AmountBreakdownCard, type AmountBreakdownCardProps, type AmountBreakdownRow, type AmountBreakdownTotal, } from './components/AmountBreakdownCard';
|
|
7
8
|
export { default as BadgedTile } from './components/BadgedTile';
|
|
8
9
|
export { default as StatusBadge, type StatusTone } from './components/StatusBadge';
|
|
9
10
|
export { default as DesignateEmergencySavingsCard, type DesignateEmergencySavingsOption, } from './components/DesignateEmergencySavingsCard';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import r from "./components/StatusPill.es.js";
|
|
2
|
-
import { resolveInsightRender as
|
|
2
|
+
import { resolveInsightRender as m } from "./resolveInsightRender.es.js";
|
|
3
3
|
import { useBeatActions as a } from "./beatActions.es.js";
|
|
4
4
|
import { BAR_ARIA_LABEL as e, BAR_CHART_VARIANTS as f, barChartVariant as n, buildChartData as c, buildDataSeries as l } from "./blocks/ChartBlocks/BarchartBlock/utils.es.js";
|
|
5
5
|
import { HOST_ACTIONS as d } from "./ctaActions/hostActions.es.js";
|
|
6
|
-
import { useBeatCtaActions as
|
|
6
|
+
import { useBeatCtaActions as C, useCtaHandler as g } from "./ctaActions/useCtaAction.es.js";
|
|
7
7
|
import { BarchartBlock as k } from "./blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
|
|
8
8
|
import { DoubleBarChartBlock as S } from "./blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
|
|
9
9
|
import h from "./blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
|
|
10
10
|
import L from "./blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
|
|
11
11
|
import I from "./blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
|
|
12
|
-
import R, { isLogoGuid as
|
|
13
|
-
import
|
|
12
|
+
import R, { isLogoGuid as w } from "./components/LogoFromGuid.es.js";
|
|
13
|
+
import O from "./components/AccountHeroCard.es.js";
|
|
14
14
|
import y from "./components/DirectDepositCard.es.js";
|
|
15
15
|
import { detailedAccountVariant as M, directDepositVariant as P, isDetailedAccountVariant as _ } from "./blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js";
|
|
16
16
|
import x from "./blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
|
|
@@ -22,21 +22,21 @@ import Q from "./components/DebtPayoffCard.es.js";
|
|
|
22
22
|
import Y from "./components/InsightTransactionRow.es.js";
|
|
23
23
|
import $ from "./components/TransactionListCard.es.js";
|
|
24
24
|
import ro from "./blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
|
|
25
|
-
import
|
|
25
|
+
import mo from "./components/UpcomingBillCard.es.js";
|
|
26
26
|
import ao from "./blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
|
|
27
27
|
import eo from "./components/SaveAnExtraCard.es.js";
|
|
28
28
|
import no from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
|
|
29
29
|
import lo from "./components/SavingsOpportunityCard.es.js";
|
|
30
30
|
import Bo from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
|
|
31
|
-
import
|
|
31
|
+
import go from "./components/StatusMessageCard.es.js";
|
|
32
32
|
import { transactionBlockVariant as ko } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
|
|
33
33
|
import { TransactionBlock as So } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
|
|
34
34
|
import ho from "./components/AmountPill.es.js";
|
|
35
35
|
import Lo from "./components/SubscriptionHeroCard.es.js";
|
|
36
36
|
import Io from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
|
|
37
37
|
import Ro from "./components/WithdrawalCard.es.js";
|
|
38
|
-
import
|
|
39
|
-
import { SVGImageBlock as
|
|
38
|
+
import Ho from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
|
|
39
|
+
import { SVGImageBlock as Vo } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
|
|
40
40
|
import Eo from "./components/shared/StatusSnackbar.es.js";
|
|
41
41
|
import Po from "./components/FeedbackDialog.es.js";
|
|
42
42
|
import Fo from "./components/FeedbackModal.es.js";
|
|
@@ -49,65 +49,67 @@ import { OverflowMenu as Xo } from "./components/OverflowMenu.es.js";
|
|
|
49
49
|
import { InsightOptionsMenu as Zo } from "./components/InsightOptionsMenu.es.js";
|
|
50
50
|
import or from "./components/StatusBadge.es.js";
|
|
51
51
|
import tr from "./components/CompactInsightCard.es.js";
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import
|
|
59
|
-
import kr from "./components/
|
|
60
|
-
import Sr from "./components/
|
|
61
|
-
import hr from "./components/
|
|
62
|
-
import Lr from "./components/
|
|
52
|
+
import ir from "./components/AmountBreakdownCard.es.js";
|
|
53
|
+
import pr from "./components/DesignateEmergencySavingsCard.es.js";
|
|
54
|
+
import { FeedbackBar as fr } from "./components/FeedbackBar.es.js";
|
|
55
|
+
import { DismissInsightDialog as cr } from "./components/DismissInsightDialog.es.js";
|
|
56
|
+
import { HiddenConfirmationCard as sr } from "./components/HiddenConfirmationCard.es.js";
|
|
57
|
+
import { LoadingCard as Br } from "./components/LoadingCard.es.js";
|
|
58
|
+
import { ObsolesceBanner as gr } from "./components/ObsolesceBanner.es.js";
|
|
59
|
+
import kr from "./components/BaseLayout.es.js";
|
|
60
|
+
import Sr from "./components/LogoTile.es.js";
|
|
61
|
+
import hr from "./components/LogoClusterCard.es.js";
|
|
62
|
+
import Lr from "./components/MerchantHighlightCard.es.js";
|
|
63
|
+
import Ir from "./components/P2PLogoStack.es.js";
|
|
63
64
|
export {
|
|
64
65
|
U as AccountBlock,
|
|
65
|
-
|
|
66
|
+
O as AccountHeroCard,
|
|
66
67
|
q as AccountSwitchBlock,
|
|
68
|
+
ir as AmountBreakdownCard,
|
|
67
69
|
ho as AmountPill,
|
|
68
70
|
e as BAR_ARIA_LABEL,
|
|
69
71
|
f as BAR_CHART_VARIANTS,
|
|
70
72
|
Ko as BadgedTile,
|
|
71
73
|
k as BarchartBlock,
|
|
72
|
-
|
|
74
|
+
kr as BaseLayout,
|
|
73
75
|
J as BudgetBlock,
|
|
74
76
|
tr as CompactInsightCard,
|
|
75
77
|
Go as ConnectionDetailDrillDown,
|
|
76
78
|
Q as DebtPayoffCard,
|
|
77
79
|
ro as DebtsBlock,
|
|
78
|
-
|
|
80
|
+
pr as DesignateEmergencySavingsCard,
|
|
79
81
|
x as DetailedAccountBlock,
|
|
80
82
|
x as DirectDepositBlock,
|
|
81
83
|
y as DirectDepositCard,
|
|
82
|
-
|
|
84
|
+
cr as DismissInsightDialog,
|
|
83
85
|
L as DonutChartBlock,
|
|
84
86
|
S as DoubleBarChartBlock,
|
|
85
87
|
I as DoubleProgressBarBlock,
|
|
86
88
|
zo as ErrorCard,
|
|
87
|
-
|
|
89
|
+
fr as FeedbackBar,
|
|
88
90
|
Po as FeedbackDialog,
|
|
89
91
|
Fo as FeedbackModal,
|
|
90
92
|
d as HOST_ACTIONS,
|
|
91
|
-
|
|
93
|
+
sr as HiddenConfirmationCard,
|
|
92
94
|
jo as InsightErrorCard,
|
|
93
95
|
Zo as InsightOptionsMenu,
|
|
94
96
|
Y as InsightTransactionRow,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
Br as LoadingCard,
|
|
98
|
+
hr as LogoClusterCard,
|
|
97
99
|
R as LogoFromGuid,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Sr as LogoTile,
|
|
101
|
+
Lr as MerchantHighlightCard,
|
|
102
|
+
gr as ObsolesceBanner,
|
|
101
103
|
Xo as OverflowMenu,
|
|
102
|
-
|
|
104
|
+
Ir as P2PLogoStack,
|
|
103
105
|
ao as RepeatingTransactionBlock,
|
|
104
|
-
|
|
106
|
+
Vo as SVGImageBlock,
|
|
105
107
|
eo as SaveAnExtraCard,
|
|
106
108
|
no as SaveExtraBlock,
|
|
107
109
|
Bo as SavingsOpportunityBlock,
|
|
108
110
|
lo as SavingsOpportunityCard,
|
|
109
111
|
or as StatusBadge,
|
|
110
|
-
|
|
112
|
+
go as StatusMessageCard,
|
|
111
113
|
r as StatusPill,
|
|
112
114
|
Eo as StatusSnackbar,
|
|
113
115
|
h as StepChartBlock,
|
|
@@ -117,9 +119,9 @@ export {
|
|
|
117
119
|
$ as TransactionListCard,
|
|
118
120
|
W as TransferLogoCard,
|
|
119
121
|
ao as UpcomingBillBlock,
|
|
120
|
-
|
|
122
|
+
mo as UpcomingBillCard,
|
|
121
123
|
Io as UpcomingSubscriptionBlock,
|
|
122
|
-
|
|
124
|
+
Ho as WithdrawalBlock,
|
|
123
125
|
Ro as WithdrawalCard,
|
|
124
126
|
n as barChartVariant,
|
|
125
127
|
c as buildChartData,
|
|
@@ -127,10 +129,10 @@ export {
|
|
|
127
129
|
M as detailedAccountVariant,
|
|
128
130
|
P as directDepositVariant,
|
|
129
131
|
_ as isDetailedAccountVariant,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
w as isLogoGuid,
|
|
133
|
+
m as resolveInsightRender,
|
|
132
134
|
ko as transactionBlockVariant,
|
|
133
135
|
a as useBeatActions,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
C as useBeatCtaActions,
|
|
137
|
+
g as useCtaHandler
|
|
136
138
|
};
|