@mx-cartographer/experiences 9.7.26 → 9.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/core/types/Insights.d.ts +4 -0
  3. package/dist/core/types/Insights.es.js.map +1 -1
  4. package/dist/core/types/localization/InsightsFeedCopy.d.ts +13 -0
  5. package/dist/insights-v2/blocks/ComponentBlocks/GoalsBlock/GoalsBlock.d.ts +10 -0
  6. package/dist/insights-v2/blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js +75 -0
  7. package/dist/insights-v2/blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js.map +1 -0
  8. package/dist/insights-v2/blocks/ComponentBlocks/GoalsBlock/index.d.ts +1 -0
  9. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.d.ts +3 -0
  10. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js +101 -0
  11. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js.map +1 -0
  12. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendGraphic.d.ts +5 -0
  13. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendGraphic.es.js +108 -0
  14. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendGraphic.es.js.map +1 -0
  15. package/dist/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/index.d.ts +1 -0
  16. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
  17. package/dist/insights-v2/components/GoalProgressCard.d.ts +42 -0
  18. package/dist/insights-v2/components/GoalProgressCard.es.js +135 -0
  19. package/dist/insights-v2/components/GoalProgressCard.es.js.map +1 -0
  20. package/dist/insights-v2/index.d.ts +1 -0
  21. package/dist/insights-v2/index.es.js +98 -92
  22. package/dist/insights-v2/mappings/blocks.es.js +58 -54
  23. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  24. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [9.7.28] - 10-21-2026
2
+
3
+ - **ADDED** - `goals_block` component block (`status` variant) for the Monthly Emergency Fund Review beat. Renders the new `GoalProgressCard` (progress line with an optional status pill, progress bar and icon-tile fact rows) from `instance_slot.data`, with row copy from the new `insights_feed.goals_block` namespace. Mock payloads, fixtures, stories and tests (WEC-1302)
4
+
5
+ ## [9.7.27] - 10-21-2026
6
+
7
+ - **ADDED** - `no_spend_days_block` for Weekly No Spend Days
8
+
1
9
  ## [9.7.26] - 10-21-2026
2
10
 
3
11
  - **FIXED** - a11y issues in line charts and transaction lists (MEW-4023)
@@ -252,6 +252,8 @@ export declare const BlockType: {
252
252
  readonly DoubleBarChartBlock: "double_bar_chart_block";
253
253
  readonly DoubleProgressBarBlock: "double_progress_bar_block";
254
254
  readonly DebtsBlock: "debts_block";
255
+ readonly GoalsBlock: "goals_block";
256
+ readonly NoSpendDaysBlock: "no_spend_days_block";
255
257
  readonly RepeatingTransactionBlock: "repeating_transaction_block";
256
258
  readonly SaveExtraBlock: "save_extra_block";
257
259
  readonly SavingsOpportunityBlock: "savings_opportunity_block";
@@ -352,4 +354,6 @@ export interface InstanceSlot {
352
354
  monthly_payment?: number;
353
355
  /** Annual interest rate as a percentage (e.g. `19.99`); the block formats it as a percent. */
354
356
  interest_rate?: number;
357
+ start_date?: string;
358
+ no_spend_days?: string[];
355
359
  }
@@ -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 // 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
+ {"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 GoalsBlock: 'goals_block',\n NoSpendDaysBlock: 'no_spend_days_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 start_date?: string\n no_spend_days?: string[]\n}\n"],"mappings":"AAgUA,IAAa,IAAA,CACX,GACA,MACkB,IAAO,CAAA"}
@@ -22,6 +22,8 @@ interface GeneralInsightsFeedCopy {
22
22
  try_again: string;
23
23
  update: string;
24
24
  updating: string;
25
+ dollar_bill?: string;
26
+ weekly_no_spending_component_alt_text?: DynamicKeyValue;
25
27
  }
26
28
  interface SettingsMenuCopy {
27
29
  close: string;
@@ -254,6 +256,15 @@ export interface DebtsBlockCopy {
254
256
  /** Footer caption for the `debt_summary` total, e.g. "Total balance". Optional until the service ships it. */
255
257
  total_balance_label?: string;
256
258
  }
259
+ /** Labels for the Goals component block. */
260
+ export interface GoalsBlockCopy {
261
+ /** `_1{percentage}` — whole-number percent, e.g. "50% Complete". */
262
+ percent_complete: string;
263
+ projected_completion_label: string;
264
+ contribution_label: string;
265
+ total_saved_label: string;
266
+ complete_label: string;
267
+ }
257
268
  export interface InsightsFeedCopy {
258
269
  general: GeneralInsightsFeedCopy;
259
270
  settings_menu: SettingsMenuCopy;
@@ -277,5 +288,7 @@ export interface InsightsFeedCopy {
277
288
  amount_input_modal?: AmountInputModalCopy;
278
289
  /** Optional until the localized-content service ships the namespace. */
279
290
  debts_block?: DebtsBlockCopy;
291
+ /** Optional until the localized-content service ships the namespace. */
292
+ goals_block?: GoalsBlockCopy;
280
293
  }
281
294
  export {};
@@ -0,0 +1,10 @@
1
+ import { InsightsPayload } from '../../../../core';
2
+ import { GoalProgressCardStyleProps } from '../../../components/GoalProgressCard';
3
+ interface GoalsBlockProps {
4
+ payload: InsightsPayload;
5
+ beatGuid?: string;
6
+ }
7
+ export declare const IN_PROGRESS: GoalProgressCardStyleProps;
8
+ export declare const COMPLETE: GoalProgressCardStyleProps;
9
+ declare const GoalsBlock: ({ payload }: GoalsBlockProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default GoalsBlock;
@@ -0,0 +1,75 @@
1
+ import { buildDynamicCopy as x } from "../../../../core/utils/Localization.es.js";
2
+ import { DATE_FORMATS_INTL as A, formatDate as N } from "../../../../core/constants/DateFormats.es.js";
3
+ import { useGlobalCopyStore as M } from "../../../../common/context/hooks.es.js";
4
+ import { slot as O } from "../../../../core/types/Insights.es.js";
5
+ import { formatCurrency as f, formatPercentage as R } from "../../../../core/utils/NumberFormatting.es.js";
6
+ import { STATUS_SUCCESS_TOKENS as u } from "../../../components/statusTokens.es.js";
7
+ import { parseDueDate as j } from "../RepeatingTransactionBlock/weekStrip.es.js";
8
+ import k, { clampPercent as F } from "../../../components/GoalProgressCard.es.js";
9
+ import G from "react";
10
+ import { jsx as w } from "react/jsx-runtime";
11
+ var v = {
12
+ bgcolor: "primary.main",
13
+ barColor: "primary.main",
14
+ trackColor: "grey.200",
15
+ tileColor: "primary.lighter",
16
+ iconColor: "primary.main",
17
+ pill: {
18
+ bgcolor: "primary.lighter",
19
+ borderColor: "primary.lighter",
20
+ labelColor: "text.primary"
21
+ }
22
+ }, U = {
23
+ ...v,
24
+ bgcolor: "success.main",
25
+ barColor: "success.main",
26
+ tileColor: "success.lighter",
27
+ iconColor: "success.main",
28
+ pill: {
29
+ bgcolor: u.bgcolor,
30
+ borderColor: u.borderColor,
31
+ labelColor: u.textColor,
32
+ icon: "check_circle"
33
+ }
34
+ }, H = (e) => !!e?.percent_complete && !!e.projected_completion_label && !!e.contribution_label && !!e.total_saved_label && !!e.complete_label, W = ({ payload: e }) => {
35
+ const r = M().insights_feed?.goals_block, o = H(r) ? r : void 0, { data: y } = e.instance_slot, t = (m) => O(y, m), l = (m) => {
36
+ const p = t(m);
37
+ return typeof p == "number" && Number.isFinite(p) ? p : void 0;
38
+ }, h = t("goal_name"), S = l("goal_percentage"), a = l("amount"), i = l("target_amount"), b = l("contributed_last_month"), _ = t("projected_completion_date"), s = t("is_complete"), d = s === !0 || s === "true" || s === 1, D = t("status_text")?.trim() || void 0;
39
+ G.useEffect(() => {
40
+ o || console.warn(`goals_block: ${r ? "copy incomplete" : "copy namespace missing"}; rendering the progress bar only`);
41
+ }, [r, o]);
42
+ const T = d ? U : v, E = a != null && i != null && i > 0 ? a / i * 100 : void 0, g = S ?? E, n = g != null ? Math.round(F(g)) : void 0, L = n == null ? void 0 : o ? x(o.percent_complete, `${n}`) : R(n / 100, {
43
+ style: "percent",
44
+ maximumFractionDigits: 0
45
+ }), c = [], C = _ ? j(_) : null;
46
+ o && C && c.push({
47
+ icon: "today",
48
+ label: o.projected_completion_label,
49
+ value: N(C, A.MED_MONTH_SHORT_DAY_FULL_YEAR)
50
+ }), o && b != null && c.push({
51
+ icon: "paid",
52
+ label: o.contribution_label,
53
+ value: f(b, "0,0.00")
54
+ }), o && a != null && c.push({
55
+ icon: "savings",
56
+ label: o.total_saved_label,
57
+ value: f(a, "0,0.00")
58
+ });
59
+ const P = d ? D ?? o?.complete_label : void 0;
60
+ return /* @__PURE__ */ w(k, {
61
+ ...T,
62
+ barLabel: h,
63
+ percent: n ?? 0,
64
+ percentLabel: L,
65
+ rows: c,
66
+ statusLabel: P
67
+ });
68
+ };
69
+ export {
70
+ U as COMPLETE,
71
+ v as IN_PROGRESS,
72
+ W as default
73
+ };
74
+
75
+ //# sourceMappingURL=GoalsBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoalsBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/GoalsBlock/GoalsBlock.tsx"],"sourcesContent":["import React from 'react'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InsightsPayload } from '../../../../core'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../../core/constants'\nimport type { GoalsBlockCopy } from '../../../../core/types/localization/InsightsFeedCopy'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { formatCurrency, formatPercentage } from '../../../../core/utils/NumberFormatting'\n\nimport GoalProgressCard, {\n clampPercent,\n type GoalProgressCardStyleProps,\n type GoalProgressRow,\n} from '../../../components/GoalProgressCard'\nimport { STATUS_SUCCESS_TOKENS } from '../../../components/statusTokens'\nimport { parseDueDate } from '../RepeatingTransactionBlock/weekStrip'\n\ninterface GoalsBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\nexport const IN_PROGRESS: GoalProgressCardStyleProps = {\n bgcolor: 'primary.main',\n barColor: 'primary.main',\n trackColor: 'grey.200',\n tileColor: 'primary.lighter',\n iconColor: 'primary.main',\n pill: { bgcolor: 'primary.lighter', borderColor: 'primary.lighter', labelColor: 'text.primary' },\n}\n\nexport const COMPLETE: GoalProgressCardStyleProps = {\n ...IN_PROGRESS,\n bgcolor: 'success.main',\n barColor: 'success.main',\n tileColor: 'success.lighter',\n iconColor: 'success.main',\n pill: {\n bgcolor: STATUS_SUCCESS_TOKENS.bgcolor,\n borderColor: STATUS_SUCCESS_TOKENS.borderColor,\n labelColor: STATUS_SUCCESS_TOKENS.textColor,\n icon: 'check_circle',\n },\n}\n\nconst hasAllLabels = (copy?: GoalsBlockCopy): copy is GoalsBlockCopy =>\n !!copy?.percent_complete &&\n !!copy.projected_completion_label &&\n !!copy.contribution_label &&\n !!copy.total_saved_label &&\n !!copy.complete_label\n\nconst GoalsBlock = ({ payload }: GoalsBlockProps) => {\n const copy = useGlobalCopyStore().insights_feed?.goals_block\n const labels = hasAllLabels(copy) ? copy : undefined\n const { data } = payload.instance_slot\n\n const read = <T,>(name: string): T | undefined => slot<T>(data, name)\n const readNumber = (name: string) => {\n const value = read<unknown>(name)\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n }\n\n const goalName = read<string>('goal_name')\n const goalPercentage = readNumber('goal_percentage')\n const amount = readNumber('amount')\n const targetAmount = readNumber('target_amount')\n const contributedLastMonth = readNumber('contributed_last_month')\n const projectedCompletionDate = read<string>('projected_completion_date')\n const rawComplete = read<unknown>('is_complete')\n const isComplete = rawComplete === true || rawComplete === 'true' || rawComplete === 1\n const statusText = read<string>('status_text')?.trim() || undefined\n\n React.useEffect(() => {\n if (labels) return\n console.warn(\n `goals_block: ${copy ? 'copy incomplete' : 'copy namespace missing'}; rendering the progress bar only`,\n )\n }, [copy, labels])\n\n const style = isComplete ? COMPLETE : IN_PROGRESS\n\n const derivedPercent =\n amount != null && targetAmount != null && targetAmount > 0\n ? (amount / targetAmount) * 100\n : undefined\n const percent = goalPercentage ?? derivedPercent\n const roundedPercent = percent != null ? Math.round(clampPercent(percent)) : undefined\n\n const percentLabel =\n roundedPercent == null\n ? undefined\n : labels\n ? (buildDynamicCopy(labels.percent_complete, `${roundedPercent}`) as string)\n : formatPercentage(roundedPercent / 100, {\n style: 'percent',\n maximumFractionDigits: 0,\n })\n\n const rows: GoalProgressRow[] = []\n const completionDate = projectedCompletionDate ? parseDueDate(projectedCompletionDate) : null\n if (labels && completionDate) {\n rows.push({\n icon: 'today',\n label: labels.projected_completion_label,\n value: formatDate(completionDate, DATE_FORMATS_INTL.MED_MONTH_SHORT_DAY_FULL_YEAR),\n })\n }\n if (labels && contributedLastMonth != null) {\n rows.push({\n icon: 'paid',\n label: labels.contribution_label,\n value: formatCurrency(contributedLastMonth, '0,0.00'),\n })\n }\n if (labels && amount != null) {\n rows.push({\n icon: 'savings',\n label: labels.total_saved_label,\n value: formatCurrency(amount, '0,0.00'),\n })\n }\n\n const statusLabel = isComplete ? (statusText ?? labels?.complete_label) : undefined\n\n return (\n <GoalProgressCard\n {...style}\n barLabel={goalName}\n percent={roundedPercent ?? 0}\n percentLabel={percentLabel}\n rows={rows}\n statusLabel={statusLabel}\n />\n )\n}\n\nexport default GoalsBlock\n"],"mappings":";;;;;;;;;;AAsBA,IAAa,IAA0C;AAAA,EACrD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,MAAM;AAA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KAAU,QAAQ,KAAgB,QAAQ,IAAe,IACpD,IAAS,IAAgB,MAC1B,QACA,IAAU,KAAkB,GAC5B,IAAiB,KAAW,OAAO,KAAK,MAAM,EAAa,CAAO,CAAC,IAAI,QAEvE,IACJ,KAAkB,OACd,SACA,IACG,EAAiB,EAAO,kBAAkB,GAAG,CAAA,EAAgB,IAC9D,EAAiB,IAAiB,KAAK;AAAA,IACrC,OAAO;AAAA,IACP,uBAAuB;AAAA,EACzB,CAAC,GAEH,IAA0B,CAAC,GAC3B,IAAiB,IAA0B,EAAa,CAAuB,IAAI;AACzF,EAAI,KAAU,KACZ,EAAK,KAAK;AAAA,IACR,MAAM;AAAA,IACN,OAAO,EAAO;AAAA,IACd,OAAO,EAAW,GAAgB,EAAkB,6BAA6B;AAAA,EACnF,CAAC,GAEC,KAAU,KAAwB,QACpC,EAAK,KAAK;AAAA,IACR,MAAM;AAAA,IACN,OAAO,EAAO;AAAA,IACd,OAAO,EAAe,GAAsB,QAAQ;AAAA,EACtD,CAAC,GAEC,KAAU,KAAU,QACtB,EAAK,KAAK;AAAA,IACR,MAAM;AAAA,IACN,OAAO,EAAO;AAAA,IACd,OAAO,EAAe,GAAQ,QAAQ;AAAA,EACxC,CAAC;AAGH,QAAM,IAAc,IAAc,KAAc,GAAQ,iBAAkB;AAE1E,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,UAAU;AAAA,IACV,SAAS,KAAkB;AAAA,IACb,cAAA;AAAA,IACR,MAAA;AAAA,IACO,aAAA;AAAA,EACd,CAAA;AAEL"}
@@ -0,0 +1 @@
1
+ export { default as GoalsBlock } from './GoalsBlock';
@@ -0,0 +1,3 @@
1
+ import { BlockProps } from '../../types';
2
+ declare const NoSpendDaysBlock: ({ payload }: BlockProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default NoSpendDaysBlock;
@@ -0,0 +1,101 @@
1
+ import { formatDate as g } from "../../../../core/constants/DateFormats.es.js";
2
+ import { useGlobalCopyStore as y } from "../../../../common/context/hooks.es.js";
3
+ import { slot as _ } from "../../../../core/types/Insights.es.js";
4
+ import { ConfettiOverlay as h } from "../../../components/shared/ConfettiOverlay.es.js";
5
+ import { parseDueDate as S } from "../RepeatingTransactionBlock/weekStrip.es.js";
6
+ import x from "./NoSpendGraphic.es.js";
7
+ import i from "@mui/material/Stack";
8
+ import { Text as b } from "@mxenabled/mxui";
9
+ import { CheckCircle as D } from "@mxenabled/mx-icons";
10
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
11
+ var k = 5, w = [
12
+ "sunday",
13
+ "monday",
14
+ "tuesday",
15
+ "wednesday",
16
+ "thursday",
17
+ "friday",
18
+ "saturday"
19
+ ], N = (t) => [
20
+ t.getFullYear(),
21
+ t.getMonth() + 1,
22
+ t.getDate()
23
+ ].map((r) => String(r).padStart(2, "0")).join("-"), v = (t, r) => Array.from({ length: 7 }, (l, s) => {
24
+ const o = new Date(t);
25
+ o.setDate(t.getDate() + s);
26
+ const a = N(o);
27
+ return {
28
+ iso: a,
29
+ key: w[o.getDay()],
30
+ label: g(o, { weekday: "short" }),
31
+ isNoSpend: r.includes(a)
32
+ };
33
+ }), M = ({ payload: t }) => {
34
+ const r = y().insights_feed?.general, l = r?.weekly_no_spending_component_alt_text, { instance_slot: s = {} } = t, o = (e) => _(s.data, e) ?? s[e], a = o("start_date"), d = typeof a == "string" ? S(a.slice(0, 10)) : null;
35
+ if (!d) return null;
36
+ const p = o("no_spend_days"), f = Array.isArray(p) ? p.map((e) => String(e).slice(0, 10)) : [], c = v(d, f), m = c.filter((e) => e.isNoSpend).length;
37
+ return /* @__PURE__ */ u(i, {
38
+ sx: {
39
+ alignItems: "center",
40
+ gap: 1,
41
+ position: "relative",
42
+ pt: 14,
43
+ px: 16
44
+ },
45
+ children: [
46
+ m >= k && /* @__PURE__ */ n(h, {}),
47
+ /* @__PURE__ */ n(x, {
48
+ count: m,
49
+ label: r?.dollar_bill
50
+ }),
51
+ /* @__PURE__ */ n(i, {
52
+ component: "ul",
53
+ direction: "row",
54
+ sx: {
55
+ justifyContent: "space-between",
56
+ listStyle: "none",
57
+ m: 0,
58
+ p: 0,
59
+ position: "relative",
60
+ width: "100%"
61
+ },
62
+ children: c.map((e) => /* @__PURE__ */ u(i, {
63
+ "aria-label": e.isNoSpend ? l?.[`${e.key}_no_spend_day`] : l?.[`${e.key}_is_a_spend_day`],
64
+ component: "li",
65
+ sx: {
66
+ alignItems: "center",
67
+ gap: 4,
68
+ width: 24
69
+ },
70
+ children: [/* @__PURE__ */ n(b, {
71
+ "aria-hidden": "true",
72
+ color: e.isNoSpend ? "success.main" : "text.secondary",
73
+ sx: { fontWeight: e.isNoSpend ? 600 : 400 },
74
+ variant: "body2",
75
+ children: e.label
76
+ }), e.isNoSpend ? /* @__PURE__ */ n(D, {
77
+ "aria-hidden": !0,
78
+ filled: !0,
79
+ size: 24,
80
+ sx: { color: "success.main" }
81
+ }) : /* @__PURE__ */ n(i, {
82
+ "aria-hidden": "true",
83
+ sx: {
84
+ bgcolor: "action.disabledBackground",
85
+ border: "2px solid transparent",
86
+ backgroundClip: "content-box",
87
+ borderRadius: "50%",
88
+ height: 24,
89
+ width: 24
90
+ }
91
+ })]
92
+ }, e.iso))
93
+ })
94
+ ]
95
+ });
96
+ };
97
+ export {
98
+ M as default
99
+ };
100
+
101
+ //# sourceMappingURL=NoSpendDaysBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoSpendDaysBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { CheckCircle } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InstanceSlot } from '../../../../core'\nimport { formatDate } from '../../../../core/constants'\nimport { ConfettiOverlay } from '../../../components/shared/ConfettiOverlay'\nimport type { BlockProps } from '../../types'\nimport { parseDueDate } from '../RepeatingTransactionBlock/weekStrip'\n\nimport NoSpendGraphic from './NoSpendGraphic'\n\ntype NoSpendDaysSlot = Pick<InstanceSlot, 'start_date' | 'no_spend_days'>\n\nconst CONFETTI_MIN_DAYS = 5\n\nconst DAY_KEYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']\n\nconst toIsoDay = (date: Date) =>\n [date.getFullYear(), date.getMonth() + 1, date.getDate()]\n .map((part) => String(part).padStart(2, '0'))\n .join('-')\n\nconst buildWeek = (start: Date, noSpendDays: string[]) =>\n Array.from({ length: 7 }, (_, index) => {\n const date = new Date(start)\n date.setDate(start.getDate() + index)\n const iso = toIsoDay(date)\n return {\n iso,\n key: DAY_KEYS[date.getDay()],\n label: formatDate(date, { weekday: 'short' }),\n isNoSpend: noSpendDays.includes(iso),\n }\n })\n\nconst NoSpendDaysBlock = ({ payload }: BlockProps) => {\n const generalCopy = useGlobalCopyStore().insights_feed?.general\n const altText = generalCopy?.weekly_no_spending_component_alt_text\n\n const { instance_slot = {} } = payload\n const field = <K extends keyof NoSpendDaysSlot>(key: K) =>\n slot<InstanceSlot[K]>(instance_slot.data, key) ?? instance_slot[key]\n\n const startDate = field('start_date')\n const start = typeof startDate === 'string' ? parseDueDate(startDate.slice(0, 10)) : null\n\n if (!start) return null\n\n const rawDays = field('no_spend_days')\n const noSpendDays = Array.isArray(rawDays) ? rawDays.map((day) => String(day).slice(0, 10)) : []\n const week = buildWeek(start, noSpendDays)\n const count = week.filter((day) => day.isNoSpend).length\n\n return (\n <Stack sx={{ alignItems: 'center', gap: 1, position: 'relative', pt: 14, px: 16 }}>\n {count >= CONFETTI_MIN_DAYS && <ConfettiOverlay />}\n <NoSpendGraphic count={count} label={generalCopy?.dollar_bill} />\n <Stack\n component=\"ul\"\n direction=\"row\"\n sx={{\n justifyContent: 'space-between',\n listStyle: 'none',\n m: 0,\n p: 0,\n position: 'relative',\n width: '100%',\n }}\n >\n {week.map((day) => (\n <Stack\n aria-label={\n day.isNoSpend\n ? altText?.[`${day.key}_no_spend_day`]\n : altText?.[`${day.key}_is_a_spend_day`]\n }\n component=\"li\"\n key={day.iso}\n sx={{ alignItems: 'center', gap: 4, width: 24 }}\n >\n <Text\n aria-hidden=\"true\"\n color={day.isNoSpend ? 'success.main' : 'text.secondary'}\n sx={{ fontWeight: day.isNoSpend ? 600 : 400 }}\n variant=\"body2\"\n >\n {day.label}\n </Text>\n {day.isNoSpend ? (\n <CheckCircle\n aria-hidden={true}\n filled={true}\n size={24}\n sx={{ color: 'success.main' }}\n />\n ) : (\n <Stack\n aria-hidden=\"true\"\n sx={{\n bgcolor: 'action.disabledBackground',\n border: '2px solid transparent',\n backgroundClip: 'content-box',\n borderRadius: '50%',\n height: 24,\n width: 24,\n }}\n />\n )}\n </Stack>\n ))}\n </Stack>\n </Stack>\n )\n}\n\nexport default NoSpendDaysBlock\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,IAAoB,GAEpB,IAAW;AAAA,EAAC;AAAA,EAAU;AAAA,EAAU;AAAA,EAAW;AAAA,EAAa;AAAA,EAAY;AAAA,EAAU;AAAU,GAExF,IAAA,CAAY,MAChB;AAAA,EAAC,EAAK,YAAY;AAAA,EAAG,EAAK,SAAS,IAAI;AAAA,EAAG,EAAK,QAAQ;AAAC,EACrD,IAAA,CAAK,MAAS,OAAO,CAAI,EAAE,SAAS,GAAG,GAAG,CAAC,EAC3C,KAAK,GAAG,GAEP,IAAA,CAAa,GAAa,MAC9B,MAAM,KAAK,EAAE,QAAQ,EAAE,GAAA,CAAI,GAAG,MAAU;AACtC,QAAM,IAAO,IAAI,KAAK,CAAK;AAC3B,EAAA,EAAK,QAAQ,EAAM,QAAQ,IAAI,CAAK;AACpC,QAAM,IAAM,EAAS,CAAI;AACzB,SAAO;AAAA,IACL,KAAA;AAAA,IACA,KAAK,EAAS,EAAK,OAAO,CAAA;AAAA,IAC1B,OAAO,EAAW,GAAM,EAAE,SAAS,QAAQ,CAAC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cACE,EAAI,YACA,IAAU,GAAG,EAAI,GAAA,eAAI,IACrB,IAAU,GAAG,EAAI,GAAA,iBAAI;AAAA,UAE3B,WAAU;AAAA,UAEV,IAAI;AAAA,YAAE,YAAY;AAAA,YAAU,KAAK;AAAA,YAAG,OAAO;AAAA,UAAG;AAAA,UARhD,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,YACE,eAAY;AAAA,YACZ,OAAO,EAAI,YAAY,iBAAiB;AAAA,YACxC,IAAI,EAAE,YAAY,EAAI,YAAY,MAAM,IAAI;AAAA,YAC5C,SAAQ;AAAA,YAEP,UAAA,EAAI;AAAA,UACD,CAAA,GACL,EAAI,YACH,gBAAA,EAAC,GAAD;AAAA,YACE,eAAa;AAAA,YACb,QAAQ;AAAA,YACR,MAAM;AAAA,YACN,IAAI,EAAE,OAAO,eAAe;AAAA,UAC7B,CAAA,IAED,gBAAA,EAAC,GAAD;AAAA,YACE,eAAY;AAAA,YACZ,IAAI;AAAA,cACF,SAAS;AAAA,cACT,QAAQ;AAAA,cACR,gBAAgB;AAAA,cAChB,cAAc;AAAA,cACd,QAAQ;AAAA,cACR,OAAO;AAAA,YACT;AAAA,UACD,CAAA,CAEE;AAAA,QA/BA,GAAA,EAAI,GA+BJ,CACR;AAAA,MACI,CAAA;AAAA,IACF;AAAA;AAEX"}
@@ -0,0 +1,5 @@
1
+ declare const NoSpendGraphic: ({ count, label }: {
2
+ count: number;
3
+ label?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default NoSpendGraphic;
@@ -0,0 +1,108 @@
1
+ import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ var n = "#59AB8E", i = "#0D5F42", d = "#FBB346", s = "#FFDA6C", h = "M63.48 3.24C66.89 1.24 71.11 1.24 74.52 3.24L103.04 19.95C106.38 21.91 108.44 25.5 108.44 29.37V63.09C108.44 66.97 106.38 70.55 103.04 72.51L74.52 89.23C71.11 91.22 66.89 91.22 63.48 89.23L34.96 72.51C31.61 70.55 29.56 66.97 29.56 63.09V29.37C29.56 25.5 31.61 21.91 34.96 19.95Z", a = ({ x: r, y: e, rotate: x }) => /* @__PURE__ */ t("path", {
3
+ d: "M14 14C14 6 7.5 0 0 0V14Z",
4
+ fill: i,
5
+ transform: `translate(${r} ${e}) rotate(${x} 7 7)`
6
+ }), l = ({ x: r, y: e }) => /* @__PURE__ */ t("text", {
7
+ fill: n,
8
+ fontSize: 9.2,
9
+ fontWeight: 700,
10
+ x: r,
11
+ y: e,
12
+ children: "$"
13
+ }), c = ({ count: r, label: e }) => /* @__PURE__ */ o("svg", {
14
+ "aria-label": e,
15
+ height: 110,
16
+ role: "img",
17
+ style: { position: "relative" },
18
+ viewBox: "0 0 138 110",
19
+ width: 138,
20
+ children: [
21
+ /* @__PURE__ */ t("rect", {
22
+ fill: n,
23
+ height: 69,
24
+ rx: 2,
25
+ width: 138,
26
+ y: 12
27
+ }),
28
+ /* @__PURE__ */ t("rect", {
29
+ fill: "none",
30
+ height: 59.8,
31
+ rx: 1,
32
+ stroke: i,
33
+ strokeWidth: 5,
34
+ width: 128.8,
35
+ x: 4.6,
36
+ y: 16.6
37
+ }),
38
+ /* @__PURE__ */ t(a, {
39
+ rotate: 90,
40
+ x: 9.4,
41
+ y: 21.4
42
+ }),
43
+ /* @__PURE__ */ t(a, {
44
+ rotate: 180,
45
+ x: 114.5,
46
+ y: 21.4
47
+ }),
48
+ /* @__PURE__ */ t(a, {
49
+ rotate: 0,
50
+ x: 9.4,
51
+ y: 58
52
+ }),
53
+ /* @__PURE__ */ t(a, {
54
+ rotate: 270,
55
+ x: 114.5,
56
+ y: 58
57
+ }),
58
+ /* @__PURE__ */ t("circle", {
59
+ cx: 69,
60
+ cy: 46.5,
61
+ fill: i,
62
+ r: 16.5
63
+ }),
64
+ /* @__PURE__ */ t(l, {
65
+ x: 10,
66
+ y: 29
67
+ }),
68
+ /* @__PURE__ */ t(l, {
69
+ x: 121.4,
70
+ y: 29
71
+ }),
72
+ /* @__PURE__ */ t(l, {
73
+ x: 10,
74
+ y: 70.5
75
+ }),
76
+ /* @__PURE__ */ t(l, {
77
+ x: 121.4,
78
+ y: 70.5
79
+ }),
80
+ /* @__PURE__ */ o("g", {
81
+ style: { filter: "drop-shadow(0 3px 4px rgba(0,0,0,0.06)) drop-shadow(0 6px 6px rgba(0,0,0,0.16))" },
82
+ children: [/* @__PURE__ */ t("path", {
83
+ d: h,
84
+ fill: s
85
+ }), /* @__PURE__ */ t("path", {
86
+ d: h,
87
+ fill: d,
88
+ transform: "translate(69 46.2) scale(0.88) translate(-69 -46.2)"
89
+ })]
90
+ }),
91
+ /* @__PURE__ */ t("text", {
92
+ "aria-hidden": "true",
93
+ dominantBaseline: "central",
94
+ fill: "black",
95
+ fontSize: 53,
96
+ fontWeight: 700,
97
+ textAnchor: "middle",
98
+ x: 69,
99
+ y: 48,
100
+ children: r
101
+ })
102
+ ]
103
+ });
104
+ export {
105
+ c as default
106
+ };
107
+
108
+ //# sourceMappingURL=NoSpendGraphic.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoSpendGraphic.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendGraphic.tsx"],"sourcesContent":["const BILL = '#59AB8E'\nconst BILL_DARK = '#0D5F42'\nconst BADGE = '#FBB346'\nconst BADGE_EDGE = '#FFDA6C'\n\nconst HEXAGON =\n 'M63.48 3.24C66.89 1.24 71.11 1.24 74.52 3.24L103.04 19.95C106.38 21.91 108.44 25.5 108.44 29.37V63.09C108.44 66.97 106.38 70.55 103.04 72.51L74.52 89.23C71.11 91.22 66.89 91.22 63.48 89.23L34.96 72.51C31.61 70.55 29.56 66.97 29.56 63.09V29.37C29.56 25.5 31.61 21.91 34.96 19.95Z'\n\nconst Corner = ({ x, y, rotate }: { x: number; y: number; rotate: number }) => (\n <path\n d=\"M14 14C14 6 7.5 0 0 0V14Z\"\n fill={BILL_DARK}\n transform={`translate(${x} ${y}) rotate(${rotate} 7 7)`}\n />\n)\n\nconst Dollar = ({ x, y }: { x: number; y: number }) => (\n <text fill={BILL} fontSize={9.2} fontWeight={700} x={x} y={y}>\n $\n </text>\n)\n\nconst NoSpendGraphic = ({ count, label }: { count: number; label?: string }) => (\n <svg\n aria-label={label}\n height={110}\n role=\"img\"\n style={{ position: 'relative' }}\n viewBox=\"0 0 138 110\"\n width={138}\n >\n <rect fill={BILL} height={69} rx={2} width={138} y={12} />\n <rect\n fill=\"none\"\n height={59.8}\n rx={1}\n stroke={BILL_DARK}\n strokeWidth={5}\n width={128.8}\n x={4.6}\n y={16.6}\n />\n <Corner rotate={90} x={9.4} y={21.4} />\n <Corner rotate={180} x={114.5} y={21.4} />\n <Corner rotate={0} x={9.4} y={58} />\n <Corner rotate={270} x={114.5} y={58} />\n <circle cx={69} cy={46.5} fill={BILL_DARK} r={16.5} />\n <Dollar x={10} y={29} />\n <Dollar x={121.4} y={29} />\n <Dollar x={10} y={70.5} />\n <Dollar x={121.4} y={70.5} />\n <g\n style={{\n filter: 'drop-shadow(0 3px 4px rgba(0,0,0,0.06)) drop-shadow(0 6px 6px rgba(0,0,0,0.16))',\n }}\n >\n <path d={HEXAGON} fill={BADGE_EDGE} />\n <path\n d={HEXAGON}\n fill={BADGE}\n transform=\"translate(69 46.2) scale(0.88) translate(-69 -46.2)\"\n />\n </g>\n <text\n aria-hidden=\"true\"\n dominantBaseline=\"central\"\n fill=\"black\"\n fontSize={53}\n fontWeight={700}\n textAnchor=\"middle\"\n x={69}\n y={48}\n >\n {count}\n </text>\n </svg>\n)\n\nexport default NoSpendGraphic\n"],"mappings":";AAAA,IAAM,IAAO,WACP,IAAY,WACZ,IAAQ,WACR,IAAa,WAEb,IACJ,0RAEI,IAAA,CAAU,EAAE,GAAA,GAAG,GAAA,GAAG,QAAA,EAAA,MACtB,gBAAA,EAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAM;AAAA,EACN,WAAW,aAAa,CAAA,IAAK,CAAA,YAAa,CAA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AA,MAAI,IAAI;AAAA,MAAM,MAAM;AAAA,MAAW,GAAG;AAAA,IAAO,CAAA;AAAA,IACrD,gBAAA,EAAC,GAAD;AAAA,MAAQ,GAAG;AAAA,MAAI,GAAG;AAAA,IAAK,CAAA;AAAA,IACvB,gBAAA,EAAC,GAAD;AAAA,MAAQ,GAAG;AAAA,MAAO,GAAG;AAAA,IAAK,CAAA;AAAA,IAC1B,gBAAA,EAAC,GAAD;AAAA,MAAQ,GAAG;AAAA,MAAI,GAAG;AAAA,IAAO,CAAA;AAAA,IACzB,gBAAA,EAAC,GAAD;AAAA,MAAQ,GAAG;AAAA,MAAO,GAAG;AAAA,IAAO,CAAA;AAAA,IAC5B,gBAAA,EAAC,KAAD;AAAA,MACE,OAAO,EACL,QAAQ,kFACV;AAAA,MAHF,UAAA,CAKE,gBAAA,EAAC,QAAD;AAAA,QAAM,GAAG;AAAA,QAAS,MAAM;AAAA,MAAa,CAAA,GACrC,gBAAA,EAAC,QAAD;AAAA,QACE,GAAG;AAAA,QACH,MAAM;AAAA,QACN,WAAU;AAAA,MACX,CAAA,CACA;AAAA;IACH,gBAAA,EAAC,QAAD;AAAA,MACE,eAAY;AAAA,MACZ,kBAAiB;AAAA,MACjB,MAAK;AAAA,MACL,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,YAAW;AAAA,MACX,GAAG;AAAA,MACH,GAAG;AAAA,MAEF,UAAA;AAAA,IACG,CAAA;AAAA,EACH"}
@@ -0,0 +1 @@
1
+ export { default as NoSpendDaysBlock } from './NoSpendDaysBlock';
@@ -3,6 +3,8 @@ export * from './AccountSwitchBlock';
3
3
  export * from './BudgetBlock';
4
4
  export * from './DebtsBlock';
5
5
  export * from './DetailedAccountBlock';
6
+ export * from './GoalsBlock';
7
+ export * from './NoSpendDaysBlock';
6
8
  export * from './RepeatingTransactionBlock';
7
9
  export * from './SaveExtraBlock';
8
10
  export * from './SavingsOpportunityBlock';
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ export interface GoalProgressRow {
3
+ /** mx-icons glyph drawn in the row's tile, e.g. `today`. */
4
+ icon: string;
5
+ /** Caption above the value, e.g. "Projected to Complete:". */
6
+ label: ReactNode;
7
+ /** Pre-formatted value, e.g. "Dec 31, 2026". */
8
+ value: ReactNode;
9
+ }
10
+ export interface GoalProgressPillConfig {
11
+ bgcolor: string;
12
+ borderColor: string;
13
+ labelColor: string;
14
+ icon?: string;
15
+ }
16
+ export interface GoalProgressCardStyleProps {
17
+ /** Slot surface token behind the white card. Default `primary.main`. */
18
+ bgcolor?: string;
19
+ /** Progress fill token. Default `primary.main`. */
20
+ barColor?: string;
21
+ /** Progress track token. Default `grey.200`. */
22
+ trackColor?: string;
23
+ /** Row icon tile surface token. Default `primary.lighter`. */
24
+ tileColor?: string;
25
+ /** Row icon glyph token. Default `primary.main`. */
26
+ iconColor?: string;
27
+ pill?: GoalProgressPillConfig;
28
+ }
29
+ interface GoalProgressCardProps extends GoalProgressCardStyleProps {
30
+ /** Progress toward the goal as a percentage; clamped to 0–100 for the bar. */
31
+ percent: number;
32
+ /** Pre-localized progress line above the bar, e.g. "50% Complete". */
33
+ percentLabel?: ReactNode;
34
+ /** Names the bar together with the progress line, e.g. the goal's name. */
35
+ barLabel?: string;
36
+ /** Optional status pill beside the progress line, e.g. "Goal reached". */
37
+ statusLabel?: ReactNode;
38
+ rows?: GoalProgressRow[];
39
+ }
40
+ export declare const clampPercent: (percent: number) => number;
41
+ declare const GoalProgressCard: ({ barColor, barLabel, bgcolor, iconColor, percent, percentLabel, pill, rows, statusLabel, tileColor, trackColor, }: GoalProgressCardProps) => import("react/jsx-runtime").JSX.Element;
42
+ export default GoalProgressCard;
@@ -0,0 +1,135 @@
1
+ import S from "./StatusPill.es.js";
2
+ import o from "@mui/material/Stack";
3
+ import { Text as c } from "@mxenabled/mxui";
4
+ import { Icon as g } from "@mxenabled/mx-icons";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import d from "@mui/material/Box";
7
+ var I = {
8
+ bgcolor: "grey.200",
9
+ borderColor: "grey.200",
10
+ labelColor: "text.primary"
11
+ }, R = [], k = (a) => Number.isFinite(a) ? Math.min(100, Math.max(0, a)) : 0, T = ({ barColor: a = "primary.main", barLabel: t, bgcolor: p = "primary.main", iconColor: b = "primary.main", percent: u, percentLabel: n, pill: e = I, rows: s = R, statusLabel: m, tileColor: f = "primary.lighter", trackColor: v = "grey.200" }) => {
12
+ const h = k(u), l = typeof n == "string" ? n : void 0, y = t && l ? `${t}, ${l}` : t ?? l;
13
+ return /* @__PURE__ */ r(d, {
14
+ sx: {
15
+ bgcolor: p,
16
+ p: 16,
17
+ width: "100%"
18
+ },
19
+ children: /* @__PURE__ */ i(o, {
20
+ sx: {
21
+ bgcolor: "background.paper",
22
+ borderRadius: "12px",
23
+ gap: 16,
24
+ p: 16,
25
+ width: "100%"
26
+ },
27
+ children: [/* @__PURE__ */ i(o, {
28
+ sx: { gap: 12 },
29
+ children: [/* @__PURE__ */ i(o, {
30
+ sx: {
31
+ alignItems: "center",
32
+ flexDirection: "row",
33
+ gap: 12
34
+ },
35
+ children: [n && /* @__PURE__ */ r(c, {
36
+ sx: {
37
+ flexGrow: 1,
38
+ fontWeight: 700
39
+ },
40
+ variant: "h3",
41
+ children: n
42
+ }), m && /* @__PURE__ */ r(S, {
43
+ bgcolor: e.bgcolor,
44
+ borderColor: e.borderColor,
45
+ icon: e.icon ? /* @__PURE__ */ r(g, {
46
+ "aria-hidden": !0,
47
+ fill: !0,
48
+ name: e.icon,
49
+ size: 16,
50
+ sx: { color: e.labelColor }
51
+ }) : void 0,
52
+ label: m,
53
+ labelColor: e.labelColor,
54
+ labelVariant: "caption",
55
+ sx: {
56
+ alignSelf: "center",
57
+ flexShrink: 0,
58
+ ml: "auto",
59
+ px: 12
60
+ }
61
+ })]
62
+ }), /* @__PURE__ */ r(d, {
63
+ "aria-label": y,
64
+ "aria-valuemax": 100,
65
+ "aria-valuemin": 0,
66
+ "aria-valuenow": h,
67
+ role: "progressbar",
68
+ sx: {
69
+ bgcolor: v,
70
+ borderRadius: 999,
71
+ height: 16,
72
+ overflow: "hidden"
73
+ },
74
+ children: /* @__PURE__ */ r(d, { sx: {
75
+ bgcolor: a,
76
+ borderRadius: 999,
77
+ height: "100%",
78
+ transition: "width .4s cubic-bezier(0.28, 0.14, 0.34, 1.04)",
79
+ width: `${h}%`
80
+ } })
81
+ })]
82
+ }), s.length > 0 && /* @__PURE__ */ r(o, {
83
+ component: "ul",
84
+ sx: {
85
+ gap: 12,
86
+ listStyle: "none",
87
+ m: 0,
88
+ p: 0
89
+ },
90
+ children: s.map(({ icon: x, label: w, value: C }) => /* @__PURE__ */ i(o, {
91
+ component: "li",
92
+ sx: {
93
+ alignItems: "center",
94
+ flexDirection: "row",
95
+ gap: 16
96
+ },
97
+ children: [/* @__PURE__ */ r(o, {
98
+ sx: {
99
+ alignItems: "center",
100
+ bgcolor: f,
101
+ borderRadius: "8px",
102
+ flexShrink: 0,
103
+ height: 48,
104
+ justifyContent: "center",
105
+ width: 48
106
+ },
107
+ children: /* @__PURE__ */ r(g, {
108
+ "aria-hidden": !0,
109
+ name: x,
110
+ size: 24,
111
+ sx: { color: b }
112
+ })
113
+ }), /* @__PURE__ */ i(o, {
114
+ sx: { minWidth: 0 },
115
+ children: [/* @__PURE__ */ r(c, {
116
+ color: "text.secondary",
117
+ variant: "body2",
118
+ children: w
119
+ }), /* @__PURE__ */ r(c, {
120
+ sx: { fontWeight: 700 },
121
+ variant: "body1",
122
+ children: C
123
+ })]
124
+ })]
125
+ }, x))
126
+ })]
127
+ })
128
+ });
129
+ };
130
+ export {
131
+ k as clampPercent,
132
+ T as default
133
+ };
134
+
135
+ //# sourceMappingURL=GoalProgressCard.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoalProgressCard.es.js","names":[],"sources":["../../../src/insights-v2/components/GoalProgressCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { Text } from '@mxenabled/mxui'\n\nimport StatusPill from './StatusPill'\n\nexport interface GoalProgressRow {\n /** mx-icons glyph drawn in the row's tile, e.g. `today`. */\n icon: string\n /** Caption above the value, e.g. \"Projected to Complete:\". */\n label: ReactNode\n /** Pre-formatted value, e.g. \"Dec 31, 2026\". */\n value: ReactNode\n}\n\nexport interface GoalProgressPillConfig {\n bgcolor: string\n borderColor: string\n labelColor: string\n icon?: string\n}\n\nexport interface GoalProgressCardStyleProps {\n /** Slot surface token behind the white card. Default `primary.main`. */\n bgcolor?: string\n /** Progress fill token. Default `primary.main`. */\n barColor?: string\n /** Progress track token. Default `grey.200`. */\n trackColor?: string\n /** Row icon tile surface token. Default `primary.lighter`. */\n tileColor?: string\n /** Row icon glyph token. Default `primary.main`. */\n iconColor?: string\n pill?: GoalProgressPillConfig\n}\n\ninterface GoalProgressCardProps extends GoalProgressCardStyleProps {\n /** Progress toward the goal as a percentage; clamped to 0–100 for the bar. */\n percent: number\n /** Pre-localized progress line above the bar, e.g. \"50% Complete\". */\n percentLabel?: ReactNode\n /** Names the bar together with the progress line, e.g. the goal's name. */\n barLabel?: string\n /** Optional status pill beside the progress line, e.g. \"Goal reached\". */\n statusLabel?: ReactNode\n rows?: GoalProgressRow[]\n}\n\nconst NEUTRAL_PILL: GoalProgressPillConfig = {\n bgcolor: 'grey.200',\n borderColor: 'grey.200',\n labelColor: 'text.primary',\n}\n\nconst NO_ROWS: GoalProgressRow[] = []\n\nexport const clampPercent = (percent: number) =>\n Number.isFinite(percent) ? Math.min(100, Math.max(0, percent)) : 0\n\nconst GoalProgressCard = ({\n barColor = 'primary.main',\n barLabel,\n bgcolor = 'primary.main',\n iconColor = 'primary.main',\n percent,\n percentLabel,\n pill = NEUTRAL_PILL,\n rows = NO_ROWS,\n statusLabel,\n tileColor = 'primary.lighter',\n trackColor = 'grey.200',\n}: GoalProgressCardProps) => {\n const value = clampPercent(percent)\n const percentText = typeof percentLabel === 'string' ? percentLabel : undefined\n const barName =\n barLabel && percentText ? `${barLabel}, ${percentText}` : (barLabel ?? percentText)\n\n return (\n <Box sx={{ bgcolor, p: 16, width: '100%' }}>\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '12px',\n gap: 16,\n p: 16,\n width: '100%',\n }}\n >\n <Stack sx={{ gap: 12 }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12 }}>\n {percentLabel && (\n <Text sx={{ flexGrow: 1, fontWeight: 700 }} variant=\"h3\">\n {percentLabel}\n </Text>\n )}\n {statusLabel && (\n <StatusPill\n bgcolor={pill.bgcolor}\n borderColor={pill.borderColor}\n icon={\n pill.icon ? (\n <Icon\n aria-hidden={true}\n fill={true}\n name={pill.icon}\n size={16}\n sx={{ color: pill.labelColor }}\n />\n ) : undefined\n }\n label={statusLabel}\n labelColor={pill.labelColor}\n labelVariant=\"caption\"\n sx={{ alignSelf: 'center', flexShrink: 0, ml: 'auto', px: 12 }}\n />\n )}\n </Stack>\n <Box\n aria-label={barName}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={value}\n role=\"progressbar\"\n sx={{ bgcolor: trackColor, borderRadius: 999, height: 16, overflow: 'hidden' }}\n >\n <Box\n sx={{\n bgcolor: barColor,\n borderRadius: 999,\n height: '100%',\n transition: 'width .4s cubic-bezier(0.28, 0.14, 0.34, 1.04)',\n width: `${value}%`,\n }}\n />\n </Box>\n </Stack>\n\n {rows.length > 0 && (\n <Stack component=\"ul\" sx={{ gap: 12, listStyle: 'none', m: 0, p: 0 }}>\n {rows.map(({ icon, label, value: rowValue }) => (\n <Stack\n component=\"li\"\n key={icon}\n sx={{ alignItems: 'center', flexDirection: 'row', gap: 16 }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: tileColor,\n borderRadius: '8px',\n flexShrink: 0,\n height: 48,\n justifyContent: 'center',\n width: 48,\n }}\n >\n <Icon aria-hidden={true} name={icon} size={24} sx={{ color: iconColor }} />\n </Stack>\n <Stack sx={{ minWidth: 0 }}>\n <Text color=\"text.secondary\" variant=\"body2\">\n {label}\n </Text>\n <Text sx={{ fontWeight: 700 }} variant=\"body1\">\n {rowValue}\n </Text>\n </Stack>\n </Stack>\n ))}\n </Stack>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default GoalProgressCard\n"],"mappings":";;;;;;AAoDA,IAAM,IAAuC;AAAA,EAC3C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAA6B,CAAC,GAEvB,IAAA,CAAgB,MAC3B,OAAO,SAAS,CAAO,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,CAAO,CAAC,IAAI,GAE7D,IAAA,CAAoB,EACxB,UAAA,IAAW,gBACX,UAAA,GACA,SAAA,IAAU,gBACV,WAAA,IAAY,gBACZ,SAAA,GACA,cAAA,GACA,MAAA,IAAO,GACP,MAAA,IAAO,GACP,aAAA,GACA,WAAA,IAAY,mBACZ,YAAA,IAAa,WAAA,MACc;AAC3B,QAAM,IAAQ,EAAa,CAAO,GAC5B,IAAc,OAAO,KAAiB,WAAW,IAAe,QAChE,IACJ,KAAY,IAAc,GAAG,CAAA,KAAa,CAAA,KAAiB,KAAY;AAEzE,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI;AAAA,MAAE,SAAA;AAAA,MAAS,GAAG;AAAA,MAAI,OAAO;AAAA,IAAO;AAAA,IACvC,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,cAAc;AAAA,QACd,KAAK;AAAA,QACL,GAAG;AAAA,QACH,OAAO;AAAA,MACT;AAAA,MAPF,UAAA,CASE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI,EAAE,KAAK,GAAG;AAAA,QAArB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,YAAY;AAAA,YAAU,eAAe;AAAA,YAAO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AAA,QAAE;AAAA,QAChE,UAAA,EAAK,IAAA,CAAK,EAAE,MAAA,GAAM,OAAA,GAAO,OAAO,EAAA,MAC/B,gBAAA,EAAC,GAAD;AAAA,UACE,WAAU;AAAA,UAEV,IAAI;AAAA,YAAE,YAAY;AAAA,YAAU,eAAe;AAAA,YAAO,KAAK;AAAA,UAAG;AAAA,UAH5D,UAAA,CAKE,gBAAA,EAAC,GAAD;AAAA,YACE,IAAI;AAAA,cACF,YAAY;AAAA,cACZ,SAAS;AAAA,cACT,cAAc;AAAA,cACd,YAAY;AAAA,cACZ,QAAQ;AAAA,cACR,gBAAgB;AAAA,cAChB,OAAO;AAAA,YACT;AAAA,YAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,cAAM,eAAa;AAAA,cAAM,MAAM;AAAA,cAAM,MAAM;AAAA,cAAI,IAAI,EAAE,OAAO,EAAU;AAAA,YAAI,CAAA;AAAA,UACrE,CAAA,GACP,gBAAA,EAAC,GAAD;AAAA,YAAO,IAAI,EAAE,UAAU,EAAE;AAAA,YAAzB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,cAAM,OAAM;AAAA,cAAiB,SAAQ;AAAA,cAClC,UAAA;AAAA,YACG,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,cAAM,IAAI,EAAE,YAAY,IAAI;AAAA,cAAG,SAAQ;AAAA,cACpC,UAAA;AAAA,YACG,CAAA,CACD;AAAA,UACF,CAAA,CAAA;AAAA,QAxBA,GAAA,CAwBA,CACR;AAAA,MACI,CAAA,CAEJ;AAAA;EACJ,CAAA;AAET"}
@@ -3,6 +3,7 @@ export { default as AccountHeroCard } from './components/AccountHeroCard';
3
3
  export { default as ConnectionDetailDrillDown, type ConnectionDetailContent, } from './components/ConnectionDetailDrillDown';
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
+ export { default as GoalProgressCard, type GoalProgressCardStyleProps, type GoalProgressPillConfig, type GoalProgressRow, } from './components/GoalProgressCard';
6
7
  export { default as AmountPill } from './components/AmountPill';
7
8
  export { default as AmountBreakdownCard, type AmountBreakdownCardProps, type AmountBreakdownRow, type AmountBreakdownTotal, } from './components/AmountBreakdownCard';
8
9
  export { default as BadgedTile } from './components/BadgedTile';
@@ -10,11 +10,11 @@ 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
12
  import R, { isLogoGuid as w } from "./components/LogoFromGuid.es.js";
13
- import O from "./components/AccountHeroCard.es.js";
14
- import y from "./components/DirectDepositCard.es.js";
15
- import { detailedAccountVariant as M, directDepositVariant as P, isDetailedAccountVariant as _ } from "./blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js";
16
- import x from "./blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
17
- import U from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
13
+ import H from "./components/AccountHeroCard.es.js";
14
+ import P from "./components/DirectDepositCard.es.js";
15
+ import { detailedAccountVariant as E, directDepositVariant as M, isDetailedAccountVariant as G } from "./blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js";
16
+ import F from "./blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
17
+ import N from "./blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
18
18
  import W from "./components/TransferLogoCard.es.js";
19
19
  import q from "./blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
20
20
  import { BudgetBlock as J } from "./blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
@@ -22,116 +22,122 @@ 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 mo from "./components/UpcomingBillCard.es.js";
26
- import ao from "./blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
27
- import eo from "./components/SaveAnExtraCard.es.js";
28
- import no from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
29
- import lo from "./components/SavingsOpportunityCard.es.js";
30
- import Bo from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
31
- import go from "./components/StatusMessageCard.es.js";
32
- import { transactionBlockVariant as ko } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
33
- import { TransactionBlock as So } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
34
- import ho from "./components/AmountPill.es.js";
35
- import Lo from "./components/SubscriptionHeroCard.es.js";
36
- import Io from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
37
- import Ro from "./components/WithdrawalCard.es.js";
38
- import Ho from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
39
- import { SVGImageBlock as Vo } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
40
- import Eo from "./components/shared/StatusSnackbar.es.js";
41
- import Po from "./components/FeedbackDialog.es.js";
42
- import Fo from "./components/FeedbackModal.es.js";
43
- import Go from "./components/ConnectionDetailDrillDown.es.js";
44
- import No from "./components/SurveyModal.es.js";
45
- import jo from "./components/InsightErrorCard.es.js";
46
- import { ErrorCard as zo } from "./components/ErrorCard.es.js";
47
- import Ko from "./components/BadgedTile.es.js";
48
- import { OverflowMenu as Xo } from "./components/OverflowMenu.es.js";
49
- import { InsightOptionsMenu as Zo } from "./components/InsightOptionsMenu.es.js";
50
- import or from "./components/StatusBadge.es.js";
51
- import tr from "./components/CompactInsightCard.es.js";
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";
25
+ import mo from "./components/GoalProgressCard.es.js";
26
+ import ao from "./blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
27
+ import eo from "./blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
28
+ import no from "./components/UpcomingBillCard.es.js";
29
+ import lo from "./blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
30
+ import Bo from "./components/SaveAnExtraCard.es.js";
31
+ import go from "./blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
32
+ import ko from "./components/SavingsOpportunityCard.es.js";
33
+ import So from "./blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
34
+ import ho from "./components/StatusMessageCard.es.js";
35
+ import { transactionBlockVariant as Lo } from "./blocks/ComponentBlocks/TransactionBlock/layout.es.js";
36
+ import { TransactionBlock as Io } from "./blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
37
+ import Ro from "./components/AmountPill.es.js";
38
+ import yo from "./components/SubscriptionHeroCard.es.js";
39
+ import Oo from "./blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
40
+ import Vo from "./components/WithdrawalCard.es.js";
41
+ import Mo from "./blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
42
+ import { SVGImageBlock as _o } from "./blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
43
+ import xo from "./components/shared/StatusSnackbar.es.js";
44
+ import Uo from "./components/FeedbackDialog.es.js";
45
+ import jo from "./components/FeedbackModal.es.js";
46
+ import zo from "./components/ConnectionDetailDrillDown.es.js";
47
+ import Ko from "./components/SurveyModal.es.js";
48
+ import Xo from "./components/InsightErrorCard.es.js";
49
+ import { ErrorCard as Zo } from "./components/ErrorCard.es.js";
50
+ import or from "./components/BadgedTile.es.js";
51
+ import { OverflowMenu as tr } from "./components/OverflowMenu.es.js";
52
+ import { InsightOptionsMenu as ir } from "./components/InsightOptionsMenu.es.js";
53
+ import pr from "./components/StatusBadge.es.js";
54
+ import fr from "./components/CompactInsightCard.es.js";
55
+ import cr from "./components/AmountBreakdownCard.es.js";
56
+ import sr from "./components/DesignateEmergencySavingsCard.es.js";
57
+ import { FeedbackBar as Br } from "./components/FeedbackBar.es.js";
58
+ import { DismissInsightDialog as gr } from "./components/DismissInsightDialog.es.js";
59
+ import { HiddenConfirmationCard as kr } from "./components/HiddenConfirmationCard.es.js";
60
+ import { LoadingCard as Sr } from "./components/LoadingCard.es.js";
61
+ import { ObsolesceBanner as hr } from "./components/ObsolesceBanner.es.js";
62
+ import Lr from "./components/BaseLayout.es.js";
63
+ import Ir from "./components/LogoTile.es.js";
64
+ import Rr from "./components/LogoClusterCard.es.js";
65
+ import yr from "./components/MerchantHighlightCard.es.js";
66
+ import Or from "./components/P2PLogoStack.es.js";
64
67
  export {
65
- U as AccountBlock,
66
- O as AccountHeroCard,
68
+ N as AccountBlock,
69
+ H as AccountHeroCard,
67
70
  q as AccountSwitchBlock,
68
- ir as AmountBreakdownCard,
69
- ho as AmountPill,
71
+ cr as AmountBreakdownCard,
72
+ Ro as AmountPill,
70
73
  e as BAR_ARIA_LABEL,
71
74
  f as BAR_CHART_VARIANTS,
72
- Ko as BadgedTile,
75
+ or as BadgedTile,
73
76
  k as BarchartBlock,
74
- kr as BaseLayout,
77
+ Lr as BaseLayout,
75
78
  J as BudgetBlock,
76
- tr as CompactInsightCard,
77
- Go as ConnectionDetailDrillDown,
79
+ fr as CompactInsightCard,
80
+ zo as ConnectionDetailDrillDown,
78
81
  Q as DebtPayoffCard,
79
82
  ro as DebtsBlock,
80
- pr as DesignateEmergencySavingsCard,
81
- x as DetailedAccountBlock,
82
- x as DirectDepositBlock,
83
- y as DirectDepositCard,
84
- cr as DismissInsightDialog,
83
+ sr as DesignateEmergencySavingsCard,
84
+ F as DetailedAccountBlock,
85
+ F as DirectDepositBlock,
86
+ P as DirectDepositCard,
87
+ gr as DismissInsightDialog,
85
88
  L as DonutChartBlock,
86
89
  S as DoubleBarChartBlock,
87
90
  I as DoubleProgressBarBlock,
88
- zo as ErrorCard,
89
- fr as FeedbackBar,
90
- Po as FeedbackDialog,
91
- Fo as FeedbackModal,
91
+ Zo as ErrorCard,
92
+ Br as FeedbackBar,
93
+ Uo as FeedbackDialog,
94
+ jo as FeedbackModal,
95
+ mo as GoalProgressCard,
96
+ ao as GoalsBlock,
92
97
  d as HOST_ACTIONS,
93
- sr as HiddenConfirmationCard,
94
- jo as InsightErrorCard,
95
- Zo as InsightOptionsMenu,
98
+ kr as HiddenConfirmationCard,
99
+ Xo as InsightErrorCard,
100
+ ir as InsightOptionsMenu,
96
101
  Y as InsightTransactionRow,
97
- Br as LoadingCard,
98
- hr as LogoClusterCard,
102
+ Sr as LoadingCard,
103
+ Rr as LogoClusterCard,
99
104
  R as LogoFromGuid,
100
- Sr as LogoTile,
101
- Lr as MerchantHighlightCard,
102
- gr as ObsolesceBanner,
103
- Xo as OverflowMenu,
104
- Ir as P2PLogoStack,
105
- ao as RepeatingTransactionBlock,
106
- Vo as SVGImageBlock,
107
- eo as SaveAnExtraCard,
108
- no as SaveExtraBlock,
109
- Bo as SavingsOpportunityBlock,
110
- lo as SavingsOpportunityCard,
111
- or as StatusBadge,
112
- go as StatusMessageCard,
105
+ Ir as LogoTile,
106
+ yr as MerchantHighlightCard,
107
+ eo as NoSpendDaysBlock,
108
+ hr as ObsolesceBanner,
109
+ tr as OverflowMenu,
110
+ Or as P2PLogoStack,
111
+ lo as RepeatingTransactionBlock,
112
+ _o as SVGImageBlock,
113
+ Bo as SaveAnExtraCard,
114
+ go as SaveExtraBlock,
115
+ So as SavingsOpportunityBlock,
116
+ ko as SavingsOpportunityCard,
117
+ pr as StatusBadge,
118
+ ho as StatusMessageCard,
113
119
  r as StatusPill,
114
- Eo as StatusSnackbar,
120
+ xo as StatusSnackbar,
115
121
  h as StepChartBlock,
116
- Lo as SubscriptionHeroCard,
117
- No as SurveyModal,
118
- So as TransactionBlock,
122
+ yo as SubscriptionHeroCard,
123
+ Ko as SurveyModal,
124
+ Io as TransactionBlock,
119
125
  $ as TransactionListCard,
120
126
  W as TransferLogoCard,
121
- ao as UpcomingBillBlock,
122
- mo as UpcomingBillCard,
123
- Io as UpcomingSubscriptionBlock,
124
- Ho as WithdrawalBlock,
125
- Ro as WithdrawalCard,
127
+ lo as UpcomingBillBlock,
128
+ no as UpcomingBillCard,
129
+ Oo as UpcomingSubscriptionBlock,
130
+ Mo as WithdrawalBlock,
131
+ Vo as WithdrawalCard,
126
132
  n as barChartVariant,
127
133
  c as buildChartData,
128
134
  l as buildDataSeries,
129
- M as detailedAccountVariant,
130
- P as directDepositVariant,
131
- _ as isDetailedAccountVariant,
135
+ E as detailedAccountVariant,
136
+ M as directDepositVariant,
137
+ G as isDetailedAccountVariant,
132
138
  w as isLogoGuid,
133
139
  m as resolveInsightRender,
134
- ko as transactionBlockVariant,
140
+ Lo as transactionBlockVariant,
135
141
  a as useBeatActions,
136
142
  C as useBeatCtaActions,
137
143
  g as useCtaHandler
@@ -1,40 +1,42 @@
1
1
  import { ContactSupportActionBlock as p } from "../actionBlocks/ContactSupportActionBlock.es.js";
2
- import { hasDrawerBlock as W } from "./hasDrawerBlock.es.js";
2
+ import { hasDrawerBlock as Y } from "./hasDrawerBlock.es.js";
3
3
  import { actionBlocksKey as o } from "./actionBlocksKey.es.js";
4
4
  import { BarchartBlock as l } from "../blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js";
5
5
  import { DoubleBarChartBlock as _ } from "../blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js";
6
6
  import s from "../blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js";
7
- import C from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
8
- import k from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
7
+ import k from "../blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js";
8
+ import C from "../blocks/ChartBlocks/DoubleProgressBarBlock/DoubleProgressBarBlock.es.js";
9
9
  import B from "../blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js";
10
10
  import u from "../blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js";
11
11
  import T from "../blocks/ComponentBlocks/AccountSwitchBlock/AccountSwitchBlock.es.js";
12
12
  import { BudgetBlock as A } from "../blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js";
13
- import O from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
13
+ import f from "../blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js";
14
+ import O from "../blocks/ComponentBlocks/GoalsBlock/GoalsBlock.es.js";
15
+ import b from "../blocks/ComponentBlocks/NoSpendDaysBlock/NoSpendDaysBlock.es.js";
14
16
  import n from "../blocks/ComponentBlocks/RepeatingTransactionBlock/RepeatingTransactionBlock.es.js";
15
- import f from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
16
- import b from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
17
- import { TransactionBlock as N } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
18
- import g from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
19
- import I from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
20
- import d from "../blocks/ImageBlocks/ImageBlock.es.js";
21
- import { SVGImageBlock as L } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
22
- import { FeedbackModalActionBlock as P } from "../actionBlocks/FeedbackModalActionBlock.es.js";
23
- import { ConnectionDetailActionBlock as D } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
24
- import { ConnectWidgetActionBlock as h } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
25
- import { SurveyModalActionBlock as S } from "../actionBlocks/SurveyModalActionBlock.es.js";
26
- import { PlaceholderActionBlock as R } from "../actionBlocks/PlaceholderActionBlock.es.js";
27
- import { getMakeTransferDrawerTitle as E } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
28
- import { MakeTransferActionBlockLayer as K } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
29
- import { getDrawerHeaderTitle as v } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
30
- import { TransactionDetailsBlock as M } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
17
+ import N from "../blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js";
18
+ import d from "../blocks/ComponentBlocks/SavingsOpportunityBlock/SavingsOpportunityBlock.es.js";
19
+ import { TransactionBlock as g } from "../blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js";
20
+ import I from "../blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js";
21
+ import L from "../blocks/ComponentBlocks/WithdrawalBlock/WithdrawalBlock.es.js";
22
+ import P from "../blocks/ImageBlocks/ImageBlock.es.js";
23
+ import { SVGImageBlock as D } from "../blocks/ImageBlocks/SVGImageBlock/SVGImageBlock.es.js";
24
+ import { FeedbackModalActionBlock as h } from "../actionBlocks/FeedbackModalActionBlock.es.js";
25
+ import { ConnectionDetailActionBlock as S } from "../actionBlocks/ConnectionDetailActionBlock.es.js";
26
+ import { ConnectWidgetActionBlock as R } from "../actionBlocks/ConnectWidgetActionBlock.es.js";
27
+ import { SurveyModalActionBlock as E } from "../actionBlocks/SurveyModalActionBlock.es.js";
28
+ import { PlaceholderActionBlock as K } from "../actionBlocks/PlaceholderActionBlock.es.js";
29
+ import { getMakeTransferDrawerTitle as v } from "../actionBlocks/MakeTransferActionBlock/layout.es.js";
30
+ import { MakeTransferActionBlockLayer as y } from "../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer.es.js";
31
+ import { getDrawerHeaderTitle as M } from "../actionBlocks/TransactionHistoryBlock/utils.es.js";
32
+ import { TransactionDetailsBlock as w } from "../actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js";
31
33
  import { useTransactionDetailsPrepare as a } from "../actionBlocks/TransactionDetailsBlock/useTransactionDetailsPrepare.es.js";
32
- import { TransactionHistoryBlock as w } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
34
+ import { TransactionHistoryBlock as U } from "../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js";
33
35
  import { useRecurringTransactionPrepare as c } from "../actionBlocks/RecurringTransactionBlock/useRecurringTransactionPrepare.es.js";
34
- import { RecurringTransactionBlock as y } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
35
- import { TransactionListBlock as U } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
36
- import { RemainingCashBlock as H } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
37
- import { AmountInputModalBlock as x } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
36
+ import { RecurringTransactionBlock as G } from "../actionBlocks/RecurringTransactionBlock/RecurringTransactionBlock.es.js";
37
+ import { TransactionListBlock as H } from "../actionBlocks/TransactionListBlock/TransactionListBlock.es.js";
38
+ import { RemainingCashBlock as x } from "../actionBlocks/RemainingCashBlock/RemainingCashBlock.es.js";
39
+ import { AmountInputModalBlock as F } from "../actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js";
38
40
  var e = (t) => {
39
41
  }, r = (t) => ({
40
42
  get Component() {
@@ -49,34 +51,34 @@ var e = (t) => {
49
51
  get presentation() {
50
52
  return t().presentation;
51
53
  }
52
- }), Lo = {
54
+ }), So = {
53
55
  [o.PLACEHOLDER_ACTION_BLOCK]: r(() => ({
54
- Component: R,
56
+ Component: K,
55
57
  usePrepare: e,
56
58
  title: () => "Action Block Layer Drilldown"
57
59
  })),
58
60
  [o.MAKE_TRANSFER_ACTION_BLOCK]: r(() => ({
59
- Component: K,
61
+ Component: y,
60
62
  usePrepare: e,
61
- title: E
63
+ title: v
62
64
  })),
63
65
  [o.TRANSCATION_HISTORY_ACTION_BLOCK]: r(() => ({
64
- Component: w,
66
+ Component: U,
65
67
  usePrepare: e,
66
- title: v
68
+ title: M
67
69
  })),
68
70
  [o.TRANSACTION_DETAILS_ACTION_BLOCK]: r(() => ({
69
- Component: M,
71
+ Component: w,
70
72
  usePrepare: a,
71
73
  title: () => "Transaction Details"
72
74
  })),
73
75
  [o.RECURRING_TRANSACTION_ACTION_BLOCK]: r(() => ({
74
- Component: y,
76
+ Component: G,
75
77
  usePrepare: c,
76
78
  title: (t, i) => i.recurring?.expense_details ?? ""
77
79
  })),
78
80
  [o.REMAINING_CASH_ACTION_BLOCK]: r(() => ({
79
- Component: H,
81
+ Component: x,
80
82
  usePrepare: c,
81
83
  title: (t, i) => i.insights_feed?.remaining_cash?.title ?? ""
82
84
  })),
@@ -86,59 +88,61 @@ var e = (t) => {
86
88
  title: (t, i) => i.help?.request_support ?? ""
87
89
  })),
88
90
  [o.FEEDBACK_MODAL_ACTION_BLOCK]: r(() => ({
89
- Component: P,
91
+ Component: h,
90
92
  usePrepare: e,
91
93
  presentation: "modal"
92
94
  })),
93
95
  [o.CONNECTION_DETAIL_ACTION_BLOCK]: r(() => ({
94
- Component: D,
96
+ Component: S,
95
97
  usePrepare: e,
96
98
  title: (t, i) => i.insights_feed?.connection_details?.connection_details_drawer_title ?? ""
97
99
  })),
98
100
  [o.CONNECT_WIDGET_ACTION_BLOCK]: r(() => ({
99
- Component: h,
101
+ Component: R,
100
102
  usePrepare: e
101
103
  })),
102
104
  [o.SURVEY_MODAL_ACTION_BLOCK]: r(() => ({
103
- Component: S,
105
+ Component: E,
104
106
  usePrepare: e,
105
107
  presentation: "modal"
106
108
  })),
107
109
  [o.TRANSACTION_LIST_ACTION_BLOCK]: r(() => ({
108
- Component: U,
110
+ Component: H,
109
111
  usePrepare: a,
110
112
  title: (t, i, m) => m?.insights_payload?.title ?? ""
111
113
  })),
112
114
  [o.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: r(() => ({
113
- Component: x,
115
+ Component: F,
114
116
  presentation: "modal",
115
117
  usePrepare: e
116
118
  }))
117
- }, Po = {
119
+ }, Ro = {
118
120
  account_block: u,
119
121
  account_switch_block: T,
120
122
  direct_deposit_block: B,
121
123
  bar_chart_block: l,
122
124
  budget_block: A,
123
- debts_block: O,
124
- donut_chart_block: C,
125
+ debts_block: f,
126
+ donut_chart_block: k,
125
127
  double_bar_chart_block: _,
126
- double_progress_bar_block: k,
127
- image_block: d,
128
+ double_progress_bar_block: C,
129
+ goals_block: O,
130
+ image_block: P,
131
+ no_spend_days_block: b,
128
132
  repeating_transaction_block: n,
129
- save_extra_block: f,
130
- savings_opportunity_block: b,
133
+ save_extra_block: N,
134
+ savings_opportunity_block: d,
131
135
  step_chart_block: s,
132
- svg_image_block: L,
136
+ svg_image_block: D,
133
137
  upcoming_bill_block: n,
134
- upcoming_subscription_block: g,
135
- withdrawal_block: I,
136
- transaction_block: N
138
+ upcoming_subscription_block: I,
139
+ withdrawal_block: L,
140
+ transaction_block: g
137
141
  };
138
142
  export {
139
- Lo as actionBlocks,
140
- Po as blocks,
141
- W as hasDrawerBlock
143
+ So as actionBlocks,
144
+ Ro as blocks,
145
+ Y as hasDrawerBlock
142
146
  };
143
147
 
144
148
  //# sourceMappingURL=blocks.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n image_block: ImageBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;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A,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
1
+ {"version":3,"file":"blocks.es.js","names":[],"sources":["../../../src/insights-v2/mappings/blocks.ts"],"sourcesContent":["import {\n AccountBlock,\n AccountSwitchBlock,\n BarchartBlock,\n BudgetBlock,\n DebtsBlock,\n DetailedAccountBlock,\n DonutChartBlock,\n GoalsBlock,\n DoubleBarChartBlock,\n DoubleProgressBarBlock,\n NoSpendDaysBlock,\n RepeatingTransactionBlock,\n SaveExtraBlock,\n SavingsOpportunityBlock,\n SVGImageBlock,\n UpcomingSubscriptionBlock,\n WithdrawalBlock,\n TransactionBlock,\n} from '../blocks'\nimport StepChartBlock from '../blocks/ChartBlocks/StepChartBlock'\nimport ImageBlock from '../blocks/ImageBlocks/ImageBlock'\n\nimport type { Beat, GlobalCopy, InsightsPayload } from '../../core'\nimport { ContactSupportActionBlock } from '../actionBlocks/ContactSupportActionBlock'\nimport { FeedbackModalActionBlock } from '../actionBlocks/FeedbackModalActionBlock'\nimport { ConnectionDetailActionBlock } from '../actionBlocks/ConnectionDetailActionBlock'\nimport { ConnectWidgetActionBlock } from '../actionBlocks/ConnectWidgetActionBlock'\nimport { SurveyModalActionBlock } from '../actionBlocks/SurveyModalActionBlock'\nimport { PlaceholderActionBlock } from '../actionBlocks/PlaceholderActionBlock'\nimport { MakeTransferActionBlockLayer } from '../actionBlocks/MakeTransferActionBlock/MakeTransferActionBlockLayer'\nimport { getMakeTransferDrawerTitle } from '../actionBlocks/MakeTransferActionBlock/layout'\nimport { TransactionHistoryBlock } from '../actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock'\nimport { getDrawerHeaderTitle } from '../actionBlocks/TransactionHistoryBlock/utils'\nimport {\n TransactionDetailsBlock,\n useTransactionDetailsPrepare,\n} from '../actionBlocks/TransactionDetailsBlock'\nimport {\n RecurringTransactionBlock,\n useRecurringTransactionPrepare,\n} from '../actionBlocks/RecurringTransactionBlock'\nimport { TransactionListBlock } from '../actionBlocks/TransactionListBlock'\nimport { RemainingCashBlock } from '../actionBlocks/RemainingCashBlock'\nimport { AmountInputModalBlock } from '../actionBlocks/AmountInputModalBlock'\n// Keys live in ./actionBlocksKey (imported directly by chart blocks/tests too) to avoid a\n// circular import between this module and the chart blocks — see that file for details.\nimport { actionBlocksKey } from './actionBlocksKey'\n\n// Drilldown indexes are not passed down: action blocks read them from\n// InsightsV2Store (useInsightsV2Store().actionDrawer).\nexport interface ActionBlockProps {\n beat: Beat\n}\n\nconst noop = (_: ActionBlockProps) => {}\n\n// Re-exported so existing `hasDrawerBlock` imports from this module keep working.\nexport { hasDrawerBlock } from './hasDrawerBlock'\n\nexport interface ActionBlockEntry {\n Component: React.ComponentType<ActionBlockProps>\n usePrepare: (props: ActionBlockProps) => void // required; default to noop in each entry\n // Resolves the drawer title from the clicked CTA's variant + copy, with the beat available\n // for blocks that title from beat fields (e.g. transaction-list reads insights_payload.title).\n // Falls back to the CTA label when the resolver returns an empty string / is absent.\n title?: (variant: string | null | undefined, copy: GlobalCopy, beat?: Beat) => string\n // 'drawer' (default) or 'modal' (component renders its own dialog, no Drawer wrapper).\n presentation?: 'drawer' | 'modal'\n}\n\n// Registry of drawer drilldowns, keyed by the `block` name the backend sends Add\n// `usePrepare` when the block needs to load data before rendering.\n\n/**\n * A registry entry whose fields read their imports when used, not when this module loads. Some\n * registered blocks render `TransactionDetails`, whose embedded card mounts `ActionBlockLayer`,\n * which imports this registry: when one of those blocks loads first, its own import is not\n * initialised yet while this module evaluates, so a value copied at load would be `undefined`\n * (or throw under native ES modules). Reading on access sees the finished import.\n */\nconst liveEntry = (resolve: () => ActionBlockEntry): ActionBlockEntry => ({\n get Component() {\n return resolve().Component\n },\n get usePrepare() {\n return resolve().usePrepare\n },\n get title() {\n return resolve().title\n },\n get presentation() {\n return resolve().presentation\n },\n})\n\nexport const actionBlocks = {\n [actionBlocksKey.PLACEHOLDER_ACTION_BLOCK]: liveEntry(() => ({\n Component: PlaceholderActionBlock,\n usePrepare: noop,\n title: () => 'Action Block Layer Drilldown',\n })),\n [actionBlocksKey.MAKE_TRANSFER_ACTION_BLOCK]: liveEntry(() => ({\n Component: MakeTransferActionBlockLayer,\n usePrepare: noop,\n title: getMakeTransferDrawerTitle,\n })),\n [actionBlocksKey.TRANSCATION_HISTORY_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionHistoryBlock,\n usePrepare: noop,\n title: getDrawerHeaderTitle,\n })),\n [actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionDetailsBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: () => 'Transaction Details',\n })),\n // Expense Details for one recurring subscription. Which subscription a beat names is resolved in\n // `RecurringTransactionBlock/subscriptionBeats.ts`, not through this registry.\n [actionBlocksKey.RECURRING_TRANSACTION_ACTION_BLOCK]: liveEntry(() => ({\n Component: RecurringTransactionBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.recurring?.expense_details ?? '',\n })),\n // Remaining Cash for the Payday Cash Left Over Status beat. Store-driven: reuses the recurring\n // loader, which also loads accounts and categories, so CashflowStore's computeds are ready.\n [actionBlocksKey.REMAINING_CASH_ACTION_BLOCK]: liveEntry(() => ({\n Component: RemainingCashBlock,\n usePrepare: useRecurringTransactionPrepare,\n title: (_variant, copy) => copy.insights_feed?.remaining_cash?.title ?? '',\n })),\n // The block renders its own drawer (the help module's RequestSupport) on top of the action\n // drawer, so the action drawer's title is the CTA label.\n [actionBlocksKey.CONTACT_SUPPORT_ACTION_BLOCK]: liveEntry(() => ({\n Component: ContactSupportActionBlock,\n usePrepare: noop,\n title: (_variant, copy) => copy.help?.request_support ?? '',\n })),\n [actionBlocksKey.FEEDBACK_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: FeedbackModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.CONNECTION_DETAIL_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectionDetailActionBlock,\n usePrepare: noop,\n title: (_variant, copy) =>\n copy.insights_feed?.connection_details?.connection_details_drawer_title ?? '',\n })),\n // Boots MX's Connect widget (web-widget-sdk iframe) inside the action\n // drawer; the drawer title falls back to the CTA label.\n [actionBlocksKey.CONNECT_WIDGET_ACTION_BLOCK]: liveEntry(() => ({\n Component: ConnectWidgetActionBlock,\n usePrepare: noop,\n })),\n [actionBlocksKey.SURVEY_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: SurveyModalActionBlock,\n usePrepare: noop,\n presentation: 'modal',\n })),\n [actionBlocksKey.TRANSACTION_LIST_ACTION_BLOCK]: liveEntry(() => ({\n Component: TransactionListBlock,\n usePrepare: useTransactionDetailsPrepare,\n title: (_variant, _copy, beat) => beat?.insights_payload?.title ?? '',\n })),\n // One whole-dollar setting in a dialog; the CTA variant picks which (low-balance threshold or\n // safety net). A modal: no drawer, so no drawer title.\n [actionBlocksKey.AMOUNT_INPUT_MODAL_ACTION_BLOCK]: liveEntry(() => ({\n Component: AmountInputModalBlock,\n presentation: 'modal',\n // Loads inside the block: it mounts only while open, so mounting is the open-time load.\n usePrepare: noop,\n })),\n} as Record<string, ActionBlockEntry>\n\nexport const blocks = {\n account_block: AccountBlock,\n account_switch_block: AccountSwitchBlock,\n direct_deposit_block: DetailedAccountBlock,\n bar_chart_block: BarchartBlock,\n budget_block: BudgetBlock,\n debts_block: DebtsBlock,\n donut_chart_block: DonutChartBlock,\n double_bar_chart_block: DoubleBarChartBlock,\n double_progress_bar_block: DoubleProgressBarBlock,\n goals_block: GoalsBlock,\n image_block: ImageBlock,\n no_spend_days_block: NoSpendDaysBlock,\n repeating_transaction_block: RepeatingTransactionBlock,\n save_extra_block: SaveExtraBlock,\n savings_opportunity_block: SavingsOpportunityBlock,\n step_chart_block: StepChartBlock,\n svg_image_block: SVGImageBlock,\n upcoming_bill_block: RepeatingTransactionBlock,\n upcoming_subscription_block: UpcomingSubscriptionBlock,\n withdrawal_block: WithdrawalBlock,\n transaction_block: TransactionBlock,\n} as Record<string, React.ComponentType<{ payload: InsightsPayload; beatGuid?: string }>>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,IAAA,CAAQ,MAAwB;AAAC,GA0BjC,IAAA,CAAa,OAAuD;AAAA,EACxE,IAAI,YAAY;AACd,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,aAAa;AACf,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,QAAQ;AACV,WAAO,EAAQ,EAAE;AAAA,EACnB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,EAAQ,EAAE;AAAA,EACnB;AACF,IAEa,KAAe;AAAA,EACzB,CAAA,EAAgB,wBAAA,GAA2B,EAAA,OAAiB;AAAA,IAC3D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EACD,CAAA,EAAgB,0BAAA,GAA6B,EAAA,OAAiB;AAAA,IAC7D,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAO;AAAA,EACT,EAAE;AAAA,EACD,CAAA,EAAgB,gCAAA,GAAmC,EAAA,OAAiB;AAAA,IACnE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,MAAa;AAAA,EACf,EAAE;AAAA,EAGD,CAAA,EAAgB,kCAAA,GAAqC,EAAA,OAAiB;AAAA,IACrE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,OAAA,CAAQ,GAAU,MAAS,EAAK,WAAW,mBAAmB;AAAA,EAChE,EAAE;AAAA,EAGD,CAAA,EAAgB,2BAAA,GAA8B,EAAA,OAAiB;AAAA,IAC9D,WAAW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B;AAAA,EACnB,wBAAwB;AAAA,EACxB,2BAA2B;AAAA,EAC3B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,2BAA2B;AAAA,EAC3B,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAC7B,kBAAkB;AAAA,EAClB,mBAAmB;AACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.26",
3
+ "version": "9.7.28",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",